@almadar/ui 5.21.9 → 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 +159 -793
- package/dist/avl/index.js +7 -641
- package/dist/components/game/organisms/three/index.cjs +2 -488
- package/dist/components/game/organisms/three/index.js +1 -487
- package/dist/components/index.cjs +175 -2482
- package/dist/components/index.js +30 -2290
- package/dist/docs/index.cjs +2 -1
- package/dist/docs/index.js +2 -1
- package/dist/hooks/index.cjs +2 -1
- package/dist/hooks/index.js +2 -1
- package/dist/locales/index.cjs +6 -3
- package/dist/locales/index.js +6 -3
- package/dist/providers/index.cjs +144 -762
- package/dist/providers/index.js +4 -622
- package/dist/runtime/index.cjs +583 -1204
- package/dist/runtime/index.js +444 -1065
- package/locales/ar.json +2 -1
- package/locales/en.json +2 -1
- package/locales/sl.json +2 -1
- 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,927 +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
|
-
};
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
|
-
function useTranslate() {
|
|
822
|
-
return React84.useContext(I18nContext);
|
|
823
|
-
}
|
|
824
|
-
var _meta, coreMessages, coreLocale, I18nContext;
|
|
825
|
-
var init_useTranslate = __esm({
|
|
826
|
-
"hooks/useTranslate.ts"() {
|
|
827
|
-
"use client";
|
|
828
|
-
init_en();
|
|
829
|
-
({ $meta: _meta, ...coreMessages } = en_default);
|
|
830
|
-
coreLocale = coreMessages;
|
|
831
|
-
I18nContext = React84.createContext({
|
|
832
|
-
locale: "en",
|
|
833
|
-
direction: "ltr",
|
|
834
|
-
t: (key) => coreLocale[key] ?? key
|
|
835
|
-
// core locale fallback
|
|
836
|
-
});
|
|
837
|
-
I18nContext.displayName = "I18nContext";
|
|
838
|
-
I18nContext.Provider;
|
|
839
|
-
}
|
|
840
|
-
});
|
|
841
|
-
|
|
842
|
-
// hooks/useAuthContext.ts
|
|
843
|
-
function useAuthContext() {
|
|
844
|
-
return {
|
|
845
|
-
user: null,
|
|
846
|
-
loading: false,
|
|
847
|
-
signIn: void 0,
|
|
848
|
-
signOut: void 0
|
|
849
|
-
};
|
|
850
|
-
}
|
|
851
|
-
var init_useAuthContext = __esm({
|
|
852
|
-
"hooks/useAuthContext.ts"() {
|
|
853
|
-
}
|
|
854
|
-
});
|
|
855
|
-
function useSwipeGesture(callbacks, options = {}) {
|
|
856
|
-
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
857
|
-
const startX = React84.useRef(0);
|
|
858
|
-
const startY = React84.useRef(0);
|
|
859
|
-
const startTime = React84.useRef(0);
|
|
860
|
-
const currentX = React84.useRef(0);
|
|
861
|
-
const tracking = React84.useRef(false);
|
|
862
|
-
const offsetXRef = React84.useRef(0);
|
|
863
|
-
const isSwipingRef = React84.useRef(false);
|
|
864
|
-
const onPointerDown = React84.useCallback((e) => {
|
|
865
|
-
startX.current = e.clientX;
|
|
866
|
-
startY.current = e.clientY;
|
|
867
|
-
currentX.current = e.clientX;
|
|
868
|
-
startTime.current = Date.now();
|
|
869
|
-
tracking.current = true;
|
|
870
|
-
isSwipingRef.current = false;
|
|
871
|
-
offsetXRef.current = 0;
|
|
872
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
873
|
-
}, []);
|
|
874
|
-
const onPointerMove = React84.useCallback((e) => {
|
|
875
|
-
if (!tracking.current) return;
|
|
876
|
-
if (preventDefault) e.preventDefault();
|
|
877
|
-
currentX.current = e.clientX;
|
|
878
|
-
const dx = e.clientX - startX.current;
|
|
879
|
-
const dy = e.clientY - startY.current;
|
|
880
|
-
if (Math.abs(dx) > 10 && Math.abs(dx) > Math.abs(dy)) {
|
|
881
|
-
isSwipingRef.current = true;
|
|
882
|
-
offsetXRef.current = dx;
|
|
883
|
-
}
|
|
884
|
-
}, [preventDefault]);
|
|
885
|
-
const onPointerUp = React84.useCallback((e) => {
|
|
886
|
-
if (!tracking.current) return;
|
|
887
|
-
tracking.current = false;
|
|
888
|
-
const dx = e.clientX - startX.current;
|
|
889
|
-
const dy = e.clientY - startY.current;
|
|
890
|
-
const elapsed = Date.now() - startTime.current;
|
|
891
|
-
const velocity = Math.abs(dx) / Math.max(elapsed, 1);
|
|
892
|
-
offsetXRef.current = 0;
|
|
893
|
-
isSwipingRef.current = false;
|
|
894
|
-
if (Math.abs(dx) < threshold && velocity < velocityThreshold) return;
|
|
895
|
-
if (Math.abs(dx) > Math.abs(dy)) {
|
|
896
|
-
if (dx < -threshold) callbacks.onSwipeLeft?.();
|
|
897
|
-
else if (dx > threshold) callbacks.onSwipeRight?.();
|
|
898
|
-
} else {
|
|
899
|
-
if (dy < -threshold) callbacks.onSwipeUp?.();
|
|
900
|
-
else if (dy > threshold) callbacks.onSwipeDown?.();
|
|
901
|
-
}
|
|
902
|
-
}, [threshold, velocityThreshold, callbacks]);
|
|
903
|
-
const onPointerCancel = React84.useCallback(() => {
|
|
904
|
-
tracking.current = false;
|
|
905
|
-
offsetXRef.current = 0;
|
|
906
|
-
isSwipingRef.current = false;
|
|
907
|
-
}, []);
|
|
908
|
-
return {
|
|
909
|
-
onPointerDown,
|
|
910
|
-
onPointerMove,
|
|
911
|
-
onPointerUp,
|
|
912
|
-
onPointerCancel,
|
|
913
|
-
offsetX: offsetXRef.current,
|
|
914
|
-
isSwiping: isSwipingRef.current
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
var init_useSwipeGesture = __esm({
|
|
918
|
-
"hooks/useSwipeGesture.ts"() {
|
|
919
|
-
"use client";
|
|
920
|
-
}
|
|
921
|
-
});
|
|
922
|
-
function useLongPress(onLongPress, options = {}) {
|
|
923
|
-
const { duration = 500, moveThreshold = 10 } = options;
|
|
924
|
-
const timerRef = React84.useRef(null);
|
|
925
|
-
const startPos = React84.useRef({ x: 0, y: 0 });
|
|
926
|
-
const isPressedRef = React84.useRef(false);
|
|
927
|
-
const firedRef = React84.useRef(false);
|
|
928
|
-
const cancel = React84.useCallback(() => {
|
|
929
|
-
if (timerRef.current) {
|
|
930
|
-
clearTimeout(timerRef.current);
|
|
931
|
-
timerRef.current = null;
|
|
932
|
-
}
|
|
933
|
-
isPressedRef.current = false;
|
|
934
|
-
}, []);
|
|
935
|
-
const onPointerDown = React84.useCallback((e) => {
|
|
936
|
-
firedRef.current = false;
|
|
937
|
-
startPos.current = { x: e.clientX, y: e.clientY };
|
|
938
|
-
isPressedRef.current = true;
|
|
939
|
-
timerRef.current = setTimeout(() => {
|
|
940
|
-
firedRef.current = true;
|
|
941
|
-
isPressedRef.current = false;
|
|
942
|
-
onLongPress();
|
|
943
|
-
}, duration);
|
|
944
|
-
}, [duration, onLongPress]);
|
|
945
|
-
const onPointerMove = React84.useCallback((e) => {
|
|
946
|
-
if (!isPressedRef.current) return;
|
|
947
|
-
const dx = e.clientX - startPos.current.x;
|
|
948
|
-
const dy = e.clientY - startPos.current.y;
|
|
949
|
-
if (Math.sqrt(dx * dx + dy * dy) > moveThreshold) {
|
|
950
|
-
cancel();
|
|
951
|
-
}
|
|
952
|
-
}, [moveThreshold, cancel]);
|
|
953
|
-
const onPointerUp = React84.useCallback(() => {
|
|
954
|
-
cancel();
|
|
955
|
-
}, [cancel]);
|
|
956
|
-
const onPointerCancel = React84.useCallback(() => {
|
|
957
|
-
cancel();
|
|
958
|
-
}, [cancel]);
|
|
959
|
-
return {
|
|
960
|
-
onPointerDown,
|
|
961
|
-
onPointerMove,
|
|
962
|
-
onPointerUp,
|
|
963
|
-
onPointerCancel,
|
|
964
|
-
isPressed: isPressedRef.current
|
|
965
|
-
};
|
|
966
|
-
}
|
|
967
|
-
var init_useLongPress = __esm({
|
|
968
|
-
"hooks/useLongPress.ts"() {
|
|
969
|
-
"use client";
|
|
970
|
-
}
|
|
971
|
-
});
|
|
972
|
-
function useDragReorder(initialItems, onReorder) {
|
|
973
|
-
const [items, setItems] = React84.useState(initialItems);
|
|
974
|
-
const [dragIndex, setDragIndex] = React84.useState(-1);
|
|
975
|
-
const [dragOverIndex, setDragOverIndex] = React84.useState(-1);
|
|
976
|
-
const itemsRef = React84.useRef(initialItems);
|
|
977
|
-
if (initialItems !== itemsRef.current) {
|
|
978
|
-
itemsRef.current = initialItems;
|
|
979
|
-
setItems(initialItems);
|
|
980
|
-
}
|
|
981
|
-
const isDragging = dragIndex >= 0;
|
|
982
|
-
const handleDragStart = React84.useCallback((index) => (e) => {
|
|
983
|
-
e.preventDefault();
|
|
984
|
-
setDragIndex(index);
|
|
985
|
-
setDragOverIndex(index);
|
|
986
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
987
|
-
}, []);
|
|
988
|
-
const handleDragMove = React84.useCallback((index) => (e) => {
|
|
989
|
-
if (dragIndex < 0) return;
|
|
990
|
-
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
991
|
-
if (!target) return;
|
|
992
|
-
let el = target;
|
|
993
|
-
while (el && !el.dataset.dragIndex) {
|
|
994
|
-
el = el.parentElement;
|
|
995
|
-
}
|
|
996
|
-
if (el?.dataset.dragIndex) {
|
|
997
|
-
const overIndex = parseInt(el.dataset.dragIndex, 10);
|
|
998
|
-
if (!isNaN(overIndex) && overIndex !== dragOverIndex) {
|
|
999
|
-
setDragOverIndex(overIndex);
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
}, [dragIndex, dragOverIndex]);
|
|
1003
|
-
const handleDragEnd = React84.useCallback(() => {
|
|
1004
|
-
if (dragIndex >= 0 && dragOverIndex >= 0 && dragIndex !== dragOverIndex) {
|
|
1005
|
-
const newItems = [...items];
|
|
1006
|
-
const [movedItem] = newItems.splice(dragIndex, 1);
|
|
1007
|
-
newItems.splice(dragOverIndex, 0, movedItem);
|
|
1008
|
-
setItems(newItems);
|
|
1009
|
-
onReorder(dragIndex, dragOverIndex, items[dragIndex]);
|
|
1010
|
-
}
|
|
1011
|
-
setDragIndex(-1);
|
|
1012
|
-
setDragOverIndex(-1);
|
|
1013
|
-
}, [dragIndex, dragOverIndex, items, onReorder]);
|
|
1014
|
-
const getDragHandleProps = React84.useCallback((index) => ({
|
|
1015
|
-
onPointerDown: handleDragStart(index),
|
|
1016
|
-
style: { cursor: "grab", touchAction: "none" },
|
|
1017
|
-
"aria-grabbed": dragIndex === index,
|
|
1018
|
-
role: "button"
|
|
1019
|
-
}), [handleDragStart, dragIndex]);
|
|
1020
|
-
const getItemProps = React84.useCallback((index) => ({
|
|
1021
|
-
onPointerMove: handleDragMove(index),
|
|
1022
|
-
onPointerUp: handleDragEnd,
|
|
1023
|
-
"aria-dropeffect": "move",
|
|
1024
|
-
"data-drag-index": String(index),
|
|
1025
|
-
style: {
|
|
1026
|
-
opacity: dragIndex === index ? 0.5 : 1,
|
|
1027
|
-
transition: isDragging ? "transform 150ms ease" : void 0,
|
|
1028
|
-
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
|
|
1029
|
-
}
|
|
1030
|
-
}), [handleDragMove, handleDragEnd, dragIndex, dragOverIndex, isDragging]);
|
|
1031
|
-
return {
|
|
1032
|
-
items,
|
|
1033
|
-
dragIndex,
|
|
1034
|
-
dragOverIndex,
|
|
1035
|
-
isDragging,
|
|
1036
|
-
getDragHandleProps,
|
|
1037
|
-
getItemProps
|
|
1038
|
-
};
|
|
1039
|
-
}
|
|
1040
|
-
var init_useDragReorder = __esm({
|
|
1041
|
-
"hooks/useDragReorder.ts"() {
|
|
1042
|
-
"use client";
|
|
1043
|
-
}
|
|
1044
|
-
});
|
|
1045
|
-
function useInfiniteScroll(onLoadMore, options = {}) {
|
|
1046
|
-
const { rootMargin = "200px", hasMore = true, isLoading = false } = options;
|
|
1047
|
-
const observerRef = React84.useRef(null);
|
|
1048
|
-
const callbackRef = React84.useRef(onLoadMore);
|
|
1049
|
-
callbackRef.current = onLoadMore;
|
|
1050
|
-
const hasMoreRef = React84.useRef(hasMore);
|
|
1051
|
-
hasMoreRef.current = hasMore;
|
|
1052
|
-
const isLoadingRef = React84.useRef(isLoading);
|
|
1053
|
-
isLoadingRef.current = isLoading;
|
|
1054
|
-
React84.useEffect(() => {
|
|
1055
|
-
return () => {
|
|
1056
|
-
observerRef.current?.disconnect();
|
|
1057
|
-
};
|
|
1058
|
-
}, []);
|
|
1059
|
-
const sentinelRef = React84.useCallback((node) => {
|
|
1060
|
-
observerRef.current?.disconnect();
|
|
1061
|
-
if (!node) return;
|
|
1062
|
-
observerRef.current = new IntersectionObserver(
|
|
1063
|
-
(entries) => {
|
|
1064
|
-
const entry = entries[0];
|
|
1065
|
-
if (entry.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
|
|
1066
|
-
callbackRef.current();
|
|
1067
|
-
}
|
|
1068
|
-
},
|
|
1069
|
-
{ rootMargin }
|
|
1070
|
-
);
|
|
1071
|
-
observerRef.current.observe(node);
|
|
1072
|
-
}, [rootMargin]);
|
|
1073
|
-
return { sentinelRef };
|
|
1074
|
-
}
|
|
1075
|
-
var init_useInfiniteScroll = __esm({
|
|
1076
|
-
"hooks/useInfiniteScroll.ts"() {
|
|
1077
|
-
"use client";
|
|
1078
|
-
}
|
|
1079
|
-
});
|
|
1080
|
-
function usePullToRefresh(onRefresh, options = {}) {
|
|
1081
|
-
const { threshold = 60, maxPull = 120 } = options;
|
|
1082
|
-
const [pullDistance, setPullDistance] = React84.useState(0);
|
|
1083
|
-
const [isPulling, setIsPulling] = React84.useState(false);
|
|
1084
|
-
const [isRefreshing, setIsRefreshing] = React84.useState(false);
|
|
1085
|
-
const startY = React84.useRef(0);
|
|
1086
|
-
const scrollTopRef = React84.useRef(0);
|
|
1087
|
-
const onTouchStart = React84.useCallback((e) => {
|
|
1088
|
-
const container = e.currentTarget;
|
|
1089
|
-
scrollTopRef.current = container.scrollTop;
|
|
1090
|
-
if (scrollTopRef.current <= 0) {
|
|
1091
|
-
startY.current = e.touches[0].clientY;
|
|
1092
|
-
setIsPulling(true);
|
|
1093
|
-
}
|
|
1094
|
-
}, []);
|
|
1095
|
-
const onTouchMove = React84.useCallback((e) => {
|
|
1096
|
-
if (!isPulling || isRefreshing) return;
|
|
1097
|
-
const container = e.currentTarget;
|
|
1098
|
-
if (container.scrollTop > 0) {
|
|
1099
|
-
setPullDistance(0);
|
|
1100
|
-
return;
|
|
1101
|
-
}
|
|
1102
|
-
const dy = e.touches[0].clientY - startY.current;
|
|
1103
|
-
if (dy > 0) {
|
|
1104
|
-
const distance = Math.min(dy * 0.5, maxPull);
|
|
1105
|
-
setPullDistance(distance);
|
|
1106
|
-
}
|
|
1107
|
-
}, [isPulling, isRefreshing, maxPull]);
|
|
1108
|
-
const onTouchEnd = React84.useCallback(() => {
|
|
1109
|
-
if (!isPulling) return;
|
|
1110
|
-
setIsPulling(false);
|
|
1111
|
-
if (pullDistance >= threshold && !isRefreshing) {
|
|
1112
|
-
setIsRefreshing(true);
|
|
1113
|
-
setPullDistance(threshold);
|
|
1114
|
-
onRefresh();
|
|
1115
|
-
} else {
|
|
1116
|
-
setPullDistance(0);
|
|
1117
|
-
}
|
|
1118
|
-
}, [isPulling, pullDistance, threshold, isRefreshing, onRefresh]);
|
|
1119
|
-
const endRefresh = React84.useCallback(() => {
|
|
1120
|
-
setIsRefreshing(false);
|
|
1121
|
-
setPullDistance(0);
|
|
1122
|
-
}, []);
|
|
1123
|
-
const containerProps = {
|
|
1124
|
-
onTouchStart,
|
|
1125
|
-
onTouchMove,
|
|
1126
|
-
onTouchEnd,
|
|
1127
|
-
style: {
|
|
1128
|
-
transform: pullDistance > 0 ? `translateY(${pullDistance}px)` : void 0,
|
|
1129
|
-
transition: isPulling ? "none" : "transform 300ms ease-out"
|
|
1130
|
-
}
|
|
1131
|
-
};
|
|
1132
|
-
return {
|
|
1133
|
-
pullDistance,
|
|
1134
|
-
isPulling,
|
|
1135
|
-
isRefreshing,
|
|
1136
|
-
containerProps,
|
|
1137
|
-
endRefresh
|
|
1138
|
-
};
|
|
1139
|
-
}
|
|
1140
|
-
var init_usePullToRefresh = __esm({
|
|
1141
|
-
"hooks/usePullToRefresh.ts"() {
|
|
1142
|
-
"use client";
|
|
1143
|
-
}
|
|
1144
|
-
});
|
|
1145
|
-
function EntitySchemaProvider({
|
|
1146
|
-
entities,
|
|
1147
|
-
traitLinkedEntities,
|
|
1148
|
-
orbitalsByTrait,
|
|
1149
|
-
children
|
|
1150
|
-
}) {
|
|
1151
|
-
const entitiesMap = React84.useMemo(() => {
|
|
1152
|
-
const map = /* @__PURE__ */ new Map();
|
|
1153
|
-
for (const entity of entities) {
|
|
1154
|
-
map.set(entity.name, entity);
|
|
1155
|
-
}
|
|
1156
|
-
return map;
|
|
1157
|
-
}, [entities]);
|
|
1158
|
-
const linkedMap = React84.useMemo(() => {
|
|
1159
|
-
return traitLinkedEntities ?? /* @__PURE__ */ new Map();
|
|
1160
|
-
}, [traitLinkedEntities]);
|
|
1161
|
-
const orbitalsMap = React84.useMemo(() => {
|
|
1162
|
-
return orbitalsByTrait ?? /* @__PURE__ */ new Map();
|
|
1163
|
-
}, [orbitalsByTrait]);
|
|
1164
|
-
const contextValue = React84.useMemo(
|
|
1165
|
-
() => ({
|
|
1166
|
-
entities: entitiesMap,
|
|
1167
|
-
traitLinkedEntities: linkedMap,
|
|
1168
|
-
orbitalsByTrait: orbitalsMap
|
|
1169
|
-
}),
|
|
1170
|
-
[entitiesMap, linkedMap, orbitalsMap]
|
|
1171
|
-
);
|
|
1172
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EntitySchemaContext.Provider, { value: contextValue, children });
|
|
1173
|
-
}
|
|
1174
|
-
function useEntitySchema() {
|
|
1175
|
-
const context = React84.useContext(EntitySchemaContext);
|
|
1176
|
-
if (!context) {
|
|
1177
|
-
throw new Error("useEntitySchema must be used within an EntitySchemaProvider");
|
|
1178
|
-
}
|
|
1179
|
-
return context;
|
|
1180
|
-
}
|
|
1181
|
-
function useEntityDefinition(entityName) {
|
|
1182
|
-
const { entities } = useEntitySchema();
|
|
1183
|
-
return entities.get(entityName);
|
|
1184
|
-
}
|
|
1185
|
-
function useEntitySchemaOptional() {
|
|
1186
|
-
return React84.useContext(EntitySchemaContext);
|
|
1187
|
-
}
|
|
1188
|
-
var EntitySchemaContext;
|
|
1189
|
-
var init_EntitySchemaContext = __esm({
|
|
1190
|
-
"runtime/EntitySchemaContext.tsx"() {
|
|
1191
|
-
EntitySchemaContext = React84.createContext(null);
|
|
1192
|
-
}
|
|
1193
|
-
});
|
|
1194
|
-
function cn(...inputs) {
|
|
1195
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
1196
|
-
}
|
|
1197
|
-
var init_cn = __esm({
|
|
1198
|
-
"lib/cn.ts"() {
|
|
1199
|
-
}
|
|
1200
|
-
});
|
|
1201
337
|
var paddingStyles, paddingXStyles, paddingYStyles, marginStyles, marginXStyles, marginYStyles, bgStyles, roundedStyles, shadowStyles, displayStyles, overflowStyles, positionStyles, Box;
|
|
1202
338
|
var init_Box = __esm({
|
|
1203
339
|
"components/core/atoms/Box.tsx"() {
|
|
@@ -2569,7 +1705,6 @@ var init_Modal = __esm({
|
|
|
2569
1705
|
init_Overlay();
|
|
2570
1706
|
init_cn();
|
|
2571
1707
|
init_useEventBus();
|
|
2572
|
-
init_useTranslate();
|
|
2573
1708
|
sizeClasses2 = {
|
|
2574
1709
|
sm: "max-w-md",
|
|
2575
1710
|
md: "max-w-2xl",
|
|
@@ -2607,7 +1742,7 @@ var init_Modal = __esm({
|
|
|
2607
1742
|
look = "centered-card"
|
|
2608
1743
|
}) => {
|
|
2609
1744
|
const eventBus = useEventBus();
|
|
2610
|
-
const { t } = useTranslate();
|
|
1745
|
+
const { t } = hooks.useTranslate();
|
|
2611
1746
|
const modalRef = React84.useRef(null);
|
|
2612
1747
|
const previousActiveElement = React84.useRef(null);
|
|
2613
1748
|
const [dragY, setDragY] = React84.useState(0);
|
|
@@ -2791,7 +1926,6 @@ var init_Drawer = __esm({
|
|
|
2791
1926
|
init_Overlay();
|
|
2792
1927
|
init_cn();
|
|
2793
1928
|
init_useEventBus();
|
|
2794
|
-
init_useTranslate();
|
|
2795
1929
|
sizeWidths = {
|
|
2796
1930
|
sm: "w-full sm:w-80",
|
|
2797
1931
|
// 320px
|
|
@@ -2817,7 +1951,7 @@ var init_Drawer = __esm({
|
|
|
2817
1951
|
closeEvent
|
|
2818
1952
|
}) => {
|
|
2819
1953
|
const eventBus = useEventBus();
|
|
2820
|
-
const { t } = useTranslate();
|
|
1954
|
+
const { t } = hooks.useTranslate();
|
|
2821
1955
|
const drawerRef = React84.useRef(null);
|
|
2822
1956
|
const previousActiveElement = React84.useRef(null);
|
|
2823
1957
|
React84.useEffect(() => {
|
|
@@ -3064,7 +2198,6 @@ var init_Toast = __esm({
|
|
|
3064
2198
|
init_Badge();
|
|
3065
2199
|
init_cn();
|
|
3066
2200
|
init_useEventBus();
|
|
3067
|
-
init_useTranslate();
|
|
3068
2201
|
variantClasses = {
|
|
3069
2202
|
success: "bg-card border-[length:var(--border-width)] border-success",
|
|
3070
2203
|
error: "bg-card border-[length:var(--border-width)] border-error",
|
|
@@ -3098,7 +2231,7 @@ var init_Toast = __esm({
|
|
|
3098
2231
|
actionEvent
|
|
3099
2232
|
}) => {
|
|
3100
2233
|
const eventBus = useEventBus();
|
|
3101
|
-
const { t } = useTranslate();
|
|
2234
|
+
const { t } = hooks.useTranslate();
|
|
3102
2235
|
const handleDismiss = () => {
|
|
3103
2236
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
3104
2237
|
onDismiss?.();
|
|
@@ -4026,7 +3159,6 @@ var init_Input = __esm({
|
|
|
4026
3159
|
"components/core/atoms/Input.tsx"() {
|
|
4027
3160
|
init_cn();
|
|
4028
3161
|
init_Icon();
|
|
4029
|
-
init_useTranslate();
|
|
4030
3162
|
Input = React84__namespace.default.forwardRef(
|
|
4031
3163
|
({
|
|
4032
3164
|
className,
|
|
@@ -4044,7 +3176,7 @@ var init_Input = __esm({
|
|
|
4044
3176
|
onChange,
|
|
4045
3177
|
...props
|
|
4046
3178
|
}, ref) => {
|
|
4047
|
-
const { t } = useTranslate();
|
|
3179
|
+
const { t } = hooks.useTranslate();
|
|
4048
3180
|
const type = inputType || htmlType || "text";
|
|
4049
3181
|
const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
|
|
4050
3182
|
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-icon-default w-icon-default" });
|
|
@@ -4410,7 +3542,6 @@ var init_FilterPill = __esm({
|
|
|
4410
3542
|
"components/core/atoms/FilterPill.tsx"() {
|
|
4411
3543
|
init_cn();
|
|
4412
3544
|
init_useEventBus();
|
|
4413
|
-
init_useTranslate();
|
|
4414
3545
|
init_Icon();
|
|
4415
3546
|
variantStyles5 = {
|
|
4416
3547
|
default: [
|
|
@@ -4466,7 +3597,7 @@ var init_FilterPill = __esm({
|
|
|
4466
3597
|
...props
|
|
4467
3598
|
}, ref) => {
|
|
4468
3599
|
const eventBus = useEventBus();
|
|
4469
|
-
const { t } = useTranslate();
|
|
3600
|
+
const { t } = hooks.useTranslate();
|
|
4470
3601
|
const payloadLabel = typeof children === "string" || typeof children === "number" ? children : label;
|
|
4471
3602
|
const handleClick = React84.useCallback(() => {
|
|
4472
3603
|
onClick?.();
|
|
@@ -5797,7 +4928,6 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5797
4928
|
init_Typography();
|
|
5798
4929
|
init_Divider();
|
|
5799
4930
|
init_cn();
|
|
5800
|
-
init_useTranslate();
|
|
5801
4931
|
positionStyles2 = {
|
|
5802
4932
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5803
4933
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5816,7 +4946,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5816
4946
|
position = "top",
|
|
5817
4947
|
className
|
|
5818
4948
|
}) => {
|
|
5819
|
-
const { t } = useTranslate();
|
|
4949
|
+
const { t } = hooks.useTranslate();
|
|
5820
4950
|
const [isVisible, setIsVisible] = React84__namespace.default.useState(false);
|
|
5821
4951
|
const timeoutRef = React84__namespace.default.useRef(null);
|
|
5822
4952
|
const handleMouseEnter = () => {
|
|
@@ -6408,6 +5538,41 @@ var init_AnimatedCounter = __esm({
|
|
|
6408
5538
|
AnimatedCounter.displayName = "AnimatedCounter";
|
|
6409
5539
|
}
|
|
6410
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
|
+
});
|
|
6411
5576
|
var InfiniteScrollSentinel;
|
|
6412
5577
|
var init_InfiniteScrollSentinel = __esm({
|
|
6413
5578
|
"components/core/atoms/InfiniteScrollSentinel.tsx"() {
|
|
@@ -8756,7 +7921,6 @@ var init_ErrorState = __esm({
|
|
|
8756
7921
|
init_Typography();
|
|
8757
7922
|
init_Icon();
|
|
8758
7923
|
init_useEventBus();
|
|
8759
|
-
init_useTranslate();
|
|
8760
7924
|
ErrorState = ({
|
|
8761
7925
|
title,
|
|
8762
7926
|
message,
|
|
@@ -8766,7 +7930,7 @@ var init_ErrorState = __esm({
|
|
|
8766
7930
|
retryEvent
|
|
8767
7931
|
}) => {
|
|
8768
7932
|
const eventBus = useEventBus();
|
|
8769
|
-
const { t } = useTranslate();
|
|
7933
|
+
const { t } = hooks.useTranslate();
|
|
8770
7934
|
const handleRetry = () => {
|
|
8771
7935
|
if (retryEvent) eventBus.emit(`UI:${retryEvent}`, {});
|
|
8772
7936
|
onRetry?.();
|
|
@@ -8799,9 +7963,8 @@ var init_ErrorBoundary = __esm({
|
|
|
8799
7963
|
"use client";
|
|
8800
7964
|
init_cn();
|
|
8801
7965
|
init_ErrorState();
|
|
8802
|
-
init_useTranslate();
|
|
8803
7966
|
DefaultFallback = ({ error, onRetry }) => {
|
|
8804
|
-
const { t } = useTranslate();
|
|
7967
|
+
const { t } = hooks.useTranslate();
|
|
8805
7968
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8806
7969
|
ErrorState,
|
|
8807
7970
|
{
|
|
@@ -8928,7 +8091,7 @@ function Skeleton({
|
|
|
8928
8091
|
fields,
|
|
8929
8092
|
className
|
|
8930
8093
|
}) {
|
|
8931
|
-
const { t: _t } = useTranslate();
|
|
8094
|
+
const { t: _t } = hooks.useTranslate();
|
|
8932
8095
|
switch (variant) {
|
|
8933
8096
|
case "header":
|
|
8934
8097
|
return /* @__PURE__ */ jsxRuntime.jsx(HeaderSkeleton, { className });
|
|
@@ -8949,7 +8112,6 @@ var init_Skeleton = __esm({
|
|
|
8949
8112
|
"components/core/molecules/Skeleton.tsx"() {
|
|
8950
8113
|
"use client";
|
|
8951
8114
|
init_cn();
|
|
8952
|
-
init_useTranslate();
|
|
8953
8115
|
init_Box();
|
|
8954
8116
|
init_Stack();
|
|
8955
8117
|
init_Stack();
|
|
@@ -9626,7 +8788,6 @@ var AboutPageTemplate;
|
|
|
9626
8788
|
var init_AboutPageTemplate = __esm({
|
|
9627
8789
|
"components/marketing/templates/AboutPageTemplate.tsx"() {
|
|
9628
8790
|
init_cn();
|
|
9629
|
-
init_useTranslate();
|
|
9630
8791
|
init_Stack();
|
|
9631
8792
|
init_Box();
|
|
9632
8793
|
init_Typography();
|
|
@@ -9642,7 +8803,7 @@ var init_AboutPageTemplate = __esm({
|
|
|
9642
8803
|
entity,
|
|
9643
8804
|
className
|
|
9644
8805
|
}) => {
|
|
9645
|
-
const { t } = useTranslate();
|
|
8806
|
+
const { t } = hooks.useTranslate();
|
|
9646
8807
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
9647
8808
|
if (!resolved) return null;
|
|
9648
8809
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -9731,7 +8892,6 @@ var init_Alert = __esm({
|
|
|
9731
8892
|
init_Icon();
|
|
9732
8893
|
init_Typography();
|
|
9733
8894
|
init_useEventBus();
|
|
9734
|
-
init_useTranslate();
|
|
9735
8895
|
variantBorderClasses = {
|
|
9736
8896
|
info: "border-info",
|
|
9737
8897
|
success: "border-success",
|
|
@@ -9763,7 +8923,7 @@ var init_Alert = __esm({
|
|
|
9763
8923
|
dismissEvent
|
|
9764
8924
|
}) => {
|
|
9765
8925
|
const eventBus = useEventBus();
|
|
9766
|
-
const { t } = useTranslate();
|
|
8926
|
+
const { t } = hooks.useTranslate();
|
|
9767
8927
|
const handleDismissCallback = onDismiss || onClose;
|
|
9768
8928
|
const handleDismiss = () => {
|
|
9769
8929
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
@@ -10091,7 +9251,6 @@ var init_Menu = __esm({
|
|
|
10091
9251
|
init_Badge();
|
|
10092
9252
|
init_cn();
|
|
10093
9253
|
init_useEventBus();
|
|
10094
|
-
init_useTranslate();
|
|
10095
9254
|
Menu = ({
|
|
10096
9255
|
trigger,
|
|
10097
9256
|
items,
|
|
@@ -10099,7 +9258,7 @@ var init_Menu = __esm({
|
|
|
10099
9258
|
className
|
|
10100
9259
|
}) => {
|
|
10101
9260
|
const eventBus = useEventBus();
|
|
10102
|
-
const { t } = useTranslate();
|
|
9261
|
+
const { t } = hooks.useTranslate();
|
|
10103
9262
|
const [isOpen, setIsOpen] = React84.useState(false);
|
|
10104
9263
|
const [activeSubMenu, setActiveSubMenu] = React84.useState(null);
|
|
10105
9264
|
const [triggerRect, setTriggerRect] = React84.useState(null);
|
|
@@ -10379,7 +9538,6 @@ var init_FloatingActionButton = __esm({
|
|
|
10379
9538
|
init_Typography();
|
|
10380
9539
|
init_cn();
|
|
10381
9540
|
init_useEventBus();
|
|
10382
|
-
init_useTranslate();
|
|
10383
9541
|
FloatingActionButton = ({
|
|
10384
9542
|
action,
|
|
10385
9543
|
actionPayload,
|
|
@@ -10392,7 +9550,7 @@ var init_FloatingActionButton = __esm({
|
|
|
10392
9550
|
className
|
|
10393
9551
|
}) => {
|
|
10394
9552
|
const eventBus = useEventBus();
|
|
10395
|
-
const { t } = useTranslate();
|
|
9553
|
+
const { t } = hooks.useTranslate();
|
|
10396
9554
|
const resolvedAction = icon ? {
|
|
10397
9555
|
icon,
|
|
10398
9556
|
onClick: () => {
|
|
@@ -10563,7 +9721,7 @@ var init_MapView = __esm({
|
|
|
10563
9721
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
10564
9722
|
const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback113, useState: useState103 } = React84__namespace.default;
|
|
10565
9723
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
10566
|
-
const { useEventBus:
|
|
9724
|
+
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
10567
9725
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
10568
9726
|
const map = useMap();
|
|
10569
9727
|
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
@@ -10605,7 +9763,7 @@ var init_MapView = __esm({
|
|
|
10605
9763
|
className,
|
|
10606
9764
|
showAttribution = true
|
|
10607
9765
|
}) {
|
|
10608
|
-
const eventBus =
|
|
9766
|
+
const eventBus = useEventBus3();
|
|
10609
9767
|
const [clickedPosition, setClickedPosition] = useState103(null);
|
|
10610
9768
|
const handleMapClick = useCallback113((lat, lng) => {
|
|
10611
9769
|
if (showClickedPin) {
|
|
@@ -11262,7 +10420,7 @@ function ActionTile({
|
|
|
11262
10420
|
categoryColors,
|
|
11263
10421
|
className
|
|
11264
10422
|
}) {
|
|
11265
|
-
useTranslate();
|
|
10423
|
+
hooks.useTranslate();
|
|
11266
10424
|
const config = SIZE_CONFIG[size];
|
|
11267
10425
|
const catColor = categoryColors?.[action.category];
|
|
11268
10426
|
const handleDragStart = React84.useCallback((e) => {
|
|
@@ -11301,7 +10459,6 @@ var init_ActionTile = __esm({
|
|
|
11301
10459
|
"components/game/organisms/puzzles/sequencer/ActionTile.tsx"() {
|
|
11302
10460
|
init_atoms2();
|
|
11303
10461
|
init_cn();
|
|
11304
|
-
init_useTranslate();
|
|
11305
10462
|
DRAG_MIME = "application/x-almadar-slot-item";
|
|
11306
10463
|
SIZE_CONFIG = {
|
|
11307
10464
|
sm: { px: "px-2 py-1", icon: "text-lg", text: "text-xs" },
|
|
@@ -11320,7 +10477,7 @@ function ActionPalette({
|
|
|
11320
10477
|
label,
|
|
11321
10478
|
className
|
|
11322
10479
|
}) {
|
|
11323
|
-
const { t } = useTranslate();
|
|
10480
|
+
const { t } = hooks.useTranslate();
|
|
11324
10481
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
11325
10482
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: label ?? t("sequencer.actions") }),
|
|
11326
10483
|
/* @__PURE__ */ jsxRuntime.jsx(HStack, { className: "flex-wrap", gap: "sm", children: (actions ?? []).map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11339,7 +10496,6 @@ var init_ActionPalette = __esm({
|
|
|
11339
10496
|
"components/game/organisms/puzzles/sequencer/ActionPalette.tsx"() {
|
|
11340
10497
|
init_atoms2();
|
|
11341
10498
|
init_cn();
|
|
11342
|
-
init_useTranslate();
|
|
11343
10499
|
init_ActionTile();
|
|
11344
10500
|
ActionPalette.displayName = "ActionPalette";
|
|
11345
10501
|
}
|
|
@@ -11349,7 +10505,6 @@ var init_AuthLayout = __esm({
|
|
|
11349
10505
|
"components/core/templates/AuthLayout.tsx"() {
|
|
11350
10506
|
"use client";
|
|
11351
10507
|
init_cn();
|
|
11352
|
-
init_useTranslate();
|
|
11353
10508
|
init_Box();
|
|
11354
10509
|
init_Stack();
|
|
11355
10510
|
init_Typography();
|
|
@@ -11360,7 +10515,7 @@ var init_AuthLayout = __esm({
|
|
|
11360
10515
|
showBranding = true,
|
|
11361
10516
|
brandingContent
|
|
11362
10517
|
}) => {
|
|
11363
|
-
const { t } = useTranslate();
|
|
10518
|
+
const { t } = hooks.useTranslate();
|
|
11364
10519
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "min-h-screen flex", children: [
|
|
11365
10520
|
showBranding && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11366
10521
|
VStack,
|
|
@@ -11494,13 +10649,12 @@ var init_LoadingState = __esm({
|
|
|
11494
10649
|
init_atoms2();
|
|
11495
10650
|
init_Stack();
|
|
11496
10651
|
init_Typography();
|
|
11497
|
-
init_useTranslate();
|
|
11498
10652
|
LoadingState = ({
|
|
11499
10653
|
title,
|
|
11500
10654
|
message,
|
|
11501
10655
|
className
|
|
11502
10656
|
}) => {
|
|
11503
|
-
const { t } = useTranslate();
|
|
10657
|
+
const { t } = hooks.useTranslate();
|
|
11504
10658
|
const displayMessage = message ?? t("common.loading");
|
|
11505
10659
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11506
10660
|
VStack,
|
|
@@ -11982,7 +11136,7 @@ function IsometricCanvas({
|
|
|
11982
11136
|
const unitsProp = Array.isArray(_unitsPropRaw) ? _unitsPropRaw : [];
|
|
11983
11137
|
const featuresProp = Array.isArray(_featuresPropRaw) ? _featuresPropRaw : [];
|
|
11984
11138
|
const eventBus = useEventBus();
|
|
11985
|
-
const { t } = useTranslate();
|
|
11139
|
+
const { t } = hooks.useTranslate();
|
|
11986
11140
|
const canvasRef = React84.useRef(null);
|
|
11987
11141
|
const containerRef = React84.useRef(null);
|
|
11988
11142
|
const minimapRef = React84.useRef(null);
|
|
@@ -12678,7 +11832,6 @@ var init_IsometricCanvas = __esm({
|
|
|
12678
11832
|
"use client";
|
|
12679
11833
|
init_cn();
|
|
12680
11834
|
init_useEventBus();
|
|
12681
|
-
init_useTranslate();
|
|
12682
11835
|
init_Box();
|
|
12683
11836
|
init_Stack();
|
|
12684
11837
|
init_Icon();
|
|
@@ -12738,7 +11891,7 @@ function BattleBoard({
|
|
|
12738
11891
|
const currentTurn = entity.turn;
|
|
12739
11892
|
const gameResult = entity.gameResult;
|
|
12740
11893
|
const eventBus = useEventBus();
|
|
12741
|
-
const { t } = useTranslate();
|
|
11894
|
+
const { t } = hooks.useTranslate();
|
|
12742
11895
|
const [hoveredTile, setHoveredTile] = React84.useState(null);
|
|
12743
11896
|
const [isShaking, setIsShaking] = React84.useState(false);
|
|
12744
11897
|
const selectedUnit = React84.useMemo(
|
|
@@ -13042,7 +12195,6 @@ var init_BattleBoard = __esm({
|
|
|
13042
12195
|
"use client";
|
|
13043
12196
|
init_cn();
|
|
13044
12197
|
init_useEventBus();
|
|
13045
|
-
init_useTranslate();
|
|
13046
12198
|
init_Box();
|
|
13047
12199
|
init_Button();
|
|
13048
12200
|
init_Typography();
|
|
@@ -13802,7 +12954,6 @@ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13802
12954
|
var init_BehaviorView = __esm({
|
|
13803
12955
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13804
12956
|
"use client";
|
|
13805
|
-
init_useTranslate();
|
|
13806
12957
|
init_AvlState();
|
|
13807
12958
|
init_AvlTransitionLane();
|
|
13808
12959
|
init_AvlSwimLane();
|
|
@@ -13812,7 +12963,7 @@ var init_BehaviorView = __esm({
|
|
|
13812
12963
|
SWIM_GUTTER = 120;
|
|
13813
12964
|
CENTER_W = 360;
|
|
13814
12965
|
BehaviorView = ({ data }) => {
|
|
13815
|
-
const { t } = useTranslate();
|
|
12966
|
+
const { t } = hooks.useTranslate();
|
|
13816
12967
|
const [layout, setLayout] = React84.useState(null);
|
|
13817
12968
|
const traitName = data.traits[0]?.name;
|
|
13818
12969
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -13917,14 +13068,13 @@ var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
|
13917
13068
|
var init_ScaledDiagram = __esm({
|
|
13918
13069
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
13919
13070
|
init_Box();
|
|
13920
|
-
init_useTranslate();
|
|
13921
13071
|
init_cn();
|
|
13922
13072
|
MIN_DIAGRAM_WIDTH = 200;
|
|
13923
13073
|
ScaledDiagram = ({
|
|
13924
13074
|
children,
|
|
13925
13075
|
className
|
|
13926
13076
|
}) => {
|
|
13927
|
-
const { t: _t } = useTranslate();
|
|
13077
|
+
const { t: _t } = hooks.useTranslate();
|
|
13928
13078
|
const wrapperRef = React84.useRef(null);
|
|
13929
13079
|
const contentRef = React84.useRef(null);
|
|
13930
13080
|
const [layout, setLayout] = React84.useState(null);
|
|
@@ -14060,7 +13210,6 @@ var init_CodeBlock = __esm({
|
|
|
14060
13210
|
init_Textarea();
|
|
14061
13211
|
init_Icon();
|
|
14062
13212
|
init_useEventBus();
|
|
14063
|
-
init_useTranslate();
|
|
14064
13213
|
SyntaxHighlighter__default.default.registerLanguage("json", langJson__default.default);
|
|
14065
13214
|
SyntaxHighlighter__default.default.registerLanguage("javascript", langJavascript__default.default);
|
|
14066
13215
|
SyntaxHighlighter__default.default.registerLanguage("js", langJavascript__default.default);
|
|
@@ -14149,7 +13298,7 @@ var init_CodeBlock = __esm({
|
|
|
14149
13298
|
const isLolo = language === "lolo";
|
|
14150
13299
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark__default.default;
|
|
14151
13300
|
const eventBus = useEventBus();
|
|
14152
|
-
const { t } = useTranslate();
|
|
13301
|
+
const { t } = hooks.useTranslate();
|
|
14153
13302
|
const scrollRef = React84.useRef(null);
|
|
14154
13303
|
const codeRef = React84.useRef(null);
|
|
14155
13304
|
const savedScrollLeftRef = React84.useRef(0);
|
|
@@ -14567,11 +13716,10 @@ var init_MarkdownContent = __esm({
|
|
|
14567
13716
|
init_katex_min();
|
|
14568
13717
|
init_Box();
|
|
14569
13718
|
init_CodeBlock();
|
|
14570
|
-
init_useTranslate();
|
|
14571
13719
|
init_cn();
|
|
14572
13720
|
MarkdownContent = React84__namespace.default.memo(
|
|
14573
13721
|
({ content, direction, className }) => {
|
|
14574
|
-
const { t: _t } = useTranslate();
|
|
13722
|
+
const { t: _t } = hooks.useTranslate();
|
|
14575
13723
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
14576
13724
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14577
13725
|
Box,
|
|
@@ -14734,6 +13882,56 @@ var init_MarkdownContent = __esm({
|
|
|
14734
13882
|
MarkdownContent.displayName = "MarkdownContent";
|
|
14735
13883
|
}
|
|
14736
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
|
+
});
|
|
14737
13935
|
function Card2({
|
|
14738
13936
|
title,
|
|
14739
13937
|
subtitle,
|
|
@@ -14747,7 +13945,7 @@ function Card2({
|
|
|
14747
13945
|
longPressPayload
|
|
14748
13946
|
}) {
|
|
14749
13947
|
const eventBus = useEventBus();
|
|
14750
|
-
const { t } = useTranslate();
|
|
13948
|
+
const { t } = hooks.useTranslate();
|
|
14751
13949
|
const isClickable = !!onClick || !!action;
|
|
14752
13950
|
const handleLongPress = React84.useCallback(() => {
|
|
14753
13951
|
if (longPressEvent) {
|
|
@@ -14822,7 +14020,6 @@ var init_Card2 = __esm({
|
|
|
14822
14020
|
"components/core/molecules/Card.tsx"() {
|
|
14823
14021
|
"use client";
|
|
14824
14022
|
init_useEventBus();
|
|
14825
|
-
init_useTranslate();
|
|
14826
14023
|
init_useLongPress();
|
|
14827
14024
|
Card2.displayName = "Card";
|
|
14828
14025
|
}
|
|
@@ -14836,14 +14033,13 @@ var init_QuizBlock = __esm({
|
|
|
14836
14033
|
init_Button();
|
|
14837
14034
|
init_Icon();
|
|
14838
14035
|
init_Box();
|
|
14839
|
-
init_useTranslate();
|
|
14840
14036
|
init_cn();
|
|
14841
14037
|
QuizBlock = ({
|
|
14842
14038
|
question,
|
|
14843
14039
|
answer,
|
|
14844
14040
|
className
|
|
14845
14041
|
}) => {
|
|
14846
|
-
const { t } = useTranslate();
|
|
14042
|
+
const { t } = hooks.useTranslate();
|
|
14847
14043
|
const [revealed, setRevealed] = React84.useState(false);
|
|
14848
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: [
|
|
14849
14045
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "start", children: [
|
|
@@ -14879,11 +14075,10 @@ var init_StateMachineView = __esm({
|
|
|
14879
14075
|
init_Typography();
|
|
14880
14076
|
init_Button();
|
|
14881
14077
|
init_Icon();
|
|
14882
|
-
init_useTranslate();
|
|
14883
14078
|
init_useEventBus();
|
|
14884
14079
|
init_cn();
|
|
14885
14080
|
StateNode = ({ state, config }) => {
|
|
14886
|
-
const { t } = useTranslate();
|
|
14081
|
+
const { t } = hooks.useTranslate();
|
|
14887
14082
|
const size = state.radius * 2;
|
|
14888
14083
|
let borderColor = config.colors.nodeBorder;
|
|
14889
14084
|
let borderWidth = 2;
|
|
@@ -14990,7 +14185,7 @@ var init_StateMachineView = __esm({
|
|
|
14990
14185
|
);
|
|
14991
14186
|
};
|
|
14992
14187
|
TransitionBundleArrow = ({ bundle, states, bundleIndex, config, onClick, onHover }) => {
|
|
14993
|
-
const { t } = useTranslate();
|
|
14188
|
+
const { t } = hooks.useTranslate();
|
|
14994
14189
|
const groupRef = React84.useRef(null);
|
|
14995
14190
|
const fromState = states.find((s) => s.name === bundle.from);
|
|
14996
14191
|
const toState = states.find((s) => s.name === bundle.to);
|
|
@@ -15240,7 +14435,7 @@ var init_StateMachineView = __esm({
|
|
|
15240
14435
|
);
|
|
15241
14436
|
};
|
|
15242
14437
|
BundleTooltip = ({ tooltip, config }) => {
|
|
15243
|
-
const { t } = useTranslate();
|
|
14438
|
+
const { t } = hooks.useTranslate();
|
|
15244
14439
|
if (!tooltip.visible || !tooltip.bundle) return null;
|
|
15245
14440
|
const { bundle } = tooltip;
|
|
15246
14441
|
const isSingle = bundle.labels.length === 1;
|
|
@@ -15392,7 +14587,7 @@ var init_StateMachineView = __esm({
|
|
|
15392
14587
|
);
|
|
15393
14588
|
};
|
|
15394
14589
|
EntityBox = ({ entity, config }) => {
|
|
15395
|
-
const { t } = useTranslate();
|
|
14590
|
+
const { t } = hooks.useTranslate();
|
|
15396
14591
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15397
14592
|
VStack,
|
|
15398
14593
|
{
|
|
@@ -15433,7 +14628,7 @@ var init_StateMachineView = __esm({
|
|
|
15433
14628
|
);
|
|
15434
14629
|
};
|
|
15435
14630
|
OutputsBox = ({ outputs, config }) => {
|
|
15436
|
-
const { t } = useTranslate();
|
|
14631
|
+
const { t } = hooks.useTranslate();
|
|
15437
14632
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15438
14633
|
VStack,
|
|
15439
14634
|
{
|
|
@@ -15475,7 +14670,7 @@ var init_StateMachineView = __esm({
|
|
|
15475
14670
|
);
|
|
15476
14671
|
};
|
|
15477
14672
|
Legend = ({ config, y }) => {
|
|
15478
|
-
const { t } = useTranslate();
|
|
14673
|
+
const { t } = hooks.useTranslate();
|
|
15479
14674
|
const items = [
|
|
15480
14675
|
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
15481
14676
|
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
@@ -15519,7 +14714,7 @@ var init_StateMachineView = __esm({
|
|
|
15519
14714
|
isLoading: _isLoading,
|
|
15520
14715
|
error: _error
|
|
15521
14716
|
}) => {
|
|
15522
|
-
const { t } = useTranslate();
|
|
14717
|
+
const { t } = hooks.useTranslate();
|
|
15523
14718
|
const [tooltip, setTooltip] = React84.useState({
|
|
15524
14719
|
visible: false,
|
|
15525
14720
|
pinned: false,
|
|
@@ -16246,7 +15441,6 @@ var init_JazariStateMachine = __esm({
|
|
|
16246
15441
|
init_StateMachineView();
|
|
16247
15442
|
init_visualizer();
|
|
16248
15443
|
init_svg_paths();
|
|
16249
|
-
init_useTranslate();
|
|
16250
15444
|
init_cn();
|
|
16251
15445
|
JAZARI_VISUALIZER_CONFIG = {
|
|
16252
15446
|
...DEFAULT_CONFIG,
|
|
@@ -16282,7 +15476,7 @@ var init_JazariStateMachine = __esm({
|
|
|
16282
15476
|
isLoading = false,
|
|
16283
15477
|
error = null
|
|
16284
15478
|
}) => {
|
|
16285
|
-
const { t } = useTranslate();
|
|
15479
|
+
const { t } = hooks.useTranslate();
|
|
16286
15480
|
const resolvedTrait = React84.useMemo(
|
|
16287
15481
|
() => extractTrait(schema, traitProp, traitIndex),
|
|
16288
15482
|
[schema, traitProp, traitIndex]
|
|
@@ -16402,7 +15596,6 @@ var init_ContentRenderer = __esm({
|
|
|
16402
15596
|
init_ScaledDiagram();
|
|
16403
15597
|
init_JazariStateMachine();
|
|
16404
15598
|
init_parseContentSegments();
|
|
16405
|
-
init_useTranslate();
|
|
16406
15599
|
init_cn();
|
|
16407
15600
|
ContentRenderer = ({
|
|
16408
15601
|
content,
|
|
@@ -16410,7 +15603,7 @@ var init_ContentRenderer = __esm({
|
|
|
16410
15603
|
direction,
|
|
16411
15604
|
className
|
|
16412
15605
|
}) => {
|
|
16413
|
-
const { t: _t } = useTranslate();
|
|
15606
|
+
const { t: _t } = hooks.useTranslate();
|
|
16414
15607
|
const segments = React84.useMemo(
|
|
16415
15608
|
() => segmentsProp ?? parseContentSegments(content),
|
|
16416
15609
|
[segmentsProp, content]
|
|
@@ -16496,14 +15689,13 @@ var init_BookChapterView = __esm({
|
|
|
16496
15689
|
init_ScaledDiagram();
|
|
16497
15690
|
init_ContentRenderer();
|
|
16498
15691
|
init_JazariStateMachine();
|
|
16499
|
-
init_useTranslate();
|
|
16500
15692
|
init_cn();
|
|
16501
15693
|
BookChapterView = ({
|
|
16502
15694
|
chapter,
|
|
16503
15695
|
direction,
|
|
16504
15696
|
className
|
|
16505
15697
|
}) => {
|
|
16506
|
-
const { t: _t } = useTranslate();
|
|
15698
|
+
const { t: _t } = hooks.useTranslate();
|
|
16507
15699
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16508
15700
|
VStack,
|
|
16509
15701
|
{
|
|
@@ -16535,7 +15727,6 @@ var init_BookCoverPage = __esm({
|
|
|
16535
15727
|
init_Typography();
|
|
16536
15728
|
init_Button();
|
|
16537
15729
|
init_Box();
|
|
16538
|
-
init_useTranslate();
|
|
16539
15730
|
init_cn();
|
|
16540
15731
|
BookCoverPage = ({
|
|
16541
15732
|
title,
|
|
@@ -16545,7 +15736,7 @@ var init_BookCoverPage = __esm({
|
|
|
16545
15736
|
direction,
|
|
16546
15737
|
className
|
|
16547
15738
|
}) => {
|
|
16548
|
-
const { t } = useTranslate();
|
|
15739
|
+
const { t } = hooks.useTranslate();
|
|
16549
15740
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16550
15741
|
VStack,
|
|
16551
15742
|
{
|
|
@@ -16615,7 +15806,6 @@ var init_BookNavBar = __esm({
|
|
|
16615
15806
|
init_Typography();
|
|
16616
15807
|
init_ProgressBar();
|
|
16617
15808
|
init_Box();
|
|
16618
|
-
init_useTranslate();
|
|
16619
15809
|
init_cn();
|
|
16620
15810
|
BookNavBar = ({
|
|
16621
15811
|
currentPage,
|
|
@@ -16624,7 +15814,7 @@ var init_BookNavBar = __esm({
|
|
|
16624
15814
|
direction,
|
|
16625
15815
|
className
|
|
16626
15816
|
}) => {
|
|
16627
|
-
const { t } = useTranslate();
|
|
15817
|
+
const { t } = hooks.useTranslate();
|
|
16628
15818
|
const isRtl = direction === "rtl";
|
|
16629
15819
|
const progress = totalPages > 1 ? currentPage / (totalPages - 1) * 100 : 0;
|
|
16630
15820
|
const PrevIcon = isRtl ? LucideIcons2.ChevronRight : LucideIcons2.ChevronLeft;
|
|
@@ -16717,7 +15907,6 @@ var init_BookTableOfContents = __esm({
|
|
|
16717
15907
|
init_Button();
|
|
16718
15908
|
init_Box();
|
|
16719
15909
|
init_Badge();
|
|
16720
|
-
init_useTranslate();
|
|
16721
15910
|
init_cn();
|
|
16722
15911
|
BookTableOfContents = ({
|
|
16723
15912
|
parts,
|
|
@@ -16725,7 +15914,7 @@ var init_BookTableOfContents = __esm({
|
|
|
16725
15914
|
direction,
|
|
16726
15915
|
className
|
|
16727
15916
|
}) => {
|
|
16728
|
-
const { t } = useTranslate();
|
|
15917
|
+
const { t } = hooks.useTranslate();
|
|
16729
15918
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16730
15919
|
VStack,
|
|
16731
15920
|
{
|
|
@@ -16777,7 +15966,6 @@ var init_EmptyState = __esm({
|
|
|
16777
15966
|
init_Stack();
|
|
16778
15967
|
init_Typography();
|
|
16779
15968
|
init_useEventBus();
|
|
16780
|
-
init_useTranslate();
|
|
16781
15969
|
ICON_NAME_ALIASES = {
|
|
16782
15970
|
check: "check-circle",
|
|
16783
15971
|
error: "x-circle",
|
|
@@ -16803,7 +15991,7 @@ var init_EmptyState = __esm({
|
|
|
16803
15991
|
look = "icon-only"
|
|
16804
15992
|
}) => {
|
|
16805
15993
|
const eventBus = useEventBus();
|
|
16806
|
-
const { t } = useTranslate();
|
|
15994
|
+
const { t } = hooks.useTranslate();
|
|
16807
15995
|
const handleAction = () => {
|
|
16808
15996
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
16809
15997
|
onAction?.();
|
|
@@ -16948,7 +16136,6 @@ var init_BookViewer = __esm({
|
|
|
16948
16136
|
init_Box();
|
|
16949
16137
|
init_Stack();
|
|
16950
16138
|
init_useEventBus();
|
|
16951
|
-
init_useTranslate();
|
|
16952
16139
|
init_cn();
|
|
16953
16140
|
init_BookCoverPage();
|
|
16954
16141
|
init_BookTableOfContents();
|
|
@@ -16974,7 +16161,7 @@ var init_BookViewer = __esm({
|
|
|
16974
16161
|
className
|
|
16975
16162
|
}) => {
|
|
16976
16163
|
const eventBus = useEventBus();
|
|
16977
|
-
const { t } = useTranslate();
|
|
16164
|
+
const { t } = hooks.useTranslate();
|
|
16978
16165
|
const [currentPage, setCurrentPage] = React84.useState(initialPage);
|
|
16979
16166
|
const resolvedFieldMap = React84.useMemo(() => resolveFieldMap(fieldMap), [fieldMap]);
|
|
16980
16167
|
const book = React84.useMemo(() => {
|
|
@@ -17380,7 +16567,6 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17380
16567
|
init_FilterPill();
|
|
17381
16568
|
init_Box();
|
|
17382
16569
|
init_useEventBus();
|
|
17383
|
-
init_useTranslate();
|
|
17384
16570
|
init_cn();
|
|
17385
16571
|
END_OF_SURVEY = "end-of-survey";
|
|
17386
16572
|
RuleRow = ({
|
|
@@ -17391,7 +16577,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17391
16577
|
onChange,
|
|
17392
16578
|
onDelete
|
|
17393
16579
|
}) => {
|
|
17394
|
-
const { t } = useTranslate();
|
|
16580
|
+
const { t } = hooks.useTranslate();
|
|
17395
16581
|
const operatorOptions = React84.useMemo(
|
|
17396
16582
|
() => [
|
|
17397
16583
|
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
@@ -17566,7 +16752,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17566
16752
|
NODE_GAP_Y = 80;
|
|
17567
16753
|
PADDING = 32;
|
|
17568
16754
|
LogicGraph = ({ questions, rules }) => {
|
|
17569
|
-
const { t } = useTranslate();
|
|
16755
|
+
const { t } = hooks.useTranslate();
|
|
17570
16756
|
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
17571
16757
|
const layout = React84.useMemo(() => {
|
|
17572
16758
|
const items = [
|
|
@@ -17698,7 +16884,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17698
16884
|
readOnly = false,
|
|
17699
16885
|
className
|
|
17700
16886
|
}) => {
|
|
17701
|
-
const { t } = useTranslate();
|
|
16887
|
+
const { t } = hooks.useTranslate();
|
|
17702
16888
|
const eventBus = useEventBus();
|
|
17703
16889
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
17704
16890
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -17833,7 +17019,6 @@ var init_Breadcrumb = __esm({
|
|
|
17833
17019
|
init_Typography();
|
|
17834
17020
|
init_cn();
|
|
17835
17021
|
init_useEventBus();
|
|
17836
|
-
init_useTranslate();
|
|
17837
17022
|
Breadcrumb = ({
|
|
17838
17023
|
items,
|
|
17839
17024
|
separator = "chevron-right",
|
|
@@ -17841,7 +17026,7 @@ var init_Breadcrumb = __esm({
|
|
|
17841
17026
|
className
|
|
17842
17027
|
}) => {
|
|
17843
17028
|
const eventBus = useEventBus();
|
|
17844
|
-
const { t } = useTranslate();
|
|
17029
|
+
const { t } = hooks.useTranslate();
|
|
17845
17030
|
const displayItems = maxItems && items.length > maxItems ? [
|
|
17846
17031
|
...items.slice(0, 1),
|
|
17847
17032
|
{ label: "...", isCurrent: false },
|
|
@@ -17920,7 +17105,7 @@ function BuilderBoard({
|
|
|
17920
17105
|
className
|
|
17921
17106
|
}) {
|
|
17922
17107
|
const { emit } = useEventBus();
|
|
17923
|
-
const { t } = useTranslate();
|
|
17108
|
+
const { t } = hooks.useTranslate();
|
|
17924
17109
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
17925
17110
|
const [placements, setPlacements] = React84.useState({});
|
|
17926
17111
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -18069,7 +17254,6 @@ var init_BuilderBoard = __esm({
|
|
|
18069
17254
|
"components/game/organisms/puzzles/builder/BuilderBoard.tsx"() {
|
|
18070
17255
|
init_atoms2();
|
|
18071
17256
|
init_useEventBus();
|
|
18072
|
-
init_useTranslate();
|
|
18073
17257
|
BuilderBoard.displayName = "BuilderBoard";
|
|
18074
17258
|
}
|
|
18075
17259
|
});
|
|
@@ -18196,6 +17380,73 @@ var init_ButtonGroup = __esm({
|
|
|
18196
17380
|
ButtonGroup.displayName = "ButtonGroup";
|
|
18197
17381
|
}
|
|
18198
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
|
+
});
|
|
18199
17450
|
function dayWindowForViewport(width) {
|
|
18200
17451
|
if (width <= 640) return 1;
|
|
18201
17452
|
if (width <= 1024) return 3;
|
|
@@ -18270,7 +17521,7 @@ function CalendarGrid({
|
|
|
18270
17521
|
}) {
|
|
18271
17522
|
const evs = Array.isArray(events2) ? events2 : events2 ? [events2] : [];
|
|
18272
17523
|
const eventBus = useEventBus();
|
|
18273
|
-
const { t } = useTranslate();
|
|
17524
|
+
const { t } = hooks.useTranslate();
|
|
18274
17525
|
const longPressTimer = React84.useRef(null);
|
|
18275
17526
|
const resolvedWeekStart = React84.useMemo(
|
|
18276
17527
|
() => weekStart ? getStartOfWeek(weekStart) : getStartOfWeek(/* @__PURE__ */ new Date()),
|
|
@@ -18480,7 +17731,6 @@ var init_CalendarGrid = __esm({
|
|
|
18480
17731
|
init_TimeSlotCell();
|
|
18481
17732
|
init_useEventBus();
|
|
18482
17733
|
init_useSwipeGesture();
|
|
18483
|
-
init_useTranslate();
|
|
18484
17734
|
SHORT_DATE = { month: "short", day: "numeric" };
|
|
18485
17735
|
CalendarGrid.displayName = "CalendarGrid";
|
|
18486
17736
|
}
|
|
@@ -19789,7 +19039,6 @@ var init_Pagination = __esm({
|
|
|
19789
19039
|
init_Stack();
|
|
19790
19040
|
init_cn();
|
|
19791
19041
|
init_useEventBus();
|
|
19792
|
-
init_useTranslate();
|
|
19793
19042
|
Pagination = ({
|
|
19794
19043
|
currentPage,
|
|
19795
19044
|
totalPages,
|
|
@@ -19808,7 +19057,7 @@ var init_Pagination = __esm({
|
|
|
19808
19057
|
pageSizeChangeEvent
|
|
19809
19058
|
}) => {
|
|
19810
19059
|
const eventBus = useEventBus();
|
|
19811
|
-
const { t } = useTranslate();
|
|
19060
|
+
const { t } = hooks.useTranslate();
|
|
19812
19061
|
const [jumpToPage, setJumpToPage] = React84.useState("");
|
|
19813
19062
|
const handlePageChange = (page) => {
|
|
19814
19063
|
if (pageChangeEvent) eventBus.emit(`UI:${pageChangeEvent}`, { page });
|
|
@@ -19993,7 +19242,6 @@ var init_CardGrid = __esm({
|
|
|
19993
19242
|
init_cn();
|
|
19994
19243
|
init_getNestedValue();
|
|
19995
19244
|
init_useEventBus();
|
|
19996
|
-
init_useTranslate();
|
|
19997
19245
|
init_atoms2();
|
|
19998
19246
|
init_Badge();
|
|
19999
19247
|
init_Box();
|
|
@@ -20037,7 +19285,7 @@ var init_CardGrid = __esm({
|
|
|
20037
19285
|
imageField
|
|
20038
19286
|
}) => {
|
|
20039
19287
|
const eventBus = useEventBus();
|
|
20040
|
-
const { t } = useTranslate();
|
|
19288
|
+
const { t } = hooks.useTranslate();
|
|
20041
19289
|
const effectiveFieldNames = normalizeFields(fields).length > 0 ? normalizeFields(fields) : fieldNames ?? normalizeFields(columns);
|
|
20042
19290
|
const gridTemplateColumns = `repeat(auto-fit, minmax(min(${minCardWidth}px, 100%), 1fr))`;
|
|
20043
19291
|
const normalizedData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -20222,7 +19470,6 @@ var init_Carousel = __esm({
|
|
|
20222
19470
|
init_cn();
|
|
20223
19471
|
init_useEventBus();
|
|
20224
19472
|
init_useSwipeGesture();
|
|
20225
|
-
init_useTranslate();
|
|
20226
19473
|
init_Box();
|
|
20227
19474
|
init_Stack();
|
|
20228
19475
|
init_Button();
|
|
@@ -20243,7 +19490,7 @@ var init_Carousel = __esm({
|
|
|
20243
19490
|
const scrollRef = React84.useRef(null);
|
|
20244
19491
|
const autoPlayRef = React84.useRef(null);
|
|
20245
19492
|
const eventBus = useSafeEventBus3();
|
|
20246
|
-
const { t } = useTranslate();
|
|
19493
|
+
const { t } = hooks.useTranslate();
|
|
20247
19494
|
const safeItems = items ?? [];
|
|
20248
19495
|
const totalSlides = safeItems.length;
|
|
20249
19496
|
const emitSlideChange = React84.useCallback(
|
|
@@ -20459,7 +19706,6 @@ var init_CaseStudyOrganism = __esm({
|
|
|
20459
19706
|
"use client";
|
|
20460
19707
|
init_cn();
|
|
20461
19708
|
init_useEventBus();
|
|
20462
|
-
init_useTranslate();
|
|
20463
19709
|
init_Stack();
|
|
20464
19710
|
init_Typography();
|
|
20465
19711
|
init_SimpleGrid();
|
|
@@ -20475,7 +19721,7 @@ var init_CaseStudyOrganism = __esm({
|
|
|
20475
19721
|
subtitle
|
|
20476
19722
|
}) => {
|
|
20477
19723
|
useEventBus();
|
|
20478
|
-
const { t } = useTranslate();
|
|
19724
|
+
const { t } = hooks.useTranslate();
|
|
20479
19725
|
const items = React84.useMemo(
|
|
20480
19726
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
20481
19727
|
[entity]
|
|
@@ -20664,7 +19910,6 @@ var init_Chart = __esm({
|
|
|
20664
19910
|
init_ErrorState();
|
|
20665
19911
|
init_EmptyState();
|
|
20666
19912
|
init_useEventBus();
|
|
20667
|
-
init_useTranslate();
|
|
20668
19913
|
CHART_COLORS = [
|
|
20669
19914
|
"var(--color-primary)",
|
|
20670
19915
|
"var(--color-success)",
|
|
@@ -21237,7 +20482,7 @@ var init_Chart = __esm({
|
|
|
21237
20482
|
}) => {
|
|
21238
20483
|
const resolvedLook = look ?? (chartType ? LOOK_FROM_CHART_TYPE[chartType] : "bar-vertical");
|
|
21239
20484
|
const eventBus = useEventBus();
|
|
21240
|
-
const { t } = useTranslate();
|
|
20485
|
+
const { t } = hooks.useTranslate();
|
|
21241
20486
|
const handleAction = React84.useCallback(
|
|
21242
20487
|
(action) => {
|
|
21243
20488
|
if (action.event) {
|
|
@@ -21434,7 +20679,7 @@ function ClassifierBoard({
|
|
|
21434
20679
|
className
|
|
21435
20680
|
}) {
|
|
21436
20681
|
const { emit } = useEventBus();
|
|
21437
|
-
const { t } = useTranslate();
|
|
20682
|
+
const { t } = hooks.useTranslate();
|
|
21438
20683
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
21439
20684
|
const [assignments, setAssignments] = React84.useState({});
|
|
21440
20685
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -21572,7 +20817,6 @@ var init_ClassifierBoard = __esm({
|
|
|
21572
20817
|
"components/game/organisms/puzzles/classifier/ClassifierBoard.tsx"() {
|
|
21573
20818
|
init_atoms2();
|
|
21574
20819
|
init_useEventBus();
|
|
21575
|
-
init_useTranslate();
|
|
21576
20820
|
ClassifierBoard.displayName = "ClassifierBoard";
|
|
21577
20821
|
}
|
|
21578
20822
|
});
|
|
@@ -21582,7 +20826,7 @@ function CodeView({
|
|
|
21582
20826
|
defaultExpanded = false,
|
|
21583
20827
|
className
|
|
21584
20828
|
}) {
|
|
21585
|
-
const { t } = useTranslate();
|
|
20829
|
+
const { t } = hooks.useTranslate();
|
|
21586
20830
|
const [expanded, setExpanded] = React84.useState(defaultExpanded);
|
|
21587
20831
|
const jsonString = JSON.stringify(data, null, 2);
|
|
21588
20832
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("rounded-lg border border-border overflow-hidden", className), gap: "none", children: [
|
|
@@ -21604,7 +20848,6 @@ var init_CodeView = __esm({
|
|
|
21604
20848
|
"components/game/organisms/puzzles/state-architect/CodeView.tsx"() {
|
|
21605
20849
|
init_atoms2();
|
|
21606
20850
|
init_cn();
|
|
21607
|
-
init_useTranslate();
|
|
21608
20851
|
CodeView.displayName = "CodeView";
|
|
21609
20852
|
}
|
|
21610
20853
|
});
|
|
@@ -21618,7 +20861,6 @@ var init_Tabs = __esm({
|
|
|
21618
20861
|
init_Box();
|
|
21619
20862
|
init_cn();
|
|
21620
20863
|
init_useEventBus();
|
|
21621
|
-
init_useTranslate();
|
|
21622
20864
|
Tabs = ({
|
|
21623
20865
|
items,
|
|
21624
20866
|
tabs,
|
|
@@ -21636,7 +20878,7 @@ var init_Tabs = __esm({
|
|
|
21636
20878
|
id: id || value || ""
|
|
21637
20879
|
}));
|
|
21638
20880
|
const eventBus = useEventBus();
|
|
21639
|
-
const { t } = useTranslate();
|
|
20881
|
+
const { t } = hooks.useTranslate();
|
|
21640
20882
|
const initialActive = safeItems.find((item) => item.active)?.id;
|
|
21641
20883
|
const [internalActiveTab, setInternalActiveTab] = React84.useState(
|
|
21642
20884
|
defaultActiveTab || initialActive || safeItems[0]?.id || ""
|
|
@@ -21795,7 +21037,6 @@ var init_CodeViewer = __esm({
|
|
|
21795
21037
|
init_EmptyState();
|
|
21796
21038
|
init_Tabs();
|
|
21797
21039
|
init_useEventBus();
|
|
21798
|
-
init_useTranslate();
|
|
21799
21040
|
DIFF_STYLES = {
|
|
21800
21041
|
add: {
|
|
21801
21042
|
bg: "bg-success/10",
|
|
@@ -21833,7 +21074,7 @@ var init_CodeViewer = __esm({
|
|
|
21833
21074
|
className
|
|
21834
21075
|
}) => {
|
|
21835
21076
|
const eventBus = useEventBus();
|
|
21836
|
-
const { t } = useTranslate();
|
|
21077
|
+
const { t } = hooks.useTranslate();
|
|
21837
21078
|
const [copied, setCopied] = React84.useState(false);
|
|
21838
21079
|
const [wrap, setWrap] = React84.useState(wordWrap);
|
|
21839
21080
|
const [activeFileIndex, setActiveFileIndex] = React84.useState(0);
|
|
@@ -22167,7 +21408,6 @@ var init_ConfirmDialog = __esm({
|
|
|
22167
21408
|
init_Box();
|
|
22168
21409
|
init_Stack();
|
|
22169
21410
|
init_cn();
|
|
22170
|
-
init_useTranslate();
|
|
22171
21411
|
variantConfig = {
|
|
22172
21412
|
danger: {
|
|
22173
21413
|
icon: LucideIcons2.Trash2,
|
|
@@ -22215,7 +21455,7 @@ var init_ConfirmDialog = __esm({
|
|
|
22215
21455
|
className
|
|
22216
21456
|
}) => {
|
|
22217
21457
|
const config = variantConfig[variant];
|
|
22218
|
-
const { t } = useTranslate();
|
|
21458
|
+
const { t } = hooks.useTranslate();
|
|
22219
21459
|
const resolvedMessage = message ?? description ?? "";
|
|
22220
21460
|
const resolvedConfirmText = confirmText ?? confirmLabel ?? t("dialog.confirm");
|
|
22221
21461
|
const resolvedCancelText = cancelText ?? cancelLabel ?? t("dialog.cancel");
|
|
@@ -22649,7 +21889,6 @@ var init_DashboardGrid = __esm({
|
|
|
22649
21889
|
"components/core/organisms/layout/DashboardGrid.tsx"() {
|
|
22650
21890
|
init_cn();
|
|
22651
21891
|
init_Box();
|
|
22652
|
-
init_useTranslate();
|
|
22653
21892
|
gapStyles5 = {
|
|
22654
21893
|
sm: "gap-2",
|
|
22655
21894
|
md: "gap-4",
|
|
@@ -22676,7 +21915,7 @@ var init_DashboardGrid = __esm({
|
|
|
22676
21915
|
cells,
|
|
22677
21916
|
className
|
|
22678
21917
|
}) => {
|
|
22679
|
-
const { t: _t } = useTranslate();
|
|
21918
|
+
const { t: _t } = hooks.useTranslate();
|
|
22680
21919
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22681
21920
|
Box,
|
|
22682
21921
|
{
|
|
@@ -22704,6 +21943,20 @@ var init_DashboardGrid = __esm({
|
|
|
22704
21943
|
DashboardGrid.displayName = "DashboardGrid";
|
|
22705
21944
|
}
|
|
22706
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
|
+
});
|
|
22707
21960
|
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
22708
21961
|
var init_CurrentPagePathContext = __esm({
|
|
22709
21962
|
"context/CurrentPagePathContext.tsx"() {
|
|
@@ -22729,7 +21982,6 @@ var init_DashboardLayout = __esm({
|
|
|
22729
21982
|
init_Icon();
|
|
22730
21983
|
init_useAuthContext();
|
|
22731
21984
|
init_useEventBus();
|
|
22732
|
-
init_useTranslate();
|
|
22733
21985
|
init_CurrentPagePathContext();
|
|
22734
21986
|
DashboardLayout = ({
|
|
22735
21987
|
appName = "{{APP_TITLE}}",
|
|
@@ -22788,7 +22040,7 @@ var init_DashboardLayout = __esm({
|
|
|
22788
22040
|
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
22789
22041
|
const { signOut: authSignOut } = useAuthContext();
|
|
22790
22042
|
const user = userProp || (null);
|
|
22791
|
-
const { t } = useTranslate();
|
|
22043
|
+
const { t } = hooks.useTranslate();
|
|
22792
22044
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
22793
22045
|
const showSidebar = layoutMode === "sidebar";
|
|
22794
22046
|
const showHeader = layoutMode !== "minimal";
|
|
@@ -23759,7 +23011,7 @@ function DataGrid({
|
|
|
23759
23011
|
look = "dense"
|
|
23760
23012
|
}) {
|
|
23761
23013
|
const eventBus = useEventBus();
|
|
23762
|
-
const { t } = useTranslate();
|
|
23014
|
+
const { t } = hooks.useTranslate();
|
|
23763
23015
|
const [selectedIds, setSelectedIds] = React84.useState(/* @__PURE__ */ new Set());
|
|
23764
23016
|
const [visibleCount, setVisibleCount] = React84.useState(pageSize || Infinity);
|
|
23765
23017
|
const fieldDefs = fields ?? columns ?? [];
|
|
@@ -24074,7 +23326,6 @@ var init_DataGrid = __esm({
|
|
|
24074
23326
|
init_cn();
|
|
24075
23327
|
init_getNestedValue();
|
|
24076
23328
|
init_useEventBus();
|
|
24077
|
-
init_useTranslate();
|
|
24078
23329
|
init_Box();
|
|
24079
23330
|
init_Stack();
|
|
24080
23331
|
init_Typography();
|
|
@@ -24199,7 +23450,7 @@ function DataList({
|
|
|
24199
23450
|
look = "dense"
|
|
24200
23451
|
}) {
|
|
24201
23452
|
const eventBus = useEventBus();
|
|
24202
|
-
const { t } = useTranslate();
|
|
23453
|
+
const { t } = hooks.useTranslate();
|
|
24203
23454
|
const [visibleCount, setVisibleCount] = React84__namespace.default.useState(pageSize || Infinity);
|
|
24204
23455
|
const fieldDefs = fields ?? columns ?? [];
|
|
24205
23456
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -24513,7 +23764,6 @@ var init_DataList = __esm({
|
|
|
24513
23764
|
init_cn();
|
|
24514
23765
|
init_getNestedValue();
|
|
24515
23766
|
init_useEventBus();
|
|
24516
|
-
init_useTranslate();
|
|
24517
23767
|
init_Box();
|
|
24518
23768
|
init_Stack();
|
|
24519
23769
|
init_Typography();
|
|
@@ -24568,7 +23818,6 @@ var init_FileTree = __esm({
|
|
|
24568
23818
|
init_Box();
|
|
24569
23819
|
init_Typography();
|
|
24570
23820
|
init_Icon();
|
|
24571
|
-
init_useTranslate();
|
|
24572
23821
|
TreeNodeItem = ({
|
|
24573
23822
|
node,
|
|
24574
23823
|
depth,
|
|
@@ -24654,7 +23903,7 @@ var init_FileTree = __esm({
|
|
|
24654
23903
|
className,
|
|
24655
23904
|
indent = 16
|
|
24656
23905
|
}) => {
|
|
24657
|
-
const { t } = useTranslate();
|
|
23906
|
+
const { t } = hooks.useTranslate();
|
|
24658
23907
|
if (tree.length === 0) {
|
|
24659
23908
|
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
24660
23909
|
}
|
|
@@ -24698,6 +23947,70 @@ var init_FormField = __esm({
|
|
|
24698
23947
|
FormField.displayName = "FormField";
|
|
24699
23948
|
}
|
|
24700
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
|
+
});
|
|
24701
24014
|
var resolveFilterType, lookStyles6, FilterGroup;
|
|
24702
24015
|
var init_FilterGroup = __esm({
|
|
24703
24016
|
"components/core/molecules/FilterGroup.tsx"() {
|
|
@@ -24711,7 +24024,6 @@ var init_FilterGroup = __esm({
|
|
|
24711
24024
|
init_Icon();
|
|
24712
24025
|
init_useEventBus();
|
|
24713
24026
|
init_useQuerySingleton();
|
|
24714
|
-
init_useTranslate();
|
|
24715
24027
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24716
24028
|
lookStyles6 = {
|
|
24717
24029
|
toolbar: "",
|
|
@@ -24732,7 +24044,7 @@ var init_FilterGroup = __esm({
|
|
|
24732
24044
|
isLoading,
|
|
24733
24045
|
look = "toolbar"
|
|
24734
24046
|
}) => {
|
|
24735
|
-
const { t } = useTranslate();
|
|
24047
|
+
const { t } = hooks.useTranslate();
|
|
24736
24048
|
const eventBus = useEventBus();
|
|
24737
24049
|
const queryState = useQuerySingleton(query);
|
|
24738
24050
|
const [selectedValues, setSelectedValues] = React84.useState(
|
|
@@ -25353,13 +24665,12 @@ var init_RelationSelect = __esm({
|
|
|
25353
24665
|
init_Spinner();
|
|
25354
24666
|
init_Typography();
|
|
25355
24667
|
init_debug();
|
|
25356
|
-
init_useTranslate();
|
|
25357
24668
|
isRelationsDebugEnabled = () => isDebugEnabled();
|
|
25358
24669
|
RelationSelect = ({
|
|
25359
24670
|
value,
|
|
25360
24671
|
onChange,
|
|
25361
24672
|
options = [],
|
|
25362
|
-
placeholder
|
|
24673
|
+
placeholder,
|
|
25363
24674
|
required = false,
|
|
25364
24675
|
disabled = false,
|
|
25365
24676
|
isLoading = false,
|
|
@@ -25370,7 +24681,8 @@ var init_RelationSelect = __esm({
|
|
|
25370
24681
|
searchPlaceholder,
|
|
25371
24682
|
emptyMessage
|
|
25372
24683
|
}) => {
|
|
25373
|
-
const { t } = useTranslate();
|
|
24684
|
+
const { t } = hooks.useTranslate();
|
|
24685
|
+
const resolvedPlaceholder = placeholder ?? t("relationSelect.selectPlaceholder");
|
|
25374
24686
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
25375
24687
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noOptionsFound");
|
|
25376
24688
|
const [isOpen, setIsOpen] = React84.useState(false);
|
|
@@ -25480,7 +24792,7 @@ var init_RelationSelect = __esm({
|
|
|
25480
24792
|
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
25481
24793
|
/* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm" }),
|
|
25482
24794
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { as: "span", children: t("common.loading") })
|
|
25483
|
-
] }) : selectedOption ? selectedOption.label :
|
|
24795
|
+
] }) : selectedOption ? selectedOption.label : resolvedPlaceholder
|
|
25484
24796
|
}
|
|
25485
24797
|
),
|
|
25486
24798
|
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
@@ -25577,7 +24889,6 @@ var init_SearchInput = __esm({
|
|
|
25577
24889
|
init_cn();
|
|
25578
24890
|
init_useEventBus();
|
|
25579
24891
|
init_useQuerySingleton();
|
|
25580
|
-
init_useTranslate();
|
|
25581
24892
|
SearchInput = ({
|
|
25582
24893
|
value,
|
|
25583
24894
|
onSearch,
|
|
@@ -25592,7 +24903,7 @@ var init_SearchInput = __esm({
|
|
|
25592
24903
|
...props
|
|
25593
24904
|
}) => {
|
|
25594
24905
|
const eventBus = useEventBus();
|
|
25595
|
-
const { t } = useTranslate();
|
|
24906
|
+
const { t } = hooks.useTranslate();
|
|
25596
24907
|
const resolvedPlaceholder = placeholder ?? t("common.search");
|
|
25597
24908
|
const queryState = useQuerySingleton(query);
|
|
25598
24909
|
const initialValue = queryState?.search ?? value ?? "";
|
|
@@ -25680,7 +24991,6 @@ var init_SidePanel = __esm({
|
|
|
25680
24991
|
init_Typography();
|
|
25681
24992
|
init_cn();
|
|
25682
24993
|
init_useEventBus();
|
|
25683
|
-
init_useTranslate();
|
|
25684
24994
|
SidePanel = ({
|
|
25685
24995
|
title,
|
|
25686
24996
|
children,
|
|
@@ -25693,7 +25003,7 @@ var init_SidePanel = __esm({
|
|
|
25693
25003
|
closeEvent
|
|
25694
25004
|
}) => {
|
|
25695
25005
|
const eventBus = useEventBus();
|
|
25696
|
-
const { t } = useTranslate();
|
|
25006
|
+
const { t } = hooks.useTranslate();
|
|
25697
25007
|
const handleClose = () => {
|
|
25698
25008
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
25699
25009
|
onClose();
|
|
@@ -25859,7 +25169,6 @@ var init_WizardNavigation = __esm({
|
|
|
25859
25169
|
init_Icon();
|
|
25860
25170
|
init_cn();
|
|
25861
25171
|
init_useEventBus();
|
|
25862
|
-
init_useTranslate();
|
|
25863
25172
|
WizardNavigation = ({
|
|
25864
25173
|
currentStep,
|
|
25865
25174
|
totalSteps,
|
|
@@ -25880,7 +25189,7 @@ var init_WizardNavigation = __esm({
|
|
|
25880
25189
|
className
|
|
25881
25190
|
}) => {
|
|
25882
25191
|
const eventBus = useSafeEventBus4();
|
|
25883
|
-
const { t } = useTranslate();
|
|
25192
|
+
const { t } = hooks.useTranslate();
|
|
25884
25193
|
const resolvedBackLabel = backLabel ?? t("wizard.back");
|
|
25885
25194
|
const resolvedNextLabel = nextLabel ?? t("wizard.next");
|
|
25886
25195
|
const resolvedCompleteLabel = completeLabel ?? t("wizard.complete");
|
|
@@ -25947,7 +25256,6 @@ var init_RepeatableFormSection = __esm({
|
|
|
25947
25256
|
init_Card();
|
|
25948
25257
|
init_Icon();
|
|
25949
25258
|
init_useEventBus();
|
|
25950
|
-
init_useTranslate();
|
|
25951
25259
|
RepeatableFormSection = ({
|
|
25952
25260
|
sectionType,
|
|
25953
25261
|
title,
|
|
@@ -25968,7 +25276,7 @@ var init_RepeatableFormSection = __esm({
|
|
|
25968
25276
|
showAuditInfo = false
|
|
25969
25277
|
}) => {
|
|
25970
25278
|
const eventBus = useEventBus();
|
|
25971
|
-
const { t } = useTranslate();
|
|
25279
|
+
const { t } = hooks.useTranslate();
|
|
25972
25280
|
const resolvedAddLabel = addLabel ?? t("common.add");
|
|
25973
25281
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noItemsAdded");
|
|
25974
25282
|
const safeItems = items ?? [];
|
|
@@ -26078,7 +25386,6 @@ var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
|
26078
25386
|
var init_ViolationAlert = __esm({
|
|
26079
25387
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
26080
25388
|
init_cn();
|
|
26081
|
-
init_useTranslate();
|
|
26082
25389
|
init_Box();
|
|
26083
25390
|
init_Stack();
|
|
26084
25391
|
init_Typography();
|
|
@@ -26104,7 +25411,7 @@ var init_ViolationAlert = __esm({
|
|
|
26104
25411
|
className,
|
|
26105
25412
|
...flatProps
|
|
26106
25413
|
}) => {
|
|
26107
|
-
const { t } = useTranslate();
|
|
25414
|
+
const { t } = hooks.useTranslate();
|
|
26108
25415
|
const resolvedViolation = violation ?? {
|
|
26109
25416
|
law: "",
|
|
26110
25417
|
article: "",
|
|
@@ -26584,7 +25891,6 @@ var init_LineChart = __esm({
|
|
|
26584
25891
|
"use client";
|
|
26585
25892
|
init_cn();
|
|
26586
25893
|
init_atoms2();
|
|
26587
|
-
init_useTranslate();
|
|
26588
25894
|
LineChart2 = ({
|
|
26589
25895
|
data,
|
|
26590
25896
|
width = 400,
|
|
@@ -26596,7 +25902,7 @@ var init_LineChart = __esm({
|
|
|
26596
25902
|
areaColor = "var(--color-primary)",
|
|
26597
25903
|
className
|
|
26598
25904
|
}) => {
|
|
26599
|
-
const { t } = useTranslate();
|
|
25905
|
+
const { t } = hooks.useTranslate();
|
|
26600
25906
|
const gradientId = React84.useId();
|
|
26601
25907
|
const safeData = data ?? [];
|
|
26602
25908
|
const sortedData = React84.useMemo(() => {
|
|
@@ -28540,7 +27846,6 @@ var init_GraphView = __esm({
|
|
|
28540
27846
|
"use client";
|
|
28541
27847
|
init_cn();
|
|
28542
27848
|
init_atoms2();
|
|
28543
|
-
init_useTranslate();
|
|
28544
27849
|
GROUP_COLORS = [
|
|
28545
27850
|
"#3b82f6",
|
|
28546
27851
|
// blue-500
|
|
@@ -28573,7 +27878,7 @@ var init_GraphView = __esm({
|
|
|
28573
27878
|
showLabels = true,
|
|
28574
27879
|
zoomToFit = true
|
|
28575
27880
|
}) => {
|
|
28576
|
-
const { t } = useTranslate();
|
|
27881
|
+
const { t } = hooks.useTranslate();
|
|
28577
27882
|
const containerRef = React84.useRef(null);
|
|
28578
27883
|
const animRef = React84.useRef(0);
|
|
28579
27884
|
const [simNodes, setSimNodes] = React84.useState([]);
|
|
@@ -28866,7 +28171,6 @@ var init_NumberStepper = __esm({
|
|
|
28866
28171
|
init_cn();
|
|
28867
28172
|
init_Icon();
|
|
28868
28173
|
init_useEventBus();
|
|
28869
|
-
init_useTranslate();
|
|
28870
28174
|
sizeStyles10 = {
|
|
28871
28175
|
sm: {
|
|
28872
28176
|
button: "w-7 h-7",
|
|
@@ -28900,7 +28204,7 @@ var init_NumberStepper = __esm({
|
|
|
28900
28204
|
label
|
|
28901
28205
|
}) => {
|
|
28902
28206
|
const eventBus = useSafeEventBus5();
|
|
28903
|
-
const { t } = useTranslate();
|
|
28207
|
+
const { t } = hooks.useTranslate();
|
|
28904
28208
|
const intervalRef = React84.useRef(null);
|
|
28905
28209
|
const timeoutRef = React84.useRef(null);
|
|
28906
28210
|
const isAtMin = min !== void 0 && value <= min;
|
|
@@ -29207,7 +28511,6 @@ var init_UploadDropZone = __esm({
|
|
|
29207
28511
|
init_Icon();
|
|
29208
28512
|
init_Typography();
|
|
29209
28513
|
init_useEventBus();
|
|
29210
|
-
init_useTranslate();
|
|
29211
28514
|
UploadDropZone = ({
|
|
29212
28515
|
accept,
|
|
29213
28516
|
maxSize,
|
|
@@ -29220,7 +28523,7 @@ var init_UploadDropZone = __esm({
|
|
|
29220
28523
|
onFiles,
|
|
29221
28524
|
className
|
|
29222
28525
|
}) => {
|
|
29223
|
-
const { t } = useTranslate();
|
|
28526
|
+
const { t } = hooks.useTranslate();
|
|
29224
28527
|
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
29225
28528
|
const [isDragOver, setIsDragOver] = React84.useState(false);
|
|
29226
28529
|
const [error, setError] = React84.useState(null);
|
|
@@ -29374,7 +28677,6 @@ var init_Lightbox = __esm({
|
|
|
29374
28677
|
init_Icon();
|
|
29375
28678
|
init_cn();
|
|
29376
28679
|
init_useEventBus();
|
|
29377
|
-
init_useTranslate();
|
|
29378
28680
|
Lightbox = ({
|
|
29379
28681
|
images = [],
|
|
29380
28682
|
currentIndex = 0,
|
|
@@ -29389,7 +28691,7 @@ var init_Lightbox = __esm({
|
|
|
29389
28691
|
const [index, setIndex] = React84.useState(currentIndex);
|
|
29390
28692
|
const [touchStartX, setTouchStartX] = React84.useState(null);
|
|
29391
28693
|
const eventBus = useSafeEventBus8();
|
|
29392
|
-
const { t } = useTranslate();
|
|
28694
|
+
const { t } = hooks.useTranslate();
|
|
29393
28695
|
React84.useEffect(() => {
|
|
29394
28696
|
setIndex(currentIndex);
|
|
29395
28697
|
}, [currentIndex]);
|
|
@@ -29627,7 +28929,7 @@ function TableView({
|
|
|
29627
28929
|
dndRoot
|
|
29628
28930
|
}) {
|
|
29629
28931
|
const eventBus = useEventBus();
|
|
29630
|
-
const { t } = useTranslate();
|
|
28932
|
+
const { t } = hooks.useTranslate();
|
|
29631
28933
|
const [visibleCount, setVisibleCount] = React84__namespace.default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29632
28934
|
const [localSelected, setLocalSelected] = React84__namespace.default.useState(/* @__PURE__ */ new Set());
|
|
29633
28935
|
const colDefs = columns ?? fields ?? [];
|
|
@@ -29859,7 +29161,6 @@ var init_TableView = __esm({
|
|
|
29859
29161
|
init_cn();
|
|
29860
29162
|
init_getNestedValue();
|
|
29861
29163
|
init_useEventBus();
|
|
29862
|
-
init_useTranslate();
|
|
29863
29164
|
init_Box();
|
|
29864
29165
|
init_Stack();
|
|
29865
29166
|
init_Typography();
|
|
@@ -30063,7 +29364,6 @@ var init_Meter = __esm({
|
|
|
30063
29364
|
init_LoadingState();
|
|
30064
29365
|
init_ErrorState();
|
|
30065
29366
|
init_useEventBus();
|
|
30066
|
-
init_useTranslate();
|
|
30067
29367
|
DEFAULT_THRESHOLDS = [
|
|
30068
29368
|
{ value: 30, color: "var(--color-error)" },
|
|
30069
29369
|
{ value: 70, color: "var(--color-warning)" },
|
|
@@ -30091,7 +29391,7 @@ var init_Meter = __esm({
|
|
|
30091
29391
|
className
|
|
30092
29392
|
}) => {
|
|
30093
29393
|
const eventBus = useEventBus();
|
|
30094
|
-
const { t } = useTranslate();
|
|
29394
|
+
const { t } = hooks.useTranslate();
|
|
30095
29395
|
const handleAction = React84.useCallback(
|
|
30096
29396
|
(action) => {
|
|
30097
29397
|
if (action.event) {
|
|
@@ -30444,6 +29744,79 @@ var init_SwipeableRow = __esm({
|
|
|
30444
29744
|
SwipeableRow.displayName = "SwipeableRow";
|
|
30445
29745
|
}
|
|
30446
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
|
+
});
|
|
30447
29820
|
function useSafeEventBus10() {
|
|
30448
29821
|
try {
|
|
30449
29822
|
return useEventBus();
|
|
@@ -30554,6 +29927,71 @@ var init_SortableList = __esm({
|
|
|
30554
29927
|
SortableList.displayName = "SortableList";
|
|
30555
29928
|
}
|
|
30556
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
|
+
});
|
|
30557
29995
|
function useSafeEventBus11() {
|
|
30558
29996
|
try {
|
|
30559
29997
|
return useEventBus();
|
|
@@ -31872,7 +31310,6 @@ var init_VoteStack = __esm({
|
|
|
31872
31310
|
init_cn();
|
|
31873
31311
|
init_Icon();
|
|
31874
31312
|
init_useEventBus();
|
|
31875
|
-
init_useTranslate();
|
|
31876
31313
|
sizeStyles12 = {
|
|
31877
31314
|
sm: {
|
|
31878
31315
|
button: "w-7 h-7",
|
|
@@ -31905,7 +31342,7 @@ var init_VoteStack = __esm({
|
|
|
31905
31342
|
const isUp = userVote === "up";
|
|
31906
31343
|
const isDown = userVote === "down";
|
|
31907
31344
|
const eventBus = useEventBus();
|
|
31908
|
-
const { t } = useTranslate();
|
|
31345
|
+
const { t } = hooks.useTranslate();
|
|
31909
31346
|
const handleUp = React84.useCallback(() => {
|
|
31910
31347
|
const next = isUp ? null : "up";
|
|
31911
31348
|
onVote?.(next);
|
|
@@ -32327,7 +31764,6 @@ var init_QrScanner = __esm({
|
|
|
32327
31764
|
init_atoms2();
|
|
32328
31765
|
init_Icon();
|
|
32329
31766
|
init_useEventBus();
|
|
32330
|
-
init_useTranslate();
|
|
32331
31767
|
QrScanner = ({
|
|
32332
31768
|
onScan,
|
|
32333
31769
|
scanEvent,
|
|
@@ -32340,7 +31776,7 @@ var init_QrScanner = __esm({
|
|
|
32340
31776
|
className
|
|
32341
31777
|
}) => {
|
|
32342
31778
|
const eventBus = useEventBus();
|
|
32343
|
-
const { t } = useTranslate();
|
|
31779
|
+
const { t } = hooks.useTranslate();
|
|
32344
31780
|
const videoRef = React84.useRef(null);
|
|
32345
31781
|
const streamRef = React84.useRef(null);
|
|
32346
31782
|
const scanIntervalRef = React84.useRef(null);
|
|
@@ -32554,7 +31990,6 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32554
31990
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32555
31991
|
init_cn();
|
|
32556
31992
|
init_useEventBus();
|
|
32557
|
-
init_useTranslate();
|
|
32558
31993
|
init_Typography();
|
|
32559
31994
|
init_Box();
|
|
32560
31995
|
init_Label();
|
|
@@ -32610,7 +32045,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32610
32045
|
className
|
|
32611
32046
|
}) => {
|
|
32612
32047
|
const eventBus = useEventBus();
|
|
32613
|
-
const { t } = useTranslate();
|
|
32048
|
+
const { t } = hooks.useTranslate();
|
|
32614
32049
|
const hint = constraintHint(constraint, t);
|
|
32615
32050
|
const error = validateSelection(selected, constraint, t);
|
|
32616
32051
|
const inputName = `option-${groupId}`;
|
|
@@ -33034,7 +32469,7 @@ function changeBlockType(block, type) {
|
|
|
33034
32469
|
return { id: block.id, type, content: seed };
|
|
33035
32470
|
}
|
|
33036
32471
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
33037
|
-
const { t } = useTranslate();
|
|
32472
|
+
const { t } = hooks.useTranslate();
|
|
33038
32473
|
const [open, setOpen] = React84.useState(false);
|
|
33039
32474
|
const ref = React84.useRef(null);
|
|
33040
32475
|
React84.useEffect(() => {
|
|
@@ -33191,7 +32626,7 @@ function BlockRow({
|
|
|
33191
32626
|
onInsertAfter,
|
|
33192
32627
|
onChangeType
|
|
33193
32628
|
}) {
|
|
33194
|
-
const { t } = useTranslate();
|
|
32629
|
+
const { t } = hooks.useTranslate();
|
|
33195
32630
|
const setContent = React84.useCallback(
|
|
33196
32631
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
33197
32632
|
[onUpdate]
|
|
@@ -33510,7 +32945,6 @@ var init_RichBlockEditor = __esm({
|
|
|
33510
32945
|
init_Input();
|
|
33511
32946
|
init_Icon();
|
|
33512
32947
|
init_useEventBus();
|
|
33513
|
-
init_useTranslate();
|
|
33514
32948
|
TOOLBAR_ENTRIES = [
|
|
33515
32949
|
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: LucideIcons2.Type },
|
|
33516
32950
|
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: LucideIcons2.Heading1 },
|
|
@@ -33567,7 +33001,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33567
33001
|
showToolbar = true,
|
|
33568
33002
|
className
|
|
33569
33003
|
}) => {
|
|
33570
|
-
const { t } = useTranslate();
|
|
33004
|
+
const { t } = hooks.useTranslate();
|
|
33571
33005
|
const [blocks, setBlocks] = React84.useState(
|
|
33572
33006
|
() => normalizeBlocks(initialBlocks)
|
|
33573
33007
|
);
|
|
@@ -33701,7 +33135,6 @@ var init_ReplyTree = __esm({
|
|
|
33701
33135
|
"use client";
|
|
33702
33136
|
init_cn();
|
|
33703
33137
|
init_useEventBus();
|
|
33704
|
-
init_useTranslate();
|
|
33705
33138
|
init_atoms2();
|
|
33706
33139
|
init_VoteStack();
|
|
33707
33140
|
ReplyTreeNode = ({
|
|
@@ -33721,7 +33154,7 @@ var init_ReplyTree = __esm({
|
|
|
33721
33154
|
showActions
|
|
33722
33155
|
}) => {
|
|
33723
33156
|
const eventBus = useEventBus();
|
|
33724
|
-
const { t } = useTranslate();
|
|
33157
|
+
const { t } = hooks.useTranslate();
|
|
33725
33158
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33726
33159
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33727
33160
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33912,7 +33345,7 @@ var init_ReplyTree = __esm({
|
|
|
33912
33345
|
showActions = true,
|
|
33913
33346
|
className
|
|
33914
33347
|
}) => {
|
|
33915
|
-
const { t } = useTranslate();
|
|
33348
|
+
const { t } = hooks.useTranslate();
|
|
33916
33349
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33917
33350
|
const [collapsedSet, setCollapsedSet] = React84.useState(() => {
|
|
33918
33351
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -34009,7 +33442,6 @@ var init_VersionDiff = __esm({
|
|
|
34009
33442
|
"use client";
|
|
34010
33443
|
init_cn();
|
|
34011
33444
|
init_useEventBus();
|
|
34012
|
-
init_useTranslate();
|
|
34013
33445
|
init_atoms2();
|
|
34014
33446
|
init_Stack();
|
|
34015
33447
|
INLINE_STYLES = {
|
|
@@ -34032,7 +33464,7 @@ var init_VersionDiff = __esm({
|
|
|
34032
33464
|
language,
|
|
34033
33465
|
className
|
|
34034
33466
|
}) => {
|
|
34035
|
-
const { t } = useTranslate();
|
|
33467
|
+
const { t } = hooks.useTranslate();
|
|
34036
33468
|
const eventBus = useEventBus();
|
|
34037
33469
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
34038
33470
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -34325,12 +33757,11 @@ var init_DocBreadcrumb = __esm({
|
|
|
34325
33757
|
init_Stack();
|
|
34326
33758
|
init_Typography();
|
|
34327
33759
|
init_Icon();
|
|
34328
|
-
init_useTranslate();
|
|
34329
33760
|
DocBreadcrumb = ({
|
|
34330
33761
|
items,
|
|
34331
33762
|
className
|
|
34332
33763
|
}) => {
|
|
34333
|
-
const { t } = useTranslate();
|
|
33764
|
+
const { t } = hooks.useTranslate();
|
|
34334
33765
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34335
33766
|
Box,
|
|
34336
33767
|
{
|
|
@@ -34581,7 +34012,7 @@ function DocSearch({
|
|
|
34581
34012
|
onSearch,
|
|
34582
34013
|
className
|
|
34583
34014
|
}) {
|
|
34584
|
-
const { t } = useTranslate();
|
|
34015
|
+
const { t } = hooks.useTranslate();
|
|
34585
34016
|
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34586
34017
|
const [query, setQuery] = React84.useState("");
|
|
34587
34018
|
const [results, setResults] = React84.useState([]);
|
|
@@ -34754,7 +34185,6 @@ var init_DocSearch = __esm({
|
|
|
34754
34185
|
init_Typography();
|
|
34755
34186
|
init_Icon();
|
|
34756
34187
|
init_Input();
|
|
34757
|
-
init_useTranslate();
|
|
34758
34188
|
}
|
|
34759
34189
|
});
|
|
34760
34190
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -34767,7 +34197,6 @@ var init_DocSidebar = __esm({
|
|
|
34767
34197
|
init_Stack();
|
|
34768
34198
|
init_Typography();
|
|
34769
34199
|
init_Icon();
|
|
34770
|
-
init_useTranslate();
|
|
34771
34200
|
DocSidebarCategory = ({ item, depth }) => {
|
|
34772
34201
|
const [expanded, setExpanded] = React84.useState(
|
|
34773
34202
|
() => item.items?.some(function hasActive(child) {
|
|
@@ -34852,7 +34281,7 @@ var init_DocSidebar = __esm({
|
|
|
34852
34281
|
items,
|
|
34853
34282
|
className
|
|
34854
34283
|
}) => {
|
|
34855
|
-
const { t } = useTranslate();
|
|
34284
|
+
const { t } = hooks.useTranslate();
|
|
34856
34285
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34857
34286
|
Box,
|
|
34858
34287
|
{
|
|
@@ -34874,13 +34303,12 @@ var init_DocTOC = __esm({
|
|
|
34874
34303
|
init_Box();
|
|
34875
34304
|
init_Stack();
|
|
34876
34305
|
init_Typography();
|
|
34877
|
-
init_useTranslate();
|
|
34878
34306
|
DocTOC = ({
|
|
34879
34307
|
items,
|
|
34880
34308
|
activeId,
|
|
34881
34309
|
className
|
|
34882
34310
|
}) => {
|
|
34883
|
-
const { t } = useTranslate();
|
|
34311
|
+
const { t } = hooks.useTranslate();
|
|
34884
34312
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34885
34313
|
Box,
|
|
34886
34314
|
{
|
|
@@ -35609,7 +35037,6 @@ var init_Header = __esm({
|
|
|
35609
35037
|
init_Stack();
|
|
35610
35038
|
init_Typography();
|
|
35611
35039
|
init_cn();
|
|
35612
|
-
init_useTranslate();
|
|
35613
35040
|
lookStyles8 = {
|
|
35614
35041
|
"compact-bar": "",
|
|
35615
35042
|
hero: "py-section min-h-[200px] [&_h1]:text-display-1",
|
|
@@ -35638,7 +35065,7 @@ var init_Header = __esm({
|
|
|
35638
35065
|
onLogoClick,
|
|
35639
35066
|
className
|
|
35640
35067
|
}) => {
|
|
35641
|
-
const { t } = useTranslate();
|
|
35068
|
+
const { t } = hooks.useTranslate();
|
|
35642
35069
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
35643
35070
|
const userInitials = userAvatar?.initials || userName?.[0]?.toUpperCase() || "U";
|
|
35644
35071
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -35929,7 +35356,6 @@ var init_Sidebar = __esm({
|
|
|
35929
35356
|
init_Typography();
|
|
35930
35357
|
init_cn();
|
|
35931
35358
|
init_useEventBus();
|
|
35932
|
-
init_useTranslate();
|
|
35933
35359
|
SidebarNavItem = ({ item, collapsed }) => {
|
|
35934
35360
|
const Icon3 = item.icon;
|
|
35935
35361
|
const isActive = item.active ?? item.isActive;
|
|
@@ -35993,7 +35419,7 @@ var init_Sidebar = __esm({
|
|
|
35993
35419
|
className
|
|
35994
35420
|
}) => {
|
|
35995
35421
|
const { emit } = useEventBus();
|
|
35996
|
-
const { t } = useTranslate();
|
|
35422
|
+
const { t } = hooks.useTranslate();
|
|
35997
35423
|
const [internalCollapsed, setInternalCollapsed] = React84.useState(defaultCollapsed);
|
|
35998
35424
|
const collapsed = controlledCollapsed !== void 0 ? controlledCollapsed : internalCollapsed;
|
|
35999
35425
|
const handleToggle = React84.useCallback(() => {
|
|
@@ -36183,7 +35609,6 @@ var init_WizardContainer = __esm({
|
|
|
36183
35609
|
init_Stack();
|
|
36184
35610
|
init_Icon();
|
|
36185
35611
|
init_cn();
|
|
36186
|
-
init_useTranslate();
|
|
36187
35612
|
WizardContainer = ({
|
|
36188
35613
|
steps,
|
|
36189
35614
|
currentStep: controlledStep,
|
|
@@ -36196,7 +35621,7 @@ var init_WizardContainer = __esm({
|
|
|
36196
35621
|
entity: _entity
|
|
36197
35622
|
// Accept but don't use directly yet
|
|
36198
35623
|
}) => {
|
|
36199
|
-
const { t } = useTranslate();
|
|
35624
|
+
const { t } = hooks.useTranslate();
|
|
36200
35625
|
const [internalStep, setInternalStep] = React84.useState(0);
|
|
36201
35626
|
const normalizedControlledStep = (() => {
|
|
36202
35627
|
if (controlledStep === void 0 || controlledStep === null)
|
|
@@ -36757,7 +36182,6 @@ var init_SignaturePad = __esm({
|
|
|
36757
36182
|
init_LoadingState();
|
|
36758
36183
|
init_ErrorState();
|
|
36759
36184
|
init_useEventBus();
|
|
36760
|
-
init_useTranslate();
|
|
36761
36185
|
SignaturePad = ({
|
|
36762
36186
|
label,
|
|
36763
36187
|
helperText,
|
|
@@ -36775,7 +36199,7 @@ var init_SignaturePad = __esm({
|
|
|
36775
36199
|
className
|
|
36776
36200
|
}) => {
|
|
36777
36201
|
const eventBus = useEventBus();
|
|
36778
|
-
const { t } = useTranslate();
|
|
36202
|
+
const { t } = hooks.useTranslate();
|
|
36779
36203
|
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36780
36204
|
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36781
36205
|
const canvasRef = React84.useRef(null);
|
|
@@ -36951,7 +36375,6 @@ var init_DocumentViewer = __esm({
|
|
|
36951
36375
|
init_EmptyState();
|
|
36952
36376
|
init_Tabs();
|
|
36953
36377
|
init_useEventBus();
|
|
36954
|
-
init_useTranslate();
|
|
36955
36378
|
DocumentViewer = ({
|
|
36956
36379
|
title,
|
|
36957
36380
|
src,
|
|
@@ -36971,7 +36394,7 @@ var init_DocumentViewer = __esm({
|
|
|
36971
36394
|
className
|
|
36972
36395
|
}) => {
|
|
36973
36396
|
const eventBus = useEventBus();
|
|
36974
|
-
const { t } = useTranslate();
|
|
36397
|
+
const { t } = hooks.useTranslate();
|
|
36975
36398
|
const [zoom, setZoom] = React84.useState(100);
|
|
36976
36399
|
const [currentPage, setCurrentPage] = React84.useState(propPage ?? 1);
|
|
36977
36400
|
const [activeDocIndex, setActiveDocIndex] = React84.useState(0);
|
|
@@ -37156,7 +36579,6 @@ var init_GraphCanvas = __esm({
|
|
|
37156
36579
|
init_ErrorState();
|
|
37157
36580
|
init_EmptyState();
|
|
37158
36581
|
init_useEventBus();
|
|
37159
|
-
init_useTranslate();
|
|
37160
36582
|
GROUP_COLORS2 = [
|
|
37161
36583
|
"var(--color-primary)",
|
|
37162
36584
|
"var(--color-success)",
|
|
@@ -37183,7 +36605,7 @@ var init_GraphCanvas = __esm({
|
|
|
37183
36605
|
className
|
|
37184
36606
|
}) => {
|
|
37185
36607
|
const eventBus = useEventBus();
|
|
37186
|
-
const { t } = useTranslate();
|
|
36608
|
+
const { t } = hooks.useTranslate();
|
|
37187
36609
|
const canvasRef = React84.useRef(null);
|
|
37188
36610
|
const animRef = React84.useRef(0);
|
|
37189
36611
|
const [zoom, setZoom] = React84.useState(1);
|
|
@@ -37533,7 +36955,7 @@ function DataTable({
|
|
|
37533
36955
|
null
|
|
37534
36956
|
);
|
|
37535
36957
|
const eventBus = useEventBus();
|
|
37536
|
-
const { t } = useTranslate();
|
|
36958
|
+
const { t } = hooks.useTranslate();
|
|
37537
36959
|
const resolvedEmptyTitle = emptyTitle ?? t("table.empty.title");
|
|
37538
36960
|
const resolvedEmptyDescription = emptyDescription ?? t("table.empty.description");
|
|
37539
36961
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
@@ -37894,7 +37316,6 @@ var init_DataTable = __esm({
|
|
|
37894
37316
|
init_molecules2();
|
|
37895
37317
|
init_Icon();
|
|
37896
37318
|
init_useEventBus();
|
|
37897
|
-
init_useTranslate();
|
|
37898
37319
|
init_types3();
|
|
37899
37320
|
lookStyles9 = {
|
|
37900
37321
|
dense: "",
|
|
@@ -37912,7 +37333,7 @@ function DebuggerBoard({
|
|
|
37912
37333
|
className
|
|
37913
37334
|
}) {
|
|
37914
37335
|
const { emit } = useEventBus();
|
|
37915
|
-
const { t } = useTranslate();
|
|
37336
|
+
const { t } = hooks.useTranslate();
|
|
37916
37337
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
37917
37338
|
const [flaggedLines, setFlaggedLines] = React84.useState(/* @__PURE__ */ new Set());
|
|
37918
37339
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -38041,7 +37462,6 @@ var init_DebuggerBoard = __esm({
|
|
|
38041
37462
|
"components/game/organisms/puzzles/debugger/DebuggerBoard.tsx"() {
|
|
38042
37463
|
init_atoms2();
|
|
38043
37464
|
init_useEventBus();
|
|
38044
|
-
init_useTranslate();
|
|
38045
37465
|
DebuggerBoard.displayName = "DebuggerBoard";
|
|
38046
37466
|
}
|
|
38047
37467
|
});
|
|
@@ -38212,7 +37632,6 @@ var init_DetailPanel = __esm({
|
|
|
38212
37632
|
init_cn();
|
|
38213
37633
|
init_getNestedValue();
|
|
38214
37634
|
init_useEventBus();
|
|
38215
|
-
init_useTranslate();
|
|
38216
37635
|
ReactMarkdown2 = React84.lazy(() => import('react-markdown'));
|
|
38217
37636
|
DetailPanel = ({
|
|
38218
37637
|
title: propTitle,
|
|
@@ -38232,7 +37651,7 @@ var init_DetailPanel = __esm({
|
|
|
38232
37651
|
error
|
|
38233
37652
|
}) => {
|
|
38234
37653
|
const eventBus = useEventBus();
|
|
38235
|
-
const { t } = useTranslate();
|
|
37654
|
+
const { t } = hooks.useTranslate();
|
|
38236
37655
|
const isFieldDefArray = (arr) => {
|
|
38237
37656
|
if (!arr || arr.length === 0) return false;
|
|
38238
37657
|
const first = arr[0];
|
|
@@ -38630,7 +38049,7 @@ function CompactView({
|
|
|
38630
38049
|
stateStyles,
|
|
38631
38050
|
className
|
|
38632
38051
|
}) {
|
|
38633
|
-
const { t } = useTranslate();
|
|
38052
|
+
const { t } = hooks.useTranslate();
|
|
38634
38053
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38635
38054
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38636
38055
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38666,7 +38085,7 @@ function FullView({
|
|
|
38666
38085
|
stateStyles,
|
|
38667
38086
|
className
|
|
38668
38087
|
}) {
|
|
38669
|
-
const { t } = useTranslate();
|
|
38088
|
+
const { t } = hooks.useTranslate();
|
|
38670
38089
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38671
38090
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38672
38091
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38791,7 +38210,6 @@ var init_TraitStateViewer = __esm({
|
|
|
38791
38210
|
"components/game/organisms/TraitStateViewer.tsx"() {
|
|
38792
38211
|
"use client";
|
|
38793
38212
|
init_cn();
|
|
38794
|
-
init_useTranslate();
|
|
38795
38213
|
init_Box();
|
|
38796
38214
|
init_Typography();
|
|
38797
38215
|
init_Stack();
|
|
@@ -38813,7 +38231,7 @@ function RuleEditor({
|
|
|
38813
38231
|
disabled = false,
|
|
38814
38232
|
className
|
|
38815
38233
|
}) {
|
|
38816
|
-
const { t } = useTranslate();
|
|
38234
|
+
const { t } = hooks.useTranslate();
|
|
38817
38235
|
const handleWhenChange = React84.useCallback((e) => {
|
|
38818
38236
|
onChange({ ...rule, whenEvent: e.target.value });
|
|
38819
38237
|
}, [rule, onChange]);
|
|
@@ -38850,7 +38268,6 @@ var init_RuleEditor = __esm({
|
|
|
38850
38268
|
"components/game/organisms/puzzles/event-handler/RuleEditor.tsx"() {
|
|
38851
38269
|
init_atoms2();
|
|
38852
38270
|
init_cn();
|
|
38853
|
-
init_useTranslate();
|
|
38854
38271
|
RuleEditor.displayName = "RuleEditor";
|
|
38855
38272
|
}
|
|
38856
38273
|
});
|
|
@@ -38860,7 +38277,7 @@ function ObjectRulePanel({
|
|
|
38860
38277
|
disabled = false,
|
|
38861
38278
|
className
|
|
38862
38279
|
}) {
|
|
38863
|
-
const { t } = useTranslate();
|
|
38280
|
+
const { t } = hooks.useTranslate();
|
|
38864
38281
|
const maxRules = object.maxRules || 3;
|
|
38865
38282
|
const canAdd = object.rules.length < maxRules;
|
|
38866
38283
|
const handleRuleChange = React84.useCallback((index, updatedRule) => {
|
|
@@ -38925,7 +38342,6 @@ var init_ObjectRulePanel = __esm({
|
|
|
38925
38342
|
"components/game/organisms/puzzles/event-handler/ObjectRulePanel.tsx"() {
|
|
38926
38343
|
init_atoms2();
|
|
38927
38344
|
init_cn();
|
|
38928
|
-
init_useTranslate();
|
|
38929
38345
|
init_TraitStateViewer();
|
|
38930
38346
|
init_RuleEditor();
|
|
38931
38347
|
nextRuleId = 1;
|
|
@@ -38938,7 +38354,7 @@ function EventLog({
|
|
|
38938
38354
|
label,
|
|
38939
38355
|
className
|
|
38940
38356
|
}) {
|
|
38941
|
-
const { t } = useTranslate();
|
|
38357
|
+
const { t } = hooks.useTranslate();
|
|
38942
38358
|
const scrollRef = React84.useRef(null);
|
|
38943
38359
|
React84.useEffect(() => {
|
|
38944
38360
|
if (scrollRef.current) {
|
|
@@ -38970,7 +38386,6 @@ var init_EventLog = __esm({
|
|
|
38970
38386
|
"components/game/organisms/puzzles/event-handler/EventLog.tsx"() {
|
|
38971
38387
|
init_atoms2();
|
|
38972
38388
|
init_cn();
|
|
38973
|
-
init_useTranslate();
|
|
38974
38389
|
STATUS_STYLES = {
|
|
38975
38390
|
pending: "text-muted-foreground",
|
|
38976
38391
|
active: "text-primary animate-pulse",
|
|
@@ -38994,7 +38409,7 @@ function EventHandlerBoard({
|
|
|
38994
38409
|
className
|
|
38995
38410
|
}) {
|
|
38996
38411
|
const { emit } = useEventBus();
|
|
38997
|
-
const { t } = useTranslate();
|
|
38412
|
+
const { t } = hooks.useTranslate();
|
|
38998
38413
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
38999
38414
|
const entityObjects = resolved?.objects ?? [];
|
|
39000
38415
|
const [objects, setObjects] = React84.useState(entityObjects);
|
|
@@ -39184,7 +38599,6 @@ var init_EventHandlerBoard = __esm({
|
|
|
39184
38599
|
init_atoms2();
|
|
39185
38600
|
init_cn();
|
|
39186
38601
|
init_useEventBus();
|
|
39187
|
-
init_useTranslate();
|
|
39188
38602
|
init_TraitStateViewer();
|
|
39189
38603
|
init_ObjectRulePanel();
|
|
39190
38604
|
init_EventLog();
|
|
@@ -39254,7 +38668,6 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39254
38668
|
"use client";
|
|
39255
38669
|
init_cn();
|
|
39256
38670
|
init_useEventBus();
|
|
39257
|
-
init_useTranslate();
|
|
39258
38671
|
init_Stack();
|
|
39259
38672
|
init_Typography();
|
|
39260
38673
|
init_FeatureGrid();
|
|
@@ -39270,7 +38683,7 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39270
38683
|
subtitle
|
|
39271
38684
|
}) => {
|
|
39272
38685
|
const eventBus = useEventBus();
|
|
39273
|
-
const { t } = useTranslate();
|
|
38686
|
+
const { t } = hooks.useTranslate();
|
|
39274
38687
|
const items = React84.useMemo(
|
|
39275
38688
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
39276
38689
|
[entity]
|
|
@@ -39437,7 +38850,6 @@ var init_Form = __esm({
|
|
|
39437
38850
|
init_RelationSelect();
|
|
39438
38851
|
init_Alert();
|
|
39439
38852
|
init_useEventBus();
|
|
39440
|
-
init_useTranslate();
|
|
39441
38853
|
init_debug();
|
|
39442
38854
|
layoutStyles = {
|
|
39443
38855
|
vertical: "flex flex-col",
|
|
@@ -39488,7 +38900,7 @@ var init_Form = __esm({
|
|
|
39488
38900
|
...props
|
|
39489
38901
|
}) => {
|
|
39490
38902
|
const eventBus = useEventBus();
|
|
39491
|
-
const { t } = useTranslate();
|
|
38903
|
+
const { t } = hooks.useTranslate();
|
|
39492
38904
|
const resolvedSubmitLabel = submitLabel ?? t("common.save");
|
|
39493
38905
|
const resolvedCancelLabel = cancelLabel ?? t("common.cancel");
|
|
39494
38906
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
@@ -40597,7 +40009,6 @@ var init_HeroOrganism = __esm({
|
|
|
40597
40009
|
"use client";
|
|
40598
40010
|
init_cn();
|
|
40599
40011
|
init_useEventBus();
|
|
40600
|
-
init_useTranslate();
|
|
40601
40012
|
init_HeroSection();
|
|
40602
40013
|
init_LoadingState();
|
|
40603
40014
|
init_ErrorState();
|
|
@@ -40609,7 +40020,7 @@ var init_HeroOrganism = __esm({
|
|
|
40609
40020
|
children
|
|
40610
40021
|
}) => {
|
|
40611
40022
|
const eventBus = useEventBus();
|
|
40612
|
-
const { t } = useTranslate();
|
|
40023
|
+
const { t } = hooks.useTranslate();
|
|
40613
40024
|
const resolved = React84.useMemo(
|
|
40614
40025
|
() => Array.isArray(entity) ? entity[0] : entity && typeof entity === "object" ? entity : void 0,
|
|
40615
40026
|
[entity]
|
|
@@ -40703,7 +40114,6 @@ var LandingPageTemplate;
|
|
|
40703
40114
|
var init_LandingPageTemplate = __esm({
|
|
40704
40115
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
40705
40116
|
init_cn();
|
|
40706
|
-
init_useTranslate();
|
|
40707
40117
|
init_Stack();
|
|
40708
40118
|
init_Box();
|
|
40709
40119
|
init_Container();
|
|
@@ -40721,7 +40131,7 @@ var init_LandingPageTemplate = __esm({
|
|
|
40721
40131
|
featureColumns = 3,
|
|
40722
40132
|
className
|
|
40723
40133
|
}) => {
|
|
40724
|
-
const { t } = useTranslate();
|
|
40134
|
+
const { t } = hooks.useTranslate();
|
|
40725
40135
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
40726
40136
|
if (!resolved) return null;
|
|
40727
40137
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -40903,7 +40313,6 @@ var init_List = __esm({
|
|
|
40903
40313
|
init_cn();
|
|
40904
40314
|
init_getNestedValue();
|
|
40905
40315
|
init_useEventBus();
|
|
40906
|
-
init_useTranslate();
|
|
40907
40316
|
init_types3();
|
|
40908
40317
|
STATUS_STYLES2 = {
|
|
40909
40318
|
complete: {
|
|
@@ -41028,7 +40437,7 @@ var init_List = __esm({
|
|
|
41028
40437
|
entityType
|
|
41029
40438
|
}) => {
|
|
41030
40439
|
const eventBus = useEventBus();
|
|
41031
|
-
const { t } = useTranslate();
|
|
40440
|
+
const { t } = hooks.useTranslate();
|
|
41032
40441
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noData");
|
|
41033
40442
|
const effectiveFieldNames = normalizeFields2(fields).length > 0 ? normalizeFields2(fields) : fieldNames;
|
|
41034
40443
|
const rawItems = React84.useMemo(() => {
|
|
@@ -41375,7 +40784,7 @@ function MasterDetail({
|
|
|
41375
40784
|
className,
|
|
41376
40785
|
...rest
|
|
41377
40786
|
}) {
|
|
41378
|
-
const { t } = useTranslate();
|
|
40787
|
+
const { t } = hooks.useTranslate();
|
|
41379
40788
|
const loading = externalLoading ?? false;
|
|
41380
40789
|
const isLoading = externalIsLoading ?? false;
|
|
41381
40790
|
const error = externalError ?? null;
|
|
@@ -41398,7 +40807,6 @@ var init_MasterDetail = __esm({
|
|
|
41398
40807
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41399
40808
|
"use client";
|
|
41400
40809
|
init_DataTable();
|
|
41401
|
-
init_useTranslate();
|
|
41402
40810
|
MasterDetail.displayName = "MasterDetail";
|
|
41403
40811
|
}
|
|
41404
40812
|
});
|
|
@@ -41407,9 +40815,8 @@ var init_MasterDetailLayout = __esm({
|
|
|
41407
40815
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41408
40816
|
init_cn();
|
|
41409
40817
|
init_Typography();
|
|
41410
|
-
init_useTranslate();
|
|
41411
40818
|
DefaultEmptyDetail = () => {
|
|
41412
|
-
const { t } = useTranslate();
|
|
40819
|
+
const { t } = hooks.useTranslate();
|
|
41413
40820
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
41414
40821
|
Typography,
|
|
41415
40822
|
{
|
|
@@ -41468,7 +40875,6 @@ var init_MediaGallery = __esm({
|
|
|
41468
40875
|
init_ErrorState();
|
|
41469
40876
|
init_EmptyState();
|
|
41470
40877
|
init_useEventBus();
|
|
41471
|
-
init_useTranslate();
|
|
41472
40878
|
COLUMN_CLASSES = {
|
|
41473
40879
|
2: "grid-cols-2",
|
|
41474
40880
|
3: "grid-cols-2 sm:grid-cols-3",
|
|
@@ -41497,7 +40903,7 @@ var init_MediaGallery = __esm({
|
|
|
41497
40903
|
className
|
|
41498
40904
|
}) => {
|
|
41499
40905
|
const eventBus = useEventBus();
|
|
41500
|
-
const { t } = useTranslate();
|
|
40906
|
+
const { t } = hooks.useTranslate();
|
|
41501
40907
|
const [lightboxItem, setLightboxItem] = React84.useState(null);
|
|
41502
40908
|
const closeLightbox = React84.useCallback(() => setLightboxItem(null), []);
|
|
41503
40909
|
useEventListener("UI:LIGHTBOX_CLOSE", closeLightbox);
|
|
@@ -41739,7 +41145,7 @@ function NegotiatorBoard({
|
|
|
41739
41145
|
className
|
|
41740
41146
|
}) {
|
|
41741
41147
|
const { emit } = useEventBus();
|
|
41742
|
-
const { t } = useTranslate();
|
|
41148
|
+
const { t } = hooks.useTranslate();
|
|
41743
41149
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
41744
41150
|
const [history, setHistory] = React84.useState([]);
|
|
41745
41151
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -41869,7 +41275,6 @@ var init_NegotiatorBoard = __esm({
|
|
|
41869
41275
|
"components/game/organisms/puzzles/negotiator/NegotiatorBoard.tsx"() {
|
|
41870
41276
|
init_atoms2();
|
|
41871
41277
|
init_useEventBus();
|
|
41872
|
-
init_useTranslate();
|
|
41873
41278
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
41874
41279
|
}
|
|
41875
41280
|
});
|
|
@@ -41879,7 +41284,6 @@ var init_PricingOrganism = __esm({
|
|
|
41879
41284
|
"use client";
|
|
41880
41285
|
init_cn();
|
|
41881
41286
|
init_useEventBus();
|
|
41882
|
-
init_useTranslate();
|
|
41883
41287
|
init_Stack();
|
|
41884
41288
|
init_Typography();
|
|
41885
41289
|
init_PricingGrid();
|
|
@@ -41894,7 +41298,7 @@ var init_PricingOrganism = __esm({
|
|
|
41894
41298
|
subtitle
|
|
41895
41299
|
}) => {
|
|
41896
41300
|
useEventBus();
|
|
41897
|
-
const { t } = useTranslate();
|
|
41301
|
+
const { t } = hooks.useTranslate();
|
|
41898
41302
|
const items = React84.useMemo(
|
|
41899
41303
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
41900
41304
|
[entity]
|
|
@@ -41929,7 +41333,6 @@ var PricingPageTemplate;
|
|
|
41929
41333
|
var init_PricingPageTemplate = __esm({
|
|
41930
41334
|
"components/marketing/templates/PricingPageTemplate.tsx"() {
|
|
41931
41335
|
init_cn();
|
|
41932
|
-
init_useTranslate();
|
|
41933
41336
|
init_Stack();
|
|
41934
41337
|
init_Box();
|
|
41935
41338
|
init_Container();
|
|
@@ -41942,7 +41345,7 @@ var init_PricingPageTemplate = __esm({
|
|
|
41942
41345
|
entity,
|
|
41943
41346
|
className
|
|
41944
41347
|
}) => {
|
|
41945
|
-
const { t } = useTranslate();
|
|
41348
|
+
const { t } = hooks.useTranslate();
|
|
41946
41349
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
41947
41350
|
if (!resolved) return null;
|
|
41948
41351
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -42444,7 +41847,7 @@ var init_WalkMinimap = __esm({
|
|
|
42444
41847
|
}
|
|
42445
41848
|
});
|
|
42446
41849
|
function TraitsTab({ traits: traits2 }) {
|
|
42447
|
-
const { t } = useTranslate();
|
|
41850
|
+
const { t } = hooks.useTranslate();
|
|
42448
41851
|
if (traits2.length === 0) {
|
|
42449
41852
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42450
41853
|
EmptyState,
|
|
@@ -42512,12 +41915,11 @@ var init_TraitsTab = __esm({
|
|
|
42512
41915
|
init_Typography();
|
|
42513
41916
|
init_Stack();
|
|
42514
41917
|
init_EmptyState();
|
|
42515
|
-
init_useTranslate();
|
|
42516
41918
|
TraitsTab.displayName = "TraitsTab";
|
|
42517
41919
|
}
|
|
42518
41920
|
});
|
|
42519
41921
|
function TicksTab({ ticks: ticks2 }) {
|
|
42520
|
-
const { t } = useTranslate();
|
|
41922
|
+
const { t } = hooks.useTranslate();
|
|
42521
41923
|
const activeTicks = ticks2.filter((t2) => t2.active);
|
|
42522
41924
|
const inactiveTicks = ticks2.filter((t2) => !t2.active);
|
|
42523
41925
|
if (ticks2.length === 0) {
|
|
@@ -42590,12 +41992,11 @@ var init_TicksTab = __esm({
|
|
|
42590
41992
|
init_Stack();
|
|
42591
41993
|
init_Card();
|
|
42592
41994
|
init_EmptyState();
|
|
42593
|
-
init_useTranslate();
|
|
42594
41995
|
TicksTab.displayName = "TicksTab";
|
|
42595
41996
|
}
|
|
42596
41997
|
});
|
|
42597
41998
|
function EntitiesTab({ snapshot }) {
|
|
42598
|
-
const { t } = useTranslate();
|
|
41999
|
+
const { t } = hooks.useTranslate();
|
|
42599
42000
|
if (!snapshot) {
|
|
42600
42001
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42601
42002
|
EmptyState,
|
|
@@ -42664,12 +42065,11 @@ var init_EntitiesTab = __esm({
|
|
|
42664
42065
|
init_Typography();
|
|
42665
42066
|
init_Stack();
|
|
42666
42067
|
init_EmptyState();
|
|
42667
|
-
init_useTranslate();
|
|
42668
42068
|
EntitiesTab.displayName = "EntitiesTab";
|
|
42669
42069
|
}
|
|
42670
42070
|
});
|
|
42671
42071
|
function EventFlowTab({ events: events2 }) {
|
|
42672
|
-
const { t } = useTranslate();
|
|
42072
|
+
const { t } = hooks.useTranslate();
|
|
42673
42073
|
const [filter, setFilter] = React84__namespace.useState("all");
|
|
42674
42074
|
const containerRef = React84__namespace.useRef(null);
|
|
42675
42075
|
const [autoScroll, setAutoScroll] = React84__namespace.useState(true);
|
|
@@ -42781,7 +42181,6 @@ var init_EventFlowTab = __esm({
|
|
|
42781
42181
|
init_Button();
|
|
42782
42182
|
init_Checkbox();
|
|
42783
42183
|
init_EmptyState();
|
|
42784
|
-
init_useTranslate();
|
|
42785
42184
|
TYPE_BADGES = {
|
|
42786
42185
|
trait: { variant: "primary", icon: "\u{1F504}" },
|
|
42787
42186
|
tick: { variant: "warning", icon: "\u23F1\uFE0F" },
|
|
@@ -42794,7 +42193,7 @@ var init_EventFlowTab = __esm({
|
|
|
42794
42193
|
}
|
|
42795
42194
|
});
|
|
42796
42195
|
function GuardsPanel({ guards }) {
|
|
42797
|
-
const { t } = useTranslate();
|
|
42196
|
+
const { t } = hooks.useTranslate();
|
|
42798
42197
|
const [filter, setFilter] = React84__namespace.useState("all");
|
|
42799
42198
|
if (guards.length === 0) {
|
|
42800
42199
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -42876,12 +42275,11 @@ var init_GuardsPanel = __esm({
|
|
|
42876
42275
|
init_ButtonGroup();
|
|
42877
42276
|
init_Button();
|
|
42878
42277
|
init_EmptyState();
|
|
42879
|
-
init_useTranslate();
|
|
42880
42278
|
GuardsPanel.displayName = "GuardsPanel";
|
|
42881
42279
|
}
|
|
42882
42280
|
});
|
|
42883
42281
|
function VerificationTab({ checks, summary }) {
|
|
42884
|
-
const { t } = useTranslate();
|
|
42282
|
+
const { t } = hooks.useTranslate();
|
|
42885
42283
|
if (checks.length === 0) {
|
|
42886
42284
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42887
42285
|
EmptyState,
|
|
@@ -42952,7 +42350,6 @@ var init_VerificationTab = __esm({
|
|
|
42952
42350
|
init_Typography();
|
|
42953
42351
|
init_Stack();
|
|
42954
42352
|
init_EmptyState();
|
|
42955
|
-
init_useTranslate();
|
|
42956
42353
|
STATUS_CONFIG = {
|
|
42957
42354
|
pass: { variant: "success", icon: "\u2713", label: "PASS" },
|
|
42958
42355
|
fail: { variant: "danger", icon: "\u2717", label: "FAIL" },
|
|
@@ -42972,7 +42369,7 @@ function EffectBadge({ effect }) {
|
|
|
42972
42369
|
] });
|
|
42973
42370
|
}
|
|
42974
42371
|
function TransitionTimeline({ transitions }) {
|
|
42975
|
-
const { t } = useTranslate();
|
|
42372
|
+
const { t } = hooks.useTranslate();
|
|
42976
42373
|
const containerRef = React84__namespace.useRef(null);
|
|
42977
42374
|
const [autoScroll, setAutoScroll] = React84__namespace.useState(true);
|
|
42978
42375
|
const [expandedId, setExpandedId] = React84__namespace.useState(null);
|
|
@@ -43088,7 +42485,6 @@ var init_TransitionTimeline = __esm({
|
|
|
43088
42485
|
init_Typography();
|
|
43089
42486
|
init_EmptyState();
|
|
43090
42487
|
init_Checkbox();
|
|
43091
|
-
init_useTranslate();
|
|
43092
42488
|
EFFECT_STATUS_VARIANT = {
|
|
43093
42489
|
executed: "success",
|
|
43094
42490
|
failed: "danger",
|
|
@@ -43104,7 +42500,7 @@ function StatRow({ label, value, variant }) {
|
|
|
43104
42500
|
] });
|
|
43105
42501
|
}
|
|
43106
42502
|
function ServerBridgeTab({ bridge }) {
|
|
43107
|
-
const { t } = useTranslate();
|
|
42503
|
+
const { t } = hooks.useTranslate();
|
|
43108
42504
|
if (!bridge) {
|
|
43109
42505
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43110
42506
|
EmptyState,
|
|
@@ -43178,7 +42574,6 @@ var init_ServerBridgeTab = __esm({
|
|
|
43178
42574
|
init_Stack();
|
|
43179
42575
|
init_Card();
|
|
43180
42576
|
init_EmptyState();
|
|
43181
|
-
init_useTranslate();
|
|
43182
42577
|
ServerBridgeTab.displayName = "ServerBridgeTab";
|
|
43183
42578
|
}
|
|
43184
42579
|
});
|
|
@@ -43257,7 +42652,7 @@ function getAllEvents(traits2) {
|
|
|
43257
42652
|
}
|
|
43258
42653
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43259
42654
|
const eventBus = useEventBus();
|
|
43260
|
-
const { t } = useTranslate();
|
|
42655
|
+
const { t } = hooks.useTranslate();
|
|
43261
42656
|
const [log12, setLog] = React84__namespace.useState([]);
|
|
43262
42657
|
const prevStatesRef = React84__namespace.useRef(/* @__PURE__ */ new Map());
|
|
43263
42658
|
React84__namespace.useEffect(() => {
|
|
@@ -43343,7 +42738,6 @@ var init_EventDispatcherTab = __esm({
|
|
|
43343
42738
|
init_Stack();
|
|
43344
42739
|
init_EmptyState();
|
|
43345
42740
|
init_useEventBus();
|
|
43346
|
-
init_useTranslate();
|
|
43347
42741
|
EventDispatcherTab.displayName = "EventDispatcherTab";
|
|
43348
42742
|
}
|
|
43349
42743
|
});
|
|
@@ -43354,7 +42748,7 @@ var init_RuntimeDebugger = __esm({
|
|
|
43354
42748
|
}
|
|
43355
42749
|
});
|
|
43356
42750
|
function ServerResponseRow({ sr }) {
|
|
43357
|
-
const { t } = useTranslate();
|
|
42751
|
+
const { t } = hooks.useTranslate();
|
|
43358
42752
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43359
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: [
|
|
43360
42754
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -43380,7 +42774,7 @@ function ServerResponseRow({ sr }) {
|
|
|
43380
42774
|
] });
|
|
43381
42775
|
}
|
|
43382
42776
|
function TransitionRow({ trace }) {
|
|
43383
|
-
const { t } = useTranslate();
|
|
42777
|
+
const { t } = hooks.useTranslate();
|
|
43384
42778
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43385
42779
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43386
42780
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43429,7 +42823,7 @@ function VerifyModePanel({
|
|
|
43429
42823
|
serverCount,
|
|
43430
42824
|
localCount
|
|
43431
42825
|
}) {
|
|
43432
|
-
const { t } = useTranslate();
|
|
42826
|
+
const { t } = hooks.useTranslate();
|
|
43433
42827
|
const [expanded, setExpanded] = React84__namespace.useState(true);
|
|
43434
42828
|
const scrollRef = React84__namespace.useRef(null);
|
|
43435
42829
|
const prevCountRef = React84__namespace.useRef(0);
|
|
@@ -43489,7 +42883,7 @@ function RuntimeDebugger({
|
|
|
43489
42883
|
defaultTab,
|
|
43490
42884
|
schema
|
|
43491
42885
|
}) {
|
|
43492
|
-
const { t } = useTranslate();
|
|
42886
|
+
const { t } = hooks.useTranslate();
|
|
43493
42887
|
const [isCollapsed, setIsCollapsed] = React84__namespace.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43494
42888
|
const [isVisible, setIsVisible] = React84__namespace.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43495
42889
|
const debugData = useDebugData();
|
|
@@ -43718,7 +43112,6 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43718
43112
|
init_TransitionTimeline();
|
|
43719
43113
|
init_ServerBridgeTab();
|
|
43720
43114
|
init_EventDispatcherTab();
|
|
43721
|
-
init_useTranslate();
|
|
43722
43115
|
init_RuntimeDebugger();
|
|
43723
43116
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43724
43117
|
}
|
|
@@ -44012,7 +43405,7 @@ function SequencerBoard({
|
|
|
44012
43405
|
className
|
|
44013
43406
|
}) {
|
|
44014
43407
|
const { emit } = useEventBus();
|
|
44015
|
-
const { t } = useTranslate();
|
|
43408
|
+
const { t } = hooks.useTranslate();
|
|
44016
43409
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44017
43410
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
44018
43411
|
const [slots, setSlots] = React84.useState(
|
|
@@ -44205,7 +43598,6 @@ var init_SequencerBoard = __esm({
|
|
|
44205
43598
|
init_atoms2();
|
|
44206
43599
|
init_cn();
|
|
44207
43600
|
init_useEventBus();
|
|
44208
|
-
init_useTranslate();
|
|
44209
43601
|
init_TraitStateViewer();
|
|
44210
43602
|
init_SequenceBar();
|
|
44211
43603
|
init_ActionPalette();
|
|
@@ -44224,7 +43616,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44224
43616
|
"use client";
|
|
44225
43617
|
init_cn();
|
|
44226
43618
|
init_useEventBus();
|
|
44227
|
-
init_useTranslate();
|
|
44228
43619
|
init_Stack();
|
|
44229
43620
|
init_Typography();
|
|
44230
43621
|
init_SimpleGrid();
|
|
@@ -44241,7 +43632,7 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44241
43632
|
subtitle
|
|
44242
43633
|
}) => {
|
|
44243
43634
|
useEventBus();
|
|
44244
|
-
const { t } = useTranslate();
|
|
43635
|
+
const { t } = hooks.useTranslate();
|
|
44245
43636
|
const items = React84.useMemo(
|
|
44246
43637
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
44247
43638
|
[entity]
|
|
@@ -44635,7 +44026,7 @@ function SimulatorBoard({
|
|
|
44635
44026
|
className
|
|
44636
44027
|
}) {
|
|
44637
44028
|
const { emit } = useEventBus();
|
|
44638
|
-
const { t } = useTranslate();
|
|
44029
|
+
const { t } = hooks.useTranslate();
|
|
44639
44030
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44640
44031
|
const parameters = resolved?.parameters ?? [];
|
|
44641
44032
|
const [values, setValues] = React84.useState(() => {
|
|
@@ -44783,7 +44174,6 @@ var init_SimulatorBoard = __esm({
|
|
|
44783
44174
|
"components/game/organisms/puzzles/simulator/SimulatorBoard.tsx"() {
|
|
44784
44175
|
init_atoms2();
|
|
44785
44176
|
init_useEventBus();
|
|
44786
|
-
init_useTranslate();
|
|
44787
44177
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
44788
44178
|
}
|
|
44789
44179
|
});
|
|
@@ -44888,7 +44278,6 @@ var init_StatCard = __esm({
|
|
|
44888
44278
|
init_Button();
|
|
44889
44279
|
init_Sparkline();
|
|
44890
44280
|
init_useEventBus();
|
|
44891
|
-
init_useTranslate();
|
|
44892
44281
|
init_Icon();
|
|
44893
44282
|
StatCard = ({
|
|
44894
44283
|
label: propLabel,
|
|
@@ -44915,7 +44304,7 @@ var init_StatCard = __esm({
|
|
|
44915
44304
|
const Icon3 = typeof iconProp === "string" ? resolveIcon(iconProp) ?? void 0 : iconProp;
|
|
44916
44305
|
const labelToUse = propLabel ?? propTitle;
|
|
44917
44306
|
const eventBus = useEventBus();
|
|
44918
|
-
const { t } = useTranslate();
|
|
44307
|
+
const { t } = hooks.useTranslate();
|
|
44919
44308
|
const handleActionClick = React84__namespace.default.useCallback(() => {
|
|
44920
44309
|
if (action?.event) {
|
|
44921
44310
|
eventBus.emit(`UI:${action.event}`, {});
|
|
@@ -45206,7 +44595,7 @@ function VariablePanel({
|
|
|
45206
44595
|
variables,
|
|
45207
44596
|
className
|
|
45208
44597
|
}) {
|
|
45209
|
-
const { t } = useTranslate();
|
|
44598
|
+
const { t } = hooks.useTranslate();
|
|
45210
44599
|
return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
45211
44600
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: t("stateArchitect.variables", { name: entityName }) }),
|
|
45212
44601
|
variables.map((v) => {
|
|
@@ -45244,7 +44633,6 @@ var init_VariablePanel = __esm({
|
|
|
45244
44633
|
"components/game/organisms/puzzles/state-architect/VariablePanel.tsx"() {
|
|
45245
44634
|
init_atoms2();
|
|
45246
44635
|
init_cn();
|
|
45247
|
-
init_useTranslate();
|
|
45248
44636
|
VariablePanel.displayName = "VariablePanel";
|
|
45249
44637
|
}
|
|
45250
44638
|
});
|
|
@@ -45270,7 +44658,7 @@ function StateArchitectBoard({
|
|
|
45270
44658
|
className
|
|
45271
44659
|
}) {
|
|
45272
44660
|
const { emit } = useEventBus();
|
|
45273
|
-
const { t } = useTranslate();
|
|
44661
|
+
const { t } = hooks.useTranslate();
|
|
45274
44662
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
45275
44663
|
const [transitions, setTransitions] = React84.useState(resolved?.transitions ?? []);
|
|
45276
44664
|
const [headerError, setHeaderError] = React84.useState(false);
|
|
@@ -45561,7 +44949,6 @@ var init_StateArchitectBoard = __esm({
|
|
|
45561
44949
|
init_atoms2();
|
|
45562
44950
|
init_cn();
|
|
45563
44951
|
init_useEventBus();
|
|
45564
|
-
init_useTranslate();
|
|
45565
44952
|
init_TraitStateViewer();
|
|
45566
44953
|
init_StateNode();
|
|
45567
44954
|
init_TransitionArrow();
|
|
@@ -45581,7 +44968,6 @@ var init_StatsOrganism = __esm({
|
|
|
45581
44968
|
"components/marketing/organisms/StatsOrganism.tsx"() {
|
|
45582
44969
|
"use client";
|
|
45583
44970
|
init_cn();
|
|
45584
|
-
init_useTranslate();
|
|
45585
44971
|
init_StatsGrid();
|
|
45586
44972
|
init_LoadingState();
|
|
45587
44973
|
init_ErrorState();
|
|
@@ -45592,7 +44978,7 @@ var init_StatsOrganism = __esm({
|
|
|
45592
44978
|
className,
|
|
45593
44979
|
columns = 3
|
|
45594
44980
|
}) => {
|
|
45595
|
-
const { t } = useTranslate();
|
|
44981
|
+
const { t } = hooks.useTranslate();
|
|
45596
44982
|
const items = React84.useMemo(
|
|
45597
44983
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45598
44984
|
[entity]
|
|
@@ -45624,7 +45010,6 @@ var init_StepFlowOrganism = __esm({
|
|
|
45624
45010
|
"components/core/organisms/StepFlowOrganism.tsx"() {
|
|
45625
45011
|
"use client";
|
|
45626
45012
|
init_cn();
|
|
45627
|
-
init_useTranslate();
|
|
45628
45013
|
init_Stack();
|
|
45629
45014
|
init_Typography();
|
|
45630
45015
|
init_StepFlow();
|
|
@@ -45640,7 +45025,7 @@ var init_StepFlowOrganism = __esm({
|
|
|
45640
45025
|
heading,
|
|
45641
45026
|
subtitle
|
|
45642
45027
|
}) => {
|
|
45643
|
-
const { t } = useTranslate();
|
|
45028
|
+
const { t } = hooks.useTranslate();
|
|
45644
45029
|
const items = React84.useMemo(
|
|
45645
45030
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45646
45031
|
[entity]
|
|
@@ -45794,7 +45179,6 @@ var init_TeamOrganism = __esm({
|
|
|
45794
45179
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
45795
45180
|
"use client";
|
|
45796
45181
|
init_cn();
|
|
45797
|
-
init_useTranslate();
|
|
45798
45182
|
init_Stack();
|
|
45799
45183
|
init_Typography();
|
|
45800
45184
|
init_SimpleGrid();
|
|
@@ -45809,7 +45193,7 @@ var init_TeamOrganism = __esm({
|
|
|
45809
45193
|
heading,
|
|
45810
45194
|
subtitle
|
|
45811
45195
|
}) => {
|
|
45812
|
-
const { t } = useTranslate();
|
|
45196
|
+
const { t } = hooks.useTranslate();
|
|
45813
45197
|
const items = React84.useMemo(
|
|
45814
45198
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45815
45199
|
[entity]
|
|
@@ -45852,7 +45236,6 @@ var init_Timeline = __esm({
|
|
|
45852
45236
|
init_LoadingState();
|
|
45853
45237
|
init_ErrorState();
|
|
45854
45238
|
init_EmptyState();
|
|
45855
|
-
init_useTranslate();
|
|
45856
45239
|
lookStyles10 = {
|
|
45857
45240
|
"vertical-compact": "gap-1 [&>*]:py-1",
|
|
45858
45241
|
"vertical-spacious": "",
|
|
@@ -45892,7 +45275,7 @@ var init_Timeline = __esm({
|
|
|
45892
45275
|
className,
|
|
45893
45276
|
look = "vertical-spacious"
|
|
45894
45277
|
}) => {
|
|
45895
|
-
const { t } = useTranslate();
|
|
45278
|
+
const { t } = hooks.useTranslate();
|
|
45896
45279
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
45897
45280
|
const items = React84__namespace.default.useMemo(() => {
|
|
45898
45281
|
if (propItems) return propItems;
|
|
@@ -47344,7 +46727,7 @@ function UISlotComponent({
|
|
|
47344
46727
|
}) {
|
|
47345
46728
|
const { slots, clear } = context.useUISlots();
|
|
47346
46729
|
const eventBus = useEventBus();
|
|
47347
|
-
const { t } = useTranslate();
|
|
46730
|
+
const { t } = hooks.useTranslate();
|
|
47348
46731
|
const suspenseConfig = React84.useContext(SuspenseConfigContext);
|
|
47349
46732
|
const contained = React84.useContext(SlotContainedContext);
|
|
47350
46733
|
const content = slots[slot];
|
|
@@ -47446,7 +46829,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
47446
46829
|
const [portalRoot, setPortalRoot] = React84.useState(null);
|
|
47447
46830
|
const slotsBus = context.useUISlots();
|
|
47448
46831
|
const eventBus = useEventBus();
|
|
47449
|
-
const { t } = useTranslate();
|
|
46832
|
+
const { t } = hooks.useTranslate();
|
|
47450
46833
|
React84.useEffect(() => {
|
|
47451
46834
|
setPortalRoot(getOrCreatePortalRoot());
|
|
47452
46835
|
}, []);
|
|
@@ -47736,7 +47119,7 @@ function SlotContentRenderer({
|
|
|
47736
47119
|
}
|
|
47737
47120
|
}
|
|
47738
47121
|
const eventBus = useEventBus();
|
|
47739
|
-
const { t } = useTranslate();
|
|
47122
|
+
const { t } = hooks.useTranslate();
|
|
47740
47123
|
const schemaCtx = useEntitySchemaOptional();
|
|
47741
47124
|
let entityDef;
|
|
47742
47125
|
if (typeof entityProp === "string" && entityProp.length > 0 && schemaCtx) {
|
|
@@ -47924,7 +47307,6 @@ var init_UISlotRenderer = __esm({
|
|
|
47924
47307
|
init_Box();
|
|
47925
47308
|
init_Typography();
|
|
47926
47309
|
init_useEventBus();
|
|
47927
|
-
init_useTranslate();
|
|
47928
47310
|
init_slot_types();
|
|
47929
47311
|
init_cn();
|
|
47930
47312
|
init_ErrorBoundary();
|
|
@@ -47980,10 +47362,7 @@ var init_UISlotRenderer = __esm({
|
|
|
47980
47362
|
UISlotRenderer.displayName = "UISlotRenderer";
|
|
47981
47363
|
}
|
|
47982
47364
|
});
|
|
47983
|
-
|
|
47984
|
-
// hooks/index.ts
|
|
47985
|
-
init_useEventBus();
|
|
47986
|
-
var log2 = logger.createLogger("almadar:ui:effects:client-handlers");
|
|
47365
|
+
var log = logger.createLogger("almadar:ui:effects:client-handlers");
|
|
47987
47366
|
function createClientEffectHandlers(options) {
|
|
47988
47367
|
const { eventBus, slotSetter, navigate, notify, callService } = options;
|
|
47989
47368
|
return {
|
|
@@ -47992,10 +47371,10 @@ function createClientEffectHandlers(options) {
|
|
|
47992
47371
|
eventBus.emit(prefixedEvent, payload);
|
|
47993
47372
|
},
|
|
47994
47373
|
persist: async () => {
|
|
47995
|
-
|
|
47374
|
+
log.warn("persist is server-side only, ignored on client");
|
|
47996
47375
|
},
|
|
47997
47376
|
set: () => {
|
|
47998
|
-
|
|
47377
|
+
log.warn("set is server-side only, ignored on client");
|
|
47999
47378
|
},
|
|
48000
47379
|
callService: async (service, action, params) => {
|
|
48001
47380
|
if (callService) return callService(service, action, params);
|
|
@@ -48024,10 +47403,10 @@ function createClientEffectHandlers(options) {
|
|
|
48024
47403
|
slotSetter.addPattern(slot, pattern, props);
|
|
48025
47404
|
},
|
|
48026
47405
|
navigate: navigate ?? ((path) => {
|
|
48027
|
-
|
|
47406
|
+
log.warn("No navigate handler, ignoring", { path });
|
|
48028
47407
|
}),
|
|
48029
47408
|
notify: notify ?? ((msg, type) => {
|
|
48030
|
-
|
|
47409
|
+
log.debug("notify", { type, message: msg });
|
|
48031
47410
|
})
|
|
48032
47411
|
};
|
|
48033
47412
|
}
|
|
@@ -48177,7 +47556,7 @@ function normalizeEventKey(eventKey) {
|
|
|
48177
47556
|
return eventKey.startsWith("UI:") ? eventKey.slice(3) : eventKey;
|
|
48178
47557
|
}
|
|
48179
47558
|
function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
48180
|
-
const eventBus = useEventBus();
|
|
47559
|
+
const eventBus = hooks.useEventBus();
|
|
48181
47560
|
const { entities } = useEntitySchema();
|
|
48182
47561
|
const traitConfigsByName = options?.traitConfigsByName;
|
|
48183
47562
|
const orbitalsByTrait = options?.orbitalsByTrait;
|