@storystick/preview 0.0.0-stage → 0.2.0-rc.1

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 (247) hide show
  1. package/LICENSE +112 -0
  2. package/PUBLIC-API.md +56 -0
  3. package/README.md +42 -2
  4. package/dist/.source-hash +1 -0
  5. package/dist/authoring/runtime-contract.d.ts +92 -0
  6. package/dist/authoring/runtime-contract.js +28 -0
  7. package/dist/channel-taxonomy.d.ts +17 -0
  8. package/dist/channel-taxonomy.js +46 -0
  9. package/dist/context-command.d.ts +18 -0
  10. package/dist/context-command.js +38 -0
  11. package/dist/dev/suspicious-codeword-detector.d.ts +15 -0
  12. package/dist/dev/suspicious-codeword-detector.js +220 -0
  13. package/dist/dev/suspicious-codeword-detector.noop.d.ts +3 -0
  14. package/dist/dev/suspicious-codeword-detector.noop.js +4 -0
  15. package/dist/framework/browser-context.d.ts +2 -0
  16. package/dist/framework/browser-context.js +2 -0
  17. package/dist/framework/generation-refresh.d.ts +23 -0
  18. package/dist/framework/generation-refresh.js +82 -0
  19. package/dist/framework/generation-signal.d.ts +8 -0
  20. package/dist/framework/generation-signal.js +17 -0
  21. package/dist/framework/projection-generation-watch.d.ts +5 -0
  22. package/dist/framework/projection-generation-watch.js +53 -0
  23. package/dist/framework/render-receipt.d.ts +8 -0
  24. package/dist/framework/render-receipt.js +10 -0
  25. package/dist/framework/runtime-adapter-store.d.ts +30 -0
  26. package/dist/framework/runtime-adapter-store.js +81 -0
  27. package/dist/grant-coordinator.d.ts +53 -0
  28. package/dist/grant-coordinator.js +329 -0
  29. package/dist/grant-lifecycle.d.ts +52 -0
  30. package/dist/grant-lifecycle.js +74 -0
  31. package/dist/identity/__test-adapter.d.ts +34 -0
  32. package/dist/identity/__test-adapter.js +59 -0
  33. package/dist/identity/browser-context-gate.d.ts +4 -0
  34. package/dist/identity/browser-context-gate.js +22 -0
  35. package/dist/identity/browser-context.d.ts +13 -0
  36. package/dist/identity/browser-context.js +22 -0
  37. package/dist/identity/carriers/postmessage.d.ts +84 -0
  38. package/dist/identity/carriers/postmessage.js +177 -0
  39. package/dist/identity/carriers/storage-state.d.ts +41 -0
  40. package/dist/identity/carriers/storage-state.js +99 -0
  41. package/dist/identity/carriers/storage.d.ts +39 -0
  42. package/dist/identity/carriers/storage.js +182 -0
  43. package/dist/identity/carriers/url.d.ts +19 -0
  44. package/dist/identity/carriers/url.js +38 -0
  45. package/dist/identity/identity-state-machine.d.ts +70 -0
  46. package/dist/identity/identity-state-machine.js +244 -0
  47. package/dist/identity/identity-types.d.ts +192 -0
  48. package/dist/identity/identity-types.js +22 -0
  49. package/dist/identity/index.d.ts +18 -0
  50. package/dist/identity/index.js +16 -0
  51. package/dist/identity/preview-cookie.d.ts +9 -0
  52. package/dist/identity/preview-cookie.js +12 -0
  53. package/dist/identity/preview-draft.d.ts +6 -0
  54. package/dist/identity/preview-draft.js +25 -0
  55. package/dist/identity/preview-identity.d.ts +28 -0
  56. package/dist/identity/preview-identity.js +84 -0
  57. package/dist/identity/preview-scope.d.ts +28 -0
  58. package/dist/identity/preview-scope.js +47 -0
  59. package/dist/identity/resolver.d.ts +110 -0
  60. package/dist/identity/resolver.js +334 -0
  61. package/dist/identity/session-query.d.ts +4 -0
  62. package/dist/identity/session-query.js +19 -0
  63. package/dist/index.d.ts +90 -0
  64. package/dist/index.js +788 -0
  65. package/dist/interaction-mode.d.ts +58 -0
  66. package/dist/interaction-mode.js +93 -0
  67. package/dist/nav-handler.d.ts +95 -0
  68. package/dist/nav-handler.js +84 -0
  69. package/dist/overlay-label.d.ts +79 -0
  70. package/dist/overlay-label.js +73 -0
  71. package/dist/page-presentation.d.ts +24 -0
  72. package/dist/page-presentation.js +32 -0
  73. package/dist/provenance/anchor-map.d.ts +95 -0
  74. package/dist/provenance/anchor-map.js +177 -0
  75. package/dist/provenance/carrier-plan.d.ts +51 -0
  76. package/dist/provenance/carrier-plan.js +90 -0
  77. package/dist/provenance/coded-text.d.ts +20 -0
  78. package/dist/provenance/coded-text.js +302 -0
  79. package/dist/provenance/direct-edit-locator.d.ts +29 -0
  80. package/dist/provenance/direct-edit-locator.js +218 -0
  81. package/dist/provenance/editable-leaf.d.ts +134 -0
  82. package/dist/provenance/editable-leaf.js +483 -0
  83. package/dist/provenance/editor-target.d.ts +29 -0
  84. package/dist/provenance/editor-target.js +46 -0
  85. package/dist/provenance/field-leaf-walker.d.ts +21 -0
  86. package/dist/provenance/field-leaf-walker.js +98 -0
  87. package/dist/provenance/frame-dependencies.d.ts +212 -0
  88. package/dist/provenance/frame-dependencies.js +550 -0
  89. package/dist/provenance/index.d.ts +26 -0
  90. package/dist/provenance/index.js +26 -0
  91. package/dist/provenance/local-events.d.ts +1 -0
  92. package/dist/provenance/local-events.js +1 -0
  93. package/dist/provenance/markers.d.ts +21 -0
  94. package/dist/provenance/markers.js +70 -0
  95. package/dist/provenance/multi-frame-anchor-map.d.ts +54 -0
  96. package/dist/provenance/multi-frame-anchor-map.js +109 -0
  97. package/dist/provenance/normalize.d.ts +2 -0
  98. package/dist/provenance/normalize.js +19 -0
  99. package/dist/provenance/overlay-focus-echo.d.ts +17 -0
  100. package/dist/provenance/overlay-focus-echo.js +16 -0
  101. package/dist/provenance/overlay-projection.d.ts +65 -0
  102. package/dist/provenance/overlay-projection.js +201 -0
  103. package/dist/provenance/owner-map.d.ts +55 -0
  104. package/dist/provenance/owner-map.js +239 -0
  105. package/dist/provenance/read-carrier.d.ts +22 -0
  106. package/dist/provenance/read-carrier.js +92 -0
  107. package/dist/provenance/recorder.d.ts +38 -0
  108. package/dist/provenance/recorder.js +82 -0
  109. package/dist/provenance/render-context.d.ts +106 -0
  110. package/dist/provenance/render-context.js +338 -0
  111. package/dist/provenance/reveal-contract.d.ts +44 -0
  112. package/dist/provenance/reveal-contract.js +1 -0
  113. package/dist/provenance/richtext-slice-embed-address.d.ts +20 -0
  114. package/dist/provenance/richtext-slice-embed-address.js +35 -0
  115. package/dist/provenance/runtime-script.d.ts +1 -0
  116. package/dist/provenance/runtime-script.js +2217 -0
  117. package/dist/provenance/sidecar-store.d.ts +63 -0
  118. package/dist/provenance/sidecar-store.js +151 -0
  119. package/dist/provenance/sidecar.d.ts +34 -0
  120. package/dist/provenance/sidecar.js +227 -0
  121. package/dist/provenance/slice-model.d.ts +28 -0
  122. package/dist/provenance/slice-model.js +86 -0
  123. package/dist/provenance/source-identity.d.ts +3 -0
  124. package/dist/provenance/source-identity.js +7 -0
  125. package/dist/provenance/source-map-materializer.d.ts +76 -0
  126. package/dist/provenance/source-map-materializer.js +286 -0
  127. package/dist/provenance/source-registry.d.ts +103 -0
  128. package/dist/provenance/source-registry.js +562 -0
  129. package/dist/provenance/transformed-output-gate.d.ts +161 -0
  130. package/dist/provenance/transformed-output-gate.js +171 -0
  131. package/dist/provenance/types.d.ts +102 -0
  132. package/dist/provenance/types.js +1 -0
  133. package/dist/refresh-policy.d.ts +11 -0
  134. package/dist/refresh-policy.js +14 -0
  135. package/dist/reveal-target.d.ts +8 -0
  136. package/dist/reveal-target.js +47 -0
  137. package/dist/route-paths.d.ts +11 -0
  138. package/dist/route-paths.js +14 -0
  139. package/dist/router-subscriber.d.ts +92 -0
  140. package/dist/router-subscriber.js +44 -0
  141. package/dist/runtime/anchor-types.d.ts +5 -0
  142. package/dist/runtime/anchor-types.js +1 -0
  143. package/dist/runtime/authority-store.d.ts +31 -0
  144. package/dist/runtime/authority-store.js +56 -0
  145. package/dist/runtime/boot.d.ts +52 -0
  146. package/dist/runtime/boot.js +379 -0
  147. package/dist/runtime/content-refresh.d.ts +30 -0
  148. package/dist/runtime/content-refresh.js +68 -0
  149. package/dist/runtime/emit-runtime-error.d.ts +51 -0
  150. package/dist/runtime/emit-runtime-error.js +64 -0
  151. package/dist/runtime/field-proxy.d.ts +112 -0
  152. package/dist/runtime/field-proxy.js +471 -0
  153. package/dist/runtime/form-contract-reporter.d.ts +99 -0
  154. package/dist/runtime/form-contract-reporter.js +391 -0
  155. package/dist/runtime/invalidation-adapter.d.ts +17 -0
  156. package/dist/runtime/invalidation-adapter.js +42 -0
  157. package/dist/runtime/live-query-overlay.d.ts +39 -0
  158. package/dist/runtime/live-query-overlay.js +345 -0
  159. package/dist/runtime/momentary-navigate.d.ts +16 -0
  160. package/dist/runtime/momentary-navigate.js +106 -0
  161. package/dist/runtime/observation-scheduler.d.ts +15 -0
  162. package/dist/runtime/observation-scheduler.js +42 -0
  163. package/dist/runtime/perf-metrics.d.ts +28 -0
  164. package/dist/runtime/perf-metrics.js +90 -0
  165. package/dist/runtime/preview-interaction-policy.d.ts +1 -0
  166. package/dist/runtime/preview-interaction-policy.js +103 -0
  167. package/dist/runtime/preview-overlay-painter.d.ts +27 -0
  168. package/dist/runtime/preview-overlay-painter.js +1732 -0
  169. package/dist/runtime/preview-overlay-sidecar.d.ts +26 -0
  170. package/dist/runtime/preview-overlay-sidecar.js +45 -0
  171. package/dist/runtime/preview-perspective-alignment.d.ts +15 -0
  172. package/dist/runtime/preview-perspective-alignment.js +40 -0
  173. package/dist/runtime/preview-perspective-intent-state.d.ts +23 -0
  174. package/dist/runtime/preview-perspective-intent-state.js +5 -0
  175. package/dist/runtime/preview-transition-state.d.ts +142 -0
  176. package/dist/runtime/preview-transition-state.js +257 -0
  177. package/dist/runtime/render-mode-state.d.ts +51 -0
  178. package/dist/runtime/render-mode-state.js +76 -0
  179. package/dist/runtime/request-id.d.ts +4 -0
  180. package/dist/runtime/request-id.js +8 -0
  181. package/dist/runtime/resolve-schema-field.d.ts +99 -0
  182. package/dist/runtime/resolve-schema-field.js +356 -0
  183. package/dist/runtime/runtime-error-dispatch.d.ts +23 -0
  184. package/dist/runtime/runtime-error-dispatch.js +75 -0
  185. package/dist/runtime/schema-store.d.ts +121 -0
  186. package/dist/runtime/schema-store.js +667 -0
  187. package/dist/runtime/snapshot-assembly.d.ts +104 -0
  188. package/dist/runtime/snapshot-assembly.js +553 -0
  189. package/dist/runtime/snapshot-reporter.d.ts +55 -0
  190. package/dist/runtime/snapshot-reporter.js +375 -0
  191. package/dist/runtime/standalone-overlay-controller.d.ts +33 -0
  192. package/dist/runtime/standalone-overlay-controller.js +281 -0
  193. package/dist/runtime/store.d.ts +307 -0
  194. package/dist/runtime/store.js +1026 -0
  195. package/dist/runtime/windowed-minimap-projection.d.ts +28 -0
  196. package/dist/runtime/windowed-minimap-projection.js +189 -0
  197. package/dist/runtime/workspace-shortcuts.d.ts +30 -0
  198. package/dist/runtime/workspace-shortcuts.js +188 -0
  199. package/dist/sdk-error-copy.d.ts +48 -0
  200. package/dist/sdk-error-copy.js +182 -0
  201. package/dist/select-cursor.d.ts +2 -0
  202. package/dist/select-cursor.js +23 -0
  203. package/dist/server/admission-cookie.d.ts +38 -0
  204. package/dist/server/admission-cookie.js +122 -0
  205. package/dist/server/control-client.d.ts +29 -0
  206. package/dist/server/control-client.js +22 -0
  207. package/dist/server/control-errors.d.ts +22 -0
  208. package/dist/server/control-errors.js +182 -0
  209. package/dist/server/draft-route.d.ts +12 -0
  210. package/dist/server/draft-route.js +45 -0
  211. package/dist/server/extract-token.d.ts +30 -0
  212. package/dist/server/extract-token.js +98 -0
  213. package/dist/server/grant.d.ts +128 -0
  214. package/dist/server/grant.js +395 -0
  215. package/dist/server/ordinary-read-provenance.d.ts +11 -0
  216. package/dist/server/ordinary-read-provenance.js +124 -0
  217. package/dist/server/preview-read-metadata.d.ts +10 -0
  218. package/dist/server/preview-read-metadata.js +27 -0
  219. package/dist/server/provenance-frame-builder.d.ts +53 -0
  220. package/dist/server/provenance-frame-builder.js +102 -0
  221. package/dist/server/provenance-runtime.d.ts +70 -0
  222. package/dist/server/provenance-runtime.js +46 -0
  223. package/dist/server/read-context-command.d.ts +11 -0
  224. package/dist/server/read-context-command.js +53 -0
  225. package/dist/server/read-identity.d.ts +3 -0
  226. package/dist/server/read-identity.js +63 -0
  227. package/dist/server/read-lifecycle.d.ts +17 -0
  228. package/dist/server/read-lifecycle.js +52 -0
  229. package/dist/server/render-frame-provenance.d.ts +133 -0
  230. package/dist/server/render-frame-provenance.js +676 -0
  231. package/dist/server/render-id.d.ts +15 -0
  232. package/dist/server/render-id.js +22 -0
  233. package/dist/server/route-document-provenance.d.ts +77 -0
  234. package/dist/server/route-document-provenance.js +1327 -0
  235. package/dist/server/route-session-cookie.d.ts +33 -0
  236. package/dist/server/route-session-cookie.js +54 -0
  237. package/dist/session-projections.d.ts +33 -0
  238. package/dist/session-projections.js +43 -0
  239. package/dist/session-subscriber.d.ts +124 -0
  240. package/dist/session-subscriber.js +79 -0
  241. package/dist/sha256-fallback.d.ts +30 -0
  242. package/dist/sha256-fallback.js +126 -0
  243. package/dist/types.d.ts +446 -0
  244. package/dist/types.js +85 -0
  245. package/dist/validators.d.ts +61 -0
  246. package/dist/validators.js +110 -0
  247. package/package.json +210 -3
@@ -0,0 +1,110 @@
1
+ /**
2
+ * Iframe-side preview-envelope validators (ADR-087 §3.2).
3
+ *
4
+ * Thin wrapper around `validatePreviewEnvelope` from
5
+ * `@storystick/transport-allowlist` (the foundation Lane C shipped).
6
+ * Adds the iframe-side context checks the foundation deliberately left out:
7
+ *
8
+ * - `sessionId` and `projectId` match the iframe's known values
9
+ * (they should never change mid-session).
10
+ * - `event.origin === parentOrigin` once the parent origin is
11
+ * learned (see "learn-and-lock" comment below).
12
+ *
13
+ * The foundation validator owns structure + anti-replay base
14
+ * (`MAX_ENVELOPE_AGE_MS`) + normative error wording. This module owns
15
+ * everything that needs *iframe context*: identity and the locked parent
16
+ * origin.
17
+ *
18
+ * Returning a discriminated `{ ok, ... }` keeps the call-site clean —
19
+ * the consumer handles `ok: false` by either ignoring the message
20
+ * (stale / mis-correlated) or transitioning to `error` (auth failed).
21
+ */
22
+ import { validatePreviewEnvelope, } from '@storystick/transport-allowlist';
23
+ /**
24
+ * Validate an incoming `navigate` envelope against the locked parent
25
+ * origin and the iframe's known sessionId / projectId. Navigate
26
+ * messages are unsolicited (no pending request to correlate against)
27
+ * — we only check origin lock + identity binding.
28
+ *
29
+ * **Pre-lock policy (codex Lane D round 1 P1 fix)** : `parentOrigin
30
+ * === null` means the iframe has not yet locked Studio's origin.
31
+ * Navigate messages received in that window are rejected
32
+ * unconditionally (`origin-mismatch`). Without this, any same-host
33
+ * script with a valid envelope shape could drive `history.pushState`
34
+ * on the iframe before the legitimate Studio handshake finishes.
35
+ * The identity broadcast is the only origin-learning path; navigation MUST
36
+ * wait for that lock.
37
+ */
38
+ export function validateNavigate(raw, eventOrigin, knownSessionId, knownProjectId, parentOrigin, now = Date.now()) {
39
+ const base = validatePreviewEnvelope(raw, now);
40
+ if (!base.ok)
41
+ return { ok: false, reason: 'envelope-invalid' };
42
+ if (base.message.type !== 'storystick.preview.navigate') {
43
+ return { ok: false, reason: 'wrong-message-type' };
44
+ }
45
+ // Reject pre-lock + reject post-lock origin mismatch.
46
+ if (parentOrigin === null || eventOrigin !== parentOrigin) {
47
+ return { ok: false, reason: 'origin-mismatch' };
48
+ }
49
+ if (base.message.sessionId !== knownSessionId) {
50
+ return { ok: false, reason: 'session-id-mismatch' };
51
+ }
52
+ if (base.message.projectId !== knownProjectId) {
53
+ return { ok: false, reason: 'project-id-mismatch' };
54
+ }
55
+ return { ok: true, envelope: base.message };
56
+ }
57
+ export function validateOverlayMap(raw, eventOrigin, knownSessionId, knownProjectId, parentOrigin, now = Date.now()) {
58
+ const base = validatePreviewEnvelope(raw, now);
59
+ if (!base.ok)
60
+ return { ok: false, reason: 'envelope-invalid' };
61
+ if (base.message.type !== 'storystick.preview.overlay-map') {
62
+ return { ok: false, reason: 'wrong-message-type' };
63
+ }
64
+ if (parentOrigin === null || eventOrigin !== parentOrigin) {
65
+ return { ok: false, reason: 'origin-mismatch' };
66
+ }
67
+ if (base.message.sessionId !== knownSessionId) {
68
+ return { ok: false, reason: 'session-id-mismatch' };
69
+ }
70
+ if (base.message.projectId !== knownProjectId) {
71
+ return { ok: false, reason: 'project-id-mismatch' };
72
+ }
73
+ return { ok: true, envelope: base.message };
74
+ }
75
+ export function validateOverlayClear(raw, eventOrigin, knownSessionId, knownProjectId, parentOrigin, now = Date.now()) {
76
+ const base = validatePreviewEnvelope(raw, now);
77
+ if (!base.ok)
78
+ return { ok: false, reason: 'envelope-invalid' };
79
+ if (base.message.type !== 'storystick.preview.overlay-clear') {
80
+ return { ok: false, reason: 'wrong-message-type' };
81
+ }
82
+ if (parentOrigin === null || eventOrigin !== parentOrigin) {
83
+ return { ok: false, reason: 'origin-mismatch' };
84
+ }
85
+ if (base.message.sessionId !== knownSessionId) {
86
+ return { ok: false, reason: 'session-id-mismatch' };
87
+ }
88
+ if (base.message.projectId !== knownProjectId) {
89
+ return { ok: false, reason: 'project-id-mismatch' };
90
+ }
91
+ return { ok: true, envelope: base.message };
92
+ }
93
+ export function validatePreviewV2RevealSource(raw, eventOrigin, knownSessionId, knownProjectId, parentOrigin, now = Date.now()) {
94
+ const base = validatePreviewEnvelope(raw, now);
95
+ if (!base.ok)
96
+ return { ok: false, reason: 'envelope-invalid' };
97
+ if (base.message.type !== 'storystick.preview.v2.reveal-source') {
98
+ return { ok: false, reason: 'wrong-message-type' };
99
+ }
100
+ if (parentOrigin === null || eventOrigin !== parentOrigin) {
101
+ return { ok: false, reason: 'origin-mismatch' };
102
+ }
103
+ if (base.message.sessionId !== knownSessionId) {
104
+ return { ok: false, reason: 'session-id-mismatch' };
105
+ }
106
+ if (base.message.projectId !== knownProjectId) {
107
+ return { ok: false, reason: 'project-id-mismatch' };
108
+ }
109
+ return { ok: true, envelope: base.message };
110
+ }
package/package.json CHANGED
@@ -1,6 +1,213 @@
1
1
  {
2
2
  "name": "@storystick/preview",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0-rc.1",
4
+ "license": "FSL-1.1-MIT",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./runtime/store": {
14
+ "types": "./dist/runtime/store.d.ts",
15
+ "import": "./dist/runtime/store.js"
16
+ },
17
+ "./runtime/request-id": {
18
+ "types": "./dist/runtime/request-id.d.ts",
19
+ "import": "./dist/runtime/request-id.js"
20
+ },
21
+ "./runtime/authority": {
22
+ "types": "./dist/runtime/authority-store.d.ts",
23
+ "import": "./dist/runtime/authority-store.js"
24
+ },
25
+ "./overlay-label": {
26
+ "types": "./dist/overlay-label.d.ts",
27
+ "import": "./dist/overlay-label.js"
28
+ },
29
+ "./select-cursor": {
30
+ "types": "./dist/select-cursor.d.ts",
31
+ "import": "./dist/select-cursor.js"
32
+ },
33
+ "./runtime/boot": {
34
+ "types": "./dist/runtime/boot.d.ts",
35
+ "import": "./dist/runtime/boot.js"
36
+ },
37
+ "./runtime/perf-metrics": {
38
+ "types": "./dist/runtime/perf-metrics.d.ts",
39
+ "import": "./dist/runtime/perf-metrics.js"
40
+ },
41
+ "./runtime/live-query-overlay": {
42
+ "types": "./dist/runtime/live-query-overlay.d.ts",
43
+ "import": "./dist/runtime/live-query-overlay.js"
44
+ },
45
+ "./refresh-policy": {
46
+ "types": "./dist/refresh-policy.d.ts",
47
+ "import": "./dist/refresh-policy.js"
48
+ },
49
+ "./runtime/emit-runtime-error": {
50
+ "types": "./dist/runtime/emit-runtime-error.d.ts",
51
+ "import": "./dist/runtime/emit-runtime-error.js"
52
+ },
53
+ "./runtime/workspace-shortcuts": {
54
+ "types": "./dist/runtime/workspace-shortcuts.d.ts",
55
+ "import": "./dist/runtime/workspace-shortcuts.js"
56
+ },
57
+ "./runtime/momentary-navigate": {
58
+ "types": "./dist/runtime/momentary-navigate.d.ts",
59
+ "import": "./dist/runtime/momentary-navigate.js"
60
+ },
61
+ "./runtime/content-refresh": {
62
+ "types": "./dist/runtime/content-refresh.d.ts",
63
+ "import": "./dist/runtime/content-refresh.js"
64
+ },
65
+ "./runtime/standalone-overlays": {
66
+ "types": "./dist/runtime/standalone-overlay-controller.d.ts",
67
+ "import": "./dist/runtime/standalone-overlay-controller.js"
68
+ },
69
+ "./runtime/invalidation": {
70
+ "types": "./dist/runtime/invalidation-adapter.d.ts",
71
+ "import": "./dist/runtime/invalidation-adapter.js"
72
+ },
73
+ "./dev/suspicious-codeword-detector": {
74
+ "types": "./dist/dev/suspicious-codeword-detector.d.ts",
75
+ "development": "./dist/dev/suspicious-codeword-detector.js",
76
+ "default": "./dist/dev/suspicious-codeword-detector.noop.js"
77
+ },
78
+ "./channel-taxonomy": {
79
+ "types": "./dist/channel-taxonomy.d.ts",
80
+ "import": "./dist/channel-taxonomy.js"
81
+ },
82
+ "./session-projections": {
83
+ "types": "./dist/session-projections.d.ts",
84
+ "import": "./dist/session-projections.js"
85
+ },
86
+ "./nav-handler": {
87
+ "types": "./dist/nav-handler.d.ts",
88
+ "import": "./dist/nav-handler.js"
89
+ },
90
+ "./router-subscriber": {
91
+ "types": "./dist/router-subscriber.d.ts",
92
+ "import": "./dist/router-subscriber.js"
93
+ },
94
+ "./identity/preview-cookie": {
95
+ "types": "./dist/identity/preview-cookie.d.ts",
96
+ "import": "./dist/identity/preview-cookie.js"
97
+ },
98
+ "./identity/browser-context": {
99
+ "types": "./dist/identity/browser-context.d.ts",
100
+ "import": "./dist/identity/browser-context.js"
101
+ },
102
+ "./identity": {
103
+ "types": "./dist/identity/index.d.ts",
104
+ "import": "./dist/identity/index.js"
105
+ },
106
+ "./provenance": {
107
+ "types": "./dist/provenance/index.d.ts",
108
+ "import": "./dist/provenance/index.js"
109
+ },
110
+ "./provenance/richtext-slice-embed-address": {
111
+ "types": "./dist/provenance/richtext-slice-embed-address.d.ts",
112
+ "import": "./dist/provenance/richtext-slice-embed-address.js"
113
+ },
114
+ "./authoring/runtime-contract": {
115
+ "types": "./dist/authoring/runtime-contract.d.ts",
116
+ "import": "./dist/authoring/runtime-contract.js"
117
+ },
118
+ "./page-presentation": {
119
+ "types": "./dist/page-presentation.d.ts",
120
+ "import": "./dist/page-presentation.js"
121
+ },
122
+ "./sdk-error-copy": {
123
+ "types": "./dist/sdk-error-copy.d.ts",
124
+ "import": "./dist/sdk-error-copy.js"
125
+ },
126
+ "./session-subscriber": {
127
+ "types": "./dist/session-subscriber.d.ts",
128
+ "import": "./dist/session-subscriber.js"
129
+ },
130
+ "./provenance/source-registry": {
131
+ "types": "./dist/provenance/source-registry.d.ts",
132
+ "import": "./dist/provenance/source-registry.js"
133
+ },
134
+ "./runtime/preview-transition-state": {
135
+ "types": "./dist/runtime/preview-transition-state.d.ts",
136
+ "import": "./dist/runtime/preview-transition-state.js"
137
+ },
138
+ "./runtime/preview-perspective-intent-state": {
139
+ "types": "./dist/runtime/preview-perspective-intent-state.d.ts",
140
+ "import": "./dist/runtime/preview-perspective-intent-state.js"
141
+ },
142
+ "./runtime/preview-perspective-alignment": {
143
+ "types": "./dist/runtime/preview-perspective-alignment.d.ts",
144
+ "import": "./dist/runtime/preview-perspective-alignment.js"
145
+ },
146
+ "./reveal-target": {
147
+ "types": "./dist/reveal-target.d.ts",
148
+ "import": "./dist/reveal-target.js"
149
+ },
150
+ "./framework/*": {
151
+ "types": "./dist/framework/*.d.ts",
152
+ "import": "./dist/framework/*.js"
153
+ },
154
+ "./routes": {
155
+ "types": "./dist/route-paths.d.ts",
156
+ "import": "./dist/route-paths.js"
157
+ },
158
+ "./server/*": {
159
+ "types": "./dist/server/*.d.ts",
160
+ "import": "./dist/server/*.js"
161
+ },
162
+ "./provenance/render-context": {
163
+ "types": "./dist/provenance/render-context.d.ts",
164
+ "import": "./dist/provenance/render-context.js"
165
+ },
166
+ "./provenance/slice-model": {
167
+ "types": "./dist/provenance/slice-model.d.ts",
168
+ "import": "./dist/provenance/slice-model.js"
169
+ }
170
+ },
171
+ "files": [
172
+ "dist",
173
+ "LICENSE",
174
+ "README.md",
175
+ "PUBLIC-API.md"
176
+ ],
177
+ "publishConfig": {
178
+ "access": "public",
179
+ "provenance": false,
180
+ "tag": "beta"
181
+ },
182
+ "dependencies": {
183
+ "convex": "1.42.3",
184
+ "@storystick/client": "0.2.0-rc.1",
185
+ "@storystick/transport-allowlist": "0.1.0-rc.1",
186
+ "@storystick/types": "0.1.0-rc.1"
187
+ },
188
+ "devDependencies": {
189
+ "fake-indexeddb": "^6.2.5",
190
+ "jsdom": "^29.0.2",
191
+ "typescript": "^5.8.2",
192
+ "vitest": "^3.1.1",
193
+ "@types/node": "^22.13.10"
194
+ },
195
+ "engines": {
196
+ "node": ">=24.19.0 <25"
197
+ },
198
+ "repository": {
199
+ "type": "git",
200
+ "url": "git+https://github.com/withstorystick/storystick.git",
201
+ "directory": "packages/preview"
202
+ },
203
+ "homepage": "https://storystick.app",
204
+ "bugs": {
205
+ "url": "https://storystick.app"
206
+ },
207
+ "scripts": {
208
+ "build": "node ../../scripts/package-dist.mjs clean && tsc && node ../../scripts/package-dist.mjs seal",
209
+ "test": "vitest run",
210
+ "test:dist-fresh": "node scripts/assert-dist-fresh.mjs",
211
+ "test:watch": "vitest"
212
+ }
6
213
  }