- Implement `remove-inline-scripts.js` to externalize Next.js inline scripts, enhancing CSP compliance. - Add models for `Book`, `Character`, `Story`, `Editor`, `System`, and `BookSerie` with relevant properties and utilities. - Include macOS entitlements plist for app development with advanced permissions. - Add utility functions to handle script hashing, cookie management, and content formatting.
21 lines
500 B
TypeScript
Executable File
21 lines
500 B
TypeScript
Executable File
import {IconDefinition} from "@fortawesome/free-solid-svg-icons";
|
|
|
|
export interface PanelComponent {
|
|
id: number,
|
|
title: string,
|
|
badge: string,
|
|
description: string,
|
|
icon: IconDefinition,
|
|
action?: () => void,
|
|
}
|
|
|
|
export default class Editor {
|
|
public static convertToHtml(text: string): string {
|
|
return text
|
|
.split(/\n\s*\n/)
|
|
.map((paragraph: string): string => `<p>${paragraph.trim()}</p>`)
|
|
.join('');
|
|
}
|
|
|
|
}
|