@yahoo/uds-create-cli 5.96.6 → 5.98.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.96.6",
3
+ "version": "5.98.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.96.6",
36
- "@yahoo/uds-create-loader": "5.96.6",
37
- "@yahoo/uds-create-types": "5.96.6",
38
- "@yahoo/uds-create-utils": "5.96.6",
35
+ "@yahoo/uds-create-config": "5.98.0",
36
+ "@yahoo/uds-create-loader": "5.98.0",
37
+ "@yahoo/uds-create-types": "5.98.0",
38
+ "@yahoo/uds-create-utils": "5.98.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": 20261112154943,
55
+ "udsSchemaVersion": 20261112163439,
56
56
  "optionalDependencies": {
57
- "@yahoo/uds-create-cli-darwin-arm64": "5.96.6",
58
- "@yahoo/uds-create-cli-darwin-x64": "5.96.6",
59
- "@yahoo/uds-create-cli-linux-arm64": "5.96.6",
60
- "@yahoo/uds-create-cli-linux-x64": "5.96.6",
61
- "@yahoo/uds-create-cli-linux-arm64-musl": "5.96.6",
62
- "@yahoo/uds-create-cli-linux-x64-musl": "5.96.6"
57
+ "@yahoo/uds-create-cli-darwin-arm64": "5.98.0",
58
+ "@yahoo/uds-create-cli-darwin-x64": "5.98.0",
59
+ "@yahoo/uds-create-cli-linux-arm64": "5.98.0",
60
+ "@yahoo/uds-create-cli-linux-x64": "5.98.0",
61
+ "@yahoo/uds-create-cli-linux-arm64-musl": "5.98.0",
62
+ "@yahoo/uds-create-cli-linux-x64-musl": "5.98.0"
63
63
  }
64
64
  }
@@ -78938,6 +78938,41 @@ function linkedName({ config: config2, slug: slug2, path: path2 }) {
78938
78938
  });
78939
78939
  return "row" in drawn ? drawn.row : `${drawn.path}@${drawn.slug}`;
78940
78940
  }
78941
+ var linkedPresets = /* @__PURE__ */ new WeakMap();
78942
+ function linkedMotionPresets(config2) {
78943
+ const hit = linkedPresets.get(config2);
78944
+ if (hit) return hit;
78945
+ const out = [];
78946
+ const seen = /* @__PURE__ */ new Set();
78947
+ for (const reached of config2.reachedSlugs()) {
78948
+ if (!config2.sourceFor(reached)) continue;
78949
+ for (const target2 of config2.sourceClosure(reached, "motion")) {
78950
+ const drawn = linkedDraw({
78951
+ config: config2,
78952
+ slug: reached,
78953
+ kind: "motion",
78954
+ path: pathOf2(target2)
78955
+ });
78956
+ if ("row" in drawn) continue;
78957
+ const { slug: slug2, path: path2 } = drawn;
78958
+ const name = `${path2}@${slug2}`;
78959
+ const source = config2.sourceFor(slug2);
78960
+ const body = source?.resolve("motion", path2)?.toJSON();
78961
+ if (!source || !body || seen.has(name)) continue;
78962
+ seen.add(name);
78963
+ out.push({
78964
+ name,
78965
+ slug: slug2,
78966
+ path: path2,
78967
+ body,
78968
+ source
78969
+ });
78970
+ }
78971
+ }
78972
+ out.sort((a, b) => a.name.localeCompare(b.name));
78973
+ linkedPresets.set(config2, out);
78974
+ return out;
78975
+ }
78941
78976
 
78942
78977
  // ../config/dist/framework/utils/enumerated.js
78943
78978
  function listedIn(domain2) {
@@ -80570,7 +80605,8 @@ function expandMemberEntries(config2, target2, opts) {
80570
80605
  leaf: leafOf7(member.path),
80571
80606
  path: member.path
80572
80607
  }));
80573
- const ours = config2.members(kind, path2);
80608
+ const vendor = config2.sourceTypeOf(source) === "vendor";
80609
+ const ours = config2.members(kind, path2).filter((member) => !vendor || member.source === source);
80574
80610
  const held = new Set(ours.map((member) => member.path));
80575
80611
  const covered = new Set(theirs.map((member) => member.path));
80576
80612
  return [...theirs.filter((member) => offered(held.has(member.path) ? config2 : owner, member.path)).map((member) => ({
@@ -81212,7 +81248,11 @@ function computeComponentProps(config2, path2, seen) {
81212
81248
  for (const [layer, entry] of Object.entries(forwardsOf(body))) {
81213
81249
  const element2 = body.layers?.[layer];
81214
81250
  if (!isRef2(element2)) continue;
81215
- const exposed = resolveComponentProps(config2, pathOf2(element2.__ref), new Set(seen));
81251
+ const exposed = elementProps({
81252
+ config: config2,
81253
+ element: element2,
81254
+ seen: new Set(seen)
81255
+ });
81216
81256
  for (const [name, decl] of Object.entries(takenByForward({
81217
81257
  entry,
81218
81258
  exposed
@@ -81222,6 +81262,17 @@ function computeComponentProps(config2, path2, seen) {
81222
81262
  else merged[name] = prop;
81223
81263
  return merged;
81224
81264
  }
81265
+ function elementProps({ config: config2, element: element2, seen = /* @__PURE__ */ new Set() }) {
81266
+ const slug2 = sourceOf2(element2.__ref);
81267
+ if (slug2 === void 0) return resolveComponentProps(config2, pathOf2(element2.__ref), seen);
81268
+ const owner = config2.configFor(element2);
81269
+ if (!owner) return {};
81270
+ return qualifyRefs({
81271
+ value: resolveComponentProps(owner, pathOf2(element2.__ref)),
81272
+ source: slug2,
81273
+ owns: (kind) => owner.ownedKinds().includes(kind)
81274
+ });
81275
+ }
81225
81276
  function takenByForward({ entry, exposed }) {
81226
81277
  if (entry === "*") return exposed;
81227
81278
  return Object.fromEntries((Array.isArray(entry) ? entry : []).map(forwardedPropName).filter((name) => !!name && name in exposed).map((name) => [name, exposed[name]]));
@@ -81264,12 +81315,15 @@ function propValueDomain(config2, decl) {
81264
81315
  if (decl.type === "styleProperty") {
81265
81316
  const target2 = domainRef();
81266
81317
  if (!target2) return null;
81267
- const path2 = splitRef2(target2).qualifiedPath;
81268
- const leaves2 = stylePropValueLeaves(config2, path2);
81318
+ const local = splitRef2(target2).qualifiedPath;
81319
+ const here = config2.resolve("style-property", local) !== void 0;
81320
+ const owner = here ? config2 : config2.configFor(target2) ?? config2;
81321
+ const path2 = here ? local : pathOf2(target2);
81322
+ const leaves2 = stylePropValueLeaves(owner, path2);
81269
81323
  if (leaves2.length === 0) return null;
81270
81324
  return {
81271
81325
  leaves: leaves2,
81272
- accepts: (v) => stylePropValueFromLeaf(config2, path2, v) !== void 0
81326
+ accepts: (v) => stylePropValueFromLeaf(owner, path2, v) !== void 0
81273
81327
  };
81274
81328
  }
81275
81329
  if (decl.type === "composite") {
@@ -81296,6 +81350,11 @@ function propAcceptsValue(config2, decl, value) {
81296
81350
  function glyphLibrariesOf(domain2) {
81297
81351
  return (refListOf(domain2) ?? (isRef2(domain2) ? [domain2.__ref] : [])).filter((ref2) => kindOf2(ref2) === "icon" && memberOf2(ref2) === void 0).map(pathOf2);
81298
81352
  }
81353
+ function libraryThroughPin({ config: config2, slug: slug2, library }) {
81354
+ if (library.includes("@")) return library;
81355
+ const held = config2.members("icon", library);
81356
+ return held.length > 0 && held.every((member) => member.source === slug2) ? library : `${library}@${slug2}`;
81357
+ }
81299
81358
  function glyphPropsOf(config2, path2, seen = /* @__PURE__ */ new Set()) {
81300
81359
  return glyphPropsOfBody({
81301
81360
  config: config2,
@@ -81317,10 +81376,18 @@ function glyphPropsOfBody({ config: config2, body, seen = /* @__PURE__ */ new Se
81317
81376
  if (declaration?.type !== "forward" || !isRef2(target2) || kindOf2(target2) !== "layer") continue;
81318
81377
  const element2 = layers[pathOf2(target2)];
81319
81378
  if (!isRef2(element2) || kindOf2(element2) !== "component") continue;
81379
+ const slug2 = sourceOf2(element2.__ref);
81380
+ const owner = slug2 === void 0 ? config2 : config2.configFor(element2);
81381
+ if (!owner) continue;
81320
81382
  const receiver = pathOf2(element2);
81321
- if (seen.has(receiver)) continue;
81322
- const libraries = glyphPropsOf(config2, receiver, seen)[forwardIntoName(declaration.into, prop)];
81323
- if (libraries) out[prop] = libraries;
81383
+ if (slug2 === void 0 && seen.has(receiver)) continue;
81384
+ const libraries = glyphPropsOf(owner, receiver, slug2 === void 0 ? seen : /* @__PURE__ */ new Set())[forwardIntoName(declaration.into, prop)];
81385
+ if (!libraries) continue;
81386
+ out[prop] = slug2 === void 0 ? libraries : libraries.map((library) => libraryThroughPin({
81387
+ config: config2,
81388
+ slug: slug2,
81389
+ library
81390
+ }));
81324
81391
  }
81325
81392
  const [, rootElement] = rootLayerOf(layers);
81326
81393
  if (isRef2(rootElement) && kindOf2(rootElement) === "component") {
@@ -83647,6 +83714,26 @@ var resolveJsMotionPresets = createSliceMemo({
83647
83714
  };
83648
83715
  }
83649
83716
  });
83717
+ var linkedJsPresets = /* @__PURE__ */ new WeakMap();
83718
+ function withLinkedPresets(config2) {
83719
+ const own2 = resolveJsMotionPresets(config2);
83720
+ const linked = linkedMotionPresets(config2).filter((preset) => webMotionBody(preset.body).type === "motion/react");
83721
+ if (linked.length === 0) return own2;
83722
+ const hit = linkedJsPresets.get(config2);
83723
+ if (hit) return hit;
83724
+ const presets = { ...own2.presets };
83725
+ for (const preset of linked) presets[preset.name] = resolveBody(preset.source, preset.name, webMotionBody(preset.body), []);
83726
+ const out = {
83727
+ ...own2,
83728
+ presets
83729
+ };
83730
+ linkedJsPresets.set(config2, out);
83731
+ return out;
83732
+ }
83733
+ function hasJsMotion(config2) {
83734
+ const { presets, inline } = withLinkedPresets(config2);
83735
+ return Object.keys(presets).length > 0 || Object.keys(inline).length > 0;
83736
+ }
83650
83737
  var ownReducedMotions = createSliceMemo({
83651
83738
  kinds: ["motion", "component"],
83652
83739
  compute: (config2) => {
@@ -83758,7 +83845,9 @@ function compositePropRuleClasses(config2, path2) {
83758
83845
  const out = [];
83759
83846
  for (const [prop, groupRef, layer] of declared2.groups) {
83760
83847
  const group = pathOf2(groupRef);
83761
- for (const composite of config2.list("composite")) {
83848
+ const slug2 = sourceOf2(groupRef);
83849
+ const holder = slug2 === void 0 || config2.members("composite", group).length > 0 ? config2 : config2.sourceFor(slug2) ?? config2;
83850
+ for (const composite of holder.list("composite")) {
83762
83851
  if (!composite.path.startsWith(`${group}/`)) continue;
83763
83852
  const when = { [prop]: composite.path.slice(group.length + 1) };
83764
83853
  out.push({
@@ -83908,7 +83997,8 @@ var vocabularyToken = createSliceMemo({
83908
83997
  "composite",
83909
83998
  "motion",
83910
83999
  "icon",
83911
- "font"
84000
+ "font",
84001
+ "settings"
83912
84002
  ],
83913
84003
  compute: (_config) => ({})
83914
84004
  });
@@ -89483,6 +89573,46 @@ function propApplies(prop, values2) {
89483
89573
  function refPath(value) {
89484
89574
  return isRef2(value) ? pathOf2(value.__ref) : void 0;
89485
89575
  }
89576
+ function throughPin({ config: config2, prop, layers, decl }) {
89577
+ const element2 = layers?.[refPath(decl.target) ?? ""];
89578
+ const slug2 = isRef2(element2) ? sourceOf2(element2.__ref) : void 0;
89579
+ const libraries = prop.iconLibraries;
89580
+ if (slug2 === void 0 || !libraries) return prop;
89581
+ return {
89582
+ ...prop,
89583
+ iconLibraries: libraries.map((library) => libraryThroughPin({
89584
+ config: config2,
89585
+ slug: slug2,
89586
+ library
89587
+ }))
89588
+ };
89589
+ }
89590
+ function routeKey({ named, prop }) {
89591
+ const slug2 = sourceOf2(named.__ref);
89592
+ const path2 = pathOf2(named.__ref);
89593
+ return `${slug2 === void 0 ? path2 : `${path2}@${slug2}`}#${prop}`;
89594
+ }
89595
+ function farEnd(config2, named) {
89596
+ const path2 = pathOf2(named.__ref);
89597
+ const slug2 = sourceOf2(named.__ref);
89598
+ if (slug2 === void 0) return {
89599
+ config: config2,
89600
+ path: path2
89601
+ };
89602
+ const owner = config2.configFor(ref(Component.kind, path2, slug2));
89603
+ return owner ? {
89604
+ config: owner,
89605
+ path: path2
89606
+ } : void 0;
89607
+ }
89608
+ function compositeNameOf(config2, value) {
89609
+ if (!isRef2(value)) return void 0;
89610
+ const path2 = pathOf2(value.__ref);
89611
+ const slug2 = sourceOf2(value.__ref);
89612
+ if (slug2 === void 0) return path2;
89613
+ const held = config2.members(kindOf2(value.__ref), path2);
89614
+ return held.length > 0 && held.every((member) => member.source === slug2) ? path2 : `${path2}@${slug2}`;
89615
+ }
89486
89616
  function acceptsRefs(accepts) {
89487
89617
  return (Array.isArray(accepts) ? accepts : [accepts]).filter(isRef2).map((ref2) => ref2.__ref);
89488
89618
  }
@@ -89511,15 +89641,10 @@ function routedPropIn(config2, layers, decl) {
89511
89641
  if (!layerKey) return void 0;
89512
89642
  const element2 = layers?.[layerKey];
89513
89643
  if (!isRef2(element2) || kindOf2(element2) !== "component") return void 0;
89514
- const owner = config2.configFor(element2);
89515
- if (!owner) return void 0;
89516
- const landed = resolveComponentProps(owner, pathOf2(element2))[intoName(decl.into)];
89517
- const source = sourceOf2(element2);
89518
- return source === void 0 ? landed : qualifyRefs({
89519
- value: landed,
89520
- source,
89521
- owns: (kind) => owner.ownedKinds().includes(kind)
89522
- });
89644
+ return elementProps({
89645
+ config: config2,
89646
+ element: element2
89647
+ })[intoName(decl.into)];
89523
89648
  }
89524
89649
  function carriesContent(config2, layers, decl) {
89525
89650
  if (decl?.type === "slot") return !isValueSlot(decl);
@@ -89544,15 +89669,23 @@ function routeEnd(config2, layers, decl, seen = /* @__PURE__ */ new Set()) {
89544
89669
  route: decl
89545
89670
  };
89546
89671
  const layerKey = refPath(decl.target);
89547
- const target2 = layerKey ? refPath(layers?.[layerKey]) : void 0;
89548
- if (!target2) return {
89672
+ const element2 = layerKey ? layers?.[layerKey] : void 0;
89673
+ if (!isRef2(element2)) return {
89549
89674
  decl: landed,
89550
89675
  route: decl
89551
89676
  };
89552
- const key2 = `${target2}#${intoName(decl.into)}`;
89677
+ const far = farEnd(config2, element2);
89678
+ if (!far) return {
89679
+ decl: landed,
89680
+ route: decl
89681
+ };
89682
+ const key2 = routeKey({
89683
+ named: element2,
89684
+ prop: intoName(decl.into)
89685
+ });
89553
89686
  if (seen.has(key2)) return void 0;
89554
- const farLayers = Component.get(config2, target2)?.toJSON()?.layers;
89555
- return routeEnd(config2, farLayers, landed, /* @__PURE__ */ new Set([...seen, key2]));
89687
+ const farLayers = Component.get(far.config, far.path)?.toJSON()?.layers;
89688
+ return routeEnd(far.config, farLayers, landed, /* @__PURE__ */ new Set([...seen, key2]));
89556
89689
  }
89557
89690
  function slotProp(config2, componentPath, name, decl) {
89558
89691
  if (isValueSlot(decl)) {
@@ -89591,21 +89724,35 @@ function slotProp(config2, componentPath, name, decl) {
89591
89724
  ...icons.length > 0 ? { acceptsIconLibraries: icons } : {},
89592
89725
  ...routedKind ? { valueKind: routedKind } : {},
89593
89726
  ...routed ? { valueOptions: propValueDomain(config2, routed)?.leaves } : {},
89594
- ...routedKind === "composite" ? { compositeName: refPath(routed?.value) } : {}
89727
+ ...routedKind === "composite" ? { compositeName: compositeNameOf(config2, routed?.value) } : {}
89595
89728
  };
89596
89729
  }
89597
89730
  var surfaces = /* @__PURE__ */ new WeakMap();
89598
89731
  function surfaceProps(config2, componentPath, seen = /* @__PURE__ */ new Set()) {
89599
- let cache;
89600
- if (seen.size === 0) {
89601
- cache = surfaces.get(config2);
89602
- if (!cache) {
89603
- cache = /* @__PURE__ */ new Map();
89604
- surfaces.set(config2, cache);
89605
- }
89606
- const cached2 = cache.get(componentPath);
89607
- if (cached2) return cached2;
89732
+ if (seen.size > 0) return collectSurfaceProps(config2, componentPath, seen);
89733
+ let cache = surfaces.get(config2);
89734
+ if (!cache) {
89735
+ cache = /* @__PURE__ */ new Map();
89736
+ surfaces.set(config2, cache);
89608
89737
  }
89738
+ const cached2 = cache.get(componentPath);
89739
+ if (cached2) return cached2;
89740
+ const all = collectSurfaceProps(config2, componentPath, seen);
89741
+ const props = drawnByVendor(config2, componentPath) ? all.filter((prop) => prop.kind !== "styleProperty") : all;
89742
+ cache.set(componentPath, props);
89743
+ return props;
89744
+ }
89745
+ function drawnByVendor(config2, componentPath) {
89746
+ if (config2.vendorOf(Component.kind, componentPath) !== void 0) return true;
89747
+ const view = moduleViewOf(config2);
89748
+ if (view?.consumer.sourceTypeOf(view.slug) !== "vendor") return false;
89749
+ const taken = `${Component.kind}:${componentPath}@${view.slug}`;
89750
+ return view.consumer.list(Component.kind).some((item) => {
89751
+ const stored = view.consumer.storedBody(Component.kind, item.path);
89752
+ return isRef2(stored) && stored.__ref === taken;
89753
+ });
89754
+ }
89755
+ function collectSurfaceProps(config2, componentPath, seen) {
89609
89756
  const declared2 = resolveComponentProps(config2, componentPath);
89610
89757
  const layers = Component.get(config2, componentPath)?.toJSON()?.layers;
89611
89758
  const props = [];
@@ -89619,7 +89766,12 @@ function surfaceProps(config2, componentPath, seen = /* @__PURE__ */ new Set())
89619
89766
  }
89620
89767
  const routed = boundProp(config2, layers, decl, seen);
89621
89768
  if (routed) props.push(conditioned({
89622
- ...routed,
89769
+ ...throughPin({
89770
+ config: config2,
89771
+ prop: routed,
89772
+ layers,
89773
+ decl
89774
+ }),
89623
89775
  name,
89624
89776
  required: required2
89625
89777
  }, when));
@@ -89654,7 +89806,7 @@ function surfaceProps(config2, componentPath, seen = /* @__PURE__ */ new Set())
89654
89806
  continue;
89655
89807
  }
89656
89808
  if (decl.type === "composite") {
89657
- const compositeName = refPath(decl.value);
89809
+ const compositeName = compositeNameOf(config2, decl.value);
89658
89810
  if (!compositeName) continue;
89659
89811
  props.push(conditioned({
89660
89812
  name,
@@ -89670,7 +89822,6 @@ function surfaceProps(config2, componentPath, seen = /* @__PURE__ */ new Set())
89670
89822
  required: required2
89671
89823
  }, when));
89672
89824
  }
89673
- cache?.set(componentPath, props);
89674
89825
  return props;
89675
89826
  }
89676
89827
  function boundProp(config2, layers, decl, seen) {
@@ -89681,15 +89832,22 @@ function boundProp(config2, layers, decl, seen) {
89681
89832
  kind: "string",
89682
89833
  required: false
89683
89834
  };
89684
- const target2 = isRef2(decl.into) ? pathOf2(decl.into) : refPath(element2);
89685
- if (!target2) return typeof element2 === "string" ? undeclared : void 0;
89686
- const key2 = `${target2}#${propName}`;
89835
+ let named;
89836
+ if (isRef2(decl.into)) named = decl.into;
89837
+ else if (isRef2(element2)) named = element2;
89838
+ if (!named) return typeof element2 === "string" ? undeclared : void 0;
89839
+ const end = farEnd(config2, named);
89840
+ if (!end) return void 0;
89841
+ const key2 = routeKey({
89842
+ named,
89843
+ prop: propName
89844
+ });
89687
89845
  if (seen.has(key2)) return void 0;
89688
- const far = surfaceProps(config2, target2, /* @__PURE__ */ new Set([...seen, key2])).find((prop) => prop.name === propName);
89846
+ const far = surfaceProps(end.config, end.path, /* @__PURE__ */ new Set([...seen, key2])).find((prop) => prop.name === propName);
89689
89847
  if (far) return far;
89690
- const farBody = Component.get(config2, target2)?.toJSON();
89848
+ const farBody = Component.get(end.config, end.path)?.toJSON();
89691
89849
  if (!farBody) return void 0;
89692
- return propName in resolveComponentProps(config2, target2) || propName in (farBody.props ?? {}) ? void 0 : undeclared;
89850
+ return propName in resolveComponentProps(end.config, end.path) || propName in (farBody.props ?? {}) ? void 0 : undeclared;
89693
89851
  }
89694
89852
  function surfaceProp(config2, componentPath, name) {
89695
89853
  return surfaceProps(config2, componentPath).find((prop) => prop.name === name);
@@ -89711,7 +89869,10 @@ function computeForwardClaims(config2, componentPath) {
89711
89869
  if (!isRef2(element2)) continue;
89712
89870
  const taken = takenByForward({
89713
89871
  entry,
89714
- exposed: resolveComponentProps(config2, pathOf2(element2.__ref))
89872
+ exposed: elementProps({
89873
+ config: config2,
89874
+ element: element2
89875
+ })
89715
89876
  });
89716
89877
  for (const name of Object.keys(taken)) {
89717
89878
  if (own2.has(name)) continue;
@@ -89879,6 +90040,15 @@ var librariesOf = createSliceMemo({
89879
90040
  compute: (_config) => /* @__PURE__ */ new Map()
89880
90041
  });
89881
90042
  function readIconLibrary(config2, path2) {
90043
+ const at = path2.lastIndexOf("@");
90044
+ if (at > 0) {
90045
+ const owner = config2.sourceFor(path2.slice(at + 1));
90046
+ const library = owner ? iconLibrary(owner, path2.slice(0, at)) : void 0;
90047
+ return library ? {
90048
+ ...library,
90049
+ path: path2
90050
+ } : void 0;
90051
+ }
89882
90052
  const group = Icon.groups(config2).find((entry) => entry.path === path2);
89883
90053
  if (!group) return void 0;
89884
90054
  const { items: _items, sizes, variants: variants2, ...meta3 } = group.meta;
@@ -92820,7 +92990,7 @@ var Entity = class {
92820
92990
  };
92821
92991
 
92822
92992
  // ../config/dist/framework/schema-version.js
92823
- var CURRENT_SCHEMA_VERSION = 20261112154943;
92993
+ var CURRENT_SCHEMA_VERSION = 20261112163439;
92824
92994
  var SETTINGS_AS_KIND_VERSION = 20260908171448;
92825
92995
  var SchemaVersionTooNew = class extends ConfigFormatError {
92826
92996
  found;
@@ -92840,7 +93010,7 @@ function registerSchemaMigrations(...migrations) {
92840
93010
  for (const migration of migrations) {
92841
93011
  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.`);
92842
93012
  if (REGISTERED.has(migration.version)) throw new Error(`A schema migration at version ${migration.version} is already registered.`);
92843
- if (migration.version > 20261112154943) 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.`);
93013
+ if (migration.version > 20261112163439) 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.`);
92844
93014
  REGISTERED.set(migration.version, migration);
92845
93015
  }
92846
93016
  }
@@ -92871,7 +93041,7 @@ function pendingFor(version2, target2, options) {
92871
93041
  return [...(options?.migrations ?? REGISTERED).values()].filter((m) => m.version > version2 && m.version <= target2).sort((a, b) => a.version - b.version);
92872
93042
  }
92873
93043
  function upgradeSerializedConfig(json2, options) {
92874
- const target2 = options?.target ?? 20261112154943;
93044
+ const target2 = options?.target ?? 20261112163439;
92875
93045
  const version2 = detectedWireVersion(json2);
92876
93046
  if (version2 > target2) throw new SchemaVersionTooNew(version2, target2);
92877
93047
  const raw = json2;
@@ -93900,7 +94070,7 @@ function rejectCollisions(collisions2) {
93900
94070
  throw new ConfigRejection([{
93901
94071
  code: "SOURCE_COLLISION",
93902
94072
  collisions: collisions2,
93903
- message: `This would leave ${collisions2.length} ${one ? "path" : "paths"} offered by ${by} as different things, so neither applies: ${shown}${rest}. Take ${one ? "it" : "each"} from the system ${one ? "it" : "each"} should follow (\`source/link\` with \`onLinked: 'take'\`), or make the link that only reaches ${one ? "it" : "them"} \`hybrid\`, so it uses what this system already has.`
94073
+ message: `This would leave ${collisions2.length} ${one ? "path" : "paths"} offered by ${by} as different things, so neither applies: ${shown}${rest}. Take ${one ? "it" : "each"} from the system ${one ? "it" : "each"} should follow (\`source/link\` with \`onLinked: 'take'\`)${pins ? `, or make the link that only reaches ${one ? "it" : "them"} \`hybrid\`, so it uses what this system already has` : ""}.`
93904
94074
  }]);
93905
94075
  }
93906
94076
  var parentSnapshotOf = /* @__PURE__ */ new WeakMap();
@@ -94323,6 +94493,11 @@ var Config = class Config2 {
94323
94493
  withOwner(owner) {
94324
94494
  return this.derive({ owner });
94325
94495
  }
94496
+ /** This config under an identity of its own. It answers what the receiver does, so a holder that
94497
+ * keys a fact on the value (`registerModuleView`) can tag it and leave the receiver untagged. */
94498
+ fork() {
94499
+ return this.derive({});
94500
+ }
94326
94501
  /** The pending edits with their ids — what a sink persists and `merge` names. */
94327
94502
  get pending() {
94328
94503
  return this.state.pending;
@@ -95743,6 +95918,7 @@ var Config = class Config2 {
95743
95918
  })]);
95744
95919
  if (patch.operation === "sub-create" || patch.operation === "sub-upsert" || patch.operation === "sub-update" || patch.operation === "sub-delete" || patch.operation === "sub-rename" || patch.operation === "sub-reorder") {
95745
95920
  if (extension) {
95921
+ this.at(snapshot).refuseVendorEdit(patch.kind, patch.path);
95746
95922
  const resolved = this.at(snapshot).resolveExtension({
95747
95923
  kind: patch.kind,
95748
95924
  path: patch.path,
@@ -95852,6 +96028,7 @@ var Config = class Config2 {
95852
96028
  }) : parsedDelta;
95853
96029
  const touched = touchedFields(delta, isField2);
95854
96030
  if (extension) {
96031
+ this.at(snapshot).refuseVendorEdit(patch.kind, patch.path);
95855
96032
  const resolved = this.at(snapshot).resolveExtension({
95856
96033
  kind: patch.kind,
95857
96034
  path: patch.path,
@@ -96421,6 +96598,7 @@ var Config = class Config2 {
96421
96598
  ...classifyOverlay(local, theirs),
96422
96599
  ...existing?.hidden ? { hidden: true } : {}
96423
96600
  };
96601
+ if (view.sourceTypeOf(slug2) === "vendor" && (overlay.override !== void 0 || overlay.extend !== void 0)) reject("UNSUPPORTED", `Cannot update ${kind} group "${path2}" \u2014 it comes from the vendor source "${slug2}", which is used as shipped.`);
96424
96602
  const data2 = view.directiveWrite({
96425
96603
  slug: slug2,
96426
96604
  accessor,
@@ -98612,6 +98790,9 @@ var Config = class Config2 {
98612
98790
  * A path no pin declares goes to the first `linked` source when every `linked` source holding it
98613
98791
  * reads the same entity, the `hybrid` ones yielding to them. With only `hybrid` sources it goes to
98614
98792
  * the first on the same condition. Two pins declaring one path is a collision either way.
98793
+ *
98794
+ * A `vendor` source decides as a `linked` one does. It only ever offers what it declares, so
98795
+ * another link reaching a different entity at that path collides with it.
98615
98796
  */
98616
98797
  declaringClaimant({ target: target2, slugs, declaredBy }) {
98617
98798
  const declarers = slugs.filter((slug2) => declaredBy.get(slug2)?.has(target2));
@@ -98624,7 +98805,7 @@ var Config = class Config2 {
98624
98805
  kind,
98625
98806
  path: path2
98626
98807
  }));
98627
- const linked = slugs.filter((slug2) => this.sourceTypeOf(slug2) === "linked");
98808
+ const linked = slugs.filter((slug2) => this.sourceTypeOf(slug2) !== "hybrid");
98628
98809
  const [declarer] = declarers;
98629
98810
  if (declarer !== void 0) return agree(declarer, linked) ? declarer : void 0;
98630
98811
  const deciding = linked.length > 0 ? linked : slugs;
@@ -98715,20 +98896,44 @@ var Config = class Config2 {
98715
98896
  return "linked";
98716
98897
  }
98717
98898
  /**
98899
+ * The `vendor` pin the item at `kind:path` is drawn through: a row its declaration derived, or a ref
98900
+ * this config placed under a name of its own. `undefined` for anything else, including a row of
98901
+ * this config's own whose fields name the source.
98902
+ */
98903
+ /**
98904
+ * Refuse a write to a row a `vendor` pin draws. Its source is used as shipped, so even a write the
98905
+ * overlay would read as nothing (a `null` revealing the source's own value) is refused rather than
98906
+ * kept as an edit.
98907
+ */
98908
+ refuseVendorEdit(kind, path2) {
98909
+ const slug2 = this.vendorOf(kind, path2);
98910
+ if (slug2 === void 0) return;
98911
+ reject("UNSUPPORTED", `Cannot edit ${kind} "${path2}" \u2014 it comes from the vendor source "${slug2}", which is used as shipped. To change it, wrap it in a ${kind} of your own.`);
98912
+ }
98913
+ vendorOf(kind, path2) {
98914
+ const stored = this.storedBody(kind, path2);
98915
+ if (!isRef2(stored)) return void 0;
98916
+ const slug2 = sourceOf2(stored.__ref);
98917
+ return slug2 !== void 0 && this.sourceTypeOf(slug2) === "vendor" ? slug2 : void 0;
98918
+ }
98919
+ /**
98718
98920
  * Whether a value `slug` brings is drawn with this config's row at `kind:path` rather than declared
98719
98921
  * under the pin's own name: a token that something taken through `slug` names.
98720
98922
  *
98721
98923
  * A `hybrid` pin binds to any row here that isn't its own, authored or held through another pin, so
98722
98924
  * what it brings uses this config's values. A `linked` pin binds only to a row held through another
98723
98925
  * pin that is the same entity, the way {@link heldThroughAnotherPin} reads it; a different one there
98724
- * is a collision, and a row this config authored is its own entity under the same name.
98926
+ * is a collision, and a row this config authored is its own entity under the same name. A `vendor`
98927
+ * pin never binds: everything it brings is drawn from its own source.
98725
98928
  */
98726
98929
  drawsWithLocalRow({ slug: slug2, kind, path: path2 }) {
98727
98930
  const stored = this.storedBody(kind, path2);
98728
98931
  if (stored === void 0) return false;
98729
98932
  const held = isRef2(stored) ? sourceOf2(stored.__ref) : void 0;
98730
98933
  if (held === slug2) return false;
98731
- if (this.sourceTypeOf(slug2) === "hybrid") return true;
98934
+ const type = this.sourceTypeOf(slug2);
98935
+ if (type === "vendor") return false;
98936
+ if (type === "hybrid") return true;
98732
98937
  if (!isMintedRow(stored) || held === void 0) return false;
98733
98938
  return this.sameEntityThrough({
98734
98939
  held,
@@ -99231,10 +99436,13 @@ var Config = class Config2 {
99231
99436
  * Every guard the adopted targets pass through applies to these too — a name this config already
99232
99437
  * holds wins, an entry it cannot express is left behind — because
99233
99438
  * they join the same loop rather than being written directly.
99439
+ *
99440
+ * A `vendor` pin has none. What it declares is all that lands, and the rest is read through the
99441
+ * source under the pin's names.
99234
99442
  */
99235
99443
  groupRefMembers(slug2) {
99236
99444
  const source = this.sourceFor(slug2);
99237
- if (!source) return [];
99445
+ if (!source || this.sourceTypeOf(slug2) === "vendor") return [];
99238
99446
  const members2 = /* @__PURE__ */ new Set();
99239
99447
  const reached = /* @__PURE__ */ new Map();
99240
99448
  const reaching = (target2, linked) => {
@@ -100087,7 +100295,7 @@ var Config = class Config2 {
100087
100295
  * links from the provided sources. A declared `linkedKind` with no provided source throws. */
100088
100296
  hydrateFrom(stored, options) {
100089
100297
  const claimed = schemaVersionOf(stored);
100090
- if (claimed > 20261112154943) throw new SchemaVersionTooNew(claimed);
100298
+ if (claimed > 20261112163439) throw new SchemaVersionTooNew(claimed);
100091
100299
  const wire = upgradeSerializedConfig(stored);
100092
100300
  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.`);
100093
100301
  const leftover = wire.options;
@@ -100581,6 +100789,183 @@ var GuidanceStyle = defineEntity({
100581
100789
  fields: external_exports.object({ text: external_exports.string() })
100582
100790
  });
100583
100791
 
100792
+ // ../config/dist/entities/system/link-declaration.js
100793
+ var PIN_KIND = "source";
100794
+ var INCLUDE = "include";
100795
+ function includeOf(body) {
100796
+ const options = isPlainObject2(body) ? body.options : void 0;
100797
+ return isPlainObject2(options) ? options[INCLUDE] : void 0;
100798
+ }
100799
+ function directivesOf(body) {
100800
+ const options = isPlainObject2(body) ? body.options : void 0;
100801
+ if (!isPlainObject2(options)) return [];
100802
+ return Object.entries(options).filter(([key2]) => key2 !== INCLUDE);
100803
+ }
100804
+ function includeWrite({ body, declared: declared2 }) {
100805
+ if (declared2 !== void 0 && declared2 !== null) return { [`options.${INCLUDE}`]: declared2 };
100806
+ return directivesOf(body).length === 0 ? {
100807
+ [`options.${INCLUDE}`]: null,
100808
+ options: null
100809
+ } : { [`options.${INCLUDE}`]: null };
100810
+ }
100811
+ function declarationOf(config2, slug2) {
100812
+ const pin = config2.storedBody(PIN_KIND, slug2);
100813
+ if (!pin) rejectData(`No linked system "${slug2}".`);
100814
+ return includeOf(pin);
100815
+ }
100816
+ var EXCLUDE = "!";
100817
+ var reaches2 = (entry, path2) => entry === "*" || entry === path2 || path2.startsWith(`${entry}/`);
100818
+ function entriesFor(declared2, accessor) {
100819
+ if (declared2 === void 0 || declared2 === "*") return declared2;
100820
+ return declared2[accessor] ?? declared2["*"];
100821
+ }
100822
+ function excludedIn(entries) {
100823
+ if (entries === void 0 || entries === "*") return [];
100824
+ return entries.filter((entry) => entry.startsWith(EXCLUDE)).map((entry) => entry.slice(1));
100825
+ }
100826
+ function excludes({ declared: declared2, accessor, path: path2 }) {
100827
+ return excludedIn(entriesFor(declared2, accessor)).some((excluded) => reaches2(excluded, path2));
100828
+ }
100829
+ function covers({ declared: declared2, accessor, path: path2 }) {
100830
+ const entries = entriesFor(declared2, accessor);
100831
+ if (entries === void 0) return false;
100832
+ if (entries === "*") return true;
100833
+ if (excludes({
100834
+ declared: declared2,
100835
+ accessor,
100836
+ path: path2
100837
+ })) return false;
100838
+ return entries.some((entry) => !entry.startsWith(EXCLUDE) && reaches2(entry, path2));
100839
+ }
100840
+ function includePaths({ config: config2, slug: slug2, kind, entries, paths }) {
100841
+ const source = config2.sourceFor(slug2);
100842
+ const included = [];
100843
+ const exclusions = [];
100844
+ for (const entry of entries) {
100845
+ if (!entry.startsWith(EXCLUDE)) {
100846
+ included.push(entry);
100847
+ continue;
100848
+ }
100849
+ const excluded = entry.slice(1);
100850
+ if (paths.some((path2) => reaches2(path2, excluded))) continue;
100851
+ if (!paths.some((path2) => reaches2(excluded, path2))) {
100852
+ exclusions.push(entry);
100853
+ continue;
100854
+ }
100855
+ for (const member of source?.members(kind, excluded) ?? []) if (!paths.some((path2) => reaches2(path2, member.path))) exclusions.push(`${EXCLUDE}${member.path}`);
100856
+ }
100857
+ for (const path2 of paths) {
100858
+ if (included.some((entry) => reaches2(entry, path2))) continue;
100859
+ included.push(path2);
100860
+ }
100861
+ return [...included, ...exclusions];
100862
+ }
100863
+ function excludePaths(entries, paths) {
100864
+ const list = entries === void 0 ? [] : entries === "*" ? ["*"] : entries;
100865
+ const excluded = excludedIn(list);
100866
+ const added = [...new Set(paths)].filter((path2) => !excluded.some((already) => reaches2(already, path2)));
100867
+ return [...list.filter((entry) => {
100868
+ if (entry === "*") return true;
100869
+ const path2 = entry.startsWith(EXCLUDE) ? entry.slice(1) : entry;
100870
+ return !added.some((adding) => reaches2(adding, path2));
100871
+ }), ...added.map((path2) => `${EXCLUDE}${path2}`)];
100872
+ }
100873
+ function narrowDeclaration({ config: config2, slug: slug2, current, removal, verb }) {
100874
+ const source = config2.sourceFor(slug2);
100875
+ const next = {};
100876
+ if (current === "*") for (const kind of config2.borrowableKinds(slug2)) {
100877
+ if (source && source.list(kind).length === 0) continue;
100878
+ next[config2.accessorOf(kind) ?? kind] = "*";
100879
+ }
100880
+ else {
100881
+ Object.assign(next, current);
100882
+ const fallback = current["*"];
100883
+ if (fallback !== void 0) {
100884
+ delete next["*"];
100885
+ for (const kind of config2.borrowableKinds(slug2)) {
100886
+ if (source && source.list(kind).length === 0) continue;
100887
+ const accessor = config2.accessorOf(kind) ?? kind;
100888
+ if (!(accessor in current)) next[accessor] = fallback;
100889
+ }
100890
+ }
100891
+ }
100892
+ for (const [accessor, paths] of removal) {
100893
+ const before5 = next[accessor];
100894
+ if (before5 === void 0) continue;
100895
+ if (paths === "*") {
100896
+ delete next[accessor];
100897
+ continue;
100898
+ }
100899
+ const kind = config2.accessors()[accessor]?.kind ?? accessor;
100900
+ const excluded = excludedIn(before5);
100901
+ let declaredPaths;
100902
+ if (before5 === "*" || before5.includes("*")) {
100903
+ if (!source) rejectData(`Cannot ${verb} ${paths.join(", ")} through "${slug2}" \u2014 the declaration takes every "${accessor}", and nothing has resolved that link to spell them out. Unlink the kind (\`{ "${accessor}": "*" }\`) instead.`, ["data", accessor]);
100904
+ declaredPaths = source.tree(kind).map((node2) => node2.path);
100905
+ } else declaredPaths = before5.filter((entry) => !entry.startsWith(EXCLUDE));
100906
+ const removed = (candidate) => paths.some((path2) => path2 === candidate || candidate.startsWith(`${path2}/`));
100907
+ const kept = [];
100908
+ for (const declaredPath of declaredPaths) {
100909
+ if (removed(declaredPath)) continue;
100910
+ if (excluded.some((path2) => reaches2(path2, declaredPath))) continue;
100911
+ if (!paths.some((path2) => path2.startsWith(`${declaredPath}/`)) || !source) {
100912
+ kept.push(declaredPath);
100913
+ continue;
100914
+ }
100915
+ for (const member of source.members(kind, declaredPath)) {
100916
+ if (removed(member.path)) continue;
100917
+ if (excluded.some((path2) => reaches2(path2, member.path))) continue;
100918
+ kept.push(member.path);
100919
+ }
100920
+ }
100921
+ const exclusions = excluded.map((path2) => `${EXCLUDE}${path2}`);
100922
+ if (kept.length === 0 && exclusions.length === 0) delete next[accessor];
100923
+ else next[accessor] = [...kept, ...exclusions];
100924
+ }
100925
+ return Object.keys(next).length === 0 ? void 0 : next;
100926
+ }
100927
+
100928
+ // ../config/dist/entities/system/vendor-conditions.js
100929
+ function vendorModifierMappings({ config: config2, slug: slug2 }) {
100930
+ const accessor = config2.accessorOf("modifier") ?? "modifier";
100931
+ return directivesOf(config2.storedBody("source", slug2)).flatMap(([named, entries]) => named === accessor && isPlainObject2(entries) ? Object.entries(entries).flatMap(([vendor, entry]) => isPlainObject2(entry) && entry.override !== void 0 ? [{
100932
+ vendor,
100933
+ target: entry.override
100934
+ }] : []) : []);
100935
+ }
100936
+ function isVendorModifierMapping({ config: config2, accessor, entry }) {
100937
+ return accessor === (config2.accessorOf("modifier") ?? "modifier") && isPlainObject2(entry) && entry.extend === void 0 && isRef2(entry.override) && kindOf2(entry.override) === "modifier";
100938
+ }
100939
+ function vendorModifierMappingProblems({ config: config2, slug: slug2 }) {
100940
+ const problems = [];
100941
+ for (const mapping of modifierMappings({
100942
+ config: config2,
100943
+ slug: slug2
100944
+ })) if (!mapping.ours) problems.push(`${mapping.at} maps the vendor's modifier to "${mapping.target}", which isn't a modifier of this system.`);
100945
+ else if (activationOf(mapping.ours).type === "composite") problems.push(`${mapping.at} maps the vendor's modifier to "${mapping.ours.path}", which asks whether an element sits on a surface. Only a selector or a query can stand in for the vendor's.`);
100946
+ return problems;
100947
+ }
100948
+ function modifierMappings({ config: config2, slug: slug2 }) {
100949
+ const accessor = config2.accessorOf("modifier") ?? "modifier";
100950
+ return vendorModifierMappings({
100951
+ config: config2,
100952
+ slug: slug2
100953
+ }).flatMap((mapping) => {
100954
+ const { target: target2 } = mapping;
100955
+ if (!isRef2(target2) || kindOf2(target2) !== "modifier") return [];
100956
+ return [{
100957
+ vendor: mapping.vendor,
100958
+ at: `Link "${slug2}": options.${accessor}["${mapping.vendor}"]`,
100959
+ target: pathOf2(target2),
100960
+ ours: sourceOf2(target2) === void 0 ? config2.resolve("modifier", pathOf2(target2)) : void 0
100961
+ }];
100962
+ });
100963
+ }
100964
+ function activationOf(modifier) {
100965
+ const body = modifier?.toJSON();
100966
+ return isPlainObject2(body) ? body : {};
100967
+ }
100968
+
100584
100969
  // ../config/dist/entities/system/component-module.js
100585
100970
  var COMPONENT_MODULE_BUILD_VERSION = 10;
100586
100971
  var WEB_RUNTIME_KINDS = [
@@ -100617,9 +101002,25 @@ function componentRuntimeKey(config2) {
100617
101002
  settings: Settings.get(config2)?.toJSON(),
100618
101003
  entities: componentRuntimeEntitiesKey(config2),
100619
101004
  inputDir: Settings.get(config2)?.inputDir,
100620
- ...viewClassNamesKey(config2)
101005
+ ...viewClassNamesKey(config2),
101006
+ ...viewHostKey(config2)
100621
101007
  });
100622
101008
  }
101009
+ var viewHosts = /* @__PURE__ */ new WeakMap();
101010
+ function viewHostKey(config2) {
101011
+ const link2 = moduleViewOf(config2);
101012
+ if (!link2) return {};
101013
+ let key2 = viewHosts.get(config2);
101014
+ if (key2 === void 0) {
101015
+ const [declared2] = sourceHops(link2.slug);
101016
+ key2 = contentKey({
101017
+ jsMotion: hasJsMotion(link2.consumer),
101018
+ pin: declared2 === void 0 ? void 0 : link2.consumer.resolve("source", declared2)?.toJSON()
101019
+ });
101020
+ viewHosts.set(config2, key2);
101021
+ }
101022
+ return { host: key2 };
101023
+ }
100623
101024
  var viewClassNames = /* @__PURE__ */ new WeakMap();
100624
101025
  function viewClassNamesKey(config2) {
100625
101026
  if (!moduleViewOf(config2)) return {};
@@ -100783,142 +101184,6 @@ function componentModuleFilePaths(config2, filePath) {
100783
101184
  return Object.keys(componentModuleBuildPlan(config2, filePath).entities).filter((key2) => key2.startsWith("file:")).map((key2) => key2.slice(5)).sort();
100784
101185
  }
100785
101186
 
100786
- // ../config/dist/entities/system/link-declaration.js
100787
- var PIN_KIND = "source";
100788
- var INCLUDE = "include";
100789
- function includeOf(body) {
100790
- const options = isPlainObject2(body) ? body.options : void 0;
100791
- return isPlainObject2(options) ? options[INCLUDE] : void 0;
100792
- }
100793
- function directivesOf(body) {
100794
- const options = isPlainObject2(body) ? body.options : void 0;
100795
- if (!isPlainObject2(options)) return [];
100796
- return Object.entries(options).filter(([key2]) => key2 !== INCLUDE);
100797
- }
100798
- function includeWrite({ body, declared: declared2 }) {
100799
- if (declared2 !== void 0 && declared2 !== null) return { [`options.${INCLUDE}`]: declared2 };
100800
- return directivesOf(body).length === 0 ? {
100801
- [`options.${INCLUDE}`]: null,
100802
- options: null
100803
- } : { [`options.${INCLUDE}`]: null };
100804
- }
100805
- function declarationOf(config2, slug2) {
100806
- const pin = config2.storedBody(PIN_KIND, slug2);
100807
- if (!pin) rejectData(`No linked system "${slug2}".`);
100808
- return includeOf(pin);
100809
- }
100810
- var EXCLUDE = "!";
100811
- var reaches2 = (entry, path2) => entry === "*" || entry === path2 || path2.startsWith(`${entry}/`);
100812
- function entriesFor(declared2, accessor) {
100813
- if (declared2 === void 0 || declared2 === "*") return declared2;
100814
- return declared2[accessor] ?? declared2["*"];
100815
- }
100816
- function excludedIn(entries) {
100817
- if (entries === void 0 || entries === "*") return [];
100818
- return entries.filter((entry) => entry.startsWith(EXCLUDE)).map((entry) => entry.slice(1));
100819
- }
100820
- function excludes({ declared: declared2, accessor, path: path2 }) {
100821
- return excludedIn(entriesFor(declared2, accessor)).some((excluded) => reaches2(excluded, path2));
100822
- }
100823
- function covers({ declared: declared2, accessor, path: path2 }) {
100824
- const entries = entriesFor(declared2, accessor);
100825
- if (entries === void 0) return false;
100826
- if (entries === "*") return true;
100827
- if (excludes({
100828
- declared: declared2,
100829
- accessor,
100830
- path: path2
100831
- })) return false;
100832
- return entries.some((entry) => !entry.startsWith(EXCLUDE) && reaches2(entry, path2));
100833
- }
100834
- function includePaths({ config: config2, slug: slug2, kind, entries, paths }) {
100835
- const source = config2.sourceFor(slug2);
100836
- const included = [];
100837
- const exclusions = [];
100838
- for (const entry of entries) {
100839
- if (!entry.startsWith(EXCLUDE)) {
100840
- included.push(entry);
100841
- continue;
100842
- }
100843
- const excluded = entry.slice(1);
100844
- if (paths.some((path2) => reaches2(path2, excluded))) continue;
100845
- if (!paths.some((path2) => reaches2(excluded, path2))) {
100846
- exclusions.push(entry);
100847
- continue;
100848
- }
100849
- for (const member of source?.members(kind, excluded) ?? []) if (!paths.some((path2) => reaches2(path2, member.path))) exclusions.push(`${EXCLUDE}${member.path}`);
100850
- }
100851
- for (const path2 of paths) {
100852
- if (included.some((entry) => reaches2(entry, path2))) continue;
100853
- included.push(path2);
100854
- }
100855
- return [...included, ...exclusions];
100856
- }
100857
- function excludePaths(entries, paths) {
100858
- const list = entries === void 0 ? [] : entries === "*" ? ["*"] : entries;
100859
- const excluded = excludedIn(list);
100860
- const added = [...new Set(paths)].filter((path2) => !excluded.some((already) => reaches2(already, path2)));
100861
- return [...list.filter((entry) => {
100862
- if (entry === "*") return true;
100863
- const path2 = entry.startsWith(EXCLUDE) ? entry.slice(1) : entry;
100864
- return !added.some((adding) => reaches2(adding, path2));
100865
- }), ...added.map((path2) => `${EXCLUDE}${path2}`)];
100866
- }
100867
- function narrowDeclaration({ config: config2, slug: slug2, current, removal, verb }) {
100868
- const source = config2.sourceFor(slug2);
100869
- const next = {};
100870
- if (current === "*") for (const kind of config2.borrowableKinds(slug2)) {
100871
- if (source && source.list(kind).length === 0) continue;
100872
- next[config2.accessorOf(kind) ?? kind] = "*";
100873
- }
100874
- else {
100875
- Object.assign(next, current);
100876
- const fallback = current["*"];
100877
- if (fallback !== void 0) {
100878
- delete next["*"];
100879
- for (const kind of config2.borrowableKinds(slug2)) {
100880
- if (source && source.list(kind).length === 0) continue;
100881
- const accessor = config2.accessorOf(kind) ?? kind;
100882
- if (!(accessor in current)) next[accessor] = fallback;
100883
- }
100884
- }
100885
- }
100886
- for (const [accessor, paths] of removal) {
100887
- const before5 = next[accessor];
100888
- if (before5 === void 0) continue;
100889
- if (paths === "*") {
100890
- delete next[accessor];
100891
- continue;
100892
- }
100893
- const kind = config2.accessors()[accessor]?.kind ?? accessor;
100894
- const excluded = excludedIn(before5);
100895
- let declaredPaths;
100896
- if (before5 === "*" || before5.includes("*")) {
100897
- if (!source) rejectData(`Cannot ${verb} ${paths.join(", ")} through "${slug2}" \u2014 the declaration takes every "${accessor}", and nothing has resolved that link to spell them out. Unlink the kind (\`{ "${accessor}": "*" }\`) instead.`, ["data", accessor]);
100898
- declaredPaths = source.tree(kind).map((node2) => node2.path);
100899
- } else declaredPaths = before5.filter((entry) => !entry.startsWith(EXCLUDE));
100900
- const removed = (candidate) => paths.some((path2) => path2 === candidate || candidate.startsWith(`${path2}/`));
100901
- const kept = [];
100902
- for (const declaredPath of declaredPaths) {
100903
- if (removed(declaredPath)) continue;
100904
- if (excluded.some((path2) => reaches2(path2, declaredPath))) continue;
100905
- if (!paths.some((path2) => path2.startsWith(`${declaredPath}/`)) || !source) {
100906
- kept.push(declaredPath);
100907
- continue;
100908
- }
100909
- for (const member of source.members(kind, declaredPath)) {
100910
- if (removed(member.path)) continue;
100911
- if (excluded.some((path2) => reaches2(path2, member.path))) continue;
100912
- kept.push(member.path);
100913
- }
100914
- }
100915
- const exclusions = excluded.map((path2) => `${EXCLUDE}${path2}`);
100916
- if (kept.length === 0 && exclusions.length === 0) delete next[accessor];
100917
- else next[accessor] = [...kept, ...exclusions];
100918
- }
100919
- return Object.keys(next).length === 0 ? void 0 : next;
100920
- }
100921
-
100922
101187
  // ../config/dist/entities/system/copy-plan.js
100923
101188
  function sourceEntries({ source, kind, path: path2 }) {
100924
101189
  if (path2 === "*") return source.list(kind).map((item) => ({
@@ -100959,6 +101224,7 @@ function planCopy({ config: config2, input: input2 }) {
100959
101224
  const wholesale = input2.data === "*";
100960
101225
  const source = config2.sourceFor(slug2);
100961
101226
  if (!source) rejectData(`Cannot copy through "${slug2}" \u2014 nothing has resolved that link.`);
101227
+ if (config2.sourceTypeOf(slug2) === "vendor") rejectData(`Cannot copy through "${slug2}" \u2014 it is a vendor source, which is used as shipped. Copied in, its components would draw from this system's entities of the same names. To take them as your own, make the source \`linked\` first.`);
100962
101228
  const wanted = [];
100963
101229
  if (input2.data === "*") for (const kind of config2.borrowableKinds(slug2)) wanted.push({
100964
101230
  kind,
@@ -102761,7 +103027,8 @@ var LinkedSystemDefinition = defineEntity({
102761
103027
  invariants: (config2) => [
102762
103028
  ...config2.list("source").filter(({ path: path2 }) => !isLinkSlug(path2)).map(({ path: path2 }) => `Link "${path2}": ${LINK_SLUG_MESSAGE}`),
102763
103029
  ...linkRedirects(config2).filter((redirect) => redirect.problem !== void 0 && redirect.problem !== "missing").map(redirectSentence),
102764
- ...excludedDirectives(config2)
103030
+ ...excludedDirectives(config2),
103031
+ ...vendorDirectives(config2)
102765
103032
  ],
102766
103033
  schemas: {
102767
103034
  create: { example: ({ config: config2 }) => {
@@ -103166,8 +103433,19 @@ var LinkedSystemDefinition = defineEntity({
103166
103433
  * The same holds for the motion presets and composites a taken component names: through a
103167
103434
  * `hybrid` link it plays this system's of that name, and otherwise the source's own, emitted
103168
103435
  * under the pin's names.
103436
+ *
103437
+ * `vendor` brings in only the entities its `options.include` names. Nothing they reference lands
103438
+ * as a row: a taken component draws every value from its own source under the pin's names, and so
103439
+ * do the components it renders. Its `options` take only `hidden`, since a product value laid over
103440
+ * it would mix this system's vocabulary into the source's, and a modifier's `override` naming one
103441
+ * of this system's modifiers, which says when the vendor's values apply and changes none of them
103442
+ * (`vendor-conditions.ts`).
103169
103443
  */
103170
- type: external_exports.enum(["linked", "hybrid"]).optional().describe("How this source joins the system: `linked` (the default) brings in everything its entities reference and refuses a path another link offers differently; `hybrid` brings in only what no other link offers and uses this system's tokens, motion presets and composites wherever it has one of the same name."),
103444
+ type: external_exports.enum([
103445
+ "linked",
103446
+ "hybrid",
103447
+ "vendor"
103448
+ ]).optional().describe("How this source joins the system: `linked` (the default) brings in everything its entities reference and refuses a path another link offers differently; `hybrid` brings in only what no other link offers and uses this system's tokens, motion presets and composites wherever it has one of the same name; `vendor` brings in only what `options.include` names, drawn entirely from the source's own values, with no `override` or `extend` in `options` except a modifier's `override` naming the modifier of this system it stands for."),
103171
103449
  /**
103172
103450
  * The exact published version every ref through this link resolves against.
103173
103451
  *
@@ -103239,7 +103517,10 @@ var LinkedSystemDefinition = defineEntity({
103239
103517
  accessor: accessor ?? kind,
103240
103518
  path: path2
103241
103519
  }),
103242
- sourceType: (body) => body.type === "hybrid" ? "hybrid" : "linked",
103520
+ sourceType: (body) => {
103521
+ const { type } = body;
103522
+ return type === "hybrid" || type === "vendor" ? type : "linked";
103523
+ },
103243
103524
  bulkExcludes: ({ body, kind, accessor, path: path2 }) => excludes({
103244
103525
  declared: includeOf(body),
103245
103526
  accessor: accessor ?? kind,
@@ -103317,6 +103598,19 @@ function excludedDirectives(config2) {
103317
103598
  })).map((path2) => `Link "${slug2}": options.${accessor}["${path2}"] adjusts a path its \`options.include\` excludes, which derives no row. Drop the entry, or the exclusion.`) : []);
103318
103599
  });
103319
103600
  }
103601
+ function vendorDirectives(config2) {
103602
+ return config2.list("source").flatMap(({ path: slug2 }) => {
103603
+ if (config2.sourceTypeOf(slug2) !== "vendor") return [];
103604
+ return [...directivesOf(config2.storedBody("source", slug2)).flatMap(([accessor, entries]) => isPlainObject2(entries) ? Object.entries(entries).filter(([, entry]) => isPlainObject2(entry) && (entry.override !== void 0 || entry.extend !== void 0) && !isVendorModifierMapping({
103605
+ config: config2,
103606
+ accessor,
103607
+ entry
103608
+ })).map(([path2]) => `Link "${slug2}": options.${accessor}["${path2}"] changes what a vendor source brings, which is used as shipped. To change it, wrap it in a component of your own; a vendor entry takes only \`hidden\`, or for a modifier an \`override\` naming the modifier of this system it stands for.`) : []), ...vendorModifierMappingProblems({
103609
+ config: config2,
103610
+ slug: slug2
103611
+ })];
103612
+ });
103613
+ }
103320
103614
  function directiveAt(body, accessor, path2) {
103321
103615
  return body.options?.[accessor]?.[path2];
103322
103616
  }
@@ -103908,6 +104202,15 @@ var variantBooleansMigration = {
103908
104202
  }
103909
104203
  };
103910
104204
 
104205
+ // ../config/dist/migrations/20261112163439_vendor_link_type.js
104206
+ var VENDOR_LINK_TYPE_VERSION = 20261112163439;
104207
+ var vendorLinkTypeMigration = {
104208
+ version: VENDOR_LINK_TYPE_VERSION,
104209
+ up(json2) {
104210
+ return json2;
104211
+ }
104212
+ };
104213
+
103911
104214
  // ../../node_modules/css-tree/lib/generator/sourceMap.js
103912
104215
  var import_source_map_generator = __toESM(require_source_map_generator(), 1);
103913
104216
  var trackNodes = /* @__PURE__ */ new Set(["Atrule", "Selector", "Declaration"]);
@@ -105394,7 +105697,7 @@ function removeRef(node2, ref2) {
105394
105697
  }
105395
105698
  function declareRawCssKeys(componentRecord, stylePropRecord) {
105396
105699
  const bodyOf3 = (path2) => componentRecord[path2];
105397
- const elementProps = (element2, seen = /* @__PURE__ */ new Set()) => {
105700
+ const elementProps2 = (element2, seen = /* @__PURE__ */ new Set()) => {
105398
105701
  const out = /* @__PURE__ */ new Set();
105399
105702
  if (!isRef2(element2)) return out;
105400
105703
  const path2 = pathOf2(element2);
@@ -105402,7 +105705,7 @@ function declareRawCssKeys(componentRecord, stylePropRecord) {
105402
105705
  seen.add(path2);
105403
105706
  const body = bodyOf3(path2);
105404
105707
  for (const [prop, decl] of Object.entries(body?.props ?? {})) if (decl !== null) out.add(prop);
105405
- for (const prop of elementProps(body?.layers?.root, seen)) out.add(prop);
105708
+ for (const prop of elementProps2(body?.layers?.root, seen)) out.add(prop);
105406
105709
  return out;
105407
105710
  };
105408
105711
  const audit = (bag, accepted, at) => {
@@ -105426,7 +105729,7 @@ function declareRawCssKeys(componentRecord, stylePropRecord) {
105426
105729
  for (const [name, body] of Object.entries(componentRecord)) {
105427
105730
  const { layers, styles } = body;
105428
105731
  if (!styles) continue;
105429
- for (const [when, rule] of Object.entries(styles)) for (const [layer, bag] of Object.entries(rule.layers ?? {})) audit(bag, elementProps(layers?.[layer]), `${name}/${when}/${layer}`);
105732
+ for (const [when, rule] of Object.entries(styles)) for (const [layer, bag] of Object.entries(rule.layers ?? {})) audit(bag, elementProps2(layers?.[layer]), `${name}/${when}/${layer}`);
105430
105733
  }
105431
105734
  }
105432
105735
 
@@ -106664,6 +106967,7 @@ if (!registeredSchemaMigrations().has(20261110145811)) registerSchemaMigrations(
106664
106967
  if (!registeredSchemaMigrations().has(20261110171151)) registerSchemaMigrations(anatomyNodeStatesMigration);
106665
106968
  if (!registeredSchemaMigrations().has(20261112145536)) registerSchemaMigrations(nativeLintLocationsMigration);
106666
106969
  if (!registeredSchemaMigrations().has(20261112154943)) registerSchemaMigrations(variantBooleansMigration);
106970
+ if (!registeredSchemaMigrations().has(20261112163439)) registerSchemaMigrations(vendorLinkTypeMigration);
106667
106971
 
106668
106972
  // ../config/dist/capture/node-ops.js
106669
106973
  var DEFAULT_WIDTH = 1600;