pixelplay 1.1.4 → 1.2.1

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/server.mjs CHANGED
@@ -655,6 +655,7 @@ var rosewoodTheme = {
655
655
  label: "Rosewood",
656
656
  description: "Elegant fashion & retail",
657
657
  swatch: colors.rose[200],
658
+ personality: "soft",
658
659
  light: rosewoodLightTheme,
659
660
  dark: rosewoodDarkTheme,
660
661
  globals: {
@@ -697,7 +698,20 @@ var rosewoodTheme = {
697
698
  "--shadow-md": "0 4px 16px -2px rgba(68,44,46,0.06)",
698
699
  "--shadow-lg": "0 8px 28px -4px rgba(68,44,46,0.06)",
699
700
  "--shadow-xl": "0 16px 44px -6px rgba(68,44,46,0.06)",
700
- "--shadow-2xl": "0 24px 60px -8px rgba(68,44,46,0.06)"
701
+ "--shadow-2xl": "0 24px 60px -8px rgba(68,44,46,0.06)",
702
+ // ── Spacing tokens ──
703
+ "--spacing-page-x": "1rem",
704
+ "--spacing-page-y": "1.5rem",
705
+ "--spacing-card-x": "1.25rem",
706
+ "--spacing-card-y": "1rem",
707
+ "--spacing-section-gap": "1.5rem",
708
+ "--spacing-row-gap": "1rem",
709
+ "--spacing-col-gap": "1rem",
710
+ "--spacing-header-h": "3.5rem",
711
+ "--spacing-sidebar-w": "17.25rem",
712
+ "--spacing-filter-bar-x": "1rem",
713
+ "--spacing-filter-bar-y": "0.75rem",
714
+ "--spacing-aside-w": "20rem"
701
715
  }
702
716
  };
703
717
 
@@ -936,6 +950,7 @@ var botanicaTheme = {
936
950
  label: "Botanica",
937
951
  description: "Nature-inspired cooking & lifestyle",
938
952
  swatch: colors.emerald[700],
953
+ personality: "balanced",
939
954
  light: botanicaLightTheme,
940
955
  dark: botanicaDarkTheme,
941
956
  globals: {
@@ -978,7 +993,20 @@ var botanicaTheme = {
978
993
  "--shadow-md": "0 3px 10px -2px rgba(26,58,42,0.10)",
979
994
  "--shadow-lg": "0 6px 20px -4px rgba(26,58,42,0.12)",
980
995
  "--shadow-xl": "0 12px 32px -6px rgba(26,58,42,0.12)",
981
- "--shadow-2xl": "0 20px 48px -8px rgba(26,58,42,0.14)"
996
+ "--shadow-2xl": "0 20px 48px -8px rgba(26,58,42,0.14)",
997
+ // ── Spacing tokens ──
998
+ "--spacing-page-x": "1rem",
999
+ "--spacing-page-y": "1.5rem",
1000
+ "--spacing-card-x": "1.5rem",
1001
+ "--spacing-card-y": "1.25rem",
1002
+ "--spacing-section-gap": "1.5rem",
1003
+ "--spacing-row-gap": "1rem",
1004
+ "--spacing-col-gap": "1rem",
1005
+ "--spacing-header-h": "3.5rem",
1006
+ "--spacing-sidebar-w": "17.25rem",
1007
+ "--spacing-filter-bar-x": "1rem",
1008
+ "--spacing-filter-bar-y": "0.75rem",
1009
+ "--spacing-aside-w": "20rem"
982
1010
  }
983
1011
  };
984
1012
 
@@ -1217,6 +1245,7 @@ var inkwellTheme = {
1217
1245
  label: "Inkwell",
1218
1246
  description: "Bold editorial & news",
1219
1247
  swatch: colors.violet[600],
1248
+ personality: "sharp",
1220
1249
  light: inkwellLightTheme,
1221
1250
  dark: inkwellDarkTheme,
1222
1251
  globals: {
@@ -1259,7 +1288,20 @@ var inkwellTheme = {
1259
1288
  "--shadow-md": "0 2px 6px -1px rgba(0,0,0,0.20)",
1260
1289
  "--shadow-lg": "0 4px 12px -2px rgba(0,0,0,0.22)",
1261
1290
  "--shadow-xl": "0 8px 24px -4px rgba(0,0,0,0.22)",
1262
- "--shadow-2xl": "0 12px 36px -6px rgba(0,0,0,0.24)"
1291
+ "--shadow-2xl": "0 12px 36px -6px rgba(0,0,0,0.24)",
1292
+ // ── Spacing tokens ──
1293
+ "--spacing-page-x": "1rem",
1294
+ "--spacing-page-y": "1.5rem",
1295
+ "--spacing-card-x": "1.25rem",
1296
+ "--spacing-card-y": "1rem",
1297
+ "--spacing-section-gap": "1.5rem",
1298
+ "--spacing-row-gap": "1rem",
1299
+ "--spacing-col-gap": "1rem",
1300
+ "--spacing-header-h": "3.5rem",
1301
+ "--spacing-sidebar-w": "17.25rem",
1302
+ "--spacing-filter-bar-x": "1rem",
1303
+ "--spacing-filter-bar-y": "0.75rem",
1304
+ "--spacing-aside-w": "20rem"
1263
1305
  }
1264
1306
  };
1265
1307
 
@@ -1558,26 +1600,13 @@ async function initPixelPlay(options) {
1558
1600
  if (initialised) return;
1559
1601
  initialised = true;
1560
1602
  const key = options == null ? void 0 : options.licenseKey;
1561
- const isProduction = process.env.NODE_ENV === "production";
1562
1603
  if (!key) {
1563
- if (isProduction) {
1564
- throw new Error(
1565
- "\n\n\u{1F6AB} PixelPlay UI \u2014 Build failed: No license key provided.\n Set PIXELPLAY_LICENSE_KEY in your environment variables.\n Purchase a license at https://dennisisaac.com/ui-kit/pricing\n"
1566
- );
1567
- }
1568
- console.warn(
1569
- "\n\u26A0\uFE0F PixelPlay UI \u2014 No license key provided.\n Components will work in development, but production builds require a valid key.\n Purchase a license at https://dennisisaac.com/ui-kit/pricing\n"
1570
- );
1571
- return;
1572
- }
1573
- if (!isProduction) {
1574
- validateKey(key, false).catch(() => {
1575
- });
1576
1604
  return;
1577
1605
  }
1578
- await validateKey(key, true);
1606
+ validateKey(key).catch(() => {
1607
+ });
1579
1608
  }
1580
- async function validateKey(key, throwOnError) {
1609
+ async function validateKey(key) {
1581
1610
  try {
1582
1611
  const res = await fetch(VALIDATE_URL, {
1583
1612
  method: "POST",
@@ -1588,29 +1617,20 @@ async function validateKey(key, throwOnError) {
1588
1617
  })
1589
1618
  });
1590
1619
  if (!res.ok) {
1591
- const status = res.status;
1592
- if (status === 404 || status === 422) {
1593
- const msg = "\n\u{1F6AB} PixelPlay UI \u2014 Invalid license key.\n The provided PIXELPLAY_LICENSE_KEY could not be validated.\n Please check your key or purchase a license at\n https://dennisisaac.com/ui-kit/pricing\n";
1594
- if (throwOnError) throw new Error(msg);
1595
- console.warn("\u26A0\uFE0F " + msg);
1596
- return;
1620
+ if (res.status === 404 || res.status === 422) {
1621
+ console.info(
1622
+ "[PixelPlay] License key could not be validated. Components will still work normally."
1623
+ );
1597
1624
  }
1598
1625
  return;
1599
1626
  }
1600
1627
  const data = await res.json();
1601
1628
  if (data.status === "revoked" || data.status === "disabled") {
1602
- const msg = `
1603
- \u{1F6AB} PixelPlay UI \u2014 License key has been ${data.status}.
1604
- Please contact support or purchase a new license at
1605
- https://dennisisaac.com/ui-kit/pricing
1606
- `;
1607
- if (throwOnError) throw new Error(msg);
1608
- console.warn("\u26A0\uFE0F " + msg);
1609
- }
1610
- } catch (err) {
1611
- if (err instanceof Error && err.message.includes("PixelPlay UI")) {
1612
- throw err;
1629
+ console.info(
1630
+ `[PixelPlay] License key has been ${data.status}. Components will still work normally.`
1631
+ );
1613
1632
  }
1633
+ } catch (e) {
1614
1634
  }
1615
1635
  }
1616
1636
  export {