pixiboardjs 0.1.0-alpha.0 → 0.1.0-alpha.2
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/CHANGELOG.md +50 -3
- package/dist/browser.d.ts +13 -5
- package/dist/browser.js +229 -57
- package/dist/browser.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +155 -22
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.js +155 -22
- package/dist/node.js.map +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/{types-DnR8yhxj.d.ts → types-CZ0KxRlm.d.ts} +49 -7
- package/dist/types.d.ts +1 -1
- package/etc/pixiboardjs-browser.api.md +90 -22
- package/etc/pixiboardjs-node.api.md +87 -21
- package/etc/pixiboardjs-types.api.md +72 -21
- package/etc/pixiboardjs.api.md +87 -21
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 0.1.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add validated content-addressed preview variants, shared preview state and stable viewport/reset sizing helpers, and a host-configurable preview lifecycle in the site. The site accepts arbitrary files, classifies ZIP model archives by their directory, preserves preview state, and guards stale texture decodes. Hosts can supply preview jobs without coupling the SDK to a transport or renderer service.
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.1
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 955e863: Publish `@pixi-board/capabilities` and `@pixi-board/agent-tools`; remove `@pixi-board/mcp-host`.
|
|
14
|
+
|
|
15
|
+
A third-party agent project can now embed the canvas and drive it from its own
|
|
16
|
+
agent layer without taking the renderer: install `@pixi-board/core` +
|
|
17
|
+
`@pixi-board/capabilities` (+ optionally `@pixi-board/agent-tools`) and run
|
|
18
|
+
headless. Both packages externalize their dependencies, so there is exactly one
|
|
19
|
+
`capabilities` implementation on npm.
|
|
20
|
+
|
|
21
|
+
`agent-tools` keeps its `./schemas` subpath so the `canvas.read` / `canvas.write`
|
|
22
|
+
JSON Schemas can be registered directly with an agent framework's tool registry.
|
|
4
23
|
|
|
5
|
-
|
|
24
|
+
`mcp-host` is deleted. It only implemented `tools/call` — no `initialize` or
|
|
25
|
+
`tools/list` handshake — so it could not be attached to a real MCP client, and it
|
|
26
|
+
was never published. Transport (MCP, HTTP, in-process) is now explicitly the
|
|
27
|
+
integrator's concern; the SDK ships the tool contract and its schemas.
|
|
6
28
|
|
|
7
|
-
|
|
29
|
+
`CapabilityError` now carries a `brand` field, and `isCapabilityError()` is
|
|
30
|
+
exported. `pixiboardjs` inlines capabilities into its bundle, so an error thrown
|
|
31
|
+
by a board is not an `instanceof` the class a separately installed consumer
|
|
32
|
+
imports; the brand makes that identification work across copies. Error mapping in
|
|
33
|
+
`capabilities` and `agent-tools` uses it, which also fixes the pre-existing case
|
|
34
|
+
where such an error was flattened to `INTERNAL_ERROR`.
|
|
35
|
+
|
|
36
|
+
- 199a6e4: Implement selection resize end to end and connect the previously inert `ResizePolicy`.
|
|
37
|
+
|
|
38
|
+
- core: `resolveResize()` / `resolveResizeSize()` turn one handle drag into a patch through the node type's policy (`free`, `aspect-ratio`, `fixed`, `custom`), resolving the delta in a rotated node's own frame and anchoring the edges the handle does not own. `nodes.resize()` commits it; a refused resize produces no revision. Policies are now validated at registration instead of failing silently at runtime.
|
|
39
|
+
- core: `TransactionOptions.coalesceKey` merges a per-frame pointer gesture into one history entry, compacting the repeated replace patches so a long drag does not leave thousands of them on a single undo step.
|
|
40
|
+
- pixiboardjs: `board.transform` drives resize gestures for the current selection — handle placement with rotation-aware cursors, single-node and group bounds, and `begin`/`update`/`commit`/`cancel` sessions. Group resize scales the selection as one unit while each node's size still passes through its own policy.
|
|
41
|
+
- pixiboardjs/browser: `attachDomTransformer()` renders the eight control points as real, grabbable DOM elements and drives the gesture from their pointer events.
|
|
42
|
+
|
|
43
|
+
- 955e863: Connect viewport virtualization to the main package and give node renderers level-of-detail tiers.
|
|
44
|
+
|
|
45
|
+
- core: `viewport.visibleWorldBounds(padding?)` projects the current surface back into world coordinates, and `viewport.getScreenSize()` reads it back. Both return/report nothing useful until a host has actually measured the surface — the 1x1 constructor default is a placeholder, and `visibleWorldBounds()` returns `undefined` rather than culling everything against it.
|
|
46
|
+
- pixiboardjs: `createPixiBoard()` now drives the renderer's visible bounds on mount, on `viewport:change`, and on container resize, so live render objects track visible content instead of document size. Previously `PixiBoardRenderer.setVisibleBounds()` existed and was tested but nothing on the facade path ever called it, leaving every SDK consumer fully retained. Configurable through `virtualization: { enabled?, padding? }` (default on, 256 world units of margin); `RuntimeRenderer.setVisibleBounds` is optional, so a renderer that retains everything stays valid.
|
|
47
|
+
- renderer-pixi: `setVisibleBounds(bounds, scale?)` resolves a level-of-detail tier from the viewport scale (`lod: { thresholds }`, default `[0.25, 0.5, 1]`) and exposes it as `context.lod`, which was previously always an empty object. Views retained across a tier change are re-updated once so a node renderer can draw itself more cheaply when zoomed out — the case culling cannot help with, because every node is legitimately on screen. The tier also travels to `acquireTexture` as `lodLevel`/`lodScale` so a host can resolve a lower-resolution asset variant.
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- 7febced: Make selection resizing proportional by default, with Command/Ctrl unlocking freeform resizing in the site transformer.
|
|
52
|
+
- 9415656: Prepare reproducible JavaScript and declaration artifacts, formal package exports, API reporting, and release-size gates for the P6 publishability workflow.
|
|
53
|
+
|
|
54
|
+
All notable changes to `pixiboardjs` will be documented here.
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AssetUnavailableError, BoardDestroyedError, CapabilityError, CapabilityUnavailableError, DocumentValidationError, NodeNotFoundError, NodeTypeNotRegisteredError, NodeValidationError, PermissionDeniedError, RESIZE_HANDLES, TransactionConflictError, createPixiBoard, resizeHandleAxes, resizeHandleCursor } from './index.js';
|
|
2
|
-
import { P as PixiBoard, B as BoardNode, J as JsonValue, W as WorldBounds, a as Point, V as ViewportSnapshot, b as BoardDocument,
|
|
3
|
-
export {
|
|
1
|
+
export { AssetUnavailableError, BoardDestroyedError, CapabilityError, CapabilityUnavailableError, DocumentValidationError, NodeNotFoundError, NodeTypeNotRegisteredError, NodeValidationError, PermissionDeniedError, RESIZE_HANDLES, TransactionConflictError, createPixiBoard, isAssetVariant, resizeHandleAxes, resizeHandleCursor } from './index.js';
|
|
2
|
+
import { R as ResizeHandle, P as PixiBoard, B as BoardNode, J as JsonValue, W as WorldBounds, a as Point, V as ViewportSnapshot, A as AssetVariant, b as BoardDocument, c as AssetRecord } from './types-CZ0KxRlm.js';
|
|
3
|
+
export { d as AssetRef, e as BoardCapabilities, f as BoardChangeEvent, g as BoardDocumentUpdate, h as BoardLifecycleState, i as BoardNodeCreateInput, j as BoardNodePatch, k as BoardRuntimePorts, l as BrowserEventPort, C as CaptureInput, m as CaptureResult, n as ChangeOrigin, o as CustomDisplayFactory, p as CustomDisplayObject, q as CustomNodeDataDefinition, r as CustomNodeDefinition, s as CustomNodeRenderer, t as CustomNodeRendererContext, u as CustomNodeRendererRegistry, v as CustomNodeView, w as CustomResizePolicy, x as CustomTextureLease, D as DocumentLoadOptions, y as DocumentPersistence, H as HistoryChangeEvent, N as NodeGeometry, z as NodeHandle, E as NodeHandleEventMap, F as NodeInput, G as NodeListFilter, I as NodePatch, K as NodeQuery, L as NodeResizeRequest, M as NodeTypeDefinition, O as NodeTypeRegistrationDisposer, Q as NodeTypeRegistrationOptions, S as PixiBoardOptions, T as PixiBoardRendererOptions, U as PreviewNode, X as PreviewQuality, Y as PreviewSpec, Z as PreviewSpecOptions, _ as PreviewState, $ as PreviewStatus, a0 as PublicBoardEventMap, a1 as PublicNodeTypeDefinition, a2 as PublicRendererOptions, a3 as RenderCompleteEvent, a4 as RendererApplyResult, a5 as ResizeObserverPort, a6 as RuntimeRenderer, a7 as SelectionChangeEvent, a8 as TickerPort, a9 as TransactionOptions, aa as TransactionOrigin, ab as TransformBounds, ac as TransformHandlePlacement, ad as TransformSession, ae as ViewportChangeEvent, af as createPreviewSpec, ag as isDocumentPreviewType, ah as isPreviewNodeType, ai as previewStatusLabel } from './types-CZ0KxRlm.js';
|
|
4
4
|
|
|
5
5
|
type DomTransformerOptions = {
|
|
6
6
|
/**
|
|
@@ -18,6 +18,8 @@ type DomTransformerOptions = {
|
|
|
18
18
|
size?: number;
|
|
19
19
|
/** Prefix for the generated class names; see `attachDomTransformer` docs. */
|
|
20
20
|
classPrefix?: string;
|
|
21
|
+
/** Control points rendered by this host. Defaults to all eight points. */
|
|
22
|
+
handles?: readonly ResizeHandle[];
|
|
21
23
|
};
|
|
22
24
|
type DomTransformer = {
|
|
23
25
|
/** Re-projects the handles. Call on selection, document and viewport change. */
|
|
@@ -237,6 +239,12 @@ type SelectionOverlayOptions = {
|
|
|
237
239
|
groupBox?: boolean;
|
|
238
240
|
/** Padding in CSS pixels between the group box and the selection. */
|
|
239
241
|
groupBoxPadding?: number;
|
|
242
|
+
/**
|
|
243
|
+
* Draw individual node outlines. Use `"single"` to retain the outline for
|
|
244
|
+
* a single-node selection while a multi-selection only shows its group box.
|
|
245
|
+
* Defaults to true.
|
|
246
|
+
*/
|
|
247
|
+
nodeOutlines?: boolean | "single";
|
|
240
248
|
schedule?(callback: () => void): () => void;
|
|
241
249
|
};
|
|
242
250
|
/**
|
|
@@ -307,7 +315,7 @@ type AssetStorageLocation = {
|
|
|
307
315
|
kind: "opfs";
|
|
308
316
|
key: string;
|
|
309
317
|
};
|
|
310
|
-
type AssetBinaryVariant =
|
|
318
|
+
type AssetBinaryVariant = AssetVariant;
|
|
311
319
|
type StoredAssetBinary = {
|
|
312
320
|
storage: AssetStorageLocation;
|
|
313
321
|
size: number;
|
|
@@ -654,4 +662,4 @@ declare function indexedDbPersistence(options?: {
|
|
|
654
662
|
database?: string;
|
|
655
663
|
}): BrowserPersistenceAdapter;
|
|
656
664
|
|
|
657
|
-
export { type AdapterOperationOptions, type AssetBinaryVariant, type AssetGcOptions, type AssetGcResult, type AssetGcRoots, type AssetStorageLocation, BoardDocument, BoardNode, type BrowserAdapterCapabilities, type BrowserAdapterContractEvidence, type BrowserAdapterContractHarness, type BrowserAsset, BrowserAssetBinaryMissingError, type BrowserAssetExport, BrowserAssetNotFoundError, type BrowserCleanupError, type BrowserCleanupOperation, type BrowserCommitImportOptions, BrowserDocumentConflictError, type BrowserDocumentMetadata, type BrowserDocumentRecord, type BrowserDownloadRequest, type BrowserExportOptions, type BrowserImportOptions, type BrowserImportResult, type BrowserImportSourceType, BrowserPersistenceAbortError, BrowserPersistenceAdapter, type BrowserPersistenceAdapterOptions, BrowserPersistenceDestroyedError, BrowserPersistenceError, type BrowserPrepareImportOptions, type BrowserPreparedImport, BrowserStorageCapabilityError, BrowserStorageKeyCollisionError, BrowserStorageQuotaError, DEFAULT_OPFS_THRESHOLD_BYTES, type DomTransformer, type DomTransformerOptions, type DownloadPort, type GetAssetOptions, type IndexedDbPort, JsonValue, type LabelOverlayOptions, NativeDownloadPort, type NativeDownloadPortOptions, NativeIndexedDbPort, type NativeIndexedDbPortOptions, NativeObjectUrlPort, NativeOpfsPort, type NativeOpfsPortOptions, type ObjectUrlLease, type ObjectUrlPort, type OpfsPort, type OverlayAnchor, type OverlayBoundsResolver, type OverlayDeclutter, type OverlayItem, type OverlayLayer, type OverlayLayerOptions, type OverlayPlacement, type OverlayRenderContext, type OverlayScaleMode, PixiBoard, Point, type PortLifecycle, type PutAssetOptions, type SaveBrowserDocumentInput, type SaveBrowserDocumentOptions, type SelectionOverlayOptions, type StoredAssetBinary, type StoredAssetEntry, ViewportSnapshot, WorldBounds, anchorRatio, anchorWorldPoint, attachDomTransformer, attachLabelOverlay, attachOverlayLayer, attachSelectionOverlay, indexedDbPersistence, isBrowserQuotaError, projectOverlayItem, resolveOverlayBounds, resolveScale, runBrowserAdapterContract };
|
|
665
|
+
export { type AdapterOperationOptions, type AssetBinaryVariant, type AssetGcOptions, type AssetGcResult, type AssetGcRoots, type AssetStorageLocation, AssetVariant, BoardDocument, BoardNode, type BrowserAdapterCapabilities, type BrowserAdapterContractEvidence, type BrowserAdapterContractHarness, type BrowserAsset, BrowserAssetBinaryMissingError, type BrowserAssetExport, BrowserAssetNotFoundError, type BrowserCleanupError, type BrowserCleanupOperation, type BrowserCommitImportOptions, BrowserDocumentConflictError, type BrowserDocumentMetadata, type BrowserDocumentRecord, type BrowserDownloadRequest, type BrowserExportOptions, type BrowserImportOptions, type BrowserImportResult, type BrowserImportSourceType, BrowserPersistenceAbortError, BrowserPersistenceAdapter, type BrowserPersistenceAdapterOptions, BrowserPersistenceDestroyedError, BrowserPersistenceError, type BrowserPrepareImportOptions, type BrowserPreparedImport, BrowserStorageCapabilityError, BrowserStorageKeyCollisionError, BrowserStorageQuotaError, DEFAULT_OPFS_THRESHOLD_BYTES, type DomTransformer, type DomTransformerOptions, type DownloadPort, type GetAssetOptions, type IndexedDbPort, JsonValue, type LabelOverlayOptions, NativeDownloadPort, type NativeDownloadPortOptions, NativeIndexedDbPort, type NativeIndexedDbPortOptions, NativeObjectUrlPort, NativeOpfsPort, type NativeOpfsPortOptions, type ObjectUrlLease, type ObjectUrlPort, type OpfsPort, type OverlayAnchor, type OverlayBoundsResolver, type OverlayDeclutter, type OverlayItem, type OverlayLayer, type OverlayLayerOptions, type OverlayPlacement, type OverlayRenderContext, type OverlayScaleMode, PixiBoard, Point, type PortLifecycle, type PutAssetOptions, ResizeHandle, type SaveBrowserDocumentInput, type SaveBrowserDocumentOptions, type SelectionOverlayOptions, type StoredAssetBinary, type StoredAssetEntry, ViewportSnapshot, WorldBounds, anchorRatio, anchorWorldPoint, attachDomTransformer, attachLabelOverlay, attachOverlayLayer, attachSelectionOverlay, indexedDbPersistence, isBrowserQuotaError, projectOverlayItem, resolveOverlayBounds, resolveScale, runBrowserAdapterContract };
|