@yahoo/uds-create-config 4.36.0 → 4.36.1
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/configs/CanvasConfig.d.ts +68 -5167
- package/dist/configs/CanvasConfig.js +0 -76
- package/dist/configs/documentation.d.ts +11 -251
- package/dist/configs/documentation.js +0 -1
- package/dist/configs/react-native-system.d.ts +39 -4239
- package/dist/configs/react-native-system.js +0 -11
- package/dist/configs/system.d.ts +44 -4209
- package/dist/configs/system.js +0 -9
- package/dist/entities/documentation/Documentation.d.ts +5 -18
- package/dist/entities/documentation/Documentation.js +0 -1
- package/dist/entities/native/NativeModifier.d.ts +6 -3
- package/dist/entities/native/NativeSettings.d.ts +6 -3
- package/dist/entities/native/NativeSettings.js +0 -1
- package/dist/entities/native/NativeStyleProperty.d.ts +1 -20
- package/dist/entities/native/NativeToken.d.ts +2 -6
- package/dist/entities/system/CanvasRole.d.ts +6 -7
- package/dist/entities/system/Component.d.ts +86 -1588
- package/dist/entities/system/Component.js +0 -9
- package/dist/entities/system/Composite.d.ts +8 -6
- package/dist/entities/system/Composite.js +0 -1
- package/dist/entities/system/Device.d.ts +6 -3
- package/dist/entities/system/Device.js +0 -6
- package/dist/entities/system/File.d.ts +43 -8
- package/dist/entities/system/File.js +0 -51
- package/dist/entities/system/Font.d.ts +10 -11
- package/dist/entities/system/Font.js +0 -21
- package/dist/entities/system/GlobalStyle.d.ts +6 -3
- package/dist/entities/system/Guidance.d.ts +6 -3
- package/dist/entities/system/GuidanceStyle.d.ts +6 -3
- package/dist/entities/system/Icon.d.ts +8 -8
- package/dist/entities/system/Icon.js +0 -16
- package/dist/entities/system/LinkedSystem.d.ts +5 -155
- package/dist/entities/system/Modifier.d.ts +8 -8
- package/dist/entities/system/Motion.d.ts +6 -3
- package/dist/entities/system/Operation.d.ts +5 -2
- package/dist/entities/system/Package.d.ts +24 -4
- package/dist/entities/system/Package.js +0 -46
- package/dist/entities/system/Settings.d.ts +18 -7
- package/dist/entities/system/Settings.js +0 -6
- package/dist/entities/system/StyleProperty.d.ts +14 -27
- package/dist/entities/system/StyleProperty.js +0 -6
- package/dist/entities/system/Token.d.ts +12 -9
- package/dist/entities/system/Tool.d.ts +7 -90
- package/dist/entities/system/composed-values.d.ts +1 -1
- package/dist/entities/system/copy-plan.d.ts +2 -2
- package/dist/entities/system/copy-plan.js +31 -8
- package/dist/entities/system/defineComponent.d.ts +1 -1
- package/dist/entities/system/icon-metadata.d.ts +2 -6
- package/dist/entities/system/link-plan.d.ts +2 -0
- package/dist/entities/system/link-plan.js +1 -0
- package/dist/entities/system/style-bag.d.ts +27 -1
- package/dist/entities/system/style-bag.js +0 -10
- package/dist/framework/Config.d.ts +18 -2
- package/dist/framework/Config.js +70 -15
- package/dist/framework/class-names.js +1 -0
- package/dist/framework/defineConfig.d.ts +2 -2
- package/dist/framework/defineEntity.d.ts +27 -7
- package/dist/framework/named.d.ts +9 -0
- package/dist/framework/plan.d.ts +3 -0
- package/dist/framework/plan.js +4 -1
- package/dist/framework/utils/group.d.ts +15 -5
- package/dist/index.d.ts +46 -45
- package/dist/migrations/2.0.0/v1-artifact.d.ts +38 -2109
- package/dist/renderer/wrappers/html-aliases.js +1 -0
- package/dist/spec/cell.d.ts +1 -1
- package/dist/spec/preview-content.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/configs/system.js
CHANGED
|
@@ -42,15 +42,6 @@ import { renderTokenRefsMigration } from "../migrations/20260923160425_render_to
|
|
|
42
42
|
import { globalStyleDerivedColorsMigration } from "../migrations/20260923163604_global_style_derived_colors.js";
|
|
43
43
|
import { slotCodeFormsMigration } from "../migrations/20260924044539_slot_code_forms.js";
|
|
44
44
|
import { canvasRoleSlotMigration } from "../migrations/20260925143319_canvas_role_slot.js";
|
|
45
|
-
//#region src/configs/system.ts
|
|
46
|
-
/**
|
|
47
|
-
* `System` — the design-system config TYPE. Declares the exact kinds a design system owns (tokens,
|
|
48
|
-
* components, …) plus its derived agent-tool catalog (`operation`/`tool`). `new System()` seeds a
|
|
49
|
-
* config with those kinds; `System.fromJSON(json)` rehydrates one — it declares no borrowed KINDS, so nothing is required, though a
|
|
50
|
-
* caller holding a linked system's config attaches it here (`{ sources: { linkedSystems: { ds } } }`). This is the
|
|
51
|
-
* config every CLI / pipeline / studio consumer reads. Studio's design-file config type lives in
|
|
52
|
-
* studio (`apps/studio/src/configs/design-file.ts`) — a studio-only document type.
|
|
53
|
-
*/
|
|
54
45
|
const System = defineConfig({
|
|
55
46
|
name: WEB_CONFIG_NAME,
|
|
56
47
|
description: "A design system: the values, primitives and compositions an app is built from. A ref is written `{ \"__ref\": \"<kind>:<path>\" }`, so a token is `{ \"__ref\": \"token:<group>/<name>\" }` and a token group is `{ \"__ref\": \"token:<group>\" }`. Build it in this order. Tokens first, in groups by purpose (colors, spacing, radii, type sizes), since everything else names them. Then style properties, each with `values` holding one ref to the token group whose members it accepts (`{ \"__ref\": \"token:color\" }`), so a prop takes token names rather than raw CSS; add a string keyword only for a value no token holds. A style rule's bag holds a prop's values (`\"padding\": \"4\"`, `\"bg\": \"brand\"`), never raw CSS. Then a few primitive components, one layer each, whose props are style properties (a box for layout and surface, a text for type, a pressable for interaction). Then every other component composed from those primitives: its layers name a primitive or an element, its anatomy places them (a node renders a layer, a tag or `Slot` where a slot prop's content lands; `children` is the edge list; `visible` is `{ \"$state\": \"<prop>\" }`; a prop shown in a nested layer is a `forward` route, and `$state` never sits in a node's props), and its style rules set style-property values per layer, keyed by prop values when a variant changes them. Modes (a dark mode is `{ type: \"selector\", value: \".dark\" }`) change token values through a token's `overrides`, so a component never restyles for a mode; modifiers (hover, focus, disabled) name a state, and a style rule applies under one as a `_hover` block inside a layer bag. Composites bundle style values that recur. Last, register canvas roles: the canvas draws with them, one entity per tool (`frame` for the layout primitive, `text` for the text primitive, `image`) whose entries name the components that tool inserts, and a tool whose role is unregistered is disabled. Give each component a `preview` entry under `*` so it shows content, and never write a CSS property name where a style-property name belongs.",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Named } from "../../framework/named.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/entities/documentation/Documentation.d.ts
|
|
6
6
|
/** Knowledge Base articles are shared independently of a user's system. */
|
|
7
|
-
declare const
|
|
7
|
+
declare const DocumentationDefinition: EntityClass<z.ZodObject<{
|
|
8
8
|
title: z.ZodString;
|
|
9
9
|
summary: z.ZodOptional<z.ZodString>;
|
|
10
10
|
markdown: z.ZodString;
|
|
@@ -23,22 +23,9 @@ declare const Documentation: EntityClass<z.ZodObject<{
|
|
|
23
23
|
readonly input: z.ZodObject<{
|
|
24
24
|
query: z.ZodDefault<z.ZodString>;
|
|
25
25
|
}, z.core.$strip>;
|
|
26
|
-
readonly readOnly: true;
|
|
27
|
-
readonly label: "Search";
|
|
28
|
-
readonly description: "Find articles by text in their path, title, summary, or Markdown. An empty query browses all articles. Returns metadata without article bodies; use get to read an article.";
|
|
29
|
-
readonly scope: "collection";
|
|
30
|
-
readonly example: () => {
|
|
31
|
-
query: string;
|
|
32
|
-
};
|
|
33
|
-
readonly handler: (input: Record<string, unknown>, config: Config) => {
|
|
34
|
-
path: string;
|
|
35
|
-
title: string;
|
|
36
|
-
summary: string | undefined;
|
|
37
|
-
category: string;
|
|
38
|
-
products: ("create" | "uds")[];
|
|
39
|
-
platform: "mobile" | "web" | undefined;
|
|
40
|
-
}[];
|
|
41
26
|
};
|
|
42
27
|
}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
28
|
+
interface DocumentationClass extends Named<typeof DocumentationDefinition> {}
|
|
29
|
+
declare const Documentation: DocumentationClass;
|
|
43
30
|
//#endregion
|
|
44
|
-
export { Documentation };
|
|
31
|
+
export { Documentation, DocumentationClass };
|
|
@@ -10,7 +10,6 @@ const documentationFields = z.strictObject({
|
|
|
10
10
|
products: z.array(z.enum(["uds", "create"])).min(1).describe("The products this article explains."),
|
|
11
11
|
platform: z.enum(["web", "mobile"]).optional()
|
|
12
12
|
});
|
|
13
|
-
/** Knowledge Base articles are shared independently of a user's system. */
|
|
14
13
|
const Documentation = defineEntity({
|
|
15
14
|
kind: "documentation",
|
|
16
15
|
label: "Documentation",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
2
|
+
import { Named } from "../../framework/named.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
|
|
4
5
|
//#region src/entities/native/NativeModifier.d.ts
|
|
5
6
|
declare const NATIVE_ACTIVATIONS: readonly ["appearance", "min-width", "operating-system", "state"];
|
|
6
7
|
type NativeActivation = (typeof NATIVE_ACTIVATIONS)[number];
|
|
7
|
-
declare const
|
|
8
|
+
declare const NativeModifierDefinition: EntityClass<z.ZodObject<{
|
|
8
9
|
type: z.ZodEnum<{
|
|
9
10
|
appearance: "appearance";
|
|
10
11
|
"min-width": "min-width";
|
|
@@ -20,6 +21,8 @@ declare const NativeModifier: EntityClass<z.ZodObject<{
|
|
|
20
21
|
default: z.ZodOptional<z.ZodObject<{
|
|
21
22
|
__ref: z.ZodString;
|
|
22
23
|
}, z.core.$strip>>;
|
|
23
|
-
}, z.core.$strip>, "modifier",
|
|
24
|
+
}, z.core.$strip>, "modifier", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
25
|
+
interface NativeModifierClass extends Named<typeof NativeModifierDefinition> {}
|
|
26
|
+
declare const NativeModifier: NativeModifierClass;
|
|
24
27
|
//#endregion
|
|
25
|
-
export { NATIVE_ACTIVATIONS, NativeActivation, NativeModifier };
|
|
28
|
+
export { NATIVE_ACTIVATIONS, NativeActivation, NativeModifier, NativeModifierClass };
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { SubEntityClass } from "../../framework/defineSubEntity.js";
|
|
2
2
|
import { ComputedInput } from "../../framework/registry.js";
|
|
3
3
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
4
|
+
import { Named } from "../../framework/named.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
|
|
6
7
|
//#region src/entities/native/NativeSettings.d.ts
|
|
7
8
|
/** The `canvas` section — how the browser canvas renders a native system. */
|
|
8
|
-
declare const
|
|
9
|
+
declare const CanvasSectionDefinition: SubEntityClass<z.ZodObject<{
|
|
9
10
|
packageAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
10
11
|
}, z.core.$strict>>;
|
|
12
|
+
interface CanvasSectionClass extends Named<typeof CanvasSectionDefinition> {}
|
|
13
|
+
declare const CanvasSection: CanvasSectionClass;
|
|
11
14
|
/**
|
|
12
15
|
* `NativeSettings` — the settings of a `ReactNativeSystem`. The same kind as `Settings`, so a reader
|
|
13
16
|
* asks `Settings.get(config)` on either; the shape differs: no `css` and no `playground`, since a
|
|
@@ -41,11 +44,11 @@ declare const NativeSettings: EntityClass<z.ZodObject<Omit<{
|
|
|
41
44
|
canvas: z.ZodOptional<z.ZodObject<{
|
|
42
45
|
packageAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
43
46
|
}, z.core.$strict>>;
|
|
44
|
-
}, z.core.$strip>, z.ZodObject<Omit<Record<never, never>, never> & {}, z.core.$strip>, "settings",
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<Omit<Record<never, never>, never> & {}, z.core.$strip>, "settings", {}, {
|
|
45
48
|
readonly inputDir: ({
|
|
46
49
|
member,
|
|
47
50
|
config
|
|
48
51
|
}: ComputedInput) => string;
|
|
49
52
|
}, true, Record<never, never>, Record<never, never>>;
|
|
50
53
|
//#endregion
|
|
51
|
-
export { CanvasSection, NativeSettings };
|
|
54
|
+
export { CanvasSection, CanvasSectionClass, NativeSettings };
|
|
@@ -9,7 +9,6 @@ packageAliases: z.record(z.string(), z.string()).meta({
|
|
|
9
9
|
title: "Package aliases",
|
|
10
10
|
description: "Packages the browser canvas swaps for a local module, by package name. Paths resolve from the config directory. Phone and app builds keep the real package."
|
|
11
11
|
}).optional() });
|
|
12
|
-
/** The `canvas` section — how the browser canvas renders a native system. */
|
|
13
12
|
const CanvasSection = defineSubEntity({
|
|
14
13
|
name: "canvas",
|
|
15
14
|
label: "Canvas",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Ref } from "../../framework/utils/ref-grammar.js";
|
|
2
2
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
3
|
-
import { Config } from "../../framework/Config.js";
|
|
4
3
|
import { StylePropValue } from "../system/StyleProperty.js";
|
|
5
4
|
import { z } from "zod";
|
|
6
5
|
|
|
@@ -332,24 +331,6 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
|
|
|
332
331
|
zIndex: "zIndex";
|
|
333
332
|
}>>>;
|
|
334
333
|
values: z.ZodOptional<z.ZodArray<z.ZodType<StylePropValue, unknown, z.core.$ZodTypeInternals<StylePropValue, unknown>>>>;
|
|
335
|
-
}, z.core.$strip>, z.ZodObject<Omit<Record<never, never>, never> & {}, z.core.$strip>, "style-property", {
|
|
336
|
-
readonly rename: {
|
|
337
|
-
readonly to: z.ZodString;
|
|
338
|
-
};
|
|
339
|
-
readonly create: {
|
|
340
|
-
readonly path: z.ZodString;
|
|
341
|
-
readonly description: `Create a style property \u2014 the prop a component exposes for one CSS effect. \`path\` is the prop's JSX name, camelCase (\`borderRadius\`), never a CSS name; the CSS goes in \`properties\`. \`values\` is a ref to a token GROUP (\`${string}\`), which offers every token in it and keeps the prop in step with modes and edits; \`{ "alias": "brand", "value": ${string} }\` offers one token under a name of the prop's own; a literal (\`"row"\`, \`{ "alias": "full", "value": "9999px" }\`) is for a keyword the system has no token for. Restating a token's value as a literal instead of referencing it is refused.`;
|
|
342
|
-
readonly example: ({
|
|
343
|
-
config
|
|
344
|
-
}: {
|
|
345
|
-
config: Config;
|
|
346
|
-
kind: string;
|
|
347
|
-
path: string;
|
|
348
|
-
}) => {
|
|
349
|
-
path: string;
|
|
350
|
-
data: Record<string, unknown>;
|
|
351
|
-
} | undefined;
|
|
352
|
-
};
|
|
353
|
-
}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
334
|
+
}, z.core.$strip>, z.ZodObject<Omit<Record<never, never>, never> & {}, z.core.$strip>, "style-property", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
354
335
|
//#endregion
|
|
355
336
|
export { NativeStyleProperty, rnStyleKey };
|
|
@@ -2,8 +2,8 @@ import { Ref } from "../../framework/utils/ref-grammar.js";
|
|
|
2
2
|
import { Ref as Ref$1 } from "../../framework/utils/refs.js";
|
|
3
3
|
import { SubEntityClass } from "../../framework/defineSubEntity.js";
|
|
4
4
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
5
|
-
import { DerivedColor } from "../system/color.js";
|
|
6
5
|
import { ComposedValue } from "../system/composed-values.js";
|
|
6
|
+
import { DerivedColor } from "../system/color.js";
|
|
7
7
|
import { OverrideCondition } from "../system/Token.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
|
|
@@ -24,10 +24,6 @@ declare const NativeToken: EntityClass<z.ZodObject<Omit<{
|
|
|
24
24
|
}, z.core.$strip>>>;
|
|
25
25
|
}, z.core.$strip>, z.ZodObject<Omit<{
|
|
26
26
|
cssPrefix: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, "cssPrefix"> & {}, z.core.$strip>, "token", {
|
|
28
|
-
readonly create: {
|
|
29
|
-
readonly description: `Create a token at \`<group>/<name>\` \u2014 \`data.value\` is the CSS value. The first path segment is its group, and a style property takes a whole group as one ref (\`${string}\`), so put the tokens one prop should offer in one group rather than listing values on the prop.`;
|
|
30
|
-
};
|
|
31
|
-
}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
27
|
+
}, "cssPrefix"> & {}, z.core.$strip>, "token", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
32
28
|
//#endregion
|
|
33
29
|
export { NativeToken, nativeTokenValue };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EntityClass } from "../../framework/defineEntity.js";
|
|
2
|
+
import { Named } from "../../framework/named.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
|
|
4
5
|
//#region src/entities/system/CanvasRole.d.ts
|
|
@@ -12,7 +13,7 @@ import { z } from "zod";
|
|
|
12
13
|
*/
|
|
13
14
|
declare const CANVAS_ROLES: readonly ["frame", "text", "image", "icon", "slot"];
|
|
14
15
|
type CanvasRoleName = (typeof CANVAS_ROLES)[number];
|
|
15
|
-
declare const
|
|
16
|
+
declare const CanvasRoleDefinition: EntityClass<z.ZodObject<{
|
|
16
17
|
entries: z.ZodArray<z.ZodObject<{
|
|
17
18
|
component: z.ZodObject<{
|
|
18
19
|
__ref: z.ZodString;
|
|
@@ -24,10 +25,8 @@ declare const CanvasRole: EntityClass<z.ZodObject<{
|
|
|
24
25
|
axes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
26
|
}, z.core.$strip>>;
|
|
26
27
|
}, z.core.$strip>>;
|
|
27
|
-
}, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "canvas-role", {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<Record<never, never>, z.core.$strip>, "canvas-role", {}, Record<never, never>, false, Record<never, never>, Record<never, never>>;
|
|
29
|
+
interface CanvasRoleClass extends Named<typeof CanvasRoleDefinition> {}
|
|
30
|
+
declare const CanvasRole: CanvasRoleClass;
|
|
32
31
|
//#endregion
|
|
33
|
-
export { CANVAS_ROLES, CanvasRole, CanvasRoleName };
|
|
32
|
+
export { CANVAS_ROLES, CanvasRole, CanvasRoleClass, CanvasRoleName };
|