@ultrst-armada/floks 1.2.5 → 1.2.6
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/package.json +8 -10
- package/packages/canvas-ui/dist/chunk-QRYNQ36L.js +123 -0
- package/packages/canvas-ui/dist/{chunk-OOTTFWXA.js → chunk-RH5NINIT.js} +1 -122
- package/packages/canvas-ui/dist/chunk-VESG3VP3.js +1522 -0
- package/packages/canvas-ui/dist/frnl-editable-node-graph/index.d.ts +110 -0
- package/packages/canvas-ui/dist/frnl-editable-node-graph/index.js +9 -0
- package/packages/canvas-ui/dist/index.d.ts +13 -2
- package/packages/canvas-ui/dist/index.js +62 -484
- package/packages/canvas-ui/dist/predictive/index.js +4 -2
- package/packages/canvas-ui/floks.manifest.json +25 -4
- package/packages/canvas-ui/package.json +11 -7
- package/packages/ui/dist/chunk-2SD6BIUX.js +0 -0
- package/packages/ui/dist/{chunk-YDOKOBRJ.js → chunk-DGZBP3ND.js} +106 -491
- package/packages/ui/dist/{chunk-2SFOC7KZ.js → chunk-KQAFKNQH.js} +77 -67
- package/packages/ui/dist/chunk-PH4NEHWR.js +99 -0
- package/packages/ui/dist/chunk-PRMOURNW.js +324 -0
- package/packages/ui/dist/{chunk-DT6DZU63.js → chunk-X67KXI3H.js} +190 -152
- package/packages/ui/dist/chunk-YVWJ4SW7.js +394 -0
- package/packages/ui/dist/components/auth/index.d.ts +56 -14
- package/packages/ui/dist/components/auth/index.js +12 -3
- package/packages/ui/dist/components/composite/index.js +1 -1
- package/packages/ui/dist/components/graph/index.d.ts +29 -0
- package/packages/ui/dist/components/graph/index.js +10 -0
- package/packages/ui/dist/components/layout/index.js +2 -2
- package/packages/ui/dist/components/settings/index.js +2 -2
- package/packages/ui/dist/components/tiles/index.d.ts +83 -0
- package/packages/ui/dist/components/tiles/index.js +10 -0
- package/packages/ui/dist/components/workspace/index.d.ts +108 -33
- package/packages/ui/dist/components/workspace/index.js +15 -3
- package/packages/ui/dist/frnl/index.js +9 -7
- package/packages/ui/dist/hierarchy/index.js +2 -2
- package/packages/ui/dist/index.d.ts +5 -2
- package/packages/ui/dist/index.js +68 -39
- package/packages/ui/floks.manifest.json +99 -17
- package/packages/ui/package.json +18 -3
- package/packages/ui/dist/{chunk-MYXPGPI3.js → chunk-GWW3BGOB.js} +3 -3
- package/packages/ui/dist/{chunk-TORWRS3V.js → chunk-SXRIBCJX.js} +3 -3
- package/packages/ui/dist/{chunk-NPIMIWVO.js → chunk-ZPQC46RO.js} +4 -4
|
@@ -6,393 +6,12 @@ import {
|
|
|
6
6
|
useBottomStrip
|
|
7
7
|
} from "./chunk-62ITRDJX.js";
|
|
8
8
|
|
|
9
|
-
// src/frnl/
|
|
9
|
+
// src/frnl/frnlControls.tsx
|
|
10
10
|
import { useId, useMemo } from "react";
|
|
11
11
|
import { defineFrnlComponent } from "@ultrst-armada/frnlts";
|
|
12
12
|
import { useFrnlComponent } from "@ultrst-armada/frnlts/react";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
var
|
|
15
|
-
name: "frnlButton",
|
|
16
|
-
states: {
|
|
17
|
-
idle: {
|
|
18
|
-
name: "idle",
|
|
19
|
-
events: { click: { functionId: "frnlButton.idle.click" } },
|
|
20
|
-
visualParameters: { opacity: 1 },
|
|
21
|
-
phases: {
|
|
22
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
23
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
24
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
hover: {
|
|
28
|
-
name: "hover",
|
|
29
|
-
events: { click: { functionId: "frnlButton.hover.click" } },
|
|
30
|
-
visualParameters: { opacity: 1 },
|
|
31
|
-
phases: {
|
|
32
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
33
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
34
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
active: {
|
|
38
|
-
name: "active",
|
|
39
|
-
events: { click: { functionId: "frnlButton.active.click" } },
|
|
40
|
-
visualParameters: { opacity: 1 },
|
|
41
|
-
phases: {
|
|
42
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
43
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
44
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
disabled: {
|
|
48
|
-
name: "disabled",
|
|
49
|
-
events: { click: { functionId: "frnlButton.disabled.click" } },
|
|
50
|
-
visualParameters: { opacity: 0.4 },
|
|
51
|
-
phases: {
|
|
52
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
53
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
54
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
loading: {
|
|
58
|
-
name: "loading",
|
|
59
|
-
events: { click: { functionId: "frnlButton.loading.click" } },
|
|
60
|
-
visualParameters: { opacity: 0.6 },
|
|
61
|
-
phases: {
|
|
62
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
63
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
64
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
var SIZE_CLASSES = {
|
|
70
|
-
xs: "px-1.5 py-0.5 text-[10px] gap-1 h-6",
|
|
71
|
-
sm: "px-2.5 py-1 text-xs gap-1.5 h-7",
|
|
72
|
-
md: "px-3.5 py-1.5 text-xs gap-2 h-8",
|
|
73
|
-
lg: "px-4 py-2 text-sm gap-2.5 h-10",
|
|
74
|
-
xl: "px-5 py-2.5 text-base gap-3 h-12"
|
|
75
|
-
};
|
|
76
|
-
var VARIANT_STYLES = {
|
|
77
|
-
primary: {
|
|
78
|
-
backgroundColor: "var(--skipo-bg-surface, #1e293b)",
|
|
79
|
-
borderColor: "var(--skipo-border-subtle, #334155)",
|
|
80
|
-
color: "var(--skipo-text-primary, #f8fafc)"
|
|
81
|
-
},
|
|
82
|
-
secondary: {
|
|
83
|
-
backgroundColor: "var(--skipo-bg-panel, #0f172a)",
|
|
84
|
-
borderColor: "var(--skipo-border-subtle, #334155)",
|
|
85
|
-
color: "var(--skipo-text-muted, #94a3b8)"
|
|
86
|
-
},
|
|
87
|
-
accent: {
|
|
88
|
-
backgroundColor: "var(--skipo-accent, #38bdf8)",
|
|
89
|
-
borderColor: "var(--skipo-accent-contrast, #0284c7)",
|
|
90
|
-
color: "#000000",
|
|
91
|
-
fontWeight: 700
|
|
92
|
-
},
|
|
93
|
-
dock: {
|
|
94
|
-
backgroundColor: "var(--skipo-bg-subtle, #1e293b)",
|
|
95
|
-
borderColor: "var(--skipo-border-color, #334155)",
|
|
96
|
-
color: "var(--skipo-text-primary, #f8fafc)"
|
|
97
|
-
},
|
|
98
|
-
danger: {
|
|
99
|
-
backgroundColor: "rgba(239, 68, 68, 0.15)",
|
|
100
|
-
borderColor: "rgba(239, 68, 68, 0.4)",
|
|
101
|
-
color: "#f87171"
|
|
102
|
-
},
|
|
103
|
-
success: {
|
|
104
|
-
backgroundColor: "rgba(16, 185, 129, 0.15)",
|
|
105
|
-
borderColor: "rgba(16, 185, 129, 0.4)",
|
|
106
|
-
color: "#34d399"
|
|
107
|
-
},
|
|
108
|
-
ghost: {
|
|
109
|
-
backgroundColor: "transparent",
|
|
110
|
-
borderColor: "transparent",
|
|
111
|
-
color: "var(--skipo-text-muted, #94a3b8)"
|
|
112
|
-
},
|
|
113
|
-
outline: {
|
|
114
|
-
backgroundColor: "transparent",
|
|
115
|
-
borderColor: "var(--skipo-border-subtle, #334155)",
|
|
116
|
-
color: "var(--skipo-text-primary, #f8fafc)"
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
var frnlButton = ({
|
|
120
|
-
id,
|
|
121
|
-
variant = "secondary",
|
|
122
|
-
size = "md",
|
|
123
|
-
label,
|
|
124
|
-
tooltip,
|
|
125
|
-
description,
|
|
126
|
-
isActive = false,
|
|
127
|
-
loading = false,
|
|
128
|
-
icon,
|
|
129
|
-
disabled = false,
|
|
130
|
-
children,
|
|
131
|
-
onClick,
|
|
132
|
-
onMouseEnter,
|
|
133
|
-
onMouseLeave,
|
|
134
|
-
onFocus,
|
|
135
|
-
onBlur,
|
|
136
|
-
className = "",
|
|
137
|
-
style,
|
|
138
|
-
...rest
|
|
139
|
-
}) => {
|
|
140
|
-
const store = useFloksFrnlStore();
|
|
141
|
-
const { setInspectionText } = useBottomStrip();
|
|
142
|
-
const generatedId = useId().replace(/[:/]/g, "");
|
|
143
|
-
const componentId = id ?? `frnlButton.${label ? label.toLowerCase().replace(/[^a-z0-9]/g, "-") : generatedId}`;
|
|
144
|
-
const resolvedState = disabled ? "disabled" : loading ? "loading" : isActive ? "active" : "idle";
|
|
145
|
-
const handlers = useMemo(
|
|
146
|
-
() => ({
|
|
147
|
-
"frnlButton.idle.click": (payload) => onClick?.(payload),
|
|
148
|
-
"frnlButton.hover.click": (payload) => onClick?.(payload),
|
|
149
|
-
"frnlButton.active.click": (payload) => onClick?.(payload),
|
|
150
|
-
"frnlButton.disabled.click": () => {
|
|
151
|
-
},
|
|
152
|
-
"frnlButton.loading.click": () => {
|
|
153
|
-
}
|
|
154
|
-
}),
|
|
155
|
-
[onClick]
|
|
156
|
-
);
|
|
157
|
-
const frnl = useFrnlComponent({
|
|
158
|
-
id: componentId,
|
|
159
|
-
definition: frnlButtonDefinition,
|
|
160
|
-
store,
|
|
161
|
-
state: resolvedState,
|
|
162
|
-
properties: { variant, size, label, isActive, disabled, loading },
|
|
163
|
-
handlers
|
|
164
|
-
});
|
|
165
|
-
const handleHoverStart = (e) => {
|
|
166
|
-
onMouseEnter?.(e);
|
|
167
|
-
const effLabel = label || tooltip || (typeof children === "string" ? children : void 0);
|
|
168
|
-
if (effLabel || description) {
|
|
169
|
-
setInspectionText(effLabel || null, description || null);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const handleHoverEnd = (e) => {
|
|
173
|
-
onMouseLeave?.(e);
|
|
174
|
-
setInspectionText(null);
|
|
175
|
-
};
|
|
176
|
-
return /* @__PURE__ */ jsxs(
|
|
177
|
-
"button",
|
|
178
|
-
{
|
|
179
|
-
...rest,
|
|
180
|
-
id: componentId,
|
|
181
|
-
type: "button",
|
|
182
|
-
disabled: disabled || loading,
|
|
183
|
-
"data-frnl-component": "frnlButton",
|
|
184
|
-
"data-frnl-state": frnl.state,
|
|
185
|
-
onClick: (e) => {
|
|
186
|
-
if (disabled || loading) return;
|
|
187
|
-
frnl.events.click(e);
|
|
188
|
-
},
|
|
189
|
-
onMouseEnter: handleHoverStart,
|
|
190
|
-
onMouseLeave: handleHoverEnd,
|
|
191
|
-
onFocus: (e) => {
|
|
192
|
-
onFocus?.(e);
|
|
193
|
-
const effLabel = label || tooltip || (typeof children === "string" ? children : void 0);
|
|
194
|
-
if (effLabel || description) setInspectionText(effLabel || null, description || null);
|
|
195
|
-
},
|
|
196
|
-
onBlur: (e) => {
|
|
197
|
-
onBlur?.(e);
|
|
198
|
-
setInspectionText(null);
|
|
199
|
-
},
|
|
200
|
-
className: `inline-flex items-center justify-center font-mono font-bold uppercase tracking-wider border rounded transition-all duration-150 select-none cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed active:scale-[0.98] ${SIZE_CLASSES[size]} ${className}`,
|
|
201
|
-
style: {
|
|
202
|
-
...VARIANT_STYLES[variant],
|
|
203
|
-
...isActive ? { borderColor: "var(--skipo-accent, #38bdf8)", boxShadow: "0 0 10px rgba(56, 189, 248, 0.25)" } : {},
|
|
204
|
-
...style
|
|
205
|
-
},
|
|
206
|
-
children: [
|
|
207
|
-
loading ? /* @__PURE__ */ jsx("span", { className: "w-3.5 h-3.5 border-2 border-current border-t-transparent rounded-full animate-spin shrink-0" }) : icon ? /* @__PURE__ */ jsx("span", { className: "shrink-0 flex items-center justify-center", children: icon }) : null,
|
|
208
|
-
children ? /* @__PURE__ */ jsx("span", { children }) : label ? /* @__PURE__ */ jsx("span", { children: label }) : null
|
|
209
|
-
]
|
|
210
|
-
}
|
|
211
|
-
);
|
|
212
|
-
};
|
|
213
|
-
frnlButton.displayName = "frnlButton";
|
|
214
|
-
|
|
215
|
-
// src/frnl/frnlTextInput.tsx
|
|
216
|
-
import { useId as useId2, useMemo as useMemo2 } from "react";
|
|
217
|
-
import { defineFrnlComponent as defineFrnlComponent2 } from "@ultrst-armada/frnlts";
|
|
218
|
-
import { useFrnlComponent as useFrnlComponent2 } from "@ultrst-armada/frnlts/react";
|
|
219
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
220
|
-
var frnlTextInputDefinition = defineFrnlComponent2({
|
|
221
|
-
name: "frnlTextInput",
|
|
222
|
-
states: {
|
|
223
|
-
idle: {
|
|
224
|
-
name: "idle",
|
|
225
|
-
events: {
|
|
226
|
-
change: { functionId: "frnlTextInput.idle.change" },
|
|
227
|
-
focus: { functionId: "frnlTextInput.idle.focus" }
|
|
228
|
-
},
|
|
229
|
-
visualParameters: { borderColor: "var(--skipo-border-subtle, #334155)" },
|
|
230
|
-
phases: {
|
|
231
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
232
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
233
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
focused: {
|
|
237
|
-
name: "focused",
|
|
238
|
-
events: {
|
|
239
|
-
change: { functionId: "frnlTextInput.focused.change" },
|
|
240
|
-
blur: { functionId: "frnlTextInput.focused.blur" }
|
|
241
|
-
},
|
|
242
|
-
visualParameters: { borderColor: "var(--skipo-accent, #38bdf8)" },
|
|
243
|
-
phases: {
|
|
244
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
245
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
246
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
error: {
|
|
250
|
-
name: "error",
|
|
251
|
-
events: {
|
|
252
|
-
change: { functionId: "frnlTextInput.error.change" }
|
|
253
|
-
},
|
|
254
|
-
visualParameters: { borderColor: "#ef4444" },
|
|
255
|
-
phases: {
|
|
256
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
257
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
258
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
disabled: {
|
|
262
|
-
name: "disabled",
|
|
263
|
-
events: {},
|
|
264
|
-
visualParameters: { opacity: 0.5 },
|
|
265
|
-
phases: {
|
|
266
|
-
attackPhase: { visualDefinition: { parameters: {} } },
|
|
267
|
-
sustainPhase: { visualDefinition: { parameters: {} } },
|
|
268
|
-
releasePhase: { visualDefinition: { parameters: {} } }
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
var frnlTextInput = ({
|
|
274
|
-
id,
|
|
275
|
-
label,
|
|
276
|
-
description,
|
|
277
|
-
error,
|
|
278
|
-
size = "md",
|
|
279
|
-
leadingIcon,
|
|
280
|
-
trailingIcon,
|
|
281
|
-
onClear,
|
|
282
|
-
disabled = false,
|
|
283
|
-
value,
|
|
284
|
-
onChange,
|
|
285
|
-
onFocus,
|
|
286
|
-
onBlur,
|
|
287
|
-
onMouseEnter,
|
|
288
|
-
onMouseLeave,
|
|
289
|
-
className = "",
|
|
290
|
-
style,
|
|
291
|
-
...rest
|
|
292
|
-
}) => {
|
|
293
|
-
const store = useFloksFrnlStore();
|
|
294
|
-
const { setInspectionText } = useBottomStrip();
|
|
295
|
-
const generatedId = useId2().replace(/[:/]/g, "");
|
|
296
|
-
const componentId = id ?? `frnlTextInput.${label ? label.toLowerCase().replace(/[^a-z0-9]/g, "-") : generatedId}`;
|
|
297
|
-
const resolvedState = disabled ? "disabled" : error ? "error" : "idle";
|
|
298
|
-
const handlers = useMemo2(
|
|
299
|
-
() => ({
|
|
300
|
-
"frnlTextInput.idle.change": (payload) => onChange?.(payload),
|
|
301
|
-
"frnlTextInput.idle.focus": (payload) => onFocus?.(payload),
|
|
302
|
-
"frnlTextInput.focused.change": (payload) => onChange?.(payload),
|
|
303
|
-
"frnlTextInput.focused.blur": (payload) => onBlur?.(payload),
|
|
304
|
-
"frnlTextInput.error.change": (payload) => onChange?.(payload)
|
|
305
|
-
}),
|
|
306
|
-
[onChange, onFocus, onBlur]
|
|
307
|
-
);
|
|
308
|
-
const frnl = useFrnlComponent2({
|
|
309
|
-
id: componentId,
|
|
310
|
-
definition: frnlTextInputDefinition,
|
|
311
|
-
store,
|
|
312
|
-
state: resolvedState,
|
|
313
|
-
properties: { label, error: Boolean(error), disabled },
|
|
314
|
-
handlers
|
|
315
|
-
});
|
|
316
|
-
const handleHover = (e) => {
|
|
317
|
-
onMouseEnter?.(e);
|
|
318
|
-
if (label || description) {
|
|
319
|
-
setInspectionText(label || null, description || null);
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
const handleLeave = (e) => {
|
|
323
|
-
onMouseLeave?.(e);
|
|
324
|
-
setInspectionText(null);
|
|
325
|
-
};
|
|
326
|
-
const heightClass = size === "sm" ? "h-7 text-xs" : size === "lg" ? "h-10 text-sm" : "h-8 text-xs";
|
|
327
|
-
return /* @__PURE__ */ jsxs2("div", { className: `flex flex-col gap-1 font-mono select-none ${className}`, children: [
|
|
328
|
-
label && /* @__PURE__ */ jsx2(
|
|
329
|
-
"label",
|
|
330
|
-
{
|
|
331
|
-
htmlFor: componentId,
|
|
332
|
-
className: "text-[10px] font-bold uppercase tracking-wider text-[var(--skipo-text-muted,#94a3b8)]",
|
|
333
|
-
children: label
|
|
334
|
-
}
|
|
335
|
-
),
|
|
336
|
-
/* @__PURE__ */ jsxs2(
|
|
337
|
-
"div",
|
|
338
|
-
{
|
|
339
|
-
className: `relative flex items-center border rounded transition-colors bg-[var(--skipo-bg-panel,#0f172a)] ${error ? "border-rose-500" : "border-[var(--skipo-border-subtle,#334155)] focus-within:border-[var(--skipo-accent,#38bdf8)]"}`,
|
|
340
|
-
style,
|
|
341
|
-
children: [
|
|
342
|
-
leadingIcon && /* @__PURE__ */ jsx2("span", { className: "pl-2.5 text-[var(--skipo-text-muted,#94a3b8)] flex items-center justify-center shrink-0", children: leadingIcon }),
|
|
343
|
-
/* @__PURE__ */ jsx2(
|
|
344
|
-
"input",
|
|
345
|
-
{
|
|
346
|
-
...rest,
|
|
347
|
-
id: componentId,
|
|
348
|
-
value,
|
|
349
|
-
disabled,
|
|
350
|
-
"data-frnl-component": "frnlTextInput",
|
|
351
|
-
"data-frnl-state": frnl.state,
|
|
352
|
-
onChange: (e) => {
|
|
353
|
-
onChange?.(e);
|
|
354
|
-
frnl.events.change?.(e);
|
|
355
|
-
},
|
|
356
|
-
onFocus: (e) => {
|
|
357
|
-
onFocus?.(e);
|
|
358
|
-
frnl.events.focus?.(e);
|
|
359
|
-
if (label || description) setInspectionText(label || null, description || null);
|
|
360
|
-
},
|
|
361
|
-
onBlur: (e) => {
|
|
362
|
-
onBlur?.(e);
|
|
363
|
-
frnl.events.blur?.(e);
|
|
364
|
-
setInspectionText(null);
|
|
365
|
-
},
|
|
366
|
-
onMouseEnter: handleHover,
|
|
367
|
-
onMouseLeave: handleLeave,
|
|
368
|
-
className: `w-full bg-transparent px-3 py-1 text-[var(--skipo-text-primary,#f8fafc)] focus:outline-none placeholder-[var(--skipo-text-muted,#64748b)] disabled:opacity-40 disabled:cursor-not-allowed ${heightClass}`
|
|
369
|
-
}
|
|
370
|
-
),
|
|
371
|
-
trailingIcon && /* @__PURE__ */ jsx2("span", { className: "pr-2.5 text-[var(--skipo-text-muted,#94a3b8)] flex items-center justify-center shrink-0", children: trailingIcon }),
|
|
372
|
-
onClear && value && !disabled && /* @__PURE__ */ jsx2(
|
|
373
|
-
"button",
|
|
374
|
-
{
|
|
375
|
-
type: "button",
|
|
376
|
-
onClick: onClear,
|
|
377
|
-
className: "pr-2.5 text-[var(--skipo-text-muted,#94a3b8)] hover:text-white cursor-pointer",
|
|
378
|
-
"aria-label": "Clear Input",
|
|
379
|
-
children: "\xD7"
|
|
380
|
-
}
|
|
381
|
-
)
|
|
382
|
-
]
|
|
383
|
-
}
|
|
384
|
-
),
|
|
385
|
-
typeof error === "string" && /* @__PURE__ */ jsx2("span", { className: "text-[10px] text-rose-400 font-semibold", children: error })
|
|
386
|
-
] });
|
|
387
|
-
};
|
|
388
|
-
frnlTextInput.displayName = "frnlTextInput";
|
|
389
|
-
|
|
390
|
-
// src/frnl/frnlControls.tsx
|
|
391
|
-
import { useId as useId3, useMemo as useMemo3 } from "react";
|
|
392
|
-
import { defineFrnlComponent as defineFrnlComponent3 } from "@ultrst-armada/frnlts";
|
|
393
|
-
import { useFrnlComponent as useFrnlComponent3 } from "@ultrst-armada/frnlts/react";
|
|
394
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
395
|
-
var frnlSelectDefinition = defineFrnlComponent3({
|
|
14
|
+
var frnlSelectDefinition = defineFrnlComponent({
|
|
396
15
|
name: "frnlSelect",
|
|
397
16
|
states: {
|
|
398
17
|
idle: {
|
|
@@ -434,15 +53,15 @@ var frnlSelect = ({
|
|
|
434
53
|
}) => {
|
|
435
54
|
const store = useFloksFrnlStore();
|
|
436
55
|
const { setInspectionText } = useBottomStrip();
|
|
437
|
-
const generatedId =
|
|
56
|
+
const generatedId = useId().replace(/[:/]/g, "");
|
|
438
57
|
const componentId = id ?? `frnlSelect.${label ? label.toLowerCase().replace(/[^a-z0-9]/g, "-") : generatedId}`;
|
|
439
|
-
const handlers =
|
|
58
|
+
const handlers = useMemo(
|
|
440
59
|
() => ({
|
|
441
60
|
"frnlSelect.idle.change": (payload) => onChange?.(payload)
|
|
442
61
|
}),
|
|
443
62
|
[onChange]
|
|
444
63
|
);
|
|
445
|
-
const frnl =
|
|
64
|
+
const frnl = useFrnlComponent({
|
|
446
65
|
id: componentId,
|
|
447
66
|
definition: frnlSelectDefinition,
|
|
448
67
|
store,
|
|
@@ -451,8 +70,8 @@ var frnlSelect = ({
|
|
|
451
70
|
handlers
|
|
452
71
|
});
|
|
453
72
|
const heightClass = size === "sm" ? "h-7 text-xs" : size === "lg" ? "h-10 text-sm" : "h-8 text-xs";
|
|
454
|
-
return /* @__PURE__ */
|
|
455
|
-
label && /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-1 font-mono select-none ${className}`, children: [
|
|
74
|
+
label && /* @__PURE__ */ jsx(
|
|
456
75
|
"label",
|
|
457
76
|
{
|
|
458
77
|
htmlFor: componentId,
|
|
@@ -460,7 +79,7 @@ var frnlSelect = ({
|
|
|
460
79
|
children: label
|
|
461
80
|
}
|
|
462
81
|
),
|
|
463
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
464
83
|
"select",
|
|
465
84
|
{
|
|
466
85
|
...rest,
|
|
@@ -483,13 +102,13 @@ var frnlSelect = ({
|
|
|
483
102
|
},
|
|
484
103
|
className: `w-full bg-[var(--skipo-bg-panel,#0f172a)] text-[var(--skipo-text-primary,#f8fafc)] border border-[var(--skipo-border-subtle,#334155)] rounded px-2.5 py-1 focus:outline-none focus:border-[var(--skipo-accent,#38bdf8)] disabled:opacity-40 disabled:cursor-not-allowed ${heightClass}`,
|
|
485
104
|
style,
|
|
486
|
-
children: options.map((opt) => /* @__PURE__ */
|
|
105
|
+
children: options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, disabled: opt.disabled, className: "bg-[#0f172a] text-white", children: opt.label }, opt.value))
|
|
487
106
|
}
|
|
488
107
|
)
|
|
489
108
|
] });
|
|
490
109
|
};
|
|
491
110
|
frnlSelect.displayName = "frnlSelect";
|
|
492
|
-
var frnlToggleDefinition =
|
|
111
|
+
var frnlToggleDefinition = defineFrnlComponent({
|
|
493
112
|
name: "frnlToggle",
|
|
494
113
|
states: {
|
|
495
114
|
off: {
|
|
@@ -525,16 +144,16 @@ var frnlToggle = ({
|
|
|
525
144
|
}) => {
|
|
526
145
|
const store = useFloksFrnlStore();
|
|
527
146
|
const { setInspectionText } = useBottomStrip();
|
|
528
|
-
const generatedId =
|
|
147
|
+
const generatedId = useId().replace(/[:/]/g, "");
|
|
529
148
|
const componentId = id ?? `frnlToggle.${label ? label.toLowerCase().replace(/[^a-z0-9]/g, "-") : generatedId}`;
|
|
530
|
-
const handlers =
|
|
149
|
+
const handlers = useMemo(
|
|
531
150
|
() => ({
|
|
532
151
|
"frnlToggle.off.toggle": () => onChange(true),
|
|
533
152
|
"frnlToggle.on.toggle": () => onChange(false)
|
|
534
153
|
}),
|
|
535
154
|
[onChange]
|
|
536
155
|
);
|
|
537
|
-
const frnl =
|
|
156
|
+
const frnl = useFrnlComponent({
|
|
538
157
|
id: componentId,
|
|
539
158
|
definition: frnlToggleDefinition,
|
|
540
159
|
store,
|
|
@@ -542,7 +161,7 @@ var frnlToggle = ({
|
|
|
542
161
|
properties: { label, checked, disabled },
|
|
543
162
|
handlers
|
|
544
163
|
});
|
|
545
|
-
return /* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ jsxs(
|
|
546
165
|
"button",
|
|
547
166
|
{
|
|
548
167
|
type: "button",
|
|
@@ -562,11 +181,11 @@ var frnlToggle = ({
|
|
|
562
181
|
onMouseLeave: () => setInspectionText(null),
|
|
563
182
|
className: `inline-flex items-center gap-2 select-none font-mono text-xs cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed ${className}`,
|
|
564
183
|
children: [
|
|
565
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ jsx(
|
|
566
185
|
"div",
|
|
567
186
|
{
|
|
568
187
|
className: `w-8 h-4 rounded-full transition-colors relative flex items-center p-0.5 ${checked ? "bg-[var(--skipo-accent,#38bdf8)]" : "bg-[var(--skipo-border-subtle,#334155)]"}`,
|
|
569
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ jsx(
|
|
570
189
|
"div",
|
|
571
190
|
{
|
|
572
191
|
className: `w-3 h-3 rounded-full bg-black transition-transform ${checked ? "translate-x-4" : "translate-x-0"}`
|
|
@@ -574,7 +193,7 @@ var frnlToggle = ({
|
|
|
574
193
|
)
|
|
575
194
|
}
|
|
576
195
|
),
|
|
577
|
-
label && /* @__PURE__ */
|
|
196
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-[var(--skipo-text-primary,#f8fafc)] uppercase text-[11px] font-semibold", children: label })
|
|
578
197
|
]
|
|
579
198
|
}
|
|
580
199
|
);
|
|
@@ -594,9 +213,9 @@ var frnlSlider = ({
|
|
|
594
213
|
className = ""
|
|
595
214
|
}) => {
|
|
596
215
|
const { setInspectionText } = useBottomStrip();
|
|
597
|
-
const generatedId =
|
|
216
|
+
const generatedId = useId().replace(/[:/]/g, "");
|
|
598
217
|
const componentId = id ?? `frnlSlider.${label ? label.toLowerCase().replace(/[^a-z0-9]/g, "-") : generatedId}`;
|
|
599
|
-
return /* @__PURE__ */
|
|
218
|
+
return /* @__PURE__ */ jsxs(
|
|
600
219
|
"div",
|
|
601
220
|
{
|
|
602
221
|
id: componentId,
|
|
@@ -607,14 +226,14 @@ var frnlSlider = ({
|
|
|
607
226
|
onMouseLeave: () => setInspectionText(null),
|
|
608
227
|
className: `flex flex-col gap-1 font-mono select-none ${className}`,
|
|
609
228
|
children: [
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
label && /* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center text-[10px] uppercase font-bold tracking-wider", children: [
|
|
230
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-[var(--skipo-text-muted,#94a3b8)]", children: label }),
|
|
231
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[var(--skipo-accent,#38bdf8)]", children: [
|
|
613
232
|
value,
|
|
614
233
|
unit
|
|
615
234
|
] })
|
|
616
235
|
] }),
|
|
617
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ jsx(
|
|
618
237
|
"input",
|
|
619
238
|
{
|
|
620
239
|
type: "range",
|
|
@@ -649,14 +268,14 @@ var frnlBadge = ({
|
|
|
649
268
|
...rest
|
|
650
269
|
}) => {
|
|
651
270
|
const sizeClasses = size === "sm" ? "px-1.5 py-0.2 text-[9px]" : "px-2 py-0.5 text-[10px]";
|
|
652
|
-
return /* @__PURE__ */
|
|
271
|
+
return /* @__PURE__ */ jsxs(
|
|
653
272
|
"span",
|
|
654
273
|
{
|
|
655
274
|
...rest,
|
|
656
275
|
"data-frnl-component": "frnlBadge",
|
|
657
276
|
className: `inline-flex items-center gap-1.5 font-mono font-bold uppercase tracking-wider border rounded select-none ${BADGE_STYLES[variant]} ${sizeClasses} ${className}`,
|
|
658
277
|
children: [
|
|
659
|
-
dot && /* @__PURE__ */
|
|
278
|
+
dot && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-current animate-pulse" }),
|
|
660
279
|
children
|
|
661
280
|
]
|
|
662
281
|
}
|
|
@@ -666,7 +285,7 @@ frnlBadge.displayName = "frnlBadge";
|
|
|
666
285
|
|
|
667
286
|
// src/frnl/frnlTabWindow.tsx
|
|
668
287
|
import { useState } from "react";
|
|
669
|
-
import { jsx as
|
|
288
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
670
289
|
var frnlTabWindow = ({
|
|
671
290
|
id = "frnl-tab-window",
|
|
672
291
|
tabs,
|
|
@@ -684,16 +303,16 @@ var frnlTabWindow = ({
|
|
|
684
303
|
else setInternalActiveTab(tab.id);
|
|
685
304
|
};
|
|
686
305
|
const currentTab = tabs.find((t) => t.id === activeId);
|
|
687
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ jsxs2(
|
|
688
307
|
"div",
|
|
689
308
|
{
|
|
690
309
|
id,
|
|
691
310
|
"data-frnl-component": "frnlTabWindow",
|
|
692
311
|
className: `flex flex-col w-full h-full min-h-0 bg-[var(--skipo-bg,#0a0c10)] text-[var(--skipo-text-primary,#f8fafc)] font-mono ${className}`,
|
|
693
312
|
children: [
|
|
694
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ jsx2("div", { className: "h-10 border-b border-[var(--skipo-border-color,#334155)] bg-[var(--skipo-surface,#14171f)] px-3 flex items-center gap-1 shrink-0 select-none overflow-x-auto", children: tabs.map((tab) => {
|
|
695
314
|
const isActive = tab.id === activeId;
|
|
696
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ jsxs2(
|
|
697
316
|
"button",
|
|
698
317
|
{
|
|
699
318
|
type: "button",
|
|
@@ -712,14 +331,14 @@ var frnlTabWindow = ({
|
|
|
712
331
|
onMouseLeave: () => setInspectionText(null),
|
|
713
332
|
className: `flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wider rounded transition-all cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed ${isActive ? "bg-[var(--skipo-bg-panel,#0f172a)] text-[var(--skipo-accent,#38bdf8)] border border-[var(--skipo-border-subtle,#334155)]" : "text-[var(--skipo-text-muted,#94a3b8)] hover:text-white hover:bg-[var(--skipo-bg-subtle,#1e293b)] border border-transparent"}`,
|
|
714
333
|
children: [
|
|
715
|
-
tab.icon && /* @__PURE__ */
|
|
716
|
-
/* @__PURE__ */
|
|
334
|
+
tab.icon && /* @__PURE__ */ jsx2("span", { className: "w-3.5 h-3.5 shrink-0 flex items-center", children: tab.icon }),
|
|
335
|
+
/* @__PURE__ */ jsx2("span", { children: tab.label })
|
|
717
336
|
]
|
|
718
337
|
},
|
|
719
338
|
tab.id
|
|
720
339
|
);
|
|
721
340
|
}) }),
|
|
722
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ jsx2("div", { className: "flex-1 overflow-auto p-4 min-h-0 relative", children: currentTab?.content ?? children })
|
|
723
342
|
]
|
|
724
343
|
}
|
|
725
344
|
);
|
|
@@ -727,8 +346,8 @@ var frnlTabWindow = ({
|
|
|
727
346
|
frnlTabWindow.displayName = "frnlTabWindow";
|
|
728
347
|
|
|
729
348
|
// src/frnl/frnlTopBar.tsx
|
|
730
|
-
import
|
|
731
|
-
import { jsx as
|
|
349
|
+
import React3, { useState as useState2, useRef, useEffect } from "react";
|
|
350
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
732
351
|
var frnlTopBar = ({
|
|
733
352
|
id = "frnl-top-bar",
|
|
734
353
|
breadcrumbs = [],
|
|
@@ -757,15 +376,15 @@ var frnlTopBar = ({
|
|
|
757
376
|
}
|
|
758
377
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
759
378
|
}, [profileOpen]);
|
|
760
|
-
return /* @__PURE__ */
|
|
379
|
+
return /* @__PURE__ */ jsxs3(
|
|
761
380
|
"header",
|
|
762
381
|
{
|
|
763
382
|
id,
|
|
764
383
|
"data-frnl-component": "frnlTopBar",
|
|
765
384
|
className: `h-11 border-b border-[var(--skipo-border-color,#334155)] bg-[var(--skipo-surface,#14171f)] px-3 flex items-center justify-between select-none shrink-0 font-mono text-xs z-40 relative ${className}`,
|
|
766
385
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
appLogo ? /* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
387
|
+
appLogo ? /* @__PURE__ */ jsx3("div", { className: "shrink-0 flex items-center justify-center", children: appLogo }) : appName ? /* @__PURE__ */ jsx3(
|
|
769
388
|
"div",
|
|
770
389
|
{
|
|
771
390
|
className: "w-6 h-6 rounded bg-[var(--skipo-accent,#38bdf8)] text-black font-black flex items-center justify-center text-xs shrink-0 cursor-default",
|
|
@@ -774,8 +393,8 @@ var frnlTopBar = ({
|
|
|
774
393
|
children: appName.slice(0, 2).toUpperCase()
|
|
775
394
|
}
|
|
776
395
|
) : null,
|
|
777
|
-
breadcrumbs.length > 0 && /* @__PURE__ */
|
|
778
|
-
crumb.onClick ? /* @__PURE__ */
|
|
396
|
+
breadcrumbs.length > 0 && /* @__PURE__ */ jsx3("nav", { "aria-label": "Breadcrumb", className: "flex items-center gap-1.5 text-xs text-[var(--skipo-text-muted,#94a3b8)]", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs3(React3.Fragment, { children: [
|
|
397
|
+
crumb.onClick ? /* @__PURE__ */ jsx3(
|
|
779
398
|
"button",
|
|
780
399
|
{
|
|
781
400
|
type: "button",
|
|
@@ -785,7 +404,7 @@ var frnlTopBar = ({
|
|
|
785
404
|
className: "hover:text-white transition-colors cursor-pointer truncate max-w-[140px]",
|
|
786
405
|
children: crumb.label
|
|
787
406
|
}
|
|
788
|
-
) : crumb.href ? /* @__PURE__ */
|
|
407
|
+
) : crumb.href ? /* @__PURE__ */ jsx3(
|
|
789
408
|
"a",
|
|
790
409
|
{
|
|
791
410
|
href: crumb.href,
|
|
@@ -794,18 +413,18 @@ var frnlTopBar = ({
|
|
|
794
413
|
className: "hover:text-white transition-colors truncate max-w-[140px]",
|
|
795
414
|
children: crumb.label
|
|
796
415
|
}
|
|
797
|
-
) : /* @__PURE__ */
|
|
798
|
-
idx < breadcrumbs.length - 1 && /* @__PURE__ */
|
|
416
|
+
) : /* @__PURE__ */ jsx3("span", { className: "text-[var(--skipo-text-primary,#f8fafc)] font-semibold truncate max-w-[140px]", children: crumb.label }),
|
|
417
|
+
idx < breadcrumbs.length - 1 && /* @__PURE__ */ jsx3("span", { className: "opacity-40", children: "/" })
|
|
799
418
|
] }, idx)) })
|
|
800
419
|
] }),
|
|
801
|
-
tabs.length > 0 && /* @__PURE__ */
|
|
420
|
+
tabs.length > 0 && /* @__PURE__ */ jsx3(
|
|
802
421
|
"nav",
|
|
803
422
|
{
|
|
804
423
|
role: "tablist",
|
|
805
424
|
className: "flex items-center gap-1 bg-[var(--skipo-bg-panel,#0f172a)] p-0.5 rounded border border-[var(--skipo-border-subtle,#334155)]",
|
|
806
425
|
children: tabs.map((tab) => {
|
|
807
426
|
const isActive = tab.id === activeTabId;
|
|
808
|
-
return /* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ jsx3(
|
|
809
428
|
"button",
|
|
810
429
|
{
|
|
811
430
|
type: "button",
|
|
@@ -820,16 +439,16 @@ var frnlTopBar = ({
|
|
|
820
439
|
onMouseLeave: () => setInspectionText(null),
|
|
821
440
|
className: `p-1.5 rounded transition-all flex items-center justify-center cursor-pointer disabled:opacity-30 disabled:cursor-not-allowed ${isActive ? "bg-[var(--skipo-accent,#38bdf8)] text-black shadow-xs" : "text-[var(--skipo-text-muted,#94a3b8)] hover:text-white hover:bg-[var(--skipo-surface,#14171f)]"}`,
|
|
822
441
|
"aria-label": tab.label,
|
|
823
|
-
children: /* @__PURE__ */
|
|
442
|
+
children: /* @__PURE__ */ jsx3("span", { className: "w-4 h-4 flex items-center justify-center", children: tab.icon })
|
|
824
443
|
},
|
|
825
444
|
tab.id
|
|
826
445
|
);
|
|
827
446
|
})
|
|
828
447
|
}
|
|
829
448
|
),
|
|
830
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
831
450
|
actions,
|
|
832
|
-
onOpenSettings && /* @__PURE__ */
|
|
451
|
+
onOpenSettings && /* @__PURE__ */ jsx3(
|
|
833
452
|
"button",
|
|
834
453
|
{
|
|
835
454
|
type: "button",
|
|
@@ -838,14 +457,14 @@ var frnlTopBar = ({
|
|
|
838
457
|
onMouseLeave: () => setInspectionText(null),
|
|
839
458
|
className: "p-1.5 rounded border border-[var(--skipo-border-subtle,#334155)] bg-[var(--skipo-bg-panel,#0f172a)] text-[var(--skipo-text-muted,#94a3b8)] hover:text-white hover:border-[var(--skipo-accent,#38bdf8)] cursor-pointer transition-colors",
|
|
840
459
|
"aria-label": "Settings",
|
|
841
|
-
children: /* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
/* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ jsxs3("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
461
|
+
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "3" }),
|
|
462
|
+
/* @__PURE__ */ jsx3("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
844
463
|
] })
|
|
845
464
|
}
|
|
846
465
|
),
|
|
847
|
-
user && /* @__PURE__ */
|
|
848
|
-
/* @__PURE__ */
|
|
466
|
+
user && /* @__PURE__ */ jsxs3("div", { className: "relative", ref: profileMenuRef, children: [
|
|
467
|
+
/* @__PURE__ */ jsx3(
|
|
849
468
|
"button",
|
|
850
469
|
{
|
|
851
470
|
type: "button",
|
|
@@ -858,22 +477,22 @@ var frnlTopBar = ({
|
|
|
858
477
|
className: "w-7 h-7 rounded border border-[var(--skipo-border-subtle,#334155)] bg-[var(--skipo-bg-panel,#0f172a)] text-[var(--skipo-text-primary,#f8fafc)] hover:border-[var(--skipo-accent,#38bdf8)] flex items-center justify-center cursor-pointer transition-colors",
|
|
859
478
|
"aria-label": "User Profile",
|
|
860
479
|
"aria-expanded": profileOpen,
|
|
861
|
-
children: /* @__PURE__ */
|
|
480
|
+
children: /* @__PURE__ */ jsx3("span", { children: user.avatarGlyph || "\u{1F464}" })
|
|
862
481
|
}
|
|
863
482
|
),
|
|
864
|
-
profileOpen && /* @__PURE__ */
|
|
865
|
-
/* @__PURE__ */
|
|
866
|
-
/* @__PURE__ */
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
869
|
-
/* @__PURE__ */
|
|
483
|
+
profileOpen && /* @__PURE__ */ jsxs3("div", { className: "absolute right-0 top-full mt-1.5 w-56 rounded border border-[var(--skipo-border-color,#334155)] bg-[var(--skipo-surface,#14171f)] p-3 shadow-xl z-50 flex flex-col gap-2.5 font-mono animate-fade-in", children: [
|
|
484
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2 pb-2 border-b border-[var(--skipo-border-subtle,#334155)]", children: [
|
|
485
|
+
/* @__PURE__ */ jsx3("div", { className: "w-8 h-8 rounded bg-[var(--skipo-bg-panel,#0f172a)] border border-[var(--skipo-border-subtle,#334155)] flex items-center justify-center text-sm", children: user.avatarGlyph || "\u{1F464}" }),
|
|
486
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-col min-w-0", children: [
|
|
487
|
+
/* @__PURE__ */ jsx3("span", { className: "font-bold text-[var(--skipo-text-primary,#f8fafc)] truncate text-xs", children: user.name || user.username || "User" }),
|
|
488
|
+
/* @__PURE__ */ jsx3("span", { className: "text-[10px] text-[var(--skipo-text-muted,#94a3b8)] truncate", children: user.email || `@${user.username || "active"}` })
|
|
870
489
|
] })
|
|
871
490
|
] }),
|
|
872
|
-
user.role && /* @__PURE__ */
|
|
491
|
+
user.role && /* @__PURE__ */ jsxs3("div", { className: "text-[10px] px-1.5 py-0.5 rounded bg-[var(--skipo-bg-panel,#0f172a)] border border-[var(--skipo-border-subtle,#334155)] text-[var(--skipo-accent,#38bdf8)] uppercase font-bold self-start", children: [
|
|
873
492
|
"ROLE: ",
|
|
874
493
|
user.role
|
|
875
494
|
] }),
|
|
876
|
-
onLogout && /* @__PURE__ */
|
|
495
|
+
onLogout && /* @__PURE__ */ jsxs3(
|
|
877
496
|
"button",
|
|
878
497
|
{
|
|
879
498
|
type: "button",
|
|
@@ -883,12 +502,12 @@ var frnlTopBar = ({
|
|
|
883
502
|
},
|
|
884
503
|
className: "w-full flex items-center gap-2 px-2.5 py-1.5 rounded text-rose-400 hover:bg-rose-500/10 border border-transparent hover:border-rose-500/30 text-xs font-bold uppercase tracking-wider transition-colors cursor-pointer",
|
|
885
504
|
children: [
|
|
886
|
-
/* @__PURE__ */
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ jsxs3("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
506
|
+
/* @__PURE__ */ jsx3("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
|
|
507
|
+
/* @__PURE__ */ jsx3("polyline", { points: "16 17 21 12 16 7" }),
|
|
508
|
+
/* @__PURE__ */ jsx3("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
|
|
890
509
|
] }),
|
|
891
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ jsx3("span", { children: "Sign Out" })
|
|
892
511
|
]
|
|
893
512
|
}
|
|
894
513
|
)
|
|
@@ -903,7 +522,7 @@ frnlTopBar.displayName = "frnlTopBar";
|
|
|
903
522
|
|
|
904
523
|
// src/frnl/frnlBottomBar.tsx
|
|
905
524
|
import { useState as useState3, useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
906
|
-
import { jsx as
|
|
525
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
907
526
|
var frnlBottomBar = ({
|
|
908
527
|
id = "frnl-bottom-bar",
|
|
909
528
|
onManualSave,
|
|
@@ -932,15 +551,15 @@ var frnlBottomBar = ({
|
|
|
932
551
|
}, [apiPanelOpen]);
|
|
933
552
|
const showDescription = isDKeyPressed && Boolean(inspectionDescription);
|
|
934
553
|
const displayText = showDescription ? inspectionDescription : inspectionText || 'HOVER UI ELEMENT // HOLD "D" TO INSPECT';
|
|
935
|
-
return /* @__PURE__ */
|
|
554
|
+
return /* @__PURE__ */ jsxs4(
|
|
936
555
|
"footer",
|
|
937
556
|
{
|
|
938
557
|
id,
|
|
939
558
|
"data-frnl-component": "frnlBottomBar",
|
|
940
559
|
className: `h-[30px] min-h-[30px] border-t border-[var(--skipo-border-color,#334155)] bg-[var(--skipo-surface,#14171f)] px-3 flex items-center justify-between select-none shrink-0 font-mono text-[11px] z-40 relative text-[var(--skipo-text-muted,#94a3b8)] ${className}`,
|
|
941
560
|
children: [
|
|
942
|
-
/* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
562
|
+
/* @__PURE__ */ jsxs4(
|
|
944
563
|
"button",
|
|
945
564
|
{
|
|
946
565
|
type: "button",
|
|
@@ -953,17 +572,17 @@ var frnlBottomBar = ({
|
|
|
953
572
|
className: `flex items-center gap-1.5 px-2 py-0.5 rounded border transition-colors cursor-pointer ${autoSave.enabled ? "border-emerald-500/40 bg-emerald-500/10 text-emerald-400" : "border-[var(--skipo-border-subtle,#334155)] bg-[var(--skipo-bg-panel,#0f172a)] text-[var(--skipo-text-muted,#64748b)]"}`,
|
|
954
573
|
"aria-label": "Toggle Auto Save",
|
|
955
574
|
children: [
|
|
956
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ jsx4(
|
|
957
576
|
"span",
|
|
958
577
|
{
|
|
959
578
|
className: `w-1.5 h-1.5 rounded-full ${autoSave.enabled ? "bg-emerald-400 animate-pulse" : "bg-slate-500"}`
|
|
960
579
|
}
|
|
961
580
|
),
|
|
962
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ jsx4("span", { className: "text-[10px] font-bold uppercase tracking-wider", children: autoSave.enabled ? "AUTO" : "MANUAL" })
|
|
963
582
|
]
|
|
964
583
|
}
|
|
965
584
|
),
|
|
966
|
-
onManualSave && /* @__PURE__ */
|
|
585
|
+
onManualSave && /* @__PURE__ */ jsxs4(
|
|
967
586
|
"button",
|
|
968
587
|
{
|
|
969
588
|
type: "button",
|
|
@@ -974,24 +593,24 @@ var frnlBottomBar = ({
|
|
|
974
593
|
className: "flex items-center gap-1 px-2 py-0.5 rounded border border-[var(--skipo-border-subtle,#334155)] bg-[var(--skipo-bg-panel,#0f172a)] text-[var(--skipo-text-primary,#f8fafc)] hover:border-[var(--skipo-accent,#38bdf8)] hover:text-[var(--skipo-accent,#38bdf8)] transition-colors cursor-pointer disabled:opacity-40",
|
|
975
594
|
"aria-label": "Save Now",
|
|
976
595
|
children: [
|
|
977
|
-
isSaving ? /* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
596
|
+
isSaving ? /* @__PURE__ */ jsx4("span", { className: "w-2.5 h-2.5 border-2 border-current border-t-transparent rounded-full animate-spin" }) : /* @__PURE__ */ jsxs4("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
597
|
+
/* @__PURE__ */ jsx4("path", { d: "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" }),
|
|
598
|
+
/* @__PURE__ */ jsx4("polyline", { points: "17 21 17 13 7 13 7 21" }),
|
|
599
|
+
/* @__PURE__ */ jsx4("polyline", { points: "7 3 7 8 15 8" })
|
|
981
600
|
] }),
|
|
982
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ jsx4("span", { className: "text-[10px] font-bold uppercase tracking-wider", children: "Save" })
|
|
983
602
|
]
|
|
984
603
|
}
|
|
985
604
|
)
|
|
986
605
|
] }),
|
|
987
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ jsx4("div", { className: "flex-1 flex items-center justify-center px-4 overflow-hidden", children: /* @__PURE__ */ jsxs4(
|
|
988
607
|
"div",
|
|
989
608
|
{
|
|
990
609
|
"data-testid": "frnl-bottom-strip-center",
|
|
991
610
|
className: "flex items-center gap-1.5 truncate transition-all duration-150 max-w-2xl",
|
|
992
611
|
children: [
|
|
993
|
-
showDescription && /* @__PURE__ */
|
|
994
|
-
/* @__PURE__ */
|
|
612
|
+
showDescription && /* @__PURE__ */ jsx4("span", { className: "px-1 py-0.2 rounded text-[9px] font-bold uppercase tracking-wider bg-amber-400 text-black shrink-0", children: "D-INSPECT" }),
|
|
613
|
+
/* @__PURE__ */ jsx4(
|
|
995
614
|
"span",
|
|
996
615
|
{
|
|
997
616
|
className: `truncate ${showDescription ? "text-[11px] font-light italic text-[var(--skipo-text-primary,#f8fafc)]" : inspectionText ? "text-xs font-bold text-[var(--skipo-accent,#38bdf8)]" : "text-xs font-medium text-[var(--skipo-text-muted,#64748b)]"}`,
|
|
@@ -1001,8 +620,8 @@ var frnlBottomBar = ({
|
|
|
1001
620
|
]
|
|
1002
621
|
}
|
|
1003
622
|
) }),
|
|
1004
|
-
/* @__PURE__ */
|
|
1005
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 shrink-0 relative", ref: apiPanelRef, children: [
|
|
624
|
+
/* @__PURE__ */ jsxs4(
|
|
1006
625
|
"button",
|
|
1007
626
|
{
|
|
1008
627
|
type: "button",
|
|
@@ -1016,7 +635,7 @@ var frnlBottomBar = ({
|
|
|
1016
635
|
"aria-label": "API Requests",
|
|
1017
636
|
"aria-expanded": apiPanelOpen,
|
|
1018
637
|
children: [
|
|
1019
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ jsx4(
|
|
1020
639
|
"svg",
|
|
1021
640
|
{
|
|
1022
641
|
width: "12",
|
|
@@ -1028,42 +647,42 @@ var frnlBottomBar = ({
|
|
|
1028
647
|
strokeLinecap: "round",
|
|
1029
648
|
strokeLinejoin: "round",
|
|
1030
649
|
className: apiActivity.activeCount > 0 ? "animate-pulse" : "",
|
|
1031
|
-
children: /* @__PURE__ */
|
|
650
|
+
children: /* @__PURE__ */ jsx4("polyline", { points: "22 12 18 12 15 21 9 3 6 12 2 12" })
|
|
1032
651
|
}
|
|
1033
652
|
),
|
|
1034
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ jsxs4("span", { className: "text-[10px] font-bold uppercase tracking-wider", children: [
|
|
1035
654
|
"API ",
|
|
1036
655
|
apiActivity.activeCount > 0 ? `(${apiActivity.activeCount})` : "LOG"
|
|
1037
656
|
] })
|
|
1038
657
|
]
|
|
1039
658
|
}
|
|
1040
659
|
),
|
|
1041
|
-
apiPanelOpen && /* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
/* @__PURE__ */
|
|
1044
|
-
/* @__PURE__ */
|
|
660
|
+
apiPanelOpen && /* @__PURE__ */ jsxs4("div", { className: "absolute right-0 bottom-full mb-1.5 w-80 rounded border border-[var(--skipo-border-color,#334155)] bg-[var(--skipo-surface,#14171f)] p-3 shadow-2xl z-50 flex flex-col gap-2 font-mono text-xs animate-fade-in max-h-72 overflow-hidden", children: [
|
|
661
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between pb-1.5 border-b border-[var(--skipo-border-subtle,#334155)]", children: [
|
|
662
|
+
/* @__PURE__ */ jsx4("span", { className: "font-bold text-[var(--skipo-text-primary,#f8fafc)] uppercase text-[10px] tracking-wider", children: "Recent API Requests" }),
|
|
663
|
+
/* @__PURE__ */ jsxs4("span", { className: "text-[10px] text-[var(--skipo-accent,#38bdf8)] font-bold", children: [
|
|
1045
664
|
apiActivity.activeCount,
|
|
1046
665
|
" In-Flight"
|
|
1047
666
|
] })
|
|
1048
667
|
] }),
|
|
1049
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ jsx4("div", { className: "overflow-y-auto max-h-52 flex flex-col gap-1.5 pr-1", children: recentApiRequests.length > 0 ? recentApiRequests.map((req) => /* @__PURE__ */ jsxs4(
|
|
1050
669
|
"div",
|
|
1051
670
|
{
|
|
1052
671
|
className: "p-1.5 rounded bg-[var(--skipo-bg-panel,#0f172a)] border border-[var(--skipo-border-subtle,#334155)] flex items-center justify-between text-[10px]",
|
|
1053
672
|
children: [
|
|
1054
|
-
/* @__PURE__ */
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1.5 truncate mr-2", children: [
|
|
674
|
+
/* @__PURE__ */ jsx4("span", { className: "font-bold text-[var(--skipo-accent,#38bdf8)]", children: req.method }),
|
|
675
|
+
/* @__PURE__ */ jsx4("span", { className: "truncate text-[var(--skipo-text-primary,#f8fafc)]", children: req.endpoint })
|
|
1057
676
|
] }),
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
req.status && /* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
678
|
+
req.status && /* @__PURE__ */ jsx4(
|
|
1060
679
|
"span",
|
|
1061
680
|
{
|
|
1062
681
|
className: `font-bold ${req.status < 400 ? "text-emerald-400" : "text-rose-400"}`,
|
|
1063
682
|
children: req.status
|
|
1064
683
|
}
|
|
1065
684
|
),
|
|
1066
|
-
req.durationMs !== void 0 && /* @__PURE__ */
|
|
685
|
+
req.durationMs !== void 0 && /* @__PURE__ */ jsxs4("span", { className: "text-[var(--skipo-text-muted,#64748b)]", children: [
|
|
1067
686
|
req.durationMs,
|
|
1068
687
|
"ms"
|
|
1069
688
|
] })
|
|
@@ -1071,7 +690,7 @@ var frnlBottomBar = ({
|
|
|
1071
690
|
]
|
|
1072
691
|
},
|
|
1073
692
|
req.id
|
|
1074
|
-
)) : /* @__PURE__ */
|
|
693
|
+
)) : /* @__PURE__ */ jsx4("div", { className: "py-4 text-center text-[var(--skipo-text-muted,#64748b)] text-[10px]", children: "No recent backend requests recorded." }) })
|
|
1075
694
|
] })
|
|
1076
695
|
] })
|
|
1077
696
|
]
|
|
@@ -1081,9 +700,9 @@ var frnlBottomBar = ({
|
|
|
1081
700
|
frnlBottomBar.displayName = "frnlBottomBar";
|
|
1082
701
|
|
|
1083
702
|
// src/frnl/frnlPage.tsx
|
|
1084
|
-
import
|
|
703
|
+
import React5, { useEffect as useEffect3, useState as useState4 } from "react";
|
|
1085
704
|
import { mountFrnlOrchestration } from "@ultrst-armada/frnlts";
|
|
1086
|
-
import { jsx as
|
|
705
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1087
706
|
function FrnlGlobalHoverInspector() {
|
|
1088
707
|
const { setInspectionText } = useBottomStrip();
|
|
1089
708
|
useEffect3(() => {
|
|
@@ -1164,15 +783,15 @@ function FrnlPageInner({
|
|
|
1164
783
|
else setInternalActiveTab(tabId);
|
|
1165
784
|
};
|
|
1166
785
|
const currentTab = tabs.find((t) => t.id === activeTab);
|
|
1167
|
-
return /* @__PURE__ */
|
|
786
|
+
return /* @__PURE__ */ jsxs5(
|
|
1168
787
|
"div",
|
|
1169
788
|
{
|
|
1170
789
|
id,
|
|
1171
790
|
"data-frnl-component": "frnlPage",
|
|
1172
791
|
className: `h-screen w-screen flex flex-col bg-[var(--skipo-bg,#0a0c10)] text-[var(--skipo-text-primary,#f8fafc)] font-mono select-none overflow-hidden ${className}`,
|
|
1173
792
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1175
|
-
showTopBar &&
|
|
793
|
+
/* @__PURE__ */ jsx5(FrnlGlobalHoverInspector, {}),
|
|
794
|
+
showTopBar && React5.createElement(frnlTopBar, {
|
|
1176
795
|
appName,
|
|
1177
796
|
appLogo,
|
|
1178
797
|
breadcrumbs,
|
|
@@ -1184,8 +803,8 @@ function FrnlPageInner({
|
|
|
1184
803
|
onOpenSettings,
|
|
1185
804
|
actions: topBarActions
|
|
1186
805
|
}),
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
showBottomBar &&
|
|
806
|
+
/* @__PURE__ */ jsx5("main", { className: "flex-1 flex flex-col min-h-0 overflow-y-auto relative p-4", children: currentTab?.content ?? children }),
|
|
807
|
+
showBottomBar && React5.createElement(frnlBottomBar, {
|
|
1189
808
|
onManualSave: onSave,
|
|
1190
809
|
isSaving,
|
|
1191
810
|
recentApiRequests
|
|
@@ -1195,15 +814,11 @@ function FrnlPageInner({
|
|
|
1195
814
|
);
|
|
1196
815
|
}
|
|
1197
816
|
var frnlPage = (props) => {
|
|
1198
|
-
return /* @__PURE__ */
|
|
817
|
+
return /* @__PURE__ */ jsx5(BottomStripProvider, { initialAutoSave: props.autoSaveEnabled ?? true, children: /* @__PURE__ */ jsx5(FrnlPageInner, { ...props }) });
|
|
1199
818
|
};
|
|
1200
819
|
frnlPage.displayName = "frnlPage";
|
|
1201
820
|
|
|
1202
821
|
export {
|
|
1203
|
-
frnlButtonDefinition,
|
|
1204
|
-
frnlButton,
|
|
1205
|
-
frnlTextInputDefinition,
|
|
1206
|
-
frnlTextInput,
|
|
1207
822
|
frnlSelectDefinition,
|
|
1208
823
|
frnlSelect,
|
|
1209
824
|
frnlToggleDefinition,
|