@yahoo/uds-create-cli 5.81.1 → 5.82.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yahoo/uds-create-cli",
3
- "version": "5.81.1",
3
+ "version": "5.82.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,10 +32,10 @@
32
32
  "@modelcontextprotocol/sdk": "^1.32.2",
33
33
  "@orpc/client": "^1.13.9",
34
34
  "@orpc/contract": "^1.13.9",
35
- "@yahoo/uds-create-config": "5.81.1",
36
- "@yahoo/uds-create-loader": "5.81.1",
37
- "@yahoo/uds-create-types": "5.81.1",
38
- "@yahoo/uds-create-utils": "5.81.1",
35
+ "@yahoo/uds-create-config": "5.82.0",
36
+ "@yahoo/uds-create-loader": "5.82.0",
37
+ "@yahoo/uds-create-types": "5.82.0",
38
+ "@yahoo/uds-create-utils": "5.82.0",
39
39
  "esbuild": "^0.27.4",
40
40
  "ts-morph": "^27.0.2",
41
41
  "get-tsconfig": "^4.10.0",
@@ -52,13 +52,13 @@
52
52
  "lodash": "^4.17.23",
53
53
  "prettier": "^3.8.1"
54
54
  },
55
- "udsSchemaVersion": 20261105185042,
55
+ "udsSchemaVersion": 20261106185419,
56
56
  "optionalDependencies": {
57
- "@yahoo/uds-create-cli-darwin-arm64": "5.81.1",
58
- "@yahoo/uds-create-cli-darwin-x64": "5.81.1",
59
- "@yahoo/uds-create-cli-linux-arm64": "5.81.1",
60
- "@yahoo/uds-create-cli-linux-x64": "5.81.1",
61
- "@yahoo/uds-create-cli-linux-arm64-musl": "5.81.1",
62
- "@yahoo/uds-create-cli-linux-x64-musl": "5.81.1"
57
+ "@yahoo/uds-create-cli-darwin-arm64": "5.82.0",
58
+ "@yahoo/uds-create-cli-darwin-x64": "5.82.0",
59
+ "@yahoo/uds-create-cli-linux-arm64": "5.82.0",
60
+ "@yahoo/uds-create-cli-linux-x64": "5.82.0",
61
+ "@yahoo/uds-create-cli-linux-arm64-musl": "5.82.0",
62
+ "@yahoo/uds-create-cli-linux-x64-musl": "5.82.0"
63
63
  }
64
64
  }
@@ -78124,7 +78124,8 @@ var Modifier = defineEntity({
78124
78124
  type: external_exports.enum(WEB_ACTIVATIONS).describe("How the modifier activates, such as `selector` or `media`."),
78125
78125
  value: external_exports.union([external_exports.string(), external_exports.lazy(() => Composite)]).describe("The selector or query it activates on, or a composite ref."),
78126
78126
  media: external_exports.string().min(1).optional().describe("A media query a selector modifier also needs, as `hover` applies only under `(hover: hover)` so a tap on a touch screen does not leave it stuck."),
78127
- declarations: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Declarations every rule under the modifier sets first, as `before` sets `content: var(--tw-content)` so the pseudo-element renders.")
78127
+ declarations: external_exports.record(external_exports.string(), external_exports.string()).optional().describe("Declarations every rule under the modifier sets first, as `before` sets `content: var(--tw-content)` so the pseudo-element renders."),
78128
+ classPrefix: external_exports.string().regex(/^[^\s:]+$/, { error: "a class prefix is one class segment, with no space or `:`." }).optional().describe("What a class names the modifier by, before the `:`, as `*` in `*:p-2`. Defaults to the modifier's leaf.")
78128
78129
  }).check((ctx) => {
78129
78130
  const { type, value } = ctx.value;
78130
78131
  const wantsRef = type === "composite";
@@ -78141,6 +78142,10 @@ var Modifier = defineEntity({
78141
78142
  answeredHere: true,
78142
78143
  invariants: (config2) => modifierInvariants(config2)
78143
78144
  });
78145
+ function modifierClassPrefix(modifier) {
78146
+ const { classPrefix } = modifier.body;
78147
+ return typeof classPrefix === "string" ? classPrefix : modifier.leaf;
78148
+ }
78144
78149
  function modifierInvariants(config2) {
78145
78150
  const problems = [];
78146
78151
  const items = Modifier.list(config2);
@@ -78149,6 +78154,13 @@ function modifierInvariants(config2) {
78149
78154
  const above = typedAncestor(config2, group.path);
78150
78155
  if (above) problems.push(`Modifier group "${group.path}" is typed but sits under the typed group "${above.group}"; a typed group is the axis and nests under folders only.`);
78151
78156
  }
78157
+ const byClassPrefix = /* @__PURE__ */ new Map();
78158
+ for (const item of items) {
78159
+ const prefix2 = modifierClassPrefix(item);
78160
+ const taken = byClassPrefix.get(prefix2);
78161
+ if (taken) problems.push(`Modifiers "${taken}" and "${item.path}" are both written \`${prefix2}:\` in a class; a class prefix names one modifier.`);
78162
+ byClassPrefix.set(prefix2, item.path);
78163
+ }
78152
78164
  for (const item of items) {
78153
78165
  const axis = typedAncestor(config2, item.path);
78154
78166
  if (axis && item.path !== `${axis.group}/${item.leaf}`) problems.push(`Modifier "${item.path}" is nested inside the typed group "${axis.group}"; an axis holds its options directly.`);
@@ -79011,7 +79023,12 @@ function expandStylePropEntries(config2, path2, opts) {
79011
79023
  if (!prop) return [];
79012
79024
  const values2 = prop.toJSON().values ?? [];
79013
79025
  const members2 = (target2) => memberEntries(config2, target2, opts);
79014
- return values2.flatMap((entry) => leavesOfStylePropValue(entry, members2));
79026
+ const expanded = values2.map((entry) => ({
79027
+ fromRef: isRef2(entry),
79028
+ leaves: leavesOfStylePropValue(entry, members2)
79029
+ }));
79030
+ const listed = new Set(expanded.flatMap(({ fromRef, leaves: leaves2 }) => fromRef ? [] : leaves2.map(({ leaf }) => leaf)));
79031
+ return expanded.flatMap(({ fromRef, leaves: leaves2 }) => fromRef ? leaves2.filter(({ leaf }) => !listed.has(leaf)) : leaves2);
79015
79032
  }
79016
79033
  function stylePropValueLeaves(config2, path2, opts) {
79017
79034
  return stylePropEntries(config2, path2, opts).map((entry) => entry.leaf);
@@ -88391,13 +88408,13 @@ var Converter = class {
88391
88408
  const max2 = /max-width:\s*(\d+(?:\.\d+)?)px/.exec(value);
88392
88409
  if (!min2 && !max2) continue;
88393
88410
  const active = (!min2 || width >= Number(min2[1])) && (!max2 || width <= Number(max2[1]));
88394
- breakpoints.set(modifier.leaf, {
88411
+ breakpoints.set(modifierClassPrefix(modifier), {
88395
88412
  active,
88396
88413
  rank: min2 ? Number(min2[1]) : 0
88397
88414
  });
88398
88415
  }
88399
88416
  this.breakpoints = breakpoints;
88400
- this.modifierKeys = new Map(options.config.list("modifier").map((modifier) => [modifier.leaf, `_${modifier.leaf}`]));
88417
+ this.modifierKeys = new Map(options.config.list("modifier").map((modifier) => [modifierClassPrefix(modifier), `_${modifier.leaf}`]));
88401
88418
  }
88402
88419
  convertTop(el) {
88403
88420
  return this.convert(el);
@@ -90671,7 +90688,7 @@ var Entity = class {
90671
90688
  };
90672
90689
 
90673
90690
  // ../config/dist/framework/schema-version.js
90674
- var CURRENT_SCHEMA_VERSION = 20261105185042;
90691
+ var CURRENT_SCHEMA_VERSION = 20261106185419;
90675
90692
  var SETTINGS_AS_KIND_VERSION = 20260908171448;
90676
90693
  var SchemaVersionTooNew = class extends ConfigFormatError {
90677
90694
  found;
@@ -90691,7 +90708,7 @@ function registerSchemaMigrations(...migrations) {
90691
90708
  for (const migration of migrations) {
90692
90709
  if (migration.version !== 1 && !isMintTimestamp(migration.version)) throw new Error(`Schema migration version ${migration.version} is not a mint timestamp \u2014 mint one with \`date +%Y%m%d%H%M%S\`, like a supabase migration.`);
90693
90710
  if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
90694
- if (migration.version > 20261105185042) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) \u2014 a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
90711
+ if (migration.version > 20261106185419) throw new Error(`Schema migration ${migration.version} is newer than CURRENT_SCHEMA_VERSION (${CURRENT_SCHEMA_VERSION}) \u2014 a stale branch merged, or the mint forgot to bump the constant. Re-mint: set CURRENT_SCHEMA_VERSION to the newest migration version.`);
90695
90712
  REGISTERED.set(migration.version, migration);
90696
90713
  }
90697
90714
  }
@@ -90722,7 +90739,7 @@ function pendingFor(version2, target2, options) {
90722
90739
  return [...(options?.migrations ?? REGISTERED).values()].filter((m) => m.version > version2 && m.version <= target2).sort((a, b) => a.version - b.version);
90723
90740
  }
90724
90741
  function upgradeSerializedConfig(json2, options) {
90725
- const target2 = options?.target ?? 20261105185042;
90742
+ const target2 = options?.target ?? 20261106185419;
90726
90743
  const version2 = detectedWireVersion(json2);
90727
90744
  if (version2 > target2) throw new SchemaVersionTooNew(version2, target2);
90728
90745
  const raw = json2;
@@ -97859,7 +97876,7 @@ var Config = class Config2 {
97859
97876
  * links from the provided sources. A declared `linkedKind` with no provided source throws. */
97860
97877
  hydrateFrom(stored, options) {
97861
97878
  const claimed = schemaVersionOf(stored);
97862
- if (claimed > 20261105185042) throw new SchemaVersionTooNew(claimed);
97879
+ if (claimed > 20261106185419) throw new SchemaVersionTooNew(claimed);
97863
97880
  const wire = upgradeSerializedConfig(stored);
97864
97881
  if (!Array.isArray(wire.ownedKinds) || typeof wire.items !== "object" || wire.items === null) throw new ConfigFormatError(`Config "${stored.name ?? "system-config"}" cannot be hydrated: this is not a serialized config-v2 config (no "ownedKinds"/"items"). A pre-cutover build artifact converts through the registered cutover migration \u2014 import the config type's module (e.g. \`configs/system\`) before hydrating.`);
97865
97882
  const leftover = wire.options;
@@ -101592,6 +101609,13 @@ var sourcesStoredMigration = {
101592
101609
  }
101593
101610
  };
101594
101611
 
101612
+ // ../config/dist/migrations/20261106185419_modifier_class_prefix.js
101613
+ var MODIFIER_CLASS_PREFIX_VERSION = 20261106185419;
101614
+ var modifierClassPrefixMigration = {
101615
+ version: MODIFIER_CLASS_PREFIX_VERSION,
101616
+ up: (json2) => json2
101617
+ };
101618
+
101595
101619
  // ../../node_modules/css-tree/lib/generator/sourceMap.js
101596
101620
  var import_source_map_generator = __toESM(require_source_map_generator(), 1);
101597
101621
  var trackNodes = /* @__PURE__ */ new Set(["Atrule", "Selector", "Declaration"]);
@@ -104338,6 +104362,7 @@ if (!registeredSchemaMigrations().has(20261102193912)) registerSchemaMigrations(
104338
104362
  if (!registeredSchemaMigrations().has(20261103115059)) registerSchemaMigrations(sourcesAuthoringMigration);
104339
104363
  if (!registeredSchemaMigrations().has(20261104151013)) registerSchemaMigrations(buildDebugMigration);
104340
104364
  if (!registeredSchemaMigrations().has(20261105185042)) registerSchemaMigrations(sourcesStoredMigration);
104365
+ if (!registeredSchemaMigrations().has(20261106185419)) registerSchemaMigrations(modifierClassPrefixMigration);
104341
104366
 
104342
104367
  // ../config/dist/capture/node-ops.js
104343
104368
  var DEFAULT_WIDTH = 1600;