oasis-editor 0.0.232 → 0.0.234

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.
@@ -1,5 +1,14 @@
1
+ import { Accessor } from 'solid-js';
1
2
  import { EditorState } from '../../core/model.js';
2
3
  export type FormatPainterMode = "once" | "continuous" | null;
4
+ export interface EditorFormatPainter {
5
+ mode: Accessor<FormatPainterMode>;
6
+ canCapture: () => boolean;
7
+ armOnce: () => boolean;
8
+ armContinuous: () => boolean;
9
+ cancel: () => void;
10
+ applyToSelection: (origin: "pointer" | "keyboard") => boolean;
11
+ }
3
12
  export interface EditorFormatPainterDeps {
4
13
  state: () => EditorState;
5
14
  isReadOnly: () => boolean;
@@ -14,12 +23,4 @@ export interface EditorFormatPainterDeps {
14
23
  * Pointer selection is committed only after pointerup (never during drag),
15
24
  * and keyboard selection only on keyup.
16
25
  */
17
- export declare function createEditorFormatPainter(deps: EditorFormatPainterDeps): {
18
- mode: import('solid-js').Accessor<FormatPainterMode>;
19
- canCapture: () => boolean;
20
- armOnce: () => boolean;
21
- armContinuous: () => boolean;
22
- cancel: () => void;
23
- applyToSelection: (origin: "pointer" | "keyboard") => boolean;
24
- };
25
- export type EditorFormatPainter = ReturnType<typeof createEditorFormatPainter>;
26
+ export declare function createEditorFormatPainter(deps: EditorFormatPainterDeps): EditorFormatPainter;
@@ -149,14 +149,7 @@ declare function createEditorInteractionRuntimeImpl(deps: EditorInteractionRunti
149
149
  applyToolbarUnderlineStyleCommand: (style: import('../../core/model.js').EditorUnderlineStyle | null) => void;
150
150
  applyToolbarBooleanStyleCommand: (key: import('../toolbarStyleState.js').BooleanStyleKey) => void;
151
151
  };
152
- formatPainter: {
153
- mode: import('solid-js').Accessor<import('./createEditorFormatPainter.js').FormatPainterMode>;
154
- canCapture: () => boolean;
155
- armOnce: () => boolean;
156
- armContinuous: () => boolean;
157
- cancel: () => void;
158
- applyToSelection: (origin: "pointer" | "keyboard") => boolean;
159
- };
152
+ formatPainter: import('./createEditorFormatPainter.js').EditorFormatPainter;
160
153
  onEditorPointerDown: (event: PointerEvent) => void;
161
154
  tableResize: import('../../app/controllers/useEditorTableResize.js').TableResizeOps;
162
155
  tableCornerResize: import('../../app/controllers/useEditorTableCornerResize.js').TableCornerResizeOps;
@@ -1,19 +1,7 @@
1
1
  import { JSX } from 'solid-js';
2
2
  export interface DropdownChevronProps {
3
- /**
4
- * Extra class for the affordance element. The base `.oasis-editor-dropdown-chevron`
5
- * class is always applied and owns the canonical small/crisp size (13px, full
6
- * opacity) shared by every dropdown in the toolbar.
7
- */
3
+ /** Additional classes; the shared affordance retains its canonical 12px slot. */
8
4
  class?: string;
9
5
  }
10
- /**
11
- * The single dropdown-affordance glyph for the whole toolbar. Every dropdown-ish
12
- * control (Menu, SplitButton's menu side, StyleGallery expand) composes this so
13
- * there is exactly one chevron look — no per-control re-implementations.
14
- *
15
- * Rendered as a lucide `<i data-lucide="chevron-down">` placeholder (resolved by
16
- * the icon observer) rather than an inline SVG, so it stays consistent with the
17
- * rest of the icon set and inherits `currentColor`.
18
- */
6
+ /** An owned Lucide node keeps one affordance through updates and disposal. */
19
7
  export declare function DropdownChevron(props: DropdownChevronProps): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.232",
3
+ "version": "0.0.234",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -78,7 +78,9 @@
78
78
  "test:ribbon:contexts": "node scripts/verify-ribbon-contexts.mjs",
79
79
  "test:ribbon:icons": "node scripts/verify-ribbon-icons.mjs",
80
80
  "test:ribbon:editing": "node scripts/verify-ribbon-editing.mjs",
81
- "test:ribbon:clipboard": "node scripts/verify-ribbon-clipboard.mjs"
81
+ "test:ribbon:clipboard": "node scripts/verify-ribbon-clipboard.mjs",
82
+ "test:ribbon:painter": "node scripts/verify-ribbon-painter.mjs",
83
+ "test:ribbon:inherited": "node scripts/verify-ribbon-inherited-formatting.mjs"
82
84
  },
83
85
  "devDependencies": {
84
86
  "@eslint/js": "^10.0.1",