@sixb/core 0.2.7 → 0.2.8
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 +52 -49
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run/context.d.ts.map +1 -1
- package/dist/actions/run/execute.d.ts +3 -0
- package/dist/actions/run/execute.d.ts.map +1 -1
- package/dist/actions/run/executor.d.ts +3 -0
- package/dist/actions/run/executor.d.ts.map +1 -1
- package/dist/actions/run/normalize.d.ts.map +1 -1
- package/dist/actions/run/types.d.ts +6 -0
- package/dist/actions/run/types.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +7 -0
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/agents/context/entries.d.ts +17 -0
- package/dist/agents/context/entries.d.ts.map +1 -1
- package/dist/agents/context/index.js +3 -2
- package/dist/agents/context/index.js.map +1 -1
- package/dist/agents/context-model.d.ts.map +1 -1
- package/dist/agents/context-resolution.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +7 -0
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/index.js +57 -54
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-call-retry.d.ts +28 -0
- package/dist/agents/model-call-retry.d.ts.map +1 -0
- package/dist/agents/model-loop.d.ts +4 -2
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +2 -0
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-plan.d.ts +1 -1
- package/dist/agents/run-plan.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-wire.d.ts +6 -0
- package/dist/agents/run-session-wire.d.ts.map +1 -1
- package/dist/agents/thread-access.d.ts +13 -0
- package/dist/agents/thread-access.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/artifacts/caller.d.ts +10 -0
- package/dist/artifacts/caller.d.ts.map +1 -0
- package/dist/artifacts/comment-place.d.ts +26 -0
- package/dist/artifacts/comment-place.d.ts.map +1 -0
- package/dist/artifacts/comment-text.d.ts +12 -4
- package/dist/artifacts/comment-text.d.ts.map +1 -1
- package/dist/artifacts/comments.d.ts +8 -2
- package/dist/artifacts/comments.d.ts.map +1 -1
- package/dist/artifacts/errors.d.ts +1 -1
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/execution.d.ts +73 -5
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +27 -7
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/entries.d.ts +5 -4
- package/dist/artifacts/frames/entries.d.ts.map +1 -1
- package/dist/artifacts/frames/hyperframes.d.ts +12 -0
- package/dist/artifacts/frames/hyperframes.d.ts.map +1 -0
- package/dist/artifacts/frames/index.d.ts +3 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +20 -6
- package/dist/artifacts/frames/index.js.map +3 -3
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +33 -0
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/video-runtime.d.ts +21 -0
- package/dist/artifacts/frames/video-runtime.d.ts.map +1 -0
- package/dist/artifacts/html.d.ts +23 -0
- package/dist/artifacts/html.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +5 -3
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +71 -10
- package/dist/artifacts/index.js.map +4 -4
- package/dist/artifacts/kinds.d.ts +1 -1
- package/dist/artifacts/kinds.d.ts.map +1 -1
- package/dist/artifacts/limits.d.ts +37 -0
- package/dist/artifacts/limits.d.ts.map +1 -1
- package/dist/artifacts/live/document.d.ts.map +1 -1
- package/dist/artifacts/live/index.d.ts +6 -2
- package/dist/artifacts/live/index.d.ts.map +1 -1
- package/dist/artifacts/live/index.js +3432 -13
- package/dist/artifacts/live/index.js.map +6 -3
- package/dist/artifacts/live/presence.d.ts +7 -5
- package/dist/artifacts/live/presence.d.ts.map +1 -1
- package/dist/artifacts/live/protocol.d.ts +4 -2
- package/dist/artifacts/live/protocol.d.ts.map +1 -1
- package/dist/artifacts/live/server.d.ts +1 -1
- package/dist/artifacts/live/server.d.ts.map +1 -1
- package/dist/artifacts/live/server.js +36 -31
- package/dist/artifacts/live/server.js.map +1 -1
- package/dist/artifacts/live/state.d.ts +2 -2
- package/dist/artifacts/media/media.d.ts +96 -0
- package/dist/artifacts/media/media.d.ts.map +1 -0
- package/dist/artifacts/media/transcriber.d.ts +29 -0
- package/dist/artifacts/media/transcriber.d.ts.map +1 -0
- package/dist/artifacts/outline.d.ts +26 -1
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/publish/files.d.ts +5 -2
- package/dist/artifacts/publish/files.d.ts.map +1 -1
- package/dist/artifacts/publish/index.d.ts +11 -2
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +110 -33
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/pdf.d.ts.map +1 -1
- package/dist/artifacts/publish/previews.d.ts +7 -2
- package/dist/artifacts/publish/previews.d.ts.map +1 -1
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/html.d.ts +5 -4
- package/dist/artifacts/publish/validate/html.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/video.d.ts +36 -0
- package/dist/artifacts/publish/validate/video.d.ts.map +1 -0
- package/dist/artifacts/publish/video.d.ts +79 -0
- package/dist/artifacts/publish/video.d.ts.map +1 -0
- package/dist/artifacts/resolve.d.ts +9 -0
- package/dist/artifacts/resolve.d.ts.map +1 -1
- package/dist/artifacts/video/composition.d.ts +183 -0
- package/dist/artifacts/video/composition.d.ts.map +1 -0
- package/dist/artifacts/video/edit.d.ts +298 -0
- package/dist/artifacts/video/edit.d.ts.map +1 -0
- package/dist/artifacts/video/export.d.ts +142 -0
- package/dist/artifacts/video/export.d.ts.map +1 -0
- package/dist/artifacts/video/looks.d.ts +133 -0
- package/dist/artifacts/video/looks.d.ts.map +1 -0
- package/dist/artifacts/video/project.d.ts +74 -0
- package/dist/artifacts/video/project.d.ts.map +1 -0
- package/dist/artifacts/video/stills.d.ts +65 -0
- package/dist/artifacts/video/stills.d.ts.map +1 -0
- package/dist/artifacts/video/timeline.d.ts +153 -0
- package/dist/artifacts/video/timeline.d.ts.map +1 -0
- package/dist/auth/index.js +9 -8
- package/dist/auth/index.js.map +1 -1
- package/dist/authorization/index.js +5 -4
- package/dist/authorization/index.js.map +1 -1
- package/dist/blob-storage/browser.d.ts +1 -1
- package/dist/blob-storage/browser.d.ts.map +1 -1
- package/dist/blob-storage/browser.js +8 -4
- package/dist/blob-storage/browser.js.map +1 -1
- package/dist/blob-storage/constants.d.ts +8 -3
- package/dist/blob-storage/constants.d.ts.map +1 -1
- package/dist/blob-storage/download-urls.d.ts +2 -2
- package/dist/blob-storage/download-urls.d.ts.map +1 -1
- package/dist/blob-storage/index.d.ts +1 -1
- package/dist/blob-storage/index.d.ts.map +1 -1
- package/dist/blob-storage/index.js +9 -5
- package/dist/blob-storage/index.js.map +1 -1
- package/dist/blob-storage/internal.d.ts +2 -2
- package/dist/blob-storage/internal.d.ts.map +1 -1
- package/dist/blob-storage/internal.js +10 -4
- package/dist/blob-storage/internal.js.map +1 -1
- package/dist/blob-storage/media-type.d.ts +12 -3
- package/dist/blob-storage/media-type.d.ts.map +1 -1
- package/dist/bootstrap/index.js +61 -58
- package/dist/bootstrap/index.js.map +2 -2
- package/dist/{chunk-az95tsh3.js → chunk-0fjryajn.js} +3 -2
- package/dist/chunk-0fjryajn.js.map +11 -0
- package/dist/{chunk-9tpmfh3n.js → chunk-0mk8qqp9.js} +3 -3
- package/dist/{chunk-9tpmfh3n.js.map → chunk-0mk8qqp9.js.map} +3 -3
- package/dist/{chunk-88xeh6zx.js → chunk-1g4me5f2.js} +182 -7
- package/dist/{chunk-88xeh6zx.js.map → chunk-1g4me5f2.js.map} +3 -3
- package/dist/{chunk-7mhbs9yy.js → chunk-1z8ccj53.js} +1 -1
- package/dist/{chunk-wkv3h3q7.js → chunk-2138b0ng.js} +115 -8
- package/dist/chunk-2138b0ng.js.map +12 -0
- package/dist/chunk-23eaayw4.js +3757 -0
- package/dist/chunk-23eaayw4.js.map +22 -0
- package/dist/{chunk-m1cwncee.js → chunk-2mxq1yd9.js} +45 -40
- package/dist/{chunk-m1cwncee.js.map → chunk-2mxq1yd9.js.map} +3 -3
- package/dist/{chunk-dmnd9ea6.js → chunk-30a0ftnm.js} +2 -2
- package/dist/chunk-389ybvw9.js.map +2 -2
- package/dist/{chunk-qbd282aa.js → chunk-39q9ybav.js} +2 -2
- package/dist/{chunk-06kpaqg4.js → chunk-3d9w8t4n.js} +110 -22
- package/dist/{chunk-06kpaqg4.js.map → chunk-3d9w8t4n.js.map} +5 -5
- package/dist/chunk-3dvcdn9w.js +8 -0
- package/dist/chunk-3dvcdn9w.js.map +10 -0
- package/dist/{chunk-fdk0ks9p.js → chunk-3x902cja.js} +3 -3
- package/dist/{chunk-c4nrycdy.js → chunk-4q4a5a96.js} +1 -1
- package/dist/{chunk-9cyq87qa.js → chunk-4tdm3fsj.js} +95 -32
- package/dist/{chunk-9cyq87qa.js.map → chunk-4tdm3fsj.js.map} +9 -9
- package/dist/{chunk-cpy282b8.js → chunk-4w8qzy9w.js} +6 -6
- package/dist/{chunk-c29729me.js → chunk-4z9xtxke.js} +8 -7
- package/dist/chunk-4z9xtxke.js.map +12 -0
- package/dist/chunk-5278qwax.js +270 -0
- package/dist/chunk-5278qwax.js.map +11 -0
- package/dist/{chunk-k1g14kk3.js → chunk-6a4hp405.js} +4 -5
- package/dist/{chunk-k1g14kk3.js.map → chunk-6a4hp405.js.map} +3 -3
- package/dist/{chunk-xavet0qs.js → chunk-6whr25gw.js} +2 -2
- package/dist/{chunk-mbwsgjn7.js → chunk-7zygtcqq.js} +14 -2
- package/dist/chunk-7zygtcqq.js.map +11 -0
- package/dist/chunk-88s9z5pf.js +3 -0
- package/dist/{chunk-de5sfbc3.js.map → chunk-88s9z5pf.js.map} +1 -1
- package/dist/{chunk-ygvay56w.js → chunk-896te58g.js} +2 -2
- package/dist/{chunk-pfdq1ga6.js → chunk-8eqqqc1h.js} +3 -3
- package/dist/{chunk-yyj009tv.js → chunk-8tefbhdx.js} +14 -14
- package/dist/{chunk-yyj009tv.js.map → chunk-8tefbhdx.js.map} +1 -1
- package/dist/{chunk-jka26v8c.js → chunk-8x1bsp68.js} +1 -1
- package/dist/{chunk-wzcjhv54.js → chunk-93e4w7te.js} +113 -1
- package/dist/chunk-93e4w7te.js.map +11 -0
- package/dist/{chunk-phs5fbff.js → chunk-990a5bkc.js} +424 -76
- package/dist/chunk-990a5bkc.js.map +21 -0
- package/dist/{chunk-6md802cc.js → chunk-9az7kjv4.js} +6 -6
- package/dist/{chunk-95ps0k5q.js → chunk-9e5t53z0.js} +1 -1
- package/dist/{chunk-js9e6487.js → chunk-9p7kyeqz.js} +4 -4
- package/dist/chunk-a68zz4r0.js +537 -0
- package/dist/chunk-a68zz4r0.js.map +11 -0
- package/dist/{chunk-d7vyc7k6.js → chunk-a700gjc8.js} +10 -2
- package/dist/chunk-a700gjc8.js.map +10 -0
- package/dist/{chunk-gfdh9kqa.js → chunk-a9qzjaz2.js} +2 -5
- package/dist/chunk-a9qzjaz2.js.map +10 -0
- package/dist/{chunk-8qmp9fpa.js → chunk-as94vcty.js} +619 -482
- package/dist/{chunk-8qmp9fpa.js.map → chunk-as94vcty.js.map} +19 -19
- package/dist/{chunk-brybqw5k.js → chunk-bkxm2dzx.js} +1 -1
- package/dist/{chunk-ppxf7gw2.js → chunk-d7t9jnym.js} +3 -3
- package/dist/{chunk-tapdssb5.js → chunk-e3b1r4d2.js} +8 -7
- package/dist/{chunk-tapdssb5.js.map → chunk-e3b1r4d2.js.map} +4 -4
- package/dist/{chunk-cg7cygfj.js → chunk-fdmvaz7x.js} +1 -1
- package/dist/{chunk-191jz8a6.js → chunk-ff0qdk7z.js} +1 -1
- package/dist/{chunk-9vsc919v.js → chunk-fgxvrxx4.js} +22 -2
- package/dist/chunk-fgxvrxx4.js.map +10 -0
- package/dist/{chunk-wx7smkn2.js → chunk-fq8drkp0.js} +1 -1
- package/dist/{chunk-60662fyv.js → chunk-fqms1a8c.js} +132 -4
- package/dist/{chunk-60662fyv.js.map → chunk-fqms1a8c.js.map} +8 -6
- package/dist/{chunk-v8a1qjzp.js → chunk-hpswfrjj.js} +1 -1
- package/dist/{chunk-qttqe1ah.js → chunk-jbg905hn.js} +80 -13
- package/dist/chunk-jbg905hn.js.map +25 -0
- package/dist/{chunk-bz5bnjjt.js → chunk-jjte0h4p.js} +1 -1
- package/dist/{chunk-hvq8xs66.js → chunk-jwjwvzj1.js} +797 -51
- package/dist/chunk-jwjwvzj1.js.map +38 -0
- package/dist/{chunk-k29rdc3h.js → chunk-k3vd2vyz.js} +6 -2
- package/dist/chunk-k3vd2vyz.js.map +10 -0
- package/dist/chunk-kcqpk9w1.js.map +2 -2
- package/dist/chunk-mvz89age.js.map +2 -2
- package/dist/{chunk-xrmbhap8.js → chunk-mwg0nwkb.js} +1 -1
- package/dist/{chunk-a3faa34j.js → chunk-nfjt8k8j.js} +1 -1
- package/dist/{chunk-394zjzjs.js → chunk-nhgqz3g3.js} +3 -3
- package/dist/{chunk-bqr703h4.js → chunk-p0c5kkhn.js} +23 -6
- package/dist/{chunk-bqr703h4.js.map → chunk-p0c5kkhn.js.map} +3 -3
- package/dist/{chunk-92wrka15.js → chunk-q150fnj9.js} +1 -1
- package/dist/{chunk-w3t94hm6.js → chunk-qk3zq25v.js} +1 -1
- package/dist/chunk-rtkqczbr.js.map +2 -2
- package/dist/{chunk-3qtk0070.js → chunk-ssqbrts1.js} +86 -9
- package/dist/chunk-ssqbrts1.js.map +14 -0
- package/dist/{chunk-5qqmndhm.js → chunk-szzhrn3e.js} +1 -1
- package/dist/{chunk-n1hbwc6y.js → chunk-t6pfch4e.js} +1 -1
- package/dist/{chunk-xtztwpkh.js → chunk-v6h4tc2v.js} +86 -5
- package/dist/chunk-v6h4tc2v.js.map +12 -0
- package/dist/{chunk-brhp9d97.js → chunk-vmqjndb3.js} +2 -2
- package/dist/chunk-vtjzwymr.js.map +2 -2
- package/dist/{chunk-fycac8e9.js → chunk-wpba6hhd.js} +10 -10
- package/dist/{chunk-fycac8e9.js.map → chunk-wpba6hhd.js.map} +1 -1
- package/dist/{chunk-t58sktr5.js → chunk-wrb1x1ss.js} +2 -2
- package/dist/{chunk-5sswe5ej.js → chunk-wsv23wvr.js} +2 -2
- package/dist/{chunk-04r2fdsd.js → chunk-x0hqc54n.js} +4 -4
- package/dist/{chunk-sgx82nnt.js → chunk-xg31er4p.js} +43 -4
- package/dist/chunk-xg31er4p.js.map +10 -0
- package/dist/{chunk-3neam1y5.js → chunk-y3qb965a.js} +2 -2
- package/dist/{chunk-5pz3htbe.js → chunk-y57eawng.js} +3 -3
- package/dist/{chunk-8ncg20rd.js → chunk-yah25st6.js} +5 -5
- package/dist/chunk-yah25st6.js.map +10 -0
- package/dist/{chunk-mrs7jy17.js → chunk-ywvxcmqj.js} +106 -13
- package/dist/{chunk-mrs7jy17.js.map → chunk-ywvxcmqj.js.map} +8 -7
- package/dist/{chunk-44hrfmbk.js → chunk-zmq9xc9s.js} +70 -31
- package/dist/{chunk-44hrfmbk.js.map → chunk-zmq9xc9s.js.map} +4 -3
- package/dist/datasets/write.js +8 -7
- package/dist/datasets/write.js.map +1 -1
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/execution/agent.js +52 -49
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/kernel-operation.d.ts +1 -0
- package/dist/execution/kernel-operation.d.ts.map +1 -1
- package/dist/execution/primitive.js +52 -49
- package/dist/execution/primitive.js.map +1 -1
- package/dist/execution/request.js +53 -50
- package/dist/execution/request.js.map +2 -2
- package/dist/execution/types.d.ts +5 -0
- package/dist/execution/types.d.ts.map +1 -1
- package/dist/http/api-routes.d.ts.map +1 -1
- package/dist/http/index.js +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -65
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +9 -8
- package/dist/lake-storage/index.js.map +1 -1
- package/dist/maintenance/index.js +9 -8
- package/dist/maintenance/index.js.map +2 -2
- package/dist/materializer/index.js +26 -24
- package/dist/materializer/index.js.map +1 -1
- package/dist/models/audio/runtime.d.ts +3 -1
- package/dist/models/audio/runtime.d.ts.map +1 -1
- package/dist/models/audio/speech.d.ts +2 -2
- package/dist/models/audio/speech.d.ts.map +1 -1
- package/dist/models/audio/types.d.ts +23 -3
- package/dist/models/audio/types.d.ts.map +1 -1
- package/dist/models/calls.d.ts +7 -0
- package/dist/models/calls.d.ts.map +1 -1
- package/dist/models/catalog.d.ts +5 -0
- package/dist/models/catalog.d.ts.map +1 -1
- package/dist/models/definitions.d.ts +3 -2
- package/dist/models/definitions.d.ts.map +1 -1
- package/dist/models/errors.d.ts +5 -3
- package/dist/models/errors.d.ts.map +1 -1
- package/dist/models/events.d.ts +2 -0
- package/dist/models/events.d.ts.map +1 -1
- package/dist/models/execution/index.d.ts +1 -0
- package/dist/models/execution/index.d.ts.map +1 -1
- package/dist/models/execution/index.js +33 -28
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/execution/model-call-limits.d.ts.map +1 -1
- package/dist/models/execution/model-call-recorder.d.ts +8 -0
- package/dist/models/execution/model-call-recorder.d.ts.map +1 -1
- package/dist/models/execution/session.d.ts +12 -0
- package/dist/models/execution/session.d.ts.map +1 -1
- package/dist/models/execution/usage.d.ts.map +1 -1
- package/dist/models/execution.d.ts +1 -1
- package/dist/models/execution.d.ts.map +1 -1
- package/dist/models/generation-types.d.ts +2 -0
- package/dist/models/generation-types.d.ts.map +1 -1
- package/dist/models/index.d.ts +4 -2
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +2 -2
- package/dist/models/input-file.d.ts.map +1 -1
- package/dist/models/pricing.d.ts +2 -1
- package/dist/models/pricing.d.ts.map +1 -1
- package/dist/models/rate-card.d.ts +6 -0
- package/dist/models/rate-card.d.ts.map +1 -1
- package/dist/models/tools.d.ts +5 -0
- package/dist/models/tools.d.ts.map +1 -1
- package/dist/models/video/catalog.d.ts +13 -0
- package/dist/models/video/catalog.d.ts.map +1 -0
- package/dist/models/video/check.d.ts +76 -0
- package/dist/models/video/check.d.ts.map +1 -0
- package/dist/models/video/runtime.d.ts +21 -0
- package/dist/models/video/runtime.d.ts.map +1 -0
- package/dist/models/video/types.d.ts +188 -0
- package/dist/models/video/types.d.ts.map +1 -0
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +52 -49
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/index.js +25 -23
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/ontology/index.js +4 -4
- package/dist/ontology/internal.js +4 -4
- package/dist/pipelines/index.js +28 -26
- package/dist/pipelines/index.js.map +1 -1
- package/dist/projections/internal.js +26 -24
- package/dist/projections/internal.js.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/types.d.ts +103 -6
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +3 -1
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +49 -43
- package/dist/runtime/internal.js.map +2 -2
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/sandboxes/index.js +6 -6
- package/dist/security/public.d.ts +6 -4
- package/dist/security/public.d.ts.map +1 -1
- package/dist/security/public.js +5 -3
- package/dist/security/public.js.map +1 -1
- package/dist/shares/internal.js +25 -23
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/agents/in-memory.d.ts +2 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +1 -1
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +4 -4
- package/dist/storage/agents/types.d.ts +13 -0
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/analytics.d.ts +1 -0
- package/dist/storage/ai-cost/analytics.d.ts.map +1 -1
- package/dist/storage/ai-cost/groups.d.ts +2 -0
- package/dist/storage/ai-cost/groups.d.ts.map +1 -1
- package/dist/storage/ai-cost/provider.js +5 -5
- package/dist/storage/ai-cost/types.d.ts +2 -1
- package/dist/storage/ai-cost/types.d.ts.map +1 -1
- package/dist/storage/ai-cost/validation.d.ts.map +1 -1
- package/dist/storage/ai-limits/enforcement.js +3 -3
- package/dist/storage/ai-limits/provider.js +2 -2
- package/dist/storage/ai-usage/in-memory.d.ts +8 -1
- package/dist/storage/ai-usage/in-memory.d.ts.map +1 -1
- package/dist/storage/ai-usage/index.d.ts +2 -2
- package/dist/storage/ai-usage/index.d.ts.map +1 -1
- package/dist/storage/ai-usage/record.d.ts +11 -1
- package/dist/storage/ai-usage/record.d.ts.map +1 -1
- package/dist/storage/ai-usage/types.d.ts +80 -1
- package/dist/storage/ai-usage/types.d.ts.map +1 -1
- package/dist/storage/ai-usage/usage.d.ts +1 -1
- package/dist/storage/ai-usage/usage.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +25 -2
- 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 +12 -1
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +198 -6
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +3 -2
- package/dist/storage/executions/provider.js.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +10 -9
- package/dist/storage/file-upload-sessions/provider.js.map +1 -1
- package/dist/storage/in-memory/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +24 -22
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +2 -2
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +34 -14
- package/dist/storage/internal.js.map +2 -2
- package/dist/storage/workflow-runs/provider.js +10 -9
- package/dist/storage/workflow-runs/provider.js.map +1 -1
- package/dist/syncs/index.js +29 -27
- package/dist/syncs/index.js.map +1 -1
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-cost-storage-contract.d.ts.map +1 -1
- package/dist/testing/ai-usage-storage-contract.d.ts.map +1 -1
- package/dist/testing/artifact-storage-contract.d.ts +3 -0
- package/dist/testing/artifact-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution-storage-contract.d.ts.map +1 -1
- package/dist/testing/index.js +619 -72
- package/dist/testing/index.js.map +9 -9
- package/dist/testing/lake-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/webhooks/internal.js +26 -24
- package/dist/webhooks/internal.js.map +2 -2
- package/dist/workers/index.js +5 -5
- package/dist/workers/index.js.map +1 -1
- package/dist/workflows/index.js +58 -55
- package/dist/workflows/index.js.map +1 -1
- package/package.json +3 -1
- package/src/actions/request.ts +2 -0
- package/src/actions/run/context.ts +1 -0
- package/src/actions/run/execute.ts +5 -1
- package/src/actions/run/executor.ts +4 -0
- package/src/actions/run/normalize.ts +4 -0
- package/src/actions/run/types.ts +6 -0
- package/src/actions/types/context.ts +7 -0
- package/src/agents/README.md +3 -1
- package/src/agents/context/entries.ts +63 -9
- package/src/agents/context-model.ts +9 -0
- package/src/agents/context-resolution.ts +7 -0
- package/src/agents/execution.ts +39 -0
- package/src/agents/model-call-retry.ts +69 -0
- package/src/agents/model-loop.ts +86 -12
- package/src/agents/run-artifacts.ts +10 -5
- package/src/agents/run-plan.ts +2 -1
- package/src/agents/run-session-http.ts +1 -0
- package/src/agents/run-session-serve.ts +23 -2
- package/src/agents/run-session-wire.ts +45 -0
- package/src/agents/thread-access.ts +34 -1
- package/src/agents/tool-files.ts +23 -7
- package/src/artifacts/caller.ts +42 -0
- package/src/artifacts/comment-place.ts +51 -0
- package/src/artifacts/comment-text.ts +50 -7
- package/src/artifacts/comments.ts +132 -34
- package/src/artifacts/errors.ts +1 -0
- package/src/artifacts/execution.ts +249 -5
- package/src/artifacts/frames/assets.ts +93 -15
- package/src/artifacts/frames/entries.ts +7 -4
- package/src/artifacts/frames/generated/hyperframes-notices.txt +290 -0
- package/src/artifacts/frames/generated/hyperframes.txt +1145 -0
- package/src/artifacts/frames/generated.d.ts +5 -0
- package/src/artifacts/frames/hyperframes.ts +14 -0
- package/src/artifacts/frames/index.ts +5 -0
- package/src/artifacts/frames/kit.ts +7 -3
- package/src/artifacts/frames/protocol.ts +56 -0
- package/src/artifacts/frames/video-runtime.ts +165 -0
- package/src/artifacts/html.ts +13 -0
- package/src/artifacts/index.ts +7 -0
- package/src/artifacts/kinds.ts +9 -1
- package/src/artifacts/limits.ts +43 -0
- package/src/artifacts/live/document.ts +27 -3
- package/src/artifacts/live/index.ts +58 -2
- package/src/artifacts/live/presence.ts +17 -5
- package/src/artifacts/live/protocol.ts +4 -2
- package/src/artifacts/live/server.ts +1 -1
- package/src/artifacts/live/state.ts +3 -3
- package/src/artifacts/media/README.md +75 -0
- package/src/artifacts/media/media.ts +316 -0
- package/src/artifacts/media/transcriber.ts +84 -0
- package/src/artifacts/outline.ts +28 -0
- package/src/artifacts/publish/files.ts +19 -6
- package/src/artifacts/publish/index.ts +49 -2
- package/src/artifacts/publish/pdf.ts +3 -1
- package/src/artifacts/publish/previews.ts +22 -8
- package/src/artifacts/publish/publish.ts +4 -1
- package/src/artifacts/publish/validate/html.ts +23 -18
- package/src/artifacts/publish/validate/video.ts +309 -0
- package/src/artifacts/publish/video.ts +235 -0
- package/src/artifacts/resolve.ts +45 -0
- package/src/artifacts/video/README.md +402 -0
- package/src/artifacts/video/composition.ts +898 -0
- package/src/artifacts/video/edit.ts +3967 -0
- package/src/artifacts/video/export.ts +352 -0
- package/src/artifacts/video/looks.ts +694 -0
- package/src/artifacts/video/project.ts +198 -0
- package/src/artifacts/video/stills.ts +168 -0
- package/src/artifacts/video/timeline.ts +658 -0
- package/src/blob-storage/browser.ts +1 -1
- package/src/blob-storage/constants.ts +9 -3
- package/src/blob-storage/download-urls.ts +5 -3
- package/src/blob-storage/index.ts +1 -0
- package/src/blob-storage/internal.ts +13 -2
- package/src/blob-storage/media-type.ts +149 -8
- package/src/errors/catalog.ts +2 -1
- package/src/execution/authorization.ts +2 -2
- package/src/execution/kernel-operation.ts +14 -0
- package/src/execution/types.ts +2 -0
- package/src/http/api-routes.ts +117 -0
- package/src/index.ts +18 -1
- package/src/lake-storage/definition-updates.ts +3 -9
- package/src/models/audio/runtime.ts +48 -3
- package/src/models/audio/speech.ts +2 -2
- package/src/models/audio/types.ts +24 -3
- package/src/models/calls.ts +35 -18
- package/src/models/catalog.ts +9 -2
- package/src/models/definitions.ts +4 -2
- package/src/models/errors.ts +5 -3
- package/src/models/events.ts +2 -0
- package/src/models/execution/README.md +68 -2
- package/src/models/execution/index.ts +1 -0
- package/src/models/execution/model-call-limits.ts +11 -5
- package/src/models/execution/model-call-recorder.ts +14 -0
- package/src/models/execution/session.ts +52 -23
- package/src/models/execution/usage.ts +1 -0
- package/src/models/execution.ts +13 -2
- package/src/models/generation-types.ts +2 -0
- package/src/models/index.ts +20 -1
- package/src/models/input-file.ts +7 -2
- package/src/models/pricing.ts +19 -1
- package/src/models/rate-card.ts +15 -3
- package/src/models/tools.ts +5 -0
- package/src/models/video/catalog.ts +101 -0
- package/src/models/video/check.ts +441 -0
- package/src/models/video/runtime.ts +550 -0
- package/src/models/video/types.ts +194 -0
- package/src/objects/execution.ts +2 -0
- package/src/objects/sdk/object-set.ts +2 -0
- package/src/queues/index.ts +5 -0
- package/src/queues/types.ts +126 -5
- package/src/runtime/host.ts +3 -0
- package/src/runtime/internal.ts +3 -1
- package/src/runtime/sixb.ts +12 -4
- package/src/sandboxes/README.md +3 -2
- package/src/security/public.ts +6 -4
- package/src/storage/agents/in-memory.ts +39 -0
- package/src/storage/agents/index.ts +1 -0
- package/src/storage/agents/types.ts +14 -0
- package/src/storage/ai-cost/analytics.ts +2 -0
- package/src/storage/ai-cost/codec.ts +1 -0
- package/src/storage/ai-cost/groups.ts +7 -0
- package/src/storage/ai-cost/types.ts +2 -0
- package/src/storage/ai-cost/validation.ts +2 -0
- package/src/storage/ai-usage/in-memory.ts +93 -0
- package/src/storage/ai-usage/index.ts +10 -0
- package/src/storage/ai-usage/record.ts +106 -0
- package/src/storage/ai-usage/types.ts +102 -1
- package/src/storage/ai-usage/usage.ts +2 -0
- package/src/storage/artifacts/in-memory.ts +108 -11
- package/src/storage/artifacts/index.ts +14 -0
- package/src/storage/artifacts/record.ts +203 -1
- package/src/storage/artifacts/types.ts +199 -6
- package/src/storage/executions/validation.ts +2 -2
- package/src/storage/in-memory/index.ts +1 -1
- package/src/storage/index.ts +22 -1
- package/src/storage/internal.ts +9 -0
- package/src/testing/agent-storage-contract.ts +108 -0
- package/src/testing/ai-cost-storage-contract.ts +1 -0
- package/src/testing/ai-usage-storage-contract.ts +145 -1
- package/src/testing/artifact-storage-contract.ts +320 -0
- package/src/testing/execution-storage-contract.ts +10 -2
- package/src/testing/lake-storage-contract.ts +27 -0
- package/src/testing/queues-contract.ts +71 -0
- package/dist/chunk-3723kgba.js +0 -29
- package/dist/chunk-3723kgba.js.map +0 -10
- package/dist/chunk-3qtk0070.js.map +0 -14
- package/dist/chunk-8ncg20rd.js.map +0 -10
- package/dist/chunk-9vsc919v.js.map +0 -10
- package/dist/chunk-az95tsh3.js.map +0 -11
- package/dist/chunk-c29729me.js.map +0 -12
- package/dist/chunk-d7vyc7k6.js.map +0 -10
- package/dist/chunk-de5sfbc3.js +0 -3
- package/dist/chunk-gfdh9kqa.js.map +0 -11
- package/dist/chunk-hvq8xs66.js.map +0 -34
- package/dist/chunk-k29rdc3h.js.map +0 -10
- package/dist/chunk-mbwsgjn7.js.map +0 -11
- package/dist/chunk-phs5fbff.js.map +0 -19
- package/dist/chunk-qttqe1ah.js.map +0 -24
- package/dist/chunk-sgx82nnt.js.map +0 -10
- package/dist/chunk-vs2s3p8n.js +0 -2274
- package/dist/chunk-vs2s3p8n.js.map +0 -20
- package/dist/chunk-wkv3h3q7.js.map +0 -12
- package/dist/chunk-wzcjhv54.js.map +0 -11
- package/dist/chunk-xtztwpkh.js.map +0 -12
- /package/dist/{chunk-7mhbs9yy.js.map → chunk-1z8ccj53.js.map} +0 -0
- /package/dist/{chunk-dmnd9ea6.js.map → chunk-30a0ftnm.js.map} +0 -0
- /package/dist/{chunk-qbd282aa.js.map → chunk-39q9ybav.js.map} +0 -0
- /package/dist/{chunk-fdk0ks9p.js.map → chunk-3x902cja.js.map} +0 -0
- /package/dist/{chunk-c4nrycdy.js.map → chunk-4q4a5a96.js.map} +0 -0
- /package/dist/{chunk-cpy282b8.js.map → chunk-4w8qzy9w.js.map} +0 -0
- /package/dist/{chunk-xavet0qs.js.map → chunk-6whr25gw.js.map} +0 -0
- /package/dist/{chunk-ygvay56w.js.map → chunk-896te58g.js.map} +0 -0
- /package/dist/{chunk-pfdq1ga6.js.map → chunk-8eqqqc1h.js.map} +0 -0
- /package/dist/{chunk-jka26v8c.js.map → chunk-8x1bsp68.js.map} +0 -0
- /package/dist/{chunk-6md802cc.js.map → chunk-9az7kjv4.js.map} +0 -0
- /package/dist/{chunk-95ps0k5q.js.map → chunk-9e5t53z0.js.map} +0 -0
- /package/dist/{chunk-js9e6487.js.map → chunk-9p7kyeqz.js.map} +0 -0
- /package/dist/{chunk-brybqw5k.js.map → chunk-bkxm2dzx.js.map} +0 -0
- /package/dist/{chunk-ppxf7gw2.js.map → chunk-d7t9jnym.js.map} +0 -0
- /package/dist/{chunk-cg7cygfj.js.map → chunk-fdmvaz7x.js.map} +0 -0
- /package/dist/{chunk-191jz8a6.js.map → chunk-ff0qdk7z.js.map} +0 -0
- /package/dist/{chunk-wx7smkn2.js.map → chunk-fq8drkp0.js.map} +0 -0
- /package/dist/{chunk-v8a1qjzp.js.map → chunk-hpswfrjj.js.map} +0 -0
- /package/dist/{chunk-bz5bnjjt.js.map → chunk-jjte0h4p.js.map} +0 -0
- /package/dist/{chunk-xrmbhap8.js.map → chunk-mwg0nwkb.js.map} +0 -0
- /package/dist/{chunk-a3faa34j.js.map → chunk-nfjt8k8j.js.map} +0 -0
- /package/dist/{chunk-394zjzjs.js.map → chunk-nhgqz3g3.js.map} +0 -0
- /package/dist/{chunk-92wrka15.js.map → chunk-q150fnj9.js.map} +0 -0
- /package/dist/{chunk-w3t94hm6.js.map → chunk-qk3zq25v.js.map} +0 -0
- /package/dist/{chunk-5qqmndhm.js.map → chunk-szzhrn3e.js.map} +0 -0
- /package/dist/{chunk-n1hbwc6y.js.map → chunk-t6pfch4e.js.map} +0 -0
- /package/dist/{chunk-brhp9d97.js.map → chunk-vmqjndb3.js.map} +0 -0
- /package/dist/{chunk-t58sktr5.js.map → chunk-wrb1x1ss.js.map} +0 -0
- /package/dist/{chunk-5sswe5ej.js.map → chunk-wsv23wvr.js.map} +0 -0
- /package/dist/{chunk-04r2fdsd.js.map → chunk-x0hqc54n.js.map} +0 -0
- /package/dist/{chunk-3neam1y5.js.map → chunk-y3qb965a.js.map} +0 -0
- /package/dist/{chunk-5pz3htbe.js.map → chunk-y57eawng.js.map} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The runtime a video's frame injects in place of `frameRuntime`, before HyperFrames' own, which
|
|
3
|
+
* plays the video and answers the app's controls to it (`hf-parent`). It is served as this
|
|
4
|
+
* function's own source, `(${videoFrameRuntime})()`, so it names nothing outside itself: the
|
|
5
|
+
* protocol string repeats what `protocol.ts` declares, and a test holds the two together.
|
|
6
|
+
*
|
|
7
|
+
* A video's frame shares none of a page's: no kit, no theme, no links or embeds, as a video looks
|
|
8
|
+
* as it renders, in its own colors. This one only speaks the frame protocol's little a video needs:
|
|
9
|
+
*
|
|
10
|
+
* - It says the frame is ready, or that the video cannot start: HyperFrames' runtime did not load,
|
|
11
|
+
* or stopped at its startup. Waiting for a timeline either would never build helps no one.
|
|
12
|
+
* - It answers the app's requests: `theme` it takes and leaves the video as it is, `reload` loads
|
|
13
|
+
* the page again, `video.pick` finds the words under a point of the picture for the editor to
|
|
14
|
+
* type over, and any other it refuses.
|
|
15
|
+
* - On a phone, the reader's tap on play reaches the frame as the app's message, and WebKit lets
|
|
16
|
+
* only what that moment starts make a sound: the first play starts and stops every recording
|
|
17
|
+
* the page holds then, so that each may play later, when its scene comes, as HyperFrames' own
|
|
18
|
+
* player does.
|
|
19
|
+
*/
|
|
20
|
+
export declare function videoFrameRuntime(): void;
|
|
21
|
+
//# sourceMappingURL=video-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-runtime.d.ts","sourceRoot":"","sources":["../../../src/artifacts/frames/video-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAiJxC"}
|
package/dist/artifacts/html.d.ts
CHANGED
|
@@ -3,4 +3,27 @@
|
|
|
3
3
|
* HTML, entities included, so `artifact:…#Q3%20&%20Q4` must read `&` before it is resolved.
|
|
4
4
|
*/
|
|
5
5
|
export declare function decodeHtmlEntities(value: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Where HTML shows or plays a file: each element and the attribute that names the file. A file of
|
|
8
|
+
* another artifact is an `artifact:` address in one of them, which a frame serves as its own.
|
|
9
|
+
*/
|
|
10
|
+
export declare const HTML_FILE_ATTRIBUTES: readonly [{
|
|
11
|
+
readonly element: "img";
|
|
12
|
+
readonly attribute: "src";
|
|
13
|
+
}, {
|
|
14
|
+
readonly element: "video";
|
|
15
|
+
readonly attribute: "src";
|
|
16
|
+
}, {
|
|
17
|
+
readonly element: "video";
|
|
18
|
+
readonly attribute: "poster";
|
|
19
|
+
}, {
|
|
20
|
+
readonly element: "audio";
|
|
21
|
+
readonly attribute: "src";
|
|
22
|
+
}, {
|
|
23
|
+
readonly element: "source";
|
|
24
|
+
readonly attribute: "src";
|
|
25
|
+
}, {
|
|
26
|
+
readonly element: "track";
|
|
27
|
+
readonly attribute: "src";
|
|
28
|
+
}];
|
|
6
29
|
//# sourceMappingURL=html.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/artifacts/html.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWxD"}
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../src/artifacts/html.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAWxD;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAOvB,CAAA"}
|
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
export { type ArtifactAddress, type CellRange, formatArtifactAddress, isArtifactAddress, parseArtifactAddress, parseSheetPart, type SheetPart, } from "./address";
|
|
8
8
|
export { CANVAS_FILE, type Canvas, type CanvasArrow, type CanvasBoard, type CanvasEmbed, type CanvasEnd, type CanvasItem, type CanvasNote, type CanvasSection, type CanvasShape, type CanvasShapeItem, type CanvasText, type CanvasTextSize, formatCanvas, parseCanvas, } from "./canvas";
|
|
9
9
|
export { BOARD_PREVIEW_WAIT_MS, CANVAS_FIT_PADDING, CANVAS_TEXT_PIXELS, type CanvasBox, type CanvasPoint, canvasArrowLine, canvasNoteFontSize, canvasShapeFontSize, SMALL_BOARD_PREVIEW_WIDTH, } from "./canvas-display";
|
|
10
|
+
export { placeVideoComment, type VideoCommentPlace, videoSceneAt } from "./comment-place";
|
|
10
11
|
export { quoteArtifactComment } from "./comment-text";
|
|
11
12
|
export { CsvParseError, type CsvTable, formatCsv, parseCsv } from "./csv";
|
|
12
13
|
export { checkFormula, columnFormulaType, evaluateComputedColumns, FORMULA_ERRORS, FormulaCycleError, type FormulaErrorCode, type FormulaNode, type FormulaOperator, type FormulaType, formulaDependencies, formulaFitsColumn, formulaReferences, parseFormula, renameColumnReferences, } from "./formula";
|
|
13
|
-
export { type DeckMode, FRAME_PROTOCOL, FRAME_THEME_TOKENS, type FrameCall, type FrameCallResult, type FrameEditTarget, type FrameEmbed, type FrameEvent, type FramePan, type FramePoint, type FrameRect, type FrameRequest, type FrameResponse, type FrameStart, type FrameZoom, type FrameZoomStep, frameStartHash, parseFrameCall, parseFrameEvent, } from "./frames/protocol";
|
|
14
|
+
export { type DeckMode, FRAME_PROTOCOL, FRAME_THEME_TOKENS, type FrameCall, type FrameCallResult, type FrameEditTarget, type FrameEmbed, type FrameEvent, type FramePan, type FramePoint, type FrameRect, type FrameRequest, type FrameResponse, type FrameStart, type FrameVideoText, type FrameZoom, type FrameZoomStep, frameStartHash, parseFrameCall, parseFrameEvent, } from "./frames/protocol";
|
|
14
15
|
export { ARTIFACT_KINDS, type ArtifactKind } from "./kinds";
|
|
15
|
-
export { ARTIFACT_COMMENT_LIMITS, ARTIFACT_HOLDERS_LIMIT, ARTIFACT_LIMITS, ARTIFACT_STATE_LIMITS, } from "./limits";
|
|
16
|
+
export { ARTIFACT_COMMENT_LIMITS, ARTIFACT_HOLDERS_LIMIT, ARTIFACT_LIMITS, ARTIFACT_STATE_LIMITS, type ArtifactSizeLimits, artifactSizeLimits, } from "./limits";
|
|
16
17
|
export { type LiveSheetColumn, type LiveSheetLayout, type LiveSheetRow, type LiveSheetTable, liveSheetColumns, liveSheetTable, } from "./live-sheet";
|
|
17
|
-
export { type ArtifactOutline, type CanvasOutline, type CanvasOutlineItem, createHeadingSlugger, type DocumentHeading, type DocumentHolder, type DocumentOutline, type FileOutline, type SheetOutline, type SheetSummary, type SlidesOutline, } from "./outline";
|
|
18
|
+
export { type ArtifactOutline, type CanvasOutline, type CanvasOutlineItem, createHeadingSlugger, type DocumentHeading, type DocumentHolder, type DocumentOutline, type FileOutline, type SheetOutline, type SheetSummary, type SlidesOutline, type VideoOutline, type VideoOutlineScene, } from "./outline";
|
|
18
19
|
export type { DocumentPaper } from "./paper";
|
|
19
20
|
export { DOCUMENT_PDF_WAIT_MS } from "./pdf-job";
|
|
20
21
|
export { type ArtifactFacetsQueryResult, type ArtifactObjectsQueryResult, type ArtifactQueryProperty, type ArtifactQueryPropertyType, type ArtifactQueryResult, type ArtifactQuerySchema, artifactQueryName, } from "./queries";
|
|
@@ -22,5 +23,6 @@ export { type ArtifactAddressTarget, type ResolvedArtifactPart, resolveArtifactA
|
|
|
22
23
|
export { checkSheet } from "./sheet-rules";
|
|
23
24
|
export { ARTIFACT_THEME_FILE, type ArtifactTheme, type ArtifactThemeMode, parseArtifactTheme, } from "./theme";
|
|
24
25
|
export { ARTIFACT_TONES, type ArtifactTone } from "./tones";
|
|
26
|
+
export { videoPosterMs } from "./video/project";
|
|
25
27
|
export { type LiveSheetColumnSource, type LiveSheetSource, NUMERIC_COLUMN_TYPES, parseSheetDate, parseSheetNumber, parseWorkbook, SHEET_COLUMN_TYPES, SHEET_HIGHLIGHTS, SHEET_TOTALS, type SheetChartAggregate, type SheetChartType, type SheetColumnFormat, type SheetColumnType, type SheetHighlight, type SheetTotal, sheetFilePath, WORKBOOK_FILE, type Workbook, type WorkbookChart, type WorkbookSheet, } from "./workbook";
|
|
26
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/artifacts/index.ts"],"names":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aAAa,EAClB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,cAAc,EACd,cAAc,EACd,eAAe,GAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/artifacts/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,KAAK,SAAS,GACf,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,WAAW,EACX,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,YAAY,EACZ,WAAW,GACZ,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,KAAK,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACzE,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,cA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,CAAA;AAChD,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,iBAAiB,GAClB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,sBAAsB,GACvB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,kBAAkB,GACnB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,aAAa,EACb,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,aAAa,GACnB,MAAM,YAAY,CAAA"}
|
package/dist/artifacts/index.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import"../chunk-kr6dx38r.js";
|
|
3
|
+
import"../chunk-3dvcdn9w.js";
|
|
3
4
|
import {
|
|
4
5
|
ARTIFACT_LIMITS2,
|
|
6
|
+
artifactSizeLimits2,
|
|
5
7
|
ARTIFACT_STATE_LIMITS2,
|
|
6
8
|
ARTIFACT_HOLDERS_LIMIT2,
|
|
7
9
|
ARTIFACT_COMMENT_LIMITS2
|
|
8
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-fgxvrxx4.js";
|
|
9
11
|
import {
|
|
10
12
|
isArtifactAddress2,
|
|
11
13
|
parseArtifactAddress2,
|
|
@@ -15,8 +17,10 @@ import {
|
|
|
15
17
|
CANVAS_FILE2,
|
|
16
18
|
parseCanvas2,
|
|
17
19
|
formatCanvas2
|
|
18
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-jjte0h4p.js";
|
|
19
21
|
import {
|
|
22
|
+
placeVideoComment2,
|
|
23
|
+
videoSceneAt2,
|
|
20
24
|
CANVAS_TEXT_PIXELS2,
|
|
21
25
|
CANVAS_FIT_PADDING2,
|
|
22
26
|
canvasNoteFontSize2,
|
|
@@ -56,24 +60,47 @@ import {
|
|
|
56
60
|
evaluateComputedColumns2,
|
|
57
61
|
liveSheetColumns2,
|
|
58
62
|
liveSheetTable2,
|
|
59
|
-
checkSheet2
|
|
60
|
-
|
|
63
|
+
checkSheet2,
|
|
64
|
+
videoPosterMs2
|
|
65
|
+
} from "../chunk-fqms1a8c.js";
|
|
61
66
|
import {
|
|
62
67
|
ARTIFACT_KINDS2
|
|
63
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-a700gjc8.js";
|
|
64
69
|
// src/artifacts/comment-text.ts
|
|
65
70
|
function quoteArtifactComment(comment) {
|
|
66
71
|
const { anchor } = comment;
|
|
72
|
+
const video = [anchor.at, anchor.scene, anchor.offset].some((value) => value !== undefined);
|
|
67
73
|
const where = [
|
|
68
|
-
anchor.board,
|
|
69
|
-
anchor.element,
|
|
70
|
-
anchor.label ? JSON.stringify(anchor.label) : undefined,
|
|
74
|
+
...video ? videoPlace(anchor, comment.outline) : [anchor.board, anchor.element, anchor.label ? JSON.stringify(anchor.label) : undefined],
|
|
71
75
|
`revision ${anchor.revision}`,
|
|
72
76
|
comment.id ? `comment ${comment.id}` : undefined,
|
|
73
77
|
comment.authorName ? `from ${comment.guest ? "guest " : ""}${comment.authorName.replace(/\s+/g, " ").trim()}` : undefined
|
|
74
78
|
].filter((part) => part !== undefined);
|
|
75
79
|
return `[${where.join(" \xB7 ")}] ${comment.body.replace(/\s+/g, " ").trim()}`;
|
|
76
80
|
}
|
|
81
|
+
function videoPlace(anchor, outline) {
|
|
82
|
+
if (!outline) {
|
|
83
|
+
if (anchor.offset === undefined) {
|
|
84
|
+
return [anchor.at === undefined ? undefined : clock(anchor.at), anchor.scene];
|
|
85
|
+
}
|
|
86
|
+
return [`${clock(anchor.offset)} into ${anchor.scene}`];
|
|
87
|
+
}
|
|
88
|
+
const place = placeVideoComment2(anchor, outline);
|
|
89
|
+
if (place.gone) {
|
|
90
|
+
return [
|
|
91
|
+
anchor.scene,
|
|
92
|
+
anchor.label ? JSON.stringify(anchor.label) : undefined,
|
|
93
|
+
"no longer in the video"
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
return [place.ms === undefined ? undefined : clock(place.ms), place.scene?.id];
|
|
97
|
+
}
|
|
98
|
+
function clock(ms) {
|
|
99
|
+
const seconds = Math.floor(ms / 1000);
|
|
100
|
+
const minutes = Math.floor(seconds / 60);
|
|
101
|
+
const rest = String(seconds % 60).padStart(2, "0");
|
|
102
|
+
return minutes < 60 ? `${minutes}:${rest}` : `${Math.floor(minutes / 60)}:${String(minutes % 60).padStart(2, "0")}:${rest}`;
|
|
103
|
+
}
|
|
77
104
|
// src/artifacts/frames/protocol.ts
|
|
78
105
|
var FRAME_PROTOCOL = "sixb-frame/1";
|
|
79
106
|
function frameStartHash(start) {
|
|
@@ -161,6 +188,8 @@ function parseFrameEvent(data) {
|
|
|
161
188
|
if (params.slides === undefined)
|
|
162
189
|
return event("ready", {});
|
|
163
190
|
return isCount(params.slides) ? event("ready", { slides: params.slides }) : null;
|
|
191
|
+
case "failed":
|
|
192
|
+
return event("failed", {});
|
|
164
193
|
case "select":
|
|
165
194
|
return isCount(params.slide) && params.slide > 0 ? event("select", { slide: params.slide }) : null;
|
|
166
195
|
case "key":
|
|
@@ -208,6 +237,12 @@ function parseFrameEvent(data) {
|
|
|
208
237
|
const target = parseEditTarget(params.target);
|
|
209
238
|
return target ? event(data.event, { target, ...point }) : null;
|
|
210
239
|
}
|
|
240
|
+
case "video.picked": {
|
|
241
|
+
if (params.target === null)
|
|
242
|
+
return event("video.picked", { target: null });
|
|
243
|
+
const target = parseVideoText(params.target);
|
|
244
|
+
return target ? event("video.picked", { target }) : null;
|
|
245
|
+
}
|
|
211
246
|
case "edit.text":
|
|
212
247
|
return isEditAddress(params.address) && typeof params.text === "string" && params.text.length <= MAX_EDIT_TEXT_LENGTH && typeof params.base === "string" && params.base.length <= MAX_EDIT_TEXT_LENGTH ? event("edit.text", { address: params.address, base: params.base, text: params.text }) : null;
|
|
213
248
|
case "zoom": {
|
|
@@ -255,6 +290,28 @@ function parsePoint(value) {
|
|
|
255
290
|
return null;
|
|
256
291
|
return { x: Number(value.x), y: Number(value.y) };
|
|
257
292
|
}
|
|
293
|
+
function parseVideoText(value) {
|
|
294
|
+
if (!isRecord(value) || !isRecord(value.rect))
|
|
295
|
+
return null;
|
|
296
|
+
const { scene, tag, text, occurrence } = value;
|
|
297
|
+
if (typeof scene !== "string" || !/^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(scene))
|
|
298
|
+
return null;
|
|
299
|
+
if (typeof tag !== "string" || !/^[a-z][a-z0-9]{0,15}$/.test(tag))
|
|
300
|
+
return null;
|
|
301
|
+
if (typeof text !== "string" || text.length > MAX_EDIT_TEXT_LENGTH || !isCount(occurrence)) {
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
const { x, y, width, height } = value.rect;
|
|
305
|
+
if (![x, y, width, height].every(Number.isFinite))
|
|
306
|
+
return null;
|
|
307
|
+
return {
|
|
308
|
+
scene,
|
|
309
|
+
tag,
|
|
310
|
+
text,
|
|
311
|
+
occurrence,
|
|
312
|
+
rect: { x: Number(x), y: Number(y), width: Number(width), height: Number(height) }
|
|
313
|
+
};
|
|
314
|
+
}
|
|
258
315
|
function parseEditTarget(value) {
|
|
259
316
|
if (!isRecord(value) || !isRecord(value.rect))
|
|
260
317
|
return null;
|
|
@@ -336,6 +393,7 @@ export {
|
|
|
336
393
|
SMALL_BOARD_PREVIEW_WIDTH2 as SMALL_BOARD_PREVIEW_WIDTH,
|
|
337
394
|
WORKBOOK_FILE2 as WORKBOOK_FILE,
|
|
338
395
|
artifactQueryName2 as artifactQueryName,
|
|
396
|
+
artifactSizeLimits2 as artifactSizeLimits,
|
|
339
397
|
canvasArrowLine2 as canvasArrowLine,
|
|
340
398
|
canvasNoteFontSize2 as canvasNoteFontSize,
|
|
341
399
|
canvasShapeFontSize2 as canvasShapeFontSize,
|
|
@@ -365,10 +423,13 @@ export {
|
|
|
365
423
|
parseSheetNumber2 as parseSheetNumber,
|
|
366
424
|
parseSheetPart2 as parseSheetPart,
|
|
367
425
|
parseWorkbook2 as parseWorkbook,
|
|
426
|
+
placeVideoComment2 as placeVideoComment,
|
|
368
427
|
quoteArtifactComment,
|
|
369
428
|
renameColumnReferences2 as renameColumnReferences,
|
|
370
429
|
resolveArtifactAddress2 as resolveArtifactAddress,
|
|
371
|
-
sheetFilePath2 as sheetFilePath
|
|
430
|
+
sheetFilePath2 as sheetFilePath,
|
|
431
|
+
videoPosterMs2 as videoPosterMs,
|
|
432
|
+
videoSceneAt2 as videoSceneAt
|
|
372
433
|
};
|
|
373
434
|
|
|
374
|
-
//# debugId=
|
|
435
|
+
//# debugId=DC767EA27429DFBB64756E2164756E21
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/artifacts/comment-text.ts", "../src/artifacts/frames/protocol.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { ArtifactCommentAnchor } from \"../storage/artifacts/types\"\n\n/**\n * A comment as a message to the Agent quotes it: where it is, then its words, as the\n * `sixb-artifacts` skill tells the Agent to read it. `[welcome · body>main:0>h1:0 · \"Welcome\n * back\" · revision 12 · comment cmt_4k2a9c0d1e · from Ava Martin] Make the title warmer.` A\n * comment on a whole board names no element, and one on the artifact no board; the
|
|
6
|
-
"import { ARTIFACT_LIMITS, ARTIFACT_STATE_LIMITS } from \"../limits\"\nimport type { BoardElementKind, BoardFramePatch } from \"../live/board\"\nimport { isArtifactQueryName } from \"../queries\"\nimport { ARTIFACT_THEME_TOKENS } from \"../theme\"\n\n/**\n * Messages between the app and an artifact in its sandboxed frame: a deck, or a page. The app\n * asks; the frame answers each request by its id, and tells the app what happened inside it as\n * events. Later abilities are new methods and events, not a new protocol.\n */\nexport const FRAME_PROTOCOL = \"sixb-frame/1\"\n\n/**\n * A deck shows one slide scaled to fit on its stage, every slide in a grid, or one slide filling\n * the page to present it.\n */\nexport type DeckMode = \"slide\" | \"overview\" | \"present\"\n\n/**\n * How a frame opens, set in its URL so the first paint is right: at a slide, and with `fill`, that\n * slide alone filling the frame with no stage around it, as a thumbnail or an embed shows it.\n */\nexport interface FrameStart {\n readonly slide?: number\n readonly fill?: boolean\n /** A designed document shown as the pages its paper cuts it into, not as one sheet. */\n readonly pages?: boolean\n /** A designed document opened at a section, by its heading's slug. */\n readonly section?: string\n}\n\n/** The fragment that carries a frame's start: `#sixb-slide=3&sixb-fill`, `#sixb-pages`. */\nexport function frameStartHash(start: FrameStart): string {\n const params: string[] = []\n if (start.slide !== undefined && start.slide > 1)\n params.push(`sixb-slide=${Math.round(start.slide)}`)\n if (start.fill) params.push(\"sixb-fill\")\n if (start.pages) params.push(\"sixb-pages\")\n if (start.section) params.push(`sixb-section=${encodeURIComponent(start.section)}`)\n return params.length > 0 ? `#${params.join(\"&\")}` : \"\"\n}\n\n/** What the app asks of the frame. */\nexport type FrameRequest =\n | FrameRequestOf<\n \"theme\",\n { readonly tokens: Readonly<Record<string, string>>; readonly dark: boolean }\n >\n | FrameRequestOf<\"goto\", { readonly slide: number }>\n | FrameRequestOf<\"mode\", { readonly mode: DeckMode }>\n /** Scrolls a page by a wheel turned over what the app draws on it. */\n | FrameRequestOf<\"scroll\", { readonly x: number; readonly y: number }>\n /** Loads the entry again, as a page whose data was reset starts over. */\n | FrameRequestOf<\"reload\", Record<string, never>>\n /**\n * A query the page read has new rows: the objects it reads changed. The page reads them with\n * `sixb.query(name)` again; the app sends it only for the queries that frame has read.\n */\n | FrameRequestOf<\"query.changed\", { readonly name: string }>\n /**\n * Starts or stops editing a canvas's board, served for editing (`?sixb-edit`): the frame then\n * reports what the reader points at and picks, by address, and lets them type into text. With\n * `typing: false`, a text the reader picks takes no typing, as when they pick what to comment on.\n * The first request after the frame loads transfers a `MessagePort`: the frame reports editing\n * (`edit.hover`, `edit.select`, `edit.text`) through it alone, never through the window.\n */\n | FrameRequestOf<\"edit\", { readonly on: boolean; readonly typing?: boolean }>\n /**\n * What someone else changed in the board, element by element, as `boardFramePatches` says. The\n * element the reader is typing in takes its patch once they leave it.\n */\n | FrameRequestOf<\"edit.patch\", { readonly patches: readonly BoardFramePatch[] }>\n /**\n * A canvas's board running on the canvas, where the reader uses its page in place. The first\n * request after the frame loads transfers a `MessagePort`: the frame then sends through it alone\n * the reader's gestures the canvas takes (`zoom`, `pan`, `space`) and the words of what they\n * press. `moving` says the canvas is panning by the wheel: a page coming under a still pointer\n * then keeps panning the canvas rather than scrolling itself.\n */\n | FrameRequestOf<\"canvas\", { readonly moving: boolean }>\n /**\n * Runs a designed document's editor in its frame, served for editing: `code` is the editor's\n * script, which takes the `MessagePort` the request transfers and edits the body in place.\n */\n | FrameRequestOf<\"editor\", { readonly code: string }>\n\ninterface FrameRequestOf<Method extends string, Params> {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly id: number\n readonly method: Method\n readonly params: Params\n}\n\n/** The frame's answer to one request. */\nexport interface FrameResponse {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly id: number\n readonly error?: string\n}\n\n/** What happened inside the frame. */\nexport type FrameEvent =\n /** The frame has laid out its entry: a deck says how many slides it has. */\n | FrameEventOf<\"ready\", { readonly slides?: number }>\n /** The reader picked a slide in the overview. */\n | FrameEventOf<\"select\", { readonly slide: number }>\n /** A key the app handles, pressed while the frame had focus. */\n | FrameEventOf<\"key\", { readonly key: string }>\n /** A link to another artifact, which opens where the reader is. */\n | FrameEventOf<\"open\", { readonly address: string }>\n /**\n * A link to a web page, which the app opens in a new tab: the frame cannot open windows itself.\n * Only `http:` and `https:` addresses.\n */\n | FrameEventOf<\"link\", { readonly url: string }>\n /**\n * Where the `<sixb-embed>` boxes in view are, for the app to draw each over the frame: in the\n * frame's pixels, with the scale they are drawn at. A deck reports the shown slide's, and none in\n * the overview, where an embed stays a placeholder, as it does in a filled frame, which never\n * reports; a page reports those near its view as it scrolls, at its own scale.\n */\n | FrameEventOf<\"embeds\", { readonly embeds: readonly FrameEmbed[] }>\n /** A page's height as laid out at the frame's width, so a document can size the frame to it. */\n | FrameEventOf<\"size\", { readonly height: number }>\n /**\n * The reader pressed a button, or a link within the page, that reads `text`: a canvas's board\n * follows the arrow that leaves it with that label. At most a label's length. A board running on\n * the canvas also sends it through its port, for the reader's own presses alone.\n */\n | FrameEventOf<\"press\", { readonly text: string }>\n /** Editing, the reader points at an element, or at none. */\n | FrameEventOf<\"edit.hover\", { readonly target: FrameEditTarget | null }>\n /** Editing, the reader picked an element, or none, clicking `at` that point of the frame. */\n | FrameEventOf<\n \"edit.select\",\n { readonly target: FrameEditTarget | null; readonly at?: FramePoint }\n >\n /**\n * Editing, the reader typed in a text element: all its words now, as plain text, and `base`,\n * its words as the frame last posted them, or as they were when the reader started typing. The\n * app makes it with `mergeBoardText`, so what others changed in the element since stays.\n *\n * The runtime takes the port before the board's scripts run, and stops the request that hands\n * it over before they hear it, so they cannot post on it; it reports only the reader's own\n * clicks and keys. What it posts is what the element holds, which the board's scripts can still\n * rewrite. The app takes `edit.text` only for the element the reader picked, the last\n * `edit.select` it heard, and nothing once the board's elements changed under the frame.\n */\n | FrameEventOf<\n \"edit.text\",\n { readonly address: string; readonly base: string; readonly text: string }\n >\n /**\n * The reader zoomed over a canvas's board, opened or running on the canvas, which the app zooms\n * instead of the browser: a pinch or the wheel with ⌘ or Ctrl, `factor` times around `at`, in\n * the frame's pixels; or ⌘ or Ctrl with +, − or 0, a `step`. Only a frame handed a port with\n * `edit` or `canvas` reports it, through that port, and only for the reader's own gestures and\n * keys; any other leaves them to the browser.\n */\n | FrameEventOf<\"zoom\", FrameZoom>\n /**\n * The reader turned the wheel or dragged a finger over a board running on the canvas, which pans\n * the canvas instead of scrolling the page. Only a frame handed a port with `canvas` reports it,\n * through that port, for the reader's own gestures.\n */\n | FrameEventOf<\"pan\", FramePan>\n /**\n * The reader pressed or let go of Space over a board running on the canvas, outside a field:\n * while it is held, dragging pans the canvas. Through the port, as `pan` is.\n */\n | FrameEventOf<\"space\", { readonly down: boolean }>\n\n/**\n * How far the reader scrolled, as a wheel's deltas say it: `x` right and `y` down, in pixels. A\n * finger dragging scrolls the opposite way it moves, as it would scroll a page; the wheel's turns\n * pan the canvas at its own speed for them, as React Flow's do.\n */\nexport interface FramePan {\n readonly x: number\n readonly y: number\n readonly by: \"wheel\" | \"touch\"\n}\n\n/** How the reader zoomed: by a gesture, or by a key. */\nexport type FrameZoom =\n | { readonly factor: number; readonly at: FramePoint }\n | { readonly step: FrameZoomStep }\n\n/** ⌘ or Ctrl with +, − or 0: in, out, or the page at its own size. */\nexport type FrameZoomStep = \"in\" | \"out\" | \"actual\"\n\n/**\n * An element of a board being edited. One a script built, or whose words a script rewrote, is\n * `scripted`: it has no address of its own, and `within` names the element it sits in.\n */\nexport type FrameEditTarget =\n | {\n readonly address: string\n readonly kind: BoardElementKind\n readonly label: string\n readonly rect: FrameRect\n }\n | {\n readonly address: null\n readonly kind: \"scripted\"\n readonly within: string | null\n /** The words the reader pointed at, as the page shows them now. */\n readonly label?: string\n readonly rect: FrameRect\n }\n\nexport interface FramePoint {\n readonly x: number\n readonly y: number\n}\n\nexport interface FrameRect {\n readonly x: number\n readonly y: number\n readonly width: number\n readonly height: number\n}\n\n/** One `<sixb-embed>` the frame shows. */\nexport interface FrameEmbed {\n /** The element's own id while the page is loaded: the same as it scrolls out and back. */\n readonly id: number\n readonly address: string\n readonly rect: {\n readonly x: number\n readonly y: number\n readonly width: number\n readonly height: number\n }\n /**\n * The scale it is drawn at: a slide's, where the embed is laid out at `rect / scale` and scaled\n * with the slide; 1 on a page.\n */\n readonly scale: number\n}\n\ninterface FrameEventOf<Event extends string, Params> {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly event: Event\n readonly params: Params\n}\n\n/**\n * What the frame asks of the app, numbered so the app's `result` answers it: a page keeping data\n * with `sixb.state`, or reading one of its version's queries with `sixb.query`. The app answers\n * only its own frame, for the artifact and the version it shows.\n */\nexport type FrameCall =\n | FrameCallOf<\"state.get\", { readonly key: string }>\n | FrameCallOf<\"state.set\", { readonly key: string; readonly value: unknown }>\n | FrameCallOf<\"state.delete\", { readonly key: string }>\n | FrameCallOf<\"state.keys\", Record<string, never>>\n /** Runs `queries/<name>.json` as the reader; the value is the query route's JSON. */\n | FrameCallOf<\"query.run\", { readonly name: string }>\n\ninterface FrameCallOf<Method extends string, Params> {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly call: number\n readonly method: Method\n readonly params: Params\n}\n\n/** The app's answer to one call: its value, or why it failed. */\nexport interface FrameCallResult {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly result: number\n readonly value?: unknown\n readonly error?: string\n}\n\n/**\n * A message from a frame as a call, or null when it is not one. A page's scripts write what it\n * posts, so the shapes are checked here, and a value is checked for size as JSON, as storage will\n * count it, before the app sends it anywhere.\n */\nexport function parseFrameCall(data: unknown): FrameCall | null {\n if (!isRecord(data) || data.protocol !== FRAME_PROTOCOL || !isRecord(data.params)) return null\n if (!Number.isSafeInteger(data.call) || Number(data.call) < 0) return null\n const call = Number(data.call)\n const { params } = data\n const key = params.key\n const keyed = isStateKey(key)\n switch (data.method) {\n case \"state.get\":\n case \"state.delete\":\n return keyed\n ? ({ protocol: FRAME_PROTOCOL, call, method: data.method, params: { key } } as FrameCall)\n : null\n case \"state.set\": {\n if (!keyed || !(\"value\" in params)) return null\n const json = jsonText(params.value)\n if (json === undefined || utf8Bytes(json) > ARTIFACT_STATE_LIMITS.maxValueBytes) return null\n return {\n protocol: FRAME_PROTOCOL,\n call,\n method: \"state.set\",\n params: { key, value: params.value },\n }\n }\n case \"state.keys\":\n return { protocol: FRAME_PROTOCOL, call, method: \"state.keys\", params: {} }\n case \"query.run\": {\n // The client puts the name in the URL's path, as it does a key.\n const { name } = params\n if (typeof name !== \"string\" || !isArtifactQueryName(name)) return null\n\n return { protocol: FRAME_PROTOCOL, call, method: \"query.run\", params: { name } }\n }\n default:\n return null\n }\n}\n\n/**\n * A key the app can send: the client puts it in the URL's path, where `.` and `..` would name\n * another route, `..` the artifact itself.\n */\nfunction isStateKey(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n value.length > 0 &&\n value.length <= ARTIFACT_STATE_LIMITS.maxKeyLength &&\n !/\\p{Cc}/u.test(value) &&\n value !== \".\" &&\n value !== \"..\"\n )\n}\n\nfunction jsonText(value: unknown): string | undefined {\n try {\n return JSON.stringify(value)\n } catch {\n return undefined\n }\n}\n\nfunction utf8Bytes(text: string): number {\n return new TextEncoder().encode(text).byteLength\n}\n\n/** Keys the frame passes to the app, so a deck navigates the same with focus in it or not. */\nexport const DECK_KEYS = [\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"PageUp\",\n \"PageDown\",\n \"Home\",\n \"End\",\n \" \",\n \"Escape\",\n] as const\n\n/**\n * The theme tokens the app sends into a frame, read from the viewer as it is themed: the ones an\n * artifact's theme may set.\n */\nexport const FRAME_THEME_TOKENS = ARTIFACT_THEME_TOKENS\n\n/**\n * A message from a frame as an event, or null when it is not one this protocol sends. A deck runs\n * its own scripts, so anything it posts is checked for the shape the app relies on: whole slide\n * numbers, a key the app handles, finite boxes, and no more embeds than a version may record.\n */\nexport function parseFrameEvent(data: unknown): FrameEvent | null {\n if (!isRecord(data) || data.protocol !== FRAME_PROTOCOL || !isRecord(data.params)) return null\n const { params } = data\n switch (data.event) {\n case \"ready\":\n if (params.slides === undefined) return event(\"ready\", {})\n return isCount(params.slides) ? event(\"ready\", { slides: params.slides }) : null\n case \"select\":\n return isCount(params.slide) && params.slide > 0\n ? event(\"select\", { slide: params.slide })\n : null\n case \"key\":\n return typeof params.key === \"string\" && (DECK_KEYS as readonly string[]).includes(params.key)\n ? event(\"key\", { key: params.key })\n : null\n case \"open\":\n return isAddress(params.address) ? event(\"open\", { address: params.address }) : null\n case \"link\":\n return isWebAddress(params.url) ? event(\"link\", { url: params.url }) : null\n case \"embeds\": {\n const { embeds } = params\n if (!Array.isArray(embeds) || embeds.length > ARTIFACT_LIMITS.maxReferences) return null\n const parsed: FrameEmbed[] = []\n const ids = new Set<number>()\n for (const embed of embeds) {\n if (!isRecord(embed) || !isAddress(embed.address) || !isRecord(embed.rect)) return null\n\n // Two embeds with one id would be one element drawn twice.\n if (!isCount(embed.id) || ids.has(embed.id)) return null\n ids.add(embed.id)\n\n const { x, y, width, height } = embed.rect\n if (![x, y, width, height, embed.scale].every(Number.isFinite)) return null\n if (Number(width) < 0 || Number(height) < 0 || Number(embed.scale) <= 0) return null\n parsed.push({\n id: embed.id,\n address: embed.address,\n rect: { x: Number(x), y: Number(y), width: Number(width), height: Number(height) },\n scale: Number(embed.scale),\n })\n }\n return event(\"embeds\", { embeds: parsed })\n }\n case \"size\":\n return Number.isFinite(params.height) && Number(params.height) >= 0\n ? event(\"size\", { height: Math.min(Number(params.height), MAX_HEIGHT) })\n : null\n case \"edit.hover\":\n case \"edit.select\": {\n const at = data.event === \"edit.select\" ? parsePoint(params.at) : undefined\n if (at === null) return null\n const point = at ? { at } : {}\n if (params.target === null) return event(data.event, { target: null, ...point })\n const target = parseEditTarget(params.target)\n return target ? event(data.event, { target, ...point }) : null\n }\n case \"edit.text\":\n return isEditAddress(params.address) &&\n typeof params.text === \"string\" &&\n params.text.length <= MAX_EDIT_TEXT_LENGTH &&\n typeof params.base === \"string\" &&\n params.base.length <= MAX_EDIT_TEXT_LENGTH\n ? event(\"edit.text\", { address: params.address, base: params.base, text: params.text })\n : null\n case \"zoom\": {\n if (params.step !== undefined) {\n return ZOOM_STEPS.includes(String(params.step))\n ? event(\"zoom\", { step: params.step as FrameZoomStep })\n : null\n }\n\n const at = parsePoint(params.at)\n const factor = Number(params.factor)\n if (!at || !Number.isFinite(params.factor) || factor <= 0) return null\n\n return event(\"zoom\", {\n factor: Math.min(MAX_ZOOM_FACTOR, Math.max(1 / MAX_ZOOM_FACTOR, factor)),\n at,\n })\n }\n case \"pan\": {\n const { x, y, by } = params\n if (!Number.isFinite(x) || !Number.isFinite(y) || (by !== \"wheel\" && by !== \"touch\")) {\n return null\n }\n\n const bounded = (delta: number) => Math.min(MAX_PAN, Math.max(-MAX_PAN, delta))\n return event(\"pan\", { x: bounded(Number(x)), y: bounded(Number(y)), by })\n }\n case \"space\":\n return typeof params.down === \"boolean\" ? event(\"space\", { down: params.down }) : null\n case \"press\":\n return typeof params.text === \"string\" &&\n params.text.length > 0 &&\n params.text.length <= ARTIFACT_LIMITS.maxCanvasLabelLength\n ? event(\"press\", { text: params.text })\n : null\n default:\n return null\n }\n}\n\n/** The most words a text element of a board takes from one edit: a board's own size. */\nconst MAX_EDIT_TEXT_LENGTH = ARTIFACT_LIMITS.maxBoardBytes\n\nconst EDIT_KINDS: readonly string[] = [\"text\", \"image\", \"whole\", \"box\"]\n\nconst ZOOM_STEPS: readonly string[] = [\"in\", \"out\", \"actual\"] satisfies FrameZoomStep[]\n\n/** The most one gesture zooms by, either way: a wheel's notch is far less. */\nconst MAX_ZOOM_FACTOR = 4\n\n/** The most one wheel's turn or one finger's move pans by, either way: a screen's width. */\nconst MAX_PAN = 4000\n\n/** The longest label a frame reports for an element: the runtime cuts its own at 80. */\nconst MAX_EDIT_LABEL_LENGTH = 200\n\n/** An address as `boardElements` writes one: steps of a tag and an index, from the body. */\nfunction isEditAddress(value: unknown): value is string {\n return (\n typeof value === \"string\" && value.length <= 2048 && /^body(>[a-z][a-z0-9-]*:\\d+)*$/.test(value)\n )\n}\n\n/** A point the frame reports: undefined for none, null for one that does not read. */\nfunction parsePoint(value: unknown): FramePoint | null | undefined {\n if (value === undefined) return undefined\n if (!isRecord(value) || !Number.isFinite(value.x) || !Number.isFinite(value.y)) return null\n return { x: Number(value.x), y: Number(value.y) }\n}\n\nfunction parseEditTarget(value: unknown): FrameEditTarget | null {\n if (!isRecord(value) || !isRecord(value.rect)) return null\n const { x, y, width, height } = value.rect\n if (![x, y, width, height].every(Number.isFinite)) return null\n const rect = { x: Number(x), y: Number(y), width: Number(width), height: Number(height) }\n\n if (value.kind === \"scripted\") {\n if (value.address !== null) return null\n if (value.within !== null && !isEditAddress(value.within)) return null\n const label =\n typeof value.label === \"string\" && value.label.length <= MAX_EDIT_LABEL_LENGTH\n ? { label: value.label }\n : {}\n return {\n address: null,\n kind: \"scripted\",\n within: value.within as string | null,\n ...label,\n rect,\n }\n }\n if (!isEditAddress(value.address) || !EDIT_KINDS.includes(String(value.kind))) return null\n if (typeof value.label !== \"string\" || value.label.length > MAX_EDIT_LABEL_LENGTH) return null\n return {\n address: value.address,\n kind: value.kind as BoardElementKind,\n label: value.label,\n rect,\n }\n}\n\n/** The most a page reports as its height: more is a page that grows with its frame. */\nconst MAX_HEIGHT = 100_000\n\nfunction event<Name extends FrameEvent[\"event\"]>(\n name: Name,\n params: Extract<FrameEvent, { event: Name }>[\"params\"]\n): FrameEvent {\n return { protocol: FRAME_PROTOCOL, event: name, params } as FrameEvent\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null\n}\n\nfunction isCount(value: unknown): value is number {\n return Number.isSafeInteger(value) && Number(value) >= 0\n}\n\n/** Long enough for any address a version can record; the app resolves it before using it. */\nfunction isAddress(value: unknown): value is string {\n return typeof value === \"string\" && value.length <= 2048\n}\n\n/** The longest web address the app opens: longer than any link a page needs. */\nconst MAX_URL_LENGTH = 8192\n\n/** An absolute `http:` or `https:` address, as the frame resolves a link's. */\nfunction isWebAddress(value: unknown): value is string {\n if (typeof value !== \"string\" || value.length > MAX_URL_LENGTH) return false\n\n try {\n const { protocol } = new URL(value)\n return protocol === \"http:\" || protocol === \"https:\"\n } catch {\n return false\n }\n}\n"
|
|
5
|
+
"import type { ArtifactCommentAnchor } from \"../storage/artifacts/types\"\nimport { placeVideoComment } from \"./comment-place\"\nimport type { VideoOutline } from \"./outline\"\n\n/**\n * A comment as a message to the Agent quotes it: where it is, then its words, as the\n * `sixb-artifacts` skill tells the Agent to read it. `[welcome · body>main:0>h1:0 · \"Welcome\n * back\" · revision 12 · comment cmt_4k2a9c0d1e · from Ava Martin] Make the title warmer.` A\n * comment on a whole board names no element, and one on the artifact no board; one on a video\n * names its instant in the version read and its scene, `[0:12 · intro · revision 3]`, and one on a\n * scene that version no longer has the scene's label too, `[intro · \"Opening\" · no longer in the\n * video · revision 3]`. The comment's id lets the Agent resolve it, or reply to it, and its\n * author's name says whose request it is: `from guest Ava Martin` for a shared link's visitor,\n * whose name nobody vouches for. Browser-safe, for the app to draft the message with.\n */\nexport function quoteArtifactComment(comment: {\n readonly id?: string\n readonly authorName?: string | null\n /** Its author opened a shared link: a guest, without an account. */\n readonly guest?: boolean\n readonly anchor: ArtifactCommentAnchor\n readonly body: string\n /**\n * The version of the video it is on that is read, which places its instant. Without it, an\n * instant within a scene is quoted as how far into it, `0:04 into intro`.\n */\n readonly outline?: VideoOutline\n}): string {\n const { anchor } = comment\n const video = [anchor.at, anchor.scene, anchor.offset].some((value) => value !== undefined)\n const where = [\n ...(video\n ? videoPlace(anchor, comment.outline)\n : [anchor.board, anchor.element, anchor.label ? JSON.stringify(anchor.label) : undefined]),\n `revision ${anchor.revision}`,\n comment.id ? `comment ${comment.id}` : undefined,\n comment.authorName\n ? `from ${comment.guest ? \"guest \" : \"\"}${comment.authorName.replace(/\\s+/g, \" \").trim()}`\n : undefined,\n ].filter((part): part is string => part !== undefined)\n return `[${where.join(\" · \")}] ${comment.body.replace(/\\s+/g, \" \").trim()}`\n}\n\n/** Where a comment on a video is: its instant and its scene, in the version read when given. */\nfunction videoPlace(\n anchor: ArtifactCommentAnchor,\n outline: VideoOutline | undefined\n): (string | undefined)[] {\n if (!outline) {\n if (anchor.offset === undefined) {\n return [anchor.at === undefined ? undefined : clock(anchor.at), anchor.scene]\n }\n return [`${clock(anchor.offset)} into ${anchor.scene}`]\n }\n\n const place = placeVideoComment(anchor, outline)\n if (place.gone) {\n return [\n anchor.scene,\n anchor.label ? JSON.stringify(anchor.label) : undefined,\n \"no longer in the video\",\n ]\n }\n return [place.ms === undefined ? undefined : clock(place.ms), place.scene?.id]\n}\n\n/** An instant as a player shows it: `m:ss`, or `h:mm:ss` past an hour. */\nfunction clock(ms: number): string {\n const seconds = Math.floor(ms / 1000)\n const minutes = Math.floor(seconds / 60)\n const rest = String(seconds % 60).padStart(2, \"0\")\n return minutes < 60\n ? `${minutes}:${rest}`\n : `${Math.floor(minutes / 60)}:${String(minutes % 60).padStart(2, \"0\")}:${rest}`\n}\n",
|
|
6
|
+
"import { ARTIFACT_LIMITS, ARTIFACT_STATE_LIMITS } from \"../limits\"\nimport type { BoardElementKind, BoardFramePatch } from \"../live/board\"\nimport { isArtifactQueryName } from \"../queries\"\nimport { ARTIFACT_THEME_TOKENS } from \"../theme\"\n\n/**\n * Messages between the app and an artifact in its sandboxed frame: a deck, or a page. The app\n * asks; the frame answers each request by its id, and tells the app what happened inside it as\n * events. Later abilities are new methods and events, not a new protocol.\n */\nexport const FRAME_PROTOCOL = \"sixb-frame/1\"\n\n/**\n * A deck shows one slide scaled to fit on its stage, every slide in a grid, or one slide filling\n * the page to present it.\n */\nexport type DeckMode = \"slide\" | \"overview\" | \"present\"\n\n/**\n * How a frame opens, set in its URL so the first paint is right: at a slide, and with `fill`, that\n * slide alone filling the frame with no stage around it, as a thumbnail or an embed shows it.\n */\nexport interface FrameStart {\n readonly slide?: number\n readonly fill?: boolean\n /** A designed document shown as the pages its paper cuts it into, not as one sheet. */\n readonly pages?: boolean\n /** A designed document opened at a section, by its heading's slug. */\n readonly section?: string\n}\n\n/** The fragment that carries a frame's start: `#sixb-slide=3&sixb-fill`, `#sixb-pages`. */\nexport function frameStartHash(start: FrameStart): string {\n const params: string[] = []\n if (start.slide !== undefined && start.slide > 1)\n params.push(`sixb-slide=${Math.round(start.slide)}`)\n if (start.fill) params.push(\"sixb-fill\")\n if (start.pages) params.push(\"sixb-pages\")\n if (start.section) params.push(`sixb-section=${encodeURIComponent(start.section)}`)\n return params.length > 0 ? `#${params.join(\"&\")}` : \"\"\n}\n\n/** What the app asks of the frame. */\nexport type FrameRequest =\n | FrameRequestOf<\n \"theme\",\n { readonly tokens: Readonly<Record<string, string>>; readonly dark: boolean }\n >\n | FrameRequestOf<\"goto\", { readonly slide: number }>\n | FrameRequestOf<\"mode\", { readonly mode: DeckMode }>\n /** Scrolls a page by a wheel turned over what the app draws on it. */\n | FrameRequestOf<\"scroll\", { readonly x: number; readonly y: number }>\n /** Loads the entry again, as a page whose data was reset starts over. */\n | FrameRequestOf<\"reload\", Record<string, never>>\n /**\n * A query the page read has new rows: the objects it reads changed. The page reads them with\n * `sixb.query(name)` again; the app sends it only for the queries that frame has read.\n */\n | FrameRequestOf<\"query.changed\", { readonly name: string }>\n /**\n * Starts or stops editing a canvas's board, served for editing (`?sixb-edit`): the frame then\n * reports what the reader points at and picks, by address, and lets them type into text. With\n * `typing: false`, a text the reader picks takes no typing, as when they pick what to comment on.\n * The first request after the frame loads transfers a `MessagePort`: the frame reports editing\n * (`edit.hover`, `edit.select`, `edit.text`) through it alone, never through the window.\n */\n | FrameRequestOf<\"edit\", { readonly on: boolean; readonly typing?: boolean }>\n /**\n * What someone else changed in the board, element by element, as `boardFramePatches` says. The\n * element the reader is typing in takes its patch once they leave it.\n */\n | FrameRequestOf<\"edit.patch\", { readonly patches: readonly BoardFramePatch[] }>\n /**\n * A canvas's board running on the canvas, where the reader uses its page in place. The first\n * request after the frame loads transfers a `MessagePort`: the frame then sends through it alone\n * the reader's gestures the canvas takes (`zoom`, `pan`, `space`) and the words of what they\n * press. `moving` says the canvas is panning by the wheel: a page coming under a still pointer\n * then keeps panning the canvas rather than scrolling itself.\n */\n | FrameRequestOf<\"canvas\", { readonly moving: boolean }>\n /**\n * Runs a designed document's editor in its frame, served for editing: `code` is the editor's\n * script, which takes the `MessagePort` the request transfers and edits the body in place.\n */\n | FrameRequestOf<\"editor\", { readonly code: string }>\n /**\n * A video's frame finds the words shown at a point of its picture, `x` and `y` as fractions of\n * its width and height, and says which with `video.picked`: the editor types over them in place.\n */\n | FrameRequestOf<\"video.pick\", { readonly x: number; readonly y: number }>\n\ninterface FrameRequestOf<Method extends string, Params> {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly id: number\n readonly method: Method\n readonly params: Params\n}\n\n/** The frame's answer to one request. */\nexport interface FrameResponse {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly id: number\n readonly error?: string\n}\n\n/** What happened inside the frame. */\nexport type FrameEvent =\n /** The frame has laid out its entry: a deck says how many slides it has. */\n | FrameEventOf<\"ready\", { readonly slides?: number }>\n /**\n * A video cannot start: HyperFrames' runtime did not load beside the frame's, or stopped at its\n * startup. Retrying may help; waiting for its timeline will not.\n */\n | FrameEventOf<\"failed\", Record<string, never>>\n /** The reader picked a slide in the overview. */\n | FrameEventOf<\"select\", { readonly slide: number }>\n /** A key the app handles, pressed while the frame had focus. */\n | FrameEventOf<\"key\", { readonly key: string }>\n /** A link to another artifact, which opens where the reader is. */\n | FrameEventOf<\"open\", { readonly address: string }>\n /**\n * A link to a web page, which the app opens in a new tab: the frame cannot open windows itself.\n * Only `http:` and `https:` addresses.\n */\n | FrameEventOf<\"link\", { readonly url: string }>\n /**\n * Where the `<sixb-embed>` boxes in view are, for the app to draw each over the frame: in the\n * frame's pixels, with the scale they are drawn at. A deck reports the shown slide's, and none in\n * the overview, where an embed stays a placeholder, as it does in a filled frame, which never\n * reports; a page reports those near its view as it scrolls, at its own scale.\n */\n | FrameEventOf<\"embeds\", { readonly embeds: readonly FrameEmbed[] }>\n /** A page's height as laid out at the frame's width, so a document can size the frame to it. */\n | FrameEventOf<\"size\", { readonly height: number }>\n /**\n * The reader pressed a button, or a link within the page, that reads `text`: a canvas's board\n * follows the arrow that leaves it with that label. At most a label's length. A board running on\n * the canvas also sends it through its port, for the reader's own presses alone.\n */\n | FrameEventOf<\"press\", { readonly text: string }>\n /** Editing, the reader points at an element, or at none. */\n | FrameEventOf<\"edit.hover\", { readonly target: FrameEditTarget | null }>\n /** Editing, the reader picked an element, or none, clicking `at` that point of the frame. */\n | FrameEventOf<\n \"edit.select\",\n { readonly target: FrameEditTarget | null; readonly at?: FramePoint }\n >\n /**\n * Editing, the reader typed in a text element: all its words now, as plain text, and `base`,\n * its words as the frame last posted them, or as they were when the reader started typing. The\n * app makes it with `mergeBoardText`, so what others changed in the element since stays.\n *\n * The runtime takes the port before the board's scripts run, and stops the request that hands\n * it over before they hear it, so they cannot post on it; it reports only the reader's own\n * clicks and keys. What it posts is what the element holds, which the board's scripts can still\n * rewrite. The app takes `edit.text` only for the element the reader picked, the last\n * `edit.select` it heard, and nothing once the board's elements changed under the frame.\n */\n | FrameEventOf<\n \"edit.text\",\n { readonly address: string; readonly base: string; readonly text: string }\n >\n /**\n * The words a video's frame found where `video.pick` asked, or none: an element holding words\n * alone, in the composition `scene` names, the `occurrence`th of its tag that says the same in\n * it, where it shows, in fractions of the picture.\n */\n | FrameEventOf<\"video.picked\", { readonly target: FrameVideoText | null }>\n /**\n * The reader zoomed over a canvas's board, opened or running on the canvas, which the app zooms\n * instead of the browser: a pinch or the wheel with ⌘ or Ctrl, `factor` times around `at`, in\n * the frame's pixels; or ⌘ or Ctrl with +, − or 0, a `step`. Only a frame handed a port with\n * `edit` or `canvas` reports it, through that port, and only for the reader's own gestures and\n * keys; any other leaves them to the browser.\n */\n | FrameEventOf<\"zoom\", FrameZoom>\n /**\n * The reader turned the wheel or dragged a finger over a board running on the canvas, which pans\n * the canvas instead of scrolling the page. Only a frame handed a port with `canvas` reports it,\n * through that port, for the reader's own gestures.\n */\n | FrameEventOf<\"pan\", FramePan>\n /**\n * The reader pressed or let go of Space over a board running on the canvas, outside a field:\n * while it is held, dragging pans the canvas. Through the port, as `pan` is.\n */\n | FrameEventOf<\"space\", { readonly down: boolean }>\n\n/**\n * How far the reader scrolled, as a wheel's deltas say it: `x` right and `y` down, in pixels. A\n * finger dragging scrolls the opposite way it moves, as it would scroll a page; the wheel's turns\n * pan the canvas at its own speed for them, as React Flow's do.\n */\nexport interface FramePan {\n readonly x: number\n readonly y: number\n readonly by: \"wheel\" | \"touch\"\n}\n\n/** How the reader zoomed: by a gesture, or by a key. */\nexport type FrameZoom =\n | { readonly factor: number; readonly at: FramePoint }\n | { readonly step: FrameZoomStep }\n\n/** ⌘ or Ctrl with +, − or 0: in, out, or the page at its own size. */\nexport type FrameZoomStep = \"in\" | \"out\" | \"actual\"\n\n/**\n * An element of a board being edited. One a script built, or whose words a script rewrote, is\n * `scripted`: it has no address of its own, and `within` names the element it sits in.\n */\nexport type FrameEditTarget =\n | {\n readonly address: string\n readonly kind: BoardElementKind\n readonly label: string\n readonly rect: FrameRect\n }\n | {\n readonly address: null\n readonly kind: \"scripted\"\n readonly within: string | null\n /** The words the reader pointed at, as the page shows them now. */\n readonly label?: string\n readonly rect: FrameRect\n }\n\nexport interface FramePoint {\n readonly x: number\n readonly y: number\n}\n\n/** Words a video shows, as its frame found them under the reader's pointer. */\nexport interface FrameVideoText {\n /** The `data-composition-id` of the composition they are in: a scene's, or the root's. */\n readonly scene: string\n readonly tag: string\n /** Its words, spaces collapsed, a line break a space. */\n readonly text: string\n /** How many elements of its tag saying the same come before it in its composition. */\n readonly occurrence: number\n /** Where it shows, in fractions of the picture's width and height. */\n readonly rect: FrameRect\n}\n\nexport interface FrameRect {\n readonly x: number\n readonly y: number\n readonly width: number\n readonly height: number\n}\n\n/** One `<sixb-embed>` the frame shows. */\nexport interface FrameEmbed {\n /** The element's own id while the page is loaded: the same as it scrolls out and back. */\n readonly id: number\n readonly address: string\n readonly rect: {\n readonly x: number\n readonly y: number\n readonly width: number\n readonly height: number\n }\n /**\n * The scale it is drawn at: a slide's, where the embed is laid out at `rect / scale` and scaled\n * with the slide; 1 on a page.\n */\n readonly scale: number\n}\n\ninterface FrameEventOf<Event extends string, Params> {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly event: Event\n readonly params: Params\n}\n\n/**\n * What the frame asks of the app, numbered so the app's `result` answers it: a page keeping data\n * with `sixb.state`, or reading one of its version's queries with `sixb.query`. The app answers\n * only its own frame, for the artifact and the version it shows.\n */\nexport type FrameCall =\n | FrameCallOf<\"state.get\", { readonly key: string }>\n | FrameCallOf<\"state.set\", { readonly key: string; readonly value: unknown }>\n | FrameCallOf<\"state.delete\", { readonly key: string }>\n | FrameCallOf<\"state.keys\", Record<string, never>>\n /** Runs `queries/<name>.json` as the reader; the value is the query route's JSON. */\n | FrameCallOf<\"query.run\", { readonly name: string }>\n\ninterface FrameCallOf<Method extends string, Params> {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly call: number\n readonly method: Method\n readonly params: Params\n}\n\n/** The app's answer to one call: its value, or why it failed. */\nexport interface FrameCallResult {\n readonly protocol: typeof FRAME_PROTOCOL\n readonly result: number\n readonly value?: unknown\n readonly error?: string\n}\n\n/**\n * A message from a frame as a call, or null when it is not one. A page's scripts write what it\n * posts, so the shapes are checked here, and a value is checked for size as JSON, as storage will\n * count it, before the app sends it anywhere.\n */\nexport function parseFrameCall(data: unknown): FrameCall | null {\n if (!isRecord(data) || data.protocol !== FRAME_PROTOCOL || !isRecord(data.params)) return null\n if (!Number.isSafeInteger(data.call) || Number(data.call) < 0) return null\n const call = Number(data.call)\n const { params } = data\n const key = params.key\n const keyed = isStateKey(key)\n switch (data.method) {\n case \"state.get\":\n case \"state.delete\":\n return keyed\n ? ({ protocol: FRAME_PROTOCOL, call, method: data.method, params: { key } } as FrameCall)\n : null\n case \"state.set\": {\n if (!keyed || !(\"value\" in params)) return null\n const json = jsonText(params.value)\n if (json === undefined || utf8Bytes(json) > ARTIFACT_STATE_LIMITS.maxValueBytes) return null\n return {\n protocol: FRAME_PROTOCOL,\n call,\n method: \"state.set\",\n params: { key, value: params.value },\n }\n }\n case \"state.keys\":\n return { protocol: FRAME_PROTOCOL, call, method: \"state.keys\", params: {} }\n case \"query.run\": {\n // The client puts the name in the URL's path, as it does a key.\n const { name } = params\n if (typeof name !== \"string\" || !isArtifactQueryName(name)) return null\n\n return { protocol: FRAME_PROTOCOL, call, method: \"query.run\", params: { name } }\n }\n default:\n return null\n }\n}\n\n/**\n * A key the app can send: the client puts it in the URL's path, where `.` and `..` would name\n * another route, `..` the artifact itself.\n */\nfunction isStateKey(value: unknown): value is string {\n return (\n typeof value === \"string\" &&\n value.length > 0 &&\n value.length <= ARTIFACT_STATE_LIMITS.maxKeyLength &&\n !/\\p{Cc}/u.test(value) &&\n value !== \".\" &&\n value !== \"..\"\n )\n}\n\nfunction jsonText(value: unknown): string | undefined {\n try {\n return JSON.stringify(value)\n } catch {\n return undefined\n }\n}\n\nfunction utf8Bytes(text: string): number {\n return new TextEncoder().encode(text).byteLength\n}\n\n/** Keys the frame passes to the app, so a deck navigates the same with focus in it or not. */\nexport const DECK_KEYS = [\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"PageUp\",\n \"PageDown\",\n \"Home\",\n \"End\",\n \" \",\n \"Escape\",\n] as const\n\n/**\n * The theme tokens the app sends into a frame, read from the viewer as it is themed: the ones an\n * artifact's theme may set.\n */\nexport const FRAME_THEME_TOKENS = ARTIFACT_THEME_TOKENS\n\n/**\n * A message from a frame as an event, or null when it is not one this protocol sends. A deck runs\n * its own scripts, so anything it posts is checked for the shape the app relies on: whole slide\n * numbers, a key the app handles, finite boxes, and no more embeds than a version may record.\n */\nexport function parseFrameEvent(data: unknown): FrameEvent | null {\n if (!isRecord(data) || data.protocol !== FRAME_PROTOCOL || !isRecord(data.params)) return null\n const { params } = data\n switch (data.event) {\n case \"ready\":\n if (params.slides === undefined) return event(\"ready\", {})\n return isCount(params.slides) ? event(\"ready\", { slides: params.slides }) : null\n case \"failed\":\n return event(\"failed\", {})\n case \"select\":\n return isCount(params.slide) && params.slide > 0\n ? event(\"select\", { slide: params.slide })\n : null\n case \"key\":\n return typeof params.key === \"string\" && (DECK_KEYS as readonly string[]).includes(params.key)\n ? event(\"key\", { key: params.key })\n : null\n case \"open\":\n return isAddress(params.address) ? event(\"open\", { address: params.address }) : null\n case \"link\":\n return isWebAddress(params.url) ? event(\"link\", { url: params.url }) : null\n case \"embeds\": {\n const { embeds } = params\n if (!Array.isArray(embeds) || embeds.length > ARTIFACT_LIMITS.maxReferences) return null\n const parsed: FrameEmbed[] = []\n const ids = new Set<number>()\n for (const embed of embeds) {\n if (!isRecord(embed) || !isAddress(embed.address) || !isRecord(embed.rect)) return null\n\n // Two embeds with one id would be one element drawn twice.\n if (!isCount(embed.id) || ids.has(embed.id)) return null\n ids.add(embed.id)\n\n const { x, y, width, height } = embed.rect\n if (![x, y, width, height, embed.scale].every(Number.isFinite)) return null\n if (Number(width) < 0 || Number(height) < 0 || Number(embed.scale) <= 0) return null\n parsed.push({\n id: embed.id,\n address: embed.address,\n rect: { x: Number(x), y: Number(y), width: Number(width), height: Number(height) },\n scale: Number(embed.scale),\n })\n }\n return event(\"embeds\", { embeds: parsed })\n }\n case \"size\":\n return Number.isFinite(params.height) && Number(params.height) >= 0\n ? event(\"size\", { height: Math.min(Number(params.height), MAX_HEIGHT) })\n : null\n case \"edit.hover\":\n case \"edit.select\": {\n const at = data.event === \"edit.select\" ? parsePoint(params.at) : undefined\n if (at === null) return null\n const point = at ? { at } : {}\n if (params.target === null) return event(data.event, { target: null, ...point })\n const target = parseEditTarget(params.target)\n return target ? event(data.event, { target, ...point }) : null\n }\n case \"video.picked\": {\n if (params.target === null) return event(\"video.picked\", { target: null })\n const target = parseVideoText(params.target)\n return target ? event(\"video.picked\", { target }) : null\n }\n case \"edit.text\":\n return isEditAddress(params.address) &&\n typeof params.text === \"string\" &&\n params.text.length <= MAX_EDIT_TEXT_LENGTH &&\n typeof params.base === \"string\" &&\n params.base.length <= MAX_EDIT_TEXT_LENGTH\n ? event(\"edit.text\", { address: params.address, base: params.base, text: params.text })\n : null\n case \"zoom\": {\n if (params.step !== undefined) {\n return ZOOM_STEPS.includes(String(params.step))\n ? event(\"zoom\", { step: params.step as FrameZoomStep })\n : null\n }\n\n const at = parsePoint(params.at)\n const factor = Number(params.factor)\n if (!at || !Number.isFinite(params.factor) || factor <= 0) return null\n\n return event(\"zoom\", {\n factor: Math.min(MAX_ZOOM_FACTOR, Math.max(1 / MAX_ZOOM_FACTOR, factor)),\n at,\n })\n }\n case \"pan\": {\n const { x, y, by } = params\n if (!Number.isFinite(x) || !Number.isFinite(y) || (by !== \"wheel\" && by !== \"touch\")) {\n return null\n }\n\n const bounded = (delta: number) => Math.min(MAX_PAN, Math.max(-MAX_PAN, delta))\n return event(\"pan\", { x: bounded(Number(x)), y: bounded(Number(y)), by })\n }\n case \"space\":\n return typeof params.down === \"boolean\" ? event(\"space\", { down: params.down }) : null\n case \"press\":\n return typeof params.text === \"string\" &&\n params.text.length > 0 &&\n params.text.length <= ARTIFACT_LIMITS.maxCanvasLabelLength\n ? event(\"press\", { text: params.text })\n : null\n default:\n return null\n }\n}\n\n/** The most words a text element of a board takes from one edit: a board's own size. */\nconst MAX_EDIT_TEXT_LENGTH = ARTIFACT_LIMITS.maxBoardBytes\n\nconst EDIT_KINDS: readonly string[] = [\"text\", \"image\", \"whole\", \"box\"]\n\nconst ZOOM_STEPS: readonly string[] = [\"in\", \"out\", \"actual\"] satisfies FrameZoomStep[]\n\n/** The most one gesture zooms by, either way: a wheel's notch is far less. */\nconst MAX_ZOOM_FACTOR = 4\n\n/** The most one wheel's turn or one finger's move pans by, either way: a screen's width. */\nconst MAX_PAN = 4000\n\n/** The longest label a frame reports for an element: the runtime cuts its own at 80. */\nconst MAX_EDIT_LABEL_LENGTH = 200\n\n/** An address as `boardElements` writes one: steps of a tag and an index, from the body. */\nfunction isEditAddress(value: unknown): value is string {\n return (\n typeof value === \"string\" && value.length <= 2048 && /^body(>[a-z][a-z0-9-]*:\\d+)*$/.test(value)\n )\n}\n\n/** A point the frame reports: undefined for none, null for one that does not read. */\nfunction parsePoint(value: unknown): FramePoint | null | undefined {\n if (value === undefined) return undefined\n if (!isRecord(value) || !Number.isFinite(value.x) || !Number.isFinite(value.y)) return null\n return { x: Number(value.x), y: Number(value.y) }\n}\n\nfunction parseVideoText(value: unknown): FrameVideoText | null {\n if (!isRecord(value) || !isRecord(value.rect)) return null\n const { scene, tag, text, occurrence } = value\n if (typeof scene !== \"string\" || !/^[A-Za-z][A-Za-z0-9_-]{0,63}$/.test(scene)) return null\n if (typeof tag !== \"string\" || !/^[a-z][a-z0-9]{0,15}$/.test(tag)) return null\n if (typeof text !== \"string\" || text.length > MAX_EDIT_TEXT_LENGTH || !isCount(occurrence)) {\n return null\n }\n\n const { x, y, width, height } = value.rect\n if (![x, y, width, height].every(Number.isFinite)) return null\n return {\n scene,\n tag,\n text,\n occurrence,\n rect: { x: Number(x), y: Number(y), width: Number(width), height: Number(height) },\n }\n}\n\nfunction parseEditTarget(value: unknown): FrameEditTarget | null {\n if (!isRecord(value) || !isRecord(value.rect)) return null\n const { x, y, width, height } = value.rect\n if (![x, y, width, height].every(Number.isFinite)) return null\n const rect = { x: Number(x), y: Number(y), width: Number(width), height: Number(height) }\n\n if (value.kind === \"scripted\") {\n if (value.address !== null) return null\n if (value.within !== null && !isEditAddress(value.within)) return null\n const label =\n typeof value.label === \"string\" && value.label.length <= MAX_EDIT_LABEL_LENGTH\n ? { label: value.label }\n : {}\n return {\n address: null,\n kind: \"scripted\",\n within: value.within as string | null,\n ...label,\n rect,\n }\n }\n if (!isEditAddress(value.address) || !EDIT_KINDS.includes(String(value.kind))) return null\n if (typeof value.label !== \"string\" || value.label.length > MAX_EDIT_LABEL_LENGTH) return null\n return {\n address: value.address,\n kind: value.kind as BoardElementKind,\n label: value.label,\n rect,\n }\n}\n\n/** The most a page reports as its height: more is a page that grows with its frame. */\nconst MAX_HEIGHT = 100_000\n\nfunction event<Name extends FrameEvent[\"event\"]>(\n name: Name,\n params: Extract<FrameEvent, { event: Name }>[\"params\"]\n): FrameEvent {\n return { protocol: FRAME_PROTOCOL, event: name, params } as FrameEvent\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null\n}\n\nfunction isCount(value: unknown): value is number {\n return Number.isSafeInteger(value) && Number(value) >= 0\n}\n\n/** Long enough for any address a version can record; the app resolves it before using it. */\nfunction isAddress(value: unknown): value is string {\n return typeof value === \"string\" && value.length <= 2048\n}\n\n/** The longest web address the app opens: longer than any link a page needs. */\nconst MAX_URL_LENGTH = 8192\n\n/** An absolute `http:` or `https:` address, as the frame resolves a link's. */\nfunction isWebAddress(value: unknown): value is string {\n if (typeof value !== \"string\" || value.length > MAX_URL_LENGTH) return false\n\n try {\n const { protocol } = new URL(value)\n return protocol === \"http:\" || protocol === \"https:\"\n } catch {\n return false\n }\n}\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": "
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,SAAS,oBAAoB,CAAC,SAY1B;AAAA,EACT,QAAQ,WAAW;AAAA,EACnB,MAAM,QAAQ,CAAC,OAAO,IAAI,OAAO,OAAO,OAAO,MAAM,EAAE,KAAK,CAAC,UAAU,UAAU,SAAS;AAAA,EAC1F,MAAM,QAAQ;AAAA,IACZ,GAAI,QACA,WAAW,QAAQ,QAAQ,OAAO,IAClC,CAAC,OAAO,OAAO,OAAO,SAAS,OAAO,QAAQ,KAAK,UAAU,OAAO,KAAK,IAAI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T,MAAM;AAAA,MACN,QAAQ,MAAM;AAAA,SACX;AAAA,MACH;AAAA,IACF;AAAA,EACF;AAAA,EACA,IAAI,CAAC,cAAc,MAAM,OAAO,KAAK,CAAC,WAAW,SAAS,OAAO,MAAM,IAAI,CAAC;AAAA,IAAG,OAAO;AAAA,EACtF,IAAI,OAAO,MAAM,UAAU,YAAY,MAAM,MAAM,SAAS;AAAA,IAAuB,OAAO;AAAA,EAC1F,OAAO;AAAA,IACL,SAAS,MAAM;AAAA,IACf,MAAM,MAAM;AAAA,IACZ,OAAO,MAAM;AAAA,IACb;AAAA,EACF;AAAA;AAIF,IAAM,aAAa;AAEnB,SAAS,KAAuC,CAC9C,MACA,QACY;AAAA,EACZ,OAAO,EAAE,UAAU,gBAAgB,OAAO,MAAM,OAAO;AAAA;AAGzD,SAAS,QAAQ,CAAC,OAAkD;AAAA,EAClE,OAAO,OAAO,UAAU,YAAY,UAAU;AAAA;AAGhD,SAAS,OAAO,CAAC,OAAiC;AAAA,EAChD,OAAO,OAAO,cAAc,KAAK,KAAK,OAAO,KAAK,KAAK;AAAA;AAIzD,SAAS,SAAS,CAAC,OAAiC;AAAA,EAClD,OAAO,OAAO,UAAU,YAAY,MAAM,UAAU;AAAA;AAItD,IAAM,iBAAiB;AAGvB,SAAS,YAAY,CAAC,OAAiC;AAAA,EACrD,IAAI,OAAO,UAAU,YAAY,MAAM,SAAS;AAAA,IAAgB,OAAO;AAAA,EAEvE,IAAI;AAAA,IACF,QAAQ,aAAa,IAAI,IAAI,KAAK;AAAA,IAClC,OAAO,aAAa,WAAW,aAAa;AAAA,IAC5C,MAAM;AAAA,IACN,OAAO;AAAA;AAAA;",
|
|
9
|
+
"debugId": "DC767EA27429DFBB64756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The kinds of artifact Sixb renders. An artifact's kind is fixed when it is created. */
|
|
2
|
-
export declare const ARTIFACT_KINDS: readonly ["document", "sheet", "slides", "page", "canvas", "file"];
|
|
2
|
+
export declare const ARTIFACT_KINDS: readonly ["document", "sheet", "slides", "page", "canvas", "video", "file"];
|
|
3
3
|
export type ArtifactKind = (typeof ARTIFACT_KINDS)[number];
|
|
4
4
|
export declare function isArtifactKind(value: unknown): value is ArtifactKind;
|
|
5
5
|
//# sourceMappingURL=kinds.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../src/artifacts/kinds.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../../src/artifacts/kinds.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,eAAO,MAAM,cAAc,6EAQjB,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1D,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE"}
|
|
@@ -1,8 +1,34 @@
|
|
|
1
|
+
import type { ArtifactKind } from "./kinds";
|
|
2
|
+
/** How many bytes one file, and all of a version's files together, may hold. */
|
|
3
|
+
export interface ArtifactSizeLimits {
|
|
4
|
+
readonly maxFileBytes: number;
|
|
5
|
+
/** Every file the version lists, counted at full size, even one an earlier version holds. */
|
|
6
|
+
readonly maxVersionBytes: number;
|
|
7
|
+
}
|
|
1
8
|
/** What one version may hold. Publishing refuses a version over any of these. */
|
|
2
9
|
export declare const ARTIFACT_LIMITS: {
|
|
3
10
|
readonly maxFiles: 500;
|
|
11
|
+
/** Any kind's sizes, unless `sizesByKind` gives its own: read them with `artifactSizeLimits`. */
|
|
4
12
|
readonly maxFileBytes: number;
|
|
5
13
|
readonly maxVersionBytes: number;
|
|
14
|
+
/**
|
|
15
|
+
* The kinds whose files may be larger. A file artifact's one file may be a long recording, as
|
|
16
|
+
* large as one upload may be: it is uploaded staged and served by range, never read whole.
|
|
17
|
+
*/
|
|
18
|
+
readonly sizesByKind: {
|
|
19
|
+
file: {
|
|
20
|
+
maxFileBytes: number;
|
|
21
|
+
maxVersionBytes: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A video's footage is as large as one upload, and its version holds every original it plays:
|
|
25
|
+
* an export downloads them all to its sandbox's disk, beside the frames it renders.
|
|
26
|
+
*/
|
|
27
|
+
video: {
|
|
28
|
+
maxFileBytes: number;
|
|
29
|
+
maxVersionBytes: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
6
32
|
readonly maxPathLength: 512;
|
|
7
33
|
readonly maxTitleLength: 200;
|
|
8
34
|
/** A document's Markdown is parsed whole when it is published. */
|
|
@@ -37,6 +63,15 @@ export declare const ARTIFACT_LIMITS: {
|
|
|
37
63
|
readonly maxCanvasLabelLength: 120;
|
|
38
64
|
/** A board's HTML is parsed whole when it is published, as a page's is. */
|
|
39
65
|
readonly maxBoardBytes: number;
|
|
66
|
+
/** A video's scenes, and how long it plays, in all. */
|
|
67
|
+
readonly maxVideoScenes: 200;
|
|
68
|
+
readonly maxVideoSeconds: 600;
|
|
69
|
+
/** A video frame's width or height, in pixels: 4K. */
|
|
70
|
+
readonly maxVideoSize: 3840;
|
|
71
|
+
/** The video and sound files a video plays, each probed and proxied once it is published. */
|
|
72
|
+
readonly maxVideoMediaFiles: 50;
|
|
73
|
+
/** A video's `index.html` and each scene's HTML are parsed whole when it is published. */
|
|
74
|
+
readonly maxSceneBytes: number;
|
|
40
75
|
/** `artifact:` addresses one version may use. */
|
|
41
76
|
readonly maxReferences: 200;
|
|
42
77
|
/** `queries/<name>.json` files, each run for every reader who opens the version. */
|
|
@@ -45,6 +80,8 @@ export declare const ARTIFACT_LIMITS: {
|
|
|
45
80
|
/** What one query returns at most; past it, its result says it is truncated. */
|
|
46
81
|
readonly maxQueryRows: 10000;
|
|
47
82
|
};
|
|
83
|
+
/** What one file, and one version, of an artifact of `kind` may hold. */
|
|
84
|
+
export declare function artifactSizeLimits(kind: ArtifactKind): ArtifactSizeLimits;
|
|
48
85
|
/**
|
|
49
86
|
* What a page may keep for each reader with `sixb.state`, across its versions: values are JSON,
|
|
50
87
|
* counted by their UTF-8 bytes as written.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/artifacts/limits.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/artifacts/limits.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CACjC;AAED,iFAAiF;AACjF,eAAO,MAAM,eAAe;;IAE1B,iGAAiG;;;IAGjG;;;OAGG;;;;;;QAGD;;;WAGG;;;;;;;;IAKL,kEAAkE;;;;IAIlE,oEAAoE;;;IAGpE,mEAAmE;;;;;IAKnE,mEAAmE;;IAEnE,kEAAkE;;IAElE,gGAAgG;;;IAGhG,4EAA4E;;;;;;;IAO5E,iDAAiD;;IAEjD,4EAA4E;;IAE5E,2EAA2E;;IAE3E,uDAAuD;;;IAGvD,sDAAsD;;IAEtD,6FAA6F;;IAE7F,0FAA0F;;IAE1F,iDAAiD;;IAEjD,oFAAoF;;;IAGpF,gFAAgF;;CAExE,CAAA;AAEV,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,kBAAkB,CAQzE;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,KAAK,CAAA;AAExC,4CAA4C;AAC5C,eAAO,MAAM,uBAAuB;IAClC,sCAAsC;;IAEtC;;;OAGG;;IAEH,wCAAwC;;IAExC,mDAAmD;;CAE3C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAe,KAAK,UAAU,EAA6B,MAAM,WAAW,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAe,KAAK,UAAU,EAA6B,MAAM,WAAW,CAAA;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AA0C5C,yFAAyF;AACzF,MAAM,MAAM,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAE7E,mCAAmC;AACnC,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAErD,2CAA2C;AAC3C,eAAO,MAAM,UAAU,UAAU,CAAA;AAIjC,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAanD,CAAA;AAEF,8DAA8D;AAC9D,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGpD;AAgBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,E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G,CAAC,OAAO,CAAC,CAM9D;AAMD,yFAAyF;AACzF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM7E;AAsFD,gGAAgG;AAChG,wBAAgB,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAqBjG"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* An artifact edited live, as a viewer holds it: its open version as a Yjs document that everyone
|
|
3
|
-
* editing it changes at once, read as files or, for a canvas, as its items
|
|
4
|
-
* the `/ws/artifacts` socket that keeps it in
|
|
3
|
+
* editing it changes at once, read as files or, for a canvas, as its items, and a video's edits
|
|
4
|
+
* as changes to its files' text; and the messages of the `/ws/artifacts` socket that keeps it in
|
|
5
|
+
* step. Browser-safe.
|
|
5
6
|
*/
|
|
7
|
+
export { readVideoComposition, VIDEO_ENTRY, type VideoComposition, type VideoScene, } from "../video/composition";
|
|
8
|
+
export { cutRange, duplicateScene, findVideoTarget, insertClip, MAX_VOLUME, moveClip, moveClips, moveScene, readVideoFileTimeline, removeClip, removeClips, removeMediaRanges, removeScene, replaceClipMedia, setClipSound, setClipTiming, setSceneLabel, setSceneLength, setVideoText, splitClip, splitClips, trimClip, type VideoAnimationJoined, type VideoAnimationLeft, type VideoClipTarget, type VideoCut, type VideoEdit, type VideoEditResult, type VideoImportKind, type VideoPlaceResult, type VideoRange, type VideoSources, type VideoTarget, videoSceneLength, videoTarget, } from "../video/edit";
|
|
9
|
+
export { type VideoChain, type VideoChainPart, type VideoClip, type VideoClipKind, type VideoFileTimeline, type VideoSceneSpan, type VideoText, type VideoTrack, videoChains, videoChapters, } from "../video/timeline";
|
|
6
10
|
export { type BlockMark, type BlockNode, blocksToMarkdown, markdownToBlocks, } from "./blocks";
|
|
7
11
|
export { annotateBoard, applyBoardEditToText, type BoardChange, type BoardEdit, type BoardElement, type BoardElementKind, type BoardFramePatch, type BoardStyleProperty, boardElement, boardElements, boardFilePath, boardFramePatches, boardTextHash, mergeBoardText, setBoardImage, setBoardStyle, setBoardText, } from "./board";
|
|
8
12
|
export { canvasItemMap, canvasItemObject, documentCanvas, documentFiles, LIVE_FILES, type LiveFile, type LiveFiles, mergeCanvasItem, } from "./document";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,UAAU,GAChB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACL,QAAQ,EACR,cAAc,EACd,eAAe,EACf,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,SAAS,EACT,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,YAAY,EACZ,SAAS,EACT,UAAU,EACV,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,gBAAgB,EAChB,WAAW,GACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,cA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