@zeyos/zx 5.5.0 → 5.7.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/CHANGELOG.md +210 -0
- package/README.md +73 -7
- package/bin/zx-css.js +328 -0
- package/dist/types/components/account-menu/account-menu.d.ts +4 -2
- package/dist/types/components/activity-list/activity-list.d.ts +14 -8
- package/dist/types/components/agent-thread/ag-ui.d.ts +340 -0
- package/dist/types/components/agent-thread/agent-thread.d.ts +711 -0
- package/dist/types/components/agent-thread/ui-message-stream.d.ts +401 -0
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +14 -8
- package/dist/types/components/approval-card/approval-card.d.ts +596 -0
- package/dist/types/components/avatar/avatar.d.ts +91 -4
- package/dist/types/components/block-view/block-view.d.ts +205 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +3 -3
- package/dist/types/components/calendar/calendar-model.d.ts +9 -2
- package/dist/types/components/calendar/calendar.d.ts +12 -4
- package/dist/types/components/chart/chart.d.ts +25 -13
- package/dist/types/components/code-editor/code-editor.d.ts +7 -2
- package/dist/types/components/composer/composer.d.ts +938 -0
- package/dist/types/components/composer/queue.d.ts +76 -0
- package/dist/types/components/copy/copy-button.d.ts +6 -4
- package/dist/types/components/copy/copy-input.d.ts +10 -6
- package/dist/types/components/datebox/date-range-box.d.ts +33 -0
- package/dist/types/components/datebox/placeholder.d.ts +7 -0
- package/dist/types/components/dock/dock.d.ts +12 -3
- package/dist/types/components/entity-ref/entity-ref.d.ts +5 -3
- package/dist/types/components/field-upload/field-upload.d.ts +3 -2
- package/dist/types/components/file-item/file-item.d.ts +3 -2
- package/dist/types/components/file-list/file-list.d.ts +14 -8
- package/dist/types/components/filter/filter-model.d.ts +31 -1
- package/dist/types/components/filter/filter.d.ts +20 -2
- package/dist/types/components/finder/finder.d.ts +14 -6
- package/dist/types/components/flag/flag.d.ts +99 -0
- package/dist/types/components/grid/grid.d.ts +1 -1
- package/dist/types/components/kanban-view/kanban-view.d.ts +8 -66
- package/dist/types/components/launcher/launcher.d.ts +2 -0
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +3 -2
- package/dist/types/components/number-field/number-field.d.ts +17 -6
- package/dist/types/components/prompt-starters/prompt-starters.d.ts +107 -0
- package/dist/types/components/prose/prose.d.ts +9 -6
- package/dist/types/components/questionnaire/conditions.d.ts +270 -0
- package/dist/types/components/questionnaire/items.d.ts +52 -30
- package/dist/types/components/questionnaire/questionnaire.d.ts +44 -4
- package/dist/types/components/rating/rating.d.ts +5 -3
- package/dist/types/components/run-status/run-status.d.ts +393 -0
- package/dist/types/components/run-trace/run-trace.d.ts +624 -0
- package/dist/types/components/select/country.d.ts +106 -0
- package/dist/types/components/select/field-adapter.d.ts +2 -1
- package/dist/types/components/select/locale.d.ts +102 -0
- package/dist/types/components/select/select.d.ts +41 -2
- package/dist/types/components/slider/slider.d.ts +1 -0
- package/dist/types/components/sort-control/sort-control.d.ts +7 -3
- package/dist/types/components/source-list/source-list.d.ts +179 -0
- package/dist/types/components/split-view/split-view.d.ts +5 -3
- package/dist/types/components/surface/catalog.d.ts +260 -0
- package/dist/types/components/surface/elicit.d.ts +81 -0
- package/dist/types/components/surface/mcp.d.ts +165 -0
- package/dist/types/components/surface/schema.d.ts +314 -0
- package/dist/types/components/surface/stream.d.ts +118 -0
- package/dist/types/components/surface/surface.d.ts +718 -0
- package/dist/types/components/surface/text.d.ts +277 -0
- package/dist/types/components/surface/validate.d.ts +339 -0
- package/dist/types/components/table/table.d.ts +55 -3
- package/dist/types/components/table/window.d.ts +203 -0
- package/dist/types/components/toolbar/toolbar.d.ts +10 -6
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tree/tree.d.ts +20 -13
- package/dist/types/core/component.d.ts +10 -0
- package/dist/types/core/date.d.ts +8 -1
- package/dist/types/core/dom.d.ts +1 -0
- package/dist/types/core/http.d.ts +10 -0
- package/dist/types/core/i18n.d.ts +38 -0
- package/dist/types/core/messages.d.ts +479 -1
- package/dist/types/core/storage.d.ts +7 -2
- package/dist/types/elements/define.d.ts +21 -46
- package/dist/types/elements/definitions.d.ts +147 -0
- package/dist/types/elements/kit.d.ts +7 -0
- package/dist/types/elements/reflect.d.ts +6 -3
- package/dist/types/index.d.ts +18 -1
- package/dist/types/internal/agent-model.d.ts +587 -0
- package/dist/types/internal/date-locale.d.ts +7 -0
- package/dist/types/internal/highlight.d.ts +24 -0
- package/dist/types/internal/json-patch.d.ts +146 -0
- package/dist/types/internal/presence-loop.d.ts +148 -0
- package/dist/types/locales/de.d.ts +13 -0
- package/dist/types/locales/en.d.ts +2 -0
- package/dist/types/locales/index.d.ts +823 -0
- package/dist/types/zeyos/view.d.ts +8 -1
- package/dist/zx-zeyos.esm.js +20505 -18748
- package/dist/zx-zeyos.esm.min.js +5 -5
- package/dist/zx.core.css +1276 -0
- package/dist/zx.core.min.css +1 -0
- package/dist/zx.css +2424 -134
- package/dist/zx.esm.js +46167 -28468
- package/dist/zx.esm.min.js +40 -8
- package/dist/zx.global.js +46167 -28468
- package/dist/zx.global.min.js +40 -8
- package/dist/zx.layered.css +17302 -0
- package/dist/zx.layered.min.css +1 -0
- package/dist/zx.min.css +1 -1
- package/docs/agent-catalog.json +12501 -0
- package/docs/agent-surfaces.md +340 -0
- package/docs/api.json +2057 -166
- package/docs/llms.md +1458 -58
- package/docs/llms.txt +38 -8
- package/package.json +29 -6
- package/src/components/account-menu/account-menu.js +6 -3
- package/src/components/activity-item/activity-item.js +2 -1
- package/src/components/activity-list/activity-list.js +16 -10
- package/src/components/agent-thread/ag-ui.js +1439 -0
- package/src/components/agent-thread/agent-thread.css +417 -0
- package/src/components/agent-thread/agent-thread.js +1670 -0
- package/src/components/agent-thread/ui-message-stream.js +1281 -0
- package/src/components/app-sidebar/app-sidebar.js +18 -8
- package/src/components/approval-card/approval-card.css +289 -0
- package/src/components/approval-card/approval-card.js +1378 -0
- package/src/components/avatar/avatar.css +56 -1
- package/src/components/avatar/avatar.js +148 -26
- package/src/components/block-view/block-view.css +300 -0
- package/src/components/block-view/block-view.js +524 -0
- package/src/components/breadcrumb/breadcrumb.js +8 -5
- package/src/components/calendar/calendar-model.js +8 -2
- package/src/components/calendar/calendar.js +53 -18
- package/src/components/chart/chart.js +54 -23
- package/src/components/code-editor/code-editor.js +45 -8
- package/src/components/code-editor/field-adapter.js +1 -1
- package/src/components/composer/composer.css +482 -0
- package/src/components/composer/composer.js +1815 -0
- package/src/components/composer/queue.js +78 -0
- package/src/components/context-menu/context-menu.js +12 -1
- package/src/components/copy/copy-button.js +9 -7
- package/src/components/copy/copy-input.js +10 -6
- package/src/components/date-picker/date-picker.js +2 -1
- package/src/components/date-picker/date-range-picker.js +8 -7
- package/src/components/datebox/date-range-box.js +3 -9
- package/src/components/datebox/datebox.js +18 -21
- package/src/components/datebox/placeholder.js +18 -0
- package/src/components/dialog/dialog.js +1 -1
- package/src/components/dock/dock.js +34 -13
- package/src/components/entity-ref/entity-ref.js +16 -5
- package/src/components/field-upload/field-upload.js +81 -38
- package/src/components/file-item/file-item.js +70 -40
- package/src/components/file-list/file-list.js +15 -9
- package/src/components/filter/filter-model.js +46 -8
- package/src/components/filter/filter.css +3 -3
- package/src/components/filter/filter.js +29 -10
- package/src/components/filter-panel/filter-panel.js +13 -5
- package/src/components/finder/finder.js +50 -26
- package/src/components/flag/flag.css +40 -0
- package/src/components/flag/flag.js +177 -0
- package/src/components/form/form.js +1 -1
- package/src/components/grid/grid.js +22 -8
- package/src/components/kanban-view/kanban-view.js +51 -81
- package/src/components/launcher/launcher.js +17 -2
- package/src/components/list-toolbar/list-toolbar.js +2 -1
- package/src/components/master-panel/master-panel.js +1 -1
- package/src/components/menu-button/menu-button.js +4 -0
- package/src/components/message/message.js +3 -0
- package/src/components/multi-value-editor/multi-value-editor.js +10 -9
- package/src/components/navigation-bar/navigation-bar.js +3 -3
- package/src/components/number-field/number-field.js +29 -13
- package/src/components/prompt-starters/prompt-starters.css +91 -0
- package/src/components/prompt-starters/prompt-starters.js +206 -0
- package/src/components/prose/prose.js +14 -10
- package/src/components/questionnaire/conditions.js +666 -0
- package/src/components/questionnaire/items.js +150 -41
- package/src/components/questionnaire/questionnaire.js +126 -32
- package/src/components/rating/rating.js +5 -4
- package/src/components/run-status/run-status.css +208 -0
- package/src/components/run-status/run-status.js +782 -0
- package/src/components/run-trace/run-trace.css +443 -0
- package/src/components/run-trace/run-trace.js +1209 -0
- package/src/components/select/country.js +136 -0
- package/src/components/select/field-adapter.js +7 -2
- package/src/components/select/locale.js +219 -0
- package/src/components/select/select.css +20 -22
- package/src/components/select/select.js +94 -12
- package/src/components/sheet/sheet-stack.js +10 -1
- package/src/components/slider/slider.js +7 -2
- package/src/components/sort-control/sort-control.js +15 -5
- package/src/components/source-list/source-list.css +208 -0
- package/src/components/source-list/source-list.js +358 -0
- package/src/components/split-view/split-view.js +5 -3
- package/src/components/surface/catalog.js +1334 -0
- package/src/components/surface/elicit.js +107 -0
- package/src/components/surface/mcp.js +243 -0
- package/src/components/surface/schema.js +644 -0
- package/src/components/surface/stream.js +245 -0
- package/src/components/surface/surface.css +308 -0
- package/src/components/surface/surface.js +2291 -0
- package/src/components/surface/text.js +513 -0
- package/src/components/surface/validate.js +2218 -0
- package/src/components/tabbox/tabbox.js +9 -0
- package/src/components/table/table.css +63 -3
- package/src/components/table/table.js +167 -28
- package/src/components/table/window.js +317 -0
- package/src/components/toolbar/toolbar.js +12 -7
- package/src/components/tooltip/tooltip.css +2 -3
- package/src/components/tooltip/tooltip.js +32 -5
- package/src/components/tree/tree.js +53 -23
- package/src/core/component.js +25 -1
- package/src/core/date.js +62 -16
- package/src/core/dom.js +22 -2
- package/src/core/format.js +15 -13
- package/src/core/http.js +29 -20
- package/src/core/i18n.js +83 -10
- package/src/core/keyboard.js +79 -8
- package/src/core/messages.js +519 -2
- package/src/core/overlay-host.js +1 -0
- package/src/core/storage.js +59 -6
- package/src/elements/define.js +178 -130
- package/src/elements/definitions.js +229 -0
- package/src/elements/kit.js +444 -0
- package/src/elements/reflect.js +8 -3
- package/src/index.js +18 -1
- package/src/internal/agent-model.js +488 -0
- package/src/internal/date-locale.js +11 -0
- package/src/internal/highlight.js +104 -0
- package/src/internal/json-patch.js +405 -0
- package/src/internal/presence-loop.js +343 -0
- package/src/locales/de.js +911 -0
- package/src/locales/en.js +2 -0
- package/src/locales/index.js +7 -0
- package/src/zeyos/calendar.js +2 -1
- package/src/zeyos/form.js +2 -1
- package/src/zeyos/launcher.js +7 -6
- package/src/zeyos/module-bar.js +2 -1
- package/src/zeyos/schema.js +37 -23
- package/src/zeyos/select.js +4 -3
- package/src/zeyos/table.js +2 -13
- package/src/zeyos/view.js +57 -17
- package/styles/core.css +11 -0
- package/styles/tokens/semantic.css +1 -0
- package/styles/zeyos.css +2 -0
- package/styles/zx.css +11 -8
- package/styles/zx.layered.css +1 -0
|
@@ -29,12 +29,17 @@ export type NamespacedStorage = {
|
|
|
29
29
|
* Deletes every key in the namespace, leaving other namespaces alone.
|
|
30
30
|
*/
|
|
31
31
|
clear: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Copies listed valid legacy keys once if absent.
|
|
34
|
+
*/
|
|
35
|
+
migrateLegacy: (keys: string[]) => string[];
|
|
32
36
|
};
|
|
33
37
|
/**
|
|
34
38
|
* Creates a namespaced, JSON-encoded view of `localStorage` or `sessionStorage`.
|
|
35
39
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
40
|
+
* Keys use `zx2:<namespace length>:<namespace>:<key>`, so namespaces cannot overlap. Existing
|
|
41
|
+
* `zx:` keys are copied only when explicitly requested through `migrateLegacy(keys)`; they are
|
|
42
|
+
* never deleted. `clear()` only touches the current namespace. When the storage area is
|
|
38
43
|
* unavailable or refuses a write — private browsing, a full quota, cookies disabled — the view
|
|
39
44
|
* transparently falls back to an in-memory map that lives as long as the page, so callers never
|
|
40
45
|
* need a try/catch and never see an exception.
|
|
@@ -1,48 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
/**
|
|
5
|
-
* Attribute representation.
|
|
6
|
-
*/
|
|
7
|
-
type?: AttributeType;
|
|
8
|
-
/**
|
|
9
|
-
* Component option name; null keeps the value on the host only.
|
|
10
|
-
*/
|
|
11
|
-
option?: string | null;
|
|
12
|
-
/**
|
|
13
|
-
* Host property name; defaults to camel-cased attribute name.
|
|
14
|
-
*/
|
|
15
|
-
property?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Property value used while the attribute is absent.
|
|
18
|
-
*/
|
|
19
|
-
default?: unknown;
|
|
20
|
-
/**
|
|
21
|
-
* Pass the default to the component during initial creation.
|
|
22
|
-
*/
|
|
23
|
-
always?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Recreate the component when this value changes.
|
|
26
|
-
*/
|
|
27
|
-
rebuild?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Value adapter.
|
|
30
|
-
*/
|
|
31
|
-
normalize?: (value: unknown, host: HTMLElement) => unknown;
|
|
32
|
-
/**
|
|
33
|
-
* Property serializer override.
|
|
34
|
-
*/
|
|
35
|
-
serialize?: (value: unknown, host: HTMLElement) => string | null | typeof INVALID_ATTRIBUTE;
|
|
36
|
-
/**
|
|
37
|
-
* Live component setter.
|
|
38
|
-
*/
|
|
39
|
-
set?: (component: InstanceType<typeof import('../core/component.js').Component>, value: any, host: HTMLElement) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Live component getter.
|
|
42
|
-
*/
|
|
43
|
-
get?: (component: InstanceType<typeof import('../core/component.js').Component>, host: HTMLElement) => unknown;
|
|
44
|
-
};
|
|
45
|
-
export type ElementAttributeMap = Record<string, AttributeType | ElementAttribute>;
|
|
1
|
+
export type ElementAttribute = import('./definitions.js').ElementAttribute;
|
|
2
|
+
export type ElementAttributeMap = import('./definitions.js').ElementAttributeMap;
|
|
3
|
+
export type ElementMethodMap = import('./definitions.js').ElementMethodMap;
|
|
46
4
|
export type ElementWrapperOptions = {
|
|
47
5
|
/**
|
|
48
6
|
* Whether the element participates in native forms.
|
|
@@ -52,17 +10,34 @@ export type ElementWrapperOptions = {
|
|
|
52
10
|
* Reflected attribute definitions.
|
|
53
11
|
*/
|
|
54
12
|
attrs?: ElementAttributeMap;
|
|
13
|
+
/**
|
|
14
|
+
* The component's events. Declared, each also reaches the
|
|
15
|
+
* host under its plain name, and no DOM event of that name passes through from inside the
|
|
16
|
+
* component. Left out, the common `zx-*` set is bridged.
|
|
17
|
+
*/
|
|
18
|
+
events?: string[] | null;
|
|
19
|
+
/**
|
|
20
|
+
* Component methods the element forwards. Declared,
|
|
21
|
+
* the element also carries its live values across a rebuild and across removal.
|
|
22
|
+
*/
|
|
23
|
+
methods?: ElementMethodMap | null;
|
|
55
24
|
};
|
|
56
25
|
/**
|
|
57
26
|
* Creates a light-DOM custom-element class backed by a Zx component.
|
|
58
27
|
* Groupbox and Dialog wrappers adopt their host's initial children as component content;
|
|
59
28
|
* other wrappers leave unrelated host children untouched and append their component root.
|
|
60
29
|
*
|
|
30
|
+
* A wrapper that declares `methods` forwards them: `element.upsert(item)` calls the component, and
|
|
31
|
+
* a call made while no component exists is queued and runs, in order, once it does. A forwarded
|
|
32
|
+
* call returns the component's answer, with the component itself replaced by the element; a
|
|
33
|
+
* queued call returns undefined. A wrapper that declares `events` dispatches each one on the host
|
|
34
|
+
* under its plain name as well as `zx-<type>`. The plain event does not bubble; `zx-<type>` does.
|
|
35
|
+
*
|
|
61
36
|
* @param {typeof import('../core/component.js').Component} ComponentClass Component constructor.
|
|
62
37
|
* @param {ElementWrapperOptions} [wrapperOptions={}] Wrapper behavior.
|
|
63
38
|
* @returns {typeof HTMLElement} Custom-element constructor.
|
|
64
39
|
*/
|
|
65
|
-
export declare function elementFor(ComponentClass: typeof import('../core/component.js').Component, { formAssociated, attrs }?: ElementWrapperOptions): typeof HTMLElement;
|
|
40
|
+
export declare function elementFor(ComponentClass: typeof import('../core/component.js').Component, { formAssociated, attrs, events, methods }?: ElementWrapperOptions): typeof HTMLElement;
|
|
66
41
|
/**
|
|
67
42
|
* Registers the supported Zx custom elements. Repeated calls and pre-registered names are safe.
|
|
68
43
|
* This function is deliberately not called by the module.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { INVALID_ATTRIBUTE } from './reflect.js';
|
|
2
|
+
export type AttributeType = import('./reflect.js').AttributeType;
|
|
3
|
+
export type ElementAttribute = {
|
|
4
|
+
/**
|
|
5
|
+
* Attribute representation.
|
|
6
|
+
*/
|
|
7
|
+
type?: AttributeType;
|
|
8
|
+
/**
|
|
9
|
+
* Component option name; null keeps the value on the host only.
|
|
10
|
+
*/
|
|
11
|
+
option?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Host property name; defaults to camel-cased attribute name.
|
|
14
|
+
*/
|
|
15
|
+
property?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Property value used while the attribute is absent.
|
|
18
|
+
*/
|
|
19
|
+
default?: unknown;
|
|
20
|
+
/**
|
|
21
|
+
* Pass the default to the component during initial creation.
|
|
22
|
+
*/
|
|
23
|
+
always?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Recreate the component when this value changes.
|
|
26
|
+
*/
|
|
27
|
+
rebuild?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Write a value set on the property back to the attribute.
|
|
30
|
+
*/
|
|
31
|
+
reflect?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Read the attribute at all; false makes this a property alone.
|
|
34
|
+
*/
|
|
35
|
+
observed?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Value adapter.
|
|
38
|
+
*/
|
|
39
|
+
normalize?: (value: unknown, host: HTMLElement) => unknown;
|
|
40
|
+
/**
|
|
41
|
+
* Property serializer override.
|
|
42
|
+
*/
|
|
43
|
+
serialize?: (value: unknown, host: HTMLElement) => string | null | typeof INVALID_ATTRIBUTE;
|
|
44
|
+
/**
|
|
45
|
+
* Live component setter.
|
|
46
|
+
*/
|
|
47
|
+
set?: (component: InstanceType<typeof import('../core/component.js').Component>, value: any, host: HTMLElement) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Live component getter.
|
|
50
|
+
*/
|
|
51
|
+
get?: (component: any, host: HTMLElement) => unknown;
|
|
52
|
+
};
|
|
53
|
+
export type ElementAttributeMap = Record<string, AttributeType | ElementAttribute>;
|
|
54
|
+
export type MethodTracker = ((args: unknown[]) => Record<string, unknown> | null | undefined) | null;
|
|
55
|
+
export type ElementMethodMap = Record<string, MethodTracker>;
|
|
56
|
+
/**
|
|
57
|
+
* Fills in every field of an attribute map. Normalizing an already normalized map changes nothing.
|
|
58
|
+
* @param {ElementAttributeMap} attrs Attribute name to definition.
|
|
59
|
+
* @returns {Readonly<Record<string, ElementAttribute>>}
|
|
60
|
+
*/
|
|
61
|
+
export declare function normalizeAttributes(attrs: ElementAttributeMap): Readonly<Record<string, ElementAttribute>>;
|
|
62
|
+
/** @param {Record<string, ElementAttribute>} value @returns {Readonly<Record<string, ElementAttribute>>} */
|
|
63
|
+
export declare function attributes(value: Record<string, ElementAttribute>): Readonly<Record<string, ElementAttribute>>;
|
|
64
|
+
/** @param {Partial<ElementAttribute>} [options={}] @returns {ElementAttribute} */
|
|
65
|
+
export declare function text(options?: Partial<ElementAttribute>): ElementAttribute;
|
|
66
|
+
/** @param {Partial<ElementAttribute>} [options={}] @returns {ElementAttribute} */
|
|
67
|
+
export declare function number(options?: Partial<ElementAttribute>): ElementAttribute;
|
|
68
|
+
/** @param {Partial<ElementAttribute>} [options={}] @returns {ElementAttribute} */
|
|
69
|
+
export declare function bool(options?: Partial<ElementAttribute>): ElementAttribute;
|
|
70
|
+
/** @param {Partial<ElementAttribute>} [options={}] @returns {ElementAttribute} */
|
|
71
|
+
export declare function json(options?: Partial<ElementAttribute>): ElementAttribute;
|
|
72
|
+
/**
|
|
73
|
+
* An option that is on by default, or that stays undecided (`default: null`) until it is set.
|
|
74
|
+
* @param {Partial<ElementAttribute>} [options={}]
|
|
75
|
+
* @returns {ElementAttribute}
|
|
76
|
+
*/
|
|
77
|
+
export declare function flag(options?: Partial<ElementAttribute>): ElementAttribute;
|
|
78
|
+
/**
|
|
79
|
+
* Rich data: a JSON attribute is read for static markup, and a value set on the property stays
|
|
80
|
+
* there, never serialized back into the attribute.
|
|
81
|
+
* @param {Partial<ElementAttribute>} [options={}]
|
|
82
|
+
* @returns {ElementAttribute}
|
|
83
|
+
*/
|
|
84
|
+
export declare function data(options?: Partial<ElementAttribute>): ElementAttribute;
|
|
85
|
+
/**
|
|
86
|
+
* A value markup cannot express: a function, a node, an adapter. It has no attribute at all.
|
|
87
|
+
* @param {Partial<ElementAttribute>} [options={}]
|
|
88
|
+
* @returns {ElementAttribute}
|
|
89
|
+
*/
|
|
90
|
+
export declare function prop(options?: Partial<ElementAttribute>): ElementAttribute;
|
|
91
|
+
/**
|
|
92
|
+
* Reflects the plain values of an option that also takes a function, an object or a node. Those
|
|
93
|
+
* stay on the property, because their text would mean nothing in an attribute.
|
|
94
|
+
* @param {AttributeType} type Attribute representation.
|
|
95
|
+
* @returns {(value: unknown) => string|null|typeof INVALID_ATTRIBUTE}
|
|
96
|
+
*/
|
|
97
|
+
export declare function reflectPlain(type: AttributeType): (value: unknown) => string | null | typeof INVALID_ATTRIBUTE;
|
|
98
|
+
/** @param {unknown} value @returns {unknown} */
|
|
99
|
+
export declare function normalizeSelectable(value: unknown): unknown;
|
|
100
|
+
/** @param {unknown} value @returns {unknown} */
|
|
101
|
+
export declare function normalizeNumberOrString(value: unknown): unknown;
|
|
102
|
+
/**
|
|
103
|
+
* Declares forwarded methods that need no property bookkeeping.
|
|
104
|
+
* @param {...string} names Method names.
|
|
105
|
+
* @returns {ElementMethodMap}
|
|
106
|
+
*/
|
|
107
|
+
export declare function forward(...names: string[]): ElementMethodMap;
|
|
108
|
+
/**
|
|
109
|
+
* A tracker for a method whose first argument is the new value of one property.
|
|
110
|
+
* @param {string} property Host property name.
|
|
111
|
+
* @returns {MethodTracker}
|
|
112
|
+
*/
|
|
113
|
+
export declare function records(property: string): MethodTracker;
|
|
114
|
+
/**
|
|
115
|
+
* A tracker for a method whose first argument is a partial set of options, keyed as the
|
|
116
|
+
* properties are.
|
|
117
|
+
* @param {unknown[]} args Call arguments.
|
|
118
|
+
* @returns {Record<string, unknown>|null}
|
|
119
|
+
*/
|
|
120
|
+
export declare function recordsPatch([partial]: unknown[]): Record<string, unknown> | null;
|
|
121
|
+
/**
|
|
122
|
+
* The calls made on an element before its component exists, oldest first.
|
|
123
|
+
* @returns {{size: number, push: (name: string, args: unknown[]) => void, drain: (run: (name: string, args: unknown[]) => void, ready?: () => boolean) => void}}
|
|
124
|
+
*/
|
|
125
|
+
export declare function createCallQueue(): {
|
|
126
|
+
size: number;
|
|
127
|
+
push: (name: string, args: unknown[]) => void;
|
|
128
|
+
drain: (run: (name: string, args: unknown[]) => void, ready?: () => boolean) => void;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* What a forwarded call returns: the component's answer, with the component itself swapped for
|
|
132
|
+
* the element, so a chain stays on the element.
|
|
133
|
+
* @param {unknown} value Component method result.
|
|
134
|
+
* @param {object} component Backing component.
|
|
135
|
+
* @param {HTMLElement} host Custom element.
|
|
136
|
+
* @returns {unknown}
|
|
137
|
+
*/
|
|
138
|
+
export declare function forwardedResult(value: unknown, component: object, host: HTMLElement): unknown;
|
|
139
|
+
/**
|
|
140
|
+
* Whether a call to a method the DOM also defines is the DOM's. `element.remove()` removes the
|
|
141
|
+
* element and `element.remove(id)` an item; `element.append(node)` adds a child and
|
|
142
|
+
* `element.append(block)` a block.
|
|
143
|
+
* @param {string} name Method name.
|
|
144
|
+
* @param {unknown[]} args Call arguments.
|
|
145
|
+
* @returns {boolean}
|
|
146
|
+
*/
|
|
147
|
+
export declare function isDomCall(name: string, args: unknown[]): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ElementAttribute = import('./definitions.js').ElementAttribute;
|
|
2
|
+
/**
|
|
3
|
+
* The agent kit and the data views, as `[suffix, Component, wrapper options]`. None of them is a
|
|
4
|
+
* form control, so none is form-associated.
|
|
5
|
+
* @type {ReadonlyArray<[string, typeof import('../core/component.js').Component, import('./define.js').ElementWrapperOptions]>}
|
|
6
|
+
*/
|
|
7
|
+
export declare const KIT_ELEMENTS: ReadonlyArray<[string, typeof import('../core/component.js').Component, import('./define.js').ElementWrapperOptions]>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Attribute value types supported by the custom-element wrappers.
|
|
3
|
-
*
|
|
2
|
+
* Attribute value types supported by the custom-element wrappers. `boolean` goes by presence, so
|
|
3
|
+
* an absent attribute means false. `flag` is the shape of HTML's `draggable="false"`, for an option
|
|
4
|
+
* that is on (or undecided) by default: absent keeps the default, `"false"` turns it off, anything
|
|
5
|
+
* else turns it on.
|
|
6
|
+
* @typedef {'string'|'number'|'boolean'|'flag'|'json'} AttributeType
|
|
4
7
|
*/
|
|
5
|
-
export type AttributeType = 'string' | 'number' | 'boolean' | 'json';
|
|
8
|
+
export type AttributeType = 'string' | 'number' | 'boolean' | 'flag' | 'json';
|
|
6
9
|
/** Sentinel returned when an attribute value cannot be safely applied. */
|
|
7
10
|
export declare const INVALID_ATTRIBUTE: unique symbol;
|
|
8
11
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { position } from './core/position.js';
|
|
|
13
13
|
export { breakpoints, breakpointOf, matchBreakpoint, onBreakpoint } from './core/breakpoint.js';
|
|
14
14
|
export { MOTION_ATTRIBUTE, prefersReducedMotion, watchMotion } from './core/motion.js';
|
|
15
15
|
export { Http, zeyosService, parseResult } from './core/http.js';
|
|
16
|
-
export { setTranslator, setLanguage, getLanguage, translate, printf, defaultMessages } from './core/i18n.js';
|
|
16
|
+
export { setTranslator, setLanguage, getLanguage, translate, translatePlural, printf, defaultMessages } from './core/i18n.js';
|
|
17
17
|
export { focusTrap, rovingTabindex, typeahead } from './core/keyboard.js';
|
|
18
18
|
export { formatDate, parseDate, clampDate, isSameDay, addDays, addMonths, getWeekStart } from './core/date.js';
|
|
19
19
|
export { icon, icons, iconNames, registerIcons, ICON_SIZE, configureIcons, getIconConfig, useFontAwesome, useBuiltinIcons, loadFontAwesome } from './core/icons.js';
|
|
@@ -62,6 +62,21 @@ export { FileItem, normalizeFileItem } from './components/file-item/file-item.js
|
|
|
62
62
|
export { FileList, normalizeFileListItems } from './components/file-list/file-list.js';
|
|
63
63
|
export { ActivityItem, resolveActivityActions, normalizeActivityAction, normalizeActivityTimestamp } from './components/activity-item/activity-item.js';
|
|
64
64
|
export { ActivityList, groupActivityItems, normalizeActivityItems } from './components/activity-list/activity-list.js';
|
|
65
|
+
export { BlockView, renderBlocks } from './components/block-view/block-view.js';
|
|
66
|
+
export { blocksToMarkdown, blocksToText } from './internal/agent-model.js';
|
|
67
|
+
export { RunStatus } from './components/run-status/run-status.js';
|
|
68
|
+
export { Composer } from './components/composer/composer.js';
|
|
69
|
+
export { PromptStarters } from './components/prompt-starters/prompt-starters.js';
|
|
70
|
+
export { ApprovalCard } from './components/approval-card/approval-card.js';
|
|
71
|
+
export { RunTrace } from './components/run-trace/run-trace.js';
|
|
72
|
+
export { SourceList } from './components/source-list/source-list.js';
|
|
73
|
+
export { AgentThread } from './components/agent-thread/agent-thread.js';
|
|
74
|
+
export { UI_MESSAGE_STREAM_VERSION, connectUiMessageStream } from './components/agent-thread/ui-message-stream.js';
|
|
75
|
+
export { AG_UI_VERSION, connectAgUi } from './components/agent-thread/ag-ui.js';
|
|
76
|
+
export { Surface, openSurface } from './components/surface/surface.js';
|
|
77
|
+
export { elicit } from './components/surface/elicit.js';
|
|
78
|
+
export { MCP_ELICITATION_VERSION, elicitationHandler } from './components/surface/mcp.js';
|
|
79
|
+
export { surfaceText } from './components/surface/text.js';
|
|
65
80
|
export { AccountMenu } from './components/account-menu/account-menu.js';
|
|
66
81
|
export { WorkspaceSwitcher } from './components/workspace-switcher/workspace-switcher.js';
|
|
67
82
|
export { normalizeAppItems } from './internal/app-rail.js';
|
|
@@ -78,6 +93,8 @@ export { MenuButton } from './components/menu-button/menu-button.js';
|
|
|
78
93
|
export { ContextMenu } from './components/context-menu/context-menu.js';
|
|
79
94
|
export { Select } from './components/select/select.js';
|
|
80
95
|
export { statusIcon, priorityIcon } from './components/select/glyphs.js';
|
|
96
|
+
export { canonicalLocale } from './components/select/locale.js';
|
|
97
|
+
export { flag, flagEmoji, supportsFlagEmoji, COUNTRY_CODES } from './components/flag/flag.js';
|
|
81
98
|
export { Checklist } from './components/checklist/checklist.js';
|
|
82
99
|
export { TagPicker } from './components/tag-picker/tag-picker.js';
|
|
83
100
|
export { NumberField, parseNumber, snapNumber } from './components/number-field/number-field.js';
|