pixelplay 1.2.0 → 1.2.2
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/CHANGELOG.md +196 -1
- package/dist/index.d.mts +25 -11
- package/dist/index.d.ts +25 -11
- package/dist/index.js +8960 -5095
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8974 -5103
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +9 -12
- package/dist/server.d.ts +9 -12
- package/dist/server.js +140 -120
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +140 -120
- package/dist/server.mjs.map +1 -1
- package/dist/styles.css +260 -164
- package/package.json +1 -1
package/dist/server.d.mts
CHANGED
|
@@ -184,6 +184,7 @@ type ThemeTokens = {
|
|
|
184
184
|
};
|
|
185
185
|
declare const lightTheme: ThemeTokens;
|
|
186
186
|
declare const darkTheme: ThemeTokens;
|
|
187
|
+
|
|
187
188
|
/**
|
|
188
189
|
* Generates a `<style>` block with CSS custom properties for every design
|
|
189
190
|
* theme × light/dark mode. The first theme (inkwell) is output as `:root` / `.dark`.
|
|
@@ -193,30 +194,26 @@ declare const darkTheme: ThemeTokens;
|
|
|
193
194
|
declare function generateThemeCSS(): string;
|
|
194
195
|
|
|
195
196
|
/**
|
|
196
|
-
* PixelPlay UI
|
|
197
|
-
*
|
|
198
|
-
* Behaviour:
|
|
199
|
-
* - Development (`next dev`): console warning if no key, components work fine.
|
|
200
|
-
* - Production build (`next build`): validates key against Polar API.
|
|
201
|
-
* Build fails if the key is missing, invalid, or revoked.
|
|
197
|
+
* PixelPlay UI - License validation (optional).
|
|
202
198
|
*
|
|
203
|
-
*
|
|
199
|
+
* The npm package is free to use. License keys are optional and used
|
|
200
|
+
* for analytics/support tracking only. Builds never fail due to missing keys.
|
|
204
201
|
*/
|
|
205
202
|
interface InitOptions {
|
|
206
|
-
/**
|
|
203
|
+
/** Optional license key for analytics/support tracking */
|
|
207
204
|
licenseKey?: string;
|
|
208
205
|
}
|
|
209
206
|
/**
|
|
210
|
-
* Initialise PixelPlay
|
|
207
|
+
* Initialise PixelPlay (optional).
|
|
211
208
|
*
|
|
212
|
-
* Call this once at the top of your root layout
|
|
209
|
+
* Call this once at the top of your root layout if you want to register
|
|
210
|
+
* your license key for support tracking:
|
|
213
211
|
* ```ts
|
|
214
212
|
* import { initPixelPlay } from "pixelplay/server";
|
|
215
213
|
* initPixelPlay({ licenseKey: process.env.PIXELPLAY_LICENSE_KEY });
|
|
216
214
|
* ```
|
|
217
215
|
*
|
|
218
|
-
*
|
|
219
|
-
* In production builds: validates the key and fails the build if invalid.
|
|
216
|
+
* Without a key, components work normally in all environments.
|
|
220
217
|
*/
|
|
221
218
|
declare function initPixelPlay(options?: InitOptions): Promise<void>;
|
|
222
219
|
|
package/dist/server.d.ts
CHANGED
|
@@ -184,6 +184,7 @@ type ThemeTokens = {
|
|
|
184
184
|
};
|
|
185
185
|
declare const lightTheme: ThemeTokens;
|
|
186
186
|
declare const darkTheme: ThemeTokens;
|
|
187
|
+
|
|
187
188
|
/**
|
|
188
189
|
* Generates a `<style>` block with CSS custom properties for every design
|
|
189
190
|
* theme × light/dark mode. The first theme (inkwell) is output as `:root` / `.dark`.
|
|
@@ -193,30 +194,26 @@ declare const darkTheme: ThemeTokens;
|
|
|
193
194
|
declare function generateThemeCSS(): string;
|
|
194
195
|
|
|
195
196
|
/**
|
|
196
|
-
* PixelPlay UI
|
|
197
|
-
*
|
|
198
|
-
* Behaviour:
|
|
199
|
-
* - Development (`next dev`): console warning if no key, components work fine.
|
|
200
|
-
* - Production build (`next build`): validates key against Polar API.
|
|
201
|
-
* Build fails if the key is missing, invalid, or revoked.
|
|
197
|
+
* PixelPlay UI - License validation (optional).
|
|
202
198
|
*
|
|
203
|
-
*
|
|
199
|
+
* The npm package is free to use. License keys are optional and used
|
|
200
|
+
* for analytics/support tracking only. Builds never fail due to missing keys.
|
|
204
201
|
*/
|
|
205
202
|
interface InitOptions {
|
|
206
|
-
/**
|
|
203
|
+
/** Optional license key for analytics/support tracking */
|
|
207
204
|
licenseKey?: string;
|
|
208
205
|
}
|
|
209
206
|
/**
|
|
210
|
-
* Initialise PixelPlay
|
|
207
|
+
* Initialise PixelPlay (optional).
|
|
211
208
|
*
|
|
212
|
-
* Call this once at the top of your root layout
|
|
209
|
+
* Call this once at the top of your root layout if you want to register
|
|
210
|
+
* your license key for support tracking:
|
|
213
211
|
* ```ts
|
|
214
212
|
* import { initPixelPlay } from "pixelplay/server";
|
|
215
213
|
* initPixelPlay({ licenseKey: process.env.PIXELPLAY_LICENSE_KEY });
|
|
216
214
|
* ```
|
|
217
215
|
*
|
|
218
|
-
*
|
|
219
|
-
* In production builds: validates the key and fails the build if invalid.
|
|
216
|
+
* Without a key, components work normally in all environments.
|
|
220
217
|
*/
|
|
221
218
|
declare function initPixelPlay(options?: InitOptions): Promise<void>;
|
|
222
219
|
|
package/dist/server.js
CHANGED
|
@@ -43,10 +43,10 @@ var colors = {
|
|
|
43
43
|
500: "#9E77ED",
|
|
44
44
|
600: "#7F56D9",
|
|
45
45
|
700: "#6941C6",
|
|
46
|
-
800: "#
|
|
47
|
-
900: "#
|
|
48
|
-
950: "#
|
|
49
|
-
975: "#
|
|
46
|
+
800: "#42307D",
|
|
47
|
+
900: "#26145A",
|
|
48
|
+
950: "#160C34",
|
|
49
|
+
975: "#0B061A"
|
|
50
50
|
},
|
|
51
51
|
error: {
|
|
52
52
|
25: "#FFFBFA",
|
|
@@ -58,10 +58,10 @@ var colors = {
|
|
|
58
58
|
500: "#F04438",
|
|
59
59
|
600: "#D92D20",
|
|
60
60
|
700: "#B42318",
|
|
61
|
-
800: "#
|
|
62
|
-
900: "#
|
|
63
|
-
950: "#
|
|
64
|
-
975: "#
|
|
61
|
+
800: "#7A271A",
|
|
62
|
+
900: "#4C1108",
|
|
63
|
+
950: "#2B0904",
|
|
64
|
+
975: "#160502"
|
|
65
65
|
},
|
|
66
66
|
warning: {
|
|
67
67
|
25: "#FFFCF5",
|
|
@@ -73,10 +73,10 @@ var colors = {
|
|
|
73
73
|
500: "#F79009",
|
|
74
74
|
600: "#DC6803",
|
|
75
75
|
700: "#B54708",
|
|
76
|
-
800: "#
|
|
77
|
-
900: "#
|
|
78
|
-
950: "#
|
|
79
|
-
975: "#
|
|
76
|
+
800: "#7A2E0E",
|
|
77
|
+
900: "#491A06",
|
|
78
|
+
950: "#291003",
|
|
79
|
+
975: "#150802"
|
|
80
80
|
},
|
|
81
81
|
success: {
|
|
82
82
|
25: "#F6FEF9",
|
|
@@ -88,10 +88,10 @@ var colors = {
|
|
|
88
88
|
500: "#12B76A",
|
|
89
89
|
600: "#039855",
|
|
90
90
|
700: "#027A48",
|
|
91
|
-
800: "#
|
|
92
|
-
900: "#
|
|
93
|
-
950: "#
|
|
94
|
-
975: "#
|
|
91
|
+
800: "#054F31",
|
|
92
|
+
900: "#03301E",
|
|
93
|
+
950: "#021C11",
|
|
94
|
+
975: "#010E09"
|
|
95
95
|
},
|
|
96
96
|
// ── Neutrals ──────────────────────────────────────────────────────────────
|
|
97
97
|
gray: {
|
|
@@ -165,10 +165,10 @@ var colors = {
|
|
|
165
165
|
500: "#EF4444",
|
|
166
166
|
600: "#DC2626",
|
|
167
167
|
700: "#B91C1C",
|
|
168
|
-
800: "#
|
|
169
|
-
900: "#
|
|
170
|
-
950: "#
|
|
171
|
-
975: "#
|
|
168
|
+
800: "#7F1D1D",
|
|
169
|
+
900: "#4C1111",
|
|
170
|
+
950: "#2B0909",
|
|
171
|
+
975: "#160505"
|
|
172
172
|
},
|
|
173
173
|
orange: {
|
|
174
174
|
25: "#FFFAF5",
|
|
@@ -180,10 +180,10 @@ var colors = {
|
|
|
180
180
|
500: "#FB6514",
|
|
181
181
|
600: "#EC4A0A",
|
|
182
182
|
700: "#C4320A",
|
|
183
|
-
800: "#
|
|
184
|
-
900: "#
|
|
185
|
-
950: "#
|
|
186
|
-
975: "#
|
|
183
|
+
800: "#7E2410",
|
|
184
|
+
900: "#4C1509",
|
|
185
|
+
950: "#2B0C05",
|
|
186
|
+
975: "#160603"
|
|
187
187
|
},
|
|
188
188
|
amber: {
|
|
189
189
|
25: "#FFFDF5",
|
|
@@ -195,10 +195,10 @@ var colors = {
|
|
|
195
195
|
500: "#F59E0B",
|
|
196
196
|
600: "#D97706",
|
|
197
197
|
700: "#B45309",
|
|
198
|
-
800: "#
|
|
199
|
-
900: "#
|
|
200
|
-
950: "#
|
|
201
|
-
975: "#
|
|
198
|
+
800: "#78350F",
|
|
199
|
+
900: "#471E07",
|
|
200
|
+
950: "#280F03",
|
|
201
|
+
975: "#140802"
|
|
202
202
|
},
|
|
203
203
|
yellow: {
|
|
204
204
|
25: "#FEFEF2",
|
|
@@ -210,10 +210,10 @@ var colors = {
|
|
|
210
210
|
500: "#EAB308",
|
|
211
211
|
600: "#CA8A04",
|
|
212
212
|
700: "#A16207",
|
|
213
|
-
800: "#
|
|
214
|
-
900: "#
|
|
215
|
-
950: "#
|
|
216
|
-
975: "#
|
|
213
|
+
800: "#713F12",
|
|
214
|
+
900: "#44250A",
|
|
215
|
+
950: "#261505",
|
|
216
|
+
975: "#130B03"
|
|
217
217
|
},
|
|
218
218
|
// ── Greens ────────────────────────────────────────────────────────────────
|
|
219
219
|
lime: {
|
|
@@ -226,10 +226,10 @@ var colors = {
|
|
|
226
226
|
500: "#84CC16",
|
|
227
227
|
600: "#65A30D",
|
|
228
228
|
700: "#4D7C0F",
|
|
229
|
-
800: "#
|
|
230
|
-
900: "#
|
|
231
|
-
950: "#
|
|
232
|
-
975: "#
|
|
229
|
+
800: "#365314",
|
|
230
|
+
900: "#20320C",
|
|
231
|
+
950: "#121C06",
|
|
232
|
+
975: "#090E03"
|
|
233
233
|
},
|
|
234
234
|
green: {
|
|
235
235
|
25: "#F2FDF5",
|
|
@@ -241,10 +241,10 @@ var colors = {
|
|
|
241
241
|
500: "#22C55E",
|
|
242
242
|
600: "#16A34A",
|
|
243
243
|
700: "#15803D",
|
|
244
|
-
800: "#
|
|
245
|
-
900: "#
|
|
246
|
-
950: "#
|
|
247
|
-
975: "#
|
|
244
|
+
800: "#14532D",
|
|
245
|
+
900: "#0C321B",
|
|
246
|
+
950: "#061C0F",
|
|
247
|
+
975: "#030E08"
|
|
248
248
|
},
|
|
249
249
|
emerald: {
|
|
250
250
|
25: "#F3FDF8",
|
|
@@ -256,10 +256,10 @@ var colors = {
|
|
|
256
256
|
500: "#10B981",
|
|
257
257
|
600: "#059669",
|
|
258
258
|
700: "#047857",
|
|
259
|
-
800: "#
|
|
260
|
-
900: "#
|
|
261
|
-
950: "#
|
|
262
|
-
975: "#
|
|
259
|
+
800: "#064E3B",
|
|
260
|
+
900: "#032F23",
|
|
261
|
+
950: "#021A13",
|
|
262
|
+
975: "#010D0A"
|
|
263
263
|
},
|
|
264
264
|
teal: {
|
|
265
265
|
25: "#F0FCFB",
|
|
@@ -271,10 +271,10 @@ var colors = {
|
|
|
271
271
|
500: "#14B8A6",
|
|
272
272
|
600: "#0D9488",
|
|
273
273
|
700: "#0F766E",
|
|
274
|
-
800: "#
|
|
275
|
-
900: "#
|
|
276
|
-
950: "#
|
|
277
|
-
975: "#
|
|
274
|
+
800: "#134E4A",
|
|
275
|
+
900: "#0A302E",
|
|
276
|
+
950: "#061C1A",
|
|
277
|
+
975: "#030E0D"
|
|
278
278
|
},
|
|
279
279
|
// ── Blues ─────────────────────────────────────────────────────────────────
|
|
280
280
|
cyan: {
|
|
@@ -287,10 +287,10 @@ var colors = {
|
|
|
287
287
|
500: "#06B6D4",
|
|
288
288
|
600: "#0891B2",
|
|
289
289
|
700: "#0E7490",
|
|
290
|
-
800: "#
|
|
291
|
-
900: "#
|
|
292
|
-
950: "#
|
|
293
|
-
975: "#
|
|
290
|
+
800: "#164E63",
|
|
291
|
+
900: "#0C2F3C",
|
|
292
|
+
950: "#071A22",
|
|
293
|
+
975: "#040D11"
|
|
294
294
|
},
|
|
295
295
|
blueLight: {
|
|
296
296
|
25: "#F5FBFF",
|
|
@@ -302,10 +302,10 @@ var colors = {
|
|
|
302
302
|
500: "#0BA5EC",
|
|
303
303
|
600: "#0086C9",
|
|
304
304
|
700: "#026AA2",
|
|
305
|
-
800: "#
|
|
306
|
-
900: "#
|
|
307
|
-
950: "#
|
|
308
|
-
975: "#
|
|
305
|
+
800: "#0B4A6F",
|
|
306
|
+
900: "#062C43",
|
|
307
|
+
950: "#031826",
|
|
308
|
+
975: "#020C13"
|
|
309
309
|
},
|
|
310
310
|
blue: {
|
|
311
311
|
25: "#F5FAFF",
|
|
@@ -317,10 +317,10 @@ var colors = {
|
|
|
317
317
|
500: "#2E90FA",
|
|
318
318
|
600: "#1570EF",
|
|
319
319
|
700: "#175CD3",
|
|
320
|
-
800: "#
|
|
321
|
-
900: "#
|
|
322
|
-
950: "#
|
|
323
|
-
975: "#
|
|
320
|
+
800: "#194185",
|
|
321
|
+
900: "#0E2669",
|
|
322
|
+
950: "#08153B",
|
|
323
|
+
975: "#040B1E"
|
|
324
324
|
},
|
|
325
325
|
blueGray: {
|
|
326
326
|
25: "#FCFCFD",
|
|
@@ -348,10 +348,10 @@ var colors = {
|
|
|
348
348
|
500: "#6172F3",
|
|
349
349
|
600: "#444CE7",
|
|
350
350
|
700: "#3538CD",
|
|
351
|
-
800: "#
|
|
352
|
-
900: "#
|
|
353
|
-
950: "#
|
|
354
|
-
975: "#
|
|
351
|
+
800: "#2D3282",
|
|
352
|
+
900: "#1B1F52",
|
|
353
|
+
950: "#10122F",
|
|
354
|
+
975: "#080918"
|
|
355
355
|
},
|
|
356
356
|
violet: {
|
|
357
357
|
25: "#FAFAFF",
|
|
@@ -363,10 +363,10 @@ var colors = {
|
|
|
363
363
|
500: "#8B5CF6",
|
|
364
364
|
600: "#7C3AED",
|
|
365
365
|
700: "#6D28D9",
|
|
366
|
-
800: "#
|
|
367
|
-
900: "#
|
|
368
|
-
950: "#
|
|
369
|
-
975: "#
|
|
366
|
+
800: "#4C1D95",
|
|
367
|
+
900: "#2D1159",
|
|
368
|
+
950: "#190932",
|
|
369
|
+
975: "#0D0519"
|
|
370
370
|
},
|
|
371
371
|
purple: {
|
|
372
372
|
25: "#FAFAFF",
|
|
@@ -378,10 +378,10 @@ var colors = {
|
|
|
378
378
|
500: "#7A5AF8",
|
|
379
379
|
600: "#6938EF",
|
|
380
380
|
700: "#5925DC",
|
|
381
|
-
800: "#
|
|
382
|
-
900: "#
|
|
383
|
-
950: "#
|
|
384
|
-
975: "#
|
|
381
|
+
800: "#3E1C96",
|
|
382
|
+
900: "#25105A",
|
|
383
|
+
950: "#140932",
|
|
384
|
+
975: "#0A0519"
|
|
385
385
|
},
|
|
386
386
|
fuchsia: {
|
|
387
387
|
25: "#FEF8FF",
|
|
@@ -393,10 +393,10 @@ var colors = {
|
|
|
393
393
|
500: "#D946EF",
|
|
394
394
|
600: "#C026D3",
|
|
395
395
|
700: "#A21CAF",
|
|
396
|
-
800: "#
|
|
397
|
-
900: "#
|
|
398
|
-
950: "#
|
|
399
|
-
975: "#
|
|
396
|
+
800: "#701A75",
|
|
397
|
+
900: "#430F46",
|
|
398
|
+
950: "#250827",
|
|
399
|
+
975: "#130414"
|
|
400
400
|
},
|
|
401
401
|
pink: {
|
|
402
402
|
25: "#FEF6FB",
|
|
@@ -408,10 +408,10 @@ var colors = {
|
|
|
408
408
|
500: "#EE46BC",
|
|
409
409
|
600: "#DD2590",
|
|
410
410
|
700: "#C11574",
|
|
411
|
-
800: "#
|
|
412
|
-
900: "#
|
|
413
|
-
950: "#
|
|
414
|
-
975: "#
|
|
411
|
+
800: "#851651",
|
|
412
|
+
900: "#4F0C30",
|
|
413
|
+
950: "#2C071A",
|
|
414
|
+
975: "#16040D"
|
|
415
415
|
},
|
|
416
416
|
rose: {
|
|
417
417
|
25: "#FFF5F6",
|
|
@@ -423,10 +423,10 @@ var colors = {
|
|
|
423
423
|
500: "#F63D68",
|
|
424
424
|
600: "#E31B54",
|
|
425
425
|
700: "#C01048",
|
|
426
|
-
800: "#
|
|
427
|
-
900: "#
|
|
428
|
-
950: "#
|
|
429
|
-
975: "#
|
|
426
|
+
800: "#89123E",
|
|
427
|
+
900: "#520A25",
|
|
428
|
+
950: "#2E0514",
|
|
429
|
+
975: "#17030A"
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
432
|
var textScale = {
|
|
@@ -684,6 +684,7 @@ var rosewoodTheme = {
|
|
|
684
684
|
label: "Rosewood",
|
|
685
685
|
description: "Elegant fashion & retail",
|
|
686
686
|
swatch: colors.rose[200],
|
|
687
|
+
personality: "soft",
|
|
687
688
|
light: rosewoodLightTheme,
|
|
688
689
|
dark: rosewoodDarkTheme,
|
|
689
690
|
globals: {
|
|
@@ -726,7 +727,20 @@ var rosewoodTheme = {
|
|
|
726
727
|
"--shadow-md": "0 4px 16px -2px rgba(68,44,46,0.06)",
|
|
727
728
|
"--shadow-lg": "0 8px 28px -4px rgba(68,44,46,0.06)",
|
|
728
729
|
"--shadow-xl": "0 16px 44px -6px rgba(68,44,46,0.06)",
|
|
729
|
-
"--shadow-2xl": "0 24px 60px -8px rgba(68,44,46,0.06)"
|
|
730
|
+
"--shadow-2xl": "0 24px 60px -8px rgba(68,44,46,0.06)",
|
|
731
|
+
// ── Spacing tokens ──
|
|
732
|
+
"--spacing-page-x": "1rem",
|
|
733
|
+
"--spacing-page-y": "1.5rem",
|
|
734
|
+
"--spacing-card-x": "1.25rem",
|
|
735
|
+
"--spacing-card-y": "1rem",
|
|
736
|
+
"--spacing-section-gap": "1.5rem",
|
|
737
|
+
"--spacing-row-gap": "1rem",
|
|
738
|
+
"--spacing-col-gap": "1rem",
|
|
739
|
+
"--spacing-header-h": "3.5rem",
|
|
740
|
+
"--spacing-sidebar-w": "17.25rem",
|
|
741
|
+
"--spacing-filter-bar-x": "1rem",
|
|
742
|
+
"--spacing-filter-bar-y": "0.75rem",
|
|
743
|
+
"--spacing-aside-w": "20rem"
|
|
730
744
|
}
|
|
731
745
|
};
|
|
732
746
|
|
|
@@ -965,6 +979,7 @@ var botanicaTheme = {
|
|
|
965
979
|
label: "Botanica",
|
|
966
980
|
description: "Nature-inspired cooking & lifestyle",
|
|
967
981
|
swatch: colors.emerald[700],
|
|
982
|
+
personality: "balanced",
|
|
968
983
|
light: botanicaLightTheme,
|
|
969
984
|
dark: botanicaDarkTheme,
|
|
970
985
|
globals: {
|
|
@@ -1007,7 +1022,20 @@ var botanicaTheme = {
|
|
|
1007
1022
|
"--shadow-md": "0 3px 10px -2px rgba(26,58,42,0.10)",
|
|
1008
1023
|
"--shadow-lg": "0 6px 20px -4px rgba(26,58,42,0.12)",
|
|
1009
1024
|
"--shadow-xl": "0 12px 32px -6px rgba(26,58,42,0.12)",
|
|
1010
|
-
"--shadow-2xl": "0 20px 48px -8px rgba(26,58,42,0.14)"
|
|
1025
|
+
"--shadow-2xl": "0 20px 48px -8px rgba(26,58,42,0.14)",
|
|
1026
|
+
// ── Spacing tokens ──
|
|
1027
|
+
"--spacing-page-x": "1rem",
|
|
1028
|
+
"--spacing-page-y": "1.5rem",
|
|
1029
|
+
"--spacing-card-x": "1.5rem",
|
|
1030
|
+
"--spacing-card-y": "1.25rem",
|
|
1031
|
+
"--spacing-section-gap": "1.5rem",
|
|
1032
|
+
"--spacing-row-gap": "1rem",
|
|
1033
|
+
"--spacing-col-gap": "1rem",
|
|
1034
|
+
"--spacing-header-h": "3.5rem",
|
|
1035
|
+
"--spacing-sidebar-w": "17.25rem",
|
|
1036
|
+
"--spacing-filter-bar-x": "1rem",
|
|
1037
|
+
"--spacing-filter-bar-y": "0.75rem",
|
|
1038
|
+
"--spacing-aside-w": "20rem"
|
|
1011
1039
|
}
|
|
1012
1040
|
};
|
|
1013
1041
|
|
|
@@ -1246,6 +1274,7 @@ var inkwellTheme = {
|
|
|
1246
1274
|
label: "Inkwell",
|
|
1247
1275
|
description: "Bold editorial & news",
|
|
1248
1276
|
swatch: colors.violet[600],
|
|
1277
|
+
personality: "sharp",
|
|
1249
1278
|
light: inkwellLightTheme,
|
|
1250
1279
|
dark: inkwellDarkTheme,
|
|
1251
1280
|
globals: {
|
|
@@ -1288,7 +1317,20 @@ var inkwellTheme = {
|
|
|
1288
1317
|
"--shadow-md": "0 2px 6px -1px rgba(0,0,0,0.20)",
|
|
1289
1318
|
"--shadow-lg": "0 4px 12px -2px rgba(0,0,0,0.22)",
|
|
1290
1319
|
"--shadow-xl": "0 8px 24px -4px rgba(0,0,0,0.22)",
|
|
1291
|
-
"--shadow-2xl": "0 12px 36px -6px rgba(0,0,0,0.24)"
|
|
1320
|
+
"--shadow-2xl": "0 12px 36px -6px rgba(0,0,0,0.24)",
|
|
1321
|
+
// ── Spacing tokens ──
|
|
1322
|
+
"--spacing-page-x": "1rem",
|
|
1323
|
+
"--spacing-page-y": "1.5rem",
|
|
1324
|
+
"--spacing-card-x": "1.25rem",
|
|
1325
|
+
"--spacing-card-y": "1rem",
|
|
1326
|
+
"--spacing-section-gap": "1.5rem",
|
|
1327
|
+
"--spacing-row-gap": "1rem",
|
|
1328
|
+
"--spacing-col-gap": "1rem",
|
|
1329
|
+
"--spacing-header-h": "3.5rem",
|
|
1330
|
+
"--spacing-sidebar-w": "17.25rem",
|
|
1331
|
+
"--spacing-filter-bar-x": "1rem",
|
|
1332
|
+
"--spacing-filter-bar-y": "0.75rem",
|
|
1333
|
+
"--spacing-aside-w": "20rem"
|
|
1292
1334
|
}
|
|
1293
1335
|
};
|
|
1294
1336
|
|
|
@@ -1587,26 +1629,13 @@ async function initPixelPlay(options) {
|
|
|
1587
1629
|
if (initialised) return;
|
|
1588
1630
|
initialised = true;
|
|
1589
1631
|
const key = options == null ? void 0 : options.licenseKey;
|
|
1590
|
-
const isProduction = process.env.NODE_ENV === "production";
|
|
1591
1632
|
if (!key) {
|
|
1592
|
-
if (isProduction) {
|
|
1593
|
-
throw new Error(
|
|
1594
|
-
"\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"
|
|
1595
|
-
);
|
|
1596
|
-
}
|
|
1597
|
-
console.warn(
|
|
1598
|
-
"\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"
|
|
1599
|
-
);
|
|
1600
|
-
return;
|
|
1601
|
-
}
|
|
1602
|
-
if (!isProduction) {
|
|
1603
|
-
validateKey(key, false).catch(() => {
|
|
1604
|
-
});
|
|
1605
1633
|
return;
|
|
1606
1634
|
}
|
|
1607
|
-
|
|
1635
|
+
validateKey(key).catch(() => {
|
|
1636
|
+
});
|
|
1608
1637
|
}
|
|
1609
|
-
async function validateKey(key
|
|
1638
|
+
async function validateKey(key) {
|
|
1610
1639
|
try {
|
|
1611
1640
|
const res = await fetch(VALIDATE_URL, {
|
|
1612
1641
|
method: "POST",
|
|
@@ -1617,29 +1646,20 @@ async function validateKey(key, throwOnError) {
|
|
|
1617
1646
|
})
|
|
1618
1647
|
});
|
|
1619
1648
|
if (!res.ok) {
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
console.warn("\u26A0\uFE0F " + msg);
|
|
1625
|
-
return;
|
|
1649
|
+
if (res.status === 404 || res.status === 422) {
|
|
1650
|
+
console.info(
|
|
1651
|
+
"[PixelPlay] License key could not be validated. Components will still work normally."
|
|
1652
|
+
);
|
|
1626
1653
|
}
|
|
1627
1654
|
return;
|
|
1628
1655
|
}
|
|
1629
1656
|
const data = await res.json();
|
|
1630
1657
|
if (data.status === "revoked" || data.status === "disabled") {
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
https://dennisisaac.com/ui-kit/pricing
|
|
1635
|
-
`;
|
|
1636
|
-
if (throwOnError) throw new Error(msg);
|
|
1637
|
-
console.warn("\u26A0\uFE0F " + msg);
|
|
1638
|
-
}
|
|
1639
|
-
} catch (err) {
|
|
1640
|
-
if (err instanceof Error && err.message.includes("PixelPlay UI")) {
|
|
1641
|
-
throw err;
|
|
1658
|
+
console.info(
|
|
1659
|
+
`[PixelPlay] License key has been ${data.status}. Components will still work normally.`
|
|
1660
|
+
);
|
|
1642
1661
|
}
|
|
1662
|
+
} catch (e) {
|
|
1643
1663
|
}
|
|
1644
1664
|
}
|
|
1645
1665
|
// Annotate the CommonJS export names for ESM import in node:
|