@almadar/ui 5.21.10 → 5.21.12
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 +175 -798
- package/dist/avl/index.js +24 -647
- package/dist/components/game/organisms/three/index.cjs +2 -489
- package/dist/components/game/organisms/three/index.js +1 -488
- package/dist/components/index.cjs +191 -2487
- package/dist/components/index.js +47 -2296
- package/dist/providers/index.cjs +160 -767
- package/dist/providers/index.js +21 -628
- package/dist/runtime/index.cjs +599 -1209
- package/dist/runtime/index.js +461 -1071
- package/package.json +1 -1
package/dist/runtime/index.cjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React84 = require('react');
|
|
4
|
-
var providers = require('@almadar/ui/providers');
|
|
5
|
-
var logger = require('@almadar/logger');
|
|
6
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
5
|
var clsx = require('clsx');
|
|
8
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var providers = require('@almadar/ui/providers');
|
|
8
|
+
var logger = require('@almadar/logger');
|
|
9
9
|
var LucideIcons2 = require('lucide-react');
|
|
10
10
|
var PhosphorIcons = require('@phosphor-icons/react');
|
|
11
11
|
var TablerIcons = require('@tabler/icons-react');
|
|
12
12
|
var FaIcons = require('react-icons/fa');
|
|
13
13
|
var reactDom = require('react-dom');
|
|
14
|
+
var hooks = require('@almadar/ui/hooks');
|
|
14
15
|
var evaluator = require('@almadar/evaluator');
|
|
15
16
|
var context = require('@almadar/ui/context');
|
|
16
17
|
var reactRouterDom = require('react-router-dom');
|
|
@@ -118,6 +119,62 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
118
119
|
};
|
|
119
120
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
120
121
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
122
|
+
function EntitySchemaProvider({
|
|
123
|
+
entities,
|
|
124
|
+
traitLinkedEntities,
|
|
125
|
+
orbitalsByTrait,
|
|
126
|
+
children
|
|
127
|
+
}) {
|
|
128
|
+
const entitiesMap = React84.useMemo(() => {
|
|
129
|
+
const map = /* @__PURE__ */ new Map();
|
|
130
|
+
for (const entity of entities) {
|
|
131
|
+
map.set(entity.name, entity);
|
|
132
|
+
}
|
|
133
|
+
return map;
|
|
134
|
+
}, [entities]);
|
|
135
|
+
const linkedMap = React84.useMemo(() => {
|
|
136
|
+
return traitLinkedEntities ?? /* @__PURE__ */ new Map();
|
|
137
|
+
}, [traitLinkedEntities]);
|
|
138
|
+
const orbitalsMap = React84.useMemo(() => {
|
|
139
|
+
return orbitalsByTrait ?? /* @__PURE__ */ new Map();
|
|
140
|
+
}, [orbitalsByTrait]);
|
|
141
|
+
const contextValue = React84.useMemo(
|
|
142
|
+
() => ({
|
|
143
|
+
entities: entitiesMap,
|
|
144
|
+
traitLinkedEntities: linkedMap,
|
|
145
|
+
orbitalsByTrait: orbitalsMap
|
|
146
|
+
}),
|
|
147
|
+
[entitiesMap, linkedMap, orbitalsMap]
|
|
148
|
+
);
|
|
149
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EntitySchemaContext.Provider, { value: contextValue, children });
|
|
150
|
+
}
|
|
151
|
+
function useEntitySchema() {
|
|
152
|
+
const context = React84.useContext(EntitySchemaContext);
|
|
153
|
+
if (!context) {
|
|
154
|
+
throw new Error("useEntitySchema must be used within an EntitySchemaProvider");
|
|
155
|
+
}
|
|
156
|
+
return context;
|
|
157
|
+
}
|
|
158
|
+
function useEntityDefinition(entityName) {
|
|
159
|
+
const { entities } = useEntitySchema();
|
|
160
|
+
return entities.get(entityName);
|
|
161
|
+
}
|
|
162
|
+
function useEntitySchemaOptional() {
|
|
163
|
+
return React84.useContext(EntitySchemaContext);
|
|
164
|
+
}
|
|
165
|
+
var EntitySchemaContext;
|
|
166
|
+
var init_EntitySchemaContext = __esm({
|
|
167
|
+
"runtime/EntitySchemaContext.tsx"() {
|
|
168
|
+
EntitySchemaContext = React84.createContext(null);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
function cn(...inputs) {
|
|
172
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
173
|
+
}
|
|
174
|
+
var init_cn = __esm({
|
|
175
|
+
"lib/cn.ts"() {
|
|
176
|
+
}
|
|
177
|
+
});
|
|
121
178
|
|
|
122
179
|
// hooks/useEventBus.ts
|
|
123
180
|
var useEventBus_exports = {};
|
|
@@ -202,11 +259,11 @@ function useEmitEvent() {
|
|
|
202
259
|
[eventBus]
|
|
203
260
|
);
|
|
204
261
|
}
|
|
205
|
-
var
|
|
262
|
+
var log2, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
|
|
206
263
|
var init_useEventBus = __esm({
|
|
207
264
|
"hooks/useEventBus.ts"() {
|
|
208
265
|
"use client";
|
|
209
|
-
|
|
266
|
+
log2 = logger.createLogger("almadar:eventbus");
|
|
210
267
|
subLog = logger.createLogger("almadar:eventbus:subscribe");
|
|
211
268
|
scopeLog = logger.createLogger("almadar:ui:trait-scope");
|
|
212
269
|
fallbackListeners = /* @__PURE__ */ new Map();
|
|
@@ -220,13 +277,13 @@ var init_useEventBus = __esm({
|
|
|
220
277
|
source
|
|
221
278
|
};
|
|
222
279
|
const handlers = fallbackListeners.get(type);
|
|
223
|
-
|
|
280
|
+
log2.debug("emit", { type, payloadKeys: payload ? Object.keys(payload).length : 0, listenerCount: (handlers?.size ?? 0) + fallbackAnyListeners.size });
|
|
224
281
|
if (handlers) {
|
|
225
282
|
handlers.forEach((handler) => {
|
|
226
283
|
try {
|
|
227
284
|
handler(event);
|
|
228
285
|
} catch (error) {
|
|
229
|
-
|
|
286
|
+
log2.error("Error in listener", { type, error: error instanceof Error ? error : String(error) });
|
|
230
287
|
}
|
|
231
288
|
});
|
|
232
289
|
}
|
|
@@ -234,7 +291,7 @@ var init_useEventBus = __esm({
|
|
|
234
291
|
try {
|
|
235
292
|
handler(event);
|
|
236
293
|
} catch (error) {
|
|
237
|
-
|
|
294
|
+
log2.error("Error in onAny listener", { type, error: error instanceof Error ? error : String(error) });
|
|
238
295
|
}
|
|
239
296
|
});
|
|
240
297
|
},
|
|
@@ -277,928 +334,6 @@ var init_useEventBus = __esm({
|
|
|
277
334
|
useEventBus_default = useEventBus;
|
|
278
335
|
}
|
|
279
336
|
});
|
|
280
|
-
function getOrCreateStore(query) {
|
|
281
|
-
if (!queryStores.has(query)) {
|
|
282
|
-
queryStores.set(query, {
|
|
283
|
-
search: "",
|
|
284
|
-
filters: {},
|
|
285
|
-
sortField: void 0,
|
|
286
|
-
sortDirection: void 0,
|
|
287
|
-
listeners: /* @__PURE__ */ new Set()
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
return queryStores.get(query);
|
|
291
|
-
}
|
|
292
|
-
function useQuerySingleton(query) {
|
|
293
|
-
const [, forceUpdate] = React84.useState({});
|
|
294
|
-
if (!query) {
|
|
295
|
-
return null;
|
|
296
|
-
}
|
|
297
|
-
const store = React84.useMemo(() => getOrCreateStore(query), [query]);
|
|
298
|
-
React84.useMemo(() => {
|
|
299
|
-
const listener = () => forceUpdate({});
|
|
300
|
-
store.listeners.add(listener);
|
|
301
|
-
return () => {
|
|
302
|
-
store.listeners.delete(listener);
|
|
303
|
-
};
|
|
304
|
-
}, [store]);
|
|
305
|
-
const notifyListeners3 = React84.useCallback(() => {
|
|
306
|
-
store.listeners.forEach((listener) => listener());
|
|
307
|
-
}, [store]);
|
|
308
|
-
const setSearch = React84.useCallback((value) => {
|
|
309
|
-
store.search = value;
|
|
310
|
-
notifyListeners3();
|
|
311
|
-
}, [store, notifyListeners3]);
|
|
312
|
-
const setFilter = React84.useCallback((key, value) => {
|
|
313
|
-
store.filters = { ...store.filters, [key]: value };
|
|
314
|
-
notifyListeners3();
|
|
315
|
-
}, [store, notifyListeners3]);
|
|
316
|
-
const clearFilters = React84.useCallback(() => {
|
|
317
|
-
store.filters = {};
|
|
318
|
-
store.search = "";
|
|
319
|
-
notifyListeners3();
|
|
320
|
-
}, [store, notifyListeners3]);
|
|
321
|
-
const setSort = React84.useCallback((field, direction) => {
|
|
322
|
-
store.sortField = field;
|
|
323
|
-
store.sortDirection = direction;
|
|
324
|
-
notifyListeners3();
|
|
325
|
-
}, [store, notifyListeners3]);
|
|
326
|
-
return {
|
|
327
|
-
search: store.search,
|
|
328
|
-
setSearch,
|
|
329
|
-
filters: store.filters,
|
|
330
|
-
setFilter,
|
|
331
|
-
clearFilters,
|
|
332
|
-
sortField: store.sortField,
|
|
333
|
-
sortDirection: store.sortDirection,
|
|
334
|
-
setSort
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
var queryStores;
|
|
338
|
-
var init_useQuerySingleton = __esm({
|
|
339
|
-
"hooks/useQuerySingleton.ts"() {
|
|
340
|
-
"use client";
|
|
341
|
-
queryStores = /* @__PURE__ */ new Map();
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
// locales/en.json
|
|
346
|
-
var en_default;
|
|
347
|
-
var init_en = __esm({
|
|
348
|
-
"locales/en.json"() {
|
|
349
|
-
en_default = {
|
|
350
|
-
$meta: {
|
|
351
|
-
locale: "en",
|
|
352
|
-
direction: "ltr"
|
|
353
|
-
},
|
|
354
|
-
"common.save": "Save",
|
|
355
|
-
"common.cancel": "Cancel",
|
|
356
|
-
"common.delete": "Delete",
|
|
357
|
-
"common.close": "Close",
|
|
358
|
-
"common.confirm": "Are you sure?",
|
|
359
|
-
"common.create": "Create",
|
|
360
|
-
"common.edit": "Edit",
|
|
361
|
-
"common.view": "View",
|
|
362
|
-
"common.add": "Add",
|
|
363
|
-
"common.remove": "Remove",
|
|
364
|
-
"common.search": "Search...",
|
|
365
|
-
"common.filter": "Filter",
|
|
366
|
-
"common.actions": "Actions",
|
|
367
|
-
"common.yes": "Yes",
|
|
368
|
-
"common.no": "No",
|
|
369
|
-
"common.selected": "selected",
|
|
370
|
-
"common.ok": "OK",
|
|
371
|
-
"common.done": "Done",
|
|
372
|
-
"common.apply": "Apply",
|
|
373
|
-
"common.reset": "Reset",
|
|
374
|
-
"common.refresh": "Refresh",
|
|
375
|
-
"common.export": "Export",
|
|
376
|
-
"common.import": "Import",
|
|
377
|
-
"common.copy": "Copy",
|
|
378
|
-
"common.settings": "Settings",
|
|
379
|
-
"nav.previous": "Previous",
|
|
380
|
-
"nav.next": "Next",
|
|
381
|
-
"nav.back": "Back",
|
|
382
|
-
"nav.home": "Home",
|
|
383
|
-
"form.submit": "Submit",
|
|
384
|
-
"form.saving": "Saving...",
|
|
385
|
-
"form.required": "This field is required",
|
|
386
|
-
"form.invalidEmail": "Enter a valid email address",
|
|
387
|
-
"form.selectPlaceholder": "Select {{label}}...",
|
|
388
|
-
"form.searchPlaceholder": "Search {{entity}}...",
|
|
389
|
-
"table.empty.title": "No items found",
|
|
390
|
-
"table.empty.description": "No items to display.",
|
|
391
|
-
"table.search.placeholder": "Search...",
|
|
392
|
-
"table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
|
|
393
|
-
"table.pagination.page": "Page {{page}} of {{totalPages}}",
|
|
394
|
-
"table.bulk.selected": "{{count}} selected",
|
|
395
|
-
"table.loading": "Loading...",
|
|
396
|
-
"status.loading": "Loading...",
|
|
397
|
-
"status.scheduled": "Scheduled",
|
|
398
|
-
"status.inProgress": "In Progress",
|
|
399
|
-
"status.completed": "Completed",
|
|
400
|
-
"status.cancelled": "Cancelled",
|
|
401
|
-
"status.pending": "Pending",
|
|
402
|
-
"status.active": "Active",
|
|
403
|
-
"status.inactive": "Inactive",
|
|
404
|
-
"status.draft": "Draft",
|
|
405
|
-
"status.archived": "Archived",
|
|
406
|
-
"error.generic": "Something went wrong",
|
|
407
|
-
"error.retry": "Try again",
|
|
408
|
-
"error.notFound": "Not found",
|
|
409
|
-
"error.loadFailed": "Failed to load: {{message}}",
|
|
410
|
-
"error.configMissing": "Configuration not found for: {{id}}",
|
|
411
|
-
"common.loading": "Loading...",
|
|
412
|
-
"common.showMore": "Show More",
|
|
413
|
-
"common.showLess": "Show Less",
|
|
414
|
-
"common.noResults": "No results found",
|
|
415
|
-
"common.saveChanges": "Save Changes",
|
|
416
|
-
"common.retry": "Retry",
|
|
417
|
-
"common.open": "Open",
|
|
418
|
-
"common.back": "Back",
|
|
419
|
-
"empty.noItems": "No items",
|
|
420
|
-
"empty.noData": "No data available",
|
|
421
|
-
"empty.noItemsYet": "No items yet",
|
|
422
|
-
"empty.noItemsAdded": "No items added yet",
|
|
423
|
-
"empty.noOptionsFound": "No options found",
|
|
424
|
-
"list.addItemPlaceholder": "Add new item...",
|
|
425
|
-
"error.occurred": "An error occurred",
|
|
426
|
-
"error.failedToLoad": "Failed to load data",
|
|
427
|
-
"wizard.back": "Back",
|
|
428
|
-
"wizard.next": "Next",
|
|
429
|
-
"wizard.complete": "Complete",
|
|
430
|
-
"wizard.stepOf": "Step {{current}} of {{total}}",
|
|
431
|
-
"pagination.previous": "Previous",
|
|
432
|
-
"pagination.next": "Next",
|
|
433
|
-
"pagination.total": "Total:",
|
|
434
|
-
"pagination.show": "Show:",
|
|
435
|
-
"pagination.goTo": "Go to:",
|
|
436
|
-
"pagination.go": "Go",
|
|
437
|
-
"auth.signIn": "Sign in",
|
|
438
|
-
"auth.signOut": "Sign out",
|
|
439
|
-
"dialog.confirm": "Confirm",
|
|
440
|
-
"dialog.cancel": "Cancel",
|
|
441
|
-
"dialog.loading": "Loading...",
|
|
442
|
-
"dialog.delete.title": "Delete {{item}}?",
|
|
443
|
-
"dialog.delete.message": "This action cannot be undone.",
|
|
444
|
-
"trait.availableActions": "Available Actions",
|
|
445
|
-
"trait.transitions": "Transitions",
|
|
446
|
-
"trait.availableNow": "Available now",
|
|
447
|
-
"book.startReading": "Start Reading",
|
|
448
|
-
"book.tableOfContents": "Table of Contents",
|
|
449
|
-
"book.partNumber": "Part {{number}}",
|
|
450
|
-
"book.print": "Print",
|
|
451
|
-
"book.previousPage": "Previous page",
|
|
452
|
-
"book.nextPage": "Next page",
|
|
453
|
-
"quiz.showAnswer": "Show answer",
|
|
454
|
-
"quiz.hideAnswer": "Hide answer",
|
|
455
|
-
"aria.closeModal": "Close modal",
|
|
456
|
-
"aria.closeToast": "Dismiss toast",
|
|
457
|
-
"aria.closeAlert": "Dismiss alert",
|
|
458
|
-
"aria.removeFilter": "Remove filter",
|
|
459
|
-
"aria.closeDrawer": "Close drawer",
|
|
460
|
-
"aria.closePanel": "Close panel",
|
|
461
|
-
"aria.previousImage": "Previous image",
|
|
462
|
-
"aria.nextImage": "Next image",
|
|
463
|
-
"aria.dismiss": "Dismiss",
|
|
464
|
-
"aria.previousSlide": "Previous slide",
|
|
465
|
-
"aria.nextSlide": "Next slide",
|
|
466
|
-
"aria.previousDays": "Previous days",
|
|
467
|
-
"aria.nextDays": "Next days",
|
|
468
|
-
"aria.decrease": "Decrease",
|
|
469
|
-
"aria.increase": "Increase",
|
|
470
|
-
"aria.breadcrumb": "Breadcrumb",
|
|
471
|
-
"aria.tableOfContents": "Table of contents",
|
|
472
|
-
"aria.docsSidebar": "Documentation sidebar",
|
|
473
|
-
"aria.selectAllRows": "Select all rows",
|
|
474
|
-
"aria.selectAll": "Select all",
|
|
475
|
-
"aria.upvote": "Upvote",
|
|
476
|
-
"aria.downvote": "Downvote",
|
|
477
|
-
"aria.qrScanner": "QR scanner",
|
|
478
|
-
"aria.mockScanDev": "Mock scan (dev)",
|
|
479
|
-
"aria.openMenu": "Open menu",
|
|
480
|
-
"aria.closeMenu": "Close menu",
|
|
481
|
-
"aria.openSidebar": "Open sidebar",
|
|
482
|
-
"sidebar.expand": "Expand sidebar",
|
|
483
|
-
"sidebar.collapse": "Collapse sidebar",
|
|
484
|
-
"sidebar.close": "Close sidebar",
|
|
485
|
-
"loading.items": "Loading items...",
|
|
486
|
-
"card.imageAlt": "Image",
|
|
487
|
-
"canvas.emptyMessage": "No content",
|
|
488
|
-
"canvas.errorTitle": "Canvas error",
|
|
489
|
-
"book.noData": "No data",
|
|
490
|
-
"common.notifications": "Notifications",
|
|
491
|
-
"common.remaining": "{{count}} remaining",
|
|
492
|
-
"error.somethingWentWrong": "Something went wrong",
|
|
493
|
-
"error.loadingItems": "Loading items...",
|
|
494
|
-
"error.noItemsFound": "No items found",
|
|
495
|
-
"debug.noEntityData": "No entity data",
|
|
496
|
-
"debug.noEntities": "No entities",
|
|
497
|
-
"debug.noTicks": "No ticks registered",
|
|
498
|
-
"debug.noActiveTraits": "No active traits",
|
|
499
|
-
"debug.noGuardEvaluations": "No guard evaluations",
|
|
500
|
-
"debug.noBridgeData": "No bridge data",
|
|
501
|
-
"debug.status": "Status",
|
|
502
|
-
"debug.eventsForwarded": "Events Forwarded (Client \u2192 Server)",
|
|
503
|
-
"debug.eventsReceived": "Events Received (Server \u2192 Client)",
|
|
504
|
-
"debug.lastHeartbeat": "Last Heartbeat",
|
|
505
|
-
"debug.noEventsYet": "No events yet",
|
|
506
|
-
"debug.noTransitionsRecorded": "No transitions recorded",
|
|
507
|
-
"debug.noVerificationChecks": "No verification checks yet",
|
|
508
|
-
"display.chartError": "Chart error",
|
|
509
|
-
"display.codeViewerError": "Code viewer error",
|
|
510
|
-
"display.noCode": "No code",
|
|
511
|
-
"display.documentError": "Document error",
|
|
512
|
-
"display.noDocument": "No document",
|
|
513
|
-
"display.graphError": "Graph error",
|
|
514
|
-
"display.noGraphData": "No graph data",
|
|
515
|
-
"display.galleryError": "Gallery error",
|
|
516
|
-
"display.noMedia": "No media",
|
|
517
|
-
"display.meterError": "Meter error",
|
|
518
|
-
"display.signaturePadError": "Signature pad error",
|
|
519
|
-
"display.timelineError": "Timeline error",
|
|
520
|
-
"display.noEvents": "No events",
|
|
521
|
-
"template.features": "Features",
|
|
522
|
-
"template.howItWorks": "How It Works",
|
|
523
|
-
"template.showcase": "Showcase",
|
|
524
|
-
"template.faq": "Frequently Asked Questions",
|
|
525
|
-
"template.ourTeam": "Our Team",
|
|
526
|
-
"template.caseStudies": "Case Studies",
|
|
527
|
-
"richBlockEditor.toolbar.text": "Text",
|
|
528
|
-
"richBlockEditor.toolbar.h1": "H1",
|
|
529
|
-
"richBlockEditor.toolbar.h2": "H2",
|
|
530
|
-
"richBlockEditor.toolbar.h3": "H3",
|
|
531
|
-
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
532
|
-
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
533
|
-
"richBlockEditor.toolbar.quote": "Quote",
|
|
534
|
-
"richBlockEditor.toolbar.code": "Code",
|
|
535
|
-
"richBlockEditor.toolbar.divider": "Divider",
|
|
536
|
-
"richBlockEditor.toolbar.image": "Image",
|
|
537
|
-
"richBlockEditor.blockType.paragraph": "Text",
|
|
538
|
-
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
539
|
-
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
540
|
-
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
541
|
-
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
542
|
-
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
543
|
-
"richBlockEditor.blockType.quote": "Quote",
|
|
544
|
-
"richBlockEditor.blockType.code": "Code",
|
|
545
|
-
"richBlockEditor.blockType.divider": "Divider",
|
|
546
|
-
"richBlockEditor.blockType.image": "Image",
|
|
547
|
-
"richBlockEditor.blockActions": "Block actions",
|
|
548
|
-
"richBlockEditor.duplicate": "Duplicate",
|
|
549
|
-
"richBlockEditor.turnInto": "Turn into",
|
|
550
|
-
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
551
|
-
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
552
|
-
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
553
|
-
"richBlockEditor.placeholder.quote": "Quote",
|
|
554
|
-
"richBlockEditor.placeholder.code": "Enter code",
|
|
555
|
-
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
556
|
-
"richBlockEditor.placeholder.listItem": "List item",
|
|
557
|
-
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
558
|
-
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
559
|
-
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
560
|
-
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
561
|
-
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
562
|
-
"richBlockEditor.aria.codeBlock": "Code block",
|
|
563
|
-
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
564
|
-
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
565
|
-
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
566
|
-
"richBlockEditor.aria.listItem": "List item",
|
|
567
|
-
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
568
|
-
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
569
|
-
"richBlockEditor.embeddedImage": "Embedded image",
|
|
570
|
-
"richBlockEditor.noImageUrl": "No image URL set",
|
|
571
|
-
"richBlockEditor.addItem": "Add item",
|
|
572
|
-
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
573
|
-
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
574
|
-
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
575
|
-
"versionDiff.compare": "Compare",
|
|
576
|
-
"versionDiff.to": "to",
|
|
577
|
-
"versionDiff.beforeRevision": "Before revision",
|
|
578
|
-
"versionDiff.afterRevision": "After revision",
|
|
579
|
-
"versionDiff.switchToInline": "Switch to inline view",
|
|
580
|
-
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
581
|
-
"versionDiff.revert": "Revert",
|
|
582
|
-
"versionDiff.byAuthor": " by {{author}}",
|
|
583
|
-
"violationAlert.actionType.measure": "Corrective Measure",
|
|
584
|
-
"violationAlert.actionType.admin": "Administrative Action",
|
|
585
|
-
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
586
|
-
"violationAlert.fallbackMessage": "Violation",
|
|
587
|
-
"violationAlert.adminLabel": "Admin:",
|
|
588
|
-
"violationAlert.penaltyLabel": "Penalty:",
|
|
589
|
-
"violationAlert.goToField": "Go to field",
|
|
590
|
-
"branchingLogic.title": "Branching logic",
|
|
591
|
-
"branchingLogic.if": "If",
|
|
592
|
-
"branchingLogic.goTo": "go to",
|
|
593
|
-
"branchingLogic.rules": "Rules",
|
|
594
|
-
"branchingLogic.logicGraph": "Logic graph",
|
|
595
|
-
"branchingLogic.addRule": "Add rule",
|
|
596
|
-
"branchingLogic.deleteRule": "Delete rule",
|
|
597
|
-
"branchingLogic.endOfSurvey": "End of survey",
|
|
598
|
-
"branchingLogic.brokenReference": "Broken reference",
|
|
599
|
-
"branchingLogic.selectQuestion": "Select question",
|
|
600
|
-
"branchingLogic.selectTarget": "Select target",
|
|
601
|
-
"branchingLogic.selectValue": "Select value",
|
|
602
|
-
"branchingLogic.addValue": "Add value",
|
|
603
|
-
"branchingLogic.value": "Value",
|
|
604
|
-
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
605
|
-
"branchingLogic.operatorEquals": "equals",
|
|
606
|
-
"branchingLogic.operatorNotEquals": "does not equal",
|
|
607
|
-
"branchingLogic.operatorContains": "contains",
|
|
608
|
-
"branchingLogic.operatorIn": "is one of",
|
|
609
|
-
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
610
|
-
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
611
|
-
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
612
|
-
"branchingLogic.brokenCount": "{{count}} broken",
|
|
613
|
-
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
614
|
-
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
615
|
-
"filterGroup.filters": "Filters",
|
|
616
|
-
"filterGroup.all": "All",
|
|
617
|
-
"filterGroup.clear": "Clear",
|
|
618
|
-
"filterGroup.clearAll": "Clear all",
|
|
619
|
-
"filterGroup.from": "From",
|
|
620
|
-
"filterGroup.to": "To",
|
|
621
|
-
"filterGroup.allOf": "All {{label}}",
|
|
622
|
-
"filterGroup.activeCount": "{{count}} active",
|
|
623
|
-
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
624
|
-
"debug.expression": "Expression",
|
|
625
|
-
"debug.inputs": "Inputs",
|
|
626
|
-
"debug.trait": "Trait",
|
|
627
|
-
"debug.filterAll": "All",
|
|
628
|
-
"debug.filterPassed": "Passed",
|
|
629
|
-
"debug.filterFailed": "Failed",
|
|
630
|
-
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
631
|
-
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
632
|
-
"debug.activeStates": "Active States",
|
|
633
|
-
"debug.availableEvents": "Available Events",
|
|
634
|
-
"debug.noTransitionsFromState": "No transitions from current state",
|
|
635
|
-
"debug.guarded": "guarded",
|
|
636
|
-
"debug.otherEvents": "Other Events (not available from current state)",
|
|
637
|
-
"debug.recentTransitions": "Recent Transitions",
|
|
638
|
-
"debug.transitionsCount": "{{count}} transitions",
|
|
639
|
-
"debug.states": "States",
|
|
640
|
-
"debug.transitions": "Transitions",
|
|
641
|
-
"debug.guards": "Guards",
|
|
642
|
-
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
643
|
-
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
644
|
-
"debug.singleton": "Singleton",
|
|
645
|
-
"debug.singletonsCount": "Singletons ({{count}})",
|
|
646
|
-
"debug.runtimeCount": "Runtime ({{count}})",
|
|
647
|
-
"debug.moreEntities": "+{{count}} more entities",
|
|
648
|
-
"debug.persistent": "Persistent",
|
|
649
|
-
"debug.loadedCount": "{{count}} loaded",
|
|
650
|
-
"debug.notLoaded": "not loaded",
|
|
651
|
-
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
652
|
-
"debug.allCount": "All ({{count}})",
|
|
653
|
-
"debug.autoScroll": "Auto-scroll",
|
|
654
|
-
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
655
|
-
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
656
|
-
"debug.guardLabel": "guard:",
|
|
657
|
-
"debug.effectsCount": "{{count}} effects",
|
|
658
|
-
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
659
|
-
"debug.never": "Never",
|
|
660
|
-
"debug.connected": "Connected",
|
|
661
|
-
"debug.disconnected": "Disconnected",
|
|
662
|
-
"debug.lastError": "Last Error",
|
|
663
|
-
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
664
|
-
"debug.server": "server",
|
|
665
|
-
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
666
|
-
"debug.emitLabel": "emit:",
|
|
667
|
-
"debug.rowsCount": "{{count}} rows",
|
|
668
|
-
"debug.serverResponse": "server response",
|
|
669
|
-
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
670
|
-
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
671
|
-
"debug.failCount": "{{count}} fail",
|
|
672
|
-
"debug.ok": "OK",
|
|
673
|
-
"debug.localCount": "{{count}} local",
|
|
674
|
-
"debug.serverCount": "{{count}} server",
|
|
675
|
-
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
676
|
-
"debug.tabDispatch": "Dispatch",
|
|
677
|
-
"debug.tabVerify": "Verify",
|
|
678
|
-
"debug.tabVerifyAlert": "Verify (!)",
|
|
679
|
-
"debug.tabTimeline": "Timeline",
|
|
680
|
-
"debug.tabBridge": "Bridge",
|
|
681
|
-
"debug.tabTraits": "Traits",
|
|
682
|
-
"debug.tabTicks": "Ticks",
|
|
683
|
-
"debug.tabEntities": "Entities",
|
|
684
|
-
"debug.tabEvents": "Events",
|
|
685
|
-
"debug.tabGuards": "Guards",
|
|
686
|
-
"debug.debugger": "Debugger",
|
|
687
|
-
"debug.failedCount": "{{count}} failed",
|
|
688
|
-
"debug.traitsCount": "{{count}} traits",
|
|
689
|
-
"debug.idle": "Idle",
|
|
690
|
-
"debug.openDebugger": "Open Debugger (`)",
|
|
691
|
-
"debug.kflowVerifier": "KFlow Verifier",
|
|
692
|
-
"debug.allPassing": "All passing",
|
|
693
|
-
"debug.runtime": "Runtime",
|
|
694
|
-
"debug.close": "Close (`)",
|
|
695
|
-
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
696
|
-
"replyTree.expandReplies": "Expand replies",
|
|
697
|
-
"replyTree.collapseReplies": "Collapse replies",
|
|
698
|
-
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
699
|
-
"replyTree.replyTo": "Reply to {{author}}",
|
|
700
|
-
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
701
|
-
"replyTree.reply": "Reply",
|
|
702
|
-
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
703
|
-
"replyTree.flag": "Flag",
|
|
704
|
-
"replyTree.send": "Send",
|
|
705
|
-
"replyTree.continueThread": "Continue thread",
|
|
706
|
-
"replyTree.noRepliesYet": "No replies yet.",
|
|
707
|
-
"signaturePad.label": "Signature",
|
|
708
|
-
"signaturePad.helperText": "Draw your signature above",
|
|
709
|
-
"signaturePad.clear": "Clear",
|
|
710
|
-
"signaturePad.confirm": "Confirm",
|
|
711
|
-
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
712
|
-
"qrScanner.paused": "Paused",
|
|
713
|
-
"qrScanner.resumeScanning": "Resume scanning",
|
|
714
|
-
"qrScanner.pauseScanning": "Pause scanning",
|
|
715
|
-
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
716
|
-
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
717
|
-
"qrScanner.mockScan": "Mock Scan",
|
|
718
|
-
"docSearch.placeholder": "Search documentation...",
|
|
719
|
-
"stateMachine.loading": "Loading state machine\u2026",
|
|
720
|
-
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
721
|
-
"avl.trigger": "Trigger",
|
|
722
|
-
"avl.guard": "Guard",
|
|
723
|
-
"avl.effects": "Effects",
|
|
724
|
-
"avl.props": "Props",
|
|
725
|
-
"avl.entity": "Entity",
|
|
726
|
-
"avl.traits": "Traits",
|
|
727
|
-
"avl.transition": "Transition",
|
|
728
|
-
"avl.onEntity": "on {{entity}}",
|
|
729
|
-
"avl.linkedTo": "linked to {{entity}}",
|
|
730
|
-
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
731
|
-
"avl.zoomIn": "Zoom in",
|
|
732
|
-
"avl.zoomOut": "Zoom out",
|
|
733
|
-
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
734
|
-
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
735
|
-
"avl.noTraitData": "No trait data",
|
|
736
|
-
"avl.computingLayout": "Computing layout...",
|
|
737
|
-
"avl.noStateMachine": "No state machine",
|
|
738
|
-
"avl.listensFor": "listens for {{event}}",
|
|
739
|
-
"avl.emits": "emits {{event}}",
|
|
740
|
-
"avl.pageLayout": "Page Layout",
|
|
741
|
-
"avl.overlaySuffix": "(overlay)",
|
|
742
|
-
"orbPreview.previewBadge": "Preview",
|
|
743
|
-
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
744
|
-
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
745
|
-
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
746
|
-
"orbPreview.noPreview": "No preview available",
|
|
747
|
-
"orbPreview.screensCount": "{{count}} screens",
|
|
748
|
-
"detailView.noTransitionData": "No transition data",
|
|
749
|
-
"orbInspector.required": "req",
|
|
750
|
-
"orbInspector.addField": "Add Field",
|
|
751
|
-
"orbInspector.serviceMode": "Service Mode",
|
|
752
|
-
"orbInspector.standalone": "Standalone",
|
|
753
|
-
"orbInspector.embedded": "Embedded",
|
|
754
|
-
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
755
|
-
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
756
|
-
"orbInspector.addEffect": "Add Effect",
|
|
757
|
-
"orbInspector.guardExpression": "Guard expression",
|
|
758
|
-
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
759
|
-
"orbInspector.tokens": "Tokens",
|
|
760
|
-
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
761
|
-
"orbInspector.variant": "Variant",
|
|
762
|
-
"orbInspector.size": "Size",
|
|
763
|
-
"orbInspector.statesCount": "{{count}} states",
|
|
764
|
-
"orbInspector.onEntity": " on {{entity}}",
|
|
765
|
-
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
766
|
-
"orbInspector.tokenGroup.colors": "Colors",
|
|
767
|
-
"orbInspector.tokenGroup.radii": "Radii",
|
|
768
|
-
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
769
|
-
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
770
|
-
"orbInspector.tab.inspector": "Inspector",
|
|
771
|
-
"orbInspector.tab.styles": "Styles",
|
|
772
|
-
"orbInspector.tab.code": "Code",
|
|
773
|
-
"canvas.goBackToOverview": "Go back to overview",
|
|
774
|
-
"canvas.overview": "Overview",
|
|
775
|
-
"canvas.expanded": "Expanded",
|
|
776
|
-
"canvas.modulesCount": "{{count}} modules",
|
|
777
|
-
"canvas.screensCount": "{{count}} screens",
|
|
778
|
-
"canvas.switchToView": "Switch to {{label}} view",
|
|
779
|
-
"lawReference.viewFullText": "View full law text",
|
|
780
|
-
"statCard.defaultLabel": "Stat",
|
|
781
|
-
"statCard.vsLastPeriod": "vs last period",
|
|
782
|
-
"mediaGallery.upload": "Upload",
|
|
783
|
-
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
784
|
-
"pagination.jumpPlaceholder": "Page",
|
|
785
|
-
"table.selectRow": "Select row {{id}}",
|
|
786
|
-
"card.selectItem": "Select {{item}}",
|
|
787
|
-
"card.itemFallback": "item",
|
|
788
|
-
"fileTree.noFiles": "No files",
|
|
789
|
-
"masterDetail.selectItem": "Select an item to view details",
|
|
790
|
-
"empty.createFirst": "Create your first item to get started.",
|
|
791
|
-
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
792
|
-
"upload.dropFilesHere": "Drop files here",
|
|
793
|
-
"upload.accepted": "Accepted: {{accept}}",
|
|
794
|
-
"upload.maxSize": "Max size: {{size}}",
|
|
795
|
-
"upload.maxFiles": "Up to {{count}} files",
|
|
796
|
-
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
797
|
-
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
798
|
-
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
799
|
-
"optionConstraint.requiredOne": "Required, pick 1",
|
|
800
|
-
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
801
|
-
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
802
|
-
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
803
|
-
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
804
|
-
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
805
|
-
"optionConstraint.optional": "Optional",
|
|
806
|
-
"optionConstraint.outOfStock": "Out of stock",
|
|
807
|
-
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
808
|
-
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
809
|
-
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
810
|
-
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
811
|
-
"stateMachine.pinned": "Pinned",
|
|
812
|
-
"stateMachine.eventCount": "{{count}} events",
|
|
813
|
-
"stateMachine.externalEffects": "External Effects",
|
|
814
|
-
"stateMachine.legend.initial": "Initial",
|
|
815
|
-
"stateMachine.legend.final": "Final",
|
|
816
|
-
"stateMachine.legend.state": "State",
|
|
817
|
-
"stateMachine.legend.multiEvent": "Multi-event",
|
|
818
|
-
"relationSelect.selectPlaceholder": "Select..."
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
});
|
|
822
|
-
function useTranslate() {
|
|
823
|
-
return React84.useContext(I18nContext);
|
|
824
|
-
}
|
|
825
|
-
var _meta, coreMessages, coreLocale, I18nContext;
|
|
826
|
-
var init_useTranslate = __esm({
|
|
827
|
-
"hooks/useTranslate.ts"() {
|
|
828
|
-
"use client";
|
|
829
|
-
init_en();
|
|
830
|
-
({ $meta: _meta, ...coreMessages } = en_default);
|
|
831
|
-
coreLocale = coreMessages;
|
|
832
|
-
I18nContext = React84.createContext({
|
|
833
|
-
locale: "en",
|
|
834
|
-
direction: "ltr",
|
|
835
|
-
t: (key) => coreLocale[key] ?? key
|
|
836
|
-
// core locale fallback
|
|
837
|
-
});
|
|
838
|
-
I18nContext.displayName = "I18nContext";
|
|
839
|
-
I18nContext.Provider;
|
|
840
|
-
}
|
|
841
|
-
});
|
|
842
|
-
|
|
843
|
-
// hooks/useAuthContext.ts
|
|
844
|
-
function useAuthContext() {
|
|
845
|
-
return {
|
|
846
|
-
user: null,
|
|
847
|
-
loading: false,
|
|
848
|
-
signIn: void 0,
|
|
849
|
-
signOut: void 0
|
|
850
|
-
};
|
|
851
|
-
}
|
|
852
|
-
var init_useAuthContext = __esm({
|
|
853
|
-
"hooks/useAuthContext.ts"() {
|
|
854
|
-
}
|
|
855
|
-
});
|
|
856
|
-
function useSwipeGesture(callbacks, options = {}) {
|
|
857
|
-
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
858
|
-
const startX = React84.useRef(0);
|
|
859
|
-
const startY = React84.useRef(0);
|
|
860
|
-
const startTime = React84.useRef(0);
|
|
861
|
-
const currentX = React84.useRef(0);
|
|
862
|
-
const tracking = React84.useRef(false);
|
|
863
|
-
const offsetXRef = React84.useRef(0);
|
|
864
|
-
const isSwipingRef = React84.useRef(false);
|
|
865
|
-
const onPointerDown = React84.useCallback((e) => {
|
|
866
|
-
startX.current = e.clientX;
|
|
867
|
-
startY.current = e.clientY;
|
|
868
|
-
currentX.current = e.clientX;
|
|
869
|
-
startTime.current = Date.now();
|
|
870
|
-
tracking.current = true;
|
|
871
|
-
isSwipingRef.current = false;
|
|
872
|
-
offsetXRef.current = 0;
|
|
873
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
874
|
-
}, []);
|
|
875
|
-
const onPointerMove = React84.useCallback((e) => {
|
|
876
|
-
if (!tracking.current) return;
|
|
877
|
-
if (preventDefault) e.preventDefault();
|
|
878
|
-
currentX.current = e.clientX;
|
|
879
|
-
const dx = e.clientX - startX.current;
|
|
880
|
-
const dy = e.clientY - startY.current;
|
|
881
|
-
if (Math.abs(dx) > 10 && Math.abs(dx) > Math.abs(dy)) {
|
|
882
|
-
isSwipingRef.current = true;
|
|
883
|
-
offsetXRef.current = dx;
|
|
884
|
-
}
|
|
885
|
-
}, [preventDefault]);
|
|
886
|
-
const onPointerUp = React84.useCallback((e) => {
|
|
887
|
-
if (!tracking.current) return;
|
|
888
|
-
tracking.current = false;
|
|
889
|
-
const dx = e.clientX - startX.current;
|
|
890
|
-
const dy = e.clientY - startY.current;
|
|
891
|
-
const elapsed = Date.now() - startTime.current;
|
|
892
|
-
const velocity = Math.abs(dx) / Math.max(elapsed, 1);
|
|
893
|
-
offsetXRef.current = 0;
|
|
894
|
-
isSwipingRef.current = false;
|
|
895
|
-
if (Math.abs(dx) < threshold && velocity < velocityThreshold) return;
|
|
896
|
-
if (Math.abs(dx) > Math.abs(dy)) {
|
|
897
|
-
if (dx < -threshold) callbacks.onSwipeLeft?.();
|
|
898
|
-
else if (dx > threshold) callbacks.onSwipeRight?.();
|
|
899
|
-
} else {
|
|
900
|
-
if (dy < -threshold) callbacks.onSwipeUp?.();
|
|
901
|
-
else if (dy > threshold) callbacks.onSwipeDown?.();
|
|
902
|
-
}
|
|
903
|
-
}, [threshold, velocityThreshold, callbacks]);
|
|
904
|
-
const onPointerCancel = React84.useCallback(() => {
|
|
905
|
-
tracking.current = false;
|
|
906
|
-
offsetXRef.current = 0;
|
|
907
|
-
isSwipingRef.current = false;
|
|
908
|
-
}, []);
|
|
909
|
-
return {
|
|
910
|
-
onPointerDown,
|
|
911
|
-
onPointerMove,
|
|
912
|
-
onPointerUp,
|
|
913
|
-
onPointerCancel,
|
|
914
|
-
offsetX: offsetXRef.current,
|
|
915
|
-
isSwiping: isSwipingRef.current
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
var init_useSwipeGesture = __esm({
|
|
919
|
-
"hooks/useSwipeGesture.ts"() {
|
|
920
|
-
"use client";
|
|
921
|
-
}
|
|
922
|
-
});
|
|
923
|
-
function useLongPress(onLongPress, options = {}) {
|
|
924
|
-
const { duration = 500, moveThreshold = 10 } = options;
|
|
925
|
-
const timerRef = React84.useRef(null);
|
|
926
|
-
const startPos = React84.useRef({ x: 0, y: 0 });
|
|
927
|
-
const isPressedRef = React84.useRef(false);
|
|
928
|
-
const firedRef = React84.useRef(false);
|
|
929
|
-
const cancel = React84.useCallback(() => {
|
|
930
|
-
if (timerRef.current) {
|
|
931
|
-
clearTimeout(timerRef.current);
|
|
932
|
-
timerRef.current = null;
|
|
933
|
-
}
|
|
934
|
-
isPressedRef.current = false;
|
|
935
|
-
}, []);
|
|
936
|
-
const onPointerDown = React84.useCallback((e) => {
|
|
937
|
-
firedRef.current = false;
|
|
938
|
-
startPos.current = { x: e.clientX, y: e.clientY };
|
|
939
|
-
isPressedRef.current = true;
|
|
940
|
-
timerRef.current = setTimeout(() => {
|
|
941
|
-
firedRef.current = true;
|
|
942
|
-
isPressedRef.current = false;
|
|
943
|
-
onLongPress();
|
|
944
|
-
}, duration);
|
|
945
|
-
}, [duration, onLongPress]);
|
|
946
|
-
const onPointerMove = React84.useCallback((e) => {
|
|
947
|
-
if (!isPressedRef.current) return;
|
|
948
|
-
const dx = e.clientX - startPos.current.x;
|
|
949
|
-
const dy = e.clientY - startPos.current.y;
|
|
950
|
-
if (Math.sqrt(dx * dx + dy * dy) > moveThreshold) {
|
|
951
|
-
cancel();
|
|
952
|
-
}
|
|
953
|
-
}, [moveThreshold, cancel]);
|
|
954
|
-
const onPointerUp = React84.useCallback(() => {
|
|
955
|
-
cancel();
|
|
956
|
-
}, [cancel]);
|
|
957
|
-
const onPointerCancel = React84.useCallback(() => {
|
|
958
|
-
cancel();
|
|
959
|
-
}, [cancel]);
|
|
960
|
-
return {
|
|
961
|
-
onPointerDown,
|
|
962
|
-
onPointerMove,
|
|
963
|
-
onPointerUp,
|
|
964
|
-
onPointerCancel,
|
|
965
|
-
isPressed: isPressedRef.current
|
|
966
|
-
};
|
|
967
|
-
}
|
|
968
|
-
var init_useLongPress = __esm({
|
|
969
|
-
"hooks/useLongPress.ts"() {
|
|
970
|
-
"use client";
|
|
971
|
-
}
|
|
972
|
-
});
|
|
973
|
-
function useDragReorder(initialItems, onReorder) {
|
|
974
|
-
const [items, setItems] = React84.useState(initialItems);
|
|
975
|
-
const [dragIndex, setDragIndex] = React84.useState(-1);
|
|
976
|
-
const [dragOverIndex, setDragOverIndex] = React84.useState(-1);
|
|
977
|
-
const itemsRef = React84.useRef(initialItems);
|
|
978
|
-
if (initialItems !== itemsRef.current) {
|
|
979
|
-
itemsRef.current = initialItems;
|
|
980
|
-
setItems(initialItems);
|
|
981
|
-
}
|
|
982
|
-
const isDragging = dragIndex >= 0;
|
|
983
|
-
const handleDragStart = React84.useCallback((index) => (e) => {
|
|
984
|
-
e.preventDefault();
|
|
985
|
-
setDragIndex(index);
|
|
986
|
-
setDragOverIndex(index);
|
|
987
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
988
|
-
}, []);
|
|
989
|
-
const handleDragMove = React84.useCallback((index) => (e) => {
|
|
990
|
-
if (dragIndex < 0) return;
|
|
991
|
-
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
992
|
-
if (!target) return;
|
|
993
|
-
let el = target;
|
|
994
|
-
while (el && !el.dataset.dragIndex) {
|
|
995
|
-
el = el.parentElement;
|
|
996
|
-
}
|
|
997
|
-
if (el?.dataset.dragIndex) {
|
|
998
|
-
const overIndex = parseInt(el.dataset.dragIndex, 10);
|
|
999
|
-
if (!isNaN(overIndex) && overIndex !== dragOverIndex) {
|
|
1000
|
-
setDragOverIndex(overIndex);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
}, [dragIndex, dragOverIndex]);
|
|
1004
|
-
const handleDragEnd = React84.useCallback(() => {
|
|
1005
|
-
if (dragIndex >= 0 && dragOverIndex >= 0 && dragIndex !== dragOverIndex) {
|
|
1006
|
-
const newItems = [...items];
|
|
1007
|
-
const [movedItem] = newItems.splice(dragIndex, 1);
|
|
1008
|
-
newItems.splice(dragOverIndex, 0, movedItem);
|
|
1009
|
-
setItems(newItems);
|
|
1010
|
-
onReorder(dragIndex, dragOverIndex, items[dragIndex]);
|
|
1011
|
-
}
|
|
1012
|
-
setDragIndex(-1);
|
|
1013
|
-
setDragOverIndex(-1);
|
|
1014
|
-
}, [dragIndex, dragOverIndex, items, onReorder]);
|
|
1015
|
-
const getDragHandleProps = React84.useCallback((index) => ({
|
|
1016
|
-
onPointerDown: handleDragStart(index),
|
|
1017
|
-
style: { cursor: "grab", touchAction: "none" },
|
|
1018
|
-
"aria-grabbed": dragIndex === index,
|
|
1019
|
-
role: "button"
|
|
1020
|
-
}), [handleDragStart, dragIndex]);
|
|
1021
|
-
const getItemProps = React84.useCallback((index) => ({
|
|
1022
|
-
onPointerMove: handleDragMove(index),
|
|
1023
|
-
onPointerUp: handleDragEnd,
|
|
1024
|
-
"aria-dropeffect": "move",
|
|
1025
|
-
"data-drag-index": String(index),
|
|
1026
|
-
style: {
|
|
1027
|
-
opacity: dragIndex === index ? 0.5 : 1,
|
|
1028
|
-
transition: isDragging ? "transform 150ms ease" : void 0,
|
|
1029
|
-
transform: isDragging && dragOverIndex >= 0 ? index === dragIndex ? "scale(1.02)" : index > dragIndex && index <= dragOverIndex ? "translateY(-100%)" : index < dragIndex && index >= dragOverIndex ? "translateY(100%)" : void 0 : void 0
|
|
1030
|
-
}
|
|
1031
|
-
}), [handleDragMove, handleDragEnd, dragIndex, dragOverIndex, isDragging]);
|
|
1032
|
-
return {
|
|
1033
|
-
items,
|
|
1034
|
-
dragIndex,
|
|
1035
|
-
dragOverIndex,
|
|
1036
|
-
isDragging,
|
|
1037
|
-
getDragHandleProps,
|
|
1038
|
-
getItemProps
|
|
1039
|
-
};
|
|
1040
|
-
}
|
|
1041
|
-
var init_useDragReorder = __esm({
|
|
1042
|
-
"hooks/useDragReorder.ts"() {
|
|
1043
|
-
"use client";
|
|
1044
|
-
}
|
|
1045
|
-
});
|
|
1046
|
-
function useInfiniteScroll(onLoadMore, options = {}) {
|
|
1047
|
-
const { rootMargin = "200px", hasMore = true, isLoading = false } = options;
|
|
1048
|
-
const observerRef = React84.useRef(null);
|
|
1049
|
-
const callbackRef = React84.useRef(onLoadMore);
|
|
1050
|
-
callbackRef.current = onLoadMore;
|
|
1051
|
-
const hasMoreRef = React84.useRef(hasMore);
|
|
1052
|
-
hasMoreRef.current = hasMore;
|
|
1053
|
-
const isLoadingRef = React84.useRef(isLoading);
|
|
1054
|
-
isLoadingRef.current = isLoading;
|
|
1055
|
-
React84.useEffect(() => {
|
|
1056
|
-
return () => {
|
|
1057
|
-
observerRef.current?.disconnect();
|
|
1058
|
-
};
|
|
1059
|
-
}, []);
|
|
1060
|
-
const sentinelRef = React84.useCallback((node) => {
|
|
1061
|
-
observerRef.current?.disconnect();
|
|
1062
|
-
if (!node) return;
|
|
1063
|
-
observerRef.current = new IntersectionObserver(
|
|
1064
|
-
(entries) => {
|
|
1065
|
-
const entry = entries[0];
|
|
1066
|
-
if (entry.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
|
|
1067
|
-
callbackRef.current();
|
|
1068
|
-
}
|
|
1069
|
-
},
|
|
1070
|
-
{ rootMargin }
|
|
1071
|
-
);
|
|
1072
|
-
observerRef.current.observe(node);
|
|
1073
|
-
}, [rootMargin]);
|
|
1074
|
-
return { sentinelRef };
|
|
1075
|
-
}
|
|
1076
|
-
var init_useInfiniteScroll = __esm({
|
|
1077
|
-
"hooks/useInfiniteScroll.ts"() {
|
|
1078
|
-
"use client";
|
|
1079
|
-
}
|
|
1080
|
-
});
|
|
1081
|
-
function usePullToRefresh(onRefresh, options = {}) {
|
|
1082
|
-
const { threshold = 60, maxPull = 120 } = options;
|
|
1083
|
-
const [pullDistance, setPullDistance] = React84.useState(0);
|
|
1084
|
-
const [isPulling, setIsPulling] = React84.useState(false);
|
|
1085
|
-
const [isRefreshing, setIsRefreshing] = React84.useState(false);
|
|
1086
|
-
const startY = React84.useRef(0);
|
|
1087
|
-
const scrollTopRef = React84.useRef(0);
|
|
1088
|
-
const onTouchStart = React84.useCallback((e) => {
|
|
1089
|
-
const container = e.currentTarget;
|
|
1090
|
-
scrollTopRef.current = container.scrollTop;
|
|
1091
|
-
if (scrollTopRef.current <= 0) {
|
|
1092
|
-
startY.current = e.touches[0].clientY;
|
|
1093
|
-
setIsPulling(true);
|
|
1094
|
-
}
|
|
1095
|
-
}, []);
|
|
1096
|
-
const onTouchMove = React84.useCallback((e) => {
|
|
1097
|
-
if (!isPulling || isRefreshing) return;
|
|
1098
|
-
const container = e.currentTarget;
|
|
1099
|
-
if (container.scrollTop > 0) {
|
|
1100
|
-
setPullDistance(0);
|
|
1101
|
-
return;
|
|
1102
|
-
}
|
|
1103
|
-
const dy = e.touches[0].clientY - startY.current;
|
|
1104
|
-
if (dy > 0) {
|
|
1105
|
-
const distance = Math.min(dy * 0.5, maxPull);
|
|
1106
|
-
setPullDistance(distance);
|
|
1107
|
-
}
|
|
1108
|
-
}, [isPulling, isRefreshing, maxPull]);
|
|
1109
|
-
const onTouchEnd = React84.useCallback(() => {
|
|
1110
|
-
if (!isPulling) return;
|
|
1111
|
-
setIsPulling(false);
|
|
1112
|
-
if (pullDistance >= threshold && !isRefreshing) {
|
|
1113
|
-
setIsRefreshing(true);
|
|
1114
|
-
setPullDistance(threshold);
|
|
1115
|
-
onRefresh();
|
|
1116
|
-
} else {
|
|
1117
|
-
setPullDistance(0);
|
|
1118
|
-
}
|
|
1119
|
-
}, [isPulling, pullDistance, threshold, isRefreshing, onRefresh]);
|
|
1120
|
-
const endRefresh = React84.useCallback(() => {
|
|
1121
|
-
setIsRefreshing(false);
|
|
1122
|
-
setPullDistance(0);
|
|
1123
|
-
}, []);
|
|
1124
|
-
const containerProps = {
|
|
1125
|
-
onTouchStart,
|
|
1126
|
-
onTouchMove,
|
|
1127
|
-
onTouchEnd,
|
|
1128
|
-
style: {
|
|
1129
|
-
transform: pullDistance > 0 ? `translateY(${pullDistance}px)` : void 0,
|
|
1130
|
-
transition: isPulling ? "none" : "transform 300ms ease-out"
|
|
1131
|
-
}
|
|
1132
|
-
};
|
|
1133
|
-
return {
|
|
1134
|
-
pullDistance,
|
|
1135
|
-
isPulling,
|
|
1136
|
-
isRefreshing,
|
|
1137
|
-
containerProps,
|
|
1138
|
-
endRefresh
|
|
1139
|
-
};
|
|
1140
|
-
}
|
|
1141
|
-
var init_usePullToRefresh = __esm({
|
|
1142
|
-
"hooks/usePullToRefresh.ts"() {
|
|
1143
|
-
"use client";
|
|
1144
|
-
}
|
|
1145
|
-
});
|
|
1146
|
-
function EntitySchemaProvider({
|
|
1147
|
-
entities,
|
|
1148
|
-
traitLinkedEntities,
|
|
1149
|
-
orbitalsByTrait,
|
|
1150
|
-
children
|
|
1151
|
-
}) {
|
|
1152
|
-
const entitiesMap = React84.useMemo(() => {
|
|
1153
|
-
const map = /* @__PURE__ */ new Map();
|
|
1154
|
-
for (const entity of entities) {
|
|
1155
|
-
map.set(entity.name, entity);
|
|
1156
|
-
}
|
|
1157
|
-
return map;
|
|
1158
|
-
}, [entities]);
|
|
1159
|
-
const linkedMap = React84.useMemo(() => {
|
|
1160
|
-
return traitLinkedEntities ?? /* @__PURE__ */ new Map();
|
|
1161
|
-
}, [traitLinkedEntities]);
|
|
1162
|
-
const orbitalsMap = React84.useMemo(() => {
|
|
1163
|
-
return orbitalsByTrait ?? /* @__PURE__ */ new Map();
|
|
1164
|
-
}, [orbitalsByTrait]);
|
|
1165
|
-
const contextValue = React84.useMemo(
|
|
1166
|
-
() => ({
|
|
1167
|
-
entities: entitiesMap,
|
|
1168
|
-
traitLinkedEntities: linkedMap,
|
|
1169
|
-
orbitalsByTrait: orbitalsMap
|
|
1170
|
-
}),
|
|
1171
|
-
[entitiesMap, linkedMap, orbitalsMap]
|
|
1172
|
-
);
|
|
1173
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EntitySchemaContext.Provider, { value: contextValue, children });
|
|
1174
|
-
}
|
|
1175
|
-
function useEntitySchema() {
|
|
1176
|
-
const context = React84.useContext(EntitySchemaContext);
|
|
1177
|
-
if (!context) {
|
|
1178
|
-
throw new Error("useEntitySchema must be used within an EntitySchemaProvider");
|
|
1179
|
-
}
|
|
1180
|
-
return context;
|
|
1181
|
-
}
|
|
1182
|
-
function useEntityDefinition(entityName) {
|
|
1183
|
-
const { entities } = useEntitySchema();
|
|
1184
|
-
return entities.get(entityName);
|
|
1185
|
-
}
|
|
1186
|
-
function useEntitySchemaOptional() {
|
|
1187
|
-
return React84.useContext(EntitySchemaContext);
|
|
1188
|
-
}
|
|
1189
|
-
var EntitySchemaContext;
|
|
1190
|
-
var init_EntitySchemaContext = __esm({
|
|
1191
|
-
"runtime/EntitySchemaContext.tsx"() {
|
|
1192
|
-
EntitySchemaContext = React84.createContext(null);
|
|
1193
|
-
}
|
|
1194
|
-
});
|
|
1195
|
-
function cn(...inputs) {
|
|
1196
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
1197
|
-
}
|
|
1198
|
-
var init_cn = __esm({
|
|
1199
|
-
"lib/cn.ts"() {
|
|
1200
|
-
}
|
|
1201
|
-
});
|
|
1202
337
|
var paddingStyles, paddingXStyles, paddingYStyles, marginStyles, marginXStyles, marginYStyles, bgStyles, roundedStyles, shadowStyles, displayStyles, overflowStyles, positionStyles, Box;
|
|
1203
338
|
var init_Box = __esm({
|
|
1204
339
|
"components/core/atoms/Box.tsx"() {
|
|
@@ -2570,7 +1705,6 @@ var init_Modal = __esm({
|
|
|
2570
1705
|
init_Overlay();
|
|
2571
1706
|
init_cn();
|
|
2572
1707
|
init_useEventBus();
|
|
2573
|
-
init_useTranslate();
|
|
2574
1708
|
sizeClasses2 = {
|
|
2575
1709
|
sm: "max-w-md",
|
|
2576
1710
|
md: "max-w-2xl",
|
|
@@ -2608,7 +1742,7 @@ var init_Modal = __esm({
|
|
|
2608
1742
|
look = "centered-card"
|
|
2609
1743
|
}) => {
|
|
2610
1744
|
const eventBus = useEventBus();
|
|
2611
|
-
const { t } = useTranslate();
|
|
1745
|
+
const { t } = hooks.useTranslate();
|
|
2612
1746
|
const modalRef = React84.useRef(null);
|
|
2613
1747
|
const previousActiveElement = React84.useRef(null);
|
|
2614
1748
|
const [dragY, setDragY] = React84.useState(0);
|
|
@@ -2792,7 +1926,6 @@ var init_Drawer = __esm({
|
|
|
2792
1926
|
init_Overlay();
|
|
2793
1927
|
init_cn();
|
|
2794
1928
|
init_useEventBus();
|
|
2795
|
-
init_useTranslate();
|
|
2796
1929
|
sizeWidths = {
|
|
2797
1930
|
sm: "w-full sm:w-80",
|
|
2798
1931
|
// 320px
|
|
@@ -2818,7 +1951,7 @@ var init_Drawer = __esm({
|
|
|
2818
1951
|
closeEvent
|
|
2819
1952
|
}) => {
|
|
2820
1953
|
const eventBus = useEventBus();
|
|
2821
|
-
const { t } = useTranslate();
|
|
1954
|
+
const { t } = hooks.useTranslate();
|
|
2822
1955
|
const drawerRef = React84.useRef(null);
|
|
2823
1956
|
const previousActiveElement = React84.useRef(null);
|
|
2824
1957
|
React84.useEffect(() => {
|
|
@@ -3065,7 +2198,6 @@ var init_Toast = __esm({
|
|
|
3065
2198
|
init_Badge();
|
|
3066
2199
|
init_cn();
|
|
3067
2200
|
init_useEventBus();
|
|
3068
|
-
init_useTranslate();
|
|
3069
2201
|
variantClasses = {
|
|
3070
2202
|
success: "bg-card border-[length:var(--border-width)] border-success",
|
|
3071
2203
|
error: "bg-card border-[length:var(--border-width)] border-error",
|
|
@@ -3099,7 +2231,7 @@ var init_Toast = __esm({
|
|
|
3099
2231
|
actionEvent
|
|
3100
2232
|
}) => {
|
|
3101
2233
|
const eventBus = useEventBus();
|
|
3102
|
-
const { t } = useTranslate();
|
|
2234
|
+
const { t } = hooks.useTranslate();
|
|
3103
2235
|
const handleDismiss = () => {
|
|
3104
2236
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
3105
2237
|
onDismiss?.();
|
|
@@ -4027,7 +3159,6 @@ var init_Input = __esm({
|
|
|
4027
3159
|
"components/core/atoms/Input.tsx"() {
|
|
4028
3160
|
init_cn();
|
|
4029
3161
|
init_Icon();
|
|
4030
|
-
init_useTranslate();
|
|
4031
3162
|
Input = React84__namespace.default.forwardRef(
|
|
4032
3163
|
({
|
|
4033
3164
|
className,
|
|
@@ -4045,7 +3176,7 @@ var init_Input = __esm({
|
|
|
4045
3176
|
onChange,
|
|
4046
3177
|
...props
|
|
4047
3178
|
}, ref) => {
|
|
4048
|
-
const { t } = useTranslate();
|
|
3179
|
+
const { t } = hooks.useTranslate();
|
|
4049
3180
|
const type = inputType || htmlType || "text";
|
|
4050
3181
|
const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
|
|
4051
3182
|
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-icon-default w-icon-default" });
|
|
@@ -4411,7 +3542,6 @@ var init_FilterPill = __esm({
|
|
|
4411
3542
|
"components/core/atoms/FilterPill.tsx"() {
|
|
4412
3543
|
init_cn();
|
|
4413
3544
|
init_useEventBus();
|
|
4414
|
-
init_useTranslate();
|
|
4415
3545
|
init_Icon();
|
|
4416
3546
|
variantStyles5 = {
|
|
4417
3547
|
default: [
|
|
@@ -4467,7 +3597,7 @@ var init_FilterPill = __esm({
|
|
|
4467
3597
|
...props
|
|
4468
3598
|
}, ref) => {
|
|
4469
3599
|
const eventBus = useEventBus();
|
|
4470
|
-
const { t } = useTranslate();
|
|
3600
|
+
const { t } = hooks.useTranslate();
|
|
4471
3601
|
const payloadLabel = typeof children === "string" || typeof children === "number" ? children : label;
|
|
4472
3602
|
const handleClick = React84.useCallback(() => {
|
|
4473
3603
|
onClick?.();
|
|
@@ -5798,7 +4928,6 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5798
4928
|
init_Typography();
|
|
5799
4929
|
init_Divider();
|
|
5800
4930
|
init_cn();
|
|
5801
|
-
init_useTranslate();
|
|
5802
4931
|
positionStyles2 = {
|
|
5803
4932
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5804
4933
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5817,7 +4946,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5817
4946
|
position = "top",
|
|
5818
4947
|
className
|
|
5819
4948
|
}) => {
|
|
5820
|
-
const { t } = useTranslate();
|
|
4949
|
+
const { t } = hooks.useTranslate();
|
|
5821
4950
|
const [isVisible, setIsVisible] = React84__namespace.default.useState(false);
|
|
5822
4951
|
const timeoutRef = React84__namespace.default.useRef(null);
|
|
5823
4952
|
const handleMouseEnter = () => {
|
|
@@ -6409,6 +5538,41 @@ var init_AnimatedCounter = __esm({
|
|
|
6409
5538
|
AnimatedCounter.displayName = "AnimatedCounter";
|
|
6410
5539
|
}
|
|
6411
5540
|
});
|
|
5541
|
+
function useInfiniteScroll(onLoadMore, options = {}) {
|
|
5542
|
+
const { rootMargin = "200px", hasMore = true, isLoading = false } = options;
|
|
5543
|
+
const observerRef = React84.useRef(null);
|
|
5544
|
+
const callbackRef = React84.useRef(onLoadMore);
|
|
5545
|
+
callbackRef.current = onLoadMore;
|
|
5546
|
+
const hasMoreRef = React84.useRef(hasMore);
|
|
5547
|
+
hasMoreRef.current = hasMore;
|
|
5548
|
+
const isLoadingRef = React84.useRef(isLoading);
|
|
5549
|
+
isLoadingRef.current = isLoading;
|
|
5550
|
+
React84.useEffect(() => {
|
|
5551
|
+
return () => {
|
|
5552
|
+
observerRef.current?.disconnect();
|
|
5553
|
+
};
|
|
5554
|
+
}, []);
|
|
5555
|
+
const sentinelRef = React84.useCallback((node) => {
|
|
5556
|
+
observerRef.current?.disconnect();
|
|
5557
|
+
if (!node) return;
|
|
5558
|
+
observerRef.current = new IntersectionObserver(
|
|
5559
|
+
(entries) => {
|
|
5560
|
+
const entry = entries[0];
|
|
5561
|
+
if (entry.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
|
|
5562
|
+
callbackRef.current();
|
|
5563
|
+
}
|
|
5564
|
+
},
|
|
5565
|
+
{ rootMargin }
|
|
5566
|
+
);
|
|
5567
|
+
observerRef.current.observe(node);
|
|
5568
|
+
}, [rootMargin]);
|
|
5569
|
+
return { sentinelRef };
|
|
5570
|
+
}
|
|
5571
|
+
var init_useInfiniteScroll = __esm({
|
|
5572
|
+
"hooks/useInfiniteScroll.ts"() {
|
|
5573
|
+
"use client";
|
|
5574
|
+
}
|
|
5575
|
+
});
|
|
6412
5576
|
var InfiniteScrollSentinel;
|
|
6413
5577
|
var init_InfiniteScrollSentinel = __esm({
|
|
6414
5578
|
"components/core/atoms/InfiniteScrollSentinel.tsx"() {
|
|
@@ -8757,7 +7921,6 @@ var init_ErrorState = __esm({
|
|
|
8757
7921
|
init_Typography();
|
|
8758
7922
|
init_Icon();
|
|
8759
7923
|
init_useEventBus();
|
|
8760
|
-
init_useTranslate();
|
|
8761
7924
|
ErrorState = ({
|
|
8762
7925
|
title,
|
|
8763
7926
|
message,
|
|
@@ -8767,7 +7930,7 @@ var init_ErrorState = __esm({
|
|
|
8767
7930
|
retryEvent
|
|
8768
7931
|
}) => {
|
|
8769
7932
|
const eventBus = useEventBus();
|
|
8770
|
-
const { t } = useTranslate();
|
|
7933
|
+
const { t } = hooks.useTranslate();
|
|
8771
7934
|
const handleRetry = () => {
|
|
8772
7935
|
if (retryEvent) eventBus.emit(`UI:${retryEvent}`, {});
|
|
8773
7936
|
onRetry?.();
|
|
@@ -8800,9 +7963,8 @@ var init_ErrorBoundary = __esm({
|
|
|
8800
7963
|
"use client";
|
|
8801
7964
|
init_cn();
|
|
8802
7965
|
init_ErrorState();
|
|
8803
|
-
init_useTranslate();
|
|
8804
7966
|
DefaultFallback = ({ error, onRetry }) => {
|
|
8805
|
-
const { t } = useTranslate();
|
|
7967
|
+
const { t } = hooks.useTranslate();
|
|
8806
7968
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8807
7969
|
ErrorState,
|
|
8808
7970
|
{
|
|
@@ -8929,7 +8091,7 @@ function Skeleton({
|
|
|
8929
8091
|
fields,
|
|
8930
8092
|
className
|
|
8931
8093
|
}) {
|
|
8932
|
-
const { t: _t } = useTranslate();
|
|
8094
|
+
const { t: _t } = hooks.useTranslate();
|
|
8933
8095
|
switch (variant) {
|
|
8934
8096
|
case "header":
|
|
8935
8097
|
return /* @__PURE__ */ jsxRuntime.jsx(HeaderSkeleton, { className });
|
|
@@ -8950,7 +8112,6 @@ var init_Skeleton = __esm({
|
|
|
8950
8112
|
"components/core/molecules/Skeleton.tsx"() {
|
|
8951
8113
|
"use client";
|
|
8952
8114
|
init_cn();
|
|
8953
|
-
init_useTranslate();
|
|
8954
8115
|
init_Box();
|
|
8955
8116
|
init_Stack();
|
|
8956
8117
|
init_Stack();
|
|
@@ -9627,7 +8788,6 @@ var AboutPageTemplate;
|
|
|
9627
8788
|
var init_AboutPageTemplate = __esm({
|
|
9628
8789
|
"components/marketing/templates/AboutPageTemplate.tsx"() {
|
|
9629
8790
|
init_cn();
|
|
9630
|
-
init_useTranslate();
|
|
9631
8791
|
init_Stack();
|
|
9632
8792
|
init_Box();
|
|
9633
8793
|
init_Typography();
|
|
@@ -9643,7 +8803,7 @@ var init_AboutPageTemplate = __esm({
|
|
|
9643
8803
|
entity,
|
|
9644
8804
|
className
|
|
9645
8805
|
}) => {
|
|
9646
|
-
const { t } = useTranslate();
|
|
8806
|
+
const { t } = hooks.useTranslate();
|
|
9647
8807
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
9648
8808
|
if (!resolved) return null;
|
|
9649
8809
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -9732,7 +8892,6 @@ var init_Alert = __esm({
|
|
|
9732
8892
|
init_Icon();
|
|
9733
8893
|
init_Typography();
|
|
9734
8894
|
init_useEventBus();
|
|
9735
|
-
init_useTranslate();
|
|
9736
8895
|
variantBorderClasses = {
|
|
9737
8896
|
info: "border-info",
|
|
9738
8897
|
success: "border-success",
|
|
@@ -9764,7 +8923,7 @@ var init_Alert = __esm({
|
|
|
9764
8923
|
dismissEvent
|
|
9765
8924
|
}) => {
|
|
9766
8925
|
const eventBus = useEventBus();
|
|
9767
|
-
const { t } = useTranslate();
|
|
8926
|
+
const { t } = hooks.useTranslate();
|
|
9768
8927
|
const handleDismissCallback = onDismiss || onClose;
|
|
9769
8928
|
const handleDismiss = () => {
|
|
9770
8929
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
@@ -10092,7 +9251,6 @@ var init_Menu = __esm({
|
|
|
10092
9251
|
init_Badge();
|
|
10093
9252
|
init_cn();
|
|
10094
9253
|
init_useEventBus();
|
|
10095
|
-
init_useTranslate();
|
|
10096
9254
|
Menu = ({
|
|
10097
9255
|
trigger,
|
|
10098
9256
|
items,
|
|
@@ -10100,7 +9258,7 @@ var init_Menu = __esm({
|
|
|
10100
9258
|
className
|
|
10101
9259
|
}) => {
|
|
10102
9260
|
const eventBus = useEventBus();
|
|
10103
|
-
const { t } = useTranslate();
|
|
9261
|
+
const { t, direction } = hooks.useTranslate();
|
|
10104
9262
|
const [isOpen, setIsOpen] = React84.useState(false);
|
|
10105
9263
|
const [activeSubMenu, setActiveSubMenu] = React84.useState(null);
|
|
10106
9264
|
const [triggerRect, setTriggerRect] = React84.useState(null);
|
|
@@ -10154,6 +9312,18 @@ var init_Menu = __esm({
|
|
|
10154
9312
|
"bottom-start": "top-full left-0 mt-2",
|
|
10155
9313
|
"bottom-end": "top-full right-0 mt-2"
|
|
10156
9314
|
};
|
|
9315
|
+
const rtlMirror = {
|
|
9316
|
+
"top-left": "top-right",
|
|
9317
|
+
"top-right": "top-left",
|
|
9318
|
+
"bottom-left": "bottom-right",
|
|
9319
|
+
"bottom-right": "bottom-left",
|
|
9320
|
+
"top-start": "top-end",
|
|
9321
|
+
"top-end": "top-start",
|
|
9322
|
+
"bottom-start": "bottom-end",
|
|
9323
|
+
"bottom-end": "bottom-start"
|
|
9324
|
+
};
|
|
9325
|
+
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
9326
|
+
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
10157
9327
|
const triggerChild = React84__namespace.default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
10158
9328
|
const triggerElement = React84__namespace.default.cloneElement(
|
|
10159
9329
|
triggerChild,
|
|
@@ -10181,7 +9351,7 @@ var init_Menu = __esm({
|
|
|
10181
9351
|
onMouseEnter: () => hasSubMenu && setActiveSubMenu(itemId),
|
|
10182
9352
|
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
10183
9353
|
className: cn(
|
|
10184
|
-
"w-full flex items-center justify-between gap-3 px-4 py-2 text-
|
|
9354
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
10185
9355
|
"text-sm transition-colors",
|
|
10186
9356
|
"hover:bg-muted",
|
|
10187
9357
|
"focus:outline-none focus:bg-muted",
|
|
@@ -10200,7 +9370,7 @@ var init_Menu = __esm({
|
|
|
10200
9370
|
}
|
|
10201
9371
|
),
|
|
10202
9372
|
item.badge !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
10203
|
-
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
9373
|
+
hasSubMenu && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: direction === "rtl" ? "chevron-left" : "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
10204
9374
|
] })
|
|
10205
9375
|
},
|
|
10206
9376
|
itemId
|
|
@@ -10220,7 +9390,8 @@ var init_Menu = __esm({
|
|
|
10220
9390
|
Box,
|
|
10221
9391
|
{
|
|
10222
9392
|
className: cn(
|
|
10223
|
-
"absolute
|
|
9393
|
+
"absolute top-0 z-50",
|
|
9394
|
+
subMenuSideClass,
|
|
10224
9395
|
menuContainerStyles
|
|
10225
9396
|
),
|
|
10226
9397
|
children: renderMenuItems(item.subMenu)
|
|
@@ -10238,12 +9409,12 @@ var init_Menu = __esm({
|
|
|
10238
9409
|
className: cn(
|
|
10239
9410
|
"absolute z-50",
|
|
10240
9411
|
menuContainerStyles,
|
|
10241
|
-
positionClasses3[
|
|
9412
|
+
positionClasses3[effectivePosition],
|
|
10242
9413
|
className
|
|
10243
9414
|
),
|
|
10244
9415
|
style: {
|
|
10245
|
-
left:
|
|
10246
|
-
right:
|
|
9416
|
+
left: effectivePosition.includes("left") ? 0 : "auto",
|
|
9417
|
+
right: effectivePosition.includes("right") ? 0 : "auto"
|
|
10247
9418
|
},
|
|
10248
9419
|
role: "menu",
|
|
10249
9420
|
children: renderMenuItems(items)
|
|
@@ -10380,7 +9551,6 @@ var init_FloatingActionButton = __esm({
|
|
|
10380
9551
|
init_Typography();
|
|
10381
9552
|
init_cn();
|
|
10382
9553
|
init_useEventBus();
|
|
10383
|
-
init_useTranslate();
|
|
10384
9554
|
FloatingActionButton = ({
|
|
10385
9555
|
action,
|
|
10386
9556
|
actionPayload,
|
|
@@ -10393,7 +9563,7 @@ var init_FloatingActionButton = __esm({
|
|
|
10393
9563
|
className
|
|
10394
9564
|
}) => {
|
|
10395
9565
|
const eventBus = useEventBus();
|
|
10396
|
-
const { t } = useTranslate();
|
|
9566
|
+
const { t } = hooks.useTranslate();
|
|
10397
9567
|
const resolvedAction = icon ? {
|
|
10398
9568
|
icon,
|
|
10399
9569
|
onClick: () => {
|
|
@@ -10564,7 +9734,7 @@ var init_MapView = __esm({
|
|
|
10564
9734
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
10565
9735
|
const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback113, useState: useState103 } = React84__namespace.default;
|
|
10566
9736
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
10567
|
-
const { useEventBus:
|
|
9737
|
+
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
10568
9738
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
10569
9739
|
const map = useMap();
|
|
10570
9740
|
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
@@ -10606,7 +9776,7 @@ var init_MapView = __esm({
|
|
|
10606
9776
|
className,
|
|
10607
9777
|
showAttribution = true
|
|
10608
9778
|
}) {
|
|
10609
|
-
const eventBus =
|
|
9779
|
+
const eventBus = useEventBus3();
|
|
10610
9780
|
const [clickedPosition, setClickedPosition] = useState103(null);
|
|
10611
9781
|
const handleMapClick = useCallback113((lat, lng) => {
|
|
10612
9782
|
if (showClickedPin) {
|
|
@@ -11263,7 +10433,7 @@ function ActionTile({
|
|
|
11263
10433
|
categoryColors,
|
|
11264
10434
|
className
|
|
11265
10435
|
}) {
|
|
11266
|
-
useTranslate();
|
|
10436
|
+
hooks.useTranslate();
|
|
11267
10437
|
const config = SIZE_CONFIG[size];
|
|
11268
10438
|
const catColor = categoryColors?.[action.category];
|
|
11269
10439
|
const handleDragStart = React84.useCallback((e) => {
|
|
@@ -11302,7 +10472,6 @@ var init_ActionTile = __esm({
|
|
|
11302
10472
|
"components/game/organisms/puzzles/sequencer/ActionTile.tsx"() {
|
|
11303
10473
|
init_atoms2();
|
|
11304
10474
|
init_cn();
|
|
11305
|
-
init_useTranslate();
|
|
11306
10475
|
DRAG_MIME = "application/x-almadar-slot-item";
|
|
11307
10476
|
SIZE_CONFIG = {
|
|
11308
10477
|
sm: { px: "px-2 py-1", icon: "text-lg", text: "text-xs" },
|
|
@@ -11321,7 +10490,7 @@ function ActionPalette({
|
|
|
11321
10490
|
label,
|
|
11322
10491
|
className
|
|
11323
10492
|
}) {
|
|
11324
|
-
const { t } = useTranslate();
|
|
10493
|
+
const { t } = hooks.useTranslate();
|
|
11325
10494
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
11326
10495
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: label ?? t("sequencer.actions") }),
|
|
11327
10496
|
/* @__PURE__ */ jsxRuntime.jsx(HStack, { className: "flex-wrap", gap: "sm", children: (actions ?? []).map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11340,7 +10509,6 @@ var init_ActionPalette = __esm({
|
|
|
11340
10509
|
"components/game/organisms/puzzles/sequencer/ActionPalette.tsx"() {
|
|
11341
10510
|
init_atoms2();
|
|
11342
10511
|
init_cn();
|
|
11343
|
-
init_useTranslate();
|
|
11344
10512
|
init_ActionTile();
|
|
11345
10513
|
ActionPalette.displayName = "ActionPalette";
|
|
11346
10514
|
}
|
|
@@ -11350,7 +10518,6 @@ var init_AuthLayout = __esm({
|
|
|
11350
10518
|
"components/core/templates/AuthLayout.tsx"() {
|
|
11351
10519
|
"use client";
|
|
11352
10520
|
init_cn();
|
|
11353
|
-
init_useTranslate();
|
|
11354
10521
|
init_Box();
|
|
11355
10522
|
init_Stack();
|
|
11356
10523
|
init_Typography();
|
|
@@ -11361,7 +10528,7 @@ var init_AuthLayout = __esm({
|
|
|
11361
10528
|
showBranding = true,
|
|
11362
10529
|
brandingContent
|
|
11363
10530
|
}) => {
|
|
11364
|
-
const { t } = useTranslate();
|
|
10531
|
+
const { t } = hooks.useTranslate();
|
|
11365
10532
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "min-h-screen flex", children: [
|
|
11366
10533
|
showBranding && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11367
10534
|
VStack,
|
|
@@ -11495,13 +10662,12 @@ var init_LoadingState = __esm({
|
|
|
11495
10662
|
init_atoms2();
|
|
11496
10663
|
init_Stack();
|
|
11497
10664
|
init_Typography();
|
|
11498
|
-
init_useTranslate();
|
|
11499
10665
|
LoadingState = ({
|
|
11500
10666
|
title,
|
|
11501
10667
|
message,
|
|
11502
10668
|
className
|
|
11503
10669
|
}) => {
|
|
11504
|
-
const { t } = useTranslate();
|
|
10670
|
+
const { t } = hooks.useTranslate();
|
|
11505
10671
|
const displayMessage = message ?? t("common.loading");
|
|
11506
10672
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11507
10673
|
VStack,
|
|
@@ -11983,7 +11149,7 @@ function IsometricCanvas({
|
|
|
11983
11149
|
const unitsProp = Array.isArray(_unitsPropRaw) ? _unitsPropRaw : [];
|
|
11984
11150
|
const featuresProp = Array.isArray(_featuresPropRaw) ? _featuresPropRaw : [];
|
|
11985
11151
|
const eventBus = useEventBus();
|
|
11986
|
-
const { t } = useTranslate();
|
|
11152
|
+
const { t } = hooks.useTranslate();
|
|
11987
11153
|
const canvasRef = React84.useRef(null);
|
|
11988
11154
|
const containerRef = React84.useRef(null);
|
|
11989
11155
|
const minimapRef = React84.useRef(null);
|
|
@@ -12679,7 +11845,6 @@ var init_IsometricCanvas = __esm({
|
|
|
12679
11845
|
"use client";
|
|
12680
11846
|
init_cn();
|
|
12681
11847
|
init_useEventBus();
|
|
12682
|
-
init_useTranslate();
|
|
12683
11848
|
init_Box();
|
|
12684
11849
|
init_Stack();
|
|
12685
11850
|
init_Icon();
|
|
@@ -12739,7 +11904,7 @@ function BattleBoard({
|
|
|
12739
11904
|
const currentTurn = entity.turn;
|
|
12740
11905
|
const gameResult = entity.gameResult;
|
|
12741
11906
|
const eventBus = useEventBus();
|
|
12742
|
-
const { t } = useTranslate();
|
|
11907
|
+
const { t } = hooks.useTranslate();
|
|
12743
11908
|
const [hoveredTile, setHoveredTile] = React84.useState(null);
|
|
12744
11909
|
const [isShaking, setIsShaking] = React84.useState(false);
|
|
12745
11910
|
const selectedUnit = React84.useMemo(
|
|
@@ -13043,7 +12208,6 @@ var init_BattleBoard = __esm({
|
|
|
13043
12208
|
"use client";
|
|
13044
12209
|
init_cn();
|
|
13045
12210
|
init_useEventBus();
|
|
13046
|
-
init_useTranslate();
|
|
13047
12211
|
init_Box();
|
|
13048
12212
|
init_Button();
|
|
13049
12213
|
init_Typography();
|
|
@@ -13803,7 +12967,6 @@ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13803
12967
|
var init_BehaviorView = __esm({
|
|
13804
12968
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13805
12969
|
"use client";
|
|
13806
|
-
init_useTranslate();
|
|
13807
12970
|
init_AvlState();
|
|
13808
12971
|
init_AvlTransitionLane();
|
|
13809
12972
|
init_AvlSwimLane();
|
|
@@ -13813,7 +12976,7 @@ var init_BehaviorView = __esm({
|
|
|
13813
12976
|
SWIM_GUTTER = 120;
|
|
13814
12977
|
CENTER_W = 360;
|
|
13815
12978
|
BehaviorView = ({ data }) => {
|
|
13816
|
-
const { t } = useTranslate();
|
|
12979
|
+
const { t } = hooks.useTranslate();
|
|
13817
12980
|
const [layout, setLayout] = React84.useState(null);
|
|
13818
12981
|
const traitName = data.traits[0]?.name;
|
|
13819
12982
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -13918,14 +13081,13 @@ var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
|
13918
13081
|
var init_ScaledDiagram = __esm({
|
|
13919
13082
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
13920
13083
|
init_Box();
|
|
13921
|
-
init_useTranslate();
|
|
13922
13084
|
init_cn();
|
|
13923
13085
|
MIN_DIAGRAM_WIDTH = 200;
|
|
13924
13086
|
ScaledDiagram = ({
|
|
13925
13087
|
children,
|
|
13926
13088
|
className
|
|
13927
13089
|
}) => {
|
|
13928
|
-
const { t: _t } = useTranslate();
|
|
13090
|
+
const { t: _t } = hooks.useTranslate();
|
|
13929
13091
|
const wrapperRef = React84.useRef(null);
|
|
13930
13092
|
const contentRef = React84.useRef(null);
|
|
13931
13093
|
const [layout, setLayout] = React84.useState(null);
|
|
@@ -14061,7 +13223,6 @@ var init_CodeBlock = __esm({
|
|
|
14061
13223
|
init_Textarea();
|
|
14062
13224
|
init_Icon();
|
|
14063
13225
|
init_useEventBus();
|
|
14064
|
-
init_useTranslate();
|
|
14065
13226
|
SyntaxHighlighter__default.default.registerLanguage("json", langJson__default.default);
|
|
14066
13227
|
SyntaxHighlighter__default.default.registerLanguage("javascript", langJavascript__default.default);
|
|
14067
13228
|
SyntaxHighlighter__default.default.registerLanguage("js", langJavascript__default.default);
|
|
@@ -14150,7 +13311,7 @@ var init_CodeBlock = __esm({
|
|
|
14150
13311
|
const isLolo = language === "lolo";
|
|
14151
13312
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark__default.default;
|
|
14152
13313
|
const eventBus = useEventBus();
|
|
14153
|
-
const { t } = useTranslate();
|
|
13314
|
+
const { t } = hooks.useTranslate();
|
|
14154
13315
|
const scrollRef = React84.useRef(null);
|
|
14155
13316
|
const codeRef = React84.useRef(null);
|
|
14156
13317
|
const savedScrollLeftRef = React84.useRef(0);
|
|
@@ -14568,11 +13729,10 @@ var init_MarkdownContent = __esm({
|
|
|
14568
13729
|
init_katex_min();
|
|
14569
13730
|
init_Box();
|
|
14570
13731
|
init_CodeBlock();
|
|
14571
|
-
init_useTranslate();
|
|
14572
13732
|
init_cn();
|
|
14573
13733
|
MarkdownContent = React84__namespace.default.memo(
|
|
14574
13734
|
({ content, direction, className }) => {
|
|
14575
|
-
const { t: _t } = useTranslate();
|
|
13735
|
+
const { t: _t } = hooks.useTranslate();
|
|
14576
13736
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
14577
13737
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14578
13738
|
Box,
|
|
@@ -14735,6 +13895,56 @@ var init_MarkdownContent = __esm({
|
|
|
14735
13895
|
MarkdownContent.displayName = "MarkdownContent";
|
|
14736
13896
|
}
|
|
14737
13897
|
});
|
|
13898
|
+
function useLongPress(onLongPress, options = {}) {
|
|
13899
|
+
const { duration = 500, moveThreshold = 10 } = options;
|
|
13900
|
+
const timerRef = React84.useRef(null);
|
|
13901
|
+
const startPos = React84.useRef({ x: 0, y: 0 });
|
|
13902
|
+
const isPressedRef = React84.useRef(false);
|
|
13903
|
+
const firedRef = React84.useRef(false);
|
|
13904
|
+
const cancel = React84.useCallback(() => {
|
|
13905
|
+
if (timerRef.current) {
|
|
13906
|
+
clearTimeout(timerRef.current);
|
|
13907
|
+
timerRef.current = null;
|
|
13908
|
+
}
|
|
13909
|
+
isPressedRef.current = false;
|
|
13910
|
+
}, []);
|
|
13911
|
+
const onPointerDown = React84.useCallback((e) => {
|
|
13912
|
+
firedRef.current = false;
|
|
13913
|
+
startPos.current = { x: e.clientX, y: e.clientY };
|
|
13914
|
+
isPressedRef.current = true;
|
|
13915
|
+
timerRef.current = setTimeout(() => {
|
|
13916
|
+
firedRef.current = true;
|
|
13917
|
+
isPressedRef.current = false;
|
|
13918
|
+
onLongPress();
|
|
13919
|
+
}, duration);
|
|
13920
|
+
}, [duration, onLongPress]);
|
|
13921
|
+
const onPointerMove = React84.useCallback((e) => {
|
|
13922
|
+
if (!isPressedRef.current) return;
|
|
13923
|
+
const dx = e.clientX - startPos.current.x;
|
|
13924
|
+
const dy = e.clientY - startPos.current.y;
|
|
13925
|
+
if (Math.sqrt(dx * dx + dy * dy) > moveThreshold) {
|
|
13926
|
+
cancel();
|
|
13927
|
+
}
|
|
13928
|
+
}, [moveThreshold, cancel]);
|
|
13929
|
+
const onPointerUp = React84.useCallback(() => {
|
|
13930
|
+
cancel();
|
|
13931
|
+
}, [cancel]);
|
|
13932
|
+
const onPointerCancel = React84.useCallback(() => {
|
|
13933
|
+
cancel();
|
|
13934
|
+
}, [cancel]);
|
|
13935
|
+
return {
|
|
13936
|
+
onPointerDown,
|
|
13937
|
+
onPointerMove,
|
|
13938
|
+
onPointerUp,
|
|
13939
|
+
onPointerCancel,
|
|
13940
|
+
isPressed: isPressedRef.current
|
|
13941
|
+
};
|
|
13942
|
+
}
|
|
13943
|
+
var init_useLongPress = __esm({
|
|
13944
|
+
"hooks/useLongPress.ts"() {
|
|
13945
|
+
"use client";
|
|
13946
|
+
}
|
|
13947
|
+
});
|
|
14738
13948
|
function Card2({
|
|
14739
13949
|
title,
|
|
14740
13950
|
subtitle,
|
|
@@ -14748,7 +13958,7 @@ function Card2({
|
|
|
14748
13958
|
longPressPayload
|
|
14749
13959
|
}) {
|
|
14750
13960
|
const eventBus = useEventBus();
|
|
14751
|
-
const { t } = useTranslate();
|
|
13961
|
+
const { t } = hooks.useTranslate();
|
|
14752
13962
|
const isClickable = !!onClick || !!action;
|
|
14753
13963
|
const handleLongPress = React84.useCallback(() => {
|
|
14754
13964
|
if (longPressEvent) {
|
|
@@ -14823,7 +14033,6 @@ var init_Card2 = __esm({
|
|
|
14823
14033
|
"components/core/molecules/Card.tsx"() {
|
|
14824
14034
|
"use client";
|
|
14825
14035
|
init_useEventBus();
|
|
14826
|
-
init_useTranslate();
|
|
14827
14036
|
init_useLongPress();
|
|
14828
14037
|
Card2.displayName = "Card";
|
|
14829
14038
|
}
|
|
@@ -14837,14 +14046,13 @@ var init_QuizBlock = __esm({
|
|
|
14837
14046
|
init_Button();
|
|
14838
14047
|
init_Icon();
|
|
14839
14048
|
init_Box();
|
|
14840
|
-
init_useTranslate();
|
|
14841
14049
|
init_cn();
|
|
14842
14050
|
QuizBlock = ({
|
|
14843
14051
|
question,
|
|
14844
14052
|
answer,
|
|
14845
14053
|
className
|
|
14846
14054
|
}) => {
|
|
14847
|
-
const { t } = useTranslate();
|
|
14055
|
+
const { t } = hooks.useTranslate();
|
|
14848
14056
|
const [revealed, setRevealed] = React84.useState(false);
|
|
14849
14057
|
return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-blue-200 dark:border-blue-800", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", className: "p-4", children: [
|
|
14850
14058
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
@@ -14880,11 +14088,10 @@ var init_StateMachineView = __esm({
|
|
|
14880
14088
|
init_Typography();
|
|
14881
14089
|
init_Button();
|
|
14882
14090
|
init_Icon();
|
|
14883
|
-
init_useTranslate();
|
|
14884
14091
|
init_useEventBus();
|
|
14885
14092
|
init_cn();
|
|
14886
14093
|
StateNode = ({ state, config }) => {
|
|
14887
|
-
const { t } = useTranslate();
|
|
14094
|
+
const { t } = hooks.useTranslate();
|
|
14888
14095
|
const size = state.radius * 2;
|
|
14889
14096
|
let borderColor = config.colors.nodeBorder;
|
|
14890
14097
|
let borderWidth = 2;
|
|
@@ -14991,7 +14198,7 @@ var init_StateMachineView = __esm({
|
|
|
14991
14198
|
);
|
|
14992
14199
|
};
|
|
14993
14200
|
TransitionBundleArrow = ({ bundle, states, bundleIndex, config, onClick, onHover }) => {
|
|
14994
|
-
const { t } = useTranslate();
|
|
14201
|
+
const { t } = hooks.useTranslate();
|
|
14995
14202
|
const groupRef = React84.useRef(null);
|
|
14996
14203
|
const fromState = states.find((s) => s.name === bundle.from);
|
|
14997
14204
|
const toState = states.find((s) => s.name === bundle.to);
|
|
@@ -15241,7 +14448,7 @@ var init_StateMachineView = __esm({
|
|
|
15241
14448
|
);
|
|
15242
14449
|
};
|
|
15243
14450
|
BundleTooltip = ({ tooltip, config }) => {
|
|
15244
|
-
const { t } = useTranslate();
|
|
14451
|
+
const { t } = hooks.useTranslate();
|
|
15245
14452
|
if (!tooltip.visible || !tooltip.bundle) return null;
|
|
15246
14453
|
const { bundle } = tooltip;
|
|
15247
14454
|
const isSingle = bundle.labels.length === 1;
|
|
@@ -15393,7 +14600,7 @@ var init_StateMachineView = __esm({
|
|
|
15393
14600
|
);
|
|
15394
14601
|
};
|
|
15395
14602
|
EntityBox = ({ entity, config }) => {
|
|
15396
|
-
const { t } = useTranslate();
|
|
14603
|
+
const { t } = hooks.useTranslate();
|
|
15397
14604
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15398
14605
|
VStack,
|
|
15399
14606
|
{
|
|
@@ -15434,7 +14641,7 @@ var init_StateMachineView = __esm({
|
|
|
15434
14641
|
);
|
|
15435
14642
|
};
|
|
15436
14643
|
OutputsBox = ({ outputs, config }) => {
|
|
15437
|
-
const { t } = useTranslate();
|
|
14644
|
+
const { t } = hooks.useTranslate();
|
|
15438
14645
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15439
14646
|
VStack,
|
|
15440
14647
|
{
|
|
@@ -15476,7 +14683,7 @@ var init_StateMachineView = __esm({
|
|
|
15476
14683
|
);
|
|
15477
14684
|
};
|
|
15478
14685
|
Legend = ({ config, y }) => {
|
|
15479
|
-
const { t } = useTranslate();
|
|
14686
|
+
const { t } = hooks.useTranslate();
|
|
15480
14687
|
const items = [
|
|
15481
14688
|
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
15482
14689
|
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
@@ -15520,7 +14727,7 @@ var init_StateMachineView = __esm({
|
|
|
15520
14727
|
isLoading: _isLoading,
|
|
15521
14728
|
error: _error
|
|
15522
14729
|
}) => {
|
|
15523
|
-
const { t } = useTranslate();
|
|
14730
|
+
const { t } = hooks.useTranslate();
|
|
15524
14731
|
const [tooltip, setTooltip] = React84.useState({
|
|
15525
14732
|
visible: false,
|
|
15526
14733
|
pinned: false,
|
|
@@ -16247,7 +15454,6 @@ var init_JazariStateMachine = __esm({
|
|
|
16247
15454
|
init_StateMachineView();
|
|
16248
15455
|
init_visualizer();
|
|
16249
15456
|
init_svg_paths();
|
|
16250
|
-
init_useTranslate();
|
|
16251
15457
|
init_cn();
|
|
16252
15458
|
JAZARI_VISUALIZER_CONFIG = {
|
|
16253
15459
|
...DEFAULT_CONFIG,
|
|
@@ -16283,7 +15489,7 @@ var init_JazariStateMachine = __esm({
|
|
|
16283
15489
|
isLoading = false,
|
|
16284
15490
|
error = null
|
|
16285
15491
|
}) => {
|
|
16286
|
-
const { t } = useTranslate();
|
|
15492
|
+
const { t } = hooks.useTranslate();
|
|
16287
15493
|
const resolvedTrait = React84.useMemo(
|
|
16288
15494
|
() => extractTrait(schema, traitProp, traitIndex),
|
|
16289
15495
|
[schema, traitProp, traitIndex]
|
|
@@ -16403,7 +15609,6 @@ var init_ContentRenderer = __esm({
|
|
|
16403
15609
|
init_ScaledDiagram();
|
|
16404
15610
|
init_JazariStateMachine();
|
|
16405
15611
|
init_parseContentSegments();
|
|
16406
|
-
init_useTranslate();
|
|
16407
15612
|
init_cn();
|
|
16408
15613
|
ContentRenderer = ({
|
|
16409
15614
|
content,
|
|
@@ -16411,7 +15616,7 @@ var init_ContentRenderer = __esm({
|
|
|
16411
15616
|
direction,
|
|
16412
15617
|
className
|
|
16413
15618
|
}) => {
|
|
16414
|
-
const { t: _t } = useTranslate();
|
|
15619
|
+
const { t: _t } = hooks.useTranslate();
|
|
16415
15620
|
const segments = React84.useMemo(
|
|
16416
15621
|
() => segmentsProp ?? parseContentSegments(content),
|
|
16417
15622
|
[segmentsProp, content]
|
|
@@ -16497,14 +15702,13 @@ var init_BookChapterView = __esm({
|
|
|
16497
15702
|
init_ScaledDiagram();
|
|
16498
15703
|
init_ContentRenderer();
|
|
16499
15704
|
init_JazariStateMachine();
|
|
16500
|
-
init_useTranslate();
|
|
16501
15705
|
init_cn();
|
|
16502
15706
|
BookChapterView = ({
|
|
16503
15707
|
chapter,
|
|
16504
15708
|
direction,
|
|
16505
15709
|
className
|
|
16506
15710
|
}) => {
|
|
16507
|
-
const { t: _t } = useTranslate();
|
|
15711
|
+
const { t: _t } = hooks.useTranslate();
|
|
16508
15712
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16509
15713
|
VStack,
|
|
16510
15714
|
{
|
|
@@ -16536,7 +15740,6 @@ var init_BookCoverPage = __esm({
|
|
|
16536
15740
|
init_Typography();
|
|
16537
15741
|
init_Button();
|
|
16538
15742
|
init_Box();
|
|
16539
|
-
init_useTranslate();
|
|
16540
15743
|
init_cn();
|
|
16541
15744
|
BookCoverPage = ({
|
|
16542
15745
|
title,
|
|
@@ -16546,7 +15749,7 @@ var init_BookCoverPage = __esm({
|
|
|
16546
15749
|
direction,
|
|
16547
15750
|
className
|
|
16548
15751
|
}) => {
|
|
16549
|
-
const { t } = useTranslate();
|
|
15752
|
+
const { t } = hooks.useTranslate();
|
|
16550
15753
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16551
15754
|
VStack,
|
|
16552
15755
|
{
|
|
@@ -16616,7 +15819,6 @@ var init_BookNavBar = __esm({
|
|
|
16616
15819
|
init_Typography();
|
|
16617
15820
|
init_ProgressBar();
|
|
16618
15821
|
init_Box();
|
|
16619
|
-
init_useTranslate();
|
|
16620
15822
|
init_cn();
|
|
16621
15823
|
BookNavBar = ({
|
|
16622
15824
|
currentPage,
|
|
@@ -16625,7 +15827,7 @@ var init_BookNavBar = __esm({
|
|
|
16625
15827
|
direction,
|
|
16626
15828
|
className
|
|
16627
15829
|
}) => {
|
|
16628
|
-
const { t } = useTranslate();
|
|
15830
|
+
const { t } = hooks.useTranslate();
|
|
16629
15831
|
const isRtl = direction === "rtl";
|
|
16630
15832
|
const progress = totalPages > 1 ? currentPage / (totalPages - 1) * 100 : 0;
|
|
16631
15833
|
const PrevIcon = isRtl ? LucideIcons2.ChevronRight : LucideIcons2.ChevronLeft;
|
|
@@ -16718,7 +15920,6 @@ var init_BookTableOfContents = __esm({
|
|
|
16718
15920
|
init_Button();
|
|
16719
15921
|
init_Box();
|
|
16720
15922
|
init_Badge();
|
|
16721
|
-
init_useTranslate();
|
|
16722
15923
|
init_cn();
|
|
16723
15924
|
BookTableOfContents = ({
|
|
16724
15925
|
parts,
|
|
@@ -16726,7 +15927,7 @@ var init_BookTableOfContents = __esm({
|
|
|
16726
15927
|
direction,
|
|
16727
15928
|
className
|
|
16728
15929
|
}) => {
|
|
16729
|
-
const { t } = useTranslate();
|
|
15930
|
+
const { t } = hooks.useTranslate();
|
|
16730
15931
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16731
15932
|
VStack,
|
|
16732
15933
|
{
|
|
@@ -16778,7 +15979,6 @@ var init_EmptyState = __esm({
|
|
|
16778
15979
|
init_Stack();
|
|
16779
15980
|
init_Typography();
|
|
16780
15981
|
init_useEventBus();
|
|
16781
|
-
init_useTranslate();
|
|
16782
15982
|
ICON_NAME_ALIASES = {
|
|
16783
15983
|
check: "check-circle",
|
|
16784
15984
|
error: "x-circle",
|
|
@@ -16804,7 +16004,7 @@ var init_EmptyState = __esm({
|
|
|
16804
16004
|
look = "icon-only"
|
|
16805
16005
|
}) => {
|
|
16806
16006
|
const eventBus = useEventBus();
|
|
16807
|
-
const { t } = useTranslate();
|
|
16007
|
+
const { t } = hooks.useTranslate();
|
|
16808
16008
|
const handleAction = () => {
|
|
16809
16009
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
16810
16010
|
onAction?.();
|
|
@@ -16949,7 +16149,6 @@ var init_BookViewer = __esm({
|
|
|
16949
16149
|
init_Box();
|
|
16950
16150
|
init_Stack();
|
|
16951
16151
|
init_useEventBus();
|
|
16952
|
-
init_useTranslate();
|
|
16953
16152
|
init_cn();
|
|
16954
16153
|
init_BookCoverPage();
|
|
16955
16154
|
init_BookTableOfContents();
|
|
@@ -16975,7 +16174,7 @@ var init_BookViewer = __esm({
|
|
|
16975
16174
|
className
|
|
16976
16175
|
}) => {
|
|
16977
16176
|
const eventBus = useEventBus();
|
|
16978
|
-
const { t } = useTranslate();
|
|
16177
|
+
const { t } = hooks.useTranslate();
|
|
16979
16178
|
const [currentPage, setCurrentPage] = React84.useState(initialPage);
|
|
16980
16179
|
const resolvedFieldMap = React84.useMemo(() => resolveFieldMap(fieldMap), [fieldMap]);
|
|
16981
16180
|
const book = React84.useMemo(() => {
|
|
@@ -17381,7 +16580,6 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17381
16580
|
init_FilterPill();
|
|
17382
16581
|
init_Box();
|
|
17383
16582
|
init_useEventBus();
|
|
17384
|
-
init_useTranslate();
|
|
17385
16583
|
init_cn();
|
|
17386
16584
|
END_OF_SURVEY = "end-of-survey";
|
|
17387
16585
|
RuleRow = ({
|
|
@@ -17392,7 +16590,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17392
16590
|
onChange,
|
|
17393
16591
|
onDelete
|
|
17394
16592
|
}) => {
|
|
17395
|
-
const { t } = useTranslate();
|
|
16593
|
+
const { t } = hooks.useTranslate();
|
|
17396
16594
|
const operatorOptions = React84.useMemo(
|
|
17397
16595
|
() => [
|
|
17398
16596
|
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
@@ -17567,7 +16765,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17567
16765
|
NODE_GAP_Y = 80;
|
|
17568
16766
|
PADDING = 32;
|
|
17569
16767
|
LogicGraph = ({ questions, rules }) => {
|
|
17570
|
-
const { t } = useTranslate();
|
|
16768
|
+
const { t } = hooks.useTranslate();
|
|
17571
16769
|
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17572
16770
|
const layout = React84.useMemo(() => {
|
|
17573
16771
|
const items = [
|
|
@@ -17699,7 +16897,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17699
16897
|
readOnly = false,
|
|
17700
16898
|
className
|
|
17701
16899
|
}) => {
|
|
17702
|
-
const { t } = useTranslate();
|
|
16900
|
+
const { t } = hooks.useTranslate();
|
|
17703
16901
|
const eventBus = useEventBus();
|
|
17704
16902
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17705
16903
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17834,7 +17032,6 @@ var init_Breadcrumb = __esm({
|
|
|
17834
17032
|
init_Typography();
|
|
17835
17033
|
init_cn();
|
|
17836
17034
|
init_useEventBus();
|
|
17837
|
-
init_useTranslate();
|
|
17838
17035
|
Breadcrumb = ({
|
|
17839
17036
|
items,
|
|
17840
17037
|
separator = "chevron-right",
|
|
@@ -17842,7 +17039,7 @@ var init_Breadcrumb = __esm({
|
|
|
17842
17039
|
className
|
|
17843
17040
|
}) => {
|
|
17844
17041
|
const eventBus = useEventBus();
|
|
17845
|
-
const { t } = useTranslate();
|
|
17042
|
+
const { t } = hooks.useTranslate();
|
|
17846
17043
|
const displayItems = maxItems && items.length > maxItems ? [
|
|
17847
17044
|
...items.slice(0, 1),
|
|
17848
17045
|
{ label: "...", isCurrent: false },
|
|
@@ -17921,7 +17118,7 @@ function BuilderBoard({
|
|
|
17921
17118
|
className
|
|
17922
17119
|
}) {
|
|
17923
17120
|
const { emit } = useEventBus();
|
|
17924
|
-
const { t } = useTranslate();
|
|
17121
|
+
const { t } = hooks.useTranslate();
|
|
17925
17122
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
17926
17123
|
const [placements, setPlacements] = React84.useState({});
|
|
17927
17124
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -18070,7 +17267,6 @@ var init_BuilderBoard = __esm({
|
|
|
18070
17267
|
"components/game/organisms/puzzles/builder/BuilderBoard.tsx"() {
|
|
18071
17268
|
init_atoms2();
|
|
18072
17269
|
init_useEventBus();
|
|
18073
|
-
init_useTranslate();
|
|
18074
17270
|
BuilderBoard.displayName = "BuilderBoard";
|
|
18075
17271
|
}
|
|
18076
17272
|
});
|
|
@@ -18197,6 +17393,73 @@ var init_ButtonGroup = __esm({
|
|
|
18197
17393
|
ButtonGroup.displayName = "ButtonGroup";
|
|
18198
17394
|
}
|
|
18199
17395
|
});
|
|
17396
|
+
function useSwipeGesture(callbacks, options = {}) {
|
|
17397
|
+
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
17398
|
+
const startX = React84.useRef(0);
|
|
17399
|
+
const startY = React84.useRef(0);
|
|
17400
|
+
const startTime = React84.useRef(0);
|
|
17401
|
+
const currentX = React84.useRef(0);
|
|
17402
|
+
const tracking = React84.useRef(false);
|
|
17403
|
+
const offsetXRef = React84.useRef(0);
|
|
17404
|
+
const isSwipingRef = React84.useRef(false);
|
|
17405
|
+
const onPointerDown = React84.useCallback((e) => {
|
|
17406
|
+
startX.current = e.clientX;
|
|
17407
|
+
startY.current = e.clientY;
|
|
17408
|
+
currentX.current = e.clientX;
|
|
17409
|
+
startTime.current = Date.now();
|
|
17410
|
+
tracking.current = true;
|
|
17411
|
+
isSwipingRef.current = false;
|
|
17412
|
+
offsetXRef.current = 0;
|
|
17413
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
17414
|
+
}, []);
|
|
17415
|
+
const onPointerMove = React84.useCallback((e) => {
|
|
17416
|
+
if (!tracking.current) return;
|
|
17417
|
+
if (preventDefault) e.preventDefault();
|
|
17418
|
+
currentX.current = e.clientX;
|
|
17419
|
+
const dx = e.clientX - startX.current;
|
|
17420
|
+
const dy = e.clientY - startY.current;
|
|
17421
|
+
if (Math.abs(dx) > 10 && Math.abs(dx) > Math.abs(dy)) {
|
|
17422
|
+
isSwipingRef.current = true;
|
|
17423
|
+
offsetXRef.current = dx;
|
|
17424
|
+
}
|
|
17425
|
+
}, [preventDefault]);
|
|
17426
|
+
const onPointerUp = React84.useCallback((e) => {
|
|
17427
|
+
if (!tracking.current) return;
|
|
17428
|
+
tracking.current = false;
|
|
17429
|
+
const dx = e.clientX - startX.current;
|
|
17430
|
+
const dy = e.clientY - startY.current;
|
|
17431
|
+
const elapsed = Date.now() - startTime.current;
|
|
17432
|
+
const velocity = Math.abs(dx) / Math.max(elapsed, 1);
|
|
17433
|
+
offsetXRef.current = 0;
|
|
17434
|
+
isSwipingRef.current = false;
|
|
17435
|
+
if (Math.abs(dx) < threshold && velocity < velocityThreshold) return;
|
|
17436
|
+
if (Math.abs(dx) > Math.abs(dy)) {
|
|
17437
|
+
if (dx < -threshold) callbacks.onSwipeLeft?.();
|
|
17438
|
+
else if (dx > threshold) callbacks.onSwipeRight?.();
|
|
17439
|
+
} else {
|
|
17440
|
+
if (dy < -threshold) callbacks.onSwipeUp?.();
|
|
17441
|
+
else if (dy > threshold) callbacks.onSwipeDown?.();
|
|
17442
|
+
}
|
|
17443
|
+
}, [threshold, velocityThreshold, callbacks]);
|
|
17444
|
+
const onPointerCancel = React84.useCallback(() => {
|
|
17445
|
+
tracking.current = false;
|
|
17446
|
+
offsetXRef.current = 0;
|
|
17447
|
+
isSwipingRef.current = false;
|
|
17448
|
+
}, []);
|
|
17449
|
+
return {
|
|
17450
|
+
onPointerDown,
|
|
17451
|
+
onPointerMove,
|
|
17452
|
+
onPointerUp,
|
|
17453
|
+
onPointerCancel,
|
|
17454
|
+
offsetX: offsetXRef.current,
|
|
17455
|
+
isSwiping: isSwipingRef.current
|
|
17456
|
+
};
|
|
17457
|
+
}
|
|
17458
|
+
var init_useSwipeGesture = __esm({
|
|
17459
|
+
"hooks/useSwipeGesture.ts"() {
|
|
17460
|
+
"use client";
|
|
17461
|
+
}
|
|
17462
|
+
});
|
|
18200
17463
|
function dayWindowForViewport(width) {
|
|
18201
17464
|
if (width <= 640) return 1;
|
|
18202
17465
|
if (width <= 1024) return 3;
|
|
@@ -18271,7 +17534,7 @@ function CalendarGrid({
|
|
|
18271
17534
|
}) {
|
|
18272
17535
|
const evs = Array.isArray(events2) ? events2 : events2 ? [events2] : [];
|
|
18273
17536
|
const eventBus = useEventBus();
|
|
18274
|
-
const { t } = useTranslate();
|
|
17537
|
+
const { t } = hooks.useTranslate();
|
|
18275
17538
|
const longPressTimer = React84.useRef(null);
|
|
18276
17539
|
const resolvedWeekStart = React84.useMemo(
|
|
18277
17540
|
() => weekStart ? getStartOfWeek(weekStart) : getStartOfWeek(/* @__PURE__ */ new Date()),
|
|
@@ -18481,7 +17744,6 @@ var init_CalendarGrid = __esm({
|
|
|
18481
17744
|
init_TimeSlotCell();
|
|
18482
17745
|
init_useEventBus();
|
|
18483
17746
|
init_useSwipeGesture();
|
|
18484
|
-
init_useTranslate();
|
|
18485
17747
|
SHORT_DATE = { month: "short", day: "numeric" };
|
|
18486
17748
|
CalendarGrid.displayName = "CalendarGrid";
|
|
18487
17749
|
}
|
|
@@ -19790,7 +19052,6 @@ var init_Pagination = __esm({
|
|
|
19790
19052
|
init_Stack();
|
|
19791
19053
|
init_cn();
|
|
19792
19054
|
init_useEventBus();
|
|
19793
|
-
init_useTranslate();
|
|
19794
19055
|
Pagination = ({
|
|
19795
19056
|
currentPage,
|
|
19796
19057
|
totalPages,
|
|
@@ -19809,7 +19070,7 @@ var init_Pagination = __esm({
|
|
|
19809
19070
|
pageSizeChangeEvent
|
|
19810
19071
|
}) => {
|
|
19811
19072
|
const eventBus = useEventBus();
|
|
19812
|
-
const { t } = useTranslate();
|
|
19073
|
+
const { t } = hooks.useTranslate();
|
|
19813
19074
|
const [jumpToPage, setJumpToPage] = React84.useState("");
|
|
19814
19075
|
const handlePageChange = (page) => {
|
|
19815
19076
|
if (pageChangeEvent) eventBus.emit(`UI:${pageChangeEvent}`, { page });
|
|
@@ -19994,7 +19255,6 @@ var init_CardGrid = __esm({
|
|
|
19994
19255
|
init_cn();
|
|
19995
19256
|
init_getNestedValue();
|
|
19996
19257
|
init_useEventBus();
|
|
19997
|
-
init_useTranslate();
|
|
19998
19258
|
init_atoms2();
|
|
19999
19259
|
init_Badge();
|
|
20000
19260
|
init_Box();
|
|
@@ -20038,7 +19298,7 @@ var init_CardGrid = __esm({
|
|
|
20038
19298
|
imageField
|
|
20039
19299
|
}) => {
|
|
20040
19300
|
const eventBus = useEventBus();
|
|
20041
|
-
const { t } = useTranslate();
|
|
19301
|
+
const { t } = hooks.useTranslate();
|
|
20042
19302
|
const effectiveFieldNames = normalizeFields(fields).length > 0 ? normalizeFields(fields) : fieldNames ?? normalizeFields(columns);
|
|
20043
19303
|
const gridTemplateColumns = `repeat(auto-fit, minmax(min(${minCardWidth}px, 100%), 1fr))`;
|
|
20044
19304
|
const normalizedData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -20223,7 +19483,6 @@ var init_Carousel = __esm({
|
|
|
20223
19483
|
init_cn();
|
|
20224
19484
|
init_useEventBus();
|
|
20225
19485
|
init_useSwipeGesture();
|
|
20226
|
-
init_useTranslate();
|
|
20227
19486
|
init_Box();
|
|
20228
19487
|
init_Stack();
|
|
20229
19488
|
init_Button();
|
|
@@ -20244,7 +19503,7 @@ var init_Carousel = __esm({
|
|
|
20244
19503
|
const scrollRef = React84.useRef(null);
|
|
20245
19504
|
const autoPlayRef = React84.useRef(null);
|
|
20246
19505
|
const eventBus = useSafeEventBus3();
|
|
20247
|
-
const { t } = useTranslate();
|
|
19506
|
+
const { t } = hooks.useTranslate();
|
|
20248
19507
|
const safeItems = items ?? [];
|
|
20249
19508
|
const totalSlides = safeItems.length;
|
|
20250
19509
|
const emitSlideChange = React84.useCallback(
|
|
@@ -20460,7 +19719,6 @@ var init_CaseStudyOrganism = __esm({
|
|
|
20460
19719
|
"use client";
|
|
20461
19720
|
init_cn();
|
|
20462
19721
|
init_useEventBus();
|
|
20463
|
-
init_useTranslate();
|
|
20464
19722
|
init_Stack();
|
|
20465
19723
|
init_Typography();
|
|
20466
19724
|
init_SimpleGrid();
|
|
@@ -20476,7 +19734,7 @@ var init_CaseStudyOrganism = __esm({
|
|
|
20476
19734
|
subtitle
|
|
20477
19735
|
}) => {
|
|
20478
19736
|
useEventBus();
|
|
20479
|
-
const { t } = useTranslate();
|
|
19737
|
+
const { t } = hooks.useTranslate();
|
|
20480
19738
|
const items = React84.useMemo(
|
|
20481
19739
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
20482
19740
|
[entity]
|
|
@@ -20665,7 +19923,6 @@ var init_Chart = __esm({
|
|
|
20665
19923
|
init_ErrorState();
|
|
20666
19924
|
init_EmptyState();
|
|
20667
19925
|
init_useEventBus();
|
|
20668
|
-
init_useTranslate();
|
|
20669
19926
|
CHART_COLORS = [
|
|
20670
19927
|
"var(--color-primary)",
|
|
20671
19928
|
"var(--color-success)",
|
|
@@ -21238,7 +20495,7 @@ var init_Chart = __esm({
|
|
|
21238
20495
|
}) => {
|
|
21239
20496
|
const resolvedLook = look ?? (chartType ? LOOK_FROM_CHART_TYPE[chartType] : "bar-vertical");
|
|
21240
20497
|
const eventBus = useEventBus();
|
|
21241
|
-
const { t } = useTranslate();
|
|
20498
|
+
const { t } = hooks.useTranslate();
|
|
21242
20499
|
const handleAction = React84.useCallback(
|
|
21243
20500
|
(action) => {
|
|
21244
20501
|
if (action.event) {
|
|
@@ -21435,7 +20692,7 @@ function ClassifierBoard({
|
|
|
21435
20692
|
className
|
|
21436
20693
|
}) {
|
|
21437
20694
|
const { emit } = useEventBus();
|
|
21438
|
-
const { t } = useTranslate();
|
|
20695
|
+
const { t } = hooks.useTranslate();
|
|
21439
20696
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
21440
20697
|
const [assignments, setAssignments] = React84.useState({});
|
|
21441
20698
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -21573,7 +20830,6 @@ var init_ClassifierBoard = __esm({
|
|
|
21573
20830
|
"components/game/organisms/puzzles/classifier/ClassifierBoard.tsx"() {
|
|
21574
20831
|
init_atoms2();
|
|
21575
20832
|
init_useEventBus();
|
|
21576
|
-
init_useTranslate();
|
|
21577
20833
|
ClassifierBoard.displayName = "ClassifierBoard";
|
|
21578
20834
|
}
|
|
21579
20835
|
});
|
|
@@ -21583,7 +20839,7 @@ function CodeView({
|
|
|
21583
20839
|
defaultExpanded = false,
|
|
21584
20840
|
className
|
|
21585
20841
|
}) {
|
|
21586
|
-
const { t } = useTranslate();
|
|
20842
|
+
const { t } = hooks.useTranslate();
|
|
21587
20843
|
const [expanded, setExpanded] = React84.useState(defaultExpanded);
|
|
21588
20844
|
const jsonString = JSON.stringify(data, null, 2);
|
|
21589
20845
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("rounded-lg border border-border overflow-hidden", className), gap: "none", children: [
|
|
@@ -21605,7 +20861,6 @@ var init_CodeView = __esm({
|
|
|
21605
20861
|
"components/game/organisms/puzzles/state-architect/CodeView.tsx"() {
|
|
21606
20862
|
init_atoms2();
|
|
21607
20863
|
init_cn();
|
|
21608
|
-
init_useTranslate();
|
|
21609
20864
|
CodeView.displayName = "CodeView";
|
|
21610
20865
|
}
|
|
21611
20866
|
});
|
|
@@ -21619,7 +20874,6 @@ var init_Tabs = __esm({
|
|
|
21619
20874
|
init_Box();
|
|
21620
20875
|
init_cn();
|
|
21621
20876
|
init_useEventBus();
|
|
21622
|
-
init_useTranslate();
|
|
21623
20877
|
Tabs = ({
|
|
21624
20878
|
items,
|
|
21625
20879
|
tabs,
|
|
@@ -21637,7 +20891,7 @@ var init_Tabs = __esm({
|
|
|
21637
20891
|
id: id || value || ""
|
|
21638
20892
|
}));
|
|
21639
20893
|
const eventBus = useEventBus();
|
|
21640
|
-
const { t } = useTranslate();
|
|
20894
|
+
const { t } = hooks.useTranslate();
|
|
21641
20895
|
const initialActive = safeItems.find((item) => item.active)?.id;
|
|
21642
20896
|
const [internalActiveTab, setInternalActiveTab] = React84.useState(
|
|
21643
20897
|
defaultActiveTab || initialActive || safeItems[0]?.id || ""
|
|
@@ -21796,7 +21050,6 @@ var init_CodeViewer = __esm({
|
|
|
21796
21050
|
init_EmptyState();
|
|
21797
21051
|
init_Tabs();
|
|
21798
21052
|
init_useEventBus();
|
|
21799
|
-
init_useTranslate();
|
|
21800
21053
|
DIFF_STYLES = {
|
|
21801
21054
|
add: {
|
|
21802
21055
|
bg: "bg-success/10",
|
|
@@ -21834,7 +21087,7 @@ var init_CodeViewer = __esm({
|
|
|
21834
21087
|
className
|
|
21835
21088
|
}) => {
|
|
21836
21089
|
const eventBus = useEventBus();
|
|
21837
|
-
const { t } = useTranslate();
|
|
21090
|
+
const { t } = hooks.useTranslate();
|
|
21838
21091
|
const [copied, setCopied] = React84.useState(false);
|
|
21839
21092
|
const [wrap, setWrap] = React84.useState(wordWrap);
|
|
21840
21093
|
const [activeFileIndex, setActiveFileIndex] = React84.useState(0);
|
|
@@ -22168,7 +21421,6 @@ var init_ConfirmDialog = __esm({
|
|
|
22168
21421
|
init_Box();
|
|
22169
21422
|
init_Stack();
|
|
22170
21423
|
init_cn();
|
|
22171
|
-
init_useTranslate();
|
|
22172
21424
|
variantConfig = {
|
|
22173
21425
|
danger: {
|
|
22174
21426
|
icon: LucideIcons2.Trash2,
|
|
@@ -22216,7 +21468,7 @@ var init_ConfirmDialog = __esm({
|
|
|
22216
21468
|
className
|
|
22217
21469
|
}) => {
|
|
22218
21470
|
const config = variantConfig[variant];
|
|
22219
|
-
const { t } = useTranslate();
|
|
21471
|
+
const { t } = hooks.useTranslate();
|
|
22220
21472
|
const resolvedMessage = message ?? description ?? "";
|
|
22221
21473
|
const resolvedConfirmText = confirmText ?? confirmLabel ?? t("dialog.confirm");
|
|
22222
21474
|
const resolvedCancelText = cancelText ?? cancelLabel ?? t("dialog.cancel");
|
|
@@ -22650,7 +21902,6 @@ var init_DashboardGrid = __esm({
|
|
|
22650
21902
|
"components/core/organisms/layout/DashboardGrid.tsx"() {
|
|
22651
21903
|
init_cn();
|
|
22652
21904
|
init_Box();
|
|
22653
|
-
init_useTranslate();
|
|
22654
21905
|
gapStyles5 = {
|
|
22655
21906
|
sm: "gap-2",
|
|
22656
21907
|
md: "gap-4",
|
|
@@ -22677,7 +21928,7 @@ var init_DashboardGrid = __esm({
|
|
|
22677
21928
|
cells,
|
|
22678
21929
|
className
|
|
22679
21930
|
}) => {
|
|
22680
|
-
const { t: _t } = useTranslate();
|
|
21931
|
+
const { t: _t } = hooks.useTranslate();
|
|
22681
21932
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22682
21933
|
Box,
|
|
22683
21934
|
{
|
|
@@ -22705,6 +21956,20 @@ var init_DashboardGrid = __esm({
|
|
|
22705
21956
|
DashboardGrid.displayName = "DashboardGrid";
|
|
22706
21957
|
}
|
|
22707
21958
|
});
|
|
21959
|
+
|
|
21960
|
+
// hooks/useAuthContext.ts
|
|
21961
|
+
function useAuthContext() {
|
|
21962
|
+
return {
|
|
21963
|
+
user: null,
|
|
21964
|
+
loading: false,
|
|
21965
|
+
signIn: void 0,
|
|
21966
|
+
signOut: void 0
|
|
21967
|
+
};
|
|
21968
|
+
}
|
|
21969
|
+
var init_useAuthContext = __esm({
|
|
21970
|
+
"hooks/useAuthContext.ts"() {
|
|
21971
|
+
}
|
|
21972
|
+
});
|
|
22708
21973
|
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
22709
21974
|
var init_CurrentPagePathContext = __esm({
|
|
22710
21975
|
"context/CurrentPagePathContext.tsx"() {
|
|
@@ -22730,7 +21995,6 @@ var init_DashboardLayout = __esm({
|
|
|
22730
21995
|
init_Icon();
|
|
22731
21996
|
init_useAuthContext();
|
|
22732
21997
|
init_useEventBus();
|
|
22733
|
-
init_useTranslate();
|
|
22734
21998
|
init_CurrentPagePathContext();
|
|
22735
21999
|
DashboardLayout = ({
|
|
22736
22000
|
appName = "{{APP_TITLE}}",
|
|
@@ -22789,7 +22053,7 @@ var init_DashboardLayout = __esm({
|
|
|
22789
22053
|
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
22790
22054
|
const { signOut: authSignOut } = useAuthContext();
|
|
22791
22055
|
const user = userProp || (null);
|
|
22792
|
-
const { t } = useTranslate();
|
|
22056
|
+
const { t } = hooks.useTranslate();
|
|
22793
22057
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
22794
22058
|
const showSidebar = layoutMode === "sidebar";
|
|
22795
22059
|
const showHeader = layoutMode !== "minimal";
|
|
@@ -23760,7 +23024,7 @@ function DataGrid({
|
|
|
23760
23024
|
look = "dense"
|
|
23761
23025
|
}) {
|
|
23762
23026
|
const eventBus = useEventBus();
|
|
23763
|
-
const { t } = useTranslate();
|
|
23027
|
+
const { t } = hooks.useTranslate();
|
|
23764
23028
|
const [selectedIds, setSelectedIds] = React84.useState(/* @__PURE__ */ new Set());
|
|
23765
23029
|
const [visibleCount, setVisibleCount] = React84.useState(pageSize || Infinity);
|
|
23766
23030
|
const fieldDefs = fields ?? columns ?? [];
|
|
@@ -24075,7 +23339,6 @@ var init_DataGrid = __esm({
|
|
|
24075
23339
|
init_cn();
|
|
24076
23340
|
init_getNestedValue();
|
|
24077
23341
|
init_useEventBus();
|
|
24078
|
-
init_useTranslate();
|
|
24079
23342
|
init_Box();
|
|
24080
23343
|
init_Stack();
|
|
24081
23344
|
init_Typography();
|
|
@@ -24200,7 +23463,7 @@ function DataList({
|
|
|
24200
23463
|
look = "dense"
|
|
24201
23464
|
}) {
|
|
24202
23465
|
const eventBus = useEventBus();
|
|
24203
|
-
const { t } = useTranslate();
|
|
23466
|
+
const { t } = hooks.useTranslate();
|
|
24204
23467
|
const [visibleCount, setVisibleCount] = React84__namespace.default.useState(pageSize || Infinity);
|
|
24205
23468
|
const fieldDefs = fields ?? columns ?? [];
|
|
24206
23469
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -24514,7 +23777,6 @@ var init_DataList = __esm({
|
|
|
24514
23777
|
init_cn();
|
|
24515
23778
|
init_getNestedValue();
|
|
24516
23779
|
init_useEventBus();
|
|
24517
|
-
init_useTranslate();
|
|
24518
23780
|
init_Box();
|
|
24519
23781
|
init_Stack();
|
|
24520
23782
|
init_Typography();
|
|
@@ -24569,7 +23831,6 @@ var init_FileTree = __esm({
|
|
|
24569
23831
|
init_Box();
|
|
24570
23832
|
init_Typography();
|
|
24571
23833
|
init_Icon();
|
|
24572
|
-
init_useTranslate();
|
|
24573
23834
|
TreeNodeItem = ({
|
|
24574
23835
|
node,
|
|
24575
23836
|
depth,
|
|
@@ -24655,7 +23916,7 @@ var init_FileTree = __esm({
|
|
|
24655
23916
|
className,
|
|
24656
23917
|
indent = 16
|
|
24657
23918
|
}) => {
|
|
24658
|
-
const { t } = useTranslate();
|
|
23919
|
+
const { t } = hooks.useTranslate();
|
|
24659
23920
|
if (tree.length === 0) {
|
|
24660
23921
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
24661
23922
|
}
|
|
@@ -24699,6 +23960,70 @@ var init_FormField = __esm({
|
|
|
24699
23960
|
FormField.displayName = "FormField";
|
|
24700
23961
|
}
|
|
24701
23962
|
});
|
|
23963
|
+
function getOrCreateStore(query) {
|
|
23964
|
+
if (!queryStores.has(query)) {
|
|
23965
|
+
queryStores.set(query, {
|
|
23966
|
+
search: "",
|
|
23967
|
+
filters: {},
|
|
23968
|
+
sortField: void 0,
|
|
23969
|
+
sortDirection: void 0,
|
|
23970
|
+
listeners: /* @__PURE__ */ new Set()
|
|
23971
|
+
});
|
|
23972
|
+
}
|
|
23973
|
+
return queryStores.get(query);
|
|
23974
|
+
}
|
|
23975
|
+
function useQuerySingleton(query) {
|
|
23976
|
+
const [, forceUpdate] = React84.useState({});
|
|
23977
|
+
if (!query) {
|
|
23978
|
+
return null;
|
|
23979
|
+
}
|
|
23980
|
+
const store = React84.useMemo(() => getOrCreateStore(query), [query]);
|
|
23981
|
+
React84.useMemo(() => {
|
|
23982
|
+
const listener = () => forceUpdate({});
|
|
23983
|
+
store.listeners.add(listener);
|
|
23984
|
+
return () => {
|
|
23985
|
+
store.listeners.delete(listener);
|
|
23986
|
+
};
|
|
23987
|
+
}, [store]);
|
|
23988
|
+
const notifyListeners3 = React84.useCallback(() => {
|
|
23989
|
+
store.listeners.forEach((listener) => listener());
|
|
23990
|
+
}, [store]);
|
|
23991
|
+
const setSearch = React84.useCallback((value) => {
|
|
23992
|
+
store.search = value;
|
|
23993
|
+
notifyListeners3();
|
|
23994
|
+
}, [store, notifyListeners3]);
|
|
23995
|
+
const setFilter = React84.useCallback((key, value) => {
|
|
23996
|
+
store.filters = { ...store.filters, [key]: value };
|
|
23997
|
+
notifyListeners3();
|
|
23998
|
+
}, [store, notifyListeners3]);
|
|
23999
|
+
const clearFilters = React84.useCallback(() => {
|
|
24000
|
+
store.filters = {};
|
|
24001
|
+
store.search = "";
|
|
24002
|
+
notifyListeners3();
|
|
24003
|
+
}, [store, notifyListeners3]);
|
|
24004
|
+
const setSort = React84.useCallback((field, direction) => {
|
|
24005
|
+
store.sortField = field;
|
|
24006
|
+
store.sortDirection = direction;
|
|
24007
|
+
notifyListeners3();
|
|
24008
|
+
}, [store, notifyListeners3]);
|
|
24009
|
+
return {
|
|
24010
|
+
search: store.search,
|
|
24011
|
+
setSearch,
|
|
24012
|
+
filters: store.filters,
|
|
24013
|
+
setFilter,
|
|
24014
|
+
clearFilters,
|
|
24015
|
+
sortField: store.sortField,
|
|
24016
|
+
sortDirection: store.sortDirection,
|
|
24017
|
+
setSort
|
|
24018
|
+
};
|
|
24019
|
+
}
|
|
24020
|
+
var queryStores;
|
|
24021
|
+
var init_useQuerySingleton = __esm({
|
|
24022
|
+
"hooks/useQuerySingleton.ts"() {
|
|
24023
|
+
"use client";
|
|
24024
|
+
queryStores = /* @__PURE__ */ new Map();
|
|
24025
|
+
}
|
|
24026
|
+
});
|
|
24702
24027
|
var resolveFilterType, lookStyles6, FilterGroup;
|
|
24703
24028
|
var init_FilterGroup = __esm({
|
|
24704
24029
|
"components/core/molecules/FilterGroup.tsx"() {
|
|
@@ -24712,7 +24037,6 @@ var init_FilterGroup = __esm({
|
|
|
24712
24037
|
init_Icon();
|
|
24713
24038
|
init_useEventBus();
|
|
24714
24039
|
init_useQuerySingleton();
|
|
24715
|
-
init_useTranslate();
|
|
24716
24040
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24717
24041
|
lookStyles6 = {
|
|
24718
24042
|
toolbar: "",
|
|
@@ -24733,7 +24057,7 @@ var init_FilterGroup = __esm({
|
|
|
24733
24057
|
isLoading,
|
|
24734
24058
|
look = "toolbar"
|
|
24735
24059
|
}) => {
|
|
24736
|
-
const { t } = useTranslate();
|
|
24060
|
+
const { t } = hooks.useTranslate();
|
|
24737
24061
|
const eventBus = useEventBus();
|
|
24738
24062
|
const queryState = useQuerySingleton(query);
|
|
24739
24063
|
const [selectedValues, setSelectedValues] = React84.useState(
|
|
@@ -25354,7 +24678,6 @@ var init_RelationSelect = __esm({
|
|
|
25354
24678
|
init_Spinner();
|
|
25355
24679
|
init_Typography();
|
|
25356
24680
|
init_debug();
|
|
25357
|
-
init_useTranslate();
|
|
25358
24681
|
isRelationsDebugEnabled = () => isDebugEnabled();
|
|
25359
24682
|
RelationSelect = ({
|
|
25360
24683
|
value,
|
|
@@ -25371,7 +24694,7 @@ var init_RelationSelect = __esm({
|
|
|
25371
24694
|
searchPlaceholder,
|
|
25372
24695
|
emptyMessage
|
|
25373
24696
|
}) => {
|
|
25374
|
-
const { t } = useTranslate();
|
|
24697
|
+
const { t } = hooks.useTranslate();
|
|
25375
24698
|
const resolvedPlaceholder = placeholder ?? t("relationSelect.selectPlaceholder");
|
|
25376
24699
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
25377
24700
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noOptionsFound");
|
|
@@ -25579,7 +24902,6 @@ var init_SearchInput = __esm({
|
|
|
25579
24902
|
init_cn();
|
|
25580
24903
|
init_useEventBus();
|
|
25581
24904
|
init_useQuerySingleton();
|
|
25582
|
-
init_useTranslate();
|
|
25583
24905
|
SearchInput = ({
|
|
25584
24906
|
value,
|
|
25585
24907
|
onSearch,
|
|
@@ -25594,7 +24916,7 @@ var init_SearchInput = __esm({
|
|
|
25594
24916
|
...props
|
|
25595
24917
|
}) => {
|
|
25596
24918
|
const eventBus = useEventBus();
|
|
25597
|
-
const { t } = useTranslate();
|
|
24919
|
+
const { t } = hooks.useTranslate();
|
|
25598
24920
|
const resolvedPlaceholder = placeholder ?? t("common.search");
|
|
25599
24921
|
const queryState = useQuerySingleton(query);
|
|
25600
24922
|
const initialValue = queryState?.search ?? value ?? "";
|
|
@@ -25682,7 +25004,6 @@ var init_SidePanel = __esm({
|
|
|
25682
25004
|
init_Typography();
|
|
25683
25005
|
init_cn();
|
|
25684
25006
|
init_useEventBus();
|
|
25685
|
-
init_useTranslate();
|
|
25686
25007
|
SidePanel = ({
|
|
25687
25008
|
title,
|
|
25688
25009
|
children,
|
|
@@ -25695,7 +25016,7 @@ var init_SidePanel = __esm({
|
|
|
25695
25016
|
closeEvent
|
|
25696
25017
|
}) => {
|
|
25697
25018
|
const eventBus = useEventBus();
|
|
25698
|
-
const { t } = useTranslate();
|
|
25019
|
+
const { t } = hooks.useTranslate();
|
|
25699
25020
|
const handleClose = () => {
|
|
25700
25021
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
25701
25022
|
onClose();
|
|
@@ -25861,7 +25182,6 @@ var init_WizardNavigation = __esm({
|
|
|
25861
25182
|
init_Icon();
|
|
25862
25183
|
init_cn();
|
|
25863
25184
|
init_useEventBus();
|
|
25864
|
-
init_useTranslate();
|
|
25865
25185
|
WizardNavigation = ({
|
|
25866
25186
|
currentStep,
|
|
25867
25187
|
totalSteps,
|
|
@@ -25882,7 +25202,7 @@ var init_WizardNavigation = __esm({
|
|
|
25882
25202
|
className
|
|
25883
25203
|
}) => {
|
|
25884
25204
|
const eventBus = useSafeEventBus4();
|
|
25885
|
-
const { t } = useTranslate();
|
|
25205
|
+
const { t } = hooks.useTranslate();
|
|
25886
25206
|
const resolvedBackLabel = backLabel ?? t("wizard.back");
|
|
25887
25207
|
const resolvedNextLabel = nextLabel ?? t("wizard.next");
|
|
25888
25208
|
const resolvedCompleteLabel = completeLabel ?? t("wizard.complete");
|
|
@@ -25949,7 +25269,6 @@ var init_RepeatableFormSection = __esm({
|
|
|
25949
25269
|
init_Card();
|
|
25950
25270
|
init_Icon();
|
|
25951
25271
|
init_useEventBus();
|
|
25952
|
-
init_useTranslate();
|
|
25953
25272
|
RepeatableFormSection = ({
|
|
25954
25273
|
sectionType,
|
|
25955
25274
|
title,
|
|
@@ -25970,7 +25289,7 @@ var init_RepeatableFormSection = __esm({
|
|
|
25970
25289
|
showAuditInfo = false
|
|
25971
25290
|
}) => {
|
|
25972
25291
|
const eventBus = useEventBus();
|
|
25973
|
-
const { t } = useTranslate();
|
|
25292
|
+
const { t } = hooks.useTranslate();
|
|
25974
25293
|
const resolvedAddLabel = addLabel ?? t("common.add");
|
|
25975
25294
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noItemsAdded");
|
|
25976
25295
|
const safeItems = items ?? [];
|
|
@@ -26080,7 +25399,6 @@ var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
|
26080
25399
|
var init_ViolationAlert = __esm({
|
|
26081
25400
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
26082
25401
|
init_cn();
|
|
26083
|
-
init_useTranslate();
|
|
26084
25402
|
init_Box();
|
|
26085
25403
|
init_Stack();
|
|
26086
25404
|
init_Typography();
|
|
@@ -26106,7 +25424,7 @@ var init_ViolationAlert = __esm({
|
|
|
26106
25424
|
className,
|
|
26107
25425
|
...flatProps
|
|
26108
25426
|
}) => {
|
|
26109
|
-
const { t } = useTranslate();
|
|
25427
|
+
const { t } = hooks.useTranslate();
|
|
26110
25428
|
const resolvedViolation = violation ?? {
|
|
26111
25429
|
law: "",
|
|
26112
25430
|
article: "",
|
|
@@ -26586,7 +25904,6 @@ var init_LineChart = __esm({
|
|
|
26586
25904
|
"use client";
|
|
26587
25905
|
init_cn();
|
|
26588
25906
|
init_atoms2();
|
|
26589
|
-
init_useTranslate();
|
|
26590
25907
|
LineChart2 = ({
|
|
26591
25908
|
data,
|
|
26592
25909
|
width = 400,
|
|
@@ -26598,7 +25915,7 @@ var init_LineChart = __esm({
|
|
|
26598
25915
|
areaColor = "var(--color-primary)",
|
|
26599
25916
|
className
|
|
26600
25917
|
}) => {
|
|
26601
|
-
const { t } = useTranslate();
|
|
25918
|
+
const { t } = hooks.useTranslate();
|
|
26602
25919
|
const gradientId = React84.useId();
|
|
26603
25920
|
const safeData = data ?? [];
|
|
26604
25921
|
const sortedData = React84.useMemo(() => {
|
|
@@ -28542,7 +27859,6 @@ var init_GraphView = __esm({
|
|
|
28542
27859
|
"use client";
|
|
28543
27860
|
init_cn();
|
|
28544
27861
|
init_atoms2();
|
|
28545
|
-
init_useTranslate();
|
|
28546
27862
|
GROUP_COLORS = [
|
|
28547
27863
|
"#3b82f6",
|
|
28548
27864
|
// blue-500
|
|
@@ -28575,7 +27891,7 @@ var init_GraphView = __esm({
|
|
|
28575
27891
|
showLabels = true,
|
|
28576
27892
|
zoomToFit = true
|
|
28577
27893
|
}) => {
|
|
28578
|
-
const { t } = useTranslate();
|
|
27894
|
+
const { t } = hooks.useTranslate();
|
|
28579
27895
|
const containerRef = React84.useRef(null);
|
|
28580
27896
|
const animRef = React84.useRef(0);
|
|
28581
27897
|
const [simNodes, setSimNodes] = React84.useState([]);
|
|
@@ -28868,7 +28184,6 @@ var init_NumberStepper = __esm({
|
|
|
28868
28184
|
init_cn();
|
|
28869
28185
|
init_Icon();
|
|
28870
28186
|
init_useEventBus();
|
|
28871
|
-
init_useTranslate();
|
|
28872
28187
|
sizeStyles10 = {
|
|
28873
28188
|
sm: {
|
|
28874
28189
|
button: "w-7 h-7",
|
|
@@ -28902,7 +28217,7 @@ var init_NumberStepper = __esm({
|
|
|
28902
28217
|
label
|
|
28903
28218
|
}) => {
|
|
28904
28219
|
const eventBus = useSafeEventBus5();
|
|
28905
|
-
const { t } = useTranslate();
|
|
28220
|
+
const { t } = hooks.useTranslate();
|
|
28906
28221
|
const intervalRef = React84.useRef(null);
|
|
28907
28222
|
const timeoutRef = React84.useRef(null);
|
|
28908
28223
|
const isAtMin = min !== void 0 && value <= min;
|
|
@@ -29209,7 +28524,6 @@ var init_UploadDropZone = __esm({
|
|
|
29209
28524
|
init_Icon();
|
|
29210
28525
|
init_Typography();
|
|
29211
28526
|
init_useEventBus();
|
|
29212
|
-
init_useTranslate();
|
|
29213
28527
|
UploadDropZone = ({
|
|
29214
28528
|
accept,
|
|
29215
28529
|
maxSize,
|
|
@@ -29222,7 +28536,7 @@ var init_UploadDropZone = __esm({
|
|
|
29222
28536
|
onFiles,
|
|
29223
28537
|
className
|
|
29224
28538
|
}) => {
|
|
29225
|
-
const { t } = useTranslate();
|
|
28539
|
+
const { t } = hooks.useTranslate();
|
|
29226
28540
|
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
29227
28541
|
const [isDragOver, setIsDragOver] = React84.useState(false);
|
|
29228
28542
|
const [error, setError] = React84.useState(null);
|
|
@@ -29376,7 +28690,6 @@ var init_Lightbox = __esm({
|
|
|
29376
28690
|
init_Icon();
|
|
29377
28691
|
init_cn();
|
|
29378
28692
|
init_useEventBus();
|
|
29379
|
-
init_useTranslate();
|
|
29380
28693
|
Lightbox = ({
|
|
29381
28694
|
images = [],
|
|
29382
28695
|
currentIndex = 0,
|
|
@@ -29391,7 +28704,7 @@ var init_Lightbox = __esm({
|
|
|
29391
28704
|
const [index, setIndex] = React84.useState(currentIndex);
|
|
29392
28705
|
const [touchStartX, setTouchStartX] = React84.useState(null);
|
|
29393
28706
|
const eventBus = useSafeEventBus8();
|
|
29394
|
-
const { t } = useTranslate();
|
|
28707
|
+
const { t } = hooks.useTranslate();
|
|
29395
28708
|
React84.useEffect(() => {
|
|
29396
28709
|
setIndex(currentIndex);
|
|
29397
28710
|
}, [currentIndex]);
|
|
@@ -29629,7 +28942,7 @@ function TableView({
|
|
|
29629
28942
|
dndRoot
|
|
29630
28943
|
}) {
|
|
29631
28944
|
const eventBus = useEventBus();
|
|
29632
|
-
const { t } = useTranslate();
|
|
28945
|
+
const { t } = hooks.useTranslate();
|
|
29633
28946
|
const [visibleCount, setVisibleCount] = React84__namespace.default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29634
28947
|
const [localSelected, setLocalSelected] = React84__namespace.default.useState(/* @__PURE__ */ new Set());
|
|
29635
28948
|
const colDefs = columns ?? fields ?? [];
|
|
@@ -29861,7 +29174,6 @@ var init_TableView = __esm({
|
|
|
29861
29174
|
init_cn();
|
|
29862
29175
|
init_getNestedValue();
|
|
29863
29176
|
init_useEventBus();
|
|
29864
|
-
init_useTranslate();
|
|
29865
29177
|
init_Box();
|
|
29866
29178
|
init_Stack();
|
|
29867
29179
|
init_Typography();
|
|
@@ -30065,7 +29377,6 @@ var init_Meter = __esm({
|
|
|
30065
29377
|
init_LoadingState();
|
|
30066
29378
|
init_ErrorState();
|
|
30067
29379
|
init_useEventBus();
|
|
30068
|
-
init_useTranslate();
|
|
30069
29380
|
DEFAULT_THRESHOLDS = [
|
|
30070
29381
|
{ value: 30, color: "var(--color-error)" },
|
|
30071
29382
|
{ value: 70, color: "var(--color-warning)" },
|
|
@@ -30093,7 +29404,7 @@ var init_Meter = __esm({
|
|
|
30093
29404
|
className
|
|
30094
29405
|
}) => {
|
|
30095
29406
|
const eventBus = useEventBus();
|
|
30096
|
-
const { t } = useTranslate();
|
|
29407
|
+
const { t } = hooks.useTranslate();
|
|
30097
29408
|
const handleAction = React84.useCallback(
|
|
30098
29409
|
(action) => {
|
|
30099
29410
|
if (action.event) {
|
|
@@ -30446,6 +29757,79 @@ var init_SwipeableRow = __esm({
|
|
|
30446
29757
|
SwipeableRow.displayName = "SwipeableRow";
|
|
30447
29758
|
}
|
|
30448
29759
|
});
|
|
29760
|
+
function useDragReorder(initialItems, onReorder) {
|
|
29761
|
+
const [items, setItems] = React84.useState(initialItems);
|
|
29762
|
+
const [dragIndex, setDragIndex] = React84.useState(-1);
|
|
29763
|
+
const [dragOverIndex, setDragOverIndex] = React84.useState(-1);
|
|
29764
|
+
const itemsRef = React84.useRef(initialItems);
|
|
29765
|
+
if (initialItems !== itemsRef.current) {
|
|
29766
|
+
itemsRef.current = initialItems;
|
|
29767
|
+
setItems(initialItems);
|
|
29768
|
+
}
|
|
29769
|
+
const isDragging = dragIndex >= 0;
|
|
29770
|
+
const handleDragStart = React84.useCallback((index) => (e) => {
|
|
29771
|
+
e.preventDefault();
|
|
29772
|
+
setDragIndex(index);
|
|
29773
|
+
setDragOverIndex(index);
|
|
29774
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
29775
|
+
}, []);
|
|
29776
|
+
const handleDragMove = React84.useCallback((index) => (e) => {
|
|
29777
|
+
if (dragIndex < 0) return;
|
|
29778
|
+
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
29779
|
+
if (!target) return;
|
|
29780
|
+
let el = target;
|
|
29781
|
+
while (el && !el.dataset.dragIndex) {
|
|
29782
|
+
el = el.parentElement;
|
|
29783
|
+
}
|
|
29784
|
+
if (el?.dataset.dragIndex) {
|
|
29785
|
+
const overIndex = parseInt(el.dataset.dragIndex, 10);
|
|
29786
|
+
if (!isNaN(overIndex) && overIndex !== dragOverIndex) {
|
|
29787
|
+
setDragOverIndex(overIndex);
|
|
29788
|
+
}
|
|
29789
|
+
}
|
|
29790
|
+
}, [dragIndex, dragOverIndex]);
|
|
29791
|
+
const handleDragEnd = React84.useCallback(() => {
|
|
29792
|
+
if (dragIndex >= 0 && dragOverIndex >= 0 && dragIndex !== dragOverIndex) {
|
|
29793
|
+
const newItems = [...items];
|
|
29794
|
+
const [movedItem] = newItems.splice(dragIndex, 1);
|
|
29795
|
+
newItems.splice(dragOverIndex, 0, movedItem);
|
|
29796
|
+
setItems(newItems);
|
|
29797
|
+
onReorder(dragIndex, dragOverIndex, items[dragIndex]);
|
|
29798
|
+
}
|
|
29799
|
+
setDragIndex(-1);
|
|
29800
|
+
setDragOverIndex(-1);
|
|
29801
|
+
}, [dragIndex, dragOverIndex, items, onReorder]);
|
|
29802
|
+
const getDragHandleProps = React84.useCallback((index) => ({
|
|
29803
|
+
onPointerDown: handleDragStart(index),
|
|
29804
|
+
style: { cursor: "grab", touchAction: "none" },
|
|
29805
|
+
"aria-grabbed": dragIndex === index,
|
|
29806
|
+
role: "button"
|
|
29807
|
+
}), [handleDragStart, dragIndex]);
|
|
29808
|
+
const getItemProps = React84.useCallback((index) => ({
|
|
29809
|
+
onPointerMove: handleDragMove(index),
|
|
29810
|
+
onPointerUp: handleDragEnd,
|
|
29811
|
+
"aria-dropeffect": "move",
|
|
29812
|
+
"data-drag-index": String(index),
|
|
29813
|
+
style: {
|
|
29814
|
+
opacity: dragIndex === index ? 0.5 : 1,
|
|
29815
|
+
transition: isDragging ? "transform 150ms ease" : void 0,
|
|
29816
|
+
transform: isDragging && dragOverIndex >= 0 ? index === dragIndex ? "scale(1.02)" : index > dragIndex && index <= dragOverIndex ? "translateY(-100%)" : index < dragIndex && index >= dragOverIndex ? "translateY(100%)" : void 0 : void 0
|
|
29817
|
+
}
|
|
29818
|
+
}), [handleDragMove, handleDragEnd, dragIndex, dragOverIndex, isDragging]);
|
|
29819
|
+
return {
|
|
29820
|
+
items,
|
|
29821
|
+
dragIndex,
|
|
29822
|
+
dragOverIndex,
|
|
29823
|
+
isDragging,
|
|
29824
|
+
getDragHandleProps,
|
|
29825
|
+
getItemProps
|
|
29826
|
+
};
|
|
29827
|
+
}
|
|
29828
|
+
var init_useDragReorder = __esm({
|
|
29829
|
+
"hooks/useDragReorder.ts"() {
|
|
29830
|
+
"use client";
|
|
29831
|
+
}
|
|
29832
|
+
});
|
|
30449
29833
|
function useSafeEventBus10() {
|
|
30450
29834
|
try {
|
|
30451
29835
|
return useEventBus();
|
|
@@ -30556,6 +29940,71 @@ var init_SortableList = __esm({
|
|
|
30556
29940
|
SortableList.displayName = "SortableList";
|
|
30557
29941
|
}
|
|
30558
29942
|
});
|
|
29943
|
+
function usePullToRefresh(onRefresh, options = {}) {
|
|
29944
|
+
const { threshold = 60, maxPull = 120 } = options;
|
|
29945
|
+
const [pullDistance, setPullDistance] = React84.useState(0);
|
|
29946
|
+
const [isPulling, setIsPulling] = React84.useState(false);
|
|
29947
|
+
const [isRefreshing, setIsRefreshing] = React84.useState(false);
|
|
29948
|
+
const startY = React84.useRef(0);
|
|
29949
|
+
const scrollTopRef = React84.useRef(0);
|
|
29950
|
+
const onTouchStart = React84.useCallback((e) => {
|
|
29951
|
+
const container = e.currentTarget;
|
|
29952
|
+
scrollTopRef.current = container.scrollTop;
|
|
29953
|
+
if (scrollTopRef.current <= 0) {
|
|
29954
|
+
startY.current = e.touches[0].clientY;
|
|
29955
|
+
setIsPulling(true);
|
|
29956
|
+
}
|
|
29957
|
+
}, []);
|
|
29958
|
+
const onTouchMove = React84.useCallback((e) => {
|
|
29959
|
+
if (!isPulling || isRefreshing) return;
|
|
29960
|
+
const container = e.currentTarget;
|
|
29961
|
+
if (container.scrollTop > 0) {
|
|
29962
|
+
setPullDistance(0);
|
|
29963
|
+
return;
|
|
29964
|
+
}
|
|
29965
|
+
const dy = e.touches[0].clientY - startY.current;
|
|
29966
|
+
if (dy > 0) {
|
|
29967
|
+
const distance = Math.min(dy * 0.5, maxPull);
|
|
29968
|
+
setPullDistance(distance);
|
|
29969
|
+
}
|
|
29970
|
+
}, [isPulling, isRefreshing, maxPull]);
|
|
29971
|
+
const onTouchEnd = React84.useCallback(() => {
|
|
29972
|
+
if (!isPulling) return;
|
|
29973
|
+
setIsPulling(false);
|
|
29974
|
+
if (pullDistance >= threshold && !isRefreshing) {
|
|
29975
|
+
setIsRefreshing(true);
|
|
29976
|
+
setPullDistance(threshold);
|
|
29977
|
+
onRefresh();
|
|
29978
|
+
} else {
|
|
29979
|
+
setPullDistance(0);
|
|
29980
|
+
}
|
|
29981
|
+
}, [isPulling, pullDistance, threshold, isRefreshing, onRefresh]);
|
|
29982
|
+
const endRefresh = React84.useCallback(() => {
|
|
29983
|
+
setIsRefreshing(false);
|
|
29984
|
+
setPullDistance(0);
|
|
29985
|
+
}, []);
|
|
29986
|
+
const containerProps = {
|
|
29987
|
+
onTouchStart,
|
|
29988
|
+
onTouchMove,
|
|
29989
|
+
onTouchEnd,
|
|
29990
|
+
style: {
|
|
29991
|
+
transform: pullDistance > 0 ? `translateY(${pullDistance}px)` : void 0,
|
|
29992
|
+
transition: isPulling ? "none" : "transform 300ms ease-out"
|
|
29993
|
+
}
|
|
29994
|
+
};
|
|
29995
|
+
return {
|
|
29996
|
+
pullDistance,
|
|
29997
|
+
isPulling,
|
|
29998
|
+
isRefreshing,
|
|
29999
|
+
containerProps,
|
|
30000
|
+
endRefresh
|
|
30001
|
+
};
|
|
30002
|
+
}
|
|
30003
|
+
var init_usePullToRefresh = __esm({
|
|
30004
|
+
"hooks/usePullToRefresh.ts"() {
|
|
30005
|
+
"use client";
|
|
30006
|
+
}
|
|
30007
|
+
});
|
|
30559
30008
|
function useSafeEventBus11() {
|
|
30560
30009
|
try {
|
|
30561
30010
|
return useEventBus();
|
|
@@ -31874,7 +31323,6 @@ var init_VoteStack = __esm({
|
|
|
31874
31323
|
init_cn();
|
|
31875
31324
|
init_Icon();
|
|
31876
31325
|
init_useEventBus();
|
|
31877
|
-
init_useTranslate();
|
|
31878
31326
|
sizeStyles12 = {
|
|
31879
31327
|
sm: {
|
|
31880
31328
|
button: "w-7 h-7",
|
|
@@ -31907,7 +31355,7 @@ var init_VoteStack = __esm({
|
|
|
31907
31355
|
const isUp = userVote === "up";
|
|
31908
31356
|
const isDown = userVote === "down";
|
|
31909
31357
|
const eventBus = useEventBus();
|
|
31910
|
-
const { t } = useTranslate();
|
|
31358
|
+
const { t } = hooks.useTranslate();
|
|
31911
31359
|
const handleUp = React84.useCallback(() => {
|
|
31912
31360
|
const next = isUp ? null : "up";
|
|
31913
31361
|
onVote?.(next);
|
|
@@ -32329,7 +31777,6 @@ var init_QrScanner = __esm({
|
|
|
32329
31777
|
init_atoms2();
|
|
32330
31778
|
init_Icon();
|
|
32331
31779
|
init_useEventBus();
|
|
32332
|
-
init_useTranslate();
|
|
32333
31780
|
QrScanner = ({
|
|
32334
31781
|
onScan,
|
|
32335
31782
|
scanEvent,
|
|
@@ -32342,7 +31789,7 @@ var init_QrScanner = __esm({
|
|
|
32342
31789
|
className
|
|
32343
31790
|
}) => {
|
|
32344
31791
|
const eventBus = useEventBus();
|
|
32345
|
-
const { t } = useTranslate();
|
|
31792
|
+
const { t } = hooks.useTranslate();
|
|
32346
31793
|
const videoRef = React84.useRef(null);
|
|
32347
31794
|
const streamRef = React84.useRef(null);
|
|
32348
31795
|
const scanIntervalRef = React84.useRef(null);
|
|
@@ -32556,7 +32003,6 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32556
32003
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32557
32004
|
init_cn();
|
|
32558
32005
|
init_useEventBus();
|
|
32559
|
-
init_useTranslate();
|
|
32560
32006
|
init_Typography();
|
|
32561
32007
|
init_Box();
|
|
32562
32008
|
init_Label();
|
|
@@ -32612,7 +32058,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32612
32058
|
className
|
|
32613
32059
|
}) => {
|
|
32614
32060
|
const eventBus = useEventBus();
|
|
32615
|
-
const { t } = useTranslate();
|
|
32061
|
+
const { t } = hooks.useTranslate();
|
|
32616
32062
|
const hint = constraintHint(constraint, t);
|
|
32617
32063
|
const error = validateSelection(selected, constraint, t);
|
|
32618
32064
|
const inputName = `option-${groupId}`;
|
|
@@ -33036,7 +32482,7 @@ function changeBlockType(block, type) {
|
|
|
33036
32482
|
return { id: block.id, type, content: seed };
|
|
33037
32483
|
}
|
|
33038
32484
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
33039
|
-
const { t } = useTranslate();
|
|
32485
|
+
const { t } = hooks.useTranslate();
|
|
33040
32486
|
const [open, setOpen] = React84.useState(false);
|
|
33041
32487
|
const ref = React84.useRef(null);
|
|
33042
32488
|
React84.useEffect(() => {
|
|
@@ -33193,7 +32639,7 @@ function BlockRow({
|
|
|
33193
32639
|
onInsertAfter,
|
|
33194
32640
|
onChangeType
|
|
33195
32641
|
}) {
|
|
33196
|
-
const { t } = useTranslate();
|
|
32642
|
+
const { t } = hooks.useTranslate();
|
|
33197
32643
|
const setContent = React84.useCallback(
|
|
33198
32644
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
33199
32645
|
[onUpdate]
|
|
@@ -33512,7 +32958,6 @@ var init_RichBlockEditor = __esm({
|
|
|
33512
32958
|
init_Input();
|
|
33513
32959
|
init_Icon();
|
|
33514
32960
|
init_useEventBus();
|
|
33515
|
-
init_useTranslate();
|
|
33516
32961
|
TOOLBAR_ENTRIES = [
|
|
33517
32962
|
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: LucideIcons2.Type },
|
|
33518
32963
|
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: LucideIcons2.Heading1 },
|
|
@@ -33569,7 +33014,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33569
33014
|
showToolbar = true,
|
|
33570
33015
|
className
|
|
33571
33016
|
}) => {
|
|
33572
|
-
const { t } = useTranslate();
|
|
33017
|
+
const { t } = hooks.useTranslate();
|
|
33573
33018
|
const [blocks, setBlocks] = React84.useState(
|
|
33574
33019
|
() => normalizeBlocks(initialBlocks)
|
|
33575
33020
|
);
|
|
@@ -33703,7 +33148,6 @@ var init_ReplyTree = __esm({
|
|
|
33703
33148
|
"use client";
|
|
33704
33149
|
init_cn();
|
|
33705
33150
|
init_useEventBus();
|
|
33706
|
-
init_useTranslate();
|
|
33707
33151
|
init_atoms2();
|
|
33708
33152
|
init_VoteStack();
|
|
33709
33153
|
ReplyTreeNode = ({
|
|
@@ -33723,7 +33167,7 @@ var init_ReplyTree = __esm({
|
|
|
33723
33167
|
showActions
|
|
33724
33168
|
}) => {
|
|
33725
33169
|
const eventBus = useEventBus();
|
|
33726
|
-
const { t } = useTranslate();
|
|
33170
|
+
const { t } = hooks.useTranslate();
|
|
33727
33171
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33728
33172
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33729
33173
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33914,7 +33358,7 @@ var init_ReplyTree = __esm({
|
|
|
33914
33358
|
showActions = true,
|
|
33915
33359
|
className
|
|
33916
33360
|
}) => {
|
|
33917
|
-
const { t } = useTranslate();
|
|
33361
|
+
const { t } = hooks.useTranslate();
|
|
33918
33362
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33919
33363
|
const [collapsedSet, setCollapsedSet] = React84.useState(() => {
|
|
33920
33364
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -34011,7 +33455,6 @@ var init_VersionDiff = __esm({
|
|
|
34011
33455
|
"use client";
|
|
34012
33456
|
init_cn();
|
|
34013
33457
|
init_useEventBus();
|
|
34014
|
-
init_useTranslate();
|
|
34015
33458
|
init_atoms2();
|
|
34016
33459
|
init_Stack();
|
|
34017
33460
|
INLINE_STYLES = {
|
|
@@ -34034,7 +33477,7 @@ var init_VersionDiff = __esm({
|
|
|
34034
33477
|
language,
|
|
34035
33478
|
className
|
|
34036
33479
|
}) => {
|
|
34037
|
-
const { t } = useTranslate();
|
|
33480
|
+
const { t } = hooks.useTranslate();
|
|
34038
33481
|
const eventBus = useEventBus();
|
|
34039
33482
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
34040
33483
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -34327,12 +33770,11 @@ var init_DocBreadcrumb = __esm({
|
|
|
34327
33770
|
init_Stack();
|
|
34328
33771
|
init_Typography();
|
|
34329
33772
|
init_Icon();
|
|
34330
|
-
init_useTranslate();
|
|
34331
33773
|
DocBreadcrumb = ({
|
|
34332
33774
|
items,
|
|
34333
33775
|
className
|
|
34334
33776
|
}) => {
|
|
34335
|
-
const { t } = useTranslate();
|
|
33777
|
+
const { t } = hooks.useTranslate();
|
|
34336
33778
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34337
33779
|
Box,
|
|
34338
33780
|
{
|
|
@@ -34583,7 +34025,7 @@ function DocSearch({
|
|
|
34583
34025
|
onSearch,
|
|
34584
34026
|
className
|
|
34585
34027
|
}) {
|
|
34586
|
-
const { t } = useTranslate();
|
|
34028
|
+
const { t } = hooks.useTranslate();
|
|
34587
34029
|
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34588
34030
|
const [query, setQuery] = React84.useState("");
|
|
34589
34031
|
const [results, setResults] = React84.useState([]);
|
|
@@ -34756,7 +34198,6 @@ var init_DocSearch = __esm({
|
|
|
34756
34198
|
init_Typography();
|
|
34757
34199
|
init_Icon();
|
|
34758
34200
|
init_Input();
|
|
34759
|
-
init_useTranslate();
|
|
34760
34201
|
}
|
|
34761
34202
|
});
|
|
34762
34203
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -34769,7 +34210,6 @@ var init_DocSidebar = __esm({
|
|
|
34769
34210
|
init_Stack();
|
|
34770
34211
|
init_Typography();
|
|
34771
34212
|
init_Icon();
|
|
34772
|
-
init_useTranslate();
|
|
34773
34213
|
DocSidebarCategory = ({ item, depth }) => {
|
|
34774
34214
|
const [expanded, setExpanded] = React84.useState(
|
|
34775
34215
|
() => item.items?.some(function hasActive(child) {
|
|
@@ -34854,7 +34294,7 @@ var init_DocSidebar = __esm({
|
|
|
34854
34294
|
items,
|
|
34855
34295
|
className
|
|
34856
34296
|
}) => {
|
|
34857
|
-
const { t } = useTranslate();
|
|
34297
|
+
const { t } = hooks.useTranslate();
|
|
34858
34298
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34859
34299
|
Box,
|
|
34860
34300
|
{
|
|
@@ -34876,13 +34316,12 @@ var init_DocTOC = __esm({
|
|
|
34876
34316
|
init_Box();
|
|
34877
34317
|
init_Stack();
|
|
34878
34318
|
init_Typography();
|
|
34879
|
-
init_useTranslate();
|
|
34880
34319
|
DocTOC = ({
|
|
34881
34320
|
items,
|
|
34882
34321
|
activeId,
|
|
34883
34322
|
className
|
|
34884
34323
|
}) => {
|
|
34885
|
-
const { t } = useTranslate();
|
|
34324
|
+
const { t } = hooks.useTranslate();
|
|
34886
34325
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34887
34326
|
Box,
|
|
34888
34327
|
{
|
|
@@ -35611,7 +35050,6 @@ var init_Header = __esm({
|
|
|
35611
35050
|
init_Stack();
|
|
35612
35051
|
init_Typography();
|
|
35613
35052
|
init_cn();
|
|
35614
|
-
init_useTranslate();
|
|
35615
35053
|
lookStyles8 = {
|
|
35616
35054
|
"compact-bar": "",
|
|
35617
35055
|
hero: "py-section min-h-[200px] [&_h1]:text-display-1",
|
|
@@ -35640,7 +35078,7 @@ var init_Header = __esm({
|
|
|
35640
35078
|
onLogoClick,
|
|
35641
35079
|
className
|
|
35642
35080
|
}) => {
|
|
35643
|
-
const { t } = useTranslate();
|
|
35081
|
+
const { t } = hooks.useTranslate();
|
|
35644
35082
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
35645
35083
|
const userInitials = userAvatar?.initials || userName?.[0]?.toUpperCase() || "U";
|
|
35646
35084
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -35931,7 +35369,6 @@ var init_Sidebar = __esm({
|
|
|
35931
35369
|
init_Typography();
|
|
35932
35370
|
init_cn();
|
|
35933
35371
|
init_useEventBus();
|
|
35934
|
-
init_useTranslate();
|
|
35935
35372
|
SidebarNavItem = ({ item, collapsed }) => {
|
|
35936
35373
|
const Icon3 = item.icon;
|
|
35937
35374
|
const isActive = item.active ?? item.isActive;
|
|
@@ -35995,7 +35432,7 @@ var init_Sidebar = __esm({
|
|
|
35995
35432
|
className
|
|
35996
35433
|
}) => {
|
|
35997
35434
|
const { emit } = useEventBus();
|
|
35998
|
-
const { t } = useTranslate();
|
|
35435
|
+
const { t } = hooks.useTranslate();
|
|
35999
35436
|
const [internalCollapsed, setInternalCollapsed] = React84.useState(defaultCollapsed);
|
|
36000
35437
|
const collapsed = controlledCollapsed !== void 0 ? controlledCollapsed : internalCollapsed;
|
|
36001
35438
|
const handleToggle = React84.useCallback(() => {
|
|
@@ -36185,7 +35622,6 @@ var init_WizardContainer = __esm({
|
|
|
36185
35622
|
init_Stack();
|
|
36186
35623
|
init_Icon();
|
|
36187
35624
|
init_cn();
|
|
36188
|
-
init_useTranslate();
|
|
36189
35625
|
WizardContainer = ({
|
|
36190
35626
|
steps,
|
|
36191
35627
|
currentStep: controlledStep,
|
|
@@ -36198,7 +35634,7 @@ var init_WizardContainer = __esm({
|
|
|
36198
35634
|
entity: _entity
|
|
36199
35635
|
// Accept but don't use directly yet
|
|
36200
35636
|
}) => {
|
|
36201
|
-
const { t } = useTranslate();
|
|
35637
|
+
const { t } = hooks.useTranslate();
|
|
36202
35638
|
const [internalStep, setInternalStep] = React84.useState(0);
|
|
36203
35639
|
const normalizedControlledStep = (() => {
|
|
36204
35640
|
if (controlledStep === void 0 || controlledStep === null)
|
|
@@ -36759,7 +36195,6 @@ var init_SignaturePad = __esm({
|
|
|
36759
36195
|
init_LoadingState();
|
|
36760
36196
|
init_ErrorState();
|
|
36761
36197
|
init_useEventBus();
|
|
36762
|
-
init_useTranslate();
|
|
36763
36198
|
SignaturePad = ({
|
|
36764
36199
|
label,
|
|
36765
36200
|
helperText,
|
|
@@ -36777,7 +36212,7 @@ var init_SignaturePad = __esm({
|
|
|
36777
36212
|
className
|
|
36778
36213
|
}) => {
|
|
36779
36214
|
const eventBus = useEventBus();
|
|
36780
|
-
const { t } = useTranslate();
|
|
36215
|
+
const { t } = hooks.useTranslate();
|
|
36781
36216
|
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36782
36217
|
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36783
36218
|
const canvasRef = React84.useRef(null);
|
|
@@ -36953,7 +36388,6 @@ var init_DocumentViewer = __esm({
|
|
|
36953
36388
|
init_EmptyState();
|
|
36954
36389
|
init_Tabs();
|
|
36955
36390
|
init_useEventBus();
|
|
36956
|
-
init_useTranslate();
|
|
36957
36391
|
DocumentViewer = ({
|
|
36958
36392
|
title,
|
|
36959
36393
|
src,
|
|
@@ -36973,7 +36407,7 @@ var init_DocumentViewer = __esm({
|
|
|
36973
36407
|
className
|
|
36974
36408
|
}) => {
|
|
36975
36409
|
const eventBus = useEventBus();
|
|
36976
|
-
const { t } = useTranslate();
|
|
36410
|
+
const { t } = hooks.useTranslate();
|
|
36977
36411
|
const [zoom, setZoom] = React84.useState(100);
|
|
36978
36412
|
const [currentPage, setCurrentPage] = React84.useState(propPage ?? 1);
|
|
36979
36413
|
const [activeDocIndex, setActiveDocIndex] = React84.useState(0);
|
|
@@ -37158,7 +36592,6 @@ var init_GraphCanvas = __esm({
|
|
|
37158
36592
|
init_ErrorState();
|
|
37159
36593
|
init_EmptyState();
|
|
37160
36594
|
init_useEventBus();
|
|
37161
|
-
init_useTranslate();
|
|
37162
36595
|
GROUP_COLORS2 = [
|
|
37163
36596
|
"var(--color-primary)",
|
|
37164
36597
|
"var(--color-success)",
|
|
@@ -37185,7 +36618,7 @@ var init_GraphCanvas = __esm({
|
|
|
37185
36618
|
className
|
|
37186
36619
|
}) => {
|
|
37187
36620
|
const eventBus = useEventBus();
|
|
37188
|
-
const { t } = useTranslate();
|
|
36621
|
+
const { t } = hooks.useTranslate();
|
|
37189
36622
|
const canvasRef = React84.useRef(null);
|
|
37190
36623
|
const animRef = React84.useRef(0);
|
|
37191
36624
|
const [zoom, setZoom] = React84.useState(1);
|
|
@@ -37535,7 +36968,7 @@ function DataTable({
|
|
|
37535
36968
|
null
|
|
37536
36969
|
);
|
|
37537
36970
|
const eventBus = useEventBus();
|
|
37538
|
-
const { t } = useTranslate();
|
|
36971
|
+
const { t } = hooks.useTranslate();
|
|
37539
36972
|
const resolvedEmptyTitle = emptyTitle ?? t("table.empty.title");
|
|
37540
36973
|
const resolvedEmptyDescription = emptyDescription ?? t("table.empty.description");
|
|
37541
36974
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
@@ -37896,7 +37329,6 @@ var init_DataTable = __esm({
|
|
|
37896
37329
|
init_molecules2();
|
|
37897
37330
|
init_Icon();
|
|
37898
37331
|
init_useEventBus();
|
|
37899
|
-
init_useTranslate();
|
|
37900
37332
|
init_types3();
|
|
37901
37333
|
lookStyles9 = {
|
|
37902
37334
|
dense: "",
|
|
@@ -37914,7 +37346,7 @@ function DebuggerBoard({
|
|
|
37914
37346
|
className
|
|
37915
37347
|
}) {
|
|
37916
37348
|
const { emit } = useEventBus();
|
|
37917
|
-
const { t } = useTranslate();
|
|
37349
|
+
const { t } = hooks.useTranslate();
|
|
37918
37350
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
37919
37351
|
const [flaggedLines, setFlaggedLines] = React84.useState(/* @__PURE__ */ new Set());
|
|
37920
37352
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -38043,7 +37475,6 @@ var init_DebuggerBoard = __esm({
|
|
|
38043
37475
|
"components/game/organisms/puzzles/debugger/DebuggerBoard.tsx"() {
|
|
38044
37476
|
init_atoms2();
|
|
38045
37477
|
init_useEventBus();
|
|
38046
|
-
init_useTranslate();
|
|
38047
37478
|
DebuggerBoard.displayName = "DebuggerBoard";
|
|
38048
37479
|
}
|
|
38049
37480
|
});
|
|
@@ -38214,7 +37645,6 @@ var init_DetailPanel = __esm({
|
|
|
38214
37645
|
init_cn();
|
|
38215
37646
|
init_getNestedValue();
|
|
38216
37647
|
init_useEventBus();
|
|
38217
|
-
init_useTranslate();
|
|
38218
37648
|
ReactMarkdown2 = React84.lazy(() => import('react-markdown'));
|
|
38219
37649
|
DetailPanel = ({
|
|
38220
37650
|
title: propTitle,
|
|
@@ -38234,7 +37664,7 @@ var init_DetailPanel = __esm({
|
|
|
38234
37664
|
error
|
|
38235
37665
|
}) => {
|
|
38236
37666
|
const eventBus = useEventBus();
|
|
38237
|
-
const { t } = useTranslate();
|
|
37667
|
+
const { t } = hooks.useTranslate();
|
|
38238
37668
|
const isFieldDefArray = (arr) => {
|
|
38239
37669
|
if (!arr || arr.length === 0) return false;
|
|
38240
37670
|
const first = arr[0];
|
|
@@ -38632,7 +38062,7 @@ function CompactView({
|
|
|
38632
38062
|
stateStyles,
|
|
38633
38063
|
className
|
|
38634
38064
|
}) {
|
|
38635
|
-
const { t } = useTranslate();
|
|
38065
|
+
const { t } = hooks.useTranslate();
|
|
38636
38066
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38637
38067
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38638
38068
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38668,7 +38098,7 @@ function FullView({
|
|
|
38668
38098
|
stateStyles,
|
|
38669
38099
|
className
|
|
38670
38100
|
}) {
|
|
38671
|
-
const { t } = useTranslate();
|
|
38101
|
+
const { t } = hooks.useTranslate();
|
|
38672
38102
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38673
38103
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38674
38104
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38793,7 +38223,6 @@ var init_TraitStateViewer = __esm({
|
|
|
38793
38223
|
"components/game/organisms/TraitStateViewer.tsx"() {
|
|
38794
38224
|
"use client";
|
|
38795
38225
|
init_cn();
|
|
38796
|
-
init_useTranslate();
|
|
38797
38226
|
init_Box();
|
|
38798
38227
|
init_Typography();
|
|
38799
38228
|
init_Stack();
|
|
@@ -38815,7 +38244,7 @@ function RuleEditor({
|
|
|
38815
38244
|
disabled = false,
|
|
38816
38245
|
className
|
|
38817
38246
|
}) {
|
|
38818
|
-
const { t } = useTranslate();
|
|
38247
|
+
const { t } = hooks.useTranslate();
|
|
38819
38248
|
const handleWhenChange = React84.useCallback((e) => {
|
|
38820
38249
|
onChange({ ...rule, whenEvent: e.target.value });
|
|
38821
38250
|
}, [rule, onChange]);
|
|
@@ -38852,7 +38281,6 @@ var init_RuleEditor = __esm({
|
|
|
38852
38281
|
"components/game/organisms/puzzles/event-handler/RuleEditor.tsx"() {
|
|
38853
38282
|
init_atoms2();
|
|
38854
38283
|
init_cn();
|
|
38855
|
-
init_useTranslate();
|
|
38856
38284
|
RuleEditor.displayName = "RuleEditor";
|
|
38857
38285
|
}
|
|
38858
38286
|
});
|
|
@@ -38862,7 +38290,7 @@ function ObjectRulePanel({
|
|
|
38862
38290
|
disabled = false,
|
|
38863
38291
|
className
|
|
38864
38292
|
}) {
|
|
38865
|
-
const { t } = useTranslate();
|
|
38293
|
+
const { t } = hooks.useTranslate();
|
|
38866
38294
|
const maxRules = object.maxRules || 3;
|
|
38867
38295
|
const canAdd = object.rules.length < maxRules;
|
|
38868
38296
|
const handleRuleChange = React84.useCallback((index, updatedRule) => {
|
|
@@ -38927,7 +38355,6 @@ var init_ObjectRulePanel = __esm({
|
|
|
38927
38355
|
"components/game/organisms/puzzles/event-handler/ObjectRulePanel.tsx"() {
|
|
38928
38356
|
init_atoms2();
|
|
38929
38357
|
init_cn();
|
|
38930
|
-
init_useTranslate();
|
|
38931
38358
|
init_TraitStateViewer();
|
|
38932
38359
|
init_RuleEditor();
|
|
38933
38360
|
nextRuleId = 1;
|
|
@@ -38940,7 +38367,7 @@ function EventLog({
|
|
|
38940
38367
|
label,
|
|
38941
38368
|
className
|
|
38942
38369
|
}) {
|
|
38943
|
-
const { t } = useTranslate();
|
|
38370
|
+
const { t } = hooks.useTranslate();
|
|
38944
38371
|
const scrollRef = React84.useRef(null);
|
|
38945
38372
|
React84.useEffect(() => {
|
|
38946
38373
|
if (scrollRef.current) {
|
|
@@ -38972,7 +38399,6 @@ var init_EventLog = __esm({
|
|
|
38972
38399
|
"components/game/organisms/puzzles/event-handler/EventLog.tsx"() {
|
|
38973
38400
|
init_atoms2();
|
|
38974
38401
|
init_cn();
|
|
38975
|
-
init_useTranslate();
|
|
38976
38402
|
STATUS_STYLES = {
|
|
38977
38403
|
pending: "text-muted-foreground",
|
|
38978
38404
|
active: "text-primary animate-pulse",
|
|
@@ -38996,7 +38422,7 @@ function EventHandlerBoard({
|
|
|
38996
38422
|
className
|
|
38997
38423
|
}) {
|
|
38998
38424
|
const { emit } = useEventBus();
|
|
38999
|
-
const { t } = useTranslate();
|
|
38425
|
+
const { t } = hooks.useTranslate();
|
|
39000
38426
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
39001
38427
|
const entityObjects = resolved?.objects ?? [];
|
|
39002
38428
|
const [objects, setObjects] = React84.useState(entityObjects);
|
|
@@ -39186,7 +38612,6 @@ var init_EventHandlerBoard = __esm({
|
|
|
39186
38612
|
init_atoms2();
|
|
39187
38613
|
init_cn();
|
|
39188
38614
|
init_useEventBus();
|
|
39189
|
-
init_useTranslate();
|
|
39190
38615
|
init_TraitStateViewer();
|
|
39191
38616
|
init_ObjectRulePanel();
|
|
39192
38617
|
init_EventLog();
|
|
@@ -39256,7 +38681,6 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39256
38681
|
"use client";
|
|
39257
38682
|
init_cn();
|
|
39258
38683
|
init_useEventBus();
|
|
39259
|
-
init_useTranslate();
|
|
39260
38684
|
init_Stack();
|
|
39261
38685
|
init_Typography();
|
|
39262
38686
|
init_FeatureGrid();
|
|
@@ -39272,7 +38696,7 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39272
38696
|
subtitle
|
|
39273
38697
|
}) => {
|
|
39274
38698
|
const eventBus = useEventBus();
|
|
39275
|
-
const { t } = useTranslate();
|
|
38699
|
+
const { t } = hooks.useTranslate();
|
|
39276
38700
|
const items = React84.useMemo(
|
|
39277
38701
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
39278
38702
|
[entity]
|
|
@@ -39439,7 +38863,6 @@ var init_Form = __esm({
|
|
|
39439
38863
|
init_RelationSelect();
|
|
39440
38864
|
init_Alert();
|
|
39441
38865
|
init_useEventBus();
|
|
39442
|
-
init_useTranslate();
|
|
39443
38866
|
init_debug();
|
|
39444
38867
|
layoutStyles = {
|
|
39445
38868
|
vertical: "flex flex-col",
|
|
@@ -39490,7 +38913,7 @@ var init_Form = __esm({
|
|
|
39490
38913
|
...props
|
|
39491
38914
|
}) => {
|
|
39492
38915
|
const eventBus = useEventBus();
|
|
39493
|
-
const { t } = useTranslate();
|
|
38916
|
+
const { t } = hooks.useTranslate();
|
|
39494
38917
|
const resolvedSubmitLabel = submitLabel ?? t("common.save");
|
|
39495
38918
|
const resolvedCancelLabel = cancelLabel ?? t("common.cancel");
|
|
39496
38919
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
@@ -40599,7 +40022,6 @@ var init_HeroOrganism = __esm({
|
|
|
40599
40022
|
"use client";
|
|
40600
40023
|
init_cn();
|
|
40601
40024
|
init_useEventBus();
|
|
40602
|
-
init_useTranslate();
|
|
40603
40025
|
init_HeroSection();
|
|
40604
40026
|
init_LoadingState();
|
|
40605
40027
|
init_ErrorState();
|
|
@@ -40611,7 +40033,7 @@ var init_HeroOrganism = __esm({
|
|
|
40611
40033
|
children
|
|
40612
40034
|
}) => {
|
|
40613
40035
|
const eventBus = useEventBus();
|
|
40614
|
-
const { t } = useTranslate();
|
|
40036
|
+
const { t } = hooks.useTranslate();
|
|
40615
40037
|
const resolved = React84.useMemo(
|
|
40616
40038
|
() => Array.isArray(entity) ? entity[0] : entity && typeof entity === "object" ? entity : void 0,
|
|
40617
40039
|
[entity]
|
|
@@ -40705,7 +40127,6 @@ var LandingPageTemplate;
|
|
|
40705
40127
|
var init_LandingPageTemplate = __esm({
|
|
40706
40128
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
40707
40129
|
init_cn();
|
|
40708
|
-
init_useTranslate();
|
|
40709
40130
|
init_Stack();
|
|
40710
40131
|
init_Box();
|
|
40711
40132
|
init_Container();
|
|
@@ -40723,7 +40144,7 @@ var init_LandingPageTemplate = __esm({
|
|
|
40723
40144
|
featureColumns = 3,
|
|
40724
40145
|
className
|
|
40725
40146
|
}) => {
|
|
40726
|
-
const { t } = useTranslate();
|
|
40147
|
+
const { t } = hooks.useTranslate();
|
|
40727
40148
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
40728
40149
|
if (!resolved) return null;
|
|
40729
40150
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -40905,7 +40326,6 @@ var init_List = __esm({
|
|
|
40905
40326
|
init_cn();
|
|
40906
40327
|
init_getNestedValue();
|
|
40907
40328
|
init_useEventBus();
|
|
40908
|
-
init_useTranslate();
|
|
40909
40329
|
init_types3();
|
|
40910
40330
|
STATUS_STYLES2 = {
|
|
40911
40331
|
complete: {
|
|
@@ -41030,7 +40450,7 @@ var init_List = __esm({
|
|
|
41030
40450
|
entityType
|
|
41031
40451
|
}) => {
|
|
41032
40452
|
const eventBus = useEventBus();
|
|
41033
|
-
const { t } = useTranslate();
|
|
40453
|
+
const { t } = hooks.useTranslate();
|
|
41034
40454
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noData");
|
|
41035
40455
|
const effectiveFieldNames = normalizeFields2(fields).length > 0 ? normalizeFields2(fields) : fieldNames;
|
|
41036
40456
|
const rawItems = React84.useMemo(() => {
|
|
@@ -41377,7 +40797,7 @@ function MasterDetail({
|
|
|
41377
40797
|
className,
|
|
41378
40798
|
...rest
|
|
41379
40799
|
}) {
|
|
41380
|
-
const { t } = useTranslate();
|
|
40800
|
+
const { t } = hooks.useTranslate();
|
|
41381
40801
|
const loading = externalLoading ?? false;
|
|
41382
40802
|
const isLoading = externalIsLoading ?? false;
|
|
41383
40803
|
const error = externalError ?? null;
|
|
@@ -41400,7 +40820,6 @@ var init_MasterDetail = __esm({
|
|
|
41400
40820
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41401
40821
|
"use client";
|
|
41402
40822
|
init_DataTable();
|
|
41403
|
-
init_useTranslate();
|
|
41404
40823
|
MasterDetail.displayName = "MasterDetail";
|
|
41405
40824
|
}
|
|
41406
40825
|
});
|
|
@@ -41409,9 +40828,8 @@ var init_MasterDetailLayout = __esm({
|
|
|
41409
40828
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41410
40829
|
init_cn();
|
|
41411
40830
|
init_Typography();
|
|
41412
|
-
init_useTranslate();
|
|
41413
40831
|
DefaultEmptyDetail = () => {
|
|
41414
|
-
const { t } = useTranslate();
|
|
40832
|
+
const { t } = hooks.useTranslate();
|
|
41415
40833
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
41416
40834
|
Typography,
|
|
41417
40835
|
{
|
|
@@ -41470,7 +40888,6 @@ var init_MediaGallery = __esm({
|
|
|
41470
40888
|
init_ErrorState();
|
|
41471
40889
|
init_EmptyState();
|
|
41472
40890
|
init_useEventBus();
|
|
41473
|
-
init_useTranslate();
|
|
41474
40891
|
COLUMN_CLASSES = {
|
|
41475
40892
|
2: "grid-cols-2",
|
|
41476
40893
|
3: "grid-cols-2 sm:grid-cols-3",
|
|
@@ -41499,7 +40916,7 @@ var init_MediaGallery = __esm({
|
|
|
41499
40916
|
className
|
|
41500
40917
|
}) => {
|
|
41501
40918
|
const eventBus = useEventBus();
|
|
41502
|
-
const { t } = useTranslate();
|
|
40919
|
+
const { t } = hooks.useTranslate();
|
|
41503
40920
|
const [lightboxItem, setLightboxItem] = React84.useState(null);
|
|
41504
40921
|
const closeLightbox = React84.useCallback(() => setLightboxItem(null), []);
|
|
41505
40922
|
useEventListener("UI:LIGHTBOX_CLOSE", closeLightbox);
|
|
@@ -41741,7 +41158,7 @@ function NegotiatorBoard({
|
|
|
41741
41158
|
className
|
|
41742
41159
|
}) {
|
|
41743
41160
|
const { emit } = useEventBus();
|
|
41744
|
-
const { t } = useTranslate();
|
|
41161
|
+
const { t } = hooks.useTranslate();
|
|
41745
41162
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
41746
41163
|
const [history, setHistory] = React84.useState([]);
|
|
41747
41164
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -41871,7 +41288,6 @@ var init_NegotiatorBoard = __esm({
|
|
|
41871
41288
|
"components/game/organisms/puzzles/negotiator/NegotiatorBoard.tsx"() {
|
|
41872
41289
|
init_atoms2();
|
|
41873
41290
|
init_useEventBus();
|
|
41874
|
-
init_useTranslate();
|
|
41875
41291
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
41876
41292
|
}
|
|
41877
41293
|
});
|
|
@@ -41881,7 +41297,6 @@ var init_PricingOrganism = __esm({
|
|
|
41881
41297
|
"use client";
|
|
41882
41298
|
init_cn();
|
|
41883
41299
|
init_useEventBus();
|
|
41884
|
-
init_useTranslate();
|
|
41885
41300
|
init_Stack();
|
|
41886
41301
|
init_Typography();
|
|
41887
41302
|
init_PricingGrid();
|
|
@@ -41896,7 +41311,7 @@ var init_PricingOrganism = __esm({
|
|
|
41896
41311
|
subtitle
|
|
41897
41312
|
}) => {
|
|
41898
41313
|
useEventBus();
|
|
41899
|
-
const { t } = useTranslate();
|
|
41314
|
+
const { t } = hooks.useTranslate();
|
|
41900
41315
|
const items = React84.useMemo(
|
|
41901
41316
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
41902
41317
|
[entity]
|
|
@@ -41931,7 +41346,6 @@ var PricingPageTemplate;
|
|
|
41931
41346
|
var init_PricingPageTemplate = __esm({
|
|
41932
41347
|
"components/marketing/templates/PricingPageTemplate.tsx"() {
|
|
41933
41348
|
init_cn();
|
|
41934
|
-
init_useTranslate();
|
|
41935
41349
|
init_Stack();
|
|
41936
41350
|
init_Box();
|
|
41937
41351
|
init_Container();
|
|
@@ -41944,7 +41358,7 @@ var init_PricingPageTemplate = __esm({
|
|
|
41944
41358
|
entity,
|
|
41945
41359
|
className
|
|
41946
41360
|
}) => {
|
|
41947
|
-
const { t } = useTranslate();
|
|
41361
|
+
const { t } = hooks.useTranslate();
|
|
41948
41362
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
41949
41363
|
if (!resolved) return null;
|
|
41950
41364
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -42446,7 +41860,7 @@ var init_WalkMinimap = __esm({
|
|
|
42446
41860
|
}
|
|
42447
41861
|
});
|
|
42448
41862
|
function TraitsTab({ traits: traits2 }) {
|
|
42449
|
-
const { t } = useTranslate();
|
|
41863
|
+
const { t } = hooks.useTranslate();
|
|
42450
41864
|
if (traits2.length === 0) {
|
|
42451
41865
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42452
41866
|
EmptyState,
|
|
@@ -42514,12 +41928,11 @@ var init_TraitsTab = __esm({
|
|
|
42514
41928
|
init_Typography();
|
|
42515
41929
|
init_Stack();
|
|
42516
41930
|
init_EmptyState();
|
|
42517
|
-
init_useTranslate();
|
|
42518
41931
|
TraitsTab.displayName = "TraitsTab";
|
|
42519
41932
|
}
|
|
42520
41933
|
});
|
|
42521
41934
|
function TicksTab({ ticks: ticks2 }) {
|
|
42522
|
-
const { t } = useTranslate();
|
|
41935
|
+
const { t } = hooks.useTranslate();
|
|
42523
41936
|
const activeTicks = ticks2.filter((t2) => t2.active);
|
|
42524
41937
|
const inactiveTicks = ticks2.filter((t2) => !t2.active);
|
|
42525
41938
|
if (ticks2.length === 0) {
|
|
@@ -42592,12 +42005,11 @@ var init_TicksTab = __esm({
|
|
|
42592
42005
|
init_Stack();
|
|
42593
42006
|
init_Card();
|
|
42594
42007
|
init_EmptyState();
|
|
42595
|
-
init_useTranslate();
|
|
42596
42008
|
TicksTab.displayName = "TicksTab";
|
|
42597
42009
|
}
|
|
42598
42010
|
});
|
|
42599
42011
|
function EntitiesTab({ snapshot }) {
|
|
42600
|
-
const { t } = useTranslate();
|
|
42012
|
+
const { t } = hooks.useTranslate();
|
|
42601
42013
|
if (!snapshot) {
|
|
42602
42014
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42603
42015
|
EmptyState,
|
|
@@ -42666,12 +42078,11 @@ var init_EntitiesTab = __esm({
|
|
|
42666
42078
|
init_Typography();
|
|
42667
42079
|
init_Stack();
|
|
42668
42080
|
init_EmptyState();
|
|
42669
|
-
init_useTranslate();
|
|
42670
42081
|
EntitiesTab.displayName = "EntitiesTab";
|
|
42671
42082
|
}
|
|
42672
42083
|
});
|
|
42673
42084
|
function EventFlowTab({ events: events2 }) {
|
|
42674
|
-
const { t } = useTranslate();
|
|
42085
|
+
const { t } = hooks.useTranslate();
|
|
42675
42086
|
const [filter, setFilter] = React84__namespace.useState("all");
|
|
42676
42087
|
const containerRef = React84__namespace.useRef(null);
|
|
42677
42088
|
const [autoScroll, setAutoScroll] = React84__namespace.useState(true);
|
|
@@ -42783,7 +42194,6 @@ var init_EventFlowTab = __esm({
|
|
|
42783
42194
|
init_Button();
|
|
42784
42195
|
init_Checkbox();
|
|
42785
42196
|
init_EmptyState();
|
|
42786
|
-
init_useTranslate();
|
|
42787
42197
|
TYPE_BADGES = {
|
|
42788
42198
|
trait: { variant: "primary", icon: "\u{1F504}" },
|
|
42789
42199
|
tick: { variant: "warning", icon: "\u23F1\uFE0F" },
|
|
@@ -42796,7 +42206,7 @@ var init_EventFlowTab = __esm({
|
|
|
42796
42206
|
}
|
|
42797
42207
|
});
|
|
42798
42208
|
function GuardsPanel({ guards }) {
|
|
42799
|
-
const { t } = useTranslate();
|
|
42209
|
+
const { t } = hooks.useTranslate();
|
|
42800
42210
|
const [filter, setFilter] = React84__namespace.useState("all");
|
|
42801
42211
|
if (guards.length === 0) {
|
|
42802
42212
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42878,12 +42288,11 @@ var init_GuardsPanel = __esm({
|
|
|
42878
42288
|
init_ButtonGroup();
|
|
42879
42289
|
init_Button();
|
|
42880
42290
|
init_EmptyState();
|
|
42881
|
-
init_useTranslate();
|
|
42882
42291
|
GuardsPanel.displayName = "GuardsPanel";
|
|
42883
42292
|
}
|
|
42884
42293
|
});
|
|
42885
42294
|
function VerificationTab({ checks, summary }) {
|
|
42886
|
-
const { t } = useTranslate();
|
|
42295
|
+
const { t } = hooks.useTranslate();
|
|
42887
42296
|
if (checks.length === 0) {
|
|
42888
42297
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42889
42298
|
EmptyState,
|
|
@@ -42954,7 +42363,6 @@ var init_VerificationTab = __esm({
|
|
|
42954
42363
|
init_Typography();
|
|
42955
42364
|
init_Stack();
|
|
42956
42365
|
init_EmptyState();
|
|
42957
|
-
init_useTranslate();
|
|
42958
42366
|
STATUS_CONFIG = {
|
|
42959
42367
|
pass: { variant: "success", icon: "\u2713", label: "PASS" },
|
|
42960
42368
|
fail: { variant: "danger", icon: "\u2717", label: "FAIL" },
|
|
@@ -42974,7 +42382,7 @@ function EffectBadge({ effect }) {
|
|
|
42974
42382
|
] });
|
|
42975
42383
|
}
|
|
42976
42384
|
function TransitionTimeline({ transitions }) {
|
|
42977
|
-
const { t } = useTranslate();
|
|
42385
|
+
const { t } = hooks.useTranslate();
|
|
42978
42386
|
const containerRef = React84__namespace.useRef(null);
|
|
42979
42387
|
const [autoScroll, setAutoScroll] = React84__namespace.useState(true);
|
|
42980
42388
|
const [expandedId, setExpandedId] = React84__namespace.useState(null);
|
|
@@ -43090,7 +42498,6 @@ var init_TransitionTimeline = __esm({
|
|
|
43090
42498
|
init_Typography();
|
|
43091
42499
|
init_EmptyState();
|
|
43092
42500
|
init_Checkbox();
|
|
43093
|
-
init_useTranslate();
|
|
43094
42501
|
EFFECT_STATUS_VARIANT = {
|
|
43095
42502
|
executed: "success",
|
|
43096
42503
|
failed: "danger",
|
|
@@ -43106,7 +42513,7 @@ function StatRow({ label, value, variant }) {
|
|
|
43106
42513
|
] });
|
|
43107
42514
|
}
|
|
43108
42515
|
function ServerBridgeTab({ bridge }) {
|
|
43109
|
-
const { t } = useTranslate();
|
|
42516
|
+
const { t } = hooks.useTranslate();
|
|
43110
42517
|
if (!bridge) {
|
|
43111
42518
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43112
42519
|
EmptyState,
|
|
@@ -43180,7 +42587,6 @@ var init_ServerBridgeTab = __esm({
|
|
|
43180
42587
|
init_Stack();
|
|
43181
42588
|
init_Card();
|
|
43182
42589
|
init_EmptyState();
|
|
43183
|
-
init_useTranslate();
|
|
43184
42590
|
ServerBridgeTab.displayName = "ServerBridgeTab";
|
|
43185
42591
|
}
|
|
43186
42592
|
});
|
|
@@ -43259,7 +42665,7 @@ function getAllEvents(traits2) {
|
|
|
43259
42665
|
}
|
|
43260
42666
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43261
42667
|
const eventBus = useEventBus();
|
|
43262
|
-
const { t } = useTranslate();
|
|
42668
|
+
const { t } = hooks.useTranslate();
|
|
43263
42669
|
const [log12, setLog] = React84__namespace.useState([]);
|
|
43264
42670
|
const prevStatesRef = React84__namespace.useRef(/* @__PURE__ */ new Map());
|
|
43265
42671
|
React84__namespace.useEffect(() => {
|
|
@@ -43345,7 +42751,6 @@ var init_EventDispatcherTab = __esm({
|
|
|
43345
42751
|
init_Stack();
|
|
43346
42752
|
init_EmptyState();
|
|
43347
42753
|
init_useEventBus();
|
|
43348
|
-
init_useTranslate();
|
|
43349
42754
|
EventDispatcherTab.displayName = "EventDispatcherTab";
|
|
43350
42755
|
}
|
|
43351
42756
|
});
|
|
@@ -43356,7 +42761,7 @@ var init_RuntimeDebugger = __esm({
|
|
|
43356
42761
|
}
|
|
43357
42762
|
});
|
|
43358
42763
|
function ServerResponseRow({ sr }) {
|
|
43359
|
-
const { t } = useTranslate();
|
|
42764
|
+
const { t } = hooks.useTranslate();
|
|
43360
42765
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43361
42766
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43362
42767
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -43382,7 +42787,7 @@ function ServerResponseRow({ sr }) {
|
|
|
43382
42787
|
] });
|
|
43383
42788
|
}
|
|
43384
42789
|
function TransitionRow({ trace }) {
|
|
43385
|
-
const { t } = useTranslate();
|
|
42790
|
+
const { t } = hooks.useTranslate();
|
|
43386
42791
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43387
42792
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43388
42793
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43431,7 +42836,7 @@ function VerifyModePanel({
|
|
|
43431
42836
|
serverCount,
|
|
43432
42837
|
localCount
|
|
43433
42838
|
}) {
|
|
43434
|
-
const { t } = useTranslate();
|
|
42839
|
+
const { t } = hooks.useTranslate();
|
|
43435
42840
|
const [expanded, setExpanded] = React84__namespace.useState(true);
|
|
43436
42841
|
const scrollRef = React84__namespace.useRef(null);
|
|
43437
42842
|
const prevCountRef = React84__namespace.useRef(0);
|
|
@@ -43491,7 +42896,7 @@ function RuntimeDebugger({
|
|
|
43491
42896
|
defaultTab,
|
|
43492
42897
|
schema
|
|
43493
42898
|
}) {
|
|
43494
|
-
const { t } = useTranslate();
|
|
42899
|
+
const { t } = hooks.useTranslate();
|
|
43495
42900
|
const [isCollapsed, setIsCollapsed] = React84__namespace.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43496
42901
|
const [isVisible, setIsVisible] = React84__namespace.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43497
42902
|
const debugData = useDebugData();
|
|
@@ -43720,7 +43125,6 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43720
43125
|
init_TransitionTimeline();
|
|
43721
43126
|
init_ServerBridgeTab();
|
|
43722
43127
|
init_EventDispatcherTab();
|
|
43723
|
-
init_useTranslate();
|
|
43724
43128
|
init_RuntimeDebugger();
|
|
43725
43129
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43726
43130
|
}
|
|
@@ -44014,7 +43418,7 @@ function SequencerBoard({
|
|
|
44014
43418
|
className
|
|
44015
43419
|
}) {
|
|
44016
43420
|
const { emit } = useEventBus();
|
|
44017
|
-
const { t } = useTranslate();
|
|
43421
|
+
const { t } = hooks.useTranslate();
|
|
44018
43422
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44019
43423
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
44020
43424
|
const [slots, setSlots] = React84.useState(
|
|
@@ -44207,7 +43611,6 @@ var init_SequencerBoard = __esm({
|
|
|
44207
43611
|
init_atoms2();
|
|
44208
43612
|
init_cn();
|
|
44209
43613
|
init_useEventBus();
|
|
44210
|
-
init_useTranslate();
|
|
44211
43614
|
init_TraitStateViewer();
|
|
44212
43615
|
init_SequenceBar();
|
|
44213
43616
|
init_ActionPalette();
|
|
@@ -44226,7 +43629,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44226
43629
|
"use client";
|
|
44227
43630
|
init_cn();
|
|
44228
43631
|
init_useEventBus();
|
|
44229
|
-
init_useTranslate();
|
|
44230
43632
|
init_Stack();
|
|
44231
43633
|
init_Typography();
|
|
44232
43634
|
init_SimpleGrid();
|
|
@@ -44243,7 +43645,7 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44243
43645
|
subtitle
|
|
44244
43646
|
}) => {
|
|
44245
43647
|
useEventBus();
|
|
44246
|
-
const { t } = useTranslate();
|
|
43648
|
+
const { t } = hooks.useTranslate();
|
|
44247
43649
|
const items = React84.useMemo(
|
|
44248
43650
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
44249
43651
|
[entity]
|
|
@@ -44637,7 +44039,7 @@ function SimulatorBoard({
|
|
|
44637
44039
|
className
|
|
44638
44040
|
}) {
|
|
44639
44041
|
const { emit } = useEventBus();
|
|
44640
|
-
const { t } = useTranslate();
|
|
44042
|
+
const { t } = hooks.useTranslate();
|
|
44641
44043
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44642
44044
|
const parameters = resolved?.parameters ?? [];
|
|
44643
44045
|
const [values, setValues] = React84.useState(() => {
|
|
@@ -44785,7 +44187,6 @@ var init_SimulatorBoard = __esm({
|
|
|
44785
44187
|
"components/game/organisms/puzzles/simulator/SimulatorBoard.tsx"() {
|
|
44786
44188
|
init_atoms2();
|
|
44787
44189
|
init_useEventBus();
|
|
44788
|
-
init_useTranslate();
|
|
44789
44190
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
44790
44191
|
}
|
|
44791
44192
|
});
|
|
@@ -44890,7 +44291,6 @@ var init_StatCard = __esm({
|
|
|
44890
44291
|
init_Button();
|
|
44891
44292
|
init_Sparkline();
|
|
44892
44293
|
init_useEventBus();
|
|
44893
|
-
init_useTranslate();
|
|
44894
44294
|
init_Icon();
|
|
44895
44295
|
StatCard = ({
|
|
44896
44296
|
label: propLabel,
|
|
@@ -44917,7 +44317,7 @@ var init_StatCard = __esm({
|
|
|
44917
44317
|
const Icon3 = typeof iconProp === "string" ? resolveIcon(iconProp) ?? void 0 : iconProp;
|
|
44918
44318
|
const labelToUse = propLabel ?? propTitle;
|
|
44919
44319
|
const eventBus = useEventBus();
|
|
44920
|
-
const { t } = useTranslate();
|
|
44320
|
+
const { t } = hooks.useTranslate();
|
|
44921
44321
|
const handleActionClick = React84__namespace.default.useCallback(() => {
|
|
44922
44322
|
if (action?.event) {
|
|
44923
44323
|
eventBus.emit(`UI:${action.event}`, {});
|
|
@@ -45208,7 +44608,7 @@ function VariablePanel({
|
|
|
45208
44608
|
variables,
|
|
45209
44609
|
className
|
|
45210
44610
|
}) {
|
|
45211
|
-
const { t } = useTranslate();
|
|
44611
|
+
const { t } = hooks.useTranslate();
|
|
45212
44612
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
45213
44613
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: t("stateArchitect.variables", { name: entityName }) }),
|
|
45214
44614
|
variables.map((v) => {
|
|
@@ -45246,7 +44646,6 @@ var init_VariablePanel = __esm({
|
|
|
45246
44646
|
"components/game/organisms/puzzles/state-architect/VariablePanel.tsx"() {
|
|
45247
44647
|
init_atoms2();
|
|
45248
44648
|
init_cn();
|
|
45249
|
-
init_useTranslate();
|
|
45250
44649
|
VariablePanel.displayName = "VariablePanel";
|
|
45251
44650
|
}
|
|
45252
44651
|
});
|
|
@@ -45272,7 +44671,7 @@ function StateArchitectBoard({
|
|
|
45272
44671
|
className
|
|
45273
44672
|
}) {
|
|
45274
44673
|
const { emit } = useEventBus();
|
|
45275
|
-
const { t } = useTranslate();
|
|
44674
|
+
const { t } = hooks.useTranslate();
|
|
45276
44675
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
45277
44676
|
const [transitions, setTransitions] = React84.useState(resolved?.transitions ?? []);
|
|
45278
44677
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -45563,7 +44962,6 @@ var init_StateArchitectBoard = __esm({
|
|
|
45563
44962
|
init_atoms2();
|
|
45564
44963
|
init_cn();
|
|
45565
44964
|
init_useEventBus();
|
|
45566
|
-
init_useTranslate();
|
|
45567
44965
|
init_TraitStateViewer();
|
|
45568
44966
|
init_StateNode();
|
|
45569
44967
|
init_TransitionArrow();
|
|
@@ -45583,7 +44981,6 @@ var init_StatsOrganism = __esm({
|
|
|
45583
44981
|
"components/marketing/organisms/StatsOrganism.tsx"() {
|
|
45584
44982
|
"use client";
|
|
45585
44983
|
init_cn();
|
|
45586
|
-
init_useTranslate();
|
|
45587
44984
|
init_StatsGrid();
|
|
45588
44985
|
init_LoadingState();
|
|
45589
44986
|
init_ErrorState();
|
|
@@ -45594,7 +44991,7 @@ var init_StatsOrganism = __esm({
|
|
|
45594
44991
|
className,
|
|
45595
44992
|
columns = 3
|
|
45596
44993
|
}) => {
|
|
45597
|
-
const { t } = useTranslate();
|
|
44994
|
+
const { t } = hooks.useTranslate();
|
|
45598
44995
|
const items = React84.useMemo(
|
|
45599
44996
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45600
44997
|
[entity]
|
|
@@ -45626,7 +45023,6 @@ var init_StepFlowOrganism = __esm({
|
|
|
45626
45023
|
"components/core/organisms/StepFlowOrganism.tsx"() {
|
|
45627
45024
|
"use client";
|
|
45628
45025
|
init_cn();
|
|
45629
|
-
init_useTranslate();
|
|
45630
45026
|
init_Stack();
|
|
45631
45027
|
init_Typography();
|
|
45632
45028
|
init_StepFlow();
|
|
@@ -45642,7 +45038,7 @@ var init_StepFlowOrganism = __esm({
|
|
|
45642
45038
|
heading,
|
|
45643
45039
|
subtitle
|
|
45644
45040
|
}) => {
|
|
45645
|
-
const { t } = useTranslate();
|
|
45041
|
+
const { t } = hooks.useTranslate();
|
|
45646
45042
|
const items = React84.useMemo(
|
|
45647
45043
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45648
45044
|
[entity]
|
|
@@ -45796,7 +45192,6 @@ var init_TeamOrganism = __esm({
|
|
|
45796
45192
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
45797
45193
|
"use client";
|
|
45798
45194
|
init_cn();
|
|
45799
|
-
init_useTranslate();
|
|
45800
45195
|
init_Stack();
|
|
45801
45196
|
init_Typography();
|
|
45802
45197
|
init_SimpleGrid();
|
|
@@ -45811,7 +45206,7 @@ var init_TeamOrganism = __esm({
|
|
|
45811
45206
|
heading,
|
|
45812
45207
|
subtitle
|
|
45813
45208
|
}) => {
|
|
45814
|
-
const { t } = useTranslate();
|
|
45209
|
+
const { t } = hooks.useTranslate();
|
|
45815
45210
|
const items = React84.useMemo(
|
|
45816
45211
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45817
45212
|
[entity]
|
|
@@ -45854,7 +45249,6 @@ var init_Timeline = __esm({
|
|
|
45854
45249
|
init_LoadingState();
|
|
45855
45250
|
init_ErrorState();
|
|
45856
45251
|
init_EmptyState();
|
|
45857
|
-
init_useTranslate();
|
|
45858
45252
|
lookStyles10 = {
|
|
45859
45253
|
"vertical-compact": "gap-1 [&>*]:py-1",
|
|
45860
45254
|
"vertical-spacious": "",
|
|
@@ -45894,7 +45288,7 @@ var init_Timeline = __esm({
|
|
|
45894
45288
|
className,
|
|
45895
45289
|
look = "vertical-spacious"
|
|
45896
45290
|
}) => {
|
|
45897
|
-
const { t } = useTranslate();
|
|
45291
|
+
const { t } = hooks.useTranslate();
|
|
45898
45292
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45899
45293
|
const items = React84__namespace.default.useMemo(() => {
|
|
45900
45294
|
if (propItems) return propItems;
|
|
@@ -47346,7 +46740,7 @@ function UISlotComponent({
|
|
|
47346
46740
|
}) {
|
|
47347
46741
|
const { slots, clear } = context.useUISlots();
|
|
47348
46742
|
const eventBus = useEventBus();
|
|
47349
|
-
const { t } = useTranslate();
|
|
46743
|
+
const { t } = hooks.useTranslate();
|
|
47350
46744
|
const suspenseConfig = React84.useContext(SuspenseConfigContext);
|
|
47351
46745
|
const contained = React84.useContext(SlotContainedContext);
|
|
47352
46746
|
const content = slots[slot];
|
|
@@ -47448,7 +46842,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
47448
46842
|
const [portalRoot, setPortalRoot] = React84.useState(null);
|
|
47449
46843
|
const slotsBus = context.useUISlots();
|
|
47450
46844
|
const eventBus = useEventBus();
|
|
47451
|
-
const { t } = useTranslate();
|
|
46845
|
+
const { t } = hooks.useTranslate();
|
|
47452
46846
|
React84.useEffect(() => {
|
|
47453
46847
|
setPortalRoot(getOrCreatePortalRoot());
|
|
47454
46848
|
}, []);
|
|
@@ -47738,7 +47132,7 @@ function SlotContentRenderer({
|
|
|
47738
47132
|
}
|
|
47739
47133
|
}
|
|
47740
47134
|
const eventBus = useEventBus();
|
|
47741
|
-
const { t } = useTranslate();
|
|
47135
|
+
const { t } = hooks.useTranslate();
|
|
47742
47136
|
const schemaCtx = useEntitySchemaOptional();
|
|
47743
47137
|
let entityDef;
|
|
47744
47138
|
if (typeof entityProp === "string" && entityProp.length > 0 && schemaCtx) {
|
|
@@ -47926,7 +47320,6 @@ var init_UISlotRenderer = __esm({
|
|
|
47926
47320
|
init_Box();
|
|
47927
47321
|
init_Typography();
|
|
47928
47322
|
init_useEventBus();
|
|
47929
|
-
init_useTranslate();
|
|
47930
47323
|
init_slot_types();
|
|
47931
47324
|
init_cn();
|
|
47932
47325
|
init_ErrorBoundary();
|
|
@@ -47982,10 +47375,7 @@ var init_UISlotRenderer = __esm({
|
|
|
47982
47375
|
UISlotRenderer.displayName = "UISlotRenderer";
|
|
47983
47376
|
}
|
|
47984
47377
|
});
|
|
47985
|
-
|
|
47986
|
-
// hooks/index.ts
|
|
47987
|
-
init_useEventBus();
|
|
47988
|
-
var log2 = logger.createLogger("almadar:ui:effects:client-handlers");
|
|
47378
|
+
var log = logger.createLogger("almadar:ui:effects:client-handlers");
|
|
47989
47379
|
function createClientEffectHandlers(options) {
|
|
47990
47380
|
const { eventBus, slotSetter, navigate, notify, callService } = options;
|
|
47991
47381
|
return {
|
|
@@ -47994,10 +47384,10 @@ function createClientEffectHandlers(options) {
|
|
|
47994
47384
|
eventBus.emit(prefixedEvent, payload);
|
|
47995
47385
|
},
|
|
47996
47386
|
persist: async () => {
|
|
47997
|
-
|
|
47387
|
+
log.warn("persist is server-side only, ignored on client");
|
|
47998
47388
|
},
|
|
47999
47389
|
set: () => {
|
|
48000
|
-
|
|
47390
|
+
log.warn("set is server-side only, ignored on client");
|
|
48001
47391
|
},
|
|
48002
47392
|
callService: async (service, action, params) => {
|
|
48003
47393
|
if (callService) return callService(service, action, params);
|
|
@@ -48026,10 +47416,10 @@ function createClientEffectHandlers(options) {
|
|
|
48026
47416
|
slotSetter.addPattern(slot, pattern, props);
|
|
48027
47417
|
},
|
|
48028
47418
|
navigate: navigate ?? ((path) => {
|
|
48029
|
-
|
|
47419
|
+
log.warn("No navigate handler, ignoring", { path });
|
|
48030
47420
|
}),
|
|
48031
47421
|
notify: notify ?? ((msg, type) => {
|
|
48032
|
-
|
|
47422
|
+
log.debug("notify", { type, message: msg });
|
|
48033
47423
|
})
|
|
48034
47424
|
};
|
|
48035
47425
|
}
|
|
@@ -48179,7 +47569,7 @@ function normalizeEventKey(eventKey) {
|
|
|
48179
47569
|
return eventKey.startsWith("UI:") ? eventKey.slice(3) : eventKey;
|
|
48180
47570
|
}
|
|
48181
47571
|
function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
48182
|
-
const eventBus = useEventBus();
|
|
47572
|
+
const eventBus = hooks.useEventBus();
|
|
48183
47573
|
const { entities } = useEntitySchema();
|
|
48184
47574
|
const traitConfigsByName = options?.traitConfigsByName;
|
|
48185
47575
|
const orbitalsByTrait = options?.orbitalsByTrait;
|