@almadar/ui 5.26.0 → 5.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +209 -117
- package/dist/avl/index.js +209 -117
- package/dist/components/core/atoms/svg/SvgBranch.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgConnection.d.ts +8 -4
- package/dist/components/core/atoms/svg/SvgFlow.d.ts +5 -1
- package/dist/components/core/atoms/svg/SvgGrid.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgLobe.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgMesh.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgMorph.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgNode.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgPulse.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgRing.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgShield.d.ts +6 -2
- package/dist/components/core/atoms/svg/SvgStack.d.ts +6 -2
- package/dist/components/core/molecules/markdown/MarkdownContent.d.ts +2 -2
- package/dist/components/index.cjs +209 -117
- package/dist/components/index.js +209 -117
- package/dist/docs/index.cjs +9 -2
- package/dist/docs/index.js +9 -2
- package/dist/hooks/index.cjs +9 -2
- package/dist/hooks/index.js +9 -2
- package/dist/providers/index.cjs +209 -117
- package/dist/providers/index.js +209 -117
- package/dist/runtime/index.cjs +209 -117
- package/dist/runtime/index.js +209 -117
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -116,18 +116,22 @@ var init_SvgBranch = __esm({
|
|
|
116
116
|
"components/core/atoms/svg/SvgBranch.tsx"() {
|
|
117
117
|
"use client";
|
|
118
118
|
SvgBranch = ({
|
|
119
|
-
x,
|
|
120
|
-
y,
|
|
119
|
+
x = 5,
|
|
120
|
+
y = 50,
|
|
121
121
|
variant = "fork",
|
|
122
122
|
branches = 2,
|
|
123
123
|
size = 1,
|
|
124
124
|
color = "var(--color-primary)",
|
|
125
125
|
opacity = 1,
|
|
126
|
-
className
|
|
126
|
+
className,
|
|
127
|
+
asRoot = true,
|
|
128
|
+
width = 100,
|
|
129
|
+
height = 100
|
|
127
130
|
}) => {
|
|
131
|
+
let inner;
|
|
128
132
|
if (variant === "diamond") {
|
|
129
133
|
const points = buildDiamondPoints(x, y, size);
|
|
130
|
-
|
|
134
|
+
inner = /* @__PURE__ */ jsx("g", { className, opacity, children: /* @__PURE__ */ jsx(
|
|
131
135
|
"polygon",
|
|
132
136
|
{
|
|
133
137
|
points,
|
|
@@ -137,23 +141,28 @@ var init_SvgBranch = __esm({
|
|
|
137
141
|
strokeLinejoin: "round"
|
|
138
142
|
}
|
|
139
143
|
) });
|
|
144
|
+
} else {
|
|
145
|
+
const paths = variant === "fork" ? buildForkPaths(x, y, branches, size) : buildMergePaths(x, y, branches, size);
|
|
146
|
+
inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
147
|
+
paths.map((d, i) => /* @__PURE__ */ jsx(
|
|
148
|
+
"path",
|
|
149
|
+
{
|
|
150
|
+
d,
|
|
151
|
+
fill: "none",
|
|
152
|
+
stroke: color,
|
|
153
|
+
strokeWidth: 2,
|
|
154
|
+
strokeLinecap: "round"
|
|
155
|
+
},
|
|
156
|
+
i
|
|
157
|
+
)),
|
|
158
|
+
variant === "fork" && /* @__PURE__ */ jsx("circle", { cx: x + 30 * size, cy: y, r: 3, fill: color }),
|
|
159
|
+
variant === "merge" && /* @__PURE__ */ jsx("circle", { cx: x + 30 * size, cy: y, r: 3, fill: color })
|
|
160
|
+
] });
|
|
140
161
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
{
|
|
146
|
-
d,
|
|
147
|
-
fill: "none",
|
|
148
|
-
stroke: color,
|
|
149
|
-
strokeWidth: 2,
|
|
150
|
-
strokeLinecap: "round"
|
|
151
|
-
},
|
|
152
|
-
i
|
|
153
|
-
)),
|
|
154
|
-
variant === "fork" && /* @__PURE__ */ jsx("circle", { cx: x + 30 * size, cy: y, r: 3, fill: color }),
|
|
155
|
-
variant === "merge" && /* @__PURE__ */ jsx("circle", { cx: x + 30 * size, cy: y, r: 3, fill: color })
|
|
156
|
-
] });
|
|
162
|
+
if (asRoot) {
|
|
163
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
164
|
+
}
|
|
165
|
+
return /* @__PURE__ */ jsx(Fragment, { children: inner });
|
|
157
166
|
};
|
|
158
167
|
SvgBranch.displayName = "SvgBranch";
|
|
159
168
|
}
|
|
@@ -163,20 +172,23 @@ var init_SvgConnection = __esm({
|
|
|
163
172
|
"components/core/atoms/svg/SvgConnection.tsx"() {
|
|
164
173
|
"use client";
|
|
165
174
|
SvgConnection = ({
|
|
166
|
-
x1,
|
|
167
|
-
y1,
|
|
168
|
-
x2,
|
|
169
|
-
y2,
|
|
175
|
+
x1 = 10,
|
|
176
|
+
y1 = 50,
|
|
177
|
+
x2 = 90,
|
|
178
|
+
y2 = 50,
|
|
170
179
|
variant = "solid",
|
|
171
180
|
color = "var(--color-primary)",
|
|
172
181
|
strokeWidth = 1.5,
|
|
173
182
|
opacity = 1,
|
|
174
|
-
className
|
|
183
|
+
className,
|
|
184
|
+
asRoot = true,
|
|
185
|
+
width = 100,
|
|
186
|
+
height = 100
|
|
175
187
|
}) => {
|
|
176
188
|
const dashProps = variant === "solid" ? {} : {
|
|
177
189
|
strokeDasharray: "8 6"
|
|
178
190
|
};
|
|
179
|
-
|
|
191
|
+
const inner = /* @__PURE__ */ jsx(
|
|
180
192
|
"line",
|
|
181
193
|
{
|
|
182
194
|
className: [
|
|
@@ -194,22 +206,30 @@ var init_SvgConnection = __esm({
|
|
|
194
206
|
...dashProps
|
|
195
207
|
}
|
|
196
208
|
);
|
|
209
|
+
if (asRoot) {
|
|
210
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
211
|
+
}
|
|
212
|
+
return inner;
|
|
197
213
|
};
|
|
198
214
|
SvgConnection.displayName = "SvgConnection";
|
|
199
215
|
}
|
|
200
216
|
});
|
|
201
|
-
var flowIdCounter, SvgFlow;
|
|
217
|
+
var flowIdCounter, DEFAULT_POINTS, SvgFlow;
|
|
202
218
|
var init_SvgFlow = __esm({
|
|
203
219
|
"components/core/atoms/svg/SvgFlow.tsx"() {
|
|
204
220
|
"use client";
|
|
205
221
|
flowIdCounter = 0;
|
|
222
|
+
DEFAULT_POINTS = [[10, 50], [50, 20], [90, 50]];
|
|
206
223
|
SvgFlow = ({
|
|
207
|
-
points,
|
|
224
|
+
points = DEFAULT_POINTS,
|
|
208
225
|
color = "var(--color-primary)",
|
|
209
226
|
strokeWidth = 1.5,
|
|
210
227
|
animated = false,
|
|
211
228
|
opacity = 1,
|
|
212
|
-
className
|
|
229
|
+
className,
|
|
230
|
+
asRoot = true,
|
|
231
|
+
width = 100,
|
|
232
|
+
height = 100
|
|
213
233
|
}) => {
|
|
214
234
|
const markerId = React79__default.useMemo(() => {
|
|
215
235
|
flowIdCounter += 1;
|
|
@@ -219,7 +239,7 @@ var init_SvgFlow = __esm({
|
|
|
219
239
|
return null;
|
|
220
240
|
}
|
|
221
241
|
const pathData = points.map((pt, i) => `${i === 0 ? "M" : "L"}${pt[0]},${pt[1]}`).join(" ");
|
|
222
|
-
|
|
242
|
+
const inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
223
243
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
224
244
|
"marker",
|
|
225
245
|
{
|
|
@@ -248,6 +268,10 @@ var init_SvgFlow = __esm({
|
|
|
248
268
|
}
|
|
249
269
|
)
|
|
250
270
|
] });
|
|
271
|
+
if (asRoot) {
|
|
272
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
273
|
+
}
|
|
274
|
+
return inner;
|
|
251
275
|
};
|
|
252
276
|
SvgFlow.displayName = "SvgFlow";
|
|
253
277
|
}
|
|
@@ -257,8 +281,8 @@ var init_SvgGrid = __esm({
|
|
|
257
281
|
"components/core/atoms/svg/SvgGrid.tsx"() {
|
|
258
282
|
"use client";
|
|
259
283
|
SvgGrid = ({
|
|
260
|
-
x,
|
|
261
|
-
y,
|
|
284
|
+
x = 10,
|
|
285
|
+
y = 10,
|
|
262
286
|
cols = 4,
|
|
263
287
|
rows: rows2 = 3,
|
|
264
288
|
spacing = 20,
|
|
@@ -266,10 +290,13 @@ var init_SvgGrid = __esm({
|
|
|
266
290
|
color = "var(--color-primary)",
|
|
267
291
|
opacity = 1,
|
|
268
292
|
className,
|
|
269
|
-
highlights = []
|
|
293
|
+
highlights = [],
|
|
294
|
+
asRoot = true,
|
|
295
|
+
width = 100,
|
|
296
|
+
height = 100
|
|
270
297
|
}) => {
|
|
271
298
|
const highlightSet = new Set(highlights);
|
|
272
|
-
|
|
299
|
+
const inner = /* @__PURE__ */ jsx("g", { className, opacity, children: Array.from({ length: rows2 }).map(
|
|
273
300
|
(_, row) => Array.from({ length: cols }).map((_2, col) => {
|
|
274
301
|
const index = row * cols + col;
|
|
275
302
|
const isHighlighted = highlightSet.has(index);
|
|
@@ -288,6 +315,10 @@ var init_SvgGrid = __esm({
|
|
|
288
315
|
);
|
|
289
316
|
})
|
|
290
317
|
) });
|
|
318
|
+
if (asRoot) {
|
|
319
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
320
|
+
}
|
|
321
|
+
return inner;
|
|
291
322
|
};
|
|
292
323
|
SvgGrid.displayName = "SvgGrid";
|
|
293
324
|
}
|
|
@@ -297,15 +328,18 @@ var init_SvgLobe = __esm({
|
|
|
297
328
|
"components/core/atoms/svg/SvgLobe.tsx"() {
|
|
298
329
|
"use client";
|
|
299
330
|
SvgLobe = ({
|
|
300
|
-
cx,
|
|
301
|
-
cy,
|
|
331
|
+
cx = 50,
|
|
332
|
+
cy = 50,
|
|
302
333
|
rx = 14,
|
|
303
334
|
ry = 20,
|
|
304
335
|
rotation = 0,
|
|
305
336
|
shells = 2,
|
|
306
337
|
color = "var(--color-primary)",
|
|
307
338
|
opacity = 1,
|
|
308
|
-
className
|
|
339
|
+
className,
|
|
340
|
+
asRoot = true,
|
|
341
|
+
width = 100,
|
|
342
|
+
height = 100
|
|
309
343
|
}) => {
|
|
310
344
|
const clampedShells = Math.max(1, Math.min(3, shells));
|
|
311
345
|
const renderShell = (shellIndex) => {
|
|
@@ -340,7 +374,7 @@ var init_SvgLobe = __esm({
|
|
|
340
374
|
)
|
|
341
375
|
] }, shellIndex);
|
|
342
376
|
};
|
|
343
|
-
|
|
377
|
+
const inner = /* @__PURE__ */ jsx(
|
|
344
378
|
"g",
|
|
345
379
|
{
|
|
346
380
|
className,
|
|
@@ -349,6 +383,10 @@ var init_SvgLobe = __esm({
|
|
|
349
383
|
children: Array.from({ length: clampedShells }, (_, i) => renderShell(i))
|
|
350
384
|
}
|
|
351
385
|
);
|
|
386
|
+
if (asRoot) {
|
|
387
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
388
|
+
}
|
|
389
|
+
return inner;
|
|
352
390
|
};
|
|
353
391
|
SvgLobe.displayName = "SvgLobe";
|
|
354
392
|
}
|
|
@@ -377,18 +415,21 @@ var init_SvgMesh = __esm({
|
|
|
377
415
|
"components/core/atoms/svg/SvgMesh.tsx"() {
|
|
378
416
|
"use client";
|
|
379
417
|
SvgMesh = ({
|
|
380
|
-
cx,
|
|
381
|
-
cy,
|
|
418
|
+
cx = 60,
|
|
419
|
+
cy = 60,
|
|
382
420
|
nodes = 6,
|
|
383
421
|
radius = 50,
|
|
384
422
|
color = "var(--color-primary)",
|
|
385
423
|
connectionDensity = 0.5,
|
|
386
424
|
opacity = 1,
|
|
387
|
-
className
|
|
425
|
+
className,
|
|
426
|
+
asRoot = true,
|
|
427
|
+
width = 120,
|
|
428
|
+
height = 120
|
|
388
429
|
}) => {
|
|
389
430
|
const positions = getNodePositions(cx, cy, nodes, radius);
|
|
390
431
|
const connections = getConnections(nodes, connectionDensity);
|
|
391
|
-
|
|
432
|
+
const inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
392
433
|
connections.map(([a, b]) => /* @__PURE__ */ jsx(
|
|
393
434
|
"line",
|
|
394
435
|
{
|
|
@@ -413,6 +454,10 @@ var init_SvgMesh = __esm({
|
|
|
413
454
|
i
|
|
414
455
|
))
|
|
415
456
|
] });
|
|
457
|
+
if (asRoot) {
|
|
458
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
459
|
+
}
|
|
460
|
+
return inner;
|
|
416
461
|
};
|
|
417
462
|
SvgMesh.displayName = "SvgMesh";
|
|
418
463
|
}
|
|
@@ -554,74 +599,82 @@ var init_SvgMorph = __esm({
|
|
|
554
599
|
};
|
|
555
600
|
FlowArrow.displayName = "FlowArrow";
|
|
556
601
|
SvgMorph = ({
|
|
557
|
-
x,
|
|
558
|
-
y,
|
|
602
|
+
x = 5,
|
|
603
|
+
y = 10,
|
|
559
604
|
size = 1,
|
|
560
605
|
variant = "generic",
|
|
561
606
|
color = "var(--color-primary)",
|
|
562
607
|
opacity = 1,
|
|
563
|
-
className
|
|
608
|
+
className,
|
|
609
|
+
asRoot = true,
|
|
610
|
+
width = 130,
|
|
611
|
+
height = 50
|
|
564
612
|
}) => {
|
|
565
613
|
const gap = 40 * size;
|
|
566
614
|
const midY = y + 10 * size;
|
|
615
|
+
let inner;
|
|
567
616
|
if (variant === "text-to-code") {
|
|
568
617
|
const leftEnd = x + 30 * size;
|
|
569
618
|
const rightStart = leftEnd + gap;
|
|
570
|
-
|
|
619
|
+
inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
571
620
|
/* @__PURE__ */ jsx(TextLines, { x, y, scale: size, color }),
|
|
572
621
|
/* @__PURE__ */ jsx(FlowArrow, { x1: leftEnd, y: midY, x2: rightStart, scale: size, color }),
|
|
573
622
|
/* @__PURE__ */ jsx(CodeBrackets, { x: rightStart, y, scale: size, color })
|
|
574
623
|
] });
|
|
575
|
-
}
|
|
576
|
-
if (variant === "code-to-app") {
|
|
624
|
+
} else if (variant === "code-to-app") {
|
|
577
625
|
const leftEnd = x + 26 * size;
|
|
578
626
|
const rightStart = leftEnd + gap;
|
|
579
|
-
|
|
627
|
+
inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
580
628
|
/* @__PURE__ */ jsx(CodeBrackets, { x, y, scale: size, color }),
|
|
581
629
|
/* @__PURE__ */ jsx(FlowArrow, { x1: leftEnd, y: midY, x2: rightStart, scale: size, color }),
|
|
582
630
|
/* @__PURE__ */ jsx(AppRect, { x: rightStart, y, scale: size, color })
|
|
583
631
|
] });
|
|
632
|
+
} else {
|
|
633
|
+
const circleR = 10 * size;
|
|
634
|
+
const circleX = x + circleR;
|
|
635
|
+
const squareStart = x + circleR * 2 + gap;
|
|
636
|
+
const squareSize = circleR * 2;
|
|
637
|
+
inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
638
|
+
/* @__PURE__ */ jsx(
|
|
639
|
+
"circle",
|
|
640
|
+
{
|
|
641
|
+
cx: circleX,
|
|
642
|
+
cy: midY,
|
|
643
|
+
r: circleR,
|
|
644
|
+
fill: "none",
|
|
645
|
+
stroke: color,
|
|
646
|
+
strokeWidth: 2 * size
|
|
647
|
+
}
|
|
648
|
+
),
|
|
649
|
+
/* @__PURE__ */ jsx(
|
|
650
|
+
FlowArrow,
|
|
651
|
+
{
|
|
652
|
+
x1: circleX + circleR + 2 * size,
|
|
653
|
+
y: midY,
|
|
654
|
+
x2: squareStart,
|
|
655
|
+
scale: size,
|
|
656
|
+
color
|
|
657
|
+
}
|
|
658
|
+
),
|
|
659
|
+
/* @__PURE__ */ jsx(
|
|
660
|
+
"rect",
|
|
661
|
+
{
|
|
662
|
+
x: squareStart,
|
|
663
|
+
y: midY - circleR,
|
|
664
|
+
width: squareSize,
|
|
665
|
+
height: squareSize,
|
|
666
|
+
rx: 3 * size,
|
|
667
|
+
fill: "none",
|
|
668
|
+
stroke: color,
|
|
669
|
+
strokeWidth: 2 * size
|
|
670
|
+
}
|
|
671
|
+
)
|
|
672
|
+
] });
|
|
584
673
|
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
return /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
590
|
-
/* @__PURE__ */ jsx(
|
|
591
|
-
"circle",
|
|
592
|
-
{
|
|
593
|
-
cx: circleX,
|
|
594
|
-
cy: midY,
|
|
595
|
-
r: circleR,
|
|
596
|
-
fill: "none",
|
|
597
|
-
stroke: color,
|
|
598
|
-
strokeWidth: 2 * size
|
|
599
|
-
}
|
|
600
|
-
),
|
|
601
|
-
/* @__PURE__ */ jsx(
|
|
602
|
-
FlowArrow,
|
|
603
|
-
{
|
|
604
|
-
x1: circleX + circleR + 2 * size,
|
|
605
|
-
y: midY,
|
|
606
|
-
x2: squareStart,
|
|
607
|
-
scale: size,
|
|
608
|
-
color
|
|
609
|
-
}
|
|
610
|
-
),
|
|
611
|
-
/* @__PURE__ */ jsx(
|
|
612
|
-
"rect",
|
|
613
|
-
{
|
|
614
|
-
x: squareStart,
|
|
615
|
-
y: midY - circleR,
|
|
616
|
-
width: squareSize,
|
|
617
|
-
height: squareSize,
|
|
618
|
-
rx: 3 * size,
|
|
619
|
-
fill: "none",
|
|
620
|
-
stroke: color,
|
|
621
|
-
strokeWidth: 2 * size
|
|
622
|
-
}
|
|
623
|
-
)
|
|
624
|
-
] });
|
|
674
|
+
if (asRoot) {
|
|
675
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
676
|
+
}
|
|
677
|
+
return /* @__PURE__ */ jsx(Fragment, { children: inner });
|
|
625
678
|
};
|
|
626
679
|
SvgMorph.displayName = "SvgMorph";
|
|
627
680
|
}
|
|
@@ -631,16 +684,19 @@ var init_SvgNode = __esm({
|
|
|
631
684
|
"components/core/atoms/svg/SvgNode.tsx"() {
|
|
632
685
|
"use client";
|
|
633
686
|
SvgNode = ({
|
|
634
|
-
x,
|
|
635
|
-
y,
|
|
687
|
+
x = 50,
|
|
688
|
+
y = 50,
|
|
636
689
|
r = 6,
|
|
637
690
|
variant = "filled",
|
|
638
691
|
color = "var(--color-primary)",
|
|
639
692
|
opacity = 1,
|
|
640
693
|
className,
|
|
641
|
-
label
|
|
694
|
+
label,
|
|
695
|
+
asRoot = true,
|
|
696
|
+
width = 100,
|
|
697
|
+
height = 100
|
|
642
698
|
}) => {
|
|
643
|
-
|
|
699
|
+
const inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
644
700
|
variant === "pulse" && /* @__PURE__ */ jsx(
|
|
645
701
|
"circle",
|
|
646
702
|
{
|
|
@@ -678,6 +734,10 @@ var init_SvgNode = __esm({
|
|
|
678
734
|
}
|
|
679
735
|
)
|
|
680
736
|
] });
|
|
737
|
+
if (asRoot) {
|
|
738
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
739
|
+
}
|
|
740
|
+
return inner;
|
|
681
741
|
};
|
|
682
742
|
SvgNode.displayName = "SvgNode";
|
|
683
743
|
}
|
|
@@ -699,16 +759,19 @@ var init_SvgPulse = __esm({
|
|
|
699
759
|
}
|
|
700
760
|
`;
|
|
701
761
|
SvgPulse = ({
|
|
702
|
-
cx,
|
|
703
|
-
cy,
|
|
762
|
+
cx = 70,
|
|
763
|
+
cy = 70,
|
|
704
764
|
rings = 3,
|
|
705
765
|
maxRadius = 60,
|
|
706
766
|
color = "var(--color-primary)",
|
|
707
767
|
animated = true,
|
|
708
768
|
opacity = 1,
|
|
709
|
-
className
|
|
769
|
+
className,
|
|
770
|
+
asRoot = true,
|
|
771
|
+
width = 140,
|
|
772
|
+
height = 140
|
|
710
773
|
}) => {
|
|
711
|
-
|
|
774
|
+
const inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
712
775
|
animated && /* @__PURE__ */ jsx("style", { children: PULSE_KEYFRAMES }),
|
|
713
776
|
Array.from({ length: rings }).map((_, i) => {
|
|
714
777
|
const ringRadius = (i + 1) / rings * maxRadius;
|
|
@@ -734,6 +797,10 @@ var init_SvgPulse = __esm({
|
|
|
734
797
|
}),
|
|
735
798
|
/* @__PURE__ */ jsx("circle", { cx, cy, r: 3, fill: color })
|
|
736
799
|
] });
|
|
800
|
+
if (asRoot) {
|
|
801
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
802
|
+
}
|
|
803
|
+
return inner;
|
|
737
804
|
};
|
|
738
805
|
SvgPulse.displayName = "SvgPulse";
|
|
739
806
|
}
|
|
@@ -744,21 +811,24 @@ var init_SvgRing = __esm({
|
|
|
744
811
|
"use client";
|
|
745
812
|
ringIdCounter = 0;
|
|
746
813
|
SvgRing = ({
|
|
747
|
-
cx,
|
|
748
|
-
cy,
|
|
814
|
+
cx = 50,
|
|
815
|
+
cy = 50,
|
|
749
816
|
r = 40,
|
|
750
817
|
variant = "solid",
|
|
751
818
|
color = "var(--color-primary)",
|
|
752
819
|
strokeWidth = 1.5,
|
|
753
820
|
opacity = 1,
|
|
754
821
|
className,
|
|
755
|
-
label
|
|
822
|
+
label,
|
|
823
|
+
asRoot = true,
|
|
824
|
+
width = 100,
|
|
825
|
+
height = 100
|
|
756
826
|
}) => {
|
|
757
827
|
const gradientId = React79__default.useMemo(() => {
|
|
758
828
|
ringIdCounter += 1;
|
|
759
829
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
760
830
|
}, []);
|
|
761
|
-
|
|
831
|
+
const inner = /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
762
832
|
variant === "glow" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
763
833
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("radialGradient", { id: gradientId, cx: "50%", cy: "50%", r: "50%", children: [
|
|
764
834
|
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color, stopOpacity: 0.15 }),
|
|
@@ -791,6 +861,10 @@ var init_SvgRing = __esm({
|
|
|
791
861
|
}
|
|
792
862
|
)
|
|
793
863
|
] });
|
|
864
|
+
if (asRoot) {
|
|
865
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
866
|
+
}
|
|
867
|
+
return inner;
|
|
794
868
|
};
|
|
795
869
|
SvgRing.displayName = "SvgRing";
|
|
796
870
|
}
|
|
@@ -802,15 +876,18 @@ var init_SvgShield = __esm({
|
|
|
802
876
|
SHIELD_PATH = "M15,2 C15,2 5,5 2,6 C2,6 2,18 5,24 C8,30 15,34 15,34 C15,34 22,30 25,24 C28,18 28,6 28,6 C25,5 15,2 15,2 Z";
|
|
803
877
|
CHECK_PATH = "M10,18 L14,22 L21,13";
|
|
804
878
|
SvgShield = ({
|
|
805
|
-
x,
|
|
806
|
-
y,
|
|
879
|
+
x = 50,
|
|
880
|
+
y = 50,
|
|
807
881
|
size = 1,
|
|
808
882
|
variant = "outline",
|
|
809
883
|
color = "var(--color-primary)",
|
|
810
884
|
opacity = 1,
|
|
811
|
-
className
|
|
885
|
+
className,
|
|
886
|
+
asRoot = true,
|
|
887
|
+
width = 100,
|
|
888
|
+
height = 100
|
|
812
889
|
}) => {
|
|
813
|
-
|
|
890
|
+
const inner = /* @__PURE__ */ jsxs(
|
|
814
891
|
"g",
|
|
815
892
|
{
|
|
816
893
|
className,
|
|
@@ -841,6 +918,10 @@ var init_SvgShield = __esm({
|
|
|
841
918
|
]
|
|
842
919
|
}
|
|
843
920
|
);
|
|
921
|
+
if (asRoot) {
|
|
922
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${width} ${height}`, width, height, children: inner });
|
|
923
|
+
}
|
|
924
|
+
return inner;
|
|
844
925
|
};
|
|
845
926
|
SvgShield.displayName = "SvgShield";
|
|
846
927
|
}
|
|
@@ -850,20 +931,23 @@ var init_SvgStack = __esm({
|
|
|
850
931
|
"components/core/atoms/svg/SvgStack.tsx"() {
|
|
851
932
|
"use client";
|
|
852
933
|
SvgStack = ({
|
|
853
|
-
x,
|
|
854
|
-
y,
|
|
934
|
+
x = 10,
|
|
935
|
+
y = 40,
|
|
855
936
|
layers: rawLayers = 3,
|
|
856
937
|
width = 60,
|
|
857
938
|
height = 40,
|
|
858
939
|
color = "var(--color-primary)",
|
|
859
940
|
opacity = 1,
|
|
860
941
|
className,
|
|
861
|
-
labels
|
|
942
|
+
labels,
|
|
943
|
+
asRoot = true,
|
|
944
|
+
svgWidth = 90,
|
|
945
|
+
svgHeight = 80
|
|
862
946
|
}) => {
|
|
863
947
|
const layers = Math.max(2, Math.min(4, rawLayers));
|
|
864
948
|
const verticalOffset = 8;
|
|
865
949
|
const horizontalOffset = 4;
|
|
866
|
-
|
|
950
|
+
const inner = /* @__PURE__ */ jsx("g", { className, opacity, children: Array.from({ length: layers }).map((_, i) => {
|
|
867
951
|
const layerIndex = layers - 1 - i;
|
|
868
952
|
const layerX = x + layerIndex * horizontalOffset;
|
|
869
953
|
const layerY = y - layerIndex * verticalOffset;
|
|
@@ -901,6 +985,10 @@ var init_SvgStack = __esm({
|
|
|
901
985
|
)
|
|
902
986
|
] }, layerIndex);
|
|
903
987
|
}) });
|
|
988
|
+
if (asRoot) {
|
|
989
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: `0 0 ${svgWidth} ${svgHeight}`, width: svgWidth, height: svgHeight, children: inner });
|
|
990
|
+
}
|
|
991
|
+
return inner;
|
|
904
992
|
};
|
|
905
993
|
SvgStack.displayName = "SvgStack";
|
|
906
994
|
}
|
|
@@ -3151,10 +3239,11 @@ var init_ProgressBar = __esm({
|
|
|
3151
3239
|
const effectiveColor = color ?? variant;
|
|
3152
3240
|
const effectiveShowPercentage = showPercentage || showLabel;
|
|
3153
3241
|
if (progressType === "linear") {
|
|
3242
|
+
const showHeader = label || effectiveShowPercentage;
|
|
3154
3243
|
return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), children: [
|
|
3155
|
-
|
|
3156
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-foreground", children: label }),
|
|
3157
|
-
effectiveShowPercentage && /* @__PURE__ */ jsxs("span", { className: "text-sm text-foreground font-medium", children: [
|
|
3244
|
+
showHeader && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-1.5", children: [
|
|
3245
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-foreground", children: label }),
|
|
3246
|
+
effectiveShowPercentage && /* @__PURE__ */ jsxs("span", { className: cn("text-sm text-foreground font-medium", !label && "ml-auto"), children: [
|
|
3158
3247
|
Math.round(percentage),
|
|
3159
3248
|
"%"
|
|
3160
3249
|
] })
|
|
@@ -3239,10 +3328,11 @@ var init_ProgressBar = __esm({
|
|
|
3239
3328
|
const stepValue = max / steps;
|
|
3240
3329
|
const activeSteps = Math.floor(value / stepValue);
|
|
3241
3330
|
const partialStep = value % stepValue / stepValue;
|
|
3331
|
+
const showStepHeader = label || effectiveShowPercentage;
|
|
3242
3332
|
return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), children: [
|
|
3243
|
-
|
|
3244
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
3245
|
-
effectiveShowPercentage && /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
|
|
3333
|
+
showStepHeader && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
3334
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
3335
|
+
effectiveShowPercentage && /* @__PURE__ */ jsxs("span", { className: cn("text-sm text-muted-foreground", !label && "ml-auto"), children: [
|
|
3246
3336
|
Math.round(percentage),
|
|
3247
3337
|
"%"
|
|
3248
3338
|
] })
|
|
@@ -9585,7 +9675,7 @@ var init_AuthLayout = __esm({
|
|
|
9585
9675
|
init_Stack();
|
|
9586
9676
|
init_Typography();
|
|
9587
9677
|
AuthLayout = ({
|
|
9588
|
-
appName = "
|
|
9678
|
+
appName = "My App",
|
|
9589
9679
|
logo,
|
|
9590
9680
|
backgroundImage,
|
|
9591
9681
|
showBranding = true,
|
|
@@ -13208,7 +13298,7 @@ var init_MarkdownContent = __esm({
|
|
|
13208
13298
|
init_CodeBlock();
|
|
13209
13299
|
init_cn();
|
|
13210
13300
|
MarkdownContent = React79__default.memo(
|
|
13211
|
-
({ content, direction, className }) => {
|
|
13301
|
+
({ content, direction = "ltr", className }) => {
|
|
13212
13302
|
const { t: _t } = useTranslate();
|
|
13213
13303
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
13214
13304
|
return /* @__PURE__ */ jsx(
|
|
@@ -47638,6 +47728,7 @@ var init_component_registry_generated = __esm({
|
|
|
47638
47728
|
init_StatDisplay();
|
|
47639
47729
|
init_StateArchitectBoard();
|
|
47640
47730
|
init_StateIndicator();
|
|
47731
|
+
init_StateJsonView();
|
|
47641
47732
|
init_StateMachineView();
|
|
47642
47733
|
init_StateNode();
|
|
47643
47734
|
init_StatsGrid();
|
|
@@ -47952,6 +48043,7 @@ var init_component_registry_generated = __esm({
|
|
|
47952
48043
|
"StatDisplay": StatDisplay,
|
|
47953
48044
|
"StateArchitectBoard": StateArchitectBoard,
|
|
47954
48045
|
"StateIndicator": StateIndicator,
|
|
48046
|
+
"StateJsonView": StateJsonView,
|
|
47955
48047
|
"StateMachineView": StateMachineView,
|
|
47956
48048
|
"StateNode": StateNode2,
|
|
47957
48049
|
"StatsGrid": StatsGrid,
|
package/dist/docs/index.cjs
CHANGED
|
@@ -4744,8 +4744,15 @@ var init_useTranslate = __esm({
|
|
|
4744
4744
|
I18nContext = React7.createContext({
|
|
4745
4745
|
locale: "en",
|
|
4746
4746
|
direction: "ltr",
|
|
4747
|
-
t: (key) =>
|
|
4748
|
-
|
|
4747
|
+
t: (key, params) => {
|
|
4748
|
+
let msg = coreLocale[key] ?? key;
|
|
4749
|
+
if (params) {
|
|
4750
|
+
for (const [k, v] of Object.entries(params)) {
|
|
4751
|
+
msg = msg.split(`{{${k}}}`).join(String(v));
|
|
4752
|
+
}
|
|
4753
|
+
}
|
|
4754
|
+
return msg;
|
|
4755
|
+
}
|
|
4749
4756
|
});
|
|
4750
4757
|
I18nContext.displayName = "I18nContext";
|
|
4751
4758
|
I18nContext.Provider;
|
package/dist/docs/index.js
CHANGED
|
@@ -4699,8 +4699,15 @@ var init_useTranslate = __esm({
|
|
|
4699
4699
|
I18nContext = createContext({
|
|
4700
4700
|
locale: "en",
|
|
4701
4701
|
direction: "ltr",
|
|
4702
|
-
t: (key) =>
|
|
4703
|
-
|
|
4702
|
+
t: (key, params) => {
|
|
4703
|
+
let msg = coreLocale[key] ?? key;
|
|
4704
|
+
if (params) {
|
|
4705
|
+
for (const [k, v] of Object.entries(params)) {
|
|
4706
|
+
msg = msg.split(`{{${k}}}`).join(String(v));
|
|
4707
|
+
}
|
|
4708
|
+
}
|
|
4709
|
+
return msg;
|
|
4710
|
+
}
|
|
4704
4711
|
});
|
|
4705
4712
|
I18nContext.displayName = "I18nContext";
|
|
4706
4713
|
I18nContext.Provider;
|