@nonoun/native-ai 1.0.10 → 1.0.12
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/dist/a2ui/a2ui-element.d.ts.map +1 -1
- package/dist/a2ui/protocol/a2ui-adapter.d.ts +2 -0
- package/dist/a2ui/protocol/a2ui-adapter.d.ts.map +1 -1
- package/dist/a2ui/protocol/a2ui-component-map.d.ts +40 -14
- package/dist/a2ui/protocol/a2ui-component-map.d.ts.map +1 -1
- package/dist/a2ui/protocol/a2ui-converter.d.ts +3 -0
- package/dist/a2ui/protocol/a2ui-converter.d.ts.map +1 -1
- package/dist/a2ui/protocol/a2ui-surface.d.ts +4 -3
- package/dist/a2ui/protocol/a2ui-surface.d.ts.map +1 -1
- package/dist/a2ui/protocol/index.d.ts +2 -2
- package/dist/a2ui/protocol/index.d.ts.map +1 -1
- package/dist/native-ai.css +9 -4
- package/dist/native-ai.js +837 -632
- package/dist/register.js +831 -626
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-element.d.ts","sourceRoot":"","sources":["../../src/a2ui/a2ui-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAA+C,MAAM,mBAAmB,CAAC;AAa/F,OAAO,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"a2ui-element.d.ts","sourceRoot":"","sources":["../../src/a2ui/a2ui-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,aAAa,EAA+C,MAAM,mBAAmB,CAAC;AAa/F,OAAO,8BAA8B,CAAC;AAqFtC,qBAAa,KAAM,SAAQ,aAAa;;IACtC,MAAM,CAAC,kBAAkB,WAAc;IAyDvC,IAAI,MAAM,IAAI,MAAM,CAA+B;IACnD,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,EAKrB;IAID,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IASpF,OAAO,IAAI,IAAI;IACf,IAAI,IAAI,IAAI;IACZ,QAAQ,IAAI,IAAI;IAChB,KAAK,IAAI,IAAI;IAIb,KAAK,IAAI,IAAI;IAwJb,QAAQ,IAAI,IAAI;CAu3CjB"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* to provide a unified API for receiving and emitting A2UI messages.
|
|
7
7
|
*/
|
|
8
8
|
import type { A2UIServerMessage, A2UIClientMessage, A2UIUpdateComponents, A2UIProtocolVersion } from './a2ui-types.ts';
|
|
9
|
+
import type { ComponentRegistry } from './a2ui-component-map.ts';
|
|
9
10
|
import type { SurfaceState } from './a2ui-surface.ts';
|
|
10
11
|
import type { A2UIKernelBridge as Kernel } from './kernel-bridge.ts';
|
|
11
12
|
import type { UIPlan } from './kernel-bridge.ts';
|
|
@@ -14,6 +15,7 @@ export interface A2UIAdapterOptions {
|
|
|
14
15
|
readonly version?: A2UIProtocolVersion;
|
|
15
16
|
readonly onClientMessage?: (msg: A2UIClientMessage) => void;
|
|
16
17
|
readonly onRender?: (surfaceId: string, container: HTMLElement) => void;
|
|
18
|
+
readonly registry?: ComponentRegistry;
|
|
17
19
|
}
|
|
18
20
|
export declare class A2UIAdapter {
|
|
19
21
|
#private;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-adapter.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"a2ui-adapter.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OA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AI;IAIlD,aAAa,IAAI,SAAS,MAAM,EAAE;IAIlC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM/D;;OAEG;IACH,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAMtC,OAAO,IAAI,IAAI;CAGhB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAE3F"}
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Bidirectional mapping between A2UI abstract component types
|
|
5
5
|
* and native-ui concrete HTML/custom element tags.
|
|
6
|
+
*
|
|
7
|
+
* The `ComponentRegistry` class provides a mutable registry with
|
|
8
|
+
* change tracking via a signal. The default singleton (`defaultRegistry`)
|
|
9
|
+
* preserves backward compatibility with existing free-function imports.
|
|
6
10
|
*/
|
|
11
|
+
import type { Signal } from '@nonoun/native-ui';
|
|
7
12
|
export type ChildStrategy = 'children' | 'textContent' | 'slot-label' | 'none';
|
|
8
13
|
export interface ComponentMapping {
|
|
9
14
|
readonly a2uiType: string;
|
|
@@ -17,10 +22,43 @@ export interface ComponentMapping {
|
|
|
17
22
|
/** The native-ui event name that maps to A2UI action */
|
|
18
23
|
readonly actionEvent?: string;
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
export interface RegistrySnapshot {
|
|
26
|
+
readonly mappings: ComponentMapping[];
|
|
27
|
+
readonly categories: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
export declare class ComponentRegistry {
|
|
30
|
+
#private;
|
|
31
|
+
constructor(mappings: readonly ComponentMapping[], categories?: Readonly<Record<string, string>>);
|
|
32
|
+
get version(): Signal<number>;
|
|
33
|
+
get(type: string): ComponentMapping | undefined;
|
|
34
|
+
has(type: string): boolean;
|
|
35
|
+
get size(): number;
|
|
36
|
+
keys(): IterableIterator<string>;
|
|
37
|
+
values(): IterableIterator<ComponentMapping>;
|
|
38
|
+
entries(): IterableIterator<[string, ComponentMapping]>;
|
|
39
|
+
forEach(cb: (mapping: ComponentMapping, type: string, map: Map<string, ComponentMapping>) => void): void;
|
|
40
|
+
[Symbol.iterator](): IterableIterator<[string, ComponentMapping]>;
|
|
41
|
+
add(mapping: ComponentMapping, notify?: boolean): void;
|
|
42
|
+
update(a2uiType: string, patch: Partial<Omit<ComponentMapping, 'a2uiType'>>): void;
|
|
43
|
+
remove(a2uiType: string): void;
|
|
44
|
+
setCategory(a2uiType: string, category: string): void;
|
|
45
|
+
toJSON(): RegistrySnapshot;
|
|
46
|
+
static fromJSON(data: RegistrySnapshot): ComponentRegistry;
|
|
47
|
+
clone(): ComponentRegistry;
|
|
48
|
+
resolveNativeTag(a2uiType: string): ComponentMapping | null;
|
|
49
|
+
resolveA2UIType(tag: string, attributes?: Readonly<Record<string, string>>): string | null;
|
|
50
|
+
getSupportedTypes(): readonly string[];
|
|
51
|
+
getComponentCategory(a2uiType: string): string;
|
|
52
|
+
getCompatibleTypes(a2uiType: string): readonly string[];
|
|
53
|
+
}
|
|
54
|
+
export declare const defaultRegistry: ComponentRegistry;
|
|
55
|
+
/** All component mappings, keyed by A2UI type. */
|
|
56
|
+
export declare const COMPONENT_MAP: ComponentRegistry;
|
|
22
57
|
export declare function resolveNativeTag(a2uiType: string): ComponentMapping | null;
|
|
23
58
|
export declare function resolveA2UIType(tag: string, attributes?: Readonly<Record<string, string>>): string | null;
|
|
59
|
+
export declare function getSupportedTypes(): readonly string[];
|
|
60
|
+
export declare function getComponentCategory(a2uiType: string): string;
|
|
61
|
+
export declare function getCompatibleTypes(a2uiType: string): readonly string[];
|
|
24
62
|
/**
|
|
25
63
|
* For A2UI Text components, resolve the variant to an HTML tag.
|
|
26
64
|
* Returns 'span' by default.
|
|
@@ -34,16 +72,4 @@ export declare function dateTimeInputType(enableDate?: boolean, enableTime?: boo
|
|
|
34
72
|
* For A2UI TextField components, resolve the variant to an HTML input type attribute.
|
|
35
73
|
*/
|
|
36
74
|
export declare function textFieldInputType(variant?: string): string;
|
|
37
|
-
/**
|
|
38
|
-
* Get all supported A2UI component types.
|
|
39
|
-
*/
|
|
40
|
-
export declare function getSupportedTypes(): readonly string[];
|
|
41
|
-
/**
|
|
42
|
-
* Get the category for an A2UI component type.
|
|
43
|
-
*/
|
|
44
|
-
export declare function getComponentCategory(a2uiType: string): string;
|
|
45
|
-
/**
|
|
46
|
-
* Get all component types in the same category.
|
|
47
|
-
*/
|
|
48
|
-
export declare function getCompatibleTypes(a2uiType: string): readonly string[];
|
|
49
75
|
//# sourceMappingURL=a2ui-component-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-component-map.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-component-map.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"a2ui-component-map.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-component-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,MAAM,CAAC;AAI/E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD,2DAA2D;IAC3D,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ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AAE,MAAM,GAAG,MAAM,CAGvD;AAID;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,CAAC,EAAE,OAAO,EACpB,UAAU,CAAC,EAAE,OAAO,GACnB,MAAM,CAIR;AAWD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAG3D"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { UINode, UIPlan, CommandSource } from './kernel-bridge.ts';
|
|
8
8
|
import type { A2UIComponent, A2UIProtocolVersion } from './a2ui-types.ts';
|
|
9
|
+
import type { ComponentRegistry } from './a2ui-component-map.ts';
|
|
9
10
|
export interface ConversionResult {
|
|
10
11
|
readonly root: UINode;
|
|
11
12
|
readonly bindings: ReadonlyMap<string, readonly DataBindingEntry[]>;
|
|
@@ -20,10 +21,12 @@ export interface ToUINodeOptions {
|
|
|
20
21
|
readonly rootId?: string;
|
|
21
22
|
readonly surfaceId?: string;
|
|
22
23
|
readonly version?: A2UIProtocolVersion;
|
|
24
|
+
readonly registry?: ComponentRegistry;
|
|
23
25
|
}
|
|
24
26
|
export interface ToA2UIOptions {
|
|
25
27
|
readonly surfaceId?: string;
|
|
26
28
|
readonly version?: A2UIProtocolVersion;
|
|
29
|
+
readonly registry?: ComponentRegistry;
|
|
27
30
|
}
|
|
28
31
|
export declare function a2uiToUINode(components: readonly A2UIComponent[], options?: ToUINodeOptions): ConversionResult;
|
|
29
32
|
export declare function uiNodeToA2UI(root: UINode, options?: ToA2UIOptions): readonly A2UIComponent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-converter.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-converter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EA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SAAS,aAAa,EAAE,EACpC,OAAO,CAAC,EAAE,eAAe,GACxB,gBAAgB,CAgElB;AAuYD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GACtB,SAAS,aAAa,EAAE,CAU1B;AA2HD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,GAAE,aAA2B,GAClC,MAAM,CAQR"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ReadonlySignal } from '@nonoun/native-ui';
|
|
8
8
|
import type { A2UIServerMessage, A2UIActionMessage, A2UIComponent } from './a2ui-types.ts';
|
|
9
|
+
import type { ComponentRegistry } from './a2ui-component-map.ts';
|
|
9
10
|
import type { A2UIKernelBridge as Kernel } from './kernel-bridge.ts';
|
|
10
11
|
import type { PatchOp } from './kernel-bridge.ts';
|
|
11
12
|
export interface SurfaceState {
|
|
@@ -21,13 +22,13 @@ export declare function setJsonPointer(data: Record<string, unknown>, pointer: s
|
|
|
21
22
|
export declare class SurfaceManager {
|
|
22
23
|
#private;
|
|
23
24
|
readonly surfaceCount: ReadonlySignal<number>;
|
|
24
|
-
constructor(kernel: Kernel, onAction: (msg: A2UIActionMessage) => void, onRender?: (surfaceId: string, container: HTMLElement) => void);
|
|
25
|
+
constructor(kernel: Kernel, onAction: (msg: A2UIActionMessage) => void, onRender?: (surfaceId: string, container: HTMLElement) => void, registry?: ComponentRegistry);
|
|
25
26
|
handleMessage(msg: A2UIServerMessage, container?: HTMLElement): void;
|
|
26
27
|
getSurface(surfaceId: string): SurfaceState | null;
|
|
27
28
|
getSurfaceIds(): readonly string[];
|
|
28
29
|
getDataModel(surfaceId: string): Record<string, unknown> | null;
|
|
29
30
|
destroy(): void;
|
|
30
31
|
}
|
|
31
|
-
export declare function diffComponents(oldComponents: readonly A2UIComponent[], newComponents: readonly A2UIComponent[], surfaceId: string): readonly PatchOp[];
|
|
32
|
-
export declare function createSurfaceManager(kernel: Kernel, onAction: (msg: A2UIActionMessage) => void): SurfaceManager;
|
|
32
|
+
export declare function diffComponents(oldComponents: readonly A2UIComponent[], newComponents: readonly A2UIComponent[], surfaceId: string, registry?: ComponentRegistry): readonly PatchOp[];
|
|
33
|
+
export declare function createSurfaceManager(kernel: Kernel, onAction: (msg: A2UIActionMessage) => void, registry?: ComponentRegistry): SurfaceManager;
|
|
33
34
|
//# sourceMappingURL=a2ui-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2ui-surface.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-surface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAU,cAAc,EAAW,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EAKd,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAkBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAS1E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA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E,MAAM,EACd,QAAQ,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,EAC1C,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,KAAK,IAAI,EAC9D,QAAQ,CAAC,EAAE,iBAAiB;IAU9B,aAAa,CAAC,GAAG,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI;IAmPpE,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAalD,aAAa,IAAI,SAAS,MAAM,EAAE;IAIlC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM/D,OAAO,IAAI,IAAI;CAKhB;AAkCD,wBAAgB,cAAc,CAC5B,aAAa,EAAE,SAAS,aAAa,EAAE,EACvC,aAAa,EAAE,SAAS,aAAa,EAAE,EACvC,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,SAAS,OAAO,EAAE,CA6FpB;AA+BD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,EAC1C,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,cAAc,CAEhB"}
|
|
@@ -4,8 +4,8 @@ export { SurfaceManager, createSurfaceManager, resolveJsonPointer, setJsonPointe
|
|
|
4
4
|
export type { SurfaceState } from './a2ui-surface.ts';
|
|
5
5
|
export { a2uiToUINode, uiNodeToA2UI, conversionToPlan } from './a2ui-converter.ts';
|
|
6
6
|
export type { ConversionResult, DataBindingEntry, ToUINodeOptions, ToA2UIOptions } from './a2ui-converter.ts';
|
|
7
|
-
export { resolveNativeTag, resolveA2UIType, COMPONENT_MAP, getSupportedTypes, textVariantTag, textFieldInputType, dateTimeInputType } from './a2ui-component-map.ts';
|
|
8
|
-
export type { ComponentMapping, ChildStrategy } from './a2ui-component-map.ts';
|
|
7
|
+
export { ComponentRegistry, defaultRegistry, resolveNativeTag, resolveA2UIType, COMPONENT_MAP, getSupportedTypes, getComponentCategory, getCompatibleTypes, textVariantTag, textFieldInputType, dateTimeInputType } from './a2ui-component-map.ts';
|
|
8
|
+
export type { ComponentMapping, ChildStrategy, RegistrySnapshot } from './a2ui-component-map.ts';
|
|
9
9
|
export { isDataBinding, isCreateSurface, isUpdateComponents, isUpdateDataModel, isDeleteSurface, isCatalogRequest, isCatalogResponse, isActionMessage, isErrorMessage, parseServerMessage, } from './a2ui-types.ts';
|
|
10
10
|
export type { A2UIProtocolVersion, A2UIServerMessage, A2UICreateSurface, A2UIUpdateComponents, A2UIUpdateDataModel, A2UIDeleteSurface, A2UICatalogRequest, A2UICatalogResponse, A2UIClientMessage, A2UIActionMessage, A2UIErrorMessage, A2UIComponent, A2UIComponentAction, A2UIDataBinding, A2UIStandardType, } from './a2ui-types.ts';
|
|
11
11
|
export { WebSocketTransport, SSETransport, createWebSocketTransport, createSSETransport } from './a2ui-transport.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACnE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC7G,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9G,OAAO,EAAE,gBAAgB,EAAE,e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,mBAAmB,EACnB,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACrH,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/native-ai.css
CHANGED
|
@@ -227,7 +227,8 @@
|
|
|
227
227
|
:where(native-a2ui) :where([data-panel="json-in"]) :where(.a2ui-pane-content),
|
|
228
228
|
:where(native-a2ui) :where([data-panel="js"]) :where(.a2ui-pane-content),
|
|
229
229
|
:where(native-a2ui) :where([data-panel="html"]) :where(.a2ui-pane-content),
|
|
230
|
-
:where(native-a2ui) :where([data-panel="css"]) :where(.a2ui-pane-content)
|
|
230
|
+
:where(native-a2ui) :where([data-panel="css"]) :where(.a2ui-pane-content),
|
|
231
|
+
:where(native-a2ui) :where([data-panel="schema"]) :where(.a2ui-pane-content) {
|
|
231
232
|
padding: 0;
|
|
232
233
|
overflow: hidden;
|
|
233
234
|
}
|
|
@@ -438,7 +439,8 @@
|
|
|
438
439
|
|
|
439
440
|
/* ── Toolbar (playback controls inside JSON-IN pane) ── */
|
|
440
441
|
|
|
441
|
-
:where(native-a2ui) :where([data-panel="json-in"]) > :where(n-toolbar)
|
|
442
|
+
:where(native-a2ui) :where([data-panel="json-in"]) > :where(n-toolbar),
|
|
443
|
+
:where(native-a2ui) :where([data-panel="schema"]) > :where(n-toolbar) {
|
|
442
444
|
flex: none;
|
|
443
445
|
background: var(--n-pg-chrome);
|
|
444
446
|
border-bottom: var(--n-pg-border);
|
|
@@ -447,13 +449,16 @@
|
|
|
447
449
|
}
|
|
448
450
|
|
|
449
451
|
/* Override n-divider flex:1 inside toolbar — just be a thin line */
|
|
450
|
-
:where(native-a2ui) :where([data-panel="json-in"]) > :where(n-toolbar) :where(n-divider)
|
|
452
|
+
:where(native-a2ui) :where([data-panel="json-in"]) > :where(n-toolbar) :where(n-divider),
|
|
453
|
+
:where(native-a2ui) :where([data-panel="schema"]) > :where(n-toolbar) :where(n-divider) {
|
|
451
454
|
flex: none;
|
|
452
455
|
}
|
|
453
456
|
|
|
454
457
|
/* Toolbar button hover */
|
|
455
458
|
:where(native-a2ui) :where([data-panel="json-in"]) > :where(n-toolbar) :where(n-button):hover,
|
|
456
|
-
:where(native-a2ui) :where([data-panel="json-in"]) > :where(n-toolbar) :where(n-button)[force-hover]
|
|
459
|
+
:where(native-a2ui) :where([data-panel="json-in"]) > :where(n-toolbar) :where(n-button)[force-hover],
|
|
460
|
+
:where(native-a2ui) :where([data-panel="schema"]) > :where(n-toolbar) :where(n-button):hover,
|
|
461
|
+
:where(native-a2ui) :where([data-panel="schema"]) > :where(n-toolbar) :where(n-button)[force-hover] {
|
|
457
462
|
background: var(--n-pg-editor-bg);
|
|
458
463
|
}
|
|
459
464
|
|