oasis-editor 0.0.329 → 0.0.331
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/OasisEditorApp-CAUL_Qbk.js +1 -0
- package/dist/assets/{importDocxWorker-Ci29uUzG.js → importDocxWorker-DOTpDpIk.js} +1258 -1149
- package/dist/core/editorState/migrateBuiltinStyles.d.ts +7 -0
- package/dist/core/model/builtinStyles.d.ts +12 -0
- package/dist/core/model/types/styles.d.ts +6 -0
- package/dist/defaultToolbar-DYrAE6Ln.js +1 -0
- package/dist/i18n/locales/en.d.ts +11 -0
- package/dist/i18n/locales/pt-BR.d.ts +11 -0
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +1 -1
- package/dist/oasis-editor.umd.cjs +1 -1
- package/dist/ui/app/essentials/builtinStyleLabel.d.ts +4 -3
- package/dist/ui/components/Toolbar/styleGalleryLayout.d.ts +4 -1
- package/package.json +1 -1
- package/dist/OasisEditorApp-CBbANoKL.js +0 -1
- package/dist/defaultToolbar-DQT_deI6.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EditorDocument, EditorNamedStyle } from '../model.js';
|
|
2
|
+
import { BuiltinStyleId } from '../model/types/styles.js';
|
|
3
|
+
/** Recover unmodified Oasis defaults in older native JSON/IndexedDB documents.
|
|
4
|
+
* Imported styles are identified at the OOXML boundary instead.
|
|
5
|
+
*/
|
|
6
|
+
export declare function legacyBuiltinStyle(style: EditorNamedStyle): BuiltinStyleId | undefined;
|
|
7
|
+
export declare function migrateBuiltinStyles(document: EditorDocument): EditorDocument;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BuiltinStyleId, EditorNamedStyle } from './types/styles.js';
|
|
2
|
+
interface BuiltinStyleDefinition {
|
|
3
|
+
type: "paragraph" | "character";
|
|
4
|
+
names: readonly string[];
|
|
5
|
+
}
|
|
6
|
+
/** Known OOXML identities. Localized aliases aid import only; never rename styles. */
|
|
7
|
+
export declare const BUILTIN_STYLES: Record<BuiltinStyleId, BuiltinStyleDefinition>;
|
|
8
|
+
export declare function isBuiltinStyleId(value: unknown): value is BuiltinStyleId;
|
|
9
|
+
/** An explicit custom style always wins. Require both ID and name to agree. */
|
|
10
|
+
export declare function identifyImportedBuiltinStyle(style: Pick<EditorNamedStyle, "id" | "name" | "type" | "customStyle">): BuiltinStyleId | undefined;
|
|
11
|
+
export declare function semanticBuiltinStyle(style: EditorNamedStyle): BuiltinStyleId | undefined;
|
|
12
|
+
export {};
|
|
@@ -304,10 +304,16 @@ export interface EditorTableStyle {
|
|
|
304
304
|
noVBand: boolean;
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
+
/** Stable semantic identity; independent of the stored style ID and locale. */
|
|
308
|
+
export type BuiltinStyleId = "normal" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "heading7" | "heading8" | "heading9" | "title" | "subtitle" | "caption" | "quote" | "emphasis" | "strong" | "header" | "footer" | "footnoteText" | "footnoteReference";
|
|
307
309
|
export interface EditorNamedStyle {
|
|
308
310
|
id: string;
|
|
309
311
|
name: string;
|
|
310
312
|
type: "paragraph" | "character" | "table";
|
|
313
|
+
/** Semantic built-in identity, persisted independently of the display name. */
|
|
314
|
+
builtinStyle?: BuiltinStyleId;
|
|
315
|
+
/** Explicit OOXML w:customStyle, when available. */
|
|
316
|
+
customStyle?: boolean;
|
|
311
317
|
isDefault?: boolean;
|
|
312
318
|
basedOn?: string;
|
|
313
319
|
nextStyle?: string;
|