@almadar/ui 6.58.0 → 6.61.0

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.
Files changed (94) hide show
  1. package/dist/BehaviorValueFrame-3ORZHPWQ.css +1252 -0
  2. package/dist/BehaviorValueFrame-QTD7BWOI.js +18 -0
  3. package/dist/{Canvas3DHost-BTvRPfsr.d.ts → Canvas3DHost-CNjANoaU.d.ts} +1 -1
  4. package/dist/{GameAudioProvider-kXbonWTv.d.ts → GameAudioProvider-Dv_L-PHt.d.ts} +1 -1
  5. package/dist/TraitValueFrame-2WMYJOA5.css +1252 -0
  6. package/dist/TraitValueFrame-WOXNLLMM.js +17 -0
  7. package/dist/Typography-BY4A2NBY.js +5 -0
  8. package/dist/{UISlotRenderer-N5DFYE6K.js → UISlotRenderer-EEOXSJCI.js} +10 -8
  9. package/dist/avl/index.cjs +31960 -27831
  10. package/dist/avl/index.d.ts +36 -13
  11. package/dist/avl/index.js +331 -6147
  12. package/dist/{avl-3d-context-BpBKZIbc.d.ts → avl-3d-context-Dxun3-ri.d.ts} +2 -0
  13. package/dist/{chunk-I2ZNE5TD.js → chunk-6PV4LASE.js} +9495 -639
  14. package/dist/{chunk-723MJUU3.js → chunk-6ZCU3BQN.js} +1 -1
  15. package/dist/{chunk-GZGDBS4S.js → chunk-7NIU5GDC.js} +2 -2
  16. package/dist/{chunk-YYYHH5BA.js → chunk-CB64IOYD.js} +0 -4
  17. package/dist/{chunk-MZIDOJMD.js → chunk-EIIQGOZW.js} +2 -1
  18. package/dist/chunk-F7NZ3KZQ.js +434 -0
  19. package/dist/{chunk-LZRW6GXG.js → chunk-FYX64CDL.js} +0 -2
  20. package/dist/{chunk-4ZGXIW3B.js → chunk-KZRAMPM6.js} +1 -1
  21. package/dist/{chunk-VHTJRS2N.js → chunk-L3MTZ3RH.js} +7 -0
  22. package/dist/chunk-LUREMDI3.js +49 -0
  23. package/dist/{chunk-HA7CJWQX.js → chunk-MGN6B6OQ.js} +1477 -1177
  24. package/dist/{chunk-Q47ZN2DW.js → chunk-N23SVGTH.js} +83 -1
  25. package/dist/{chunk-KJGVLXEN.js → chunk-N4IJS5DD.js} +50 -116
  26. package/dist/{chunk-I5QOYW2Z.js → chunk-UTSDPJUP.js} +205 -2
  27. package/dist/{chunk-V3FGTQUE.js → chunk-ZR45FGW3.js} +7 -1
  28. package/dist/{cn-DIql5232.d.ts → cn-CDIhHCUC.d.ts} +40 -16
  29. package/dist/components/index.cjs +14455 -4099
  30. package/dist/components/index.d.ts +165 -177
  31. package/dist/components/index.js +14 -15
  32. package/dist/context/index.cjs +16 -1
  33. package/dist/context/index.js +4 -2
  34. package/dist/hooks/index.cjs +79 -6
  35. package/dist/hooks/index.d.ts +43 -2
  36. package/dist/hooks/index.js +6 -7
  37. package/dist/lib/drawable/three/index.cjs +350 -26
  38. package/dist/lib/drawable/three/index.d.ts +5 -5
  39. package/dist/lib/drawable/three/index.js +28 -7
  40. package/dist/lib/index.cjs +90 -4
  41. package/dist/lib/index.d.ts +3 -3
  42. package/dist/lib/index.js +74 -6
  43. package/dist/locales/index.cjs +0 -6
  44. package/dist/locales/index.js +2 -2
  45. package/dist/{paintDispatch-BN8Vbzgs.d.ts → paintDispatch-Cp1_S93j.d.ts} +30 -2
  46. package/dist/providers/index.cjs +13853 -1075
  47. package/dist/providers/index.d.ts +38 -6
  48. package/dist/providers/index.js +40 -30
  49. package/dist/runtime/index.cjs +28369 -18287
  50. package/dist/runtime/index.d.ts +65 -3
  51. package/dist/runtime/index.js +13 -379
  52. package/dist/ssr/index.cjs +508 -133
  53. package/dist/ssr/index.d.cts +56 -4
  54. package/dist/ssr/index.d.ts +56 -4
  55. package/dist/ssr/index.js +446 -71
  56. package/dist/{verificationRegistry-CK76GUfH.d.ts → verificationRegistry-B5aGl7WF.d.ts} +3 -2
  57. package/locales/ar.json +0 -2
  58. package/locales/en.json +0 -2
  59. package/locales/sl.json +0 -2
  60. package/package.json +7 -7
  61. package/tailwind-preset.cjs +78 -8
  62. package/themes/_contract.md +6 -0
  63. package/themes/_fonts.css +4 -4
  64. package/themes/_foundation.css +11 -0
  65. package/themes/_presets.css +2 -0
  66. package/themes/almadar-website.css +10 -0
  67. package/themes/almadar.css +10 -0
  68. package/themes/atelier.css +10 -0
  69. package/themes/bauhaus.css +10 -0
  70. package/themes/bloomberg-dense.css +10 -0
  71. package/themes/clay.css +10 -0
  72. package/themes/corporate.css +10 -0
  73. package/themes/gazette.css +10 -0
  74. package/themes/glass.css +10 -0
  75. package/themes/kflow.css +5 -0
  76. package/themes/kiosk.css +10 -0
  77. package/themes/linear-clean.css +10 -0
  78. package/themes/material.css +10 -0
  79. package/themes/minimalist.css +10 -0
  80. package/themes/nata.css +304 -0
  81. package/themes/neon.css +10 -0
  82. package/themes/notion-editorial.css +10 -0
  83. package/themes/orb.css +10 -0
  84. package/themes/prism.css +10 -0
  85. package/themes/rawi.css +304 -0
  86. package/themes/retro.css +10 -0
  87. package/themes/risograph.css +10 -0
  88. package/themes/scandi.css +10 -0
  89. package/themes/solarpunk.css +10 -0
  90. package/themes/terminal.css +138 -128
  91. package/dist/Typography-LZTP72Y4.js +0 -5
  92. package/dist/chunk-D2E44ODB.js +0 -350
  93. package/dist/chunk-HB3D3HUJ.js +0 -2265
  94. package/dist/chunk-N7JIG57B.js +0 -138
@@ -1,350 +0,0 @@
1
- // lib/design-classes.ts
2
- var DESIGN_COLOR_TOKENS = [
3
- "primary",
4
- "primary-foreground",
5
- "primary-hover",
6
- "secondary",
7
- "secondary-foreground",
8
- "secondary-hover",
9
- "muted",
10
- "muted-foreground",
11
- "accent",
12
- "accent-foreground",
13
- "background",
14
- "foreground",
15
- "card",
16
- "card-foreground",
17
- "surface",
18
- "border",
19
- "input",
20
- "ring",
21
- "error",
22
- "error-foreground",
23
- "success",
24
- "success-foreground",
25
- "warning",
26
- "warning-foreground",
27
- "info",
28
- "info-foreground"
29
- ];
30
- var DESIGN_COLOR_UTILITIES = ["bg", "text", "border"];
31
- var DESIGN_RADIUS_TOKENS = ["none", "sm", "md", "lg", "xl", "full"];
32
- var DESIGN_SPACING_SCALE = [
33
- 0,
34
- 0.5,
35
- 1,
36
- 1.5,
37
- 2,
38
- 2.5,
39
- 3,
40
- 3.5,
41
- 4,
42
- 5,
43
- 6,
44
- 7,
45
- 8,
46
- 9,
47
- 10,
48
- 11,
49
- 12,
50
- 14,
51
- 16,
52
- 20,
53
- 24,
54
- 28,
55
- 32,
56
- 36,
57
- 40,
58
- 44,
59
- 48,
60
- 52,
61
- 56,
62
- 60,
63
- 64,
64
- 72,
65
- 80,
66
- 96
67
- ];
68
- var DESIGN_SPACING_UTILITIES = [
69
- "w",
70
- "h",
71
- "min-w",
72
- "max-w",
73
- "min-h",
74
- "max-h",
75
- "p",
76
- "px",
77
- "py",
78
- "pt",
79
- "pr",
80
- "pb",
81
- "pl",
82
- "m",
83
- "mx",
84
- "my",
85
- "gap"
86
- ];
87
- var DESIGN_SPACING_STEP_PX = 4;
88
- var defaultSpacingStepPx = (step) => step * DESIGN_SPACING_STEP_PX;
89
- var DESIGN_SPACING_TOKEN_STEPS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
90
- function spacingTokenOf(step) {
91
- return DESIGN_SPACING_TOKEN_STEPS.includes(step) ? `--space-${step}` : null;
92
- }
93
- function snapToSpacingStep(px, pxOf = defaultSpacingStepPx) {
94
- const target = Math.max(0, px);
95
- let best = DESIGN_SPACING_SCALE[0];
96
- for (const step of DESIGN_SPACING_SCALE) {
97
- const d = Math.abs(pxOf(step) - target);
98
- const bestD = Math.abs(pxOf(best) - target);
99
- if (d < bestD || d === bestD && spacingTokenOf(step) !== null && spacingTokenOf(best) === null) best = step;
100
- }
101
- return best;
102
- }
103
- var SPACING_STEP_BY_TEXT = new Map(
104
- DESIGN_SPACING_SCALE.map((step) => [String(step), step])
105
- );
106
- function stepOf(className, utility) {
107
- if (!className.startsWith(`${utility}-`)) return void 0;
108
- return SPACING_STEP_BY_TEXT.get(className.slice(utility.length + 1));
109
- }
110
- function isAxisSizeClass(className, axis) {
111
- return className.startsWith(`${axis}-`);
112
- }
113
- function sizingOf(classes, axis) {
114
- for (const c of classes) {
115
- if (c === `${axis}-full`) return { mode: "fill" };
116
- if (c === `${axis}-fit`) return { mode: "hug" };
117
- const step = stepOf(c, axis);
118
- if (step !== void 0) return { mode: "fixed", step };
119
- }
120
- return { mode: "hug" };
121
- }
122
- function withSizing(classes, axis, sizing) {
123
- const kept = classes.filter((c) => !isAxisSizeClass(c, axis));
124
- const next = sizing.mode === "fixed" ? `${axis}-${sizing.step}` : sizing.mode === "hug" ? `${axis}-fit` : `${axis}-full`;
125
- return [...kept, next];
126
- }
127
- function sizeLimitOf(classes, axis, limit) {
128
- for (const c of classes) {
129
- const step = stepOf(c, `${limit}-${axis}`);
130
- if (step !== void 0) return step;
131
- }
132
- return null;
133
- }
134
- function withSizeLimit(classes, axis, limit, step) {
135
- const kept = classes.filter((c) => !c.startsWith(`${limit}-${axis}-`));
136
- return step === null ? kept : [...kept, `${limit}-${axis}-${step}`];
137
- }
138
- var PADDING_UTILITIES = ["p", "px", "py", "pt", "pr", "pb", "pl"];
139
- function isSpacingClass(className) {
140
- return stepOf(className, "gap") !== void 0 || PADDING_UTILITIES.some((u) => stepOf(className, u) !== void 0);
141
- }
142
- function spacingOf(classes) {
143
- const find = (utility) => {
144
- for (const c of classes) {
145
- const step = stepOf(c, utility);
146
- if (step !== void 0) return step;
147
- }
148
- return void 0;
149
- };
150
- const all = find("p") ?? 0;
151
- const x = find("px") ?? all;
152
- const y = find("py") ?? all;
153
- return {
154
- gap: find("gap") ?? 0,
155
- top: find("pt") ?? y,
156
- right: find("pr") ?? x,
157
- bottom: find("pb") ?? y,
158
- left: find("pl") ?? x
159
- };
160
- }
161
- function withSpacing(classes, change) {
162
- const next = { ...spacingOf(classes), ...change };
163
- const kept = classes.filter((c) => !isSpacingClass(c));
164
- const out = [...kept];
165
- if (next.gap !== 0) out.push(`gap-${next.gap}`);
166
- const { top, right, bottom, left } = next;
167
- if (top === right && right === bottom && bottom === left) {
168
- if (top !== 0) out.push(`p-${top}`);
169
- } else if (top === bottom && left === right) {
170
- out.push(`px-${left}`, `py-${top}`);
171
- } else {
172
- out.push(`pt-${top}`, `pr-${right}`, `pb-${bottom}`, `pl-${left}`);
173
- }
174
- return out;
175
- }
176
- var DIRECTION_CLASSES = ["flex-row", "flex-row-reverse", "flex-col", "flex-col-reverse"];
177
- var ALIGNMENTS = ["start", "center", "end"];
178
- var JUSTIFIES = [...ALIGNMENTS, "between"];
179
- var WRAP_CLASSES = ["flex-wrap", "flex-nowrap", "flex-wrap-reverse"];
180
- function firstOf(classes, utility, values) {
181
- for (const c of classes) {
182
- for (const v of values) if (c === `${utility}-${v}`) return v;
183
- }
184
- return null;
185
- }
186
- function layoutOf(classes) {
187
- const direction = classes.find((c) => DIRECTION_CLASSES.includes(c));
188
- return {
189
- direction: direction === void 0 ? null : direction.startsWith("flex-row") ? "horizontal" : "vertical",
190
- align: firstOf(classes, "items", ALIGNMENTS),
191
- justify: firstOf(classes, "justify", JUSTIFIES),
192
- wrap: classes.includes("flex-wrap")
193
- };
194
- }
195
- function withLayout(classes, change) {
196
- let next = [...classes];
197
- if (change.direction) {
198
- next = next.filter((c) => !DIRECTION_CLASSES.includes(c));
199
- next.push(change.direction === "horizontal" ? "flex-row" : "flex-col");
200
- }
201
- if (change.align) {
202
- next = next.filter((c) => !c.startsWith("items-"));
203
- next.push(`items-${change.align}`);
204
- }
205
- if (change.justify) {
206
- next = next.filter((c) => !c.startsWith("justify-"));
207
- next.push(`justify-${change.justify}`);
208
- }
209
- if (change.wrap !== void 0) {
210
- next = next.filter((c) => !WRAP_CLASSES.includes(c));
211
- if (change.wrap) next.push("flex-wrap");
212
- }
213
- return next;
214
- }
215
- var AXIS_SIDES = { x: ["left", "right"], y: ["top", "bottom"] };
216
- var CENTER_CLASSES = { x: ["left-1/2", "-translate-x-1/2"], y: ["top-1/2", "-translate-y-1/2"] };
217
- function offsetOf(classes, side) {
218
- for (const c of classes) {
219
- if (!c.startsWith(`${side}-`)) continue;
220
- const step = stepOf(c, side);
221
- if (step !== void 0) return { value: defaultSpacingStepPx(step), unit: "px" };
222
- const m = /^\[(-?\d+(?:\.\d+)?)(px|%)\]$/.exec(c.slice(side.length + 1));
223
- if (m) return { value: Number(m[1]), unit: m[2] === "%" ? "%" : "px" };
224
- }
225
- return null;
226
- }
227
- function centerOffsetOf(classes, side) {
228
- for (const c of classes) {
229
- if (c === `${side}-1/2`) return 0;
230
- const m = new RegExp(`^${side}-\\[calc\\(50%([+-])(\\d+(?:\\.\\d+)?)px\\)\\]$`).exec(c);
231
- if (m) return (m[1] === "-" ? -1 : 1) * Number(m[2]);
232
- }
233
- return null;
234
- }
235
- function axisPositionOf(classes, axis) {
236
- const [startSide, endSide] = AXIS_SIDES[axis];
237
- const center = centerOffsetOf(classes, startSide);
238
- if (center !== null && classes.includes(CENTER_CLASSES[axis][1])) return { constraint: "center", start: center, end: 0 };
239
- const start = offsetOf(classes, startSide);
240
- const end = offsetOf(classes, endSide);
241
- if (start?.unit === "%" || end?.unit === "%") {
242
- return { constraint: "scale", start: start?.value ?? 0, end: end?.value ?? 0 };
243
- }
244
- if (start && end) return { constraint: "both", start: start.value, end: end.value };
245
- if (end) return { constraint: "end", start: 0, end: end.value };
246
- return { constraint: "start", start: start?.value ?? 0, end: 0 };
247
- }
248
- function positionOf(classes) {
249
- return {
250
- absolute: classes.includes("absolute"),
251
- x: axisPositionOf(classes, "x"),
252
- y: axisPositionOf(classes, "y")
253
- };
254
- }
255
- function isPositionClass(className) {
256
- if (className === "absolute") return true;
257
- if (CENTER_CLASSES.x.some((c) => c === className) || CENTER_CLASSES.y.some((c) => c === className)) return true;
258
- return [...AXIS_SIDES.x, ...AXIS_SIDES.y].some((side) => className.startsWith(`${side}-`));
259
- }
260
- function offsetClass(side, value, unit) {
261
- const rounded = unit === "%" ? Math.round(value * 10) / 10 : Math.round(value);
262
- return rounded === 0 ? `${side}-0` : `${side}-[${rounded}${unit}]`;
263
- }
264
- function axisClasses(axis, p) {
265
- const [startSide, endSide] = AXIS_SIDES[axis];
266
- switch (p.constraint) {
267
- case "center": {
268
- const offset = Math.round(p.start);
269
- const pin = offset === 0 ? CENTER_CLASSES[axis][0] : `${startSide}-[calc(50%${offset < 0 ? "-" : "+"}${Math.abs(offset)}px)]`;
270
- return [pin, CENTER_CLASSES[axis][1]];
271
- }
272
- case "end":
273
- return [offsetClass(endSide, p.end, "px")];
274
- case "both":
275
- return [offsetClass(startSide, p.start, "px"), offsetClass(endSide, p.end, "px")];
276
- case "scale":
277
- return [offsetClass(startSide, p.start, "%"), offsetClass(endSide, p.end, "%")];
278
- case "start":
279
- return [offsetClass(startSide, p.start, "px")];
280
- }
281
- }
282
- function withPosition(classes, position) {
283
- const kept = classes.filter((c) => !isPositionClass(c));
284
- if (!position.absolute) return kept;
285
- return [...kept, "absolute", ...axisClasses("x", position.x), ...axisClasses("y", position.y)];
286
- }
287
- var COLOR_TOKEN_SET = new Set(DESIGN_COLOR_TOKENS);
288
- var RADIUS_TOKEN_SET = new Set(DESIGN_RADIUS_TOKENS);
289
- function isColorToken(value) {
290
- return COLOR_TOKEN_SET.has(value);
291
- }
292
- function isRadiusToken(value) {
293
- return RADIUS_TOKEN_SET.has(value);
294
- }
295
- function tokenOfDesignClass(className) {
296
- const base = className.slice(className.lastIndexOf(":") + 1);
297
- if (base.startsWith("rounded-")) {
298
- const key = base.slice("rounded-".length);
299
- return isRadiusToken(key) ? { group: "radii", key } : null;
300
- }
301
- for (const utility of DESIGN_COLOR_UTILITIES) {
302
- const prefix = `${utility}-`;
303
- if (!base.startsWith(prefix)) continue;
304
- const key = base.slice(prefix.length);
305
- if (isColorToken(key)) return { group: "colors", key };
306
- }
307
- for (const utility of DESIGN_SPACING_UTILITIES) {
308
- const step = stepOf(base, utility);
309
- if (step !== void 0 && spacingTokenOf(step) !== null) return { group: "spacing", key: String(step) };
310
- }
311
- return null;
312
- }
313
- function isArbitraryClass(className) {
314
- return /^[a-z0-9:@/-]*-\[[^\]\s]+\]$/i.test(className);
315
- }
316
- function collectClasses(value, found) {
317
- if (Array.isArray(value)) {
318
- for (const item of value) collectClasses(item, found);
319
- return;
320
- }
321
- if (value === null || typeof value !== "object") return;
322
- for (const [key, child] of Object.entries(value)) {
323
- if (key === "className" && typeof child === "string") {
324
- for (const cls of child.split(/\s+/)) if (cls && isArbitraryClass(cls)) found.add(cls);
325
- } else {
326
- collectClasses(child, found);
327
- }
328
- }
329
- }
330
- function classesOfPart(part) {
331
- const found = /* @__PURE__ */ new Set();
332
- collectClasses(JSON.parse(JSON.stringify(part)), found);
333
- return [...found];
334
- }
335
- var classesByOrbital = /* @__PURE__ */ new WeakMap();
336
- function arbitraryClassesOf(schema) {
337
- const { orbitals, _metadata: _provenance, ledger: _identities, ...rest } = schema;
338
- const found = new Set(classesOfPart(rest));
339
- for (const orbital of orbitals ?? []) {
340
- let classes = classesByOrbital.get(orbital);
341
- if (!classes) {
342
- classes = classesOfPart(orbital);
343
- classesByOrbital.set(orbital, classes);
344
- }
345
- for (const cls of classes) found.add(cls);
346
- }
347
- return [...found].sort();
348
- }
349
-
350
- export { DESIGN_COLOR_TOKENS, DESIGN_RADIUS_TOKENS, DESIGN_SPACING_SCALE, arbitraryClassesOf, defaultSpacingStepPx, isArbitraryClass, layoutOf, positionOf, sizeLimitOf, sizingOf, snapToSpacingStep, spacingOf, spacingTokenOf, tokenOfDesignClass, withLayout, withPosition, withSizeLimit, withSizing, withSpacing };