@almadar/ui 5.21.10 → 5.21.11
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 +156 -792
- package/dist/avl/index.js +4 -640
- 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 +172 -2481
- package/dist/components/index.js +27 -2289
- package/dist/providers/index.cjs +141 -761
- package/dist/providers/index.js +1 -621
- package/dist/runtime/index.cjs +580 -1203
- package/dist/runtime/index.js +441 -1064
- 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 } = 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);
|
|
@@ -10380,7 +9538,6 @@ var init_FloatingActionButton = __esm({
|
|
|
10380
9538
|
init_Typography();
|
|
10381
9539
|
init_cn();
|
|
10382
9540
|
init_useEventBus();
|
|
10383
|
-
init_useTranslate();
|
|
10384
9541
|
FloatingActionButton = ({
|
|
10385
9542
|
action,
|
|
10386
9543
|
actionPayload,
|
|
@@ -10393,7 +9550,7 @@ var init_FloatingActionButton = __esm({
|
|
|
10393
9550
|
className
|
|
10394
9551
|
}) => {
|
|
10395
9552
|
const eventBus = useEventBus();
|
|
10396
|
-
const { t } = useTranslate();
|
|
9553
|
+
const { t } = hooks.useTranslate();
|
|
10397
9554
|
const resolvedAction = icon ? {
|
|
10398
9555
|
icon,
|
|
10399
9556
|
onClick: () => {
|
|
@@ -10564,7 +9721,7 @@ var init_MapView = __esm({
|
|
|
10564
9721
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
10565
9722
|
const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback113, useState: useState103 } = React84__namespace.default;
|
|
10566
9723
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
10567
|
-
const { useEventBus:
|
|
9724
|
+
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
10568
9725
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
10569
9726
|
const map = useMap();
|
|
10570
9727
|
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
@@ -10606,7 +9763,7 @@ var init_MapView = __esm({
|
|
|
10606
9763
|
className,
|
|
10607
9764
|
showAttribution = true
|
|
10608
9765
|
}) {
|
|
10609
|
-
const eventBus =
|
|
9766
|
+
const eventBus = useEventBus3();
|
|
10610
9767
|
const [clickedPosition, setClickedPosition] = useState103(null);
|
|
10611
9768
|
const handleMapClick = useCallback113((lat, lng) => {
|
|
10612
9769
|
if (showClickedPin) {
|
|
@@ -11263,7 +10420,7 @@ function ActionTile({
|
|
|
11263
10420
|
categoryColors,
|
|
11264
10421
|
className
|
|
11265
10422
|
}) {
|
|
11266
|
-
useTranslate();
|
|
10423
|
+
hooks.useTranslate();
|
|
11267
10424
|
const config = SIZE_CONFIG[size];
|
|
11268
10425
|
const catColor = categoryColors?.[action.category];
|
|
11269
10426
|
const handleDragStart = React84.useCallback((e) => {
|
|
@@ -11302,7 +10459,6 @@ var init_ActionTile = __esm({
|
|
|
11302
10459
|
"components/game/organisms/puzzles/sequencer/ActionTile.tsx"() {
|
|
11303
10460
|
init_atoms2();
|
|
11304
10461
|
init_cn();
|
|
11305
|
-
init_useTranslate();
|
|
11306
10462
|
DRAG_MIME = "application/x-almadar-slot-item";
|
|
11307
10463
|
SIZE_CONFIG = {
|
|
11308
10464
|
sm: { px: "px-2 py-1", icon: "text-lg", text: "text-xs" },
|
|
@@ -11321,7 +10477,7 @@ function ActionPalette({
|
|
|
11321
10477
|
label,
|
|
11322
10478
|
className
|
|
11323
10479
|
}) {
|
|
11324
|
-
const { t } = useTranslate();
|
|
10480
|
+
const { t } = hooks.useTranslate();
|
|
11325
10481
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
11326
10482
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: label ?? t("sequencer.actions") }),
|
|
11327
10483
|
/* @__PURE__ */ jsxRuntime.jsx(HStack, { className: "flex-wrap", gap: "sm", children: (actions ?? []).map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11340,7 +10496,6 @@ var init_ActionPalette = __esm({
|
|
|
11340
10496
|
"components/game/organisms/puzzles/sequencer/ActionPalette.tsx"() {
|
|
11341
10497
|
init_atoms2();
|
|
11342
10498
|
init_cn();
|
|
11343
|
-
init_useTranslate();
|
|
11344
10499
|
init_ActionTile();
|
|
11345
10500
|
ActionPalette.displayName = "ActionPalette";
|
|
11346
10501
|
}
|
|
@@ -11350,7 +10505,6 @@ var init_AuthLayout = __esm({
|
|
|
11350
10505
|
"components/core/templates/AuthLayout.tsx"() {
|
|
11351
10506
|
"use client";
|
|
11352
10507
|
init_cn();
|
|
11353
|
-
init_useTranslate();
|
|
11354
10508
|
init_Box();
|
|
11355
10509
|
init_Stack();
|
|
11356
10510
|
init_Typography();
|
|
@@ -11361,7 +10515,7 @@ var init_AuthLayout = __esm({
|
|
|
11361
10515
|
showBranding = true,
|
|
11362
10516
|
brandingContent
|
|
11363
10517
|
}) => {
|
|
11364
|
-
const { t } = useTranslate();
|
|
10518
|
+
const { t } = hooks.useTranslate();
|
|
11365
10519
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "min-h-screen flex", children: [
|
|
11366
10520
|
showBranding && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11367
10521
|
VStack,
|
|
@@ -11495,13 +10649,12 @@ var init_LoadingState = __esm({
|
|
|
11495
10649
|
init_atoms2();
|
|
11496
10650
|
init_Stack();
|
|
11497
10651
|
init_Typography();
|
|
11498
|
-
init_useTranslate();
|
|
11499
10652
|
LoadingState = ({
|
|
11500
10653
|
title,
|
|
11501
10654
|
message,
|
|
11502
10655
|
className
|
|
11503
10656
|
}) => {
|
|
11504
|
-
const { t } = useTranslate();
|
|
10657
|
+
const { t } = hooks.useTranslate();
|
|
11505
10658
|
const displayMessage = message ?? t("common.loading");
|
|
11506
10659
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11507
10660
|
VStack,
|
|
@@ -11983,7 +11136,7 @@ function IsometricCanvas({
|
|
|
11983
11136
|
const unitsProp = Array.isArray(_unitsPropRaw) ? _unitsPropRaw : [];
|
|
11984
11137
|
const featuresProp = Array.isArray(_featuresPropRaw) ? _featuresPropRaw : [];
|
|
11985
11138
|
const eventBus = useEventBus();
|
|
11986
|
-
const { t } = useTranslate();
|
|
11139
|
+
const { t } = hooks.useTranslate();
|
|
11987
11140
|
const canvasRef = React84.useRef(null);
|
|
11988
11141
|
const containerRef = React84.useRef(null);
|
|
11989
11142
|
const minimapRef = React84.useRef(null);
|
|
@@ -12679,7 +11832,6 @@ var init_IsometricCanvas = __esm({
|
|
|
12679
11832
|
"use client";
|
|
12680
11833
|
init_cn();
|
|
12681
11834
|
init_useEventBus();
|
|
12682
|
-
init_useTranslate();
|
|
12683
11835
|
init_Box();
|
|
12684
11836
|
init_Stack();
|
|
12685
11837
|
init_Icon();
|
|
@@ -12739,7 +11891,7 @@ function BattleBoard({
|
|
|
12739
11891
|
const currentTurn = entity.turn;
|
|
12740
11892
|
const gameResult = entity.gameResult;
|
|
12741
11893
|
const eventBus = useEventBus();
|
|
12742
|
-
const { t } = useTranslate();
|
|
11894
|
+
const { t } = hooks.useTranslate();
|
|
12743
11895
|
const [hoveredTile, setHoveredTile] = React84.useState(null);
|
|
12744
11896
|
const [isShaking, setIsShaking] = React84.useState(false);
|
|
12745
11897
|
const selectedUnit = React84.useMemo(
|
|
@@ -13043,7 +12195,6 @@ var init_BattleBoard = __esm({
|
|
|
13043
12195
|
"use client";
|
|
13044
12196
|
init_cn();
|
|
13045
12197
|
init_useEventBus();
|
|
13046
|
-
init_useTranslate();
|
|
13047
12198
|
init_Box();
|
|
13048
12199
|
init_Button();
|
|
13049
12200
|
init_Typography();
|
|
@@ -13803,7 +12954,6 @@ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13803
12954
|
var init_BehaviorView = __esm({
|
|
13804
12955
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13805
12956
|
"use client";
|
|
13806
|
-
init_useTranslate();
|
|
13807
12957
|
init_AvlState();
|
|
13808
12958
|
init_AvlTransitionLane();
|
|
13809
12959
|
init_AvlSwimLane();
|
|
@@ -13813,7 +12963,7 @@ var init_BehaviorView = __esm({
|
|
|
13813
12963
|
SWIM_GUTTER = 120;
|
|
13814
12964
|
CENTER_W = 360;
|
|
13815
12965
|
BehaviorView = ({ data }) => {
|
|
13816
|
-
const { t } = useTranslate();
|
|
12966
|
+
const { t } = hooks.useTranslate();
|
|
13817
12967
|
const [layout, setLayout] = React84.useState(null);
|
|
13818
12968
|
const traitName = data.traits[0]?.name;
|
|
13819
12969
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -13918,14 +13068,13 @@ var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
|
13918
13068
|
var init_ScaledDiagram = __esm({
|
|
13919
13069
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
13920
13070
|
init_Box();
|
|
13921
|
-
init_useTranslate();
|
|
13922
13071
|
init_cn();
|
|
13923
13072
|
MIN_DIAGRAM_WIDTH = 200;
|
|
13924
13073
|
ScaledDiagram = ({
|
|
13925
13074
|
children,
|
|
13926
13075
|
className
|
|
13927
13076
|
}) => {
|
|
13928
|
-
const { t: _t } = useTranslate();
|
|
13077
|
+
const { t: _t } = hooks.useTranslate();
|
|
13929
13078
|
const wrapperRef = React84.useRef(null);
|
|
13930
13079
|
const contentRef = React84.useRef(null);
|
|
13931
13080
|
const [layout, setLayout] = React84.useState(null);
|
|
@@ -14061,7 +13210,6 @@ var init_CodeBlock = __esm({
|
|
|
14061
13210
|
init_Textarea();
|
|
14062
13211
|
init_Icon();
|
|
14063
13212
|
init_useEventBus();
|
|
14064
|
-
init_useTranslate();
|
|
14065
13213
|
SyntaxHighlighter__default.default.registerLanguage("json", langJson__default.default);
|
|
14066
13214
|
SyntaxHighlighter__default.default.registerLanguage("javascript", langJavascript__default.default);
|
|
14067
13215
|
SyntaxHighlighter__default.default.registerLanguage("js", langJavascript__default.default);
|
|
@@ -14150,7 +13298,7 @@ var init_CodeBlock = __esm({
|
|
|
14150
13298
|
const isLolo = language === "lolo";
|
|
14151
13299
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark__default.default;
|
|
14152
13300
|
const eventBus = useEventBus();
|
|
14153
|
-
const { t } = useTranslate();
|
|
13301
|
+
const { t } = hooks.useTranslate();
|
|
14154
13302
|
const scrollRef = React84.useRef(null);
|
|
14155
13303
|
const codeRef = React84.useRef(null);
|
|
14156
13304
|
const savedScrollLeftRef = React84.useRef(0);
|
|
@@ -14568,11 +13716,10 @@ var init_MarkdownContent = __esm({
|
|
|
14568
13716
|
init_katex_min();
|
|
14569
13717
|
init_Box();
|
|
14570
13718
|
init_CodeBlock();
|
|
14571
|
-
init_useTranslate();
|
|
14572
13719
|
init_cn();
|
|
14573
13720
|
MarkdownContent = React84__namespace.default.memo(
|
|
14574
13721
|
({ content, direction, className }) => {
|
|
14575
|
-
const { t: _t } = useTranslate();
|
|
13722
|
+
const { t: _t } = hooks.useTranslate();
|
|
14576
13723
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
14577
13724
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14578
13725
|
Box,
|
|
@@ -14735,6 +13882,56 @@ var init_MarkdownContent = __esm({
|
|
|
14735
13882
|
MarkdownContent.displayName = "MarkdownContent";
|
|
14736
13883
|
}
|
|
14737
13884
|
});
|
|
13885
|
+
function useLongPress(onLongPress, options = {}) {
|
|
13886
|
+
const { duration = 500, moveThreshold = 10 } = options;
|
|
13887
|
+
const timerRef = React84.useRef(null);
|
|
13888
|
+
const startPos = React84.useRef({ x: 0, y: 0 });
|
|
13889
|
+
const isPressedRef = React84.useRef(false);
|
|
13890
|
+
const firedRef = React84.useRef(false);
|
|
13891
|
+
const cancel = React84.useCallback(() => {
|
|
13892
|
+
if (timerRef.current) {
|
|
13893
|
+
clearTimeout(timerRef.current);
|
|
13894
|
+
timerRef.current = null;
|
|
13895
|
+
}
|
|
13896
|
+
isPressedRef.current = false;
|
|
13897
|
+
}, []);
|
|
13898
|
+
const onPointerDown = React84.useCallback((e) => {
|
|
13899
|
+
firedRef.current = false;
|
|
13900
|
+
startPos.current = { x: e.clientX, y: e.clientY };
|
|
13901
|
+
isPressedRef.current = true;
|
|
13902
|
+
timerRef.current = setTimeout(() => {
|
|
13903
|
+
firedRef.current = true;
|
|
13904
|
+
isPressedRef.current = false;
|
|
13905
|
+
onLongPress();
|
|
13906
|
+
}, duration);
|
|
13907
|
+
}, [duration, onLongPress]);
|
|
13908
|
+
const onPointerMove = React84.useCallback((e) => {
|
|
13909
|
+
if (!isPressedRef.current) return;
|
|
13910
|
+
const dx = e.clientX - startPos.current.x;
|
|
13911
|
+
const dy = e.clientY - startPos.current.y;
|
|
13912
|
+
if (Math.sqrt(dx * dx + dy * dy) > moveThreshold) {
|
|
13913
|
+
cancel();
|
|
13914
|
+
}
|
|
13915
|
+
}, [moveThreshold, cancel]);
|
|
13916
|
+
const onPointerUp = React84.useCallback(() => {
|
|
13917
|
+
cancel();
|
|
13918
|
+
}, [cancel]);
|
|
13919
|
+
const onPointerCancel = React84.useCallback(() => {
|
|
13920
|
+
cancel();
|
|
13921
|
+
}, [cancel]);
|
|
13922
|
+
return {
|
|
13923
|
+
onPointerDown,
|
|
13924
|
+
onPointerMove,
|
|
13925
|
+
onPointerUp,
|
|
13926
|
+
onPointerCancel,
|
|
13927
|
+
isPressed: isPressedRef.current
|
|
13928
|
+
};
|
|
13929
|
+
}
|
|
13930
|
+
var init_useLongPress = __esm({
|
|
13931
|
+
"hooks/useLongPress.ts"() {
|
|
13932
|
+
"use client";
|
|
13933
|
+
}
|
|
13934
|
+
});
|
|
14738
13935
|
function Card2({
|
|
14739
13936
|
title,
|
|
14740
13937
|
subtitle,
|
|
@@ -14748,7 +13945,7 @@ function Card2({
|
|
|
14748
13945
|
longPressPayload
|
|
14749
13946
|
}) {
|
|
14750
13947
|
const eventBus = useEventBus();
|
|
14751
|
-
const { t } = useTranslate();
|
|
13948
|
+
const { t } = hooks.useTranslate();
|
|
14752
13949
|
const isClickable = !!onClick || !!action;
|
|
14753
13950
|
const handleLongPress = React84.useCallback(() => {
|
|
14754
13951
|
if (longPressEvent) {
|
|
@@ -14823,7 +14020,6 @@ var init_Card2 = __esm({
|
|
|
14823
14020
|
"components/core/molecules/Card.tsx"() {
|
|
14824
14021
|
"use client";
|
|
14825
14022
|
init_useEventBus();
|
|
14826
|
-
init_useTranslate();
|
|
14827
14023
|
init_useLongPress();
|
|
14828
14024
|
Card2.displayName = "Card";
|
|
14829
14025
|
}
|
|
@@ -14837,14 +14033,13 @@ var init_QuizBlock = __esm({
|
|
|
14837
14033
|
init_Button();
|
|
14838
14034
|
init_Icon();
|
|
14839
14035
|
init_Box();
|
|
14840
|
-
init_useTranslate();
|
|
14841
14036
|
init_cn();
|
|
14842
14037
|
QuizBlock = ({
|
|
14843
14038
|
question,
|
|
14844
14039
|
answer,
|
|
14845
14040
|
className
|
|
14846
14041
|
}) => {
|
|
14847
|
-
const { t } = useTranslate();
|
|
14042
|
+
const { t } = hooks.useTranslate();
|
|
14848
14043
|
const [revealed, setRevealed] = React84.useState(false);
|
|
14849
14044
|
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
14045
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
@@ -14880,11 +14075,10 @@ var init_StateMachineView = __esm({
|
|
|
14880
14075
|
init_Typography();
|
|
14881
14076
|
init_Button();
|
|
14882
14077
|
init_Icon();
|
|
14883
|
-
init_useTranslate();
|
|
14884
14078
|
init_useEventBus();
|
|
14885
14079
|
init_cn();
|
|
14886
14080
|
StateNode = ({ state, config }) => {
|
|
14887
|
-
const { t } = useTranslate();
|
|
14081
|
+
const { t } = hooks.useTranslate();
|
|
14888
14082
|
const size = state.radius * 2;
|
|
14889
14083
|
let borderColor = config.colors.nodeBorder;
|
|
14890
14084
|
let borderWidth = 2;
|
|
@@ -14991,7 +14185,7 @@ var init_StateMachineView = __esm({
|
|
|
14991
14185
|
);
|
|
14992
14186
|
};
|
|
14993
14187
|
TransitionBundleArrow = ({ bundle, states, bundleIndex, config, onClick, onHover }) => {
|
|
14994
|
-
const { t } = useTranslate();
|
|
14188
|
+
const { t } = hooks.useTranslate();
|
|
14995
14189
|
const groupRef = React84.useRef(null);
|
|
14996
14190
|
const fromState = states.find((s) => s.name === bundle.from);
|
|
14997
14191
|
const toState = states.find((s) => s.name === bundle.to);
|
|
@@ -15241,7 +14435,7 @@ var init_StateMachineView = __esm({
|
|
|
15241
14435
|
);
|
|
15242
14436
|
};
|
|
15243
14437
|
BundleTooltip = ({ tooltip, config }) => {
|
|
15244
|
-
const { t } = useTranslate();
|
|
14438
|
+
const { t } = hooks.useTranslate();
|
|
15245
14439
|
if (!tooltip.visible || !tooltip.bundle) return null;
|
|
15246
14440
|
const { bundle } = tooltip;
|
|
15247
14441
|
const isSingle = bundle.labels.length === 1;
|
|
@@ -15393,7 +14587,7 @@ var init_StateMachineView = __esm({
|
|
|
15393
14587
|
);
|
|
15394
14588
|
};
|
|
15395
14589
|
EntityBox = ({ entity, config }) => {
|
|
15396
|
-
const { t } = useTranslate();
|
|
14590
|
+
const { t } = hooks.useTranslate();
|
|
15397
14591
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15398
14592
|
VStack,
|
|
15399
14593
|
{
|
|
@@ -15434,7 +14628,7 @@ var init_StateMachineView = __esm({
|
|
|
15434
14628
|
);
|
|
15435
14629
|
};
|
|
15436
14630
|
OutputsBox = ({ outputs, config }) => {
|
|
15437
|
-
const { t } = useTranslate();
|
|
14631
|
+
const { t } = hooks.useTranslate();
|
|
15438
14632
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15439
14633
|
VStack,
|
|
15440
14634
|
{
|
|
@@ -15476,7 +14670,7 @@ var init_StateMachineView = __esm({
|
|
|
15476
14670
|
);
|
|
15477
14671
|
};
|
|
15478
14672
|
Legend = ({ config, y }) => {
|
|
15479
|
-
const { t } = useTranslate();
|
|
14673
|
+
const { t } = hooks.useTranslate();
|
|
15480
14674
|
const items = [
|
|
15481
14675
|
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
15482
14676
|
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
@@ -15520,7 +14714,7 @@ var init_StateMachineView = __esm({
|
|
|
15520
14714
|
isLoading: _isLoading,
|
|
15521
14715
|
error: _error
|
|
15522
14716
|
}) => {
|
|
15523
|
-
const { t } = useTranslate();
|
|
14717
|
+
const { t } = hooks.useTranslate();
|
|
15524
14718
|
const [tooltip, setTooltip] = React84.useState({
|
|
15525
14719
|
visible: false,
|
|
15526
14720
|
pinned: false,
|
|
@@ -16247,7 +15441,6 @@ var init_JazariStateMachine = __esm({
|
|
|
16247
15441
|
init_StateMachineView();
|
|
16248
15442
|
init_visualizer();
|
|
16249
15443
|
init_svg_paths();
|
|
16250
|
-
init_useTranslate();
|
|
16251
15444
|
init_cn();
|
|
16252
15445
|
JAZARI_VISUALIZER_CONFIG = {
|
|
16253
15446
|
...DEFAULT_CONFIG,
|
|
@@ -16283,7 +15476,7 @@ var init_JazariStateMachine = __esm({
|
|
|
16283
15476
|
isLoading = false,
|
|
16284
15477
|
error = null
|
|
16285
15478
|
}) => {
|
|
16286
|
-
const { t } = useTranslate();
|
|
15479
|
+
const { t } = hooks.useTranslate();
|
|
16287
15480
|
const resolvedTrait = React84.useMemo(
|
|
16288
15481
|
() => extractTrait(schema, traitProp, traitIndex),
|
|
16289
15482
|
[schema, traitProp, traitIndex]
|
|
@@ -16403,7 +15596,6 @@ var init_ContentRenderer = __esm({
|
|
|
16403
15596
|
init_ScaledDiagram();
|
|
16404
15597
|
init_JazariStateMachine();
|
|
16405
15598
|
init_parseContentSegments();
|
|
16406
|
-
init_useTranslate();
|
|
16407
15599
|
init_cn();
|
|
16408
15600
|
ContentRenderer = ({
|
|
16409
15601
|
content,
|
|
@@ -16411,7 +15603,7 @@ var init_ContentRenderer = __esm({
|
|
|
16411
15603
|
direction,
|
|
16412
15604
|
className
|
|
16413
15605
|
}) => {
|
|
16414
|
-
const { t: _t } = useTranslate();
|
|
15606
|
+
const { t: _t } = hooks.useTranslate();
|
|
16415
15607
|
const segments = React84.useMemo(
|
|
16416
15608
|
() => segmentsProp ?? parseContentSegments(content),
|
|
16417
15609
|
[segmentsProp, content]
|
|
@@ -16497,14 +15689,13 @@ var init_BookChapterView = __esm({
|
|
|
16497
15689
|
init_ScaledDiagram();
|
|
16498
15690
|
init_ContentRenderer();
|
|
16499
15691
|
init_JazariStateMachine();
|
|
16500
|
-
init_useTranslate();
|
|
16501
15692
|
init_cn();
|
|
16502
15693
|
BookChapterView = ({
|
|
16503
15694
|
chapter,
|
|
16504
15695
|
direction,
|
|
16505
15696
|
className
|
|
16506
15697
|
}) => {
|
|
16507
|
-
const { t: _t } = useTranslate();
|
|
15698
|
+
const { t: _t } = hooks.useTranslate();
|
|
16508
15699
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16509
15700
|
VStack,
|
|
16510
15701
|
{
|
|
@@ -16536,7 +15727,6 @@ var init_BookCoverPage = __esm({
|
|
|
16536
15727
|
init_Typography();
|
|
16537
15728
|
init_Button();
|
|
16538
15729
|
init_Box();
|
|
16539
|
-
init_useTranslate();
|
|
16540
15730
|
init_cn();
|
|
16541
15731
|
BookCoverPage = ({
|
|
16542
15732
|
title,
|
|
@@ -16546,7 +15736,7 @@ var init_BookCoverPage = __esm({
|
|
|
16546
15736
|
direction,
|
|
16547
15737
|
className
|
|
16548
15738
|
}) => {
|
|
16549
|
-
const { t } = useTranslate();
|
|
15739
|
+
const { t } = hooks.useTranslate();
|
|
16550
15740
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16551
15741
|
VStack,
|
|
16552
15742
|
{
|
|
@@ -16616,7 +15806,6 @@ var init_BookNavBar = __esm({
|
|
|
16616
15806
|
init_Typography();
|
|
16617
15807
|
init_ProgressBar();
|
|
16618
15808
|
init_Box();
|
|
16619
|
-
init_useTranslate();
|
|
16620
15809
|
init_cn();
|
|
16621
15810
|
BookNavBar = ({
|
|
16622
15811
|
currentPage,
|
|
@@ -16625,7 +15814,7 @@ var init_BookNavBar = __esm({
|
|
|
16625
15814
|
direction,
|
|
16626
15815
|
className
|
|
16627
15816
|
}) => {
|
|
16628
|
-
const { t } = useTranslate();
|
|
15817
|
+
const { t } = hooks.useTranslate();
|
|
16629
15818
|
const isRtl = direction === "rtl";
|
|
16630
15819
|
const progress = totalPages > 1 ? currentPage / (totalPages - 1) * 100 : 0;
|
|
16631
15820
|
const PrevIcon = isRtl ? LucideIcons2.ChevronRight : LucideIcons2.ChevronLeft;
|
|
@@ -16718,7 +15907,6 @@ var init_BookTableOfContents = __esm({
|
|
|
16718
15907
|
init_Button();
|
|
16719
15908
|
init_Box();
|
|
16720
15909
|
init_Badge();
|
|
16721
|
-
init_useTranslate();
|
|
16722
15910
|
init_cn();
|
|
16723
15911
|
BookTableOfContents = ({
|
|
16724
15912
|
parts,
|
|
@@ -16726,7 +15914,7 @@ var init_BookTableOfContents = __esm({
|
|
|
16726
15914
|
direction,
|
|
16727
15915
|
className
|
|
16728
15916
|
}) => {
|
|
16729
|
-
const { t } = useTranslate();
|
|
15917
|
+
const { t } = hooks.useTranslate();
|
|
16730
15918
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16731
15919
|
VStack,
|
|
16732
15920
|
{
|
|
@@ -16778,7 +15966,6 @@ var init_EmptyState = __esm({
|
|
|
16778
15966
|
init_Stack();
|
|
16779
15967
|
init_Typography();
|
|
16780
15968
|
init_useEventBus();
|
|
16781
|
-
init_useTranslate();
|
|
16782
15969
|
ICON_NAME_ALIASES = {
|
|
16783
15970
|
check: "check-circle",
|
|
16784
15971
|
error: "x-circle",
|
|
@@ -16804,7 +15991,7 @@ var init_EmptyState = __esm({
|
|
|
16804
15991
|
look = "icon-only"
|
|
16805
15992
|
}) => {
|
|
16806
15993
|
const eventBus = useEventBus();
|
|
16807
|
-
const { t } = useTranslate();
|
|
15994
|
+
const { t } = hooks.useTranslate();
|
|
16808
15995
|
const handleAction = () => {
|
|
16809
15996
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
16810
15997
|
onAction?.();
|
|
@@ -16949,7 +16136,6 @@ var init_BookViewer = __esm({
|
|
|
16949
16136
|
init_Box();
|
|
16950
16137
|
init_Stack();
|
|
16951
16138
|
init_useEventBus();
|
|
16952
|
-
init_useTranslate();
|
|
16953
16139
|
init_cn();
|
|
16954
16140
|
init_BookCoverPage();
|
|
16955
16141
|
init_BookTableOfContents();
|
|
@@ -16975,7 +16161,7 @@ var init_BookViewer = __esm({
|
|
|
16975
16161
|
className
|
|
16976
16162
|
}) => {
|
|
16977
16163
|
const eventBus = useEventBus();
|
|
16978
|
-
const { t } = useTranslate();
|
|
16164
|
+
const { t } = hooks.useTranslate();
|
|
16979
16165
|
const [currentPage, setCurrentPage] = React84.useState(initialPage);
|
|
16980
16166
|
const resolvedFieldMap = React84.useMemo(() => resolveFieldMap(fieldMap), [fieldMap]);
|
|
16981
16167
|
const book = React84.useMemo(() => {
|
|
@@ -17381,7 +16567,6 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17381
16567
|
init_FilterPill();
|
|
17382
16568
|
init_Box();
|
|
17383
16569
|
init_useEventBus();
|
|
17384
|
-
init_useTranslate();
|
|
17385
16570
|
init_cn();
|
|
17386
16571
|
END_OF_SURVEY = "end-of-survey";
|
|
17387
16572
|
RuleRow = ({
|
|
@@ -17392,7 +16577,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17392
16577
|
onChange,
|
|
17393
16578
|
onDelete
|
|
17394
16579
|
}) => {
|
|
17395
|
-
const { t } = useTranslate();
|
|
16580
|
+
const { t } = hooks.useTranslate();
|
|
17396
16581
|
const operatorOptions = React84.useMemo(
|
|
17397
16582
|
() => [
|
|
17398
16583
|
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
@@ -17567,7 +16752,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17567
16752
|
NODE_GAP_Y = 80;
|
|
17568
16753
|
PADDING = 32;
|
|
17569
16754
|
LogicGraph = ({ questions, rules }) => {
|
|
17570
|
-
const { t } = useTranslate();
|
|
16755
|
+
const { t } = hooks.useTranslate();
|
|
17571
16756
|
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17572
16757
|
const layout = React84.useMemo(() => {
|
|
17573
16758
|
const items = [
|
|
@@ -17699,7 +16884,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17699
16884
|
readOnly = false,
|
|
17700
16885
|
className
|
|
17701
16886
|
}) => {
|
|
17702
|
-
const { t } = useTranslate();
|
|
16887
|
+
const { t } = hooks.useTranslate();
|
|
17703
16888
|
const eventBus = useEventBus();
|
|
17704
16889
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17705
16890
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17834,7 +17019,6 @@ var init_Breadcrumb = __esm({
|
|
|
17834
17019
|
init_Typography();
|
|
17835
17020
|
init_cn();
|
|
17836
17021
|
init_useEventBus();
|
|
17837
|
-
init_useTranslate();
|
|
17838
17022
|
Breadcrumb = ({
|
|
17839
17023
|
items,
|
|
17840
17024
|
separator = "chevron-right",
|
|
@@ -17842,7 +17026,7 @@ var init_Breadcrumb = __esm({
|
|
|
17842
17026
|
className
|
|
17843
17027
|
}) => {
|
|
17844
17028
|
const eventBus = useEventBus();
|
|
17845
|
-
const { t } = useTranslate();
|
|
17029
|
+
const { t } = hooks.useTranslate();
|
|
17846
17030
|
const displayItems = maxItems && items.length > maxItems ? [
|
|
17847
17031
|
...items.slice(0, 1),
|
|
17848
17032
|
{ label: "...", isCurrent: false },
|
|
@@ -17921,7 +17105,7 @@ function BuilderBoard({
|
|
|
17921
17105
|
className
|
|
17922
17106
|
}) {
|
|
17923
17107
|
const { emit } = useEventBus();
|
|
17924
|
-
const { t } = useTranslate();
|
|
17108
|
+
const { t } = hooks.useTranslate();
|
|
17925
17109
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
17926
17110
|
const [placements, setPlacements] = React84.useState({});
|
|
17927
17111
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -18070,7 +17254,6 @@ var init_BuilderBoard = __esm({
|
|
|
18070
17254
|
"components/game/organisms/puzzles/builder/BuilderBoard.tsx"() {
|
|
18071
17255
|
init_atoms2();
|
|
18072
17256
|
init_useEventBus();
|
|
18073
|
-
init_useTranslate();
|
|
18074
17257
|
BuilderBoard.displayName = "BuilderBoard";
|
|
18075
17258
|
}
|
|
18076
17259
|
});
|
|
@@ -18197,6 +17380,73 @@ var init_ButtonGroup = __esm({
|
|
|
18197
17380
|
ButtonGroup.displayName = "ButtonGroup";
|
|
18198
17381
|
}
|
|
18199
17382
|
});
|
|
17383
|
+
function useSwipeGesture(callbacks, options = {}) {
|
|
17384
|
+
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
17385
|
+
const startX = React84.useRef(0);
|
|
17386
|
+
const startY = React84.useRef(0);
|
|
17387
|
+
const startTime = React84.useRef(0);
|
|
17388
|
+
const currentX = React84.useRef(0);
|
|
17389
|
+
const tracking = React84.useRef(false);
|
|
17390
|
+
const offsetXRef = React84.useRef(0);
|
|
17391
|
+
const isSwipingRef = React84.useRef(false);
|
|
17392
|
+
const onPointerDown = React84.useCallback((e) => {
|
|
17393
|
+
startX.current = e.clientX;
|
|
17394
|
+
startY.current = e.clientY;
|
|
17395
|
+
currentX.current = e.clientX;
|
|
17396
|
+
startTime.current = Date.now();
|
|
17397
|
+
tracking.current = true;
|
|
17398
|
+
isSwipingRef.current = false;
|
|
17399
|
+
offsetXRef.current = 0;
|
|
17400
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
17401
|
+
}, []);
|
|
17402
|
+
const onPointerMove = React84.useCallback((e) => {
|
|
17403
|
+
if (!tracking.current) return;
|
|
17404
|
+
if (preventDefault) e.preventDefault();
|
|
17405
|
+
currentX.current = e.clientX;
|
|
17406
|
+
const dx = e.clientX - startX.current;
|
|
17407
|
+
const dy = e.clientY - startY.current;
|
|
17408
|
+
if (Math.abs(dx) > 10 && Math.abs(dx) > Math.abs(dy)) {
|
|
17409
|
+
isSwipingRef.current = true;
|
|
17410
|
+
offsetXRef.current = dx;
|
|
17411
|
+
}
|
|
17412
|
+
}, [preventDefault]);
|
|
17413
|
+
const onPointerUp = React84.useCallback((e) => {
|
|
17414
|
+
if (!tracking.current) return;
|
|
17415
|
+
tracking.current = false;
|
|
17416
|
+
const dx = e.clientX - startX.current;
|
|
17417
|
+
const dy = e.clientY - startY.current;
|
|
17418
|
+
const elapsed = Date.now() - startTime.current;
|
|
17419
|
+
const velocity = Math.abs(dx) / Math.max(elapsed, 1);
|
|
17420
|
+
offsetXRef.current = 0;
|
|
17421
|
+
isSwipingRef.current = false;
|
|
17422
|
+
if (Math.abs(dx) < threshold && velocity < velocityThreshold) return;
|
|
17423
|
+
if (Math.abs(dx) > Math.abs(dy)) {
|
|
17424
|
+
if (dx < -threshold) callbacks.onSwipeLeft?.();
|
|
17425
|
+
else if (dx > threshold) callbacks.onSwipeRight?.();
|
|
17426
|
+
} else {
|
|
17427
|
+
if (dy < -threshold) callbacks.onSwipeUp?.();
|
|
17428
|
+
else if (dy > threshold) callbacks.onSwipeDown?.();
|
|
17429
|
+
}
|
|
17430
|
+
}, [threshold, velocityThreshold, callbacks]);
|
|
17431
|
+
const onPointerCancel = React84.useCallback(() => {
|
|
17432
|
+
tracking.current = false;
|
|
17433
|
+
offsetXRef.current = 0;
|
|
17434
|
+
isSwipingRef.current = false;
|
|
17435
|
+
}, []);
|
|
17436
|
+
return {
|
|
17437
|
+
onPointerDown,
|
|
17438
|
+
onPointerMove,
|
|
17439
|
+
onPointerUp,
|
|
17440
|
+
onPointerCancel,
|
|
17441
|
+
offsetX: offsetXRef.current,
|
|
17442
|
+
isSwiping: isSwipingRef.current
|
|
17443
|
+
};
|
|
17444
|
+
}
|
|
17445
|
+
var init_useSwipeGesture = __esm({
|
|
17446
|
+
"hooks/useSwipeGesture.ts"() {
|
|
17447
|
+
"use client";
|
|
17448
|
+
}
|
|
17449
|
+
});
|
|
18200
17450
|
function dayWindowForViewport(width) {
|
|
18201
17451
|
if (width <= 640) return 1;
|
|
18202
17452
|
if (width <= 1024) return 3;
|
|
@@ -18271,7 +17521,7 @@ function CalendarGrid({
|
|
|
18271
17521
|
}) {
|
|
18272
17522
|
const evs = Array.isArray(events2) ? events2 : events2 ? [events2] : [];
|
|
18273
17523
|
const eventBus = useEventBus();
|
|
18274
|
-
const { t } = useTranslate();
|
|
17524
|
+
const { t } = hooks.useTranslate();
|
|
18275
17525
|
const longPressTimer = React84.useRef(null);
|
|
18276
17526
|
const resolvedWeekStart = React84.useMemo(
|
|
18277
17527
|
() => weekStart ? getStartOfWeek(weekStart) : getStartOfWeek(/* @__PURE__ */ new Date()),
|
|
@@ -18481,7 +17731,6 @@ var init_CalendarGrid = __esm({
|
|
|
18481
17731
|
init_TimeSlotCell();
|
|
18482
17732
|
init_useEventBus();
|
|
18483
17733
|
init_useSwipeGesture();
|
|
18484
|
-
init_useTranslate();
|
|
18485
17734
|
SHORT_DATE = { month: "short", day: "numeric" };
|
|
18486
17735
|
CalendarGrid.displayName = "CalendarGrid";
|
|
18487
17736
|
}
|
|
@@ -19790,7 +19039,6 @@ var init_Pagination = __esm({
|
|
|
19790
19039
|
init_Stack();
|
|
19791
19040
|
init_cn();
|
|
19792
19041
|
init_useEventBus();
|
|
19793
|
-
init_useTranslate();
|
|
19794
19042
|
Pagination = ({
|
|
19795
19043
|
currentPage,
|
|
19796
19044
|
totalPages,
|
|
@@ -19809,7 +19057,7 @@ var init_Pagination = __esm({
|
|
|
19809
19057
|
pageSizeChangeEvent
|
|
19810
19058
|
}) => {
|
|
19811
19059
|
const eventBus = useEventBus();
|
|
19812
|
-
const { t } = useTranslate();
|
|
19060
|
+
const { t } = hooks.useTranslate();
|
|
19813
19061
|
const [jumpToPage, setJumpToPage] = React84.useState("");
|
|
19814
19062
|
const handlePageChange = (page) => {
|
|
19815
19063
|
if (pageChangeEvent) eventBus.emit(`UI:${pageChangeEvent}`, { page });
|
|
@@ -19994,7 +19242,6 @@ var init_CardGrid = __esm({
|
|
|
19994
19242
|
init_cn();
|
|
19995
19243
|
init_getNestedValue();
|
|
19996
19244
|
init_useEventBus();
|
|
19997
|
-
init_useTranslate();
|
|
19998
19245
|
init_atoms2();
|
|
19999
19246
|
init_Badge();
|
|
20000
19247
|
init_Box();
|
|
@@ -20038,7 +19285,7 @@ var init_CardGrid = __esm({
|
|
|
20038
19285
|
imageField
|
|
20039
19286
|
}) => {
|
|
20040
19287
|
const eventBus = useEventBus();
|
|
20041
|
-
const { t } = useTranslate();
|
|
19288
|
+
const { t } = hooks.useTranslate();
|
|
20042
19289
|
const effectiveFieldNames = normalizeFields(fields).length > 0 ? normalizeFields(fields) : fieldNames ?? normalizeFields(columns);
|
|
20043
19290
|
const gridTemplateColumns = `repeat(auto-fit, minmax(min(${minCardWidth}px, 100%), 1fr))`;
|
|
20044
19291
|
const normalizedData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -20223,7 +19470,6 @@ var init_Carousel = __esm({
|
|
|
20223
19470
|
init_cn();
|
|
20224
19471
|
init_useEventBus();
|
|
20225
19472
|
init_useSwipeGesture();
|
|
20226
|
-
init_useTranslate();
|
|
20227
19473
|
init_Box();
|
|
20228
19474
|
init_Stack();
|
|
20229
19475
|
init_Button();
|
|
@@ -20244,7 +19490,7 @@ var init_Carousel = __esm({
|
|
|
20244
19490
|
const scrollRef = React84.useRef(null);
|
|
20245
19491
|
const autoPlayRef = React84.useRef(null);
|
|
20246
19492
|
const eventBus = useSafeEventBus3();
|
|
20247
|
-
const { t } = useTranslate();
|
|
19493
|
+
const { t } = hooks.useTranslate();
|
|
20248
19494
|
const safeItems = items ?? [];
|
|
20249
19495
|
const totalSlides = safeItems.length;
|
|
20250
19496
|
const emitSlideChange = React84.useCallback(
|
|
@@ -20460,7 +19706,6 @@ var init_CaseStudyOrganism = __esm({
|
|
|
20460
19706
|
"use client";
|
|
20461
19707
|
init_cn();
|
|
20462
19708
|
init_useEventBus();
|
|
20463
|
-
init_useTranslate();
|
|
20464
19709
|
init_Stack();
|
|
20465
19710
|
init_Typography();
|
|
20466
19711
|
init_SimpleGrid();
|
|
@@ -20476,7 +19721,7 @@ var init_CaseStudyOrganism = __esm({
|
|
|
20476
19721
|
subtitle
|
|
20477
19722
|
}) => {
|
|
20478
19723
|
useEventBus();
|
|
20479
|
-
const { t } = useTranslate();
|
|
19724
|
+
const { t } = hooks.useTranslate();
|
|
20480
19725
|
const items = React84.useMemo(
|
|
20481
19726
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
20482
19727
|
[entity]
|
|
@@ -20665,7 +19910,6 @@ var init_Chart = __esm({
|
|
|
20665
19910
|
init_ErrorState();
|
|
20666
19911
|
init_EmptyState();
|
|
20667
19912
|
init_useEventBus();
|
|
20668
|
-
init_useTranslate();
|
|
20669
19913
|
CHART_COLORS = [
|
|
20670
19914
|
"var(--color-primary)",
|
|
20671
19915
|
"var(--color-success)",
|
|
@@ -21238,7 +20482,7 @@ var init_Chart = __esm({
|
|
|
21238
20482
|
}) => {
|
|
21239
20483
|
const resolvedLook = look ?? (chartType ? LOOK_FROM_CHART_TYPE[chartType] : "bar-vertical");
|
|
21240
20484
|
const eventBus = useEventBus();
|
|
21241
|
-
const { t } = useTranslate();
|
|
20485
|
+
const { t } = hooks.useTranslate();
|
|
21242
20486
|
const handleAction = React84.useCallback(
|
|
21243
20487
|
(action) => {
|
|
21244
20488
|
if (action.event) {
|
|
@@ -21435,7 +20679,7 @@ function ClassifierBoard({
|
|
|
21435
20679
|
className
|
|
21436
20680
|
}) {
|
|
21437
20681
|
const { emit } = useEventBus();
|
|
21438
|
-
const { t } = useTranslate();
|
|
20682
|
+
const { t } = hooks.useTranslate();
|
|
21439
20683
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
21440
20684
|
const [assignments, setAssignments] = React84.useState({});
|
|
21441
20685
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -21573,7 +20817,6 @@ var init_ClassifierBoard = __esm({
|
|
|
21573
20817
|
"components/game/organisms/puzzles/classifier/ClassifierBoard.tsx"() {
|
|
21574
20818
|
init_atoms2();
|
|
21575
20819
|
init_useEventBus();
|
|
21576
|
-
init_useTranslate();
|
|
21577
20820
|
ClassifierBoard.displayName = "ClassifierBoard";
|
|
21578
20821
|
}
|
|
21579
20822
|
});
|
|
@@ -21583,7 +20826,7 @@ function CodeView({
|
|
|
21583
20826
|
defaultExpanded = false,
|
|
21584
20827
|
className
|
|
21585
20828
|
}) {
|
|
21586
|
-
const { t } = useTranslate();
|
|
20829
|
+
const { t } = hooks.useTranslate();
|
|
21587
20830
|
const [expanded, setExpanded] = React84.useState(defaultExpanded);
|
|
21588
20831
|
const jsonString = JSON.stringify(data, null, 2);
|
|
21589
20832
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("rounded-lg border border-border overflow-hidden", className), gap: "none", children: [
|
|
@@ -21605,7 +20848,6 @@ var init_CodeView = __esm({
|
|
|
21605
20848
|
"components/game/organisms/puzzles/state-architect/CodeView.tsx"() {
|
|
21606
20849
|
init_atoms2();
|
|
21607
20850
|
init_cn();
|
|
21608
|
-
init_useTranslate();
|
|
21609
20851
|
CodeView.displayName = "CodeView";
|
|
21610
20852
|
}
|
|
21611
20853
|
});
|
|
@@ -21619,7 +20861,6 @@ var init_Tabs = __esm({
|
|
|
21619
20861
|
init_Box();
|
|
21620
20862
|
init_cn();
|
|
21621
20863
|
init_useEventBus();
|
|
21622
|
-
init_useTranslate();
|
|
21623
20864
|
Tabs = ({
|
|
21624
20865
|
items,
|
|
21625
20866
|
tabs,
|
|
@@ -21637,7 +20878,7 @@ var init_Tabs = __esm({
|
|
|
21637
20878
|
id: id || value || ""
|
|
21638
20879
|
}));
|
|
21639
20880
|
const eventBus = useEventBus();
|
|
21640
|
-
const { t } = useTranslate();
|
|
20881
|
+
const { t } = hooks.useTranslate();
|
|
21641
20882
|
const initialActive = safeItems.find((item) => item.active)?.id;
|
|
21642
20883
|
const [internalActiveTab, setInternalActiveTab] = React84.useState(
|
|
21643
20884
|
defaultActiveTab || initialActive || safeItems[0]?.id || ""
|
|
@@ -21796,7 +21037,6 @@ var init_CodeViewer = __esm({
|
|
|
21796
21037
|
init_EmptyState();
|
|
21797
21038
|
init_Tabs();
|
|
21798
21039
|
init_useEventBus();
|
|
21799
|
-
init_useTranslate();
|
|
21800
21040
|
DIFF_STYLES = {
|
|
21801
21041
|
add: {
|
|
21802
21042
|
bg: "bg-success/10",
|
|
@@ -21834,7 +21074,7 @@ var init_CodeViewer = __esm({
|
|
|
21834
21074
|
className
|
|
21835
21075
|
}) => {
|
|
21836
21076
|
const eventBus = useEventBus();
|
|
21837
|
-
const { t } = useTranslate();
|
|
21077
|
+
const { t } = hooks.useTranslate();
|
|
21838
21078
|
const [copied, setCopied] = React84.useState(false);
|
|
21839
21079
|
const [wrap, setWrap] = React84.useState(wordWrap);
|
|
21840
21080
|
const [activeFileIndex, setActiveFileIndex] = React84.useState(0);
|
|
@@ -22168,7 +21408,6 @@ var init_ConfirmDialog = __esm({
|
|
|
22168
21408
|
init_Box();
|
|
22169
21409
|
init_Stack();
|
|
22170
21410
|
init_cn();
|
|
22171
|
-
init_useTranslate();
|
|
22172
21411
|
variantConfig = {
|
|
22173
21412
|
danger: {
|
|
22174
21413
|
icon: LucideIcons2.Trash2,
|
|
@@ -22216,7 +21455,7 @@ var init_ConfirmDialog = __esm({
|
|
|
22216
21455
|
className
|
|
22217
21456
|
}) => {
|
|
22218
21457
|
const config = variantConfig[variant];
|
|
22219
|
-
const { t } = useTranslate();
|
|
21458
|
+
const { t } = hooks.useTranslate();
|
|
22220
21459
|
const resolvedMessage = message ?? description ?? "";
|
|
22221
21460
|
const resolvedConfirmText = confirmText ?? confirmLabel ?? t("dialog.confirm");
|
|
22222
21461
|
const resolvedCancelText = cancelText ?? cancelLabel ?? t("dialog.cancel");
|
|
@@ -22650,7 +21889,6 @@ var init_DashboardGrid = __esm({
|
|
|
22650
21889
|
"components/core/organisms/layout/DashboardGrid.tsx"() {
|
|
22651
21890
|
init_cn();
|
|
22652
21891
|
init_Box();
|
|
22653
|
-
init_useTranslate();
|
|
22654
21892
|
gapStyles5 = {
|
|
22655
21893
|
sm: "gap-2",
|
|
22656
21894
|
md: "gap-4",
|
|
@@ -22677,7 +21915,7 @@ var init_DashboardGrid = __esm({
|
|
|
22677
21915
|
cells,
|
|
22678
21916
|
className
|
|
22679
21917
|
}) => {
|
|
22680
|
-
const { t: _t } = useTranslate();
|
|
21918
|
+
const { t: _t } = hooks.useTranslate();
|
|
22681
21919
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22682
21920
|
Box,
|
|
22683
21921
|
{
|
|
@@ -22705,6 +21943,20 @@ var init_DashboardGrid = __esm({
|
|
|
22705
21943
|
DashboardGrid.displayName = "DashboardGrid";
|
|
22706
21944
|
}
|
|
22707
21945
|
});
|
|
21946
|
+
|
|
21947
|
+
// hooks/useAuthContext.ts
|
|
21948
|
+
function useAuthContext() {
|
|
21949
|
+
return {
|
|
21950
|
+
user: null,
|
|
21951
|
+
loading: false,
|
|
21952
|
+
signIn: void 0,
|
|
21953
|
+
signOut: void 0
|
|
21954
|
+
};
|
|
21955
|
+
}
|
|
21956
|
+
var init_useAuthContext = __esm({
|
|
21957
|
+
"hooks/useAuthContext.ts"() {
|
|
21958
|
+
}
|
|
21959
|
+
});
|
|
22708
21960
|
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
22709
21961
|
var init_CurrentPagePathContext = __esm({
|
|
22710
21962
|
"context/CurrentPagePathContext.tsx"() {
|
|
@@ -22730,7 +21982,6 @@ var init_DashboardLayout = __esm({
|
|
|
22730
21982
|
init_Icon();
|
|
22731
21983
|
init_useAuthContext();
|
|
22732
21984
|
init_useEventBus();
|
|
22733
|
-
init_useTranslate();
|
|
22734
21985
|
init_CurrentPagePathContext();
|
|
22735
21986
|
DashboardLayout = ({
|
|
22736
21987
|
appName = "{{APP_TITLE}}",
|
|
@@ -22789,7 +22040,7 @@ var init_DashboardLayout = __esm({
|
|
|
22789
22040
|
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
22790
22041
|
const { signOut: authSignOut } = useAuthContext();
|
|
22791
22042
|
const user = userProp || (null);
|
|
22792
|
-
const { t } = useTranslate();
|
|
22043
|
+
const { t } = hooks.useTranslate();
|
|
22793
22044
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
22794
22045
|
const showSidebar = layoutMode === "sidebar";
|
|
22795
22046
|
const showHeader = layoutMode !== "minimal";
|
|
@@ -23760,7 +23011,7 @@ function DataGrid({
|
|
|
23760
23011
|
look = "dense"
|
|
23761
23012
|
}) {
|
|
23762
23013
|
const eventBus = useEventBus();
|
|
23763
|
-
const { t } = useTranslate();
|
|
23014
|
+
const { t } = hooks.useTranslate();
|
|
23764
23015
|
const [selectedIds, setSelectedIds] = React84.useState(/* @__PURE__ */ new Set());
|
|
23765
23016
|
const [visibleCount, setVisibleCount] = React84.useState(pageSize || Infinity);
|
|
23766
23017
|
const fieldDefs = fields ?? columns ?? [];
|
|
@@ -24075,7 +23326,6 @@ var init_DataGrid = __esm({
|
|
|
24075
23326
|
init_cn();
|
|
24076
23327
|
init_getNestedValue();
|
|
24077
23328
|
init_useEventBus();
|
|
24078
|
-
init_useTranslate();
|
|
24079
23329
|
init_Box();
|
|
24080
23330
|
init_Stack();
|
|
24081
23331
|
init_Typography();
|
|
@@ -24200,7 +23450,7 @@ function DataList({
|
|
|
24200
23450
|
look = "dense"
|
|
24201
23451
|
}) {
|
|
24202
23452
|
const eventBus = useEventBus();
|
|
24203
|
-
const { t } = useTranslate();
|
|
23453
|
+
const { t } = hooks.useTranslate();
|
|
24204
23454
|
const [visibleCount, setVisibleCount] = React84__namespace.default.useState(pageSize || Infinity);
|
|
24205
23455
|
const fieldDefs = fields ?? columns ?? [];
|
|
24206
23456
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -24514,7 +23764,6 @@ var init_DataList = __esm({
|
|
|
24514
23764
|
init_cn();
|
|
24515
23765
|
init_getNestedValue();
|
|
24516
23766
|
init_useEventBus();
|
|
24517
|
-
init_useTranslate();
|
|
24518
23767
|
init_Box();
|
|
24519
23768
|
init_Stack();
|
|
24520
23769
|
init_Typography();
|
|
@@ -24569,7 +23818,6 @@ var init_FileTree = __esm({
|
|
|
24569
23818
|
init_Box();
|
|
24570
23819
|
init_Typography();
|
|
24571
23820
|
init_Icon();
|
|
24572
|
-
init_useTranslate();
|
|
24573
23821
|
TreeNodeItem = ({
|
|
24574
23822
|
node,
|
|
24575
23823
|
depth,
|
|
@@ -24655,7 +23903,7 @@ var init_FileTree = __esm({
|
|
|
24655
23903
|
className,
|
|
24656
23904
|
indent = 16
|
|
24657
23905
|
}) => {
|
|
24658
|
-
const { t } = useTranslate();
|
|
23906
|
+
const { t } = hooks.useTranslate();
|
|
24659
23907
|
if (tree.length === 0) {
|
|
24660
23908
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
24661
23909
|
}
|
|
@@ -24699,6 +23947,70 @@ var init_FormField = __esm({
|
|
|
24699
23947
|
FormField.displayName = "FormField";
|
|
24700
23948
|
}
|
|
24701
23949
|
});
|
|
23950
|
+
function getOrCreateStore(query) {
|
|
23951
|
+
if (!queryStores.has(query)) {
|
|
23952
|
+
queryStores.set(query, {
|
|
23953
|
+
search: "",
|
|
23954
|
+
filters: {},
|
|
23955
|
+
sortField: void 0,
|
|
23956
|
+
sortDirection: void 0,
|
|
23957
|
+
listeners: /* @__PURE__ */ new Set()
|
|
23958
|
+
});
|
|
23959
|
+
}
|
|
23960
|
+
return queryStores.get(query);
|
|
23961
|
+
}
|
|
23962
|
+
function useQuerySingleton(query) {
|
|
23963
|
+
const [, forceUpdate] = React84.useState({});
|
|
23964
|
+
if (!query) {
|
|
23965
|
+
return null;
|
|
23966
|
+
}
|
|
23967
|
+
const store = React84.useMemo(() => getOrCreateStore(query), [query]);
|
|
23968
|
+
React84.useMemo(() => {
|
|
23969
|
+
const listener = () => forceUpdate({});
|
|
23970
|
+
store.listeners.add(listener);
|
|
23971
|
+
return () => {
|
|
23972
|
+
store.listeners.delete(listener);
|
|
23973
|
+
};
|
|
23974
|
+
}, [store]);
|
|
23975
|
+
const notifyListeners3 = React84.useCallback(() => {
|
|
23976
|
+
store.listeners.forEach((listener) => listener());
|
|
23977
|
+
}, [store]);
|
|
23978
|
+
const setSearch = React84.useCallback((value) => {
|
|
23979
|
+
store.search = value;
|
|
23980
|
+
notifyListeners3();
|
|
23981
|
+
}, [store, notifyListeners3]);
|
|
23982
|
+
const setFilter = React84.useCallback((key, value) => {
|
|
23983
|
+
store.filters = { ...store.filters, [key]: value };
|
|
23984
|
+
notifyListeners3();
|
|
23985
|
+
}, [store, notifyListeners3]);
|
|
23986
|
+
const clearFilters = React84.useCallback(() => {
|
|
23987
|
+
store.filters = {};
|
|
23988
|
+
store.search = "";
|
|
23989
|
+
notifyListeners3();
|
|
23990
|
+
}, [store, notifyListeners3]);
|
|
23991
|
+
const setSort = React84.useCallback((field, direction) => {
|
|
23992
|
+
store.sortField = field;
|
|
23993
|
+
store.sortDirection = direction;
|
|
23994
|
+
notifyListeners3();
|
|
23995
|
+
}, [store, notifyListeners3]);
|
|
23996
|
+
return {
|
|
23997
|
+
search: store.search,
|
|
23998
|
+
setSearch,
|
|
23999
|
+
filters: store.filters,
|
|
24000
|
+
setFilter,
|
|
24001
|
+
clearFilters,
|
|
24002
|
+
sortField: store.sortField,
|
|
24003
|
+
sortDirection: store.sortDirection,
|
|
24004
|
+
setSort
|
|
24005
|
+
};
|
|
24006
|
+
}
|
|
24007
|
+
var queryStores;
|
|
24008
|
+
var init_useQuerySingleton = __esm({
|
|
24009
|
+
"hooks/useQuerySingleton.ts"() {
|
|
24010
|
+
"use client";
|
|
24011
|
+
queryStores = /* @__PURE__ */ new Map();
|
|
24012
|
+
}
|
|
24013
|
+
});
|
|
24702
24014
|
var resolveFilterType, lookStyles6, FilterGroup;
|
|
24703
24015
|
var init_FilterGroup = __esm({
|
|
24704
24016
|
"components/core/molecules/FilterGroup.tsx"() {
|
|
@@ -24712,7 +24024,6 @@ var init_FilterGroup = __esm({
|
|
|
24712
24024
|
init_Icon();
|
|
24713
24025
|
init_useEventBus();
|
|
24714
24026
|
init_useQuerySingleton();
|
|
24715
|
-
init_useTranslate();
|
|
24716
24027
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24717
24028
|
lookStyles6 = {
|
|
24718
24029
|
toolbar: "",
|
|
@@ -24733,7 +24044,7 @@ var init_FilterGroup = __esm({
|
|
|
24733
24044
|
isLoading,
|
|
24734
24045
|
look = "toolbar"
|
|
24735
24046
|
}) => {
|
|
24736
|
-
const { t } = useTranslate();
|
|
24047
|
+
const { t } = hooks.useTranslate();
|
|
24737
24048
|
const eventBus = useEventBus();
|
|
24738
24049
|
const queryState = useQuerySingleton(query);
|
|
24739
24050
|
const [selectedValues, setSelectedValues] = React84.useState(
|
|
@@ -25354,7 +24665,6 @@ var init_RelationSelect = __esm({
|
|
|
25354
24665
|
init_Spinner();
|
|
25355
24666
|
init_Typography();
|
|
25356
24667
|
init_debug();
|
|
25357
|
-
init_useTranslate();
|
|
25358
24668
|
isRelationsDebugEnabled = () => isDebugEnabled();
|
|
25359
24669
|
RelationSelect = ({
|
|
25360
24670
|
value,
|
|
@@ -25371,7 +24681,7 @@ var init_RelationSelect = __esm({
|
|
|
25371
24681
|
searchPlaceholder,
|
|
25372
24682
|
emptyMessage
|
|
25373
24683
|
}) => {
|
|
25374
|
-
const { t } = useTranslate();
|
|
24684
|
+
const { t } = hooks.useTranslate();
|
|
25375
24685
|
const resolvedPlaceholder = placeholder ?? t("relationSelect.selectPlaceholder");
|
|
25376
24686
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
25377
24687
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noOptionsFound");
|
|
@@ -25579,7 +24889,6 @@ var init_SearchInput = __esm({
|
|
|
25579
24889
|
init_cn();
|
|
25580
24890
|
init_useEventBus();
|
|
25581
24891
|
init_useQuerySingleton();
|
|
25582
|
-
init_useTranslate();
|
|
25583
24892
|
SearchInput = ({
|
|
25584
24893
|
value,
|
|
25585
24894
|
onSearch,
|
|
@@ -25594,7 +24903,7 @@ var init_SearchInput = __esm({
|
|
|
25594
24903
|
...props
|
|
25595
24904
|
}) => {
|
|
25596
24905
|
const eventBus = useEventBus();
|
|
25597
|
-
const { t } = useTranslate();
|
|
24906
|
+
const { t } = hooks.useTranslate();
|
|
25598
24907
|
const resolvedPlaceholder = placeholder ?? t("common.search");
|
|
25599
24908
|
const queryState = useQuerySingleton(query);
|
|
25600
24909
|
const initialValue = queryState?.search ?? value ?? "";
|
|
@@ -25682,7 +24991,6 @@ var init_SidePanel = __esm({
|
|
|
25682
24991
|
init_Typography();
|
|
25683
24992
|
init_cn();
|
|
25684
24993
|
init_useEventBus();
|
|
25685
|
-
init_useTranslate();
|
|
25686
24994
|
SidePanel = ({
|
|
25687
24995
|
title,
|
|
25688
24996
|
children,
|
|
@@ -25695,7 +25003,7 @@ var init_SidePanel = __esm({
|
|
|
25695
25003
|
closeEvent
|
|
25696
25004
|
}) => {
|
|
25697
25005
|
const eventBus = useEventBus();
|
|
25698
|
-
const { t } = useTranslate();
|
|
25006
|
+
const { t } = hooks.useTranslate();
|
|
25699
25007
|
const handleClose = () => {
|
|
25700
25008
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
25701
25009
|
onClose();
|
|
@@ -25861,7 +25169,6 @@ var init_WizardNavigation = __esm({
|
|
|
25861
25169
|
init_Icon();
|
|
25862
25170
|
init_cn();
|
|
25863
25171
|
init_useEventBus();
|
|
25864
|
-
init_useTranslate();
|
|
25865
25172
|
WizardNavigation = ({
|
|
25866
25173
|
currentStep,
|
|
25867
25174
|
totalSteps,
|
|
@@ -25882,7 +25189,7 @@ var init_WizardNavigation = __esm({
|
|
|
25882
25189
|
className
|
|
25883
25190
|
}) => {
|
|
25884
25191
|
const eventBus = useSafeEventBus4();
|
|
25885
|
-
const { t } = useTranslate();
|
|
25192
|
+
const { t } = hooks.useTranslate();
|
|
25886
25193
|
const resolvedBackLabel = backLabel ?? t("wizard.back");
|
|
25887
25194
|
const resolvedNextLabel = nextLabel ?? t("wizard.next");
|
|
25888
25195
|
const resolvedCompleteLabel = completeLabel ?? t("wizard.complete");
|
|
@@ -25949,7 +25256,6 @@ var init_RepeatableFormSection = __esm({
|
|
|
25949
25256
|
init_Card();
|
|
25950
25257
|
init_Icon();
|
|
25951
25258
|
init_useEventBus();
|
|
25952
|
-
init_useTranslate();
|
|
25953
25259
|
RepeatableFormSection = ({
|
|
25954
25260
|
sectionType,
|
|
25955
25261
|
title,
|
|
@@ -25970,7 +25276,7 @@ var init_RepeatableFormSection = __esm({
|
|
|
25970
25276
|
showAuditInfo = false
|
|
25971
25277
|
}) => {
|
|
25972
25278
|
const eventBus = useEventBus();
|
|
25973
|
-
const { t } = useTranslate();
|
|
25279
|
+
const { t } = hooks.useTranslate();
|
|
25974
25280
|
const resolvedAddLabel = addLabel ?? t("common.add");
|
|
25975
25281
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noItemsAdded");
|
|
25976
25282
|
const safeItems = items ?? [];
|
|
@@ -26080,7 +25386,6 @@ var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
|
26080
25386
|
var init_ViolationAlert = __esm({
|
|
26081
25387
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
26082
25388
|
init_cn();
|
|
26083
|
-
init_useTranslate();
|
|
26084
25389
|
init_Box();
|
|
26085
25390
|
init_Stack();
|
|
26086
25391
|
init_Typography();
|
|
@@ -26106,7 +25411,7 @@ var init_ViolationAlert = __esm({
|
|
|
26106
25411
|
className,
|
|
26107
25412
|
...flatProps
|
|
26108
25413
|
}) => {
|
|
26109
|
-
const { t } = useTranslate();
|
|
25414
|
+
const { t } = hooks.useTranslate();
|
|
26110
25415
|
const resolvedViolation = violation ?? {
|
|
26111
25416
|
law: "",
|
|
26112
25417
|
article: "",
|
|
@@ -26586,7 +25891,6 @@ var init_LineChart = __esm({
|
|
|
26586
25891
|
"use client";
|
|
26587
25892
|
init_cn();
|
|
26588
25893
|
init_atoms2();
|
|
26589
|
-
init_useTranslate();
|
|
26590
25894
|
LineChart2 = ({
|
|
26591
25895
|
data,
|
|
26592
25896
|
width = 400,
|
|
@@ -26598,7 +25902,7 @@ var init_LineChart = __esm({
|
|
|
26598
25902
|
areaColor = "var(--color-primary)",
|
|
26599
25903
|
className
|
|
26600
25904
|
}) => {
|
|
26601
|
-
const { t } = useTranslate();
|
|
25905
|
+
const { t } = hooks.useTranslate();
|
|
26602
25906
|
const gradientId = React84.useId();
|
|
26603
25907
|
const safeData = data ?? [];
|
|
26604
25908
|
const sortedData = React84.useMemo(() => {
|
|
@@ -28542,7 +27846,6 @@ var init_GraphView = __esm({
|
|
|
28542
27846
|
"use client";
|
|
28543
27847
|
init_cn();
|
|
28544
27848
|
init_atoms2();
|
|
28545
|
-
init_useTranslate();
|
|
28546
27849
|
GROUP_COLORS = [
|
|
28547
27850
|
"#3b82f6",
|
|
28548
27851
|
// blue-500
|
|
@@ -28575,7 +27878,7 @@ var init_GraphView = __esm({
|
|
|
28575
27878
|
showLabels = true,
|
|
28576
27879
|
zoomToFit = true
|
|
28577
27880
|
}) => {
|
|
28578
|
-
const { t } = useTranslate();
|
|
27881
|
+
const { t } = hooks.useTranslate();
|
|
28579
27882
|
const containerRef = React84.useRef(null);
|
|
28580
27883
|
const animRef = React84.useRef(0);
|
|
28581
27884
|
const [simNodes, setSimNodes] = React84.useState([]);
|
|
@@ -28868,7 +28171,6 @@ var init_NumberStepper = __esm({
|
|
|
28868
28171
|
init_cn();
|
|
28869
28172
|
init_Icon();
|
|
28870
28173
|
init_useEventBus();
|
|
28871
|
-
init_useTranslate();
|
|
28872
28174
|
sizeStyles10 = {
|
|
28873
28175
|
sm: {
|
|
28874
28176
|
button: "w-7 h-7",
|
|
@@ -28902,7 +28204,7 @@ var init_NumberStepper = __esm({
|
|
|
28902
28204
|
label
|
|
28903
28205
|
}) => {
|
|
28904
28206
|
const eventBus = useSafeEventBus5();
|
|
28905
|
-
const { t } = useTranslate();
|
|
28207
|
+
const { t } = hooks.useTranslate();
|
|
28906
28208
|
const intervalRef = React84.useRef(null);
|
|
28907
28209
|
const timeoutRef = React84.useRef(null);
|
|
28908
28210
|
const isAtMin = min !== void 0 && value <= min;
|
|
@@ -29209,7 +28511,6 @@ var init_UploadDropZone = __esm({
|
|
|
29209
28511
|
init_Icon();
|
|
29210
28512
|
init_Typography();
|
|
29211
28513
|
init_useEventBus();
|
|
29212
|
-
init_useTranslate();
|
|
29213
28514
|
UploadDropZone = ({
|
|
29214
28515
|
accept,
|
|
29215
28516
|
maxSize,
|
|
@@ -29222,7 +28523,7 @@ var init_UploadDropZone = __esm({
|
|
|
29222
28523
|
onFiles,
|
|
29223
28524
|
className
|
|
29224
28525
|
}) => {
|
|
29225
|
-
const { t } = useTranslate();
|
|
28526
|
+
const { t } = hooks.useTranslate();
|
|
29226
28527
|
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
29227
28528
|
const [isDragOver, setIsDragOver] = React84.useState(false);
|
|
29228
28529
|
const [error, setError] = React84.useState(null);
|
|
@@ -29376,7 +28677,6 @@ var init_Lightbox = __esm({
|
|
|
29376
28677
|
init_Icon();
|
|
29377
28678
|
init_cn();
|
|
29378
28679
|
init_useEventBus();
|
|
29379
|
-
init_useTranslate();
|
|
29380
28680
|
Lightbox = ({
|
|
29381
28681
|
images = [],
|
|
29382
28682
|
currentIndex = 0,
|
|
@@ -29391,7 +28691,7 @@ var init_Lightbox = __esm({
|
|
|
29391
28691
|
const [index, setIndex] = React84.useState(currentIndex);
|
|
29392
28692
|
const [touchStartX, setTouchStartX] = React84.useState(null);
|
|
29393
28693
|
const eventBus = useSafeEventBus8();
|
|
29394
|
-
const { t } = useTranslate();
|
|
28694
|
+
const { t } = hooks.useTranslate();
|
|
29395
28695
|
React84.useEffect(() => {
|
|
29396
28696
|
setIndex(currentIndex);
|
|
29397
28697
|
}, [currentIndex]);
|
|
@@ -29629,7 +28929,7 @@ function TableView({
|
|
|
29629
28929
|
dndRoot
|
|
29630
28930
|
}) {
|
|
29631
28931
|
const eventBus = useEventBus();
|
|
29632
|
-
const { t } = useTranslate();
|
|
28932
|
+
const { t } = hooks.useTranslate();
|
|
29633
28933
|
const [visibleCount, setVisibleCount] = React84__namespace.default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29634
28934
|
const [localSelected, setLocalSelected] = React84__namespace.default.useState(/* @__PURE__ */ new Set());
|
|
29635
28935
|
const colDefs = columns ?? fields ?? [];
|
|
@@ -29861,7 +29161,6 @@ var init_TableView = __esm({
|
|
|
29861
29161
|
init_cn();
|
|
29862
29162
|
init_getNestedValue();
|
|
29863
29163
|
init_useEventBus();
|
|
29864
|
-
init_useTranslate();
|
|
29865
29164
|
init_Box();
|
|
29866
29165
|
init_Stack();
|
|
29867
29166
|
init_Typography();
|
|
@@ -30065,7 +29364,6 @@ var init_Meter = __esm({
|
|
|
30065
29364
|
init_LoadingState();
|
|
30066
29365
|
init_ErrorState();
|
|
30067
29366
|
init_useEventBus();
|
|
30068
|
-
init_useTranslate();
|
|
30069
29367
|
DEFAULT_THRESHOLDS = [
|
|
30070
29368
|
{ value: 30, color: "var(--color-error)" },
|
|
30071
29369
|
{ value: 70, color: "var(--color-warning)" },
|
|
@@ -30093,7 +29391,7 @@ var init_Meter = __esm({
|
|
|
30093
29391
|
className
|
|
30094
29392
|
}) => {
|
|
30095
29393
|
const eventBus = useEventBus();
|
|
30096
|
-
const { t } = useTranslate();
|
|
29394
|
+
const { t } = hooks.useTranslate();
|
|
30097
29395
|
const handleAction = React84.useCallback(
|
|
30098
29396
|
(action) => {
|
|
30099
29397
|
if (action.event) {
|
|
@@ -30446,6 +29744,79 @@ var init_SwipeableRow = __esm({
|
|
|
30446
29744
|
SwipeableRow.displayName = "SwipeableRow";
|
|
30447
29745
|
}
|
|
30448
29746
|
});
|
|
29747
|
+
function useDragReorder(initialItems, onReorder) {
|
|
29748
|
+
const [items, setItems] = React84.useState(initialItems);
|
|
29749
|
+
const [dragIndex, setDragIndex] = React84.useState(-1);
|
|
29750
|
+
const [dragOverIndex, setDragOverIndex] = React84.useState(-1);
|
|
29751
|
+
const itemsRef = React84.useRef(initialItems);
|
|
29752
|
+
if (initialItems !== itemsRef.current) {
|
|
29753
|
+
itemsRef.current = initialItems;
|
|
29754
|
+
setItems(initialItems);
|
|
29755
|
+
}
|
|
29756
|
+
const isDragging = dragIndex >= 0;
|
|
29757
|
+
const handleDragStart = React84.useCallback((index) => (e) => {
|
|
29758
|
+
e.preventDefault();
|
|
29759
|
+
setDragIndex(index);
|
|
29760
|
+
setDragOverIndex(index);
|
|
29761
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
29762
|
+
}, []);
|
|
29763
|
+
const handleDragMove = React84.useCallback((index) => (e) => {
|
|
29764
|
+
if (dragIndex < 0) return;
|
|
29765
|
+
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
29766
|
+
if (!target) return;
|
|
29767
|
+
let el = target;
|
|
29768
|
+
while (el && !el.dataset.dragIndex) {
|
|
29769
|
+
el = el.parentElement;
|
|
29770
|
+
}
|
|
29771
|
+
if (el?.dataset.dragIndex) {
|
|
29772
|
+
const overIndex = parseInt(el.dataset.dragIndex, 10);
|
|
29773
|
+
if (!isNaN(overIndex) && overIndex !== dragOverIndex) {
|
|
29774
|
+
setDragOverIndex(overIndex);
|
|
29775
|
+
}
|
|
29776
|
+
}
|
|
29777
|
+
}, [dragIndex, dragOverIndex]);
|
|
29778
|
+
const handleDragEnd = React84.useCallback(() => {
|
|
29779
|
+
if (dragIndex >= 0 && dragOverIndex >= 0 && dragIndex !== dragOverIndex) {
|
|
29780
|
+
const newItems = [...items];
|
|
29781
|
+
const [movedItem] = newItems.splice(dragIndex, 1);
|
|
29782
|
+
newItems.splice(dragOverIndex, 0, movedItem);
|
|
29783
|
+
setItems(newItems);
|
|
29784
|
+
onReorder(dragIndex, dragOverIndex, items[dragIndex]);
|
|
29785
|
+
}
|
|
29786
|
+
setDragIndex(-1);
|
|
29787
|
+
setDragOverIndex(-1);
|
|
29788
|
+
}, [dragIndex, dragOverIndex, items, onReorder]);
|
|
29789
|
+
const getDragHandleProps = React84.useCallback((index) => ({
|
|
29790
|
+
onPointerDown: handleDragStart(index),
|
|
29791
|
+
style: { cursor: "grab", touchAction: "none" },
|
|
29792
|
+
"aria-grabbed": dragIndex === index,
|
|
29793
|
+
role: "button"
|
|
29794
|
+
}), [handleDragStart, dragIndex]);
|
|
29795
|
+
const getItemProps = React84.useCallback((index) => ({
|
|
29796
|
+
onPointerMove: handleDragMove(index),
|
|
29797
|
+
onPointerUp: handleDragEnd,
|
|
29798
|
+
"aria-dropeffect": "move",
|
|
29799
|
+
"data-drag-index": String(index),
|
|
29800
|
+
style: {
|
|
29801
|
+
opacity: dragIndex === index ? 0.5 : 1,
|
|
29802
|
+
transition: isDragging ? "transform 150ms ease" : void 0,
|
|
29803
|
+
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
|
|
29804
|
+
}
|
|
29805
|
+
}), [handleDragMove, handleDragEnd, dragIndex, dragOverIndex, isDragging]);
|
|
29806
|
+
return {
|
|
29807
|
+
items,
|
|
29808
|
+
dragIndex,
|
|
29809
|
+
dragOverIndex,
|
|
29810
|
+
isDragging,
|
|
29811
|
+
getDragHandleProps,
|
|
29812
|
+
getItemProps
|
|
29813
|
+
};
|
|
29814
|
+
}
|
|
29815
|
+
var init_useDragReorder = __esm({
|
|
29816
|
+
"hooks/useDragReorder.ts"() {
|
|
29817
|
+
"use client";
|
|
29818
|
+
}
|
|
29819
|
+
});
|
|
30449
29820
|
function useSafeEventBus10() {
|
|
30450
29821
|
try {
|
|
30451
29822
|
return useEventBus();
|
|
@@ -30556,6 +29927,71 @@ var init_SortableList = __esm({
|
|
|
30556
29927
|
SortableList.displayName = "SortableList";
|
|
30557
29928
|
}
|
|
30558
29929
|
});
|
|
29930
|
+
function usePullToRefresh(onRefresh, options = {}) {
|
|
29931
|
+
const { threshold = 60, maxPull = 120 } = options;
|
|
29932
|
+
const [pullDistance, setPullDistance] = React84.useState(0);
|
|
29933
|
+
const [isPulling, setIsPulling] = React84.useState(false);
|
|
29934
|
+
const [isRefreshing, setIsRefreshing] = React84.useState(false);
|
|
29935
|
+
const startY = React84.useRef(0);
|
|
29936
|
+
const scrollTopRef = React84.useRef(0);
|
|
29937
|
+
const onTouchStart = React84.useCallback((e) => {
|
|
29938
|
+
const container = e.currentTarget;
|
|
29939
|
+
scrollTopRef.current = container.scrollTop;
|
|
29940
|
+
if (scrollTopRef.current <= 0) {
|
|
29941
|
+
startY.current = e.touches[0].clientY;
|
|
29942
|
+
setIsPulling(true);
|
|
29943
|
+
}
|
|
29944
|
+
}, []);
|
|
29945
|
+
const onTouchMove = React84.useCallback((e) => {
|
|
29946
|
+
if (!isPulling || isRefreshing) return;
|
|
29947
|
+
const container = e.currentTarget;
|
|
29948
|
+
if (container.scrollTop > 0) {
|
|
29949
|
+
setPullDistance(0);
|
|
29950
|
+
return;
|
|
29951
|
+
}
|
|
29952
|
+
const dy = e.touches[0].clientY - startY.current;
|
|
29953
|
+
if (dy > 0) {
|
|
29954
|
+
const distance = Math.min(dy * 0.5, maxPull);
|
|
29955
|
+
setPullDistance(distance);
|
|
29956
|
+
}
|
|
29957
|
+
}, [isPulling, isRefreshing, maxPull]);
|
|
29958
|
+
const onTouchEnd = React84.useCallback(() => {
|
|
29959
|
+
if (!isPulling) return;
|
|
29960
|
+
setIsPulling(false);
|
|
29961
|
+
if (pullDistance >= threshold && !isRefreshing) {
|
|
29962
|
+
setIsRefreshing(true);
|
|
29963
|
+
setPullDistance(threshold);
|
|
29964
|
+
onRefresh();
|
|
29965
|
+
} else {
|
|
29966
|
+
setPullDistance(0);
|
|
29967
|
+
}
|
|
29968
|
+
}, [isPulling, pullDistance, threshold, isRefreshing, onRefresh]);
|
|
29969
|
+
const endRefresh = React84.useCallback(() => {
|
|
29970
|
+
setIsRefreshing(false);
|
|
29971
|
+
setPullDistance(0);
|
|
29972
|
+
}, []);
|
|
29973
|
+
const containerProps = {
|
|
29974
|
+
onTouchStart,
|
|
29975
|
+
onTouchMove,
|
|
29976
|
+
onTouchEnd,
|
|
29977
|
+
style: {
|
|
29978
|
+
transform: pullDistance > 0 ? `translateY(${pullDistance}px)` : void 0,
|
|
29979
|
+
transition: isPulling ? "none" : "transform 300ms ease-out"
|
|
29980
|
+
}
|
|
29981
|
+
};
|
|
29982
|
+
return {
|
|
29983
|
+
pullDistance,
|
|
29984
|
+
isPulling,
|
|
29985
|
+
isRefreshing,
|
|
29986
|
+
containerProps,
|
|
29987
|
+
endRefresh
|
|
29988
|
+
};
|
|
29989
|
+
}
|
|
29990
|
+
var init_usePullToRefresh = __esm({
|
|
29991
|
+
"hooks/usePullToRefresh.ts"() {
|
|
29992
|
+
"use client";
|
|
29993
|
+
}
|
|
29994
|
+
});
|
|
30559
29995
|
function useSafeEventBus11() {
|
|
30560
29996
|
try {
|
|
30561
29997
|
return useEventBus();
|
|
@@ -31874,7 +31310,6 @@ var init_VoteStack = __esm({
|
|
|
31874
31310
|
init_cn();
|
|
31875
31311
|
init_Icon();
|
|
31876
31312
|
init_useEventBus();
|
|
31877
|
-
init_useTranslate();
|
|
31878
31313
|
sizeStyles12 = {
|
|
31879
31314
|
sm: {
|
|
31880
31315
|
button: "w-7 h-7",
|
|
@@ -31907,7 +31342,7 @@ var init_VoteStack = __esm({
|
|
|
31907
31342
|
const isUp = userVote === "up";
|
|
31908
31343
|
const isDown = userVote === "down";
|
|
31909
31344
|
const eventBus = useEventBus();
|
|
31910
|
-
const { t } = useTranslate();
|
|
31345
|
+
const { t } = hooks.useTranslate();
|
|
31911
31346
|
const handleUp = React84.useCallback(() => {
|
|
31912
31347
|
const next = isUp ? null : "up";
|
|
31913
31348
|
onVote?.(next);
|
|
@@ -32329,7 +31764,6 @@ var init_QrScanner = __esm({
|
|
|
32329
31764
|
init_atoms2();
|
|
32330
31765
|
init_Icon();
|
|
32331
31766
|
init_useEventBus();
|
|
32332
|
-
init_useTranslate();
|
|
32333
31767
|
QrScanner = ({
|
|
32334
31768
|
onScan,
|
|
32335
31769
|
scanEvent,
|
|
@@ -32342,7 +31776,7 @@ var init_QrScanner = __esm({
|
|
|
32342
31776
|
className
|
|
32343
31777
|
}) => {
|
|
32344
31778
|
const eventBus = useEventBus();
|
|
32345
|
-
const { t } = useTranslate();
|
|
31779
|
+
const { t } = hooks.useTranslate();
|
|
32346
31780
|
const videoRef = React84.useRef(null);
|
|
32347
31781
|
const streamRef = React84.useRef(null);
|
|
32348
31782
|
const scanIntervalRef = React84.useRef(null);
|
|
@@ -32556,7 +31990,6 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32556
31990
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32557
31991
|
init_cn();
|
|
32558
31992
|
init_useEventBus();
|
|
32559
|
-
init_useTranslate();
|
|
32560
31993
|
init_Typography();
|
|
32561
31994
|
init_Box();
|
|
32562
31995
|
init_Label();
|
|
@@ -32612,7 +32045,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32612
32045
|
className
|
|
32613
32046
|
}) => {
|
|
32614
32047
|
const eventBus = useEventBus();
|
|
32615
|
-
const { t } = useTranslate();
|
|
32048
|
+
const { t } = hooks.useTranslate();
|
|
32616
32049
|
const hint = constraintHint(constraint, t);
|
|
32617
32050
|
const error = validateSelection(selected, constraint, t);
|
|
32618
32051
|
const inputName = `option-${groupId}`;
|
|
@@ -33036,7 +32469,7 @@ function changeBlockType(block, type) {
|
|
|
33036
32469
|
return { id: block.id, type, content: seed };
|
|
33037
32470
|
}
|
|
33038
32471
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
33039
|
-
const { t } = useTranslate();
|
|
32472
|
+
const { t } = hooks.useTranslate();
|
|
33040
32473
|
const [open, setOpen] = React84.useState(false);
|
|
33041
32474
|
const ref = React84.useRef(null);
|
|
33042
32475
|
React84.useEffect(() => {
|
|
@@ -33193,7 +32626,7 @@ function BlockRow({
|
|
|
33193
32626
|
onInsertAfter,
|
|
33194
32627
|
onChangeType
|
|
33195
32628
|
}) {
|
|
33196
|
-
const { t } = useTranslate();
|
|
32629
|
+
const { t } = hooks.useTranslate();
|
|
33197
32630
|
const setContent = React84.useCallback(
|
|
33198
32631
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
33199
32632
|
[onUpdate]
|
|
@@ -33512,7 +32945,6 @@ var init_RichBlockEditor = __esm({
|
|
|
33512
32945
|
init_Input();
|
|
33513
32946
|
init_Icon();
|
|
33514
32947
|
init_useEventBus();
|
|
33515
|
-
init_useTranslate();
|
|
33516
32948
|
TOOLBAR_ENTRIES = [
|
|
33517
32949
|
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: LucideIcons2.Type },
|
|
33518
32950
|
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: LucideIcons2.Heading1 },
|
|
@@ -33569,7 +33001,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33569
33001
|
showToolbar = true,
|
|
33570
33002
|
className
|
|
33571
33003
|
}) => {
|
|
33572
|
-
const { t } = useTranslate();
|
|
33004
|
+
const { t } = hooks.useTranslate();
|
|
33573
33005
|
const [blocks, setBlocks] = React84.useState(
|
|
33574
33006
|
() => normalizeBlocks(initialBlocks)
|
|
33575
33007
|
);
|
|
@@ -33703,7 +33135,6 @@ var init_ReplyTree = __esm({
|
|
|
33703
33135
|
"use client";
|
|
33704
33136
|
init_cn();
|
|
33705
33137
|
init_useEventBus();
|
|
33706
|
-
init_useTranslate();
|
|
33707
33138
|
init_atoms2();
|
|
33708
33139
|
init_VoteStack();
|
|
33709
33140
|
ReplyTreeNode = ({
|
|
@@ -33723,7 +33154,7 @@ var init_ReplyTree = __esm({
|
|
|
33723
33154
|
showActions
|
|
33724
33155
|
}) => {
|
|
33725
33156
|
const eventBus = useEventBus();
|
|
33726
|
-
const { t } = useTranslate();
|
|
33157
|
+
const { t } = hooks.useTranslate();
|
|
33727
33158
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33728
33159
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33729
33160
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33914,7 +33345,7 @@ var init_ReplyTree = __esm({
|
|
|
33914
33345
|
showActions = true,
|
|
33915
33346
|
className
|
|
33916
33347
|
}) => {
|
|
33917
|
-
const { t } = useTranslate();
|
|
33348
|
+
const { t } = hooks.useTranslate();
|
|
33918
33349
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33919
33350
|
const [collapsedSet, setCollapsedSet] = React84.useState(() => {
|
|
33920
33351
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -34011,7 +33442,6 @@ var init_VersionDiff = __esm({
|
|
|
34011
33442
|
"use client";
|
|
34012
33443
|
init_cn();
|
|
34013
33444
|
init_useEventBus();
|
|
34014
|
-
init_useTranslate();
|
|
34015
33445
|
init_atoms2();
|
|
34016
33446
|
init_Stack();
|
|
34017
33447
|
INLINE_STYLES = {
|
|
@@ -34034,7 +33464,7 @@ var init_VersionDiff = __esm({
|
|
|
34034
33464
|
language,
|
|
34035
33465
|
className
|
|
34036
33466
|
}) => {
|
|
34037
|
-
const { t } = useTranslate();
|
|
33467
|
+
const { t } = hooks.useTranslate();
|
|
34038
33468
|
const eventBus = useEventBus();
|
|
34039
33469
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
34040
33470
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -34327,12 +33757,11 @@ var init_DocBreadcrumb = __esm({
|
|
|
34327
33757
|
init_Stack();
|
|
34328
33758
|
init_Typography();
|
|
34329
33759
|
init_Icon();
|
|
34330
|
-
init_useTranslate();
|
|
34331
33760
|
DocBreadcrumb = ({
|
|
34332
33761
|
items,
|
|
34333
33762
|
className
|
|
34334
33763
|
}) => {
|
|
34335
|
-
const { t } = useTranslate();
|
|
33764
|
+
const { t } = hooks.useTranslate();
|
|
34336
33765
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34337
33766
|
Box,
|
|
34338
33767
|
{
|
|
@@ -34583,7 +34012,7 @@ function DocSearch({
|
|
|
34583
34012
|
onSearch,
|
|
34584
34013
|
className
|
|
34585
34014
|
}) {
|
|
34586
|
-
const { t } = useTranslate();
|
|
34015
|
+
const { t } = hooks.useTranslate();
|
|
34587
34016
|
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34588
34017
|
const [query, setQuery] = React84.useState("");
|
|
34589
34018
|
const [results, setResults] = React84.useState([]);
|
|
@@ -34756,7 +34185,6 @@ var init_DocSearch = __esm({
|
|
|
34756
34185
|
init_Typography();
|
|
34757
34186
|
init_Icon();
|
|
34758
34187
|
init_Input();
|
|
34759
|
-
init_useTranslate();
|
|
34760
34188
|
}
|
|
34761
34189
|
});
|
|
34762
34190
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -34769,7 +34197,6 @@ var init_DocSidebar = __esm({
|
|
|
34769
34197
|
init_Stack();
|
|
34770
34198
|
init_Typography();
|
|
34771
34199
|
init_Icon();
|
|
34772
|
-
init_useTranslate();
|
|
34773
34200
|
DocSidebarCategory = ({ item, depth }) => {
|
|
34774
34201
|
const [expanded, setExpanded] = React84.useState(
|
|
34775
34202
|
() => item.items?.some(function hasActive(child) {
|
|
@@ -34854,7 +34281,7 @@ var init_DocSidebar = __esm({
|
|
|
34854
34281
|
items,
|
|
34855
34282
|
className
|
|
34856
34283
|
}) => {
|
|
34857
|
-
const { t } = useTranslate();
|
|
34284
|
+
const { t } = hooks.useTranslate();
|
|
34858
34285
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34859
34286
|
Box,
|
|
34860
34287
|
{
|
|
@@ -34876,13 +34303,12 @@ var init_DocTOC = __esm({
|
|
|
34876
34303
|
init_Box();
|
|
34877
34304
|
init_Stack();
|
|
34878
34305
|
init_Typography();
|
|
34879
|
-
init_useTranslate();
|
|
34880
34306
|
DocTOC = ({
|
|
34881
34307
|
items,
|
|
34882
34308
|
activeId,
|
|
34883
34309
|
className
|
|
34884
34310
|
}) => {
|
|
34885
|
-
const { t } = useTranslate();
|
|
34311
|
+
const { t } = hooks.useTranslate();
|
|
34886
34312
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34887
34313
|
Box,
|
|
34888
34314
|
{
|
|
@@ -35611,7 +35037,6 @@ var init_Header = __esm({
|
|
|
35611
35037
|
init_Stack();
|
|
35612
35038
|
init_Typography();
|
|
35613
35039
|
init_cn();
|
|
35614
|
-
init_useTranslate();
|
|
35615
35040
|
lookStyles8 = {
|
|
35616
35041
|
"compact-bar": "",
|
|
35617
35042
|
hero: "py-section min-h-[200px] [&_h1]:text-display-1",
|
|
@@ -35640,7 +35065,7 @@ var init_Header = __esm({
|
|
|
35640
35065
|
onLogoClick,
|
|
35641
35066
|
className
|
|
35642
35067
|
}) => {
|
|
35643
|
-
const { t } = useTranslate();
|
|
35068
|
+
const { t } = hooks.useTranslate();
|
|
35644
35069
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
35645
35070
|
const userInitials = userAvatar?.initials || userName?.[0]?.toUpperCase() || "U";
|
|
35646
35071
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -35931,7 +35356,6 @@ var init_Sidebar = __esm({
|
|
|
35931
35356
|
init_Typography();
|
|
35932
35357
|
init_cn();
|
|
35933
35358
|
init_useEventBus();
|
|
35934
|
-
init_useTranslate();
|
|
35935
35359
|
SidebarNavItem = ({ item, collapsed }) => {
|
|
35936
35360
|
const Icon3 = item.icon;
|
|
35937
35361
|
const isActive = item.active ?? item.isActive;
|
|
@@ -35995,7 +35419,7 @@ var init_Sidebar = __esm({
|
|
|
35995
35419
|
className
|
|
35996
35420
|
}) => {
|
|
35997
35421
|
const { emit } = useEventBus();
|
|
35998
|
-
const { t } = useTranslate();
|
|
35422
|
+
const { t } = hooks.useTranslate();
|
|
35999
35423
|
const [internalCollapsed, setInternalCollapsed] = React84.useState(defaultCollapsed);
|
|
36000
35424
|
const collapsed = controlledCollapsed !== void 0 ? controlledCollapsed : internalCollapsed;
|
|
36001
35425
|
const handleToggle = React84.useCallback(() => {
|
|
@@ -36185,7 +35609,6 @@ var init_WizardContainer = __esm({
|
|
|
36185
35609
|
init_Stack();
|
|
36186
35610
|
init_Icon();
|
|
36187
35611
|
init_cn();
|
|
36188
|
-
init_useTranslate();
|
|
36189
35612
|
WizardContainer = ({
|
|
36190
35613
|
steps,
|
|
36191
35614
|
currentStep: controlledStep,
|
|
@@ -36198,7 +35621,7 @@ var init_WizardContainer = __esm({
|
|
|
36198
35621
|
entity: _entity
|
|
36199
35622
|
// Accept but don't use directly yet
|
|
36200
35623
|
}) => {
|
|
36201
|
-
const { t } = useTranslate();
|
|
35624
|
+
const { t } = hooks.useTranslate();
|
|
36202
35625
|
const [internalStep, setInternalStep] = React84.useState(0);
|
|
36203
35626
|
const normalizedControlledStep = (() => {
|
|
36204
35627
|
if (controlledStep === void 0 || controlledStep === null)
|
|
@@ -36759,7 +36182,6 @@ var init_SignaturePad = __esm({
|
|
|
36759
36182
|
init_LoadingState();
|
|
36760
36183
|
init_ErrorState();
|
|
36761
36184
|
init_useEventBus();
|
|
36762
|
-
init_useTranslate();
|
|
36763
36185
|
SignaturePad = ({
|
|
36764
36186
|
label,
|
|
36765
36187
|
helperText,
|
|
@@ -36777,7 +36199,7 @@ var init_SignaturePad = __esm({
|
|
|
36777
36199
|
className
|
|
36778
36200
|
}) => {
|
|
36779
36201
|
const eventBus = useEventBus();
|
|
36780
|
-
const { t } = useTranslate();
|
|
36202
|
+
const { t } = hooks.useTranslate();
|
|
36781
36203
|
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36782
36204
|
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36783
36205
|
const canvasRef = React84.useRef(null);
|
|
@@ -36953,7 +36375,6 @@ var init_DocumentViewer = __esm({
|
|
|
36953
36375
|
init_EmptyState();
|
|
36954
36376
|
init_Tabs();
|
|
36955
36377
|
init_useEventBus();
|
|
36956
|
-
init_useTranslate();
|
|
36957
36378
|
DocumentViewer = ({
|
|
36958
36379
|
title,
|
|
36959
36380
|
src,
|
|
@@ -36973,7 +36394,7 @@ var init_DocumentViewer = __esm({
|
|
|
36973
36394
|
className
|
|
36974
36395
|
}) => {
|
|
36975
36396
|
const eventBus = useEventBus();
|
|
36976
|
-
const { t } = useTranslate();
|
|
36397
|
+
const { t } = hooks.useTranslate();
|
|
36977
36398
|
const [zoom, setZoom] = React84.useState(100);
|
|
36978
36399
|
const [currentPage, setCurrentPage] = React84.useState(propPage ?? 1);
|
|
36979
36400
|
const [activeDocIndex, setActiveDocIndex] = React84.useState(0);
|
|
@@ -37158,7 +36579,6 @@ var init_GraphCanvas = __esm({
|
|
|
37158
36579
|
init_ErrorState();
|
|
37159
36580
|
init_EmptyState();
|
|
37160
36581
|
init_useEventBus();
|
|
37161
|
-
init_useTranslate();
|
|
37162
36582
|
GROUP_COLORS2 = [
|
|
37163
36583
|
"var(--color-primary)",
|
|
37164
36584
|
"var(--color-success)",
|
|
@@ -37185,7 +36605,7 @@ var init_GraphCanvas = __esm({
|
|
|
37185
36605
|
className
|
|
37186
36606
|
}) => {
|
|
37187
36607
|
const eventBus = useEventBus();
|
|
37188
|
-
const { t } = useTranslate();
|
|
36608
|
+
const { t } = hooks.useTranslate();
|
|
37189
36609
|
const canvasRef = React84.useRef(null);
|
|
37190
36610
|
const animRef = React84.useRef(0);
|
|
37191
36611
|
const [zoom, setZoom] = React84.useState(1);
|
|
@@ -37535,7 +36955,7 @@ function DataTable({
|
|
|
37535
36955
|
null
|
|
37536
36956
|
);
|
|
37537
36957
|
const eventBus = useEventBus();
|
|
37538
|
-
const { t } = useTranslate();
|
|
36958
|
+
const { t } = hooks.useTranslate();
|
|
37539
36959
|
const resolvedEmptyTitle = emptyTitle ?? t("table.empty.title");
|
|
37540
36960
|
const resolvedEmptyDescription = emptyDescription ?? t("table.empty.description");
|
|
37541
36961
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
@@ -37896,7 +37316,6 @@ var init_DataTable = __esm({
|
|
|
37896
37316
|
init_molecules2();
|
|
37897
37317
|
init_Icon();
|
|
37898
37318
|
init_useEventBus();
|
|
37899
|
-
init_useTranslate();
|
|
37900
37319
|
init_types3();
|
|
37901
37320
|
lookStyles9 = {
|
|
37902
37321
|
dense: "",
|
|
@@ -37914,7 +37333,7 @@ function DebuggerBoard({
|
|
|
37914
37333
|
className
|
|
37915
37334
|
}) {
|
|
37916
37335
|
const { emit } = useEventBus();
|
|
37917
|
-
const { t } = useTranslate();
|
|
37336
|
+
const { t } = hooks.useTranslate();
|
|
37918
37337
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
37919
37338
|
const [flaggedLines, setFlaggedLines] = React84.useState(/* @__PURE__ */ new Set());
|
|
37920
37339
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -38043,7 +37462,6 @@ var init_DebuggerBoard = __esm({
|
|
|
38043
37462
|
"components/game/organisms/puzzles/debugger/DebuggerBoard.tsx"() {
|
|
38044
37463
|
init_atoms2();
|
|
38045
37464
|
init_useEventBus();
|
|
38046
|
-
init_useTranslate();
|
|
38047
37465
|
DebuggerBoard.displayName = "DebuggerBoard";
|
|
38048
37466
|
}
|
|
38049
37467
|
});
|
|
@@ -38214,7 +37632,6 @@ var init_DetailPanel = __esm({
|
|
|
38214
37632
|
init_cn();
|
|
38215
37633
|
init_getNestedValue();
|
|
38216
37634
|
init_useEventBus();
|
|
38217
|
-
init_useTranslate();
|
|
38218
37635
|
ReactMarkdown2 = React84.lazy(() => import('react-markdown'));
|
|
38219
37636
|
DetailPanel = ({
|
|
38220
37637
|
title: propTitle,
|
|
@@ -38234,7 +37651,7 @@ var init_DetailPanel = __esm({
|
|
|
38234
37651
|
error
|
|
38235
37652
|
}) => {
|
|
38236
37653
|
const eventBus = useEventBus();
|
|
38237
|
-
const { t } = useTranslate();
|
|
37654
|
+
const { t } = hooks.useTranslate();
|
|
38238
37655
|
const isFieldDefArray = (arr) => {
|
|
38239
37656
|
if (!arr || arr.length === 0) return false;
|
|
38240
37657
|
const first = arr[0];
|
|
@@ -38632,7 +38049,7 @@ function CompactView({
|
|
|
38632
38049
|
stateStyles,
|
|
38633
38050
|
className
|
|
38634
38051
|
}) {
|
|
38635
|
-
const { t } = useTranslate();
|
|
38052
|
+
const { t } = hooks.useTranslate();
|
|
38636
38053
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38637
38054
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38638
38055
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38668,7 +38085,7 @@ function FullView({
|
|
|
38668
38085
|
stateStyles,
|
|
38669
38086
|
className
|
|
38670
38087
|
}) {
|
|
38671
|
-
const { t } = useTranslate();
|
|
38088
|
+
const { t } = hooks.useTranslate();
|
|
38672
38089
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38673
38090
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38674
38091
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38793,7 +38210,6 @@ var init_TraitStateViewer = __esm({
|
|
|
38793
38210
|
"components/game/organisms/TraitStateViewer.tsx"() {
|
|
38794
38211
|
"use client";
|
|
38795
38212
|
init_cn();
|
|
38796
|
-
init_useTranslate();
|
|
38797
38213
|
init_Box();
|
|
38798
38214
|
init_Typography();
|
|
38799
38215
|
init_Stack();
|
|
@@ -38815,7 +38231,7 @@ function RuleEditor({
|
|
|
38815
38231
|
disabled = false,
|
|
38816
38232
|
className
|
|
38817
38233
|
}) {
|
|
38818
|
-
const { t } = useTranslate();
|
|
38234
|
+
const { t } = hooks.useTranslate();
|
|
38819
38235
|
const handleWhenChange = React84.useCallback((e) => {
|
|
38820
38236
|
onChange({ ...rule, whenEvent: e.target.value });
|
|
38821
38237
|
}, [rule, onChange]);
|
|
@@ -38852,7 +38268,6 @@ var init_RuleEditor = __esm({
|
|
|
38852
38268
|
"components/game/organisms/puzzles/event-handler/RuleEditor.tsx"() {
|
|
38853
38269
|
init_atoms2();
|
|
38854
38270
|
init_cn();
|
|
38855
|
-
init_useTranslate();
|
|
38856
38271
|
RuleEditor.displayName = "RuleEditor";
|
|
38857
38272
|
}
|
|
38858
38273
|
});
|
|
@@ -38862,7 +38277,7 @@ function ObjectRulePanel({
|
|
|
38862
38277
|
disabled = false,
|
|
38863
38278
|
className
|
|
38864
38279
|
}) {
|
|
38865
|
-
const { t } = useTranslate();
|
|
38280
|
+
const { t } = hooks.useTranslate();
|
|
38866
38281
|
const maxRules = object.maxRules || 3;
|
|
38867
38282
|
const canAdd = object.rules.length < maxRules;
|
|
38868
38283
|
const handleRuleChange = React84.useCallback((index, updatedRule) => {
|
|
@@ -38927,7 +38342,6 @@ var init_ObjectRulePanel = __esm({
|
|
|
38927
38342
|
"components/game/organisms/puzzles/event-handler/ObjectRulePanel.tsx"() {
|
|
38928
38343
|
init_atoms2();
|
|
38929
38344
|
init_cn();
|
|
38930
|
-
init_useTranslate();
|
|
38931
38345
|
init_TraitStateViewer();
|
|
38932
38346
|
init_RuleEditor();
|
|
38933
38347
|
nextRuleId = 1;
|
|
@@ -38940,7 +38354,7 @@ function EventLog({
|
|
|
38940
38354
|
label,
|
|
38941
38355
|
className
|
|
38942
38356
|
}) {
|
|
38943
|
-
const { t } = useTranslate();
|
|
38357
|
+
const { t } = hooks.useTranslate();
|
|
38944
38358
|
const scrollRef = React84.useRef(null);
|
|
38945
38359
|
React84.useEffect(() => {
|
|
38946
38360
|
if (scrollRef.current) {
|
|
@@ -38972,7 +38386,6 @@ var init_EventLog = __esm({
|
|
|
38972
38386
|
"components/game/organisms/puzzles/event-handler/EventLog.tsx"() {
|
|
38973
38387
|
init_atoms2();
|
|
38974
38388
|
init_cn();
|
|
38975
|
-
init_useTranslate();
|
|
38976
38389
|
STATUS_STYLES = {
|
|
38977
38390
|
pending: "text-muted-foreground",
|
|
38978
38391
|
active: "text-primary animate-pulse",
|
|
@@ -38996,7 +38409,7 @@ function EventHandlerBoard({
|
|
|
38996
38409
|
className
|
|
38997
38410
|
}) {
|
|
38998
38411
|
const { emit } = useEventBus();
|
|
38999
|
-
const { t } = useTranslate();
|
|
38412
|
+
const { t } = hooks.useTranslate();
|
|
39000
38413
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
39001
38414
|
const entityObjects = resolved?.objects ?? [];
|
|
39002
38415
|
const [objects, setObjects] = React84.useState(entityObjects);
|
|
@@ -39186,7 +38599,6 @@ var init_EventHandlerBoard = __esm({
|
|
|
39186
38599
|
init_atoms2();
|
|
39187
38600
|
init_cn();
|
|
39188
38601
|
init_useEventBus();
|
|
39189
|
-
init_useTranslate();
|
|
39190
38602
|
init_TraitStateViewer();
|
|
39191
38603
|
init_ObjectRulePanel();
|
|
39192
38604
|
init_EventLog();
|
|
@@ -39256,7 +38668,6 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39256
38668
|
"use client";
|
|
39257
38669
|
init_cn();
|
|
39258
38670
|
init_useEventBus();
|
|
39259
|
-
init_useTranslate();
|
|
39260
38671
|
init_Stack();
|
|
39261
38672
|
init_Typography();
|
|
39262
38673
|
init_FeatureGrid();
|
|
@@ -39272,7 +38683,7 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39272
38683
|
subtitle
|
|
39273
38684
|
}) => {
|
|
39274
38685
|
const eventBus = useEventBus();
|
|
39275
|
-
const { t } = useTranslate();
|
|
38686
|
+
const { t } = hooks.useTranslate();
|
|
39276
38687
|
const items = React84.useMemo(
|
|
39277
38688
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
39278
38689
|
[entity]
|
|
@@ -39439,7 +38850,6 @@ var init_Form = __esm({
|
|
|
39439
38850
|
init_RelationSelect();
|
|
39440
38851
|
init_Alert();
|
|
39441
38852
|
init_useEventBus();
|
|
39442
|
-
init_useTranslate();
|
|
39443
38853
|
init_debug();
|
|
39444
38854
|
layoutStyles = {
|
|
39445
38855
|
vertical: "flex flex-col",
|
|
@@ -39490,7 +38900,7 @@ var init_Form = __esm({
|
|
|
39490
38900
|
...props
|
|
39491
38901
|
}) => {
|
|
39492
38902
|
const eventBus = useEventBus();
|
|
39493
|
-
const { t } = useTranslate();
|
|
38903
|
+
const { t } = hooks.useTranslate();
|
|
39494
38904
|
const resolvedSubmitLabel = submitLabel ?? t("common.save");
|
|
39495
38905
|
const resolvedCancelLabel = cancelLabel ?? t("common.cancel");
|
|
39496
38906
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
@@ -40599,7 +40009,6 @@ var init_HeroOrganism = __esm({
|
|
|
40599
40009
|
"use client";
|
|
40600
40010
|
init_cn();
|
|
40601
40011
|
init_useEventBus();
|
|
40602
|
-
init_useTranslate();
|
|
40603
40012
|
init_HeroSection();
|
|
40604
40013
|
init_LoadingState();
|
|
40605
40014
|
init_ErrorState();
|
|
@@ -40611,7 +40020,7 @@ var init_HeroOrganism = __esm({
|
|
|
40611
40020
|
children
|
|
40612
40021
|
}) => {
|
|
40613
40022
|
const eventBus = useEventBus();
|
|
40614
|
-
const { t } = useTranslate();
|
|
40023
|
+
const { t } = hooks.useTranslate();
|
|
40615
40024
|
const resolved = React84.useMemo(
|
|
40616
40025
|
() => Array.isArray(entity) ? entity[0] : entity && typeof entity === "object" ? entity : void 0,
|
|
40617
40026
|
[entity]
|
|
@@ -40705,7 +40114,6 @@ var LandingPageTemplate;
|
|
|
40705
40114
|
var init_LandingPageTemplate = __esm({
|
|
40706
40115
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
40707
40116
|
init_cn();
|
|
40708
|
-
init_useTranslate();
|
|
40709
40117
|
init_Stack();
|
|
40710
40118
|
init_Box();
|
|
40711
40119
|
init_Container();
|
|
@@ -40723,7 +40131,7 @@ var init_LandingPageTemplate = __esm({
|
|
|
40723
40131
|
featureColumns = 3,
|
|
40724
40132
|
className
|
|
40725
40133
|
}) => {
|
|
40726
|
-
const { t } = useTranslate();
|
|
40134
|
+
const { t } = hooks.useTranslate();
|
|
40727
40135
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
40728
40136
|
if (!resolved) return null;
|
|
40729
40137
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -40905,7 +40313,6 @@ var init_List = __esm({
|
|
|
40905
40313
|
init_cn();
|
|
40906
40314
|
init_getNestedValue();
|
|
40907
40315
|
init_useEventBus();
|
|
40908
|
-
init_useTranslate();
|
|
40909
40316
|
init_types3();
|
|
40910
40317
|
STATUS_STYLES2 = {
|
|
40911
40318
|
complete: {
|
|
@@ -41030,7 +40437,7 @@ var init_List = __esm({
|
|
|
41030
40437
|
entityType
|
|
41031
40438
|
}) => {
|
|
41032
40439
|
const eventBus = useEventBus();
|
|
41033
|
-
const { t } = useTranslate();
|
|
40440
|
+
const { t } = hooks.useTranslate();
|
|
41034
40441
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noData");
|
|
41035
40442
|
const effectiveFieldNames = normalizeFields2(fields).length > 0 ? normalizeFields2(fields) : fieldNames;
|
|
41036
40443
|
const rawItems = React84.useMemo(() => {
|
|
@@ -41377,7 +40784,7 @@ function MasterDetail({
|
|
|
41377
40784
|
className,
|
|
41378
40785
|
...rest
|
|
41379
40786
|
}) {
|
|
41380
|
-
const { t } = useTranslate();
|
|
40787
|
+
const { t } = hooks.useTranslate();
|
|
41381
40788
|
const loading = externalLoading ?? false;
|
|
41382
40789
|
const isLoading = externalIsLoading ?? false;
|
|
41383
40790
|
const error = externalError ?? null;
|
|
@@ -41400,7 +40807,6 @@ var init_MasterDetail = __esm({
|
|
|
41400
40807
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41401
40808
|
"use client";
|
|
41402
40809
|
init_DataTable();
|
|
41403
|
-
init_useTranslate();
|
|
41404
40810
|
MasterDetail.displayName = "MasterDetail";
|
|
41405
40811
|
}
|
|
41406
40812
|
});
|
|
@@ -41409,9 +40815,8 @@ var init_MasterDetailLayout = __esm({
|
|
|
41409
40815
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41410
40816
|
init_cn();
|
|
41411
40817
|
init_Typography();
|
|
41412
|
-
init_useTranslate();
|
|
41413
40818
|
DefaultEmptyDetail = () => {
|
|
41414
|
-
const { t } = useTranslate();
|
|
40819
|
+
const { t } = hooks.useTranslate();
|
|
41415
40820
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
41416
40821
|
Typography,
|
|
41417
40822
|
{
|
|
@@ -41470,7 +40875,6 @@ var init_MediaGallery = __esm({
|
|
|
41470
40875
|
init_ErrorState();
|
|
41471
40876
|
init_EmptyState();
|
|
41472
40877
|
init_useEventBus();
|
|
41473
|
-
init_useTranslate();
|
|
41474
40878
|
COLUMN_CLASSES = {
|
|
41475
40879
|
2: "grid-cols-2",
|
|
41476
40880
|
3: "grid-cols-2 sm:grid-cols-3",
|
|
@@ -41499,7 +40903,7 @@ var init_MediaGallery = __esm({
|
|
|
41499
40903
|
className
|
|
41500
40904
|
}) => {
|
|
41501
40905
|
const eventBus = useEventBus();
|
|
41502
|
-
const { t } = useTranslate();
|
|
40906
|
+
const { t } = hooks.useTranslate();
|
|
41503
40907
|
const [lightboxItem, setLightboxItem] = React84.useState(null);
|
|
41504
40908
|
const closeLightbox = React84.useCallback(() => setLightboxItem(null), []);
|
|
41505
40909
|
useEventListener("UI:LIGHTBOX_CLOSE", closeLightbox);
|
|
@@ -41741,7 +41145,7 @@ function NegotiatorBoard({
|
|
|
41741
41145
|
className
|
|
41742
41146
|
}) {
|
|
41743
41147
|
const { emit } = useEventBus();
|
|
41744
|
-
const { t } = useTranslate();
|
|
41148
|
+
const { t } = hooks.useTranslate();
|
|
41745
41149
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
41746
41150
|
const [history, setHistory] = React84.useState([]);
|
|
41747
41151
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -41871,7 +41275,6 @@ var init_NegotiatorBoard = __esm({
|
|
|
41871
41275
|
"components/game/organisms/puzzles/negotiator/NegotiatorBoard.tsx"() {
|
|
41872
41276
|
init_atoms2();
|
|
41873
41277
|
init_useEventBus();
|
|
41874
|
-
init_useTranslate();
|
|
41875
41278
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
41876
41279
|
}
|
|
41877
41280
|
});
|
|
@@ -41881,7 +41284,6 @@ var init_PricingOrganism = __esm({
|
|
|
41881
41284
|
"use client";
|
|
41882
41285
|
init_cn();
|
|
41883
41286
|
init_useEventBus();
|
|
41884
|
-
init_useTranslate();
|
|
41885
41287
|
init_Stack();
|
|
41886
41288
|
init_Typography();
|
|
41887
41289
|
init_PricingGrid();
|
|
@@ -41896,7 +41298,7 @@ var init_PricingOrganism = __esm({
|
|
|
41896
41298
|
subtitle
|
|
41897
41299
|
}) => {
|
|
41898
41300
|
useEventBus();
|
|
41899
|
-
const { t } = useTranslate();
|
|
41301
|
+
const { t } = hooks.useTranslate();
|
|
41900
41302
|
const items = React84.useMemo(
|
|
41901
41303
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
41902
41304
|
[entity]
|
|
@@ -41931,7 +41333,6 @@ var PricingPageTemplate;
|
|
|
41931
41333
|
var init_PricingPageTemplate = __esm({
|
|
41932
41334
|
"components/marketing/templates/PricingPageTemplate.tsx"() {
|
|
41933
41335
|
init_cn();
|
|
41934
|
-
init_useTranslate();
|
|
41935
41336
|
init_Stack();
|
|
41936
41337
|
init_Box();
|
|
41937
41338
|
init_Container();
|
|
@@ -41944,7 +41345,7 @@ var init_PricingPageTemplate = __esm({
|
|
|
41944
41345
|
entity,
|
|
41945
41346
|
className
|
|
41946
41347
|
}) => {
|
|
41947
|
-
const { t } = useTranslate();
|
|
41348
|
+
const { t } = hooks.useTranslate();
|
|
41948
41349
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
41949
41350
|
if (!resolved) return null;
|
|
41950
41351
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -42446,7 +41847,7 @@ var init_WalkMinimap = __esm({
|
|
|
42446
41847
|
}
|
|
42447
41848
|
});
|
|
42448
41849
|
function TraitsTab({ traits: traits2 }) {
|
|
42449
|
-
const { t } = useTranslate();
|
|
41850
|
+
const { t } = hooks.useTranslate();
|
|
42450
41851
|
if (traits2.length === 0) {
|
|
42451
41852
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42452
41853
|
EmptyState,
|
|
@@ -42514,12 +41915,11 @@ var init_TraitsTab = __esm({
|
|
|
42514
41915
|
init_Typography();
|
|
42515
41916
|
init_Stack();
|
|
42516
41917
|
init_EmptyState();
|
|
42517
|
-
init_useTranslate();
|
|
42518
41918
|
TraitsTab.displayName = "TraitsTab";
|
|
42519
41919
|
}
|
|
42520
41920
|
});
|
|
42521
41921
|
function TicksTab({ ticks: ticks2 }) {
|
|
42522
|
-
const { t } = useTranslate();
|
|
41922
|
+
const { t } = hooks.useTranslate();
|
|
42523
41923
|
const activeTicks = ticks2.filter((t2) => t2.active);
|
|
42524
41924
|
const inactiveTicks = ticks2.filter((t2) => !t2.active);
|
|
42525
41925
|
if (ticks2.length === 0) {
|
|
@@ -42592,12 +41992,11 @@ var init_TicksTab = __esm({
|
|
|
42592
41992
|
init_Stack();
|
|
42593
41993
|
init_Card();
|
|
42594
41994
|
init_EmptyState();
|
|
42595
|
-
init_useTranslate();
|
|
42596
41995
|
TicksTab.displayName = "TicksTab";
|
|
42597
41996
|
}
|
|
42598
41997
|
});
|
|
42599
41998
|
function EntitiesTab({ snapshot }) {
|
|
42600
|
-
const { t } = useTranslate();
|
|
41999
|
+
const { t } = hooks.useTranslate();
|
|
42601
42000
|
if (!snapshot) {
|
|
42602
42001
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42603
42002
|
EmptyState,
|
|
@@ -42666,12 +42065,11 @@ var init_EntitiesTab = __esm({
|
|
|
42666
42065
|
init_Typography();
|
|
42667
42066
|
init_Stack();
|
|
42668
42067
|
init_EmptyState();
|
|
42669
|
-
init_useTranslate();
|
|
42670
42068
|
EntitiesTab.displayName = "EntitiesTab";
|
|
42671
42069
|
}
|
|
42672
42070
|
});
|
|
42673
42071
|
function EventFlowTab({ events: events2 }) {
|
|
42674
|
-
const { t } = useTranslate();
|
|
42072
|
+
const { t } = hooks.useTranslate();
|
|
42675
42073
|
const [filter, setFilter] = React84__namespace.useState("all");
|
|
42676
42074
|
const containerRef = React84__namespace.useRef(null);
|
|
42677
42075
|
const [autoScroll, setAutoScroll] = React84__namespace.useState(true);
|
|
@@ -42783,7 +42181,6 @@ var init_EventFlowTab = __esm({
|
|
|
42783
42181
|
init_Button();
|
|
42784
42182
|
init_Checkbox();
|
|
42785
42183
|
init_EmptyState();
|
|
42786
|
-
init_useTranslate();
|
|
42787
42184
|
TYPE_BADGES = {
|
|
42788
42185
|
trait: { variant: "primary", icon: "\u{1F504}" },
|
|
42789
42186
|
tick: { variant: "warning", icon: "\u23F1\uFE0F" },
|
|
@@ -42796,7 +42193,7 @@ var init_EventFlowTab = __esm({
|
|
|
42796
42193
|
}
|
|
42797
42194
|
});
|
|
42798
42195
|
function GuardsPanel({ guards }) {
|
|
42799
|
-
const { t } = useTranslate();
|
|
42196
|
+
const { t } = hooks.useTranslate();
|
|
42800
42197
|
const [filter, setFilter] = React84__namespace.useState("all");
|
|
42801
42198
|
if (guards.length === 0) {
|
|
42802
42199
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42878,12 +42275,11 @@ var init_GuardsPanel = __esm({
|
|
|
42878
42275
|
init_ButtonGroup();
|
|
42879
42276
|
init_Button();
|
|
42880
42277
|
init_EmptyState();
|
|
42881
|
-
init_useTranslate();
|
|
42882
42278
|
GuardsPanel.displayName = "GuardsPanel";
|
|
42883
42279
|
}
|
|
42884
42280
|
});
|
|
42885
42281
|
function VerificationTab({ checks, summary }) {
|
|
42886
|
-
const { t } = useTranslate();
|
|
42282
|
+
const { t } = hooks.useTranslate();
|
|
42887
42283
|
if (checks.length === 0) {
|
|
42888
42284
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42889
42285
|
EmptyState,
|
|
@@ -42954,7 +42350,6 @@ var init_VerificationTab = __esm({
|
|
|
42954
42350
|
init_Typography();
|
|
42955
42351
|
init_Stack();
|
|
42956
42352
|
init_EmptyState();
|
|
42957
|
-
init_useTranslate();
|
|
42958
42353
|
STATUS_CONFIG = {
|
|
42959
42354
|
pass: { variant: "success", icon: "\u2713", label: "PASS" },
|
|
42960
42355
|
fail: { variant: "danger", icon: "\u2717", label: "FAIL" },
|
|
@@ -42974,7 +42369,7 @@ function EffectBadge({ effect }) {
|
|
|
42974
42369
|
] });
|
|
42975
42370
|
}
|
|
42976
42371
|
function TransitionTimeline({ transitions }) {
|
|
42977
|
-
const { t } = useTranslate();
|
|
42372
|
+
const { t } = hooks.useTranslate();
|
|
42978
42373
|
const containerRef = React84__namespace.useRef(null);
|
|
42979
42374
|
const [autoScroll, setAutoScroll] = React84__namespace.useState(true);
|
|
42980
42375
|
const [expandedId, setExpandedId] = React84__namespace.useState(null);
|
|
@@ -43090,7 +42485,6 @@ var init_TransitionTimeline = __esm({
|
|
|
43090
42485
|
init_Typography();
|
|
43091
42486
|
init_EmptyState();
|
|
43092
42487
|
init_Checkbox();
|
|
43093
|
-
init_useTranslate();
|
|
43094
42488
|
EFFECT_STATUS_VARIANT = {
|
|
43095
42489
|
executed: "success",
|
|
43096
42490
|
failed: "danger",
|
|
@@ -43106,7 +42500,7 @@ function StatRow({ label, value, variant }) {
|
|
|
43106
42500
|
] });
|
|
43107
42501
|
}
|
|
43108
42502
|
function ServerBridgeTab({ bridge }) {
|
|
43109
|
-
const { t } = useTranslate();
|
|
42503
|
+
const { t } = hooks.useTranslate();
|
|
43110
42504
|
if (!bridge) {
|
|
43111
42505
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43112
42506
|
EmptyState,
|
|
@@ -43180,7 +42574,6 @@ var init_ServerBridgeTab = __esm({
|
|
|
43180
42574
|
init_Stack();
|
|
43181
42575
|
init_Card();
|
|
43182
42576
|
init_EmptyState();
|
|
43183
|
-
init_useTranslate();
|
|
43184
42577
|
ServerBridgeTab.displayName = "ServerBridgeTab";
|
|
43185
42578
|
}
|
|
43186
42579
|
});
|
|
@@ -43259,7 +42652,7 @@ function getAllEvents(traits2) {
|
|
|
43259
42652
|
}
|
|
43260
42653
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43261
42654
|
const eventBus = useEventBus();
|
|
43262
|
-
const { t } = useTranslate();
|
|
42655
|
+
const { t } = hooks.useTranslate();
|
|
43263
42656
|
const [log12, setLog] = React84__namespace.useState([]);
|
|
43264
42657
|
const prevStatesRef = React84__namespace.useRef(/* @__PURE__ */ new Map());
|
|
43265
42658
|
React84__namespace.useEffect(() => {
|
|
@@ -43345,7 +42738,6 @@ var init_EventDispatcherTab = __esm({
|
|
|
43345
42738
|
init_Stack();
|
|
43346
42739
|
init_EmptyState();
|
|
43347
42740
|
init_useEventBus();
|
|
43348
|
-
init_useTranslate();
|
|
43349
42741
|
EventDispatcherTab.displayName = "EventDispatcherTab";
|
|
43350
42742
|
}
|
|
43351
42743
|
});
|
|
@@ -43356,7 +42748,7 @@ var init_RuntimeDebugger = __esm({
|
|
|
43356
42748
|
}
|
|
43357
42749
|
});
|
|
43358
42750
|
function ServerResponseRow({ sr }) {
|
|
43359
|
-
const { t } = useTranslate();
|
|
42751
|
+
const { t } = hooks.useTranslate();
|
|
43360
42752
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43361
42753
|
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
42754
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -43382,7 +42774,7 @@ function ServerResponseRow({ sr }) {
|
|
|
43382
42774
|
] });
|
|
43383
42775
|
}
|
|
43384
42776
|
function TransitionRow({ trace }) {
|
|
43385
|
-
const { t } = useTranslate();
|
|
42777
|
+
const { t } = hooks.useTranslate();
|
|
43386
42778
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43387
42779
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43388
42780
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43431,7 +42823,7 @@ function VerifyModePanel({
|
|
|
43431
42823
|
serverCount,
|
|
43432
42824
|
localCount
|
|
43433
42825
|
}) {
|
|
43434
|
-
const { t } = useTranslate();
|
|
42826
|
+
const { t } = hooks.useTranslate();
|
|
43435
42827
|
const [expanded, setExpanded] = React84__namespace.useState(true);
|
|
43436
42828
|
const scrollRef = React84__namespace.useRef(null);
|
|
43437
42829
|
const prevCountRef = React84__namespace.useRef(0);
|
|
@@ -43491,7 +42883,7 @@ function RuntimeDebugger({
|
|
|
43491
42883
|
defaultTab,
|
|
43492
42884
|
schema
|
|
43493
42885
|
}) {
|
|
43494
|
-
const { t } = useTranslate();
|
|
42886
|
+
const { t } = hooks.useTranslate();
|
|
43495
42887
|
const [isCollapsed, setIsCollapsed] = React84__namespace.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43496
42888
|
const [isVisible, setIsVisible] = React84__namespace.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43497
42889
|
const debugData = useDebugData();
|
|
@@ -43720,7 +43112,6 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43720
43112
|
init_TransitionTimeline();
|
|
43721
43113
|
init_ServerBridgeTab();
|
|
43722
43114
|
init_EventDispatcherTab();
|
|
43723
|
-
init_useTranslate();
|
|
43724
43115
|
init_RuntimeDebugger();
|
|
43725
43116
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43726
43117
|
}
|
|
@@ -44014,7 +43405,7 @@ function SequencerBoard({
|
|
|
44014
43405
|
className
|
|
44015
43406
|
}) {
|
|
44016
43407
|
const { emit } = useEventBus();
|
|
44017
|
-
const { t } = useTranslate();
|
|
43408
|
+
const { t } = hooks.useTranslate();
|
|
44018
43409
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44019
43410
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
44020
43411
|
const [slots, setSlots] = React84.useState(
|
|
@@ -44207,7 +43598,6 @@ var init_SequencerBoard = __esm({
|
|
|
44207
43598
|
init_atoms2();
|
|
44208
43599
|
init_cn();
|
|
44209
43600
|
init_useEventBus();
|
|
44210
|
-
init_useTranslate();
|
|
44211
43601
|
init_TraitStateViewer();
|
|
44212
43602
|
init_SequenceBar();
|
|
44213
43603
|
init_ActionPalette();
|
|
@@ -44226,7 +43616,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44226
43616
|
"use client";
|
|
44227
43617
|
init_cn();
|
|
44228
43618
|
init_useEventBus();
|
|
44229
|
-
init_useTranslate();
|
|
44230
43619
|
init_Stack();
|
|
44231
43620
|
init_Typography();
|
|
44232
43621
|
init_SimpleGrid();
|
|
@@ -44243,7 +43632,7 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44243
43632
|
subtitle
|
|
44244
43633
|
}) => {
|
|
44245
43634
|
useEventBus();
|
|
44246
|
-
const { t } = useTranslate();
|
|
43635
|
+
const { t } = hooks.useTranslate();
|
|
44247
43636
|
const items = React84.useMemo(
|
|
44248
43637
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
44249
43638
|
[entity]
|
|
@@ -44637,7 +44026,7 @@ function SimulatorBoard({
|
|
|
44637
44026
|
className
|
|
44638
44027
|
}) {
|
|
44639
44028
|
const { emit } = useEventBus();
|
|
44640
|
-
const { t } = useTranslate();
|
|
44029
|
+
const { t } = hooks.useTranslate();
|
|
44641
44030
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44642
44031
|
const parameters = resolved?.parameters ?? [];
|
|
44643
44032
|
const [values, setValues] = React84.useState(() => {
|
|
@@ -44785,7 +44174,6 @@ var init_SimulatorBoard = __esm({
|
|
|
44785
44174
|
"components/game/organisms/puzzles/simulator/SimulatorBoard.tsx"() {
|
|
44786
44175
|
init_atoms2();
|
|
44787
44176
|
init_useEventBus();
|
|
44788
|
-
init_useTranslate();
|
|
44789
44177
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
44790
44178
|
}
|
|
44791
44179
|
});
|
|
@@ -44890,7 +44278,6 @@ var init_StatCard = __esm({
|
|
|
44890
44278
|
init_Button();
|
|
44891
44279
|
init_Sparkline();
|
|
44892
44280
|
init_useEventBus();
|
|
44893
|
-
init_useTranslate();
|
|
44894
44281
|
init_Icon();
|
|
44895
44282
|
StatCard = ({
|
|
44896
44283
|
label: propLabel,
|
|
@@ -44917,7 +44304,7 @@ var init_StatCard = __esm({
|
|
|
44917
44304
|
const Icon3 = typeof iconProp === "string" ? resolveIcon(iconProp) ?? void 0 : iconProp;
|
|
44918
44305
|
const labelToUse = propLabel ?? propTitle;
|
|
44919
44306
|
const eventBus = useEventBus();
|
|
44920
|
-
const { t } = useTranslate();
|
|
44307
|
+
const { t } = hooks.useTranslate();
|
|
44921
44308
|
const handleActionClick = React84__namespace.default.useCallback(() => {
|
|
44922
44309
|
if (action?.event) {
|
|
44923
44310
|
eventBus.emit(`UI:${action.event}`, {});
|
|
@@ -45208,7 +44595,7 @@ function VariablePanel({
|
|
|
45208
44595
|
variables,
|
|
45209
44596
|
className
|
|
45210
44597
|
}) {
|
|
45211
|
-
const { t } = useTranslate();
|
|
44598
|
+
const { t } = hooks.useTranslate();
|
|
45212
44599
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
45213
44600
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: t("stateArchitect.variables", { name: entityName }) }),
|
|
45214
44601
|
variables.map((v) => {
|
|
@@ -45246,7 +44633,6 @@ var init_VariablePanel = __esm({
|
|
|
45246
44633
|
"components/game/organisms/puzzles/state-architect/VariablePanel.tsx"() {
|
|
45247
44634
|
init_atoms2();
|
|
45248
44635
|
init_cn();
|
|
45249
|
-
init_useTranslate();
|
|
45250
44636
|
VariablePanel.displayName = "VariablePanel";
|
|
45251
44637
|
}
|
|
45252
44638
|
});
|
|
@@ -45272,7 +44658,7 @@ function StateArchitectBoard({
|
|
|
45272
44658
|
className
|
|
45273
44659
|
}) {
|
|
45274
44660
|
const { emit } = useEventBus();
|
|
45275
|
-
const { t } = useTranslate();
|
|
44661
|
+
const { t } = hooks.useTranslate();
|
|
45276
44662
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
45277
44663
|
const [transitions, setTransitions] = React84.useState(resolved?.transitions ?? []);
|
|
45278
44664
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -45563,7 +44949,6 @@ var init_StateArchitectBoard = __esm({
|
|
|
45563
44949
|
init_atoms2();
|
|
45564
44950
|
init_cn();
|
|
45565
44951
|
init_useEventBus();
|
|
45566
|
-
init_useTranslate();
|
|
45567
44952
|
init_TraitStateViewer();
|
|
45568
44953
|
init_StateNode();
|
|
45569
44954
|
init_TransitionArrow();
|
|
@@ -45583,7 +44968,6 @@ var init_StatsOrganism = __esm({
|
|
|
45583
44968
|
"components/marketing/organisms/StatsOrganism.tsx"() {
|
|
45584
44969
|
"use client";
|
|
45585
44970
|
init_cn();
|
|
45586
|
-
init_useTranslate();
|
|
45587
44971
|
init_StatsGrid();
|
|
45588
44972
|
init_LoadingState();
|
|
45589
44973
|
init_ErrorState();
|
|
@@ -45594,7 +44978,7 @@ var init_StatsOrganism = __esm({
|
|
|
45594
44978
|
className,
|
|
45595
44979
|
columns = 3
|
|
45596
44980
|
}) => {
|
|
45597
|
-
const { t } = useTranslate();
|
|
44981
|
+
const { t } = hooks.useTranslate();
|
|
45598
44982
|
const items = React84.useMemo(
|
|
45599
44983
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45600
44984
|
[entity]
|
|
@@ -45626,7 +45010,6 @@ var init_StepFlowOrganism = __esm({
|
|
|
45626
45010
|
"components/core/organisms/StepFlowOrganism.tsx"() {
|
|
45627
45011
|
"use client";
|
|
45628
45012
|
init_cn();
|
|
45629
|
-
init_useTranslate();
|
|
45630
45013
|
init_Stack();
|
|
45631
45014
|
init_Typography();
|
|
45632
45015
|
init_StepFlow();
|
|
@@ -45642,7 +45025,7 @@ var init_StepFlowOrganism = __esm({
|
|
|
45642
45025
|
heading,
|
|
45643
45026
|
subtitle
|
|
45644
45027
|
}) => {
|
|
45645
|
-
const { t } = useTranslate();
|
|
45028
|
+
const { t } = hooks.useTranslate();
|
|
45646
45029
|
const items = React84.useMemo(
|
|
45647
45030
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45648
45031
|
[entity]
|
|
@@ -45796,7 +45179,6 @@ var init_TeamOrganism = __esm({
|
|
|
45796
45179
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
45797
45180
|
"use client";
|
|
45798
45181
|
init_cn();
|
|
45799
|
-
init_useTranslate();
|
|
45800
45182
|
init_Stack();
|
|
45801
45183
|
init_Typography();
|
|
45802
45184
|
init_SimpleGrid();
|
|
@@ -45811,7 +45193,7 @@ var init_TeamOrganism = __esm({
|
|
|
45811
45193
|
heading,
|
|
45812
45194
|
subtitle
|
|
45813
45195
|
}) => {
|
|
45814
|
-
const { t } = useTranslate();
|
|
45196
|
+
const { t } = hooks.useTranslate();
|
|
45815
45197
|
const items = React84.useMemo(
|
|
45816
45198
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45817
45199
|
[entity]
|
|
@@ -45854,7 +45236,6 @@ var init_Timeline = __esm({
|
|
|
45854
45236
|
init_LoadingState();
|
|
45855
45237
|
init_ErrorState();
|
|
45856
45238
|
init_EmptyState();
|
|
45857
|
-
init_useTranslate();
|
|
45858
45239
|
lookStyles10 = {
|
|
45859
45240
|
"vertical-compact": "gap-1 [&>*]:py-1",
|
|
45860
45241
|
"vertical-spacious": "",
|
|
@@ -45894,7 +45275,7 @@ var init_Timeline = __esm({
|
|
|
45894
45275
|
className,
|
|
45895
45276
|
look = "vertical-spacious"
|
|
45896
45277
|
}) => {
|
|
45897
|
-
const { t } = useTranslate();
|
|
45278
|
+
const { t } = hooks.useTranslate();
|
|
45898
45279
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45899
45280
|
const items = React84__namespace.default.useMemo(() => {
|
|
45900
45281
|
if (propItems) return propItems;
|
|
@@ -47346,7 +46727,7 @@ function UISlotComponent({
|
|
|
47346
46727
|
}) {
|
|
47347
46728
|
const { slots, clear } = context.useUISlots();
|
|
47348
46729
|
const eventBus = useEventBus();
|
|
47349
|
-
const { t } = useTranslate();
|
|
46730
|
+
const { t } = hooks.useTranslate();
|
|
47350
46731
|
const suspenseConfig = React84.useContext(SuspenseConfigContext);
|
|
47351
46732
|
const contained = React84.useContext(SlotContainedContext);
|
|
47352
46733
|
const content = slots[slot];
|
|
@@ -47448,7 +46829,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
47448
46829
|
const [portalRoot, setPortalRoot] = React84.useState(null);
|
|
47449
46830
|
const slotsBus = context.useUISlots();
|
|
47450
46831
|
const eventBus = useEventBus();
|
|
47451
|
-
const { t } = useTranslate();
|
|
46832
|
+
const { t } = hooks.useTranslate();
|
|
47452
46833
|
React84.useEffect(() => {
|
|
47453
46834
|
setPortalRoot(getOrCreatePortalRoot());
|
|
47454
46835
|
}, []);
|
|
@@ -47738,7 +47119,7 @@ function SlotContentRenderer({
|
|
|
47738
47119
|
}
|
|
47739
47120
|
}
|
|
47740
47121
|
const eventBus = useEventBus();
|
|
47741
|
-
const { t } = useTranslate();
|
|
47122
|
+
const { t } = hooks.useTranslate();
|
|
47742
47123
|
const schemaCtx = useEntitySchemaOptional();
|
|
47743
47124
|
let entityDef;
|
|
47744
47125
|
if (typeof entityProp === "string" && entityProp.length > 0 && schemaCtx) {
|
|
@@ -47926,7 +47307,6 @@ var init_UISlotRenderer = __esm({
|
|
|
47926
47307
|
init_Box();
|
|
47927
47308
|
init_Typography();
|
|
47928
47309
|
init_useEventBus();
|
|
47929
|
-
init_useTranslate();
|
|
47930
47310
|
init_slot_types();
|
|
47931
47311
|
init_cn();
|
|
47932
47312
|
init_ErrorBoundary();
|
|
@@ -47982,10 +47362,7 @@ var init_UISlotRenderer = __esm({
|
|
|
47982
47362
|
UISlotRenderer.displayName = "UISlotRenderer";
|
|
47983
47363
|
}
|
|
47984
47364
|
});
|
|
47985
|
-
|
|
47986
|
-
// hooks/index.ts
|
|
47987
|
-
init_useEventBus();
|
|
47988
|
-
var log2 = logger.createLogger("almadar:ui:effects:client-handlers");
|
|
47365
|
+
var log = logger.createLogger("almadar:ui:effects:client-handlers");
|
|
47989
47366
|
function createClientEffectHandlers(options) {
|
|
47990
47367
|
const { eventBus, slotSetter, navigate, notify, callService } = options;
|
|
47991
47368
|
return {
|
|
@@ -47994,10 +47371,10 @@ function createClientEffectHandlers(options) {
|
|
|
47994
47371
|
eventBus.emit(prefixedEvent, payload);
|
|
47995
47372
|
},
|
|
47996
47373
|
persist: async () => {
|
|
47997
|
-
|
|
47374
|
+
log.warn("persist is server-side only, ignored on client");
|
|
47998
47375
|
},
|
|
47999
47376
|
set: () => {
|
|
48000
|
-
|
|
47377
|
+
log.warn("set is server-side only, ignored on client");
|
|
48001
47378
|
},
|
|
48002
47379
|
callService: async (service, action, params) => {
|
|
48003
47380
|
if (callService) return callService(service, action, params);
|
|
@@ -48026,10 +47403,10 @@ function createClientEffectHandlers(options) {
|
|
|
48026
47403
|
slotSetter.addPattern(slot, pattern, props);
|
|
48027
47404
|
},
|
|
48028
47405
|
navigate: navigate ?? ((path) => {
|
|
48029
|
-
|
|
47406
|
+
log.warn("No navigate handler, ignoring", { path });
|
|
48030
47407
|
}),
|
|
48031
47408
|
notify: notify ?? ((msg, type) => {
|
|
48032
|
-
|
|
47409
|
+
log.debug("notify", { type, message: msg });
|
|
48033
47410
|
})
|
|
48034
47411
|
};
|
|
48035
47412
|
}
|
|
@@ -48179,7 +47556,7 @@ function normalizeEventKey(eventKey) {
|
|
|
48179
47556
|
return eventKey.startsWith("UI:") ? eventKey.slice(3) : eventKey;
|
|
48180
47557
|
}
|
|
48181
47558
|
function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
48182
|
-
const eventBus = useEventBus();
|
|
47559
|
+
const eventBus = hooks.useEventBus();
|
|
48183
47560
|
const { entities } = useEntitySchema();
|
|
48184
47561
|
const traitConfigsByName = options?.traitConfigsByName;
|
|
48185
47562
|
const orbitalsByTrait = options?.orbitalsByTrait;
|