sunpeak 0.9.1 → 0.9.3
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/discovery-a4WId9PC.cjs +125 -0
- package/dist/discovery-a4WId9PC.cjs.map +1 -0
- package/dist/discovery-ft3cd2dW.js +126 -0
- package/dist/discovery-ft3cd2dW.js.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -16
- package/dist/index.js.map +1 -1
- package/dist/lib/discovery.d.ts +110 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/mcp/entry.cjs +2 -10
- package/dist/mcp/entry.cjs.map +1 -1
- package/dist/mcp/entry.js +1 -9
- package/dist/mcp/entry.js.map +1 -1
- package/package.json +1 -1
- package/template/.sunpeak/dev.tsx +7 -88
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.json +1 -1
- package/template/dist/map.json +1 -1
- package/template/dist/review.json +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +19 -19
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/resources/index.ts +3 -25
- package/template/src/simulations/index.ts +3 -10
- package/template/.sunpeak/vite-env.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { a as clsx } from "./simulator-url-CexnaL-e.js";
|
|
2
2
|
import { C, S, T, c, v, s, q, i, r, w, t, e, f, g, h, j, u, k, l, m, n, d, b, o, p } from "./simulator-url-CexnaL-e.js";
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
import { i as i2, d as d2, h as h2, c as c2, b as b2, e as e2, a, f as f2, g as g2, t as t2 } from "./discovery-ft3cd2dW.js";
|
|
4
5
|
const MOBILE_BREAKPOINT = 768;
|
|
5
6
|
function useIsMobile() {
|
|
6
7
|
const [isMobile, setIsMobile] = React.useState(void 0);
|
|
@@ -17,11 +18,11 @@ function useIsMobile() {
|
|
|
17
18
|
}
|
|
18
19
|
const concatArrays = (array1, array2) => {
|
|
19
20
|
const combinedArray = new Array(array1.length + array2.length);
|
|
20
|
-
for (let
|
|
21
|
-
combinedArray[
|
|
21
|
+
for (let i3 = 0; i3 < array1.length; i3++) {
|
|
22
|
+
combinedArray[i3] = array1[i3];
|
|
22
23
|
}
|
|
23
|
-
for (let
|
|
24
|
-
combinedArray[array1.length +
|
|
24
|
+
for (let i3 = 0; i3 < array2.length; i3++) {
|
|
25
|
+
combinedArray[array1.length + i3] = array2[i3];
|
|
25
26
|
}
|
|
26
27
|
return combinedArray;
|
|
27
28
|
};
|
|
@@ -87,8 +88,8 @@ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
|
87
88
|
}
|
|
88
89
|
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
89
90
|
const validatorsLength = validators.length;
|
|
90
|
-
for (let
|
|
91
|
-
const validatorObj = validators[
|
|
91
|
+
for (let i3 = 0; i3 < validatorsLength; i3++) {
|
|
92
|
+
const validatorObj = validators[i3];
|
|
92
93
|
if (validatorObj.validator(classRest)) {
|
|
93
94
|
return validatorObj.classGroupId;
|
|
94
95
|
}
|
|
@@ -118,8 +119,8 @@ const processClassGroups = (classGroups, theme) => {
|
|
|
118
119
|
};
|
|
119
120
|
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
120
121
|
const len = classGroup.length;
|
|
121
|
-
for (let
|
|
122
|
-
const classDefinition = classGroup[
|
|
122
|
+
for (let i3 = 0; i3 < len; i3++) {
|
|
123
|
+
const classDefinition = classGroup[i3];
|
|
123
124
|
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
124
125
|
}
|
|
125
126
|
};
|
|
@@ -151,8 +152,8 @@ const processFunctionDefinition = (classDefinition, classPartObject, classGroupI
|
|
|
151
152
|
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
152
153
|
const entries = Object.entries(classDefinition);
|
|
153
154
|
const len = entries.length;
|
|
154
|
-
for (let
|
|
155
|
-
const [key, value] = entries[
|
|
155
|
+
for (let i3 = 0; i3 < len; i3++) {
|
|
156
|
+
const [key, value] = entries[i3];
|
|
156
157
|
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
157
158
|
}
|
|
158
159
|
};
|
|
@@ -160,8 +161,8 @@ const getPart = (classPartObject, path) => {
|
|
|
160
161
|
let current = classPartObject;
|
|
161
162
|
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
162
163
|
const len = parts.length;
|
|
163
|
-
for (let
|
|
164
|
-
const part = parts[
|
|
164
|
+
for (let i3 = 0; i3 < len; i3++) {
|
|
165
|
+
const part = parts[i3];
|
|
165
166
|
let next = current.nextPart.get(part);
|
|
166
167
|
if (!next) {
|
|
167
168
|
next = createClassPartObject();
|
|
@@ -293,8 +294,8 @@ const createSortModifiers = (config) => {
|
|
|
293
294
|
return (modifiers) => {
|
|
294
295
|
const result = [];
|
|
295
296
|
let currentSegment = [];
|
|
296
|
-
for (let
|
|
297
|
-
const modifier = modifiers[
|
|
297
|
+
for (let i3 = 0; i3 < modifiers.length; i3++) {
|
|
298
|
+
const modifier = modifiers[i3];
|
|
298
299
|
const isArbitrary = modifier[0] === "[";
|
|
299
300
|
const isOrderSensitive = modifierWeights.has(modifier);
|
|
300
301
|
if (isArbitrary || isOrderSensitive) {
|
|
@@ -367,8 +368,8 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
367
368
|
}
|
|
368
369
|
classGroupsInConflict.push(classId);
|
|
369
370
|
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
370
|
-
for (let
|
|
371
|
-
const group = conflictGroups[
|
|
371
|
+
for (let i3 = 0; i3 < conflictGroups.length; ++i3) {
|
|
372
|
+
const group = conflictGroups[i3];
|
|
372
373
|
classGroupsInConflict.push(modifierId + group);
|
|
373
374
|
}
|
|
374
375
|
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
@@ -3038,9 +3039,18 @@ export {
|
|
|
3038
3039
|
C as ChatGPTSimulator,
|
|
3039
3040
|
S as SCREEN_WIDTHS,
|
|
3040
3041
|
T as ThemeProvider,
|
|
3042
|
+
i2 as buildDevSimulations,
|
|
3043
|
+
d2 as buildResourceMap,
|
|
3044
|
+
h2 as buildSimulations,
|
|
3041
3045
|
cn,
|
|
3046
|
+
c2 as createResourceExports,
|
|
3047
|
+
b2 as createSimulationIndex,
|
|
3042
3048
|
c as createSimulatorUrl,
|
|
3049
|
+
e2 as extractResourceKey,
|
|
3050
|
+
a as extractSimulationKey,
|
|
3051
|
+
f2 as findResourceKey,
|
|
3043
3052
|
v as getAPI,
|
|
3053
|
+
g2 as getComponentName,
|
|
3044
3054
|
s as getGlobal,
|
|
3045
3055
|
q as getProvider,
|
|
3046
3056
|
i as initMockOpenAI,
|
|
@@ -3050,6 +3060,7 @@ export {
|
|
|
3050
3060
|
prefersReducedMotion,
|
|
3051
3061
|
w as resetProviderCache,
|
|
3052
3062
|
t as subscribeToGlobal,
|
|
3063
|
+
t2 as toPascalCase,
|
|
3053
3064
|
e as useDisplayMode,
|
|
3054
3065
|
useIsMobile,
|
|
3055
3066
|
f as useLocale,
|