@derive-to/artifacts 0.0.0-stage → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +197 -2
- package/dist/host/bridge.d.ts +38 -0
- package/dist/host/bridge.d.ts.map +1 -0
- package/dist/host/bridge.js +86 -0
- package/dist/host/bridge.js.map +1 -0
- package/dist/host/client.d.ts +168 -0
- package/dist/host/client.d.ts.map +1 -0
- package/dist/host/client.js +214 -0
- package/dist/host/client.js.map +1 -0
- package/dist/host/emitter.d.ts +7 -0
- package/dist/host/emitter.d.ts.map +1 -0
- package/dist/host/emitter.js +18 -0
- package/dist/host/emitter.js.map +1 -0
- package/dist/host/index.d.ts +7 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +5 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/live.d.ts +18 -0
- package/dist/host/live.d.ts.map +1 -0
- package/dist/host/live.js +32 -0
- package/dist/host/live.js.map +1 -0
- package/dist/host/print.d.ts +3 -0
- package/dist/host/print.d.ts.map +1 -0
- package/dist/host/print.js +57 -0
- package/dist/host/print.js.map +1 -0
- package/dist/host/sse.d.ts +11 -0
- package/dist/host/sse.d.ts.map +1 -0
- package/dist/host/sse.js +57 -0
- package/dist/host/sse.js.map +1 -0
- package/dist/host/view.d.ts +60 -0
- package/dist/host/view.d.ts.map +1 -0
- package/dist/host/view.js +218 -0
- package/dist/host/view.js.map +1 -0
- package/dist/protocol/access.d.ts +39 -0
- package/dist/protocol/access.d.ts.map +1 -0
- package/dist/protocol/access.js +30 -0
- package/dist/protocol/access.js.map +1 -0
- package/dist/protocol/anchors.d.ts +61 -0
- package/dist/protocol/anchors.d.ts.map +1 -0
- package/dist/protocol/anchors.js +41 -0
- package/dist/protocol/anchors.js.map +1 -0
- package/dist/protocol/collection.d.ts +33 -0
- package/dist/protocol/collection.d.ts.map +1 -0
- package/dist/protocol/collection.js +168 -0
- package/dist/protocol/collection.js.map +1 -0
- package/dist/protocol/define.d.ts +9 -0
- package/dist/protocol/define.d.ts.map +1 -0
- package/dist/protocol/define.js +2 -0
- package/dist/protocol/define.js.map +1 -0
- package/dist/protocol/errors.d.ts +55 -0
- package/dist/protocol/errors.d.ts.map +1 -0
- package/dist/protocol/errors.js +54 -0
- package/dist/protocol/errors.js.map +1 -0
- package/dist/protocol/extension.d.ts +44 -0
- package/dist/protocol/extension.d.ts.map +1 -0
- package/dist/protocol/extension.js +37 -0
- package/dist/protocol/extension.js.map +1 -0
- package/dist/protocol/http.d.ts +195 -0
- package/dist/protocol/http.d.ts.map +1 -0
- package/dist/protocol/http.js +72 -0
- package/dist/protocol/http.js.map +1 -0
- package/dist/protocol/index.d.ts +19 -0
- package/dist/protocol/index.d.ts.map +1 -0
- package/dist/protocol/index.js +19 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/protocol/inputs.d.ts +62 -0
- package/dist/protocol/inputs.d.ts.map +1 -0
- package/dist/protocol/inputs.js +51 -0
- package/dist/protocol/inputs.js.map +1 -0
- package/dist/protocol/layout.d.ts +33 -0
- package/dist/protocol/layout.d.ts.map +1 -0
- package/dist/protocol/layout.js +45 -0
- package/dist/protocol/layout.js.map +1 -0
- package/dist/protocol/mentions.d.ts +16 -0
- package/dist/protocol/mentions.d.ts.map +1 -0
- package/dist/protocol/mentions.js +35 -0
- package/dist/protocol/mentions.js.map +1 -0
- package/dist/protocol/methods.d.ts +146 -0
- package/dist/protocol/methods.d.ts.map +1 -0
- package/dist/protocol/methods.js +57 -0
- package/dist/protocol/methods.js.map +1 -0
- package/dist/protocol/presentation.d.ts +9 -0
- package/dist/protocol/presentation.d.ts.map +1 -0
- package/dist/protocol/presentation.js +7 -0
- package/dist/protocol/presentation.js.map +1 -0
- package/dist/protocol/quote-match.d.ts +20 -0
- package/dist/protocol/quote-match.d.ts.map +1 -0
- package/dist/protocol/quote-match.js +33 -0
- package/dist/protocol/quote-match.js.map +1 -0
- package/dist/protocol/sharing.d.ts +133 -0
- package/dist/protocol/sharing.d.ts.map +1 -0
- package/dist/protocol/sharing.js +67 -0
- package/dist/protocol/sharing.js.map +1 -0
- package/dist/protocol/slot-map.d.ts +4 -0
- package/dist/protocol/slot-map.d.ts.map +1 -0
- package/dist/protocol/slot-map.js +10 -0
- package/dist/protocol/slot-map.js.map +1 -0
- package/dist/protocol/source-anchors.d.ts +101 -0
- package/dist/protocol/source-anchors.d.ts.map +1 -0
- package/dist/protocol/source-anchors.js +250 -0
- package/dist/protocol/source-anchors.js.map +1 -0
- package/dist/protocol/source-assets.d.ts +15 -0
- package/dist/protocol/source-assets.d.ts.map +1 -0
- package/dist/protocol/source-assets.js +66 -0
- package/dist/protocol/source-assets.js.map +1 -0
- package/dist/protocol/source-cache.d.ts +23 -0
- package/dist/protocol/source-cache.d.ts.map +1 -0
- package/dist/protocol/source-cache.js +52 -0
- package/dist/protocol/source-cache.js.map +1 -0
- package/dist/protocol/source-copy-dom.d.ts +11 -0
- package/dist/protocol/source-copy-dom.d.ts.map +1 -0
- package/dist/protocol/source-copy-dom.js +103 -0
- package/dist/protocol/source-copy-dom.js.map +1 -0
- package/dist/protocol/source-copy-identities.d.ts +19 -0
- package/dist/protocol/source-copy-identities.d.ts.map +1 -0
- package/dist/protocol/source-copy-identities.js +119 -0
- package/dist/protocol/source-copy-identities.js.map +1 -0
- package/dist/protocol/source-deck-elements.d.ts +30 -0
- package/dist/protocol/source-deck-elements.d.ts.map +1 -0
- package/dist/protocol/source-deck-elements.js +67 -0
- package/dist/protocol/source-deck-elements.js.map +1 -0
- package/dist/protocol/source-deck-ops.d.ts +18 -0
- package/dist/protocol/source-deck-ops.d.ts.map +1 -0
- package/dist/protocol/source-deck-ops.js +154 -0
- package/dist/protocol/source-deck-ops.js.map +1 -0
- package/dist/protocol/source-deck.d.ts +20 -0
- package/dist/protocol/source-deck.d.ts.map +1 -0
- package/dist/protocol/source-deck.js +103 -0
- package/dist/protocol/source-deck.js.map +1 -0
- package/dist/protocol/source-edits.d.ts +21 -0
- package/dist/protocol/source-edits.d.ts.map +1 -0
- package/dist/protocol/source-edits.js +126 -0
- package/dist/protocol/source-edits.js.map +1 -0
- package/dist/protocol/source-element-edits.d.ts +24 -0
- package/dist/protocol/source-element-edits.d.ts.map +1 -0
- package/dist/protocol/source-element-edits.js +93 -0
- package/dist/protocol/source-element-edits.js.map +1 -0
- package/dist/protocol/source-element-match.d.ts +4 -0
- package/dist/protocol/source-element-match.d.ts.map +1 -0
- package/dist/protocol/source-element-match.js +40 -0
- package/dist/protocol/source-element-match.js.map +1 -0
- package/dist/protocol/source-element-neighbors.d.ts +8 -0
- package/dist/protocol/source-element-neighbors.d.ts.map +1 -0
- package/dist/protocol/source-element-neighbors.js +39 -0
- package/dist/protocol/source-element-neighbors.js.map +1 -0
- package/dist/protocol/source-element-properties.d.ts +25 -0
- package/dist/protocol/source-element-properties.d.ts.map +1 -0
- package/dist/protocol/source-element-properties.js +71 -0
- package/dist/protocol/source-element-properties.js.map +1 -0
- package/dist/protocol/source-element-scan.d.ts +4 -0
- package/dist/protocol/source-element-scan.d.ts.map +1 -0
- package/dist/protocol/source-element-scan.js +181 -0
- package/dist/protocol/source-element-scan.js.map +1 -0
- package/dist/protocol/source-element-score.d.ts +12 -0
- package/dist/protocol/source-element-score.d.ts.map +1 -0
- package/dist/protocol/source-element-score.js +82 -0
- package/dist/protocol/source-element-score.js.map +1 -0
- package/dist/protocol/source-element-selector.d.ts +19 -0
- package/dist/protocol/source-element-selector.d.ts.map +1 -0
- package/dist/protocol/source-element-selector.js +115 -0
- package/dist/protocol/source-element-selector.js.map +1 -0
- package/dist/protocol/source-element-types.d.ts +79 -0
- package/dist/protocol/source-element-types.d.ts.map +1 -0
- package/dist/protocol/source-element-types.js +2 -0
- package/dist/protocol/source-element-types.js.map +1 -0
- package/dist/protocol/source-elements.d.ts +7 -0
- package/dist/protocol/source-elements.d.ts.map +1 -0
- package/dist/protocol/source-elements.js +6 -0
- package/dist/protocol/source-elements.js.map +1 -0
- package/dist/protocol/source-entities.d.ts +17 -0
- package/dist/protocol/source-entities.d.ts.map +1 -0
- package/dist/protocol/source-entities.js +45 -0
- package/dist/protocol/source-entities.js.map +1 -0
- package/dist/protocol/source-hash.d.ts +4 -0
- package/dist/protocol/source-hash.d.ts.map +1 -0
- package/dist/protocol/source-hash.js +5 -0
- package/dist/protocol/source-hash.js.map +1 -0
- package/dist/protocol/source-head.d.ts +4 -0
- package/dist/protocol/source-head.d.ts.map +1 -0
- package/dist/protocol/source-head.js +79 -0
- package/dist/protocol/source-head.js.map +1 -0
- package/dist/protocol/source-html-attributes.d.ts +20 -0
- package/dist/protocol/source-html-attributes.d.ts.map +1 -0
- package/dist/protocol/source-html-attributes.js +89 -0
- package/dist/protocol/source-html-attributes.js.map +1 -0
- package/dist/protocol/source-html-elements.d.ts +5 -0
- package/dist/protocol/source-html-elements.d.ts.map +1 -0
- package/dist/protocol/source-html-elements.js +144 -0
- package/dist/protocol/source-html-elements.js.map +1 -0
- package/dist/protocol/source-html.d.ts +51 -0
- package/dist/protocol/source-html.d.ts.map +1 -0
- package/dist/protocol/source-html.js +167 -0
- package/dist/protocol/source-html.js.map +1 -0
- package/dist/protocol/source-layout-limits.d.ts +21 -0
- package/dist/protocol/source-layout-limits.d.ts.map +1 -0
- package/dist/protocol/source-layout-limits.js +20 -0
- package/dist/protocol/source-layout-limits.js.map +1 -0
- package/dist/protocol/source-layout.d.ts +29 -0
- package/dist/protocol/source-layout.d.ts.map +1 -0
- package/dist/protocol/source-layout.js +149 -0
- package/dist/protocol/source-layout.js.map +1 -0
- package/dist/protocol/source-markdown-blocks.d.ts +4 -0
- package/dist/protocol/source-markdown-blocks.d.ts.map +1 -0
- package/dist/protocol/source-markdown-blocks.js +175 -0
- package/dist/protocol/source-markdown-blocks.js.map +1 -0
- package/dist/protocol/source-markdown-history.d.ts +26 -0
- package/dist/protocol/source-markdown-history.d.ts.map +1 -0
- package/dist/protocol/source-markdown-history.js +133 -0
- package/dist/protocol/source-markdown-history.js.map +1 -0
- package/dist/protocol/source-markdown-inline.d.ts +20 -0
- package/dist/protocol/source-markdown-inline.d.ts.map +1 -0
- package/dist/protocol/source-markdown-inline.js +155 -0
- package/dist/protocol/source-markdown-inline.js.map +1 -0
- package/dist/protocol/source-markdown-model.d.ts +49 -0
- package/dist/protocol/source-markdown-model.d.ts.map +1 -0
- package/dist/protocol/source-markdown-model.js +28 -0
- package/dist/protocol/source-markdown-model.js.map +1 -0
- package/dist/protocol/source-markdown-op-align.d.ts +5 -0
- package/dist/protocol/source-markdown-op-align.d.ts.map +1 -0
- package/dist/protocol/source-markdown-op-align.js +49 -0
- package/dist/protocol/source-markdown-op-align.js.map +1 -0
- package/dist/protocol/source-markdown-op-blocks.d.ts +4 -0
- package/dist/protocol/source-markdown-op-blocks.d.ts.map +1 -0
- package/dist/protocol/source-markdown-op-blocks.js +198 -0
- package/dist/protocol/source-markdown-op-blocks.js.map +1 -0
- package/dist/protocol/source-markdown-op-context.d.ts +38 -0
- package/dist/protocol/source-markdown-op-context.d.ts.map +1 -0
- package/dist/protocol/source-markdown-op-context.js +44 -0
- package/dist/protocol/source-markdown-op-context.js.map +1 -0
- package/dist/protocol/source-markdown-op-inline.d.ts +8 -0
- package/dist/protocol/source-markdown-op-inline.d.ts.map +1 -0
- package/dist/protocol/source-markdown-op-inline.js +281 -0
- package/dist/protocol/source-markdown-op-inline.js.map +1 -0
- package/dist/protocol/source-markdown-op-reading.d.ts +7 -0
- package/dist/protocol/source-markdown-op-reading.d.ts.map +1 -0
- package/dist/protocol/source-markdown-op-reading.js +93 -0
- package/dist/protocol/source-markdown-op-reading.js.map +1 -0
- package/dist/protocol/source-markdown-ops.d.ts +13 -0
- package/dist/protocol/source-markdown-ops.d.ts.map +1 -0
- package/dist/protocol/source-markdown-ops.js +105 -0
- package/dist/protocol/source-markdown-ops.js.map +1 -0
- package/dist/protocol/source-markdown-projection.d.ts +30 -0
- package/dist/protocol/source-markdown-projection.d.ts.map +1 -0
- package/dist/protocol/source-markdown-projection.js +164 -0
- package/dist/protocol/source-markdown-projection.js.map +1 -0
- package/dist/protocol/source-markdown-types.d.ts +32 -0
- package/dist/protocol/source-markdown-types.d.ts.map +1 -0
- package/dist/protocol/source-markdown-types.js +2 -0
- package/dist/protocol/source-markdown-types.js.map +1 -0
- package/dist/protocol/source-markdown.d.ts +5 -0
- package/dist/protocol/source-markdown.d.ts.map +1 -0
- package/dist/protocol/source-markdown.js +9 -0
- package/dist/protocol/source-markdown.js.map +1 -0
- package/dist/protocol/source-op-apply.d.ts +14 -0
- package/dist/protocol/source-op-apply.d.ts.map +1 -0
- package/dist/protocol/source-op-apply.js +77 -0
- package/dist/protocol/source-op-apply.js.map +1 -0
- package/dist/protocol/source-op-context.d.ts +35 -0
- package/dist/protocol/source-op-context.d.ts.map +1 -0
- package/dist/protocol/source-op-context.js +97 -0
- package/dist/protocol/source-op-context.js.map +1 -0
- package/dist/protocol/source-op-hash.d.ts +36 -0
- package/dist/protocol/source-op-hash.d.ts.map +1 -0
- package/dist/protocol/source-op-hash.js +181 -0
- package/dist/protocol/source-op-hash.js.map +1 -0
- package/dist/protocol/source-op-history.d.ts +10 -0
- package/dist/protocol/source-op-history.d.ts.map +1 -0
- package/dist/protocol/source-op-history.js +85 -0
- package/dist/protocol/source-op-history.js.map +1 -0
- package/dist/protocol/source-op-index.d.ts +19 -0
- package/dist/protocol/source-op-index.d.ts.map +1 -0
- package/dist/protocol/source-op-index.js +53 -0
- package/dist/protocol/source-op-index.js.map +1 -0
- package/dist/protocol/source-op-parse.d.ts +11 -0
- package/dist/protocol/source-op-parse.d.ts.map +1 -0
- package/dist/protocol/source-op-parse.js +138 -0
- package/dist/protocol/source-op-parse.js.map +1 -0
- package/dist/protocol/source-op-preservation.d.ts +11 -0
- package/dist/protocol/source-op-preservation.d.ts.map +1 -0
- package/dist/protocol/source-op-preservation.js +47 -0
- package/dist/protocol/source-op-preservation.js.map +1 -0
- package/dist/protocol/source-op-render.d.ts +17 -0
- package/dist/protocol/source-op-render.d.ts.map +1 -0
- package/dist/protocol/source-op-render.js +116 -0
- package/dist/protocol/source-op-render.js.map +1 -0
- package/dist/protocol/source-op-types.d.ts +51 -0
- package/dist/protocol/source-op-types.d.ts.map +1 -0
- package/dist/protocol/source-op-types.js +2 -0
- package/dist/protocol/source-op-types.js.map +1 -0
- package/dist/protocol/source-quote-selector.d.ts +12 -0
- package/dist/protocol/source-quote-selector.d.ts.map +1 -0
- package/dist/protocol/source-quote-selector.js +29 -0
- package/dist/protocol/source-quote-selector.js.map +1 -0
- package/dist/protocol/source-ranges.d.ts +11 -0
- package/dist/protocol/source-ranges.d.ts.map +1 -0
- package/dist/protocol/source-ranges.js +37 -0
- package/dist/protocol/source-ranges.js.map +1 -0
- package/dist/protocol/source-read-html-navigation.d.ts +12 -0
- package/dist/protocol/source-read-html-navigation.d.ts.map +1 -0
- package/dist/protocol/source-read-html-navigation.js +76 -0
- package/dist/protocol/source-read-html-navigation.js.map +1 -0
- package/dist/protocol/source-read-html-tokens.d.ts +12 -0
- package/dist/protocol/source-read-html-tokens.d.ts.map +1 -0
- package/dist/protocol/source-read-html-tokens.js +58 -0
- package/dist/protocol/source-read-html-tokens.js.map +1 -0
- package/dist/protocol/source-read-landmarks.d.ts +24 -0
- package/dist/protocol/source-read-landmarks.d.ts.map +1 -0
- package/dist/protocol/source-read-landmarks.js +73 -0
- package/dist/protocol/source-read-landmarks.js.map +1 -0
- package/dist/protocol/source-read-markdown-blocks.d.ts +4 -0
- package/dist/protocol/source-read-markdown-blocks.d.ts.map +1 -0
- package/dist/protocol/source-read-markdown-blocks.js +87 -0
- package/dist/protocol/source-read-markdown-blocks.js.map +1 -0
- package/dist/protocol/source-read-markdown-inline.d.ts +4 -0
- package/dist/protocol/source-read-markdown-inline.d.ts.map +1 -0
- package/dist/protocol/source-read-markdown-inline.js +63 -0
- package/dist/protocol/source-read-markdown-inline.js.map +1 -0
- package/dist/protocol/source-read-markdown-state.d.ts +33 -0
- package/dist/protocol/source-read-markdown-state.d.ts.map +1 -0
- package/dist/protocol/source-read-markdown-state.js +79 -0
- package/dist/protocol/source-read-markdown-state.js.map +1 -0
- package/dist/protocol/source-read-markdown-tables.d.ts +4 -0
- package/dist/protocol/source-read-markdown-tables.d.ts.map +1 -0
- package/dist/protocol/source-read-markdown-tables.js +68 -0
- package/dist/protocol/source-read-markdown-tables.js.map +1 -0
- package/dist/protocol/source-read-markdown-text.d.ts +8 -0
- package/dist/protocol/source-read-markdown-text.d.ts.map +1 -0
- package/dist/protocol/source-read-markdown-text.js +42 -0
- package/dist/protocol/source-read-markdown-text.js.map +1 -0
- package/dist/protocol/source-read-markdown.d.ts +9 -0
- package/dist/protocol/source-read-markdown.d.ts.map +1 -0
- package/dist/protocol/source-read-markdown.js +106 -0
- package/dist/protocol/source-read-markdown.js.map +1 -0
- package/dist/protocol/source-read-spine.d.ts +33 -0
- package/dist/protocol/source-read-spine.d.ts.map +1 -0
- package/dist/protocol/source-read-spine.js +94 -0
- package/dist/protocol/source-read-spine.js.map +1 -0
- package/dist/protocol/source-reflow.d.ts +7 -0
- package/dist/protocol/source-reflow.d.ts.map +1 -0
- package/dist/protocol/source-reflow.js +127 -0
- package/dist/protocol/source-reflow.js.map +1 -0
- package/dist/protocol/source-stamp.d.ts +22 -0
- package/dist/protocol/source-stamp.d.ts.map +1 -0
- package/dist/protocol/source-stamp.js +52 -0
- package/dist/protocol/source-stamp.js.map +1 -0
- package/dist/protocol/source-stamped-sync.d.ts +11 -0
- package/dist/protocol/source-stamped-sync.d.ts.map +1 -0
- package/dist/protocol/source-stamped-sync.js +238 -0
- package/dist/protocol/source-stamped-sync.js.map +1 -0
- package/dist/protocol/source-structural-apply.d.ts +5 -0
- package/dist/protocol/source-structural-apply.d.ts.map +1 -0
- package/dist/protocol/source-structural-apply.js +59 -0
- package/dist/protocol/source-structural-apply.js.map +1 -0
- package/dist/protocol/source-structural-backfill-parts.d.ts +25 -0
- package/dist/protocol/source-structural-backfill-parts.d.ts.map +1 -0
- package/dist/protocol/source-structural-backfill-parts.js +85 -0
- package/dist/protocol/source-structural-backfill-parts.js.map +1 -0
- package/dist/protocol/source-structural-backfill-rules.d.ts +9 -0
- package/dist/protocol/source-structural-backfill-rules.d.ts.map +1 -0
- package/dist/protocol/source-structural-backfill-rules.js +94 -0
- package/dist/protocol/source-structural-backfill-rules.js.map +1 -0
- package/dist/protocol/source-structural-backfill.d.ts +7 -0
- package/dist/protocol/source-structural-backfill.d.ts.map +1 -0
- package/dist/protocol/source-structural-backfill.js +79 -0
- package/dist/protocol/source-structural-backfill.js.map +1 -0
- package/dist/protocol/source-structural-gap.d.ts +5 -0
- package/dist/protocol/source-structural-gap.d.ts.map +1 -0
- package/dist/protocol/source-structural-gap.js +21 -0
- package/dist/protocol/source-structural-gap.js.map +1 -0
- package/dist/protocol/source-structural-inspect.d.ts +5 -0
- package/dist/protocol/source-structural-inspect.d.ts.map +1 -0
- package/dist/protocol/source-structural-inspect.js +137 -0
- package/dist/protocol/source-structural-inspect.js.map +1 -0
- package/dist/protocol/source-structural-order.d.ts +22 -0
- package/dist/protocol/source-structural-order.d.ts.map +1 -0
- package/dist/protocol/source-structural-order.js +128 -0
- package/dist/protocol/source-structural-order.js.map +1 -0
- package/dist/protocol/source-structural-size.d.ts +14 -0
- package/dist/protocol/source-structural-size.d.ts.map +1 -0
- package/dist/protocol/source-structural-size.js +99 -0
- package/dist/protocol/source-structural-size.js.map +1 -0
- package/dist/protocol/source-structural-spacing.d.ts +10 -0
- package/dist/protocol/source-structural-spacing.d.ts.map +1 -0
- package/dist/protocol/source-structural-spacing.js +55 -0
- package/dist/protocol/source-structural-spacing.js.map +1 -0
- package/dist/protocol/source-structural-targets.d.ts +8 -0
- package/dist/protocol/source-structural-targets.d.ts.map +1 -0
- package/dist/protocol/source-structural-targets.js +55 -0
- package/dist/protocol/source-structural-targets.js.map +1 -0
- package/dist/protocol/source-structural-types.d.ts +120 -0
- package/dist/protocol/source-structural-types.d.ts.map +1 -0
- package/dist/protocol/source-structural-types.js +3 -0
- package/dist/protocol/source-structural-types.js.map +1 -0
- package/dist/protocol/source-style.d.ts +15 -0
- package/dist/protocol/source-style.d.ts.map +1 -0
- package/dist/protocol/source-style.js +130 -0
- package/dist/protocol/source-style.js.map +1 -0
- package/dist/protocol/source-tags.d.ts +6 -0
- package/dist/protocol/source-tags.d.ts.map +1 -0
- package/dist/protocol/source-tags.js +5 -0
- package/dist/protocol/source-tags.js.map +1 -0
- package/dist/protocol/source-text-index.d.ts +22 -0
- package/dist/protocol/source-text-index.d.ts.map +1 -0
- package/dist/protocol/source-text-index.js +95 -0
- package/dist/protocol/source-text-index.js.map +1 -0
- package/dist/protocol/source-text-range.d.ts +9 -0
- package/dist/protocol/source-text-range.d.ts.map +1 -0
- package/dist/protocol/source-text-range.js +55 -0
- package/dist/protocol/source-text-range.js.map +1 -0
- package/dist/protocol/source-text-segments.d.ts +27 -0
- package/dist/protocol/source-text-segments.d.ts.map +1 -0
- package/dist/protocol/source-text-segments.js +65 -0
- package/dist/protocol/source-text-segments.js.map +1 -0
- package/dist/protocol/source-text.d.ts +9 -0
- package/dist/protocol/source-text.d.ts.map +1 -0
- package/dist/protocol/source-text.js +72 -0
- package/dist/protocol/source-text.js.map +1 -0
- package/dist/protocol/source-video-attributes.d.ts +5 -0
- package/dist/protocol/source-video-attributes.d.ts.map +1 -0
- package/dist/protocol/source-video-attributes.js +29 -0
- package/dist/protocol/source-video-attributes.js.map +1 -0
- package/dist/protocol/source-video-edits.d.ts +4 -0
- package/dist/protocol/source-video-edits.d.ts.map +1 -0
- package/dist/protocol/source-video-edits.js +85 -0
- package/dist/protocol/source-video-edits.js.map +1 -0
- package/dist/protocol/source-video-id.d.ts +4 -0
- package/dist/protocol/source-video-id.d.ts.map +1 -0
- package/dist/protocol/source-video-id.js +9 -0
- package/dist/protocol/source-video-id.js.map +1 -0
- package/dist/protocol/source-video.d.ts +38 -0
- package/dist/protocol/source-video.d.ts.map +1 -0
- package/dist/protocol/source-video.js +116 -0
- package/dist/protocol/source-video.js.map +1 -0
- package/dist/protocol/source.d.ts +47 -0
- package/dist/protocol/source.d.ts.map +1 -0
- package/dist/protocol/source.js +45 -0
- package/dist/protocol/source.js.map +1 -0
- package/dist/protocol/state-apply.d.ts +22 -0
- package/dist/protocol/state-apply.d.ts.map +1 -0
- package/dist/protocol/state-apply.js +13 -0
- package/dist/protocol/state-apply.js.map +1 -0
- package/dist/protocol/state-limits.d.ts +10 -0
- package/dist/protocol/state-limits.d.ts.map +1 -0
- package/dist/protocol/state-limits.js +11 -0
- package/dist/protocol/state-limits.js.map +1 -0
- package/dist/protocol/state.d.ts +60 -0
- package/dist/protocol/state.d.ts.map +1 -0
- package/dist/protocol/state.js +56 -0
- package/dist/protocol/state.js.map +1 -0
- package/dist/protocol/text.d.ts +9 -0
- package/dist/protocol/text.d.ts.map +1 -0
- package/dist/protocol/text.js +72 -0
- package/dist/protocol/text.js.map +1 -0
- package/dist/protocol/tools.d.ts +81 -0
- package/dist/protocol/tools.d.ts.map +1 -0
- package/dist/protocol/tools.js +29 -0
- package/dist/protocol/tools.js.map +1 -0
- package/dist/protocol/viewer.d.ts +21 -0
- package/dist/protocol/viewer.d.ts.map +1 -0
- package/dist/protocol/viewer.js +18 -0
- package/dist/protocol/viewer.js.map +1 -0
- package/dist/react/artifact-list.d.ts +17 -0
- package/dist/react/artifact-list.d.ts.map +1 -0
- package/dist/react/artifact-list.js +121 -0
- package/dist/react/artifact-list.js.map +1 -0
- package/dist/react/comment-body.d.ts +5 -0
- package/dist/react/comment-body.d.ts.map +1 -0
- package/dist/react/comment-body.js +14 -0
- package/dist/react/comment-body.js.map +1 -0
- package/dist/react/comment-input.d.ts +18 -0
- package/dist/react/comment-input.d.ts.map +1 -0
- package/dist/react/comment-input.js +74 -0
- package/dist/react/comment-input.js.map +1 -0
- package/dist/react/composer.d.ts +10 -0
- package/dist/react/composer.d.ts.map +1 -0
- package/dist/react/composer.js +42 -0
- package/dist/react/composer.js.map +1 -0
- package/dist/react/context.d.ts +57 -0
- package/dist/react/context.d.ts.map +1 -0
- package/dist/react/context.js +11 -0
- package/dist/react/context.js.map +1 -0
- package/dist/react/cursors.d.ts +3 -0
- package/dist/react/cursors.d.ts.map +1 -0
- package/dist/react/cursors.js +8 -0
- package/dist/react/cursors.js.map +1 -0
- package/dist/react/edit-controls.d.ts +4 -0
- package/dist/react/edit-controls.d.ts.map +1 -0
- package/dist/react/edit-controls.js +29 -0
- package/dist/react/edit-controls.js.map +1 -0
- package/dist/react/editing-actions.d.ts +44 -0
- package/dist/react/editing-actions.d.ts.map +1 -0
- package/dist/react/editing-actions.js +129 -0
- package/dist/react/editing-actions.js.map +1 -0
- package/dist/react/history.css +79 -0
- package/dist/react/index.d.ts +20 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +19 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/labels.d.ts +124 -0
- package/dist/react/labels.d.ts.map +1 -0
- package/dist/react/labels.js +115 -0
- package/dist/react/labels.js.map +1 -0
- package/dist/react/layout-surface.d.ts +29 -0
- package/dist/react/layout-surface.d.ts.map +1 -0
- package/dist/react/layout-surface.js +111 -0
- package/dist/react/layout-surface.js.map +1 -0
- package/dist/react/mention-list.d.ts +12 -0
- package/dist/react/mention-list.d.ts.map +1 -0
- package/dist/react/mention-list.js +16 -0
- package/dist/react/mention-list.js.map +1 -0
- package/dist/react/native-stage.d.ts +8 -0
- package/dist/react/native-stage.d.ts.map +1 -0
- package/dist/react/native-stage.js +41 -0
- package/dist/react/native-stage.js.map +1 -0
- package/dist/react/overlays.css +43 -0
- package/dist/react/panel.css +488 -0
- package/dist/react/panel.d.ts +26 -0
- package/dist/react/panel.d.ts.map +1 -0
- package/dist/react/panel.js +101 -0
- package/dist/react/panel.js.map +1 -0
- package/dist/react/presence.d.ts +3 -0
- package/dist/react/presence.d.ts.map +1 -0
- package/dist/react/presence.js +23 -0
- package/dist/react/presence.js.map +1 -0
- package/dist/react/present-button.d.ts +3 -0
- package/dist/react/present-button.d.ts.map +1 -0
- package/dist/react/present-button.js +14 -0
- package/dist/react/present-button.js.map +1 -0
- package/dist/react/provider.d.ts +22 -0
- package/dist/react/provider.d.ts.map +1 -0
- package/dist/react/provider.js +163 -0
- package/dist/react/provider.js.map +1 -0
- package/dist/react/rail-layout.d.ts +10 -0
- package/dist/react/rail-layout.d.ts.map +1 -0
- package/dist/react/rail-layout.js +32 -0
- package/dist/react/rail-layout.js.map +1 -0
- package/dist/react/rail.d.ts +10 -0
- package/dist/react/rail.d.ts.map +1 -0
- package/dist/react/rail.js +38 -0
- package/dist/react/rail.js.map +1 -0
- package/dist/react/role-badge.d.ts +17 -0
- package/dist/react/role-badge.d.ts.map +1 -0
- package/dist/react/role-badge.js +26 -0
- package/dist/react/role-badge.js.map +1 -0
- package/dist/react/selection-button.d.ts +3 -0
- package/dist/react/selection-button.d.ts.map +1 -0
- package/dist/react/selection-button.js +14 -0
- package/dist/react/selection-button.js.map +1 -0
- package/dist/react/sharing-panel.d.ts +8 -0
- package/dist/react/sharing-panel.d.ts.map +1 -0
- package/dist/react/sharing-panel.js +105 -0
- package/dist/react/sharing-panel.js.map +1 -0
- package/dist/react/slide-navigator.css +164 -0
- package/dist/react/slide-navigator.d.ts +5 -0
- package/dist/react/slide-navigator.d.ts.map +1 -0
- package/dist/react/slide-navigator.js +120 -0
- package/dist/react/slide-navigator.js.map +1 -0
- package/dist/react/stage.css +84 -0
- package/dist/react/stage.d.ts +13 -0
- package/dist/react/stage.d.ts.map +1 -0
- package/dist/react/stage.js +176 -0
- package/dist/react/stage.js.map +1 -0
- package/dist/react/styles.css +374 -0
- package/dist/react/thread-card.d.ts +8 -0
- package/dist/react/thread-card.d.ts.map +1 -0
- package/dist/react/thread-card.js +75 -0
- package/dist/react/thread-card.js.map +1 -0
- package/dist/react/time.d.ts +7 -0
- package/dist/react/time.d.ts.map +1 -0
- package/dist/react/time.js +19 -0
- package/dist/react/time.js.map +1 -0
- package/dist/react/tokens.css +58 -0
- package/dist/react/use-actions.d.ts +27 -0
- package/dist/react/use-actions.d.ts.map +1 -0
- package/dist/react/use-actions.js +91 -0
- package/dist/react/use-actions.js.map +1 -0
- package/dist/react/use-editing.d.ts +28 -0
- package/dist/react/use-editing.d.ts.map +1 -0
- package/dist/react/use-editing.js +70 -0
- package/dist/react/use-editing.js.map +1 -0
- package/dist/react/use-latest.d.ts +4 -0
- package/dist/react/use-latest.d.ts.map +1 -0
- package/dist/react/use-latest.js +11 -0
- package/dist/react/use-latest.js.map +1 -0
- package/dist/react/use-live.d.ts +58 -0
- package/dist/react/use-live.d.ts.map +1 -0
- package/dist/react/use-live.js +42 -0
- package/dist/react/use-live.js.map +1 -0
- package/dist/react/use-mention-picker.d.ts +18 -0
- package/dist/react/use-mention-picker.d.ts.map +1 -0
- package/dist/react/use-mention-picker.js +66 -0
- package/dist/react/use-mention-picker.js.map +1 -0
- package/dist/react/use-presence-sender.d.ts +4 -0
- package/dist/react/use-presence-sender.d.ts.map +1 -0
- package/dist/react/use-presence-sender.js +27 -0
- package/dist/react/use-presence-sender.js.map +1 -0
- package/dist/react/use-presenting.d.ts +26 -0
- package/dist/react/use-presenting.d.ts.map +1 -0
- package/dist/react/use-presenting.js +118 -0
- package/dist/react/use-presenting.js.map +1 -0
- package/dist/react/use-rail-layout.d.ts +13 -0
- package/dist/react/use-rail-layout.d.ts.map +1 -0
- package/dist/react/use-rail-layout.js +38 -0
- package/dist/react/use-rail-layout.js.map +1 -0
- package/dist/react/use-sharing.d.ts +27 -0
- package/dist/react/use-sharing.d.ts.map +1 -0
- package/dist/react/use-sharing.js +93 -0
- package/dist/react/use-sharing.js.map +1 -0
- package/dist/react/version-history.d.ts +12 -0
- package/dist/react/version-history.d.ts.map +1 -0
- package/dist/react/version-history.js +81 -0
- package/dist/react/version-history.js.map +1 -0
- package/dist/runtime/anchoring.d.ts +17 -0
- package/dist/runtime/anchoring.d.ts.map +1 -0
- package/dist/runtime/anchoring.js +258 -0
- package/dist/runtime/anchoring.js.map +1 -0
- package/dist/runtime/assets.d.ts +6 -0
- package/dist/runtime/assets.js +3 -0
- package/dist/runtime/connection.d.ts +32 -0
- package/dist/runtime/connection.d.ts.map +1 -0
- package/dist/runtime/connection.js +27 -0
- package/dist/runtime/connection.js.map +1 -0
- package/dist/runtime/editing.d.ts +10 -0
- package/dist/runtime/editing.d.ts.map +1 -0
- package/dist/runtime/editing.js +170 -0
- package/dist/runtime/editing.js.map +1 -0
- package/dist/runtime/geometry.d.ts +4 -0
- package/dist/runtime/geometry.d.ts.map +1 -0
- package/dist/runtime/geometry.js +8 -0
- package/dist/runtime/geometry.js.map +1 -0
- package/dist/runtime/highlights.d.ts +2 -0
- package/dist/runtime/highlights.d.ts.map +1 -0
- package/dist/runtime/highlights.js +29 -0
- package/dist/runtime/highlights.js.map +1 -0
- package/dist/runtime/index.d.ts +6 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/layout-handle.d.ts +33 -0
- package/dist/runtime/layout-handle.d.ts.map +1 -0
- package/dist/runtime/layout-handle.js +218 -0
- package/dist/runtime/layout-handle.js.map +1 -0
- package/dist/runtime/layout.d.ts +27 -0
- package/dist/runtime/layout.d.ts.map +1 -0
- package/dist/runtime/layout.js +290 -0
- package/dist/runtime/layout.js.map +1 -0
- package/dist/runtime/presence.d.ts +5 -0
- package/dist/runtime/presence.d.ts.map +1 -0
- package/dist/runtime/presence.js +26 -0
- package/dist/runtime/presence.js.map +1 -0
- package/dist/runtime/runtime.d.ts +31 -0
- package/dist/runtime/runtime.d.ts.map +1 -0
- package/dist/runtime/runtime.entry.d.ts +9 -0
- package/dist/runtime/runtime.entry.d.ts.map +1 -0
- package/dist/runtime/runtime.entry.js +6 -0
- package/dist/runtime/runtime.entry.js.map +1 -0
- package/dist/runtime/runtime.js +189 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/runtime/sandbox/relay.d.ts +2 -0
- package/dist/runtime/sandbox/relay.d.ts.map +1 -0
- package/dist/runtime/sandbox/relay.js +82 -0
- package/dist/runtime/sandbox/relay.js.map +1 -0
- package/dist/runtime/sandbox.entry.d.ts +2 -0
- package/dist/runtime/sandbox.entry.d.ts.map +1 -0
- package/dist/runtime/sandbox.entry.js +3 -0
- package/dist/runtime/sandbox.entry.js.map +1 -0
- package/dist/runtime/shared.d.ts +22 -0
- package/dist/runtime/shared.d.ts.map +1 -0
- package/dist/runtime/shared.js +118 -0
- package/dist/runtime/shared.js.map +1 -0
- package/dist/runtime/slides.d.ts +20 -0
- package/dist/runtime/slides.d.ts.map +1 -0
- package/dist/runtime/slides.js +143 -0
- package/dist/runtime/slides.js.map +1 -0
- package/dist/runtime/source-align.d.ts +12 -0
- package/dist/runtime/source-align.d.ts.map +1 -0
- package/dist/runtime/source-align.js +158 -0
- package/dist/runtime/source-align.js.map +1 -0
- package/dist/runtime/source-attributes.d.ts +34 -0
- package/dist/runtime/source-attributes.d.ts.map +1 -0
- package/dist/runtime/source-attributes.js +51 -0
- package/dist/runtime/source-attributes.js.map +1 -0
- package/dist/runtime/source-copy-origin.d.ts +5 -0
- package/dist/runtime/source-copy-origin.d.ts.map +1 -0
- package/dist/runtime/source-copy-origin.js +28 -0
- package/dist/runtime/source-copy-origin.js.map +1 -0
- package/dist/runtime/source-element-dom-resolve.d.ts +11 -0
- package/dist/runtime/source-element-dom-resolve.d.ts.map +1 -0
- package/dist/runtime/source-element-dom-resolve.js +104 -0
- package/dist/runtime/source-element-dom-resolve.js.map +1 -0
- package/dist/runtime/source-element-dom.d.ts +14 -0
- package/dist/runtime/source-element-dom.d.ts.map +1 -0
- package/dist/runtime/source-element-dom.js +75 -0
- package/dist/runtime/source-element-dom.js.map +1 -0
- package/dist/runtime/source-page.d.ts +32 -0
- package/dist/runtime/source-page.d.ts.map +1 -0
- package/dist/runtime/source-page.js +137 -0
- package/dist/runtime/source-page.js.map +1 -0
- package/dist/runtime/source-patch.d.ts +20 -0
- package/dist/runtime/source-patch.d.ts.map +1 -0
- package/dist/runtime/source-patch.js +94 -0
- package/dist/runtime/source-patch.js.map +1 -0
- package/dist/runtime/source-serialize.d.ts +12 -0
- package/dist/runtime/source-serialize.d.ts.map +1 -0
- package/dist/runtime/source-serialize.js +144 -0
- package/dist/runtime/source-serialize.js.map +1 -0
- package/dist/runtime/source-text-anchor.d.ts +5 -0
- package/dist/runtime/source-text-anchor.d.ts.map +1 -0
- package/dist/runtime/source-text-anchor.js +27 -0
- package/dist/runtime/source-text-anchor.js.map +1 -0
- package/dist/runtime/source-text-dom.d.ts +5 -0
- package/dist/runtime/source-text-dom.d.ts.map +1 -0
- package/dist/runtime/source-text-dom.js +53 -0
- package/dist/runtime/source-text-dom.js.map +1 -0
- package/dist/runtime/source-tokens.d.ts +84 -0
- package/dist/runtime/source-tokens.d.ts.map +1 -0
- package/dist/runtime/source-tokens.js +192 -0
- package/dist/runtime/source-tokens.js.map +1 -0
- package/dist/runtime/source-video-attributes.d.ts +5 -0
- package/dist/runtime/source-video-attributes.d.ts.map +1 -0
- package/dist/runtime/source-video-attributes.js +5 -0
- package/dist/runtime/source-video-attributes.js.map +1 -0
- package/dist/runtime/source-video-controller.d.ts +43 -0
- package/dist/runtime/source-video-controller.d.ts.map +1 -0
- package/dist/runtime/source-video-controller.js +190 -0
- package/dist/runtime/source-video-controller.js.map +1 -0
- package/dist/runtime/source-video-dom.d.ts +3 -0
- package/dist/runtime/source-video-dom.d.ts.map +1 -0
- package/dist/runtime/source-video-dom.js +14 -0
- package/dist/runtime/source-video-dom.js.map +1 -0
- package/dist/runtime/source.d.ts +14 -0
- package/dist/runtime/source.d.ts.map +1 -0
- package/dist/runtime/source.js +13 -0
- package/dist/runtime/source.js.map +1 -0
- package/dist/runtime/state-backend.d.ts +28 -0
- package/dist/runtime/state-backend.d.ts.map +1 -0
- package/dist/runtime/state-backend.js +86 -0
- package/dist/runtime/state-backend.js.map +1 -0
- package/dist/runtime/text-index.d.ts +11 -0
- package/dist/runtime/text-index.d.ts.map +1 -0
- package/dist/runtime/text-index.js +73 -0
- package/dist/runtime/text-index.js.map +1 -0
- package/dist/runtime/theme.d.ts +5 -0
- package/dist/runtime/theme.d.ts.map +1 -0
- package/dist/runtime/theme.js +30 -0
- package/dist/runtime/theme.js.map +1 -0
- package/dist/runtime/viewer.d.ts +5 -0
- package/dist/runtime/viewer.d.ts.map +1 -0
- package/dist/runtime/viewer.entry.d.ts +2 -0
- package/dist/runtime/viewer.entry.d.ts.map +1 -0
- package/dist/runtime/viewer.entry.js +3 -0
- package/dist/runtime/viewer.entry.js.map +1 -0
- package/dist/runtime/viewer.js +62 -0
- package/dist/runtime/viewer.js.map +1 -0
- package/dist/runtime.global.js +142 -0
- package/dist/sandbox.global.js +1 -0
- package/dist/server/adapters/activity.d.ts +4 -0
- package/dist/server/adapters/activity.d.ts.map +1 -0
- package/dist/server/adapters/activity.js +25 -0
- package/dist/server/adapters/activity.js.map +1 -0
- package/dist/server/adapters/kysely/index.d.ts +30 -0
- package/dist/server/adapters/kysely/index.d.ts.map +1 -0
- package/dist/server/adapters/kysely/index.js +31 -0
- package/dist/server/adapters/kysely/index.js.map +1 -0
- package/dist/server/adapters/kysely/schema.d.ts +11 -0
- package/dist/server/adapters/kysely/schema.d.ts.map +1 -0
- package/dist/server/adapters/kysely/schema.js +159 -0
- package/dist/server/adapters/kysely/schema.js.map +1 -0
- package/dist/server/adapters/kysely/sharing.d.ts +5 -0
- package/dist/server/adapters/kysely/sharing.d.ts.map +1 -0
- package/dist/server/adapters/kysely/sharing.js +81 -0
- package/dist/server/adapters/kysely/sharing.js.map +1 -0
- package/dist/server/adapters/kysely/store.d.ts +87 -0
- package/dist/server/adapters/kysely/store.d.ts.map +1 -0
- package/dist/server/adapters/kysely/store.js +328 -0
- package/dist/server/adapters/kysely/store.js.map +1 -0
- package/dist/server/adapters/memory-bus.d.ts +6 -0
- package/dist/server/adapters/memory-bus.d.ts.map +1 -0
- package/dist/server/adapters/memory-bus.js +26 -0
- package/dist/server/adapters/memory-bus.js.map +1 -0
- package/dist/server/adapters/memory-store.d.ts +4 -0
- package/dist/server/adapters/memory-store.d.ts.map +1 -0
- package/dist/server/adapters/memory-store.js +125 -0
- package/dist/server/adapters/memory-store.js.map +1 -0
- package/dist/server/adapters/memory.d.ts +8 -0
- package/dist/server/adapters/memory.d.ts.map +1 -0
- package/dist/server/adapters/memory.js +23 -0
- package/dist/server/adapters/memory.js.map +1 -0
- package/dist/server/adapters/postgres/blobs.d.ts +6 -0
- package/dist/server/adapters/postgres/blobs.d.ts.map +1 -0
- package/dist/server/adapters/postgres/blobs.js +17 -0
- package/dist/server/adapters/postgres/blobs.js.map +1 -0
- package/dist/server/adapters/postgres/bus.d.ts +7 -0
- package/dist/server/adapters/postgres/bus.d.ts.map +1 -0
- package/dist/server/adapters/postgres/bus.js +60 -0
- package/dist/server/adapters/postgres/bus.js.map +1 -0
- package/dist/server/adapters/postgres/client.d.ts +38 -0
- package/dist/server/adapters/postgres/client.d.ts.map +1 -0
- package/dist/server/adapters/postgres/client.js +22 -0
- package/dist/server/adapters/postgres/client.js.map +1 -0
- package/dist/server/adapters/postgres/index.d.ts +29 -0
- package/dist/server/adapters/postgres/index.d.ts.map +1 -0
- package/dist/server/adapters/postgres/index.js +23 -0
- package/dist/server/adapters/postgres/index.js.map +1 -0
- package/dist/server/adapters/postgres/schema.d.ts +10 -0
- package/dist/server/adapters/postgres/schema.d.ts.map +1 -0
- package/dist/server/adapters/postgres/schema.js +111 -0
- package/dist/server/adapters/postgres/schema.js.map +1 -0
- package/dist/server/adapters/postgres/store.d.ts +4 -0
- package/dist/server/adapters/postgres/store.d.ts.map +1 -0
- package/dist/server/adapters/postgres/store.js +189 -0
- package/dist/server/adapters/postgres/store.js.map +1 -0
- package/dist/server/adapters/s3.d.ts +22 -0
- package/dist/server/adapters/s3.d.ts.map +1 -0
- package/dist/server/adapters/s3.js +47 -0
- package/dist/server/adapters/s3.js.map +1 -0
- package/dist/server/adapters/sql-rows.d.ts +26 -0
- package/dist/server/adapters/sql-rows.d.ts.map +1 -0
- package/dist/server/adapters/sql-rows.js +134 -0
- package/dist/server/adapters/sql-rows.js.map +1 -0
- package/dist/server/adapters/sqlite/index.d.ts +9 -0
- package/dist/server/adapters/sqlite/index.d.ts.map +1 -0
- package/dist/server/adapters/sqlite/index.js +30 -0
- package/dist/server/adapters/sqlite/index.js.map +1 -0
- package/dist/server/bin.d.ts +3 -0
- package/dist/server/bin.d.ts.map +1 -0
- package/dist/server/bin.js +7 -0
- package/dist/server/bin.js.map +1 -0
- package/dist/server/cli.d.ts +8 -0
- package/dist/server/cli.d.ts.map +1 -0
- package/dist/server/cli.js +103 -0
- package/dist/server/cli.js.map +1 -0
- package/dist/server/collection-storage.d.ts +55 -0
- package/dist/server/collection-storage.d.ts.map +1 -0
- package/dist/server/collection-storage.js +77 -0
- package/dist/server/collection-storage.js.map +1 -0
- package/dist/server/core/access.d.ts +17 -0
- package/dist/server/core/access.d.ts.map +1 -0
- package/dist/server/core/access.js +61 -0
- package/dist/server/core/access.js.map +1 -0
- package/dist/server/core/artifacts.d.ts +50 -0
- package/dist/server/core/artifacts.d.ts.map +1 -0
- package/dist/server/core/artifacts.js +152 -0
- package/dist/server/core/artifacts.js.map +1 -0
- package/dist/server/core/assets.d.ts +23 -0
- package/dist/server/core/assets.d.ts.map +1 -0
- package/dist/server/core/assets.js +41 -0
- package/dist/server/core/assets.js.map +1 -0
- package/dist/server/core/base64.d.ts +3 -0
- package/dist/server/core/base64.d.ts.map +1 -0
- package/dist/server/core/base64.js +17 -0
- package/dist/server/core/base64.js.map +1 -0
- package/dist/server/core/blobs.d.ts +10 -0
- package/dist/server/core/blobs.d.ts.map +1 -0
- package/dist/server/core/blobs.js +10 -0
- package/dist/server/core/blobs.js.map +1 -0
- package/dist/server/core/errors.d.ts +22 -0
- package/dist/server/core/errors.d.ts.map +1 -0
- package/dist/server/core/errors.js +32 -0
- package/dist/server/core/errors.js.map +1 -0
- package/dist/server/core/export.d.ts +8 -0
- package/dist/server/core/export.d.ts.map +1 -0
- package/dist/server/core/export.js +27 -0
- package/dist/server/core/export.js.map +1 -0
- package/dist/server/core/ids.d.ts +4 -0
- package/dist/server/core/ids.d.ts.map +1 -0
- package/dist/server/core/ids.js +12 -0
- package/dist/server/core/ids.js.map +1 -0
- package/dist/server/core/index.d.ts +36 -0
- package/dist/server/core/index.d.ts.map +1 -0
- package/dist/server/core/index.js +19 -0
- package/dist/server/core/index.js.map +1 -0
- package/dist/server/core/inline-assets.d.ts +6 -0
- package/dist/server/core/inline-assets.d.ts.map +1 -0
- package/dist/server/core/inline-assets.js +43 -0
- package/dist/server/core/inline-assets.js.map +1 -0
- package/dist/server/core/live.d.ts +10 -0
- package/dist/server/core/live.d.ts.map +1 -0
- package/dist/server/core/live.js +73 -0
- package/dist/server/core/live.js.map +1 -0
- package/dist/server/core/source-publication.d.ts +30 -0
- package/dist/server/core/source-publication.d.ts.map +1 -0
- package/dist/server/core/source-publication.js +89 -0
- package/dist/server/core/source-publication.js.map +1 -0
- package/dist/server/core/source.d.ts +16 -0
- package/dist/server/core/source.d.ts.map +1 -0
- package/dist/server/core/source.js +9 -0
- package/dist/server/core/source.js.map +1 -0
- package/dist/server/core/summary.d.ts +12 -0
- package/dist/server/core/summary.d.ts.map +1 -0
- package/dist/server/core/summary.js +40 -0
- package/dist/server/core/summary.js.map +1 -0
- package/dist/server/core/version-reader.d.ts +21 -0
- package/dist/server/core/version-reader.d.ts.map +1 -0
- package/dist/server/core/version-reader.js +49 -0
- package/dist/server/core/version-reader.js.map +1 -0
- package/dist/server/core/views.d.ts +6 -0
- package/dist/server/core/views.d.ts.map +1 -0
- package/dist/server/core/views.js +19 -0
- package/dist/server/core/views.js.map +1 -0
- package/dist/server/hosts.d.ts +13 -0
- package/dist/server/hosts.d.ts.map +1 -0
- package/dist/server/hosts.js +11 -0
- package/dist/server/hosts.js.map +1 -0
- package/dist/server/http/app.d.ts +48 -0
- package/dist/server/http/app.d.ts.map +1 -0
- package/dist/server/http/app.js +82 -0
- package/dist/server/http/app.js.map +1 -0
- package/dist/server/http/body.d.ts +5 -0
- package/dist/server/http/body.d.ts.map +1 -0
- package/dist/server/http/body.js +9 -0
- package/dist/server/http/body.js.map +1 -0
- package/dist/server/http/gates.d.ts +26 -0
- package/dist/server/http/gates.d.ts.map +1 -0
- package/dist/server/http/gates.js +43 -0
- package/dist/server/http/gates.js.map +1 -0
- package/dist/server/http/routes/artifacts.d.ts +5 -0
- package/dist/server/http/routes/artifacts.d.ts.map +1 -0
- package/dist/server/http/routes/artifacts.js +75 -0
- package/dist/server/http/routes/artifacts.js.map +1 -0
- package/dist/server/http/routes/events.d.ts +5 -0
- package/dist/server/http/routes/events.d.ts.map +1 -0
- package/dist/server/http/routes/events.js +26 -0
- package/dist/server/http/routes/events.js.map +1 -0
- package/dist/server/http/routes/mcp.d.ts +17 -0
- package/dist/server/http/routes/mcp.d.ts.map +1 -0
- package/dist/server/http/routes/mcp.js +37 -0
- package/dist/server/http/routes/mcp.js.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +5 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/kit/broadcasts.d.ts +5 -0
- package/dist/server/kit/broadcasts.d.ts.map +1 -0
- package/dist/server/kit/broadcasts.js +10 -0
- package/dist/server/kit/broadcasts.js.map +1 -0
- package/dist/server/kit/events.d.ts +97 -0
- package/dist/server/kit/events.d.ts.map +1 -0
- package/dist/server/kit/events.js +28 -0
- package/dist/server/kit/events.js.map +1 -0
- package/dist/server/kit/observe.d.ts +20 -0
- package/dist/server/kit/observe.d.ts.map +1 -0
- package/dist/server/kit/observe.js +24 -0
- package/dist/server/kit/observe.js.map +1 -0
- package/dist/server/kit/plugin.d.ts +34 -0
- package/dist/server/kit/plugin.d.ts.map +1 -0
- package/dist/server/kit/plugin.js +4 -0
- package/dist/server/kit/plugin.js.map +1 -0
- package/dist/server/kit/tool.d.ts +60 -0
- package/dist/server/kit/tool.d.ts.map +1 -0
- package/dist/server/kit/tool.js +65 -0
- package/dist/server/kit/tool.js.map +1 -0
- package/dist/server/kit/wire.d.ts +9 -0
- package/dist/server/kit/wire.d.ts.map +1 -0
- package/dist/server/kit/wire.js +14 -0
- package/dist/server/kit/wire.js.map +1 -0
- package/dist/server/kit.d.ts +25 -0
- package/dist/server/kit.d.ts.map +1 -0
- package/dist/server/kit.js +18 -0
- package/dist/server/kit.js.map +1 -0
- package/dist/server/mcp/result.d.ts +5 -0
- package/dist/server/mcp/result.d.ts.map +1 -0
- package/dist/server/mcp/result.js +25 -0
- package/dist/server/mcp/result.js.map +1 -0
- package/dist/server/mcp/schema.d.ts +7 -0
- package/dist/server/mcp/schema.d.ts.map +1 -0
- package/dist/server/mcp/schema.js +27 -0
- package/dist/server/mcp/schema.js.map +1 -0
- package/dist/server/mcp/tools.d.ts +35 -0
- package/dist/server/mcp/tools.d.ts.map +1 -0
- package/dist/server/mcp/tools.js +72 -0
- package/dist/server/mcp/tools.js.map +1 -0
- package/dist/server/mcp/viewer.d.ts +17 -0
- package/dist/server/mcp/viewer.d.ts.map +1 -0
- package/dist/server/mcp/viewer.js +47 -0
- package/dist/server/mcp/viewer.js.map +1 -0
- package/dist/server/plugins/comments/index.d.ts +8 -0
- package/dist/server/plugins/comments/index.d.ts.map +1 -0
- package/dist/server/plugins/comments/index.js +79 -0
- package/dist/server/plugins/comments/index.js.map +1 -0
- package/dist/server/plugins/comments/routes.d.ts +6 -0
- package/dist/server/plugins/comments/routes.d.ts.map +1 -0
- package/dist/server/plugins/comments/routes.js +34 -0
- package/dist/server/plugins/comments/routes.js.map +1 -0
- package/dist/server/plugins/comments/service.d.ts +20 -0
- package/dist/server/plugins/comments/service.d.ts.map +1 -0
- package/dist/server/plugins/comments/service.js +66 -0
- package/dist/server/plugins/comments/service.js.map +1 -0
- package/dist/server/plugins/components/catalog.d.ts +15 -0
- package/dist/server/plugins/components/catalog.d.ts.map +1 -0
- package/dist/server/plugins/components/catalog.js +39 -0
- package/dist/server/plugins/components/catalog.js.map +1 -0
- package/dist/server/plugins/components/index.d.ts +21 -0
- package/dist/server/plugins/components/index.d.ts.map +1 -0
- package/dist/server/plugins/components/index.js +35 -0
- package/dist/server/plugins/components/index.js.map +1 -0
- package/dist/server/plugins/components/tags.d.ts +9 -0
- package/dist/server/plugins/components/tags.d.ts.map +1 -0
- package/dist/server/plugins/components/tags.js +22 -0
- package/dist/server/plugins/components/tags.js.map +1 -0
- package/dist/server/plugins/editing/apply.d.ts +9 -0
- package/dist/server/plugins/editing/apply.d.ts.map +1 -0
- package/dist/server/plugins/editing/apply.js +30 -0
- package/dist/server/plugins/editing/apply.js.map +1 -0
- package/dist/server/plugins/editing/index.d.ts +8 -0
- package/dist/server/plugins/editing/index.d.ts.map +1 -0
- package/dist/server/plugins/editing/index.js +48 -0
- package/dist/server/plugins/editing/index.js.map +1 -0
- package/dist/server/plugins/editing/layout.d.ts +4 -0
- package/dist/server/plugins/editing/layout.d.ts.map +1 -0
- package/dist/server/plugins/editing/layout.js +29 -0
- package/dist/server/plugins/editing/layout.js.map +1 -0
- package/dist/server/plugins/editing/source-text.d.ts +10 -0
- package/dist/server/plugins/editing/source-text.d.ts.map +1 -0
- package/dist/server/plugins/editing/source-text.js +10 -0
- package/dist/server/plugins/editing/source-text.js.map +1 -0
- package/dist/server/plugins/editing/source.d.ts +18 -0
- package/dist/server/plugins/editing/source.d.ts.map +1 -0
- package/dist/server/plugins/editing/source.js +15 -0
- package/dist/server/plugins/editing/source.js.map +1 -0
- package/dist/server/plugins/index.d.ts +25 -0
- package/dist/server/plugins/index.d.ts.map +1 -0
- package/dist/server/plugins/index.js +20 -0
- package/dist/server/plugins/index.js.map +1 -0
- package/dist/server/plugins/mcp-auth.d.ts +12 -0
- package/dist/server/plugins/mcp-auth.d.ts.map +1 -0
- package/dist/server/plugins/mcp-auth.js +27 -0
- package/dist/server/plugins/mcp-auth.js.map +1 -0
- package/dist/server/plugins/mentions.d.ts +10 -0
- package/dist/server/plugins/mentions.d.ts.map +1 -0
- package/dist/server/plugins/mentions.js +28 -0
- package/dist/server/plugins/mentions.js.map +1 -0
- package/dist/server/plugins/moderation.d.ts +17 -0
- package/dist/server/plugins/moderation.d.ts.map +1 -0
- package/dist/server/plugins/moderation.js +17 -0
- package/dist/server/plugins/moderation.js.map +1 -0
- package/dist/server/plugins/notifications.d.ts +22 -0
- package/dist/server/plugins/notifications.d.ts.map +1 -0
- package/dist/server/plugins/notifications.js +43 -0
- package/dist/server/plugins/notifications.js.map +1 -0
- package/dist/server/plugins/presence.d.ts +3 -0
- package/dist/server/plugins/presence.d.ts.map +1 -0
- package/dist/server/plugins/presence.js +23 -0
- package/dist/server/plugins/presence.js.map +1 -0
- package/dist/server/plugins/rate-limit.d.ts +18 -0
- package/dist/server/plugins/rate-limit.d.ts.map +1 -0
- package/dist/server/plugins/rate-limit.js +43 -0
- package/dist/server/plugins/rate-limit.js.map +1 -0
- package/dist/server/plugins/state/index.d.ts +10 -0
- package/dist/server/plugins/state/index.d.ts.map +1 -0
- package/dist/server/plugins/state/index.js +66 -0
- package/dist/server/plugins/state/index.js.map +1 -0
- package/dist/server/plugins/state/service.d.ts +21 -0
- package/dist/server/plugins/state/service.d.ts.map +1 -0
- package/dist/server/plugins/state/service.js +65 -0
- package/dist/server/plugins/state/service.js.map +1 -0
- package/dist/server/plugins/webhook.d.ts +17 -0
- package/dist/server/plugins/webhook.d.ts.map +1 -0
- package/dist/server/plugins/webhook.js +54 -0
- package/dist/server/plugins/webhook.js.map +1 -0
- package/dist/server/ports.d.ts +214 -0
- package/dist/server/ports.d.ts.map +1 -0
- package/dist/server/ports.js +22 -0
- package/dist/server/ports.js.map +1 -0
- package/dist/server/sandbox/assets.d.ts +13 -0
- package/dist/server/sandbox/assets.d.ts.map +1 -0
- package/dist/server/sandbox/assets.js +8 -0
- package/dist/server/sandbox/assets.js.map +1 -0
- package/dist/server/sandbox/csp.d.ts +5 -0
- package/dist/server/sandbox/csp.d.ts.map +1 -0
- package/dist/server/sandbox/csp.js +29 -0
- package/dist/server/sandbox/csp.js.map +1 -0
- package/dist/server/sandbox/inject.d.ts +9 -0
- package/dist/server/sandbox/inject.d.ts.map +1 -0
- package/dist/server/sandbox/inject.js +42 -0
- package/dist/server/sandbox/inject.js.map +1 -0
- package/dist/server/sandbox/server.d.ts +17 -0
- package/dist/server/sandbox/server.d.ts.map +1 -0
- package/dist/server/sandbox/server.js +63 -0
- package/dist/server/sandbox/server.js.map +1 -0
- package/dist/server/sharing/index.d.ts +41 -0
- package/dist/server/sharing/index.d.ts.map +1 -0
- package/dist/server/sharing/index.js +150 -0
- package/dist/server/sharing/index.js.map +1 -0
- package/dist/server/sharing/postgres.d.ts +13 -0
- package/dist/server/sharing/postgres.d.ts.map +1 -0
- package/dist/server/sharing/postgres.js +87 -0
- package/dist/server/sharing/postgres.js.map +1 -0
- package/dist/server/sharing/store.d.ts +23 -0
- package/dist/server/sharing/store.d.ts.map +1 -0
- package/dist/server/sharing/store.js +38 -0
- package/dist/server/sharing/store.js.map +1 -0
- package/dist/server/source.d.ts +8 -0
- package/dist/server/source.d.ts.map +1 -0
- package/dist/server/source.js +6 -0
- package/dist/server/source.js.map +1 -0
- package/dist/server/testing.d.ts +17 -0
- package/dist/server/testing.d.ts.map +1 -0
- package/dist/server/testing.js +287 -0
- package/dist/server/testing.js.map +1 -0
- package/dist/viewer.global.js +150 -0
- package/package.json +204 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(()=>{function oe(e,t){return typeof t=="bigint"?t.toString():t}var F=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function ie(e){return new F(e)}function se(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ce(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}var U="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ue(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function I(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function w(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ae(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var le={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function b(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function pe(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function B(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function E(e){return typeof e=="string"?e:e?.message}function K(e,t,r){var n;for(let i=t;i<e.length;i++)(n=e[i]).schema??(n.schema=r)}function P(e,t,r){var n;let i=e.inst?._zod?.traits;i?.has("$ZodType")&&(i.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let s=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,c=e.message?e.message:E(e.inst?._zod.def?.error?.(e))??E(s?.(e))??E(t?.error?.(e))??E(r.customError?.(e))??E(r.localeError?.(e))??"Invalid input",o={};for(let a of Object.keys(e))a==="inst"||a==="schema"||a==="continue"||a==="input"||a==="__proto__"||(o[a]=e[a]);return o.path??(o.path=[]),o.message=c,t?.reportInput&&(o.input=e.input),o}function fe(e,t){for(let r in t){let n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):Ue(e,r,n.value)}}function v(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function V(e,t,r){return v(e,t,r,!1)}function Ue(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:v(this,t,r.bind(this))},set(n){v(this,t,n)}})}function Be(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var N,z=!1,Ke={configurable:!0,get(){z=!0}};function S(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&N!==e._zod){N=void 0;return}N=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Ke);let i=z;z=!1;try{let s=r(this);return z?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),z=z||i,s}catch(s){throw delete this[t],z=z||i,s}},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i})}})}function de(e,t,r,n){let i=Be(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let s={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,s),s.value=r(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:s})}})}var me;var W={value:void 0,enumerable:!1},he="captureStackTrace"in Error?Error:null;function Ve(e){let t=he;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return he=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function _(e,t,r,n){let i={};function s(l){this.def=l,this.constr=f,this.traits=new Set}s.prototype=i;let c=r,o=c&&new WeakSet;function a(l,d){if(l._zod){if(l._zod.traits.has(e))return}else{W.value=new s(d);try{Object.defineProperty(l,"_zod",W)}finally{W.value=void 0}}if(l._zod.traits.add(e),t(l,d),o){let h=Object.getPrototypeOf(l),g=l._zod.constr.prototype,x=h;for(;x&&x!==g;)x=Object.getPrototypeOf(x);let Z=x??h;o.has(Z)||(o.add(Z),fe(Z,c))}let m=f.prototype;for(let h in m)Object.prototype.hasOwnProperty.call(m,h)&&(h in l||(l[h]=m[h].bind(l)))}let u=n?.Parent??Object;class p extends u{}Object.defineProperty(p,"name",{value:e});function f(l){let d=n?.Parent?Ve(p):this;a(d,l);let m=d._zod.deferred;if(m){for(let g of m)g();d._zod.deferred=void 0}let h=globalThis.__zod_globalConfig?.postProcessor;return h&&h(d),d}return Object.defineProperty(f,"init",{value:a}),Object.defineProperty(f,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}var $=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};(me=globalThis).__zod_globalConfig??(me.__zod_globalConfig={});var R=globalThis.__zod_globalConfig;function k(e){return e&&Object.assign(R,e),R}function We(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,oe,2)),e.message}function Ge(e){this._zod.message=e}var Xe={get:We,set:Ge,enumerable:!0,configurable:!0},X={value:void 0,enumerable:!1},_e=new WeakSet([Object.prototype,Error.prototype]),ge=(e,t)=>{e.name="$ZodError",X.value=t,Object.defineProperty(e,"issues",X),X.value=void 0,Object.defineProperty(e,"message",Xe);let r=Object.getPrototypeOf(e);_e.has(r)||(_e.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},Zt=_("$ZodError",ge),M=_("$ZodError",ge,void 0,{Parent:Error});var Ye=e=>{let t=(r,n,i,s)=>{let c=i?{...i,async:!1}:{async:!1},o=r._zod.run({value:n,issues:[]},c);if(o instanceof Promise)throw new $;if(o.issues.length){let a=new(s?.Err??e)(o.issues.map(u=>P(u,c,k())));throw U(a,s?.callee??t),a}return o.value};return t},H=Ye(M),Je=e=>{let t=async(r,n,i,s)=>{let c=i?{...i,async:!0}:{async:!0},o=r._zod.run({value:n,issues:[]},c);if(o instanceof Promise&&(o=await o),o.issues.length){let a=new(s?.Err??e)(o.issues.map(u=>P(u,c,k())));throw U(a,s?.callee??t),a}return o.value};return t},Y=Je(M),qe=e=>(t,r,n)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new $;return s.issues.length?xe(e,s.issues,i):{success:!0,data:s.value}},J=qe(M);function xe(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(i=>P(i,r,k()))),t=void 0,r=void 0),n},set error(i){n=i,t=void 0,r=void 0}}}var Qe=e=>async(t,r,n)=>{let i=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?xe(e,s.issues,i):{success:!0,data:s.value}},q=Qe(M);var $e=/^-?\d+(?:\.\d+)?$/,ze=/^(?:true|false)$/i;var C=_("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var be={number:"number",bigint:"bigint",object:"date"};var ye=_("$ZodCheckGreaterThan",(e,t)=>{C.init(e,t);let r=be[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:be[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var Ze=_("$ZodCheckNumberFormat",(e,t)=>{C.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[i,s]=le[t.format];e._zod.check=c=>{let o=c.value;if(r){if(!Number.isInteger(o)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?c.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):c.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}o<i&&c.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>s&&c.issues.push({origin:"number",input:o,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}});var Pe={major:4,minor:6,patch:7};var A=_("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pe;let n=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let s of i)for(let c of s._zod.onattach)c(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let s=(o,a,u)=>{if(o.memo)return o;let p=b(o),f;for(let l of a){if(l._zod.def.when){if(pe(o)||!l._zod.def.when(o))continue}else if(p)continue;let d=o.issues.length,m=l._zod.check(o);if(m instanceof Promise&&u?.async===!1)throw new $;if(f||m instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await m,o.issues.length!==d&&(K(o.issues,d,e),p||(p=b(o,d)))});else{if(o.issues.length===d)continue;K(o.issues,d,e),p||(p=b(o,d))}}return f?f.then(()=>o):o},c=(o,a,u)=>{if(b(o))return o.aborted=!0,o;let p=s(a,i,u);if(p instanceof Promise){if(u.async===!1)throw new $;return p.then(f=>e._zod.parse(f,u))}return e._zod.parse(p,u)};e._zod.run=(o,a)=>{if(a.skipChecks)return e._zod.parse(o,a);if(a.direction==="backward"){let p=e._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return p instanceof Promise?p.then(f=>c(f,o,a)):c(p,o,a)}let u=e._zod.parse(o,a);if(u instanceof Promise){if(a.async===!1)throw new $;return u.then(p=>s(p,i,a))}return s(u,i,a)}}},{get"~standard"(){return V(this,"~standard",nt(this))},set"~standard"(e){v(this,"~standard",e)}}),Ae=(e,t)=>e.issues.length?{issues:e.issues.map(r=>P(r,t,k()))}:{value:e.value};async function rt(e,t){let r={async:!0};return Ae(await e._zod.run({value:t,issues:[]},r),r)}function nt(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return Ae(n,r)}catch{}return rt(e,t)},vendor:"zod",version:1}}var Q=_("$ZodNumber",(e,t)=>{A.init(e,t),e._zod.pattern=$e,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...s?{received:s}:{}}),r}}),Ee=_("$ZodNumberFormat",(e,t)=>{Ze.init(e,t),Q.init(e,t)}),Se=_("$ZodBoolean",(e,t)=>{A.init(e,t),e._zod.pattern=ze,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}});function O(e,t,r,n,i,s){let c=r in n,o=s==="optional";if(!(!c&&o&&i==="optional")){if(e.issues.length){if(i!==void 0&&o&&!c)return;t.issues.push(...B(r,e.issues))}if(!c&&i===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(c||i==="defaulted"&&!o)&&(t.value[r]=void 0):t.value[r]=e.value}}var ot=[];function it(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:ot,i=n.length?[...t,...n]:t;for(let c of i)if(!e.shape?.[c]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(c)}": expected a Zod schema`);let s=ae(e.shape);return{...e,allKeys:i,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function st(e,t,r,n,i,s,c){let o=[],a=i.keySet,u=i.catchall._zod,p=u.def.type,f=u.optin,l=u.optout,d=0;for(let m in t){if(c&&r.issues.length!==d){if(b(r,d))break;d=r.issues.length}if(a.has(m))continue;if(m==="__proto__"){p==="never"&&o.push(m);continue}if(p==="never"){o.push(m);continue}let h=u.run({value:t[m],issues:[]},n);h instanceof Promise?e.push(h.then(g=>O(g,r,m,t,f,l))):O(h,r,m,t,f,l)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var Me=_("$ZodObject",(e,t)=>{A.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let u=()=>{let p={...n};return Object.defineProperty(t,"shape",{value:p}),u.raw=p,p};u.raw=n,Object.defineProperty(t,"shape",{get:u})}let i=ie(()=>it(t));S(e,"propValues",u=>{let p=u.def.shape,f={};for(let l in p){let d=p[l]._zod;if(d.values){Object.prototype.hasOwnProperty.call(f,l)||ce(f,l,new Set);for(let m of d.values)f[l].add(m);d.optin!==void 0&&f[l].add(void 0)}}return f});let s=ue,c=t.catchall,o,a=R.memoizer;a?.attach(e),e._zod.parse=(u,p)=>{o??(o=i.value);let f=u.value;if(!s(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value=a?a.alloc(e,u,{},p):{};let l=[],d=o.shape,m=p?.abortEarly,h=u.issues.length;for(let g of o.allKeys){if(m&&u.issues.length!==h){if(b(u,h))break;h=u.issues.length}if(g==="__proto__")continue;let x=d[g],Z=x._zod.optin,ne=x._zod.optout,L=x._zod.run({value:f[g],issues:[]},p);L instanceof Promise?l.push(L.then(Fe=>O(Fe,u,g,f,Z,ne))):O(L,u,g,f,Z,ne)}return c?st(l,f,u,p,i.value,e,m===!0):l.length?Promise.all(l).then(()=>u):u}});function ke(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ce=_("$ZodOptional",(e,t)=>{A.init(e,t),S(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",S(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),S(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${se(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let i=t.innerType._zod.run({value:r.value,issues:[]},n);return i instanceof Promise?i.then(s=>ke(r,s)):ke(r,i)}return t.innerType._zod.run(r,n)}});function Ie(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...w(t)})}function Re(e,t){return new e({type:"boolean",...w(t)})}function ee(e,t){return new ye({check:"greater_than",...w(t),value:e,inclusive:!0})}function te(e){return ee(0,e)}var T=_("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");A.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){v(this,"with",e)},parse(e,t){return H(this,e,t,{callee:this.parse})},parseAsync(e,t){return Y(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return J(this,e,t)},safeParseAsync(e,t){return q(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]},{parent:!0})},clone(e,t){return I(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}});var at=_("ZodMiniNumber",(e,t)=>{Q.init(e,t),T.init(e,t)});var lt=_("ZodMiniNumberFormat",(e,t)=>{Ee.init(e,t),at.init(e,t)});function Oe(e){return Ie(lt,e)}var pt=_("ZodMiniBoolean",(e,t)=>{Se.init(e,t),T.init(e,t)});function Te(e){return Re(pt,e)}var ft=_("ZodMiniObject",(e,t)=>{Me.init(e,t),T.init(e,t),de(e,"shape",r=>r._zod.def.shape,!1)});function D(e,t){let r={type:"object",shape:e??{},...w(t)};return new ft(r)}var dt=_("ZodMiniOptional",(e,t)=>{Ce.init(e,t),T.init(e,t)});function De(e){return new dt({type:"optional",innerType:e})}var j=(e,t)=>({kind:"notification",method:e,params:t});var re=j("artifact/notifications/present",D({on:Te(),slide:De(Oe().check(te()))})),je=j("artifact/notifications/exit-present",D({})),Le=j("artifact/notifications/escape",D({}));var ht="ui/notifications/sandbox-proxy-ready",_t="ui/notifications/sandbox-resource-ready",gt="allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",xt={camera:"camera",microphone:"microphone",geolocation:"geolocation",clipboardWrite:"clipboard-write"},$t=e=>new Set((e.querySelector('meta[name="open-artifact-hosts"]')?.getAttribute("content")??"").split(/\s+/).filter(Boolean)),zt=e=>!!e&&typeof e=="object"&&"method"in e&&e.method===_t,vt=(e,{params:t})=>{typeof t.sandbox=="string"&&e.setAttribute("sandbox",t.sandbox);let r=Object.keys(t.permissions??{}).map(n=>xt[n]).filter(Boolean);r.length>0&&e.setAttribute("allow",r.join("; ")),typeof t.html=="string"&&(e.srcdoc=t.html)},Ne=e=>{let{document:t}=e;if(e.self===e.top)throw new Error("The artifact sandbox only runs inside a frame.");let r=t.referrer?new URL(t.referrer).origin:"";if(!$t(t).has(r))throw new Error(`Embedding from ${r||"an unknown origin"} is not allowed.`);let n=r,i=e.location.origin,s=!1,c=t.createElement("iframe");c.setAttribute("sandbox",gt),c.title="Artifact",t.body.append(c),e.addEventListener("focus",()=>{c.focus(),c.contentWindow?.focus()}),e.addEventListener("keydown",o=>{if(o.key!=="Escape"||o.defaultPrevented)return;let a={},u=s?je.method:Le.method;e.parent.postMessage({jsonrpc:"2.0",method:u,params:a},n)}),e.addEventListener("message",o=>{if(o.source===e.parent){if(o.origin!==n)return;if(zt(o.data))s=!1,vt(c,o.data);else{if(o.data?.method===re.method){let a=re.params.safeParse(o.data.params);a.success&&(s=a.data.on)}c.contentWindow?.postMessage(o.data,"*")}}else o.source===c.contentWindow&&o.origin===i&&e.parent.postMessage(o.data,n)}),e.parent.postMessage({jsonrpc:"2.0",method:ht,params:{}},n)};Ne(window);})();
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CommentRow, ThreadActivity, ThreadRow } from "../ports.js";
|
|
2
|
+
/** Thread activity from rows already read, for adapters without a grouping query. */
|
|
3
|
+
export declare const activityFrom: (artifactIds: readonly string[], threads: readonly ThreadRow[], comments: readonly CommentRow[]) => ThreadActivity[];
|
|
4
|
+
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIxE,qFAAqF;AACrF,eAAO,MAAM,YAAY,gBACV,SAAS,MAAM,EAAE,WACrB,SAAS,SAAS,EAAE,YACnB,SAAS,UAAU,EAAE,KAC9B,cAAc,EAmBb,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const PEOPLE = 5;
|
|
2
|
+
/** Thread activity from rows already read, for adapters without a grouping query. */
|
|
3
|
+
export const activityFrom = (artifactIds, threads, comments) => artifactIds.flatMap((artifactId) => {
|
|
4
|
+
const own = threads.filter((thread) => thread.artifactId === artifactId);
|
|
5
|
+
if (own.length === 0)
|
|
6
|
+
return [];
|
|
7
|
+
const people = new Map();
|
|
8
|
+
for (const comment of comments
|
|
9
|
+
.filter((row) => row.artifactId === artifactId)
|
|
10
|
+
.toSorted((a, b) => b.createdAt.localeCompare(a.createdAt))) {
|
|
11
|
+
if (people.size === PEOPLE)
|
|
12
|
+
break;
|
|
13
|
+
if (!people.has(comment.author.id))
|
|
14
|
+
people.set(comment.author.id, comment.author);
|
|
15
|
+
}
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
artifactId,
|
|
19
|
+
open: own.filter((thread) => thread.state === "open").length,
|
|
20
|
+
total: own.length,
|
|
21
|
+
people: [...people.values()],
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../../src/server/adapters/activity.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,CAAC,CAAA;AAEhB,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,WAA8B,EAC9B,OAA6B,EAC7B,QAA+B,EACb,EAAE,CACpB,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;IACjC,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,KAAK,UAAU,CAAC,CAAA;IACxE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IAC/B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAgC,CAAA;IACtD,KAAK,MAAM,OAAO,IAAI,QAAQ;SAC3B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC;SAC9C,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;QAC9D,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM;YAAE,MAAK;QACjC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;IACnF,CAAC;IACD,OAAO;QACL;YACE,UAAU;YACV,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,MAAM;YAC5D,KAAK,EAAE,GAAG,CAAC,MAAM;YACjB,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;SAC7B;KACF,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
import type { BlobStore, Bus } from "../../ports.js";
|
|
3
|
+
import type { SharingStore } from "../../sharing/store.js";
|
|
4
|
+
import { type KitTables, kyselyStoreOn } from "./store.js";
|
|
5
|
+
export type { KitTables };
|
|
6
|
+
export interface KyselyBackend {
|
|
7
|
+
store: ReturnType<typeof kyselyStoreOn>;
|
|
8
|
+
blobs: BlobStore;
|
|
9
|
+
bus: Bus;
|
|
10
|
+
/** Sharing in the same database, for `sharing({ store })`. */
|
|
11
|
+
sharing: SharingStore;
|
|
12
|
+
/** Create or upgrade the tables. Run during deployment. */
|
|
13
|
+
migrate(): Promise<void>;
|
|
14
|
+
/** The schema as SQL for this dialect, for a host's own migration tool. */
|
|
15
|
+
schemaSql(): string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The kit's default storage: your own Kysely instance, on Postgres or SQLite. Artifacts,
|
|
19
|
+
* versions, comments, shared state, files and sharing live in `oa_*` tables beside yours;
|
|
20
|
+
* nothing else is opened. Live events stay in this process unless you pass a `bus` to the
|
|
21
|
+
* server (Postgres `LISTEN` comes with the `postgres()` adapter).
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* const db = new Kysely<YourTables>({ dialect: new PostgresDialect({ pool }) })
|
|
25
|
+
* const backend = kysely(db)
|
|
26
|
+
* await backend.migrate()
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const kysely: <DB>(db: Kysely<DB>) => KyselyBackend;
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/server/adapters/kysely/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAI1D,OAAO,EAAE,KAAK,SAAS,EAAiB,aAAa,EAAE,MAAM,YAAY,CAAA;AAEzE,YAAY,EAAE,SAAS,EAAE,CAAA;AAEzB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;IACvC,KAAK,EAAE,SAAS,CAAA;IAChB,GAAG,EAAE,GAAG,CAAA;IACR,8DAA8D;IAC9D,OAAO,EAAE,YAAY,CAAA;IACrB,2DAA2D;IAC3D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACxB,2EAA2E;IAC3E,SAAS,IAAI,MAAM,CAAA;CACpB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GAAI,EAAE,MAAM,MAAM,CAAC,EAAE,CAAC,KAAG,aAa3C,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { memoryBus } from "../memory-bus.js";
|
|
2
|
+
import { dialectOf, migrate, schemaSql } from "./schema.js";
|
|
3
|
+
import { kyselySharingOn } from "./sharing.js";
|
|
4
|
+
import { kyselyBlobsOn, kyselyStoreOn } from "./store.js";
|
|
5
|
+
/**
|
|
6
|
+
* The kit's default storage: your own Kysely instance, on Postgres or SQLite. Artifacts,
|
|
7
|
+
* versions, comments, shared state, files and sharing live in `oa_*` tables beside yours;
|
|
8
|
+
* nothing else is opened. Live events stay in this process unless you pass a `bus` to the
|
|
9
|
+
* server (Postgres `LISTEN` comes with the `postgres()` adapter).
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* const db = new Kysely<YourTables>({ dialect: new PostgresDialect({ pool }) })
|
|
13
|
+
* const backend = kysely(db)
|
|
14
|
+
* await backend.migrate()
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export const kysely = (db) => {
|
|
18
|
+
const dialect = dialectOf(db);
|
|
19
|
+
// The kit names only its own `oa_*` tables, which the host's table types do not describe;
|
|
20
|
+
// seen through the kit's own table types, the same instance runs the kit's queries.
|
|
21
|
+
const kit = db;
|
|
22
|
+
return {
|
|
23
|
+
store: kyselyStoreOn(kit, dialect),
|
|
24
|
+
blobs: kyselyBlobsOn(kit),
|
|
25
|
+
bus: memoryBus(),
|
|
26
|
+
sharing: kyselySharingOn(kit),
|
|
27
|
+
migrate: () => migrate(db),
|
|
28
|
+
schemaSql: () => schemaSql(db),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/server/adapters/kysely/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAkB,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAgBzE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAK,EAAc,EAAiB,EAAE;IAC1D,MAAM,OAAO,GAAG,SAAS,CAAC,EAAE,CAAC,CAAA;IAC7B,0FAA0F;IAC1F,oFAAoF;IACpF,MAAM,GAAG,GAAG,EAAkC,CAAA;IAC9C,OAAO;QACL,KAAK,EAAE,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;QAClC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC;QACzB,GAAG,EAAE,SAAS,EAAE;QAChB,OAAO,EAAE,eAAe,CAAC,GAAG,CAAC;QAC7B,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;QAC1B,SAAS,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;KAC/B,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Kysely } from "kysely";
|
|
2
|
+
/** The two SQL dialects the kit stores in. Anything else is refused, never guessed at. */
|
|
3
|
+
export type Dialect = "postgres" | "sqlite";
|
|
4
|
+
/** The dialect of a Kysely instance, from its adapter. */
|
|
5
|
+
export declare const dialectOf: <DB>(db: Kysely<DB>) => Dialect;
|
|
6
|
+
/** Create or upgrade the tables. Run during deployment, never from an artifact request. A
|
|
7
|
+
* failed migration is thrown with the step that failed. */
|
|
8
|
+
export declare const migrate: <DB>(db: Kysely<DB>) => Promise<void>;
|
|
9
|
+
/** The schema as SQL for this dialect, for a host that runs its own migration tool. */
|
|
10
|
+
export declare const schemaSql: <DB>(db: Kysely<DB>) => string;
|
|
11
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/server/adapters/kysely/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,MAAM,EAGZ,MAAM,QAAQ,CAAA;AAGf,0FAA0F;AAC1F,MAAM,MAAM,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;AAE3C,0DAA0D;AAC1D,eAAO,MAAM,SAAS,GAAI,EAAE,MAAM,MAAM,CAAC,EAAE,CAAC,KAAG,OAK9C,CAAA;AAoKD;4DAC4D;AAC5D,eAAO,MAAM,OAAO,GAAU,EAAE,MAAM,MAAM,CAAC,EAAE,CAAC,KAAG,OAAO,CAAC,IAAI,CAO9D,CAAA;AAED,uFAAuF;AACvF,eAAO,MAAM,SAAS,GAAI,EAAE,MAAM,MAAM,CAAC,EAAE,CAAC,KAAG,MAGxB,CAAA"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { PostgresAdapter, SqliteAdapter, } from "kysely";
|
|
2
|
+
import { Migrator } from "kysely/migration";
|
|
3
|
+
/** The dialect of a Kysely instance, from its adapter. */
|
|
4
|
+
export const dialectOf = (db) => {
|
|
5
|
+
const { adapter } = db.getExecutor();
|
|
6
|
+
if (adapter instanceof PostgresAdapter)
|
|
7
|
+
return "postgres";
|
|
8
|
+
if (adapter instanceof SqliteAdapter)
|
|
9
|
+
return "sqlite";
|
|
10
|
+
throw new Error("The artifact store runs on Postgres or SQLite; this Kysely dialect is neither.");
|
|
11
|
+
};
|
|
12
|
+
/** Column types that differ by dialect. Text everywhere else, so ids and times compare the
|
|
13
|
+
* same in both. */
|
|
14
|
+
const types = (dialect) => dialect === "postgres" ? { json: "jsonb", bytes: "bytea" } : { json: "text", bytes: "blob" };
|
|
15
|
+
const schemaStatements = (db, dialect) => {
|
|
16
|
+
const { json, bytes } = types(dialect);
|
|
17
|
+
const s = db.schema;
|
|
18
|
+
const cascade = (table) => `${table}.id`;
|
|
19
|
+
return [
|
|
20
|
+
s
|
|
21
|
+
.createTable("oa_artifacts")
|
|
22
|
+
.ifNotExists()
|
|
23
|
+
.addColumn("id", "text", (c) => c.primaryKey())
|
|
24
|
+
.addColumn("title", "text", (c) => c.notNull())
|
|
25
|
+
.addColumn("current_version", "integer", (c) => c.notNull())
|
|
26
|
+
.addColumn("created_at", "text", (c) => c.notNull())
|
|
27
|
+
.addColumn("updated_at", "text", (c) => c.notNull())
|
|
28
|
+
.addColumn("created_by", json, (c) => c.notNull())
|
|
29
|
+
.addColumn("space", "text", (c) => c.notNull().defaultTo(""))
|
|
30
|
+
.addColumn("summary", "text", (c) => c.notNull().defaultTo(""))
|
|
31
|
+
.addColumn("updated_by", json)
|
|
32
|
+
.addColumn("kind", "text", (c) => c.notNull().defaultTo("page")),
|
|
33
|
+
s
|
|
34
|
+
.createIndex("oa_artifacts_by_space")
|
|
35
|
+
.ifNotExists()
|
|
36
|
+
.on("oa_artifacts")
|
|
37
|
+
.columns(["space", "updated_at desc", "id desc"]),
|
|
38
|
+
s
|
|
39
|
+
.createTable("oa_versions")
|
|
40
|
+
.ifNotExists()
|
|
41
|
+
.addColumn("artifact_id", "text", (c) => c.notNull().references(cascade("oa_artifacts")).onDelete("cascade"))
|
|
42
|
+
.addColumn("n", "integer", (c) => c.notNull())
|
|
43
|
+
.addColumn("content_hash", "text", (c) => c.notNull())
|
|
44
|
+
.addColumn("size", "integer", (c) => c.notNull())
|
|
45
|
+
.addColumn("csp", json, (c) => c.notNull())
|
|
46
|
+
.addColumn("created_at", "text", (c) => c.notNull())
|
|
47
|
+
.addColumn("created_by", json, (c) => c.notNull())
|
|
48
|
+
.addColumn("source_info", json)
|
|
49
|
+
.addPrimaryKeyConstraint("oa_versions_pkey", ["artifact_id", "n"]),
|
|
50
|
+
s
|
|
51
|
+
.createTable("oa_threads")
|
|
52
|
+
.ifNotExists()
|
|
53
|
+
.addColumn("id", "text", (c) => c.primaryKey())
|
|
54
|
+
.addColumn("artifact_id", "text", (c) => c.notNull().references(cascade("oa_artifacts")).onDelete("cascade"))
|
|
55
|
+
.addColumn("state", "text", (c) => c.notNull()),
|
|
56
|
+
s.createIndex("oa_threads_by_artifact").ifNotExists().on("oa_threads").column("artifact_id"),
|
|
57
|
+
s
|
|
58
|
+
.createTable("oa_comments")
|
|
59
|
+
.ifNotExists()
|
|
60
|
+
.addColumn("id", "text", (c) => c.primaryKey())
|
|
61
|
+
.addColumn("artifact_id", "text", (c) => c.notNull().references(cascade("oa_artifacts")).onDelete("cascade"))
|
|
62
|
+
.addColumn("thread_id", "text", (c) => c.notNull().references(cascade("oa_threads")).onDelete("cascade"))
|
|
63
|
+
.addColumn("version", "integer", (c) => c.notNull())
|
|
64
|
+
.addColumn("quote", json)
|
|
65
|
+
.addColumn("body", "text", (c) => c.notNull())
|
|
66
|
+
.addColumn("author", json, (c) => c.notNull())
|
|
67
|
+
.addColumn("created_at", "text", (c) => c.notNull()),
|
|
68
|
+
s
|
|
69
|
+
.createIndex("oa_comments_by_artifact")
|
|
70
|
+
.ifNotExists()
|
|
71
|
+
.on("oa_comments")
|
|
72
|
+
.columns(["artifact_id", "created_at"]),
|
|
73
|
+
s
|
|
74
|
+
.createTable("oa_states")
|
|
75
|
+
.ifNotExists()
|
|
76
|
+
.addColumn("artifact_id", "text", (c) => c.notNull().references(cascade("oa_artifacts")).onDelete("cascade"))
|
|
77
|
+
.addColumn("key", "text", (c) => c.notNull())
|
|
78
|
+
.addColumn("items", json, (c) => c.notNull())
|
|
79
|
+
.addColumn("version", "integer", (c) => c.notNull())
|
|
80
|
+
.addPrimaryKeyConstraint("oa_states_pkey", ["artifact_id", "key"]),
|
|
81
|
+
s
|
|
82
|
+
.createTable("oa_activity")
|
|
83
|
+
.ifNotExists()
|
|
84
|
+
.addColumn("id", "integer", (c) => dialect === "postgres"
|
|
85
|
+
? c.primaryKey().generatedAlwaysAsIdentity()
|
|
86
|
+
: c.primaryKey().autoIncrement())
|
|
87
|
+
.addColumn("artifact_id", "text", (c) => c.notNull().references(cascade("oa_artifacts")).onDelete("cascade"))
|
|
88
|
+
.addColumn("key", "text", (c) => c.notNull())
|
|
89
|
+
.addColumn("action", "text", (c) => c.notNull())
|
|
90
|
+
.addColumn("item_id", "text", (c) => c.notNull())
|
|
91
|
+
.addColumn("version", "integer", (c) => c.notNull())
|
|
92
|
+
.addColumn("actor", json, (c) => c.notNull())
|
|
93
|
+
.addColumn("at", "text", (c) => c.notNull()),
|
|
94
|
+
s
|
|
95
|
+
.createIndex("oa_activity_by_key")
|
|
96
|
+
.ifNotExists()
|
|
97
|
+
.on("oa_activity")
|
|
98
|
+
.columns(["artifact_id", "key", "id desc"]),
|
|
99
|
+
s
|
|
100
|
+
.createTable("oa_blobs")
|
|
101
|
+
.ifNotExists()
|
|
102
|
+
.addColumn("key", "text", (c) => c.primaryKey())
|
|
103
|
+
.addColumn("type", "text", (c) => c.notNull())
|
|
104
|
+
.addColumn("bytes", bytes, (c) => c.notNull()),
|
|
105
|
+
s
|
|
106
|
+
.createTable("oa_share_settings")
|
|
107
|
+
.ifNotExists()
|
|
108
|
+
.addColumn("artifact_id", "text", (c) => c.primaryKey().references(cascade("oa_artifacts")).onDelete("cascade"))
|
|
109
|
+
.addColumn("space_access", "text", (c) => c.notNull())
|
|
110
|
+
.addColumn("link_role", "text", (c) => c.notNull())
|
|
111
|
+
.addColumn("link_token", "text", (c) => c.unique()),
|
|
112
|
+
s
|
|
113
|
+
.createTable("oa_share_grants")
|
|
114
|
+
.ifNotExists()
|
|
115
|
+
.addColumn("artifact_id", "text", (c) => c.notNull().references(cascade("oa_artifacts")).onDelete("cascade"))
|
|
116
|
+
.addColumn("actor_id", "text", (c) => c.notNull())
|
|
117
|
+
.addColumn("actor", json, (c) => c.notNull())
|
|
118
|
+
.addColumn("role", "text", (c) => c.notNull())
|
|
119
|
+
.addPrimaryKeyConstraint("oa_share_grants_pkey", ["artifact_id", "actor_id"]),
|
|
120
|
+
s
|
|
121
|
+
.createIndex("oa_share_grants_by_actor")
|
|
122
|
+
.ifNotExists()
|
|
123
|
+
.on("oa_share_grants")
|
|
124
|
+
.column("actor_id"),
|
|
125
|
+
];
|
|
126
|
+
};
|
|
127
|
+
/** The ledger's own tables, beside the kit's. */
|
|
128
|
+
const LEDGER = {
|
|
129
|
+
migrationTableName: "oa_kysely_migrations",
|
|
130
|
+
migrationLockTableName: "oa_kysely_migrations_lock",
|
|
131
|
+
};
|
|
132
|
+
/** Forward-only migrations. Append; never edit. */
|
|
133
|
+
const migrations = (dialect) => ({
|
|
134
|
+
"0001_schema": {
|
|
135
|
+
up: async (db) => {
|
|
136
|
+
// oxlint-disable-next-line no-await-in-loop -- each statement needs the one before
|
|
137
|
+
for (const statement of schemaStatements(db, dialect))
|
|
138
|
+
await statement.execute();
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
const provider = (dialect) => ({
|
|
143
|
+
getMigrations: async () => migrations(dialect),
|
|
144
|
+
});
|
|
145
|
+
/** Create or upgrade the tables. Run during deployment, never from an artifact request. A
|
|
146
|
+
* failed migration is thrown with the step that failed. */
|
|
147
|
+
export const migrate = async (db) => {
|
|
148
|
+
const migrator = new Migrator({ db, provider: provider(dialectOf(db)), ...LEDGER });
|
|
149
|
+
const { error, results } = await migrator.migrateToLatest();
|
|
150
|
+
if (error) {
|
|
151
|
+
const failed = results?.find((result) => result.status === "Error")?.migrationName;
|
|
152
|
+
throw new Error(`Artifact migration ${failed ?? ""} failed.`, { cause: error });
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
/** The schema as SQL for this dialect, for a host that runs its own migration tool. */
|
|
156
|
+
export const schemaSql = (db) => `${schemaStatements(db, dialectOf(db))
|
|
157
|
+
.map((statement) => statement.compile().sql)
|
|
158
|
+
.join(";\n\n")};\n`;
|
|
159
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/server/adapters/kysely/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,eAAe,EACf,aAAa,GACd,MAAM,QAAQ,CAAA;AACf,OAAO,EAA0C,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAKnF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAK,EAAc,EAAW,EAAE;IACvD,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAA;IACpC,IAAI,OAAO,YAAY,eAAe;QAAE,OAAO,UAAU,CAAA;IACzD,IAAI,OAAO,YAAY,aAAa;QAAE,OAAO,QAAQ,CAAA;IACrD,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAA;AACnG,CAAC,CAAA;AAED;oBACoB;AACpB,MAAM,KAAK,GAAG,CAAC,OA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,IAAI,QAAQ,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;IACnF,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,CAAC,eAAe,EAAE,CAAA;IAC3D,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,MAAM,GAAG,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,CAAC,EAAE,aAAa,CAAA;QAClF,MAAM,IAAI,KAAK,CAAC,sBAAsB,MAAM,IAAI,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAA;IACjF,CAAC;AACH,CAAC,CAAA;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAK,EAAc,EAAU,EAAE,CACtD,GAAG,gBAAgB,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;KACnC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC;KAC3C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SharingStore } from "../../sharing/store.js";
|
|
2
|
+
import type { KitDb } from "./store.js";
|
|
3
|
+
/** Sharing in the same database, in the two tables the kit's migration creates. */
|
|
4
|
+
export declare const kyselySharingOn: (db: KitDb) => SharingStore;
|
|
5
|
+
//# sourceMappingURL=sharing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharing.d.ts","sourceRoot":"","sources":["../../../../src/server/adapters/kysely/sharing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC,mFAAmF;AACnF,eAAO,MAAM,eAAe,OAAQ,KAAK,KAAG,YAgF1C,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { toShareGrant, toShareSettings } from "../sql-rows.js";
|
|
2
|
+
/** Sharing in the same database, in the two tables the kit's migration creates. */
|
|
3
|
+
export const kyselySharingOn = (db) => ({
|
|
4
|
+
settings: async (ids) => {
|
|
5
|
+
if (ids.length === 0)
|
|
6
|
+
return new Map();
|
|
7
|
+
const rows = await db
|
|
8
|
+
.selectFrom("oa_share_settings")
|
|
9
|
+
.selectAll()
|
|
10
|
+
.where("artifact_id", "in", [...ids])
|
|
11
|
+
.execute();
|
|
12
|
+
return new Map(rows.map(toShareSettings));
|
|
13
|
+
},
|
|
14
|
+
putSettings: async (artifactId, next) => {
|
|
15
|
+
const values = {
|
|
16
|
+
space_access: next.spaceAccess,
|
|
17
|
+
link_role: next.linkRole,
|
|
18
|
+
link_token: next.linkToken,
|
|
19
|
+
};
|
|
20
|
+
await db
|
|
21
|
+
.insertInto("oa_share_settings")
|
|
22
|
+
.values({ artifact_id: artifactId, ...values })
|
|
23
|
+
.onConflict((oc) => oc.column("artifact_id").doUpdateSet(values))
|
|
24
|
+
.execute();
|
|
25
|
+
},
|
|
26
|
+
artifactForLink: async (token) => {
|
|
27
|
+
const row = await db
|
|
28
|
+
.selectFrom("oa_share_settings")
|
|
29
|
+
.select("artifact_id")
|
|
30
|
+
.where("link_token", "=", token)
|
|
31
|
+
.where("link_role", "<>", "none")
|
|
32
|
+
.executeTakeFirst();
|
|
33
|
+
return row?.artifact_id ?? null;
|
|
34
|
+
},
|
|
35
|
+
grants: async (artifactId) => (await db
|
|
36
|
+
.selectFrom("oa_share_grants")
|
|
37
|
+
.selectAll()
|
|
38
|
+
.where("artifact_id", "=", artifactId)
|
|
39
|
+
.orderBy("actor_id")
|
|
40
|
+
.execute()).map((raw) => {
|
|
41
|
+
const { actor, role } = toShareGrant(raw);
|
|
42
|
+
return { actor, role };
|
|
43
|
+
}),
|
|
44
|
+
grantsFor: async (actorId, ids) => {
|
|
45
|
+
if (ids.length === 0)
|
|
46
|
+
return new Map();
|
|
47
|
+
const rows = await db
|
|
48
|
+
.selectFrom("oa_share_grants")
|
|
49
|
+
.selectAll()
|
|
50
|
+
.where("actor_id", "=", actorId)
|
|
51
|
+
.where("artifact_id", "in", [...ids])
|
|
52
|
+
.execute();
|
|
53
|
+
return new Map(rows.map((raw) => {
|
|
54
|
+
const { artifactId, role } = toShareGrant(raw);
|
|
55
|
+
return [artifactId, role];
|
|
56
|
+
}));
|
|
57
|
+
},
|
|
58
|
+
putGrant: async (artifactId, actor, role) => {
|
|
59
|
+
const values = { actor: JSON.stringify(actor), role };
|
|
60
|
+
await db
|
|
61
|
+
.insertInto("oa_share_grants")
|
|
62
|
+
.values({ artifact_id: artifactId, actor_id: actor.id, ...values })
|
|
63
|
+
.onConflict((oc) => oc.columns(["artifact_id", "actor_id"]).doUpdateSet(values))
|
|
64
|
+
.execute();
|
|
65
|
+
},
|
|
66
|
+
deleteGrant: async (artifactId, actorId) => {
|
|
67
|
+
const result = await db
|
|
68
|
+
.deleteFrom("oa_share_grants")
|
|
69
|
+
.where("artifact_id", "=", artifactId)
|
|
70
|
+
.where("actor_id", "=", actorId)
|
|
71
|
+
.executeTakeFirst();
|
|
72
|
+
return Number(result.numDeletedRows) > 0;
|
|
73
|
+
},
|
|
74
|
+
forget: async (artifactId) => {
|
|
75
|
+
await db.transaction().execute(async (trx) => {
|
|
76
|
+
await trx.deleteFrom("oa_share_grants").where("artifact_id", "=", artifactId).execute();
|
|
77
|
+
await trx.deleteFrom("oa_share_settings").where("artifact_id", "=", artifactId).execute();
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
//# sourceMappingURL=sharing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharing.js","sourceRoot":"","sources":["../../../../src/server/adapters/kysely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;QAC3F,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ColumnType, type Generated, type Kysely } from "kysely";
|
|
2
|
+
import type { ArtifactStore, BlobStore } from "../../ports.js";
|
|
3
|
+
import type { Dialect } from "./schema.js";
|
|
4
|
+
/** A JSON column: written as text, read back as text (SQLite) or parsed (Postgres jsonb).
|
|
5
|
+
* Either way the row mappers parse it, so reads are typed `unknown` here. */
|
|
6
|
+
type Json = ColumnType<unknown, string, string>;
|
|
7
|
+
type NullableJson = ColumnType<unknown, string | null, string | null>;
|
|
8
|
+
/** The kit's tables, as Kysely sees them. */
|
|
9
|
+
export interface KitTables {
|
|
10
|
+
oa_artifacts: {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
current_version: number;
|
|
14
|
+
created_at: string;
|
|
15
|
+
updated_at: string;
|
|
16
|
+
created_by: Json;
|
|
17
|
+
space: string;
|
|
18
|
+
summary: string;
|
|
19
|
+
updated_by: NullableJson;
|
|
20
|
+
kind: string;
|
|
21
|
+
};
|
|
22
|
+
oa_versions: {
|
|
23
|
+
artifact_id: string;
|
|
24
|
+
n: number;
|
|
25
|
+
content_hash: string;
|
|
26
|
+
size: number;
|
|
27
|
+
csp: Json;
|
|
28
|
+
created_at: string;
|
|
29
|
+
created_by: Json;
|
|
30
|
+
source_info: NullableJson;
|
|
31
|
+
};
|
|
32
|
+
oa_threads: {
|
|
33
|
+
id: string;
|
|
34
|
+
artifact_id: string;
|
|
35
|
+
state: string;
|
|
36
|
+
};
|
|
37
|
+
oa_comments: {
|
|
38
|
+
id: string;
|
|
39
|
+
artifact_id: string;
|
|
40
|
+
thread_id: string;
|
|
41
|
+
version: number;
|
|
42
|
+
quote: NullableJson;
|
|
43
|
+
body: string;
|
|
44
|
+
author: Json;
|
|
45
|
+
created_at: string;
|
|
46
|
+
};
|
|
47
|
+
oa_states: {
|
|
48
|
+
artifact_id: string;
|
|
49
|
+
key: string;
|
|
50
|
+
items: Json;
|
|
51
|
+
version: number;
|
|
52
|
+
};
|
|
53
|
+
oa_activity: {
|
|
54
|
+
id: Generated<number>;
|
|
55
|
+
artifact_id: string;
|
|
56
|
+
key: string;
|
|
57
|
+
action: string;
|
|
58
|
+
item_id: string;
|
|
59
|
+
version: number;
|
|
60
|
+
actor: Json;
|
|
61
|
+
at: string;
|
|
62
|
+
};
|
|
63
|
+
oa_blobs: {
|
|
64
|
+
key: string;
|
|
65
|
+
type: string;
|
|
66
|
+
bytes: Uint8Array;
|
|
67
|
+
};
|
|
68
|
+
oa_share_settings: {
|
|
69
|
+
artifact_id: string;
|
|
70
|
+
space_access: string;
|
|
71
|
+
link_role: string;
|
|
72
|
+
link_token: string | null;
|
|
73
|
+
};
|
|
74
|
+
oa_share_grants: {
|
|
75
|
+
artifact_id: string;
|
|
76
|
+
actor_id: string;
|
|
77
|
+
actor: Json;
|
|
78
|
+
role: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export type KitDb = Kysely<KitTables>;
|
|
82
|
+
export declare const kyselyStoreOn: (db: KitDb, dialect: Dialect) => ArtifactStore;
|
|
83
|
+
/** Files in the same database: no bucket to provision. Content-addressed, so a second put
|
|
84
|
+
* of the same key is a no-op. */
|
|
85
|
+
export declare const kyselyBlobsOn: (db: KitDb) => BlobStore;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/server/adapters/kysely/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAO,MAAM,QAAQ,CAAA;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAA0B,MAAM,gBAAgB,CAAA;AAGtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE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