@paged-media/plugin-api 0.2.26-canary.0 → 0.2.27-canary.1
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/editor.d.ts +10 -0
- package/dist/host.d.ts +41 -0
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/editor.d.ts
CHANGED
|
@@ -169,6 +169,16 @@ export interface PanelContribution {
|
|
|
169
169
|
defaultDock?: DockEdge;
|
|
170
170
|
defaultGroup?: string;
|
|
171
171
|
icon?: string;
|
|
172
|
+
/** K-8 — opt into the editor's PANEL RAIL: hosts that support the
|
|
173
|
+
* rail door render a launcher item for this panel after the
|
|
174
|
+
* built-ins. Off by default (the Window menu + palette remain the
|
|
175
|
+
* baseline discovery surfaces). */
|
|
176
|
+
rail?: boolean;
|
|
177
|
+
/** K-8 — a self-contained SVG glyph (the inner markup of a 24×24
|
|
178
|
+
* viewBox, currentColor strokes/fills, no script/foreignObject/event
|
|
179
|
+
* handlers — the host SANITIZES before rendering). Used when `icon`
|
|
180
|
+
* names no host glyph; the honest fallback stays the iconless tab. */
|
|
181
|
+
iconSvg?: string;
|
|
172
182
|
when?: VisibilityPredicate;
|
|
173
183
|
closable?: boolean;
|
|
174
184
|
movable?: boolean;
|
package/dist/host.d.ts
CHANGED
|
@@ -483,6 +483,39 @@ export interface FrameChainLink {
|
|
|
483
483
|
* The future write-scope (edit-context subtree) attaches at this same
|
|
484
484
|
* chokepoint.
|
|
485
485
|
*/
|
|
486
|
+
/**
|
|
487
|
+
* DOC-03 (protocol v54) — a story's full CONTENT: its paragraphs → runs → text +
|
|
488
|
+
* applied styles + direct character overrides. Where `collection<StorySummary>
|
|
489
|
+
* ("stories")` gives only counts, this gives the decoded text + formatting a
|
|
490
|
+
* content plugin needs to read an EDITED document back (e.g. paged.doc diffs it
|
|
491
|
+
* against its import baseline to drive edited save-back). Field names mirror the
|
|
492
|
+
* engine's `CharacterRun`/`Paragraph`; each `null`/absent override = inherit.
|
|
493
|
+
*/
|
|
494
|
+
export interface StoryContent {
|
|
495
|
+
selfId: string;
|
|
496
|
+
paragraphs: ParagraphContent[];
|
|
497
|
+
}
|
|
498
|
+
/** DOC-03 — one paragraph's applied style + its runs. */
|
|
499
|
+
export interface ParagraphContent {
|
|
500
|
+
paragraphStyle?: string | null;
|
|
501
|
+
runs: RunContent[];
|
|
502
|
+
}
|
|
503
|
+
/** DOC-03 — one run's text + applied character style + direct overrides. A run
|
|
504
|
+
* styled only through an applied style carries just `characterStyle`. */
|
|
505
|
+
export interface RunContent {
|
|
506
|
+
text: string;
|
|
507
|
+
characterStyle?: string | null;
|
|
508
|
+
font?: string | null;
|
|
509
|
+
fontStyle?: string | null;
|
|
510
|
+
pointSize?: number | null;
|
|
511
|
+
fillColor?: string | null;
|
|
512
|
+
underline?: boolean | null;
|
|
513
|
+
strikethru?: boolean | null;
|
|
514
|
+
capitalization?: string | null;
|
|
515
|
+
baselineShift?: number | null;
|
|
516
|
+
position?: string | null;
|
|
517
|
+
tracking?: number | null;
|
|
518
|
+
}
|
|
486
519
|
export interface DocumentSurface {
|
|
487
520
|
mutate(mutation: Mutation): Promise<MutationOutcome>;
|
|
488
521
|
undo(): Promise<void>;
|
|
@@ -511,6 +544,14 @@ export interface DocumentSurface {
|
|
|
511
544
|
* pagination consumer reads this to know the real host chain (rather
|
|
512
545
|
* than a caller-supplied one). */
|
|
513
546
|
frameChain(storyId: string): Promise<FrameChainLink[]>;
|
|
547
|
+
/** DOC-03 (protocol v54) — read a story's full content (paragraphs → runs →
|
|
548
|
+
* text + applied styles + direct overrides), or `null` when the story id
|
|
549
|
+
* doesn't resolve. Where `collection<StorySummary>("stories")` gives counts,
|
|
550
|
+
* this gives the decoded text + formatting needed to read an EDITED document
|
|
551
|
+
* back and diff it (paged.doc edited save-back). Gated:
|
|
552
|
+
* `supports("document.readStory@1")`; a host without the v54 read backend
|
|
553
|
+
* throws `PluginApiNotImplemented` (a visible seam, never a fake value). */
|
|
554
|
+
storyContent(storyId: string): Promise<StoryContent | null>;
|
|
514
555
|
onDidChange(listener: (e: DocumentChangeEvent) => void): Disposable;
|
|
515
556
|
/**
|
|
516
557
|
* Plugin-metadata carrier (protocol v33) — read this plugin's
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { PluginId, PluginManifest, PluginCapabilities, PluginContributions, NetworkCapability, DataProvidersCapability, StorageCapability, WasmArtifact, WasmPurpose, WorkersCapability, SecretsCapability, GpuCapability, } from "./manifest";
|
|
2
2
|
export type { BundleHandle, PagedBundle } from "./bundle";
|
|
3
|
-
export type { BundleHost, ContributionSurface, SceneLayerSurface, ImagesSurface, ImageResourceClaimOptions, TileBytes, WorkersSurface, BundleWorker, SpawnWorkerOptions, SecretsSurface, SecretMaterial, DocumentSurface, SelectionSurface, ViewportSurface, TextSurface, TextMetrics, FrameChainLink, OverlaySurface, ShellSurface, FilePickerOptions, PickedFile, StorageSurface, BlobSurface, BlobUsage, PartsSurface, NativeDocumentSurface, NetworkSurface, ConsentResult, DataProvidersSurface, DataProviderRegistration, DataProviderHandle, DataProviderInfo, DataProviderSnapshot, ProviderSchema, ProviderField, ProviderRecordSet, DiagnosticsSurface, BindingsSurface, Diagnostic, DocumentChangeEvent, MutationOutcome, Disposable, PluginLogger, EditContextContribution, ObjectTypeContribution, EditContextCandidate, EnteredEditContext, ContentPointerEvent, EditContextDescriptor, ObjectTypeDescriptor, PluginMetadataEnvelope, ObjectTypeBaker, BakeContext, } from "./host";
|
|
3
|
+
export type { BundleHost, ContributionSurface, SceneLayerSurface, ImagesSurface, ImageResourceClaimOptions, TileBytes, WorkersSurface, BundleWorker, SpawnWorkerOptions, SecretsSurface, SecretMaterial, DocumentSurface, SelectionSurface, ViewportSurface, TextSurface, TextMetrics, FrameChainLink, StoryContent, ParagraphContent, RunContent, OverlaySurface, ShellSurface, FilePickerOptions, PickedFile, StorageSurface, BlobSurface, BlobUsage, PartsSurface, NativeDocumentSurface, NetworkSurface, ConsentResult, DataProvidersSurface, DataProviderRegistration, DataProviderHandle, DataProviderInfo, DataProviderSnapshot, ProviderSchema, ProviderField, ProviderRecordSet, DiagnosticsSurface, BindingsSurface, Diagnostic, DocumentChangeEvent, MutationOutcome, Disposable, PluginLogger, EditContextContribution, ObjectTypeContribution, EditContextCandidate, EnteredEditContext, ContentPointerEvent, EditContextDescriptor, ObjectTypeDescriptor, PluginMetadataEnvelope, ObjectTypeBaker, BakeContext, } from "./host";
|
|
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";
|
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.27-canary.1",
|
|
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",
|