@exponential-at/ui 0.0.0-stage → 0.1.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/LICENSE +201 -0
- package/NOTICE +54 -0
- package/README.md +360 -2
- package/catalog/a11y.json +668 -0
- package/catalog/basic-map.json +104 -0
- package/catalog/code.json +58 -0
- package/catalog/core.catalog.json +4752 -0
- package/catalog/core.schema.json +22667 -0
- package/catalog/host.json +64 -0
- package/catalog/layout.json +20 -0
- package/catalog/limits.json +9 -0
- package/catalog/locale.json +48 -0
- package/catalog/macros.json +3417 -0
- package/catalog/recipes.json +61 -0
- package/catalog/strings.json +72 -0
- package/catalog/style.json +128 -0
- package/catalog/theme.schema.json +42543 -0
- package/catalog/tokens.json +47 -0
- package/conformance/README.md +217 -0
- package/conformance/baseline.ts +101 -0
- package/conformance/browser-page.ts +146 -0
- package/conformance/browser-suites.ts +683 -0
- package/conformance/compare.ts +201 -0
- package/conformance/dom.ts +96 -0
- package/conformance/dump.ts +163 -0
- package/conformance/fonts.json +154 -0
- package/conformance/manifest.json +224 -0
- package/conformance/parity-compare.ts +191 -0
- package/conformance/parity-report.schema.json +73 -0
- package/conformance/parity.ts +412 -0
- package/conformance/pixel.ts +177 -0
- package/conformance/primitives-page.ts +49 -0
- package/conformance/report.schema.json +66 -0
- package/conformance/run.ts +118 -0
- package/dist/chunks/index-98npjvsd.js +3940 -0
- package/dist/chunks/index-98npjvsd.js.map +27 -0
- package/dist/chunks/index-gwkt14w3.js +7314 -0
- package/dist/chunks/index-gwkt14w3.js.map +10 -0
- package/dist/chunks/index-njt7yzzm.js +134 -0
- package/dist/chunks/index-njt7yzzm.js.map +9 -0
- package/dist/chunks/index-we7va6v6.js +7984 -0
- package/dist/chunks/index-we7va6v6.js.map +15 -0
- package/dist/chunks/index-xrm6f7wc.js +2563 -0
- package/dist/chunks/index-xrm6f7wc.js.map +10 -0
- package/dist/conformance.js +182749 -0
- package/dist/conformance.js.map +10 -0
- package/dist/entries/prompt.js +251 -0
- package/dist/entries/prompt.js.map +11 -0
- package/dist/entries/schema.js +1725 -0
- package/dist/entries/schema.js.map +11 -0
- package/dist/host/index.js +122 -0
- package/dist/host/index.js.map +9 -0
- package/dist/index.js +3213 -0
- package/dist/index.js.map +27 -0
- package/dist/types/src/a11y.d.ts +21 -0
- package/dist/types/src/animation.d.ts +76 -0
- package/dist/types/src/basic-map.d.ts +38 -0
- package/dist/types/src/builder.d.ts +50 -0
- package/dist/types/src/catalog.d.ts +54 -0
- package/dist/types/src/catalog.described.d.ts +33 -0
- package/dist/types/src/catalog.generated.d.ts +829 -0
- package/dist/types/src/chart.d.ts +46 -0
- package/dist/types/src/code.d.ts +44 -0
- package/dist/types/src/color.d.ts +20 -0
- package/dist/types/src/conformance.d.ts +39 -0
- package/dist/types/src/connector/app.d.ts +14 -0
- package/dist/types/src/connector/connector.d.ts +77 -0
- package/dist/types/src/connector/index.d.ts +4 -0
- package/dist/types/src/css.d.ts +29 -0
- package/dist/types/src/define.d.ts +66 -0
- package/dist/types/src/direction.d.ts +16 -0
- package/dist/types/src/dynamic.d.ts +159 -0
- package/dist/types/src/entries/prompt.d.ts +11 -0
- package/dist/types/src/entries/schema.d.ts +8 -0
- package/dist/types/src/expr.d.ts +71 -0
- package/dist/types/src/extension.d.ts +4 -0
- package/dist/types/src/format.d.ts +112 -0
- package/dist/types/src/geometry.d.ts +40 -0
- package/dist/types/src/host/contract.d.ts +188 -0
- package/dist/types/src/host/decoders.d.ts +61 -0
- package/dist/types/src/host/index.d.ts +11 -0
- package/dist/types/src/host/package.d.ts +58 -0
- package/dist/types/src/host/policy.d.ts +105 -0
- package/dist/types/src/host/router.d.ts +34 -0
- package/dist/types/src/host/runtime.d.ts +205 -0
- package/dist/types/src/host/sources.d.ts +15 -0
- package/dist/types/src/host/transports.d.ts +109 -0
- package/dist/types/src/index.d.ts +63 -0
- package/dist/types/src/layout.d.ts +20 -0
- package/dist/types/src/limits.d.ts +21 -0
- package/dist/types/src/list.d.ts +133 -0
- package/dist/types/src/locale.d.ts +22 -0
- package/dist/types/src/macros.d.ts +29 -0
- package/dist/types/src/overlay.d.ts +27 -0
- package/dist/types/src/prompt.d.ts +44 -0
- package/dist/types/src/recipes.d.ts +17 -0
- package/dist/types/src/reducer.d.ts +41 -0
- package/dist/types/src/resizable.d.ts +38 -0
- package/dist/types/src/schema.d.ts +7 -0
- package/dist/types/src/strings.d.ts +13 -0
- package/dist/types/src/style.d.ts +201 -0
- package/dist/types/src/test-preload.d.ts +1 -0
- package/dist/types/src/text-shimmer.d.ts +24 -0
- package/dist/types/src/theme-types.d.ts +162 -0
- package/dist/types/src/theme.d.ts +73 -0
- package/dist/types/src/themes.d.ts +22 -0
- package/dist/types/src/tree-guides.d.ts +17 -0
- package/dist/types/src/types.d.ts +314 -0
- package/dist/types/src/validate.d.ts +31 -0
- package/dist/types/src/web/base-css.d.ts +1 -0
- package/dist/types/src/web/box-css.d.ts +55 -0
- package/dist/types/src/web/coerce.d.ts +32 -0
- package/dist/types/src/web/data.d.ts +105 -0
- package/dist/types/src/web/dates.d.ts +12 -0
- package/dist/types/src/web/form.d.ts +44 -0
- package/dist/types/src/web/host-types.d.ts +119 -0
- package/dist/types/src/web/index.d.ts +28 -0
- package/dist/types/src/web/inputs.d.ts +55 -0
- package/dist/types/src/web/list.d.ts +13 -0
- package/dist/types/src/web/listbox.d.ts +14 -0
- package/dist/types/src/web/markdown.d.ts +96 -0
- package/dist/types/src/web/media.d.ts +62 -0
- package/dist/types/src/web/parts.d.ts +4 -0
- package/dist/types/src/web/primitives/alert-dialog.d.ts +10 -0
- package/dist/types/src/web/primitives/alert.d.ts +9 -0
- package/dist/types/src/web/primitives/avatar-color.d.ts +2 -0
- package/dist/types/src/web/primitives/avatar.d.ts +13 -0
- package/dist/types/src/web/primitives/badge.d.ts +10 -0
- package/dist/types/src/web/primitives/breadcrumb.d.ts +10 -0
- package/dist/types/src/web/primitives/button.d.ts +6 -0
- package/dist/types/src/web/primitives/calendar.d.ts +43 -0
- package/dist/types/src/web/primitives/card.d.ts +9 -0
- package/dist/types/src/web/primitives/checkbox.d.ts +5 -0
- package/dist/types/src/web/primitives/choice-tiles.d.ts +32 -0
- package/dist/types/src/web/primitives/cn.d.ts +3 -0
- package/dist/types/src/web/primitives/code-block.d.ts +24 -0
- package/dist/types/src/web/primitives/command.d.ts +134 -0
- package/dist/types/src/web/primitives/context-ring.d.ts +24 -0
- package/dist/types/src/web/primitives/dialog-arms.d.ts +6 -0
- package/dist/types/src/web/primitives/dialog.d.ts +24 -0
- package/dist/types/src/web/primitives/disclosure-header.d.ts +5 -0
- package/dist/types/src/web/primitives/dock.d.ts +42 -0
- package/dist/types/src/web/primitives/dropdown-menu.d.ts +14 -0
- package/dist/types/src/web/primitives/empty-state.d.ts +15 -0
- package/dist/types/src/web/primitives/glass-card.d.ts +4 -0
- package/dist/types/src/web/primitives/hover-card.d.ts +7 -0
- package/dist/types/src/web/primitives/icon-disc.d.ts +12 -0
- package/dist/types/src/web/primitives/index.d.ts +48 -0
- package/dist/types/src/web/primitives/input.d.ts +5 -0
- package/dist/types/src/web/primitives/kbd.d.ts +4 -0
- package/dist/types/src/web/primitives/label.d.ts +3 -0
- package/dist/types/src/web/primitives/menu-surface.d.ts +17 -0
- package/dist/types/src/web/primitives/meter.d.ts +21 -0
- package/dist/types/src/web/primitives/popover.d.ts +3 -0
- package/dist/types/src/web/primitives/progress-ring.d.ts +5 -0
- package/dist/types/src/web/primitives/progress.d.ts +8 -0
- package/dist/types/src/web/primitives/scroll-area.d.ts +49 -0
- package/dist/types/src/web/primitives/segmented-control.d.ts +5 -0
- package/dist/types/src/web/primitives/select.d.ts +47 -0
- package/dist/types/src/web/primitives/separator.d.ts +3 -0
- package/dist/types/src/web/primitives/sheet-chrome.d.ts +4 -0
- package/dist/types/src/web/primitives/sheet.d.ts +20 -0
- package/dist/types/src/web/primitives/skeleton.d.ts +3 -0
- package/dist/types/src/web/primitives/spinner.d.ts +3 -0
- package/dist/types/src/web/primitives/switch.d.ts +4 -0
- package/dist/types/src/web/primitives/table.d.ts +11 -0
- package/dist/types/src/web/primitives/tabs.d.ts +13 -0
- package/dist/types/src/web/primitives/textarea.d.ts +3 -0
- package/dist/types/src/web/primitives/toast.d.ts +163 -0
- package/dist/types/src/web/primitives/tooltip.d.ts +3 -0
- package/dist/types/src/web/primitives/truncate.d.ts +7 -0
- package/dist/types/src/web/primitives/typeahead-portal.d.ts +12 -0
- package/dist/types/src/web/share.d.ts +6 -0
- package/dist/types/src/web/table.d.ts +20 -0
- package/dist/types/src/web/theme-css.d.ts +69 -0
- package/dist/types/src/web/urls.d.ts +21 -0
- package/dist/web/index.js +2303 -0
- package/dist/web/index.js.map +26 -0
- package/dist/web/primitives/index.js +1450 -0
- package/dist/web/primitives/index.js.map +57 -0
- package/docs/components.generated.json +6238 -0
- package/docs/round-1-contract.md +679 -0
- package/docs/round-2-contract.md +476 -0
- package/docs/round-3-contract.md +174 -0
- package/docs/themes.generated.json +3503 -0
- package/fixtures/animations.json +2890 -0
- package/fixtures/bench-list.json +58 -0
- package/fixtures/bind-time.json +30664 -0
- package/fixtures/catalog-basic-map.json +1692 -0
- package/fixtures/catalog-components.json +9323 -0
- package/fixtures/catalog-extension.json +620 -0
- package/fixtures/catalog-macros.json +36370 -0
- package/fixtures/code-tokens.json +1993 -0
- package/fixtures/conformance-baseline.json +55544 -0
- package/fixtures/conformance-cases.json +49 -0
- package/fixtures/conformance-known.json +2123 -0
- package/fixtures/control-geometry.json +4200 -0
- package/fixtures/dashboard.data.json +74 -0
- package/fixtures/dashboard.json +752 -0
- package/fixtures/demo-surface.json +47 -0
- package/fixtures/format.json +870 -0
- package/fixtures/host-policy.json +1067 -0
- package/fixtures/host-router.json +1152 -0
- package/fixtures/host-transport.json +590 -0
- package/fixtures/interactions-round1.json +773 -0
- package/fixtures/kitchen-sink.expanded.json +10844 -0
- package/fixtures/kitchen-sink.json +3049 -0
- package/fixtures/layout-geometry-round1.json +7278 -0
- package/fixtures/layout-geometry.json +2072 -0
- package/fixtures/overlay-geometry.json +272 -0
- package/fixtures/primitive-specimens.json +58 -0
- package/fixtures/prompt-budget.json +33 -0
- package/fixtures/resizable.json +714 -0
- package/fixtures/round4-contract.json +2985 -0
- package/fixtures/specimens.json +9832 -0
- package/fixtures/style-conditions.json +336 -0
- package/fixtures/template-items.json +2215 -0
- package/fixtures/text-direction.json +309 -0
- package/fixtures/text-shimmer.json +96 -0
- package/fixtures/theme-extends.json +573 -0
- package/fixtures/theme-invalid.json +1296 -0
- package/fixtures/theme-recipes.json +58600 -0
- package/fixtures/theme-resolved.json +23949 -0
- package/fixtures/toast-stack.json +215 -0
- package/fixtures/tree-guides.json +224 -0
- package/fixtures/virtual-list.json +733 -0
- package/generated/ExponentialUICatalog.generated.kt +67 -0
- package/generated/ExponentialUICatalog.generated.swift +67 -0
- package/generated/ExponentialUIThemes.generated.kt +23 -0
- package/generated/ExponentialUIThemes.generated.swift +23 -0
- package/generated/catalog.descriptions.generated.rs +6 -0
- package/generated/catalog.generated.rs +80 -0
- package/generated/catalog.themes.generated.rs +34 -0
- package/generated/core.descriptions.json +2505 -0
- package/generated/core.runtime.json +3609 -0
- package/package.json +87 -4
- package/themes/exponential.recipes.json +49 -0
- package/themes/exponential.theme.json +755 -0
- package/themes/neutral.theme.json +5676 -0
- package/themes/orange.theme.json +43 -0
- package/themes/playful.theme.json +219 -0
- package/vendor/a2ui/LICENSE.txt +203 -0
- package/vendor/a2ui/README.md +27 -0
- package/vendor/a2ui/v0_9/basic_catalog.json +1387 -0
- package/vendor/a2ui/v0_9/basic_catalog_rules.txt +5 -0
- package/vendor/a2ui/v0_9/client_capabilities.json +97 -0
- package/vendor/a2ui/v0_9/client_to_server.json +104 -0
- package/vendor/a2ui/v0_9/common_types.json +315 -0
- package/vendor/a2ui/v0_9/server_to_client.json +132 -0
- package/vendor/json-render/LICENSE.txt +201 -0
- package/vendor/json-render/README.md +13 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ModeName, ResolvedTheme, Shadow, ThemeIssue, ThemeSource } from "./theme-types.js";
|
|
2
|
+
/** shadcn / tweakcn variable → theme colour name. */
|
|
3
|
+
export declare const SHADCN_COLOR_VARS: Record<string, string>;
|
|
4
|
+
export interface ThemeImport {
|
|
5
|
+
modes: Partial<Record<ModeName, {
|
|
6
|
+
color: Record<string, `#${string}`>;
|
|
7
|
+
shadow?: Record<string, Shadow[]>;
|
|
8
|
+
}>>;
|
|
9
|
+
tokens: {
|
|
10
|
+
radius?: Record<string, number>;
|
|
11
|
+
type?: {
|
|
12
|
+
family?: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
fonts: Record<string, {
|
|
16
|
+
fallback?: string;
|
|
17
|
+
source: `host`;
|
|
18
|
+
}>;
|
|
19
|
+
/** Variables the importer did not understand (`--sidebar`, `var()` refs…). */
|
|
20
|
+
unmapped: string[];
|
|
21
|
+
}
|
|
22
|
+
/** `0 1px 2px 0 hsl(0 0% 0% / 0.05), …` → layers; null when not parseable. */
|
|
23
|
+
export declare function parseShadow(value: string): Shadow[] | null;
|
|
24
|
+
/** A shadcn `globals.css` (v4 oklch, v3 bare-HSL triplets) or a tweakcn
|
|
25
|
+
* export → the colours per mode, the radius ladder, the families and the
|
|
26
|
+
* shadows it carried. Everything else is listed under `unmapped`. */
|
|
27
|
+
export declare function importShadcnCss(css: string): ThemeImport;
|
|
28
|
+
/** The import as a theme file. With a `base` it becomes an `extends` theme
|
|
29
|
+
* carrying only what the CSS said; without one it is a root and the
|
|
30
|
+
* caller fills the rest (the builder starts from a built-in anyway). */
|
|
31
|
+
export declare function themeFromImport(imp: ThemeImport, meta: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
extends?: string;
|
|
35
|
+
}): ThemeSource;
|
|
36
|
+
/** The smallest theme that, extending `base`, resolves to `full`: only the
|
|
37
|
+
* values that differ. Recipes pass through as the draft's own rules (they
|
|
38
|
+
* are already overrides). */
|
|
39
|
+
export declare function diffTheme(full: ResolvedTheme | ThemeSource, base: ResolvedTheme, meta?: {
|
|
40
|
+
id?: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
}): ThemeSource;
|
|
43
|
+
/** Pretty JSON with `$schema` first, the export the builder downloads. */
|
|
44
|
+
export declare function exportThemeJson(theme: ThemeSource): string;
|
|
45
|
+
/** `JSON.parse` + load, never throwing: the builder's "paste a theme" path. */
|
|
46
|
+
export declare function parseThemeJson(text: string, themes: readonly (ThemeSource | ResolvedTheme)[]): {
|
|
47
|
+
theme: ResolvedTheme | null;
|
|
48
|
+
source: ThemeSource | null;
|
|
49
|
+
issues: ThemeIssue[];
|
|
50
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CatalogSource, ComponentDef, DefSchema, ExtensionDef, MacroDef } from "./types.js";
|
|
2
|
+
/** The runtime catalog: no descriptions or examples until `describeCatalog()`
|
|
3
|
+
* (src/catalog.described.ts; the `./prompt` and `./schema` entries) attaches them. */
|
|
4
|
+
export declare const coreCatalog: CatalogSource;
|
|
5
|
+
/** `https://ui.exponential.at/catalogs/core/v1` */
|
|
6
|
+
export declare const CORE_CATALOG_ID: string;
|
|
7
|
+
/** The prompt-sized subset: the app-shaped vocabulary (no overlays, media,
|
|
8
|
+
* Chart, data tables or the rarer controls). A lite surface is a valid core
|
|
9
|
+
* surface, so it is a second id over the same definitions. */
|
|
10
|
+
export declare const CORE_LITE_CATALOG_ID: string;
|
|
11
|
+
/** The vendored A2UI basic catalog (vendor/a2ui/v0_9). */
|
|
12
|
+
export declare const A2UI_BASIC_CATALOG_ID: string;
|
|
13
|
+
/** The A2UI wire `version` the vendored schemas carry. */
|
|
14
|
+
export declare const A2UI_VERSION: string;
|
|
15
|
+
/** What a client sends as `supportedCatalogIds`. */
|
|
16
|
+
export declare const SUPPORTED_CATALOG_IDS: readonly string[];
|
|
17
|
+
export declare const UNKNOWN_COMPONENT: string;
|
|
18
|
+
export declare const coreMacros: Record<string, MacroDef>;
|
|
19
|
+
/** Token groups → names, flattened (`type.size`, not a nested object), so a
|
|
20
|
+
* reference `$<group>.<name>` resolves by one lookup. */
|
|
21
|
+
export declare const TOKEN_GROUPS: Record<string, readonly string[]>;
|
|
22
|
+
/** `$spacing.md` → `{ group: "spacing", name: "md" }`, or null when it is not
|
|
23
|
+
* a well-formed reference. */
|
|
24
|
+
export declare function parseTokenRef(value: unknown): {
|
|
25
|
+
group: string;
|
|
26
|
+
name: string;
|
|
27
|
+
} | null;
|
|
28
|
+
/** True when the reference names a token group AND a name in it. */
|
|
29
|
+
export declare function isKnownToken(value: unknown): boolean;
|
|
30
|
+
export interface CatalogView {
|
|
31
|
+
components: Record<string, ComponentDef>;
|
|
32
|
+
enums: Record<string, readonly string[]>;
|
|
33
|
+
defs: Record<string, DefSchema>;
|
|
34
|
+
macros: Record<string, MacroDef>;
|
|
35
|
+
}
|
|
36
|
+
/** The core merged with the given extensions. Extension names never shadow a
|
|
37
|
+
* core name (defineExtension refuses that), so a plain spread is exact. */
|
|
38
|
+
export declare function catalogView(extensions?: readonly ExtensionDef[]): CatalogView;
|
|
39
|
+
/** `catalogView`, built once per extension list and SHARED (VAPP-152: the
|
|
40
|
+
* reducer and the macro expander asked for a fresh copy of every table on
|
|
41
|
+
* each streamed `updateComponents`). Read-only; an empty list is the
|
|
42
|
+
* core's. */
|
|
43
|
+
export declare function sharedCatalogView(extensions?: readonly ExtensionDef[]): CatalogView;
|
|
44
|
+
export declare function componentDef(name: string, extensions?: readonly ExtensionDef[]): ComponentDef | undefined;
|
|
45
|
+
/** True for a component a model is offered: anything but the hidden
|
|
46
|
+
* placeholder. */
|
|
47
|
+
export declare function isOffered(def: ComponentDef): boolean;
|
|
48
|
+
/** Component names in source order, optionally the lite subset, never the
|
|
49
|
+
* hidden placeholder. */
|
|
50
|
+
export declare function componentNames(options?: {
|
|
51
|
+
lite?: boolean;
|
|
52
|
+
}): string[];
|
|
53
|
+
/** The lite subset's names. */
|
|
54
|
+
export declare function coreLite(): string[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CatalogSource } from "./types.js";
|
|
2
|
+
/** The text a prop schema carries (recursing into `items`). */
|
|
3
|
+
export interface PropDescription {
|
|
4
|
+
description?: string;
|
|
5
|
+
items?: PropDescription;
|
|
6
|
+
}
|
|
7
|
+
/** The text of the catalog, keyed like the catalog itself. */
|
|
8
|
+
export interface CatalogDescriptions {
|
|
9
|
+
components: Record<string, {
|
|
10
|
+
description?: string;
|
|
11
|
+
example?: Record<string, unknown>;
|
|
12
|
+
props: Record<string, PropDescription>;
|
|
13
|
+
}>;
|
|
14
|
+
defs: Record<string, {
|
|
15
|
+
description?: string;
|
|
16
|
+
properties: Record<string, PropDescription>;
|
|
17
|
+
}>;
|
|
18
|
+
functions: {
|
|
19
|
+
core: Record<string, string>;
|
|
20
|
+
basic: Record<string, string>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** The source catalog split into what the runtime needs and the text only
|
|
24
|
+
* the prompt, the schema and the docs read. Pure: the source stays as it is. */
|
|
25
|
+
export declare function splitDescriptions(source: CatalogSource): {
|
|
26
|
+
runtime: CatalogSource;
|
|
27
|
+
descriptions: CatalogDescriptions;
|
|
28
|
+
};
|
|
29
|
+
/** Puts the text back onto a runtime catalog, in place. */
|
|
30
|
+
export declare function applyDescriptions(target: CatalogSource, descriptions: CatalogDescriptions): void;
|
|
31
|
+
/** `coreCatalog` with its descriptions and examples attached (once per
|
|
32
|
+
* process); what the prompt, the schema emitter and the docs read. */
|
|
33
|
+
export declare function describeCatalog(): CatalogSource;
|