@runtypelabs/persona 4.7.0 → 4.9.0
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 +1 -0
- package/dist/animations/glyph-cycle.cjs +2 -2
- package/dist/animations/glyph-cycle.d.cts +1 -1
- package/dist/animations/glyph-cycle.d.ts +1 -1
- package/dist/animations/glyph-cycle.js +2 -2
- package/dist/animations/{types-CSmiKRVa.d.cts → types-4ROVJ1gA.d.cts} +85 -3
- package/dist/animations/{types-CSmiKRVa.d.ts → types-4ROVJ1gA.d.ts} +85 -3
- package/dist/animations/wipe.cjs +2 -2
- package/dist/animations/wipe.d.cts +1 -1
- package/dist/animations/wipe.d.ts +1 -1
- package/dist/chunk-5EIIHQLQ.js +1 -0
- package/dist/chunk-IO5VVUKP.js +3 -0
- package/dist/chunk-IPVK3KOM.js +1 -0
- package/dist/chunk-UPO4GUFC.js +1 -0
- package/dist/codegen.cjs +13 -13
- package/dist/codegen.js +14 -14
- package/dist/context-mentions-7S5KVUTG.js +169 -0
- package/dist/context-mentions-inline-TTCN7ZM2.js +4 -0
- package/dist/context-mentions-inline.cjs +4 -0
- package/dist/context-mentions-inline.d.cts +203 -0
- package/dist/context-mentions-inline.d.ts +203 -0
- package/dist/context-mentions-inline.js +4 -0
- package/dist/context-mentions.cjs +295 -0
- package/dist/context-mentions.d.cts +7025 -0
- package/dist/context-mentions.d.ts +7025 -0
- package/dist/context-mentions.js +295 -0
- package/dist/index.cjs +99 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1507 -182
- package/dist/index.d.ts +1507 -182
- package/dist/index.global.js +88 -56
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +99 -68
- package/dist/index.js.map +1 -1
- package/dist/install.global.js +1 -1
- package/dist/install.global.js.map +1 -1
- package/dist/launcher.global.js +3 -2
- package/dist/launcher.global.js.map +1 -1
- package/dist/markdown-parsers.js +24 -24
- package/dist/plugin-kit.cjs +1 -1
- package/dist/plugin-kit.d.cts +17 -0
- package/dist/plugin-kit.d.ts +17 -0
- package/dist/plugin-kit.js +1 -1
- package/dist/runtype-tts-entry-UJAEF7NZ.js +1 -0
- package/dist/runtype-tts.js +1 -1
- package/dist/session-reconnect-JKIJBHS5.js +1 -0
- package/dist/smart-dom-reader.cjs +18 -17
- package/dist/smart-dom-reader.d.cts +1260 -16
- package/dist/smart-dom-reader.d.ts +1260 -16
- package/dist/smart-dom-reader.js +18 -17
- package/dist/testing.cjs +3 -3
- package/dist/testing.js +3 -3
- package/dist/theme-editor-preview.cjs +260 -58
- package/dist/theme-editor-preview.d.cts +1234 -15
- package/dist/theme-editor-preview.d.ts +1234 -15
- package/dist/theme-editor-preview.js +87 -58
- package/dist/theme-editor.cjs +10 -10
- package/dist/theme-editor.d.cts +1226 -15
- package/dist/theme-editor.d.ts +1226 -15
- package/dist/theme-editor.js +10 -10
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +76 -0
- package/dist/theme-reference.d.ts +76 -0
- package/dist/theme-reference.js +1 -1
- package/dist/voice-worklet-player.cjs +2 -2
- package/dist/voice-worklet-player.js +2 -2
- package/dist/webmcp-polyfill.js +2 -2
- package/dist/widget.css +1 -1
- package/package.json +16 -5
- package/src/artifacts-session.test.ts +178 -0
- package/src/client.test.ts +255 -1
- package/src/client.ts +157 -60
- package/src/components/artifact-card.test.ts +333 -0
- package/src/components/artifact-card.ts +75 -28
- package/src/components/artifact-inline.test.ts +1328 -0
- package/src/components/artifact-inline.ts +920 -0
- package/src/components/artifact-pane.test.ts +1042 -0
- package/src/components/artifact-pane.ts +440 -131
- package/src/components/artifact-preview.test.ts +1155 -0
- package/src/components/artifact-preview.ts +994 -0
- package/src/components/composer-parts.ts +3 -12
- package/src/components/context-mention-button.test.ts +70 -0
- package/src/components/context-mention-button.ts +82 -0
- package/src/components/context-mention-chip.ts +134 -0
- package/src/components/context-mention-menu.test.ts +508 -0
- package/src/components/context-mention-menu.ts +0 -0
- package/src/components/message-bubble.test.ts +175 -0
- package/src/components/message-bubble.ts +177 -19
- package/src/components/panel.ts +7 -10
- package/src/components/pill-composer-builder.test.ts +6 -2
- package/src/components/pill-composer-builder.ts +6 -6
- package/src/components/reasoning-bubble.ts +1 -13
- package/src/components/registry.ts +38 -3
- package/src/components/tool-bubble.ts +1 -13
- package/src/context-mentions-bundle.test.ts +163 -0
- package/src/context-mentions-entry.ts +185 -0
- package/src/context-mentions-inline-entry.test.ts +136 -0
- package/src/context-mentions-inline-entry.ts +226 -0
- package/src/context-mentions-inline-loader.test.ts +30 -0
- package/src/context-mentions-inline-loader.ts +36 -0
- package/src/context-mentions-inline.ts +15 -0
- package/src/context-mentions-loader.ts +32 -0
- package/src/context-mentions.ts +16 -0
- package/src/defaults.ts +1 -0
- package/src/generated/runtype-openapi-contract.ts +55 -3
- package/src/index-core.ts +46 -1
- package/src/index-global.ts +51 -0
- package/src/index.ts +8 -0
- package/src/markdown-parsers-loader.test.ts +158 -0
- package/src/markdown-parsers-loader.ts +83 -27
- package/src/plugin-kit.test.ts +40 -0
- package/src/plugin-kit.ts +39 -5
- package/src/runtime/host-layout.test.ts +163 -0
- package/src/runtime/host-layout.ts +110 -7
- package/src/runtime/init.ts +18 -61
- package/src/session.mentions.test.ts +175 -0
- package/src/session.test.ts +52 -4
- package/src/session.ts +197 -27
- package/src/smart-dom-reader.test.ts +129 -2
- package/src/smart-dom-reader.ts +127 -1
- package/src/styles/context-mention-menu-css.ts +176 -0
- package/src/styles/widget.css +1002 -152
- package/src/theme-editor/preview.ts +2 -0
- package/src/theme-editor/sections.test.ts +26 -1
- package/src/theme-editor/sections.ts +13 -5
- package/src/theme-reference.ts +2 -2
- package/src/tool-call-display-defaults.test.ts +1 -0
- package/src/types/theme.ts +79 -0
- package/src/types.ts +1041 -17
- package/src/ui.artifact-pane-gating.test.ts +636 -0
- package/src/ui.component-directive.test.ts +104 -0
- package/src/ui.composer-bar.test.ts +60 -2
- package/src/ui.detached-panel.test.ts +1049 -0
- package/src/ui.mention-submit.test.ts +235 -0
- package/src/ui.tool-display.test.ts +51 -0
- package/src/ui.ts +998 -159
- package/src/utils/artifact-custom-actions.ts +128 -0
- package/src/utils/artifact-display.test.ts +42 -0
- package/src/utils/artifact-display.ts +84 -0
- package/src/utils/artifact-file.test.ts +116 -0
- package/src/utils/artifact-file.ts +117 -0
- package/src/utils/artifact-gate.test.ts +112 -5
- package/src/utils/artifact-gate.ts +39 -14
- package/src/utils/artifact-loading-status.ts +55 -0
- package/src/utils/artifact-status-label.ts +190 -0
- package/src/utils/buttons.ts +7 -1
- package/src/utils/chunk-loader.test.ts +97 -0
- package/src/utils/chunk-loader.ts +88 -0
- package/src/utils/code-highlight.test.ts +186 -0
- package/src/utils/code-highlight.ts +400 -0
- package/src/utils/composer-contenteditable.test.ts +507 -0
- package/src/utils/composer-contenteditable.ts +626 -0
- package/src/utils/composer-document.test.ts +280 -0
- package/src/utils/composer-document.ts +293 -0
- package/src/utils/composer-history.test.ts +35 -7
- package/src/utils/composer-history.ts +30 -20
- package/src/utils/composer-input.ts +159 -0
- package/src/utils/context-mention-controller.test.ts +1215 -0
- package/src/utils/context-mention-controller.ts +1186 -0
- package/src/utils/context-mention-manager.test.ts +422 -0
- package/src/utils/context-mention-manager.ts +410 -0
- package/src/utils/context-mention-orchestrator.test.ts +538 -0
- package/src/utils/context-mention-orchestrator.ts +348 -0
- package/src/utils/icons.ts +2 -0
- package/src/utils/live-region.test.ts +108 -0
- package/src/utils/live-region.ts +94 -0
- package/src/utils/mention-channels.ts +63 -0
- package/src/utils/mention-llm-format.test.ts +91 -0
- package/src/utils/mention-llm-format.ts +79 -0
- package/src/utils/mention-matcher.test.ts +86 -0
- package/src/utils/mention-matcher.ts +221 -0
- package/src/utils/mention-token.ts +72 -0
- package/src/utils/mention-trigger.test.ts +155 -0
- package/src/utils/mention-trigger.ts +156 -0
- package/src/utils/roving-tablist.test.ts +152 -0
- package/src/utils/roving-tablist.ts +111 -0
- package/src/utils/spinner.ts +45 -0
- package/src/utils/theme.test.ts +76 -4
- package/src/utils/theme.ts +7 -0
- package/src/utils/tokens.ts +118 -11
- package/src/utils/tool-loading-animation.test.ts +32 -0
- package/src/utils/tool-loading-animation.ts +24 -0
- package/dist/chunk-DFBSCFYN.js +0 -1
- package/dist/runtype-tts-entry-HFUV2UF7.js +0 -1
- package/dist/session-reconnect-U77QFUR7.js +0 -1
|
@@ -317,6 +317,8 @@ export function createThemePreview(
|
|
|
317
317
|
artifactType: 'markdown',
|
|
318
318
|
title: 'Sample Document',
|
|
319
319
|
content: '# Sample Artifact\n\nThis is a preview of the artifact sidebar.\n\n## Features\n\n- Markdown rendering\n- Document toolbar\n- Resizable panes',
|
|
320
|
+
// Pane-only preview: showcase the sidebar without a chat block.
|
|
321
|
+
transcript: false,
|
|
320
322
|
});
|
|
321
323
|
}
|
|
322
324
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
|
|
3
|
-
import { COMPONENTS_SECTIONS, CONFIGURE_SECTIONS, INTERFACE_ROLES_SECTION } from "./sections";
|
|
3
|
+
import { COMPONENTS_SECTIONS, CONFIGURE_SECTIONS, INTERFACE_ROLES_SECTION, STYLE_SECTIONS } from "./sections";
|
|
4
4
|
import { ALL_ROLES } from "./role-mappings";
|
|
5
5
|
|
|
6
6
|
describe("theme editor scroll-to-bottom controls", () => {
|
|
@@ -44,6 +44,14 @@ describe("theme editor scroll-to-bottom controls", () => {
|
|
|
44
44
|
expect(fieldPaths).toContain("theme.components.composer.shadow");
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
+
it("exposes detached panel token controls", () => {
|
|
48
|
+
const componentPaths = COMPONENTS_SECTIONS.flatMap((section) => section.fields.map((field) => field.path));
|
|
49
|
+
const stylePaths = STYLE_SECTIONS.flatMap((section) => section.fields.map((field) => field.path));
|
|
50
|
+
|
|
51
|
+
expect(componentPaths).toContain("theme.components.panel.inset");
|
|
52
|
+
expect(stylePaths).toContain("theme.components.panel.canvasBackground");
|
|
53
|
+
});
|
|
54
|
+
|
|
47
55
|
it("adds a scroll-to-bottom interface role mapping", () => {
|
|
48
56
|
const role = ALL_ROLES.find((entry) => entry.roleId === "role-scroll-to-bottom");
|
|
49
57
|
|
|
@@ -67,6 +75,23 @@ describe("theme editor scroll-to-bottom controls", () => {
|
|
|
67
75
|
expect(debugSection?.fields.some((field) => field.path === "features.toolCallDisplay.activeMinHeight")).toBe(true);
|
|
68
76
|
expect(debugSection?.fields.some((field) => field.path === "features.toolCallDisplay.expandable")).toBe(true);
|
|
69
77
|
expect(debugSection?.fields.some((field) => field.path === "features.toolCallDisplay.grouped")).toBe(true);
|
|
78
|
+
expect(debugSection?.fields.some((field) => field.path === "features.toolCallDisplay.groupedMode")).toBe(true);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("exposes product-facing artifact toolbar copy", () => {
|
|
82
|
+
const section = CONFIGURE_SECTIONS.find((entry) => entry.id === "artifacts-customization");
|
|
83
|
+
const paths = section?.fields.map((field) => field.path) ?? [];
|
|
84
|
+
|
|
85
|
+
expect(paths).toContain("features.artifacts.layout.toolbarTitle");
|
|
86
|
+
expect(paths).toContain("features.artifacts.layout.closeButtonLabel");
|
|
87
|
+
|
|
88
|
+
// The deprecated no-op unifiedSplitChrome control is gone (welding is now default).
|
|
89
|
+
expect(paths).not.toContain("features.artifacts.layout.unifiedSplitChrome");
|
|
90
|
+
// Split gap defaults to the welded 0, not the old 0.5rem.
|
|
91
|
+
const splitGap = section?.fields.find(
|
|
92
|
+
(field) => field.path === "features.artifacts.layout.splitGap"
|
|
93
|
+
);
|
|
94
|
+
expect(splitGap?.defaultValue).toBe("0");
|
|
70
95
|
});
|
|
71
96
|
|
|
72
97
|
it("exposes collapsed reasoning preview controls", () => {
|
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
DEFAULT_FLOATING_LAUNCHER_MAX_WIDTH,
|
|
6
6
|
DEFAULT_FLOATING_LAUNCHER_WIDTH,
|
|
7
7
|
} from '../defaults';
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_PANEL_CANVAS_BACKGROUND,
|
|
10
|
+
DEFAULT_PANEL_INSET,
|
|
11
|
+
} from '../utils/tokens';
|
|
8
12
|
import { COLOR_FAMILIES } from './color-utils';
|
|
9
13
|
import {
|
|
10
14
|
ROLE_SURFACES,
|
|
@@ -180,6 +184,7 @@ const widgetStyleSectionDef: SectionDef = {
|
|
|
180
184
|
{ value: 'palette.shadows.lg', label: 'Large' },
|
|
181
185
|
{ value: 'palette.shadows.xl', label: 'Extra Large' },
|
|
182
186
|
] },
|
|
187
|
+
{ id: 'style-panel-canvas-bg', label: 'Detached Canvas Background', description: 'Fills the region behind a detached panel; defaults to transparent', type: 'token-ref', path: 'theme.components.panel.canvasBackground', defaultValue: DEFAULT_PANEL_CANVAS_BACKGROUND, tokenRef: { tokenType: 'color' } },
|
|
183
188
|
{ id: 'style-msg-user-radius', label: 'User Message Radius', type: 'select', path: 'theme.components.message.user.borderRadius', defaultValue: 'palette.radius.lg', options: [
|
|
184
189
|
{ value: 'palette.radius.none', label: 'None' },
|
|
185
190
|
{ value: 'palette.radius.sm', label: 'Small' },
|
|
@@ -295,6 +300,7 @@ const panelLayoutSectionDef: SectionDef = {
|
|
|
295
300
|
{ value: 'palette.shadows.lg', label: 'Large' },
|
|
296
301
|
{ value: 'palette.shadows.xl', label: 'Extra Large' },
|
|
297
302
|
] },
|
|
303
|
+
{ id: 'panel-inset', label: 'Detached Inset', description: 'Gap around the card when launcher.detachedPanel is on', type: 'text', path: 'theme.components.panel.inset', defaultValue: DEFAULT_PANEL_INSET },
|
|
298
304
|
],
|
|
299
305
|
};
|
|
300
306
|
|
|
@@ -464,8 +470,8 @@ const SHADOW_SCALE_OPTIONS: { value: string; label: string }[] = [
|
|
|
464
470
|
{ value: 'palette.shadows.xl', label: 'Extra Large' },
|
|
465
471
|
];
|
|
466
472
|
|
|
467
|
-
// The approval
|
|
468
|
-
//
|
|
473
|
+
// The approval default is a bespoke "card" shadow rather than a palette step,
|
|
474
|
+
// so expose it as a leading "Default" option users can keep.
|
|
469
475
|
const CARD_SHADOW = '0 5px 15px rgba(15, 23, 42, 0.08)';
|
|
470
476
|
const CARD_SHADOW_OPTIONS = [{ value: CARD_SHADOW, label: 'Default' }, ...SHADOW_SCALE_OPTIONS];
|
|
471
477
|
|
|
@@ -480,7 +486,7 @@ const componentShadowsSectionDef: SectionDef = {
|
|
|
480
486
|
{ id: 'shadow-tool-bubble', label: 'Tool Call Bubble', type: 'select', path: 'theme.components.toolBubble.shadow', defaultValue: 'palette.shadows.sm', options: SHADOW_SCALE_OPTIONS },
|
|
481
487
|
{ id: 'shadow-reasoning-bubble', label: 'Reasoning Bubble', type: 'select', path: 'theme.components.reasoningBubble.shadow', defaultValue: 'palette.shadows.sm', options: SHADOW_SCALE_OPTIONS },
|
|
482
488
|
{ id: 'shadow-approval', label: 'Approval Bubble', type: 'select', path: 'theme.components.approval.requested.shadow', defaultValue: CARD_SHADOW, options: CARD_SHADOW_OPTIONS },
|
|
483
|
-
{ id: 'shadow-intro-card', label: 'Intro Card', type: 'select', path: 'theme.components.introCard.shadow', defaultValue:
|
|
489
|
+
{ id: 'shadow-intro-card', label: 'Intro Card', type: 'select', path: 'theme.components.introCard.shadow', defaultValue: 'palette.shadows.none', options: CARD_SHADOW_OPTIONS },
|
|
484
490
|
{ id: 'shadow-composer', label: 'Composer', type: 'select', path: 'theme.components.composer.shadow', defaultValue: 'palette.shadows.none', options: SHADOW_SCALE_OPTIONS },
|
|
485
491
|
],
|
|
486
492
|
};
|
|
@@ -834,11 +840,12 @@ const artifactCustomizationSectionDef: SectionDef = {
|
|
|
834
840
|
id: 'artifacts-customization', title: 'Artifact Customization', collapsed: true,
|
|
835
841
|
fields: [
|
|
836
842
|
{ id: 'art-toolbar', label: 'Toolbar Preset', type: 'select', path: 'features.artifacts.layout.toolbarPreset', defaultValue: 'default', options: [{ value: 'default', label: 'Default' }, { value: 'document', label: 'Document' }] },
|
|
843
|
+
{ id: 'art-toolbar-title', label: 'Toolbar Title', type: 'text', path: 'features.artifacts.layout.toolbarTitle', defaultValue: 'Artifacts' },
|
|
844
|
+
{ id: 'art-close-label', label: 'Close Button Label', type: 'text', path: 'features.artifacts.layout.closeButtonLabel', defaultValue: 'Close' },
|
|
837
845
|
{ id: 'art-pane-width', label: 'Pane Width', description: 'CSS width (e.g. 40%, 28rem)', type: 'text', path: 'features.artifacts.layout.paneWidth', defaultValue: '40%' },
|
|
838
846
|
{ id: 'art-pane-max-width', label: 'Pane Max Width', type: 'text', path: 'features.artifacts.layout.paneMaxWidth', defaultValue: '28rem' },
|
|
839
|
-
{ id: 'art-split-gap', label: 'Split Gap', type: 'text', path: 'features.artifacts.layout.splitGap', defaultValue: '0
|
|
847
|
+
{ id: 'art-split-gap', label: 'Split Gap', type: 'text', path: 'features.artifacts.layout.splitGap', defaultValue: '0' },
|
|
840
848
|
{ id: 'art-pane-bg', label: 'Pane Background', type: 'color', path: 'features.artifacts.layout.paneBackground', defaultValue: '' },
|
|
841
|
-
{ id: 'art-unified', label: 'Unified Split Chrome', description: 'Wrap chat and artifact in a single container', type: 'toggle', path: 'features.artifacts.layout.unifiedSplitChrome', defaultValue: false },
|
|
842
849
|
{ id: 'art-resizable', label: 'Resizable', description: 'Allow dragging the pane divider', type: 'toggle', path: 'features.artifacts.layout.resizable', defaultValue: false },
|
|
843
850
|
{ id: 'art-expand-panel', label: 'Expand Panel When Open', description: 'Widen the launcher panel to fit artifacts', type: 'toggle', path: 'features.artifacts.layout.expandLauncherPanelWhenOpen', defaultValue: true },
|
|
844
851
|
],
|
|
@@ -864,6 +871,7 @@ const debugSectionDef: SectionDef = {
|
|
|
864
871
|
{ id: 'dev-tool-active-min-height', label: 'Tool Active Min Height', description: 'CSS min-height for collapsed active tool rows (e.g. 5rem)', type: 'text', path: 'features.toolCallDisplay.activeMinHeight', defaultValue: '' },
|
|
865
872
|
{ id: 'dev-tool-expandable', label: 'Tool Calls Expandable', description: 'Allow expanding tool call rows to see full details', type: 'toggle', path: 'features.toolCallDisplay.expandable', defaultValue: true },
|
|
866
873
|
{ id: 'dev-tool-grouped', label: 'Group Sequential Tool Calls', description: 'Render consecutive tool rows inside a grouped container', type: 'toggle', path: 'features.toolCallDisplay.grouped', defaultValue: false },
|
|
874
|
+
{ id: 'dev-tool-grouped-mode', label: 'Grouped Tool Detail', description: 'Show each tool step or one consolidated summary', type: 'select', path: 'features.toolCallDisplay.groupedMode', defaultValue: 'stack', options: [{ value: 'stack', label: 'Show Steps' }, { value: 'summary', label: 'Summary Only' }] },
|
|
867
875
|
{ id: 'dev-reasoning-expandable', label: 'Reasoning Expandable', description: 'Allow expanding reasoning rows to see full details', type: 'toggle', path: 'features.reasoningDisplay.expandable', defaultValue: true },
|
|
868
876
|
{ id: 'dev-reasoning-active-preview', label: 'Reasoning Preview While Active', description: 'Show a lightweight preview in collapsed active reasoning rows', type: 'toggle', path: 'features.reasoningDisplay.activePreview', defaultValue: false },
|
|
869
877
|
{ id: 'dev-reasoning-preview-lines', label: 'Reasoning Preview Lines', type: 'select', path: 'features.reasoningDisplay.previewMaxLines', defaultValue: 3, options: [{ value: '1', label: '1' }, { value: '2', label: '2' }, { value: '3', label: '3' }, { value: '4', label: '4' }, { value: '5', label: '5' }], formatValue: (v: unknown) => String(v ?? 3), parseValue: (v: unknown) => Number(v) },
|
package/src/theme-reference.ts
CHANGED
|
@@ -115,7 +115,7 @@ export const THEME_TOKEN_DOCS = {
|
|
|
115
115
|
panel: {
|
|
116
116
|
description: 'Chat panel container.',
|
|
117
117
|
properties:
|
|
118
|
-
'width, maxWidth (440px), height (600px), maxHeight, borderRadius, shadow.',
|
|
118
|
+
'width, maxWidth (440px), height (600px), maxHeight, borderRadius, shadow, inset (16px, gap around a detached panel), canvasBackground (transparent, fills the region behind a detached panel in docked and inline embed modes; a no-op in sidebar mode, where the gap stays click-through and the host page shows through like floating). inset and canvasBackground apply only when launcher.detachedPanel is true or artifacts.layout.paneAppearance is "detached".',
|
|
119
119
|
},
|
|
120
120
|
header: {
|
|
121
121
|
description: 'Chat panel header.',
|
|
@@ -288,7 +288,7 @@ export const THEME_TOKEN_DOCS = {
|
|
|
288
288
|
features: {
|
|
289
289
|
description: 'Feature flags.',
|
|
290
290
|
properties:
|
|
291
|
-
'showReasoning (AI thinking steps), showToolCalls (tool invocations), toolCallDisplay (collapsedMode, activePreview, activeMinHeight, previewMaxLines, grouped, expandable, loadingAnimation), reasoningDisplay (activePreview, activeMinHeight, previewMaxLines, expandable, loadingAnimation), artifacts (sidebar config).',
|
|
291
|
+
'showReasoning (AI thinking steps), showToolCalls (tool invocations), toolCallDisplay (collapsedMode, activePreview, activeMinHeight, previewMaxLines, grouped, groupedMode, expandable, loadingAnimation), reasoningDisplay (activePreview, activeMinHeight, previewMaxLines, expandable, loadingAnimation), artifacts (sidebar config).',
|
|
292
292
|
},
|
|
293
293
|
},
|
|
294
294
|
}
|
package/src/types/theme.ts
CHANGED
|
@@ -166,6 +166,8 @@ export interface ComponentTokenSet {
|
|
|
166
166
|
margin?: TokenReference<'spacing'>;
|
|
167
167
|
shadow?: TokenReference<'shadow'>;
|
|
168
168
|
opacity?: number;
|
|
169
|
+
/** Hover background — used by transparent variants like `button.ghost`. */
|
|
170
|
+
hoverBackground?: TokenReference<'color'>;
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
export interface ButtonTokens extends ComponentTokenSet {
|
|
@@ -194,6 +196,10 @@ export interface PanelTokens extends ComponentTokenSet {
|
|
|
194
196
|
maxWidth: string;
|
|
195
197
|
height: string;
|
|
196
198
|
maxHeight: string;
|
|
199
|
+
/** Gap between the detached panel and its region edges. Only used when detached. */
|
|
200
|
+
inset?: string;
|
|
201
|
+
/** Background of the region revealed behind a detached panel. */
|
|
202
|
+
canvasBackground?: string;
|
|
197
203
|
}
|
|
198
204
|
|
|
199
205
|
export interface HeaderTokens extends ComponentTokenSet {
|
|
@@ -370,6 +376,14 @@ export interface ArtifactToolbarTokens {
|
|
|
370
376
|
iconBorder?: string;
|
|
371
377
|
toggleGroupGap?: string;
|
|
372
378
|
toggleBorderRadius?: string;
|
|
379
|
+
/** Inner padding of the segmented view/source toggle pill. */
|
|
380
|
+
toggleGroupPadding?: string;
|
|
381
|
+
/** Border of the segmented view/source toggle pill (e.g., `none`). */
|
|
382
|
+
toggleGroupBorder?: string;
|
|
383
|
+
/** Corner radius of the segmented view/source toggle pill. */
|
|
384
|
+
toggleGroupBorderRadius?: string;
|
|
385
|
+
/** Background of the segmented view/source toggle pill. */
|
|
386
|
+
toggleGroupBackground?: string;
|
|
373
387
|
copyBackground?: string;
|
|
374
388
|
copyBorder?: string;
|
|
375
389
|
copyColor?: string;
|
|
@@ -403,6 +417,17 @@ export interface ArtifactTabTokens {
|
|
|
403
417
|
listPadding?: string;
|
|
404
418
|
}
|
|
405
419
|
|
|
420
|
+
/** Artifact reference card (chat thread) chrome. */
|
|
421
|
+
export interface ArtifactCardTokens {
|
|
422
|
+
background?: string;
|
|
423
|
+
/** Full border shorthand (e.g. `1px solid #e5e7eb`). */
|
|
424
|
+
border?: string;
|
|
425
|
+
borderRadius?: string;
|
|
426
|
+
hoverBackground?: string;
|
|
427
|
+
/** Border color on hover. */
|
|
428
|
+
hoverBorderColor?: string;
|
|
429
|
+
}
|
|
430
|
+
|
|
406
431
|
/** Artifact pane chrome. */
|
|
407
432
|
export interface ArtifactPaneTokens {
|
|
408
433
|
/**
|
|
@@ -414,6 +439,56 @@ export interface ArtifactPaneTokens {
|
|
|
414
439
|
toolbarBackground?: string;
|
|
415
440
|
}
|
|
416
441
|
|
|
442
|
+
/** Inline artifact block chrome (`display: "inline"` file preview). */
|
|
443
|
+
export interface ArtifactInlineTokens {
|
|
444
|
+
/** Background of the inline preview frame. */
|
|
445
|
+
background?: string;
|
|
446
|
+
/** Full border shorthand for the frame (e.g. `1px solid #e5e7eb`). */
|
|
447
|
+
border?: string;
|
|
448
|
+
/** Border radius of the inline preview frame. */
|
|
449
|
+
borderRadius?: string;
|
|
450
|
+
/** Background of the title/toolbar chrome bar. */
|
|
451
|
+
chromeBackground?: string;
|
|
452
|
+
/** Bottom border of the title bar. */
|
|
453
|
+
chromeBorder?: string;
|
|
454
|
+
/** Title text color in the chrome bar (artifact basename). */
|
|
455
|
+
titleColor?: string;
|
|
456
|
+
/** Muted text color for the type label / streaming status. */
|
|
457
|
+
mutedColor?: string;
|
|
458
|
+
/** Preview iframe height inside the inline body. */
|
|
459
|
+
frameHeight?: string;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Syntax-highlighted artifact source view (pane + inline), rendered by
|
|
464
|
+
* `utils/code-highlight.ts`. One Light defaults ship in `widget.css`, with a
|
|
465
|
+
* One Dark override keyed off the widget's resolved color scheme (the
|
|
466
|
+
* `data-persona-color-scheme` root attribute, not the OS preference); set any
|
|
467
|
+
* of these to retheme the tokenizer palette and the line-number gutter.
|
|
468
|
+
*/
|
|
469
|
+
export interface CodeTokens {
|
|
470
|
+
/** Keywords, booleans, null (e.g. `const`, `true`). */
|
|
471
|
+
keywordColor?: string;
|
|
472
|
+
/** String and template literals; HTML attribute values. */
|
|
473
|
+
stringColor?: string;
|
|
474
|
+
/** Line and block comments. */
|
|
475
|
+
commentColor?: string;
|
|
476
|
+
/** Numeric literals; CSS hex colors / units. */
|
|
477
|
+
numberColor?: string;
|
|
478
|
+
/** HTML tag brackets + names; doctype. */
|
|
479
|
+
tagColor?: string;
|
|
480
|
+
/** HTML attribute names. */
|
|
481
|
+
attrColor?: string;
|
|
482
|
+
/** CSS property names; JSON object keys. */
|
|
483
|
+
propertyColor?: string;
|
|
484
|
+
/** Line-number gutter digits. */
|
|
485
|
+
lineNumberColor?: string;
|
|
486
|
+
/** Right border of the line-number gutter. */
|
|
487
|
+
gutterBorderColor?: string;
|
|
488
|
+
/** Background of the source-view code sheet (defaults to One Light/Dark editor background). */
|
|
489
|
+
background?: string;
|
|
490
|
+
}
|
|
491
|
+
|
|
417
492
|
/** Icon button chrome (used by createIconButton). */
|
|
418
493
|
export interface IconButtonTokens {
|
|
419
494
|
background?: string;
|
|
@@ -487,9 +562,13 @@ export interface ComponentTokens {
|
|
|
487
562
|
toolbar?: ArtifactToolbarTokens;
|
|
488
563
|
tab?: ArtifactTabTokens;
|
|
489
564
|
pane?: ArtifactPaneTokens;
|
|
565
|
+
card?: ArtifactCardTokens;
|
|
566
|
+
inline?: ArtifactInlineTokens;
|
|
490
567
|
};
|
|
491
568
|
/** Collapsible widget chrome (tool/reasoning/approval bubbles). */
|
|
492
569
|
collapsibleWidget?: CollapsibleWidgetTokens;
|
|
570
|
+
/** Syntax-highlighted artifact source view (tokenizer palette + gutter). */
|
|
571
|
+
code?: CodeTokens;
|
|
493
572
|
}
|
|
494
573
|
|
|
495
574
|
export interface PaletteExtras {
|