@sixb/core 0.2.3 → 0.2.5
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 +28 -28
- package/dist/agents/cancel.d.ts +1 -1
- package/dist/agents/cancel.d.ts.map +1 -1
- package/dist/agents/child-question.d.ts +35 -2
- package/dist/agents/child-question.d.ts.map +1 -1
- package/dist/agents/execution.d.ts +35 -3
- package/dist/agents/execution.d.ts.map +1 -1
- package/dist/agents/ids.d.ts +4 -0
- package/dist/agents/ids.d.ts.map +1 -1
- package/dist/agents/index.d.ts +9 -7
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +59 -33
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/model-loop.d.ts.map +1 -1
- package/dist/agents/queued-turn.d.ts +16 -0
- package/dist/agents/queued-turn.d.ts.map +1 -0
- package/dist/agents/request.d.ts +79 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/run-after-finish.d.ts +10 -0
- package/dist/agents/run-after-finish.d.ts.map +1 -1
- package/dist/agents/run-artifacts.d.ts +0 -38
- package/dist/agents/run-artifacts.d.ts.map +1 -1
- package/dist/agents/run-events.d.ts +6 -1
- package/dist/agents/run-events.d.ts.map +1 -1
- package/dist/agents/run-session-children.d.ts +9 -0
- package/dist/agents/run-session-children.d.ts.map +1 -1
- package/dist/agents/run-session-http.d.ts.map +1 -1
- package/dist/agents/run-session-serve.d.ts.map +1 -1
- package/dist/agents/run-session.d.ts +14 -1
- package/dist/agents/run-session.d.ts.map +1 -1
- package/dist/agents/run-turn.d.ts.map +1 -1
- package/dist/agents/streams/index.d.ts +1 -1
- package/dist/agents/streams/index.d.ts.map +1 -1
- package/dist/agents/streams/index.js +1 -1
- package/dist/agents/streams/internal.js +1 -1
- package/dist/agents/streams/protocol.d.ts +16 -0
- package/dist/agents/streams/protocol.d.ts.map +1 -1
- package/dist/agents/tool-files.d.ts +1 -1
- package/dist/agents/tool-files.d.ts.map +1 -1
- package/dist/agents/tool-input-coercion.d.ts +20 -0
- package/dist/agents/tool-input-coercion.d.ts.map +1 -0
- package/dist/agents/turn-answered.d.ts +7 -0
- package/dist/agents/turn-answered.d.ts.map +1 -0
- package/dist/agents/validation.d.ts +1 -1
- package/dist/agents/validation.d.ts.map +1 -1
- package/dist/artifacts/canvas-display.d.ts +3 -5
- package/dist/artifacts/canvas-display.d.ts.map +1 -1
- package/dist/artifacts/comments.d.ts +14 -3
- package/dist/artifacts/comments.d.ts.map +1 -1
- package/dist/artifacts/document-fill.d.ts +18 -0
- package/dist/artifacts/document-fill.d.ts.map +1 -0
- package/dist/artifacts/errors.d.ts +1 -1
- package/dist/artifacts/errors.d.ts.map +1 -1
- package/dist/artifacts/events.d.ts +3 -2
- package/dist/artifacts/events.d.ts.map +1 -1
- package/dist/artifacts/execution.d.ts +40 -4
- package/dist/artifacts/execution.d.ts.map +1 -1
- package/dist/artifacts/frames/assets.d.ts +8 -1
- package/dist/artifacts/frames/assets.d.ts.map +1 -1
- package/dist/artifacts/frames/document-data.d.ts +98 -0
- package/dist/artifacts/frames/document-data.d.ts.map +1 -0
- package/dist/artifacts/frames/entries.d.ts +12 -7
- package/dist/artifacts/frames/entries.d.ts.map +1 -1
- package/dist/artifacts/frames/index.d.ts +2 -1
- package/dist/artifacts/frames/index.d.ts.map +1 -1
- package/dist/artifacts/frames/index.js +22 -13
- package/dist/artifacts/frames/index.js.map +4 -4
- package/dist/artifacts/frames/kit.d.ts +15 -0
- package/dist/artifacts/frames/kit.d.ts.map +1 -1
- package/dist/artifacts/frames/protocol.d.ts +65 -3
- package/dist/artifacts/frames/protocol.d.ts.map +1 -1
- package/dist/artifacts/frames/runtime.d.ts +32 -5
- package/dist/artifacts/frames/runtime.d.ts.map +1 -1
- package/dist/artifacts/index.d.ts +4 -2
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +35 -3
- package/dist/artifacts/index.js.map +3 -3
- package/dist/artifacts/live/blocks.d.ts +62 -0
- package/dist/artifacts/live/blocks.d.ts.map +1 -0
- package/dist/artifacts/live/board.d.ts +6 -0
- package/dist/artifacts/live/board.d.ts.map +1 -1
- package/dist/artifacts/live/document.d.ts +12 -0
- package/dist/artifacts/live/document.d.ts.map +1 -1
- package/dist/artifacts/live/index.d.ts +2 -0
- package/dist/artifacts/live/index.d.ts.map +1 -1
- package/dist/artifacts/live/index.js +148 -44
- package/dist/artifacts/live/index.js.map +3 -3
- package/dist/artifacts/live/page.d.ts +49 -0
- package/dist/artifacts/live/page.d.ts.map +1 -0
- package/dist/artifacts/live/protocol.d.ts +5 -0
- package/dist/artifacts/live/protocol.d.ts.map +1 -1
- package/dist/artifacts/live/server.d.ts +2 -2
- package/dist/artifacts/live/server.d.ts.map +1 -1
- package/dist/artifacts/live/server.js +23 -19
- package/dist/artifacts/live/server.js.map +1 -1
- package/dist/artifacts/live/state.d.ts +4 -1
- package/dist/artifacts/live/state.d.ts.map +1 -1
- package/dist/artifacts/outline.d.ts +16 -0
- package/dist/artifacts/outline.d.ts.map +1 -1
- package/dist/artifacts/paper.d.ts +22 -0
- package/dist/artifacts/paper.d.ts.map +1 -0
- package/dist/artifacts/pdf-job.d.ts +9 -0
- package/dist/artifacts/pdf-job.d.ts.map +1 -0
- package/dist/artifacts/publish/fields.d.ts +25 -0
- package/dist/artifacts/publish/fields.d.ts.map +1 -0
- package/dist/artifacts/publish/index.d.ts +2 -1
- package/dist/artifacts/publish/index.d.ts.map +1 -1
- package/dist/artifacts/publish/index.js +26 -18
- package/dist/artifacts/publish/index.js.map +1 -1
- package/dist/artifacts/publish/merge.d.ts +5 -5
- package/dist/artifacts/publish/merge.d.ts.map +1 -1
- package/dist/artifacts/publish/pdf.d.ts +28 -0
- package/dist/artifacts/publish/pdf.d.ts.map +1 -0
- package/dist/artifacts/publish/previews.d.ts +12 -20
- package/dist/artifacts/publish/previews.d.ts.map +1 -1
- package/dist/artifacts/publish/publish.d.ts.map +1 -1
- package/dist/artifacts/publish/queries.d.ts +6 -1
- package/dist/artifacts/publish/queries.d.ts.map +1 -1
- package/dist/artifacts/publish/query-answers.d.ts +5 -2
- package/dist/artifacts/publish/query-answers.d.ts.map +1 -1
- package/dist/artifacts/publish/validate/document-html.d.ts +24 -0
- package/dist/artifacts/publish/validate/document-html.d.ts.map +1 -0
- package/dist/artifacts/publish/validate/document.d.ts +5 -3
- package/dist/artifacts/publish/validate/document.d.ts.map +1 -1
- package/dist/artifacts/queries.d.ts +16 -2
- package/dist/artifacts/queries.d.ts.map +1 -1
- package/dist/auth/index.js +2 -2
- package/dist/authorization/event-visibility.d.ts.map +1 -1
- package/dist/authorization/index.js +1 -1
- package/dist/blob-storage/index.js +1 -1
- package/dist/bootstrap/index.js +38 -38
- package/dist/{chunk-tqa68kj7.js → chunk-0hkdtwqk.js} +5 -5
- package/dist/{chunk-s5n9617r.js → chunk-0mvjpgvm.js} +5 -5
- package/dist/{chunk-k66rp2hr.js → chunk-1yh6jgtz.js} +1 -1
- package/dist/{chunk-26qet7wh.js → chunk-5t9gm5tt.js} +4 -4
- package/dist/{chunk-a6fjkcne.js → chunk-60662fyv.js} +54 -28
- package/dist/{chunk-a6fjkcne.js.map → chunk-60662fyv.js.map} +7 -6
- package/dist/{chunk-e0hnbb1m.js → chunk-61zptves.js} +1 -1
- package/dist/{chunk-hkaa807g.js → chunk-68hm50qh.js} +3 -3
- package/dist/{chunk-9nsjjd44.js → chunk-8tv3qd65.js} +2 -1
- package/dist/chunk-8tv3qd65.js.map +12 -0
- package/dist/{chunk-fe6r7yhg.js → chunk-92wrka15.js} +1 -1
- package/dist/{chunk-m7b9q5dk.js → chunk-aw1z0gre.js} +4 -4
- package/dist/chunk-az95tsh3.js.map +2 -2
- package/dist/{chunk-4j0sagwv.js → chunk-b4escq4c.js} +62 -14
- package/dist/{chunk-4j0sagwv.js.map → chunk-b4escq4c.js.map} +7 -7
- package/dist/chunk-bqr703h4.js +1799 -0
- package/dist/chunk-bqr703h4.js.map +13 -0
- package/dist/{chunk-eptrvnby.js → chunk-c29729me.js} +42 -3
- package/dist/chunk-c29729me.js.map +12 -0
- package/dist/{chunk-t24yktqr.js → chunk-dvgc56n2.js} +20 -4
- package/dist/{chunk-t24yktqr.js.map → chunk-dvgc56n2.js.map} +5 -5
- package/dist/{chunk-3014rfjz.js → chunk-ewqn51gr.js} +25 -7
- package/dist/{chunk-3014rfjz.js.map → chunk-ewqn51gr.js.map} +3 -3
- package/dist/{chunk-7z5rkf0m.js → chunk-ey1p8w68.js} +175 -5
- package/dist/chunk-ey1p8w68.js.map +13 -0
- package/dist/{chunk-z0t4p2sk.js → chunk-fpf57gca.js} +350 -61
- package/dist/chunk-fpf57gca.js.map +47 -0
- package/dist/{chunk-kv0kvknv.js → chunk-fzae1jpq.js} +7 -7
- package/dist/{chunk-b9qfh2ya.js → chunk-fzbhybya.js} +29 -2
- package/dist/chunk-fzbhybya.js.map +11 -0
- package/dist/{chunk-2by73sm2.js → chunk-gjhrz66x.js} +225 -17
- package/dist/{chunk-2by73sm2.js.map → chunk-gjhrz66x.js.map} +5 -5
- package/dist/chunk-hn2r7z41.js.map +1 -1
- package/dist/{chunk-6gtxshcc.js → chunk-k29n4176.js} +6 -6
- package/dist/{chunk-48c1z8nj.js → chunk-k3jh8gsg.js} +10 -2
- package/dist/chunk-k3jh8gsg.js.map +10 -0
- package/dist/{chunk-w9s23r24.js → chunk-m3qx2pns.js} +751 -93
- package/dist/chunk-m3qx2pns.js.map +34 -0
- package/dist/{chunk-smnt672s.js → chunk-m9ketb51.js} +20 -4
- package/dist/chunk-m9ketb51.js.map +10 -0
- package/dist/chunk-mbwsgjn7.js +40 -0
- package/dist/chunk-mbwsgjn7.js.map +11 -0
- package/dist/{chunk-sysnvjce.js → chunk-naxjka9v.js} +2 -2
- package/dist/{chunk-n4zzaf6q.js → chunk-nxysqbt0.js} +4 -2
- package/dist/chunk-nxysqbt0.js.map +10 -0
- package/dist/{chunk-vzkxqf8h.js → chunk-paxabbqd.js} +49 -5
- package/dist/chunk-paxabbqd.js.map +23 -0
- package/dist/{chunk-8tqnsx3q.js → chunk-pc7kra3k.js} +5 -3
- package/dist/{chunk-8tqnsx3q.js.map → chunk-pc7kra3k.js.map} +3 -3
- package/dist/{chunk-qafng88v.js → chunk-pqvvqc65.js} +4 -4
- package/dist/chunk-pvpq483h.js.map +2 -2
- package/dist/{chunk-mzx71snp.js → chunk-q7g9cqwt.js} +7 -2
- package/dist/{chunk-mzx71snp.js.map → chunk-q7g9cqwt.js.map} +3 -3
- package/dist/{chunk-8t2ynwg0.js → chunk-q8d9p0tb.js} +24 -1
- package/dist/{chunk-8t2ynwg0.js.map → chunk-q8d9p0tb.js.map} +3 -3
- package/dist/{chunk-wa05txmk.js → chunk-qavwr628.js} +49 -5
- package/dist/chunk-qavwr628.js.map +12 -0
- package/dist/{chunk-bkmnd7zq.js → chunk-rg725hry.js} +174 -30
- package/dist/{chunk-bkmnd7zq.js.map → chunk-rg725hry.js.map} +9 -8
- package/dist/{chunk-8p7bze4c.js → chunk-s1mqyqmm.js} +3 -3
- package/dist/{chunk-p351afzm.js → chunk-s5pj68fa.js} +2 -2
- package/dist/{chunk-855w9nvw.js → chunk-vehcr9eb.js} +1 -1
- package/dist/{chunk-qds484t8.js → chunk-vs2s3p8n.js} +932 -21
- package/dist/chunk-vs2s3p8n.js.map +20 -0
- package/dist/chunk-vtjzwymr.js.map +2 -2
- package/dist/{chunk-n68vz95m.js → chunk-wqe9shx2.js} +1 -1
- package/dist/{chunk-0k3r5kb3.js → chunk-xcrnrpfh.js} +1 -1
- package/dist/{chunk-cwdzcv37.js → chunk-xrmbhap8.js} +2 -2
- package/dist/{chunk-cwdzcv37.js.map → chunk-xrmbhap8.js.map} +2 -2
- package/dist/{chunk-f6ahf5gf.js → chunk-xxfj0rr2.js} +20 -5
- package/dist/chunk-xxfj0rr2.js.map +13 -0
- package/dist/{chunk-3hzhcfsv.js → chunk-y8fwm3z2.js} +2 -2
- package/dist/{chunk-3hzhcfsv.js.map → chunk-y8fwm3z2.js.map} +3 -3
- package/dist/{chunk-e9w4mgdh.js → chunk-z1njfqqs.js} +589 -53
- package/dist/{chunk-e9w4mgdh.js.map → chunk-z1njfqqs.js.map} +14 -11
- package/dist/{chunk-yv8hv4wq.js → chunk-z4jqb44a.js} +3 -1
- package/dist/chunk-z4jqb44a.js.map +10 -0
- package/dist/{chunk-s7xqfxs9.js → chunk-zft9bzbc.js} +2 -1
- package/dist/{chunk-s7xqfxs9.js.map → chunk-zft9bzbc.js.map} +3 -3
- package/dist/{chunk-38yvdqzd.js → chunk-zxhym8tr.js} +1 -1
- package/dist/connectors/connection-handles.d.ts +9 -0
- package/dist/connectors/connection-handles.d.ts.map +1 -0
- package/dist/connectors/connections/authorizations.d.ts +9 -0
- package/dist/connectors/connections/authorizations.d.ts.map +1 -1
- package/dist/connectors/connections/events.d.ts +17 -0
- package/dist/connectors/connections/events.d.ts.map +1 -0
- package/dist/connectors/connections/runs.d.ts +3 -0
- package/dist/connectors/connections/runs.d.ts.map +1 -1
- package/dist/connectors/connections/service.d.ts +4 -0
- package/dist/connectors/connections/service.d.ts.map +1 -1
- package/dist/connectors/execution.d.ts +7 -1
- package/dist/connectors/execution.d.ts.map +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/types.d.ts +22 -1
- package/dist/connectors/types.d.ts.map +1 -1
- package/dist/datasets/write.js +1 -1
- package/dist/deploy/index.d.ts +1 -1
- package/dist/deploy/index.d.ts.map +1 -1
- package/dist/deploy/internal.js +3 -2
- package/dist/deploy/internal.js.map +3 -3
- package/dist/deploy/services.d.ts.map +1 -1
- package/dist/deploy/types.d.ts +18 -1
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/events/definitions.d.ts +4 -0
- package/dist/events/definitions.d.ts.map +1 -1
- package/dist/events/execution.d.ts.map +1 -1
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -3
- package/dist/events/outbox-dispatcher.d.ts +7 -0
- package/dist/events/outbox-dispatcher.d.ts.map +1 -1
- package/dist/events/scope.d.ts +1 -0
- package/dist/events/scope.d.ts.map +1 -1
- package/dist/events/scope.js +1 -1
- package/dist/events/selectors/builder.d.ts +9 -1
- package/dist/events/selectors/builder.d.ts.map +1 -1
- package/dist/events/selectors/index.d.ts +2 -2
- package/dist/events/selectors/index.d.ts.map +1 -1
- package/dist/events/selectors/index.js +2 -2
- package/dist/events/selectors/predicate.d.ts.map +1 -1
- package/dist/events/selectors/types.d.ts +18 -3
- package/dist/events/selectors/types.d.ts.map +1 -1
- package/dist/events/types/artifacts.d.ts +7 -1
- package/dist/events/types/artifacts.d.ts.map +1 -1
- package/dist/events/types/connectors.d.ts +32 -0
- package/dist/events/types/connectors.d.ts.map +1 -0
- package/dist/events/types/index.d.ts +3 -1
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/execution/agent.js +28 -28
- package/dist/execution/authorization.d.ts +5 -0
- package/dist/execution/authorization.d.ts.map +1 -1
- package/dist/execution/primitive.js +28 -28
- package/dist/execution/request.js +29 -29
- package/dist/execution/scopes.d.ts +8 -0
- package/dist/execution/scopes.d.ts.map +1 -1
- package/dist/execution/script.d.ts +7 -0
- package/dist/execution/script.d.ts.map +1 -0
- package/dist/execution/types.d.ts +16 -1
- 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 +9 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -44
- package/dist/index.js.map +1 -1
- package/dist/lake-storage/index.js +1 -1
- package/dist/lineage/executors.d.ts +1 -1
- package/dist/lineage/executors.d.ts.map +1 -1
- package/dist/maintenance/index.js +1 -1
- package/dist/materialization/event-envelopes.d.ts +3 -3
- package/dist/materialization/event-envelopes.d.ts.map +1 -1
- package/dist/materialization/events.d.ts +6 -0
- package/dist/materialization/events.d.ts.map +1 -1
- package/dist/materialization/index.js +1 -1
- package/dist/materialization/model.d.ts +6 -0
- package/dist/materialization/model.d.ts.map +1 -1
- package/dist/materializer/index.js +13 -13
- package/dist/materializer/projections/replace.d.ts.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts +2 -0
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/shared/normalize.d.ts +1 -0
- package/dist/materializer/shared/normalize.d.ts.map +1 -1
- package/dist/models/execution/index.js +12 -12
- package/dist/models/language-model.d.ts +6 -0
- package/dist/models/language-model.d.ts.map +1 -1
- package/dist/models/tools.d.ts +2 -0
- package/dist/models/tools.d.ts.map +1 -1
- package/dist/objects/index.js +28 -28
- package/dist/objects/query/index.js +12 -12
- package/dist/pipelines/index.js +18 -18
- package/dist/projections/builders.d.ts +7 -1
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/index.d.ts +1 -1
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/internal.js +13 -13
- package/dist/projections/types.d.ts +10 -0
- package/dist/projections/types.d.ts.map +1 -1
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/queues/in-memory.d.ts +2 -1
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/queues/index.d.ts +1 -1
- package/dist/queues/index.d.ts.map +1 -1
- package/dist/queues/index.js +1 -1
- package/dist/queues/types.d.ts +40 -13
- package/dist/queues/types.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +13 -0
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/internal.d.ts +1 -0
- package/dist/runtime/internal.d.ts.map +1 -1
- package/dist/runtime/internal.js +39 -18
- package/dist/runtime/internal.js.map +4 -3
- package/dist/runtime/resolve-definitions.d.ts +1 -1
- package/dist/runtime/resolve-definitions.d.ts.map +1 -1
- package/dist/runtime/script.d.ts +39 -0
- package/dist/runtime/script.d.ts.map +1 -0
- package/dist/runtime/sixb.d.ts +2 -2
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/schedules/builders.d.ts.map +1 -1
- package/dist/schedules/index.js +3 -3
- package/dist/schedules/runtime.d.ts.map +1 -1
- package/dist/schedules/validation.d.ts +2 -0
- package/dist/schedules/validation.d.ts.map +1 -1
- package/dist/shares/internal.js +12 -12
- package/dist/storage/agents/errors.d.ts +1 -1
- package/dist/storage/agents/errors.d.ts.map +1 -1
- package/dist/storage/agents/in-memory.d.ts +26 -1
- package/dist/storage/agents/in-memory.d.ts.map +1 -1
- package/dist/storage/agents/index.d.ts +2 -2
- package/dist/storage/agents/index.d.ts.map +1 -1
- package/dist/storage/agents/provider.d.ts +12 -3
- package/dist/storage/agents/provider.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +25 -5
- package/dist/storage/agents/provider.js.map +1 -1
- package/dist/storage/agents/types.d.ts +156 -1
- package/dist/storage/agents/types.d.ts.map +1 -1
- package/dist/storage/artifacts/in-memory.d.ts +7 -1
- 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 +2 -1
- package/dist/storage/artifacts/record.d.ts.map +1 -1
- package/dist/storage/artifacts/types.d.ts +34 -0
- package/dist/storage/artifacts/types.d.ts.map +1 -1
- package/dist/storage/executions/provider.d.ts +3 -3
- package/dist/storage/executions/provider.d.ts.map +1 -1
- package/dist/storage/executions/provider.js +1 -1
- package/dist/storage/executions/types.d.ts +6 -0
- package/dist/storage/executions/types.d.ts.map +1 -1
- package/dist/storage/executions/validation.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/provider.js +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +18 -14
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.d.ts +1 -1
- package/dist/storage/internal.d.ts.map +1 -1
- package/dist/storage/internal.js +8 -6
- package/dist/storage/internal.js.map +2 -2
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts +2 -0
- package/dist/storage/ontology/in-memory/replacement-plans.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +1 -1
- package/dist/storage/ontology/replacement-plans.d.ts +8 -0
- package/dist/storage/ontology/replacement-plans.d.ts.map +1 -1
- package/dist/storage/operation-scope.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +1 -1
- package/dist/storage/workflow-runs/provider.js +3 -3
- package/dist/syncs/index.js +19 -19
- package/dist/testing/agent-execution.d.ts +3 -0
- package/dist/testing/agent-execution.d.ts.map +1 -1
- package/dist/testing/agent-inbox-storage-contract.d.ts +15 -0
- package/dist/testing/agent-inbox-storage-contract.d.ts.map +1 -0
- package/dist/testing/agent-storage-contract.d.ts.map +1 -1
- 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.d.ts +1 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +5524 -4555
- package/dist/testing/index.js.map +10 -9
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/queues-contract.d.ts.map +1 -1
- package/dist/webhooks/connections.d.ts +3 -4
- package/dist/webhooks/connections.d.ts.map +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/internal.js +16 -49
- package/dist/webhooks/internal.js.map +3 -3
- package/dist/webhooks/types.d.ts +2 -11
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/queued-run-dispatch.d.ts.map +1 -1
- package/dist/workflows/index.js +35 -35
- package/package.json +6 -1
- package/src/agents/README.md +6 -2
- package/src/agents/approval-outcome.ts +2 -2
- package/src/agents/cancel.ts +2 -2
- package/src/agents/child-question.ts +76 -8
- package/src/agents/execution.ts +168 -30
- package/src/agents/ids.ts +9 -1
- package/src/agents/index.ts +27 -6
- package/src/agents/model-loop.ts +3 -1
- package/src/agents/queued-turn.ts +46 -0
- package/src/agents/request.ts +517 -2
- package/src/agents/run-after-finish.ts +259 -2
- package/src/agents/run-artifacts.ts +3 -93
- package/src/agents/run-events.ts +26 -1
- package/src/agents/run-session-children.ts +33 -0
- package/src/agents/run-session-http.ts +10 -2
- package/src/agents/run-session-serve.ts +3 -8
- package/src/agents/run-session.ts +142 -3
- package/src/agents/run-turn.ts +8 -0
- package/src/agents/streams/index.ts +1 -0
- package/src/agents/streams/protocol.ts +41 -1
- package/src/agents/tool-files.ts +1 -1
- package/src/agents/tool-input-coercion.ts +140 -0
- package/src/agents/turn-answered.ts +31 -0
- package/src/agents/validation.ts +13 -3
- package/src/artifacts/canvas-display.ts +4 -6
- package/src/artifacts/comments.ts +70 -17
- package/src/artifacts/document-fill.ts +103 -0
- package/src/artifacts/errors.ts +2 -0
- package/src/artifacts/events.ts +4 -1
- package/src/artifacts/execution.ts +265 -31
- package/src/artifacts/frames/assets.ts +42 -7
- package/src/artifacts/frames/document-data.ts +353 -0
- package/src/artifacts/frames/entries.ts +22 -16
- package/src/artifacts/frames/grants.ts +2 -2
- package/src/artifacts/frames/index.ts +3 -0
- package/src/artifacts/frames/kit.ts +102 -0
- package/src/artifacts/frames/protocol.ts +96 -3
- package/src/artifacts/frames/runtime.ts +709 -19
- package/src/artifacts/index.ts +6 -0
- package/src/artifacts/live/blocks.ts +889 -0
- package/src/artifacts/live/board.ts +195 -42
- package/src/artifacts/live/document.ts +170 -5
- package/src/artifacts/live/index.ts +7 -0
- package/src/artifacts/live/page.ts +807 -0
- package/src/artifacts/live/protocol.ts +5 -0
- package/src/artifacts/live/server.ts +2 -2
- package/src/artifacts/live/state.ts +9 -4
- package/src/artifacts/outline.ts +17 -0
- package/src/artifacts/paper.ts +173 -0
- package/src/artifacts/pdf-job.ts +11 -0
- package/src/artifacts/publish/fields.ts +177 -0
- package/src/artifacts/publish/index.ts +6 -1
- package/src/artifacts/publish/merge.ts +14 -12
- package/src/artifacts/publish/pdf.ts +82 -0
- package/src/artifacts/publish/previews.ts +24 -34
- package/src/artifacts/publish/publish.ts +26 -3
- package/src/artifacts/publish/queries.ts +20 -4
- package/src/artifacts/publish/query-answers.ts +14 -3
- package/src/artifacts/publish/validate/document-html.ts +245 -0
- package/src/artifacts/publish/validate/document.ts +34 -3
- package/src/artifacts/queries.ts +59 -13
- package/src/authorization/event-visibility.ts +13 -0
- package/src/connectors/connection-handles.ts +71 -0
- package/src/connectors/connections/authorizations.ts +50 -2
- package/src/connectors/connections/events.ts +57 -0
- package/src/connectors/connections/runs.ts +5 -0
- package/src/connectors/connections/service.ts +19 -1
- package/src/connectors/execution.ts +30 -2
- package/src/connectors/index.ts +3 -0
- package/src/connectors/types.ts +29 -1
- package/src/deploy/index.ts +1 -0
- package/src/deploy/services.ts +1 -0
- package/src/deploy/types.ts +26 -1
- package/src/events/definitions.ts +14 -0
- package/src/events/execution.ts +9 -2
- package/src/events/index.ts +8 -0
- package/src/events/outbox-dispatcher.ts +12 -2
- package/src/events/scope.ts +3 -0
- package/src/events/selectors/builder.ts +49 -0
- package/src/events/selectors/index.ts +5 -0
- package/src/events/selectors/predicate.ts +2 -0
- package/src/events/selectors/types.ts +30 -1
- package/src/events/types/artifacts.ts +7 -1
- package/src/events/types/connectors.ts +36 -0
- package/src/events/types/index.ts +7 -0
- package/src/execution/authorization.ts +45 -0
- package/src/execution/durable.ts +2 -0
- package/src/execution/scopes.ts +24 -0
- package/src/execution/script.ts +27 -0
- package/src/execution/types.ts +7 -1
- package/src/http/api-routes.ts +26 -1
- package/src/index.ts +21 -2
- package/src/lineage/executors.ts +3 -1
- package/src/materialization/event-envelopes.ts +10 -5
- package/src/materialization/events.ts +2 -0
- package/src/materialization/model.ts +6 -0
- package/src/materializer/README.md +10 -0
- package/src/materializer/projections/replace.ts +42 -1
- package/src/materializer/projections/replacement-plan.ts +44 -4
- package/src/materializer/shared/normalize.ts +4 -0
- package/src/models/language-model.ts +6 -0
- package/src/models/tools.ts +2 -0
- package/src/projections/builders.ts +20 -0
- package/src/projections/index.ts +1 -0
- package/src/projections/registry.ts +1 -0
- package/src/projections/revision.ts +2 -0
- package/src/projections/types.ts +11 -0
- package/src/projections/validation.ts +6 -0
- package/src/queues/in-memory.ts +5 -0
- package/src/queues/index.ts +3 -1
- package/src/queues/types.ts +45 -14
- package/src/runtime/host.ts +112 -4
- package/src/runtime/internal.ts +1 -0
- package/src/runtime/resolve-definitions.ts +4 -1
- package/src/runtime/script.ts +62 -0
- package/src/runtime/sixb.ts +3 -3
- package/src/schedules/builders.ts +4 -1
- package/src/schedules/runtime.ts +3 -0
- package/src/schedules/validation.ts +20 -2
- package/src/storage/agents/errors.ts +1 -0
- package/src/storage/agents/in-memory.ts +229 -1
- package/src/storage/agents/index.ts +16 -0
- package/src/storage/agents/provider.ts +284 -2
- package/src/storage/agents/types.ts +168 -1
- package/src/storage/artifacts/in-memory.ts +32 -1
- package/src/storage/artifacts/index.ts +2 -0
- package/src/storage/artifacts/record.ts +25 -2
- package/src/storage/artifacts/types.ts +37 -0
- package/src/storage/executions/provider.ts +22 -2
- package/src/storage/executions/types.ts +2 -0
- package/src/storage/executions/validation.ts +27 -0
- package/src/storage/index.ts +18 -0
- package/src/storage/internal.ts +1 -0
- package/src/storage/ontology/in-memory/replacement-plans.ts +22 -0
- package/src/storage/ontology/replacement-plans.ts +6 -0
- package/src/storage/operation-scope.ts +1 -0
- package/src/testing/agent-execution.ts +45 -2
- package/src/testing/agent-inbox-storage-contract.ts +815 -0
- package/src/testing/agent-storage-contract.ts +103 -0
- package/src/testing/artifact-storage-contract.ts +72 -4
- package/src/testing/execution-storage-contract.ts +31 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/materializer-storage-contract.ts +139 -1
- package/src/testing/queues-contract.ts +22 -0
- package/src/webhooks/connections.ts +9 -50
- package/src/webhooks/index.ts +0 -2
- package/src/webhooks/types.ts +2 -13
- package/src/workers/queued-run-dispatch.ts +8 -1
- package/dist/chunk-48c1z8nj.js.map +0 -10
- package/dist/chunk-58geavnf.js +0 -29
- package/dist/chunk-58geavnf.js.map +0 -10
- package/dist/chunk-7z5rkf0m.js.map +0 -13
- package/dist/chunk-9nsjjd44.js.map +0 -12
- package/dist/chunk-b9qfh2ya.js.map +0 -11
- package/dist/chunk-eptrvnby.js.map +0 -12
- package/dist/chunk-f6ahf5gf.js.map +0 -13
- package/dist/chunk-m2jerfef.js +0 -474
- package/dist/chunk-m2jerfef.js.map +0 -11
- package/dist/chunk-n4zzaf6q.js.map +0 -10
- package/dist/chunk-qds484t8.js.map +0 -18
- package/dist/chunk-smnt672s.js.map +0 -10
- package/dist/chunk-vzkxqf8h.js.map +0 -23
- package/dist/chunk-w9s23r24.js.map +0 -30
- package/dist/chunk-wa05txmk.js.map +0 -11
- package/dist/chunk-yv8hv4wq.js.map +0 -10
- package/dist/chunk-z0t4p2sk.js.map +0 -47
- /package/dist/{chunk-tqa68kj7.js.map → chunk-0hkdtwqk.js.map} +0 -0
- /package/dist/{chunk-s5n9617r.js.map → chunk-0mvjpgvm.js.map} +0 -0
- /package/dist/{chunk-k66rp2hr.js.map → chunk-1yh6jgtz.js.map} +0 -0
- /package/dist/{chunk-26qet7wh.js.map → chunk-5t9gm5tt.js.map} +0 -0
- /package/dist/{chunk-e0hnbb1m.js.map → chunk-61zptves.js.map} +0 -0
- /package/dist/{chunk-hkaa807g.js.map → chunk-68hm50qh.js.map} +0 -0
- /package/dist/{chunk-fe6r7yhg.js.map → chunk-92wrka15.js.map} +0 -0
- /package/dist/{chunk-m7b9q5dk.js.map → chunk-aw1z0gre.js.map} +0 -0
- /package/dist/{chunk-kv0kvknv.js.map → chunk-fzae1jpq.js.map} +0 -0
- /package/dist/{chunk-6gtxshcc.js.map → chunk-k29n4176.js.map} +0 -0
- /package/dist/{chunk-sysnvjce.js.map → chunk-naxjka9v.js.map} +0 -0
- /package/dist/{chunk-qafng88v.js.map → chunk-pqvvqc65.js.map} +0 -0
- /package/dist/{chunk-8p7bze4c.js.map → chunk-s1mqyqmm.js.map} +0 -0
- /package/dist/{chunk-p351afzm.js.map → chunk-s5pj68fa.js.map} +0 -0
- /package/dist/{chunk-855w9nvw.js.map → chunk-vehcr9eb.js.map} +0 -0
- /package/dist/{chunk-n68vz95m.js.map → chunk-wqe9shx2.js.map} +0 -0
- /package/dist/{chunk-0k3r5kb3.js.map → chunk-xcrnrpfh.js.map} +0 -0
- /package/dist/{chunk-38yvdqzd.js.map → chunk-zxhym8tr.js.map} +0 -0
|
@@ -10,11 +10,13 @@ export { BOARD_PREVIEW_WAIT_MS, CANVAS_FIT_PADDING, CANVAS_TEXT_PIXELS, type Can
|
|
|
10
10
|
export { quoteArtifactComment } from "./comment-text";
|
|
11
11
|
export { CsvParseError, type CsvTable, formatCsv, parseCsv } from "./csv";
|
|
12
12
|
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 FramePoint, type FrameRect, type FrameRequest, type FrameResponse, type FrameStart, frameStartHash, parseFrameCall, parseFrameEvent, } from "./frames/protocol";
|
|
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
14
|
export { ARTIFACT_KINDS, type ArtifactKind } from "./kinds";
|
|
15
15
|
export { ARTIFACT_COMMENT_LIMITS, ARTIFACT_HOLDERS_LIMIT, ARTIFACT_LIMITS, ARTIFACT_STATE_LIMITS, } from "./limits";
|
|
16
16
|
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 DocumentOutline, type FileOutline, type SheetOutline, type SheetSummary, type SlidesOutline, } from "./outline";
|
|
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 { DocumentPaper } from "./paper";
|
|
19
|
+
export { DOCUMENT_PDF_WAIT_MS } from "./pdf-job";
|
|
18
20
|
export { type ArtifactFacetsQueryResult, type ArtifactObjectsQueryResult, type ArtifactQueryProperty, type ArtifactQueryPropertyType, type ArtifactQueryResult, type ArtifactQuerySchema, artifactQueryName, } from "./queries";
|
|
19
21
|
export { type ArtifactAddressTarget, type ResolvedArtifactPart, resolveArtifactAddress, } from "./resolve";
|
|
20
22
|
export { checkSheet } from "./sheet-rules";
|
|
@@ -1 +1 @@
|
|
|
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,kB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AK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,GACnB,MAAM,WAAW,CAAA;AAClB,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,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"}
|
|
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,K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,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
|
@@ -26,11 +26,12 @@ import {
|
|
|
26
26
|
canvasArrowLine2,
|
|
27
27
|
isArtifactQueryName,
|
|
28
28
|
artifactQueryName2,
|
|
29
|
+
createHeadingSlugger2,
|
|
30
|
+
DOCUMENT_PDF_WAIT_MS2,
|
|
29
31
|
ARTIFACT_THEME_FILE2,
|
|
30
32
|
ARTIFACT_THEME_TOKENS,
|
|
31
33
|
parseArtifactTheme2,
|
|
32
34
|
resolveArtifactAddress2,
|
|
33
|
-
createHeadingSlugger2,
|
|
34
35
|
CsvParseError2,
|
|
35
36
|
parseCsv2,
|
|
36
37
|
formatCsv2,
|
|
@@ -56,7 +57,7 @@ import {
|
|
|
56
57
|
liveSheetColumns2,
|
|
57
58
|
liveSheetTable2,
|
|
58
59
|
checkSheet2
|
|
59
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-60662fyv.js";
|
|
60
61
|
import {
|
|
61
62
|
ARTIFACT_KINDS2
|
|
62
63
|
} from "../chunk-d7vyc7k6.js";
|
|
@@ -81,6 +82,10 @@ function frameStartHash(start) {
|
|
|
81
82
|
params.push(`sixb-slide=${Math.round(start.slide)}`);
|
|
82
83
|
if (start.fill)
|
|
83
84
|
params.push("sixb-fill");
|
|
85
|
+
if (start.pages)
|
|
86
|
+
params.push("sixb-pages");
|
|
87
|
+
if (start.section)
|
|
88
|
+
params.push(`sixb-section=${encodeURIComponent(start.section)}`);
|
|
84
89
|
return params.length > 0 ? `#${params.join("&")}` : "";
|
|
85
90
|
}
|
|
86
91
|
function parseFrameCall(data) {
|
|
@@ -205,6 +210,29 @@ function parseFrameEvent(data) {
|
|
|
205
210
|
}
|
|
206
211
|
case "edit.text":
|
|
207
212
|
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
|
+
case "zoom": {
|
|
214
|
+
if (params.step !== undefined) {
|
|
215
|
+
return ZOOM_STEPS.includes(String(params.step)) ? event("zoom", { step: params.step }) : null;
|
|
216
|
+
}
|
|
217
|
+
const at = parsePoint(params.at);
|
|
218
|
+
const factor = Number(params.factor);
|
|
219
|
+
if (!at || !Number.isFinite(params.factor) || factor <= 0)
|
|
220
|
+
return null;
|
|
221
|
+
return event("zoom", {
|
|
222
|
+
factor: Math.min(MAX_ZOOM_FACTOR, Math.max(1 / MAX_ZOOM_FACTOR, factor)),
|
|
223
|
+
at
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
case "pan": {
|
|
227
|
+
const { x, y, by } = params;
|
|
228
|
+
if (!Number.isFinite(x) || !Number.isFinite(y) || by !== "wheel" && by !== "touch") {
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
const bounded = (delta) => Math.min(MAX_PAN, Math.max(-MAX_PAN, delta));
|
|
232
|
+
return event("pan", { x: bounded(Number(x)), y: bounded(Number(y)), by });
|
|
233
|
+
}
|
|
234
|
+
case "space":
|
|
235
|
+
return typeof params.down === "boolean" ? event("space", { down: params.down }) : null;
|
|
208
236
|
case "press":
|
|
209
237
|
return typeof params.text === "string" && params.text.length > 0 && params.text.length <= ARTIFACT_LIMITS2.maxCanvasLabelLength ? event("press", { text: params.text }) : null;
|
|
210
238
|
default:
|
|
@@ -213,6 +241,9 @@ function parseFrameEvent(data) {
|
|
|
213
241
|
}
|
|
214
242
|
var MAX_EDIT_TEXT_LENGTH = ARTIFACT_LIMITS2.maxBoardBytes;
|
|
215
243
|
var EDIT_KINDS = ["text", "image", "whole", "box"];
|
|
244
|
+
var ZOOM_STEPS = ["in", "out", "actual"];
|
|
245
|
+
var MAX_ZOOM_FACTOR = 4;
|
|
246
|
+
var MAX_PAN = 4000;
|
|
216
247
|
var MAX_EDIT_LABEL_LENGTH = 200;
|
|
217
248
|
function isEditAddress(value) {
|
|
218
249
|
return typeof value === "string" && value.length <= 2048 && /^body(>[a-z][a-z0-9-]*:\d+)*$/.test(value);
|
|
@@ -293,6 +324,7 @@ export {
|
|
|
293
324
|
CANVAS_FIT_PADDING2 as CANVAS_FIT_PADDING,
|
|
294
325
|
CANVAS_TEXT_PIXELS2 as CANVAS_TEXT_PIXELS,
|
|
295
326
|
CsvParseError2 as CsvParseError,
|
|
327
|
+
DOCUMENT_PDF_WAIT_MS2 as DOCUMENT_PDF_WAIT_MS,
|
|
296
328
|
FORMULA_ERRORS2 as FORMULA_ERRORS,
|
|
297
329
|
FRAME_PROTOCOL,
|
|
298
330
|
FRAME_THEME_TOKENS,
|
|
@@ -339,4 +371,4 @@ export {
|
|
|
339
371
|
sheetFilePath2 as sheetFilePath
|
|
340
372
|
};
|
|
341
373
|
|
|
342
|
-
//# debugId=
|
|
374
|
+
//# debugId=F3BBB9DDF22B3DC264756E2164756E21
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"sources": ["../src/artifacts/comment-text.ts", "../src/artifacts/frames/protocol.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
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 comment's id\n * lets the Agent resolve it, or reply to it, and its author's name says whose request it is: `from\n * guest Ava Martin` for a shared link's visitor, whose name nobody vouches for. Browser-safe, for\n * 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}): string {\n const { anchor } = comment\n const where = [\n anchor.board,\n anchor.element,\n 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",
|
|
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}\n\n/** The fragment that carries a frame's start: `#sixb-slide=3&sixb-fill`. */\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 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\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 opened\n * board follows the arrow that leaves it with that label. At most a label's length.\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/**\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 \"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\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"
|
|
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"
|
|
7
7
|
],
|
|
8
|
-
"mappings": "
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,SAAS,oBAAoB,CAAC,SAO1B;AAAA,EACT,QAAQ,WAAW;AAAA,EACnB,MAAM,QAAQ;AAAA,IACZ,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO,QAAQ,KAAK,UAAU,OAAO,KAAK,I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,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": "F3BBB9DDF22B3DC264756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as Y from "yjs";
|
|
2
|
+
/** A node as ProseMirror's JSON holds it. */
|
|
3
|
+
export interface BlockNode {
|
|
4
|
+
readonly type: string;
|
|
5
|
+
readonly attrs?: Readonly<Record<string, unknown>>;
|
|
6
|
+
readonly content?: readonly BlockNode[];
|
|
7
|
+
readonly text?: string;
|
|
8
|
+
readonly marks?: readonly BlockMark[];
|
|
9
|
+
}
|
|
10
|
+
export interface BlockMark {
|
|
11
|
+
readonly type: string;
|
|
12
|
+
readonly attrs?: Readonly<Record<string, unknown>>;
|
|
13
|
+
}
|
|
14
|
+
/** A document's Markdown as blocks. */
|
|
15
|
+
export declare function markdownToBlocks(markdown: string): BlockNode;
|
|
16
|
+
/** Blocks written as a document's Markdown. */
|
|
17
|
+
export declare function blocksToMarkdown(doc: BlockNode): string;
|
|
18
|
+
/** Blocks as a `Y.XmlFragment`'s children: each an element, its text with its marks. */
|
|
19
|
+
export declare function blocksToY(nodes: readonly BlockNode[]): (Y.XmlElement | Y.XmlText)[];
|
|
20
|
+
/** A fragment's children read back as blocks. */
|
|
21
|
+
export declare function blocksFromY(children: readonly (Y.XmlElement | Y.XmlText | Y.XmlHook)[]): BlockNode[];
|
|
22
|
+
/** A new fragment holding the blocks of `markdown`. */
|
|
23
|
+
export declare function markdownFragment(markdown: string): Y.XmlFragment;
|
|
24
|
+
/** The Markdown a fragment holds now. */
|
|
25
|
+
export declare function fragmentMarkdown(fragment: Y.XmlFragment): string;
|
|
26
|
+
/**
|
|
27
|
+
* Makes a fragment hold the blocks of `markdown` by the fewest changes to its blocks, as
|
|
28
|
+
* `patchBlocks` makes them.
|
|
29
|
+
*/
|
|
30
|
+
export declare function patchFragment(fragment: Y.XmlFragment, markdown: string): void;
|
|
31
|
+
/**
|
|
32
|
+
* Makes a fragment or an element hold `next` by the fewest changes to its blocks: one that reads
|
|
33
|
+
* the same stays as it is, with whatever its editors' carets and history hold. A block replaced by
|
|
34
|
+
* one of the same type and attributes that holds blocks too is patched inside the same way, so a
|
|
35
|
+
* change to one paragraph of a section leaves the rest of the section as it was.
|
|
36
|
+
*/
|
|
37
|
+
export declare function patchBlocks(parent: Y.XmlFragment, next: readonly BlockNode[], options?: BlockComparison): void;
|
|
38
|
+
/**
|
|
39
|
+
* Folds two changes of a list of blocks, `ours` and `theirs` of `base`, block by block: a block
|
|
40
|
+
* only one side changed is taken from it; one both changed is merged inside, a block of blocks by
|
|
41
|
+
* its blocks and anything else by `mergeLeaf`; what both added is kept, ours first, and what
|
|
42
|
+
* either took out goes. A block both hold is taken as `theirs` holds it.
|
|
43
|
+
*/
|
|
44
|
+
export declare function mergeBlockLists(base: readonly BlockNode[], ours: readonly BlockNode[], theirs: readonly BlockNode[], comparison: Required<BlockComparison> & {
|
|
45
|
+
/** One block both changed, merged inside; null to keep both sides' as two. */
|
|
46
|
+
readonly mergeLeaf: (base: BlockNode, ours: BlockNode, theirs: BlockNode) => BlockNode | null;
|
|
47
|
+
}): BlockNode[];
|
|
48
|
+
/**
|
|
49
|
+
* Folds two changes of a Markdown document, `ours` the blocks its editors hold now, block by
|
|
50
|
+
* block: compared as blocks, how each side writes its Markdown is no change. A block both changed
|
|
51
|
+
* is merged by its Markdown, written alone.
|
|
52
|
+
*/
|
|
53
|
+
export declare function mergeMarkdownBlocks(base: string, ours: readonly BlockNode[], theirs: string): BlockNode[];
|
|
54
|
+
/**
|
|
55
|
+
* How `patchBlocks` tells blocks apart: `key` is the same for two blocks that are the same, and
|
|
56
|
+
* `shell` for two that are the same but for what they hold. By default, by their nodes.
|
|
57
|
+
*/
|
|
58
|
+
export interface BlockComparison {
|
|
59
|
+
readonly key?: (node: BlockNode) => string;
|
|
60
|
+
readonly shell?: (node: BlockNode) => string;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/blocks.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAqBxB,6CAA6C;AAC7C,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,SAAS,EAAE,CAAA;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAA;CACtC;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACnD;AAmCD,uCAAuC;AACvC,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAuJ5D;AA8CD,+CAA+C;AAC/C,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAwKvD;AAyDD,wFAAwF;AACxF,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,UAAU,G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IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,CAAA;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,CAAA;CAC7C"}
|
|
@@ -60,6 +60,12 @@ export declare function setBoardText(source: string, address: string, text: stri
|
|
|
60
60
|
* they saw them: what others changed in it since is kept, merged as the live document merges
|
|
61
61
|
* concurrent edits. Throws when the address names no text any more: the board changed, and the
|
|
62
62
|
* editor reloads it.
|
|
63
|
+
*
|
|
64
|
+
* The frame collapses an element's whitespace as CSS showed it before the reader types, so `base`
|
|
65
|
+
* may be the source's words with each run of whitespace one space, and a space they type shows
|
|
66
|
+
* twice until the next word. When the source's words, so collapsed, are the reader's, their
|
|
67
|
+
* change is made where it falls in the source, whose line breaks and indents stay; a space that
|
|
68
|
+
* would never show is not written.
|
|
63
69
|
*/
|
|
64
70
|
export declare function mergeBoardText(source: string, address: string, base: string, typed: string): BoardEdit;
|
|
65
71
|
/** Replaces an image's picture, its description, or both. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/board.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAA;AAY7B;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAA;AAEjE,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,iFAAiF;IACjF,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aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjE"}
|
|
@@ -31,6 +31,12 @@ export declare function documentKind(doc: Y.Doc): ArtifactKind;
|
|
|
31
31
|
* in order, then any no order names, and without an arrow whose item someone deleted meanwhile.
|
|
32
32
|
*/
|
|
33
33
|
export declare function documentFiles(doc: Y.Doc): Map<string, LiveFile>;
|
|
34
|
+
/**
|
|
35
|
+
* Makes `change` to a document, then reads back what it touched as `documentFiles` would, and
|
|
36
|
+
* throws where that would: a keystroke reads back the block it is in, not the whole document.
|
|
37
|
+
* A file replaced, or anything but a block of a page or of a Markdown document, is read whole.
|
|
38
|
+
*/
|
|
39
|
+
export declare function readChange(doc: Y.Doc, change: () => void): void;
|
|
34
40
|
/** The canvas a document holds as its structure, for a viewer to read and edit; null without. */
|
|
35
41
|
export declare function documentCanvas(doc: Y.Doc): {
|
|
36
42
|
readonly items: Y.Map<Y.Map<unknown>>;
|
|
@@ -44,6 +50,12 @@ export declare function documentCanvas(doc: Y.Doc): {
|
|
|
44
50
|
* under `origin`.
|
|
45
51
|
*/
|
|
46
52
|
export declare function mergeIntoDocument(doc: Y.Doc, base: LiveFiles, next: LiveFiles, origin?: unknown): void;
|
|
53
|
+
/**
|
|
54
|
+
* Holds as a page a designed document's `document.html` that a document kept as text, from before
|
|
55
|
+
* documents held pages, once it reads as one. Made as `clientID`, named by what the document is
|
|
56
|
+
* made from, so that every server loading it makes the same change.
|
|
57
|
+
*/
|
|
58
|
+
export declare function holdPage(doc: Y.Doc, clientID: number): void;
|
|
47
59
|
/** Replaces a text's content by the fewest edits, so concurrent edits elsewhere in it stay. */
|
|
48
60
|
export declare function patchText(text: Y.Text, to: string): void;
|
|
49
61
|
/** An item of a canvas as its structure holds it: the words people type as `Y.Text`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/document.ts"],"names":[],"mappings":"AAAA,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CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAqBjG"}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
* editing it changes at once, read as files or, for a canvas, as its items; and the messages of
|
|
4
4
|
* the `/ws/artifacts` socket that keeps it in step. Browser-safe.
|
|
5
5
|
*/
|
|
6
|
+
export { type BlockMark, type BlockNode, blocksToMarkdown, markdownToBlocks, } from "./blocks";
|
|
6
7
|
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";
|
|
7
8
|
export { canvasItemMap, canvasItemObject, documentCanvas, documentFiles, LIVE_FILES, type LiveFile, type LiveFiles, mergeCanvasItem, } from "./document";
|
|
9
|
+
export { isPageEntry, PAGE_BODY, PAGE_MARK_TAGS, PAGE_TEXT_TAGS, pageEntryHtml } from "./page";
|
|
8
10
|
export { AGENT_AWARENESS_FIELD, ARTIFACT_LIVE_ROUTE, type ArtifactAgentPresence, type ArtifactLiveAccess, type ArtifactLiveClientMessage, type ArtifactLiveLeftReason, type ArtifactLiveSaveState, type ArtifactLiveServerMessage, type ArtifactLiveUser, decodeLiveData, encodeLiveData, liveSync, USER_AWARENESS_FIELD, } from "./protocol";
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,eAAe,GAChB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,cAAc,EACd,cAAc,EACd,QAAQ,EACR,oBAAoB,GACrB,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/artifacts/live/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,YAAY,EACZ,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,GACb,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,UAAU,EACV,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,eAAe,GAChB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAC9F,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,cAAc,EACd,cAAc,EACd,QAAQ,EACR,oBAAoB,GACrB,MAAM,YAAY,CAAA"}
|