@pygmalionjs/pygmalion 0.6.35 → 0.7.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.
Files changed (62) hide show
  1. package/LICENSE +190 -0
  2. package/README.ko.md +309 -28
  3. package/README.md +37 -16
  4. package/dist-lib/CameraLayer-D2wrEPwG.js +415 -0
  5. package/dist-lib/frameLodRuntime-CU0IYaSu.js +272 -0
  6. package/dist-lib/pygmalion.js +11615 -15973
  7. package/dist-lib/routePreviewStatus-DTr-UJhV.js +64 -0
  8. package/dist-lib/{FrozenRoutePreview-BbF5Ov5K.js → runtime-DRkTU9eq.js} +9515 -5306
  9. package/dist-lib/testing.js +46 -6
  10. package/dist-lib/types/{App.d.ts → EditorShell.d.ts} +1 -1
  11. package/dist-lib/types/canvas/CameraLayer.d.ts +2 -1
  12. package/dist-lib/types/canvas/FrameLabelBanner.d.ts +1 -1
  13. package/dist-lib/types/canvas/FrameView.d.ts +1 -1
  14. package/dist-lib/types/canvas/FrozenRoutePreview.d.ts +1 -1
  15. package/dist-lib/types/canvas/SectionBoxes.d.ts +2 -1
  16. package/dist-lib/types/canvas/ShadowRoutePreview.d.ts +1 -1
  17. package/dist-lib/types/contract/errors.d.ts +30 -0
  18. package/dist-lib/types/contract/index.d.ts +5 -0
  19. package/dist-lib/types/contract/memoryTransport.d.ts +19 -0
  20. package/dist-lib/types/contract/paths.d.ts +57 -0
  21. package/dist-lib/types/contract/transport.d.ts +69 -0
  22. package/dist-lib/types/contract/types.d.ts +150 -0
  23. package/dist-lib/types/contract/validate.d.ts +15 -0
  24. package/dist-lib/types/contract/viteTransport.d.ts +10 -0
  25. package/dist-lib/types/core/context.d.ts +12 -0
  26. package/dist-lib/types/core/debug.d.ts +187 -0
  27. package/dist-lib/types/core/defaultRuntime.d.ts +3 -0
  28. package/dist-lib/types/core/hostBindings.d.ts +90 -0
  29. package/dist-lib/types/core/runtime.d.ts +36 -0
  30. package/dist-lib/types/core/runtimeContext.d.ts +13 -0
  31. package/dist-lib/types/editor/flowSessionScheduler.d.ts +21 -7
  32. package/dist-lib/types/editor/framePreviewKeys.d.ts +10 -10
  33. package/dist-lib/types/editor/host.d.ts +31 -26
  34. package/dist-lib/types/editor/previewBootstrap.d.ts +5 -15
  35. package/dist-lib/types/editor/previewCaptureProgress.d.ts +7 -2
  36. package/dist-lib/types/editor/projectRuntime.d.ts +11 -98
  37. package/dist-lib/types/editor/revisionCatalog.d.ts +8 -9
  38. package/dist-lib/types/editor/scenarioCoverage.d.ts +2 -1
  39. package/dist-lib/types/editor/store.d.ts +17 -2
  40. package/dist-lib/types/editor/storyboardComposition.d.ts +1 -5
  41. package/dist-lib/types/editor/storyboardDiscovery.d.ts +6 -16
  42. package/dist-lib/types/editor/storyboardEnvironment.d.ts +2 -2
  43. package/dist-lib/types/editor/variantPrefetch.d.ts +3 -2
  44. package/dist-lib/types/editor/visualQa.d.ts +7 -2
  45. package/dist-lib/types/lib.d.ts +25 -204
  46. package/dist-lib/types/shell/ComponentStateControls.d.ts +1 -1
  47. package/dist-lib/types/testing.d.ts +5 -1
  48. package/node/component-branches.mjs +3 -3
  49. package/node/contract.d.mts +63 -0
  50. package/node/contract.mjs +175 -0
  51. package/node/design-session.mjs +4 -2
  52. package/node/dev-mirror.mjs +6 -3
  53. package/node/inspect-plugin.mjs +3 -2
  54. package/node/preview-artifact-plugin.mjs +13 -16
  55. package/node/preview-artifact-store.mjs +4 -2
  56. package/node/qa-capture-plugin.mjs +3 -2
  57. package/node/storyboard-canonical.mjs +2 -2
  58. package/node/storyboard-capture-runtime.mjs +2 -2
  59. package/node/storyboard-environment.mjs +9 -6
  60. package/node/vite.mjs +2 -13
  61. package/package.json +24 -4
  62. package/storyboard.d.ts +11 -0
@@ -0,0 +1,64 @@
1
+ function n({
2
+ hasScreenshot: t,
3
+ hasDomSnapshot: e,
4
+ magnifiedPastBitmap: r = !1,
5
+ preparedForPromotion: i = !1,
6
+ preferDom: a = !1
7
+ }) {
8
+ return t ? (r || i || a) && e ? "dom" : "screenshot" : e ? "dom" : "none";
9
+ }
10
+ function s({
11
+ stale: t,
12
+ resolution: e,
13
+ captureStatus: r,
14
+ diagnostic: i,
15
+ liveInteractionReady: a = !1
16
+ }) {
17
+ return e.status === "error" ? e.reason === "not-prepared" ? a ? null : {
18
+ title: "Preview not prepared",
19
+ detail: "Refresh the source to draw this frame from the running app",
20
+ tone: "info",
21
+ role: "status",
22
+ retryable: !0
23
+ } : {
24
+ title: "Preview refresh failed",
25
+ detail: e.message,
26
+ tone: "error",
27
+ role: "alert",
28
+ retryable: !0
29
+ } : r && r !== "ready" ? {
30
+ title: r === "capture-error" ? "Capture error" : "QA issue",
31
+ detail: i ?? "Review capture diagnostics",
32
+ tone: r === "capture-error" ? "error" : "warning",
33
+ role: r === "capture-error" ? "alert" : "status",
34
+ retryable: !1
35
+ } : a && (e.status === "checking" || e.status === "generating" || e.status === "outdated" || t) ? null : t ? e.status === "checking" ? {
36
+ title: "Checking preview",
37
+ detail: "Looking for an exact cached preview",
38
+ tone: "info",
39
+ role: "status",
40
+ retryable: !1
41
+ } : e.status === "generating" ? {
42
+ title: "Refreshing preview",
43
+ detail: "Generating the exact source preview",
44
+ tone: "info",
45
+ role: "status",
46
+ retryable: !1
47
+ } : {
48
+ title: "Preview out of date",
49
+ detail: e.status === "outdated" && e.message ? e.message : "No exact preview is available for the current source",
50
+ tone: "warning",
51
+ role: "status",
52
+ retryable: !1
53
+ } : e.status === "checking" ? null : e.status === "generating" ? {
54
+ title: "Preparing preview",
55
+ detail: "Generating an exact source preview",
56
+ tone: "info",
57
+ role: "status",
58
+ retryable: !1
59
+ } : null;
60
+ }
61
+ export {
62
+ s as resolveRoutePreviewArtifactStatus,
63
+ n as resolveStaticRoutePreviewSurface
64
+ };