oasis-editor 0.0.131 → 0.0.133

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.
Files changed (78) hide show
  1. package/dist/{OasisEditorApp-Dn2I2b-M.js → OasisEditorApp-DmXn9H33.js} +716 -684
  2. package/dist/adapters/mountController.d.ts +12 -0
  3. package/dist/adapters/vue.d.ts +5 -5
  4. package/dist/app/controllers/EditorCommandRegistry.d.ts +2 -1
  5. package/dist/app/controllers/tableResize/tableResizeUnits.d.ts +3 -1
  6. package/dist/assets/{importDocxWorker-DdpdjbOY.js → importDocxWorker-CCwhxVSR.js} +1 -1
  7. package/dist/core/commands/builtinCommands.d.ts +1 -1
  8. package/dist/core/editorState/defaultStyles.d.ts +3 -0
  9. package/dist/core/editorState/documentFactories.d.ts +8 -0
  10. package/dist/core/editorState/nodeFactories.d.ts +35 -0
  11. package/dist/core/editorState/stateFactories.d.ts +26 -0
  12. package/dist/core/editorState.d.ts +4 -66
  13. package/dist/core/units/parseUnitToPt.d.ts +6 -0
  14. package/dist/export/docx/xmlUtils.d.ts +2 -0
  15. package/dist/import/docx/runs/drawingAnchorLayout.d.ts +12 -0
  16. package/dist/{index-BXo_oqOC.js → index-BOj4-NlJ.js} +2244 -2177
  17. package/dist/layoutProjection/presetGeometry/families/arrows.d.ts +3 -0
  18. package/dist/layoutProjection/presetGeometry/families/banners.d.ts +5 -0
  19. package/dist/layoutProjection/presetGeometry/families/bracesBrackets.d.ts +4 -0
  20. package/dist/layoutProjection/presetGeometry/families/callouts.d.ts +3 -0
  21. package/dist/layoutProjection/presetGeometry/families/connectors.d.ts +3 -0
  22. package/dist/layoutProjection/presetGeometry/families/containers3d.d.ts +11 -0
  23. package/dist/layoutProjection/presetGeometry/families/decorative.d.ts +9 -0
  24. package/dist/layoutProjection/presetGeometry/families/flowchart.d.ts +4 -0
  25. package/dist/layoutProjection/presetGeometry/families/mathSymbols.d.ts +8 -0
  26. package/dist/layoutProjection/presetGeometry/families/rectVariants.d.ts +5 -0
  27. package/dist/mountController-D2srsZ5t.js +15 -0
  28. package/dist/mountController.d.ts +12 -0
  29. package/dist/oasis-editor.css +1 -1
  30. package/dist/oasis-editor.js +54 -54
  31. package/dist/oasis-editor.umd.cjs +4 -4
  32. package/dist/plugins/internal/essentialsCapabilities.d.ts +2 -1
  33. package/dist/plugins/internal/essentialsCommandBuilders.d.ts +8 -7
  34. package/dist/plugins/internal/essentialsCommandGroups/coreFormatting.d.ts +17 -0
  35. package/dist/plugins/internal/essentialsCommandGroups/documentAndBrowser.d.ts +15 -0
  36. package/dist/plugins/internal/essentialsCommandGroups/paragraphAndSection.d.ts +13 -0
  37. package/dist/plugins/internal/essentialsCommandGroups/table.d.ts +11 -0
  38. package/dist/react.js +14 -15
  39. package/dist/text/fontMetricsUtil.d.ts +16 -0
  40. package/dist/text/fonts/opentype/extensionLookup.d.ts +9 -0
  41. package/dist/ui/EditorImportProgressOverlay.d.ts +7 -0
  42. package/dist/ui/EditorStatusBar.d.ts +13 -0
  43. package/dist/ui/OasisEditorEditor.d.ts +3 -117
  44. package/dist/ui/OasisEditorEditorProps.d.ts +118 -0
  45. package/dist/ui/app/createEditorEssentialsPlugin.d.ts +2 -41
  46. package/dist/ui/app/essentials/browser.d.ts +3 -0
  47. package/dist/ui/app/essentials/document.d.ts +4 -0
  48. package/dist/ui/app/essentials/formatting.d.ts +9 -0
  49. package/dist/ui/app/essentials/gate.d.ts +4 -0
  50. package/dist/ui/app/essentials/history.d.ts +4 -0
  51. package/dist/ui/app/essentials/image.d.ts +4 -0
  52. package/dist/ui/app/essentials/link.d.ts +4 -0
  53. package/dist/ui/app/essentials/paragraph.d.ts +4 -0
  54. package/dist/ui/app/essentials/section.d.ts +4 -0
  55. package/dist/ui/app/essentials/selection.d.ts +4 -0
  56. package/dist/ui/app/essentials/style.d.ts +4 -0
  57. package/dist/ui/app/essentials/table.d.ts +4 -0
  58. package/dist/ui/app/essentials/types.d.ts +41 -0
  59. package/dist/ui/canvas/canvasLineSlotLookup.d.ts +8 -0
  60. package/dist/ui/canvas/canvasSnapshotLines.d.ts +22 -0
  61. package/dist/ui/canvas/canvasSnapshotWalkers.d.ts +41 -0
  62. package/dist/ui/canvas/canvasTheme.d.ts +6 -0
  63. package/dist/ui/components/Dialogs/ParagraphDialog.d.ts +2 -69
  64. package/dist/ui/components/Dialogs/paragraph-dialog/ParagraphDialogTypes.d.ts +82 -0
  65. package/dist/ui/components/Dialogs/paragraph-dialog/useParagraphDialogController.d.ts +66 -0
  66. package/dist/ui/components/Dialogs/table-properties/TablePropertiesTypes.d.ts +0 -1
  67. package/dist/ui/components/Toolbar/LineSpacingButton.d.ts +10 -0
  68. package/dist/ui/components/Toolbar/presets/defaultToolbar/buttonSpecs.d.ts +27 -0
  69. package/dist/ui/components/Toolbar/presets/defaultToolbar/optionBuilders.d.ts +10 -0
  70. package/dist/ui/components/Toolbar/presets/defaultToolbar/ribbonPlacements.d.ts +3 -0
  71. package/dist/ui/components/Toolbar/primitives/DropdownChevron.d.ts +20 -0
  72. package/dist/ui/utils/customIcons.d.ts +30 -0
  73. package/dist/utils/parseNumber.d.ts +5 -0
  74. package/dist/vue.d.ts +5 -5
  75. package/dist/vue.js +10 -12
  76. package/package.json +1 -1
  77. package/dist/layoutProjection/presetGeometry/families.d.ts +0 -37
  78. package/dist/plugins/internal/essentialsCommandGroups.d.ts +0 -41
@@ -0,0 +1,41 @@
1
+ import { EditorEditingZone, EditorLayoutBlock, EditorLayoutPage, EditorState } from '../../core/model.js';
2
+ import { CanvasLayoutSnapshot, CanvasSnapshotFloatingImage, CanvasSnapshotFloatingTable, CanvasSnapshotFloatingTextBox, CanvasSnapshotInlineImage, CanvasSnapshotInlineTextBox, CanvasSnapshotParagraph } from './canvasSnapshotTypes.js';
3
+
4
+ interface PageRect {
5
+ left: number;
6
+ top: number;
7
+ width: number;
8
+ height: number;
9
+ }
10
+ /**
11
+ * Stable references shared by the per-block walkers: the document state, the
12
+ * current layout page and its unscaled screen rect, the paragraph-index map,
13
+ * and the mutable accumulator arrays the walkers push into.
14
+ */
15
+ export interface SnapshotWalkContext {
16
+ state: EditorState;
17
+ page: EditorLayoutPage;
18
+ pageRect: PageRect;
19
+ paragraphIndexById: Map<string, number>;
20
+ snapshotParagraphs: CanvasSnapshotParagraph[];
21
+ inlineImages: CanvasSnapshotInlineImage[];
22
+ floatingImages: CanvasSnapshotFloatingImage[];
23
+ inlineTextBoxes: CanvasSnapshotInlineTextBox[];
24
+ floatingTextBoxes: CanvasSnapshotFloatingTextBox[];
25
+ floatingTables: CanvasSnapshotFloatingTable[];
26
+ unsupportedRegions: CanvasLayoutSnapshot["unsupportedRegions"];
27
+ }
28
+ interface BlockWalkArgs {
29
+ zone: EditorEditingZone;
30
+ block: EditorLayoutBlock;
31
+ blockContentLeft: number;
32
+ blockContentWidth: number;
33
+ cursorY: number;
34
+ startTop: number;
35
+ blockFootnoteId: string | undefined;
36
+ }
37
+ /** Walks a paragraph layout block, appending its snapshot geometry + objects. */
38
+ export declare function collectSnapshotParagraph(ctx: SnapshotWalkContext, args: BlockWalkArgs): void;
39
+ /** Walks a table layout block, appending its cell geometry + nested objects. */
40
+ export declare function collectSnapshotTable(ctx: SnapshotWalkContext, args: BlockWalkArgs): void;
41
+ export {};
@@ -0,0 +1,6 @@
1
+ /** Non-printing margin/column guide dashed rule shown when "Show margins" is on. */
2
+ export declare const CANVAS_MARGIN_GUIDE_COLOR = "#d1d5db";
3
+ /** Column-separator rule and pilcrow (¶) paragraph-mark glyph color. */
4
+ export declare const CANVAS_MUTED_MARK_COLOR = "#9ca3af";
5
+ /** Default table cell/border stroke color when no explicit border color is set. */
6
+ export declare const CANVAS_DEFAULT_TABLE_BORDER_COLOR = "#6f6f6f";
@@ -1,72 +1,5 @@
1
1
  import { JSX } from 'solid-js';
2
- import { EditorBorderStyle, EditorParagraphStyle, EditorTabStop } from '../../../core/model.js';
2
+ import { ParagraphDialogProps } from './paragraph-dialog/ParagraphDialogTypes.js';
3
3
 
4
- type LineRuleValue = "auto" | "exact" | "atLeast" | null;
5
- export interface ParagraphDialogInitialValues {
6
- align: string;
7
- indentLeft: string;
8
- indentRight: string;
9
- indentFirstLine: string;
10
- indentHanging: string;
11
- mirrorIndents: boolean;
12
- spacingBefore: string;
13
- spacingAfter: string;
14
- lineHeight: string;
15
- lineRule: string;
16
- contextualSpacing: boolean;
17
- outlineLevel: string;
18
- shading: string;
19
- borderStyle: string;
20
- borderWidth: string;
21
- borderColor: string;
22
- borderSideTop: boolean;
23
- borderSideRight: boolean;
24
- borderSideBottom: boolean;
25
- borderSideLeft: boolean;
26
- pageBreakBefore: boolean;
27
- keepWithNext: boolean;
28
- keepLinesTogether: boolean;
29
- widowControl: boolean;
30
- tabs: EditorTabStop[];
31
- }
32
- export interface ParagraphDialogBorders {
33
- top: EditorBorderStyle | null;
34
- right: EditorBorderStyle | null;
35
- bottom: EditorBorderStyle | null;
36
- left: EditorBorderStyle | null;
37
- }
38
- export interface ParagraphDialogApplyValues {
39
- align: EditorParagraphStyle["align"] | null;
40
- indentLeft: number | null;
41
- indentRight: number | null;
42
- indentFirstLine: number | null;
43
- indentHanging: number | null;
44
- mirrorIndents: boolean;
45
- spacingBefore: number | null;
46
- spacingAfter: number | null;
47
- lineHeight: number | null;
48
- lineRule: LineRuleValue;
49
- contextualSpacing: boolean;
50
- outlineLevel: number | null;
51
- shading: string | null;
52
- /**
53
- * Per-edge paragraph borders. The dialog edits one shared style/width/color
54
- * and toggles which edges carry it; each edge is the shared border or `null`.
55
- */
56
- borders: ParagraphDialogBorders;
57
- pageBreakBefore: boolean;
58
- keepWithNext: boolean;
59
- keepLinesTogether: boolean;
60
- widowControl: boolean;
61
- tabs: EditorTabStop[];
62
- }
63
- export interface ParagraphDialogProps {
64
- isOpen: boolean;
65
- initial: ParagraphDialogInitialValues;
66
- onClose: () => void;
67
- onApply: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
68
- /** Persist the current values onto the default paragraph style. */
69
- onSetDefault?: (values: ParagraphDialogApplyValues) => void;
70
- }
4
+ export type { ParagraphDialogApplyValues, ParagraphDialogBorders, ParagraphDialogInitialValues, ParagraphDialogProps, } from './paragraph-dialog/ParagraphDialogTypes.js';
71
5
  export declare function ParagraphDialog(props: ParagraphDialogProps): JSX.Element;
72
- export {};
@@ -0,0 +1,82 @@
1
+ import { EditorBorderStyle, EditorParagraphStyle, EditorTabStop } from '../../../../core/model.js';
2
+
3
+ export type SpecialIndent = "none" | "firstLine" | "hanging";
4
+ export type BorderStyleValue = "none" | "solid" | "dashed" | "dotted";
5
+ export type LineRuleValue = "auto" | "exact" | "atLeast" | null;
6
+ export type LineSpacingMode = "single" | "onePointFive" | "double" | "multiple" | "atLeast" | "exact";
7
+ /** Word's pt-based "At" values are stored as px for exact/atLeast line rules. */
8
+ export declare const PT_TO_PX: number;
9
+ export declare const DEFAULT_BORDER_WIDTH_PT = 0.5;
10
+ export declare const DEFAULT_BORDER_COLOR = "#000000";
11
+ export declare const OUTLINE_BODY = "";
12
+ export interface ParagraphDialogInitialValues {
13
+ align: string;
14
+ indentLeft: string;
15
+ indentRight: string;
16
+ indentFirstLine: string;
17
+ indentHanging: string;
18
+ mirrorIndents: boolean;
19
+ spacingBefore: string;
20
+ spacingAfter: string;
21
+ lineHeight: string;
22
+ lineRule: string;
23
+ contextualSpacing: boolean;
24
+ outlineLevel: string;
25
+ shading: string;
26
+ borderStyle: string;
27
+ borderWidth: string;
28
+ borderColor: string;
29
+ borderSideTop: boolean;
30
+ borderSideRight: boolean;
31
+ borderSideBottom: boolean;
32
+ borderSideLeft: boolean;
33
+ pageBreakBefore: boolean;
34
+ keepWithNext: boolean;
35
+ keepLinesTogether: boolean;
36
+ widowControl: boolean;
37
+ tabs: EditorTabStop[];
38
+ }
39
+ export interface ParagraphDialogBorders {
40
+ top: EditorBorderStyle | null;
41
+ right: EditorBorderStyle | null;
42
+ bottom: EditorBorderStyle | null;
43
+ left: EditorBorderStyle | null;
44
+ }
45
+ export interface ParagraphDialogApplyValues {
46
+ align: EditorParagraphStyle["align"] | null;
47
+ indentLeft: number | null;
48
+ indentRight: number | null;
49
+ indentFirstLine: number | null;
50
+ indentHanging: number | null;
51
+ mirrorIndents: boolean;
52
+ spacingBefore: number | null;
53
+ spacingAfter: number | null;
54
+ lineHeight: number | null;
55
+ lineRule: LineRuleValue;
56
+ contextualSpacing: boolean;
57
+ outlineLevel: number | null;
58
+ shading: string | null;
59
+ /**
60
+ * Per-edge paragraph borders. The dialog edits one shared style/width/color
61
+ * and toggles which edges carry it; each edge is the shared border or `null`.
62
+ */
63
+ borders: ParagraphDialogBorders;
64
+ pageBreakBefore: boolean;
65
+ keepWithNext: boolean;
66
+ keepLinesTogether: boolean;
67
+ widowControl: boolean;
68
+ tabs: EditorTabStop[];
69
+ }
70
+ export interface ParagraphDialogProps {
71
+ isOpen: boolean;
72
+ initial: ParagraphDialogInitialValues;
73
+ onClose: () => void;
74
+ onApply: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
75
+ /** Persist the current values onto the default paragraph style. */
76
+ onSetDefault?: (values: ParagraphDialogApplyValues) => void;
77
+ }
78
+ /** Map the model's `lineRule` + `lineHeight` onto a Word line-spacing mode. */
79
+ export declare function deriveLineSpacing(lineRule: string, lineHeight: number | null): {
80
+ mode: LineSpacingMode;
81
+ at: number | null;
82
+ };
@@ -0,0 +1,66 @@
1
+ import { EditorTabStop } from '../../../../core/model.js';
2
+ import { BorderStyleValue, LineSpacingMode, ParagraphDialogProps, SpecialIndent } from './ParagraphDialogTypes.js';
3
+
4
+ /**
5
+ * Owns the Paragraph dialog's form state (hydrated from `props.initial` on
6
+ * open), the derived preview/line-spacing/border resolution, and the
7
+ * apply/set-default handlers. The signals are returned under their original
8
+ * names so the dialog's panels can read them directly.
9
+ */
10
+ export declare function useParagraphDialogController(props: ParagraphDialogProps): {
11
+ align: import('solid-js').Accessor<string>;
12
+ setAlign: import('solid-js').Setter<string>;
13
+ outlineLevel: import('solid-js').Accessor<string>;
14
+ setOutlineLevel: import('solid-js').Setter<string>;
15
+ indentLeft: import('solid-js').Accessor<number | null>;
16
+ setIndentLeft: import('solid-js').Setter<number | null>;
17
+ indentRight: import('solid-js').Accessor<number | null>;
18
+ setIndentRight: import('solid-js').Setter<number | null>;
19
+ special: import('solid-js').Accessor<SpecialIndent>;
20
+ setSpecial: import('solid-js').Setter<SpecialIndent>;
21
+ specialBy: import('solid-js').Accessor<number | null>;
22
+ setSpecialBy: import('solid-js').Setter<number | null>;
23
+ mirrorIndents: import('solid-js').Accessor<boolean>;
24
+ setMirrorIndents: import('solid-js').Setter<boolean>;
25
+ spacingBefore: import('solid-js').Accessor<number | null>;
26
+ setSpacingBefore: import('solid-js').Setter<number | null>;
27
+ spacingAfter: import('solid-js').Accessor<number | null>;
28
+ setSpacingAfter: import('solid-js').Setter<number | null>;
29
+ lineMode: import('solid-js').Accessor<LineSpacingMode>;
30
+ setLineMode: import('solid-js').Setter<LineSpacingMode>;
31
+ lineAt: import('solid-js').Accessor<number | null>;
32
+ setLineAt: import('solid-js').Setter<number | null>;
33
+ contextualSpacing: import('solid-js').Accessor<boolean>;
34
+ setContextualSpacing: import('solid-js').Setter<boolean>;
35
+ shading: import('solid-js').Accessor<string>;
36
+ setShading: import('solid-js').Setter<string>;
37
+ borderStyle: import('solid-js').Accessor<BorderStyleValue>;
38
+ setBorderStyle: import('solid-js').Setter<BorderStyleValue>;
39
+ borderWidth: import('solid-js').Accessor<number | null>;
40
+ setBorderWidth: import('solid-js').Setter<number | null>;
41
+ borderColor: import('solid-js').Accessor<string>;
42
+ setBorderColor: import('solid-js').Setter<string>;
43
+ sideTop: import('solid-js').Accessor<boolean>;
44
+ setSideTop: import('solid-js').Setter<boolean>;
45
+ sideRight: import('solid-js').Accessor<boolean>;
46
+ setSideRight: import('solid-js').Setter<boolean>;
47
+ sideBottom: import('solid-js').Accessor<boolean>;
48
+ setSideBottom: import('solid-js').Setter<boolean>;
49
+ sideLeft: import('solid-js').Accessor<boolean>;
50
+ setSideLeft: import('solid-js').Setter<boolean>;
51
+ pageBreakBefore: import('solid-js').Accessor<boolean>;
52
+ setPageBreakBefore: import('solid-js').Setter<boolean>;
53
+ keepWithNext: import('solid-js').Accessor<boolean>;
54
+ setKeepWithNext: import('solid-js').Setter<boolean>;
55
+ keepLinesTogether: import('solid-js').Accessor<boolean>;
56
+ setKeepLinesTogether: import('solid-js').Setter<boolean>;
57
+ widowControl: import('solid-js').Accessor<boolean>;
58
+ setWidowControl: import('solid-js').Setter<boolean>;
59
+ tabs: import('solid-js').Accessor<EditorTabStop[]>;
60
+ setTabs: import('solid-js').Setter<EditorTabStop[]>;
61
+ atEnabled: () => boolean;
62
+ previewStyle: import('solid-js').Accessor<Record<string, string | undefined>>;
63
+ handleApply: () => void;
64
+ handleSetDefault: () => void;
65
+ };
66
+ export type ParagraphDialogController = ReturnType<typeof useParagraphDialogController>;
@@ -149,7 +149,6 @@ export interface TableFormState {
149
149
  }
150
150
  export declare const DEFAULT_BORDER_WIDTH_PT = 0.5;
151
151
  export declare const DEFAULT_BORDER_COLOR = "#000000";
152
- export declare function parseNumber(value: string): number | null;
153
152
  export declare function parseWidth(value: string, unit: TableWidthUnit): EditorDocxWidthValue | null;
154
153
  export declare function resolveBorder(style: BorderStyleValue, widthValue: string, colorValue: string): EditorBorderStyle | null;
155
154
  /** Fresh store with empty/default values, used before the dialog opens. */
@@ -4,4 +4,14 @@ import { JSX } from 'solid-js';
4
4
  export interface LineSpacingButtonProps {
5
5
  api: ToolbarActionApi;
6
6
  }
7
+ /**
8
+ * Line-spacing dropdown. Composes the shared `Menu` primitive (which owns the
9
+ * trigger, the popover, the affordance chevron and the close-on-click behavior)
10
+ * instead of re-implementing that plumbing. The only line-spacing-specific
11
+ * concerns left here are the preset list, the active-state check and the
12
+ * "more options" dialog.
13
+ *
14
+ * The trigger glyph is the registered `lineSpacing` custom icon (see
15
+ * `customIcons`); the active-item check uses the shared `CheckIcon`.
16
+ */
7
17
  export declare function LineSpacingButton(props: LineSpacingButtonProps): JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { TranslationKey } from '../../../../../i18n/index.js';
2
+
3
+ export declare const ALIGN_BUTTONS: Array<{
4
+ command: string;
5
+ icon: string;
6
+ testId: string;
7
+ tooltipKey: "toolbar.alignLeft" | "toolbar.alignCenter" | "toolbar.alignRight" | "toolbar.justify";
8
+ }>;
9
+ export declare const LIST_BUTTONS: Array<{
10
+ command: string;
11
+ icon: string;
12
+ testId: string;
13
+ tooltipKey: "toolbar.bulletList" | "toolbar.numberedList";
14
+ }>;
15
+ /** No-arg table commands surfaced as first-class buttons on the Table Layout tab. */
16
+ export declare const TABLE_LAYOUT_BUTTONS: Array<{
17
+ id: string;
18
+ command: string;
19
+ icon: string;
20
+ tooltipKey: TranslationKey;
21
+ }>;
22
+ /** tblLook conditional-formatting toggles on the Table Design tab. */
23
+ export declare const TABLE_DESIGN_TOGGLES: Array<{
24
+ id: string;
25
+ command: string;
26
+ labelKey: TranslationKey;
27
+ }>;
@@ -0,0 +1,10 @@
1
+ import { SelectOption, ToolbarActionApi, ToolbarDocumentStyle } from '../../schema/items.js';
2
+
3
+ /** Platform modifier symbol used in keyboard-shortcut tooltips. */
4
+ export declare const mod: string;
5
+ /** Document's named styles, read through the uniform command-state channel. */
6
+ export declare const documentStyles: (api: ToolbarActionApi) => ToolbarDocumentStyle[];
7
+ /** Named table styles for the Table Design gallery select. */
8
+ export declare const tableStyleOptions: (api: ToolbarActionApi) => SelectOption[];
9
+ export declare const fontFamilyOptions: (api: ToolbarActionApi) => SelectOption[];
10
+ export declare const fontSizeOptions: (api: ToolbarActionApi) => SelectOption[];
@@ -0,0 +1,3 @@
1
+ import { ToolbarItem } from '../../schema/items.js';
2
+
3
+ export declare function withDefaultRibbonPlacement(items: ToolbarItem[]): ToolbarItem[];
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'solid-js';
2
+
3
+ export interface DropdownChevronProps {
4
+ /**
5
+ * Extra class for the affordance element. The base `.oasis-editor-dropdown-chevron`
6
+ * class is always applied and owns the canonical small/crisp size (13px, full
7
+ * opacity) shared by every dropdown in the toolbar.
8
+ */
9
+ class?: string;
10
+ }
11
+ /**
12
+ * The single dropdown-affordance glyph for the whole toolbar. Every dropdown-ish
13
+ * control (Menu, SplitButton's menu side, StyleGallery expand) composes this so
14
+ * there is exactly one chevron look — no per-control re-implementations.
15
+ *
16
+ * Rendered as a lucide `<i data-lucide="chevron-down">` placeholder (resolved by
17
+ * the icon observer) rather than an inline SVG, so it stays consistent with the
18
+ * rest of the icon set and inherits `currentColor`.
19
+ */
20
+ export declare function DropdownChevron(props: DropdownChevronProps): JSX.Element;
@@ -10,6 +10,36 @@ import { JSX } from 'solid-js';
10
10
  * existing toolbar/menubar icon sizing applies identically.
11
11
  */
12
12
  export type CustomIconRenderer = () => JSX.Element;
13
+ /**
14
+ * Shared SVG shell for custom icons. Centralizes the boilerplate
15
+ * (`xmlns`/`width`/`height`/`viewBox`/`aria-hidden`) that every custom icon used
16
+ * to repeat, so new glyphs only declare their inner markup. Defaults to lucide's
17
+ * 24x24 viewBox so existing toolbar icon sizing applies identically; callers can
18
+ * override `width`/`height`/`viewBox` for non-default glyphs (e.g. the line
19
+ * spacing arrow) and pass arbitrary SVG presentation attributes.
20
+ */
21
+ export interface SvgIconProps {
22
+ width?: number | string;
23
+ height?: number | string;
24
+ viewBox?: string;
25
+ fill?: string;
26
+ stroke?: string;
27
+ "stroke-width"?: number | string;
28
+ "stroke-linecap"?: JSX.SvgSVGAttributes<SVGSVGElement>["stroke-linecap"];
29
+ "stroke-linejoin"?: JSX.SvgSVGAttributes<SVGSVGElement>["stroke-linejoin"];
30
+ class?: string;
31
+ children: JSX.Element;
32
+ }
33
+ export declare function SvgIcon(props: SvgIconProps): JSX.Element;
34
+ /**
35
+ * Checkmark glyph used to mark the active item in radio/check menus. Replaces the
36
+ * duplicated inline `<polyline points="20 6 9 17 4 12">` previously copy-pasted
37
+ * into LineSpacingButton and ContextMenu. Rendered at 14px to match the previous
38
+ * line-spacing check size; ContextMenu renders its own 18px variant via lucide.
39
+ */
40
+ export declare const CheckIcon: (props: {
41
+ size?: number;
42
+ }) => JSX.Element;
13
43
  export declare function getCustomIcon(name?: string): CustomIconRenderer | undefined;
14
44
  /**
15
45
  * Renders an icon by name: a registered custom inline SVG when available,
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Parses a form-input string into a finite number, or `null` for empty/
3
+ * non-numeric input. Shared across dialogs that bind numeric text fields.
4
+ */
5
+ export declare function parseNumber(value: string): number | null;
package/dist/vue.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { VNode, RendererNode, RendererElement } from 'vue';
1
+ import { VNode, RendererNode, RendererElement, PropType } from 'vue';
2
2
  import { OasisEditorAppProps, OasisEditorClient } from '../index.ts';
3
3
 
4
4
  export declare const OasisEditor: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -7,8 +7,8 @@ export declare const OasisEditor: import('vue').DefineComponent<import('vue').Ex
7
7
  default: () => Record<string, never>;
8
8
  };
9
9
  class: StringConstructor;
10
- style: () => string | Record<string, unknown>;
11
- onClient: () => (client: OasisEditorClient) => void;
10
+ style: PropType<string | Record<string, unknown>>;
11
+ onClient: PropType<(client: OasisEditorClient) => void>;
12
12
  }>, () => VNode<RendererNode, RendererElement, {
13
13
  [key: string]: unknown;
14
14
  }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
@@ -17,8 +17,8 @@ export declare const OasisEditor: import('vue').DefineComponent<import('vue').Ex
17
17
  default: () => Record<string, never>;
18
18
  };
19
19
  class: StringConstructor;
20
- style: () => string | Record<string, unknown>;
21
- onClient: () => (client: OasisEditorClient) => void;
20
+ style: PropType<string | Record<string, unknown>>;
21
+ onClient: PropType<(client: OasisEditorClient) => void>;
22
22
  }>> & Readonly<{}>, {
23
23
  config: OasisEditorAppProps;
24
24
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
package/dist/vue.js CHANGED
@@ -1,6 +1,6 @@
1
- import { defineComponent as l, ref as i, onMounted as u, onBeforeUnmount as f, h as c } from "vue";
2
- import { mount as m } from "oasis-editor";
3
- const a = l({
1
+ import { defineComponent as e, ref as r, onMounted as s, onBeforeUnmount as i, h as l } from "vue";
2
+ import { c } from "./mountController-D2srsZ5t.js";
3
+ const f = e({
4
4
  name: "OasisEditor",
5
5
  props: {
6
6
  config: {
@@ -12,16 +12,14 @@ const a = l({
12
12
  onClient: Function
13
13
  },
14
14
  setup(t) {
15
- const e = i(null);
16
- let n = null;
17
- return u(() => {
18
- var o;
19
- e.value && (n = m(e.value, t.config), (o = t.onClient) == null || o.call(t, n));
20
- }), f(() => {
21
- n == null || n.unmount(), n = null;
22
- }), () => c("div", { ref: e, class: t.class, style: t.style });
15
+ const n = r(null), o = c();
16
+ return s(() => {
17
+ n.value && o.mount(n.value, t.config, t.onClient);
18
+ }), i(() => {
19
+ o.unmount();
20
+ }), () => l("div", { ref: n, class: t.class, style: t.style });
23
21
  }
24
22
  });
25
23
  export {
26
- a as OasisEditor
24
+ f as OasisEditor
27
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.131",
3
+ "version": "0.0.133",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,37 +0,0 @@
1
- import { PresetPathSegment, PresetSegmentResolver } from './types.js';
2
-
3
- export declare function mixedRectSegments(x: number, y: number, width: number, height: number, tl: boolean, tr: boolean, br: boolean, bl: boolean): PresetPathSegment[];
4
- export declare function snipRoundRectSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
5
- export declare function snipRectSegments(x: number, y: number, width: number, height: number, tl: boolean, tr: boolean, br: boolean, bl: boolean): PresetPathSegment[];
6
- export declare function arrowSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
7
- export declare function calloutSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
8
- export declare function connectorSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
9
- export declare function flowChartSegments(key: string, x: number, y: number, width: number, height: number, resolvePreset: PresetSegmentResolver): PresetPathSegment[];
10
- export declare function actionButtonSegments(key: string, x: number, y: number, width: number, height: number, resolvePreset: PresetSegmentResolver): PresetPathSegment[];
11
- export declare function blockArcSegments(cx: number, cy: number, rx: number, ry: number): PresetPathSegment[];
12
- export declare function plusSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
13
- export declare function xSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
14
- export declare function mathDivideSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
15
- export declare function mathEqualSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
16
- export declare function mathNotEqualSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
17
- export declare function heartSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
18
- export declare function cloudSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
19
- export declare function moonSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
20
- export declare function smileySegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
21
- export declare function teardropSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
22
- export declare function noSmokingSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
23
- export declare function donutSegments(cx: number, cy: number, rx: number, ry: number): PresetPathSegment[];
24
- export declare function canSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
25
- export declare function cubeSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
26
- export declare function bevelSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
27
- export declare function foldedCornerSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
28
- export declare function frameSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
29
- export declare function halfFrameSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
30
- export declare function cornerSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
31
- export declare function plaqueSegments(x: number, y: number, width: number, height: number): PresetPathSegment[];
32
- export declare function tabbedRectSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
33
- export declare function braceSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
34
- export declare function bracketSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
35
- export declare function ribbonSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
36
- export declare function scrollSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
37
- export declare function waveSegments(key: string, x: number, y: number, width: number, height: number): PresetPathSegment[];
@@ -1,41 +0,0 @@
1
- import { OasisPlugin } from '../../core/plugin.js';
2
- import { ActionCommandBuilder, CommandBuilder, ValueCommandBuilder } from './essentialsCommandBuilders.js';
3
- import { EssentialsBrowserCapability, EssentialsDocumentCapability, EssentialsFeatureGate, EssentialsFormattingCapability, EssentialsHistoryCapability, EssentialsImageCapability, EssentialsLinkCapability, EssentialsParagraphCapability, EssentialsSectionCapability, EssentialsSelectionCapability, EssentialsStyleCapability, EssentialsTableCapability } from './essentialsCapabilities.js';
4
-
5
- interface CoreFormattingGroupDeps {
6
- gate: EssentialsFeatureGate;
7
- style: EssentialsStyleCapability;
8
- selection: EssentialsSelectionCapability;
9
- history: EssentialsHistoryCapability;
10
- formatting: EssentialsFormattingCapability;
11
- link: EssentialsLinkCapability;
12
- command: CommandBuilder;
13
- valueCommand: ValueCommandBuilder;
14
- actionCommand: ActionCommandBuilder;
15
- }
16
- interface DocumentAndBrowserGroupDeps {
17
- gate: EssentialsFeatureGate;
18
- style: EssentialsStyleCapability;
19
- document: EssentialsDocumentCapability;
20
- link: EssentialsLinkCapability;
21
- image: EssentialsImageCapability;
22
- browser: EssentialsBrowserCapability;
23
- actionCommand: ActionCommandBuilder;
24
- }
25
- interface ParagraphAndSectionGroupDeps {
26
- style: EssentialsStyleCapability;
27
- paragraph: EssentialsParagraphCapability;
28
- section: EssentialsSectionCapability;
29
- valueCommand: ValueCommandBuilder;
30
- actionCommand: ActionCommandBuilder;
31
- }
32
- interface TableGroupDeps {
33
- gate: EssentialsFeatureGate;
34
- table: EssentialsTableCapability;
35
- actionCommand: ActionCommandBuilder;
36
- }
37
- export declare function buildCoreFormattingCommands({ gate, style, selection, history, formatting, link, command, valueCommand, actionCommand, }: CoreFormattingGroupDeps): NonNullable<OasisPlugin["commands"]>;
38
- export declare function buildDocumentAndBrowserCommands({ gate, style, document, link, image, browser, actionCommand, }: DocumentAndBrowserGroupDeps): NonNullable<OasisPlugin["commands"]>;
39
- export declare function buildParagraphAndSectionCommands({ style, paragraph, section, valueCommand, actionCommand, }: ParagraphAndSectionGroupDeps): NonNullable<OasisPlugin["commands"]>;
40
- export declare function buildTableCommands({ gate, table, actionCommand, }: TableGroupDeps): NonNullable<OasisPlugin["commands"]>;
41
- export {};