@almadar/shell-web 1.1.0 → 1.2.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.
- package/LICENSE +72 -0
- package/dist/AvlGlyph-KZMJDBEB.js +5 -0
- package/dist/AvlStateMachine-KVZMFHFU.js +8 -0
- package/dist/AvlTransitionDetail-7DVGV27I.js +10 -0
- package/dist/AvlTransitionExplainer-RMJ5LQLK.js +11 -0
- package/dist/BehaviorView-EYRPME67.js +10 -0
- package/dist/FlowCanvas-J54627TC.js +23 -0
- package/dist/{FlowCanvas-VWUPMBKB.css → FlowCanvas-R4LL3KRI.css} +1 -1
- package/dist/{GameAudioProvider-D7wo5ryN.d.ts → GameAudioProvider-BgWOOYT3.d.ts} +15 -20
- package/dist/{KernelEngineContext-CPeWQMAz.d.ts → KernelEngineContext-BPx-q0iw.d.ts} +1 -1
- package/dist/{LayersPanel-M2LHWUFF.js → LayersPanel-PSXI4EHG.js} +4 -4
- package/dist/ModuleCard-TNRLL45H.js +6 -0
- package/dist/{OrbInspector-VMTMZHNQ.css → OrbInspector-2EGVZLOJ.css} +1 -1
- package/dist/OrbInspector-UBEQWWZ2.js +23 -0
- package/dist/{parseLessonSegments-GpCeMrb2.d.ts → SegmentRenderer-BAQ6Jwf6.d.ts} +4 -20
- package/dist/{Select-C2Uq6t86.d.ts → Select-BJ8Fgc8A.d.ts} +1 -1
- package/dist/{UISlotContext-Dl_ewwCI.d.ts → UISlotContext-7r0SQdTL.d.ts} +1 -1
- package/dist/UISlotRenderer-5OURMAP2.js +23 -0
- package/dist/{UISlotRenderer-BIS6KT7T.css → UISlotRenderer-SJBSQGBQ.css} +1 -1
- package/dist/auth/react/index.js +7 -6
- package/dist/avl/index.css +1 -1
- package/dist/avl/index.js +31 -31
- package/dist/{chunk-AE7VCQB6.js → chunk-2LNXLMK3.js} +2 -2
- package/dist/{chunk-REXYVBUO.js → chunk-3DA36FOA.js} +1 -1
- package/dist/{chunk-FAKU5F62.js → chunk-3UQNFRYV.js} +2 -5
- package/dist/{chunk-AGXD77SL.js → chunk-3YUMGEEW.js} +1 -1
- package/dist/{chunk-OWNG4JZI.js → chunk-6RXP5ZXE.js} +7 -7
- package/dist/{chunk-VUIACGDU.js → chunk-7UCL26QB.js} +4 -4
- package/dist/{chunk-57DC34LY.js → chunk-AL2XXMYR.js} +2 -2
- package/dist/{chunk-YHMRX6YA.js → chunk-ANTJUQRD.js} +53 -13
- package/dist/{chunk-P4ZFUQFF.js → chunk-AZ74UPG6.js} +4 -1
- package/dist/{chunk-YYIHRIDH.js → chunk-B23EZH2P.js} +3 -3
- package/dist/{chunk-AGVSO4WY.js → chunk-CCO2ZH7F.js} +3 -3
- package/dist/{chunk-4YXBKHHM.js → chunk-D5FJU4XC.js} +87 -16
- package/dist/{chunk-7N6ZPHQ5.js → chunk-DPDKBY6Z.js} +1 -1
- package/dist/{chunk-A2LR6VQQ.js → chunk-ECC3WQIB.js} +9 -93
- package/dist/{chunk-VO2TTLS5.js → chunk-GHAF7QUD.js} +1 -1
- package/dist/{chunk-M74BCDBQ.js → chunk-HA2BYO5E.js} +1 -1
- package/dist/{chunk-ILQXJ2AR.js → chunk-JEN4EIUF.js} +1 -1
- package/dist/{chunk-UTDC2NEA.js → chunk-KTYOYEVA.js} +1 -1
- package/dist/{chunk-VHC2M26B.js → chunk-LINJRTNB.js} +2 -2
- package/dist/{chunk-2WGR4TDJ.js → chunk-LKL5RULQ.js} +5 -108
- package/dist/{chunk-UU57VNS2.js → chunk-PWXZN5G5.js} +2 -2
- package/dist/{chunk-4YJ53G7S.js → chunk-RDPELAFQ.js} +4 -4
- package/dist/{chunk-PRXQGGCO.js → chunk-S3LS3B7N.js} +1 -1
- package/dist/{chunk-MS4K3K2R.js → chunk-TAEOMNDK.js} +996 -456
- package/dist/{chunk-3S54FWRC.js → chunk-UFQLHCFJ.js} +1 -1
- package/dist/{chunk-PRLHKBXG.js → chunk-V5SVGUYN.js} +2 -2
- package/dist/components/index.css +1 -1
- package/dist/components/index.d.ts +155 -21
- package/dist/components/index.js +25 -25
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +5 -5
- package/dist/core.d.ts +21 -4
- package/dist/core.js +1 -1
- package/dist/{fx-Br8zjvu9.d.ts → fx-Bx5RqplG.d.ts} +4 -1
- package/dist/hooks/index.d.ts +8 -8
- package/dist/hooks/index.js +6 -6
- package/dist/{katexPlugin-FA7NX4PE.css → katexPlugin-BUHVNRBJ.css} +1 -1
- package/dist/{kernel-client-JW6OH5FX.js → kernel-client-NMZ56JVU.js} +36 -3
- package/dist/{kernel-wire-DGAySGhX.d.ts → kernel-wire-CRsHtLsf.d.ts} +1 -1
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +434 -2
- package/dist/providers/index.css +1 -1
- package/dist/providers/index.d.ts +5 -5
- package/dist/providers/index.js +19 -19
- package/dist/renderer/index.d.ts +3 -79
- package/dist/renderer/index.js +2 -2
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/index.d.ts +3 -1
- package/dist/runtime/index.js +18 -18
- package/dist/ssr/index.cjs +105 -28
- package/dist/ssr/index.js +106 -29
- package/dist/test-support.js +1 -1
- package/dist/{useUISlots-CiobNFGb.d.ts → useUISlots-BLcGd__D.d.ts} +2 -0
- package/dist/{verificationRegistry-oopV1J1n.d.ts → verificationRegistry-BLuQU1JV.d.ts} +1 -1
- package/package.json +9 -9
- package/src/core/locales/ar.json +10 -1
- package/src/core/locales/en.json +10 -1
- package/src/core/locales/sl.json +10 -1
- package/tailwind-preset.cjs +8 -4
- package/dist/AvlGlyph-PIXU6QH5.js +0 -5
- package/dist/AvlStateMachine-CKGMECMG.js +0 -8
- package/dist/AvlTransitionDetail-QZX6G5KJ.js +0 -10
- package/dist/AvlTransitionExplainer-26WLEIC6.js +0 -11
- package/dist/BehaviorView-JLZ4PKWY.js +0 -10
- package/dist/FlowCanvas-RPII4V24.js +0 -23
- package/dist/ModuleCard-NJD6JQGD.js +0 -6
- package/dist/OrbInspector-OWWKPOBF.js +0 -23
- package/dist/UISlotRenderer-PY7FIJXN.js +0 -23
- /package/dist/{katexPlugin-NCDKOOQY.js → katexPlugin-WGJ4JFZU.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isNotificationSlot } from './chunk-
|
|
2
|
-
import React, { useState, useRef, useMemo, useEffect
|
|
1
|
+
import { isNotificationSlot } from './chunk-AZ74UPG6.js';
|
|
2
|
+
import React, { useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
3
3
|
import { RENDERED_SLOTS, isRenderBindingMarker } from '@almadar/core';
|
|
4
4
|
import { createLogger } from '@almadar/logger';
|
|
5
5
|
|
|
@@ -35,6 +35,10 @@ function isPlainSlotObject(value) {
|
|
|
35
35
|
if (isRenderBindingMarker(value)) return false;
|
|
36
36
|
return true;
|
|
37
37
|
}
|
|
38
|
+
function elementRef(element) {
|
|
39
|
+
const props = element.props;
|
|
40
|
+
return props?.ref ?? element.ref;
|
|
41
|
+
}
|
|
38
42
|
function shareValue(prev, next) {
|
|
39
43
|
if (Object.is(prev, next)) return { value: prev, equal: true };
|
|
40
44
|
const prevMarker = isRenderBindingMarker(prev) ? prev : void 0;
|
|
@@ -49,6 +53,11 @@ function shareValue(prev, next) {
|
|
|
49
53
|
return prev instanceof Date && next instanceof Date && prev.getTime() === next.getTime() ? { value: prev, equal: true } : { value: next, equal: false };
|
|
50
54
|
}
|
|
51
55
|
if (typeof prev === "function" || typeof next === "function") return { value: next, equal: false };
|
|
56
|
+
if (React.isValidElement(prev) && React.isValidElement(next)) {
|
|
57
|
+
if (prev.type !== next.type || prev.key !== next.key || elementRef(prev) !== elementRef(next)) return { value: next, equal: false };
|
|
58
|
+
const props = shareValue(prev.props, next.props);
|
|
59
|
+
return props.equal ? { value: prev, equal: true } : { value: next, equal: false };
|
|
60
|
+
}
|
|
52
61
|
if (React.isValidElement(prev) || React.isValidElement(next)) return { value: next, equal: false };
|
|
53
62
|
if (Array.isArray(prev) && Array.isArray(next)) {
|
|
54
63
|
let equal = prev.length === next.length;
|
|
@@ -98,6 +107,7 @@ var DEFAULT_SLOTS = ALL_SLOTS.reduce(
|
|
|
98
107
|
},
|
|
99
108
|
{}
|
|
100
109
|
);
|
|
110
|
+
var NO_DECLARED_ORDER = /* @__PURE__ */ new Map();
|
|
101
111
|
var DEFAULT_SOURCES = ALL_SLOTS.reduce(
|
|
102
112
|
(acc, slot) => {
|
|
103
113
|
acc[slot] = {};
|
|
@@ -105,9 +115,11 @@ var DEFAULT_SOURCES = ALL_SLOTS.reduce(
|
|
|
105
115
|
},
|
|
106
116
|
{}
|
|
107
117
|
);
|
|
108
|
-
function aggregateSlot(sources) {
|
|
118
|
+
function aggregateSlot(sources, declaredOrder) {
|
|
109
119
|
if (!sources) return null;
|
|
110
|
-
const entries = Object.entries(sources)
|
|
120
|
+
const entries = Object.entries(sources).sort(
|
|
121
|
+
([a], [b]) => (declaredOrder.get(a) ?? Infinity) - (declaredOrder.get(b) ?? Infinity) || 0
|
|
122
|
+
);
|
|
111
123
|
if (entries.length === 0) return null;
|
|
112
124
|
if (entries.length === 1) return entries[0][1];
|
|
113
125
|
const children = entries.map(
|
|
@@ -144,14 +156,24 @@ function useUISlotManager() {
|
|
|
144
156
|
const subscribersRef = useRef(/* @__PURE__ */ new Set());
|
|
145
157
|
const timersRef = useRef(/* @__PURE__ */ new Map());
|
|
146
158
|
const traitIndexRef = useRef(/* @__PURE__ */ new Map());
|
|
159
|
+
const lastWriteRef = useRef(/* @__PURE__ */ new Map());
|
|
160
|
+
const [declaredOrder, setDeclaredOrder] = useState(NO_DECLARED_ORDER);
|
|
161
|
+
const declaredOrderRef = useRef(NO_DECLARED_ORDER);
|
|
162
|
+
const setDeclaredTraitOrder = useCallback((traits) => {
|
|
163
|
+
const next = new Map(traits.map((trait, index) => [trait, index]));
|
|
164
|
+
const held = declaredOrderRef.current;
|
|
165
|
+
if (held.size === next.size && [...next].every(([trait, index]) => held.get(trait) === index)) return;
|
|
166
|
+
declaredOrderRef.current = next;
|
|
167
|
+
setDeclaredOrder(next);
|
|
168
|
+
}, []);
|
|
147
169
|
const traitSubscribersRef = useRef(/* @__PURE__ */ new Map());
|
|
148
170
|
const slots = useMemo(() => {
|
|
149
171
|
const out = { ...DEFAULT_SLOTS };
|
|
150
172
|
for (const slot of ALL_SLOTS) {
|
|
151
|
-
out[slot] = aggregateSlot(sources[slot]);
|
|
173
|
+
out[slot] = aggregateSlot(sources[slot], declaredOrder);
|
|
152
174
|
}
|
|
153
175
|
return out;
|
|
154
|
-
}, [sources]);
|
|
176
|
+
}, [sources, declaredOrder]);
|
|
155
177
|
useEffect(() => {
|
|
156
178
|
return () => {
|
|
157
179
|
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
@@ -206,6 +228,13 @@ function useUISlotManager() {
|
|
|
206
228
|
fromState: config.fromState,
|
|
207
229
|
entity: config.entity
|
|
208
230
|
};
|
|
231
|
+
const writeKey = `${config.target}\0${sourceKey}`;
|
|
232
|
+
const last = lastWriteRef.current.get(writeKey);
|
|
233
|
+
if (last && !(config.autoDismissMs && config.autoDismissMs > 0) && last.autoDismissAt === void 0 && last.priority === content.priority && last.pattern === content.pattern && last.transitionEvent === content.transitionEvent && last.fromState === content.fromState && last.entity === content.entity && last.nodeId === content.nodeId && last.onDismiss === void 0 === (content.onDismiss === void 0) && reconcileSlotProps(last.props, content.props).equal) {
|
|
234
|
+
log.debug("slot:write-unchanged", { slot: config.target, sourceKey, pattern: content.pattern });
|
|
235
|
+
return id;
|
|
236
|
+
}
|
|
237
|
+
lastWriteRef.current.set(writeKey, content);
|
|
209
238
|
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
210
239
|
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
211
240
|
const prevTimer = timersRef.current.get(id);
|
|
@@ -218,7 +247,7 @@ function useUISlotManager() {
|
|
|
218
247
|
const next = { ...slotSources };
|
|
219
248
|
delete next[sourceKey];
|
|
220
249
|
const updated = { ...prev, [config.target]: next };
|
|
221
|
-
notifySubscribers(config.target, aggregateSlot(next));
|
|
250
|
+
notifySubscribers(config.target, aggregateSlot(next, declaredOrderRef.current));
|
|
222
251
|
return updated;
|
|
223
252
|
}
|
|
224
253
|
return prev;
|
|
@@ -271,7 +300,7 @@ function useUISlotManager() {
|
|
|
271
300
|
patternType: content.pattern,
|
|
272
301
|
priority: content.priority
|
|
273
302
|
});
|
|
274
|
-
notifySubscribers(config.target, aggregateSlot(nextSources));
|
|
303
|
+
notifySubscribers(config.target, aggregateSlot(nextSources, declaredOrderRef.current));
|
|
275
304
|
return nextAll;
|
|
276
305
|
});
|
|
277
306
|
return id;
|
|
@@ -280,6 +309,7 @@ function useUISlotManager() {
|
|
|
280
309
|
);
|
|
281
310
|
const clear = useCallback(
|
|
282
311
|
(slot) => {
|
|
312
|
+
for (const key of [...lastWriteRef.current.keys()]) if (key.startsWith(`${slot}\0`)) lastWriteRef.current.delete(key);
|
|
283
313
|
setSources((prev) => {
|
|
284
314
|
const slotSources = prev[slot];
|
|
285
315
|
if (!slotSources || Object.keys(slotSources).length === 0) {
|
|
@@ -306,6 +336,7 @@ function useUISlotManager() {
|
|
|
306
336
|
const clearBySource = useCallback(
|
|
307
337
|
(slot, sourceTrait) => {
|
|
308
338
|
const sourceKey = sourceTrait;
|
|
339
|
+
lastWriteRef.current.delete(`${slot}\0${sourceKey}`);
|
|
309
340
|
setSources((prev) => {
|
|
310
341
|
const slotSources = prev[slot];
|
|
311
342
|
if (!slotSources || !(sourceKey in slotSources)) {
|
|
@@ -333,7 +364,7 @@ function useUISlotManager() {
|
|
|
333
364
|
const nextSources = { ...slotSources };
|
|
334
365
|
delete nextSources[sourceKey];
|
|
335
366
|
log.info("slot:cleared", { slot, sourceTrait, lastPatternType: content.pattern });
|
|
336
|
-
notifySubscribers(slot, aggregateSlot(nextSources));
|
|
367
|
+
notifySubscribers(slot, aggregateSlot(nextSources, declaredOrderRef.current));
|
|
337
368
|
return { ...prev, [slot]: nextSources };
|
|
338
369
|
});
|
|
339
370
|
},
|
|
@@ -341,6 +372,7 @@ function useUISlotManager() {
|
|
|
341
372
|
);
|
|
342
373
|
const clearById = useCallback(
|
|
343
374
|
(id) => {
|
|
375
|
+
for (const [key, written] of [...lastWriteRef.current]) if (written.id === id) lastWriteRef.current.delete(key);
|
|
344
376
|
setSources((prev) => {
|
|
345
377
|
for (const slot of ALL_SLOTS) {
|
|
346
378
|
const slotSources = prev[slot];
|
|
@@ -362,7 +394,7 @@ function useUISlotManager() {
|
|
|
362
394
|
}
|
|
363
395
|
const nextSources = { ...slotSources };
|
|
364
396
|
delete nextSources[matchKey];
|
|
365
|
-
notifySubscribers(slot, aggregateSlot(nextSources));
|
|
397
|
+
notifySubscribers(slot, aggregateSlot(nextSources, declaredOrderRef.current));
|
|
366
398
|
return { ...prev, [slot]: nextSources };
|
|
367
399
|
}
|
|
368
400
|
return prev;
|
|
@@ -371,6 +403,7 @@ function useUISlotManager() {
|
|
|
371
403
|
[notifySubscribers, notifyTraitSubscribers, unindexTrait]
|
|
372
404
|
);
|
|
373
405
|
const clearAll = useCallback(() => {
|
|
406
|
+
lastWriteRef.current.clear();
|
|
374
407
|
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
375
408
|
timersRef.current.clear();
|
|
376
409
|
setSources((prev) => {
|
|
@@ -430,13 +463,19 @@ function useUISlotManager() {
|
|
|
430
463
|
(traitName, content) => {
|
|
431
464
|
const id = `slot-content-trait-${traitName}`;
|
|
432
465
|
const fullContent = { ...content, id, sourceTrait: traitName };
|
|
466
|
+
const existing = traitIndexRef.current.get(traitName);
|
|
467
|
+
if (existing && existing.slot === fullContent.slot && existing.priority === fullContent.priority && existing.pattern === fullContent.pattern && existing.transitionEvent === fullContent.transitionEvent && existing.fromState === fullContent.fromState && existing.entity === fullContent.entity && existing.nodeId === fullContent.nodeId) {
|
|
468
|
+
const reconciled = reconcileSlotProps(existing.props, fullContent.props);
|
|
469
|
+
if (reconciled.equal) return id;
|
|
470
|
+
fullContent.props = reconciled.value;
|
|
471
|
+
}
|
|
433
472
|
indexTraitRender(traitName, fullContent);
|
|
434
473
|
notifyTraitSubscribers(traitName, fullContent);
|
|
435
474
|
return id;
|
|
436
475
|
},
|
|
437
476
|
[indexTraitRender, notifyTraitSubscribers]
|
|
438
477
|
);
|
|
439
|
-
return {
|
|
478
|
+
return useMemo(() => ({
|
|
440
479
|
slots,
|
|
441
480
|
render,
|
|
442
481
|
clear,
|
|
@@ -448,8 +487,9 @@ function useUISlotManager() {
|
|
|
448
487
|
getContent,
|
|
449
488
|
getTraitContent,
|
|
450
489
|
subscribeTrait,
|
|
451
|
-
updateTraitContent
|
|
452
|
-
|
|
490
|
+
updateTraitContent,
|
|
491
|
+
setDeclaredTraitOrder
|
|
492
|
+
}), [slots, render, clear, clearBySource, clearById, clearAll, subscribe, hasContent, getContent, getTraitContent, subscribeTrait, updateTraitContent, setDeclaredTraitOrder]);
|
|
453
493
|
}
|
|
454
494
|
|
|
455
495
|
export { ALL_SLOTS, DEFAULT_SLOTS, useUISlotManager };
|
|
@@ -82,6 +82,9 @@ function isPortalSlot(slot) {
|
|
|
82
82
|
function isNotificationSlot(slot) {
|
|
83
83
|
return SLOT_DEFINITIONS[slot]?.notification === true;
|
|
84
84
|
}
|
|
85
|
+
function paintsInTraitFrame(traitEmbedded, slot) {
|
|
86
|
+
return traitEmbedded && !isNotificationSlot(slot);
|
|
87
|
+
}
|
|
85
88
|
function getSlotsByType(type) {
|
|
86
89
|
return Object.entries(SLOT_DEFINITIONS).filter(([, def]) => def?.type === type).map(([name]) => name);
|
|
87
90
|
}
|
|
@@ -90,4 +93,4 @@ function getInlineSlots() {
|
|
|
90
93
|
}
|
|
91
94
|
var ALL_SLOTS = Object.keys(SLOT_DEFINITIONS);
|
|
92
95
|
|
|
93
|
-
export { ALL_SLOTS, SLOT_DEFINITIONS, getInlineSlots, getSlotDefinition, isNotificationSlot, isPortalSlot };
|
|
96
|
+
export { ALL_SLOTS, SLOT_DEFINITIONS, getInlineSlots, getSlotDefinition, isNotificationSlot, isPortalSlot, paintsInTraitFrame };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AvlStateMachine } from './chunk-
|
|
2
|
-
import { EmptyState } from './chunk-
|
|
3
|
-
import { useTranslate, Box, domPassthrough } from './chunk-
|
|
1
|
+
import { AvlStateMachine } from './chunk-RDPELAFQ.js';
|
|
2
|
+
import { EmptyState } from './chunk-3YUMGEEW.js';
|
|
3
|
+
import { useTranslate, Box, domPassthrough } from './chunk-D5FJU4XC.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var BehaviorView = ({ data, ...rest }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AvlFieldType, AvlState, AvlPage, AvlEntity } from './chunk-
|
|
2
|
-
import { OPERATOR_CATEGORY_COLORS, AvlEffect } from './chunk-
|
|
3
|
-
import { useTranslate, Box, Typography, domPassthrough } from './chunk-
|
|
1
|
+
import { AvlFieldType, AvlState, AvlPage, AvlEntity } from './chunk-DPDKBY6Z.js';
|
|
2
|
+
import { OPERATOR_CATEGORY_COLORS, AvlEffect } from './chunk-3UQNFRYV.js';
|
|
3
|
+
import { useTranslate, Box, Typography, domPassthrough } from './chunk-D5FJU4XC.js';
|
|
4
4
|
import React, { useRef, useState, useLayoutEffect } from 'react';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React44 from 'react';
|
|
2
|
-
import React44__default, { useRef, useEffect, createContext, useCallback, useMemo, useContext,
|
|
2
|
+
import React44__default, { useRef, useEffect, createContext, useCallback, useState, useLayoutEffect, useMemo, useContext, useId, useSyncExternalStore } from 'react';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
5
5
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -1219,6 +1219,7 @@ var Box = React44__default.forwardRef(
|
|
|
1219
1219
|
texture = false,
|
|
1220
1220
|
animateChanges = false,
|
|
1221
1221
|
backdrop,
|
|
1222
|
+
marquee,
|
|
1222
1223
|
onClick,
|
|
1223
1224
|
onMouseEnter,
|
|
1224
1225
|
onMouseLeave,
|
|
@@ -1306,6 +1307,7 @@ var Box = React44__default.forwardRef(
|
|
|
1306
1307
|
position && positionStyles[position],
|
|
1307
1308
|
isClickable && "cursor-pointer",
|
|
1308
1309
|
isBand && "band",
|
|
1310
|
+
marquee?.clip && "proof-marquee motion-reduce:[mask-image:none]",
|
|
1309
1311
|
className
|
|
1310
1312
|
),
|
|
1311
1313
|
onClick: isClickable ? handleClick : void 0,
|
|
@@ -1320,11 +1322,35 @@ var Box = React44__default.forwardRef(
|
|
|
1320
1322
|
},
|
|
1321
1323
|
isBand ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1322
1324
|
bandLayers,
|
|
1323
|
-
children
|
|
1324
|
-
] }) : children
|
|
1325
|
+
marquee ? /* @__PURE__ */ jsx(MarqueeTrack, { marquee, children }) : children
|
|
1326
|
+
] }) : marquee ? /* @__PURE__ */ jsx(MarqueeTrack, { marquee, children }) : children
|
|
1325
1327
|
);
|
|
1326
1328
|
}
|
|
1327
1329
|
);
|
|
1330
|
+
function MarqueeTrack({ marquee, children }) {
|
|
1331
|
+
const reduced = usePrefersReducedMotion();
|
|
1332
|
+
const copyRef = useRef(null);
|
|
1333
|
+
const [width, setWidth] = useState(0);
|
|
1334
|
+
useLayoutEffect(() => {
|
|
1335
|
+
const node = copyRef.current;
|
|
1336
|
+
if (!node) return;
|
|
1337
|
+
const measure = () => setWidth(node.getBoundingClientRect().width);
|
|
1338
|
+
measure();
|
|
1339
|
+
const observer2 = new ResizeObserver(measure);
|
|
1340
|
+
observer2.observe(node);
|
|
1341
|
+
return () => observer2.disconnect();
|
|
1342
|
+
}, []);
|
|
1343
|
+
const moving = !reduced && width > 0 && marquee.speed > 0;
|
|
1344
|
+
const style = moving ? {
|
|
1345
|
+
animation: `almadar-marquee ${width / marquee.speed}s linear infinite`,
|
|
1346
|
+
animationDirection: marquee.direction === "end" ? "reverse" : "normal",
|
|
1347
|
+
"--marquee-distance": marquee.loop ? "50%" : "100%"
|
|
1348
|
+
} : {};
|
|
1349
|
+
return /* @__PURE__ */ jsxs("div", { "data-marquee-track": "", className: cn("proof-marquee-track hover:[animation-play-state:paused]", reduced && "w-full flex-wrap justify-center"), style, children: [
|
|
1350
|
+
/* @__PURE__ */ jsx("div", { ref: copyRef, className: "flex shrink-0 items-center", children }),
|
|
1351
|
+
marquee.loop && !reduced && /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "flex shrink-0 items-center", children })
|
|
1352
|
+
] });
|
|
1353
|
+
}
|
|
1328
1354
|
Box.displayName = "Box";
|
|
1329
1355
|
|
|
1330
1356
|
// src/core/lib/traitPresence.ts
|
|
@@ -2354,6 +2380,7 @@ var en_default = {
|
|
|
2354
2380
|
"status.archived": "Archived",
|
|
2355
2381
|
"error.generic": "Something went wrong",
|
|
2356
2382
|
"error.traitMountFailed": "{{trait}} failed to start",
|
|
2383
|
+
"error.serverRefused": "The server refused this page",
|
|
2357
2384
|
"error.retry": "Try again",
|
|
2358
2385
|
"error.notFound": "Not found",
|
|
2359
2386
|
"error.loadFailed": "Failed to load: {{message}}",
|
|
@@ -2435,6 +2462,7 @@ var en_default = {
|
|
|
2435
2462
|
"aria.closeMenu": "Close menu",
|
|
2436
2463
|
"aria.openSidebar": "Open sidebar",
|
|
2437
2464
|
"aria.openRow": "Open item {{position}}",
|
|
2465
|
+
"aria.scrollableBoard": "Scrollable board",
|
|
2438
2466
|
"sidebar.expand": "Expand sidebar",
|
|
2439
2467
|
"sidebar.collapse": "Collapse sidebar",
|
|
2440
2468
|
"sidebar.close": "Close sidebar",
|
|
@@ -3526,6 +3554,7 @@ var en_default = {
|
|
|
3526
3554
|
"agentActivity.change.trait-config-changed": "Changed the settings of {{orbitalName}}",
|
|
3527
3555
|
"agentActivity.change.theme-changed": "Changed the theme of {{orbitalName}}",
|
|
3528
3556
|
"agentActivity.llmResponse": "Raw LLM response",
|
|
3557
|
+
"agentActivity.unknown": "Unknown activity: {{kind}}",
|
|
3529
3558
|
"agentActivity.llmDuration": "{{seconds}}s",
|
|
3530
3559
|
"agentActivity.llmTokens": "{{prompt}} in / {{completion}} out tokens",
|
|
3531
3560
|
"agentActivity.llmResponseLabel": "Response",
|
|
@@ -3567,7 +3596,13 @@ var en_default = {
|
|
|
3567
3596
|
"debug.replayPause": "Pause",
|
|
3568
3597
|
"debug.replayStep": "{{step}} / {{total}}",
|
|
3569
3598
|
"stateMachine.inspect": "Inspect: pick a trait on the page",
|
|
3570
|
-
"stateMachine.inspectHint": "Click a part of the page \xB7 Esc to stop"
|
|
3599
|
+
"stateMachine.inspectHint": "Click a part of the page \xB7 Esc to stop",
|
|
3600
|
+
"themeToggle.switchToLight": "Switch to light mode",
|
|
3601
|
+
"themeToggle.switchToDark": "Switch to dark mode",
|
|
3602
|
+
"themeToggle.light": "Light",
|
|
3603
|
+
"themeToggle.dark": "Dark",
|
|
3604
|
+
"agentActivity.toolDone": "{{tool}} \u2014 done",
|
|
3605
|
+
"agentActivity.toolFailed": "{{tool}} \u2014 failed"
|
|
3571
3606
|
};
|
|
3572
3607
|
|
|
3573
3608
|
// src/core/lib/format.ts
|
|
@@ -3737,6 +3772,7 @@ var ar_default = {
|
|
|
3737
3772
|
"status.archived": "\u0645\u0624\u0631\u0634\u0641",
|
|
3738
3773
|
"error.generic": "\u062D\u062F\u062B \u062E\u0637\u0623 \u0645\u0627",
|
|
3739
3774
|
"error.traitMountFailed": "\u062A\u0639\u0630\u0651\u0631 \u0628\u062F\u0621 {{trait}}",
|
|
3775
|
+
"error.serverRefused": "\u0631\u0641\u0636 \u0627\u0644\u062E\u0627\u062F\u0645 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629",
|
|
3740
3776
|
"error.retry": "\u062D\u0627\u0648\u0644 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649",
|
|
3741
3777
|
"error.notFound": "\u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F",
|
|
3742
3778
|
"error.loadFailed": "\u0641\u0634\u0644 \u0627\u0644\u062A\u062D\u0645\u064A\u0644: {{message}}",
|
|
@@ -3815,6 +3851,7 @@ var ar_default = {
|
|
|
3815
3851
|
"aria.closeMenu": "\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0642\u0627\u0626\u0645\u0629",
|
|
3816
3852
|
"aria.openSidebar": "\u0641\u062A\u062D \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
3817
3853
|
"aria.openRow": "\u0641\u062A\u062D \u0627\u0644\u0639\u0646\u0635\u0631 {{position}}",
|
|
3854
|
+
"aria.scrollableBoard": "\u0644\u0648\u062D\u0629 \u0642\u0627\u0628\u0644\u0629 \u0644\u0644\u062A\u0645\u0631\u064A\u0631",
|
|
3818
3855
|
"sidebar.expand": "\u062A\u0648\u0633\u064A\u0639 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
3819
3856
|
"sidebar.collapse": "\u0637\u064A \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
3820
3857
|
"sidebar.close": "\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
@@ -4910,6 +4947,7 @@ var ar_default = {
|
|
|
4910
4947
|
"agentActivity.change.trait-config-changed": "\u062A\u0645 \u062A\u063A\u064A\u064A\u0631 \u0625\u0639\u062F\u0627\u062F\u0627\u062A {{orbitalName}}",
|
|
4911
4948
|
"agentActivity.change.theme-changed": "\u062A\u0645 \u062A\u063A\u064A\u064A\u0631 \u0633\u0645\u0629 {{orbitalName}}",
|
|
4912
4949
|
"agentActivity.llmResponse": "\u0627\u0633\u062A\u062C\u0627\u0628\u0629 LLM \u062E\u0627\u0645",
|
|
4950
|
+
"agentActivity.unknown": "\u0646\u0634\u0627\u0637 \u063A\u064A\u0631 \u0645\u0639\u0631\u0648\u0641: {{kind}}",
|
|
4913
4951
|
"agentActivity.llmDuration": "{{seconds}} \u062B",
|
|
4914
4952
|
"agentActivity.llmTokens": "{{prompt}} \u062F\u0627\u062E\u0644 / {{completion}} \u062E\u0627\u0631\u062C",
|
|
4915
4953
|
"agentActivity.llmResponseLabel": "\u0627\u0644\u0627\u0633\u062A\u062C\u0627\u0628\u0629",
|
|
@@ -4951,7 +4989,13 @@ var ar_default = {
|
|
|
4951
4989
|
"debug.replayPause": "\u0625\u064A\u0642\u0627\u0641 \u0645\u0624\u0642\u062A",
|
|
4952
4990
|
"debug.replayStep": "{{step}} / {{total}}",
|
|
4953
4991
|
"stateMachine.inspect": "\u0641\u062D\u0635: \u0627\u062E\u062A\u0631 \u0633\u0645\u0629 \u0645\u0646 \u0627\u0644\u0635\u0641\u062D\u0629",
|
|
4954
|
-
"stateMachine.inspectHint": "\u0627\u0646\u0642\u0631 \u062C\u0632\u0621\u064B\u0627 \u0645\u0646 \u0627\u0644\u0635\u0641\u062D\u0629 \xB7 Esc \u0644\u0644\u0625\u064A\u0642\u0627\u0641"
|
|
4992
|
+
"stateMachine.inspectHint": "\u0627\u0646\u0642\u0631 \u062C\u0632\u0621\u064B\u0627 \u0645\u0646 \u0627\u0644\u0635\u0641\u062D\u0629 \xB7 Esc \u0644\u0644\u0625\u064A\u0642\u0627\u0641",
|
|
4993
|
+
"themeToggle.switchToLight": "\u0627\u0644\u062A\u0628\u062F\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u0641\u0627\u062A\u062D",
|
|
4994
|
+
"themeToggle.switchToDark": "\u0627\u0644\u062A\u0628\u062F\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u0648\u0636\u0639 \u0627\u0644\u062F\u0627\u0643\u0646",
|
|
4995
|
+
"themeToggle.light": "\u0641\u0627\u062A\u062D",
|
|
4996
|
+
"themeToggle.dark": "\u062F\u0627\u0643\u0646",
|
|
4997
|
+
"agentActivity.toolDone": "{{tool}} \u2014 \u062A\u0645",
|
|
4998
|
+
"agentActivity.toolFailed": "{{tool}} \u2014 \u062A\u0639\u0630\u0651\u0631"
|
|
4955
4999
|
};
|
|
4956
5000
|
|
|
4957
5001
|
// src/core/locales/sl.json
|
|
@@ -5015,6 +5059,7 @@ var sl_default = {
|
|
|
5015
5059
|
"status.archived": "Arhivirano",
|
|
5016
5060
|
"error.generic": "Nekaj je \u0161lo narobe",
|
|
5017
5061
|
"error.traitMountFailed": "{{trait}} se ni zagnal",
|
|
5062
|
+
"error.serverRefused": "Stre\u017Enik je zavrnil to stran",
|
|
5018
5063
|
"error.retry": "Poskusite znova",
|
|
5019
5064
|
"error.notFound": "Ni najdeno",
|
|
5020
5065
|
"error.loadFailed": "Nalaganje ni uspelo: {{message}}",
|
|
@@ -5093,6 +5138,7 @@ var sl_default = {
|
|
|
5093
5138
|
"aria.closeMenu": "Zapri meni",
|
|
5094
5139
|
"aria.openSidebar": "Odpri stransko vrstico",
|
|
5095
5140
|
"aria.openRow": "Odpri element {{position}}",
|
|
5141
|
+
"aria.scrollableBoard": "Drsljiva tabla",
|
|
5096
5142
|
"sidebar.expand": "Raz\u0161iri stransko vrstico",
|
|
5097
5143
|
"sidebar.collapse": "Strni stransko vrstico",
|
|
5098
5144
|
"sidebar.close": "Zapri stransko vrstico",
|
|
@@ -6188,6 +6234,7 @@ var sl_default = {
|
|
|
6188
6234
|
"agentActivity.change.trait-config-changed": "Spremenjene nastavitve {{orbitalName}}",
|
|
6189
6235
|
"agentActivity.change.theme-changed": "Spremenjena tema {{orbitalName}}",
|
|
6190
6236
|
"agentActivity.llmResponse": "Surov odgovor LLM",
|
|
6237
|
+
"agentActivity.unknown": "Neznana dejavnost: {{kind}}",
|
|
6191
6238
|
"agentActivity.llmDuration": "{{seconds}} s",
|
|
6192
6239
|
"agentActivity.llmTokens": "{{prompt}} vhodnih / {{completion}} izhodnih \u017Eetonov",
|
|
6193
6240
|
"agentActivity.llmResponseLabel": "Odgovor",
|
|
@@ -6229,7 +6276,13 @@ var sl_default = {
|
|
|
6229
6276
|
"debug.replayPause": "Premor",
|
|
6230
6277
|
"debug.replayStep": "{{step}} / {{total}}",
|
|
6231
6278
|
"stateMachine.inspect": "Pregled: izberi lastnost na strani",
|
|
6232
|
-
"stateMachine.inspectHint": "Klikni del strani \xB7 Esc za konec"
|
|
6279
|
+
"stateMachine.inspectHint": "Klikni del strani \xB7 Esc za konec",
|
|
6280
|
+
"themeToggle.switchToLight": "Preklopi na svetli na\u010Din",
|
|
6281
|
+
"themeToggle.switchToDark": "Preklopi na temni na\u010Din",
|
|
6282
|
+
"themeToggle.light": "Svetla",
|
|
6283
|
+
"themeToggle.dark": "Temna",
|
|
6284
|
+
"agentActivity.toolDone": "{{tool}} \u2014 kon\u010Dano",
|
|
6285
|
+
"agentActivity.toolFailed": "{{tool}} \u2014 ni uspelo"
|
|
6233
6286
|
};
|
|
6234
6287
|
var { $meta: _meta2, ...coreMessages2 } = en_default;
|
|
6235
6288
|
var withThemeToggle = (messages, labels) => ({
|
|
@@ -7165,9 +7218,9 @@ var variantStyles2 = {
|
|
|
7165
7218
|
};
|
|
7166
7219
|
variantStyles2.destructive = variantStyles2.danger;
|
|
7167
7220
|
var sizeStyles2 = {
|
|
7168
|
-
sm: "h-button-sm px-3 text-sm",
|
|
7169
|
-
md: "h-button-md px-4 text-sm",
|
|
7170
|
-
lg: "h-button-lg px-6 text-base"
|
|
7221
|
+
sm: "min-h-button-sm py-1 px-3 text-sm",
|
|
7222
|
+
md: "min-h-button-md py-1 px-4 text-sm",
|
|
7223
|
+
lg: "min-h-button-lg py-1 px-6 text-base"
|
|
7171
7224
|
};
|
|
7172
7225
|
var iconSizeStyles = {
|
|
7173
7226
|
sm: "h-icon-default w-icon-default",
|
|
@@ -8104,6 +8157,7 @@ var FilterPill = React44__default.forwardRef(
|
|
|
8104
8157
|
removable = true,
|
|
8105
8158
|
onClick,
|
|
8106
8159
|
clickEvent,
|
|
8160
|
+
clickPayload,
|
|
8107
8161
|
removeEvent,
|
|
8108
8162
|
children,
|
|
8109
8163
|
selected,
|
|
@@ -8115,8 +8169,8 @@ var FilterPill = React44__default.forwardRef(
|
|
|
8115
8169
|
const payloadLabel = typeof children === "string" || typeof children === "number" ? children : label;
|
|
8116
8170
|
const handleClick = useCallback(() => {
|
|
8117
8171
|
onClick?.();
|
|
8118
|
-
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { ...payloadLabel !== void 0 ? { label: payloadLabel } : {} });
|
|
8119
|
-
}, [onClick, clickEvent, eventBus, payloadLabel]);
|
|
8172
|
+
if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { ...payloadLabel !== void 0 ? { label: payloadLabel } : {}, ...clickPayload ?? {} });
|
|
8173
|
+
}, [onClick, clickEvent, clickPayload, eventBus, payloadLabel]);
|
|
8120
8174
|
const handleRemove = useCallback(() => {
|
|
8121
8175
|
onRemove?.();
|
|
8122
8176
|
if (removeEvent) eventBus.emit(`UI:${removeEvent}`, { ...payloadLabel !== void 0 ? { label: payloadLabel } : {} });
|
|
@@ -8430,8 +8484,9 @@ var Input = React44__default.forwardRef(
|
|
|
8430
8484
|
"focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring",
|
|
8431
8485
|
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-muted",
|
|
8432
8486
|
error ? "border-error focus:border-error focus:ring-error" : "",
|
|
8433
|
-
resolvedLeftIcon && "pl-
|
|
8434
|
-
|
|
8487
|
+
resolvedLeftIcon && "pl-[calc(var(--icon-default-size,16px)+1.5rem)]",
|
|
8488
|
+
rightIcon && !showClearButton && "pr-[calc(var(--icon-default-size,16px)+1.5rem)]",
|
|
8489
|
+
showClearButton && "pr-10",
|
|
8435
8490
|
className
|
|
8436
8491
|
);
|
|
8437
8492
|
const handleChange = (e) => {
|
|
@@ -9450,7 +9505,7 @@ function useDialogBehavior({ open, containerRef, onEscape, closeOnEscape = true,
|
|
|
9450
9505
|
openStack.set(id, seqRef.current ?? ++openSequence);
|
|
9451
9506
|
const container = containerRef.current;
|
|
9452
9507
|
if (modal && container && !container.contains(document.activeElement)) {
|
|
9453
|
-
(focusables(container)[0] ?? container).focus();
|
|
9508
|
+
(focusables(container)[0] ?? container).focus({ preventScroll: true });
|
|
9454
9509
|
}
|
|
9455
9510
|
const onKeyDown = (e) => {
|
|
9456
9511
|
if (!isTop(id)) return;
|
|
@@ -9490,7 +9545,7 @@ function useDialogBehavior({ open, containerRef, onEscape, closeOnEscape = true,
|
|
|
9490
9545
|
const current = containerRef.current ?? container;
|
|
9491
9546
|
const focusInside = current?.contains(active) ?? false;
|
|
9492
9547
|
const focusLeftWithDialog = focusInside || active === null || active === document.body;
|
|
9493
|
-
if (opener && opener.isConnected && focusLeftWithDialog) opener.focus();
|
|
9548
|
+
if (opener && opener.isConnected && focusLeftWithDialog) opener.focus({ preventScroll: true });
|
|
9494
9549
|
};
|
|
9495
9550
|
}, [open, containerRef, modal, returnFocusRef]);
|
|
9496
9551
|
}
|
|
@@ -11460,6 +11515,22 @@ var SvgStack = ({
|
|
|
11460
11515
|
};
|
|
11461
11516
|
SvgStack.displayName = "SvgStack";
|
|
11462
11517
|
|
|
11518
|
+
// src/core/atoms/types.ts
|
|
11519
|
+
var COLOR_TOKEN_VARS = {
|
|
11520
|
+
primary: "var(--color-primary)",
|
|
11521
|
+
secondary: "var(--color-secondary)",
|
|
11522
|
+
success: "var(--color-success)",
|
|
11523
|
+
warning: "var(--color-warning)",
|
|
11524
|
+
error: "var(--color-error)",
|
|
11525
|
+
muted: "var(--color-muted)"
|
|
11526
|
+
};
|
|
11527
|
+
function isColorToken(value) {
|
|
11528
|
+
return Object.prototype.hasOwnProperty.call(COLOR_TOKEN_VARS, value);
|
|
11529
|
+
}
|
|
11530
|
+
function resolveColorToken(color) {
|
|
11531
|
+
return isColorToken(color) ? COLOR_TOKEN_VARS[color] : color;
|
|
11532
|
+
}
|
|
11533
|
+
|
|
11463
11534
|
// src/core/locales/index.ts
|
|
11464
11535
|
var coreMessages3 = {
|
|
11465
11536
|
en: stripMeta(en_default),
|
|
@@ -11485,4 +11556,4 @@ function stripMeta(obj) {
|
|
|
11485
11556
|
return result;
|
|
11486
11557
|
}
|
|
11487
11558
|
|
|
11488
|
-
export { AnimatedGraphic, AnimatedReveal, Aside, AtlasImage, AtlasPanel, Avatar, BAND_ACCENT_FALLBACK, BAND_EDGE_FILL, BAND_SHAPES, BUILT_IN_THEMES, Badge, Box, Button, CONFETTI_BURST_KEYFRAMES, CONFETTI_COLORS, Card, CardBody, CardContent, CardFooter, CardHeader, CardTitle, Center, Checkbox, ConditionalWrapper, ConfettiEffect, DEFAULT_CURRENCY, DayCell, Dialog, Divider, EventBusContext, EventBusProvider, FilterPill, FlipContainer, GameIcon, HStack, I18nProvider, INLINE_TEXT_ATTR, Icon, Image2 as Image, InfiniteScrollSentinel, Input, Label, LawReferenceTooltip, NavStackProvider, NavStackRouterBridge, NavigationProvider, Overlay, PatternTile, PendingScopeContext, Presence, ProgressBar, Radio, RangeSlider, STRETCHED_ABOVE, STRETCHED_CONTROL, SVG_MOTION_CLASSES, SectionHeader, Select, Spacer, Sparkline, Spinner, Stack, StatusDot, SurfaceBoundary, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, Switch, THEME_SCALE_KEYS, TextHighlight, Textarea, ThemeProvider, ThemeScopeContext, ThemeToggle, TimeSlotCell, TraitScopeProvider, TrendIndicator, TypewriterText, Typography, VStack, VideoEmbed, atlasFailed, atlasUrlOf, bandEdgeHeight, bandEdgeLayerStyle, bandEdgeMask, bandPadding, beginPending, blit, boxesOf2 as boxesOf, cn, compareCellValues, coreMessages3 as coreMessages, createConfettiParticles, createTraitPresence, createTranslate, cssTimeMs, domPassthrough, endPending, entriesFor, evaluateBinding, evaluateBindings, extractRouteParams, findPageByName, findPageByPath, followHref, formatDate, formatDateTime, formatTime, formatValue, fxHash01, fxLifecycle, getAllPages, getAtlas, getCurrentIconFamily, getDefaultPage, getGlobalEventBus, getTileDimensions, getTraitPresence, guardsHold, isAbsoluteHref, isAtlasAsset, isInertNavStack, isMotionEnabled, isPending, isSpriteSheetAtlas, kebabToPascal, keyInViewerMode, layoutScale, localeMeta, lucideIconKey, matchNavPage, mergeMessages, motionTiming, navLabelsFromItems, newPendingKey, pageEntryLabel, parseCalendarDate, pathMatches, presenceGroup, pressableProps, previousEntry, registryKeyMode, registryKeyTheme, relabelCurrent, resolveAssetSource, resolveEntryLabels, resolveFxView, resolveIcon, resolveIconForFamily, resolveLucideByName, rowActivationProps, rowOpenControlProps, setGlobalEventBus, sortRows, subRectFor, subscribePending, svgMotionClass, syncNavStack, themeHasMode, toDateInputValue, toDateTimeInputValue, useActivePage, useAnimateChanges, useAtlasSliceDataUrl, useContentSurface, useDialogBehavior, useEmitEvent, useEventBus, useEventListener, useEventSubscription, useFormatContext, useIconFamily, useInfiniteScroll, useInitPayload, useMediaQuery, useNavStack, useNavigateTo, useNavigation, useNavigationId, useNavigationState, useOnSurface, usePendingAction, usePendingRows, usePendingScopeValue, usePrefersReducedMotion, usePresence, useRenderI18n, useResolvedIcon, useRootEventBus, useScopeHasPending, useScopedMode, useTapReveal, useTheme, useThemeIconStrokeApplies, useThemeScope, useTraitScope, useTraitScopeChain, useTranslate };
|
|
11559
|
+
export { AnimatedGraphic, AnimatedReveal, Aside, AtlasImage, AtlasPanel, Avatar, BAND_ACCENT_FALLBACK, BAND_EDGE_FILL, BAND_SHAPES, BUILT_IN_THEMES, Badge, Box, Button, CONFETTI_BURST_KEYFRAMES, CONFETTI_COLORS, Card, CardBody, CardContent, CardFooter, CardHeader, CardTitle, Center, Checkbox, ConditionalWrapper, ConfettiEffect, DEFAULT_CURRENCY, DayCell, Dialog, Divider, EventBusContext, EventBusProvider, FilterPill, FlipContainer, GameIcon, HStack, I18nProvider, INLINE_TEXT_ATTR, Icon, Image2 as Image, InfiniteScrollSentinel, Input, Label, LawReferenceTooltip, NavStackProvider, NavStackRouterBridge, NavigationProvider, Overlay, PatternTile, PendingScopeContext, Presence, ProgressBar, Radio, RangeSlider, STRETCHED_ABOVE, STRETCHED_CONTROL, SVG_MOTION_CLASSES, SectionHeader, Select, Spacer, Sparkline, Spinner, Stack, StatusDot, SurfaceBoundary, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, Switch, THEME_SCALE_KEYS, TextHighlight, Textarea, ThemeProvider, ThemeScopeContext, ThemeToggle, TimeSlotCell, TraitScopeProvider, TrendIndicator, TypewriterText, Typography, VStack, VideoEmbed, atlasFailed, atlasUrlOf, bandEdgeHeight, bandEdgeLayerStyle, bandEdgeMask, bandPadding, beginPending, blit, boxesOf2 as boxesOf, cn, compareCellValues, coreMessages3 as coreMessages, createConfettiParticles, createTraitPresence, createTranslate, cssTimeMs, domPassthrough, endPending, entriesFor, evaluateBinding, evaluateBindings, extractRouteParams, findPageByName, findPageByPath, followHref, formatDate, formatDateTime, formatTime, formatValue, fxHash01, fxLifecycle, getAllPages, getAtlas, getCurrentIconFamily, getDefaultPage, getGlobalEventBus, getTileDimensions, getTraitPresence, guardsHold, isAbsoluteHref, isAtlasAsset, isColorToken, isInertNavStack, isMotionEnabled, isPending, isSpriteSheetAtlas, kebabToPascal, keyInViewerMode, layoutScale, localeMeta, lucideIconKey, matchNavPage, mergeMessages, motionTiming, navLabelsFromItems, newPendingKey, pageEntryLabel, parseCalendarDate, pathMatches, presenceGroup, pressableProps, previousEntry, registryKeyMode, registryKeyTheme, relabelCurrent, resolveAssetSource, resolveColorToken, resolveEntryLabels, resolveFxView, resolveIcon, resolveIconForFamily, resolveLucideByName, rowActivationProps, rowOpenControlProps, setGlobalEventBus, sortRows, subRectFor, subscribePending, svgMotionClass, syncNavStack, themeHasMode, toDateInputValue, toDateTimeInputValue, useActivePage, useAnimateChanges, useAtlasSliceDataUrl, useContentSurface, useDialogBehavior, useEmitEvent, useEventBus, useEventListener, useEventSubscription, useFormatContext, useIconFamily, useInfiniteScroll, useInitPayload, useMediaQuery, useNavStack, useNavigateTo, useNavigation, useNavigationId, useNavigationState, useOnSurface, usePendingAction, usePendingRows, usePendingScopeValue, usePrefersReducedMotion, usePresence, useRenderI18n, useResolvedIcon, useRootEventBus, useScopeHasPending, useScopedMode, useTapReveal, useTheme, useThemeIconStrokeApplies, useThemeScope, useTraitScope, useTraitScopeChain, useTranslate };
|
|
@@ -239,111 +239,27 @@ function useClientEffectConfig() {
|
|
|
239
239
|
function useClientEffectConfigOptional() {
|
|
240
240
|
return useContext(ClientEffectConfigContext);
|
|
241
241
|
}
|
|
242
|
-
var log4 = createLogger("almadar:ui:
|
|
243
|
-
function resolveEntityData(entityName, context) {
|
|
244
|
-
if (context.fetchedData && entityName in context.fetchedData) {
|
|
245
|
-
const data = context.fetchedData[entityName];
|
|
246
|
-
return {
|
|
247
|
-
data: Array.isArray(data) ? data : [],
|
|
248
|
-
loading: false
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
if (context.entityStore) {
|
|
252
|
-
try {
|
|
253
|
-
const data = context.entityStore.getRecords(entityName);
|
|
254
|
-
return {
|
|
255
|
-
data: Array.isArray(data) ? data : [],
|
|
256
|
-
loading: false
|
|
257
|
-
};
|
|
258
|
-
} catch (error) {
|
|
259
|
-
log4.warn("Error getting records from entity store", {
|
|
260
|
-
entityName,
|
|
261
|
-
error: error instanceof Error ? error : String(error)
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
const hasAnySources = context.fetchedData || context.entityStore;
|
|
266
|
-
return {
|
|
267
|
-
data: [],
|
|
268
|
-
loading: !hasAnySources
|
|
269
|
-
// Only loading if no sources configured
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
function resolveEntityDataWithQuery(entityName, queryRef, context) {
|
|
273
|
-
const resolution = resolveEntityData(entityName, context);
|
|
274
|
-
if (!queryRef || !context.querySingleton) {
|
|
275
|
-
return resolution;
|
|
276
|
-
}
|
|
277
|
-
try {
|
|
278
|
-
const filters = context.querySingleton.getFilters(queryRef);
|
|
279
|
-
const filteredData = applyFilters(resolution.data, filters);
|
|
280
|
-
return {
|
|
281
|
-
...resolution,
|
|
282
|
-
data: filteredData
|
|
283
|
-
};
|
|
284
|
-
} catch (error) {
|
|
285
|
-
log4.warn("Error applying query filters", {
|
|
286
|
-
queryRef,
|
|
287
|
-
error: error instanceof Error ? error : String(error)
|
|
288
|
-
});
|
|
289
|
-
return resolution;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
function applyFilters(data, filters) {
|
|
293
|
-
if (!filters || Object.keys(filters).length === 0) {
|
|
294
|
-
return data;
|
|
295
|
-
}
|
|
296
|
-
return data.filter((item) => {
|
|
297
|
-
if (typeof item !== "object" || item === null) {
|
|
298
|
-
return false;
|
|
299
|
-
}
|
|
300
|
-
return Object.entries(filters).every(([key, value]) => {
|
|
301
|
-
if (value === void 0 || value === null) {
|
|
302
|
-
return true;
|
|
303
|
-
}
|
|
304
|
-
const recordValue = item[key];
|
|
305
|
-
if (Array.isArray(value)) {
|
|
306
|
-
return value.includes(recordValue ?? null);
|
|
307
|
-
}
|
|
308
|
-
if (typeof value === "string" && typeof recordValue === "string") {
|
|
309
|
-
if (value.startsWith("*") && value.endsWith("*")) {
|
|
310
|
-
const pattern = value.slice(1, -1);
|
|
311
|
-
return recordValue.toLowerCase().includes(pattern.toLowerCase());
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return recordValue === value;
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
function resolveEntityById(entityName, id, context) {
|
|
319
|
-
const { data } = resolveEntityData(entityName, context);
|
|
320
|
-
return data.find((item) => item.id === id || item["_id"] === id) ?? null;
|
|
321
|
-
}
|
|
322
|
-
function hasEntities(entityName, context) {
|
|
323
|
-
const { data } = resolveEntityData(entityName, context);
|
|
324
|
-
return data.length > 0;
|
|
325
|
-
}
|
|
326
|
-
var log5 = createLogger("almadar:ui:pattern-resolver");
|
|
242
|
+
var log4 = createLogger("almadar:ui:pattern-resolver");
|
|
327
243
|
function initializePatterns() {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
244
|
+
log4.debug("initializePatterns called");
|
|
245
|
+
log4.debug("componentMappingJson loaded", () => ({ json: JSON.stringify(componentMapping$1) }));
|
|
246
|
+
log4.debug("registryJson keys", { keys: Object.keys(patternsRegistry) });
|
|
331
247
|
const componentMappingData = componentMapping$1;
|
|
332
248
|
const componentMapping2 = componentMappingData.mappings || {};
|
|
333
|
-
|
|
334
|
-
|
|
249
|
+
log4.debug("Extracted mappings count", { count: Object.keys(componentMapping2).length });
|
|
250
|
+
log4.debug("Sample mappings", { samples: Object.keys(componentMapping2).slice(0, 5) });
|
|
335
251
|
const registryData = patternsRegistry;
|
|
336
252
|
const patternRegistry2 = registryData.patterns || {};
|
|
337
|
-
|
|
253
|
+
log4.debug("Extracted patterns count", { count: Object.keys(patternRegistry2).length });
|
|
338
254
|
initializePatternResolver({
|
|
339
255
|
componentMapping: componentMapping2,
|
|
340
256
|
patternRegistry: patternRegistry2
|
|
341
257
|
});
|
|
342
|
-
|
|
258
|
+
log4.info("Initialized", {
|
|
343
259
|
componentMappings: Object.keys(componentMapping2).length,
|
|
344
260
|
patternDefinitions: Object.keys(patternRegistry2).length
|
|
345
261
|
});
|
|
346
262
|
return Object.keys(componentMapping2).length;
|
|
347
263
|
}
|
|
348
264
|
|
|
349
|
-
export { ClientEffectConfigContext, ClientEffectConfigProvider, executeClientEffects, getKnownPatterns, getPatternDefinition, getPatternMapping, getPatternsByCategory, getRenderUIEffects,
|
|
265
|
+
export { ClientEffectConfigContext, ClientEffectConfigProvider, executeClientEffects, getKnownPatterns, getPatternDefinition, getPatternMapping, getPatternsByCategory, getRenderUIEffects, initializePatternResolver, initializePatterns, isKnownPattern, parseClientEffect, parseClientEffects, resolvePattern, setComponentMapping, setPatternRegistry, useClientEffectConfig, useClientEffectConfigOptional, useClientEffects };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn, Typography, useTranslate, VStack, HStack, Icon, Button, Switch, Input } from './chunk-
|
|
1
|
+
import { cn, Typography, useTranslate, VStack, HStack, Icon, Button, Switch, Input } from './chunk-D5FJU4XC.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
|