@paged-media/plugin-api 0.2.13-canary.0 → 0.2.16-canary.0
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/dist/clipboard.d.ts +59 -0
- package/dist/host.d.ts +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/manifest.d.ts +18 -2
- package/dist/wire.d.ts +47 -3
- package/package.json +1 -1
- package/src/manifest.schema.json +4 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The canonical tabular interchange — a RECTANGULAR grid of cell DISPLAY
|
|
3
|
+
* strings (already number-formatted; the consumer owns re-parsing on
|
|
4
|
+
* paste). `rows[r][c]` is the display text of the cell at grid row `r`,
|
|
5
|
+
* column `c`. Ragged input is the producer's responsibility to
|
|
6
|
+
* rectangularize; the host does not pad. Serializable (plain strings), so
|
|
7
|
+
* the door proxies across the future isolate boundary unchanged.
|
|
8
|
+
*/
|
|
9
|
+
export interface TabularClipboard {
|
|
10
|
+
/** Row-major grid of cell display strings. `rows.length` = row count;
|
|
11
|
+
* each inner array is one row's cells, left to right. */
|
|
12
|
+
rows: string[][];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A clipboard payload — a plain-text half and/or a tabular half. Both are
|
|
16
|
+
* optional: a text-only copy carries `text`; a grid copy carries BOTH
|
|
17
|
+
* (the `tabular` grid AND a TSV `text` fallback so a paste into a plain
|
|
18
|
+
* editor still lands something). On READ the host fills whichever halves
|
|
19
|
+
* it could recover from the system clipboard (`tabular` is reconstructed
|
|
20
|
+
* from TSV `text` when the platform offers no richer form).
|
|
21
|
+
*/
|
|
22
|
+
export interface ClipboardPayload {
|
|
23
|
+
/** Plain-text representation. For a grid copy this is the TSV fallback
|
|
24
|
+
* (rows joined by `\t` within a row and `\n` between rows). */
|
|
25
|
+
text?: string;
|
|
26
|
+
/** The rich rectangular cell grid (the canonical interchange). Present
|
|
27
|
+
* on a grid copy; absent for a plain-text copy. Gated on
|
|
28
|
+
* `capabilities.clipboard: "full"` — a `"vector"` declaration sees the
|
|
29
|
+
* `text` half only. */
|
|
30
|
+
tabular?: TabularClipboard;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The clipboard accessor a bundle reaches through `host.clipboard`. Two
|
|
34
|
+
* doors over the SYSTEM clipboard: `read` recovers a payload (or `null`
|
|
35
|
+
* when there is nothing readable / no backend wired), `write` puts a
|
|
36
|
+
* payload on the clipboard. Capability-gated on `capabilities.clipboard`
|
|
37
|
+
* (see the mapping above): `"full"` grants text + tabular, `"vector"`
|
|
38
|
+
* grants text only, `"none"`/absent denies. Probe
|
|
39
|
+
* `supports("clipboard@1")` to know whether a real system-clipboard
|
|
40
|
+
* backend is wired (false ⇒ `read` answers `null` and `write` no-ops).
|
|
41
|
+
*/
|
|
42
|
+
export interface ClipboardSurface {
|
|
43
|
+
/**
|
|
44
|
+
* Read the current clipboard payload, or `null` when there is nothing
|
|
45
|
+
* readable, the read is denied by the platform, or no backend is wired
|
|
46
|
+
* (the honest no-clipboard door). A `"vector"` declaration never
|
|
47
|
+
* receives the `tabular` half (only `text`).
|
|
48
|
+
*/
|
|
49
|
+
read(): Promise<ClipboardPayload | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Write a payload to the system clipboard. A `"vector"` declaration may
|
|
52
|
+
* only write `text` — a `tabular` half it supplies is DROPPED (the host
|
|
53
|
+
* logs once). With no backend wired this is a no-op (probe
|
|
54
|
+
* `supports("clipboard@1")` first). Never throws on a platform refusal:
|
|
55
|
+
* a denied write resolves without effect (the honest browser posture —
|
|
56
|
+
* the clipboard API rejects without a user gesture).
|
|
57
|
+
*/
|
|
58
|
+
write(payload: ClipboardPayload): Promise<void>;
|
|
59
|
+
}
|
package/dist/host.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { CollectionName, DocumentMeta, ElementGeometryItem, ElementId, HitF
|
|
|
2
2
|
import type { CommandContribution, ExporterContribution, ImporterContribution, KeybindingContribution, OverlayContribution, PagedEditor, PanelContribution, ToolContribution, ToolPreviewShape } from "./editor";
|
|
3
3
|
import type { SceneLayer } from "./wire";
|
|
4
4
|
import type { AssetSurface } from "./assets";
|
|
5
|
+
import type { ClipboardSurface } from "./clipboard";
|
|
5
6
|
import type { PluginManifest } from "./manifest";
|
|
6
7
|
import type { SchemaPanelContribution } from "./panel-schema";
|
|
7
8
|
import type { WidgetSurface } from "./widgets";
|
|
@@ -696,6 +697,15 @@ export interface BundleHost {
|
|
|
696
697
|
* `supports("assets.fonts@1")` is false. Capability-gated:
|
|
697
698
|
* `getFontFace` requires `capabilities.assets` ∋ `"fonts"`. */
|
|
698
699
|
readonly assets: AssetSurface;
|
|
700
|
+
/** The capability-gated CLIPBOARD door (K-6 / S-14): read/write the
|
|
701
|
+
* SYSTEM clipboard with a rich `{ text?, tabular? }` payload (the
|
|
702
|
+
* sheets grid's range copy/paste interchange). Always present — when
|
|
703
|
+
* the host app injects no clipboard backend, `read` answers `null`,
|
|
704
|
+
* `write` is a no-op, and `supports("clipboard@1")` is false (the
|
|
705
|
+
* honest no-clipboard door). Capability-gated on
|
|
706
|
+
* `capabilities.clipboard`: `"full"` grants text + tabular, `"vector"`
|
|
707
|
+
* grants text only, `"none"`/absent denies. */
|
|
708
|
+
readonly clipboard: ClipboardSurface;
|
|
699
709
|
/** Capability detection over version sniffing: feature strings of
|
|
700
710
|
* the form `"area.member@major"` (see HOST_FEATURES in plugin-sdk). */
|
|
701
711
|
supports(feature: string): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export type { BundleHost, ContributionSurface, SceneLayerSurface, DocumentSurfac
|
|
|
4
4
|
export type { PanelSchema, PanelSchemaSection, PanelSchemaRow, SchemaPanelContribution, SchemaPanelRenderer, SchemaPanelRendererProps, WidgetValueBinding, BindingRef, SchemaGate, } from "./panel-schema";
|
|
5
5
|
export type { WidgetSurface, CodeEditorProps, CodeEditorDiagnostic, CodeEditorLanguage, } from "./widgets";
|
|
6
6
|
export type { AssetSurface, AssetKind, FontFaceAsset, FontFaceFormat, } from "./assets";
|
|
7
|
+
export type { ClipboardSurface, ClipboardPayload, TabularClipboard, } from "./clipboard";
|
|
7
8
|
export type * from "./contributions";
|
|
8
9
|
export type * from "./mutations";
|
package/dist/manifest.d.ts
CHANGED
|
@@ -88,6 +88,15 @@ export interface PluginCapabilities {
|
|
|
88
88
|
* gets no surface.
|
|
89
89
|
*/
|
|
90
90
|
dataProviders?: DataProvidersCapability;
|
|
91
|
+
/**
|
|
92
|
+
* The clipboard door's grant (K-6 / S-14). Gates `host.clipboard`:
|
|
93
|
+
* `"full"` grants BOTH the text and the rich `tabular` (cell-grid)
|
|
94
|
+
* payload — the sheets range copy/paste interchange; `"vector"` grants
|
|
95
|
+
* the `text` half only (a vector plugin copies a textual representation,
|
|
96
|
+
* not a cell grid — a `tabular` write is dropped); `"none"` (the
|
|
97
|
+
* default) / absent DENIES the door (read → `null`, write refused). See
|
|
98
|
+
* `clipboard.ts` for the surface + DESIGN.md for the trust line.
|
|
99
|
+
*/
|
|
91
100
|
clipboard?: "none" | "vector" | "full";
|
|
92
101
|
/**
|
|
93
102
|
* Declared WebAssembly artifacts the bundle ships and loads at
|
|
@@ -135,8 +144,15 @@ export interface DataProvidersCapability {
|
|
|
135
144
|
* unknown purposes are rejected at validation. v1:
|
|
136
145
|
* - `layout` — a foreign-document layout/measure engine (paged.web).
|
|
137
146
|
* - `codec` — encode/decode (image/font transforms).
|
|
138
|
-
* - `compute` — generic pure computation with no special host role.
|
|
139
|
-
|
|
147
|
+
* - `compute` — generic pure computation with no special host role.
|
|
148
|
+
* - `engine` — a vendored data/query/DB engine whose release artifact
|
|
149
|
+
* legitimately exceeds the default per-artifact ceiling
|
|
150
|
+
* (DuckDB-WASM ≈ 36 MiB; paged.data). Governed: it earns
|
|
151
|
+
* the HIGHER artifact ceiling (D-07b) but is otherwise an
|
|
152
|
+
* ordinary declared+budgeted module — the higher cap is
|
|
153
|
+
* the only difference, and a manifest `maxBytes` may still
|
|
154
|
+
* tighten it. */
|
|
155
|
+
export type WasmPurpose = "layout" | "codec" | "compute" | "engine";
|
|
140
156
|
/** One declared wasm artifact. `path` is bundle-relative (no leading
|
|
141
157
|
* slash, no `..`); `maxBytes`, when present, tightens — never widens —
|
|
142
158
|
* the host's per-artifact ceiling (see the budget table in
|
package/dist/wire.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// GENERATED — do not edit. Vendored verbatim from the published
|
|
2
2
|
// @paged-media/canvas-wasm .d.ts (tsify output from paged-media/core,
|
|
3
3
|
// MPL-2.0 OR PMEL). Sync: node scripts/sync-wire.mjs · Check: --check.
|
|
4
|
-
// Synced from @paged-media/canvas-wasm@0.
|
|
4
|
+
// Synced from @paged-media/canvas-wasm@0.44.0
|
|
5
5
|
/* tslint:disable */
|
|
6
6
|
/* eslint-disable */
|
|
7
7
|
|
|
@@ -336,7 +336,7 @@ export type CaretDirection = "up" | "down";
|
|
|
336
336
|
/**
|
|
337
337
|
* Discriminated payload of a `WorkerToMain` message.
|
|
338
338
|
*/
|
|
339
|
-
export type WorkerToMainKind = { kind: "ready"; payload: { protocol: ProtocolVersion } } | { kind: "documentLoaded"; payload: DocumentHandle } | { kind: "loadFailed"; payload: { error: LoadError } } | { kind: "mutationFailed"; payload: { error: WorkerError } } | { kind: "displayListReady"; payload: { pageId: PageId; lod: LodTier; commands: number; layoutGeneration: number; numberingGeneration: number } } | { kind: "hitResult"; payload: HitResult } | { kind: "pagesDirty"; payload: { pageIds: PageId[] } } | { kind: "storyDirty"; payload: { storyId: string } } | { kind: "warning"; payload: { kind: string; details: string } } | { kind: "stats"; payload: DocumentStats } | { kind: "snapshotReady"; payload: SnapshotPng } | { kind: "snapshotFailed"; payload: { error: SnapshotError } } | { kind: "mutationApplied"; payload: { clientSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; createdId?: ElementId | null; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null; reflow?: FrameReflowInfo | null } } | { kind: "selectionGeometry"; payload: { rects: SelectionRect[] } } | { kind: "caretGeometry"; payload: { caret: CaretGeometry | null } } | { kind: "caretNavResult"; payload: { offset?: number | null } } | { kind: "lineBoundsResult"; payload: { bounds?: LineBounds | null } } | { kind: "wordBoundsResult"; payload: { bounds?: WordBounds | null } } | { kind: "paragraphBoundsResult"; payload: { bounds?: ParagraphBounds | null } } | { kind: "undoApplied"; payload: { undoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "redoApplied"; payload: { redoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "fontRegistered"; payload: { family: string } } | { kind: "fontRegistryCleared" } | { kind: "colorProfileRegistered"; payload: { name: string } } | { kind: "elementSelectionApplied"; payload: { ids: ElementId[] } } | { kind: "marqueeHits"; payload: { ids: ElementId[] } } | { kind: "elementGeometry"; payload: { items: ElementGeometryItem[] } } | { kind: "groupLeaves"; payload: { ids: ElementId[] } } | { kind: "pathAnchors"; payload: { result: PathAnchorsResult | null } } | { kind: "nearestPathPoint"; payload: { result: NearestPathPointResult | null } } | { kind: "layers"; payload: { items: LayerSummary[] } } | { kind: "collectionReply"; payload: { name: CollectionName; items: any } } | { kind: "frameChainResult"; payload: { links: FrameChainLink[] } } | { kind: "documentPlaceholders"; payload: { items: PlaceholderItem[] } } | { kind: "placedAssetBytes"; payload: { elementId: string; found: boolean; uri: string; width: number; height: number; encoded: number[] } } | { kind: "fontFaceBytes"; payload: { found: boolean; family: string; style: string | null; postscriptName: string | null; format: string; bytes: number[] } } | { kind: "measureTextResult"; payload: { advance: number; ascender: number; descender: number } } | { kind: "sceneLayerApplied"; payload: { elementId: string; applied: boolean } } | { kind: "frameReflow"; payload: { frameId: string; contentBox: [number, number, number, number] } } | { kind: "documentMetaReply"; payload: { meta: DocumentMeta } } | { kind: "colorPreviewReply"; payload: { result: ColorPreview | null } } | { kind: "colorComputeReply"; payload: { rgbHex: string; cmyk: [number, number, number, number] | null; outOfGamut: boolean } } | { kind: "gradientDetailReply"; payload: { result: GradientDetail | null } } | { kind: "swatchLibraryExported"; payload: { aseBytes: number[] } } | { kind: "exportPdfBegun"; payload: { session: number; pageCount: number } } | { kind: "exportPdfProgress"; payload: { session: number; done: number; total: number } } | { kind: "pdfExported"; payload: { pdfBytes: number[]; diagnostics: string[]; findings?: PreflightFinding[] } } | { kind: "exportPdfCancelled"; payload: { session: number } } | { kind: "exportPdfFailed"; payload: { error: string } } | { kind: "idmlExported"; payload: { idmlBytes: number[] } } | { kind: "exportIdmlFailed"; payload: { error: string } } | { kind: "elementProperties"; payload: { result: ElementProperties | null } } | { kind: "sceneTree"; payload: { roots: SceneTreeNode[] } } | { kind: "scriptResult"; payload: { output: string[]; error: string | null; budgetKind?: ScriptBudgetKind } } | { kind: "gestureBegun"; payload: { handle: GestureHandle } } | { kind: "gestureUpdated"; payload: { handle: GestureHandle; pageIds: PageId[]; snapLines?: SnapLine[] } } | { kind: "gestureCommitted"; payload: { handle: GestureHandle; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats } } | { kind: "gestureCancelled"; payload: { handle: GestureHandle; pageIds: PageId[] } } | { kind: "gestureFailed"; payload: { error: GestureFailure } } | { kind: "attachReady"; payload: { gpuActive: boolean; sceneCacheBudget: number } } | { kind: "gestureSnapLines"; payload: { snapLines: SnapLine[] } } | { kind: "resolutionDone"; payload: ResolutionResult };
|
|
339
|
+
export type WorkerToMainKind = { kind: "ready"; payload: { protocol: ProtocolVersion } } | { kind: "documentLoaded"; payload: DocumentHandle } | { kind: "loadFailed"; payload: { error: LoadError } } | { kind: "mutationFailed"; payload: { error: WorkerError } } | { kind: "displayListReady"; payload: { pageId: PageId; lod: LodTier; commands: number; layoutGeneration: number; numberingGeneration: number } } | { kind: "hitResult"; payload: HitResult } | { kind: "pagesDirty"; payload: { pageIds: PageId[] } } | { kind: "storyDirty"; payload: { storyId: string } } | { kind: "warning"; payload: { kind: string; details: string } } | { kind: "stats"; payload: DocumentStats } | { kind: "snapshotReady"; payload: SnapshotPng } | { kind: "snapshotFailed"; payload: { error: SnapshotError } } | { kind: "mutationApplied"; payload: { clientSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; createdId?: ElementId | null; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null; reflow?: FrameReflowInfo | null } } | { kind: "selectionGeometry"; payload: { rects: SelectionRect[] } } | { kind: "caretGeometry"; payload: { caret: CaretGeometry | null } } | { kind: "caretNavResult"; payload: { offset?: number | null } } | { kind: "lineBoundsResult"; payload: { bounds?: LineBounds | null } } | { kind: "wordBoundsResult"; payload: { bounds?: WordBounds | null } } | { kind: "paragraphBoundsResult"; payload: { bounds?: ParagraphBounds | null } } | { kind: "undoApplied"; payload: { undoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "redoApplied"; payload: { redoneSeq: number; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats; pageStructureChanged?: boolean; pageSizesPt?: [number, number][] | null } } | { kind: "fontRegistered"; payload: { family: string } } | { kind: "fontRegistryCleared" } | { kind: "colorProfileRegistered"; payload: { name: string } } | { kind: "elementSelectionApplied"; payload: { ids: ElementId[] } } | { kind: "marqueeHits"; payload: { ids: ElementId[] } } | { kind: "elementGeometry"; payload: { items: ElementGeometryItem[] } } | { kind: "groupLeaves"; payload: { ids: ElementId[] } } | { kind: "pathAnchors"; payload: { result: PathAnchorsResult | null } } | { kind: "nearestPathPoint"; payload: { result: NearestPathPointResult | null } } | { kind: "layers"; payload: { items: LayerSummary[] } } | { kind: "collectionReply"; payload: { name: CollectionName; items: any } } | { kind: "frameChainResult"; payload: { links: FrameChainLink[] } } | { kind: "documentPlaceholders"; payload: { items: PlaceholderItem[] } } | { kind: "placedAssetBytes"; payload: { elementId: string; found: boolean; uri: string; width: number; height: number; encoded: number[] } } | { kind: "fontFaceBytes"; payload: { found: boolean; family: string; style: string | null; postscriptName: string | null; format: string; bytes: number[] } } | { kind: "measureTextResult"; payload: { advance: number; ascender: number; descender: number } } | { kind: "sceneLayerApplied"; payload: { elementId: string; applied: boolean } } | { kind: "resourceClaimApplied"; payload: { imageId: string; applied: boolean; needed?: ResourceTilesNeededWire[] } } | { kind: "resourceTilesNeeded"; payload: ResourceTilesNeededWire } | { kind: "frameReflow"; payload: { frameId: string; contentBox: [number, number, number, number] } } | { kind: "documentMetaReply"; payload: { meta: DocumentMeta } } | { kind: "colorPreviewReply"; payload: { result: ColorPreview | null } } | { kind: "colorComputeReply"; payload: { rgbHex: string; cmyk: [number, number, number, number] | null; outOfGamut: boolean } } | { kind: "gradientDetailReply"; payload: { result: GradientDetail | null } } | { kind: "swatchLibraryExported"; payload: { aseBytes: number[] } } | { kind: "exportPdfBegun"; payload: { session: number; pageCount: number } } | { kind: "exportPdfProgress"; payload: { session: number; done: number; total: number } } | { kind: "pdfExported"; payload: { pdfBytes: number[]; diagnostics: string[]; findings?: PreflightFinding[] } } | { kind: "exportPdfCancelled"; payload: { session: number } } | { kind: "exportPdfFailed"; payload: { error: string } } | { kind: "idmlExported"; payload: { idmlBytes: number[] } } | { kind: "exportIdmlFailed"; payload: { error: string } } | { kind: "elementProperties"; payload: { result: ElementProperties | null } } | { kind: "sceneTree"; payload: { roots: SceneTreeNode[] } } | { kind: "scriptResult"; payload: { output: string[]; error: string | null; budgetKind?: ScriptBudgetKind } } | { kind: "gestureBegun"; payload: { handle: GestureHandle } } | { kind: "gestureUpdated"; payload: { handle: GestureHandle; pageIds: PageId[]; snapLines?: SnapLine[] } } | { kind: "gestureCommitted"; payload: { handle: GestureHandle; appliedSeq: number; pageIds: PageId[]; cacheStats: LayoutCacheStats } } | { kind: "gestureCancelled"; payload: { handle: GestureHandle; pageIds: PageId[] } } | { kind: "gestureFailed"; payload: { error: GestureFailure } } | { kind: "attachReady"; payload: { gpuActive: boolean; sceneCacheBudget: number } } | { kind: "gestureSnapLines"; payload: { snapLines: SnapLine[] } } | { kind: "resolutionDone"; payload: ResolutionResult };
|
|
340
340
|
|
|
341
341
|
/**
|
|
342
342
|
* Editor-ops — wire mirror of `paged_parse::GradientFeatherParams`.
|
|
@@ -1505,7 +1505,7 @@ export type Operation = { kind: "SetProperty"; node: NodeId; path: PropertyPath;
|
|
|
1505
1505
|
* variants so e.g. `cmyk_icc_profile` becomes `cmykIccProfile` on
|
|
1506
1506
|
* the wire — the TS protocol mirror locks the camelCase contract.
|
|
1507
1507
|
*/
|
|
1508
|
-
export type MainToWorkerKind = { kind: "hello" } | { kind: "loadDocument"; payload: { bytes: number[]; font?: number[] | null; cmykIccProfile?: number[] | null } } | { kind: "registerFont"; payload: { family: string; style?: string | null; bytes: number[] } } | { kind: "clearFontRegistry" } | { kind: "registerColorProfile"; payload: { name: string; bytes: number[] } } | { kind: "mutate"; payload: Mutation } | { kind: "requestPage"; payload: { pageId: PageId; lod: LodTier } } | { kind: "hitTest"; payload: { pageId: PageId; docPoint: [number, number]; filter: HitFilter } } | { kind: "requestSnapshot"; payload: { pageId: PageId; targetWidthPx: number; dpi?: number | null } } | { kind: "setSelection"; payload: { selection: ContentSelection | null } } | { kind: "requestSelectionGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretNav"; payload: { storyId: string; offset: number; direction: CaretDirection; cell?: TextCellAddr | null } } | { kind: "requestLineBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestWordBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestParagraphBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "undo" } | { kind: "redo" } | { kind: "setElementSelection"; payload: { ids: ElementId[]; mode: SelectionMode } } | { kind: "requestMarqueeHits"; payload: { pageId: PageId; rect: [number, number, number, number] } } | { kind: "requestElementGeometry"; payload: { ids: ElementId[] } } | { kind: "requestGroupLeaves"; payload: { groupId: string } } | { kind: "requestPathAnchors"; payload: { id: ElementId } } | { kind: "requestNearestPathPoint"; payload: { id: ElementId; point: [number, number] } } | { kind: "requestLayers" } | { kind: "requestCollection"; payload: { name: CollectionName } } | { kind: "requestFrameChain"; payload: { storyId: string } } | { kind: "requestPlacedAssetBytes"; payload: { elementId: string } } | { kind: "requestFontFaceBytes"; payload: { family: string; style?: string | null } } | { kind: "requestMeasureText"; payload: { family: string; style?: string | null; text: string; sizePt: number } } | { kind: "submitSceneLayer"; payload: { elementId: string; layer: SceneLayer } } | { kind: "clearSceneLayer"; payload: { elementId: string } } | { kind: "requestDocumentMeta" } | { kind: "requestDocumentPlaceholders" } | { kind: "requestColorPreview"; payload: { swatchId: string } } | { kind: "requestColorCompute"; payload: { space: string; value: number[]; tint?: number | null; model?: string | null; alternateSpace?: string | null; alternateValue?: number[] | null } } | { kind: "requestGradientDetail"; payload: { gradientId: string } } | { kind: "exportSwatchLibrary"; payload: { groupId?: string | null } } | { kind: "executeScript"; payload: { source: string } } | { kind: "exportPdfBegin"; payload: { options: ExportPdfWireOptions } } | { kind: "exportPdfPage"; payload: { session: number } } | { kind: "exportPdfFinish"; payload: { session: number } } | { kind: "exportPdfCancel"; payload: { session: number } } | { kind: "exportIdml"; payload: {} } | { kind: "requestElementProperties"; payload: { id: ElementId } } | { kind: "requestSceneTree" } | { kind: "beginGesture"; payload: { nodes: ElementId[]; gesture: GestureType; anchor?: GestureAnchor | null; cameraScale?: number | null } } | { kind: "updateGesture"; payload: { handle: GestureHandle; delta: [number, number]; modifiers: GestureModifiers } } | { kind: "commitGesture"; payload: { handle: GestureHandle } } | { kind: "cancelGesture"; payload: { handle: GestureHandle } };
|
|
1508
|
+
export type MainToWorkerKind = { kind: "hello" } | { kind: "loadDocument"; payload: { bytes: number[]; font?: number[] | null; cmykIccProfile?: number[] | null } } | { kind: "registerFont"; payload: { family: string; style?: string | null; bytes: number[] } } | { kind: "clearFontRegistry" } | { kind: "registerColorProfile"; payload: { name: string; bytes: number[] } } | { kind: "mutate"; payload: Mutation } | { kind: "requestPage"; payload: { pageId: PageId; lod: LodTier } } | { kind: "hitTest"; payload: { pageId: PageId; docPoint: [number, number]; filter: HitFilter } } | { kind: "requestSnapshot"; payload: { pageId: PageId; targetWidthPx: number; dpi?: number | null } } | { kind: "setSelection"; payload: { selection: ContentSelection | null } } | { kind: "requestSelectionGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretGeometry"; payload: { selection: ContentSelection } } | { kind: "requestCaretNav"; payload: { storyId: string; offset: number; direction: CaretDirection; cell?: TextCellAddr | null } } | { kind: "requestLineBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestWordBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "requestParagraphBounds"; payload: { storyId: string; offset: number; cell?: TextCellAddr | null } } | { kind: "undo" } | { kind: "redo" } | { kind: "setElementSelection"; payload: { ids: ElementId[]; mode: SelectionMode } } | { kind: "requestMarqueeHits"; payload: { pageId: PageId; rect: [number, number, number, number] } } | { kind: "requestElementGeometry"; payload: { ids: ElementId[] } } | { kind: "requestGroupLeaves"; payload: { groupId: string } } | { kind: "requestPathAnchors"; payload: { id: ElementId } } | { kind: "requestNearestPathPoint"; payload: { id: ElementId; point: [number, number] } } | { kind: "requestLayers" } | { kind: "requestCollection"; payload: { name: CollectionName } } | { kind: "requestFrameChain"; payload: { storyId: string } } | { kind: "requestPlacedAssetBytes"; payload: { elementId: string } } | { kind: "requestFontFaceBytes"; payload: { family: string; style?: string | null } } | { kind: "requestMeasureText"; payload: { family: string; style?: string | null; text: string; sizePt: number } } | { kind: "submitSceneLayer"; payload: { elementId: string; layer: SceneLayer } } | { kind: "clearSceneLayer"; payload: { elementId: string } } | { kind: "claimImageResource"; payload: { imageId: string; levels: number; tileSize: number; baseWidth: number; baseHeight: number; revision: number } } | { kind: "releaseImageResource"; payload: { imageId: string } } | { kind: "submitResourceTiles"; payload: { imageId: string; level: number; tiles: ProviderTileWire[]; generation: number } } | { kind: "requestDocumentMeta" } | { kind: "requestDocumentPlaceholders" } | { kind: "requestColorPreview"; payload: { swatchId: string } } | { kind: "requestColorCompute"; payload: { space: string; value: number[]; tint?: number | null; model?: string | null; alternateSpace?: string | null; alternateValue?: number[] | null } } | { kind: "requestGradientDetail"; payload: { gradientId: string } } | { kind: "exportSwatchLibrary"; payload: { groupId?: string | null } } | { kind: "executeScript"; payload: { source: string } } | { kind: "exportPdfBegin"; payload: { options: ExportPdfWireOptions } } | { kind: "exportPdfPage"; payload: { session: number } } | { kind: "exportPdfFinish"; payload: { session: number } } | { kind: "exportPdfCancel"; payload: { session: number } } | { kind: "exportIdml"; payload: {} } | { kind: "requestElementProperties"; payload: { id: ElementId } } | { kind: "requestSceneTree" } | { kind: "beginGesture"; payload: { nodes: ElementId[]; gesture: GestureType; anchor?: GestureAnchor | null; cameraScale?: number | null } } | { kind: "updateGesture"; payload: { handle: GestureHandle; delta: [number, number]; modifiers: GestureModifiers } } | { kind: "commitGesture"; payload: { handle: GestureHandle } } | { kind: "cancelGesture"; payload: { handle: GestureHandle } };
|
|
1509
1509
|
|
|
1510
1510
|
/**
|
|
1511
1511
|
* Track J — wire-shape mirror of `paged_parse::PathAnchor`. The
|
|
@@ -2064,6 +2064,50 @@ export interface PlaceholderItem {
|
|
|
2064
2064
|
value: string | null;
|
|
2065
2065
|
}
|
|
2066
2066
|
|
|
2067
|
+
/**
|
|
2068
|
+
* v44 (C-6 / I-06) — one image\'s tile-miss request: the tiles a claimed
|
|
2069
|
+
* image lacked at `level` during the last build. `tiles` are grid origins
|
|
2070
|
+
* `[x, y]` in level-space px; `generation` is the pyramid revision the
|
|
2071
|
+
* request was computed against (the host echoes it on submit so a stale
|
|
2072
|
+
* reply is dropped).
|
|
2073
|
+
*/
|
|
2074
|
+
export interface ResourceTilesNeededWire {
|
|
2075
|
+
imageId: string;
|
|
2076
|
+
level: number;
|
|
2077
|
+
tiles: [number, number][];
|
|
2078
|
+
generation: number;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* v44 (C-6 / I-06) — one pyramid tile on the wire. `rgba` is tightly
|
|
2083
|
+
* packed RGBA8 (`width*height*4` bytes, row-major); `[x, y]` is the
|
|
2084
|
+
* tile\'s origin in level-space px (the provider\'s grid origin). The
|
|
2085
|
+
* worker interns these into its budgeted LRU tile cache; the renderer\'s
|
|
2086
|
+
* resource provider serves them back as `paged_renderer::ProviderTile`.
|
|
2087
|
+
*/
|
|
2088
|
+
export interface ProviderTileWire {
|
|
2089
|
+
/**
|
|
2090
|
+
* Tile origin x in level-space px.
|
|
2091
|
+
*/
|
|
2092
|
+
x: number;
|
|
2093
|
+
/**
|
|
2094
|
+
* Tile origin y in level-space px.
|
|
2095
|
+
*/
|
|
2096
|
+
y: number;
|
|
2097
|
+
/**
|
|
2098
|
+
* Pixel width of the buffer.
|
|
2099
|
+
*/
|
|
2100
|
+
width: number;
|
|
2101
|
+
/**
|
|
2102
|
+
* Pixel height of the buffer.
|
|
2103
|
+
*/
|
|
2104
|
+
height: number;
|
|
2105
|
+
/**
|
|
2106
|
+
* Tightly packed RGBA8, row-major. Length must be `width*height*4`.
|
|
2107
|
+
*/
|
|
2108
|
+
rgba: number[];
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2067
2111
|
export interface CaretGeometry {
|
|
2068
2112
|
pageId: PageId;
|
|
2069
2113
|
frameId: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paged-media/plugin-api",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16-canary.0",
|
|
4
4
|
"description": "The Paged plugin contract: manifest, bundle lifecycle, the BundleHost surface, and the contribution + engine wire types. Type-only.",
|
|
5
5
|
"license": "MPL-2.0 OR LicenseRef-PMEL",
|
|
6
6
|
"type": "module",
|
package/src/manifest.schema.json
CHANGED
|
@@ -159,13 +159,15 @@
|
|
|
159
159
|
"enum": [
|
|
160
160
|
"layout",
|
|
161
161
|
"codec",
|
|
162
|
-
"compute"
|
|
162
|
+
"compute",
|
|
163
|
+
"engine"
|
|
163
164
|
]
|
|
164
165
|
},
|
|
165
166
|
"maxBytes": {
|
|
166
167
|
"type": "integer",
|
|
167
168
|
"minimum": 1,
|
|
168
|
-
"maximum":
|
|
169
|
+
"maximum": 67108864,
|
|
170
|
+
"description": "Per-artifact byte ceiling (tightens, never widens, the host cap). Host cap: 8 MiB for layout/codec/compute, 64 MiB for purpose:\"engine\" (D-07b — vendored DB engines like DuckDB-WASM)."
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
}
|