@yahoo/uds-create-config 5.40.3 → 5.41.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/dist/configs/react-native-system.d.ts +970 -0
- package/dist/configs/react-native-system.js +18 -0
- package/dist/configs/system.d.ts +903 -536
- package/dist/configs/system.js +17 -1
- package/dist/entities/system/LinkedSystem.d.ts +2 -17
- package/dist/entities/system/Motion.d.ts +903 -536
- package/dist/entities/system/Motion.js +81 -101
- package/dist/entities/system/css-motion-reach.js +7 -2
- package/dist/entities/system/css-motion.js +8 -3
- package/dist/entities/system/motion-convert.d.ts +20 -14
- package/dist/entities/system/motion-convert.js +27 -58
- package/dist/entities/system/motion-presets.js +4 -3
- package/dist/entities/system/motion-types.d.ts +7 -0
- package/dist/entities/system/motion-types.js +132 -0
- package/dist/entities/system/motion-variants.js +28 -12
- package/dist/entities/system/reanimated-motion.d.ts +777 -0
- package/dist/entities/system/reanimated-motion.js +100 -0
- package/dist/framework/Config.d.ts +4 -4
- package/dist/framework/Config.js +4 -4
- package/dist/framework/class-names.js +4 -2
- package/dist/framework/registered.d.ts +1 -8
- package/dist/framework/registry.d.ts +1 -2
- package/dist/framework/schema-version.d.ts +1 -1
- package/dist/framework/schema-version.js +5 -5
- package/dist/framework/utils/field-schema.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/migrations/2.0.0/v1-artifact.d.ts +903 -536
- package/dist/migrations/20261015203142_shared_motion.d.ts +4 -0
- package/dist/migrations/20261015203142_shared_motion.js +8 -0
- package/dist/migrations/20261015205522_declarative_reanimated.d.ts +4 -0
- package/dist/migrations/20261015205522_declarative_reanimated.js +8 -0
- package/dist/migrations/20261015212352_native_motion.d.ts +4 -0
- package/dist/migrations/20261015212352_native_motion.js +10 -0
- package/dist/migrations/20261015212414_motion_types.d.ts +5 -0
- package/dist/migrations/20261015212414_motion_types.js +8 -0
- package/dist/migrations/20261015212722_reanimated_cubic_bezier.d.ts +4 -0
- package/dist/migrations/20261015212722_reanimated_cubic_bezier.js +8 -0
- package/dist/migrations/20261015221052_motion_json_schema.d.ts +7 -0
- package/dist/migrations/20261015221052_motion_json_schema.js +8 -0
- package/dist/migrations/20261016135620_motion_type_only.d.ts +9 -0
- package/dist/migrations/20261016135620_motion_type_only.js +9 -0
- package/dist/migrations/20261016164316_motion_compatibility.d.ts +8 -0
- package/dist/migrations/20261016164316_motion_compatibility.js +9 -0
- package/dist/migrations/motion-source-codemod.d.ts +3 -0
- package/dist/spec/motion.d.ts +3 -2
- package/dist/spec/motion.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/configs/system.js
CHANGED
|
@@ -15,6 +15,12 @@ import { Operation } from "../entities/system/Operation.js";
|
|
|
15
15
|
import { Tool } from "../entities/system/Tool.js";
|
|
16
16
|
import { registerSchemaMigrations, registeredSchemaMigrations } from "../framework/schema-version.js";
|
|
17
17
|
import { defineConfig } from "../framework/defineConfig.js";
|
|
18
|
+
import { componentElementSwapMigration } from "../migrations/20261015202345_component_element_swap.js";
|
|
19
|
+
import { declarativeReanimatedMigration } from "../migrations/20261015205522_declarative_reanimated.js";
|
|
20
|
+
import { reanimatedCubicBezierMigration } from "../migrations/20261015212722_reanimated_cubic_bezier.js";
|
|
21
|
+
import { motionJsonSchemaMigration } from "../migrations/20261015221052_motion_json_schema.js";
|
|
22
|
+
import { motionTypeOnlyMigration } from "../migrations/20261016135620_motion_type_only.js";
|
|
23
|
+
import { motionCompatibilityMigration } from "../migrations/20261016164316_motion_compatibility.js";
|
|
18
24
|
import { CanvasRole } from "../entities/system/CanvasRole.js";
|
|
19
25
|
import { GlobalStyle } from "../entities/system/GlobalStyle.js";
|
|
20
26
|
import { Guidance } from "../entities/system/Guidance.js";
|
|
@@ -72,7 +78,9 @@ import { linkExcludeOpMigration } from "../migrations/20261013182150_link_exclud
|
|
|
72
78
|
import { fontFacesMigration } from "../migrations/20261013201548_font_faces.js";
|
|
73
79
|
import { maxAndMinMigration } from "../migrations/20261015171036_max_and_min.js";
|
|
74
80
|
import { componentStyleSetMigration } from "../migrations/20261015192819_component_style_set.js";
|
|
75
|
-
import {
|
|
81
|
+
import { sharedMotionMigration } from "../migrations/20261015203142_shared_motion.js";
|
|
82
|
+
import { nativeMotionMigration } from "../migrations/20261015212352_native_motion.js";
|
|
83
|
+
import { motionTypesMigration } from "../migrations/20261015212414_motion_types.js";
|
|
76
84
|
const System = defineConfig({
|
|
77
85
|
name: WEB_CONFIG_NAME,
|
|
78
86
|
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.",
|
|
@@ -154,8 +162,16 @@ if (!registeredSchemaMigrations().has(20261013154037)) registerSchemaMigrations(
|
|
|
154
162
|
if (!registeredSchemaMigrations().has(20261013164300)) registerSchemaMigrations(tokenOverridesListMigration);
|
|
155
163
|
if (!registeredSchemaMigrations().has(20261013182150)) registerSchemaMigrations(linkExcludeOpMigration);
|
|
156
164
|
if (!registeredSchemaMigrations().has(20261013201548)) registerSchemaMigrations(fontFacesMigration);
|
|
165
|
+
if (!registeredSchemaMigrations().has(20261015212352)) registerSchemaMigrations(nativeMotionMigration);
|
|
166
|
+
if (!registeredSchemaMigrations().has(20261015212414)) registerSchemaMigrations(motionTypesMigration);
|
|
167
|
+
if (!registeredSchemaMigrations().has(20261015203142)) registerSchemaMigrations(sharedMotionMigration);
|
|
168
|
+
if (!registeredSchemaMigrations().has(20261015205522)) registerSchemaMigrations(declarativeReanimatedMigration);
|
|
157
169
|
if (!registeredSchemaMigrations().has(20261015171036)) registerSchemaMigrations(maxAndMinMigration);
|
|
158
170
|
if (!registeredSchemaMigrations().has(20261015192819)) registerSchemaMigrations(componentStyleSetMigration);
|
|
171
|
+
if (!registeredSchemaMigrations().has(20261015212722)) registerSchemaMigrations(reanimatedCubicBezierMigration);
|
|
172
|
+
if (!registeredSchemaMigrations().has(20261015221052)) registerSchemaMigrations(motionJsonSchemaMigration);
|
|
173
|
+
if (!registeredSchemaMigrations().has(20261016135620)) registerSchemaMigrations(motionTypeOnlyMigration);
|
|
159
174
|
if (!registeredSchemaMigrations().has(20261015202345)) registerSchemaMigrations(componentElementSwapMigration);
|
|
175
|
+
if (!registeredSchemaMigrations().has(20261016164316)) registerSchemaMigrations(motionCompatibilityMigration);
|
|
160
176
|
//#endregion
|
|
161
177
|
export { System };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref } from "../../framework/utils/refs.js";
|
|
2
2
|
import { SourceResolver, SourceState } from "../../framework/sources.js";
|
|
3
3
|
import { ComputedInput } from "../../framework/registry.js";
|
|
4
|
-
import { RegisteredComponentContracts, RegisteredEntities
|
|
4
|
+
import { RegisteredComponentContracts, RegisteredEntities } from "../../framework/registered.js";
|
|
5
5
|
import { EntityClass, ItemOf } from "../../framework/defineEntity.js";
|
|
6
6
|
import { PartialBodyOf } from "../../framework/defineConfig.js";
|
|
7
7
|
import { Named } from "../../framework/named.js";
|
|
@@ -256,22 +256,7 @@ type PinOptions = { [A in keyof RegisteredEntities]?: Record<string, PinAdjustme
|
|
|
256
256
|
*/
|
|
257
257
|
type PinOptionsInput<K extends string = string> = { [A in keyof RegisteredEntities]?: RegisteredEntities[A] extends {
|
|
258
258
|
readonly kind: 'component';
|
|
259
|
-
} ? { [P in K]?: PinComponentAdjustment<RegisteredEntities[A], P> } : RegisteredEntities[A]
|
|
260
|
-
readonly kind: 'motion';
|
|
261
|
-
} ? { [P in K]?: PinMotionAdjustment<RegisteredEntities[A], P> } : Record<string, PinAdjustment<RegisteredEntities[A]>> };
|
|
262
|
-
/** A motion entry: an adjustment whose `runtime` is one the linked preset can be read as
|
|
263
|
-
* ({@link RegisteredMotionRuntimes}), so a swap the conversion would refuse doesn't type. */
|
|
264
|
-
type PinMotionAdjustment<E, P extends string> = {
|
|
265
|
-
override?: PinMotionBody<E, P> | KindRefOf<E>;
|
|
266
|
-
extend?: PinMotionBody<E, P>;
|
|
267
|
-
hidden?: boolean;
|
|
268
|
-
};
|
|
269
|
-
type PinMotionBody<E, P extends string> = Extract<StoredBodyOf<PartialBodyOf<E>>, {
|
|
270
|
-
runtime?: MotionRuntimeOf<P>;
|
|
271
|
-
}>;
|
|
272
|
-
/** The linked presets registered at `path`, from whichever source. */
|
|
273
|
-
type LinkedMotionKey<P extends string> = Extract<keyof RegisteredMotionRuntimes, `${P}@${string}`>;
|
|
274
|
-
type MotionRuntimeOf<P extends string> = [LinkedMotionKey<P>] extends [never] ? 'css' | 'js' : RegisteredMotionRuntimes[LinkedMotionKey<P>];
|
|
259
|
+
} ? { [P in K]?: PinComponentAdjustment<RegisteredEntities[A], P> } : Record<string, PinAdjustment<RegisteredEntities[A]>> };
|
|
275
260
|
/** A ref to another entity of `E`'s kind, which re-points the path to it. */
|
|
276
261
|
type KindRefOf<E> = E extends {
|
|
277
262
|
readonly kind: infer K extends string;
|