@sixb/core 0.2.2 → 0.2.4
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/dist/actions/index.js +56 -50
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run/executor.d.ts +0 -2
- package/dist/actions/run/executor.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +5 -1
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/agents/cancel.d.ts +1 -1
- package/dist/agents/cancel.d.ts.map +1 -1
- package/dist/agents/child-question.d.ts +35 -2
- package/dist/agents/child-question.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +3 -2
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/fork.d.ts.map +1 -1
- package/dist/agents/ids.d.ts +2 -0
- package/dist/agents/ids.d.ts.map +1 -1
- package/dist/agents/index.d.ts +4 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +91 -76
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/request.d.ts +7 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +73 -10
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-session-children.d.ts +9 -0
- package/dist/agents/run-session-children.d.ts.map +1 -1
- package/dist/agents/run-session-http.d.ts.map +1 -1
- package/dist/agents/run-session-serve.d.ts.map +1 -1
- package/dist/agents/run-session.d.ts +3 -0
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/streams/index.js +2 -2
- package/dist/agents/streams/internal.js +2 -2
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts +1 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/agents/tool-input-coercion.d.ts +20 -0
- package/dist/agents/tool-input-coercion.d.ts.map +1 -0
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/artifacts/access.d.ts +37 -17
- package/dist/artifacts/access.d.ts.map +1 -1
- package/dist/artifacts/canvas-display.d.ts +65 -0
- package/dist/artifacts/canvas-display.d.ts.map +1 -0
- package/dist/artifacts/canvas.d.ts +6 -1
- package/dist/artifacts/canvas.d.ts.map +1 -1
- package/dist/artifacts/comment-text.d.ts +19 -0
- package/dist/artifacts/comment-text.d.ts.map +1 -0
- package/dist/artifacts/comments.d.ts +52 -0
- package/dist/artifacts/comments.d.ts.map +1 -0
- package/dist/artifacts/errors.d.ts +3 -3
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/events.d.ts +14 -0
- package/dist/artifacts/events.d.ts.map +1 -0
- package/dist/artifacts/execution.d.ts +129 -22
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +12 -1
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/grants.d.ts +8 -5
- package/dist/artifacts/frames/grants.d.ts.map +1 -1
- package/dist/artifacts/frames/index.d.ts +1 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +32 -964
- package/dist/artifacts/frames/index.js.map +4 -8
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +129 -0
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/runtime.d.ts +24 -7
- package/dist/artifacts/frames/runtime.d.ts.map +1 -1
- package/dist/artifacts/holders.d.ts +23 -0
- package/dist/artifacts/holders.d.ts.map +1 -0
- package/dist/artifacts/ids.d.ts +2 -0
- package/dist/artifacts/ids.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +6 -4
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +134 -13
- package/dist/artifacts/index.js.map +5 -4
- package/dist/artifacts/limits.d.ts +24 -3
- package/dist/artifacts/limits.d.ts.map +1 -1
- package/dist/artifacts/live/board.d.ts +103 -0
- package/dist/artifacts/live/board.d.ts.map +1 -0
- package/dist/artifacts/live/diff.d.ts +43 -0
- package/dist/artifacts/live/diff.d.ts.map +1 -0
- package/dist/artifacts/live/document.d.ts +55 -0
- package/dist/artifacts/live/document.d.ts.map +1 -0
- package/dist/artifacts/live/files.d.ts +16 -0
- package/dist/artifacts/live/files.d.ts.map +1 -0
- package/dist/artifacts/live/index.d.ts +9 -0
- package/dist/artifacts/live/index.d.ts.map +1 -0
- package/dist/artifacts/live/index.js +593 -0
- package/dist/artifacts/live/index.js.map +10 -0
- package/dist/artifacts/live/presence.d.ts +55 -0
- package/dist/artifacts/live/presence.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.d.ts +109 -0
- package/dist/artifacts/live/protocol.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.js +21 -0
- package/dist/artifacts/live/protocol.js.map +9 -0
- package/dist/artifacts/live/server.d.ts +10 -0
- package/dist/artifacts/live/server.d.ts.map +1 -0
- package/dist/artifacts/live/server.js +86 -0
- package/dist/artifacts/live/server.js.map +9 -0
- package/dist/artifacts/live/state.d.ts +26 -0
- package/dist/artifacts/live/state.d.ts.map +1 -0
- package/dist/artifacts/outline.d.ts +11 -0
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/publish/index.d.ts +8 -1
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +62 -34
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/merge.d.ts +75 -0
- package/dist/artifacts/publish/merge.d.ts.map +1 -0
- package/dist/artifacts/publish/previews.d.ts +153 -0
- package/dist/artifacts/publish/previews.d.ts.map +1 -0
- package/dist/artifacts/publish/publish.d.ts +29 -8
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/query-answers.d.ts +20 -0
- package/dist/artifacts/publish/query-answers.d.ts.map +1 -0
- package/dist/artifacts/publish/references.d.ts +4 -3
- package/dist/artifacts/publish/references.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/canvas.d.ts.map +1 -1
- package/dist/artifacts/theme.d.ts +5 -1
- package/dist/artifacts/theme.d.ts.map +1 -1
- package/dist/auth/directory.d.ts +33 -0
- package/dist/auth/directory.d.ts.map +1 -0
- package/dist/auth/index.js +13 -12
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/member-events.d.ts +5 -1
- package/dist/auth/member-events.d.ts.map +1 -1
- package/dist/auth/runtime.d.ts +22 -1
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/strategy.d.ts +2 -2
- package/dist/auth/strategy.d.ts.map +1 -1
- package/dist/auth/types.d.ts +42 -1
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/authorization/decision.d.ts +6 -5
- package/dist/authorization/decision.d.ts.map +1 -1
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +7 -6
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/index.js +4 -4
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/bootstrap/index.js +63 -57
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/broker/in-memory.d.ts.map +1 -1
- package/dist/broker/index.js +1 -1
- package/dist/broker/types.d.ts +4 -0
- package/dist/broker/types.d.ts.map +1 -1
- package/dist/{chunk-s7j8ewqv.js → chunk-0k3r5kb3.js} +257 -43
- package/dist/{chunk-s7j8ewqv.js.map → chunk-0k3r5kb3.js.map} +14 -13
- package/dist/{chunk-e5wf5vz0.js → chunk-0kgrghqx.js} +13 -1
- package/dist/chunk-0kgrghqx.js.map +10 -0
- package/dist/{chunk-80gym75n.js → chunk-186k5yz3.js} +1 -1
- package/dist/chunk-191jz8a6.js +61 -0
- package/dist/chunk-191jz8a6.js.map +10 -0
- package/dist/{chunk-mmagke4x.js → chunk-22d3qg4x.js} +2 -2
- package/dist/{chunk-mmagke4x.js.map → chunk-22d3qg4x.js.map} +3 -3
- package/dist/{chunk-ga63a3dz.js → chunk-2bn6813a.js} +3 -3
- package/dist/chunk-2c4j899j.js.map +2 -2
- package/dist/{chunk-e6xgz4h4.js → chunk-3014rfjz.js} +197 -18
- package/dist/chunk-3014rfjz.js.map +21 -0
- package/dist/{chunk-ytzcxtpt.js → chunk-3ba89vm7.js} +1 -1
- package/dist/chunk-3hzhcfsv.js +139 -0
- package/dist/chunk-3hzhcfsv.js.map +10 -0
- package/dist/chunk-3sgvd10b.js +69 -0
- package/dist/chunk-3sgvd10b.js.map +10 -0
- package/dist/chunk-3z1vxzcm.js +234 -0
- package/dist/chunk-3z1vxzcm.js.map +12 -0
- package/dist/{chunk-djs3hw9p.js → chunk-3zagkr6w.js} +73 -6
- package/dist/chunk-3zagkr6w.js.map +21 -0
- package/dist/{chunk-wkq3kvzd.js → chunk-48c1z8nj.js} +6 -6
- package/dist/chunk-48c1z8nj.js.map +10 -0
- package/dist/{chunk-d04g36fw.js → chunk-5qqmndhm.js} +1 -1
- package/dist/{chunk-scyq22td.js → chunk-5rqqp8cr.js} +19 -4
- package/dist/chunk-5rqqp8cr.js.map +12 -0
- package/dist/chunk-6ef4esq4.js +225 -0
- package/dist/chunk-6ef4esq4.js.map +11 -0
- package/dist/{chunk-jspskey0.js → chunk-7j4yydm2.js} +67 -45
- package/dist/chunk-7j4yydm2.js.map +11 -0
- package/dist/chunk-7kpqntgw.js +70 -0
- package/dist/chunk-7kpqntgw.js.map +10 -0
- package/dist/{chunk-5wtnmpze.js → chunk-7qe46788.js} +1 -1
- package/dist/{chunk-31kcqmhf.js → chunk-855w9nvw.js} +1 -1
- package/dist/{chunk-e7v3trpz.js → chunk-8a8k38tz.js} +4 -3
- package/dist/chunk-8a8k38tz.js.map +10 -0
- package/dist/chunk-8bns0y68.js +1322 -0
- package/dist/chunk-8bns0y68.js.map +25 -0
- package/dist/{chunk-jftd33rc.js → chunk-8t2ynwg0.js} +105 -9
- package/dist/chunk-8t2ynwg0.js.map +11 -0
- package/dist/{chunk-9whfmsfk.js → chunk-8tqnsx3q.js} +1 -1
- package/dist/{chunk-s3we74h8.js → chunk-9nsjjd44.js} +38 -5
- package/dist/chunk-9nsjjd44.js.map +12 -0
- package/dist/{chunk-hz5d43gn.js → chunk-9vsc919v.js} +14 -6
- package/dist/chunk-9vsc919v.js.map +10 -0
- package/dist/{chunk-waqk73p1.js → chunk-a6fjkcne.js} +185 -341
- package/dist/{chunk-waqk73p1.js.map → chunk-a6fjkcne.js.map} +6 -7
- package/dist/chunk-az95tsh3.js.map +2 -2
- package/dist/{chunk-s038wa5v.js → chunk-b9qfh2ya.js} +1 -1
- package/dist/{chunk-5taem5aw.js → chunk-bc3y6gff.js} +13 -4
- package/dist/chunk-bc3y6gff.js.map +10 -0
- package/dist/chunk-bz5bnjjt.js +358 -0
- package/dist/chunk-bz5bnjjt.js.map +12 -0
- package/dist/{chunk-w976a4me.js → chunk-czct88ht.js} +28 -4
- package/dist/chunk-czct88ht.js.map +10 -0
- package/dist/{chunk-5kyvrtjh.js → chunk-d9xbwh3h.js} +131 -32
- package/dist/chunk-d9xbwh3h.js.map +13 -0
- package/dist/{chunk-kfee1h52.js → chunk-dfveegqq.js} +28 -8
- package/dist/chunk-dfveegqq.js.map +13 -0
- package/dist/{chunk-2g0r46hy.js → chunk-dhkc9b23.js} +15 -2
- package/dist/chunk-dhkc9b23.js.map +12 -0
- package/dist/chunk-dmnd9ea6.js +106 -0
- package/dist/chunk-dmnd9ea6.js.map +10 -0
- package/dist/{chunk-nz7815t3.js → chunk-e0hnbb1m.js} +27 -2
- package/dist/chunk-e0hnbb1m.js.map +14 -0
- package/dist/chunk-e91fmg6t.js +288 -0
- package/dist/chunk-e91fmg6t.js.map +11 -0
- package/dist/{chunk-3sqqhpr7.js → chunk-evj5jxz3.js} +134 -19
- package/dist/{chunk-3sqqhpr7.js.map → chunk-evj5jxz3.js.map} +11 -10
- package/dist/{chunk-w122ymx4.js → chunk-f6ahf5gf.js} +15 -4
- package/dist/{chunk-w122ymx4.js.map → chunk-f6ahf5gf.js.map} +3 -3
- package/dist/{chunk-jjmggm9a.js → chunk-fe6r7yhg.js} +1 -1
- package/dist/{chunk-165c9wm6.js → chunk-g2ph4873.js} +1 -1
- package/dist/{chunk-dsv783c3.js → chunk-gxwy4c3s.js} +203 -57
- package/dist/chunk-gxwy4c3s.js.map +47 -0
- package/dist/chunk-hgj98cbb.js +22 -0
- package/dist/chunk-hgj98cbb.js.map +10 -0
- package/dist/chunk-hn2r7z41.js.map +3 -3
- package/dist/chunk-hvbvq7p4.js +1553 -0
- package/dist/chunk-hvbvq7p4.js.map +18 -0
- package/dist/chunk-j0wgh8gv.js +250 -0
- package/dist/chunk-j0wgh8gv.js.map +10 -0
- package/dist/{chunk-z8fx5cgb.js → chunk-j2zm215x.js} +37 -3
- package/dist/chunk-j2zm215x.js.map +12 -0
- package/dist/{chunk-j1ny5fwh.js → chunk-k1g14kk3.js} +11 -83
- package/dist/{chunk-j1ny5fwh.js.map → chunk-k1g14kk3.js.map} +4 -5
- package/dist/chunk-kr6dx38r.js +25 -0
- package/dist/chunk-kr6dx38r.js.map +10 -0
- package/dist/chunk-m2jerfef.js +474 -0
- package/dist/chunk-m2jerfef.js.map +11 -0
- package/dist/{chunk-m2vh8gh0.js → chunk-msyevpp3.js} +62 -15
- package/dist/{chunk-m2vh8gh0.js.map → chunk-msyevpp3.js.map} +5 -5
- package/dist/{chunk-escedwyt.js → chunk-mvz89age.js} +6 -1
- package/dist/{chunk-escedwyt.js.map → chunk-mvz89age.js.map} +3 -3
- package/dist/chunk-mwcqz3e3.js +30 -0
- package/dist/chunk-mwcqz3e3.js.map +10 -0
- package/dist/chunk-n2ay51px.js +21 -0
- package/dist/chunk-n2ay51px.js.map +10 -0
- package/dist/chunk-n4zzaf6q.js.map +1 -1
- package/dist/{chunk-gkv8r794.js → chunk-n68vz95m.js} +5 -5
- package/dist/{chunk-gkv8r794.js.map → chunk-n68vz95m.js.map} +3 -3
- package/dist/{chunk-0j3crh1w.js → chunk-p351afzm.js} +14 -14
- package/dist/{chunk-0j3crh1w.js.map → chunk-p351afzm.js.map} +4 -4
- package/dist/{chunk-c7cfe31p.js → chunk-p8pgnq8d.js} +16 -16
- package/dist/{chunk-c7cfe31p.js.map → chunk-p8pgnq8d.js.map} +1 -1
- package/dist/chunk-pk539cwv.js +370 -0
- package/dist/chunk-pk539cwv.js.map +11 -0
- package/dist/{chunk-jbw70d6t.js → chunk-ppxf7gw2.js} +52 -10
- package/dist/chunk-ppxf7gw2.js.map +11 -0
- package/dist/{chunk-9x8dybsb.js → chunk-pvpq483h.js} +10 -2
- package/dist/chunk-pvpq483h.js.map +10 -0
- package/dist/{chunk-4zm1k3xj.js → chunk-r2psmn42.js} +1 -1
- package/dist/{chunk-a7aa0nzj.js → chunk-r9rtavg9.js} +14 -14
- package/dist/{chunk-a7aa0nzj.js.map → chunk-r9rtavg9.js.map} +1 -1
- package/dist/{chunk-w1btn96n.js → chunk-rsrc7vtw.js} +523 -254
- package/dist/chunk-rsrc7vtw.js.map +49 -0
- package/dist/{chunk-2ajw5rz0.js → chunk-rsxb14an.js} +3 -3
- package/dist/{chunk-kkjfve0t.js → chunk-rt9deb92.js} +4 -3
- package/dist/{chunk-kkjfve0t.js.map → chunk-rt9deb92.js.map} +3 -3
- package/dist/{chunk-r1cxq7vv.js → chunk-rtdrm592.js} +2 -2
- package/dist/{chunk-a5v4gjdx.js → chunk-rtm1jq00.js} +460 -227
- package/dist/{chunk-a5v4gjdx.js.map → chunk-rtm1jq00.js.map} +25 -22
- package/dist/{chunk-4bm0caep.js → chunk-smnt672s.js} +1 -1
- package/dist/{chunk-21q0j5f2.js → chunk-stmxh0hv.js} +2 -2
- package/dist/{chunk-nh26e7c5.js → chunk-sysnvjce.js} +5 -5
- package/dist/{chunk-nh26e7c5.js.map → chunk-sysnvjce.js.map} +3 -3
- package/dist/{chunk-7z5rkf0m.js → chunk-t0s7b3d1.js} +4 -3
- package/dist/{chunk-7z5rkf0m.js.map → chunk-t0s7b3d1.js.map} +3 -3
- package/dist/{chunk-57g0215c.js → chunk-t24yktqr.js} +296 -7
- package/dist/{chunk-57g0215c.js.map → chunk-t24yktqr.js.map} +6 -3
- package/dist/{chunk-mbc5hvnj.js → chunk-td26wjr5.js} +18 -7
- package/dist/{chunk-mbc5hvnj.js.map → chunk-td26wjr5.js.map} +3 -3
- package/dist/{chunk-ff5xkv0p.js → chunk-tfzvjdms.js} +1 -1
- package/dist/{chunk-f1h34y3r.js → chunk-vepea5c3.js} +6 -6
- package/dist/{chunk-f1h34y3r.js.map → chunk-vepea5c3.js.map} +1 -1
- package/dist/chunk-vtjzwymr.js +37 -0
- package/dist/chunk-vtjzwymr.js.map +10 -0
- package/dist/{chunk-twfreyxr.js → chunk-vzkxqf8h.js} +23 -13
- package/dist/{chunk-twfreyxr.js.map → chunk-vzkxqf8h.js.map} +6 -6
- package/dist/{chunk-eqgr6nsa.js → chunk-w1wq7gfr.js} +983 -185
- package/dist/chunk-w1wq7gfr.js.map +75 -0
- package/dist/{chunk-6b61s40c.js → chunk-w3t94hm6.js} +1 -1
- package/dist/{chunk-fwsvshr5.js → chunk-wa05txmk.js} +20 -7
- package/dist/{chunk-fwsvshr5.js.map → chunk-wa05txmk.js.map} +3 -3
- package/dist/chunk-whbwf3np.js +12 -0
- package/dist/chunk-whbwf3np.js.map +10 -0
- package/dist/{chunk-t5608tkq.js → chunk-yv8hv4wq.js} +3 -1
- package/dist/{chunk-t5608tkq.js.map → chunk-yv8hv4wq.js.map} +3 -3
- package/dist/{chunk-j8thxj7w.js → chunk-yy914zfr.js} +1218 -101
- package/dist/chunk-yy914zfr.js.map +30 -0
- package/dist/connectors/builders.d.ts +2 -2
- package/dist/connectors/builders.d.ts.map +1 -1
- package/dist/connectors/connections/access.d.ts +11 -0
- package/dist/connectors/connections/access.d.ts.map +1 -0
- package/dist/connectors/connections/contracts.d.ts +6 -1
- package/dist/connectors/connections/contracts.d.ts.map +1 -1
- package/dist/connectors/connections/internal.js +1 -1
- package/dist/connectors/connections/runs.d.ts +6 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/service.d.ts +25 -0
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/connections/views.d.ts +1 -1
- package/dist/connectors/connections/views.d.ts.map +1 -1
- package/dist/connectors/execution.d.ts.map +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/service.d.ts +3 -0
- package/dist/connectors/service.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +21 -2
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/execution.d.ts +12 -6
- package/dist/datasets/execution.d.ts.map +1 -1
- package/dist/datasets/ingest-flush-batch.d.ts +59 -0
- package/dist/datasets/ingest-flush-batch.d.ts.map +1 -0
- package/dist/datasets/ingest-flush-job.d.ts +33 -0
- package/dist/datasets/ingest-flush-job.d.ts.map +1 -0
- package/dist/datasets/ingest-flush.d.ts +66 -0
- package/dist/datasets/ingest-flush.d.ts.map +1 -0
- package/dist/datasets/produced-version.d.ts +21 -0
- package/dist/datasets/produced-version.d.ts.map +1 -0
- package/dist/datasets/write.d.ts +22 -1
- package/dist/datasets/write.d.ts.map +1 -1
- package/dist/datasets/write.js +8 -4
- package/dist/datasets/write.js.map +1 -1
- package/dist/deploy/internal.js +5 -4
- package/dist/deploy/internal.js.map +4 -4
- package/dist/deploy/types.d.ts +2 -3
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/error-reporting/capability.d.ts +8 -2
- package/dist/error-reporting/capability.d.ts.map +1 -1
- package/dist/error-reporting/internal.d.ts +1 -1
- package/dist/error-reporting/internal.d.ts.map +1 -1
- package/dist/error-reporting/internal.js +17 -5
- package/dist/error-reporting/internal.js.map +1 -1
- package/dist/error-reporting/reporter.d.ts.map +1 -1
- package/dist/error-reporting/reports.d.ts +55 -0
- package/dist/error-reporting/reports.d.ts.map +1 -1
- package/dist/error-reporting/types.d.ts +82 -1
- package/dist/error-reporting/types.d.ts.map +1 -1
- package/dist/errors/catalog.d.ts +5 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +1 -1
- package/dist/events/definitions.d.ts +4 -0
- package/dist/events/definitions.d.ts.map +1 -1
- package/dist/events/execution.d.ts +1 -0
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +5 -5
- package/dist/events/scope.d.ts.map +1 -1
- package/dist/events/scope.js +1 -1
- package/dist/events/selectors/index.js +2 -2
- package/dist/events/types/artifacts.d.ts +38 -0
- package/dist/events/types/artifacts.d.ts.map +1 -0
- package/dist/events/types/index.d.ts +3 -1
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/events/types/users.d.ts +5 -2
- package/dist/events/types/users.d.ts.map +1 -1
- package/dist/execution/agent.js +58 -52
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts +10 -0
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/object-reader-clearance.d.ts +6 -0
- package/dist/execution/object-reader-clearance.d.ts.map +1 -1
- package/dist/execution/object-reader-security.d.ts +9 -2
- package/dist/execution/object-reader-security.d.ts.map +1 -1
- package/dist/execution/primitive.js +56 -50
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +50 -44
- package/dist/execution/request.js.map +2 -2
- package/dist/http/api-routes.d.ts +1 -1
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -88
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/errors.d.ts +15 -0
- package/dist/lake-storage/errors.d.ts.map +1 -1
- package/dist/lake-storage/index.d.ts +3 -2
- package/dist/lake-storage/index.d.ts.map +1 -1
- package/dist/lake-storage/index.js +16 -10
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/lake-storage/maintenance.d.ts +88 -0
- package/dist/lake-storage/maintenance.d.ts.map +1 -0
- package/dist/lake-storage/merge.d.ts +3 -1
- package/dist/lake-storage/merge.d.ts.map +1 -1
- package/dist/lake-storage/source-ordering.d.ts +23 -0
- package/dist/lake-storage/source-ordering.d.ts.map +1 -1
- package/dist/lake-storage/types.d.ts +10 -0
- package/dist/lake-storage/types.d.ts.map +1 -1
- package/dist/maintenance/heartbeat.d.ts +5 -0
- package/dist/maintenance/heartbeat.d.ts.map +1 -0
- package/dist/maintenance/index.d.ts +4 -2
- package/dist/maintenance/index.d.ts.map +1 -1
- package/dist/maintenance/index.js +515 -0
- package/dist/maintenance/index.js.map +16 -0
- package/dist/maintenance/lake-retention-status.d.ts +36 -0
- package/dist/maintenance/lake-retention-status.d.ts.map +1 -0
- package/dist/maintenance/lake-retention.d.ts +84 -0
- package/dist/maintenance/lake-retention.d.ts.map +1 -0
- package/dist/maintenance/loop.d.ts +95 -0
- package/dist/maintenance/loop.d.ts.map +1 -0
- package/dist/maintenance/ontology-maintenance.d.ts +17 -16
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
- package/dist/maintenance/passes/cron-pass.d.ts +21 -0
- package/dist/maintenance/passes/cron-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/directory-pass.d.ts +12 -0
- package/dist/maintenance/passes/directory-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/ingest-pass.d.ts +26 -0
- package/dist/maintenance/passes/ingest-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/lake-change-feed.d.ts +38 -0
- package/dist/maintenance/passes/lake-change-feed.d.ts.map +1 -0
- package/dist/maintenance/passes/lake-retention-pass.d.ts +20 -0
- package/dist/maintenance/passes/lake-retention-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/ontology-pass.d.ts +8 -0
- package/dist/maintenance/passes/ontology-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/projections-pass.d.ts +26 -0
- package/dist/maintenance/passes/projections-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/recovery-pass.d.ts +6 -0
- package/dist/maintenance/passes/recovery-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/recovery-passes.d.ts +24 -0
- package/dist/maintenance/passes/recovery-passes.d.ts.map +1 -0
- package/dist/maintenance/passes/runs-pass.d.ts +6 -0
- package/dist/maintenance/passes/runs-pass.d.ts.map +1 -0
- package/dist/maintenance/passes/triggers-pass.d.ts +41 -0
- package/dist/maintenance/passes/triggers-pass.d.ts.map +1 -0
- package/dist/maintenance/status.d.ts +19 -0
- package/dist/maintenance/status.d.ts.map +1 -0
- package/dist/maintenance/types.d.ts +25 -24
- package/dist/maintenance/types.d.ts.map +1 -1
- package/dist/materialization/model.d.ts +11 -2
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/edits/artifact-refs.d.ts +33 -0
- package/dist/materializer/edits/artifact-refs.d.ts.map +1 -0
- package/dist/materializer/edits/commit.d.ts.map +1 -1
- package/dist/materializer/edits/operations.d.ts +7 -1
- package/dist/materializer/edits/operations.d.ts.map +1 -1
- package/dist/materializer/edits/plan.d.ts.map +1 -1
- package/dist/materializer/execution/work-records.d.ts +6 -0
- package/dist/materializer/execution/work-records.d.ts.map +1 -1
- package/dist/materializer/index.js +31 -28
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/materializer/telemetry/plan.d.ts.map +1 -1
- package/dist/models/execution/index.js +30 -27
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/language-model.d.ts +6 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/tools.d.ts +2 -0
- package/dist/models/tools.d.ts.map +1 -1
- package/dist/objects/artifact-refs.d.ts +5 -0
- package/dist/objects/artifact-refs.d.ts.map +1 -0
- package/dist/objects/index.js +59 -54
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/materializer-adapter.d.ts +4 -3
- package/dist/objects/materializer-adapter.d.ts.map +1 -1
- package/dist/objects/object/upsert-batch.d.ts.map +1 -1
- package/dist/objects/object/upsert.d.ts.map +1 -1
- package/dist/objects/query/index.js +29 -26
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/ir.d.ts +3 -1
- package/dist/objects/query/ir.d.ts.map +1 -1
- package/dist/objects/query/scalar-values.d.ts.map +1 -1
- package/dist/objects/runtime-batch.d.ts +2 -0
- package/dist/objects/runtime-batch.d.ts.map +1 -1
- package/dist/ontology/artifact-ref.d.ts +36 -0
- package/dist/ontology/artifact-ref.d.ts.map +1 -0
- package/dist/ontology/docs-markdown.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +3 -1
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +8 -5
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/inference/index.d.ts +2 -0
- package/dist/ontology/inference/index.d.ts.map +1 -1
- package/dist/ontology/internal.js +7 -6
- package/dist/ontology/internal.js.map +1 -1
- package/dist/ontology/json-schema.d.ts.map +1 -1
- package/dist/ontology/primitives.d.ts.map +1 -1
- package/dist/ontology/reference-values.d.ts +10 -0
- package/dist/ontology/reference-values.d.ts.map +1 -0
- package/dist/ontology/refs.d.ts +6 -1
- package/dist/ontology/refs.d.ts.map +1 -1
- package/dist/ontology/registry.d.ts +9 -1
- package/dist/ontology/registry.d.ts.map +1 -1
- package/dist/ontology/types.d.ts +2 -1
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/ontology/user-ref.d.ts +16 -0
- package/dist/ontology/user-ref.d.ts.map +1 -1
- package/dist/ontology/validation/normalize.d.ts.map +1 -1
- package/dist/ontology/validation/properties.d.ts.map +1 -1
- package/dist/ontology/validation/schema.d.ts.map +1 -1
- package/dist/pending-tasks.d.ts +17 -0
- package/dist/pending-tasks.d.ts.map +1 -0
- package/dist/pipelines/index.js +37 -34
- package/dist/pipelines/index.js.map +1 -1
- package/dist/pipelines/run-dispatch.d.ts +6 -0
- package/dist/pipelines/run-dispatch.d.ts.map +1 -1
- package/dist/predicates/types.d.ts +4 -0
- package/dist/predicates/types.d.ts.map +1 -1
- package/dist/projections/builders.d.ts +13 -11
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/internal.js +30 -27
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/types.d.ts +1 -1
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts +2 -2
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/queues/in-memory.d.ts +6 -1
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +55 -2
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/create.d.ts +3 -0
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +22 -5
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +6 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +52 -31
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/sixb.d.ts +6 -1
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/index.js +8 -7
- package/dist/sandboxes/index.js.map +1 -1
- package/dist/scheduler/index.d.ts +0 -2
- package/dist/scheduler/index.d.ts.map +1 -1
- package/dist/scheduler/index.js +3 -6
- package/dist/scheduler/index.js.map +1 -1
- package/dist/schedules/index.js +9 -11
- package/dist/schedules/index.js.map +1 -1
- package/dist/security/internal.js +1 -1
- package/dist/shared/backoff.d.ts +12 -0
- package/dist/shared/backoff.d.ts.map +1 -0
- package/dist/shared/duration.d.ts +3 -0
- package/dist/shared/duration.d.ts.map +1 -0
- package/dist/shared/params/artifact-refs.d.ts +19 -0
- package/dist/shared/params/artifact-refs.d.ts.map +1 -0
- package/dist/shares/guest-name.d.ts +8 -0
- package/dist/shares/guest-name.d.ts.map +1 -0
- package/dist/shares/internal.d.ts +1 -0
- package/dist/shares/internal.d.ts.map +1 -1
- package/dist/shares/internal.js +69 -28
- package/dist/shares/internal.js.map +3 -3
- package/dist/shares/session-protocol.d.ts +13 -0
- package/dist/shares/session-protocol.d.ts.map +1 -1
- package/dist/storage/action-runs/failure.js +2 -2
- package/dist/storage/agents/provider.js +1 -1
- package/dist/storage/agents/types.d.ts +1 -1
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +2 -2
- package/dist/storage/artifacts/errors.d.ts +9 -4
- package/dist/storage/artifacts/errors.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +27 -4
- package/dist/storage/artifacts/in-memory.d.ts.map +1 -1
- package/dist/storage/artifacts/index.d.ts +1 -1
- package/dist/storage/artifacts/index.d.ts.map +1 -1
- package/dist/storage/artifacts/record.d.ts +39 -2
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +328 -39
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts +2 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/identities.d.ts +4 -0
- package/dist/storage/auth/in-memory/identities.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/shared.d.ts +3 -1
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/users.d.ts.map +1 -1
- package/dist/storage/auth/index.d.ts +1 -1
- package/dist/storage/auth/index.d.ts.map +1 -1
- package/dist/storage/auth/types.d.ts +39 -0
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts +1 -1
- package/dist/storage/connector-connections/in-memory.d.ts.map +1 -1
- package/dist/storage/connector-connections/index.d.ts +1 -1
- package/dist/storage/connector-connections/index.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/runs.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider/shared.d.ts +12 -2
- package/dist/storage/connector-connections/provider/shared.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.d.ts +1 -0
- package/dist/storage/connector-connections/provider.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +21 -5
- package/dist/storage/connector-connections/provider.js.map +5 -5
- package/dist/storage/connector-connections/types.d.ts +1 -1
- package/dist/storage/connector-connections/types.d.ts.map +1 -1
- package/dist/storage/dataset-ingest/codec.d.ts +6 -0
- package/dist/storage/dataset-ingest/codec.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/in-memory.d.ts +28 -0
- package/dist/storage/dataset-ingest/in-memory.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/index.d.ts +4 -0
- package/dist/storage/dataset-ingest/index.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/provider.d.ts +157 -0
- package/dist/storage/dataset-ingest/provider.d.ts.map +1 -0
- package/dist/storage/dataset-ingest/provider.js +17 -0
- package/dist/storage/dataset-ingest/provider.js.map +9 -0
- package/dist/storage/dataset-ingest/types.d.ts +188 -0
- package/dist/storage/dataset-ingest/types.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/provider.js +12 -11
- package/dist/storage/file-upload-sessions/provider.js.map +1 -1
- package/dist/storage/in-memory/index.d.ts +12 -0
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +18 -11
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +56 -46
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +4 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +81 -5
- package/dist/storage/internal.js.map +4 -3
- package/dist/storage/lake-retention-runs/in-memory.d.ts +11 -0
- package/dist/storage/lake-retention-runs/in-memory.d.ts.map +1 -0
- package/dist/storage/lake-retention-runs/index.d.ts +3 -0
- package/dist/storage/lake-retention-runs/index.d.ts.map +1 -0
- package/dist/storage/lake-retention-runs/types.d.ts +21 -0
- package/dist/storage/lake-retention-runs/types.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/in-memory.d.ts +11 -0
- package/dist/storage/maintenance-heartbeats/in-memory.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/index.d.ts +3 -0
- package/dist/storage/maintenance-heartbeats/index.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/record.d.ts +11 -0
- package/dist/storage/maintenance-heartbeats/record.d.ts.map +1 -0
- package/dist/storage/maintenance-heartbeats/types.d.ts +30 -0
- package/dist/storage/maintenance-heartbeats/types.d.ts.map +1 -0
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/objects/in-memory/storage.d.ts +15 -1
- package/dist/storage/objects/in-memory/storage.d.ts.map +1 -1
- package/dist/storage/objects/read-scope.d.ts.map +1 -1
- package/dist/storage/objects/types.d.ts +18 -1
- package/dist/storage/objects/types.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts.map +1 -1
- package/dist/storage/ontology/index.d.ts +1 -1
- package/dist/storage/ontology/index.d.ts.map +1 -1
- package/dist/storage/ontology/materializations.d.ts +20 -0
- package/dist/storage/ontology/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/provider-work.d.ts +7 -1
- package/dist/storage/ontology/provider-work.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +1 -1
- package/dist/storage/pipeline-runs/in-memory.d.ts +8 -2
- package/dist/storage/pipeline-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/index.d.ts +1 -1
- package/dist/storage/pipeline-runs/index.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/provider.js +1 -1
- package/dist/storage/pipeline-runs/transitions.d.ts +2 -2
- package/dist/storage/pipeline-runs/transitions.d.ts.map +1 -1
- package/dist/storage/pipeline-runs/types.d.ts +26 -6
- package/dist/storage/pipeline-runs/types.d.ts.map +1 -1
- package/dist/storage/projection-runs/errors.d.ts +6 -0
- package/dist/storage/projection-runs/errors.d.ts.map +1 -1
- package/dist/storage/projection-runs/in-memory.d.ts +5 -1
- package/dist/storage/projection-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/projection-runs/index.d.ts +2 -2
- package/dist/storage/projection-runs/index.d.ts.map +1 -1
- package/dist/storage/projection-runs/lifecycle.d.ts +1 -0
- package/dist/storage/projection-runs/lifecycle.d.ts.map +1 -1
- package/dist/storage/projection-runs/provider.js +2 -2
- package/dist/storage/projection-runs/types.d.ts +16 -0
- package/dist/storage/projection-runs/types.d.ts.map +1 -1
- package/dist/storage/run-claim.d.ts +132 -0
- package/dist/storage/run-claim.d.ts.map +1 -0
- package/dist/storage/share-grants/provider.js +3 -3
- package/dist/storage/share-sessions/in-memory.d.ts +2 -1
- package/dist/storage/share-sessions/in-memory.d.ts.map +1 -1
- package/dist/storage/share-sessions/index.d.ts +1 -1
- package/dist/storage/share-sessions/index.d.ts.map +1 -1
- package/dist/storage/share-sessions/provider.d.ts +1 -1
- package/dist/storage/share-sessions/provider.d.ts.map +1 -1
- package/dist/storage/share-sessions/provider.js +4 -2
- package/dist/storage/share-sessions/provider.js.map +1 -1
- package/dist/storage/share-sessions/record.d.ts +2 -1
- package/dist/storage/share-sessions/record.d.ts.map +1 -1
- package/dist/storage/share-sessions/types.d.ts +17 -1
- package/dist/storage/share-sessions/types.d.ts.map +1 -1
- package/dist/storage/sync-runs/in-memory.d.ts +10 -2
- package/dist/storage/sync-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/sync-runs/index.d.ts +1 -1
- package/dist/storage/sync-runs/index.d.ts.map +1 -1
- package/dist/storage/sync-runs/transitions.d.ts +2 -2
- package/dist/storage/sync-runs/transitions.d.ts.map +1 -1
- package/dist/storage/sync-runs/types.d.ts +29 -3
- package/dist/storage/sync-runs/types.d.ts.map +1 -1
- package/dist/storage/types.d.ts +12 -6
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/webhook-runs/in-memory.d.ts +2 -1
- package/dist/storage/webhook-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/webhook-runs/index.d.ts +2 -2
- package/dist/storage/webhook-runs/index.d.ts.map +1 -1
- package/dist/storage/webhook-runs/types.d.ts +33 -2
- package/dist/storage/webhook-runs/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/in-memory.d.ts +6 -3
- package/dist/storage/workflow-runs/in-memory.d.ts.map +1 -1
- package/dist/storage/workflow-runs/index.d.ts +1 -1
- package/dist/storage/workflow-runs/index.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +12 -11
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/storage/workflow-runs/types.d.ts +11 -28
- package/dist/storage/workflow-runs/types.d.ts.map +1 -1
- package/dist/syncs/index.js +38 -35
- package/dist/syncs/index.js.map +1 -1
- package/dist/syncs/run-dispatch.d.ts +2 -0
- package/dist/syncs/run-dispatch.d.ts.map +1 -1
- package/dist/testing/ai-model-call-groups-contract.d.ts.map +1 -1
- package/dist/testing/artifact-holders-contract.d.ts +15 -0
- package/dist/testing/artifact-holders-contract.d.ts.map +1 -0
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/broker-contract.d.ts.map +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts +1 -1
- package/dist/testing/connector-connection-storage-contract.d.ts.map +1 -1
- package/dist/testing/dataset-ingest-storage-contract.d.ts +11 -0
- package/dist/testing/dataset-ingest-storage-contract.d.ts.map +1 -0
- package/dist/testing/dataset-sequence-contract.d.ts +1 -1
- package/dist/testing/dataset-sequence-contract.d.ts.map +1 -1
- package/dist/testing/execution.d.ts.map +1 -1
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6245 -3192
- package/dist/testing/index.js.map +28 -19
- package/dist/testing/lake-retention-run-storage-contract.d.ts +9 -0
- package/dist/testing/lake-retention-run-storage-contract.d.ts.map +1 -0
- package/dist/testing/maintenance-heartbeat-storage-contract.d.ts +9 -0
- package/dist/testing/maintenance-heartbeat-storage-contract.d.ts.map +1 -0
- package/dist/testing/object-query-contract.d.ts.map +1 -1
- package/dist/testing/pipeline-execution.d.ts.map +1 -1
- package/dist/testing/pipeline-run-read-contract.d.ts +13 -0
- package/dist/testing/pipeline-run-read-contract.d.ts.map +1 -0
- package/dist/testing/projection-run-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/testing/run-claim-storage-contract.d.ts +12 -0
- package/dist/testing/run-claim-storage-contract.d.ts.map +1 -0
- package/dist/testing/run-claim.d.ts +30 -0
- package/dist/testing/run-claim.d.ts.map +1 -0
- package/dist/testing/run-recovery-contract.d.ts +49 -0
- package/dist/testing/run-recovery-contract.d.ts.map +1 -0
- package/dist/testing/share-session-storage-contract.d.ts.map +1 -1
- package/dist/testing/stored-artifacts.d.ts +10 -0
- package/dist/testing/stored-artifacts.d.ts.map +1 -0
- package/dist/testing/sync-execution.d.ts.map +1 -1
- package/dist/testing/webhook-execution.d.ts +1 -1
- package/dist/testing/webhook-execution.d.ts.map +1 -1
- package/dist/testing/webhook-run-storage-contract.d.ts.map +1 -1
- package/dist/users/execution.d.ts +18 -1
- package/dist/users/execution.d.ts.map +1 -1
- package/dist/users/index.d.ts +1 -1
- package/dist/users/index.d.ts.map +1 -1
- package/dist/webhooks/delivery-lease.d.ts +13 -0
- package/dist/webhooks/delivery-lease.d.ts.map +1 -0
- package/dist/webhooks/internal.d.ts +2 -0
- package/dist/webhooks/internal.d.ts.map +1 -1
- package/dist/webhooks/internal.js +68 -36
- package/dist/webhooks/internal.js.map +5 -4
- package/dist/webhooks/run-admission.d.ts.map +1 -1
- package/dist/workers/index.d.ts +5 -1
- package/dist/workers/index.d.ts.map +1 -1
- package/dist/workers/index.js +193 -58
- package/dist/workers/index.js.map +8 -7
- package/dist/workers/job-ids.d.ts +17 -0
- package/dist/workers/job-ids.d.ts.map +1 -0
- package/dist/workers/lost-projection-runs.d.ts +26 -0
- package/dist/workers/lost-projection-runs.d.ts.map +1 -0
- package/dist/workers/lost-runs.d.ts +51 -0
- package/dist/workers/lost-runs.d.ts.map +1 -0
- package/dist/workers/queue-delivery.d.ts.map +1 -1
- package/dist/workers/queue-worker.d.ts +1 -2
- package/dist/workers/queue-worker.d.ts.map +1 -1
- package/dist/workers/queued-run-dispatch.d.ts +90 -0
- package/dist/workers/queued-run-dispatch.d.ts.map +1 -0
- package/dist/workers/run-lease.d.ts +25 -0
- package/dist/workers/run-lease.d.ts.map +1 -0
- package/dist/workers/run-worker.d.ts +95 -0
- package/dist/workers/run-worker.d.ts.map +1 -0
- package/dist/workflows/index.js +64 -58
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/request.d.ts.map +1 -1
- package/dist/workflows/run-dispatch.d.ts +6 -1
- package/dist/workflows/run-dispatch.d.ts.map +1 -1
- package/package.json +41 -3
- package/src/actions/request.ts +24 -7
- package/src/actions/run/executor.ts +9 -42
- package/src/actions/types/context.ts +8 -3
- package/src/agents/approval-outcome.ts +2 -2
- package/src/agents/cancel.ts +2 -2
- package/src/agents/child-question.ts +76 -8
- package/src/agents/execution.ts +11 -3
- package/src/agents/fork.ts +12 -4
- package/src/agents/ids.ts +4 -1
- package/src/agents/index.ts +16 -3
- package/src/agents/model-loop.ts +3 -1
- package/src/agents/request.ts +42 -31
- package/src/agents/run-artifacts.ts +290 -46
- package/src/agents/run-session-children.ts +33 -0
- package/src/agents/run-session-http.ts +5 -0
- package/src/agents/run-session-serve.ts +11 -0
- package/src/agents/run-session.ts +8 -1
- package/src/agents/streams/protocol.ts +5 -10
- package/src/agents/tool-files.ts +1 -1
- package/src/agents/tool-input-coercion.ts +140 -0
- package/src/agents/validation.ts +12 -1
- package/src/artifacts/access.ts +71 -28
- package/src/artifacts/canvas-display.ts +160 -0
- package/src/artifacts/canvas.ts +26 -1
- package/src/artifacts/comment-text.ts +32 -0
- package/src/artifacts/comments.ts +275 -0
- package/src/artifacts/errors.ts +6 -1
- package/src/artifacts/events.ts +58 -0
- package/src/artifacts/execution.ts +496 -53
- package/src/artifacts/frames/assets.ts +20 -1
- package/src/artifacts/frames/grants.ts +31 -10
- package/src/artifacts/frames/index.ts +2 -0
- package/src/artifacts/frames/kit.ts +8 -5
- package/src/artifacts/frames/protocol.ts +231 -0
- package/src/artifacts/frames/runtime.ts +600 -29
- package/src/artifacts/holders.ts +120 -0
- package/src/artifacts/ids.ts +8 -0
- package/src/artifacts/index.ts +31 -2
- package/src/artifacts/limits.ts +28 -4
- package/src/artifacts/live/board.ts +759 -0
- package/src/artifacts/live/diff.ts +297 -0
- package/src/artifacts/live/document.ts +354 -0
- package/src/artifacts/live/files.ts +82 -0
- package/src/artifacts/live/index.ts +50 -0
- package/src/artifacts/live/presence.ts +144 -0
- package/src/artifacts/live/protocol.ts +134 -0
- package/src/artifacts/live/server.ts +16 -0
- package/src/artifacts/live/state.ts +115 -0
- package/src/artifacts/outline.ts +12 -0
- package/src/artifacts/publish/index.ts +26 -1
- package/src/artifacts/publish/merge.ts +271 -0
- package/src/artifacts/publish/previews.ts +485 -0
- package/src/artifacts/publish/publish.ts +92 -39
- package/src/artifacts/publish/query-answers.ts +85 -0
- package/src/artifacts/publish/references.ts +10 -4
- package/src/artifacts/publish/validate/canvas.ts +133 -1
- package/src/artifacts/theme.ts +9 -1
- package/src/auth/directory.ts +166 -0
- package/src/auth/member-events.ts +10 -3
- package/src/auth/runtime.ts +108 -8
- package/src/auth/strategy.ts +3 -1
- package/src/auth/types.ts +44 -0
- package/src/authorization/decision.ts +6 -5
- package/src/authorization/event-visibility.ts +4 -0
- package/src/broker/in-memory.ts +33 -6
- package/src/broker/types.ts +4 -0
- package/src/connectors/builders.ts +34 -2
- package/src/connectors/connections/access.ts +83 -0
- package/src/connectors/connections/contracts.ts +6 -1
- package/src/connectors/connections/execution.ts +2 -2
- package/src/connectors/connections/runs.ts +51 -2
- package/src/connectors/connections/service.ts +208 -41
- package/src/connectors/connections/views.ts +11 -4
- package/src/connectors/execution.ts +27 -3
- package/src/connectors/index.ts +2 -0
- package/src/connectors/service.ts +12 -0
- package/src/connectors/types.ts +37 -2
- package/src/datasets/execution.ts +74 -37
- package/src/datasets/ingest-flush-batch.ts +289 -0
- package/src/datasets/ingest-flush-job.ts +112 -0
- package/src/datasets/ingest-flush.ts +377 -0
- package/src/datasets/produced-version.ts +55 -0
- package/src/datasets/write.ts +65 -11
- package/src/deploy/services.ts +1 -1
- package/src/deploy/types.ts +2 -3
- package/src/deploy/validation.ts +1 -0
- package/src/error-reporting/capability.ts +66 -0
- package/src/error-reporting/internal.ts +12 -0
- package/src/error-reporting/reporter.ts +11 -35
- package/src/error-reporting/reports.ts +167 -0
- package/src/error-reporting/types.ts +99 -0
- package/src/errors/catalog.ts +6 -0
- package/src/events/definitions.ts +14 -0
- package/src/events/execution.ts +77 -28
- package/src/events/index.ts +3 -0
- package/src/events/scope.ts +2 -0
- package/src/events/types/artifacts.ts +40 -0
- package/src/events/types/index.ts +3 -0
- package/src/events/types/users.ts +5 -2
- package/src/execution/authorized-object-reader.ts +34 -0
- package/src/execution/object-reader-clearance.ts +31 -0
- package/src/execution/object-reader-security.ts +33 -13
- package/src/http/api-routes.ts +106 -5
- package/src/index.ts +22 -4
- package/src/lake-storage/errors.ts +21 -0
- package/src/lake-storage/index.ts +9 -1
- package/src/lake-storage/maintenance.ts +93 -0
- package/src/lake-storage/merge.ts +3 -1
- package/src/lake-storage/source-ordering.ts +28 -2
- package/src/lake-storage/types.ts +14 -0
- package/src/maintenance/heartbeat.ts +14 -0
- package/src/maintenance/index.ts +5 -3
- package/src/maintenance/lake-retention-status.ts +81 -0
- package/src/maintenance/lake-retention.ts +347 -0
- package/src/maintenance/loop.ts +365 -0
- package/src/maintenance/ontology-maintenance.ts +76 -229
- package/src/maintenance/passes/cron-pass.ts +217 -0
- package/src/maintenance/passes/directory-pass.ts +22 -0
- package/src/maintenance/passes/ingest-pass.ts +94 -0
- package/src/maintenance/passes/lake-change-feed.ts +112 -0
- package/src/maintenance/passes/lake-retention-pass.ts +71 -0
- package/src/maintenance/passes/ontology-pass.ts +19 -0
- package/src/maintenance/passes/projections-pass.ts +238 -0
- package/src/maintenance/passes/recovery-pass.ts +17 -0
- package/src/maintenance/passes/recovery-passes.ts +39 -0
- package/src/maintenance/passes/runs-pass.ts +12 -0
- package/src/maintenance/passes/triggers-pass.ts +332 -0
- package/src/maintenance/status.ts +75 -0
- package/src/maintenance/types.ts +27 -25
- package/src/materialization/model.ts +33 -21
- package/src/materializer/README.md +13 -2
- package/src/materializer/edits/artifact-refs.ts +140 -0
- package/src/materializer/edits/commit.ts +20 -7
- package/src/materializer/edits/operations.ts +23 -7
- package/src/materializer/edits/plan.ts +2 -0
- package/src/materializer/execution/work-records.ts +61 -0
- package/src/materializer/projections/replacement-plan.ts +2 -0
- package/src/materializer/shared/normalize.ts +14 -0
- package/src/materializer/telemetry/plan.ts +2 -0
- package/src/models/language-model.ts +6 -0
- package/src/models/tools.ts +2 -0
- package/src/objects/artifact-refs.ts +34 -0
- package/src/objects/materializer-adapter.ts +8 -3
- package/src/objects/object/upsert-batch.ts +7 -0
- package/src/objects/object/upsert.ts +11 -2
- package/src/objects/query/ir.ts +2 -0
- package/src/objects/query/scalar-values.ts +5 -3
- package/src/objects/runtime-batch.ts +8 -1
- package/src/objects/vectors/README.md +4 -4
- package/src/ontology/artifact-ref.ts +83 -0
- package/src/ontology/docs-markdown.ts +17 -0
- package/src/ontology/index.ts +3 -1
- package/src/ontology/inference/index.ts +2 -0
- package/src/ontology/json-schema.ts +13 -0
- package/src/ontology/primitives.ts +14 -0
- package/src/ontology/reference-values.ts +62 -0
- package/src/ontology/refs.ts +7 -1
- package/src/ontology/registry.ts +26 -1
- package/src/ontology/types.ts +2 -0
- package/src/ontology/user-ref.ts +35 -45
- package/src/ontology/validation/normalize.ts +13 -0
- package/src/ontology/validation/properties.ts +9 -0
- package/src/ontology/validation/schema.ts +12 -0
- package/src/pending-tasks.ts +51 -0
- package/src/pipelines/run-dispatch.ts +120 -238
- package/src/predicates/types.ts +2 -1
- package/src/projections/builders.ts +28 -13
- package/src/projections/run-dispatch.ts +1 -1
- package/src/projections/types.ts +1 -1
- package/src/projections/validation.ts +22 -8
- package/src/queues/in-memory.ts +50 -3
- package/src/queues/index.ts +4 -0
- package/src/queues/types.ts +68 -1
- package/src/runtime/create.ts +4 -0
- package/src/runtime/host.ts +118 -13
- package/src/runtime/index.ts +0 -1
- package/src/runtime/internal.ts +13 -0
- package/src/runtime/ontology-mutations.ts +1 -1
- package/src/runtime/sixb.ts +14 -5
- package/src/scheduler/index.ts +0 -2
- package/src/shared/backoff.ts +34 -0
- package/src/shared/duration.ts +15 -0
- package/src/shared/params/artifact-refs.ts +42 -0
- package/src/shares/compiler.ts +1 -1
- package/src/shares/guest-name.ts +20 -0
- package/src/shares/internal.ts +1 -0
- package/src/shares/session-protocol.ts +63 -0
- package/src/storage/agents/types.ts +1 -1
- package/src/storage/artifacts/errors.ts +10 -2
- package/src/storage/artifacts/in-memory.ts +579 -96
- package/src/storage/artifacts/index.ts +22 -1
- package/src/storage/artifacts/record.ts +255 -11
- package/src/storage/artifacts/types.ts +343 -40
- package/src/storage/auth/in-memory/auth-storage.ts +42 -5
- package/src/storage/auth/in-memory/identities.ts +16 -0
- package/src/storage/auth/in-memory/shared.ts +15 -0
- package/src/storage/auth/in-memory/users.ts +17 -16
- package/src/storage/auth/index.ts +3 -0
- package/src/storage/auth/types.ts +38 -0
- package/src/storage/connector-connections/in-memory.ts +4 -1
- package/src/storage/connector-connections/index.ts +1 -0
- package/src/storage/connector-connections/provider/runs.ts +3 -0
- package/src/storage/connector-connections/provider/shared.ts +30 -0
- package/src/storage/connector-connections/provider.ts +4 -0
- package/src/storage/connector-connections/types.ts +1 -0
- package/src/storage/dataset-ingest/codec.ts +90 -0
- package/src/storage/dataset-ingest/in-memory.ts +277 -0
- package/src/storage/dataset-ingest/index.ts +16 -0
- package/src/storage/dataset-ingest/provider.ts +592 -0
- package/src/storage/dataset-ingest/types.ts +191 -0
- package/src/storage/in-memory/index.ts +33 -0
- package/src/storage/index.ts +65 -5
- package/src/storage/internal.ts +20 -0
- package/src/storage/lake-retention-runs/in-memory.ts +22 -0
- package/src/storage/lake-retention-runs/index.ts +2 -0
- package/src/storage/lake-retention-runs/types.ts +19 -0
- package/src/storage/maintenance-heartbeats/in-memory.ts +24 -0
- package/src/storage/maintenance-heartbeats/index.ts +7 -0
- package/src/storage/maintenance-heartbeats/record.ts +50 -0
- package/src/storage/maintenance-heartbeats/types.ts +30 -0
- package/src/storage/objects/in-memory/query.ts +1 -0
- package/src/storage/objects/in-memory/storage.ts +81 -0
- package/src/storage/objects/read-scope.ts +1 -0
- package/src/storage/objects/types.ts +16 -1
- package/src/storage/ontology/in-memory/materializations.ts +8 -0
- package/src/storage/ontology/in-memory/replacement-plans.ts +4 -1
- package/src/storage/ontology/index.ts +2 -0
- package/src/storage/ontology/materializations.ts +18 -0
- package/src/storage/ontology/provider-work.ts +39 -0
- package/src/storage/pipeline-runs/in-memory.ts +97 -24
- package/src/storage/pipeline-runs/index.ts +0 -1
- package/src/storage/pipeline-runs/provider.ts +1 -1
- package/src/storage/pipeline-runs/transitions.ts +7 -4
- package/src/storage/pipeline-runs/types.ts +33 -7
- package/src/storage/projection-runs/errors.ts +10 -0
- package/src/storage/projection-runs/in-memory.ts +56 -1
- package/src/storage/projection-runs/index.ts +2 -1
- package/src/storage/projection-runs/lifecycle.ts +9 -1
- package/src/storage/projection-runs/types.ts +20 -1
- package/src/storage/run-claim.ts +224 -0
- package/src/storage/share-sessions/in-memory.ts +21 -0
- package/src/storage/share-sessions/index.ts +1 -0
- package/src/storage/share-sessions/provider.ts +1 -0
- package/src/storage/share-sessions/record.ts +28 -0
- package/src/storage/share-sessions/types.ts +19 -1
- package/src/storage/sync-runs/in-memory.ts +109 -29
- package/src/storage/sync-runs/index.ts +1 -1
- package/src/storage/sync-runs/transitions.ts +7 -4
- package/src/storage/sync-runs/types.ts +36 -3
- package/src/storage/types.ts +15 -5
- package/src/storage/webhook-runs/in-memory.ts +26 -2
- package/src/storage/webhook-runs/index.ts +3 -1
- package/src/storage/webhook-runs/types.ts +44 -3
- package/src/storage/workflow-runs/in-memory.ts +50 -36
- package/src/storage/workflow-runs/index.ts +0 -2
- package/src/storage/workflow-runs/types.ts +18 -30
- package/src/syncs/run-dispatch.ts +118 -239
- package/src/testing/ai-model-call-groups-contract.ts +2 -1
- package/src/testing/artifact-holders-contract.ts +392 -0
- package/src/testing/artifact-storage-contract.ts +1205 -151
- package/src/testing/auth-storage-contract.ts +228 -1
- package/src/testing/broker-contract.ts +56 -0
- package/src/testing/connector-connection-storage-contract.ts +94 -5
- package/src/testing/dataset-ingest-storage-contract.ts +480 -0
- package/src/testing/dataset-sequence-contract.ts +97 -12
- package/src/testing/execution.ts +23 -0
- package/src/testing/index.ts +31 -0
- package/src/testing/lake-retention-run-storage-contract.ts +75 -0
- package/src/testing/maintenance-heartbeat-storage-contract.ts +99 -0
- package/src/testing/object-query-contract.ts +93 -0
- package/src/testing/pipeline-execution.ts +3 -1
- package/src/testing/pipeline-run-read-contract.ts +123 -0
- package/src/testing/projection-run-storage-contract.ts +113 -0
- package/src/testing/queues-contract.ts +112 -0
- package/src/testing/run-claim-storage-contract.ts +736 -0
- package/src/testing/run-claim.ts +69 -0
- package/src/testing/run-recovery-contract.ts +176 -0
- package/src/testing/share-session-storage-contract.ts +43 -0
- package/src/testing/stored-artifacts.ts +43 -0
- package/src/testing/sync-execution.ts +3 -1
- package/src/testing/webhook-execution.ts +7 -2
- package/src/testing/webhook-run-storage-contract.ts +102 -5
- package/src/users/execution.ts +50 -2
- package/src/users/index.ts +1 -0
- package/src/webhooks/delivery-lease.ts +40 -0
- package/src/webhooks/internal.ts +2 -0
- package/src/webhooks/run-admission.ts +22 -9
- package/src/workers/README.md +169 -0
- package/src/workers/index.ts +9 -1
- package/src/workers/job-ids.ts +31 -0
- package/src/workers/lost-projection-runs.ts +114 -0
- package/src/workers/lost-runs.ts +397 -0
- package/src/workers/queue-delivery.ts +2 -14
- package/src/workers/queue-worker.ts +9 -17
- package/src/workers/queued-run-dispatch.ts +308 -0
- package/src/workers/run-lease.ts +46 -0
- package/src/workers/run-worker.ts +312 -0
- package/src/workers/worker.ts +4 -17
- package/src/workflows/request.ts +2 -0
- package/src/workflows/run-dispatch.ts +22 -4
- package/src/workflows/snapshot.ts +1 -0
- package/dist/chunk-2g0r46hy.js.map +0 -12
- package/dist/chunk-3fqxbn31.js +0 -107
- package/dist/chunk-3fqxbn31.js.map +0 -11
- package/dist/chunk-4s753g3k.js +0 -314
- package/dist/chunk-4s753g3k.js.map +0 -12
- package/dist/chunk-5kyvrtjh.js.map +0 -12
- package/dist/chunk-5taem5aw.js.map +0 -10
- package/dist/chunk-65abf64x.js +0 -13
- package/dist/chunk-65abf64x.js.map +0 -10
- package/dist/chunk-9x8dybsb.js.map +0 -10
- package/dist/chunk-az47zep4.js +0 -41
- package/dist/chunk-az47zep4.js.map +0 -10
- package/dist/chunk-c706qvyc.js +0 -299
- package/dist/chunk-c706qvyc.js.map +0 -11
- package/dist/chunk-djs3hw9p.js.map +0 -20
- package/dist/chunk-dsv783c3.js.map +0 -47
- package/dist/chunk-e5wf5vz0.js.map +0 -10
- package/dist/chunk-e6xgz4h4.js.map +0 -21
- package/dist/chunk-e7v3trpz.js.map +0 -10
- package/dist/chunk-eqgr6nsa.js.map +0 -72
- package/dist/chunk-fb3feg1e.js +0 -298
- package/dist/chunk-fb3feg1e.js.map +0 -12
- package/dist/chunk-hz5d43gn.js.map +0 -10
- package/dist/chunk-j8thxj7w.js.map +0 -22
- package/dist/chunk-jbw70d6t.js.map +0 -10
- package/dist/chunk-jftd33rc.js.map +0 -11
- package/dist/chunk-jspskey0.js.map +0 -10
- package/dist/chunk-kfee1h52.js.map +0 -13
- package/dist/chunk-kwfhd1g0.js +0 -144
- package/dist/chunk-kwfhd1g0.js.map +0 -13
- package/dist/chunk-nz7815t3.js.map +0 -14
- package/dist/chunk-s3we74h8.js.map +0 -12
- package/dist/chunk-scyq22td.js.map +0 -12
- package/dist/chunk-w1btn96n.js.map +0 -44
- package/dist/chunk-w976a4me.js.map +0 -10
- package/dist/chunk-wkq3kvzd.js.map +0 -10
- package/dist/chunk-wrjx1fqz.js +0 -587
- package/dist/chunk-wrjx1fqz.js.map +0 -18
- package/dist/chunk-yw9pyg66.js +0 -143
- package/dist/chunk-yw9pyg66.js.map +0 -11
- package/dist/chunk-z8fx5cgb.js.map +0 -11
- package/dist/scheduler/runtime.d.ts +0 -40
- package/dist/scheduler/runtime.d.ts.map +0 -1
- package/dist/workers/unstarted-run.d.ts +0 -10
- package/dist/workers/unstarted-run.d.ts.map +0 -1
- package/src/scheduler/runtime.ts +0 -214
- package/src/workers/unstarted-run.ts +0 -18
- /package/dist/{chunk-80gym75n.js.map → chunk-186k5yz3.js.map} +0 -0
- /package/dist/{chunk-ga63a3dz.js.map → chunk-2bn6813a.js.map} +0 -0
- /package/dist/{chunk-ytzcxtpt.js.map → chunk-3ba89vm7.js.map} +0 -0
- /package/dist/{chunk-d04g36fw.js.map → chunk-5qqmndhm.js.map} +0 -0
- /package/dist/{chunk-5wtnmpze.js.map → chunk-7qe46788.js.map} +0 -0
- /package/dist/{chunk-31kcqmhf.js.map → chunk-855w9nvw.js.map} +0 -0
- /package/dist/{chunk-9whfmsfk.js.map → chunk-8tqnsx3q.js.map} +0 -0
- /package/dist/{chunk-s038wa5v.js.map → chunk-b9qfh2ya.js.map} +0 -0
- /package/dist/{chunk-jjmggm9a.js.map → chunk-fe6r7yhg.js.map} +0 -0
- /package/dist/{chunk-165c9wm6.js.map → chunk-g2ph4873.js.map} +0 -0
- /package/dist/{chunk-4zm1k3xj.js.map → chunk-r2psmn42.js.map} +0 -0
- /package/dist/{chunk-2ajw5rz0.js.map → chunk-rsxb14an.js.map} +0 -0
- /package/dist/{chunk-r1cxq7vv.js.map → chunk-rtdrm592.js.map} +0 -0
- /package/dist/{chunk-4bm0caep.js.map → chunk-smnt672s.js.map} +0 -0
- /package/dist/{chunk-21q0j5f2.js.map → chunk-stmxh0hv.js.map} +0 -0
- /package/dist/{chunk-ff5xkv0p.js.map → chunk-tfzvjdms.js.map} +0 -0
- /package/dist/{chunk-6b61s40c.js.map → chunk-w3t94hm6.js.map} +0 -0
|
@@ -0,0 +1,1553 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
isValidFileRef
|
|
4
|
+
} from "./chunk-wkv3h3q7.js";
|
|
5
|
+
import {
|
|
6
|
+
ARTIFACT_LIMITS2
|
|
7
|
+
} from "./chunk-9vsc919v.js";
|
|
8
|
+
import {
|
|
9
|
+
statFileRef2
|
|
10
|
+
} from "./chunk-a3faa34j.js";
|
|
11
|
+
import {
|
|
12
|
+
isArtifactAddress2,
|
|
13
|
+
parseArtifactAddress2
|
|
14
|
+
} from "./chunk-bz5bnjjt.js";
|
|
15
|
+
|
|
16
|
+
// src/artifacts/errors.ts
|
|
17
|
+
class ArtifactRequestError2 extends Error {
|
|
18
|
+
code;
|
|
19
|
+
latest;
|
|
20
|
+
name = "ArtifactRequestError";
|
|
21
|
+
constructor(code, message, latest) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.code = code;
|
|
24
|
+
this.latest = latest;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// src/artifacts/publish/files.ts
|
|
29
|
+
async function checkArtifactFiles(blobStorage, files) {
|
|
30
|
+
if (files.length === 0)
|
|
31
|
+
throw invalidArtifact("A version needs at least one file.");
|
|
32
|
+
if (files.length > ARTIFACT_LIMITS2.maxFiles) {
|
|
33
|
+
throw invalidArtifact(`A version holds at most ${ARTIFACT_LIMITS2.maxFiles} files; this one has ${files.length}.`);
|
|
34
|
+
}
|
|
35
|
+
const paths = new Set;
|
|
36
|
+
let totalBytes = 0;
|
|
37
|
+
for (const entry of files) {
|
|
38
|
+
if (!isArtifactPath(entry.path)) {
|
|
39
|
+
throw invalidArtifact(`'${entry.path}' is not a usable file path: use a relative path with / separators, no . or .. segments, and at most ${ARTIFACT_LIMITS2.maxPathLength} characters.`);
|
|
40
|
+
}
|
|
41
|
+
if (paths.has(entry.path))
|
|
42
|
+
throw invalidArtifact(`'${entry.path}' appears twice.`);
|
|
43
|
+
paths.add(entry.path);
|
|
44
|
+
if (!isValidFileRef(entry.file)) {
|
|
45
|
+
throw invalidArtifact(`'${entry.path}' does not have a valid file reference.`);
|
|
46
|
+
}
|
|
47
|
+
if (entry.file.sizeBytes > ARTIFACT_LIMITS2.maxFileBytes) {
|
|
48
|
+
throw invalidArtifact(`'${entry.path}' is ${entry.file.sizeBytes} bytes; a file may be at most ${ARTIFACT_LIMITS2.maxFileBytes}.`);
|
|
49
|
+
}
|
|
50
|
+
totalBytes += entry.file.sizeBytes;
|
|
51
|
+
}
|
|
52
|
+
if (totalBytes > ARTIFACT_LIMITS2.maxVersionBytes) {
|
|
53
|
+
throw invalidArtifact(`The files total ${totalBytes} bytes; a version may hold at most ${ARTIFACT_LIMITS2.maxVersionBytes}.`);
|
|
54
|
+
}
|
|
55
|
+
const stored = await Promise.all(files.map((entry) => statFileRef2(blobStorage, entry.file)));
|
|
56
|
+
const missing = files.find((_, index) => !stored[index]);
|
|
57
|
+
if (missing)
|
|
58
|
+
throw invalidArtifact(`'${missing.path}' refers to a file that is not stored.`);
|
|
59
|
+
}
|
|
60
|
+
async function readArtifactText(blobStorage, file, maxBytes) {
|
|
61
|
+
if (file.file.sizeBytes > maxBytes) {
|
|
62
|
+
throw invalidArtifact(`'${file.path}' is ${file.file.sizeBytes} bytes; it may be at most ${maxBytes}.`);
|
|
63
|
+
}
|
|
64
|
+
const text = await new Response(await blobStorage.open(file.file.blobId)).text();
|
|
65
|
+
return text.charCodeAt(0) === 65279 ? text.slice(1) : text;
|
|
66
|
+
}
|
|
67
|
+
function isArtifactPath(path) {
|
|
68
|
+
return typeof path === "string" && path.length > 0 && path.length <= ARTIFACT_LIMITS2.maxPathLength && !path.startsWith("/") && !path.includes("\\") && !/[\u0000-\u001f\u007f]/.test(path) && path.split("/").every((segment) => segment.length > 0 && segment !== "." && segment !== "..");
|
|
69
|
+
}
|
|
70
|
+
function invalidArtifact(message) {
|
|
71
|
+
return new ArtifactRequestError2("invalid_artifact", `[Sixb] ${message}`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// src/artifacts/html.ts
|
|
75
|
+
var NAMED_ENTITIES = {
|
|
76
|
+
amp: "&",
|
|
77
|
+
lt: "<",
|
|
78
|
+
gt: ">",
|
|
79
|
+
quot: '"',
|
|
80
|
+
apos: "'",
|
|
81
|
+
nbsp: String.fromCharCode(160)
|
|
82
|
+
};
|
|
83
|
+
function decodeHtmlEntities(value) {
|
|
84
|
+
return value.replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi, (match, entity) => {
|
|
85
|
+
if (entity[0] !== "#")
|
|
86
|
+
return NAMED_ENTITIES[entity.toLowerCase()] ?? match;
|
|
87
|
+
const codePoint = entity[1]?.toLowerCase() === "x" ? Number.parseInt(entity.slice(2), 16) : Number(entity.slice(1));
|
|
88
|
+
return Number.isInteger(codePoint) && codePoint >= 0 && codePoint <= 1114111 ? String.fromCodePoint(codePoint) : match;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// src/artifacts/publish/validate/html.ts
|
|
93
|
+
var HTML_ENTRY2 = "index.html";
|
|
94
|
+
var FRAME_ASSET_PREFIX = "__sixb/";
|
|
95
|
+
function refuseFrameAssetPaths(files, what) {
|
|
96
|
+
const reserved = files.find((file) => file.path.startsWith(FRAME_ASSET_PREFIX));
|
|
97
|
+
if (reserved) {
|
|
98
|
+
throw invalidArtifact(`'${reserved.path}' is under ${FRAME_ASSET_PREFIX}, where Sixb serves ${what}'s kit and runtime: move it.`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function readHtmlReferences(rewriter, at, file = HTML_ENTRY2) {
|
|
102
|
+
const references = [];
|
|
103
|
+
let refused;
|
|
104
|
+
rewriter.on("a[href]", {
|
|
105
|
+
element(element) {
|
|
106
|
+
const href = decodeHtmlEntities(element.getAttribute("href") ?? "");
|
|
107
|
+
if (isArtifactAddress2(href)) {
|
|
108
|
+
references.push({ address: href.trim(), as: "link", at: at() });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}).on("img[src]", {
|
|
112
|
+
element(element) {
|
|
113
|
+
const source = decodeHtmlEntities(element.getAttribute("src") ?? "").trim();
|
|
114
|
+
if (!isArtifactAddress2(source))
|
|
115
|
+
return;
|
|
116
|
+
if (!parseArtifactAddress2(source)?.path) {
|
|
117
|
+
refused ??= `An <img> shows a file from another artifact, and '${source}' names none: show a chart, a range, a section, or a slide with <sixb-embed src="${source}"></sixb-embed>.`;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
references.push({ address: source, as: "embed", at: at() });
|
|
121
|
+
}
|
|
122
|
+
}).on("sixb-embed", {
|
|
123
|
+
element(element) {
|
|
124
|
+
const source = decodeHtmlEntities(element.getAttribute("src") ?? "").trim();
|
|
125
|
+
if (!isArtifactAddress2(source)) {
|
|
126
|
+
refused ??= `<sixb-embed> shows another artifact: give it src="artifact:\u2026", such as artifact:art_k3m9q2x7tp#chart=revenue.`;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
references.push({ address: source, as: "embed", at: at() });
|
|
130
|
+
}
|
|
131
|
+
}).on("iframe[src], object[data], embed[src]", {
|
|
132
|
+
element(element) {
|
|
133
|
+
const source = decodeHtmlEntities(element.getAttribute("src") ?? element.getAttribute("data") ?? "").trim();
|
|
134
|
+
if (isArtifactAddress2(source)) {
|
|
135
|
+
refused ??= `${file} frames '${source}': show another artifact with <sixb-embed src="${source}"></sixb-embed>, or a file of one with <img>.`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
return { references, refusal: () => refused };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// src/artifacts/frames/kit.ts
|
|
143
|
+
var FONTS = {
|
|
144
|
+
"--font-sans": '"SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif',
|
|
145
|
+
"--font-serif": 'ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
|
|
146
|
+
"--font-mono": '"SF Mono", "Geist Mono", "JetBrains Mono", ui-monospace, monospace'
|
|
147
|
+
};
|
|
148
|
+
var FRAME_DEFAULT_THEMES2 = {
|
|
149
|
+
light: {
|
|
150
|
+
dark: false,
|
|
151
|
+
tokens: {
|
|
152
|
+
"--background": "#fafafa",
|
|
153
|
+
"--foreground": "#101010",
|
|
154
|
+
"--card": "#ffffff",
|
|
155
|
+
"--card-foreground": "#101010",
|
|
156
|
+
"--muted": "#f4f4f4",
|
|
157
|
+
"--muted-foreground": "#5f5f5f",
|
|
158
|
+
"--primary": "#0a0a0a",
|
|
159
|
+
"--primary-foreground": "#ffffff",
|
|
160
|
+
"--accent": "#f0f0f0",
|
|
161
|
+
"--accent-foreground": "#202020",
|
|
162
|
+
"--border": "#e2e2e2",
|
|
163
|
+
"--chart-1": "#101010",
|
|
164
|
+
"--chart-2": "#404040",
|
|
165
|
+
"--chart-3": "#737373",
|
|
166
|
+
"--chart-4": "#a3a3a3",
|
|
167
|
+
"--chart-5": "#d4d4d4",
|
|
168
|
+
...FONTS,
|
|
169
|
+
"--radius": "0.5rem"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
dark: {
|
|
173
|
+
dark: true,
|
|
174
|
+
tokens: {
|
|
175
|
+
"--background": "#0a0a0a",
|
|
176
|
+
"--foreground": "#f4f4f4",
|
|
177
|
+
"--card": "#141414",
|
|
178
|
+
"--card-foreground": "#f4f4f4",
|
|
179
|
+
"--muted": "#1c1c1c",
|
|
180
|
+
"--muted-foreground": "#8a8a8a",
|
|
181
|
+
"--primary": "#f4f4f4",
|
|
182
|
+
"--primary-foreground": "#0a0a0a",
|
|
183
|
+
"--accent": "#1c1c1c",
|
|
184
|
+
"--accent-foreground": "#f4f4f4",
|
|
185
|
+
"--border": "#262626",
|
|
186
|
+
"--chart-1": "#f4f4f4",
|
|
187
|
+
"--chart-2": "#c4c4c4",
|
|
188
|
+
"--chart-3": "#8a8a8a",
|
|
189
|
+
"--chart-4": "#5f5f5f",
|
|
190
|
+
"--chart-5": "#404040",
|
|
191
|
+
...FONTS,
|
|
192
|
+
"--radius": "0.5rem"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
var LIGHT = FRAME_DEFAULT_THEMES2.light.tokens;
|
|
197
|
+
function kit(rules) {
|
|
198
|
+
return `
|
|
199
|
+
@layer sixb-kit, sixb-theme;
|
|
200
|
+
|
|
201
|
+
@layer sixb-kit {
|
|
202
|
+
:root {
|
|
203
|
+
${Object.entries(LIGHT).map(([name, value]) => ` ${name}: ${value};`).join(`
|
|
204
|
+
`)}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
208
|
+
html, body { margin: 0; padding: 0; }
|
|
209
|
+
body {
|
|
210
|
+
color: var(--foreground);
|
|
211
|
+
font-family: var(--font-sans);
|
|
212
|
+
-webkit-font-smoothing: antialiased;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
${rules}}
|
|
216
|
+
`;
|
|
217
|
+
}
|
|
218
|
+
var FRAME_DECK_CSS = kit(` :root {
|
|
219
|
+
--sixb-scale: 1;
|
|
220
|
+
--sixb-overview-scale: 0.25;
|
|
221
|
+
--sixb-columns: 4;
|
|
222
|
+
--sixb-stage: ${LIGHT["--muted"]};
|
|
223
|
+
--sixb-stage-border: ${LIGHT["--border"]};
|
|
224
|
+
--sixb-stage-foreground: ${LIGHT["--foreground"]};
|
|
225
|
+
}
|
|
226
|
+
body { background: var(--muted); }
|
|
227
|
+
|
|
228
|
+
/*
|
|
229
|
+
* The stage: a slide's size and scale, which slides show, and the stage around them, in the
|
|
230
|
+
* app's colors (--sixb-stage and its kin, which only the app's theme sets). A deck's own CSS, unlayered,
|
|
231
|
+
* wins over everything else in the kit, so these alone are important: an important declaration
|
|
232
|
+
* in a layer wins over every unlayered one, a deck's own important ones included. Otherwise a
|
|
233
|
+
* deck that sets display on its closing slide shows it under every other, and one that sets its
|
|
234
|
+
* body's background repaints the stage.
|
|
235
|
+
*/
|
|
236
|
+
html.sixb-deck section.slide { width: 1280px !important; height: 720px !important; flex: none !important; }
|
|
237
|
+
|
|
238
|
+
/* One slide at a time, scaled to fit and centered on the stage. */
|
|
239
|
+
html.sixb-deck:not([data-mode="overview"]),
|
|
240
|
+
html.sixb-deck:not([data-mode="overview"]) body { height: 100% !important; overflow: hidden !important; }
|
|
241
|
+
html.sixb-deck:not([data-mode="overview"]) body {
|
|
242
|
+
margin: 0 !important;
|
|
243
|
+
padding: 0 !important;
|
|
244
|
+
display: grid !important;
|
|
245
|
+
place-items: center !important;
|
|
246
|
+
background: var(--sixb-stage) !important;
|
|
247
|
+
}
|
|
248
|
+
html.sixb-deck:not([data-mode="overview"]) section.slide { zoom: var(--sixb-scale) !important; }
|
|
249
|
+
html.sixb-deck:not([data-mode="overview"]) section.slide:not([data-current]) { display: none !important; }
|
|
250
|
+
html.sixb-deck[data-mode="slide"] section.slide {
|
|
251
|
+
border-radius: calc(10px / var(--sixb-scale)) !important;
|
|
252
|
+
box-shadow: 0 0 0 calc(1px / var(--sixb-scale)) var(--sixb-stage-border) !important;
|
|
253
|
+
}
|
|
254
|
+
/* Filled, the slide is the whole frame, as a thumbnail or an embed shows it; presented, it
|
|
255
|
+
fills the page on black. */
|
|
256
|
+
html.sixb-deck:is([data-mode="fill"], [data-mode="present"]) section.slide {
|
|
257
|
+
border-radius: 0 !important;
|
|
258
|
+
box-shadow: none !important;
|
|
259
|
+
}
|
|
260
|
+
html.sixb-deck[data-mode="present"] body { background: #000 !important; }
|
|
261
|
+
|
|
262
|
+
/* Every slide in a grid. */
|
|
263
|
+
html.sixb-deck[data-mode="overview"],
|
|
264
|
+
html.sixb-deck[data-mode="overview"] body { height: 100% !important; overflow: auto !important; }
|
|
265
|
+
html.sixb-deck[data-mode="overview"] body {
|
|
266
|
+
margin: 0 !important;
|
|
267
|
+
display: grid !important;
|
|
268
|
+
grid-template-columns: repeat(var(--sixb-columns), max-content) !important;
|
|
269
|
+
justify-content: center !important;
|
|
270
|
+
align-content: start !important;
|
|
271
|
+
gap: 16px !important;
|
|
272
|
+
padding: 16px !important;
|
|
273
|
+
background: var(--sixb-stage) !important;
|
|
274
|
+
}
|
|
275
|
+
html.sixb-deck[data-mode="overview"] section.slide {
|
|
276
|
+
zoom: var(--sixb-overview-scale) !important;
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
border-radius: calc(6px / var(--sixb-overview-scale)) !important;
|
|
279
|
+
box-shadow: 0 0 0 calc(1px / var(--sixb-overview-scale)) var(--sixb-stage-border) !important;
|
|
280
|
+
}
|
|
281
|
+
html.sixb-deck[data-mode="overview"] section.slide[data-current] {
|
|
282
|
+
box-shadow: 0 0 0 calc(1px / var(--sixb-overview-scale)) var(--sixb-stage-foreground) !important;
|
|
283
|
+
outline: calc(2px / var(--sixb-overview-scale)) solid var(--sixb-stage-foreground) !important;
|
|
284
|
+
outline-offset: calc(2px / var(--sixb-overview-scale)) !important;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/*
|
|
288
|
+
* A slide: 1280\xD7720. Its footer, a rule with the source and the slide's number, sits in the
|
|
289
|
+
* bottom padding, so content never runs into it.
|
|
290
|
+
*/
|
|
291
|
+
section.slide {
|
|
292
|
+
position: relative;
|
|
293
|
+
display: flex;
|
|
294
|
+
flex-direction: column;
|
|
295
|
+
gap: 28px;
|
|
296
|
+
width: 1280px;
|
|
297
|
+
height: 720px;
|
|
298
|
+
flex: none;
|
|
299
|
+
padding: 72px 96px 140px;
|
|
300
|
+
overflow: hidden;
|
|
301
|
+
background: var(--background);
|
|
302
|
+
color: var(--foreground);
|
|
303
|
+
font-size: 28px;
|
|
304
|
+
line-height: 1.4;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* Type: nothing on a slide is smaller than 18px. */
|
|
308
|
+
section.slide :is(h1, h2, h3) { margin: 0; text-wrap: balance; }
|
|
309
|
+
section.slide h1 { font-size: 72px; line-height: 1; font-weight: 650; letter-spacing: -0.035em; }
|
|
310
|
+
section.slide h2 { max-width: 1000px; font-size: 46px; line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; }
|
|
311
|
+
section.slide h3 { font-size: 30px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
|
|
312
|
+
section.slide p { margin: 0; max-width: 34em; }
|
|
313
|
+
section.slide :is(ul, ol) {
|
|
314
|
+
margin: 0;
|
|
315
|
+
padding-left: 30px;
|
|
316
|
+
display: flex;
|
|
317
|
+
flex-direction: column;
|
|
318
|
+
gap: 22px;
|
|
319
|
+
font-size: 30px;
|
|
320
|
+
line-height: 1.35;
|
|
321
|
+
letter-spacing: -0.01em;
|
|
322
|
+
}
|
|
323
|
+
section.slide li { padding-left: 6px; }
|
|
324
|
+
section.slide li::marker { color: var(--muted-foreground); }
|
|
325
|
+
section.slide strong { font-weight: 600; }
|
|
326
|
+
section.slide a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 5px; }
|
|
327
|
+
section.slide small, section.slide .note { font-size: 20px; color: var(--muted-foreground); }
|
|
328
|
+
section.slide img, section.slide svg, section.slide video { max-width: 100%; max-height: 100%; }
|
|
329
|
+
/* A figure's default 40px margins would squeeze a chart and its labels below the type floor. */
|
|
330
|
+
section.slide figure { margin: 0; }
|
|
331
|
+
section.slide code { font-family: var(--font-mono); font-size: 0.85em; }
|
|
332
|
+
|
|
333
|
+
/* Chrome: a label above the heading (two spans sit at either end), and the footer. */
|
|
334
|
+
section.slide .eyebrow {
|
|
335
|
+
display: flex;
|
|
336
|
+
justify-content: space-between;
|
|
337
|
+
gap: 24px;
|
|
338
|
+
margin: 0;
|
|
339
|
+
max-width: none;
|
|
340
|
+
font-size: 20px;
|
|
341
|
+
line-height: 1.3;
|
|
342
|
+
letter-spacing: 0.01em;
|
|
343
|
+
color: var(--muted-foreground);
|
|
344
|
+
}
|
|
345
|
+
section.slide .eyebrow + :is(h1, h2) { margin-top: -12px; }
|
|
346
|
+
section.slide::after {
|
|
347
|
+
content: attr(data-number);
|
|
348
|
+
position: absolute;
|
|
349
|
+
left: 96px;
|
|
350
|
+
right: 96px;
|
|
351
|
+
bottom: 64px;
|
|
352
|
+
padding-top: 22px;
|
|
353
|
+
border-top: 1px solid var(--border);
|
|
354
|
+
text-align: right;
|
|
355
|
+
font-size: 18px;
|
|
356
|
+
line-height: 1.4;
|
|
357
|
+
font-variant-numeric: tabular-nums;
|
|
358
|
+
color: var(--muted-foreground);
|
|
359
|
+
}
|
|
360
|
+
section.slide.no-number::after { content: ""; }
|
|
361
|
+
section.slide.no-number:not(:has(.source))::after { display: none; }
|
|
362
|
+
section.slide .source {
|
|
363
|
+
position: absolute;
|
|
364
|
+
left: 96px;
|
|
365
|
+
right: calc(96px + 3em);
|
|
366
|
+
bottom: 64px;
|
|
367
|
+
z-index: 1;
|
|
368
|
+
max-width: none;
|
|
369
|
+
overflow: hidden;
|
|
370
|
+
white-space: nowrap;
|
|
371
|
+
text-overflow: ellipsis;
|
|
372
|
+
font-size: 18px;
|
|
373
|
+
line-height: 1.4;
|
|
374
|
+
font-variant-numeric: tabular-nums;
|
|
375
|
+
color: var(--muted-foreground);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/* Layouts. */
|
|
379
|
+
section.slide.title > .eyebrow { margin-bottom: auto; }
|
|
380
|
+
section.slide.title h1 { margin-top: 0; font-size: 132px; line-height: 0.92; letter-spacing: -0.04em; max-width: 9em; }
|
|
381
|
+
section.slide.title > p:not(.eyebrow, .source) { font-size: 36px; line-height: 1.25; letter-spacing: -0.01em; color: var(--muted-foreground); max-width: 24em; text-wrap: balance; }
|
|
382
|
+
|
|
383
|
+
section.slide.section { justify-content: flex-end; }
|
|
384
|
+
section.slide.section h2 { font-size: 72px; line-height: 1; letter-spacing: -0.035em; max-width: 13em; }
|
|
385
|
+
|
|
386
|
+
section.slide.split {
|
|
387
|
+
display: grid;
|
|
388
|
+
grid-template-columns: 5fr 6fr;
|
|
389
|
+
grid-template-rows: auto 1fr;
|
|
390
|
+
column-gap: 80px;
|
|
391
|
+
row-gap: 28px;
|
|
392
|
+
}
|
|
393
|
+
section.slide.split:has(> .eyebrow) { grid-template-rows: auto auto 1fr; }
|
|
394
|
+
section.slide.split > :is(h1, h2, .eyebrow) { grid-column: 1 / -1; }
|
|
395
|
+
section.slide.split > * { min-width: 0; min-height: 0; }
|
|
396
|
+
section.slide.split > :not(h1, h2, .eyebrow) { align-self: center; }
|
|
397
|
+
|
|
398
|
+
section.slide.stat > .value { margin-top: auto; }
|
|
399
|
+
section.slide.stat .value {
|
|
400
|
+
font-size: 144px;
|
|
401
|
+
line-height: 0.9;
|
|
402
|
+
font-weight: 600;
|
|
403
|
+
letter-spacing: -0.045em;
|
|
404
|
+
font-variant-numeric: tabular-nums;
|
|
405
|
+
color: var(--primary);
|
|
406
|
+
}
|
|
407
|
+
section.slide.stat .label { font-size: 26px; line-height: 1.35; color: var(--muted-foreground); }
|
|
408
|
+
section.slide.stat .stats {
|
|
409
|
+
margin-top: auto;
|
|
410
|
+
display: grid;
|
|
411
|
+
grid-auto-flow: column;
|
|
412
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
413
|
+
gap: 64px;
|
|
414
|
+
padding-bottom: 16px;
|
|
415
|
+
}
|
|
416
|
+
section.slide.stat .stats > * {
|
|
417
|
+
display: flex;
|
|
418
|
+
flex-direction: column;
|
|
419
|
+
gap: 14px;
|
|
420
|
+
padding-top: 28px;
|
|
421
|
+
border-top: 2px solid var(--foreground);
|
|
422
|
+
}
|
|
423
|
+
section.slide.stat .stats:has(> :nth-child(3)) .value { font-size: 96px; }
|
|
424
|
+
section.slide.stat .stats:has(> :nth-child(4)) .value { font-size: 80px; }
|
|
425
|
+
|
|
426
|
+
section.slide.quote { justify-content: center; }
|
|
427
|
+
section.slide.quote blockquote {
|
|
428
|
+
margin: 0;
|
|
429
|
+
font-family: var(--font-serif);
|
|
430
|
+
font-size: 52px;
|
|
431
|
+
line-height: 1.2;
|
|
432
|
+
letter-spacing: -0.01em;
|
|
433
|
+
max-width: 22em;
|
|
434
|
+
text-wrap: balance;
|
|
435
|
+
}
|
|
436
|
+
section.slide.quote cite { font-style: normal; font-size: 24px; color: var(--muted-foreground); }
|
|
437
|
+
|
|
438
|
+
section.slide.image > :is(img, figure) { flex: 1; min-height: 0; margin: 0; object-fit: contain; }
|
|
439
|
+
section.slide.image.bleed { padding: 0; }
|
|
440
|
+
section.slide.image.bleed > img { width: 100%; height: 100%; object-fit: cover; }
|
|
441
|
+
section.slide.image.bleed::after, section.slide.image.bleed .source { display: none; }
|
|
442
|
+
|
|
443
|
+
section.slide.chart > :is(figure, svg, img, .chart) { flex: 1; min-height: 0; margin: 0; }
|
|
444
|
+
section.slide.chart figure { display: flex; flex-direction: column; gap: 20px; }
|
|
445
|
+
section.slide.chart figure > :is(svg, img) { flex: 1; min-height: 0; width: 100%; }
|
|
446
|
+
section.slide figcaption { font-size: 20px; color: var(--muted-foreground); }
|
|
447
|
+
|
|
448
|
+
section.slide.table table { width: 100%; border-collapse: collapse; font-size: 26px; font-variant-numeric: tabular-nums; }
|
|
449
|
+
section.slide.table :is(th, td) { padding: 14px 16px; border-bottom: 1px solid var(--border); text-align: left; }
|
|
450
|
+
section.slide.table :is(th, td):first-child { padding-left: 0; }
|
|
451
|
+
section.slide.table :is(th, td):last-child { padding-right: 0; }
|
|
452
|
+
section.slide.table th { font-size: 20px; font-weight: 500; color: var(--muted-foreground); }
|
|
453
|
+
section.slide.table :is(th, td).num, section.slide.table :is(th, td)[data-numeric] { text-align: right; }
|
|
454
|
+
|
|
455
|
+
/*
|
|
456
|
+
* Another artifact on the slide: the app draws it over this box, sized by the deck's CSS like
|
|
457
|
+
* any block. Until it does, and in a thumbnail, the box shows where it goes.
|
|
458
|
+
*/
|
|
459
|
+
sixb-embed {
|
|
460
|
+
display: block;
|
|
461
|
+
position: relative;
|
|
462
|
+
width: 100%;
|
|
463
|
+
min-width: 0;
|
|
464
|
+
aspect-ratio: 16 / 9;
|
|
465
|
+
border-radius: 12px;
|
|
466
|
+
background: color-mix(in oklab, var(--muted) 80%, transparent);
|
|
467
|
+
}
|
|
468
|
+
sixb-embed[title]::after {
|
|
469
|
+
content: attr(title);
|
|
470
|
+
position: absolute;
|
|
471
|
+
inset: auto 24px 20px;
|
|
472
|
+
font-size: 20px;
|
|
473
|
+
color: var(--muted-foreground);
|
|
474
|
+
}
|
|
475
|
+
section.slide.chart > sixb-embed,
|
|
476
|
+
section.slide.chart figure > sixb-embed { flex: 1; min-height: 0; aspect-ratio: auto; }
|
|
477
|
+
/* An image from another artifact its reader cannot see. */
|
|
478
|
+
section.slide img[data-sixb-ref="unavailable"] {
|
|
479
|
+
display: block;
|
|
480
|
+
min-width: 160px;
|
|
481
|
+
min-height: 90px;
|
|
482
|
+
border-radius: 12px;
|
|
483
|
+
background: var(--muted);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/* Components. */
|
|
487
|
+
section.slide .legend {
|
|
488
|
+
display: flex;
|
|
489
|
+
flex-direction: row;
|
|
490
|
+
flex-wrap: wrap;
|
|
491
|
+
gap: 8px 24px;
|
|
492
|
+
margin: 0;
|
|
493
|
+
padding: 0;
|
|
494
|
+
list-style: none;
|
|
495
|
+
font-size: 20px;
|
|
496
|
+
line-height: 1.3;
|
|
497
|
+
letter-spacing: 0;
|
|
498
|
+
color: var(--muted-foreground);
|
|
499
|
+
}
|
|
500
|
+
section.slide .legend > * { display: flex; align-items: center; gap: 8px; padding: 0; }
|
|
501
|
+
section.slide .legend > *::before {
|
|
502
|
+
content: "";
|
|
503
|
+
width: 0.8em;
|
|
504
|
+
height: 0.8em;
|
|
505
|
+
border-radius: 2px;
|
|
506
|
+
background: var(--swatch, var(--chart-1));
|
|
507
|
+
}
|
|
508
|
+
section.slide .callout {
|
|
509
|
+
padding: 24px 28px;
|
|
510
|
+
border-radius: var(--radius);
|
|
511
|
+
background: var(--muted);
|
|
512
|
+
font-size: 26px;
|
|
513
|
+
}
|
|
514
|
+
section.slide .tag {
|
|
515
|
+
display: inline-block;
|
|
516
|
+
padding: 4px 12px;
|
|
517
|
+
border-radius: 999px;
|
|
518
|
+
background: var(--muted);
|
|
519
|
+
font-size: 18px;
|
|
520
|
+
font-weight: 600;
|
|
521
|
+
}
|
|
522
|
+
`);
|
|
523
|
+
var FRAME_PAGE_CSS = kit(` html { color-scheme: light; }
|
|
524
|
+
html.dark { color-scheme: dark; }
|
|
525
|
+
body {
|
|
526
|
+
background: var(--background);
|
|
527
|
+
font-size: 15px;
|
|
528
|
+
line-height: 1.6;
|
|
529
|
+
text-rendering: optimizeLegibility;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/* A page reads in a centered column with room around it, narrower on a phone. */
|
|
533
|
+
main { display: block; max-width: 1120px; margin: 0 auto; padding: 40px 32px 56px; }
|
|
534
|
+
@media (max-width: 640px) { main { padding: 24px 16px 40px; } }
|
|
535
|
+
|
|
536
|
+
/*
|
|
537
|
+
* Type. Text takes the body's colour, or the colour of whatever the page paints it on: the kit
|
|
538
|
+
* colours only the surfaces it paints itself. A rule on a heading would win over the colour a
|
|
539
|
+
* page gives its body, and a page with its own light background loses its headings in dark mode.
|
|
540
|
+
*/
|
|
541
|
+
:is(h1, h2, h3, h4) { margin: 0 0 0.5em; text-wrap: balance; }
|
|
542
|
+
h1 { font-size: 32px; line-height: 1.15; font-weight: 650; letter-spacing: -0.025em; }
|
|
543
|
+
h2 { margin-top: 1.6em; font-size: 21px; line-height: 1.25; font-weight: 620; letter-spacing: -0.015em; }
|
|
544
|
+
h3 { margin-top: 1.4em; font-size: 16px; line-height: 1.35; font-weight: 600; }
|
|
545
|
+
h4 { font-size: 14px; font-weight: 600; }
|
|
546
|
+
:is(h1, h2, h3, h4):first-child { margin-top: 0; }
|
|
547
|
+
@media (max-width: 640px) { h1 { font-size: 26px; } h2 { font-size: 19px; } }
|
|
548
|
+
p { margin: 0 0 1em; text-wrap: pretty; }
|
|
549
|
+
.lede { max-width: 42em; margin-bottom: 1.6em; font-size: 17px; line-height: 1.55; color: var(--muted-foreground); }
|
|
550
|
+
.eyebrow {
|
|
551
|
+
margin: 0 0 8px;
|
|
552
|
+
font-size: 12px;
|
|
553
|
+
font-weight: 600;
|
|
554
|
+
letter-spacing: 0.06em;
|
|
555
|
+
text-transform: uppercase;
|
|
556
|
+
color: var(--muted-foreground);
|
|
557
|
+
}
|
|
558
|
+
small, .muted, .note { color: var(--muted-foreground); }
|
|
559
|
+
small, .note { font-size: 13px; }
|
|
560
|
+
a { color: inherit; text-decoration-color: color-mix(in oklab, currentColor 35%, transparent); text-underline-offset: 3px; }
|
|
561
|
+
a:hover { text-decoration-color: currentColor; }
|
|
562
|
+
strong { font-weight: 600; }
|
|
563
|
+
hr { margin: 32px 0; border: 0; border-top: 1px solid var(--border); }
|
|
564
|
+
:is(ul, ol) { margin: 0 0 1em; padding-left: 1.25em; }
|
|
565
|
+
li + li { margin-top: 0.25em; }
|
|
566
|
+
code { font-family: var(--font-mono); font-size: 0.88em; padding: 0.1em 0.35em; border-radius: 5px; background: var(--muted); }
|
|
567
|
+
pre { margin: 0 0 1em; padding: 14px 16px; overflow-x: auto; border-radius: var(--radius); background: var(--muted); font-size: 13px; line-height: 1.5; }
|
|
568
|
+
pre code { padding: 0; background: none; }
|
|
569
|
+
img, svg, video, canvas { max-width: 100%; }
|
|
570
|
+
img, video { height: auto; }
|
|
571
|
+
|
|
572
|
+
/* Tables: hairline rows, quiet headers, numbers aligned. Wide ones scroll in their box. */
|
|
573
|
+
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
|
|
574
|
+
:is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
|
|
575
|
+
th { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted-foreground); white-space: nowrap; }
|
|
576
|
+
:is(th, td):first-child { padding-left: 0; }
|
|
577
|
+
:is(th, td):last-child { padding-right: 0; }
|
|
578
|
+
:is(th, td).num, :is(th, td)[data-numeric] { text-align: right; white-space: nowrap; }
|
|
579
|
+
.table-scroll { overflow-x: auto; }
|
|
580
|
+
|
|
581
|
+
/* Forms and buttons, drawn like the app's. */
|
|
582
|
+
label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 550; }
|
|
583
|
+
:is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"]), select, textarea) {
|
|
584
|
+
width: 100%;
|
|
585
|
+
min-height: 36px;
|
|
586
|
+
padding: 7px 10px;
|
|
587
|
+
border: 1px solid var(--border);
|
|
588
|
+
border-radius: calc(var(--radius) - 2px);
|
|
589
|
+
background: var(--card);
|
|
590
|
+
color: var(--foreground);
|
|
591
|
+
font: inherit;
|
|
592
|
+
font-size: 14px;
|
|
593
|
+
line-height: 1.4;
|
|
594
|
+
box-shadow: 0 1px 1px rgb(0 0 0 / 0.03);
|
|
595
|
+
transition: border-color 0.12s, box-shadow 0.12s;
|
|
596
|
+
}
|
|
597
|
+
:is(input, select, textarea):focus-visible {
|
|
598
|
+
outline: none;
|
|
599
|
+
border-color: color-mix(in oklab, var(--foreground) 45%, var(--border));
|
|
600
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, var(--foreground) 12%, transparent);
|
|
601
|
+
}
|
|
602
|
+
input[type="range"], input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }
|
|
603
|
+
textarea { min-height: 88px; resize: vertical; }
|
|
604
|
+
button, .button {
|
|
605
|
+
display: inline-flex;
|
|
606
|
+
align-items: center;
|
|
607
|
+
justify-content: center;
|
|
608
|
+
gap: 6px;
|
|
609
|
+
min-height: 36px;
|
|
610
|
+
padding: 0 14px;
|
|
611
|
+
border: 1px solid transparent;
|
|
612
|
+
border-radius: calc(var(--radius) - 2px);
|
|
613
|
+
background: var(--primary);
|
|
614
|
+
color: var(--primary-foreground);
|
|
615
|
+
font: inherit;
|
|
616
|
+
font-size: 14px;
|
|
617
|
+
font-weight: 550;
|
|
618
|
+
text-decoration: none;
|
|
619
|
+
cursor: pointer;
|
|
620
|
+
transition: background-color 0.12s, border-color 0.12s, opacity 0.12s;
|
|
621
|
+
}
|
|
622
|
+
:is(button, .button):hover { background: color-mix(in oklab, var(--primary) 88%, var(--background)); }
|
|
623
|
+
:is(button, .button):focus-visible { outline: 2px solid var(--ring, var(--foreground)); outline-offset: 2px; }
|
|
624
|
+
:is(button, .button):disabled { opacity: 0.5; cursor: default; }
|
|
625
|
+
:is(button, .button).secondary { border-color: var(--border); background: var(--card); color: var(--foreground); }
|
|
626
|
+
:is(button, .button).secondary:hover { background: var(--muted); }
|
|
627
|
+
:is(button, .button).ghost { background: transparent; color: inherit; }
|
|
628
|
+
:is(button, .button).ghost:hover { background: var(--muted); }
|
|
629
|
+
fieldset { margin: 0 0 16px; padding: 0; border: 0; }
|
|
630
|
+
.field { margin-bottom: 16px; }
|
|
631
|
+
|
|
632
|
+
/* Components. */
|
|
633
|
+
.card {
|
|
634
|
+
padding: 20px;
|
|
635
|
+
border: 1px solid var(--border);
|
|
636
|
+
border-radius: var(--radius);
|
|
637
|
+
background: var(--card);
|
|
638
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
|
|
639
|
+
}
|
|
640
|
+
.card > :last-child { margin-bottom: 0; }
|
|
641
|
+
/* Cards stack with room between them; in a grid or a row, its gap spaces them. */
|
|
642
|
+
.card { margin-bottom: 16px; }
|
|
643
|
+
:is(.grid, .row) > .card { margin-bottom: 0; }
|
|
644
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; margin-bottom: 24px; }
|
|
645
|
+
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
|
|
646
|
+
.stat .label { font-size: 13px; color: var(--muted-foreground); }
|
|
647
|
+
.stat .value { margin-top: 4px; font-size: 30px; line-height: 1.1; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
|
|
648
|
+
.stat .delta { margin-top: 6px; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
|
|
649
|
+
.tag {
|
|
650
|
+
display: inline-flex;
|
|
651
|
+
align-items: center;
|
|
652
|
+
gap: 6px;
|
|
653
|
+
padding: 2px 9px;
|
|
654
|
+
border-radius: 999px;
|
|
655
|
+
background: var(--muted);
|
|
656
|
+
font-size: 12px;
|
|
657
|
+
font-weight: 600;
|
|
658
|
+
line-height: 1.6;
|
|
659
|
+
white-space: nowrap;
|
|
660
|
+
}
|
|
661
|
+
.callout { margin: 0 0 1em; padding: 14px 16px; border-radius: var(--radius); background: var(--muted); }
|
|
662
|
+
.callout > :last-child { margin-bottom: 0; }
|
|
663
|
+
|
|
664
|
+
/*
|
|
665
|
+
* Another artifact on the page: the app draws it over this box, sized by the page's CSS like any
|
|
666
|
+
* block. Until it does, the box shows where it goes.
|
|
667
|
+
*/
|
|
668
|
+
sixb-embed {
|
|
669
|
+
display: block;
|
|
670
|
+
position: relative;
|
|
671
|
+
width: 100%;
|
|
672
|
+
aspect-ratio: 16 / 9;
|
|
673
|
+
margin-bottom: 1em;
|
|
674
|
+
border-radius: var(--radius);
|
|
675
|
+
background: var(--muted);
|
|
676
|
+
}
|
|
677
|
+
sixb-embed[title]::after {
|
|
678
|
+
content: attr(title);
|
|
679
|
+
position: absolute;
|
|
680
|
+
inset: auto 16px 12px;
|
|
681
|
+
font-size: 13px;
|
|
682
|
+
color: var(--muted-foreground);
|
|
683
|
+
}
|
|
684
|
+
img[data-sixb-ref="unavailable"] { display: block; min-width: 120px; min-height: 68px; border-radius: var(--radius); background: var(--muted); }
|
|
685
|
+
`);
|
|
686
|
+
|
|
687
|
+
// src/artifacts/frames/runtime.ts
|
|
688
|
+
function frameRuntime() {
|
|
689
|
+
const PROTOCOL = "sixb-frame/1";
|
|
690
|
+
const WIDTH = 1280;
|
|
691
|
+
const HEIGHT = 720;
|
|
692
|
+
const KEYS = [
|
|
693
|
+
"ArrowLeft",
|
|
694
|
+
"ArrowRight",
|
|
695
|
+
"ArrowUp",
|
|
696
|
+
"ArrowDown",
|
|
697
|
+
"PageUp",
|
|
698
|
+
"PageDown",
|
|
699
|
+
"Home",
|
|
700
|
+
"End",
|
|
701
|
+
" ",
|
|
702
|
+
"Escape"
|
|
703
|
+
];
|
|
704
|
+
const MAX_KEY_LENGTH = 128;
|
|
705
|
+
const MAX_VALUE_BYTES = 65536;
|
|
706
|
+
const QUERY_NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
707
|
+
const MAX_LABEL_LENGTH = 120;
|
|
708
|
+
const AT = "data-sixb-at";
|
|
709
|
+
const KIND = "data-sixb-edit";
|
|
710
|
+
const WORDS = "data-sixb-text";
|
|
711
|
+
const MAX_EDIT_LABEL = 80;
|
|
712
|
+
const COMMENT_CURSOR = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 21V11a8 8 0 1 1 8 8H3z' fill='%23111' stroke='white' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 3 21, crosshair`;
|
|
713
|
+
const EDITING_CSS = [
|
|
714
|
+
"[data-sixb-editing] [data-sixb-hover] { outline: 1px dashed #0a84ff; outline-offset: 2px; }",
|
|
715
|
+
"[data-sixb-editing] [data-sixb-picked] { outline: 2px solid #0a84ff; outline-offset: 2px; }",
|
|
716
|
+
"[data-sixb-editing] [contenteditable] { cursor: text; }",
|
|
717
|
+
`[data-sixb-commenting], [data-sixb-commenting] * { cursor: ${COMMENT_CURSOR} !important; }`,
|
|
718
|
+
"[data-sixb-commenting] [data-sixb-hover] { outline: 2px dashed #0a84ff; outline-offset: 3px; }",
|
|
719
|
+
"[data-sixb-commenting] [data-sixb-picked] { outline: 2px solid #0a84ff; outline-offset: 3px; }"
|
|
720
|
+
].join(" ");
|
|
721
|
+
const CANVAS_CSS = "html { overscroll-behavior: none; } html, html * { touch-action: none !important; }";
|
|
722
|
+
const root = document.documentElement;
|
|
723
|
+
const script = document.currentScript;
|
|
724
|
+
const deck = script?.getAttribute("data-sixb-layout") !== "page";
|
|
725
|
+
const start = new URLSearchParams(window.location.hash.slice(1));
|
|
726
|
+
if (deck) {
|
|
727
|
+
root.classList.add("sixb-deck");
|
|
728
|
+
root.dataset.mode = start.has("sixb-fill") ? "fill" : "slide";
|
|
729
|
+
}
|
|
730
|
+
let current = Number(start.get("sixb-slide")) || 1;
|
|
731
|
+
const slides = () => Array.from(document.querySelectorAll("section.slide"));
|
|
732
|
+
const post = (message) => window.parent.postMessage({ protocol: PROTOCOL, ...message }, "*");
|
|
733
|
+
const webAddress = (href) => {
|
|
734
|
+
try {
|
|
735
|
+
const url = new URL(href, document.baseURI);
|
|
736
|
+
return url.protocol === "http:" || url.protocol === "https:" ? url.href : null;
|
|
737
|
+
} catch {
|
|
738
|
+
return null;
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
const fit = () => {
|
|
742
|
+
const columns = window.innerWidth < 720 ? 2 : window.innerWidth < 1100 ? 3 : 4;
|
|
743
|
+
const gap = 16;
|
|
744
|
+
const margin = root.dataset.mode === "fill" || root.dataset.mode === "present" ? 0 : Math.min(32, window.innerWidth * 0.04);
|
|
745
|
+
root.style.setProperty("--sixb-scale", String(Math.min((window.innerWidth - margin * 2) / WIDTH, (window.innerHeight - margin * 2) / HEIGHT)));
|
|
746
|
+
root.style.setProperty("--sixb-columns", String(columns));
|
|
747
|
+
root.style.setProperty("--sixb-overview-scale", String((window.innerWidth - gap * (columns + 1)) / columns / WIDTH));
|
|
748
|
+
};
|
|
749
|
+
let reported = "";
|
|
750
|
+
let reporting = false;
|
|
751
|
+
const ids = new WeakMap;
|
|
752
|
+
let lastId = 0;
|
|
753
|
+
const idOf = (element) => {
|
|
754
|
+
const known = ids.get(element);
|
|
755
|
+
if (known !== undefined)
|
|
756
|
+
return known;
|
|
757
|
+
lastId += 1;
|
|
758
|
+
ids.set(element, lastId);
|
|
759
|
+
return lastId;
|
|
760
|
+
};
|
|
761
|
+
const reportEmbeds = () => {
|
|
762
|
+
if (reporting || root.dataset.mode === "fill")
|
|
763
|
+
return;
|
|
764
|
+
reporting = true;
|
|
765
|
+
requestAnimationFrame(() => {
|
|
766
|
+
reporting = false;
|
|
767
|
+
const scale = deck ? Number(root.style.getPropertyValue("--sixb-scale")) || 1 : 1;
|
|
768
|
+
const scope = deck ? root.dataset.mode === "overview" ? undefined : slides()[current - 1] : document;
|
|
769
|
+
const near = (rect) => deck || rect.bottom > -window.innerHeight && rect.top < window.innerHeight * 2;
|
|
770
|
+
const embeds = Array.from(scope?.querySelectorAll("sixb-embed[src]") ?? []).flatMap((element) => {
|
|
771
|
+
const id = idOf(element);
|
|
772
|
+
const rect = element.getBoundingClientRect();
|
|
773
|
+
return near(rect) ? [
|
|
774
|
+
{
|
|
775
|
+
id,
|
|
776
|
+
address: (element.getAttribute("src") ?? "").trim(),
|
|
777
|
+
rect: { x: rect.left, y: rect.top, width: rect.width, height: rect.height },
|
|
778
|
+
scale
|
|
779
|
+
}
|
|
780
|
+
] : [];
|
|
781
|
+
});
|
|
782
|
+
const next = JSON.stringify(embeds);
|
|
783
|
+
if (next === reported)
|
|
784
|
+
return;
|
|
785
|
+
reported = next;
|
|
786
|
+
post({ event: "embeds", params: { embeds } });
|
|
787
|
+
});
|
|
788
|
+
};
|
|
789
|
+
let height = -1;
|
|
790
|
+
const reportSize = () => {
|
|
791
|
+
const body = document.body;
|
|
792
|
+
if (deck || !body)
|
|
793
|
+
return;
|
|
794
|
+
const style = getComputedStyle(body);
|
|
795
|
+
const next = Math.ceil(Math.max(body.scrollHeight, body.getBoundingClientRect().height) + (Number.parseFloat(style.marginTop) || 0) + (Number.parseFloat(style.marginBottom) || 0));
|
|
796
|
+
if (next === height)
|
|
797
|
+
return;
|
|
798
|
+
height = next;
|
|
799
|
+
post({ event: "size", params: { height } });
|
|
800
|
+
};
|
|
801
|
+
const show = (slide) => {
|
|
802
|
+
const all = slides();
|
|
803
|
+
current = Math.min(Math.max(1, Math.round(slide) || 1), Math.max(1, all.length));
|
|
804
|
+
all.forEach((element, index) => {
|
|
805
|
+
element.toggleAttribute("data-current", index + 1 === current);
|
|
806
|
+
});
|
|
807
|
+
if (root.dataset.mode === "overview") {
|
|
808
|
+
all[current - 1]?.scrollIntoView({ block: "nearest" });
|
|
809
|
+
}
|
|
810
|
+
reportEmbeds();
|
|
811
|
+
};
|
|
812
|
+
const portPost = typeof MessagePort === "function" ? MessagePort.prototype.postMessage : undefined;
|
|
813
|
+
const apply = Reflect.apply;
|
|
814
|
+
let appPort = null;
|
|
815
|
+
const postPort = (message) => {
|
|
816
|
+
if (appPort && portPost)
|
|
817
|
+
apply(portPost, appPort, [{ protocol: PROTOCOL, ...message }]);
|
|
818
|
+
};
|
|
819
|
+
let editing = false;
|
|
820
|
+
let typable = true;
|
|
821
|
+
let pointed = null;
|
|
822
|
+
let picked = null;
|
|
823
|
+
let typing = null;
|
|
824
|
+
let held = null;
|
|
825
|
+
let typedFrom = "";
|
|
826
|
+
const wordsHash = (text) => {
|
|
827
|
+
let hash = 2166136261;
|
|
828
|
+
for (let index = 0;index < text.length; index += 1) {
|
|
829
|
+
hash ^= text.charCodeAt(index);
|
|
830
|
+
hash = Math.imul(hash, 16777619) >>> 0;
|
|
831
|
+
}
|
|
832
|
+
return hash.toString(16);
|
|
833
|
+
};
|
|
834
|
+
const spokenWords = (element) => {
|
|
835
|
+
const copy = element.cloneNode(true);
|
|
836
|
+
if (!(copy instanceof Element))
|
|
837
|
+
return element.textContent ?? "";
|
|
838
|
+
for (const lineBreak of Array.from(copy.querySelectorAll("br")))
|
|
839
|
+
lineBreak.replaceWith(" ");
|
|
840
|
+
for (const code of Array.from(copy.querySelectorAll("script, style, template")))
|
|
841
|
+
code.remove();
|
|
842
|
+
return copy.textContent ?? "";
|
|
843
|
+
};
|
|
844
|
+
const commentable = (element, node) => element ?? (!typable && node instanceof Element && node !== root && node !== document.body ? node : null);
|
|
845
|
+
const editTarget = (node) => {
|
|
846
|
+
const start = node instanceof Element ? node : null;
|
|
847
|
+
const element = start?.closest(`[${AT}]`) ?? null;
|
|
848
|
+
const box = (start ?? element)?.getBoundingClientRect();
|
|
849
|
+
const rect = {
|
|
850
|
+
x: box?.left ?? 0,
|
|
851
|
+
y: box?.top ?? 0,
|
|
852
|
+
width: box?.width ?? 0,
|
|
853
|
+
height: box?.height ?? 0
|
|
854
|
+
};
|
|
855
|
+
const kind = element?.getAttribute(KIND) ?? "";
|
|
856
|
+
const shown = start && start !== root && start !== document.body ? spokenWords(start).replace(/\s+/g, " ").trim() : "";
|
|
857
|
+
const scripted = {
|
|
858
|
+
address: null,
|
|
859
|
+
kind: "scripted",
|
|
860
|
+
within: element?.getAttribute(AT) ?? null,
|
|
861
|
+
...shown ? { label: shown.slice(0, MAX_EDIT_LABEL) } : {},
|
|
862
|
+
rect
|
|
863
|
+
};
|
|
864
|
+
if (!element)
|
|
865
|
+
return { element: null, target: scripted };
|
|
866
|
+
if (element !== start && kind !== "text" && kind !== "whole") {
|
|
867
|
+
return { element: null, target: scripted };
|
|
868
|
+
}
|
|
869
|
+
const words = element.textContent ?? "";
|
|
870
|
+
if (kind === "text" && wordsHash(words) !== element.getAttribute(WORDS)) {
|
|
871
|
+
return { element: null, target: { ...scripted, within: element.getAttribute(AT) } };
|
|
872
|
+
}
|
|
873
|
+
const own = element.getBoundingClientRect();
|
|
874
|
+
const label = (kind === "image" ? element.getAttribute("alt") ?? "" : spokenWords(element)).replace(/\s+/g, " ").trim().slice(0, MAX_EDIT_LABEL);
|
|
875
|
+
return {
|
|
876
|
+
element,
|
|
877
|
+
target: {
|
|
878
|
+
address: element.getAttribute(AT),
|
|
879
|
+
kind,
|
|
880
|
+
label,
|
|
881
|
+
rect: { x: own.left, y: own.top, width: own.width, height: own.height }
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
};
|
|
885
|
+
const mark = (attribute, previous, next) => {
|
|
886
|
+
previous?.removeAttribute(attribute);
|
|
887
|
+
next?.setAttribute(attribute, "");
|
|
888
|
+
return next;
|
|
889
|
+
};
|
|
890
|
+
const stopTyping = () => {
|
|
891
|
+
const element = typing;
|
|
892
|
+
if (!element)
|
|
893
|
+
return;
|
|
894
|
+
typing = null;
|
|
895
|
+
element.removeAttribute("contenteditable");
|
|
896
|
+
const patch = held;
|
|
897
|
+
held = null;
|
|
898
|
+
if (patch)
|
|
899
|
+
applyPatch(element, patch);
|
|
900
|
+
};
|
|
901
|
+
const applyPatch = (element, patch) => {
|
|
902
|
+
const attributes = patch.attributes;
|
|
903
|
+
if (attributes && typeof attributes === "object") {
|
|
904
|
+
const next = attributes;
|
|
905
|
+
for (const name of element.getAttributeNames()) {
|
|
906
|
+
if (!(name in next) && !name.startsWith("data-sixb-"))
|
|
907
|
+
element.removeAttribute(name);
|
|
908
|
+
}
|
|
909
|
+
for (const [name, value] of Object.entries(next)) {
|
|
910
|
+
if (typeof value === "string" && /^[a-z_:][a-z0-9_.:-]*$/i.test(name)) {
|
|
911
|
+
element.setAttribute(name, value);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
if (typeof patch.html === "string")
|
|
916
|
+
element.innerHTML = patch.html;
|
|
917
|
+
};
|
|
918
|
+
const startEditing = (on, typingAllowed) => {
|
|
919
|
+
editing = on;
|
|
920
|
+
typable = typingAllowed;
|
|
921
|
+
if (!typable)
|
|
922
|
+
stopTyping();
|
|
923
|
+
root.toggleAttribute("data-sixb-editing", on);
|
|
924
|
+
root.toggleAttribute("data-sixb-commenting", on && !typable);
|
|
925
|
+
if (on && !document.getElementById("sixb-editing")) {
|
|
926
|
+
const style = document.createElement("style");
|
|
927
|
+
style.id = "sixb-editing";
|
|
928
|
+
style.textContent = EDITING_CSS;
|
|
929
|
+
document.head.append(style);
|
|
930
|
+
}
|
|
931
|
+
if (!on) {
|
|
932
|
+
stopTyping();
|
|
933
|
+
pointed = mark("data-sixb-hover", pointed, null);
|
|
934
|
+
picked = mark("data-sixb-picked", picked, null);
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
window.addEventListener("click", (event) => {
|
|
938
|
+
if (!editing || !event.isTrusted)
|
|
939
|
+
return;
|
|
940
|
+
if (typing?.contains(event.target))
|
|
941
|
+
return;
|
|
942
|
+
event.preventDefault();
|
|
943
|
+
event.stopPropagation();
|
|
944
|
+
stopTyping();
|
|
945
|
+
const { element, target } = editTarget(event.target);
|
|
946
|
+
picked = mark("data-sixb-picked", picked, commentable(element, event.target));
|
|
947
|
+
const at = { x: event.clientX, y: event.clientY };
|
|
948
|
+
postPort({ event: "edit.select", params: { target, at } });
|
|
949
|
+
if (typable && element instanceof HTMLElement && target.kind === "text") {
|
|
950
|
+
typing = element;
|
|
951
|
+
typedFrom = element.textContent ?? "";
|
|
952
|
+
element.setAttribute("contenteditable", "plaintext-only");
|
|
953
|
+
element.focus();
|
|
954
|
+
}
|
|
955
|
+
}, true);
|
|
956
|
+
document.addEventListener("mouseover", (event) => {
|
|
957
|
+
if (!editing || !event.isTrusted)
|
|
958
|
+
return;
|
|
959
|
+
const { element, target } = editTarget(event.target);
|
|
960
|
+
const shown = commentable(element, event.target);
|
|
961
|
+
if (shown === pointed && shown !== null)
|
|
962
|
+
return;
|
|
963
|
+
pointed = mark("data-sixb-hover", pointed, shown);
|
|
964
|
+
postPort({ event: "edit.hover", params: { target } });
|
|
965
|
+
});
|
|
966
|
+
document.addEventListener("mouseout", (event) => {
|
|
967
|
+
if (!editing || !event.isTrusted || event.relatedTarget !== null || pointed === null)
|
|
968
|
+
return;
|
|
969
|
+
pointed = mark("data-sixb-hover", pointed, null);
|
|
970
|
+
postPort({ event: "edit.hover", params: { target: null } });
|
|
971
|
+
});
|
|
972
|
+
document.addEventListener("input", (event) => {
|
|
973
|
+
if (!editing || !event.isTrusted || !typing || !typing.contains(event.target)) {
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
const text = typing.textContent ?? "";
|
|
977
|
+
typing.setAttribute(WORDS, wordsHash(text));
|
|
978
|
+
postPort({
|
|
979
|
+
event: "edit.text",
|
|
980
|
+
params: { address: typing.getAttribute(AT), base: typedFrom, text }
|
|
981
|
+
});
|
|
982
|
+
typedFrom = text;
|
|
983
|
+
});
|
|
984
|
+
window.addEventListener("keydown", (event) => {
|
|
985
|
+
if (!typing || !event.isTrusted)
|
|
986
|
+
return;
|
|
987
|
+
if (event.key === "Enter")
|
|
988
|
+
event.preventDefault();
|
|
989
|
+
if (event.key === "Escape")
|
|
990
|
+
typing.blur();
|
|
991
|
+
event.stopPropagation();
|
|
992
|
+
}, true);
|
|
993
|
+
document.addEventListener("focusout", (event) => {
|
|
994
|
+
if (typing && event.target === typing)
|
|
995
|
+
stopTyping();
|
|
996
|
+
});
|
|
997
|
+
const mac = /Mac|iPhone|iPad/.test(window.navigator?.platform ?? "");
|
|
998
|
+
const zoom = (params) => postPort({ event: "zoom", params });
|
|
999
|
+
const pan = (x, y, by) => postPort({ event: "pan", params: { x, y, by } });
|
|
1000
|
+
const forwards = (event) => appPort !== null && event.isTrusted;
|
|
1001
|
+
let onCanvas = false;
|
|
1002
|
+
let canvasMoving = false;
|
|
1003
|
+
const WHEEL_GESTURE_MS = 150;
|
|
1004
|
+
const MIN_OVERFLOW = 16;
|
|
1005
|
+
let wheeledAt = Number.NEGATIVE_INFINITY;
|
|
1006
|
+
let wheelScrolls = false;
|
|
1007
|
+
const scrollsUnder = (target, x, y) => {
|
|
1008
|
+
const vertical = Math.abs(y) >= Math.abs(x);
|
|
1009
|
+
const delta = vertical ? y : x;
|
|
1010
|
+
if (delta === 0)
|
|
1011
|
+
return false;
|
|
1012
|
+
const overflowOf = (element) => getComputedStyle(element)[vertical ? "overflowY" : "overflowX"];
|
|
1013
|
+
const scrolls = (size, shown, at) => size - shown >= MIN_OVERFLOW && (delta > 0 ? at + shown < size - 1 : at > 0);
|
|
1014
|
+
for (let element = target instanceof Element ? target : null;element && element !== root && element !== document.body; element = element.parentElement) {
|
|
1015
|
+
if (!/auto|scroll/.test(overflowOf(element)))
|
|
1016
|
+
continue;
|
|
1017
|
+
const scrolled = vertical ? scrolls(element.scrollHeight, element.clientHeight, element.scrollTop) : scrolls(element.scrollWidth, element.clientWidth, element.scrollLeft);
|
|
1018
|
+
if (scrolled)
|
|
1019
|
+
return true;
|
|
1020
|
+
}
|
|
1021
|
+
const page = document.scrollingElement;
|
|
1022
|
+
if (!page || [root, document.body].some((each) => each && /hidden|clip/.test(overflowOf(each)))) {
|
|
1023
|
+
return false;
|
|
1024
|
+
}
|
|
1025
|
+
return vertical ? scrolls(page.scrollHeight, window.innerHeight, window.scrollY) : scrolls(page.scrollWidth, window.innerWidth, window.scrollX);
|
|
1026
|
+
};
|
|
1027
|
+
window.addEventListener("wheel", (event) => {
|
|
1028
|
+
if (!forwards(event))
|
|
1029
|
+
return;
|
|
1030
|
+
if (event.ctrlKey || event.metaKey) {
|
|
1031
|
+
event.preventDefault();
|
|
1032
|
+
const unit = event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002;
|
|
1033
|
+
const factor = 2 ** (-event.deltaY * unit * (event.ctrlKey && mac ? 10 : 1));
|
|
1034
|
+
zoom({ factor, at: { x: event.clientX, y: event.clientY } });
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
if (!onCanvas)
|
|
1038
|
+
return;
|
|
1039
|
+
const unit = event.deltaMode === 1 ? 20 : event.deltaMode === 2 ? window.innerHeight : 1;
|
|
1040
|
+
const x = (!mac && event.shiftKey ? event.deltaY : event.deltaX) * unit;
|
|
1041
|
+
const y = !mac && event.shiftKey ? 0 : event.deltaY * unit;
|
|
1042
|
+
if (event.timeStamp - wheeledAt > WHEEL_GESTURE_MS) {
|
|
1043
|
+
wheelScrolls = !canvasMoving && scrollsUnder(event.target, x, y);
|
|
1044
|
+
}
|
|
1045
|
+
wheeledAt = event.timeStamp;
|
|
1046
|
+
if (wheelScrolls)
|
|
1047
|
+
return;
|
|
1048
|
+
event.preventDefault();
|
|
1049
|
+
pan(x, y, "wheel");
|
|
1050
|
+
}, { passive: false });
|
|
1051
|
+
const TOUCH_SLOP = 6;
|
|
1052
|
+
let spread = 0;
|
|
1053
|
+
let touched = null;
|
|
1054
|
+
const spreadOf = (touches) => {
|
|
1055
|
+
const [one, two] = [touches[0], touches[1]];
|
|
1056
|
+
return one && two ? Math.hypot(one.screenX - two.screenX, one.screenY - two.screenY) : 0;
|
|
1057
|
+
};
|
|
1058
|
+
const middleOf = (touches) => {
|
|
1059
|
+
const fingers = [touches[0], touches[1]].filter((touch) => touch !== undefined);
|
|
1060
|
+
const sum = (axis) => fingers.reduce((total, touch) => total + touch[axis], 0) / Math.max(1, fingers.length);
|
|
1061
|
+
return { x: sum("screenX"), y: sum("screenY") };
|
|
1062
|
+
};
|
|
1063
|
+
window.addEventListener("touchstart", (event) => {
|
|
1064
|
+
const ours = forwards(event);
|
|
1065
|
+
spread = ours && event.touches.length === 2 ? spreadOf(event.touches) : 0;
|
|
1066
|
+
touched = ours && onCanvas ? { ...middleOf(event.touches), dragging: event.touches.length > 1 } : null;
|
|
1067
|
+
}, { passive: true });
|
|
1068
|
+
window.addEventListener("touchmove", (event) => {
|
|
1069
|
+
if (!forwards(event))
|
|
1070
|
+
return;
|
|
1071
|
+
if (touched && event.touches.length <= 2) {
|
|
1072
|
+
const middle = middleOf(event.touches);
|
|
1073
|
+
const x = touched.x - middle.x;
|
|
1074
|
+
const y = touched.y - middle.y;
|
|
1075
|
+
if (!touched.dragging && Math.hypot(x, y) < TOUCH_SLOP)
|
|
1076
|
+
return;
|
|
1077
|
+
event.preventDefault();
|
|
1078
|
+
touched = { ...middle, dragging: true };
|
|
1079
|
+
if (x !== 0 || y !== 0)
|
|
1080
|
+
pan(x, y, "touch");
|
|
1081
|
+
}
|
|
1082
|
+
if (event.touches.length !== 2 || spread === 0)
|
|
1083
|
+
return;
|
|
1084
|
+
event.preventDefault();
|
|
1085
|
+
const [one, two] = [event.touches[0], event.touches[1]];
|
|
1086
|
+
const next = spreadOf(event.touches);
|
|
1087
|
+
if (!one || !two || next === 0)
|
|
1088
|
+
return;
|
|
1089
|
+
zoom({
|
|
1090
|
+
factor: next / spread,
|
|
1091
|
+
at: { x: (one.clientX + two.clientX) / 2, y: (one.clientY + two.clientY) / 2 }
|
|
1092
|
+
});
|
|
1093
|
+
spread = next;
|
|
1094
|
+
}, { passive: false });
|
|
1095
|
+
const untouch = (event) => {
|
|
1096
|
+
if (event.touches.length < 2)
|
|
1097
|
+
spread = 0;
|
|
1098
|
+
if (touched)
|
|
1099
|
+
touched = event.touches.length > 0 ? { ...middleOf(event.touches), dragging: true } : null;
|
|
1100
|
+
};
|
|
1101
|
+
window.addEventListener("touchend", untouch);
|
|
1102
|
+
window.addEventListener("touchcancel", untouch);
|
|
1103
|
+
let gestured = 1;
|
|
1104
|
+
const onGesture = (event) => {
|
|
1105
|
+
if (!forwards(event))
|
|
1106
|
+
return;
|
|
1107
|
+
event.preventDefault();
|
|
1108
|
+
const gesture = event;
|
|
1109
|
+
const scale = gesture.scale ?? 1;
|
|
1110
|
+
if (event.type === "gesturestart" || spread > 0 || scale <= 0) {
|
|
1111
|
+
gestured = scale > 0 ? scale : 1;
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
zoom({ factor: scale / gestured, at: { x: gesture.clientX ?? 0, y: gesture.clientY ?? 0 } });
|
|
1115
|
+
gestured = scale;
|
|
1116
|
+
};
|
|
1117
|
+
window.addEventListener("gesturestart", onGesture, { passive: false });
|
|
1118
|
+
window.addEventListener("gesturechange", onGesture, { passive: false });
|
|
1119
|
+
window.addEventListener("keydown", (event) => {
|
|
1120
|
+
if (!forwards(event) || !(event.metaKey || event.ctrlKey) || event.altKey)
|
|
1121
|
+
return;
|
|
1122
|
+
const step = event.key === "=" || event.key === "+" ? "in" : event.key === "-" ? "out" : event.key === "0" ? "actual" : null;
|
|
1123
|
+
if (!step)
|
|
1124
|
+
return;
|
|
1125
|
+
event.preventDefault();
|
|
1126
|
+
zoom({ step });
|
|
1127
|
+
}, true);
|
|
1128
|
+
const SPACE_TAKERS = [
|
|
1129
|
+
"input:not([type=button], [type=submit], [type=reset], [type=image])",
|
|
1130
|
+
"textarea",
|
|
1131
|
+
"select",
|
|
1132
|
+
...[
|
|
1133
|
+
"checkbox",
|
|
1134
|
+
"radio",
|
|
1135
|
+
"switch",
|
|
1136
|
+
"option",
|
|
1137
|
+
"menuitemcheckbox",
|
|
1138
|
+
"menuitemradio",
|
|
1139
|
+
"textbox",
|
|
1140
|
+
"searchbox",
|
|
1141
|
+
"combobox",
|
|
1142
|
+
"slider",
|
|
1143
|
+
"spinbutton"
|
|
1144
|
+
].map((role) => `[role=${role}]`)
|
|
1145
|
+
].join(", ");
|
|
1146
|
+
let spaceHeld = false;
|
|
1147
|
+
const holdSpace = (down) => {
|
|
1148
|
+
if (spaceHeld === down)
|
|
1149
|
+
return;
|
|
1150
|
+
spaceHeld = down;
|
|
1151
|
+
postPort({ event: "space", params: { down } });
|
|
1152
|
+
};
|
|
1153
|
+
const onSpace = (event) => {
|
|
1154
|
+
if (!onCanvas || !forwards(event) || event.key !== " ")
|
|
1155
|
+
return;
|
|
1156
|
+
if (event.metaKey || event.ctrlKey || event.altKey)
|
|
1157
|
+
return;
|
|
1158
|
+
const down = event.type === "keydown";
|
|
1159
|
+
const focused = document.activeElement;
|
|
1160
|
+
if (down && focused instanceof HTMLElement) {
|
|
1161
|
+
if (focused.isContentEditable || focused.matches(SPACE_TAKERS))
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
if (!down && !spaceHeld)
|
|
1165
|
+
return;
|
|
1166
|
+
event.preventDefault();
|
|
1167
|
+
event.stopPropagation();
|
|
1168
|
+
holdSpace(down);
|
|
1169
|
+
};
|
|
1170
|
+
window.addEventListener("keydown", onSpace, true);
|
|
1171
|
+
window.addEventListener("keyup", onSpace, true);
|
|
1172
|
+
window.addEventListener("blur", () => holdSpace(false));
|
|
1173
|
+
const handle = (method, params) => {
|
|
1174
|
+
switch (method) {
|
|
1175
|
+
case "theme": {
|
|
1176
|
+
const tokens = params.tokens ?? {};
|
|
1177
|
+
const declarations = Object.entries(tokens).filter(([name, value]) => /^--[a-z0-9-]+$/.test(name) && typeof value === "string" && !/[;{}<]/.test(value)).map(([name, value]) => `${name}: ${value};`);
|
|
1178
|
+
for (const [stage, token] of [
|
|
1179
|
+
["--sixb-stage", "--muted"],
|
|
1180
|
+
["--sixb-stage-border", "--border"],
|
|
1181
|
+
["--sixb-stage-foreground", "--foreground"]
|
|
1182
|
+
]) {
|
|
1183
|
+
const value = declarations.find((declaration) => declaration.startsWith(`${token}:`));
|
|
1184
|
+
if (value)
|
|
1185
|
+
declarations.push(`${stage}${value.slice(token.length)}`);
|
|
1186
|
+
}
|
|
1187
|
+
let style = document.getElementById("sixb-theme");
|
|
1188
|
+
if (!style) {
|
|
1189
|
+
style = document.createElement("style");
|
|
1190
|
+
style.id = "sixb-theme";
|
|
1191
|
+
document.head.append(style);
|
|
1192
|
+
}
|
|
1193
|
+
style.textContent = `@layer sixb-theme { :root { ${declarations.join(" ")} color-scheme: ${params.dark === true ? "dark" : "light"}; } }`;
|
|
1194
|
+
root.classList.toggle("dark", params.dark === true);
|
|
1195
|
+
window.dispatchEvent(new CustomEvent("sixb:theme", { detail: { dark: params.dark === true } }));
|
|
1196
|
+
return;
|
|
1197
|
+
}
|
|
1198
|
+
case "goto":
|
|
1199
|
+
if (!deck)
|
|
1200
|
+
throw new Error("Only a deck has slides.");
|
|
1201
|
+
show(Number(params.slide));
|
|
1202
|
+
return;
|
|
1203
|
+
case "reload":
|
|
1204
|
+
setTimeout(() => window.location.reload());
|
|
1205
|
+
return;
|
|
1206
|
+
case "query.changed": {
|
|
1207
|
+
const name = String(params.name);
|
|
1208
|
+
if (!QUERY_NAME.test(name))
|
|
1209
|
+
throw new Error(`Unknown query '${name}'.`);
|
|
1210
|
+
window.dispatchEvent(new CustomEvent("sixb:query", { detail: { name } }));
|
|
1211
|
+
return;
|
|
1212
|
+
}
|
|
1213
|
+
case "edit":
|
|
1214
|
+
startEditing(params.on === true, params.typing !== false);
|
|
1215
|
+
return;
|
|
1216
|
+
case "canvas":
|
|
1217
|
+
onCanvas = true;
|
|
1218
|
+
canvasMoving = params.moving === true;
|
|
1219
|
+
if (!document.getElementById("sixb-canvas")) {
|
|
1220
|
+
const style = document.createElement("style");
|
|
1221
|
+
style.id = "sixb-canvas";
|
|
1222
|
+
style.textContent = CANVAS_CSS;
|
|
1223
|
+
document.head.append(style);
|
|
1224
|
+
}
|
|
1225
|
+
return;
|
|
1226
|
+
case "edit.patch": {
|
|
1227
|
+
const patches = Array.isArray(params.patches) ? params.patches : [];
|
|
1228
|
+
for (const patch of patches) {
|
|
1229
|
+
const address = typeof patch?.address === "string" ? patch.address : null;
|
|
1230
|
+
const element = address ? document.querySelector(`[${AT}="${CSS.escape(address)}"]`) : null;
|
|
1231
|
+
if (!element)
|
|
1232
|
+
continue;
|
|
1233
|
+
if (element === typing)
|
|
1234
|
+
held = { ...held ?? {}, ...patch };
|
|
1235
|
+
else
|
|
1236
|
+
applyPatch(element, patch);
|
|
1237
|
+
}
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
case "scroll":
|
|
1241
|
+
if (deck)
|
|
1242
|
+
throw new Error("Only a page scrolls.");
|
|
1243
|
+
window.scrollBy({ left: Number(params.x) || 0, top: Number(params.y) || 0 });
|
|
1244
|
+
return;
|
|
1245
|
+
case "mode":
|
|
1246
|
+
if (!deck)
|
|
1247
|
+
throw new Error("Only a deck has modes.");
|
|
1248
|
+
if (root.dataset.mode === "fill")
|
|
1249
|
+
return;
|
|
1250
|
+
root.dataset.mode = params.mode === "overview" || params.mode === "present" ? params.mode : "slide";
|
|
1251
|
+
fit();
|
|
1252
|
+
show(current);
|
|
1253
|
+
return;
|
|
1254
|
+
default:
|
|
1255
|
+
throw new Error(`Unknown method '${method}'.`);
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
const calls = new Map;
|
|
1259
|
+
let called = 0;
|
|
1260
|
+
const alone = window.parent === window;
|
|
1261
|
+
const memory = new Map;
|
|
1262
|
+
const call = (method, params) => {
|
|
1263
|
+
if (alone) {
|
|
1264
|
+
const key = String(params.key);
|
|
1265
|
+
const kept = memory.get(key);
|
|
1266
|
+
switch (method) {
|
|
1267
|
+
case "state.get":
|
|
1268
|
+
return Promise.resolve(kept === undefined ? undefined : JSON.parse(kept));
|
|
1269
|
+
case "state.set":
|
|
1270
|
+
memory.set(key, JSON.stringify(params.value));
|
|
1271
|
+
return Promise.resolve(undefined);
|
|
1272
|
+
case "state.delete":
|
|
1273
|
+
return Promise.resolve(memory.delete(key));
|
|
1274
|
+
default:
|
|
1275
|
+
return Promise.resolve([...memory.keys()].sort());
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
called += 1;
|
|
1279
|
+
const id = called;
|
|
1280
|
+
return new Promise((resolve, reject) => {
|
|
1281
|
+
calls.set(id, { resolve, reject });
|
|
1282
|
+
post({ call: id, method, params });
|
|
1283
|
+
});
|
|
1284
|
+
};
|
|
1285
|
+
const checkKey = (key) => {
|
|
1286
|
+
if (typeof key !== "string" || key.length === 0 || key.length > MAX_KEY_LENGTH || key === "." || key === "..") {
|
|
1287
|
+
throw new TypeError(`sixb.state: a key is text of 1 to ${MAX_KEY_LENGTH} characters.`);
|
|
1288
|
+
}
|
|
1289
|
+
return key;
|
|
1290
|
+
};
|
|
1291
|
+
const state = {
|
|
1292
|
+
get: (key) => Promise.resolve().then(() => call("state.get", { key: checkKey(key) })),
|
|
1293
|
+
set: (key, value) => Promise.resolve().then(() => {
|
|
1294
|
+
const json = JSON.stringify(value);
|
|
1295
|
+
if (json === undefined) {
|
|
1296
|
+
throw new TypeError("sixb.state: a value is JSON: text, a number, true or false, null, a list, or an object.");
|
|
1297
|
+
}
|
|
1298
|
+
if (new TextEncoder().encode(json).byteLength > MAX_VALUE_BYTES) {
|
|
1299
|
+
throw new RangeError(`sixb.state: a value is at most ${MAX_VALUE_BYTES / 1024} KB as JSON.`);
|
|
1300
|
+
}
|
|
1301
|
+
return call("state.set", { key: checkKey(key), value: JSON.parse(json) }).then(() => {});
|
|
1302
|
+
}),
|
|
1303
|
+
delete: (key) => Promise.resolve().then(() => call("state.delete", { key: checkKey(key) })),
|
|
1304
|
+
keys: () => call("state.keys", {})
|
|
1305
|
+
};
|
|
1306
|
+
const readQueryFile = async (name) => {
|
|
1307
|
+
const base = script?.src || new URL("__sixb/runtime.js", window.location.href).href;
|
|
1308
|
+
const response = await fetch(new URL(`queries/${name}.json`, base));
|
|
1309
|
+
if (response.ok)
|
|
1310
|
+
return response.json();
|
|
1311
|
+
if (response.status === 404) {
|
|
1312
|
+
throw new Error(`[Sixb] No query '${name}' in this page's version.`);
|
|
1313
|
+
}
|
|
1314
|
+
const body = await response.json().catch(() => null);
|
|
1315
|
+
throw new Error(typeof body?.error === "string" ? body.error : `[Sixb] Query '${name}' could not be read.`);
|
|
1316
|
+
};
|
|
1317
|
+
const query = (name) => Promise.resolve().then(() => {
|
|
1318
|
+
if (typeof name !== "string" || !QUERY_NAME.test(name)) {
|
|
1319
|
+
throw new TypeError("sixb.query: a query's name is that of its file, queries/<name>.json: lowercase letters, digits and hyphens.");
|
|
1320
|
+
}
|
|
1321
|
+
return alone ? readQueryFile(name) : call("query.run", { name });
|
|
1322
|
+
});
|
|
1323
|
+
Object.defineProperty(window, "sixb", {
|
|
1324
|
+
value: Object.freeze({ state: Object.freeze(state), query }),
|
|
1325
|
+
enumerable: true
|
|
1326
|
+
});
|
|
1327
|
+
window.addEventListener("message", (event) => {
|
|
1328
|
+
if (event.source !== window.parent)
|
|
1329
|
+
return;
|
|
1330
|
+
const data = event.data;
|
|
1331
|
+
if (data && data.protocol === PROTOCOL && typeof data.result === "number") {
|
|
1332
|
+
const pending = calls.get(data.result);
|
|
1333
|
+
calls.delete(data.result);
|
|
1334
|
+
if (typeof data.error === "string")
|
|
1335
|
+
pending?.reject(new Error(data.error));
|
|
1336
|
+
else
|
|
1337
|
+
pending?.resolve(data.value);
|
|
1338
|
+
return;
|
|
1339
|
+
}
|
|
1340
|
+
if (!data || data.protocol !== PROTOCOL || typeof data.id !== "number")
|
|
1341
|
+
return;
|
|
1342
|
+
if (typeof data.method !== "string")
|
|
1343
|
+
return;
|
|
1344
|
+
event.stopImmediatePropagation();
|
|
1345
|
+
const port = event.ports?.[0];
|
|
1346
|
+
if ((data.method === "edit" || data.method === "canvas") && port)
|
|
1347
|
+
appPort = port;
|
|
1348
|
+
try {
|
|
1349
|
+
handle(String(data.method), data.params ?? {});
|
|
1350
|
+
post({ id: data.id });
|
|
1351
|
+
} catch (error) {
|
|
1352
|
+
post({ id: data.id, error: error instanceof Error ? error.message : String(error) });
|
|
1353
|
+
}
|
|
1354
|
+
}, true);
|
|
1355
|
+
window.addEventListener("keydown", (event) => {
|
|
1356
|
+
if (!deck || event.metaKey || event.ctrlKey || event.altKey)
|
|
1357
|
+
return;
|
|
1358
|
+
const target = event.target;
|
|
1359
|
+
if (target?.closest("input, textarea, select, [contenteditable]"))
|
|
1360
|
+
return;
|
|
1361
|
+
if (!KEYS.includes(event.key))
|
|
1362
|
+
return;
|
|
1363
|
+
event.preventDefault();
|
|
1364
|
+
post({ event: "key", params: { key: event.key } });
|
|
1365
|
+
});
|
|
1366
|
+
document.addEventListener("click", (event) => {
|
|
1367
|
+
const target = event.target;
|
|
1368
|
+
const pressed = target?.closest('button, [role="button"], a[href^="#"]');
|
|
1369
|
+
const words = (pressed?.innerText ?? pressed?.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
1370
|
+
if (words && words.length <= MAX_LABEL_LENGTH) {
|
|
1371
|
+
post({ event: "press", params: { text: words } });
|
|
1372
|
+
if (onCanvas && event.isTrusted)
|
|
1373
|
+
postPort({ event: "press", params: { text: words } });
|
|
1374
|
+
}
|
|
1375
|
+
const link = target?.closest("a[href]");
|
|
1376
|
+
if (link) {
|
|
1377
|
+
const href = link.getAttribute("href") ?? "";
|
|
1378
|
+
if (href.startsWith("#") || event.defaultPrevented)
|
|
1379
|
+
return;
|
|
1380
|
+
event.preventDefault();
|
|
1381
|
+
if (/^artifact:/i.test(href.trim())) {
|
|
1382
|
+
post({ event: "open", params: { address: href.trim() } });
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
const url = webAddress(href);
|
|
1386
|
+
if (url)
|
|
1387
|
+
post({ event: "link", params: { url } });
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
if (!deck || root.dataset.mode !== "overview")
|
|
1391
|
+
return;
|
|
1392
|
+
const slide = target?.closest("section.slide");
|
|
1393
|
+
if (!slide)
|
|
1394
|
+
return;
|
|
1395
|
+
post({ event: "select", params: { slide: slides().indexOf(slide) + 1 } });
|
|
1396
|
+
});
|
|
1397
|
+
window.addEventListener("resize", () => {
|
|
1398
|
+
if (deck)
|
|
1399
|
+
fit();
|
|
1400
|
+
reportEmbeds();
|
|
1401
|
+
});
|
|
1402
|
+
const ready = () => {
|
|
1403
|
+
if (!deck) {
|
|
1404
|
+
post({ event: "ready", params: {} });
|
|
1405
|
+
window.addEventListener("scroll", reportEmbeds, { passive: true });
|
|
1406
|
+
const resized = new ResizeObserver(() => {
|
|
1407
|
+
reportSize();
|
|
1408
|
+
reportEmbeds();
|
|
1409
|
+
});
|
|
1410
|
+
resized.observe(document.documentElement);
|
|
1411
|
+
if (document.body)
|
|
1412
|
+
resized.observe(document.body);
|
|
1413
|
+
window.addEventListener("load", () => {
|
|
1414
|
+
reportSize();
|
|
1415
|
+
reportEmbeds();
|
|
1416
|
+
});
|
|
1417
|
+
reportSize();
|
|
1418
|
+
reportEmbeds();
|
|
1419
|
+
return;
|
|
1420
|
+
}
|
|
1421
|
+
slides().forEach((element, index) => {
|
|
1422
|
+
element.dataset.number = String(index + 1);
|
|
1423
|
+
});
|
|
1424
|
+
fit();
|
|
1425
|
+
show(current);
|
|
1426
|
+
post({ event: "ready", params: { slides: slides().length } });
|
|
1427
|
+
const resized = new ResizeObserver(reportEmbeds);
|
|
1428
|
+
for (const element of Array.from(document.querySelectorAll("section.slide > *, sixb-embed"))) {
|
|
1429
|
+
resized.observe(element);
|
|
1430
|
+
}
|
|
1431
|
+
window.addEventListener("load", reportEmbeds);
|
|
1432
|
+
document.fonts?.ready.then(reportEmbeds);
|
|
1433
|
+
};
|
|
1434
|
+
if (document.readyState === "loading")
|
|
1435
|
+
document.addEventListener("DOMContentLoaded", ready);
|
|
1436
|
+
else
|
|
1437
|
+
ready();
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
// src/artifacts/frames/assets.ts
|
|
1441
|
+
var FRAME_CDN_ALLOWLIST2 = [
|
|
1442
|
+
"https://cdn.jsdelivr.net",
|
|
1443
|
+
"https://cdnjs.cloudflare.com",
|
|
1444
|
+
"https://unpkg.com",
|
|
1445
|
+
"https://fonts.googleapis.com",
|
|
1446
|
+
"https://fonts.gstatic.com"
|
|
1447
|
+
];
|
|
1448
|
+
var FRAME_ASSETS2 = {
|
|
1449
|
+
[`${FRAME_ASSET_PREFIX}deck.css`]: { body: FRAME_DECK_CSS, type: "text/css; charset=utf-8" },
|
|
1450
|
+
[`${FRAME_ASSET_PREFIX}page.css`]: { body: FRAME_PAGE_CSS, type: "text/css; charset=utf-8" },
|
|
1451
|
+
[`${FRAME_ASSET_PREFIX}runtime.js`]: {
|
|
1452
|
+
body: `(${frameRuntime.toString()})()
|
|
1453
|
+
`,
|
|
1454
|
+
type: "text/javascript; charset=utf-8"
|
|
1455
|
+
}
|
|
1456
|
+
};
|
|
1457
|
+
function injected(layout, base) {
|
|
1458
|
+
return `<link rel="stylesheet" href="${base}${FRAME_ASSET_PREFIX}${layout}.css"><script src="${base}${FRAME_ASSET_PREFIX}runtime.js" data-sixb-layout="${layout}"></script>`;
|
|
1459
|
+
}
|
|
1460
|
+
function rootOf(entry) {
|
|
1461
|
+
return "../".repeat(entry.split("/").length - 1);
|
|
1462
|
+
}
|
|
1463
|
+
function injectFrameAssets2(html, layout, entry = "index.html") {
|
|
1464
|
+
const assets = injected(layout, rootOf(entry));
|
|
1465
|
+
for (const selector of ["head", "html"]) {
|
|
1466
|
+
let injected = false;
|
|
1467
|
+
const rewritten = new HTMLRewriter().on(selector, {
|
|
1468
|
+
element(element) {
|
|
1469
|
+
if (injected)
|
|
1470
|
+
return;
|
|
1471
|
+
injected = true;
|
|
1472
|
+
element.prepend(assets, { html: true });
|
|
1473
|
+
}
|
|
1474
|
+
}).transform(html);
|
|
1475
|
+
if (injected)
|
|
1476
|
+
return rewritten;
|
|
1477
|
+
}
|
|
1478
|
+
const doctype = /^\s*<!doctype[^>]*>/i.exec(html)?.[0] ?? "";
|
|
1479
|
+
return `${doctype}${assets}${html.slice(doctype.length)}`;
|
|
1480
|
+
}
|
|
1481
|
+
var FRAME_REFERENCE_PREFIX2 = `${FRAME_ASSET_PREFIX}ref/`;
|
|
1482
|
+
var FRAME_REFERENCE_PATH2 = /^([^/@]+)@(\d+|latest)\/(.+)$/;
|
|
1483
|
+
function frameReferencePath(target, entry) {
|
|
1484
|
+
const file = parseArtifactAddress2(target.address)?.path;
|
|
1485
|
+
if (!file)
|
|
1486
|
+
return null;
|
|
1487
|
+
const path = file.split("/").map(encodeURIComponent).join("/");
|
|
1488
|
+
return `${rootOf(entry)}${FRAME_REFERENCE_PREFIX2}${target.artifactId}@${target.version}/${path}`;
|
|
1489
|
+
}
|
|
1490
|
+
function rewriteFrameReferences2(html, targets, entry = "index.html") {
|
|
1491
|
+
return new HTMLRewriter().on("img[src]", {
|
|
1492
|
+
element(element) {
|
|
1493
|
+
const source = decodeHtmlEntities(element.getAttribute("src") ?? "").trim();
|
|
1494
|
+
if (!isArtifactAddress2(source))
|
|
1495
|
+
return;
|
|
1496
|
+
const target = targets.find((candidate) => candidate.address === source);
|
|
1497
|
+
const path = target ? frameReferencePath(target, entry) : null;
|
|
1498
|
+
if (path) {
|
|
1499
|
+
element.setAttribute("src", path);
|
|
1500
|
+
element.setAttribute("data-sixb-ref", "");
|
|
1501
|
+
} else {
|
|
1502
|
+
element.removeAttribute("src");
|
|
1503
|
+
element.setAttribute("data-sixb-ref", "unavailable");
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}).transform(html);
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
// src/objects/serialize.ts
|
|
1510
|
+
function serializeObject2(row) {
|
|
1511
|
+
return {
|
|
1512
|
+
...row.score === undefined ? {} : { score: row.score },
|
|
1513
|
+
primaryId: row.primaryId,
|
|
1514
|
+
objectTypeId: row.objectTypeId,
|
|
1515
|
+
properties: row.properties,
|
|
1516
|
+
...row.redactions === undefined ? {} : { redactions: row.redactions },
|
|
1517
|
+
createdAt: row.createdAt.toISOString(),
|
|
1518
|
+
updatedAt: row.updatedAt.toISOString()
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
function serializeExpandedObject2(row) {
|
|
1522
|
+
const serialized = serializeObject2(row);
|
|
1523
|
+
if (row.links)
|
|
1524
|
+
serialized.links = serializeLinks(row.links);
|
|
1525
|
+
if (row.linkProperties !== undefined)
|
|
1526
|
+
serialized.linkProperties = row.linkProperties;
|
|
1527
|
+
if (row.users)
|
|
1528
|
+
serialized.users = row.users;
|
|
1529
|
+
return serialized;
|
|
1530
|
+
}
|
|
1531
|
+
function serializeLinks(links) {
|
|
1532
|
+
const result = {};
|
|
1533
|
+
for (const [linkId, value] of Object.entries(links)) {
|
|
1534
|
+
result[linkId] = serializeLinkValue(value);
|
|
1535
|
+
}
|
|
1536
|
+
return result;
|
|
1537
|
+
}
|
|
1538
|
+
function serializeLinkValue(value) {
|
|
1539
|
+
if (value === null)
|
|
1540
|
+
return null;
|
|
1541
|
+
if (Array.isArray(value))
|
|
1542
|
+
return value.map(serializeExpandedObject2);
|
|
1543
|
+
return serializeExpandedObject2(value);
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
// src/artifacts/serialize-query.ts
|
|
1547
|
+
function serializeArtifactQueryResult2(result) {
|
|
1548
|
+
return result.kind === "objects" ? { ...result, objects: result.objects.map(serializeExpandedObject2) } : result;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
export { ArtifactRequestError2, checkArtifactFiles, readArtifactText, invalidArtifact, decodeHtmlEntities, HTML_ENTRY2, refuseFrameAssetPaths, readHtmlReferences, FRAME_DEFAULT_THEMES2, FRAME_CDN_ALLOWLIST2, FRAME_ASSETS2, injectFrameAssets2, FRAME_REFERENCE_PREFIX2, FRAME_REFERENCE_PATH2, rewriteFrameReferences2, serializeObject2, serializeExpandedObject2, serializeArtifactQueryResult2 };
|
|
1552
|
+
|
|
1553
|
+
//# debugId=17C01D9E19A6181C64756E2164756E21
|