@openfairygui/functions 0.2.0-alpha.19 → 0.2.0-alpha.20

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.
Files changed (38) hide show
  1. package/README.md +7 -2
  2. package/dist/index.cjs +3 -920
  3. package/dist/index.d.cts +2 -46
  4. package/dist/index.d.ts +3 -47
  5. package/dist/index.js +2 -919
  6. package/dist/node.cjs +138 -10
  7. package/dist/node.d.cts +7 -2
  8. package/dist/node.d.ts +8 -3
  9. package/dist/node.js +138 -11
  10. package/dist/{publish-DsPK0SJ1.js → publish-BJ_eelME.js} +1973 -2070
  11. package/dist/{publish-D7268_u4.cjs → publish-xFWT9Slz.cjs} +1973 -2070
  12. package/dist/restore-BW2xacB3.cjs +936 -0
  13. package/dist/{codegen-B8ZM1F4j.d.cts → restore-BeWaJNjR.d.cts} +49 -3
  14. package/dist/restore-Clk62n0O.js +931 -0
  15. package/dist/{codegen-CfbDHuFt.d.ts → restore-Dh0-Nvms.d.ts} +50 -4
  16. package/dist/web.cjs +4 -2
  17. package/dist/web.d.ts +1 -1
  18. package/dist/web.js +4 -2
  19. package/package.json +5 -2
  20. package/src/adapters/node/restore.ts +187 -0
  21. package/src/adapters/web/publish.ts +1 -247
  22. package/src/adapters/web/raster.ts +251 -0
  23. package/src/atlas/font.ts +95 -0
  24. package/src/atlas/inputs.ts +515 -0
  25. package/src/atlas/jta.ts +211 -0
  26. package/src/atlas/packing.ts +767 -0
  27. package/src/atlas.ts +23 -1639
  28. package/src/node.ts +4 -0
  29. package/src/publish/external-resources.ts +117 -0
  30. package/src/publish/options.ts +180 -0
  31. package/src/publish/package-context.ts +608 -0
  32. package/src/publish/resource-references.ts +210 -0
  33. package/src/publish.ts +21 -1130
  34. package/src/restore-internals/font.ts +100 -0
  35. package/src/restore-internals/movie-clip.ts +104 -0
  36. package/src/restore-internals/output-transaction.ts +164 -0
  37. package/src/restore.ts +14 -329
  38. /package/dist/{atlas-CDn6TirX.d.ts → atlas-C6tbl7nn.d.ts} +0 -0
package/README.md CHANGED
@@ -13,16 +13,21 @@ npm install --save @openfairygui/core @openfairygui/functions
13
13
  ```ts
14
14
  import { NodeIO } from '@openfairygui/core/node';
15
15
  import { inspect } from '@openfairygui/functions';
16
- import { publishNode } from '@openfairygui/functions/node';
16
+ import { publishNode, restoreNode } from '@openfairygui/functions/node';
17
17
 
18
18
  const io = new NodeIO();
19
19
  const doc = await io.readProject('./MyProject/MyProject.fairy');
20
20
 
21
21
  const report = inspect(doc);
22
22
  await publishNode({ document: doc, output: './release' });
23
+
24
+ await restoreNode({
25
+ inputDir: './release',
26
+ output: './restored-project',
27
+ });
23
28
  ```
24
29
 
25
- `publishNode` owns the standard Node filesystem, Sharp raster backend, and project plugin discovery. It fails when a complete runtime artifact cannot be generated. The root `publish()` export remains the lower-level capability-injected core for custom hosts; it is layout-only only when no output directory is requested.
30
+ `publishNode` owns the standard Node filesystem, Sharp raster backend, and project plugin discovery. `restoreNode` owns the Node filesystem and Sharp image extraction required by trusted-local artifact recovery. The root `publish()` and `restore()` exports remain the lower-level capability-injected workflows for custom hosts.
26
31
 
27
32
  ## Browser LayaBox publish
28
33