commspliant-html-editor 0.0.10 → 0.0.12
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/README.md +148 -15
- package/dist/commspliant-html-editor.css +1 -1
- package/dist/components/Editor.d.ts +1 -1
- package/dist/components/Editor.d.ts.map +1 -1
- package/dist/components/EditorChrome.d.ts +193 -0
- package/dist/components/EditorChrome.d.ts.map +1 -0
- package/dist/components/EditorShellContext.d.ts +13 -0
- package/dist/components/EditorShellContext.d.ts.map +1 -0
- package/dist/components/EditorWorkspaceFrame.d.ts +13 -0
- package/dist/components/EditorWorkspaceFrame.d.ts.map +1 -0
- package/dist/components/EditorWorkspaceHost.d.ts +109 -0
- package/dist/components/EditorWorkspaceHost.d.ts.map +1 -0
- package/dist/components/HtmlPageTabs.d.ts +8 -0
- package/dist/components/HtmlPageTabs.d.ts.map +1 -0
- package/dist/components/MultiPageVisualSurface.d.ts +22 -1
- package/dist/components/MultiPageVisualSurface.d.ts.map +1 -1
- package/dist/components/RulerVisualFrame.d.ts +42 -0
- package/dist/components/RulerVisualFrame.d.ts.map +1 -0
- package/dist/components/VisualSurface.d.ts +21 -1
- package/dist/components/VisualSurface.d.ts.map +1 -1
- package/dist/components/editorDocumentBridgeTypes.d.ts +11 -0
- package/dist/components/editorDocumentBridgeTypes.d.ts.map +1 -0
- package/dist/components/rulerDocumentHandlers.d.ts +14 -0
- package/dist/components/rulerDocumentHandlers.d.ts.map +1 -0
- package/dist/components/useMultiPageRulerMetrics.d.ts +10 -0
- package/dist/components/useMultiPageRulerMetrics.d.ts.map +1 -0
- package/dist/components/usePageRulerMetrics.d.ts +8 -0
- package/dist/components/usePageRulerMetrics.d.ts.map +1 -0
- package/dist/core/commandTypes.d.ts +24 -6
- package/dist/core/commandTypes.d.ts.map +1 -1
- package/dist/core/commands.d.ts.map +1 -1
- package/dist/core/documentEquality.d.ts +6 -0
- package/dist/core/documentEquality.d.ts.map +1 -0
- package/dist/core/documentStyles.d.ts +6 -0
- package/dist/core/documentStyles.d.ts.map +1 -1
- package/dist/core/fontFamily.d.ts +6 -1
- package/dist/core/fontFamily.d.ts.map +1 -1
- package/dist/core/image.d.ts +8 -2
- package/dist/core/image.d.ts.map +1 -1
- package/dist/core/imageRegistry.d.ts +20 -0
- package/dist/core/imageRegistry.d.ts.map +1 -0
- package/dist/core/imageWebp.d.ts +6 -0
- package/dist/core/imageWebp.d.ts.map +1 -0
- package/dist/core/multiPage.d.ts +12 -0
- package/dist/core/multiPage.d.ts.map +1 -1
- package/dist/core/page.d.ts +14 -2
- package/dist/core/page.d.ts.map +1 -1
- package/dist/core/pageAtRule.d.ts.map +1 -1
- package/dist/core/pageBackgroundImage.d.ts +9 -0
- package/dist/core/pageBackgroundImage.d.ts.map +1 -1
- package/dist/core/pageBreak.d.ts +1 -0
- package/dist/core/pageBreak.d.ts.map +1 -1
- package/dist/core/pageCanvasLayout.d.ts +21 -1
- package/dist/core/pageCanvasLayout.d.ts.map +1 -1
- package/dist/core/pageGeometry.d.ts +18 -0
- package/dist/core/pageGeometry.d.ts.map +1 -0
- package/dist/core/pagePrintBleed.d.ts +7 -0
- package/dist/core/pagePrintBleed.d.ts.map +1 -0
- package/dist/core/pageProperties.d.ts.map +1 -1
- package/dist/core/pageRowHeight.d.ts +16 -0
- package/dist/core/pageRowHeight.d.ts.map +1 -0
- package/dist/core/pageZoom.d.ts +5 -0
- package/dist/core/pageZoom.d.ts.map +1 -1
- package/dist/core/paragraphBackgroundImage.d.ts +4 -0
- package/dist/core/paragraphBackgroundImage.d.ts.map +1 -0
- package/dist/core/paragraphIndent.d.ts +19 -0
- package/dist/core/paragraphIndent.d.ts.map +1 -0
- package/dist/core/printLayout.d.ts +3 -0
- package/dist/core/printLayout.d.ts.map +1 -0
- package/dist/core/rulerUnits.d.ts +35 -0
- package/dist/core/rulerUnits.d.ts.map +1 -0
- package/dist/core/visualBodySync.d.ts +13 -0
- package/dist/core/visualBodySync.d.ts.map +1 -0
- package/dist/hooks/useDialogFocusTrap.d.ts +11 -0
- package/dist/hooks/useDialogFocusTrap.d.ts.map +1 -0
- package/dist/hooks/useEditorDialogState.d.ts +197 -0
- package/dist/hooks/useEditorDialogState.d.ts.map +1 -0
- package/dist/hooks/usePageStore.d.ts +32 -0
- package/dist/hooks/usePageStore.d.ts.map +1 -0
- package/dist/hooks/useViewportAnchoredPosition.d.ts +24 -0
- package/dist/hooks/useViewportAnchoredPosition.d.ts.map +1 -0
- package/dist/hooks/useVirtualPageRange.d.ts +30 -0
- package/dist/hooks/useVirtualPageRange.d.ts.map +1 -0
- package/dist/hooks/useVisualPageBodies.d.ts +3 -0
- package/dist/hooks/useVisualPageBodies.d.ts.map +1 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/types.d.ts +144 -0
- package/dist/i18n/types.d.ts.map +1 -1
- package/dist/icons/HelpIcon.d.ts +3 -0
- package/dist/icons/HelpIcon.d.ts.map +1 -0
- package/dist/icons/RulerIcon.d.ts +3 -0
- package/dist/icons/RulerIcon.d.ts.map +1 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/index.cjs +233 -8
- package/dist/index.js +17161 -12732
- package/dist/modules/contextMenu/ContextMenu.d.ts +2 -1
- package/dist/modules/contextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/modules/file/commands.d.ts.map +1 -1
- package/dist/modules/file/fileDialogs.d.ts.map +1 -1
- package/dist/modules/file/printHtml.d.ts +1 -0
- package/dist/modules/file/printHtml.d.ts.map +1 -1
- package/dist/modules/format/ColorField.d.ts.map +1 -1
- package/dist/modules/format/ColorSelect.d.ts.map +1 -1
- package/dist/modules/format/CustomCssDialog.d.ts.map +1 -1
- package/dist/modules/format/CustomParagraphStyleDialog.d.ts.map +1 -1
- package/dist/modules/format/FontFamilySelect.d.ts.map +1 -1
- package/dist/modules/format/FontPropertiesDialog.d.ts.map +1 -1
- package/dist/modules/format/FontSizeCombobox.d.ts.map +1 -1
- package/dist/modules/format/PagePropertiesDialog.d.ts +4 -2
- package/dist/modules/format/PagePropertiesDialog.d.ts.map +1 -1
- package/dist/modules/format/ParagraphPropertiesDialog.d.ts +11 -2
- package/dist/modules/format/ParagraphPropertiesDialog.d.ts.map +1 -1
- package/dist/modules/format/ParagraphStyleSelect.d.ts.map +1 -1
- package/dist/modules/format/paragraphDialog.d.ts.map +1 -1
- package/dist/modules/help/AboutDialog.d.ts +6 -0
- package/dist/modules/help/AboutDialog.d.ts.map +1 -0
- package/dist/modules/help/HelpDialog.d.ts +9 -0
- package/dist/modules/help/HelpDialog.d.ts.map +1 -0
- package/dist/modules/help/articles.d.ts +16 -0
- package/dist/modules/help/articles.d.ts.map +1 -0
- package/dist/modules/help/catalog.d.ts +3 -0
- package/dist/modules/help/catalog.d.ts.map +1 -0
- package/dist/modules/help/commands.d.ts +3 -0
- package/dist/modules/help/commands.d.ts.map +1 -0
- package/dist/modules/help/index.d.ts +5 -0
- package/dist/modules/help/index.d.ts.map +1 -0
- package/dist/modules/help/search.d.ts +10 -0
- package/dist/modules/help/search.d.ts.map +1 -0
- package/dist/modules/help/version.d.ts +3 -0
- package/dist/modules/help/version.d.ts.map +1 -0
- package/dist/modules/history/history.d.ts +4 -0
- package/dist/modules/history/history.d.ts.map +1 -1
- package/dist/modules/history/index.d.ts +4 -2
- package/dist/modules/history/index.d.ts.map +1 -1
- package/dist/modules/history/multiPageHistory.d.ts +38 -0
- package/dist/modules/history/multiPageHistory.d.ts.map +1 -0
- package/dist/modules/insert/AudioDialog.d.ts.map +1 -1
- package/dist/modules/insert/BookmarkDialog.d.ts.map +1 -1
- package/dist/modules/insert/ImageDialog.d.ts.map +1 -1
- package/dist/modules/insert/ImagePropertiesDialog.d.ts.map +1 -1
- package/dist/modules/insert/ImageSizeField.d.ts.map +1 -1
- package/dist/modules/insert/LinkDialog.d.ts.map +1 -1
- package/dist/modules/insert/YoutubeDialog.d.ts.map +1 -1
- package/dist/modules/insert/catalog.d.ts.map +1 -1
- package/dist/modules/insert/commands.d.ts +2 -2
- package/dist/modules/insert/commands.d.ts.map +1 -1
- package/dist/modules/ruler/HorizontalRuler.d.ts +27 -0
- package/dist/modules/ruler/HorizontalRuler.d.ts.map +1 -0
- package/dist/modules/ruler/IndentArrowIcon.d.ts +14 -0
- package/dist/modules/ruler/IndentArrowIcon.d.ts.map +1 -0
- package/dist/modules/ruler/VerticalRuler.d.ts +20 -0
- package/dist/modules/ruler/VerticalRuler.d.ts.map +1 -0
- package/dist/modules/ruler/index.d.ts +5 -0
- package/dist/modules/ruler/index.d.ts.map +1 -0
- package/dist/modules/ruler/rulerTypes.d.ts +26 -0
- package/dist/modules/ruler/rulerTypes.d.ts.map +1 -0
- package/dist/modules/ruler/useRulerPointerDrag.d.ts +17 -0
- package/dist/modules/ruler/useRulerPointerDrag.d.ts.map +1 -0
- package/dist/modules/table/CellPropertiesDialog.d.ts.map +1 -1
- package/dist/modules/table/RowPropertiesDialog.d.ts.map +1 -1
- package/dist/modules/table/TableDialog.d.ts.map +1 -1
- package/dist/modules/table/TablePropertiesDialog.d.ts.map +1 -1
- package/dist/modules/view/DocumentPreviewDialog.d.ts +1 -0
- package/dist/modules/view/DocumentPreviewDialog.d.ts.map +1 -1
- package/dist/modules/view/catalog.d.ts.map +1 -1
- package/dist/modules/view/commands.d.ts +2 -2
- package/dist/modules/view/commands.d.ts.map +1 -1
- package/dist/test/commandContext.d.ts +3 -0
- package/dist/test/commandContext.d.ts.map +1 -0
- package/dist/toolbar/CustomizeToolbarDialog.d.ts.map +1 -1
- package/dist/toolbar/EditorToolbar.d.ts +3 -1
- package/dist/toolbar/EditorToolbar.d.ts.map +1 -1
- package/dist/toolbar/IconNav.d.ts.map +1 -1
- package/dist/toolbar/MenuBar.d.ts.map +1 -1
- package/dist/toolbar/ToolbarQuerySubscription.d.ts +7 -0
- package/dist/toolbar/ToolbarQuerySubscription.d.ts.map +1 -0
- package/dist/toolbar/defaultCatalog.d.ts.map +1 -1
- package/dist/toolbar/defaultLayout.d.ts.map +1 -1
- package/dist/toolbar/multiPageChrome.d.ts +0 -2
- package/dist/toolbar/multiPageChrome.d.ts.map +1 -1
- package/dist/toolbar/toolbarQueryRevisions.d.ts +10 -0
- package/dist/toolbar/toolbarQueryRevisions.d.ts.map +1 -0
- package/dist/toolbar/toolbarShellProps.d.ts +17 -0
- package/dist/toolbar/toolbarShellProps.d.ts.map +1 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RulerUnit } from './rulerUnits';
|
|
2
|
+
export type ParagraphIndentState = {
|
|
3
|
+
firstLineIndentPx: number;
|
|
4
|
+
leftIndentPx: number;
|
|
5
|
+
rightIndentPx: number;
|
|
6
|
+
mixed: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function emptyParagraphIndentState(): ParagraphIndentState;
|
|
9
|
+
/** Query the indent properties of the currently active/selected paragraph blocks */
|
|
10
|
+
export declare function queryParagraphIndent(root: HTMLElement): ParagraphIndentState;
|
|
11
|
+
export type ApplyParagraphIndentOptions = {
|
|
12
|
+
firstLineIndentPx?: number;
|
|
13
|
+
leftIndentPx?: number;
|
|
14
|
+
rightIndentPx?: number;
|
|
15
|
+
unit?: RulerUnit;
|
|
16
|
+
};
|
|
17
|
+
/** Apply first line indent, left indent, and right indent to selected blocks or parent element */
|
|
18
|
+
export declare function applyParagraphIndentInDocument(root: HTMLElement, options: ApplyParagraphIndentOptions): boolean;
|
|
19
|
+
//# sourceMappingURL=paragraphIndent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraphIndent.d.ts","sourceRoot":"","sources":["../../src/core/paragraphIndent.ts"],"names":[],"mappings":"AAMA,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAG7E,MAAM,MAAM,oBAAoB,GAAG;IACjC,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,OAAO,CAAA;CACf,CAAA;AAED,wBAAgB,yBAAyB,IAAI,oBAAoB,CAOhE;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,GAAG,oBAAoB,CAuC5E;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAyBD,kGAAkG;AAClG,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CA+DT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"printLayout.d.ts","sourceRoot":"","sources":["../../src/core/printLayout.ts"],"names":[],"mappings":"AAGA,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAExD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CssLength } from './cssLength';
|
|
2
|
+
export declare const CSS_PX_PER_INCH = 96;
|
|
3
|
+
export declare const MM_PER_INCH = 25.4;
|
|
4
|
+
export declare const CSS_PX_PER_MM: number;
|
|
5
|
+
export declare const CSS_PX_PER_CM: number;
|
|
6
|
+
export declare const POINTS_PER_INCH = 72;
|
|
7
|
+
export type RulerUnit = 'in' | 'cm' | 'mm' | 'pt' | 'px';
|
|
8
|
+
export type RulerTick = {
|
|
9
|
+
positionPx: number;
|
|
10
|
+
unitValue: number;
|
|
11
|
+
major: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function parseFlexibleCssLength(raw: string): {
|
|
16
|
+
value: number;
|
|
17
|
+
unit: string;
|
|
18
|
+
} | null;
|
|
19
|
+
/** Convert a length in CSS pixels to any supported CSS length unit string or number */
|
|
20
|
+
export declare function pxToUnit(px: number, unit: RulerUnit): number;
|
|
21
|
+
/** Convert a value in given unit to CSS pixels */
|
|
22
|
+
export declare function unitToPx(value: number, unit: RulerUnit | string): number;
|
|
23
|
+
/** Parse any CssLength or string length into CSS pixels */
|
|
24
|
+
export declare function parseLengthToPx(length: CssLength | string | null | undefined, fallbackPx?: number): number;
|
|
25
|
+
/** Format pixels to a clean CSS length object in the target unit */
|
|
26
|
+
export declare function pxToCssLength(px: number, unit?: RulerUnit): CssLength;
|
|
27
|
+
/** Convert document px to pt for @page margin storage (round-trips parseCssLength). */
|
|
28
|
+
export declare function pxToMarginCssLength(px: number): CssLength;
|
|
29
|
+
/** Format a measurement for live tooltip display (e.g. 1.25 in or 3.2 cm) */
|
|
30
|
+
export declare function formatMeasurement(px: number, unit?: RulerUnit): string;
|
|
31
|
+
/** Snap a pixel position to standard intervals (0.125in or 2.5mm) unless altKey is pressed */
|
|
32
|
+
export declare function snapRulerPosition(px: number, unit?: RulerUnit, altKey?: boolean, originPx?: number): number;
|
|
33
|
+
/** Generate tick marks for a ruler of a given pixel length */
|
|
34
|
+
export declare function generateRulerTicks(totalLengthPx: number, zeroOffsetPx: number, unit?: RulerUnit): RulerTick[];
|
|
35
|
+
//# sourceMappingURL=rulerUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rulerUnits.d.ts","sourceRoot":"","sources":["../../src/core/rulerUnits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C,eAAO,MAAM,eAAe,KAAK,CAAA;AACjC,eAAO,MAAM,WAAW,OAAO,CAAA;AAC/B,eAAO,MAAM,aAAa,QAAgC,CAAA;AAC1D,eAAO,MAAM,aAAa,QAAqB,CAAA;AAC/C,eAAO,MAAM,eAAe,KAAK,CA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gB,kBAAkB,CAChC,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,IAAI,GAAE,SAAgB,GACrB,SAAS,EAAE,CA+Cb"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HydrateEmbeddedImages } from './documentEquality';
|
|
2
|
+
export type SyncVisualBodyHtmlOptions = {
|
|
3
|
+
resolveDataUrl?: (id: string) => string | null;
|
|
4
|
+
hydrateEmbeddedImages?: HydrateEmbeddedImages;
|
|
5
|
+
};
|
|
6
|
+
export type SyncVisualBodyHtmlResult = {
|
|
7
|
+
changed: boolean;
|
|
8
|
+
};
|
|
9
|
+
/** Stable fingerprint for an image node's binary/source content. */
|
|
10
|
+
export declare function resolveImageContentKey(img: HTMLImageElement, resolveDataUrl?: (id: string) => string | null): string;
|
|
11
|
+
/** Sync visual body HTML while preserving existing image nodes when possible. */
|
|
12
|
+
export declare function syncVisualBodyHtml(root: HTMLElement, nextBodyHtml: string, options?: SyncVisualBodyHtmlOptions): SyncVisualBodyHtmlResult;
|
|
13
|
+
//# sourceMappingURL=visualBodySync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visualBodySync.d.ts","sourceRoot":"","sources":["../../src/core/visualBodySync.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAM1F,MAAM,MAAM,yBAAyB,GAAG;IACtC,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAC9C,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;CAC9C,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,oEAAoE;AACpE,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,gBAAgB,EACrB,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAC7C,MAAM,CAWR;AAwDD,iFAAiF;AACjF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,yBAA8B,GACtC,wBAAwB,CAiB1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare const DEFAULT_DIALOG_FOCUSABLE = "button:not([disabled]):not([tabindex=\"-1\"]), input:not([disabled]):not([hidden]), select:not([disabled]), textarea:not([disabled])";
|
|
3
|
+
export declare const DEFAULT_ESCAPE_IGNORE_SELECTORS = "[role=\"listbox\"], [data-color-picker]";
|
|
4
|
+
export type UseDialogFocusTrapOptions = {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
focusableSelector?: string;
|
|
8
|
+
escapeIgnoreSelectors?: string | false;
|
|
9
|
+
};
|
|
10
|
+
export declare function useDialogFocusTrap(dialogRef: RefObject<HTMLElement | null>, { open, onClose, focusableSelector, escapeIgnoreSelectors, }: UseDialogFocusTrapOptions): void;
|
|
11
|
+
//# sourceMappingURL=useDialogFocusTrap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDialogFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useDialogFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjD,eAAO,MAAM,wBAAwB,yIACiG,CAAA;AAEtI,eAAO,MAAM,+BAA+B,4CAA0C,CAAA;AAEtF,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;CACvC,CAAA;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,EACE,IAAI,EACJ,OAAO,EACP,iBAA4C,EAC5C,qBAAuD,GACxD,EAAE,yBAAyB,GAC3B,IAAI,CAgCN"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { CellPropertiesApply, FontDialogTab, ImageDialogTab, ImagePropertiesApply, LinkDialogTab, PageDialogTab, PagePropertiesApply, ParagraphDialogTab, ParagraphPropertiesApply, RowPropertiesApply, TablePropertiesApply } from '../core/commandTypes';
|
|
2
|
+
import { PageBackgroundImageApply } from '../core/pageBackgroundImage';
|
|
3
|
+
import { HelpTopicId } from '../modules/help/articles';
|
|
4
|
+
import { CustomParagraphStyle, CustomParagraphStyleFont, CustomParagraphStyleParagraph, ToolbarCustomization } from '../types';
|
|
5
|
+
export declare function useEditorDialogState(): {
|
|
6
|
+
fontDialog: {
|
|
7
|
+
open: boolean;
|
|
8
|
+
tab: FontDialogTab;
|
|
9
|
+
};
|
|
10
|
+
setFontDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
11
|
+
open: boolean;
|
|
12
|
+
tab: FontDialogTab;
|
|
13
|
+
}>>;
|
|
14
|
+
customizeToolbarOpen: boolean;
|
|
15
|
+
setCustomizeToolbarOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
16
|
+
documentPreview: {
|
|
17
|
+
open: boolean;
|
|
18
|
+
html: string;
|
|
19
|
+
};
|
|
20
|
+
setDocumentPreview: import('react').Dispatch<import('react').SetStateAction<{
|
|
21
|
+
open: boolean;
|
|
22
|
+
html: string;
|
|
23
|
+
}>>;
|
|
24
|
+
toolbarSettings: ToolbarCustomization | null;
|
|
25
|
+
setToolbarSettings: import('react').Dispatch<import('react').SetStateAction<ToolbarCustomization | null>>;
|
|
26
|
+
toolbarSettingsLoading: boolean;
|
|
27
|
+
setToolbarSettingsLoading: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
28
|
+
toolbarSettingsBusy: boolean;
|
|
29
|
+
setToolbarSettingsBusy: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
30
|
+
paragraphDialog: {
|
|
31
|
+
open: boolean;
|
|
32
|
+
tab: ParagraphDialogTab;
|
|
33
|
+
value: ParagraphPropertiesApply;
|
|
34
|
+
backgroundImage: PageBackgroundImageApply;
|
|
35
|
+
};
|
|
36
|
+
setParagraphDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
37
|
+
open: boolean;
|
|
38
|
+
tab: ParagraphDialogTab;
|
|
39
|
+
value: ParagraphPropertiesApply;
|
|
40
|
+
backgroundImage: PageBackgroundImageApply;
|
|
41
|
+
}>>;
|
|
42
|
+
customCssDialog: {
|
|
43
|
+
open: boolean;
|
|
44
|
+
value: string;
|
|
45
|
+
};
|
|
46
|
+
setCustomCssDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
47
|
+
open: boolean;
|
|
48
|
+
value: string;
|
|
49
|
+
}>>;
|
|
50
|
+
pageDialog: {
|
|
51
|
+
open: boolean;
|
|
52
|
+
tab: PageDialogTab;
|
|
53
|
+
paragraphTab: ParagraphDialogTab;
|
|
54
|
+
value: PagePropertiesApply;
|
|
55
|
+
};
|
|
56
|
+
setPageDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
57
|
+
open: boolean;
|
|
58
|
+
tab: PageDialogTab;
|
|
59
|
+
paragraphTab: ParagraphDialogTab;
|
|
60
|
+
value: PagePropertiesApply;
|
|
61
|
+
}>>;
|
|
62
|
+
deletePageConfirmOpen: boolean;
|
|
63
|
+
setDeletePageConfirmOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
64
|
+
customStyleDialog: {
|
|
65
|
+
open: false;
|
|
66
|
+
} | {
|
|
67
|
+
open: true;
|
|
68
|
+
mode: "create";
|
|
69
|
+
font: CustomParagraphStyleFont;
|
|
70
|
+
paragraph: CustomParagraphStyleParagraph;
|
|
71
|
+
} | {
|
|
72
|
+
open: true;
|
|
73
|
+
mode: "edit";
|
|
74
|
+
style: CustomParagraphStyle;
|
|
75
|
+
};
|
|
76
|
+
setCustomStyleDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
77
|
+
open: false;
|
|
78
|
+
} | {
|
|
79
|
+
open: true;
|
|
80
|
+
mode: "create";
|
|
81
|
+
font: CustomParagraphStyleFont;
|
|
82
|
+
paragraph: CustomParagraphStyleParagraph;
|
|
83
|
+
} | {
|
|
84
|
+
open: true;
|
|
85
|
+
mode: "edit";
|
|
86
|
+
style: CustomParagraphStyle;
|
|
87
|
+
}>>;
|
|
88
|
+
linkDialog: {
|
|
89
|
+
open: boolean;
|
|
90
|
+
tab: LinkDialogTab;
|
|
91
|
+
href: string;
|
|
92
|
+
title: string;
|
|
93
|
+
targetBlank: boolean;
|
|
94
|
+
textDecorationNone: boolean;
|
|
95
|
+
hoverMode: "color" | "html";
|
|
96
|
+
hoverColor: string | null;
|
|
97
|
+
hoverHtml: string;
|
|
98
|
+
bookmarks: {
|
|
99
|
+
id: string;
|
|
100
|
+
}[];
|
|
101
|
+
selectedBookmarkId: string;
|
|
102
|
+
};
|
|
103
|
+
setLinkDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
104
|
+
open: boolean;
|
|
105
|
+
tab: LinkDialogTab;
|
|
106
|
+
href: string;
|
|
107
|
+
title: string;
|
|
108
|
+
targetBlank: boolean;
|
|
109
|
+
textDecorationNone: boolean;
|
|
110
|
+
hoverMode: "color" | "html";
|
|
111
|
+
hoverColor: string | null;
|
|
112
|
+
hoverHtml: string;
|
|
113
|
+
bookmarks: {
|
|
114
|
+
id: string;
|
|
115
|
+
}[];
|
|
116
|
+
selectedBookmarkId: string;
|
|
117
|
+
}>>;
|
|
118
|
+
bookmarkDialog: {
|
|
119
|
+
open: boolean;
|
|
120
|
+
existingIds: string[];
|
|
121
|
+
};
|
|
122
|
+
setBookmarkDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
123
|
+
open: boolean;
|
|
124
|
+
existingIds: string[];
|
|
125
|
+
}>>;
|
|
126
|
+
imageDialog: {
|
|
127
|
+
open: boolean;
|
|
128
|
+
};
|
|
129
|
+
setImageDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
130
|
+
open: boolean;
|
|
131
|
+
}>>;
|
|
132
|
+
audioDialog: {
|
|
133
|
+
open: boolean;
|
|
134
|
+
};
|
|
135
|
+
setAudioDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
136
|
+
open: boolean;
|
|
137
|
+
}>>;
|
|
138
|
+
youtubeDialog: {
|
|
139
|
+
open: boolean;
|
|
140
|
+
};
|
|
141
|
+
setYoutubeDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
142
|
+
open: boolean;
|
|
143
|
+
}>>;
|
|
144
|
+
imageProperties: {
|
|
145
|
+
open: boolean;
|
|
146
|
+
tab: ImageDialogTab;
|
|
147
|
+
value: ImagePropertiesApply;
|
|
148
|
+
aspectRatio: number;
|
|
149
|
+
};
|
|
150
|
+
setImageProperties: import('react').Dispatch<import('react').SetStateAction<{
|
|
151
|
+
open: boolean;
|
|
152
|
+
tab: ImageDialogTab;
|
|
153
|
+
value: ImagePropertiesApply;
|
|
154
|
+
aspectRatio: number;
|
|
155
|
+
}>>;
|
|
156
|
+
tableDialog: {
|
|
157
|
+
open: boolean;
|
|
158
|
+
};
|
|
159
|
+
setTableDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
160
|
+
open: boolean;
|
|
161
|
+
}>>;
|
|
162
|
+
tableProperties: {
|
|
163
|
+
open: boolean;
|
|
164
|
+
value: TablePropertiesApply;
|
|
165
|
+
};
|
|
166
|
+
setTableProperties: import('react').Dispatch<import('react').SetStateAction<{
|
|
167
|
+
open: boolean;
|
|
168
|
+
value: TablePropertiesApply;
|
|
169
|
+
}>>;
|
|
170
|
+
cellProperties: {
|
|
171
|
+
open: boolean;
|
|
172
|
+
value: CellPropertiesApply;
|
|
173
|
+
};
|
|
174
|
+
setCellProperties: import('react').Dispatch<import('react').SetStateAction<{
|
|
175
|
+
open: boolean;
|
|
176
|
+
value: CellPropertiesApply;
|
|
177
|
+
}>>;
|
|
178
|
+
rowProperties: {
|
|
179
|
+
open: boolean;
|
|
180
|
+
value: RowPropertiesApply;
|
|
181
|
+
};
|
|
182
|
+
setRowProperties: import('react').Dispatch<import('react').SetStateAction<{
|
|
183
|
+
open: boolean;
|
|
184
|
+
value: RowPropertiesApply;
|
|
185
|
+
}>>;
|
|
186
|
+
helpDialog: {
|
|
187
|
+
open: boolean;
|
|
188
|
+
topicId: HelpTopicId;
|
|
189
|
+
};
|
|
190
|
+
setHelpDialog: import('react').Dispatch<import('react').SetStateAction<{
|
|
191
|
+
open: boolean;
|
|
192
|
+
topicId: HelpTopicId;
|
|
193
|
+
}>>;
|
|
194
|
+
aboutDialogOpen: boolean;
|
|
195
|
+
setAboutDialogOpen: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
|
196
|
+
};
|
|
197
|
+
//# sourceMappingURL=useEditorDialogState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEditorDialogState.d.ts","sourceRoot":"","sources":["../../src/hooks/useEditorDialogState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAiC,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAO1G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,6BAA6B,EAC7B,oBAAoB,EACrB,MAAM,UAAU,CAAA;AAEjB,wBAAgB,oBAAoB;;cACmB,OAAO;aAAO,aAAa;;;cAA3B,OAAO;aAAO,aAAa;;;;;;;;;;;;;;;;;;;cAUxE,OAAO;aACR,kBAAkB;eACh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kB;;;cAMnB,OAAO;iBACJ,WAAW;;;cADd,OAAO;iBACJ,WAAW;;;;EAuDvB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
export type PageStoreSnapshot = {
|
|
3
|
+
pages: string[];
|
|
4
|
+
revision: number;
|
|
5
|
+
};
|
|
6
|
+
export type SetPagesOptions = {
|
|
7
|
+
editedIndex?: number;
|
|
8
|
+
};
|
|
9
|
+
export type PageStore = {
|
|
10
|
+
pages: string[];
|
|
11
|
+
revision: number;
|
|
12
|
+
dirtyPagesRef: MutableRefObject<Set<number>>;
|
|
13
|
+
setPages: (nextPages: readonly string[], options?: SetPagesOptions) => PagesCommitResult;
|
|
14
|
+
updatePage: (index: number, nextPage: string, options?: SetPagesOptions) => PagesCommitResult;
|
|
15
|
+
replacePages: (nextPages: readonly string[]) => PagesCommitResult;
|
|
16
|
+
markPagesClean: (indices?: Iterable<number>) => void;
|
|
17
|
+
getJoinedHtml: () => string;
|
|
18
|
+
};
|
|
19
|
+
export type PagesCommitResult = {
|
|
20
|
+
changed: boolean;
|
|
21
|
+
pages: string[];
|
|
22
|
+
joined: string;
|
|
23
|
+
changedIndices: number[];
|
|
24
|
+
};
|
|
25
|
+
type UsePageStoreOptions = {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
pagesProp?: string[];
|
|
28
|
+
defaultPages: readonly string[];
|
|
29
|
+
};
|
|
30
|
+
export declare function usePageStore({ enabled, pagesProp, defaultPages, }: UsePageStoreOptions): PageStore;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=usePageStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePageStore.d.ts","sourceRoot":"","sources":["../../src/hooks/usePageStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAShG,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,M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
export declare const VIEWPORT_PAD_PX = 4;
|
|
3
|
+
export type ViewportAnchorCoords = {
|
|
4
|
+
top: number;
|
|
5
|
+
left: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
};
|
|
8
|
+
export type ComputeViewportAnchorOptions = {
|
|
9
|
+
anchorRect: DOMRect;
|
|
10
|
+
floatingWidth: number;
|
|
11
|
+
floatingHeight: number;
|
|
12
|
+
pad?: number;
|
|
13
|
+
minWidth?: number;
|
|
14
|
+
matchAnchorWidth?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function computeViewportAnchoredPosition({ anchorRect, floatingWidth, floatingHeight, pad, minWidth, matchAnchorWidth, }: ComputeViewportAnchorOptions): ViewportAnchorCoords;
|
|
17
|
+
export type UseViewportAnchoredPositionOptions = {
|
|
18
|
+
pad?: number;
|
|
19
|
+
minWidth?: number;
|
|
20
|
+
matchAnchorWidth?: boolean;
|
|
21
|
+
deps?: readonly unknown[];
|
|
22
|
+
};
|
|
23
|
+
export declare function useViewportAnchoredPosition(open: boolean, anchorRef: RefObject<HTMLElement | null>, floatingRef: RefObject<HTMLElement | null>, { pad, minWidth, matchAnchorWidth, deps, }?: UseViewportAnchoredPositionOptions): ViewportAnchorCoords;
|
|
24
|
+
//# sourceMappingURL=useViewportAnchoredPosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useViewportAnchoredPosition.d.ts","sourceRoot":"","sources":["../../src/hooks/useViewportAnchoredPosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE9E,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,EAAE,OAAO,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,UAAU,EACV,aAAa,EACb,cAAc,EACd,GAAqB,EACrB,QAAY,EACZ,gBAAwB,GACzB,EAAE,4BAA4B,GAAG,oBAAoB,CAWrD;AAED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,CAAA;CAC1B,CAAA;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,WAAW,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAC1C,EACE,GAAqB,EACrB,QAAY,EACZ,gBAAwB,EACxB,IAAS,GACV,GAAE,kCAAuC,GACzC,oBAAoB,CAuCtB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare const DEFAULT_PAGE_OVERSCAN = 2;
|
|
3
|
+
export type VirtualPageRange = {
|
|
4
|
+
startIndex: number;
|
|
5
|
+
endIndex: number;
|
|
6
|
+
topSpacerHeight: number;
|
|
7
|
+
bottomSpacerHeight: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function findFirstVisiblePageIndex(scrollTop: number, prefixSums: readonly number[], pageCount: number): number;
|
|
10
|
+
export declare function findLastVisiblePageIndex(scrollBottom: number, prefixSums: readonly number[], pageCount: number): number;
|
|
11
|
+
export declare function computeVirtualPageRange(scrollTop: number, viewportHeight: number, prefixSums: readonly number[], pageCount: number, overscan: number, activePageIndex: number, pinActivePage: boolean): VirtualPageRange;
|
|
12
|
+
type UseVirtualPageRangeOptions = {
|
|
13
|
+
scrollElementRef: RefObject<HTMLElement | null>;
|
|
14
|
+
pageCount: number;
|
|
15
|
+
getRowHeight: (index: number) => number;
|
|
16
|
+
overscan?: number;
|
|
17
|
+
activePageIndex: number;
|
|
18
|
+
pinActivePage?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function useVirtualPageRange({ scrollElementRef, pageCount, getRowHeight, overscan, activePageIndex, pinActivePage, }: UseVirtualPageRangeOptions): {
|
|
21
|
+
visibleIndices: number[];
|
|
22
|
+
scrollToIndex: (index: number) => void;
|
|
23
|
+
notifyRowMeasured: (index: number, height: number) => void;
|
|
24
|
+
startIndex: number;
|
|
25
|
+
endIndex: number;
|
|
26
|
+
topSpacerHeight: number;
|
|
27
|
+
bottomSpacerHeight: number;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=useVirtualPageRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVirtualPageRange.d.ts","sourceRoot":"","sources":["../../src/hooks/useVirtualPageRange.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAGd,eAAO,MAAM,qBAAqB,IAAI,CAAA;AAEtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,SAAS,EAAE,MAAM,GAChB,MAAM,CAeR;AAED,wBAAgB,wBAAwB,CACtC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,SAAS,EAAE,MAAM,GAChB,MAAM,CAeR;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,OAAO,GACrB,gBAAgB,CAuBlB;AAED,KAAK,0BAA0B,GAAG;IAChC,gBAAgB,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC/C,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,QAAgC,EAChC,eAAe,EACf,aAAoB,GACrB,EAAE,0BAA0B;;2BAiFjB,MAAM;+BAT8B,MAAM,UAAU,MAAM;gBAzKxD,MAAM;cACR,MAAM;qBACC,MAAM;wBACH,MAAM;EAwM3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVisualPageBodies.d.ts","sourceRoot":"","sources":["../../src/hooks/useVisualPageBodies.ts"],"names":[],"mappings":"AAGA,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBxF"}
|
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,EAAE,EAAE,QA0mBhB,CAAA"}
|
package/dist/i18n/es.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,EAAE,EAAE,QA0mBhB,CAAA"}
|
package/dist/i18n/types.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export type Messages = {
|
|
|
13
13
|
exitFullscreenAria: string;
|
|
14
14
|
visualEditorAria: string;
|
|
15
15
|
htmlEditorAria: string;
|
|
16
|
+
htmlModePageTab: string;
|
|
17
|
+
htmlModePageTabsAria: string;
|
|
18
|
+
htmlModePageTabsScrollLeftAria: string;
|
|
19
|
+
htmlModePageTabsScrollRightAria: string;
|
|
16
20
|
menuFile: string;
|
|
17
21
|
menuFileAria: string;
|
|
18
22
|
menuEdit: string;
|
|
@@ -80,6 +84,10 @@ export type Messages = {
|
|
|
80
84
|
commandBookmarkAria: string;
|
|
81
85
|
commandImage: string;
|
|
82
86
|
commandImageAria: string;
|
|
87
|
+
commandPageBackgroundImage: string;
|
|
88
|
+
commandPageBackgroundImageAria: string;
|
|
89
|
+
commandParagraphBackgroundImage: string;
|
|
90
|
+
commandParagraphBackgroundImageAria: string;
|
|
83
91
|
commandAudio: string;
|
|
84
92
|
commandAudioAria: string;
|
|
85
93
|
commandYoutube: string;
|
|
@@ -465,12 +473,148 @@ export type Messages = {
|
|
|
465
473
|
showComments: string;
|
|
466
474
|
hideComments: string;
|
|
467
475
|
toggleCommentsVisibleAria: string;
|
|
476
|
+
commandRuler: string;
|
|
477
|
+
commandRulerAria: string;
|
|
478
|
+
rulerMarginLeft: string;
|
|
479
|
+
rulerMarginRight: string;
|
|
480
|
+
rulerMarginTop: string;
|
|
481
|
+
rulerMarginBottom: string;
|
|
482
|
+
rulerFirstLineIndent: string;
|
|
483
|
+
rulerLeftIndent: string;
|
|
484
|
+
rulerRightIndent: string;
|
|
468
485
|
commentPanelTitle: string;
|
|
469
486
|
commentPlaceholder: string;
|
|
470
487
|
commentReplyPlaceholder: string;
|
|
471
488
|
commentPost: string;
|
|
472
489
|
commentEmpty: string;
|
|
473
490
|
commentPanelCloseAria: string;
|
|
491
|
+
menuHelp: string;
|
|
492
|
+
menuHelpAria: string;
|
|
493
|
+
commandEditorHelp: string;
|
|
494
|
+
commandEditorHelpAria: string;
|
|
495
|
+
commandKeyboardShortcuts: string;
|
|
496
|
+
commandKeyboardShortcutsAria: string;
|
|
497
|
+
commandAbout: string;
|
|
498
|
+
commandAboutAria: string;
|
|
499
|
+
helpDialogTitle: string;
|
|
500
|
+
helpDialogCloseAria: string;
|
|
501
|
+
helpDialogSearchPlaceholder: string;
|
|
502
|
+
helpDialogSearchAria: string;
|
|
503
|
+
helpDialogContentsAria: string;
|
|
504
|
+
helpDialogNoResults: string;
|
|
505
|
+
helpDialogRelatedTitle: string;
|
|
506
|
+
aboutDialogTitle: string;
|
|
507
|
+
aboutDialogCloseAria: string;
|
|
508
|
+
aboutDialogClose: string;
|
|
509
|
+
aboutDialogVersion: string;
|
|
510
|
+
aboutDialogDescription: string;
|
|
511
|
+
aboutDialogWebsiteCta: string;
|
|
512
|
+
aboutDialogWebsite: string;
|
|
513
|
+
aboutDialogWebsiteAria: string;
|
|
514
|
+
helpCategoryGetStarted: string;
|
|
515
|
+
helpCategoryFile: string;
|
|
516
|
+
helpCategoryEdit: string;
|
|
517
|
+
helpCategoryInsert: string;
|
|
518
|
+
helpCategoryFormat: string;
|
|
519
|
+
helpCategoryTable: string;
|
|
520
|
+
helpCategoryView: string;
|
|
521
|
+
helpCategoryKeyboard: string;
|
|
522
|
+
helpTopicGetStartedTitle: string;
|
|
523
|
+
helpTopicGetStartedBody: string;
|
|
524
|
+
helpTopicGetStartedKeywords: string;
|
|
525
|
+
helpTopicSwitchModesTitle: string;
|
|
526
|
+
helpTopicSwitchModesBody: string;
|
|
527
|
+
helpTopicSwitchModesKeywords: string;
|
|
528
|
+
helpTopicSearchHelpTitle: string;
|
|
529
|
+
helpTopicSearchHelpBody: string;
|
|
530
|
+
helpTopicSearchHelpKeywords: string;
|
|
531
|
+
helpTopicSaveDocumentTitle: string;
|
|
532
|
+
helpTopicSaveDocumentBody: string;
|
|
533
|
+
helpTopicSaveDocumentKeywords: string;
|
|
534
|
+
helpTopicOpenDocumentTitle: string;
|
|
535
|
+
helpTopicOpenDocumentBody: string;
|
|
536
|
+
helpTopicOpenDocumentKeywords: string;
|
|
537
|
+
helpTopicPrintDocumentTitle: string;
|
|
538
|
+
helpTopicPrintDocumentBody: string;
|
|
539
|
+
helpTopicPrintDocumentKeywords: string;
|
|
540
|
+
helpTopicUndoRedoTitle: string;
|
|
541
|
+
helpTopicUndoRedoBody: string;
|
|
542
|
+
helpTopicUndoRedoKeywords: string;
|
|
543
|
+
helpTopicPagePropertiesTitle: string;
|
|
544
|
+
helpTopicPagePropertiesBody: string;
|
|
545
|
+
helpTopicPagePropertiesKeywords: string;
|
|
546
|
+
helpTopicDeletePageTitle: string;
|
|
547
|
+
helpTopicDeletePageBody: string;
|
|
548
|
+
helpTopicDeletePageKeywords: string;
|
|
549
|
+
helpTopicInsertTableTitle: string;
|
|
550
|
+
helpTopicInsertTableBody: string;
|
|
551
|
+
helpTopicInsertTableKeywords: string;
|
|
552
|
+
helpTopicInsertImageTitle: string;
|
|
553
|
+
helpTopicInsertImageBody: string;
|
|
554
|
+
helpTopicInsertImageKeywords: string;
|
|
555
|
+
helpTopicInsertLinkTitle: string;
|
|
556
|
+
helpTopicInsertLinkBody: string;
|
|
557
|
+
helpTopicInsertLinkKeywords: string;
|
|
558
|
+
helpTopicInsertBookmarkTitle: string;
|
|
559
|
+
helpTopicInsertBookmarkBody: string;
|
|
560
|
+
helpTopicInsertBookmarkKeywords: string;
|
|
561
|
+
helpTopicInsertMediaTitle: string;
|
|
562
|
+
helpTopicInsertMediaBody: string;
|
|
563
|
+
helpTopicInsertMediaKeywords: string;
|
|
564
|
+
helpTopicPageBreakTitle: string;
|
|
565
|
+
helpTopicPageBreakBody: string;
|
|
566
|
+
helpTopicPageBreakKeywords: string;
|
|
567
|
+
helpTopicInsertPageTitle: string;
|
|
568
|
+
helpTopicInsertPageBody: string;
|
|
569
|
+
helpTopicInsertPageKeywords: string;
|
|
570
|
+
helpTopicInsertCommentTitle: string;
|
|
571
|
+
helpTopicInsertCommentBody: string;
|
|
572
|
+
helpTopicInsertCommentKeywords: string;
|
|
573
|
+
helpTopicFormatFontTitle: string;
|
|
574
|
+
helpTopicFormatFontBody: string;
|
|
575
|
+
helpTopicFormatFontKeywords: string;
|
|
576
|
+
helpTopicParagraphStylesTitle: string;
|
|
577
|
+
helpTopicParagraphStylesBody: string;
|
|
578
|
+
helpTopicParagraphStylesKeywords: string;
|
|
579
|
+
helpTopicTextColorTitle: string;
|
|
580
|
+
helpTopicTextColorBody: string;
|
|
581
|
+
helpTopicTextColorKeywords: string;
|
|
582
|
+
helpTopicAlignListsTitle: string;
|
|
583
|
+
helpTopicAlignListsBody: string;
|
|
584
|
+
helpTopicAlignListsKeywords: string;
|
|
585
|
+
helpTopicClearFormattingTitle: string;
|
|
586
|
+
helpTopicClearFormattingBody: string;
|
|
587
|
+
helpTopicClearFormattingKeywords: string;
|
|
588
|
+
helpTopicCustomCssTitle: string;
|
|
589
|
+
helpTopicCustomCssBody: string;
|
|
590
|
+
helpTopicCustomCssKeywords: string;
|
|
591
|
+
helpTopicTableRowsColumnsTitle: string;
|
|
592
|
+
helpTopicTableRowsColumnsBody: string;
|
|
593
|
+
helpTopicTableRowsColumnsKeywords: string;
|
|
594
|
+
helpTopicMergeCellsTitle: string;
|
|
595
|
+
helpTopicMergeCellsBody: string;
|
|
596
|
+
helpTopicMergeCellsKeywords: string;
|
|
597
|
+
helpTopicCustomizeToolbarTitle: string;
|
|
598
|
+
helpTopicCustomizeToolbarBody: string;
|
|
599
|
+
helpTopicCustomizeToolbarKeywords: string;
|
|
600
|
+
helpTopicZoomTitle: string;
|
|
601
|
+
helpTopicZoomBody: string;
|
|
602
|
+
helpTopicZoomKeywords: string;
|
|
603
|
+
helpTopicDarkModeTitle: string;
|
|
604
|
+
helpTopicDarkModeBody: string;
|
|
605
|
+
helpTopicDarkModeKeywords: string;
|
|
606
|
+
helpTopicPreviewTitle: string;
|
|
607
|
+
helpTopicPreviewBody: string;
|
|
608
|
+
helpTopicPreviewKeywords: string;
|
|
609
|
+
helpTopicFullscreenTitle: string;
|
|
610
|
+
helpTopicFullscreenBody: string;
|
|
611
|
+
helpTopicFullscreenKeywords: string;
|
|
612
|
+
helpTopicRulerTitle: string;
|
|
613
|
+
helpTopicRulerBody: string;
|
|
614
|
+
helpTopicRulerKeywords: string;
|
|
615
|
+
helpTopicKeyboardShortcutsTitle: string;
|
|
616
|
+
helpTopicKeyboardShortcutsBody: string;
|
|
617
|
+
helpTopicKeyboardShortcutsKeywords: string;
|
|
474
618
|
};
|
|
475
619
|
export type MessageKey = keyof Messages;
|
|
476
620
|
//# sourceMappingURL=types.d.ts.map
|