@yahoo/uds-create-config 5.41.2 → 5.41.3

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.
Files changed (30) hide show
  1. package/README.md +7 -0
  2. package/dist/configs/react-native-system.d.ts +153 -153
  3. package/dist/configs/react-native-system.js +1 -1
  4. package/dist/configs/system.d.ts +122 -122
  5. package/dist/configs/system.js +3 -1
  6. package/dist/entities/documentation/Documentation.d.ts +1 -1
  7. package/dist/entities/native/NativeModifier.d.ts +2 -2
  8. package/dist/entities/native/NativeStyleProperty.d.ts +61 -61
  9. package/dist/entities/native/NativeToken.js +2 -1
  10. package/dist/entities/system/Component.js +7 -5
  11. package/dist/entities/system/Modifier.d.ts +2 -2
  12. package/dist/entities/system/Motion.d.ts +122 -122
  13. package/dist/entities/system/Motion.js +1 -1
  14. package/dist/entities/system/Token.js +1 -1
  15. package/dist/entities/system/component-module.js +1 -1
  16. package/dist/entities/system/linked-style-values.js +1 -1
  17. package/dist/entities/system/linked-token-values.js +2 -2
  18. package/dist/entities/system/reanimated-motion.d.ts +122 -122
  19. package/dist/entities/system/style-bag.d.ts +1 -1
  20. package/dist/entities/system/style-bag.js +32 -14
  21. package/dist/framework/Config.d.ts +1 -1
  22. package/dist/framework/Config.js +1 -1
  23. package/dist/framework/schema-version.d.ts +1 -1
  24. package/dist/framework/schema-version.js +5 -5
  25. package/dist/index.js +1 -1
  26. package/dist/migrations/2.0.0/v1-artifact.d.ts +122 -122
  27. package/dist/migrations/20261016201727_native_style_arrays_and_auto.d.ts +4 -0
  28. package/dist/migrations/20261016201727_native_style_arrays_and_auto.js +10 -0
  29. package/dist/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +2 -2
@@ -11,6 +11,36 @@ declare const rnStyleKey: z.ZodEnum<{
11
11
  color: "color";
12
12
  inset: "inset";
13
13
  position: "position";
14
+ fontFamily: "fontFamily";
15
+ end: "end";
16
+ start: "start";
17
+ bottom: "bottom";
18
+ left: "left";
19
+ right: "right";
20
+ top: "top";
21
+ flex: "flex";
22
+ cursor: "cursor";
23
+ direction: "direction";
24
+ display: "display";
25
+ gap: "gap";
26
+ height: "height";
27
+ isolation: "isolation";
28
+ margin: "margin";
29
+ opacity: "opacity";
30
+ overflow: "overflow";
31
+ padding: "padding";
32
+ width: "width";
33
+ flexGrow: "flexGrow";
34
+ flexShrink: "flexShrink";
35
+ flexBasis: "flexBasis";
36
+ lineHeight: "lineHeight";
37
+ elevation: "elevation";
38
+ fontSize: "fontSize";
39
+ fontStyle: "fontStyle";
40
+ fontVariant: "fontVariant";
41
+ fontWeight: "fontWeight";
42
+ letterSpacing: "letterSpacing";
43
+ pointerEvents: "pointerEvents";
14
44
  alignContent: "alignContent";
15
45
  alignItems: "alignItems";
16
46
  alignSelf: "alignSelf";
@@ -49,32 +79,15 @@ declare const rnStyleKey: z.ZodEnum<{
49
79
  borderTopStartRadius: "borderTopStartRadius";
50
80
  borderTopWidth: "borderTopWidth";
51
81
  borderWidth: "borderWidth";
52
- bottom: "bottom";
53
82
  boxShadow: "boxShadow";
54
83
  boxSizing: "boxSizing";
55
84
  columnGap: "columnGap";
56
- cursor: "cursor";
57
- direction: "direction";
58
- display: "display";
59
- elevation: "elevation";
60
- end: "end";
61
85
  experimental_backgroundImage: "experimental_backgroundImage";
62
86
  experimental_backgroundPosition: "experimental_backgroundPosition";
63
87
  experimental_backgroundRepeat: "experimental_backgroundRepeat";
64
88
  experimental_backgroundSize: "experimental_backgroundSize";
65
- flex: "flex";
66
- flexBasis: "flexBasis";
67
89
  flexDirection: "flexDirection";
68
- flexGrow: "flexGrow";
69
- flexShrink: "flexShrink";
70
90
  flexWrap: "flexWrap";
71
- fontFamily: "fontFamily";
72
- fontSize: "fontSize";
73
- fontStyle: "fontStyle";
74
- fontVariant: "fontVariant";
75
- fontWeight: "fontWeight";
76
- gap: "gap";
77
- height: "height";
78
91
  includeFontPadding: "includeFontPadding";
79
92
  insetBlock: "insetBlock";
80
93
  insetBlockEnd: "insetBlockEnd";
@@ -82,12 +95,7 @@ declare const rnStyleKey: z.ZodEnum<{
82
95
  insetInline: "insetInline";
83
96
  insetInlineEnd: "insetInlineEnd";
84
97
  insetInlineStart: "insetInlineStart";
85
- isolation: "isolation";
86
98
  justifyContent: "justifyContent";
87
- left: "left";
88
- letterSpacing: "letterSpacing";
89
- lineHeight: "lineHeight";
90
- margin: "margin";
91
99
  marginBlock: "marginBlock";
92
100
  marginBlockEnd: "marginBlockEnd";
93
101
  marginBlockStart: "marginBlockStart";
@@ -108,14 +116,11 @@ declare const rnStyleKey: z.ZodEnum<{
108
116
  minWidth: "minWidth";
109
117
  mixBlendMode: "mixBlendMode";
110
118
  objectFit: "objectFit";
111
- opacity: "opacity";
112
119
  outlineColor: "outlineColor";
113
120
  outlineOffset: "outlineOffset";
114
121
  outlineStyle: "outlineStyle";
115
122
  outlineWidth: "outlineWidth";
116
- overflow: "overflow";
117
123
  overlayColor: "overlayColor";
118
- padding: "padding";
119
124
  paddingBlock: "paddingBlock";
120
125
  paddingBlockEnd: "paddingBlockEnd";
121
126
  paddingBlockStart: "paddingBlockStart";
@@ -130,9 +135,7 @@ declare const rnStyleKey: z.ZodEnum<{
130
135
  paddingStart: "paddingStart";
131
136
  paddingTop: "paddingTop";
132
137
  paddingVertical: "paddingVertical";
133
- pointerEvents: "pointerEvents";
134
138
  resizeMode: "resizeMode";
135
- right: "right";
136
139
  rotation: "rotation";
137
140
  rowGap: "rowGap";
138
141
  scaleX: "scaleX";
@@ -141,7 +144,6 @@ declare const rnStyleKey: z.ZodEnum<{
141
144
  shadowOffset: "shadowOffset";
142
145
  shadowOpacity: "shadowOpacity";
143
146
  shadowRadius: "shadowRadius";
144
- start: "start";
145
147
  textAlign: "textAlign";
146
148
  textAlignVertical: "textAlignVertical";
147
149
  textDecorationColor: "textDecorationColor";
@@ -152,14 +154,12 @@ declare const rnStyleKey: z.ZodEnum<{
152
154
  textShadowRadius: "textShadowRadius";
153
155
  textTransform: "textTransform";
154
156
  tintColor: "tintColor";
155
- top: "top";
156
157
  transformMatrix: "transformMatrix";
157
158
  transformOrigin: "transformOrigin";
158
159
  translateX: "translateX";
159
160
  translateY: "translateY";
160
161
  userSelect: "userSelect";
161
162
  verticalAlign: "verticalAlign";
162
- width: "width";
163
163
  writingDirection: "writingDirection";
164
164
  zIndex: "zIndex";
165
165
  }>;
@@ -206,13 +206,43 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
206
206
  __ref: z.ZodString;
207
207
  }, z.core.$strip>]>>>;
208
208
  opacityOf: z.ZodOptional<z.ZodLazy<z.ZodType<Ref, unknown, z.core.$ZodTypeInternals<Ref, unknown>>>>;
209
- }, "values" | "alpha" | "properties" | "selector" | "classPrefix" | "declarations"> & {
209
+ }, "values" | "alpha" | "properties" | "declarations" | "classPrefix" | "selector"> & {
210
210
  properties: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodEnum<{
211
211
  transform: "transform";
212
212
  filter: "filter";
213
213
  color: "color";
214
214
  inset: "inset";
215
215
  position: "position";
216
+ fontFamily: "fontFamily";
217
+ end: "end";
218
+ start: "start";
219
+ bottom: "bottom";
220
+ left: "left";
221
+ right: "right";
222
+ top: "top";
223
+ flex: "flex";
224
+ cursor: "cursor";
225
+ direction: "direction";
226
+ display: "display";
227
+ gap: "gap";
228
+ height: "height";
229
+ isolation: "isolation";
230
+ margin: "margin";
231
+ opacity: "opacity";
232
+ overflow: "overflow";
233
+ padding: "padding";
234
+ width: "width";
235
+ flexGrow: "flexGrow";
236
+ flexShrink: "flexShrink";
237
+ flexBasis: "flexBasis";
238
+ lineHeight: "lineHeight";
239
+ elevation: "elevation";
240
+ fontSize: "fontSize";
241
+ fontStyle: "fontStyle";
242
+ fontVariant: "fontVariant";
243
+ fontWeight: "fontWeight";
244
+ letterSpacing: "letterSpacing";
245
+ pointerEvents: "pointerEvents";
216
246
  alignContent: "alignContent";
217
247
  alignItems: "alignItems";
218
248
  alignSelf: "alignSelf";
@@ -251,32 +281,15 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
251
281
  borderTopStartRadius: "borderTopStartRadius";
252
282
  borderTopWidth: "borderTopWidth";
253
283
  borderWidth: "borderWidth";
254
- bottom: "bottom";
255
284
  boxShadow: "boxShadow";
256
285
  boxSizing: "boxSizing";
257
286
  columnGap: "columnGap";
258
- cursor: "cursor";
259
- direction: "direction";
260
- display: "display";
261
- elevation: "elevation";
262
- end: "end";
263
287
  experimental_backgroundImage: "experimental_backgroundImage";
264
288
  experimental_backgroundPosition: "experimental_backgroundPosition";
265
289
  experimental_backgroundRepeat: "experimental_backgroundRepeat";
266
290
  experimental_backgroundSize: "experimental_backgroundSize";
267
- flex: "flex";
268
- flexBasis: "flexBasis";
269
291
  flexDirection: "flexDirection";
270
- flexGrow: "flexGrow";
271
- flexShrink: "flexShrink";
272
292
  flexWrap: "flexWrap";
273
- fontFamily: "fontFamily";
274
- fontSize: "fontSize";
275
- fontStyle: "fontStyle";
276
- fontVariant: "fontVariant";
277
- fontWeight: "fontWeight";
278
- gap: "gap";
279
- height: "height";
280
293
  includeFontPadding: "includeFontPadding";
281
294
  insetBlock: "insetBlock";
282
295
  insetBlockEnd: "insetBlockEnd";
@@ -284,12 +297,7 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
284
297
  insetInline: "insetInline";
285
298
  insetInlineEnd: "insetInlineEnd";
286
299
  insetInlineStart: "insetInlineStart";
287
- isolation: "isolation";
288
300
  justifyContent: "justifyContent";
289
- left: "left";
290
- letterSpacing: "letterSpacing";
291
- lineHeight: "lineHeight";
292
- margin: "margin";
293
301
  marginBlock: "marginBlock";
294
302
  marginBlockEnd: "marginBlockEnd";
295
303
  marginBlockStart: "marginBlockStart";
@@ -310,14 +318,11 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
310
318
  minWidth: "minWidth";
311
319
  mixBlendMode: "mixBlendMode";
312
320
  objectFit: "objectFit";
313
- opacity: "opacity";
314
321
  outlineColor: "outlineColor";
315
322
  outlineOffset: "outlineOffset";
316
323
  outlineStyle: "outlineStyle";
317
324
  outlineWidth: "outlineWidth";
318
- overflow: "overflow";
319
325
  overlayColor: "overlayColor";
320
- padding: "padding";
321
326
  paddingBlock: "paddingBlock";
322
327
  paddingBlockEnd: "paddingBlockEnd";
323
328
  paddingBlockStart: "paddingBlockStart";
@@ -332,9 +337,7 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
332
337
  paddingStart: "paddingStart";
333
338
  paddingTop: "paddingTop";
334
339
  paddingVertical: "paddingVertical";
335
- pointerEvents: "pointerEvents";
336
340
  resizeMode: "resizeMode";
337
- right: "right";
338
341
  rotation: "rotation";
339
342
  rowGap: "rowGap";
340
343
  scaleX: "scaleX";
@@ -343,7 +346,6 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
343
346
  shadowOffset: "shadowOffset";
344
347
  shadowOpacity: "shadowOpacity";
345
348
  shadowRadius: "shadowRadius";
346
- start: "start";
347
349
  textAlign: "textAlign";
348
350
  textAlignVertical: "textAlignVertical";
349
351
  textDecorationColor: "textDecorationColor";
@@ -354,14 +356,12 @@ declare const NativeStyleProperty: EntityClass<z.ZodObject<Omit<{
354
356
  textShadowRadius: "textShadowRadius";
355
357
  textTransform: "textTransform";
356
358
  tintColor: "tintColor";
357
- top: "top";
358
359
  transformMatrix: "transformMatrix";
359
360
  transformOrigin: "transformOrigin";
360
361
  translateX: "translateX";
361
362
  translateY: "translateY";
362
363
  userSelect: "userSelect";
363
364
  verticalAlign: "verticalAlign";
364
- width: "width";
365
365
  writingDirection: "writingDirection";
366
366
  zIndex: "zIndex";
367
367
  }>>>;
@@ -1,8 +1,8 @@
1
+ import { NATIVE_CONFIG_NAME } from "../../configs/platform.js";
1
2
  import { refSchema } from "../../framework/utils/refs.js";
2
3
  import { oklchColor } from "../system/color.js";
3
4
  import { orList } from "../../framework/defineSubEntity.js";
4
5
  import { Font } from "../system/Font.js";
5
- import { NATIVE_CONFIG_NAME } from "../../configs/platform.js";
6
6
  import { nativeFlexValue } from "../system/linked-flex-values.js";
7
7
  import { relativeLineHeightValue } from "../system/linked-line-height-values.js";
8
8
  import { prepareLinkedTokenBody } from "../system/linked-token-values.js";
@@ -35,6 +35,7 @@ const nativeTokenString = z.union([
35
35
  z.string().regex(/^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/),
36
36
  z.string().regex(rgbColor),
37
37
  z.literal("transparent"),
38
+ z.literal("auto"),
38
39
  z.literal("none")
39
40
  ]);
40
41
  /** A derived colour whose operands are colours the native theme can flatten: no gradient, at any
@@ -1,3 +1,4 @@
1
+ import "../../configs/platform.js";
1
2
  import { reject, rejectData } from "../../framework/rejection.js";
2
3
  import { canonicalCondition, collectRefs, isRef, kindOf, memberRef, pathOf, ref, refLeaf, refSchema, sourceOf, splitRef } from "../../framework/utils/refs.js";
3
4
  import { isPlainObject } from "../../framework/utils/field-path.js";
@@ -13,7 +14,7 @@ import { listedIn } from "../../framework/utils/enumerated.js";
13
14
  import { valueSchemaOf } from "../../framework/value-domain.js";
14
15
  import { Package } from "./Package.js";
15
16
  import { bindPreviewGlyphs, glyphMemberRefIn } from "./glyph-identity.js";
16
- import { Style, addBagKeyIssues, anatomyPropValue, bagNameEdges, bagRewriteName, bindBagTokens, collectBag, isPlainRecord, openBag, styleValue } from "./style-bag.js";
17
+ import { Style, addBagKeyIssues, anatomyPropValue, bagNameEdges, bagRewriteName, bindBagTokens, collectBag, isPlainRecord, nativeStyleArray, openBag, styleValueFor } from "./style-bag.js";
17
18
  import { storedPreview } from "../../framework/preview-store.js";
18
19
  import { glyphPropsOf, glyphPropsOfBody, propOwner, propValueDomain, refListOf, resolveComponentProps, stylePropNumberUnit, stylePropValueLeaves, validateComponentProps } from "../../framework/projections.js";
19
20
  import { carriesContent, intoName, isValueSlot, renderBoundProp, routedPropIn, routesContent, surfaceProps } from "../../framework/prop-surface.js";
@@ -680,7 +681,8 @@ function styleBagValue({ config, declaration, name = "<prop>", glyphLibraries })
680
681
  derivedColor,
681
682
  gradient,
682
683
  shadowValue,
683
- refSchema
684
+ refSchema,
685
+ ...config.name === "react-native-system" ? [nativeStyleArray] : []
684
686
  ], { error: (issue) => {
685
687
  const leaves = stylePropValueLeaves(config, property);
686
688
  if (typeof issue.input === "number" && leaves.includes(String(issue.input))) return `\`${name}\`: \`${issue.input}\` names a value as a string, so write \`'${issue.input}'\`. A number names only a value the style property declares as a number.`;
@@ -690,7 +692,7 @@ function styleBagValue({ config, declaration, name = "<prop>", glyphLibraries })
690
692
  const unit = stylePropNumberUnit(config, property);
691
693
  const number = unit === void 0 ? "" : unit === "unitless" ? ", or a number" : `, or a number of \`${unit}\` such as \`600\``;
692
694
  return `\`${name}\` takes one of ${shown.join(", ")}${more}${arbitrary}${number}, or a token ref. A value the system has no token for is added to the style property's \`values\` first.`;
693
- } });
695
+ } }).pipe(styleValueFor(config));
694
696
  }
695
697
  /**
696
698
  * What a rule may set on one layer.
@@ -765,7 +767,7 @@ function buildBagFor(config, layerElement) {
765
767
  const nested = z.lazy(() => bag).optional();
766
768
  for (const mod of config.list("modifier")) shape[`_${mod.leaf}`] = nested;
767
769
  const keys = new Set(Object.keys(shape));
768
- bag = z.object(shape).catchall(styleValue).superRefine((parsed, ctx) => addBagKeyIssues({
770
+ bag = z.object(shape).catchall(styleValueFor(config)).superRefine((parsed, ctx) => addBagKeyIssues({
769
771
  config,
770
772
  bag: parsed,
771
773
  ctx,
@@ -1061,7 +1063,7 @@ const StyleRule = defineSubEntity({
1061
1063
  const body = parent;
1062
1064
  if (!config || !body) return z.object({
1063
1065
  when: z.record(z.string(), z.unknown()).nullable().default(null),
1064
- layers: z.record(z.string(), z.record(z.string(), z.union([styleValue, z.never()], { error: "a layer bag value is a style-prop value — a token leaf such as `surface`, a keyword, a bracketed literal such as `[13px]` — or a modifier block holding more of them. Content is not set in a style rule: a glyph or a nested element is an anatomy node under the layer's node, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" }, \"visible\": { \"$state\": \"<prop>\", \"eq\": \"<value>\" } }` to show one per variant value." })), { error: ruleShapeError })
1066
+ layers: z.record(z.string(), z.record(z.string(), z.union([styleValueFor(config), z.never()], { error: "a layer bag value is a style-prop value — a token leaf such as `surface`, a keyword, a bracketed literal such as `[13px]` — or a modifier block holding more of them. Content is not set in a style rule: a glyph or a nested element is an anatomy node under the layer's node, `{ \"element\": { \"__ref\": \"icon:<library>/<Name>\" }, \"visible\": { \"$state\": \"<prop>\", \"eq\": \"<value>\" } }` to show one per variant value." })), { error: ruleShapeError })
1065
1067
  }, { error: ruleShapeError });
1066
1068
  return perOwner({
1067
1069
  cache: ruleSchemas,
@@ -30,8 +30,8 @@ type WebActivation = (typeof WEB_ACTIVATIONS)[number];
30
30
  */
31
31
  declare const modifierGroupFields: z.ZodObject<{
32
32
  type: z.ZodOptional<z.ZodEnum<{
33
- state: "state";
34
33
  mode: "mode";
34
+ state: "state";
35
35
  }>>;
36
36
  default: z.ZodOptional<z.ZodObject<{
37
37
  __ref: z.ZodString;
@@ -53,8 +53,8 @@ declare const ModifierDefinition: EntityClass<z.ZodObject<{
53
53
  declarations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
54
54
  }, z.core.$strip>, z.ZodObject<{
55
55
  type: z.ZodOptional<z.ZodEnum<{
56
- state: "state";
57
56
  mode: "mode";
57
+ state: "state";
58
58
  }>>;
59
59
  default: z.ZodOptional<z.ZodObject<{
60
60
  __ref: z.ZodString;