pixiboardjs 0.1.0-alpha.5 → 0.1.0-alpha.6

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Preserve original media resources, fit imported content to its natural dimensions, and provide Node media preparation for reliable image, video, and audio previews. Support non-history media updates and safer asset import contracts.
8
+
3
9
  ## 0.1.0-alpha.5
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -20,9 +20,11 @@ Install target for SDK consumers:
20
20
  pnpm add pixiboardjs@alpha
21
21
  ```
22
22
 
23
- The public surface is the package root. `./browser`, `./node` and `./types`
24
- are explicit subpath contracts so consumers can select platform ports without
25
- depending on internal workspace packages.
23
+ The public surface is the package root. `./browser`, `./node`, `./types` and
24
+ the Node-only `./node-media-provider` are explicit subpath contracts so
25
+ consumers can select platform ports without depending on internal workspace
26
+ packages. The media provider is not imported by the browser entries and must
27
+ only be loaded in Node.
26
28
 
27
29
  ```ts
28
30
  import { createPixiBoard } from "pixiboardjs";
@@ -43,6 +45,28 @@ await board.destroy();
43
45
  See [`VERSIONING.md`](VERSIONING.md) for the separate SDK, document, node,
44
46
  plugin and Agent-tool version dimensions.
45
47
 
48
+ ### Node media provider
49
+
50
+ The host injects `sharp`; install it in the Node application if it is not
51
+ already available. `ffmpeg` and `ffprobe` are executable dependencies used for
52
+ video/audio probing and previews. Pass their paths explicitly, or set
53
+ `FFMPEG_PATH` / `FFPROBE_PATH`:
54
+
55
+ ```ts
56
+ import sharp from "sharp";
57
+ import { createNodeMediaProvider } from "pixiboardjs/node-media-provider";
58
+
59
+ const media = createNodeMediaProvider({
60
+ sharp,
61
+ ffmpegPath: "/opt/homebrew/bin/ffmpeg",
62
+ ffprobePath: "/opt/homebrew/bin/ffprobe",
63
+ });
64
+ ```
65
+
66
+ If paths are omitted, the provider checks `FFMPEG_PATH` / `FFPROBE_PATH` and
67
+ common installation locations before falling back to the executable names on
68
+ `PATH`. Do not import this subpath from browser code.
69
+
46
70
  `pnpm build:release` reproducibly creates ESM JavaScript, source maps and
47
71
  declaration artifacts under `dist/`. The public facade bundles private workspace
48
72
  implementation packages and keeps `pixi.js` as its only registry runtime
@@ -91,5 +115,6 @@ from `pixiboardjs/browser`; no private workspace imports are needed. See the
91
115
  for lifecycle, style and host integration details. Call `destroy()` on controllers
92
116
  when removing a host surface.
93
117
 
94
- The browser ESM budget is 270,000 bytes (uncompressed) for the native connection
95
- renderer and node-agent additions; the root and Node budgets are unchanged.
118
+ The browser ESM budget is 290,000 bytes (uncompressed) for the native connection
119
+ renderer, node-agent, and media import and preview runtime. The alpha.6 release
120
+ candidate measured 285,882 bytes in CI; the root and Node budgets are unchanged.
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, isAssetVariant, resizeHandleAxes, resizeHandleCursor } from './index.js';
2
- import { B as BoardNode, W as WorldBounds, R as ResizeHandle, P as PixiBoard, J as JsonValue, a as Point, V as ViewportSnapshot, A as AssetVariant, b as BoardDocument, c as AssetRecord, d as BoardDocumentUpdate, e as BoardChangeSet, C as ConnectionStyle, f as ConnectionCurve } from './types-D39-tYZ8.js';
3
- export { g as AssetRef, h as BoardCapabilities, i as BoardChangeEvent, j as BoardLifecycleState, k as BoardNodeConvertInput, l as BoardNodeCreateInput, m as BoardNodePatch, n as BoardRuntimePorts, o as BrowserEventPort, p as CaptureInput, q as CaptureResult, r as ChangeOrigin, s as ConnectionLayer, t as CustomDisplayFactory, u as CustomDisplayObject, v as CustomNodeDataDefinition, w as CustomNodeDefinition, x as CustomNodeRenderer, y as CustomNodeRendererContext, z as CustomNodeRendererRegistry, D as CustomNodeView, E as CustomRendererResources, F as CustomResizePolicy, G as CustomTextureLease, H as DocumentLoadOptions, I as DocumentPersistence, K as HistoryChangeEvent, N as NodeGeometry, L as NodeHandle, M as NodeHandleEventMap, O as NodeInput, Q as NodeListFilter, S as NodePatch, T as NodeQuery, U as NodeResizeRequest, X as NodeTypeDefinition, Y as NodeTypeRegistrationDisposer, Z as NodeTypeRegistrationOptions, _ as NodeTypeRegistry, $ as PixiBoardOptions, a0 as PixiBoardRendererOptions, a1 as PreviewNode, a2 as PreviewQuality, a3 as PreviewSpec, a4 as PreviewSpecOptions, a5 as PreviewState, a6 as PreviewStatus, a7 as PublicBoardEventMap, a8 as PublicNodeTypeDefinition, a9 as PublicRendererOptions, aa as RenderCompleteEvent, ab as RendererApplyResult, ac as ResizeObserverPort, ad as RuntimeRenderer, ae as SelectionChangeEvent, af as TickerPort, ag as TransactionOptions, ah as TransactionOrigin, ai as TransformBounds, aj as TransformHandlePlacement, ak as TransformSession, al as ViewportChangeEvent, am as createPreviewSpec, an as isDocumentPreviewType, ao as isPreviewNodeType, ap as previewStatusLabel } from './types-D39-tYZ8.js';
1
+ export { AssetUnavailableError, BoardDestroyedError, CapabilityError, CapabilityUnavailableError, DocumentValidationError, NodeNotFoundError, NodeTypeNotRegisteredError, NodeValidationError, PermissionDeniedError, RESIZE_HANDLES, TransactionConflictError, createMediaAssetRefs, createMediaMetadata, createPixiBoard, fitMediaRect, isAssetVariant, isContentFit, preferredMediaNodeSize, resizeHandleAxes, resizeHandleCursor, resolveTextureAssetRef } from './index.js';
2
+ import { B as BoardNode, W as WorldBounds, R as ResizeHandle, P as PixiBoard, J as JsonValue, a as Point, V as ViewportSnapshot, A as AssetVariant, b as BoardDocument, c as AssetRecord, d as BoardDocumentUpdate, e as BoardChangeSet, C as ConnectionStyle, f as ConnectionCurve } from './types-Cl2ogJCs.js';
3
+ export { g as AssetImportRequest, h as AssetImportService, i as AssetImportSource, j as AssetRef, k as BoardCapabilities, l as BoardChangeEvent, m as BoardLifecycleState, n as BoardNodeConvertInput, o as BoardNodeCreateInput, p as BoardNodePatch, q as BoardRuntimePorts, r as BrowserEventPort, s as CaptureInput, t as CaptureResult, u as ChangeOrigin, v as ConnectionLayer, w as ContentFit, x as CustomDisplayFactory, y as CustomDisplayObject, z as CustomNodeDataDefinition, D as CustomNodeDefinition, E as CustomNodeRenderer, F as CustomNodeRendererContext, G as CustomNodeRendererRegistry, H as CustomNodeView, I as CustomRendererResources, K as CustomResizePolicy, L as CustomTextureLease, M as DocumentLoadOptions, N as DocumentPersistence, O as HistoryChangeEvent, Q as ImportedAsset, S as MediaMetadata, T as NodeGeometry, U as NodeHandle, X as NodeHandleEventMap, Y as NodeInput, Z as NodeListFilter, _ as NodePatch, $ as NodeQuery, a0 as NodeResizeRequest, a1 as NodeTypeDefinition, a2 as NodeTypeRegistrationDisposer, a3 as NodeTypeRegistrationOptions, a4 as NodeTypeRegistry, a5 as PixiBoardOptions, a6 as PixiBoardRendererOptions, a7 as PreviewNode, a8 as PreviewQuality, a9 as PreviewSpec, aa as PreviewSpecOptions, ab as PreviewState, ac as PreviewStatus, ad as PublicBoardEventMap, ae as PublicNodeTypeDefinition, af as PublicRendererOptions, ag as RenderCompleteEvent, ah as RendererApplyResult, ai as ResizeObserverPort, aj as RuntimeRenderer, ak as SelectionChangeEvent, al as TickerPort, am as TransactionOptions, an as TransactionOrigin, ao as TransformBounds, ap as TransformHandlePlacement, aq as TransformSession, ar as ViewportChangeEvent, as as createPreviewSpec, at as isDocumentPreviewType, au as isPreviewNodeType, av as previewStatusLabel } from './types-Cl2ogJCs.js';
4
4
 
5
5
  declare function rotatedRectBounds(node: BoardNode): WorldBounds;
6
6