pxengine 0.1.97 → 0.1.99
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 +501 -172
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +297 -65
- package/dist/index.d.ts +297 -65
- package/dist/index.mjs +492 -164
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +968 -10
- package/package.json +16 -4
package/dist/index.mjs
CHANGED
|
@@ -25923,12 +25923,12 @@ var TableAtom = ({
|
|
|
25923
25923
|
rows,
|
|
25924
25924
|
className,
|
|
25925
25925
|
style,
|
|
25926
|
-
headerTextColor = "#9ca3af",
|
|
25927
|
-
headerBgColor = "#f9fafb",
|
|
25928
|
-
rowTextColor = "#374151",
|
|
25929
|
-
rowBgColor = "#ffffff",
|
|
25930
|
-
hoverBgColor = "
|
|
25931
|
-
borderColor = "#f3f4f6"
|
|
25926
|
+
headerTextColor = "var(--muted-foreground-color, #9ca3af)",
|
|
25927
|
+
headerBgColor = "var(--card-background, #f9fafb)",
|
|
25928
|
+
rowTextColor = "var(--card-foreground-color, #374151)",
|
|
25929
|
+
rowBgColor = "var(--card-background, #ffffff)",
|
|
25930
|
+
hoverBgColor = "rgba(127, 127, 127, 0.18)",
|
|
25931
|
+
borderColor = "var(--border-color, #f3f4f6)"
|
|
25932
25932
|
}) => {
|
|
25933
25933
|
const safeHeaders = Array.isArray(headers) ? headers : [];
|
|
25934
25934
|
const safeRows = Array.isArray(rows) ? rows : [];
|
|
@@ -33614,6 +33614,7 @@ var molecules_exports = {};
|
|
|
33614
33614
|
__export(molecules_exports, {
|
|
33615
33615
|
ActionButton: () => ActionButton,
|
|
33616
33616
|
ActionPriorityCard: () => ActionPriorityCard,
|
|
33617
|
+
AnalyticsChart: () => AnalyticsChart,
|
|
33617
33618
|
ApprovalCard: () => ApprovalCard,
|
|
33618
33619
|
AudienceDemographicsCard: () => AudienceDemographicsCard,
|
|
33619
33620
|
AudienceMetricCard: () => AudienceMetricCard,
|
|
@@ -38963,7 +38964,8 @@ var FullscreenModal = ({ url, title, slideCount, initialSlide = 1, onClose }) =>
|
|
|
38963
38964
|
setIframeReady(true);
|
|
38964
38965
|
iframeRef.current?.contentWindow?.postMessage({ type: "goToSlide", slide: initialSlide }, "*");
|
|
38965
38966
|
},
|
|
38966
|
-
sandbox: "allow-same-origin allow-scripts
|
|
38967
|
+
sandbox: "allow-same-origin allow-scripts",
|
|
38968
|
+
allow: "fullscreen",
|
|
38967
38969
|
className: "absolute inset-0 w-full h-full border-0"
|
|
38968
38970
|
}
|
|
38969
38971
|
) })
|
|
@@ -41174,13 +41176,63 @@ async function defaultPersistSelection(sessionId, questionKey, value) {
|
|
|
41174
41176
|
|
|
41175
41177
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
41176
41178
|
import { jsx as jsx153, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
41179
|
+
var NUMBER_WORDS = {
|
|
41180
|
+
one: 1,
|
|
41181
|
+
two: 2,
|
|
41182
|
+
three: 3,
|
|
41183
|
+
four: 4,
|
|
41184
|
+
five: 5,
|
|
41185
|
+
six: 6,
|
|
41186
|
+
seven: 7,
|
|
41187
|
+
eight: 8,
|
|
41188
|
+
nine: 9,
|
|
41189
|
+
ten: 10
|
|
41190
|
+
};
|
|
41191
|
+
function wordToNum(s) {
|
|
41192
|
+
const n = parseInt(s, 10);
|
|
41193
|
+
if (!Number.isNaN(n)) return n;
|
|
41194
|
+
return NUMBER_WORDS[s.toLowerCase()] ?? NaN;
|
|
41195
|
+
}
|
|
41196
|
+
function toPositiveInt(v) {
|
|
41197
|
+
const n = Math.floor(Number(v));
|
|
41198
|
+
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
41199
|
+
}
|
|
41200
|
+
function inferSelectionLimits(text, optionCount) {
|
|
41201
|
+
if (!text) return null;
|
|
41202
|
+
const q = text.toLowerCase();
|
|
41203
|
+
const all = optionCount > 0 ? optionCount : 99;
|
|
41204
|
+
if (/all that apply|select all|check all|choose all|select multiple|choose multiple|more than one|as many as|any that apply/.test(q)) {
|
|
41205
|
+
return { max: all, min: 1, mode: "all" };
|
|
41206
|
+
}
|
|
41207
|
+
const upTo = q.match(/up to (\d+|one|two|three|four|five|six|seven|eight|nine|ten)/);
|
|
41208
|
+
if (upTo) {
|
|
41209
|
+
const n = wordToNum(upTo[1]);
|
|
41210
|
+
if (n > 1) return { max: Math.min(n, all), min: 1, mode: "upto" };
|
|
41211
|
+
}
|
|
41212
|
+
const pickN = q.match(/(?:select|choose|pick)\s+(?:any\s+|your\s+|the\s+)?(?:top\s+)?(\d+|one|two|three|four|five|six|seven|eight|nine|ten)\b/);
|
|
41213
|
+
if (pickN) {
|
|
41214
|
+
const n = wordToNum(pickN[1]);
|
|
41215
|
+
if (n > 1 && n <= all) return { max: n, min: n, mode: "exact" };
|
|
41216
|
+
}
|
|
41217
|
+
if (/(?:select|choose|pick)\s+(?:your\s+|the\s+)?(?:preferred|favorite|favourite|relevant|applicable|matching)\s+\w+s\b/.test(q)) {
|
|
41218
|
+
return { max: all, min: 1, mode: "all" };
|
|
41219
|
+
}
|
|
41220
|
+
if (/(?:choose|select|pick)\s+the\s+\w+s\s+that\s+(?:match|apply|fit|describe|best|are)/.test(q)) {
|
|
41221
|
+
return { max: all, min: 1, mode: "all" };
|
|
41222
|
+
}
|
|
41223
|
+
return null;
|
|
41224
|
+
}
|
|
41177
41225
|
var MCQCard = React112.memo(
|
|
41178
41226
|
({
|
|
41179
41227
|
question,
|
|
41180
41228
|
options,
|
|
41181
41229
|
recommended,
|
|
41182
41230
|
selectedOption: propsSelectedOption,
|
|
41231
|
+
selectedOptions: propsSelectedOptions,
|
|
41232
|
+
maxSelections,
|
|
41233
|
+
minSelections,
|
|
41183
41234
|
onSelect,
|
|
41235
|
+
onSelectMultiple,
|
|
41184
41236
|
onProceed,
|
|
41185
41237
|
isLatestMessage = true,
|
|
41186
41238
|
isLoading = false,
|
|
@@ -41198,20 +41250,54 @@ var MCQCard = React112.memo(
|
|
|
41198
41250
|
}) => {
|
|
41199
41251
|
const resolvedQuestion = question || allProps.Question || allProps.q || "";
|
|
41200
41252
|
const resolvedOptions = options || allProps.Options || allProps.opts || {};
|
|
41253
|
+
const optionCount = resolvedOptions && typeof resolvedOptions === "object" ? Object.keys(resolvedOptions).length : 0;
|
|
41254
|
+
const explicitMax = toPositiveInt(
|
|
41255
|
+
maxSelections ?? allProps.MaxSelections ?? allProps.max_selections ?? allProps.maxSelect
|
|
41256
|
+
);
|
|
41257
|
+
const explicitMin = toPositiveInt(
|
|
41258
|
+
minSelections ?? allProps.MinSelections ?? allProps.min_selections
|
|
41259
|
+
);
|
|
41260
|
+
const inferenceText = [
|
|
41261
|
+
resolvedQuestion,
|
|
41262
|
+
allProps.Context,
|
|
41263
|
+
allProps.context,
|
|
41264
|
+
allProps.instruction,
|
|
41265
|
+
allProps.helperText
|
|
41266
|
+
].filter(Boolean).join(" ");
|
|
41267
|
+
const inferred = explicitMax ? null : inferSelectionLimits(inferenceText, optionCount);
|
|
41268
|
+
const maxSel = explicitMax ?? inferred?.max ?? 1;
|
|
41269
|
+
const isMulti = maxSel > 1;
|
|
41270
|
+
const minSel = Math.min(
|
|
41271
|
+
maxSel,
|
|
41272
|
+
Math.max(1, explicitMin ?? inferred?.min ?? (isMulti ? maxSel : 1))
|
|
41273
|
+
);
|
|
41274
|
+
const isSelectAll = isMulti && !explicitMax && inferred?.mode === "all";
|
|
41201
41275
|
const t = th(theme);
|
|
41202
|
-
const
|
|
41203
|
-
|
|
41276
|
+
const seedSelection = () => {
|
|
41277
|
+
if (Array.isArray(propsSelectedOptions) && propsSelectedOptions.length > 0) {
|
|
41278
|
+
return propsSelectedOptions.slice(0, maxSel);
|
|
41279
|
+
}
|
|
41280
|
+
if (propsSelectedOption) return [propsSelectedOption];
|
|
41281
|
+
return [];
|
|
41282
|
+
};
|
|
41283
|
+
const [selectedKeys, setSelectedKeys] = React112.useState(seedSelection);
|
|
41284
|
+
const [isProceeded, setIsProceeded] = React112.useState(
|
|
41285
|
+
Boolean(propsSelectedOption || propsSelectedOptions && propsSelectedOptions.length)
|
|
41286
|
+
);
|
|
41204
41287
|
const fetchedSessionRef = React112.useRef("");
|
|
41205
41288
|
React112.useEffect(() => {
|
|
41206
41289
|
if (propsSelectedOption) {
|
|
41207
|
-
|
|
41290
|
+
setSelectedKeys([propsSelectedOption]);
|
|
41291
|
+
setIsProceeded(true);
|
|
41292
|
+
} else if (Array.isArray(propsSelectedOptions) && propsSelectedOptions.length > 0) {
|
|
41293
|
+
setSelectedKeys(propsSelectedOptions.slice(0, maxSel));
|
|
41208
41294
|
setIsProceeded(true);
|
|
41209
41295
|
}
|
|
41210
|
-
}, [propsSelectedOption]);
|
|
41211
|
-
const buildQuestionKey = React112.useCallback((sid,
|
|
41296
|
+
}, [propsSelectedOption, propsSelectedOptions]);
|
|
41297
|
+
const buildQuestionKey = React112.useCallback((sid, q) => {
|
|
41212
41298
|
let hash = 2166136261;
|
|
41213
|
-
for (let i = 0; i <
|
|
41214
|
-
hash ^=
|
|
41299
|
+
for (let i = 0; i < q.length; i++) {
|
|
41300
|
+
hash ^= q.charCodeAt(i);
|
|
41215
41301
|
hash = hash * 16777619 >>> 0;
|
|
41216
41302
|
}
|
|
41217
41303
|
return `mcq_${sid}_${hash.toString(36)}`;
|
|
@@ -41226,54 +41312,83 @@ var MCQCard = React112.memo(
|
|
|
41226
41312
|
fetchSelections(sessionId).then((selections) => {
|
|
41227
41313
|
const stored = selections[questionKey] || selections[resolvedQuestion] || selections[`mcq_${sessionId}`];
|
|
41228
41314
|
if (stored) {
|
|
41229
|
-
|
|
41230
|
-
|
|
41315
|
+
const restored = String(stored).split(",").map((s) => s.trim()).filter(Boolean);
|
|
41316
|
+
if (restored.length) {
|
|
41317
|
+
setSelectedKeys(restored);
|
|
41318
|
+
setIsProceeded(true);
|
|
41319
|
+
}
|
|
41231
41320
|
}
|
|
41232
41321
|
}).catch(() => {
|
|
41233
41322
|
});
|
|
41234
41323
|
}, [sessionId, propsSelectedOption, resolvedQuestion, buildQuestionKey]);
|
|
41235
41324
|
const isDiscovery = disableContinueInDiscovery !== void 0 ? disableContinueInDiscovery : typeof window !== "undefined" && window.location.pathname.includes("creator-discovery");
|
|
41325
|
+
const isOptionsDisabled = disabled || !isLatestMessage || isProceeded && !disableContinueInDiscovery;
|
|
41236
41326
|
const handleOptionClick = (key, e) => {
|
|
41237
41327
|
e.preventDefault();
|
|
41238
41328
|
e.stopPropagation();
|
|
41239
|
-
if (isLatestMessage
|
|
41240
|
-
|
|
41329
|
+
if (!isLatestMessage || isLoading || disabled || isProceeded) return;
|
|
41330
|
+
if (!isMulti) {
|
|
41331
|
+
setSelectedKeys([key]);
|
|
41241
41332
|
onSelect?.(key);
|
|
41333
|
+
onSelectMultiple?.([key]);
|
|
41334
|
+
return;
|
|
41242
41335
|
}
|
|
41336
|
+
setSelectedKeys((prev) => {
|
|
41337
|
+
let next;
|
|
41338
|
+
if (prev.includes(key)) {
|
|
41339
|
+
next = prev.filter((k) => k !== key);
|
|
41340
|
+
} else if (prev.length < maxSel) {
|
|
41341
|
+
next = [...prev, key];
|
|
41342
|
+
} else {
|
|
41343
|
+
next = prev;
|
|
41344
|
+
}
|
|
41345
|
+
onSelect?.(key);
|
|
41346
|
+
onSelectMultiple?.(next);
|
|
41347
|
+
return next;
|
|
41348
|
+
});
|
|
41349
|
+
};
|
|
41350
|
+
const optionsEntries = resolvedOptions && Object.keys(resolvedOptions).length > 0 ? Object.entries(resolvedOptions).map(([key, val]) => [
|
|
41351
|
+
key,
|
|
41352
|
+
typeof val === "string" ? val : typeof val === "object" && val !== null ? val.label || val.description || val.id || JSON.stringify(val) : String(val ?? "")
|
|
41353
|
+
]) : [];
|
|
41354
|
+
const labelFor = (key) => {
|
|
41355
|
+
const found = optionsEntries.find(([k]) => k === key);
|
|
41356
|
+
return found ? found[1] : key;
|
|
41243
41357
|
};
|
|
41244
41358
|
const handleProceed = async (e) => {
|
|
41245
41359
|
e.preventDefault();
|
|
41246
41360
|
e.stopPropagation();
|
|
41247
|
-
if (
|
|
41248
|
-
|
|
41249
|
-
|
|
41250
|
-
|
|
41251
|
-
|
|
41252
|
-
|
|
41253
|
-
|
|
41254
|
-
|
|
41255
|
-
|
|
41256
|
-
|
|
41257
|
-
|
|
41258
|
-
|
|
41259
|
-
|
|
41260
|
-
|
|
41361
|
+
if (disabled || isProceeded) return;
|
|
41362
|
+
let finalKeys = selectedKeys.length ? selectedKeys : recommended ? [recommended] : [];
|
|
41363
|
+
finalKeys = finalKeys.slice(0, maxSel);
|
|
41364
|
+
if (finalKeys.length < minSel) return;
|
|
41365
|
+
if (selectedKeys.length === 0 && recommended) {
|
|
41366
|
+
setSelectedKeys(finalKeys);
|
|
41367
|
+
}
|
|
41368
|
+
const value = finalKeys.join(",");
|
|
41369
|
+
const label = finalKeys.map(labelFor).join(", ");
|
|
41370
|
+
setIsProceeded(true);
|
|
41371
|
+
if (sessionId && resolvedQuestion) {
|
|
41372
|
+
const questionKey = buildQuestionKey(sessionId, resolvedQuestion);
|
|
41373
|
+
await persistSelection(sessionId, questionKey, value);
|
|
41374
|
+
}
|
|
41375
|
+
if (sendMessage) {
|
|
41376
|
+
sendMessage(`Q: ${resolvedQuestion}
|
|
41261
41377
|
A: ${label}`);
|
|
41262
|
-
}
|
|
41263
|
-
onProceed?.(result);
|
|
41264
|
-
onAction?.({
|
|
41265
|
-
type: "mcq_selection",
|
|
41266
|
-
value: result,
|
|
41267
|
-
label
|
|
41268
|
-
});
|
|
41269
41378
|
}
|
|
41379
|
+
onProceed?.(value);
|
|
41380
|
+
onAction?.({
|
|
41381
|
+
type: "mcq_selection",
|
|
41382
|
+
value,
|
|
41383
|
+
label,
|
|
41384
|
+
values: finalKeys,
|
|
41385
|
+
labels: finalKeys.map(labelFor)
|
|
41386
|
+
});
|
|
41270
41387
|
};
|
|
41271
|
-
const
|
|
41388
|
+
const selectedCount = selectedKeys.length;
|
|
41389
|
+
const meetsMin = (selectedCount || (recommended ? 1 : 0)) >= minSel;
|
|
41272
41390
|
const isContinueDisabled = disabled || !isLatestMessage || isProceeded || isDiscovery;
|
|
41273
|
-
const
|
|
41274
|
-
key,
|
|
41275
|
-
typeof val === "string" ? val : typeof val === "object" && val !== null ? val.label || val.description || val.id || JSON.stringify(val) : String(val ?? "")
|
|
41276
|
-
]) : [];
|
|
41391
|
+
const guidance = !isMulti ? "Select one option" : isSelectAll ? "Select all that apply" : minSel === maxSel ? `Select ${maxSel} options` : minSel <= 1 ? `Choose up to ${maxSel} options` : `Select between ${minSel} and ${maxSel} options`;
|
|
41277
41392
|
return /* @__PURE__ */ jsxs114(
|
|
41278
41393
|
"div",
|
|
41279
41394
|
{
|
|
@@ -41284,10 +41399,24 @@ A: ${label}`);
|
|
|
41284
41399
|
),
|
|
41285
41400
|
style: t.root,
|
|
41286
41401
|
children: [
|
|
41287
|
-
/* @__PURE__ */
|
|
41402
|
+
/* @__PURE__ */ jsxs114("div", { className: "mb-4", children: [
|
|
41403
|
+
/* @__PURE__ */ jsx153("p", { className: "text-sm text-cardText", style: t.text, children: resolvedQuestion || "Select an option:" }),
|
|
41404
|
+
isMulti && /* @__PURE__ */ jsxs114("p", { className: "mt-1 text-xs text-gray500 flex items-center gap-1.5", children: [
|
|
41405
|
+
/* @__PURE__ */ jsx153("span", { children: guidance }),
|
|
41406
|
+
/* @__PURE__ */ jsxs114("span", { className: "text-gold", style: t.accent, children: [
|
|
41407
|
+
"(",
|
|
41408
|
+
selectedCount,
|
|
41409
|
+
"/",
|
|
41410
|
+
maxSel,
|
|
41411
|
+
" selected)"
|
|
41412
|
+
] })
|
|
41413
|
+
] })
|
|
41414
|
+
] }),
|
|
41288
41415
|
/* @__PURE__ */ jsx153("div", { className: "space-y-2.5 mb-4", children: optionsEntries.map(([key, label]) => {
|
|
41289
|
-
const isSelected =
|
|
41416
|
+
const isSelected = selectedKeys.includes(key);
|
|
41290
41417
|
const isRecommended = key === recommended;
|
|
41418
|
+
const atCap = isMulti && !isSelected && selectedCount >= maxSel;
|
|
41419
|
+
const allowHover = !isOptionsDisabled && !atCap && (isMulti || selectedCount === 0);
|
|
41291
41420
|
return /* @__PURE__ */ jsx153(
|
|
41292
41421
|
"div",
|
|
41293
41422
|
{
|
|
@@ -41298,8 +41427,8 @@ A: ${label}`);
|
|
|
41298
41427
|
"cursor-pointer rounded-lg p-3 transition-colors",
|
|
41299
41428
|
"border bg-black",
|
|
41300
41429
|
isSelected ? "border-cardBorder" : "border-gray400",
|
|
41301
|
-
|
|
41302
|
-
(isLoading || isOptionsDisabled) && "opacity-50 cursor-not-allowed"
|
|
41430
|
+
allowHover && "hover:border-gray500",
|
|
41431
|
+
(isLoading || isOptionsDisabled || atCap) && "opacity-50 cursor-not-allowed"
|
|
41303
41432
|
),
|
|
41304
41433
|
style: isSelected ? { ...t.surface, ...t.accentBorder } : t.surface,
|
|
41305
41434
|
children: /* @__PURE__ */ jsxs114("div", { className: "flex items-start gap-3", children: [
|
|
@@ -41307,14 +41436,28 @@ A: ${label}`);
|
|
|
41307
41436
|
"div",
|
|
41308
41437
|
{
|
|
41309
41438
|
className: cn(
|
|
41310
|
-
"w-4 h-4
|
|
41439
|
+
"w-4 h-4 border-2 flex items-center justify-center transition-colors",
|
|
41440
|
+
isMulti ? "rounded" : "rounded-full",
|
|
41311
41441
|
isSelected ? "border-gold" : cn(
|
|
41312
41442
|
"border-gray500",
|
|
41313
|
-
|
|
41443
|
+
allowHover && "hover:border-gold"
|
|
41314
41444
|
)
|
|
41315
41445
|
),
|
|
41316
41446
|
style: isSelected ? t.accentBorder : void 0,
|
|
41317
|
-
children: isSelected && /* @__PURE__ */ jsx153(
|
|
41447
|
+
children: isSelected && (isMulti ? /* @__PURE__ */ jsx153(
|
|
41448
|
+
"svg",
|
|
41449
|
+
{
|
|
41450
|
+
viewBox: "0 0 16 16",
|
|
41451
|
+
className: "w-3 h-3 text-gold",
|
|
41452
|
+
style: t.accent,
|
|
41453
|
+
fill: "none",
|
|
41454
|
+
stroke: "currentColor",
|
|
41455
|
+
strokeWidth: "2.5",
|
|
41456
|
+
strokeLinecap: "round",
|
|
41457
|
+
strokeLinejoin: "round",
|
|
41458
|
+
children: /* @__PURE__ */ jsx153("path", { d: "M3.5 8.5l3 3 6-7" })
|
|
41459
|
+
}
|
|
41460
|
+
) : /* @__PURE__ */ jsx153("div", { className: "w-2 h-2 rounded-full bg-gold", style: t.accentBg }))
|
|
41318
41461
|
}
|
|
41319
41462
|
) }),
|
|
41320
41463
|
/* @__PURE__ */ jsxs114("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -41331,7 +41474,7 @@ A: ${label}`);
|
|
|
41331
41474
|
{
|
|
41332
41475
|
"data-testid": "mcq-continue",
|
|
41333
41476
|
onClick: handleProceed,
|
|
41334
|
-
disabled: isContinueDisabled || isLoading || !
|
|
41477
|
+
disabled: isContinueDisabled || isLoading || !meetsMin,
|
|
41335
41478
|
className: cn(
|
|
41336
41479
|
"px-4 py-1.5 border rounded-lg text-xs font-medium transition-colors",
|
|
41337
41480
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -44538,6 +44681,190 @@ function CreatorWidgetInner({
|
|
|
44538
44681
|
}
|
|
44539
44682
|
var CreatorWidget = memo(CreatorWidgetInner);
|
|
44540
44683
|
|
|
44684
|
+
// src/molecules/analytics/AnalyticsChart.tsx
|
|
44685
|
+
import { useEffect as useEffect15, useRef as useRef11, useState as useState23 } from "react";
|
|
44686
|
+
import { jsx as jsx178, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
44687
|
+
function getCSSVar(name) {
|
|
44688
|
+
if (typeof document === "undefined") return "";
|
|
44689
|
+
return getComputedStyle(document.documentElement).getPropertyValue(name).trim();
|
|
44690
|
+
}
|
|
44691
|
+
var FALLBACK_COLORS = ["#C4AD7C", "#A189E8", "#5BC582", "#F59E0B", "#3B82F6", "#EC81B6", "#4DB8AC", "#F97316"];
|
|
44692
|
+
function normalizeConfig(config) {
|
|
44693
|
+
const xAxisType = Array.isArray(config.xAxis) ? config.xAxis[0]?.type : config.xAxis?.type;
|
|
44694
|
+
if (xAxisType !== "category") return config;
|
|
44695
|
+
return {
|
|
44696
|
+
...config,
|
|
44697
|
+
series: (config.series || []).map((s) => ({
|
|
44698
|
+
...s,
|
|
44699
|
+
data: (s.data || []).map((pt) => {
|
|
44700
|
+
if (pt && typeof pt === "object" && typeof pt.x === "string") {
|
|
44701
|
+
const { x, ...rest } = pt;
|
|
44702
|
+
return rest;
|
|
44703
|
+
}
|
|
44704
|
+
return pt;
|
|
44705
|
+
})
|
|
44706
|
+
}))
|
|
44707
|
+
};
|
|
44708
|
+
}
|
|
44709
|
+
function stripNulls(val) {
|
|
44710
|
+
if (val === null || val === void 0) return void 0;
|
|
44711
|
+
if (Array.isArray(val)) return val.map(stripNulls).filter((v) => v !== void 0);
|
|
44712
|
+
if (typeof val === "object") {
|
|
44713
|
+
const out = {};
|
|
44714
|
+
for (const k of Object.keys(val)) {
|
|
44715
|
+
const v = stripNulls(val[k]);
|
|
44716
|
+
if (v !== void 0) out[k] = v;
|
|
44717
|
+
}
|
|
44718
|
+
return out;
|
|
44719
|
+
}
|
|
44720
|
+
return val;
|
|
44721
|
+
}
|
|
44722
|
+
var hcSingleton = null;
|
|
44723
|
+
var hcLoadPromise = null;
|
|
44724
|
+
function loadHighcharts() {
|
|
44725
|
+
if (hcSingleton) return Promise.resolve(hcSingleton);
|
|
44726
|
+
if (hcLoadPromise) return hcLoadPromise;
|
|
44727
|
+
hcLoadPromise = import("highcharts").then((m) => {
|
|
44728
|
+
hcSingleton = m.default ?? m;
|
|
44729
|
+
return hcSingleton;
|
|
44730
|
+
});
|
|
44731
|
+
return hcLoadPromise;
|
|
44732
|
+
}
|
|
44733
|
+
function buildTheme(height) {
|
|
44734
|
+
const colors = [1, 2, 3, 4, 5, 6, 7, 8].map((i) => getCSSVar(`--chart-${i}`)).filter(Boolean);
|
|
44735
|
+
return {
|
|
44736
|
+
colors: colors.length ? colors : FALLBACK_COLORS,
|
|
44737
|
+
chart: {
|
|
44738
|
+
backgroundColor: getCSSVar("--paperBackground") || "#0a0a0a",
|
|
44739
|
+
style: { fontFamily: "Inter, sans-serif" },
|
|
44740
|
+
height
|
|
44741
|
+
},
|
|
44742
|
+
title: { style: { color: getCSSVar("--txtColor") || "#E5E5E5", fontSize: "14px", fontWeight: "600" } },
|
|
44743
|
+
subtitle: { style: { color: getCSSVar("--textSecondary") || "#9A9080", fontSize: "12px" } },
|
|
44744
|
+
xAxis: {
|
|
44745
|
+
labels: { style: { color: getCSSVar("--textSecondary") || "#9A9080", fontSize: "11px" } },
|
|
44746
|
+
gridLineColor: getCSSVar("--chart-grid") || "rgba(255,255,255,0.05)",
|
|
44747
|
+
lineColor: getCSSVar("--gray300") || "#363843",
|
|
44748
|
+
tickColor: getCSSVar("--gray300") || "#363843"
|
|
44749
|
+
},
|
|
44750
|
+
yAxis: {
|
|
44751
|
+
labels: { style: { color: getCSSVar("--textSecondary") || "#9A9080", fontSize: "11px" } },
|
|
44752
|
+
gridLineColor: getCSSVar("--chart-grid") || "rgba(255,255,255,0.05)",
|
|
44753
|
+
title: { style: { color: getCSSVar("--textSecondary") || "#9A9080" } }
|
|
44754
|
+
},
|
|
44755
|
+
legend: {
|
|
44756
|
+
itemStyle: { color: getCSSVar("--txtColor") || "#E5E5E5", fontSize: "11px", fontWeight: "normal" },
|
|
44757
|
+
itemHoverStyle: { color: getCSSVar("--gray900") || "#f5f5f5" }
|
|
44758
|
+
},
|
|
44759
|
+
tooltip: {
|
|
44760
|
+
backgroundColor: getCSSVar("--gray100") || "#1b1c22",
|
|
44761
|
+
style: { color: getCSSVar("--txtColor") || "#E5E5E5", fontSize: "12px" },
|
|
44762
|
+
borderColor: getCSSVar("--gray300") || "#363843",
|
|
44763
|
+
borderRadius: 6
|
|
44764
|
+
},
|
|
44765
|
+
plotOptions: { series: { animation: { duration: 400 } } },
|
|
44766
|
+
credits: { enabled: false }
|
|
44767
|
+
};
|
|
44768
|
+
}
|
|
44769
|
+
function AnalyticsChart({
|
|
44770
|
+
config: configProp,
|
|
44771
|
+
chartId,
|
|
44772
|
+
apiBase = "",
|
|
44773
|
+
authToken,
|
|
44774
|
+
height = 400,
|
|
44775
|
+
className,
|
|
44776
|
+
loading: loadingProp,
|
|
44777
|
+
error: errorProp
|
|
44778
|
+
}) {
|
|
44779
|
+
const [mounted, setMounted] = useState23(false);
|
|
44780
|
+
const [fetchedConfig, setFetchedConfig] = useState23(null);
|
|
44781
|
+
const [fetching, setFetching] = useState23(false);
|
|
44782
|
+
const [fetchError, setFetchError] = useState23(null);
|
|
44783
|
+
const containerRef = useRef11(null);
|
|
44784
|
+
const chartRef = useRef11(null);
|
|
44785
|
+
useEffect15(() => {
|
|
44786
|
+
setMounted(true);
|
|
44787
|
+
}, []);
|
|
44788
|
+
useEffect15(() => {
|
|
44789
|
+
if (!chartId || configProp) return;
|
|
44790
|
+
let cancelled = false;
|
|
44791
|
+
setFetching(true);
|
|
44792
|
+
setFetchError(null);
|
|
44793
|
+
const headers = {};
|
|
44794
|
+
if (authToken) headers["Authorization"] = `Bearer ${authToken}`;
|
|
44795
|
+
fetch(`${apiBase}/api/charts/${chartId}`, { headers }).then((r) => {
|
|
44796
|
+
if (!r.ok) throw new Error(`${r.status}`);
|
|
44797
|
+
return r.json();
|
|
44798
|
+
}).then((d) => {
|
|
44799
|
+
if (!cancelled) setFetchedConfig(d.chart_config ?? d);
|
|
44800
|
+
}).catch((e) => {
|
|
44801
|
+
if (!cancelled) setFetchError(e.message ?? "Failed to load chart");
|
|
44802
|
+
}).finally(() => {
|
|
44803
|
+
if (!cancelled) setFetching(false);
|
|
44804
|
+
});
|
|
44805
|
+
return () => {
|
|
44806
|
+
cancelled = true;
|
|
44807
|
+
};
|
|
44808
|
+
}, [chartId, apiBase, authToken, configProp]);
|
|
44809
|
+
const activeConfig = configProp ?? fetchedConfig;
|
|
44810
|
+
useEffect15(() => {
|
|
44811
|
+
if (!mounted || !activeConfig || !containerRef.current) return;
|
|
44812
|
+
const container = containerRef.current;
|
|
44813
|
+
let cancelled = false;
|
|
44814
|
+
loadHighcharts().then((HC) => {
|
|
44815
|
+
if (cancelled || !container) return;
|
|
44816
|
+
if (chartRef.current) {
|
|
44817
|
+
try {
|
|
44818
|
+
chartRef.current.destroy();
|
|
44819
|
+
} catch {
|
|
44820
|
+
}
|
|
44821
|
+
chartRef.current = null;
|
|
44822
|
+
}
|
|
44823
|
+
HC.setOptions(buildTheme(height));
|
|
44824
|
+
chartRef.current = HC.chart(container, normalizeConfig(stripNulls(activeConfig)));
|
|
44825
|
+
});
|
|
44826
|
+
return () => {
|
|
44827
|
+
cancelled = true;
|
|
44828
|
+
};
|
|
44829
|
+
}, [mounted, activeConfig]);
|
|
44830
|
+
useEffect15(() => {
|
|
44831
|
+
return () => {
|
|
44832
|
+
if (chartRef.current) {
|
|
44833
|
+
try {
|
|
44834
|
+
chartRef.current.destroy();
|
|
44835
|
+
} catch {
|
|
44836
|
+
}
|
|
44837
|
+
chartRef.current = null;
|
|
44838
|
+
}
|
|
44839
|
+
};
|
|
44840
|
+
}, []);
|
|
44841
|
+
useEffect15(() => {
|
|
44842
|
+
if (!mounted || !containerRef.current) return;
|
|
44843
|
+
const obs = new ResizeObserver(() => {
|
|
44844
|
+
try {
|
|
44845
|
+
chartRef.current?.reflow();
|
|
44846
|
+
} catch {
|
|
44847
|
+
}
|
|
44848
|
+
});
|
|
44849
|
+
obs.observe(containerRef.current);
|
|
44850
|
+
return () => obs.disconnect();
|
|
44851
|
+
}, [mounted]);
|
|
44852
|
+
const bg = getCSSVar("--paperBackground") || "#0a0a0a";
|
|
44853
|
+
const mutedColor = getCSSVar("--gray300") || "#363843";
|
|
44854
|
+
const displayError = errorProp ?? fetchError;
|
|
44855
|
+
const isLoading = loadingProp || fetching || !mounted || !activeConfig;
|
|
44856
|
+
if (displayError) {
|
|
44857
|
+
return /* @__PURE__ */ jsx178("div", { className, style: { height, display: "flex", alignItems: "center", justifyContent: "center", backgroundColor: bg, borderRadius: 8, border: `1px solid ${mutedColor}` }, children: /* @__PURE__ */ jsx178("p", { style: { color: getCSSVar("--redText") || "#f87171", fontSize: 13, margin: 0 }, children: displayError }) });
|
|
44858
|
+
}
|
|
44859
|
+
if (isLoading) {
|
|
44860
|
+
return /* @__PURE__ */ jsxs137("div", { className, style: { height, borderRadius: 8, overflow: "hidden", position: "relative", backgroundColor: bg, border: `1px solid ${mutedColor}` }, children: [
|
|
44861
|
+
/* @__PURE__ */ jsx178("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(90deg,transparent 0%,rgba(255,255,255,0.06) 50%,transparent 100%)", animation: "hc-shimmer 1.6s ease-in-out infinite" } }),
|
|
44862
|
+
/* @__PURE__ */ jsx178("style", { children: `@keyframes hc-shimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}` })
|
|
44863
|
+
] });
|
|
44864
|
+
}
|
|
44865
|
+
return /* @__PURE__ */ jsx178("div", { ref: containerRef, className, style: { width: "100%", minWidth: 0, height } });
|
|
44866
|
+
}
|
|
44867
|
+
|
|
44541
44868
|
// src/components/ui/index.ts
|
|
44542
44869
|
var ui_exports = {};
|
|
44543
44870
|
__export(ui_exports, {
|
|
@@ -44830,7 +45157,7 @@ __export(ui_exports, {
|
|
|
44830
45157
|
// src/components/ui/button-group.tsx
|
|
44831
45158
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
44832
45159
|
import { cva as cva8 } from "class-variance-authority";
|
|
44833
|
-
import { jsx as
|
|
45160
|
+
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
44834
45161
|
var buttonGroupVariants = cva8(
|
|
44835
45162
|
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
44836
45163
|
{
|
|
@@ -44850,7 +45177,7 @@ function ButtonGroup({
|
|
|
44850
45177
|
orientation,
|
|
44851
45178
|
...props
|
|
44852
45179
|
}) {
|
|
44853
|
-
return /* @__PURE__ */
|
|
45180
|
+
return /* @__PURE__ */ jsx179(
|
|
44854
45181
|
"div",
|
|
44855
45182
|
{
|
|
44856
45183
|
role: "group",
|
|
@@ -44867,7 +45194,7 @@ function ButtonGroupText({
|
|
|
44867
45194
|
...props
|
|
44868
45195
|
}) {
|
|
44869
45196
|
const Comp = asChild ? Slot4 : "div";
|
|
44870
|
-
return /* @__PURE__ */
|
|
45197
|
+
return /* @__PURE__ */ jsx179(
|
|
44871
45198
|
Comp,
|
|
44872
45199
|
{
|
|
44873
45200
|
className: cn(
|
|
@@ -44883,7 +45210,7 @@ function ButtonGroupSeparator({
|
|
|
44883
45210
|
orientation = "vertical",
|
|
44884
45211
|
...props
|
|
44885
45212
|
}) {
|
|
44886
|
-
return /* @__PURE__ */
|
|
45213
|
+
return /* @__PURE__ */ jsx179(
|
|
44887
45214
|
Separator2,
|
|
44888
45215
|
{
|
|
44889
45216
|
"data-slot": "button-group-separator",
|
|
@@ -44899,9 +45226,9 @@ function ButtonGroupSeparator({
|
|
|
44899
45226
|
|
|
44900
45227
|
// src/components/ui/empty.tsx
|
|
44901
45228
|
import { cva as cva9 } from "class-variance-authority";
|
|
44902
|
-
import { jsx as
|
|
45229
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
44903
45230
|
function Empty({ className, ...props }) {
|
|
44904
|
-
return /* @__PURE__ */
|
|
45231
|
+
return /* @__PURE__ */ jsx180(
|
|
44905
45232
|
"div",
|
|
44906
45233
|
{
|
|
44907
45234
|
"data-slot": "empty",
|
|
@@ -44914,7 +45241,7 @@ function Empty({ className, ...props }) {
|
|
|
44914
45241
|
);
|
|
44915
45242
|
}
|
|
44916
45243
|
function EmptyHeader({ className, ...props }) {
|
|
44917
|
-
return /* @__PURE__ */
|
|
45244
|
+
return /* @__PURE__ */ jsx180(
|
|
44918
45245
|
"div",
|
|
44919
45246
|
{
|
|
44920
45247
|
"data-slot": "empty-header",
|
|
@@ -44945,7 +45272,7 @@ function EmptyMedia({
|
|
|
44945
45272
|
variant = "default",
|
|
44946
45273
|
...props
|
|
44947
45274
|
}) {
|
|
44948
|
-
return /* @__PURE__ */
|
|
45275
|
+
return /* @__PURE__ */ jsx180(
|
|
44949
45276
|
"div",
|
|
44950
45277
|
{
|
|
44951
45278
|
"data-slot": "empty-icon",
|
|
@@ -44956,7 +45283,7 @@ function EmptyMedia({
|
|
|
44956
45283
|
);
|
|
44957
45284
|
}
|
|
44958
45285
|
function EmptyTitle({ className, ...props }) {
|
|
44959
|
-
return /* @__PURE__ */
|
|
45286
|
+
return /* @__PURE__ */ jsx180(
|
|
44960
45287
|
"div",
|
|
44961
45288
|
{
|
|
44962
45289
|
"data-slot": "empty-title",
|
|
@@ -44966,7 +45293,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
44966
45293
|
);
|
|
44967
45294
|
}
|
|
44968
45295
|
function EmptyDescription({ className, ...props }) {
|
|
44969
|
-
return /* @__PURE__ */
|
|
45296
|
+
return /* @__PURE__ */ jsx180(
|
|
44970
45297
|
"div",
|
|
44971
45298
|
{
|
|
44972
45299
|
"data-slot": "empty-description",
|
|
@@ -44979,7 +45306,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
44979
45306
|
);
|
|
44980
45307
|
}
|
|
44981
45308
|
function EmptyContent({ className, ...props }) {
|
|
44982
|
-
return /* @__PURE__ */
|
|
45309
|
+
return /* @__PURE__ */ jsx180(
|
|
44983
45310
|
"div",
|
|
44984
45311
|
{
|
|
44985
45312
|
"data-slot": "empty-content",
|
|
@@ -44995,9 +45322,9 @@ function EmptyContent({ className, ...props }) {
|
|
|
44995
45322
|
// src/components/ui/field.tsx
|
|
44996
45323
|
import { useMemo as useMemo12 } from "react";
|
|
44997
45324
|
import { cva as cva10 } from "class-variance-authority";
|
|
44998
|
-
import { jsx as
|
|
45325
|
+
import { jsx as jsx181, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
44999
45326
|
function FieldSet({ className, ...props }) {
|
|
45000
|
-
return /* @__PURE__ */
|
|
45327
|
+
return /* @__PURE__ */ jsx181(
|
|
45001
45328
|
"fieldset",
|
|
45002
45329
|
{
|
|
45003
45330
|
"data-slot": "field-set",
|
|
@@ -45015,7 +45342,7 @@ function FieldLegend({
|
|
|
45015
45342
|
variant = "legend",
|
|
45016
45343
|
...props
|
|
45017
45344
|
}) {
|
|
45018
|
-
return /* @__PURE__ */
|
|
45345
|
+
return /* @__PURE__ */ jsx181(
|
|
45019
45346
|
"legend",
|
|
45020
45347
|
{
|
|
45021
45348
|
"data-slot": "field-legend",
|
|
@@ -45031,7 +45358,7 @@ function FieldLegend({
|
|
|
45031
45358
|
);
|
|
45032
45359
|
}
|
|
45033
45360
|
function FieldGroup({ className, ...props }) {
|
|
45034
|
-
return /* @__PURE__ */
|
|
45361
|
+
return /* @__PURE__ */ jsx181(
|
|
45035
45362
|
"div",
|
|
45036
45363
|
{
|
|
45037
45364
|
"data-slot": "field-group",
|
|
@@ -45071,7 +45398,7 @@ function Field({
|
|
|
45071
45398
|
orientation = "vertical",
|
|
45072
45399
|
...props
|
|
45073
45400
|
}) {
|
|
45074
|
-
return /* @__PURE__ */
|
|
45401
|
+
return /* @__PURE__ */ jsx181(
|
|
45075
45402
|
"div",
|
|
45076
45403
|
{
|
|
45077
45404
|
role: "group",
|
|
@@ -45083,7 +45410,7 @@ function Field({
|
|
|
45083
45410
|
);
|
|
45084
45411
|
}
|
|
45085
45412
|
function FieldContent({ className, ...props }) {
|
|
45086
|
-
return /* @__PURE__ */
|
|
45413
|
+
return /* @__PURE__ */ jsx181(
|
|
45087
45414
|
"div",
|
|
45088
45415
|
{
|
|
45089
45416
|
"data-slot": "field-content",
|
|
@@ -45099,7 +45426,7 @@ function FieldLabel({
|
|
|
45099
45426
|
className,
|
|
45100
45427
|
...props
|
|
45101
45428
|
}) {
|
|
45102
|
-
return /* @__PURE__ */
|
|
45429
|
+
return /* @__PURE__ */ jsx181(
|
|
45103
45430
|
Label,
|
|
45104
45431
|
{
|
|
45105
45432
|
"data-slot": "field-label",
|
|
@@ -45114,7 +45441,7 @@ function FieldLabel({
|
|
|
45114
45441
|
);
|
|
45115
45442
|
}
|
|
45116
45443
|
function FieldTitle({ className, ...props }) {
|
|
45117
|
-
return /* @__PURE__ */
|
|
45444
|
+
return /* @__PURE__ */ jsx181(
|
|
45118
45445
|
"div",
|
|
45119
45446
|
{
|
|
45120
45447
|
"data-slot": "field-label",
|
|
@@ -45127,7 +45454,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
45127
45454
|
);
|
|
45128
45455
|
}
|
|
45129
45456
|
function FieldDescription({ className, ...props }) {
|
|
45130
|
-
return /* @__PURE__ */
|
|
45457
|
+
return /* @__PURE__ */ jsx181(
|
|
45131
45458
|
"p",
|
|
45132
45459
|
{
|
|
45133
45460
|
"data-slot": "field-description",
|
|
@@ -45146,7 +45473,7 @@ function FieldSeparator({
|
|
|
45146
45473
|
className,
|
|
45147
45474
|
...props
|
|
45148
45475
|
}) {
|
|
45149
|
-
return /* @__PURE__ */
|
|
45476
|
+
return /* @__PURE__ */ jsxs138(
|
|
45150
45477
|
"div",
|
|
45151
45478
|
{
|
|
45152
45479
|
"data-slot": "field-separator",
|
|
@@ -45157,8 +45484,8 @@ function FieldSeparator({
|
|
|
45157
45484
|
),
|
|
45158
45485
|
...props,
|
|
45159
45486
|
children: [
|
|
45160
|
-
/* @__PURE__ */
|
|
45161
|
-
children && /* @__PURE__ */
|
|
45487
|
+
/* @__PURE__ */ jsx181(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
45488
|
+
children && /* @__PURE__ */ jsx181(
|
|
45162
45489
|
"span",
|
|
45163
45490
|
{
|
|
45164
45491
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -45186,14 +45513,14 @@ function FieldError({
|
|
|
45186
45513
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
45187
45514
|
return errors[0].message;
|
|
45188
45515
|
}
|
|
45189
|
-
return /* @__PURE__ */
|
|
45190
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
45516
|
+
return /* @__PURE__ */ jsx181("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
45517
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx181("li", { children: error.message }, index)
|
|
45191
45518
|
) });
|
|
45192
45519
|
}, [children, errors]);
|
|
45193
45520
|
if (!content) {
|
|
45194
45521
|
return null;
|
|
45195
45522
|
}
|
|
45196
|
-
return /* @__PURE__ */
|
|
45523
|
+
return /* @__PURE__ */ jsx181(
|
|
45197
45524
|
"div",
|
|
45198
45525
|
{
|
|
45199
45526
|
role: "alert",
|
|
@@ -45207,9 +45534,9 @@ function FieldError({
|
|
|
45207
45534
|
|
|
45208
45535
|
// src/components/ui/input-group.tsx
|
|
45209
45536
|
import { cva as cva11 } from "class-variance-authority";
|
|
45210
|
-
import { jsx as
|
|
45537
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
45211
45538
|
function InputGroup({ className, ...props }) {
|
|
45212
|
-
return /* @__PURE__ */
|
|
45539
|
+
return /* @__PURE__ */ jsx182(
|
|
45213
45540
|
"div",
|
|
45214
45541
|
{
|
|
45215
45542
|
"data-slot": "input-group",
|
|
@@ -45253,7 +45580,7 @@ function InputGroupAddon({
|
|
|
45253
45580
|
align = "inline-start",
|
|
45254
45581
|
...props
|
|
45255
45582
|
}) {
|
|
45256
|
-
return /* @__PURE__ */
|
|
45583
|
+
return /* @__PURE__ */ jsx182(
|
|
45257
45584
|
"div",
|
|
45258
45585
|
{
|
|
45259
45586
|
role: "group",
|
|
@@ -45293,7 +45620,7 @@ function InputGroupButton({
|
|
|
45293
45620
|
size = "xs",
|
|
45294
45621
|
...props
|
|
45295
45622
|
}) {
|
|
45296
|
-
return /* @__PURE__ */
|
|
45623
|
+
return /* @__PURE__ */ jsx182(
|
|
45297
45624
|
Button,
|
|
45298
45625
|
{
|
|
45299
45626
|
type,
|
|
@@ -45305,7 +45632,7 @@ function InputGroupButton({
|
|
|
45305
45632
|
);
|
|
45306
45633
|
}
|
|
45307
45634
|
function InputGroupText({ className, ...props }) {
|
|
45308
|
-
return /* @__PURE__ */
|
|
45635
|
+
return /* @__PURE__ */ jsx182(
|
|
45309
45636
|
"span",
|
|
45310
45637
|
{
|
|
45311
45638
|
className: cn(
|
|
@@ -45320,7 +45647,7 @@ function InputGroupInput({
|
|
|
45320
45647
|
className,
|
|
45321
45648
|
...props
|
|
45322
45649
|
}) {
|
|
45323
|
-
return /* @__PURE__ */
|
|
45650
|
+
return /* @__PURE__ */ jsx182(
|
|
45324
45651
|
Input,
|
|
45325
45652
|
{
|
|
45326
45653
|
"data-slot": "input-group-control",
|
|
@@ -45336,7 +45663,7 @@ function InputGroupTextarea({
|
|
|
45336
45663
|
className,
|
|
45337
45664
|
...props
|
|
45338
45665
|
}) {
|
|
45339
|
-
return /* @__PURE__ */
|
|
45666
|
+
return /* @__PURE__ */ jsx182(
|
|
45340
45667
|
Textarea,
|
|
45341
45668
|
{
|
|
45342
45669
|
"data-slot": "input-group-control",
|
|
@@ -45352,9 +45679,9 @@ function InputGroupTextarea({
|
|
|
45352
45679
|
// src/components/ui/item.tsx
|
|
45353
45680
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
45354
45681
|
import { cva as cva12 } from "class-variance-authority";
|
|
45355
|
-
import { jsx as
|
|
45682
|
+
import { jsx as jsx183 } from "react/jsx-runtime";
|
|
45356
45683
|
function ItemGroup({ className, ...props }) {
|
|
45357
|
-
return /* @__PURE__ */
|
|
45684
|
+
return /* @__PURE__ */ jsx183(
|
|
45358
45685
|
"div",
|
|
45359
45686
|
{
|
|
45360
45687
|
role: "list",
|
|
@@ -45368,7 +45695,7 @@ function ItemSeparator({
|
|
|
45368
45695
|
className,
|
|
45369
45696
|
...props
|
|
45370
45697
|
}) {
|
|
45371
|
-
return /* @__PURE__ */
|
|
45698
|
+
return /* @__PURE__ */ jsx183(
|
|
45372
45699
|
Separator2,
|
|
45373
45700
|
{
|
|
45374
45701
|
"data-slot": "item-separator",
|
|
@@ -45406,7 +45733,7 @@ function Item8({
|
|
|
45406
45733
|
...props
|
|
45407
45734
|
}) {
|
|
45408
45735
|
const Comp = asChild ? Slot5 : "div";
|
|
45409
|
-
return /* @__PURE__ */
|
|
45736
|
+
return /* @__PURE__ */ jsx183(
|
|
45410
45737
|
Comp,
|
|
45411
45738
|
{
|
|
45412
45739
|
"data-slot": "item",
|
|
@@ -45437,7 +45764,7 @@ function ItemMedia({
|
|
|
45437
45764
|
variant = "default",
|
|
45438
45765
|
...props
|
|
45439
45766
|
}) {
|
|
45440
|
-
return /* @__PURE__ */
|
|
45767
|
+
return /* @__PURE__ */ jsx183(
|
|
45441
45768
|
"div",
|
|
45442
45769
|
{
|
|
45443
45770
|
"data-slot": "item-media",
|
|
@@ -45448,7 +45775,7 @@ function ItemMedia({
|
|
|
45448
45775
|
);
|
|
45449
45776
|
}
|
|
45450
45777
|
function ItemContent({ className, ...props }) {
|
|
45451
|
-
return /* @__PURE__ */
|
|
45778
|
+
return /* @__PURE__ */ jsx183(
|
|
45452
45779
|
"div",
|
|
45453
45780
|
{
|
|
45454
45781
|
"data-slot": "item-content",
|
|
@@ -45461,7 +45788,7 @@ function ItemContent({ className, ...props }) {
|
|
|
45461
45788
|
);
|
|
45462
45789
|
}
|
|
45463
45790
|
function ItemTitle({ className, ...props }) {
|
|
45464
|
-
return /* @__PURE__ */
|
|
45791
|
+
return /* @__PURE__ */ jsx183(
|
|
45465
45792
|
"div",
|
|
45466
45793
|
{
|
|
45467
45794
|
"data-slot": "item-title",
|
|
@@ -45474,7 +45801,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
45474
45801
|
);
|
|
45475
45802
|
}
|
|
45476
45803
|
function ItemDescription({ className, ...props }) {
|
|
45477
|
-
return /* @__PURE__ */
|
|
45804
|
+
return /* @__PURE__ */ jsx183(
|
|
45478
45805
|
"p",
|
|
45479
45806
|
{
|
|
45480
45807
|
"data-slot": "item-description",
|
|
@@ -45488,7 +45815,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
45488
45815
|
);
|
|
45489
45816
|
}
|
|
45490
45817
|
function ItemActions({ className, ...props }) {
|
|
45491
|
-
return /* @__PURE__ */
|
|
45818
|
+
return /* @__PURE__ */ jsx183(
|
|
45492
45819
|
"div",
|
|
45493
45820
|
{
|
|
45494
45821
|
"data-slot": "item-actions",
|
|
@@ -45498,7 +45825,7 @@ function ItemActions({ className, ...props }) {
|
|
|
45498
45825
|
);
|
|
45499
45826
|
}
|
|
45500
45827
|
function ItemHeader({ className, ...props }) {
|
|
45501
|
-
return /* @__PURE__ */
|
|
45828
|
+
return /* @__PURE__ */ jsx183(
|
|
45502
45829
|
"div",
|
|
45503
45830
|
{
|
|
45504
45831
|
"data-slot": "item-header",
|
|
@@ -45511,7 +45838,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
45511
45838
|
);
|
|
45512
45839
|
}
|
|
45513
45840
|
function ItemFooter({ className, ...props }) {
|
|
45514
|
-
return /* @__PURE__ */
|
|
45841
|
+
return /* @__PURE__ */ jsx183(
|
|
45515
45842
|
"div",
|
|
45516
45843
|
{
|
|
45517
45844
|
"data-slot": "item-footer",
|
|
@@ -45525,9 +45852,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
45525
45852
|
}
|
|
45526
45853
|
|
|
45527
45854
|
// src/components/ui/kbd.tsx
|
|
45528
|
-
import { jsx as
|
|
45855
|
+
import { jsx as jsx184 } from "react/jsx-runtime";
|
|
45529
45856
|
function Kbd({ className, ...props }) {
|
|
45530
|
-
return /* @__PURE__ */
|
|
45857
|
+
return /* @__PURE__ */ jsx184(
|
|
45531
45858
|
"kbd",
|
|
45532
45859
|
{
|
|
45533
45860
|
"data-slot": "kbd",
|
|
@@ -45542,7 +45869,7 @@ function Kbd({ className, ...props }) {
|
|
|
45542
45869
|
);
|
|
45543
45870
|
}
|
|
45544
45871
|
function KbdGroup({ className, ...props }) {
|
|
45545
|
-
return /* @__PURE__ */
|
|
45872
|
+
return /* @__PURE__ */ jsx184(
|
|
45546
45873
|
"kbd",
|
|
45547
45874
|
{
|
|
45548
45875
|
"data-slot": "kbd-group",
|
|
@@ -45575,7 +45902,7 @@ function useIsMobile() {
|
|
|
45575
45902
|
}
|
|
45576
45903
|
|
|
45577
45904
|
// src/components/ui/sidebar.tsx
|
|
45578
|
-
import { jsx as
|
|
45905
|
+
import { jsx as jsx185, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
45579
45906
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
45580
45907
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
45581
45908
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -45642,7 +45969,7 @@ var SidebarProvider = React116.forwardRef(
|
|
|
45642
45969
|
}),
|
|
45643
45970
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
45644
45971
|
);
|
|
45645
|
-
return /* @__PURE__ */
|
|
45972
|
+
return /* @__PURE__ */ jsx185(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx185(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx185(
|
|
45646
45973
|
"div",
|
|
45647
45974
|
{
|
|
45648
45975
|
style: {
|
|
@@ -45673,7 +46000,7 @@ var Sidebar = React116.forwardRef(
|
|
|
45673
46000
|
}, ref) => {
|
|
45674
46001
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
45675
46002
|
if (collapsible === "none") {
|
|
45676
|
-
return /* @__PURE__ */
|
|
46003
|
+
return /* @__PURE__ */ jsx185(
|
|
45677
46004
|
"div",
|
|
45678
46005
|
{
|
|
45679
46006
|
className: cn(
|
|
@@ -45687,7 +46014,7 @@ var Sidebar = React116.forwardRef(
|
|
|
45687
46014
|
);
|
|
45688
46015
|
}
|
|
45689
46016
|
if (isMobile) {
|
|
45690
|
-
return /* @__PURE__ */
|
|
46017
|
+
return /* @__PURE__ */ jsx185(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs139(
|
|
45691
46018
|
SheetContent,
|
|
45692
46019
|
{
|
|
45693
46020
|
"data-sidebar": "sidebar",
|
|
@@ -45698,16 +46025,16 @@ var Sidebar = React116.forwardRef(
|
|
|
45698
46025
|
},
|
|
45699
46026
|
side,
|
|
45700
46027
|
children: [
|
|
45701
|
-
/* @__PURE__ */
|
|
45702
|
-
/* @__PURE__ */
|
|
45703
|
-
/* @__PURE__ */
|
|
46028
|
+
/* @__PURE__ */ jsxs139(SheetHeader, { className: "sr-only", children: [
|
|
46029
|
+
/* @__PURE__ */ jsx185(SheetTitle, { children: "Sidebar" }),
|
|
46030
|
+
/* @__PURE__ */ jsx185(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
45704
46031
|
] }),
|
|
45705
|
-
/* @__PURE__ */
|
|
46032
|
+
/* @__PURE__ */ jsx185("div", { className: "flex h-full w-full flex-col", children })
|
|
45706
46033
|
]
|
|
45707
46034
|
}
|
|
45708
46035
|
) });
|
|
45709
46036
|
}
|
|
45710
|
-
return /* @__PURE__ */
|
|
46037
|
+
return /* @__PURE__ */ jsxs139(
|
|
45711
46038
|
"div",
|
|
45712
46039
|
{
|
|
45713
46040
|
ref,
|
|
@@ -45717,7 +46044,7 @@ var Sidebar = React116.forwardRef(
|
|
|
45717
46044
|
"data-variant": variant,
|
|
45718
46045
|
"data-side": side,
|
|
45719
46046
|
children: [
|
|
45720
|
-
/* @__PURE__ */
|
|
46047
|
+
/* @__PURE__ */ jsx185(
|
|
45721
46048
|
"div",
|
|
45722
46049
|
{
|
|
45723
46050
|
className: cn(
|
|
@@ -45728,7 +46055,7 @@ var Sidebar = React116.forwardRef(
|
|
|
45728
46055
|
)
|
|
45729
46056
|
}
|
|
45730
46057
|
),
|
|
45731
|
-
/* @__PURE__ */
|
|
46058
|
+
/* @__PURE__ */ jsx185(
|
|
45732
46059
|
"div",
|
|
45733
46060
|
{
|
|
45734
46061
|
className: cn(
|
|
@@ -45739,7 +46066,7 @@ var Sidebar = React116.forwardRef(
|
|
|
45739
46066
|
className
|
|
45740
46067
|
),
|
|
45741
46068
|
...props,
|
|
45742
|
-
children: /* @__PURE__ */
|
|
46069
|
+
children: /* @__PURE__ */ jsx185(
|
|
45743
46070
|
"div",
|
|
45744
46071
|
{
|
|
45745
46072
|
"data-sidebar": "sidebar",
|
|
@@ -45757,7 +46084,7 @@ var Sidebar = React116.forwardRef(
|
|
|
45757
46084
|
Sidebar.displayName = "Sidebar";
|
|
45758
46085
|
var SidebarTrigger = React116.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
45759
46086
|
const { toggleSidebar } = useSidebar();
|
|
45760
|
-
return /* @__PURE__ */
|
|
46087
|
+
return /* @__PURE__ */ jsxs139(
|
|
45761
46088
|
Button,
|
|
45762
46089
|
{
|
|
45763
46090
|
ref,
|
|
@@ -45771,8 +46098,8 @@ var SidebarTrigger = React116.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
45771
46098
|
},
|
|
45772
46099
|
...props,
|
|
45773
46100
|
children: [
|
|
45774
|
-
/* @__PURE__ */
|
|
45775
|
-
/* @__PURE__ */
|
|
46101
|
+
/* @__PURE__ */ jsx185(PanelLeft, {}),
|
|
46102
|
+
/* @__PURE__ */ jsx185("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
45776
46103
|
]
|
|
45777
46104
|
}
|
|
45778
46105
|
);
|
|
@@ -45780,7 +46107,7 @@ var SidebarTrigger = React116.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
45780
46107
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
45781
46108
|
var SidebarRail = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45782
46109
|
const { toggleSidebar } = useSidebar();
|
|
45783
|
-
return /* @__PURE__ */
|
|
46110
|
+
return /* @__PURE__ */ jsx185(
|
|
45784
46111
|
"button",
|
|
45785
46112
|
{
|
|
45786
46113
|
ref,
|
|
@@ -45804,7 +46131,7 @@ var SidebarRail = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45804
46131
|
});
|
|
45805
46132
|
SidebarRail.displayName = "SidebarRail";
|
|
45806
46133
|
var SidebarInset = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45807
|
-
return /* @__PURE__ */
|
|
46134
|
+
return /* @__PURE__ */ jsx185(
|
|
45808
46135
|
"main",
|
|
45809
46136
|
{
|
|
45810
46137
|
ref,
|
|
@@ -45819,7 +46146,7 @@ var SidebarInset = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45819
46146
|
});
|
|
45820
46147
|
SidebarInset.displayName = "SidebarInset";
|
|
45821
46148
|
var SidebarInput = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45822
|
-
return /* @__PURE__ */
|
|
46149
|
+
return /* @__PURE__ */ jsx185(
|
|
45823
46150
|
Input,
|
|
45824
46151
|
{
|
|
45825
46152
|
ref,
|
|
@@ -45834,7 +46161,7 @@ var SidebarInput = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45834
46161
|
});
|
|
45835
46162
|
SidebarInput.displayName = "SidebarInput";
|
|
45836
46163
|
var SidebarHeader = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45837
|
-
return /* @__PURE__ */
|
|
46164
|
+
return /* @__PURE__ */ jsx185(
|
|
45838
46165
|
"div",
|
|
45839
46166
|
{
|
|
45840
46167
|
ref,
|
|
@@ -45846,7 +46173,7 @@ var SidebarHeader = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45846
46173
|
});
|
|
45847
46174
|
SidebarHeader.displayName = "SidebarHeader";
|
|
45848
46175
|
var SidebarFooter = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45849
|
-
return /* @__PURE__ */
|
|
46176
|
+
return /* @__PURE__ */ jsx185(
|
|
45850
46177
|
"div",
|
|
45851
46178
|
{
|
|
45852
46179
|
ref,
|
|
@@ -45858,7 +46185,7 @@ var SidebarFooter = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45858
46185
|
});
|
|
45859
46186
|
SidebarFooter.displayName = "SidebarFooter";
|
|
45860
46187
|
var SidebarSeparator = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45861
|
-
return /* @__PURE__ */
|
|
46188
|
+
return /* @__PURE__ */ jsx185(
|
|
45862
46189
|
Separator2,
|
|
45863
46190
|
{
|
|
45864
46191
|
ref,
|
|
@@ -45870,7 +46197,7 @@ var SidebarSeparator = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45870
46197
|
});
|
|
45871
46198
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
45872
46199
|
var SidebarContent = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45873
|
-
return /* @__PURE__ */
|
|
46200
|
+
return /* @__PURE__ */ jsx185(
|
|
45874
46201
|
"div",
|
|
45875
46202
|
{
|
|
45876
46203
|
ref,
|
|
@@ -45885,7 +46212,7 @@ var SidebarContent = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45885
46212
|
});
|
|
45886
46213
|
SidebarContent.displayName = "SidebarContent";
|
|
45887
46214
|
var SidebarGroup = React116.forwardRef(({ className, ...props }, ref) => {
|
|
45888
|
-
return /* @__PURE__ */
|
|
46215
|
+
return /* @__PURE__ */ jsx185(
|
|
45889
46216
|
"div",
|
|
45890
46217
|
{
|
|
45891
46218
|
ref,
|
|
@@ -45898,7 +46225,7 @@ var SidebarGroup = React116.forwardRef(({ className, ...props }, ref) => {
|
|
|
45898
46225
|
SidebarGroup.displayName = "SidebarGroup";
|
|
45899
46226
|
var SidebarGroupLabel = React116.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
45900
46227
|
const Comp = asChild ? Slot6 : "div";
|
|
45901
|
-
return /* @__PURE__ */
|
|
46228
|
+
return /* @__PURE__ */ jsx185(
|
|
45902
46229
|
Comp,
|
|
45903
46230
|
{
|
|
45904
46231
|
ref,
|
|
@@ -45915,7 +46242,7 @@ var SidebarGroupLabel = React116.forwardRef(({ className, asChild = false, ...pr
|
|
|
45915
46242
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
45916
46243
|
var SidebarGroupAction = React116.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
45917
46244
|
const Comp = asChild ? Slot6 : "button";
|
|
45918
|
-
return /* @__PURE__ */
|
|
46245
|
+
return /* @__PURE__ */ jsx185(
|
|
45919
46246
|
Comp,
|
|
45920
46247
|
{
|
|
45921
46248
|
ref,
|
|
@@ -45932,7 +46259,7 @@ var SidebarGroupAction = React116.forwardRef(({ className, asChild = false, ...p
|
|
|
45932
46259
|
);
|
|
45933
46260
|
});
|
|
45934
46261
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
45935
|
-
var SidebarGroupContent = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
46262
|
+
var SidebarGroupContent = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx185(
|
|
45936
46263
|
"div",
|
|
45937
46264
|
{
|
|
45938
46265
|
ref,
|
|
@@ -45942,7 +46269,7 @@ var SidebarGroupContent = React116.forwardRef(({ className, ...props }, ref) =>
|
|
|
45942
46269
|
}
|
|
45943
46270
|
));
|
|
45944
46271
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
45945
|
-
var SidebarMenu = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
46272
|
+
var SidebarMenu = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx185(
|
|
45946
46273
|
"ul",
|
|
45947
46274
|
{
|
|
45948
46275
|
ref,
|
|
@@ -45952,7 +46279,7 @@ var SidebarMenu = React116.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
45952
46279
|
}
|
|
45953
46280
|
));
|
|
45954
46281
|
SidebarMenu.displayName = "SidebarMenu";
|
|
45955
|
-
var SidebarMenuItem = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
46282
|
+
var SidebarMenuItem = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx185(
|
|
45956
46283
|
"li",
|
|
45957
46284
|
{
|
|
45958
46285
|
ref,
|
|
@@ -45994,7 +46321,7 @@ var SidebarMenuButton = React116.forwardRef(
|
|
|
45994
46321
|
}, ref) => {
|
|
45995
46322
|
const Comp = asChild ? Slot6 : "button";
|
|
45996
46323
|
const { isMobile, state } = useSidebar();
|
|
45997
|
-
const button = /* @__PURE__ */
|
|
46324
|
+
const button = /* @__PURE__ */ jsx185(
|
|
45998
46325
|
Comp,
|
|
45999
46326
|
{
|
|
46000
46327
|
ref,
|
|
@@ -46013,9 +46340,9 @@ var SidebarMenuButton = React116.forwardRef(
|
|
|
46013
46340
|
children: tooltip
|
|
46014
46341
|
};
|
|
46015
46342
|
}
|
|
46016
|
-
return /* @__PURE__ */
|
|
46017
|
-
/* @__PURE__ */
|
|
46018
|
-
/* @__PURE__ */
|
|
46343
|
+
return /* @__PURE__ */ jsxs139(Tooltip, { children: [
|
|
46344
|
+
/* @__PURE__ */ jsx185(TooltipTrigger, { asChild: true, children: button }),
|
|
46345
|
+
/* @__PURE__ */ jsx185(
|
|
46019
46346
|
TooltipContent,
|
|
46020
46347
|
{
|
|
46021
46348
|
side: "right",
|
|
@@ -46030,7 +46357,7 @@ var SidebarMenuButton = React116.forwardRef(
|
|
|
46030
46357
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
46031
46358
|
var SidebarMenuAction = React116.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
46032
46359
|
const Comp = asChild ? Slot6 : "button";
|
|
46033
|
-
return /* @__PURE__ */
|
|
46360
|
+
return /* @__PURE__ */ jsx185(
|
|
46034
46361
|
Comp,
|
|
46035
46362
|
{
|
|
46036
46363
|
ref,
|
|
@@ -46051,7 +46378,7 @@ var SidebarMenuAction = React116.forwardRef(({ className, asChild = false, showO
|
|
|
46051
46378
|
);
|
|
46052
46379
|
});
|
|
46053
46380
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
46054
|
-
var SidebarMenuBadge = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
46381
|
+
var SidebarMenuBadge = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx185(
|
|
46055
46382
|
"div",
|
|
46056
46383
|
{
|
|
46057
46384
|
ref,
|
|
@@ -46073,7 +46400,7 @@ var SidebarMenuSkeleton = React116.forwardRef(({ className, showIcon = false, ..
|
|
|
46073
46400
|
const width = React116.useMemo(() => {
|
|
46074
46401
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
46075
46402
|
}, []);
|
|
46076
|
-
return /* @__PURE__ */
|
|
46403
|
+
return /* @__PURE__ */ jsxs139(
|
|
46077
46404
|
"div",
|
|
46078
46405
|
{
|
|
46079
46406
|
ref,
|
|
@@ -46081,14 +46408,14 @@ var SidebarMenuSkeleton = React116.forwardRef(({ className, showIcon = false, ..
|
|
|
46081
46408
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
46082
46409
|
...props,
|
|
46083
46410
|
children: [
|
|
46084
|
-
showIcon && /* @__PURE__ */
|
|
46411
|
+
showIcon && /* @__PURE__ */ jsx185(
|
|
46085
46412
|
Skeleton,
|
|
46086
46413
|
{
|
|
46087
46414
|
className: "size-4 rounded-md",
|
|
46088
46415
|
"data-sidebar": "menu-skeleton-icon"
|
|
46089
46416
|
}
|
|
46090
46417
|
),
|
|
46091
|
-
/* @__PURE__ */
|
|
46418
|
+
/* @__PURE__ */ jsx185(
|
|
46092
46419
|
Skeleton,
|
|
46093
46420
|
{
|
|
46094
46421
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -46103,7 +46430,7 @@ var SidebarMenuSkeleton = React116.forwardRef(({ className, showIcon = false, ..
|
|
|
46103
46430
|
);
|
|
46104
46431
|
});
|
|
46105
46432
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
46106
|
-
var SidebarMenuSub = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
46433
|
+
var SidebarMenuSub = React116.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx185(
|
|
46107
46434
|
"ul",
|
|
46108
46435
|
{
|
|
46109
46436
|
ref,
|
|
@@ -46117,11 +46444,11 @@ var SidebarMenuSub = React116.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
46117
46444
|
}
|
|
46118
46445
|
));
|
|
46119
46446
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
46120
|
-
var SidebarMenuSubItem = React116.forwardRef(({ ...props }, ref) => /* @__PURE__ */
|
|
46447
|
+
var SidebarMenuSubItem = React116.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx185("li", { ref, ...props }));
|
|
46121
46448
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
46122
46449
|
var SidebarMenuSubButton = React116.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
46123
46450
|
const Comp = asChild ? Slot6 : "a";
|
|
46124
|
-
return /* @__PURE__ */
|
|
46451
|
+
return /* @__PURE__ */ jsx185(
|
|
46125
46452
|
Comp,
|
|
46126
46453
|
{
|
|
46127
46454
|
ref,
|
|
@@ -46145,20 +46472,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
46145
46472
|
// src/components/ui/sonner.tsx
|
|
46146
46473
|
import { useTheme } from "next-themes";
|
|
46147
46474
|
import { Toaster as Sonner } from "sonner";
|
|
46148
|
-
import { jsx as
|
|
46475
|
+
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
46149
46476
|
var Toaster = ({ ...props }) => {
|
|
46150
46477
|
const { theme = "system" } = useTheme();
|
|
46151
|
-
return /* @__PURE__ */
|
|
46478
|
+
return /* @__PURE__ */ jsx186(
|
|
46152
46479
|
Sonner,
|
|
46153
46480
|
{
|
|
46154
46481
|
theme,
|
|
46155
46482
|
className: "toaster group",
|
|
46156
46483
|
icons: {
|
|
46157
|
-
success: /* @__PURE__ */
|
|
46158
|
-
info: /* @__PURE__ */
|
|
46159
|
-
warning: /* @__PURE__ */
|
|
46160
|
-
error: /* @__PURE__ */
|
|
46161
|
-
loading: /* @__PURE__ */
|
|
46484
|
+
success: /* @__PURE__ */ jsx186(CircleCheck, { className: "h-4 w-4" }),
|
|
46485
|
+
info: /* @__PURE__ */ jsx186(Info, { className: "h-4 w-4" }),
|
|
46486
|
+
warning: /* @__PURE__ */ jsx186(TriangleAlert, { className: "h-4 w-4" }),
|
|
46487
|
+
error: /* @__PURE__ */ jsx186(OctagonX, { className: "h-4 w-4" }),
|
|
46488
|
+
loading: /* @__PURE__ */ jsx186(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
46162
46489
|
},
|
|
46163
46490
|
toastOptions: {
|
|
46164
46491
|
classNames: {
|
|
@@ -46176,24 +46503,24 @@ var Toaster = ({ ...props }) => {
|
|
|
46176
46503
|
// src/components/ui/toggle-group.tsx
|
|
46177
46504
|
import * as React117 from "react";
|
|
46178
46505
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
46179
|
-
import { jsx as
|
|
46506
|
+
import { jsx as jsx187 } from "react/jsx-runtime";
|
|
46180
46507
|
var ToggleGroupContext = React117.createContext({
|
|
46181
46508
|
size: "default",
|
|
46182
46509
|
variant: "default"
|
|
46183
46510
|
});
|
|
46184
|
-
var ToggleGroup = React117.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */
|
|
46511
|
+
var ToggleGroup = React117.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx187(
|
|
46185
46512
|
ToggleGroupPrimitive.Root,
|
|
46186
46513
|
{
|
|
46187
46514
|
ref,
|
|
46188
46515
|
className: cn("flex items-center justify-center gap-1", className),
|
|
46189
46516
|
...props,
|
|
46190
|
-
children: /* @__PURE__ */
|
|
46517
|
+
children: /* @__PURE__ */ jsx187(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
46191
46518
|
}
|
|
46192
46519
|
));
|
|
46193
46520
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
46194
46521
|
var ToggleGroupItem = React117.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
46195
46522
|
const context = React117.useContext(ToggleGroupContext);
|
|
46196
|
-
return /* @__PURE__ */
|
|
46523
|
+
return /* @__PURE__ */ jsx187(
|
|
46197
46524
|
ToggleGroupPrimitive.Item,
|
|
46198
46525
|
{
|
|
46199
46526
|
ref,
|
|
@@ -46212,7 +46539,7 @@ var ToggleGroupItem = React117.forwardRef(({ className, children, variant, size,
|
|
|
46212
46539
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
46213
46540
|
|
|
46214
46541
|
// src/render/PXEngineRenderer.tsx
|
|
46215
|
-
import { jsx as
|
|
46542
|
+
import { jsx as jsx188, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
46216
46543
|
var MOLECULE_REFS = new Set(Object.values(molecules_exports));
|
|
46217
46544
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
46218
46545
|
// Form components - require FormField + FormItem context
|
|
@@ -46318,24 +46645,24 @@ var REGISTERED_COMPONENTS = /* @__PURE__ */ new Set([
|
|
|
46318
46645
|
]);
|
|
46319
46646
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
46320
46647
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
46321
|
-
return /* @__PURE__ */
|
|
46648
|
+
return /* @__PURE__ */ jsxs140(
|
|
46322
46649
|
"div",
|
|
46323
46650
|
{
|
|
46324
46651
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
46325
46652
|
children: [
|
|
46326
|
-
/* @__PURE__ */
|
|
46327
|
-
/* @__PURE__ */
|
|
46328
|
-
/* @__PURE__ */
|
|
46329
|
-
/* @__PURE__ */
|
|
46653
|
+
/* @__PURE__ */ jsxs140("div", { className: "flex items-start gap-2", children: [
|
|
46654
|
+
/* @__PURE__ */ jsx188("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
46655
|
+
/* @__PURE__ */ jsxs140("div", { className: "flex-1", children: [
|
|
46656
|
+
/* @__PURE__ */ jsxs140("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
46330
46657
|
"Invalid Component: ",
|
|
46331
46658
|
componentName
|
|
46332
46659
|
] }),
|
|
46333
|
-
/* @__PURE__ */
|
|
46660
|
+
/* @__PURE__ */ jsx188("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
46334
46661
|
] })
|
|
46335
46662
|
] }),
|
|
46336
|
-
/* @__PURE__ */
|
|
46337
|
-
/* @__PURE__ */
|
|
46338
|
-
/* @__PURE__ */
|
|
46663
|
+
/* @__PURE__ */ jsxs140("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
46664
|
+
/* @__PURE__ */ jsx188("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
46665
|
+
/* @__PURE__ */ jsx188("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
46339
46666
|
] })
|
|
46340
46667
|
]
|
|
46341
46668
|
},
|
|
@@ -46440,7 +46767,7 @@ var PXEngineRenderer = ({
|
|
|
46440
46767
|
const root = schema.root || schema;
|
|
46441
46768
|
const renderRecursive = (component, index) => {
|
|
46442
46769
|
if (Array.isArray(component)) {
|
|
46443
|
-
return /* @__PURE__ */
|
|
46770
|
+
return /* @__PURE__ */ jsx188(React118.Fragment, { children: component.map((child, idx) => renderRecursive(child, idx)) }, index !== void 0 ? `array-${index}` : "array-root");
|
|
46444
46771
|
}
|
|
46445
46772
|
if (typeof component === "string" || typeof component === "number") {
|
|
46446
46773
|
return component;
|
|
@@ -46563,7 +46890,7 @@ var PXEngineRenderer = ({
|
|
|
46563
46890
|
const effectiveOnAction = finalProps.onAction ?? onAction;
|
|
46564
46891
|
delete finalProps.onAction;
|
|
46565
46892
|
if (isAtomWithRenderProp) {
|
|
46566
|
-
return /* @__PURE__ */
|
|
46893
|
+
return /* @__PURE__ */ jsx188(
|
|
46567
46894
|
TargetComponent,
|
|
46568
46895
|
{
|
|
46569
46896
|
...finalProps,
|
|
@@ -46575,7 +46902,7 @@ var PXEngineRenderer = ({
|
|
|
46575
46902
|
uniqueKey
|
|
46576
46903
|
);
|
|
46577
46904
|
} else {
|
|
46578
|
-
return /* @__PURE__ */
|
|
46905
|
+
return /* @__PURE__ */ jsx188(
|
|
46579
46906
|
TargetComponent,
|
|
46580
46907
|
{
|
|
46581
46908
|
...finalProps,
|
|
@@ -46587,7 +46914,7 @@ var PXEngineRenderer = ({
|
|
|
46587
46914
|
);
|
|
46588
46915
|
}
|
|
46589
46916
|
};
|
|
46590
|
-
return /* @__PURE__ */
|
|
46917
|
+
return /* @__PURE__ */ jsx188(WidgetThemeContext.Provider, { value: effectiveTheme, children: /* @__PURE__ */ jsx188("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) }) });
|
|
46591
46918
|
};
|
|
46592
46919
|
export {
|
|
46593
46920
|
Accordion,
|
|
@@ -46611,6 +46938,7 @@ export {
|
|
|
46611
46938
|
AlertDialogTitle,
|
|
46612
46939
|
AlertDialogTrigger,
|
|
46613
46940
|
AlertTitle,
|
|
46941
|
+
AnalyticsChart,
|
|
46614
46942
|
ApprovalCard,
|
|
46615
46943
|
ArrowToggleAtom,
|
|
46616
46944
|
AspectRatio,
|