oasis-editor 0.0.25 → 0.0.27

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.
@@ -66,6 +66,8 @@ export interface CanvasDebugLayoutSnapshot {
66
66
  width: number;
67
67
  height: number;
68
68
  };
69
+ /** Set when the paragraph/cell is painted with a vertical-text transform. */
70
+ verticalMode?: CanvasSnapshotParagraph["verticalMode"];
69
71
  }>;
70
72
  inlineImages: Array<{
71
73
  paragraphId: string;
@@ -79,6 +81,19 @@ export interface CanvasDebugLayoutSnapshot {
79
81
  width: number;
80
82
  height: number;
81
83
  }>;
84
+ inlineTextBoxes: Array<{
85
+ paragraphId: string;
86
+ paragraphIndex: number;
87
+ zone: EditorEditingZone;
88
+ pageIndex: number;
89
+ startOffset: number;
90
+ endOffset: number;
91
+ left: number;
92
+ top: number;
93
+ width: number;
94
+ height: number;
95
+ rotation?: number;
96
+ }>;
82
97
  unsupportedRegions: Array<{
83
98
  pageIndex: number;
84
99
  zone: EditorEditingZone;
@@ -7,5 +7,12 @@ export interface HorizontalRulerProps {
7
7
  toolbarHost: () => ToolbarHost;
8
8
  viewportRef: Accessor<HTMLDivElement | undefined>;
9
9
  readOnly: Accessor<boolean>;
10
+ /**
11
+ * Visual zoom factor `z`. The ruler lives *outside* the scaled document
12
+ * layer, so model-derived positions/sizes are rendered in screen px (× z) and
13
+ * pointer coordinates are mapped back to document px (÷ z). `pageLeft` is
14
+ * already measured in screen px from the scaled paper, so it is not scaled.
15
+ */
16
+ zoomFactor: Accessor<number>;
10
17
  }
11
18
  export declare function HorizontalRuler(props: HorizontalRulerProps): import("solid-js").JSX.Element;
@@ -2,24 +2,11 @@
2
2
  * Horizontal gutter (px) between the page (`.oasis-editor-paper`) and the edge
3
3
  * of the scrollable editor content (`.oasis-editor-editor-scroll-content`).
4
4
  *
5
- * The single source of truth for the horizontal gutter. TS uses it directly for
6
- * the editor shell width (`pageWidth + 2 * gutter`) and injects it into CSS as
7
- * the `--oasis-editor-gutter-x` custom property on `.oasis-editor-app` (see
8
- * OasisEditorApp.tsx), so the gutter is defined exactly once. Keeping it
9
- * identical across every UI variant is what keeps the ruler origin aligned with
10
- * the caret — the ruler still measures the paper from the DOM as a backstop.
5
+ * The single source of truth for the horizontal gutter. TS uses it for the
6
+ * scroll-content width and injects it into CSS as the
7
+ * `--oasis-editor-gutter-x` custom property on `.oasis-editor-app` (see
8
+ * OasisEditorApp.tsx). Keeping it identical across every UI variant keeps the
9
+ * ruler origin aligned with the caret; the ruler also measures the paper from
10
+ * the DOM as a backstop.
11
11
  */
12
12
  export declare const EDITOR_SCROLL_PADDING_PX = 34;
13
- /**
14
- * Width (px) reserved for the editor's vertical scrollbar gutter.
15
- *
16
- * The page paper is `width: 100%` of the scroll content, so the editor shell
17
- * width is sized as `pageWidth + 2 * gutter (+ this reserve)`. Without reserving
18
- * the scrollbar's track, the fixed-width canvas surface (`pageWidth`) collides
19
- * with the vertical scrollbar and forces a spurious horizontal scrollbar — most
20
- * visible in landscape, where the page is wide. We pair this reserve with
21
- * `scrollbar-gutter: stable` on `.oasis-editor-editor` (see app-shell.css) so the
22
- * gutter is always reserved and the paper stays exactly `pageWidth`. Keep this in
23
- * lockstep with the `::-webkit-scrollbar { width }` value in app-shell.css.
24
- */
25
- export declare const EDITOR_SCROLLBAR_RESERVE_PX = 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oasis-editor",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",