@nersh/render 0.1.0 → 0.2.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/index.cjs CHANGED
@@ -59,8 +59,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
59
59
  // src/lib/render/index.ts
60
60
  var render_exports = {};
61
61
  __export(render_exports, {
62
+ PRESET_SKIN_IDS: () => PHASE1_SKIN_IDS,
62
63
  SiteRenderer: () => SiteRenderer,
63
- renderSiteToHtml: () => renderSiteToHtml
64
+ getAdaptiveSkin: () => getAdaptiveSkin,
65
+ isRegisteredSkinId: () => isRegisteredSkinId,
66
+ renderSiteToHtml: () => renderSiteToHtml,
67
+ resolveSkinId: () => resolveSkinId
64
68
  });
65
69
  module.exports = __toCommonJS(render_exports);
66
70
 
@@ -2524,8 +2528,8 @@ var themes = {
2524
2528
  }
2525
2529
  };
2526
2530
 
2527
- // src/lib/skins/shadcnPresets.ts
2528
- var SHADCN_PRESET_IDS = Object.keys(themes);
2531
+ // src/lib/skins/presets.ts
2532
+ var PRESET_SKIN_IDS = Object.keys(themes);
2529
2533
  function tintedShadows(accentPct, base, alpha) {
2530
2534
  const color = (a) => `color-mix(in srgb, color-mix(in srgb, var(--accent) ${accentPct}%, ${base}), transparent ${100 - a}%)`;
2531
2535
  return {
@@ -2560,7 +2564,7 @@ function modeTokens(mode) {
2560
2564
  accentFg: mode["--primary-foreground"]
2561
2565
  };
2562
2566
  }
2563
- function buildShadcnPresetSkin(id) {
2567
+ function buildPresetSkin(id) {
2564
2568
  const theme = themes[id];
2565
2569
  return {
2566
2570
  id,
@@ -2583,7 +2587,7 @@ function buildShadcnPresetSkin(id) {
2583
2587
  })
2584
2588
  };
2585
2589
  }
2586
- var SHADCN_PRESET_SKINS = SHADCN_PRESET_IDS.map((id) => buildShadcnPresetSkin(id));
2590
+ var PRESET_SKINS = PRESET_SKIN_IDS.map((id) => buildPresetSkin(id));
2587
2591
 
2588
2592
  // src/lib/componentLibrary/presetBridge.ts
2589
2593
  var import_preset = require("shadcn/preset");
@@ -3091,7 +3095,7 @@ __export(core_exports2, {
3091
3095
  parse: () => parse,
3092
3096
  parseAsync: () => parseAsync,
3093
3097
  prettifyError: () => prettifyError,
3094
- process: () => process2,
3098
+ process: () => process,
3095
3099
  regexes: () => regexes_exports,
3096
3100
  registry: () => registry,
3097
3101
  safeDecode: () => safeDecode,
@@ -3278,10 +3282,10 @@ function jsonStringifyReplacer(_, value) {
3278
3282
  return value;
3279
3283
  }
3280
3284
  function cached(getter) {
3281
- const set3 = false;
3285
+ const set2 = false;
3282
3286
  return {
3283
3287
  get value() {
3284
- if (!set3) {
3288
+ if (!set2) {
3285
3289
  const value = getter();
3286
3290
  Object.defineProperty(this, "value", { value });
3287
3291
  return value;
@@ -13607,7 +13611,7 @@ function initializeContext(params) {
13607
13611
  external: (_i = params == null ? void 0 : params.external) != null ? _i : void 0
13608
13612
  };
13609
13613
  }
13610
- function process2(schema43, ctx, _params = { path: [], schemaPath: [] }) {
13614
+ function process(schema43, ctx, _params = { path: [], schemaPath: [] }) {
13611
13615
  var _a4, _b, _c;
13612
13616
  var _a3;
13613
13617
  const def = schema43._zod.def;
@@ -13644,7 +13648,7 @@ function process2(schema43, ctx, _params = { path: [], schemaPath: [] }) {
13644
13648
  if (parent) {
13645
13649
  if (!result.ref)
13646
13650
  result.ref = parent;
13647
- process2(parent, ctx, params);
13651
+ process(parent, ctx, params);
13648
13652
  ctx.seen.get(parent).isParent = true;
13649
13653
  }
13650
13654
  }
@@ -13703,7 +13707,7 @@ function extractDefs(ctx, schema43) {
13703
13707
  return;
13704
13708
  }
13705
13709
  const seen = entry[1];
13706
- const { ref: ref2, defId } = makeURI(entry);
13710
+ const { ref, defId } = makeURI(entry);
13707
13711
  seen.def = __spreadValues({}, seen.schema);
13708
13712
  if (defId)
13709
13713
  seen.defId = defId;
@@ -13711,7 +13715,7 @@ function extractDefs(ctx, schema43) {
13711
13715
  for (const key in schema44) {
13712
13716
  delete schema44[key];
13713
13717
  }
13714
- schema44.$ref = ref2;
13718
+ schema44.$ref = ref;
13715
13719
  };
13716
13720
  if (ctx.cycles === "throw") {
13717
13721
  for (const entry of ctx.seen.entries()) {
@@ -13765,11 +13769,11 @@ function finalize(ctx, schema43) {
13765
13769
  return;
13766
13770
  const schema44 = (_a4 = seen.def) != null ? _a4 : seen.schema;
13767
13771
  const _cached = __spreadValues({}, schema44);
13768
- const ref2 = seen.ref;
13772
+ const ref = seen.ref;
13769
13773
  seen.ref = null;
13770
- if (ref2) {
13771
- flattenRef(ref2);
13772
- const refSeen = ctx.seen.get(ref2);
13774
+ if (ref) {
13775
+ flattenRef(ref);
13776
+ const refSeen = ctx.seen.get(ref);
13773
13777
  const refSchema = refSeen.schema;
13774
13778
  if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
13775
13779
  schema44.allOf = (_b2 = schema44.allOf) != null ? _b2 : [];
@@ -13778,7 +13782,7 @@ function finalize(ctx, schema43) {
13778
13782
  Object.assign(schema44, refSchema);
13779
13783
  }
13780
13784
  Object.assign(schema44, _cached);
13781
- const isParentRef = zodSchema._zod.parent === ref2;
13785
+ const isParentRef = zodSchema._zod.parent === ref;
13782
13786
  if (isParentRef) {
13783
13787
  for (const key in schema44) {
13784
13788
  if (key === "$ref" || key === "allOf")
@@ -13799,7 +13803,7 @@ function finalize(ctx, schema43) {
13799
13803
  }
13800
13804
  }
13801
13805
  const parent = zodSchema._zod.parent;
13802
- if (parent && parent !== ref2) {
13806
+ if (parent && parent !== ref) {
13803
13807
  flattenRef(parent);
13804
13808
  const parentSeen = ctx.seen.get(parent);
13805
13809
  if (parentSeen == null ? void 0 : parentSeen.schema.$ref) {
@@ -13928,14 +13932,14 @@ function isTransforming(_schema, _ctx) {
13928
13932
  }
13929
13933
  var createToJSONSchemaMethod = (schema43, processors = {}) => (params) => {
13930
13934
  const ctx = initializeContext(__spreadProps(__spreadValues({}, params), { processors }));
13931
- process2(schema43, ctx);
13935
+ process(schema43, ctx);
13932
13936
  extractDefs(ctx, schema43);
13933
13937
  return finalize(ctx, schema43);
13934
13938
  };
13935
13939
  var createStandardJSONSchemaMethod = (schema43, io, processors = {}) => (params) => {
13936
13940
  const { libraryOptions, target } = params != null ? params : {};
13937
13941
  const ctx = initializeContext(__spreadProps(__spreadValues({}, libraryOptions != null ? libraryOptions : {}), { target, io, processors }));
13938
- process2(schema43, ctx);
13942
+ process(schema43, ctx);
13939
13943
  extractDefs(ctx, schema43);
13940
13944
  return finalize(ctx, schema43);
13941
13945
  };
@@ -14192,7 +14196,7 @@ var arrayProcessor = (schema43, ctx, _json, params) => {
14192
14196
  if (typeof maximum === "number")
14193
14197
  json2.maxItems = maximum;
14194
14198
  json2.type = "array";
14195
- json2.items = process2(def.element, ctx, __spreadProps(__spreadValues({}, params), { path: [...params.path, "items"] }));
14199
+ json2.items = process(def.element, ctx, __spreadProps(__spreadValues({}, params), { path: [...params.path, "items"] }));
14196
14200
  };
14197
14201
  var objectProcessor = (schema43, ctx, _json, params) => {
14198
14202
  var _a3;
@@ -14202,7 +14206,7 @@ var objectProcessor = (schema43, ctx, _json, params) => {
14202
14206
  json2.properties = {};
14203
14207
  const shape = def.shape;
14204
14208
  for (const key in shape) {
14205
- json2.properties[key] = process2(shape[key], ctx, __spreadProps(__spreadValues({}, params), {
14209
+ json2.properties[key] = process(shape[key], ctx, __spreadProps(__spreadValues({}, params), {
14206
14210
  path: [...params.path, "properties", key]
14207
14211
  }));
14208
14212
  }
@@ -14224,7 +14228,7 @@ var objectProcessor = (schema43, ctx, _json, params) => {
14224
14228
  if (ctx.io === "output")
14225
14229
  json2.additionalProperties = false;
14226
14230
  } else if (def.catchall) {
14227
- json2.additionalProperties = process2(def.catchall, ctx, __spreadProps(__spreadValues({}, params), {
14231
+ json2.additionalProperties = process(def.catchall, ctx, __spreadProps(__spreadValues({}, params), {
14228
14232
  path: [...params.path, "additionalProperties"]
14229
14233
  }));
14230
14234
  }
@@ -14232,7 +14236,7 @@ var objectProcessor = (schema43, ctx, _json, params) => {
14232
14236
  var unionProcessor = (schema43, ctx, json2, params) => {
14233
14237
  const def = schema43._zod.def;
14234
14238
  const isExclusive = def.inclusive === false;
14235
- const options = def.options.map((x, i) => process2(x, ctx, __spreadProps(__spreadValues({}, params), {
14239
+ const options = def.options.map((x, i) => process(x, ctx, __spreadProps(__spreadValues({}, params), {
14236
14240
  path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
14237
14241
  })));
14238
14242
  if (isExclusive) {
@@ -14243,10 +14247,10 @@ var unionProcessor = (schema43, ctx, json2, params) => {
14243
14247
  };
14244
14248
  var intersectionProcessor = (schema43, ctx, json2, params) => {
14245
14249
  const def = schema43._zod.def;
14246
- const a = process2(def.left, ctx, __spreadProps(__spreadValues({}, params), {
14250
+ const a = process(def.left, ctx, __spreadProps(__spreadValues({}, params), {
14247
14251
  path: [...params.path, "allOf", 0]
14248
14252
  }));
14249
- const b = process2(def.right, ctx, __spreadProps(__spreadValues({}, params), {
14253
+ const b = process(def.right, ctx, __spreadProps(__spreadValues({}, params), {
14250
14254
  path: [...params.path, "allOf", 1]
14251
14255
  }));
14252
14256
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
@@ -14262,10 +14266,10 @@ var tupleProcessor = (schema43, ctx, _json, params) => {
14262
14266
  json2.type = "array";
14263
14267
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
14264
14268
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
14265
- const prefixItems = def.items.map((x, i) => process2(x, ctx, __spreadProps(__spreadValues({}, params), {
14269
+ const prefixItems = def.items.map((x, i) => process(x, ctx, __spreadProps(__spreadValues({}, params), {
14266
14270
  path: [...params.path, prefixPath, i]
14267
14271
  })));
14268
- const rest = def.rest ? process2(def.rest, ctx, __spreadProps(__spreadValues({}, params), {
14272
+ const rest = def.rest ? process(def.rest, ctx, __spreadProps(__spreadValues({}, params), {
14269
14273
  path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
14270
14274
  })) : null;
14271
14275
  if (ctx.target === "draft-2020-12") {
@@ -14304,7 +14308,7 @@ var recordProcessor = (schema43, ctx, _json, params) => {
14304
14308
  const keyBag = keyType._zod.bag;
14305
14309
  const patterns = keyBag == null ? void 0 : keyBag.patterns;
14306
14310
  if (def.mode === "loose" && patterns && patterns.size > 0) {
14307
- const valueSchema = process2(def.valueType, ctx, __spreadProps(__spreadValues({}, params), {
14311
+ const valueSchema = process(def.valueType, ctx, __spreadProps(__spreadValues({}, params), {
14308
14312
  path: [...params.path, "patternProperties", "*"]
14309
14313
  }));
14310
14314
  json2.patternProperties = {};
@@ -14313,11 +14317,11 @@ var recordProcessor = (schema43, ctx, _json, params) => {
14313
14317
  }
14314
14318
  } else {
14315
14319
  if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
14316
- json2.propertyNames = process2(def.keyType, ctx, __spreadProps(__spreadValues({}, params), {
14320
+ json2.propertyNames = process(def.keyType, ctx, __spreadProps(__spreadValues({}, params), {
14317
14321
  path: [...params.path, "propertyNames"]
14318
14322
  }));
14319
14323
  }
14320
- json2.additionalProperties = process2(def.valueType, ctx, __spreadProps(__spreadValues({}, params), {
14324
+ json2.additionalProperties = process(def.valueType, ctx, __spreadProps(__spreadValues({}, params), {
14321
14325
  path: [...params.path, "additionalProperties"]
14322
14326
  }));
14323
14327
  }
@@ -14331,7 +14335,7 @@ var recordProcessor = (schema43, ctx, _json, params) => {
14331
14335
  };
14332
14336
  var nullableProcessor = (schema43, ctx, json2, params) => {
14333
14337
  const def = schema43._zod.def;
14334
- const inner = process2(def.innerType, ctx, params);
14338
+ const inner = process(def.innerType, ctx, params);
14335
14339
  const seen = ctx.seen.get(schema43);
14336
14340
  if (ctx.target === "openapi-3.0") {
14337
14341
  seen.ref = def.innerType;
@@ -14342,20 +14346,20 @@ var nullableProcessor = (schema43, ctx, json2, params) => {
14342
14346
  };
14343
14347
  var nonoptionalProcessor = (schema43, ctx, _json, params) => {
14344
14348
  const def = schema43._zod.def;
14345
- process2(def.innerType, ctx, params);
14349
+ process(def.innerType, ctx, params);
14346
14350
  const seen = ctx.seen.get(schema43);
14347
14351
  seen.ref = def.innerType;
14348
14352
  };
14349
14353
  var defaultProcessor = (schema43, ctx, json2, params) => {
14350
14354
  const def = schema43._zod.def;
14351
- process2(def.innerType, ctx, params);
14355
+ process(def.innerType, ctx, params);
14352
14356
  const seen = ctx.seen.get(schema43);
14353
14357
  seen.ref = def.innerType;
14354
14358
  json2.default = JSON.parse(JSON.stringify(def.defaultValue));
14355
14359
  };
14356
14360
  var prefaultProcessor = (schema43, ctx, json2, params) => {
14357
14361
  const def = schema43._zod.def;
14358
- process2(def.innerType, ctx, params);
14362
+ process(def.innerType, ctx, params);
14359
14363
  const seen = ctx.seen.get(schema43);
14360
14364
  seen.ref = def.innerType;
14361
14365
  if (ctx.io === "input")
@@ -14363,7 +14367,7 @@ var prefaultProcessor = (schema43, ctx, json2, params) => {
14363
14367
  };
14364
14368
  var catchProcessor = (schema43, ctx, json2, params) => {
14365
14369
  const def = schema43._zod.def;
14366
- process2(def.innerType, ctx, params);
14370
+ process(def.innerType, ctx, params);
14367
14371
  const seen = ctx.seen.get(schema43);
14368
14372
  seen.ref = def.innerType;
14369
14373
  let catchValue;
@@ -14377,32 +14381,32 @@ var catchProcessor = (schema43, ctx, json2, params) => {
14377
14381
  var pipeProcessor = (schema43, ctx, _json, params) => {
14378
14382
  const def = schema43._zod.def;
14379
14383
  const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
14380
- process2(innerType, ctx, params);
14384
+ process(innerType, ctx, params);
14381
14385
  const seen = ctx.seen.get(schema43);
14382
14386
  seen.ref = innerType;
14383
14387
  };
14384
14388
  var readonlyProcessor = (schema43, ctx, json2, params) => {
14385
14389
  const def = schema43._zod.def;
14386
- process2(def.innerType, ctx, params);
14390
+ process(def.innerType, ctx, params);
14387
14391
  const seen = ctx.seen.get(schema43);
14388
14392
  seen.ref = def.innerType;
14389
14393
  json2.readOnly = true;
14390
14394
  };
14391
14395
  var promiseProcessor = (schema43, ctx, _json, params) => {
14392
14396
  const def = schema43._zod.def;
14393
- process2(def.innerType, ctx, params);
14397
+ process(def.innerType, ctx, params);
14394
14398
  const seen = ctx.seen.get(schema43);
14395
14399
  seen.ref = def.innerType;
14396
14400
  };
14397
14401
  var optionalProcessor = (schema43, ctx, _json, params) => {
14398
14402
  const def = schema43._zod.def;
14399
- process2(def.innerType, ctx, params);
14403
+ process(def.innerType, ctx, params);
14400
14404
  const seen = ctx.seen.get(schema43);
14401
14405
  seen.ref = def.innerType;
14402
14406
  };
14403
14407
  var lazyProcessor = (schema43, ctx, _json, params) => {
14404
14408
  const innerType = schema43._zod.innerType;
14405
- process2(innerType, ctx, params);
14409
+ process(innerType, ctx, params);
14406
14410
  const seen = ctx.seen.get(schema43);
14407
14411
  seen.ref = innerType;
14408
14412
  };
@@ -14454,7 +14458,7 @@ function toJSONSchema(input, params) {
14454
14458
  const defs = {};
14455
14459
  for (const entry of registry2._idmap.entries()) {
14456
14460
  const [_, schema43] = entry;
14457
- process2(schema43, ctx2);
14461
+ process(schema43, ctx2);
14458
14462
  }
14459
14463
  const schemas = {};
14460
14464
  const external = {
@@ -14477,7 +14481,7 @@ function toJSONSchema(input, params) {
14477
14481
  return { schemas };
14478
14482
  }
14479
14483
  const ctx = initializeContext(__spreadProps(__spreadValues({}, params), { processors: allProcessors }));
14480
- process2(input, ctx);
14484
+ process(input, ctx);
14481
14485
  extractDefs(ctx, input);
14482
14486
  return finalize(ctx, input);
14483
14487
  }
@@ -14532,7 +14536,7 @@ var JSONSchemaGenerator = class {
14532
14536
  * This must be called before emit().
14533
14537
  */
14534
14538
  process(schema43, _params = { path: [], schemaPath: [] }) {
14535
- return process2(schema43, this.ctx, _params);
14539
+ return process(schema43, this.ctx, _params);
14536
14540
  }
14537
14541
  /**
14538
14542
  * Emit the final JSON Schema after processing.
@@ -16035,11 +16039,11 @@ function detectVersion(schema43, defaultTarget) {
16035
16039
  }
16036
16040
  return defaultTarget != null ? defaultTarget : "draft-2020-12";
16037
16041
  }
16038
- function resolveRef(ref2, ctx) {
16039
- if (!ref2.startsWith("#")) {
16042
+ function resolveRef(ref, ctx) {
16043
+ if (!ref.startsWith("#")) {
16040
16044
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
16041
16045
  }
16042
- const path = ref2.slice(1).split("/").filter(Boolean);
16046
+ const path = ref.slice(1).split("/").filter(Boolean);
16043
16047
  if (path.length === 0) {
16044
16048
  return ctx.rootSchema;
16045
16049
  }
@@ -16047,11 +16051,11 @@ function resolveRef(ref2, ctx) {
16047
16051
  if (path[0] === defsKey) {
16048
16052
  const key = path[1];
16049
16053
  if (!key || !ctx.defs[key]) {
16050
- throw new Error(`Reference not found: ${ref2}`);
16054
+ throw new Error(`Reference not found: ${ref}`);
16051
16055
  }
16052
16056
  return ctx.defs[key];
16053
16057
  }
16054
- throw new Error(`Reference not found: ${ref2}`);
16058
+ throw new Error(`Reference not found: ${ref}`);
16055
16059
  }
16056
16060
  function convertBaseSchema(schema43, ctx) {
16057
16061
  if (schema43.not !== void 0) {
@@ -16568,10 +16572,6 @@ var SHADCN_CREATE_DEFAULT_CONFIG = {
16568
16572
  menuAccent: "subtle",
16569
16573
  menuColor: "default"
16570
16574
  };
16571
- function shadcnStyleKey(config2) {
16572
- const prefix = config2.base === "base-ui" ? "base" : "radix";
16573
- return `${prefix}-${config2.style}`;
16574
- }
16575
16575
  var MuiDensitySchema = external_exports.enum(["comfortable", "standard", "compact"]);
16576
16576
  var MuiLibraryConfigSchema = external_exports.object({
16577
16577
  theme: external_exports.string().min(1),
@@ -16695,9 +16695,6 @@ var LEGACY_TO_AXES = {
16695
16695
  blue: { baseColor: "neutral", theme: "blue" },
16696
16696
  violet: { baseColor: "neutral", theme: "violet" }
16697
16697
  };
16698
- function isLegacyShadcnPresetSkinId(skinId) {
16699
- return (0, import_preset.isValidPreset)(skinId) || skinId in LEGACY_TO_AXES || isShadcnStylePresetSkinId(skinId);
16700
- }
16701
16698
  function migrateLegacySkinId(legacyId) {
16702
16699
  const axes = LEGACY_TO_AXES[legacyId];
16703
16700
  if (axes) {
@@ -16768,13 +16765,6 @@ var ACCENT_THEMES = __spreadValues({
16768
16765
  }, Object.fromEntries(
16769
16766
  CHROMATIC_THEME_IDS.map((id) => [id, buildChromaticAccent(id)])
16770
16767
  ));
16771
- function isChromaticTheme(theme) {
16772
- return CHROMATIC_THEME_IDS.includes(theme);
16773
- }
16774
- function getAccentThemeTokens(theme) {
16775
- var _a3;
16776
- return (_a3 = ACCENT_THEMES[theme]) != null ? _a3 : { light: {}, dark: {} };
16777
- }
16778
16768
 
16779
16769
  // src/lib/componentLibrary/providers/shadcn/tokens/baseColors.ts
16780
16770
  function themeModeToCssVars(mode) {
@@ -16798,328 +16788,66 @@ var BRIDGED_BASE_COLORS = {
16798
16788
  mist: fromThemesTheme("mist"),
16799
16789
  taupe: fromThemesTheme("taupe")
16800
16790
  };
16801
- function getBaseColorTokens(baseColor) {
16802
- var _a3;
16803
- return (_a3 = BRIDGED_BASE_COLORS[baseColor]) != null ? _a3 : BRIDGED_BASE_COLORS.neutral;
16804
- }
16805
-
16806
- // src/lib/componentLibrary/providers/shadcn/tokens/chartColors.ts
16807
- var CHROMATIC_CHART_RAMPS = {
16808
- amber: [
16809
- "oklch(0.879 0.169 91.605)",
16810
- "oklch(0.769 0.188 70.08)",
16811
- "oklch(0.666 0.179 58.318)",
16812
- "oklch(0.555 0.163 48.998)",
16813
- "oklch(0.473 0.137 46.201)"
16814
- ],
16815
- blue: [
16816
- "oklch(0.809 0.105 251.813)",
16817
- "oklch(0.623 0.214 259.815)",
16818
- "oklch(0.546 0.245 262.881)",
16819
- "oklch(0.488 0.243 264.376)",
16820
- "oklch(0.424 0.199 265.638)"
16821
- ],
16822
- cyan: [
16823
- "oklch(0.865 0.127 207.078)",
16824
- "oklch(0.715 0.143 215.221)",
16825
- "oklch(0.609 0.126 221.723)",
16826
- "oklch(0.52 0.105 223.128)",
16827
- "oklch(0.45 0.085 224.283)"
16828
- ],
16829
- emerald: [
16830
- "oklch(0.845 0.143 164.978)",
16831
- "oklch(0.696 0.17 162.48)",
16832
- "oklch(0.596 0.145 163.225)",
16833
- "oklch(0.508 0.118 165.612)",
16834
- "oklch(0.432 0.095 166.913)"
16835
- ],
16836
- fuchsia: [
16837
- "oklch(0.833 0.145 321.434)",
16838
- "oklch(0.667 0.295 322.15)",
16839
- "oklch(0.591 0.293 322.896)",
16840
- "oklch(0.518 0.253 323.949)",
16841
- "oklch(0.452 0.211 324.591)"
16842
- ],
16843
- green: [
16844
- "oklch(0.871 0.15 154.449)",
16845
- "oklch(0.723 0.219 149.579)",
16846
- "oklch(0.627 0.194 149.214)",
16847
- "oklch(0.527 0.154 150.069)",
16848
- "oklch(0.448 0.119 151.328)"
16849
- ],
16850
- indigo: [
16851
- "oklch(0.785 0.115 274.713)",
16852
- "oklch(0.585 0.233 277.117)",
16853
- "oklch(0.511 0.262 276.966)",
16854
- "oklch(0.457 0.24 277.023)",
16855
- "oklch(0.398 0.195 277.366)"
16856
- ],
16857
- lime: [
16858
- "oklch(0.897 0.196 126.665)",
16859
- "oklch(0.768 0.233 130.85)",
16860
- "oklch(0.648 0.2 131.684)",
16861
- "oklch(0.532 0.157 131.589)",
16862
- "oklch(0.453 0.124 130.933)"
16863
- ],
16864
- orange: [
16865
- "oklch(0.837 0.128 66.29)",
16866
- "oklch(0.705 0.213 47.604)",
16867
- "oklch(0.646 0.222 41.116)",
16868
- "oklch(0.553 0.195 38.402)",
16869
- "oklch(0.47 0.157 37.304)"
16870
- ],
16871
- pink: [
16872
- "oklch(0.823 0.12 346.018)",
16873
- "oklch(0.656 0.241 354.308)",
16874
- "oklch(0.592 0.249 0.584)",
16875
- "oklch(0.525 0.223 3.958)",
16876
- "oklch(0.459 0.187 3.815)"
16877
- ],
16878
- purple: [
16879
- "oklch(0.827 0.119 306.383)",
16880
- "oklch(0.627 0.265 303.9)",
16881
- "oklch(0.558 0.288 302.321)",
16882
- "oklch(0.496 0.265 301.924)",
16883
- "oklch(0.438 0.218 303.724)"
16884
- ],
16885
- red: [
16886
- "oklch(0.808 0.114 19.571)",
16887
- "oklch(0.637 0.237 25.331)",
16888
- "oklch(0.577 0.245 27.325)",
16889
- "oklch(0.505 0.213 27.518)",
16890
- "oklch(0.444 0.177 26.899)"
16891
- ],
16892
- rose: [
16893
- "oklch(0.81 0.117 11.638)",
16894
- "oklch(0.645 0.246 16.439)",
16895
- "oklch(0.586 0.253 17.585)",
16896
- "oklch(0.514 0.222 16.935)",
16897
- "oklch(0.455 0.188 13.697)"
16898
- ],
16899
- sky: [
16900
- "oklch(0.828 0.111 230.318)",
16901
- "oklch(0.685 0.169 237.323)",
16902
- "oklch(0.588 0.158 241.966)",
16903
- "oklch(0.5 0.134 242.749)",
16904
- "oklch(0.443 0.11 240.79)"
16905
- ],
16906
- teal: [
16907
- "oklch(0.855 0.138 181.071)",
16908
- "oklch(0.704 0.14 182.503)",
16909
- "oklch(0.6 0.118 184.704)",
16910
- "oklch(0.511 0.096 186.391)",
16911
- "oklch(0.437 0.078 188.216)"
16912
- ],
16913
- violet: [
16914
- "oklch(0.811 0.111 293.571)",
16915
- "oklch(0.606 0.25 292.717)",
16916
- "oklch(0.541 0.281 293.009)",
16917
- "oklch(0.491 0.27 292.581)",
16918
- "oklch(0.432 0.232 292.759)"
16919
- ],
16920
- yellow: [
16921
- "oklch(0.905 0.182 98.111)",
16922
- "oklch(0.795 0.184 86.047)",
16923
- "oklch(0.681 0.162 75.834)",
16924
- "oklch(0.554 0.135 66.442)",
16925
- "oklch(0.476 0.114 61.907)"
16926
- ]
16927
- };
16928
- var NEUTRAL_SEEDS = {
16929
- neutral: { hue: 0, chroma: 0 },
16930
- gray: { hue: 0, chroma: 0 },
16931
- zinc: { hue: 286, chroma: 8e-3 },
16932
- slate: { hue: 240, chroma: 0.024 },
16933
- stone: { hue: 60, chroma: 0.016 },
16934
- mauve: { hue: 322, chroma: 0.024 },
16935
- olive: { hue: 131, chroma: 0.024 },
16936
- mist: { hue: 237, chroma: 0.024 },
16937
- taupe: { hue: 70, chroma: 0.024 }
16938
- };
16939
- var NEUTRAL_LIGHT_STOPS = [0.62, 0.7, 0.54, 0.8, 0.46];
16940
- var NEUTRAL_DARK_STOPS = [0.7, 0.62, 0.8, 0.54, 0.46];
16941
- function round(n, places) {
16942
- const f = 10 ** places;
16943
- return Math.round(n * f) / f;
16944
- }
16945
- function neutralChartVars(seed, scheme) {
16946
- const stops = scheme === "light" ? NEUTRAL_LIGHT_STOPS : NEUTRAL_DARK_STOPS;
16947
- const vars = {};
16948
- for (let i = 0; i < 5; i += 1) {
16949
- vars[`--chart-${i + 1}`] = `oklch(${round(stops[i], 3)} ${round(seed.chroma, 3)} ${round(seed.hue, 1)})`;
16950
- }
16951
- return vars;
16952
- }
16953
- function chartVarsForColor(chartColor, scheme) {
16954
- var _a3;
16955
- const chromatic = CHROMATIC_CHART_RAMPS[chartColor];
16956
- if (chromatic) {
16957
- const vars = {};
16958
- for (let i = 0; i < 5; i += 1) {
16959
- vars[`--chart-${i + 1}`] = chromatic[i];
16960
- }
16961
- return vars;
16962
- }
16963
- const seed = (_a3 = NEUTRAL_SEEDS[chartColor]) != null ? _a3 : NEUTRAL_SEEDS.neutral;
16964
- return neutralChartVars(seed, scheme);
16965
- }
16966
-
16967
- // src/lib/componentLibrary/providers/shadcn/tokens/radius.ts
16968
- var RADIUS_VALUES = {
16969
- none: "0",
16970
- sm: "0.45rem",
16971
- md: "0.625rem",
16972
- lg: "0.875rem",
16973
- xl: "1rem"
16974
- };
16975
- var DEFAULT_RADIUS_CSS = "0.625rem";
16976
- function resolveRadiusCss(radius, baseRadius = DEFAULT_RADIUS_CSS) {
16977
- if (radius === "default") {
16978
- return baseRadius;
16979
- }
16980
- return RADIUS_VALUES[radius];
16981
- }
16982
-
16983
- // src/lib/componentLibrary/providers/shadcn/tokens/mergeTheme.ts
16984
- function mergeModeVars(base, accent) {
16985
- const merged = __spreadValues({}, base);
16986
- for (const [key, value] of Object.entries(accent)) {
16987
- if (value !== void 0) {
16988
- merged[key] = value;
16989
- }
16990
- }
16991
- return merged;
16992
- }
16993
- function resolveScaffoldBaseColor(baseColor, theme) {
16994
- if (isChromaticTheme(theme)) {
16995
- return "zinc";
16996
- }
16997
- return baseColor;
16998
- }
16999
- function mergeRegistryTheme(config2) {
17000
- const scaffoldBase = resolveScaffoldBaseColor(config2.baseColor, config2.theme);
17001
- const baseTokens = getBaseColorTokens(scaffoldBase);
17002
- const accentTokens = getAccentThemeTokens(config2.theme);
17003
- const lightVars = mergeModeVars(
17004
- baseTokens.light,
17005
- config2.theme === "neutral" ? {} : accentTokens.light
17006
- );
17007
- const darkVars = mergeModeVars(
17008
- baseTokens.dark,
17009
- config2.theme === "neutral" ? {} : accentTokens.dark
17010
- );
17011
- Object.assign(lightVars, chartVarsForColor(config2.chartColor, "light"));
17012
- Object.assign(darkVars, chartVarsForColor(config2.chartColor, "dark"));
17013
- if (config2.menuAccent === "bold") {
17014
- lightVars["--accent"] = lightVars["--primary"];
17015
- lightVars["--accent-foreground"] = lightVars["--primary-foreground"];
17016
- darkVars["--accent"] = darkVars["--primary"];
17017
- darkVars["--accent-foreground"] = darkVars["--primary-foreground"];
17018
- }
17019
- const inverted = config2.menuColor === "inverted" || config2.menuColor === "inverted-translucent";
17020
- const translucent = config2.menuColor === "default-translucent" || config2.menuColor === "inverted-translucent";
17021
- for (const vars of [lightVars, darkVars]) {
17022
- const baseBg = inverted ? vars["--foreground"] : vars["--background"];
17023
- vars["--navbar-bg"] = translucent ? `color-mix(in oklch, ${baseBg} 80%, transparent)` : baseBg;
17024
- vars["--navbar-fg"] = inverted ? vars["--background"] : vars["--foreground"];
17025
- vars["--navbar-backdrop"] = translucent ? "blur(12px)" : "none";
17026
- }
17027
- const baseRadius = DEFAULT_RADIUS_CSS;
17028
- const radius = resolveRadiusCss(config2.radius, baseRadius);
17029
- return {
17030
- light: lightVars,
17031
- dark: darkVars,
17032
- radius
17033
- };
17034
- }
17035
-
17036
- // src/lib/componentLibrary/providers/shadcn/compile.ts
17037
- function compileShadcnSkin(config2, libraryConfig) {
17038
- const merged = mergeRegistryTheme(config2);
17039
- return {
17040
- provider: "shadcn",
17041
- structuralStyleId: shadcnStyleKey(config2),
17042
- cssVars: {
17043
- light: __spreadProps(__spreadValues({}, merged.light), {
17044
- "--radius": merged.radius
17045
- }),
17046
- dark: __spreadProps(__spreadValues({}, merged.dark), {
17047
- "--radius": merged.radius
17048
- })
17049
- },
17050
- libraryConfig
17051
- };
17052
- }
17053
-
17054
- // src/lib/componentLibrary/compile.ts
17055
- function compileComponentLibraryConfig(config2) {
17056
- switch (config2.provider) {
17057
- case "shadcn":
17058
- return CompiledSkinSchema.parse(compileShadcnSkin(config2.shadcn, config2));
17059
- case "mui":
17060
- throw new Error("MUI provider compile not implemented");
17061
- }
17062
- }
17063
16791
 
17064
16792
  // src/lib/siteTokens.ts
17065
16793
  function expandSiteDs(ds) {
17066
16794
  const out = __spreadValues({}, ds);
17067
- const set3 = (k, v) => {
16795
+ const set2 = (k, v) => {
17068
16796
  if (!out[k]) out[k] = v;
17069
16797
  };
17070
16798
  if (out["--surface-container-high"]) {
17071
16799
  out["--card"] = out["--surface-container-high"];
17072
16800
  out["--card-bg"] = out["--surface-container-high"];
17073
16801
  } else if (out["--muted"]) {
17074
- set3("--card", out["--muted"]);
17075
- set3("--card-bg", out["--muted"]);
16802
+ set2("--card", out["--muted"]);
16803
+ set2("--card-bg", out["--muted"]);
17076
16804
  }
17077
- if (out["--border"]) set3("--card-border", out["--border"]);
17078
- if (out["--foreground"]) set3("--card-foreground", out["--foreground"]);
17079
- if (out["--muted-fg"]) set3("--muted-foreground", out["--muted-fg"]);
17080
- if (out["--accent-fg"]) set3("--accent-foreground", out["--accent-fg"]);
16805
+ if (out["--border"]) set2("--card-border", out["--border"]);
16806
+ if (out["--foreground"]) set2("--card-foreground", out["--foreground"]);
16807
+ if (out["--muted-fg"]) set2("--muted-foreground", out["--muted-fg"]);
16808
+ if (out["--accent-fg"]) set2("--accent-foreground", out["--accent-fg"]);
17081
16809
  if (out["--font-sans"]) {
17082
- set3("--font-heading", out["--font-sans"]);
17083
- set3("--font-body", out["--font-sans"]);
16810
+ set2("--font-heading", out["--font-sans"]);
16811
+ set2("--font-body", out["--font-sans"]);
17084
16812
  }
17085
16813
  if (out["--surface-container-high"]) {
17086
- set3("--card", out["--surface-container-high"]);
17087
- set3("--card-bg", out["--surface-container-high"]);
16814
+ set2("--card", out["--surface-container-high"]);
16815
+ set2("--card-bg", out["--surface-container-high"]);
17088
16816
  }
17089
16817
  if (out["--primary"]) {
17090
- set3(
16818
+ set2(
17091
16819
  "--primary-ring",
17092
16820
  `oklch(from ${out["--primary"]} l c calc(h + 30deg))`
17093
16821
  );
17094
- set3(
16822
+ set2(
17095
16823
  "--primary-ring-gradient",
17096
16824
  "linear-gradient(135deg, var(--primary), var(--primary-ring))"
17097
16825
  );
17098
16826
  }
17099
- if (out["--primary"]) set3("--accent", out["--primary"]);
17100
- if (out["--on-primary"]) set3("--accent-fg", out["--on-primary"]);
17101
- if (out["--primary-foreground"]) set3("--accent-fg", out["--primary-foreground"]);
17102
- if (out["--accent-foreground"]) set3("--accent-fg", out["--accent-foreground"]);
16827
+ if (out["--primary"]) set2("--accent", out["--primary"]);
16828
+ if (out["--on-primary"]) set2("--accent-fg", out["--on-primary"]);
16829
+ if (out["--primary-foreground"]) set2("--accent-fg", out["--primary-foreground"]);
16830
+ if (out["--accent-foreground"]) set2("--accent-fg", out["--accent-foreground"]);
17103
16831
  if (out["--accent"]) {
17104
- set3(
16832
+ set2(
17105
16833
  "--accent-ring",
17106
16834
  `oklch(from ${out["--accent"]} l c calc(h + 30deg))`
17107
16835
  );
17108
- set3(
16836
+ set2(
17109
16837
  "--accent-ring-gradient",
17110
16838
  "linear-gradient(135deg, var(--accent), var(--accent-ring))"
17111
16839
  );
17112
16840
  }
17113
16841
  if (out["--background"]) {
17114
- set3("--card", out["--background"]);
17115
- set3("--card-bg", out["--background"]);
17116
- }
17117
- if (out["--border"]) set3("--card-border", out["--border"]);
17118
- if (out["--background"]) set3("--section-bg", out["--background"]);
17119
- if (out["--foreground"]) set3("--section-fg", out["--foreground"]);
17120
- if (out["--muted"]) set3("--footer-bg", out["--muted"]);
17121
- if (out["--foreground"]) set3("--footer-fg", out["--foreground"]);
17122
- set3("--color-danger", "#ef4444");
16842
+ set2("--card", out["--background"]);
16843
+ set2("--card-bg", out["--background"]);
16844
+ }
16845
+ if (out["--border"]) set2("--card-border", out["--border"]);
16846
+ if (out["--background"]) set2("--section-bg", out["--background"]);
16847
+ if (out["--foreground"]) set2("--section-fg", out["--foreground"]);
16848
+ if (out["--muted"]) set2("--footer-bg", out["--muted"]);
16849
+ if (out["--foreground"]) set2("--footer-fg", out["--foreground"]);
16850
+ set2("--color-danger", "#ef4444");
17123
16851
  return out;
17124
16852
  }
17125
16853
  var DEFAULT_SKIN_ID = "zinc";
@@ -17175,7 +16903,7 @@ var DEFAULT_SKIN_LAYOUT = {
17175
16903
  var SKIN_LAYOUT_TOKENS = __spreadProps(__spreadValues({
17176
16904
  zinc: DEFAULT_SKIN_LAYOUT
17177
16905
  }, Object.fromEntries(
17178
- SHADCN_PRESET_IDS.filter((id) => id !== "zinc").map((id) => [id, DEFAULT_SKIN_LAYOUT])
16906
+ PRESET_SKIN_IDS.filter((id) => id !== "zinc").map((id) => [id, DEFAULT_SKIN_LAYOUT])
17179
16907
  )), {
17180
16908
  [GOOGIE_CLEAN_SKIN_ID]: {
17181
16909
  "--site-max-width": GOOGIE_CLEAN_LAYOUT["--site-max-width"],
@@ -17203,7 +16931,7 @@ function getSkinLayoutTokens(skinId) {
17203
16931
  return (_b = SKIN_LAYOUT_TOKENS[resolved]) != null ? _b : SKIN_LAYOUT_TOKENS[DEFAULT_SKIN_ID];
17204
16932
  }
17205
16933
  var ADAPTIVE_SKINS = [
17206
- ...SHADCN_PRESET_SKINS,
16934
+ ...PRESET_SKINS,
17207
16935
  {
17208
16936
  id: GOOGIE_CLEAN_SKIN_ID,
17209
16937
  name: "Googie Clean",
@@ -17278,6 +17006,11 @@ function getAdaptiveSkin(id) {
17278
17006
  const resolved = (_a3 = LEGACY_SKIN_IDS[id]) != null ? _a3 : id;
17279
17007
  return (_b = ADAPTIVE_SKINS.find((s) => s.id === resolved)) != null ? _b : ADAPTIVE_SKINS[0];
17280
17008
  }
17009
+ function isRegisteredSkinId(skinId) {
17010
+ var _a3;
17011
+ const resolved = (_a3 = LEGACY_SKIN_IDS[skinId]) != null ? _a3 : skinId;
17012
+ return ADAPTIVE_SKINS.some((s) => s.id === resolved);
17013
+ }
17281
17014
  function modeToCoreVars(mode) {
17282
17015
  return {
17283
17016
  "--background": mode.background,
@@ -17817,9 +17550,9 @@ var BUILTIN_SKINS = ADAPTIVE_SKINS.map((skin) => ({
17817
17550
  base: skin.base,
17818
17551
  ds: getSkinStorageDs(skin.id)
17819
17552
  }));
17820
- var PHASE1_SKIN_IDS = [...SHADCN_PRESET_IDS];
17821
- var INTAKE_SCRATCH_SKIN_IDS = [...SHADCN_PRESET_IDS];
17822
- var BUILDER_SKINS = SHADCN_PRESET_IDS.map((id) => {
17553
+ var PHASE1_SKIN_IDS = [...PRESET_SKIN_IDS];
17554
+ var INTAKE_SCRATCH_SKIN_IDS = [...PRESET_SKIN_IDS];
17555
+ var BUILDER_SKINS = PRESET_SKIN_IDS.map((id) => {
17823
17556
  const row = BUILTIN_SKINS.find((s) => s.id === id);
17824
17557
  if (!row) throw new Error(`Missing shadcn preset skin: ${id}`);
17825
17558
  return __spreadProps(__spreadValues({}, row), { libraryConfig: migrateLegacySkinId(id) });
@@ -18451,71 +18184,6 @@ function SiteSurface({
18451
18184
  ] });
18452
18185
  }
18453
18186
 
18454
- // src/lib/componentLibrary/shuffleLibraryConfig.ts
18455
- var BASE_COLOR_NAMES = ShadcnBaseColorSchema.options;
18456
-
18457
- // src/lib/designSystems.ts
18458
- var import_database2 = require("firebase/database");
18459
-
18460
- // src/lib/firebase.ts
18461
- var import_app = require("firebase/app");
18462
- var import_database = require("firebase/database");
18463
- var import_auth = require("firebase/auth");
18464
- var import_storage = require("firebase/storage");
18465
- var firebaseConfig = {
18466
- apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
18467
- authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,
18468
- databaseURL: process.env.NEXT_PUBLIC_FIREBASE_DATABASE_URL,
18469
- projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
18470
- storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET,
18471
- messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
18472
- appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID
18473
- };
18474
- var isFirebaseConfigured = firebaseConfig.apiKey && firebaseConfig.projectId && firebaseConfig.databaseURL;
18475
- var database = null;
18476
- var auth = null;
18477
- var storage = null;
18478
- var app = null;
18479
- if (isFirebaseConfigured) {
18480
- try {
18481
- app = (0, import_app.getApps)().length === 0 ? (0, import_app.initializeApp)(firebaseConfig) : (0, import_app.getApps)()[0];
18482
- database = (0, import_database.getDatabase)(app);
18483
- auth = (0, import_auth.getAuth)(app);
18484
- storage = (0, import_storage.getStorage)(app);
18485
- const dbEmulatorHost = process.env.NEXT_PUBLIC_FIREBASE_DATABASE_EMULATOR_HOST;
18486
- if (dbEmulatorHost && typeof window !== "undefined") {
18487
- const [host, portStr] = dbEmulatorHost.split(":");
18488
- (0, import_database.connectDatabaseEmulator)(database, host, parseInt(portStr, 10));
18489
- }
18490
- } catch (error48) {
18491
- console.warn("Firebase initialization failed:", error48);
18492
- }
18493
- }
18494
- var googleProvider = new import_auth.GoogleAuthProvider();
18495
- if (isFirebaseConfigured) {
18496
- googleProvider.setCustomParameters({
18497
- prompt: "select_account"
18498
- });
18499
- }
18500
- if (typeof window !== "undefined") {
18501
- const originalWarn = console.warn;
18502
- console.warn = (...args) => {
18503
- if (String(args[0]).includes("Firebase")) {
18504
- return;
18505
- }
18506
- originalWarn(...args);
18507
- };
18508
- }
18509
-
18510
- // src/lib/componentLibrary/resolveDesignSystemSkin.ts
18511
- function compiledSkinFromSiteSkinId(skinId) {
18512
- return compileComponentLibraryConfig(migrateLegacySkinId(skinId));
18513
- }
18514
- function compiledSkinFromLegacyPresetSkinId(skinId) {
18515
- if (!isLegacyShadcnPresetSkinId(skinId)) return void 0;
18516
- return compiledSkinFromSiteSkinId(skinId);
18517
- }
18518
-
18519
18187
  // src/components/site/SiteButton.tsx
18520
18188
  var import_react3 = require("react");
18521
18189
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -18523,7 +18191,7 @@ function variantClass(variant) {
18523
18191
  return variant === "primary" ? "site-btn-primary" : "site-btn-secondary";
18524
18192
  }
18525
18193
  var SiteButton = (0, import_react3.forwardRef)(
18526
- function SiteButton2(_a3, ref2) {
18194
+ function SiteButton2(_a3, ref) {
18527
18195
  var _b = _a3, { variant = "primary", href, className, children } = _b, rest = __objRest(_b, ["variant", "href", "className", "children"]);
18528
18196
  var _a4;
18529
18197
  const { buttonRecipe } = useSiteStructural();
@@ -18535,7 +18203,7 @@ var SiteButton = (0, import_react3.forwardRef)(
18535
18203
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
18536
18204
  "a",
18537
18205
  __spreadProps(__spreadValues({
18538
- ref: ref2,
18206
+ ref,
18539
18207
  href,
18540
18208
  className: classes,
18541
18209
  "data-density": density
@@ -18548,7 +18216,7 @@ var SiteButton = (0, import_react3.forwardRef)(
18548
18216
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
18549
18217
  "button",
18550
18218
  __spreadProps(__spreadValues({
18551
- ref: ref2,
18219
+ ref,
18552
18220
  type: (_a4 = buttonProps.type) != null ? _a4 : "button",
18553
18221
  className: classes,
18554
18222
  "data-density": density
@@ -24335,13 +24003,13 @@ function NumberTicker(_a3) {
24335
24003
  "className",
24336
24004
  "decimalPlaces"
24337
24005
  ]);
24338
- const ref2 = (0, import_react10.useRef)(null);
24006
+ const ref = (0, import_react10.useRef)(null);
24339
24007
  const motionValue = (0, import_react11.useMotionValue)(direction === "down" ? value : startValue);
24340
24008
  const springValue = (0, import_react11.useSpring)(motionValue, {
24341
24009
  damping: 60,
24342
24010
  stiffness: 100
24343
24011
  });
24344
- const isInView = (0, import_react11.useInView)(ref2, { once: true, margin: "0px" });
24012
+ const isInView = (0, import_react11.useInView)(ref, { once: true, margin: "0px" });
24345
24013
  (0, import_react10.useEffect)(() => {
24346
24014
  let timer = null;
24347
24015
  if (isInView) {
@@ -24357,8 +24025,8 @@ function NumberTicker(_a3) {
24357
24025
  }, [motionValue, isInView, delay, value, direction, startValue]);
24358
24026
  (0, import_react10.useEffect)(
24359
24027
  () => springValue.on("change", (latest) => {
24360
- if (ref2.current) {
24361
- ref2.current.textContent = Intl.NumberFormat("en-US", {
24028
+ if (ref.current) {
24029
+ ref.current.textContent = Intl.NumberFormat("en-US", {
24362
24030
  minimumFractionDigits: decimalPlaces,
24363
24031
  maximumFractionDigits: decimalPlaces
24364
24032
  }).format(Number(latest.toFixed(decimalPlaces)));
@@ -24369,7 +24037,7 @@ function NumberTicker(_a3) {
24369
24037
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
24370
24038
  "span",
24371
24039
  __spreadProps(__spreadValues({
24372
- ref: ref2,
24040
+ ref,
24373
24041
  className: cn(
24374
24042
  "inline-block tracking-wider text-black tabular-nums dark:text-white",
24375
24043
  className
@@ -25290,12 +24958,11 @@ function resolveInstanceCopy(siteCopy, instanceId, sectionId, skinId = DEFAULT_S
25290
24958
 
25291
24959
  // src/lib/render/SiteRenderer.tsx
25292
24960
  var import_jsx_runtime68 = require("react/jsx-runtime");
25293
- function SiteRenderer({ site, registry: registry2, scope }) {
24961
+ function SiteRenderer({ site, registry: registry2, scope, compiledSkin }) {
25294
24962
  var _a3;
25295
24963
  const skinId = resolveSkinId(site);
25296
24964
  const surfaceScope = scope != null ? scope : site.slug;
25297
24965
  const dsOverrides = getSkinOverrides(skinId, (_a3 = site.ds) != null ? _a3 : {});
25298
- const compiledSkin = compiledSkinFromLegacyPresetSkinId(skinId);
25299
24966
  function renderNode(inst) {
25300
24967
  if (inst.hidden) return null;
25301
24968
  const Component43 = registry2[inst.id];
@@ -25331,14 +24998,18 @@ function SiteRenderer({ site, registry: registry2, scope }) {
25331
24998
  // src/lib/render/renderSiteToHtml.tsx
25332
24999
  var import_server = require("react-dom/server");
25333
25000
  var import_jsx_runtime69 = require("react/jsx-runtime");
25334
- function renderSiteToHtml(site, registry2, scope) {
25001
+ function renderSiteToHtml(site, registry2, scope, compiledSkin) {
25335
25002
  return (0, import_server.renderToStaticMarkup)(
25336
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SiteRenderer, { site, registry: registry2, scope })
25003
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SiteRenderer, { site, registry: registry2, scope, compiledSkin })
25337
25004
  );
25338
25005
  }
25339
25006
  // Annotate the CommonJS export names for ESM import in node:
25340
25007
  0 && (module.exports = {
25008
+ PRESET_SKIN_IDS,
25341
25009
  SiteRenderer,
25342
- renderSiteToHtml
25010
+ getAdaptiveSkin,
25011
+ isRegisteredSkinId,
25012
+ renderSiteToHtml,
25013
+ resolveSkinId
25343
25014
  });
25344
25015
  //# sourceMappingURL=index.cjs.map