@sixb/app 0.1.12 → 0.1.13
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/README.md +3 -8
- package/dist/agent/activity-label.d.ts.map +1 -1
- package/dist/agent/agent-chat.d.ts +9 -8
- package/dist/agent/agent-chat.d.ts.map +1 -1
- package/dist/agent/agent-panel.d.ts +5 -8
- package/dist/agent/agent-panel.d.ts.map +1 -1
- package/dist/agent/agents-page.d.ts +4 -0
- package/dist/agent/agents-page.d.ts.map +1 -0
- package/dist/agent/artifact-card.d.ts +9 -0
- package/dist/agent/artifact-card.d.ts.map +1 -0
- package/dist/agent/artifact-panel-state.d.ts +16 -0
- package/dist/agent/artifact-panel-state.d.ts.map +1 -0
- package/dist/agent/artifact-panel.d.ts +38 -0
- package/dist/agent/artifact-panel.d.ts.map +1 -0
- package/dist/agent/components/file-attachment-card.d.ts +3 -3
- package/dist/agent/components/file-attachment-card.d.ts.map +1 -1
- package/dist/agent/components/message-parts.d.ts +2 -1
- package/dist/agent/components/message-parts.d.ts.map +1 -1
- package/dist/agent/components/message-view.d.ts +3 -3
- package/dist/agent/components/message-view.d.ts.map +1 -1
- package/dist/agent/components/thread-artifacts-menu.d.ts +8 -0
- package/dist/agent/components/thread-artifacts-menu.d.ts.map +1 -0
- package/dist/agent/hooks/use-agent-conversation.d.ts +3 -4
- package/dist/agent/hooks/use-agent-conversation.d.ts.map +1 -1
- package/dist/agent/i18n/en.d.ts +10 -49
- package/dist/agent/i18n/en.d.ts.map +1 -1
- package/dist/agent/i18n/fr.d.ts.map +1 -1
- package/dist/agent/i18n/index.d.ts +16 -98
- package/dist/agent/i18n/index.d.ts.map +1 -1
- package/dist/agent/parts.d.ts +4 -4
- package/dist/agent/parts.d.ts.map +1 -1
- package/dist/agent/publish-artifact/interpret.d.ts +32 -0
- package/dist/agent/publish-artifact/interpret.d.ts.map +1 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts +9 -0
- package/dist/agent/publish-artifact/publish-artifact-tool-view.d.ts.map +1 -0
- package/dist/agent/publish-artifact/use-live-publishes.d.ts +10 -0
- package/dist/agent/publish-artifact/use-live-publishes.d.ts.map +1 -0
- package/dist/agent/react-router.d.ts +1 -2
- package/dist/agent/react-router.d.ts.map +1 -1
- package/dist/agent/view-file/view-file-tool-view.d.ts +1 -1
- package/dist/agent/view-file/view-file-tool-view.d.ts.map +1 -1
- package/dist/artifacts/artifact-page.d.ts +7 -0
- package/dist/artifacts/artifact-page.d.ts.map +1 -0
- package/dist/artifacts/card-details.d.ts +15 -0
- package/dist/artifacts/card-details.d.ts.map +1 -0
- package/dist/artifacts/card-preview.d.ts +59 -0
- package/dist/artifacts/card-preview.d.ts.map +1 -0
- package/dist/artifacts/copy-feedback.d.ts +6 -0
- package/dist/artifacts/copy-feedback.d.ts.map +1 -0
- package/dist/artifacts/file-size.d.ts +11 -0
- package/dist/artifacts/file-size.d.ts.map +1 -0
- package/dist/artifacts/file-source.d.ts +45 -0
- package/dist/artifacts/file-source.d.ts.map +1 -0
- package/dist/artifacts/file-view.d.ts +9 -0
- package/dist/artifacts/file-view.d.ts.map +1 -0
- package/dist/artifacts/frame.d.ts +45 -0
- package/dist/artifacts/frame.d.ts.map +1 -0
- package/dist/artifacts/gallery.d.ts +6 -0
- package/dist/artifacts/gallery.d.ts.map +1 -0
- package/dist/artifacts/kind-icon.d.ts +8 -0
- package/dist/artifacts/kind-icon.d.ts.map +1 -0
- package/dist/artifacts/markdown-tree.d.ts +22 -0
- package/dist/artifacts/markdown-tree.d.ts.map +1 -0
- package/dist/artifacts/messages.d.ts +301 -0
- package/dist/artifacts/messages.d.ts.map +1 -0
- package/dist/artifacts/queries.d.ts +21 -0
- package/dist/artifacts/queries.d.ts.map +1 -0
- package/dist/artifacts/references/embed-tree.d.ts +17 -0
- package/dist/artifacts/references/embed-tree.d.ts.map +1 -0
- package/dist/artifacts/references/references.d.ts +50 -0
- package/dist/artifacts/references/references.d.ts.map +1 -0
- package/dist/artifacts/renderers/document-tree.d.ts +11 -0
- package/dist/artifacts/renderers/document-tree.d.ts.map +1 -0
- package/dist/artifacts/renderers/document.d.ts +17 -0
- package/dist/artifacts/renderers/document.d.ts.map +1 -0
- package/dist/artifacts/renderers/file.d.ts +10 -0
- package/dist/artifacts/renderers/file.d.ts.map +1 -0
- package/dist/artifacts/renderers/notice.d.ts +12 -0
- package/dist/artifacts/renderers/notice.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart-data.d.ts +33 -0
- package/dist/artifacts/renderers/sheet/chart-data.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/chart.d.ts +15 -0
- package/dist/artifacts/renderers/sheet/chart.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/format.d.ts +35 -0
- package/dist/artifacts/renderers/sheet/format.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/grid.d.ts +25 -0
- package/dist/artifacts/renderers/sheet/grid.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/mini-chart.d.ts +7 -0
- package/dist/artifacts/renderers/sheet/mini-chart.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/model.d.ts +29 -0
- package/dist/artifacts/renderers/sheet/model.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/selection.d.ts +42 -0
- package/dist/artifacts/renderers/sheet/selection.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/sheet.d.ts +17 -0
- package/dist/artifacts/renderers/sheet/sheet.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/virtual.d.ts +13 -0
- package/dist/artifacts/renderers/sheet/virtual.d.ts.map +1 -0
- package/dist/artifacts/renderers/sheet/workbook.d.ts +24 -0
- package/dist/artifacts/renderers/sheet/workbook.d.ts.map +1 -0
- package/dist/artifacts/renderers/slides/navigation.d.ts +17 -0
- package/dist/artifacts/renderers/slides/navigation.d.ts.map +1 -0
- package/dist/artifacts/renderers/slides/slides.d.ts +14 -0
- package/dist/artifacts/renderers/slides/slides.d.ts.map +1 -0
- package/dist/artifacts/target.d.ts +29 -0
- package/dist/artifacts/target.d.ts.map +1 -0
- package/dist/artifacts/theme.d.ts +18 -0
- package/dist/artifacts/theme.d.ts.map +1 -0
- package/dist/artifacts/viewer.d.ts +19 -0
- package/dist/artifacts/viewer.d.ts.map +1 -0
- package/dist/{chunk-shmw3f8t.js → chunk-3schcf10.js} +1 -1
- package/dist/chunk-c7gy61rx.js +276 -0
- package/dist/chunk-c7gy61rx.js.map +10 -0
- package/dist/{chunk-48pkffj6.js → chunk-g3f4cm8x.js} +1 -1
- package/dist/{chunk-zcxrt24m.js → chunk-gn3k23q5.js} +3 -2
- package/dist/{chunk-zcxrt24m.js.map → chunk-gn3k23q5.js.map} +3 -3
- package/dist/{chunk-3a99tmwg.js → chunk-ng0hdnrq.js} +10 -3
- package/dist/chunk-ng0hdnrq.js.map +10 -0
- package/dist/{chunk-j97e06rg.js → chunk-xxpdn63v.js} +7224 -2874
- package/dist/chunk-xxpdn63v.js.map +105 -0
- package/dist/codegen.d.ts +2 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -31
- package/dist/index.js.map +7 -7
- package/dist/locale-messages.d.ts +2 -0
- package/dist/locale-messages.d.ts.map +1 -1
- package/dist/locale.d.ts +2 -0
- package/dist/locale.d.ts.map +1 -1
- package/dist/locale.js +1 -1
- package/dist/pages/observability/activity/calendar.d.ts +9 -0
- package/dist/pages/observability/activity/calendar.d.ts.map +1 -0
- package/dist/pages/observability/activity/connections.d.ts +7 -0
- package/dist/pages/observability/activity/connections.d.ts.map +1 -0
- package/dist/pages/observability/activity/format.d.ts +11 -0
- package/dist/pages/observability/activity/format.d.ts.map +1 -0
- package/dist/pages/observability/activity/messages.d.ts +231 -0
- package/dist/pages/observability/activity/messages.d.ts.map +1 -0
- package/dist/pages/observability/activity/meta-items.d.ts +10 -0
- package/dist/pages/observability/activity/meta-items.d.ts.map +1 -0
- package/dist/pages/observability/activity/page.d.ts +6 -0
- package/dist/pages/observability/activity/page.d.ts.map +1 -0
- package/dist/pages/observability/activity/period.d.ts +31 -0
- package/dist/pages/observability/activity/period.d.ts.map +1 -0
- package/dist/pages/observability/activity/steps.d.ts +44 -0
- package/dist/pages/observability/activity/steps.d.ts.map +1 -0
- package/dist/pages/observability/activity/timeline.d.ts +36 -0
- package/dist/pages/observability/activity/timeline.d.ts.map +1 -0
- package/dist/pages/observability/activity/users.d.ts +18 -0
- package/dist/pages/observability/activity/users.d.ts.map +1 -0
- package/dist/pages/routes.d.ts +7 -0
- package/dist/pages/routes.d.ts.map +1 -1
- package/dist/pages/section-ui.d.ts +2 -1
- package/dist/pages/section-ui.d.ts.map +1 -1
- package/dist/pages.d.ts +4 -1
- package/dist/pages.d.ts.map +1 -1
- package/dist/pages.js +5852 -3754
- package/dist/pages.js.map +20 -7
- package/dist/sections/catalog.d.ts.map +1 -1
- package/dist/sections/sections.d.ts.map +1 -1
- package/dist/server.js +63 -10
- package/dist/server.js.map +5 -5
- package/dist/shell/search-command.d.ts.map +1 -1
- package/dist/shell/user-menu.d.ts +3 -3
- package/dist/shell/user-menu.d.ts.map +1 -1
- package/package.json +4 -6
- package/src/agent/activity-label.ts +7 -0
- package/src/agent/agent-chat.tsx +29 -18
- package/src/agent/agent-execution-trace.tsx +1 -1
- package/src/agent/agent-panel.tsx +8 -13
- package/src/agent/agent-surface.tsx +4 -4
- package/src/agent/agents-page.ts +7 -0
- package/src/agent/artifact-card.tsx +190 -0
- package/src/agent/artifact-panel-state.ts +38 -0
- package/src/agent/artifact-panel.tsx +320 -0
- package/src/agent/components/file-attachment-card.tsx +13 -14
- package/src/agent/components/message-parts.tsx +30 -5
- package/src/agent/components/message-view.tsx +13 -19
- package/src/agent/components/thread-artifacts-menu.tsx +77 -0
- package/src/agent/i18n/en.ts +16 -58
- package/src/agent/i18n/fr.ts +15 -59
- package/src/agent/parts.ts +6 -6
- package/src/agent/publish-artifact/interpret.ts +110 -0
- package/src/agent/publish-artifact/publish-artifact-tool-view.tsx +62 -0
- package/src/agent/publish-artifact/use-live-publishes.ts +45 -0
- package/src/agent/react-router.tsx +26 -7
- package/src/agent/view-file/view-file-tool-view.tsx +21 -18
- package/src/artifacts/artifact-page.tsx +61 -0
- package/src/artifacts/artifacts.css +172 -0
- package/src/artifacts/card-details.ts +92 -0
- package/src/artifacts/card-preview.tsx +612 -0
- package/src/artifacts/copy-feedback.ts +25 -0
- package/src/artifacts/file-size.ts +24 -0
- package/src/artifacts/file-source.ts +109 -0
- package/src/artifacts/file-view.ts +57 -0
- package/src/artifacts/frame.tsx +288 -0
- package/src/artifacts/gallery.tsx +405 -0
- package/src/artifacts/kind-icon.tsx +23 -0
- package/src/artifacts/markdown-tree.ts +32 -0
- package/src/artifacts/messages.ts +317 -0
- package/src/artifacts/queries.ts +85 -0
- package/src/artifacts/references/embed-tree.ts +86 -0
- package/src/artifacts/references/references.tsx +739 -0
- package/src/artifacts/renderers/document-tree.ts +157 -0
- package/src/artifacts/renderers/document.tsx +334 -0
- package/src/artifacts/renderers/file.tsx +160 -0
- package/src/artifacts/renderers/notice.tsx +38 -0
- package/src/artifacts/renderers/sheet/chart-data.ts +73 -0
- package/src/artifacts/renderers/sheet/chart.tsx +288 -0
- package/src/artifacts/renderers/sheet/format.ts +142 -0
- package/src/artifacts/renderers/sheet/grid.tsx +709 -0
- package/src/artifacts/renderers/sheet/mini-chart.tsx +241 -0
- package/src/artifacts/renderers/sheet/model.ts +136 -0
- package/src/artifacts/renderers/sheet/selection.ts +152 -0
- package/src/artifacts/renderers/sheet/sheet.tsx +471 -0
- package/src/artifacts/renderers/sheet/virtual.ts +49 -0
- package/src/artifacts/renderers/sheet/workbook.ts +57 -0
- package/src/artifacts/renderers/slides/navigation.ts +38 -0
- package/src/artifacts/renderers/slides/slides.tsx +441 -0
- package/src/artifacts/target.ts +76 -0
- package/src/artifacts/theme.ts +29 -0
- package/src/artifacts/viewer.tsx +476 -0
- package/src/build.ts +13 -2
- package/src/codegen.ts +38 -2
- package/src/createCustomApp.ts +21 -1
- package/src/index.ts +0 -5
- package/src/locale-messages.ts +9 -2
- package/src/pages/observability/activity/calendar.tsx +239 -0
- package/src/pages/observability/activity/connections.tsx +144 -0
- package/src/pages/observability/activity/format.ts +49 -0
- package/src/pages/observability/activity/messages.ts +255 -0
- package/src/pages/observability/activity/meta-items.tsx +23 -0
- package/src/pages/observability/activity/page.tsx +605 -0
- package/src/pages/observability/activity/period.ts +63 -0
- package/src/pages/observability/activity/steps.ts +102 -0
- package/src/pages/observability/activity/timeline.tsx +411 -0
- package/src/pages/observability/activity/users.tsx +133 -0
- package/src/pages/observability/messages.ts +2 -2
- package/src/pages/routes.ts +15 -0
- package/src/pages/section-ui.tsx +3 -1
- package/src/pages.ts +4 -1
- package/src/sections/catalog.ts +1 -0
- package/src/sections/sections.tsx +2 -0
- package/src/shell/search-command.tsx +8 -6
- package/src/shell/user-menu.tsx +22 -22
- package/dist/agent/document-preview/classify.d.ts +0 -4
- package/dist/agent/document-preview/classify.d.ts.map +0 -1
- package/dist/agent/document-preview/content-policy.d.ts +0 -10
- package/dist/agent/document-preview/content-policy.d.ts.map +0 -1
- package/dist/agent/document-preview/content.d.ts +0 -26
- package/dist/agent/document-preview/content.d.ts.map +0 -1
- package/dist/agent/document-preview/delimited.d.ts +0 -19
- package/dist/agent/document-preview/delimited.d.ts.map +0 -1
- package/dist/agent/document-preview/document-preview-root.d.ts +0 -24
- package/dist/agent/document-preview/document-preview-root.d.ts.map +0 -1
- package/dist/agent/document-preview/file-size.d.ts +0 -3
- package/dist/agent/document-preview/file-size.d.ts.map +0 -1
- package/dist/agent/document-preview/html.d.ts +0 -9
- package/dist/agent/document-preview/html.d.ts.map +0 -1
- package/dist/agent/document-preview/persistence.d.ts +0 -6
- package/dist/agent/document-preview/persistence.d.ts.map +0 -1
- package/dist/agent/document-preview/presentation.d.ts +0 -3
- package/dist/agent/document-preview/presentation.d.ts.map +0 -1
- package/dist/agent/document-preview/rendering.d.ts +0 -14
- package/dist/agent/document-preview/rendering.d.ts.map +0 -1
- package/dist/agent/document-preview/source.d.ts +0 -13
- package/dist/agent/document-preview/source.d.ts.map +0 -1
- package/dist/agent/document-preview/state.d.ts +0 -27
- package/dist/agent/document-preview/state.d.ts.map +0 -1
- package/dist/agent/document-preview/types.d.ts +0 -33
- package/dist/agent/document-preview/types.d.ts.map +0 -1
- package/dist/agent/workspace.d.ts +0 -11
- package/dist/agent/workspace.d.ts.map +0 -1
- package/dist/chunk-3a99tmwg.js.map +0 -10
- package/dist/chunk-j97e06rg.js.map +0 -80
- package/src/agent/document-preview/classify.ts +0 -55
- package/src/agent/document-preview/content-policy.ts +0 -37
- package/src/agent/document-preview/content.ts +0 -82
- package/src/agent/document-preview/delimited.ts +0 -118
- package/src/agent/document-preview/document-preview-root.tsx +0 -1017
- package/src/agent/document-preview/file-size.ts +0 -26
- package/src/agent/document-preview/html.ts +0 -67
- package/src/agent/document-preview/persistence.ts +0 -115
- package/src/agent/document-preview/presentation.ts +0 -13
- package/src/agent/document-preview/rendering.ts +0 -48
- package/src/agent/document-preview/source.ts +0 -48
- package/src/agent/document-preview/state.ts +0 -77
- package/src/agent/document-preview/types.ts +0 -36
- package/src/agent/workspace.ts +0 -33
- /package/dist/{chunk-shmw3f8t.js.map → chunk-3schcf10.js.map} +0 -0
- /package/dist/{chunk-48pkffj6.js.map → chunk-g3f4cm8x.js.map} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ArtifactKindName } from "../../artifacts/kind-icon";
|
|
2
|
+
import type { NormalizedPart, NormalizedTool } from "../parts";
|
|
3
|
+
export declare function isPublishTool(toolName: string): boolean;
|
|
4
|
+
/** What one publish call published, read from its result. */
|
|
5
|
+
export interface PublishedArtifact {
|
|
6
|
+
readonly artifactId: string;
|
|
7
|
+
readonly version: number;
|
|
8
|
+
readonly kind: ArtifactKindName;
|
|
9
|
+
readonly title: string;
|
|
10
|
+
readonly warnings: readonly {
|
|
11
|
+
readonly message: string;
|
|
12
|
+
readonly part?: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
export declare function publishedArtifact(tool: NormalizedTool): PublishedArtifact | null;
|
|
16
|
+
/** The title a publish call names, from its result or, until then, its input. */
|
|
17
|
+
export declare function publishTitle(tool: NormalizedTool): string;
|
|
18
|
+
/** An artifact as a turn left it, and whether the turn created it or revised an earlier one. */
|
|
19
|
+
export interface TurnArtifact extends PublishedArtifact {
|
|
20
|
+
readonly created: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Each artifact a turn published, once, at the last version the turn published, in the order the
|
|
24
|
+
* turn first published them.
|
|
25
|
+
*/
|
|
26
|
+
export declare function turnArtifacts(parts: readonly NormalizedPart[]): TurnArtifact[];
|
|
27
|
+
/**
|
|
28
|
+
* The titles of what a finished turn last tried to publish and could not: a refused attempt that no
|
|
29
|
+
* later publish of the same artifact (a version, by its id) or the same title (a new one) replaced.
|
|
30
|
+
*/
|
|
31
|
+
export declare function unpublishedTitles(parts: readonly NormalizedPart[]): string[];
|
|
32
|
+
//# sourceMappingURL=interpret.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interpret.d.ts","sourceRoot":"","sources":["../../../src/agent/publish-artifact/interpret.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAK9D,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACnF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,iBAAiB,GAAG,IAAI,CA6BhF;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAIzD;AAED,gGAAgG;AAChG,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,YAAY,EAAE,CAe9E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,MAAM,EAAE,CAiB5E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NormalizedTool } from "../parts";
|
|
2
|
+
/**
|
|
3
|
+
* A publish in the work trace: what it published and at which version, with any warnings, or why
|
|
4
|
+
* it was refused. The answer's cards show the result; this row keeps each attempt.
|
|
5
|
+
*/
|
|
6
|
+
export declare function PublishArtifactToolView({ tool }: {
|
|
7
|
+
tool: NormalizedTool;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=publish-artifact-tool-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-artifact-tool-view.d.ts","sourceRoot":"","sources":["../../../src/agent/publish-artifact/publish-artifact-tool-view.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9C;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,+BA6CzE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LiveRunState } from "../live-run";
|
|
2
|
+
/**
|
|
3
|
+
* Follows what a live turn publishes: each new version refreshes the artifact and every list of
|
|
4
|
+
* artifacts, and the turn's first publish opens the panel on it, at its latest version so later
|
|
5
|
+
* versions of the turn replace it in place. It opens only beside the conversation or over the app:
|
|
6
|
+
* a dialog would take the reader's focus, and the composer's, while the Agent is still working,
|
|
7
|
+
* so there the card waits to be opened.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useLivePublishes(live: LiveRunState): void;
|
|
10
|
+
//# sourceMappingURL=use-live-publishes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-live-publishes.d.ts","sourceRoot":"","sources":["../../../src/agent/publish-artifact/use-live-publishes.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM/C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CA0BzD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type AgentChatProps } from "./agent-chat";
|
|
2
|
-
export type { AgentDocumentPreviewRenderer, AgentDocumentPreviewRendererProps, } from "./document-preview/types";
|
|
3
2
|
export type { AgentFileRef } from "./types";
|
|
4
|
-
export interface AgentChatPageProps extends Omit<AgentChatProps, "threadId" | "onNavigateHome" | "onNavigateThread"> {
|
|
3
|
+
export interface AgentChatPageProps extends Omit<AgentChatProps, "threadId" | "onNavigateHome" | "onNavigateThread" | "artifactTarget" | "onArtifactTargetChange"> {
|
|
5
4
|
readonly routeBase?: string;
|
|
6
5
|
}
|
|
7
6
|
export declare function AgentChatPage({ routeBase, className, ambientContext, conversationHeaderActions, ...props }: AgentChatPageProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-router.d.ts","sourceRoot":"","sources":["../../src/agent/react-router.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-router.d.ts","sourceRoot":"","sources":["../../src/agent/react-router.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAI7D,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,MAAM,WAAW,kBACf,SAAQ,IAAI,CACV,cAAc,EACd,UAAU,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,wBAAwB,CACjG;IACD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAqB,EACrB,SAAS,EACT,cAAc,EACd,yBAAyB,EACzB,GAAG,KAAK,EACT,EAAE,kBAAkB,+BA4DpB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NormalizedTool } from "../parts";
|
|
2
2
|
/**
|
|
3
3
|
* A file the agent viewed. It belongs to the work, not to the answer, so it stays in the trace: an
|
|
4
|
-
* image as a small preview, any other file as a compact chip, each opening the
|
|
4
|
+
* image as a small preview, any other file as a compact chip, each opening in the artifact panel.
|
|
5
5
|
*/
|
|
6
6
|
export declare function ViewFileToolView({ tool }: {
|
|
7
7
|
tool: NormalizedTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-file-tool-view.d.ts","sourceRoot":"","sources":["../../../src/agent/view-file/view-file-tool-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"view-file-tool-view.d.ts","sourceRoot":"","sources":["../../../src/agent/view-file/view-file-tool-view.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAkB,cAAc,EAAE,MAAM,UAAU,CAAA;AAG9D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,+BA4BlE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An artifact on its own page, at `/artifacts/:artifactId` with `?v=` and `?part=`: the whole
|
|
3
|
+
* window, over whatever shell the app draws, so a shared link opens just the artifact. It belongs
|
|
4
|
+
* to no section: whoever may read the artifact can open it, and a link to it works anywhere.
|
|
5
|
+
*/
|
|
6
|
+
export declare function ArtifactPage(): import("react").JSX.Element | null;
|
|
7
|
+
//# sourceMappingURL=artifact-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-page.d.ts","sourceRoot":"","sources":["../../src/artifacts/artifact-page.tsx"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,YAAY,uCAkC3B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ArtifactMessages } from "./messages";
|
|
2
|
+
import type { ArtifactVersion } from "./queries";
|
|
3
|
+
/**
|
|
4
|
+
* What a card says about a version beside its title, from what publishing read: a workbook's
|
|
5
|
+
* sheets and charts, a document's sections, a deck's slides, or a file's format and size.
|
|
6
|
+
*/
|
|
7
|
+
export declare function versionSummary(version: ArtifactVersion, messages: ArtifactMessages, locale: string): string;
|
|
8
|
+
/** A file name's extension, lowercased, when it has one short enough to name a format. */
|
|
9
|
+
export declare function fileExtension(name: string): string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* What a version changed in its artifact's structure: the sheets, charts, or sections it added and
|
|
12
|
+
* removed. Edits within them leave no trace in the structure, so they say nothing here.
|
|
13
|
+
*/
|
|
14
|
+
export declare function versionChanges(previous: ArtifactVersion, current: ArtifactVersion, messages: ArtifactMessages): string[];
|
|
15
|
+
//# sourceMappingURL=card-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-details.d.ts","sourceRoot":"","sources":["../../src/artifacts/card-details.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,MAAM,GACb,MAAM,CAiCR;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,gBAAgB,GACzB,MAAM,EAAE,CA+BV"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ArtifactKindName } from "./kind-icon";
|
|
3
|
+
import { type ArtifactVersion } from "./queries";
|
|
4
|
+
import { type SheetModel } from "./renderers/sheet/model";
|
|
5
|
+
/**
|
|
6
|
+
* What a card shows of an artifact, at a size that reads: a workbook's first chart or first rows
|
|
7
|
+
* above its tabs, a document's title and lede in its own type and theme, an image, the start of a
|
|
8
|
+
* text, or a file's format. It fills the pane the card gives it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ArtifactPreview({ version, kind, loading, }: {
|
|
11
|
+
readonly version: ArtifactVersion | undefined;
|
|
12
|
+
readonly kind: ArtifactKindName;
|
|
13
|
+
readonly loading: boolean;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* A card's face, wherever an artifact shows as a card: its preview above its kind, its title, and
|
|
17
|
+
* what it holds. The control around it decides what a click does.
|
|
18
|
+
*/
|
|
19
|
+
export declare function ArtifactCardFace({ kind, title, version, loading, }: {
|
|
20
|
+
readonly kind: ArtifactKindName;
|
|
21
|
+
readonly title: string;
|
|
22
|
+
readonly version: ArtifactVersion | undefined;
|
|
23
|
+
readonly loading: boolean;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* An artifact's title over a line about it, beside an icon, as its cards and lines show it. What
|
|
27
|
+
* comes `after` the line, such as a date, stays whole where the line itself is cut off.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ArtifactLabel({ title, detail, after, icon, large, className, }: {
|
|
30
|
+
readonly title: string;
|
|
31
|
+
readonly detail: string;
|
|
32
|
+
readonly after?: ReactNode;
|
|
33
|
+
readonly icon: ReactNode;
|
|
34
|
+
/** The gallery's size, a step up from a conversation's. */
|
|
35
|
+
readonly large?: boolean;
|
|
36
|
+
readonly className?: string;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* A deck's first slide set as a title slide, from what publishing read of the deck: its title, and
|
|
40
|
+
* how many slides there are. It fills the slide it is put in, with type scaled to that slide's
|
|
41
|
+
* width, so it also stands in for a deck's live first slide until, or unless, that shows.
|
|
42
|
+
*/
|
|
43
|
+
export declare function SlideFace({ version }: {
|
|
44
|
+
readonly version: ArtifactVersion;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* The columns a preview shows, in the sheet's order: the first, which usually names each row,
|
|
48
|
+
* then numbers, which read at a glance where text would be cut off, then whatever is left.
|
|
49
|
+
*/
|
|
50
|
+
export declare function previewColumns(model: SheetModel): number[];
|
|
51
|
+
/**
|
|
52
|
+
* A Markdown text's opening as its document page sets it: the first `#` heading is the title,
|
|
53
|
+
* and the paragraph straight after it is the lede, in plain words.
|
|
54
|
+
*/
|
|
55
|
+
export declare function documentOpening(markdown: string): {
|
|
56
|
+
readonly title?: string;
|
|
57
|
+
readonly lede?: string;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=card-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-preview.d.ts","sourceRoot":"","sources":["../../src/artifacts/card-preview.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAA;AAK/C,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAErE,OAAO,EAAE,KAAK,eAAe,EAAoD,MAAM,WAAW,CAAA;AAIlG,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAYzE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,IAAI,EACJ,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;IAC7C,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B,+BAGA;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAA;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B,+BAmBA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAM,EACN,KAAK,EACL,IAAI,EACJ,KAAa,EACb,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,+BA2BA;AAgGD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;CAAE,+BAe3E;AAsKD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE,CAM1D;AA+GD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB,CAmBA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-feedback.d.ts","sourceRoot":"","sources":["../../src/artifacts/copy-feedback.ts"],"names":[],"mappings":"AAIA,2FAA2F;AAC3F,wBAAgB,eAAe,IAAI;IACjC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC/C,CAgBA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface FileSizeUnits {
|
|
2
|
+
readonly unknownSize: string;
|
|
3
|
+
readonly bytes: string;
|
|
4
|
+
readonly kilobytes: string;
|
|
5
|
+
readonly megabytes: string;
|
|
6
|
+
readonly gigabytes: string;
|
|
7
|
+
readonly terabytes: string;
|
|
8
|
+
}
|
|
9
|
+
/** A byte count in the largest unit that keeps it at least 1, in the reader's locale. */
|
|
10
|
+
export declare function formatFileSize(sizeBytes: number, locale: string, units: FileSizeUnits): string;
|
|
11
|
+
//# sourceMappingURL=file-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-size.d.ts","sourceRoot":"","sources":["../../src/artifacts/file-size.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,CAa9F"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** The parts of a stored file reference the viewer reads. */
|
|
2
|
+
export interface ViewerFileRef {
|
|
3
|
+
readonly blobId: string;
|
|
4
|
+
readonly digest: string;
|
|
5
|
+
readonly sizeBytes: number;
|
|
6
|
+
readonly fileName?: string;
|
|
7
|
+
readonly mediaType?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A file the viewer can show, tied to the route that authorizes reading it: a file of an artifact
|
|
11
|
+
* version, or a file in a conversation message.
|
|
12
|
+
*/
|
|
13
|
+
export interface FileSource {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly fileRef: ViewerFileRef;
|
|
16
|
+
/**
|
|
17
|
+
* The file's name: its path in an artifact, else its own name. Empty for a message file that
|
|
18
|
+
* has none, which a view names in the reader's language with {@link useFileName}.
|
|
19
|
+
*/
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly inlineUrl: string;
|
|
22
|
+
readonly downloadUrl: string;
|
|
23
|
+
/** Identity of its bytes in the query cache. */
|
|
24
|
+
readonly queryKey: readonly unknown[];
|
|
25
|
+
readonly load: (signal: AbortSignal) => Promise<Blob>;
|
|
26
|
+
}
|
|
27
|
+
export declare function artifactFileSource(input: {
|
|
28
|
+
readonly artifactId: string;
|
|
29
|
+
readonly version: number;
|
|
30
|
+
readonly path: string;
|
|
31
|
+
readonly fileRef: ViewerFileRef;
|
|
32
|
+
/** Explicit base URL for pure callers and tests. Defaults to the configured Sixb client URL. */
|
|
33
|
+
readonly baseUrl?: string;
|
|
34
|
+
}): FileSource;
|
|
35
|
+
export declare function messageFileSource(input: {
|
|
36
|
+
readonly threadId: string;
|
|
37
|
+
readonly messageId: string;
|
|
38
|
+
/** JSON pointer to the file reference in the message, such as `/parts/2/fileRef`. */
|
|
39
|
+
readonly path: string;
|
|
40
|
+
readonly fileRef: ViewerFileRef;
|
|
41
|
+
readonly baseUrl?: string;
|
|
42
|
+
}): FileSource;
|
|
43
|
+
/** The file's name to show: its own, or a word for a file in the reader's language. */
|
|
44
|
+
export declare function useFileName(source: FileSource): string;
|
|
45
|
+
//# sourceMappingURL=file-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-source.d.ts","sourceRoot":"","sources":["../../src/artifacts/file-source.ts"],"names":[],"mappings":"AAGA,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;IACrC,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,gGAAgG;IAChG,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,UAAU,CAsBb;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,UAAU,CAwBb;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAGtD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ViewerFileRef } from "./file-source";
|
|
2
|
+
export type FileView = "image" | "pdf" | "markdown" | "csv" | "tsv" | "text" | "download";
|
|
3
|
+
/** Text files are read whole; larger ones offer the download instead. */
|
|
4
|
+
export declare const MAX_TEXT_PREVIEW_BYTES: number;
|
|
5
|
+
export declare function fileView(fileRef: Pick<ViewerFileRef, "mediaType" | "fileName">): FileView;
|
|
6
|
+
/** Why a file could not load, as a key of the viewer's `files` messages. */
|
|
7
|
+
export type FileLoadError = "gone" | "storageUnavailable" | "loadFailed";
|
|
8
|
+
export declare function fileLoadError(error: unknown): FileLoadError;
|
|
9
|
+
//# sourceMappingURL=file-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-view.d.ts","sourceRoot":"","sources":["../../src/artifacts/file-view.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CAAA;AAEzF,yEAAyE;AACzE,eAAO,MAAM,sBAAsB,QAAkB,CAAA;AAcrD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG,QAAQ,CAIzF;AAED,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,oBAAoB,GAAG,YAAY,CAAA;AAExE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAM3D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type FrameEvent, type FrameRequest, type FrameStart } from "@sixb/core/artifacts";
|
|
2
|
+
import { type ReactNode, type Ref } from "react";
|
|
3
|
+
import { type ArtifactVersion } from "./queries";
|
|
4
|
+
/** Asks the deck in the frame to do something; resolves when it has. */
|
|
5
|
+
export interface ArtifactFrameHandle {
|
|
6
|
+
send<Method extends FrameRequest["method"]>(method: Method, params: Extract<FrameRequest, {
|
|
7
|
+
method: Method;
|
|
8
|
+
}>["params"]): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A version in a sandboxed frame, served from the API under a short-lived link. The frame has an
|
|
12
|
+
* opaque origin, so its page cannot read the app's cookies or call the API as the reader: it
|
|
13
|
+
* talks to the app only in messages, and the app listens only to its own frame and reads only
|
|
14
|
+
* events of the protocol's shape. The app's theme goes in as tokens, read where the frame is
|
|
15
|
+
* mounted, so an artifact's theme applies too.
|
|
16
|
+
*
|
|
17
|
+
* The frame stays hidden until its theme is applied, then fades in over `fallback`: until the
|
|
18
|
+
* tokens arrive, a deck paints in the kit's light defaults, which flash on a dark page.
|
|
19
|
+
*/
|
|
20
|
+
export declare function ArtifactFrame({ version, title, onEvent, className, handle, start, decorative, fallback, failure, overlay, }: {
|
|
21
|
+
readonly version: ArtifactVersion;
|
|
22
|
+
readonly title: string;
|
|
23
|
+
/** How it opens; a change loads the frame again, so this is for where it starts. */
|
|
24
|
+
readonly start?: FrameStart;
|
|
25
|
+
/** A picture of the deck, as a thumbnail is: it takes no focus, clicks, or reading. */
|
|
26
|
+
readonly decorative?: boolean;
|
|
27
|
+
readonly onEvent?: (event: FrameEvent) => void;
|
|
28
|
+
readonly className?: string;
|
|
29
|
+
/** What shows where the frame will be while it loads, and under it as it fades in. */
|
|
30
|
+
readonly fallback?: ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* What shows instead when the deck cannot open: no link could be had for it, or it never said
|
|
33
|
+
* it was ready. A frame that reports failure loads at once; others wait until they near the
|
|
34
|
+
* viewport.
|
|
35
|
+
*/
|
|
36
|
+
readonly failure?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* What the app draws over the frame, in the frame's own pixels, once the frame shows: another
|
|
39
|
+
* artifact a deck embeds. Clicks reach the frame except where the overlay draws.
|
|
40
|
+
*/
|
|
41
|
+
readonly overlay?: ReactNode;
|
|
42
|
+
/** Where to put the handle that asks the frame for things (`ref` is not a prop in React 18). */
|
|
43
|
+
readonly handle?: Ref<ArtifactFrameHandle>;
|
|
44
|
+
}): import("react").JSX.Element;
|
|
45
|
+
//# sourceMappingURL=frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../src/artifacts/frame.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,UAAU,EAGhB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EACL,KAAK,SAAS,EACd,KAAK,GAAG,EAMT,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,WAAW,CAAA;AAElE,wEAAwE;AACxE,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,MAAM,SAAS,YAAY,CAAC,QAAQ,CAAC,EACxC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,QAAQ,CAAC,GAC1D,OAAO,CAAC,IAAI,CAAC,CAAA;CACjB;AAQD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,EACT,MAAM,EACN,KAAK,EACL,UAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,oFAAoF;IACpF,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAA;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,sFAAsF;IACtF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAA;CAC3C,+BAuKA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every artifact the reader can open, most recently updated first, as cards with a preview of
|
|
3
|
+
* each, filtered by kind (`?kind=sheet`). More load as the reader scrolls to the end.
|
|
4
|
+
*/
|
|
5
|
+
export declare function ArtifactsPage(): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=gallery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../../src/artifacts/gallery.tsx"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,wBAAgB,aAAa,gCA2F5B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GetArtifactResponse } from "@sixb/client";
|
|
2
|
+
export type ArtifactKindName = GetArtifactResponse["artifact"]["kind"];
|
|
3
|
+
/** The icon that stands for an artifact's kind wherever artifacts are listed. */
|
|
4
|
+
export declare function ArtifactKindIcon({ kind, className, }: {
|
|
5
|
+
readonly kind: ArtifactKindName;
|
|
6
|
+
readonly className?: string;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=kind-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kind-icon.d.ts","sourceRoot":"","sources":["../../src/artifacts/kind-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAGvD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAStE,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,SAAS,GACV,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B,+BAGA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface TreeText {
|
|
2
|
+
readonly type: "text";
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
export interface TreeElement {
|
|
6
|
+
readonly type: "element";
|
|
7
|
+
tagName: string;
|
|
8
|
+
properties: Record<string, unknown>;
|
|
9
|
+
children: TreeNode[];
|
|
10
|
+
}
|
|
11
|
+
export type TreeNode = TreeElement | TreeText | {
|
|
12
|
+
readonly type: string;
|
|
13
|
+
children?: TreeNode[];
|
|
14
|
+
};
|
|
15
|
+
export interface TreeRoot {
|
|
16
|
+
readonly type: "root";
|
|
17
|
+
children: TreeNode[];
|
|
18
|
+
}
|
|
19
|
+
export declare function isElement(node: TreeNode | undefined): node is TreeElement;
|
|
20
|
+
/** An element's children without the whitespace between them, as a lone image's paragraph has. */
|
|
21
|
+
export declare function meaningfulChildren(element: TreeElement): TreeNode[];
|
|
22
|
+
//# sourceMappingURL=markdown-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-tree.d.ts","sourceRoot":"","sources":["../../src/artifacts/markdown-tree.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,QAAQ,EAAE,QAAQ,EAAE,CAAA;CACrB;AAED,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAA;CAAE,CAAA;AAEhG,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,QAAQ,EAAE,CAAA;CACrB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,IAAI,WAAW,CAEzE;AAED,kGAAkG;AAClG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,GAAG,QAAQ,EAAE,CAInE"}
|