@adia-ai/web-modules 0.4.6 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/chat/chat-composer/chat-composer.a2ui.json +1 -0
- package/chat/chat-composer/chat-composer.d.ts +47 -0
- package/chat/chat-empty/chat-empty.a2ui.json +1 -0
- package/chat/chat-header/chat-header.a2ui.json +1 -0
- package/chat/chat-shell/chat-shell.a2ui.json +3 -0
- package/chat/chat-shell/chat-shell.d.ts +86 -0
- package/chat/chat-shell/chat-shell.yaml +4 -0
- package/chat/chat-sidebar/chat-sidebar.a2ui.json +1 -0
- package/chat/chat-sidebar/chat-sidebar.d.ts +70 -0
- package/chat/chat-status/chat-status.a2ui.json +1 -0
- package/chat/chat-thread/chat-thread.a2ui.json +7 -0
- package/chat/chat-thread/chat-thread.d.ts +38 -0
- package/chat/chat-thread/chat-thread.yaml +58 -49
- package/editor/editor-canvas/editor-canvas.a2ui.json +1 -0
- package/editor/editor-canvas/editor-canvas.d.ts +40 -0
- package/editor/editor-canvas-empty/editor-canvas-empty.a2ui.json +1 -0
- package/editor/editor-shell/editor-shell.a2ui.json +1 -0
- package/editor/editor-shell/editor-shell.d.ts +21 -0
- package/editor/editor-sidebar/editor-sidebar.a2ui.json +1 -0
- package/editor/editor-sidebar/editor-sidebar.d.ts +53 -0
- package/editor/editor-statusbar/editor-statusbar.a2ui.json +1 -0
- package/editor/editor-toolbar/editor-toolbar.a2ui.json +1 -0
- package/editor/editor-toolbar/editor-toolbar.d.ts +39 -0
- package/package.json +1 -1
- package/runtime/a2ui-root/a2ui-root.a2ui.json +1 -0
- package/runtime/a2ui-root/a2ui-root.d.ts +47 -0
- package/runtime/gen-root/gen-root.a2ui.json +5 -0
- package/runtime/gen-root/gen-root.d.ts +23 -0
- package/runtime/gen-root/gen-root.yaml +6 -0
- package/shell/admin-command/admin-command.a2ui.json +1 -0
- package/shell/admin-command/admin-command.d.ts +50 -0
- package/shell/admin-content/admin-content.a2ui.json +1 -0
- package/shell/admin-page/admin-page.a2ui.json +1 -0
- package/shell/admin-page-body/admin-page-body.a2ui.json +1 -0
- package/shell/admin-page-header/admin-page-header.a2ui.json +1 -0
- package/shell/admin-scroll/admin-scroll.a2ui.json +1 -0
- package/shell/admin-shell/admin-shell.a2ui.json +1 -0
- package/shell/admin-shell/admin-shell.d.ts +49 -0
- package/shell/admin-sidebar/admin-sidebar.a2ui.json +1 -0
- package/shell/admin-sidebar/admin-sidebar.d.ts +68 -0
- package/shell/admin-statusbar/admin-statusbar.a2ui.json +1 -0
- package/shell/admin-topbar/admin-topbar.a2ui.json +1 -0
- package/simple/simple-content/simple-content.a2ui.json +1 -0
- package/simple/simple-hero/simple-hero.a2ui.json +1 -0
- package/simple/simple-shell/simple-shell.a2ui.json +1 -0
- package/simple/simple-shell/simple-shell.d.ts +29 -0
- package/theme/theme-panel/theme-panel.a2ui.json +9 -0
- package/theme/theme-panel/theme-panel.d.ts +77 -0
- package/theme/theme-panel/theme-panel.html +2 -0
- package/theme/theme-panel/theme-panel.yaml +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,38 @@ Built from `@adia-ai/web-components` primitives.
|
|
|
11
11
|
|
|
12
12
|
_No pending changes._
|
|
13
13
|
|
|
14
|
+
## [0.4.8] - 2026-05-12
|
|
15
|
+
|
|
16
|
+
### Added — TypeScript declarations for all web-modules (FEEDBACK-02 #1, v0.4.8)
|
|
17
|
+
|
|
18
|
+
Closes consumer-friction item #1 from FEEDBACK-adia-packages-02. Hand-codegen'd `.d.ts` declarations now ship for every web-module across all clusters:
|
|
19
|
+
|
|
20
|
+
- **chat** (6): `chat-composer`, `chat-shell`, `chat-sidebar`, `chat-thread` + supporting types.
|
|
21
|
+
- **editor** (5): `editor-canvas`, `editor-shell`, `editor-sidebar`, `editor-toolbar` + supporting types.
|
|
22
|
+
- **runtime** (2): `a2ui-root`, `gen-root`.
|
|
23
|
+
- **admin shell** (10): admin-command, admin-content, admin-page, admin-page-{body,header}, admin-scroll, admin-shell, admin-sidebar, admin-statusbar, admin-topbar.
|
|
24
|
+
- **simple** + **theme** clusters: companion `.d.ts` files for the remaining modules.
|
|
25
|
+
|
|
26
|
+
TypeScript consumers now get typed `document.querySelector('admin-shell')` returns `AdminShell`, typed reflected properties, typed methods (`.toggle()`, `.collapse()`, etc.), and typed custom events. `HTMLElementTagNameMap` augmentation in the package barrel makes the tag-name lookups type-aware. Mirrors the `@adia-ai/web-components@0.4.7` §74 codegen pattern.
|
|
27
|
+
|
|
28
|
+
### Added — `composes:` field on YAMLs + `.a2ui.json` regen (ADR-0027 wiring, v0.4.8)
|
|
29
|
+
|
|
30
|
+
Each web-module YAML now declares a `composes:` field listing the `@adia-ai/web-components` primitives it instantiates internally. ADR-0027 (cross-primitive composition imports are consumer's responsibility) becomes mechanically auditable — the `composes:` linter ships in this release and runs as part of `npm run components`. `.a2ui.json` sidecars regenerated to surface the `composes:` data through the v0.9 catalog.
|
|
31
|
+
|
|
32
|
+
`chat-shell.yaml` + `gen-root.yaml` documented the LLM-pipeline wiring expectations alongside the composes declarations.
|
|
33
|
+
|
|
34
|
+
### Documentation — lexical-scope authoring guide
|
|
35
|
+
|
|
36
|
+
`README.md` § Module authoring updated with the `composes:` field semantics + lexical-scope rationale (why composes-declared imports must live at the consumer page, not transitively pulled by the module). Aligns with §66's `adaptV09Component()` catalog reader work.
|
|
37
|
+
|
|
38
|
+
See root [CHANGELOG.md `[Unreleased]`](../../CHANGELOG.md) for the cross-cutting arc narrative.
|
|
39
|
+
|
|
40
|
+
## [0.4.7] - 2026-05-12
|
|
41
|
+
|
|
42
|
+
### Changed — `chat/chat-thread.yaml` populates `synonyms.tags` (§72)
|
|
43
|
+
|
|
44
|
+
The composite `chat-thread.yaml` picks up the alias array previously held in the retired `@adia-ai/a2ui-corpus/patterns/_components.json` — `chat`, `conversation`, `messages`, `chat-log`, `message-thread`. Sidecar regenerated by `npm run components`. Mirrors the per-component yaml sweep on `@adia-ai/web-components` for §72 (the §65 carry-over from v0.4.6).
|
|
45
|
+
|
|
14
46
|
## [0.4.6] - 2026-05-12
|
|
15
47
|
|
|
16
48
|
### Fixed — `<editor-sidebar>` resize-state detection via `:has()`
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"x-adiaui": {
|
|
30
30
|
"anti_patterns": [],
|
|
31
31
|
"category": "input",
|
|
32
|
+
"composes": [],
|
|
32
33
|
"events": {
|
|
33
34
|
"composer-submit": {
|
|
34
35
|
"description": "Bubbles when the inner input fires its 'submit' event. Detail mirrors the inner event's detail (typically text + model).",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<chat-composer-ui>` — Module-tier chat composer wrapper — replaces legacy <chat-input-ui
|
|
3
|
+
data-chat-input> direct child of <chat-shell> per ADR-0023.
|
|
4
|
+
Forwards submit events as 'composer-submit', propagates [disabled]
|
|
5
|
+
to the inner input, provides slot vocabulary for future composer
|
|
6
|
+
surfaces (file attach, autocomplete, model picker).
|
|
7
|
+
|
|
8
|
+
Sits inside <chat-shell> as the input region (typically inside or
|
|
9
|
+
alongside the footer). Authors place an inner <chat-input-ui>
|
|
10
|
+
(or input-ui / textarea-ui) as the primary input.
|
|
11
|
+
|
|
12
|
+
Backwards compat — <chat-shell> still recognizes the legacy
|
|
13
|
+
<chat-input-ui data-chat-input> shape via :is() selector. New
|
|
14
|
+
code should prefer <chat-composer>.
|
|
15
|
+
|
|
16
|
+
*
|
|
17
|
+
* @see https://ui-kit.exe.xyz/site/components/chat-composer
|
|
18
|
+
*
|
|
19
|
+
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
20
|
+
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
21
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
22
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
23
|
+
* needed beyond what the yaml `events:` block can express.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { UIElement } from '../../../web-components/core/element.js';
|
|
27
|
+
|
|
28
|
+
export interface ChatComposerComposerSubmitEventDetail {
|
|
29
|
+
model: string;
|
|
30
|
+
text: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type ChatComposerComposerSubmitEvent = CustomEvent<ChatComposerComposerSubmitEventDetail>;
|
|
34
|
+
|
|
35
|
+
export class UIChatComposer extends UIElement {
|
|
36
|
+
/** Reflected — set by the host while streaming, or by application
|
|
37
|
+
code. Propagated to the inner input element automatically.
|
|
38
|
+
*/
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
|
|
41
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
42
|
+
type: K,
|
|
43
|
+
listener: (this: UIChatComposer, ev: HTMLElementEventMap[K]) => unknown,
|
|
44
|
+
options?: boolean | AddEventListenerOptions,
|
|
45
|
+
): void;
|
|
46
|
+
addEventListener(type: 'composer-submit', listener: (ev: ChatComposerComposerSubmitEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
47
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<chat-shell-ui>` — Behavior-only chat orchestrator (LLM-streaming module). Author supplies the
|
|
3
|
+
DOM structure via [data-chat-messages], [data-chat-input], [data-chat-empty],
|
|
4
|
+
[data-chat-status] elements; chat-shell wires message streaming, markdown
|
|
5
|
+
rendering, code-block upgrades, and an LLM integration path via proxy-url
|
|
6
|
+
(or via external submit).
|
|
7
|
+
|
|
8
|
+
*
|
|
9
|
+
* @see https://ui-kit.exe.xyz/site/components/chat-shell
|
|
10
|
+
*
|
|
11
|
+
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
12
|
+
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
13
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
14
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
15
|
+
* needed beyond what the yaml `events:` block can express.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { UIElement } from '../../../web-components/core/element.js';
|
|
19
|
+
|
|
20
|
+
export type ChatShellAbortEvent = CustomEvent<unknown>;
|
|
21
|
+
export interface ChatShellChunkEventDetail {
|
|
22
|
+
snapshot: string;
|
|
23
|
+
text: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ChatShellChunkEvent = CustomEvent<ChatShellChunkEventDetail>;
|
|
27
|
+
export type ChatShellClearEvent = CustomEvent<unknown>;
|
|
28
|
+
export interface ChatShellDoneEventDetail {
|
|
29
|
+
stopReason: string;
|
|
30
|
+
text: string;
|
|
31
|
+
usage: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ChatShellDoneEvent = CustomEvent<ChatShellDoneEventDetail>;
|
|
35
|
+
export interface ChatShellErrorEventDetail {
|
|
36
|
+
error: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type ChatShellErrorEvent = CustomEvent<ChatShellErrorEventDetail>;
|
|
40
|
+
export interface ChatShellMessageEventDetail {
|
|
41
|
+
content: string;
|
|
42
|
+
id: string;
|
|
43
|
+
role: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type ChatShellMessageEvent = CustomEvent<ChatShellMessageEventDetail>;
|
|
47
|
+
export interface ChatShellSubmitEventDetail {
|
|
48
|
+
model: string;
|
|
49
|
+
text: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type ChatShellSubmitEvent = CustomEvent<ChatShellSubmitEventDetail>;
|
|
53
|
+
export interface ChatShellThinkingEventDetail {
|
|
54
|
+
text: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type ChatShellThinkingEvent = CustomEvent<ChatShellThinkingEventDetail>;
|
|
58
|
+
|
|
59
|
+
export class UIChatShell extends UIElement {
|
|
60
|
+
/** Model identifier. */
|
|
61
|
+
model: string;
|
|
62
|
+
/** LLM provider name (anthropic | openai | google | stub). */
|
|
63
|
+
provider: string;
|
|
64
|
+
/** API proxy endpoint for LLM calls; enables self-contained chat without external wiring. */
|
|
65
|
+
proxyUrl: string;
|
|
66
|
+
/** Active streaming indicator; toggled while a response is being received. */
|
|
67
|
+
streaming: boolean;
|
|
68
|
+
/** System prompt prepended to conversations. */
|
|
69
|
+
system: string;
|
|
70
|
+
/** Enable Anthropic extended-thinking mode. */
|
|
71
|
+
thinking: boolean;
|
|
72
|
+
|
|
73
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
74
|
+
type: K,
|
|
75
|
+
listener: (this: UIChatShell, ev: HTMLElementEventMap[K]) => unknown,
|
|
76
|
+
options?: boolean | AddEventListenerOptions,
|
|
77
|
+
): void;
|
|
78
|
+
addEventListener(type: 'abort', listener: (ev: ChatShellAbortEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
79
|
+
addEventListener(type: 'chunk', listener: (ev: ChatShellChunkEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
80
|
+
addEventListener(type: 'clear', listener: (ev: ChatShellClearEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
81
|
+
addEventListener(type: 'done', listener: (ev: ChatShellDoneEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
82
|
+
addEventListener(type: 'error', listener: (ev: ChatShellErrorEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
83
|
+
addEventListener(type: 'message', listener: (ev: ChatShellMessageEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
84
|
+
addEventListener(type: 'submit', listener: (ev: ChatShellSubmitEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
85
|
+
addEventListener(type: 'thinking', listener: (ev: ChatShellThinkingEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
86
|
+
}
|
|
@@ -11,6 +11,10 @@ description: |
|
|
|
11
11
|
rendering, code-block upgrades, and an LLM integration path via proxy-url
|
|
12
12
|
(or via external submit).
|
|
13
13
|
|
|
14
|
+
# Per ADR-0027 — primitives that programmatically create other primitives
|
|
15
|
+
# do NOT auto-import them. Consumer (or demo shell) must explicitly import.
|
|
16
|
+
composes:
|
|
17
|
+
- code-ui
|
|
14
18
|
props:
|
|
15
19
|
streaming:
|
|
16
20
|
type: boolean
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<chat-sidebar-ui>` — Module-tier chat-cluster sidebar — owns resize, snap-to-collapsed,
|
|
3
|
+
persistence, and the [collapsed] reflected attribute. Sits inside
|
|
4
|
+
<chat-shell> as slot="leading" (conversation history rail) or
|
|
5
|
+
slot="trailing" (artifacts/citations panel). Mirrors the admin-sidebar
|
|
6
|
+
shape — same 4 concerns, cluster-namespaced for the chat family.
|
|
7
|
+
|
|
8
|
+
This is the chat-cluster equivalent of <admin-sidebar> per ADR-0023.
|
|
9
|
+
<chat-shell> doesn't currently have a legacy sidebar shape (chat is
|
|
10
|
+
typically a single-pane experience), so <chat-sidebar> is purely
|
|
11
|
+
forward-looking — for chat apps that want conversation-history or
|
|
12
|
+
inspector rails.
|
|
13
|
+
|
|
14
|
+
*
|
|
15
|
+
* @see https://ui-kit.exe.xyz/site/components/chat-sidebar
|
|
16
|
+
*
|
|
17
|
+
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
18
|
+
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
19
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
20
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
21
|
+
* needed beyond what the yaml `events:` block can express.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { UIElement } from '../../../web-components/core/element.js';
|
|
25
|
+
|
|
26
|
+
export interface ChatSidebarSidebarResizeEventDetail {
|
|
27
|
+
name: string;
|
|
28
|
+
width: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type ChatSidebarSidebarResizeEvent = CustomEvent<ChatSidebarSidebarResizeEventDetail>;
|
|
32
|
+
export interface ChatSidebarSidebarToggleEventDetail {
|
|
33
|
+
expanded: string;
|
|
34
|
+
name: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type ChatSidebarSidebarToggleEvent = CustomEvent<ChatSidebarSidebarToggleEventDetail>;
|
|
38
|
+
|
|
39
|
+
export class UIChatSidebar extends UIElement {
|
|
40
|
+
/** Reflected — set when the sidebar's measured width is at or below
|
|
41
|
+
96px. Consumers query this to style "collapsed mode" without
|
|
42
|
+
duplicating threshold math.
|
|
43
|
+
*/
|
|
44
|
+
collapsed: boolean;
|
|
45
|
+
/** Opts in to programmatic collapse — toggle button wiring + the
|
|
46
|
+
.toggle() / .collapse() / .expand() public methods.
|
|
47
|
+
*/
|
|
48
|
+
collapsible: boolean;
|
|
49
|
+
/** Identifier for localStorage namespacing. Defaults to slot value
|
|
50
|
+
("leading" or "trailing"). Override when running multiple sidebars
|
|
51
|
+
with the same slot.
|
|
52
|
+
*/
|
|
53
|
+
name: string;
|
|
54
|
+
/** Opts in to drag-to-resize behavior. Author supplies a child
|
|
55
|
+
[data-resize] element as the drag handle.
|
|
56
|
+
*/
|
|
57
|
+
resizable: boolean;
|
|
58
|
+
/** Reflected — set during an active pointer-drag on the resize handle.
|
|
59
|
+
Useful for suppressing transitions while dragging.
|
|
60
|
+
*/
|
|
61
|
+
resizing: boolean;
|
|
62
|
+
|
|
63
|
+
addEventListener<K extends keyof HTMLElementEventMap>(
|
|
64
|
+
type: K,
|
|
65
|
+
listener: (this: UIChatSidebar, ev: HTMLElementEventMap[K]) => unknown,
|
|
66
|
+
options?: boolean | AddEventListenerOptions,
|
|
67
|
+
): void;
|
|
68
|
+
addEventListener(type: 'sidebar-resize', listener: (ev: ChatSidebarSidebarResizeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
69
|
+
addEventListener(type: 'sidebar-toggle', listener: (ev: ChatSidebarSidebarToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
70
|
+
}
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"x-adiaui": {
|
|
35
35
|
"anti_patterns": [],
|
|
36
36
|
"category": "container",
|
|
37
|
+
"composes": [],
|
|
37
38
|
"events": {},
|
|
38
39
|
"examples": [],
|
|
39
40
|
"keywords": [
|
|
@@ -76,6 +77,12 @@
|
|
|
76
77
|
"messages",
|
|
77
78
|
"message-stream"
|
|
78
79
|
],
|
|
80
|
+
"tags": [
|
|
81
|
+
"Chat",
|
|
82
|
+
"conversation",
|
|
83
|
+
"chat-log",
|
|
84
|
+
"message-thread"
|
|
85
|
+
],
|
|
79
86
|
"thread": [
|
|
80
87
|
"conversation",
|
|
81
88
|
"dialogue",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<chat-thread-ui>` — Module-tier chat message thread container — replaces legacy
|
|
3
|
+
<section data-chat-messages> per ADR-0023. Owns scroll-to-bottom
|
|
4
|
+
on new message (with user-scroll-up suspension), [streaming] and
|
|
5
|
+
[empty] reflected attributes, and a stable target for the host's
|
|
6
|
+
message rendering pipeline.
|
|
7
|
+
|
|
8
|
+
Sits inside <chat-shell> as the central scroll surface. Authors
|
|
9
|
+
compose <chat-empty> as an optional first child for the empty
|
|
10
|
+
state; message children are appended dynamically by the host.
|
|
11
|
+
|
|
12
|
+
Backwards compat — <chat-shell> still recognizes the legacy
|
|
13
|
+
<section data-chat-messages> shape via :is() selector. New code
|
|
14
|
+
should prefer <chat-thread>.
|
|
15
|
+
|
|
16
|
+
*
|
|
17
|
+
* @see https://ui-kit.exe.xyz/site/components/chat-thread
|
|
18
|
+
*
|
|
19
|
+
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
20
|
+
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
21
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
22
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
23
|
+
* needed beyond what the yaml `events:` block can express.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { UIElement } from '../../../web-components/core/element.js';
|
|
27
|
+
|
|
28
|
+
export class UIChatThread extends UIElement {
|
|
29
|
+
/** Reflected — set when zero message children. Drives the
|
|
30
|
+
<chat-empty> visibility via CSS — no JS toggling needed.
|
|
31
|
+
*/
|
|
32
|
+
empty: boolean;
|
|
33
|
+
/** Reflected — set by the host while an LLM response is streaming.
|
|
34
|
+
Consumers can style streaming-mode (e.g. cursor blink) via
|
|
35
|
+
:has(chat-thread[streaming]) or attribute selectors.
|
|
36
|
+
*/
|
|
37
|
+
streaming: boolean;
|
|
38
|
+
}
|
|
@@ -1,89 +1,98 @@
|
|
|
1
|
-
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
2
1
|
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
3
2
|
name: ChatThread
|
|
4
3
|
tag: chat-thread
|
|
5
4
|
component: ChatThread
|
|
6
5
|
category: container
|
|
7
6
|
version: 1
|
|
8
|
-
description:
|
|
9
|
-
|
|
7
|
+
description: 'Module-tier chat message thread container — replaces legacy
|
|
8
|
+
|
|
10
9
|
<section data-chat-messages> per ADR-0023. Owns scroll-to-bottom
|
|
10
|
+
|
|
11
11
|
on new message (with user-scroll-up suspension), [streaming] and
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
[empty] reflected attributes, and a stable target for the host''s
|
|
14
|
+
|
|
13
15
|
message rendering pipeline.
|
|
14
16
|
|
|
17
|
+
|
|
15
18
|
Sits inside <chat-shell> as the central scroll surface. Authors
|
|
19
|
+
|
|
16
20
|
compose <chat-empty> as an optional first child for the empty
|
|
21
|
+
|
|
17
22
|
state; message children are appended dynamically by the host.
|
|
18
23
|
|
|
24
|
+
|
|
19
25
|
Backwards compat — <chat-shell> still recognizes the legacy
|
|
26
|
+
|
|
20
27
|
<section data-chat-messages> shape via :is() selector. New code
|
|
28
|
+
|
|
21
29
|
should prefer <chat-thread>.
|
|
22
30
|
|
|
31
|
+
'
|
|
23
32
|
props:
|
|
24
33
|
streaming:
|
|
25
|
-
description:
|
|
26
|
-
|
|
34
|
+
description: 'Reflected — set by the host while an LLM response is streaming.
|
|
35
|
+
|
|
27
36
|
Consumers can style streaming-mode (e.g. cursor blink) via
|
|
37
|
+
|
|
28
38
|
:has(chat-thread[streaming]) or attribute selectors.
|
|
39
|
+
|
|
40
|
+
'
|
|
29
41
|
type: boolean
|
|
30
42
|
default: false
|
|
31
43
|
reflect: true
|
|
32
|
-
|
|
33
44
|
empty:
|
|
34
|
-
description:
|
|
35
|
-
|
|
45
|
+
description: 'Reflected — set when zero message children. Drives the
|
|
46
|
+
|
|
36
47
|
<chat-empty> visibility via CSS — no JS toggling needed.
|
|
48
|
+
|
|
49
|
+
'
|
|
37
50
|
type: boolean
|
|
38
51
|
default: true
|
|
39
52
|
reflect: true
|
|
40
|
-
|
|
41
53
|
events: {}
|
|
42
|
-
|
|
43
54
|
slots:
|
|
44
55
|
default:
|
|
45
|
-
description:
|
|
46
|
-
|
|
47
|
-
<chat-shell>'s rendering pipeline) plus an optional first
|
|
48
|
-
<chat-empty> sibling for the empty state.
|
|
49
|
-
|
|
56
|
+
description: Default — message children (typically appended dynamically by <chat-shell>'s rendering pipeline) plus an
|
|
57
|
+
optional first <chat-empty> sibling for the empty state.
|
|
50
58
|
states:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
- name: idle
|
|
60
|
+
description: Default, no streaming.
|
|
61
|
+
- name: streaming
|
|
62
|
+
attribute: streaming
|
|
63
|
+
description: Host is actively streaming an LLM response.
|
|
64
|
+
- name: empty
|
|
65
|
+
attribute: empty
|
|
66
|
+
description: Zero message children — empty state visible.
|
|
60
67
|
traits: []
|
|
61
|
-
|
|
62
68
|
a2ui:
|
|
63
69
|
rules:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
divs as children.
|
|
69
|
-
- >-
|
|
70
|
-
Place <chat-empty> as an optional first child for the empty
|
|
71
|
-
state; the [empty] reflected attribute drives its visibility
|
|
72
|
-
via CSS (no JS toggling).
|
|
73
|
-
|
|
70
|
+
- chat-thread is the bespoke replacement for legacy <section data-chat-messages> inside <chat-shell>. Use it for the message
|
|
71
|
+
scroll surface; the host appends dynamic message divs as children.
|
|
72
|
+
- Place <chat-empty> as an optional first child for the empty state; the [empty] reflected attribute drives its visibility
|
|
73
|
+
via CSS (no JS toggling).
|
|
74
74
|
keywords:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
- chat-thread
|
|
76
|
+
- message-list
|
|
77
|
+
- conversation
|
|
78
|
+
- thread
|
|
79
|
+
- scroll-surface
|
|
81
80
|
synonyms:
|
|
82
|
-
thread:
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
thread:
|
|
82
|
+
- conversation
|
|
83
|
+
- dialogue
|
|
84
|
+
- chat-log
|
|
85
|
+
- transcript
|
|
86
|
+
message-list:
|
|
87
|
+
- messages
|
|
88
|
+
- message-stream
|
|
89
|
+
tags:
|
|
90
|
+
- Chat
|
|
91
|
+
- conversation
|
|
92
|
+
- chat-log
|
|
93
|
+
- message-thread
|
|
85
94
|
related:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
95
|
+
- ChatShell
|
|
96
|
+
- ChatEmpty
|
|
97
|
+
- ChatComposer
|
|
98
|
+
- ChatSidebar
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<editor-canvas-ui>` — Module-tier editor canvas surface — replaces legacy <div data-canvas>
|
|
3
|
+
inside <editor-shell> per ADR-0023. Owns scroll/zoom container
|
|
4
|
+
semantics, [empty] and [focused] reflected attributes, and a stable
|
|
5
|
+
target for the host's content rendering pipeline.
|
|
6
|
+
|
|
7
|
+
Sits as the central content region inside <editor-shell>, between
|
|
8
|
+
the optional <editor-sidebar slot="leading"> and <editor-sidebar
|
|
9
|
+
slot="trailing">. Authors compose <editor-canvas-empty> as an
|
|
10
|
+
optional first child for the empty state; canvas content children
|
|
11
|
+
(artboards, document body, etc.) are appended either statically or
|
|
12
|
+
dynamically by the host.
|
|
13
|
+
|
|
14
|
+
Backwards compat — <editor-shell> still recognizes the legacy
|
|
15
|
+
<div data-canvas> shape via :is() selector. New code should prefer
|
|
16
|
+
<editor-canvas>.
|
|
17
|
+
|
|
18
|
+
*
|
|
19
|
+
* @see https://ui-kit.exe.xyz/site/components/editor-canvas
|
|
20
|
+
*
|
|
21
|
+
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
22
|
+
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
23
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
24
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
25
|
+
* needed beyond what the yaml `events:` block can express.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { UIElement } from '../../../web-components/core/element.js';
|
|
29
|
+
|
|
30
|
+
export class UIEditorCanvas extends UIElement {
|
|
31
|
+
/** Reflected — set when zero non-<editor-canvas-empty> children.
|
|
32
|
+
Drives the <editor-canvas-empty> visibility via parent CSS —
|
|
33
|
+
no JS toggling needed.
|
|
34
|
+
*/
|
|
35
|
+
empty: boolean;
|
|
36
|
+
/** Reflected — set when canvas claims focus ownership (programmatic
|
|
37
|
+
.focus() call or toolbar full-screen toggle).
|
|
38
|
+
*/
|
|
39
|
+
focused: boolean;
|
|
40
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `<editor-shell-ui>` — Behavior-only editor shell module for design-tool layouts. Author
|
|
3
|
+
provides the structural DOM — header (topbar), [data-editor-body] with
|
|
4
|
+
pane-ui children ([data-left], [data-right]), [data-canvas] for the
|
|
5
|
+
central surface, and a footer (statusbar). editor-shell wires
|
|
6
|
+
select-ui[data-options] for JSON-parsed option lists.
|
|
7
|
+
|
|
8
|
+
*
|
|
9
|
+
* @see https://ui-kit.exe.xyz/site/components/editor-shell
|
|
10
|
+
*
|
|
11
|
+
* Type declarations generated by scripts/build/dts-codegen.mjs from
|
|
12
|
+
* the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
|
|
13
|
+
* run `npm run build:components`, then `npm run codegen:dts` to
|
|
14
|
+
* regenerate; or hand-author this file fully if rich event types are
|
|
15
|
+
* needed beyond what the yaml `events:` block can express.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { UIElement } from '../../../web-components/core/element.js';
|
|
19
|
+
|
|
20
|
+
export class UIEditorShell extends UIElement {
|
|
21
|
+
}
|