@owomark/view 0.1.6 → 0.1.7

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 CHANGED
@@ -10,7 +10,7 @@ npm install @owomark/view
10
10
 
11
11
  ## Scope
12
12
 
13
- - `createOwoMarkView()` and `createOwoMarkVanillaEditor()` for interactive editing
13
+ - `createOwoMarkView()` for interactive editing
14
14
  - `createOwoMarkPreviewEngine()` and renderer registry APIs for preview DOM rendering
15
15
  - `PreviewDomPatcher` and `SideAnnotationPositioner` for browser layout work
16
16
  - `getThemeClassName()`, `light.css`, `dark.css`, `owomark.css`, `preview.css`, `slash-menu.css`, `side-annotation.css`
@@ -0,0 +1,76 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "packageName": "@owomark/view",
4
+ "packagePath": "owomark/packages/owomark-view",
5
+ "packageFingerprint": "f70b7037c41905c87554e2d2a912d682e65e87ef960675bb32ee9a3776c4efd6",
6
+ "workspaceFingerprint": "29c91b05781cfd51984ade38b2b582f8dab1013dfaaf87ed5b2b6e9723653157",
7
+ "builtAt": "2026-04-22T18:27:59.683Z",
8
+ "builderVersion": "2026-04-22-industrialization-v1",
9
+ "inputFiles": [
10
+ "owomark/package.json",
11
+ "owomark/packages/owomark-view/package.json",
12
+ "owomark/packages/owomark-view/src/dom/patcher.ts",
13
+ "owomark/packages/owomark-view/src/dom/side-annotation-positioner.ts",
14
+ "owomark/packages/owomark-view/src/dom/skeleton.ts",
15
+ "owomark/packages/owomark-view/src/dom/slash-menu.ts",
16
+ "owomark/packages/owomark-view/src/editor.ts",
17
+ "owomark/packages/owomark-view/src/engine.ts",
18
+ "owomark/packages/owomark-view/src/index.ts",
19
+ "owomark/packages/owomark-view/src/internal/testing/vanilla-editor.ts",
20
+ "owomark/packages/owomark-view/src/internal/virtual/block-layout-map.ts",
21
+ "owomark/packages/owomark-view/src/internal/virtual/height-cache.ts",
22
+ "owomark/packages/owomark-view/src/internal/virtual/height-estimator.ts",
23
+ "owomark/packages/owomark-view/src/internal/virtual/viewport-manager.ts",
24
+ "owomark/packages/owomark-view/src/renderer/default-renderer.ts",
25
+ "owomark/packages/owomark-view/src/renderer/highlight-cache.ts",
26
+ "owomark/packages/owomark-view/src/renderer/registry.ts",
27
+ "owomark/packages/owomark-view/src/renderer/side-annotation-renderer.ts",
28
+ "owomark/packages/owomark-view/src/strategies/incremental.ts",
29
+ "owomark/packages/owomark-view/src/strategies/shared.ts",
30
+ "owomark/packages/owomark-view/src/strategies/virtual.ts",
31
+ "owomark/packages/owomark-view/src/style.css",
32
+ "owomark/packages/owomark-view/src/theme.ts",
33
+ "owomark/packages/owomark-view/src/theme/dark.css",
34
+ "owomark/packages/owomark-view/src/theme/light.css",
35
+ "owomark/packages/owomark-view/src/theme/owomark.css",
36
+ "owomark/packages/owomark-view/src/theme/preview.css",
37
+ "owomark/packages/owomark-view/src/theme/side-annotation.css",
38
+ "owomark/packages/owomark-view/src/theme/slash-menu.css",
39
+ "owomark/packages/owomark-view/src/theme/toolbar.css",
40
+ "owomark/packages/owomark-view/src/types.ts",
41
+ "owomark/packages/owomark-view/src/view-engine.ts",
42
+ "owomark/packages/owomark-view/src/virtual/block-layout-map.ts",
43
+ "owomark/packages/owomark-view/src/virtual/height-cache.ts",
44
+ "owomark/packages/owomark-view/src/virtual/height-estimator.ts",
45
+ "owomark/packages/owomark-view/src/virtual/offscreen-measurer.ts",
46
+ "owomark/packages/owomark-view/src/virtual/viewport-manager.ts",
47
+ "owomark/packages/owomark-view/src/worker/preview-render.worker.ts",
48
+ "owomark/packages/owomark-view/src/worker/preview-task-scheduler.ts",
49
+ "owomark/packages/owomark-view/src/worker/renderer-registry.ts",
50
+ "owomark/packages/owomark-view/src/worker/types.ts",
51
+ "owomark/packages/owomark-view/tsconfig.json",
52
+ "owomark/packages/owomark-view/tsup.config.ts",
53
+ "package-lock.json"
54
+ ],
55
+ "artifactFiles": [
56
+ "dist/chunk-3CKPBCIP.js",
57
+ "dist/chunk-656BO747.js",
58
+ "dist/chunk-6LWPFJCB.js",
59
+ "dist/chunk-BPOZMVU7.js",
60
+ "dist/index.d.ts",
61
+ "dist/index.js",
62
+ "dist/internal/virtual/block-layout-map.d.ts",
63
+ "dist/internal/virtual/block-layout-map.js",
64
+ "dist/internal/virtual/height-cache.d.ts",
65
+ "dist/internal/virtual/height-cache.js",
66
+ "dist/internal/virtual/height-estimator.d.ts",
67
+ "dist/internal/virtual/height-estimator.js",
68
+ "dist/internal/virtual/viewport-manager.d.ts",
69
+ "dist/internal/virtual/viewport-manager.js",
70
+ "dist/preview-render.worker.js",
71
+ "dist/types-D4TVpyP7.d.ts"
72
+ ],
73
+ "localDependencyFingerprints": {
74
+ "@owomark/core": "32024bd874bc287d8de92d6142487720dd3e31af4477e6f91a54b8e8db3aec4e"
75
+ }
76
+ }
@@ -108,6 +108,7 @@ var VirtualViewportManager = class {
108
108
  wrapper.setAttribute(BLOCK_ID_ATTR, block.blockId);
109
109
  wrapper.setAttribute(SOURCE_START_ATTR, String(block.startLine));
110
110
  wrapper.setAttribute(SOURCE_END_ATTR, String(block.endLine));
111
+ wrapper.style.display = "flow-root";
111
112
  wrapper.style.position = "absolute";
112
113
  wrapper.style.left = "0";
113
114
  wrapper.style.width = "100%";
@@ -13,7 +13,7 @@ var HEAVY_MEDIUM_HEIGHT = 200;
13
13
  var HEAVY_LARGE_HEIGHT = 500;
14
14
  function estimateBlockHeight(block, registry) {
15
15
  const lineCount = block.endLine - block.startLine + 1;
16
- if (registry?.isHeavy(block.kind)) {
16
+ if (registry?.isHeavy(block)) {
17
17
  return estimateHeavyBlockHeight(lineCount);
18
18
  }
19
19
  if (block.kind === "code-fence") {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { OwoMarkCore, OwoMarkEditorInstance, PreviewBlock } from '@owomark/core';
1
+ import { OwoMarkCore, PreviewBlock, CardsFamilyAttributes, CARDS_FAMILY_CUSTOM_BLOCK_KEY } from '@owomark/core';
2
2
  export { DocumentChangeCallback } from '@owomark/core';
3
- import { O as OwoMarkPreviewEngineOptions, a as OwoMarkPreviewEngine, P as PreviewRendererRegistry, b as PreviewTaskScheduler } from './types-DsL_4tUb.js';
4
- export { c as PreviewBlockMetadata, d as PreviewBlockRenderer, e as PreviewCacheEntry, f as PreviewRenderContext, g as PreviewRenderPhase, h as PreviewRenderResult, i as PreviewRendererDefinition, j as PreviewRendererMode, k as PreviewStrategy, l as PreviewTaskPriority } from './types-DsL_4tUb.js';
3
+ import { O as OwoMarkPreviewEngineOptions, a as OwoMarkPreviewEngine, P as PreviewRendererRegistry, b as PreviewTaskScheduler } from './types-D4TVpyP7.js';
4
+ export { c as PreviewBlockMetadata, d as PreviewBlockRenderer, e as PreviewCacheEntry, f as PreviewRenderContext, g as PreviewRenderPhase, h as PreviewRenderResult, i as PreviewRendererDefinition, j as PreviewRendererMode, k as PreviewRendererRegistryLookup, l as PreviewRendererTarget, m as PreviewStrategy, n as PreviewTaskPriority } from './types-D4TVpyP7.js';
5
5
 
6
6
  /**
7
7
  * Three-layer view engine for OwoMark.
@@ -27,9 +27,8 @@ declare function createViewEngine(options: ViewEngineOptions): OwoMarkViewEngine
27
27
  /**
28
28
  * View engine for OwoMark.
29
29
  *
30
- * Provides two APIs:
30
+ * Public API:
31
31
  * - createOwoMarkView(core, element): Three-layer sovereign view engine
32
- * - createOwoMarkVanillaEditor(): Legacy standalone editor (backward compat)
33
32
  */
34
33
 
35
34
  type OwoMarkView = OwoMarkViewEngine;
@@ -41,11 +40,6 @@ type OwoMarkView = OwoMarkViewEngine;
41
40
  * const view = createOwoMarkView(core, element);
42
41
  */
43
42
  declare function createOwoMarkView(core: OwoMarkCore, element: HTMLElement): OwoMarkView;
44
- /**
45
- * Create a standalone editor (creates its own Core internally).
46
- * Preserved for backward compatibility with vanilla adapter consumers.
47
- */
48
- declare function createOwoMarkVanillaEditor(): OwoMarkEditorInstance;
49
43
 
50
44
  /**
51
45
  * OwoMark Preview Engine factory.
@@ -76,6 +70,18 @@ declare function createRendererRegistry(): PreviewRendererRegistry;
76
70
  */
77
71
  declare function renderBlockDefault(block: PreviewBlock): string;
78
72
 
73
+ type CardsFamilyPreviewBlock = PreviewBlock & {
74
+ kind: 'custom';
75
+ attributes: CardsFamilyAttributes & {
76
+ customBlockKey: typeof CARDS_FAMILY_CUSTOM_BLOCK_KEY;
77
+ };
78
+ };
79
+ declare function isCardsFamilyPreviewBlock(block: PreviewBlock): block is CardsFamilyPreviewBlock;
80
+ declare function renderCardsFamilyPreviewBlock(block: PreviewBlock): string;
81
+
82
+ declare function isSideAnnotationPreviewBlock(block: PreviewBlock): boolean;
83
+ declare function renderSideAnnotationPreviewBlock(block: PreviewBlock): string;
84
+
79
85
  declare function createPreviewTaskScheduler(options?: {
80
86
  poolSize?: number;
81
87
  onCrash?: () => void;
@@ -169,4 +175,4 @@ declare const THEME_DARK_CLASS = "owo-theme-dark";
169
175
  type OwoMarkThemeName = 'light' | 'dark' | string;
170
176
  declare function getThemeClassName(theme: OwoMarkThemeName): string;
171
177
 
172
- export { OwoMarkPreviewEngine, OwoMarkPreviewEngineOptions, type OwoMarkThemeName, type OwoMarkView, type OwoMarkViewEngine, PreviewDomPatcher, PreviewRendererRegistry, PreviewTaskScheduler, SideAnnotationPositioner, type SkeletonOptions, THEME_DARK_CLASS, THEME_LIGHT_CLASS, type ViewEngineOptions, createOwoMarkPreviewEngine, createOwoMarkVanillaEditor, createOwoMarkView, createPreviewTaskScheduler, createRendererRegistry, createSkeletonHtml, createViewEngine, ensureSkeletonStyles, getThemeClassName, renderBlockDefault };
178
+ export { OwoMarkPreviewEngine, OwoMarkPreviewEngineOptions, type OwoMarkThemeName, type OwoMarkView, type OwoMarkViewEngine, PreviewDomPatcher, PreviewRendererRegistry, PreviewTaskScheduler, SideAnnotationPositioner, type SkeletonOptions, THEME_DARK_CLASS, THEME_LIGHT_CLASS, type ViewEngineOptions, createOwoMarkPreviewEngine, createOwoMarkView, createPreviewTaskScheduler, createRendererRegistry, createSkeletonHtml, createViewEngine, ensureSkeletonStyles, getThemeClassName, isCardsFamilyPreviewBlock, isSideAnnotationPreviewBlock, renderBlockDefault, renderCardsFamilyPreviewBlock, renderSideAnnotationPreviewBlock };