@byfungsi/lipat 0.2.1 → 0.4.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/README.md +13 -4
- package/dist/agent.d.ts +282 -25
- package/dist/agent.js +218 -10
- package/dist/agent.js.map +1 -1
- package/dist/{chunk-MWSM2KN5.js → chunk-GUFMPKIG.js} +19 -7
- package/dist/chunk-GUFMPKIG.js.map +1 -0
- package/dist/chunk-KZRDAJT7.js +17 -0
- package/dist/chunk-KZRDAJT7.js.map +1 -0
- package/dist/{chunk-NBLRI3RU.js → chunk-LWSSYK2Q.js} +2 -2
- package/dist/chunk-LWSSYK2Q.js.map +1 -0
- package/dist/{chunk-VSEJNCEF.js → chunk-O2QC22QE.js} +36 -16
- package/dist/chunk-O2QC22QE.js.map +1 -0
- package/dist/chunk-XGCPZJK2.js +229 -0
- package/dist/chunk-XGCPZJK2.js.map +1 -0
- package/dist/{chunk-YW4F6OKS.js → chunk-YIDY3IIM.js} +46 -19
- package/dist/chunk-YIDY3IIM.js.map +1 -0
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/{deck-runtime-30b2wHTB.d.ts → deck-runtime-CRLtiw52.d.ts} +2 -1
- package/dist/images.d.ts +53 -0
- package/dist/images.js +4 -0
- package/dist/images.js.map +1 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/lipat.wasm +0 -0
- package/dist/model.d.ts +45 -8
- package/dist/model.js +1 -1
- package/dist/pptx.d.ts +7 -1
- package/dist/pptx.js +3 -1
- package/dist/react.d.ts +25 -9
- package/dist/react.js +119 -60
- package/dist/react.js.map +1 -1
- package/dist/render.d.ts +14 -7
- package/dist/render.js +1 -1
- package/dist/reveal.d.ts +7 -2
- package/dist/reveal.js +5 -5
- package/dist/reveal.js.map +1 -1
- package/dist/wasm.d.ts +5 -3
- package/dist/wasm.js +2 -2
- package/package.json +5 -1
- package/dist/chunk-7WIKC5SV.js +0 -11
- package/dist/chunk-7WIKC5SV.js.map +0 -1
- package/dist/chunk-MWSM2KN5.js.map +0 -1
- package/dist/chunk-NBLRI3RU.js.map +0 -1
- package/dist/chunk-VSEJNCEF.js.map +0 -1
- package/dist/chunk-YW4F6OKS.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lipat
|
|
2
2
|
|
|
3
|
-
An agent-friendly slide authoring engine with an independent PPTX parser and exporter. Create slides from semantic JSON, TypeScript presets or Markdown; edit by stable IDs; compile into a shared scene for preview and export. The portable Rust core runs natively and as real WebAssembly in browsers and
|
|
3
|
+
An agent-friendly slide authoring engine with an independent PPTX parser and exporter. Create slides from semantic JSON, TypeScript presets or Markdown; edit by stable IDs; compile into a shared scene for preview and export. The portable Rust core runs natively and as real WebAssembly in browsers, Node and Workers with imported precompiled modules.
|
|
4
4
|
|
|
5
5
|
Inspired by [Nori](https://github.com/byfungsi/nori)'s headless model/runtime/adapters and [reveal.js](https://github.com/hakimel/reveal.js)'s declarative presentation flow. Lipat's primary source is an abstract authoring document. PPTX is a separate file adapter.
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ npm run verify
|
|
|
25
25
|
npm run dev
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
`npm run dev` builds the package and prints the Vite URL. The demo includes semantic editing, drag/resize and keyboard nudges, history, source JSON, Markdown/PPTX upload, presentation playback, an agent edit and a read-only attachment preview. The library ships no global CSS. Choose **Animation sample** to try fade, rise, slide and zoom, or [open it directly](https://byfungsi.github.io/lipat/playground/index.html?sample=animations).
|
|
28
|
+
`npm run dev` builds the package and prints the Vite URL. The demo includes semantic editing, drag/resize and keyboard nudges, history, source JSON, Markdown/PPTX upload, presentation playback, an agent edit and a read-only attachment preview. The library ships no global CSS. Choose **Animation sample** to try fade, rise, slide and zoom, or [open it directly](https://byfungsi.github.io/lipat/playground/index.html?sample=animations). Native PPTX export retains these effects. The [image sample](https://byfungsi.github.io/lipat/playground/index.html?sample=images) supports direct image URLs and embeds them in downloads.
|
|
29
29
|
|
|
30
30
|
## Create and edit
|
|
31
31
|
|
|
@@ -121,6 +121,7 @@ Five provider-neutral tools implement inspect → edit → compile → preview
|
|
|
121
121
|
| `@byfungsi/lipat` | WASM initialization, creation, presets, common types and PPTX helpers |
|
|
122
122
|
| `/model` | Portable document, scene, operation and diagnostic contracts |
|
|
123
123
|
| `/core` | Runtime, history, subscriptions, presets and Markdown authoring |
|
|
124
|
+
| `/images` | Host-controlled URL image loading and immutable offline embedding |
|
|
124
125
|
| `/pptx` | Independent PPTX byte adapter |
|
|
125
126
|
| `/wasm` | Explicit Rust engine initialization |
|
|
126
127
|
| `/render` | Headless SVG and self-contained HTML output |
|
|
@@ -136,7 +137,7 @@ ESM and TypeScript declarations are supplied. React 18.3/19 and Motion 14.6+ are
|
|
|
136
137
|
|
|
137
138
|
Read [architecture](docs/architecture.md), [creation](docs/creation.md), [API](docs/api.md), [WASM and native usage](docs/wasm.md), [support and Nori parity](docs/support.md), [React](docs/react.md), [import/export](docs/pptx.md), and [verification](docs/verification.md).
|
|
138
139
|
|
|
139
|
-
Flow layout uses deterministic font metrics. Defaults are approximate and reported as diagnostics; supply measured glyph widths for accurate wrapping. Browser font rasterization can differ from the compiler. Supported PPTX content includes ordinary text/runs, basic shapes, raster images, simple tables, notes, slide ordering and inherited placeholder geometry.
|
|
140
|
+
Flow layout uses deterministic font metrics. Defaults are approximate and reported as diagnostics; supply measured glyph widths for accurate wrapping. Browser font rasterization can differ from the compiler. Supported PPTX content includes ordinary text/runs, basic shapes, raster images, simple tables, notes, slide ordering and inherited placeholder geometry. Portable entrance effects and reveal steps map to both the optional [Motion browser adapter and native PPTX timing](docs/animations.md), with easing approximations reported. [Direct image URLs](docs/images.md) can be previewed, linked, or embedded for offline delivery. Charts, SmartArt, media, arbitrary timelines and lossless PPTX rewriting are outside this version. Import/export warnings make these boundaries visible.
|
|
140
141
|
|
|
141
142
|
## Native Rust
|
|
142
143
|
|
|
@@ -152,4 +153,12 @@ Workspace crates are path dependencies until published. `cargo run -p lipat-wasm
|
|
|
152
153
|
|
|
153
154
|
`npm run verify` checks dependency boundaries, strict/headless TypeScript, behavioral/property/React tests through the real WASM engine, native Rust tests, native/WASM equivalence, builds, an isolated packed npm consumer, optional React/SSR isolation and documentation generation/build.
|
|
154
155
|
|
|
155
|
-
`npm run verify:browser` exercises the built demo in a real Chromium browser. `npm run verify:interop` independently opens exported PPTX with python-pptx after installing `scripts/requirements-interop.txt`. CI runs these extra checks too.
|
|
156
|
+
`npm run verify:browser` exercises the built demo in a real Chromium browser. `npm run verify:interop` independently opens exported PPTX with python-pptx after installing `scripts/requirements-interop.txt`. `npm run verify:openxml` validates animated and linked-image packages with Microsoft’s Open XML SDK (.NET 8 required). CI runs these extra checks too.
|
|
157
|
+
|
|
158
|
+
## Worker and immutable Artifact hosts
|
|
159
|
+
|
|
160
|
+
Version **0.4.0** adds `createLipatFromModule(module, {limits})` for precompiled Worker WASM while preserving `createLipat(bytes, {limits})`. Both share one ABI bridge and native resource budgets. See [Worker setup](docs/wasm.md) and [limit enforcement](docs/limits.md).
|
|
161
|
+
|
|
162
|
+
`ScenePreview` and `ScenePlayer` from `/react` accept a `SlideScene` directly, with no authoring runtime or WASM initialization. They default to `imagePolicy="embedded-only"`. Existing runtime viewers accept the same policy. [Scene viewer guide](docs/react.md) · [Live sample](https://byfungsi.github.io/lipat/playground/scene.html).
|
|
163
|
+
|
|
164
|
+
`npm run verify:workerd` tests the real restricted runtime; browser checks verify scene-only rendering without external fetches. Resource budgets bound admitted processing, not elapsed time or total heap usage; synchronous WASM cannot be interrupted by a JavaScript timer on the same thread.
|