@almadar/ui 5.21.10 → 5.21.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +175 -798
- package/dist/avl/index.js +24 -647
- package/dist/components/game/organisms/three/index.cjs +2 -489
- package/dist/components/game/organisms/three/index.js +1 -488
- package/dist/components/index.cjs +191 -2487
- package/dist/components/index.js +47 -2296
- package/dist/providers/index.cjs +160 -767
- package/dist/providers/index.js +21 -628
- package/dist/runtime/index.cjs +599 -1209
- package/dist/runtime/index.js +461 -1071
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as React84 from 'react';
|
|
2
|
-
import React84__default, { createContext,
|
|
3
|
-
import { EventBusContext, useTraitScope, OrbitalProvider, TraitScopeProvider, VerificationProvider } from '@almadar/ui/providers';
|
|
4
|
-
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
2
|
+
import React84__default, { createContext, useMemo, useContext, useRef, useEffect, useCallback, Suspense, useState, useSyncExternalStore, useLayoutEffect, lazy, useId } from 'react';
|
|
5
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
4
|
import { clsx } from 'clsx';
|
|
7
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { EventBusContext, useTraitScope, OrbitalProvider, TraitScopeProvider, VerificationProvider } from '@almadar/ui/providers';
|
|
7
|
+
import { createLogger, isLogLevelEnabled } from '@almadar/logger';
|
|
8
8
|
import * as LucideIcons2 from 'lucide-react';
|
|
9
9
|
import { Loader2, X, List, Printer, ChevronRight, ChevronLeft, GitBranch, Pencil, Eye, Plus, ArrowRight, Trash, Code, FileText, WrapText, Check, Copy, AlertTriangle, Trash2, ZoomOut, ZoomIn, Download, RotateCcw, Menu as Menu$1, Package, Calendar, MoreHorizontal, Image as Image$1, Upload, ArrowLeft, HelpCircle, Search, Type, Heading1, Heading2, Heading3, ListOrdered, Quote, Minus, Eraser, TrendingUp, TrendingDown, AlertCircle, Circle, Clock, CheckCircle2, CheckCircle, XCircle, Play, Pause, SkipForward, Bug, Send, ChevronUp, ChevronDown, Wrench, Tag, User, DollarSign, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
10
10
|
import * as PhosphorIcons from '@phosphor-icons/react';
|
|
11
11
|
import * as TablerIcons from '@tabler/icons-react';
|
|
12
12
|
import * as FaIcons from 'react-icons/fa';
|
|
13
13
|
import { createPortal } from 'react-dom';
|
|
14
|
+
import { useTranslate, useEventBus as useEventBus$1 } from '@almadar/ui/hooks';
|
|
14
15
|
import { evaluate, createMinimalContext } from '@almadar/evaluator';
|
|
15
16
|
import { useUISlots, UISlotProvider } from '@almadar/ui/context';
|
|
16
17
|
import { Link, Outlet, useLocation } from 'react-router-dom';
|
|
@@ -69,6 +70,62 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
69
70
|
};
|
|
70
71
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
71
72
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
73
|
+
function EntitySchemaProvider({
|
|
74
|
+
entities,
|
|
75
|
+
traitLinkedEntities,
|
|
76
|
+
orbitalsByTrait,
|
|
77
|
+
children
|
|
78
|
+
}) {
|
|
79
|
+
const entitiesMap = useMemo(() => {
|
|
80
|
+
const map = /* @__PURE__ */ new Map();
|
|
81
|
+
for (const entity of entities) {
|
|
82
|
+
map.set(entity.name, entity);
|
|
83
|
+
}
|
|
84
|
+
return map;
|
|
85
|
+
}, [entities]);
|
|
86
|
+
const linkedMap = useMemo(() => {
|
|
87
|
+
return traitLinkedEntities ?? /* @__PURE__ */ new Map();
|
|
88
|
+
}, [traitLinkedEntities]);
|
|
89
|
+
const orbitalsMap = useMemo(() => {
|
|
90
|
+
return orbitalsByTrait ?? /* @__PURE__ */ new Map();
|
|
91
|
+
}, [orbitalsByTrait]);
|
|
92
|
+
const contextValue = useMemo(
|
|
93
|
+
() => ({
|
|
94
|
+
entities: entitiesMap,
|
|
95
|
+
traitLinkedEntities: linkedMap,
|
|
96
|
+
orbitalsByTrait: orbitalsMap
|
|
97
|
+
}),
|
|
98
|
+
[entitiesMap, linkedMap, orbitalsMap]
|
|
99
|
+
);
|
|
100
|
+
return /* @__PURE__ */ jsx(EntitySchemaContext.Provider, { value: contextValue, children });
|
|
101
|
+
}
|
|
102
|
+
function useEntitySchema() {
|
|
103
|
+
const context = useContext(EntitySchemaContext);
|
|
104
|
+
if (!context) {
|
|
105
|
+
throw new Error("useEntitySchema must be used within an EntitySchemaProvider");
|
|
106
|
+
}
|
|
107
|
+
return context;
|
|
108
|
+
}
|
|
109
|
+
function useEntityDefinition(entityName) {
|
|
110
|
+
const { entities } = useEntitySchema();
|
|
111
|
+
return entities.get(entityName);
|
|
112
|
+
}
|
|
113
|
+
function useEntitySchemaOptional() {
|
|
114
|
+
return useContext(EntitySchemaContext);
|
|
115
|
+
}
|
|
116
|
+
var EntitySchemaContext;
|
|
117
|
+
var init_EntitySchemaContext = __esm({
|
|
118
|
+
"runtime/EntitySchemaContext.tsx"() {
|
|
119
|
+
EntitySchemaContext = createContext(null);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
function cn(...inputs) {
|
|
123
|
+
return twMerge(clsx(inputs));
|
|
124
|
+
}
|
|
125
|
+
var init_cn = __esm({
|
|
126
|
+
"lib/cn.ts"() {
|
|
127
|
+
}
|
|
128
|
+
});
|
|
72
129
|
|
|
73
130
|
// hooks/useEventBus.ts
|
|
74
131
|
var useEventBus_exports = {};
|
|
@@ -153,11 +210,11 @@ function useEmitEvent() {
|
|
|
153
210
|
[eventBus]
|
|
154
211
|
);
|
|
155
212
|
}
|
|
156
|
-
var
|
|
213
|
+
var log2, subLog, scopeLog, fallbackListeners, fallbackAnyListeners, fallbackEventBus, useEventSubscription, useEventBus_default;
|
|
157
214
|
var init_useEventBus = __esm({
|
|
158
215
|
"hooks/useEventBus.ts"() {
|
|
159
216
|
"use client";
|
|
160
|
-
|
|
217
|
+
log2 = createLogger("almadar:eventbus");
|
|
161
218
|
subLog = createLogger("almadar:eventbus:subscribe");
|
|
162
219
|
scopeLog = createLogger("almadar:ui:trait-scope");
|
|
163
220
|
fallbackListeners = /* @__PURE__ */ new Map();
|
|
@@ -171,13 +228,13 @@ var init_useEventBus = __esm({
|
|
|
171
228
|
source
|
|
172
229
|
};
|
|
173
230
|
const handlers = fallbackListeners.get(type);
|
|
174
|
-
|
|
231
|
+
log2.debug("emit", { type, payloadKeys: payload ? Object.keys(payload).length : 0, listenerCount: (handlers?.size ?? 0) + fallbackAnyListeners.size });
|
|
175
232
|
if (handlers) {
|
|
176
233
|
handlers.forEach((handler) => {
|
|
177
234
|
try {
|
|
178
235
|
handler(event);
|
|
179
236
|
} catch (error) {
|
|
180
|
-
|
|
237
|
+
log2.error("Error in listener", { type, error: error instanceof Error ? error : String(error) });
|
|
181
238
|
}
|
|
182
239
|
});
|
|
183
240
|
}
|
|
@@ -185,7 +242,7 @@ var init_useEventBus = __esm({
|
|
|
185
242
|
try {
|
|
186
243
|
handler(event);
|
|
187
244
|
} catch (error) {
|
|
188
|
-
|
|
245
|
+
log2.error("Error in onAny listener", { type, error: error instanceof Error ? error : String(error) });
|
|
189
246
|
}
|
|
190
247
|
});
|
|
191
248
|
},
|
|
@@ -228,928 +285,6 @@ var init_useEventBus = __esm({
|
|
|
228
285
|
useEventBus_default = useEventBus;
|
|
229
286
|
}
|
|
230
287
|
});
|
|
231
|
-
function getOrCreateStore(query) {
|
|
232
|
-
if (!queryStores.has(query)) {
|
|
233
|
-
queryStores.set(query, {
|
|
234
|
-
search: "",
|
|
235
|
-
filters: {},
|
|
236
|
-
sortField: void 0,
|
|
237
|
-
sortDirection: void 0,
|
|
238
|
-
listeners: /* @__PURE__ */ new Set()
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
return queryStores.get(query);
|
|
242
|
-
}
|
|
243
|
-
function useQuerySingleton(query) {
|
|
244
|
-
const [, forceUpdate] = useState({});
|
|
245
|
-
if (!query) {
|
|
246
|
-
return null;
|
|
247
|
-
}
|
|
248
|
-
const store = useMemo(() => getOrCreateStore(query), [query]);
|
|
249
|
-
useMemo(() => {
|
|
250
|
-
const listener = () => forceUpdate({});
|
|
251
|
-
store.listeners.add(listener);
|
|
252
|
-
return () => {
|
|
253
|
-
store.listeners.delete(listener);
|
|
254
|
-
};
|
|
255
|
-
}, [store]);
|
|
256
|
-
const notifyListeners3 = useCallback(() => {
|
|
257
|
-
store.listeners.forEach((listener) => listener());
|
|
258
|
-
}, [store]);
|
|
259
|
-
const setSearch = useCallback((value) => {
|
|
260
|
-
store.search = value;
|
|
261
|
-
notifyListeners3();
|
|
262
|
-
}, [store, notifyListeners3]);
|
|
263
|
-
const setFilter = useCallback((key, value) => {
|
|
264
|
-
store.filters = { ...store.filters, [key]: value };
|
|
265
|
-
notifyListeners3();
|
|
266
|
-
}, [store, notifyListeners3]);
|
|
267
|
-
const clearFilters = useCallback(() => {
|
|
268
|
-
store.filters = {};
|
|
269
|
-
store.search = "";
|
|
270
|
-
notifyListeners3();
|
|
271
|
-
}, [store, notifyListeners3]);
|
|
272
|
-
const setSort = useCallback((field, direction) => {
|
|
273
|
-
store.sortField = field;
|
|
274
|
-
store.sortDirection = direction;
|
|
275
|
-
notifyListeners3();
|
|
276
|
-
}, [store, notifyListeners3]);
|
|
277
|
-
return {
|
|
278
|
-
search: store.search,
|
|
279
|
-
setSearch,
|
|
280
|
-
filters: store.filters,
|
|
281
|
-
setFilter,
|
|
282
|
-
clearFilters,
|
|
283
|
-
sortField: store.sortField,
|
|
284
|
-
sortDirection: store.sortDirection,
|
|
285
|
-
setSort
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
var queryStores;
|
|
289
|
-
var init_useQuerySingleton = __esm({
|
|
290
|
-
"hooks/useQuerySingleton.ts"() {
|
|
291
|
-
"use client";
|
|
292
|
-
queryStores = /* @__PURE__ */ new Map();
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
// locales/en.json
|
|
297
|
-
var en_default;
|
|
298
|
-
var init_en = __esm({
|
|
299
|
-
"locales/en.json"() {
|
|
300
|
-
en_default = {
|
|
301
|
-
$meta: {
|
|
302
|
-
locale: "en",
|
|
303
|
-
direction: "ltr"
|
|
304
|
-
},
|
|
305
|
-
"common.save": "Save",
|
|
306
|
-
"common.cancel": "Cancel",
|
|
307
|
-
"common.delete": "Delete",
|
|
308
|
-
"common.close": "Close",
|
|
309
|
-
"common.confirm": "Are you sure?",
|
|
310
|
-
"common.create": "Create",
|
|
311
|
-
"common.edit": "Edit",
|
|
312
|
-
"common.view": "View",
|
|
313
|
-
"common.add": "Add",
|
|
314
|
-
"common.remove": "Remove",
|
|
315
|
-
"common.search": "Search...",
|
|
316
|
-
"common.filter": "Filter",
|
|
317
|
-
"common.actions": "Actions",
|
|
318
|
-
"common.yes": "Yes",
|
|
319
|
-
"common.no": "No",
|
|
320
|
-
"common.selected": "selected",
|
|
321
|
-
"common.ok": "OK",
|
|
322
|
-
"common.done": "Done",
|
|
323
|
-
"common.apply": "Apply",
|
|
324
|
-
"common.reset": "Reset",
|
|
325
|
-
"common.refresh": "Refresh",
|
|
326
|
-
"common.export": "Export",
|
|
327
|
-
"common.import": "Import",
|
|
328
|
-
"common.copy": "Copy",
|
|
329
|
-
"common.settings": "Settings",
|
|
330
|
-
"nav.previous": "Previous",
|
|
331
|
-
"nav.next": "Next",
|
|
332
|
-
"nav.back": "Back",
|
|
333
|
-
"nav.home": "Home",
|
|
334
|
-
"form.submit": "Submit",
|
|
335
|
-
"form.saving": "Saving...",
|
|
336
|
-
"form.required": "This field is required",
|
|
337
|
-
"form.invalidEmail": "Enter a valid email address",
|
|
338
|
-
"form.selectPlaceholder": "Select {{label}}...",
|
|
339
|
-
"form.searchPlaceholder": "Search {{entity}}...",
|
|
340
|
-
"table.empty.title": "No items found",
|
|
341
|
-
"table.empty.description": "No items to display.",
|
|
342
|
-
"table.search.placeholder": "Search...",
|
|
343
|
-
"table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
|
|
344
|
-
"table.pagination.page": "Page {{page}} of {{totalPages}}",
|
|
345
|
-
"table.bulk.selected": "{{count}} selected",
|
|
346
|
-
"table.loading": "Loading...",
|
|
347
|
-
"status.loading": "Loading...",
|
|
348
|
-
"status.scheduled": "Scheduled",
|
|
349
|
-
"status.inProgress": "In Progress",
|
|
350
|
-
"status.completed": "Completed",
|
|
351
|
-
"status.cancelled": "Cancelled",
|
|
352
|
-
"status.pending": "Pending",
|
|
353
|
-
"status.active": "Active",
|
|
354
|
-
"status.inactive": "Inactive",
|
|
355
|
-
"status.draft": "Draft",
|
|
356
|
-
"status.archived": "Archived",
|
|
357
|
-
"error.generic": "Something went wrong",
|
|
358
|
-
"error.retry": "Try again",
|
|
359
|
-
"error.notFound": "Not found",
|
|
360
|
-
"error.loadFailed": "Failed to load: {{message}}",
|
|
361
|
-
"error.configMissing": "Configuration not found for: {{id}}",
|
|
362
|
-
"common.loading": "Loading...",
|
|
363
|
-
"common.showMore": "Show More",
|
|
364
|
-
"common.showLess": "Show Less",
|
|
365
|
-
"common.noResults": "No results found",
|
|
366
|
-
"common.saveChanges": "Save Changes",
|
|
367
|
-
"common.retry": "Retry",
|
|
368
|
-
"common.open": "Open",
|
|
369
|
-
"common.back": "Back",
|
|
370
|
-
"empty.noItems": "No items",
|
|
371
|
-
"empty.noData": "No data available",
|
|
372
|
-
"empty.noItemsYet": "No items yet",
|
|
373
|
-
"empty.noItemsAdded": "No items added yet",
|
|
374
|
-
"empty.noOptionsFound": "No options found",
|
|
375
|
-
"list.addItemPlaceholder": "Add new item...",
|
|
376
|
-
"error.occurred": "An error occurred",
|
|
377
|
-
"error.failedToLoad": "Failed to load data",
|
|
378
|
-
"wizard.back": "Back",
|
|
379
|
-
"wizard.next": "Next",
|
|
380
|
-
"wizard.complete": "Complete",
|
|
381
|
-
"wizard.stepOf": "Step {{current}} of {{total}}",
|
|
382
|
-
"pagination.previous": "Previous",
|
|
383
|
-
"pagination.next": "Next",
|
|
384
|
-
"pagination.total": "Total:",
|
|
385
|
-
"pagination.show": "Show:",
|
|
386
|
-
"pagination.goTo": "Go to:",
|
|
387
|
-
"pagination.go": "Go",
|
|
388
|
-
"auth.signIn": "Sign in",
|
|
389
|
-
"auth.signOut": "Sign out",
|
|
390
|
-
"dialog.confirm": "Confirm",
|
|
391
|
-
"dialog.cancel": "Cancel",
|
|
392
|
-
"dialog.loading": "Loading...",
|
|
393
|
-
"dialog.delete.title": "Delete {{item}}?",
|
|
394
|
-
"dialog.delete.message": "This action cannot be undone.",
|
|
395
|
-
"trait.availableActions": "Available Actions",
|
|
396
|
-
"trait.transitions": "Transitions",
|
|
397
|
-
"trait.availableNow": "Available now",
|
|
398
|
-
"book.startReading": "Start Reading",
|
|
399
|
-
"book.tableOfContents": "Table of Contents",
|
|
400
|
-
"book.partNumber": "Part {{number}}",
|
|
401
|
-
"book.print": "Print",
|
|
402
|
-
"book.previousPage": "Previous page",
|
|
403
|
-
"book.nextPage": "Next page",
|
|
404
|
-
"quiz.showAnswer": "Show answer",
|
|
405
|
-
"quiz.hideAnswer": "Hide answer",
|
|
406
|
-
"aria.closeModal": "Close modal",
|
|
407
|
-
"aria.closeToast": "Dismiss toast",
|
|
408
|
-
"aria.closeAlert": "Dismiss alert",
|
|
409
|
-
"aria.removeFilter": "Remove filter",
|
|
410
|
-
"aria.closeDrawer": "Close drawer",
|
|
411
|
-
"aria.closePanel": "Close panel",
|
|
412
|
-
"aria.previousImage": "Previous image",
|
|
413
|
-
"aria.nextImage": "Next image",
|
|
414
|
-
"aria.dismiss": "Dismiss",
|
|
415
|
-
"aria.previousSlide": "Previous slide",
|
|
416
|
-
"aria.nextSlide": "Next slide",
|
|
417
|
-
"aria.previousDays": "Previous days",
|
|
418
|
-
"aria.nextDays": "Next days",
|
|
419
|
-
"aria.decrease": "Decrease",
|
|
420
|
-
"aria.increase": "Increase",
|
|
421
|
-
"aria.breadcrumb": "Breadcrumb",
|
|
422
|
-
"aria.tableOfContents": "Table of contents",
|
|
423
|
-
"aria.docsSidebar": "Documentation sidebar",
|
|
424
|
-
"aria.selectAllRows": "Select all rows",
|
|
425
|
-
"aria.selectAll": "Select all",
|
|
426
|
-
"aria.upvote": "Upvote",
|
|
427
|
-
"aria.downvote": "Downvote",
|
|
428
|
-
"aria.qrScanner": "QR scanner",
|
|
429
|
-
"aria.mockScanDev": "Mock scan (dev)",
|
|
430
|
-
"aria.openMenu": "Open menu",
|
|
431
|
-
"aria.closeMenu": "Close menu",
|
|
432
|
-
"aria.openSidebar": "Open sidebar",
|
|
433
|
-
"sidebar.expand": "Expand sidebar",
|
|
434
|
-
"sidebar.collapse": "Collapse sidebar",
|
|
435
|
-
"sidebar.close": "Close sidebar",
|
|
436
|
-
"loading.items": "Loading items...",
|
|
437
|
-
"card.imageAlt": "Image",
|
|
438
|
-
"canvas.emptyMessage": "No content",
|
|
439
|
-
"canvas.errorTitle": "Canvas error",
|
|
440
|
-
"book.noData": "No data",
|
|
441
|
-
"common.notifications": "Notifications",
|
|
442
|
-
"common.remaining": "{{count}} remaining",
|
|
443
|
-
"error.somethingWentWrong": "Something went wrong",
|
|
444
|
-
"error.loadingItems": "Loading items...",
|
|
445
|
-
"error.noItemsFound": "No items found",
|
|
446
|
-
"debug.noEntityData": "No entity data",
|
|
447
|
-
"debug.noEntities": "No entities",
|
|
448
|
-
"debug.noTicks": "No ticks registered",
|
|
449
|
-
"debug.noActiveTraits": "No active traits",
|
|
450
|
-
"debug.noGuardEvaluations": "No guard evaluations",
|
|
451
|
-
"debug.noBridgeData": "No bridge data",
|
|
452
|
-
"debug.status": "Status",
|
|
453
|
-
"debug.eventsForwarded": "Events Forwarded (Client \u2192 Server)",
|
|
454
|
-
"debug.eventsReceived": "Events Received (Server \u2192 Client)",
|
|
455
|
-
"debug.lastHeartbeat": "Last Heartbeat",
|
|
456
|
-
"debug.noEventsYet": "No events yet",
|
|
457
|
-
"debug.noTransitionsRecorded": "No transitions recorded",
|
|
458
|
-
"debug.noVerificationChecks": "No verification checks yet",
|
|
459
|
-
"display.chartError": "Chart error",
|
|
460
|
-
"display.codeViewerError": "Code viewer error",
|
|
461
|
-
"display.noCode": "No code",
|
|
462
|
-
"display.documentError": "Document error",
|
|
463
|
-
"display.noDocument": "No document",
|
|
464
|
-
"display.graphError": "Graph error",
|
|
465
|
-
"display.noGraphData": "No graph data",
|
|
466
|
-
"display.galleryError": "Gallery error",
|
|
467
|
-
"display.noMedia": "No media",
|
|
468
|
-
"display.meterError": "Meter error",
|
|
469
|
-
"display.signaturePadError": "Signature pad error",
|
|
470
|
-
"display.timelineError": "Timeline error",
|
|
471
|
-
"display.noEvents": "No events",
|
|
472
|
-
"template.features": "Features",
|
|
473
|
-
"template.howItWorks": "How It Works",
|
|
474
|
-
"template.showcase": "Showcase",
|
|
475
|
-
"template.faq": "Frequently Asked Questions",
|
|
476
|
-
"template.ourTeam": "Our Team",
|
|
477
|
-
"template.caseStudies": "Case Studies",
|
|
478
|
-
"richBlockEditor.toolbar.text": "Text",
|
|
479
|
-
"richBlockEditor.toolbar.h1": "H1",
|
|
480
|
-
"richBlockEditor.toolbar.h2": "H2",
|
|
481
|
-
"richBlockEditor.toolbar.h3": "H3",
|
|
482
|
-
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
483
|
-
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
484
|
-
"richBlockEditor.toolbar.quote": "Quote",
|
|
485
|
-
"richBlockEditor.toolbar.code": "Code",
|
|
486
|
-
"richBlockEditor.toolbar.divider": "Divider",
|
|
487
|
-
"richBlockEditor.toolbar.image": "Image",
|
|
488
|
-
"richBlockEditor.blockType.paragraph": "Text",
|
|
489
|
-
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
490
|
-
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
491
|
-
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
492
|
-
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
493
|
-
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
494
|
-
"richBlockEditor.blockType.quote": "Quote",
|
|
495
|
-
"richBlockEditor.blockType.code": "Code",
|
|
496
|
-
"richBlockEditor.blockType.divider": "Divider",
|
|
497
|
-
"richBlockEditor.blockType.image": "Image",
|
|
498
|
-
"richBlockEditor.blockActions": "Block actions",
|
|
499
|
-
"richBlockEditor.duplicate": "Duplicate",
|
|
500
|
-
"richBlockEditor.turnInto": "Turn into",
|
|
501
|
-
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
502
|
-
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
503
|
-
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
504
|
-
"richBlockEditor.placeholder.quote": "Quote",
|
|
505
|
-
"richBlockEditor.placeholder.code": "Enter code",
|
|
506
|
-
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
507
|
-
"richBlockEditor.placeholder.listItem": "List item",
|
|
508
|
-
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
509
|
-
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
510
|
-
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
511
|
-
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
512
|
-
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
513
|
-
"richBlockEditor.aria.codeBlock": "Code block",
|
|
514
|
-
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
515
|
-
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
516
|
-
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
517
|
-
"richBlockEditor.aria.listItem": "List item",
|
|
518
|
-
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
519
|
-
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
520
|
-
"richBlockEditor.embeddedImage": "Embedded image",
|
|
521
|
-
"richBlockEditor.noImageUrl": "No image URL set",
|
|
522
|
-
"richBlockEditor.addItem": "Add item",
|
|
523
|
-
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
524
|
-
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
525
|
-
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
526
|
-
"versionDiff.compare": "Compare",
|
|
527
|
-
"versionDiff.to": "to",
|
|
528
|
-
"versionDiff.beforeRevision": "Before revision",
|
|
529
|
-
"versionDiff.afterRevision": "After revision",
|
|
530
|
-
"versionDiff.switchToInline": "Switch to inline view",
|
|
531
|
-
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
532
|
-
"versionDiff.revert": "Revert",
|
|
533
|
-
"versionDiff.byAuthor": " by {{author}}",
|
|
534
|
-
"violationAlert.actionType.measure": "Corrective Measure",
|
|
535
|
-
"violationAlert.actionType.admin": "Administrative Action",
|
|
536
|
-
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
537
|
-
"violationAlert.fallbackMessage": "Violation",
|
|
538
|
-
"violationAlert.adminLabel": "Admin:",
|
|
539
|
-
"violationAlert.penaltyLabel": "Penalty:",
|
|
540
|
-
"violationAlert.goToField": "Go to field",
|
|
541
|
-
"branchingLogic.title": "Branching logic",
|
|
542
|
-
"branchingLogic.if": "If",
|
|
543
|
-
"branchingLogic.goTo": "go to",
|
|
544
|
-
"branchingLogic.rules": "Rules",
|
|
545
|
-
"branchingLogic.logicGraph": "Logic graph",
|
|
546
|
-
"branchingLogic.addRule": "Add rule",
|
|
547
|
-
"branchingLogic.deleteRule": "Delete rule",
|
|
548
|
-
"branchingLogic.endOfSurvey": "End of survey",
|
|
549
|
-
"branchingLogic.brokenReference": "Broken reference",
|
|
550
|
-
"branchingLogic.selectQuestion": "Select question",
|
|
551
|
-
"branchingLogic.selectTarget": "Select target",
|
|
552
|
-
"branchingLogic.selectValue": "Select value",
|
|
553
|
-
"branchingLogic.addValue": "Add value",
|
|
554
|
-
"branchingLogic.value": "Value",
|
|
555
|
-
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
556
|
-
"branchingLogic.operatorEquals": "equals",
|
|
557
|
-
"branchingLogic.operatorNotEquals": "does not equal",
|
|
558
|
-
"branchingLogic.operatorContains": "contains",
|
|
559
|
-
"branchingLogic.operatorIn": "is one of",
|
|
560
|
-
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
561
|
-
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
562
|
-
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
563
|
-
"branchingLogic.brokenCount": "{{count}} broken",
|
|
564
|
-
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
565
|
-
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
566
|
-
"filterGroup.filters": "Filters",
|
|
567
|
-
"filterGroup.all": "All",
|
|
568
|
-
"filterGroup.clear": "Clear",
|
|
569
|
-
"filterGroup.clearAll": "Clear all",
|
|
570
|
-
"filterGroup.from": "From",
|
|
571
|
-
"filterGroup.to": "To",
|
|
572
|
-
"filterGroup.allOf": "All {{label}}",
|
|
573
|
-
"filterGroup.activeCount": "{{count}} active",
|
|
574
|
-
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
575
|
-
"debug.expression": "Expression",
|
|
576
|
-
"debug.inputs": "Inputs",
|
|
577
|
-
"debug.trait": "Trait",
|
|
578
|
-
"debug.filterAll": "All",
|
|
579
|
-
"debug.filterPassed": "Passed",
|
|
580
|
-
"debug.filterFailed": "Failed",
|
|
581
|
-
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
582
|
-
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
583
|
-
"debug.activeStates": "Active States",
|
|
584
|
-
"debug.availableEvents": "Available Events",
|
|
585
|
-
"debug.noTransitionsFromState": "No transitions from current state",
|
|
586
|
-
"debug.guarded": "guarded",
|
|
587
|
-
"debug.otherEvents": "Other Events (not available from current state)",
|
|
588
|
-
"debug.recentTransitions": "Recent Transitions",
|
|
589
|
-
"debug.transitionsCount": "{{count}} transitions",
|
|
590
|
-
"debug.states": "States",
|
|
591
|
-
"debug.transitions": "Transitions",
|
|
592
|
-
"debug.guards": "Guards",
|
|
593
|
-
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
594
|
-
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
595
|
-
"debug.singleton": "Singleton",
|
|
596
|
-
"debug.singletonsCount": "Singletons ({{count}})",
|
|
597
|
-
"debug.runtimeCount": "Runtime ({{count}})",
|
|
598
|
-
"debug.moreEntities": "+{{count}} more entities",
|
|
599
|
-
"debug.persistent": "Persistent",
|
|
600
|
-
"debug.loadedCount": "{{count}} loaded",
|
|
601
|
-
"debug.notLoaded": "not loaded",
|
|
602
|
-
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
603
|
-
"debug.allCount": "All ({{count}})",
|
|
604
|
-
"debug.autoScroll": "Auto-scroll",
|
|
605
|
-
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
606
|
-
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
607
|
-
"debug.guardLabel": "guard:",
|
|
608
|
-
"debug.effectsCount": "{{count}} effects",
|
|
609
|
-
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
610
|
-
"debug.never": "Never",
|
|
611
|
-
"debug.connected": "Connected",
|
|
612
|
-
"debug.disconnected": "Disconnected",
|
|
613
|
-
"debug.lastError": "Last Error",
|
|
614
|
-
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
615
|
-
"debug.server": "server",
|
|
616
|
-
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
617
|
-
"debug.emitLabel": "emit:",
|
|
618
|
-
"debug.rowsCount": "{{count}} rows",
|
|
619
|
-
"debug.serverResponse": "server response",
|
|
620
|
-
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
621
|
-
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
622
|
-
"debug.failCount": "{{count}} fail",
|
|
623
|
-
"debug.ok": "OK",
|
|
624
|
-
"debug.localCount": "{{count}} local",
|
|
625
|
-
"debug.serverCount": "{{count}} server",
|
|
626
|
-
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
627
|
-
"debug.tabDispatch": "Dispatch",
|
|
628
|
-
"debug.tabVerify": "Verify",
|
|
629
|
-
"debug.tabVerifyAlert": "Verify (!)",
|
|
630
|
-
"debug.tabTimeline": "Timeline",
|
|
631
|
-
"debug.tabBridge": "Bridge",
|
|
632
|
-
"debug.tabTraits": "Traits",
|
|
633
|
-
"debug.tabTicks": "Ticks",
|
|
634
|
-
"debug.tabEntities": "Entities",
|
|
635
|
-
"debug.tabEvents": "Events",
|
|
636
|
-
"debug.tabGuards": "Guards",
|
|
637
|
-
"debug.debugger": "Debugger",
|
|
638
|
-
"debug.failedCount": "{{count}} failed",
|
|
639
|
-
"debug.traitsCount": "{{count}} traits",
|
|
640
|
-
"debug.idle": "Idle",
|
|
641
|
-
"debug.openDebugger": "Open Debugger (`)",
|
|
642
|
-
"debug.kflowVerifier": "KFlow Verifier",
|
|
643
|
-
"debug.allPassing": "All passing",
|
|
644
|
-
"debug.runtime": "Runtime",
|
|
645
|
-
"debug.close": "Close (`)",
|
|
646
|
-
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
647
|
-
"replyTree.expandReplies": "Expand replies",
|
|
648
|
-
"replyTree.collapseReplies": "Collapse replies",
|
|
649
|
-
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
650
|
-
"replyTree.replyTo": "Reply to {{author}}",
|
|
651
|
-
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
652
|
-
"replyTree.reply": "Reply",
|
|
653
|
-
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
654
|
-
"replyTree.flag": "Flag",
|
|
655
|
-
"replyTree.send": "Send",
|
|
656
|
-
"replyTree.continueThread": "Continue thread",
|
|
657
|
-
"replyTree.noRepliesYet": "No replies yet.",
|
|
658
|
-
"signaturePad.label": "Signature",
|
|
659
|
-
"signaturePad.helperText": "Draw your signature above",
|
|
660
|
-
"signaturePad.clear": "Clear",
|
|
661
|
-
"signaturePad.confirm": "Confirm",
|
|
662
|
-
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
663
|
-
"qrScanner.paused": "Paused",
|
|
664
|
-
"qrScanner.resumeScanning": "Resume scanning",
|
|
665
|
-
"qrScanner.pauseScanning": "Pause scanning",
|
|
666
|
-
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
667
|
-
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
668
|
-
"qrScanner.mockScan": "Mock Scan",
|
|
669
|
-
"docSearch.placeholder": "Search documentation...",
|
|
670
|
-
"stateMachine.loading": "Loading state machine\u2026",
|
|
671
|
-
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
672
|
-
"avl.trigger": "Trigger",
|
|
673
|
-
"avl.guard": "Guard",
|
|
674
|
-
"avl.effects": "Effects",
|
|
675
|
-
"avl.props": "Props",
|
|
676
|
-
"avl.entity": "Entity",
|
|
677
|
-
"avl.traits": "Traits",
|
|
678
|
-
"avl.transition": "Transition",
|
|
679
|
-
"avl.onEntity": "on {{entity}}",
|
|
680
|
-
"avl.linkedTo": "linked to {{entity}}",
|
|
681
|
-
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
682
|
-
"avl.zoomIn": "Zoom in",
|
|
683
|
-
"avl.zoomOut": "Zoom out",
|
|
684
|
-
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
685
|
-
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
686
|
-
"avl.noTraitData": "No trait data",
|
|
687
|
-
"avl.computingLayout": "Computing layout...",
|
|
688
|
-
"avl.noStateMachine": "No state machine",
|
|
689
|
-
"avl.listensFor": "listens for {{event}}",
|
|
690
|
-
"avl.emits": "emits {{event}}",
|
|
691
|
-
"avl.pageLayout": "Page Layout",
|
|
692
|
-
"avl.overlaySuffix": "(overlay)",
|
|
693
|
-
"orbPreview.previewBadge": "Preview",
|
|
694
|
-
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
695
|
-
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
696
|
-
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
697
|
-
"orbPreview.noPreview": "No preview available",
|
|
698
|
-
"orbPreview.screensCount": "{{count}} screens",
|
|
699
|
-
"detailView.noTransitionData": "No transition data",
|
|
700
|
-
"orbInspector.required": "req",
|
|
701
|
-
"orbInspector.addField": "Add Field",
|
|
702
|
-
"orbInspector.serviceMode": "Service Mode",
|
|
703
|
-
"orbInspector.standalone": "Standalone",
|
|
704
|
-
"orbInspector.embedded": "Embedded",
|
|
705
|
-
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
706
|
-
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
707
|
-
"orbInspector.addEffect": "Add Effect",
|
|
708
|
-
"orbInspector.guardExpression": "Guard expression",
|
|
709
|
-
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
710
|
-
"orbInspector.tokens": "Tokens",
|
|
711
|
-
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
712
|
-
"orbInspector.variant": "Variant",
|
|
713
|
-
"orbInspector.size": "Size",
|
|
714
|
-
"orbInspector.statesCount": "{{count}} states",
|
|
715
|
-
"orbInspector.onEntity": " on {{entity}}",
|
|
716
|
-
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
717
|
-
"orbInspector.tokenGroup.colors": "Colors",
|
|
718
|
-
"orbInspector.tokenGroup.radii": "Radii",
|
|
719
|
-
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
720
|
-
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
721
|
-
"orbInspector.tab.inspector": "Inspector",
|
|
722
|
-
"orbInspector.tab.styles": "Styles",
|
|
723
|
-
"orbInspector.tab.code": "Code",
|
|
724
|
-
"canvas.goBackToOverview": "Go back to overview",
|
|
725
|
-
"canvas.overview": "Overview",
|
|
726
|
-
"canvas.expanded": "Expanded",
|
|
727
|
-
"canvas.modulesCount": "{{count}} modules",
|
|
728
|
-
"canvas.screensCount": "{{count}} screens",
|
|
729
|
-
"canvas.switchToView": "Switch to {{label}} view",
|
|
730
|
-
"lawReference.viewFullText": "View full law text",
|
|
731
|
-
"statCard.defaultLabel": "Stat",
|
|
732
|
-
"statCard.vsLastPeriod": "vs last period",
|
|
733
|
-
"mediaGallery.upload": "Upload",
|
|
734
|
-
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
735
|
-
"pagination.jumpPlaceholder": "Page",
|
|
736
|
-
"table.selectRow": "Select row {{id}}",
|
|
737
|
-
"card.selectItem": "Select {{item}}",
|
|
738
|
-
"card.itemFallback": "item",
|
|
739
|
-
"fileTree.noFiles": "No files",
|
|
740
|
-
"masterDetail.selectItem": "Select an item to view details",
|
|
741
|
-
"empty.createFirst": "Create your first item to get started.",
|
|
742
|
-
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
743
|
-
"upload.dropFilesHere": "Drop files here",
|
|
744
|
-
"upload.accepted": "Accepted: {{accept}}",
|
|
745
|
-
"upload.maxSize": "Max size: {{size}}",
|
|
746
|
-
"upload.maxFiles": "Up to {{count}} files",
|
|
747
|
-
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
748
|
-
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
749
|
-
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
750
|
-
"optionConstraint.requiredOne": "Required, pick 1",
|
|
751
|
-
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
752
|
-
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
753
|
-
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
754
|
-
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
755
|
-
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
756
|
-
"optionConstraint.optional": "Optional",
|
|
757
|
-
"optionConstraint.outOfStock": "Out of stock",
|
|
758
|
-
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
759
|
-
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
760
|
-
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
761
|
-
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
762
|
-
"stateMachine.pinned": "Pinned",
|
|
763
|
-
"stateMachine.eventCount": "{{count}} events",
|
|
764
|
-
"stateMachine.externalEffects": "External Effects",
|
|
765
|
-
"stateMachine.legend.initial": "Initial",
|
|
766
|
-
"stateMachine.legend.final": "Final",
|
|
767
|
-
"stateMachine.legend.state": "State",
|
|
768
|
-
"stateMachine.legend.multiEvent": "Multi-event",
|
|
769
|
-
"relationSelect.selectPlaceholder": "Select..."
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
});
|
|
773
|
-
function useTranslate() {
|
|
774
|
-
return useContext(I18nContext);
|
|
775
|
-
}
|
|
776
|
-
var _meta, coreMessages, coreLocale, I18nContext;
|
|
777
|
-
var init_useTranslate = __esm({
|
|
778
|
-
"hooks/useTranslate.ts"() {
|
|
779
|
-
"use client";
|
|
780
|
-
init_en();
|
|
781
|
-
({ $meta: _meta, ...coreMessages } = en_default);
|
|
782
|
-
coreLocale = coreMessages;
|
|
783
|
-
I18nContext = createContext({
|
|
784
|
-
locale: "en",
|
|
785
|
-
direction: "ltr",
|
|
786
|
-
t: (key) => coreLocale[key] ?? key
|
|
787
|
-
// core locale fallback
|
|
788
|
-
});
|
|
789
|
-
I18nContext.displayName = "I18nContext";
|
|
790
|
-
I18nContext.Provider;
|
|
791
|
-
}
|
|
792
|
-
});
|
|
793
|
-
|
|
794
|
-
// hooks/useAuthContext.ts
|
|
795
|
-
function useAuthContext() {
|
|
796
|
-
return {
|
|
797
|
-
user: null,
|
|
798
|
-
loading: false,
|
|
799
|
-
signIn: void 0,
|
|
800
|
-
signOut: void 0
|
|
801
|
-
};
|
|
802
|
-
}
|
|
803
|
-
var init_useAuthContext = __esm({
|
|
804
|
-
"hooks/useAuthContext.ts"() {
|
|
805
|
-
}
|
|
806
|
-
});
|
|
807
|
-
function useSwipeGesture(callbacks, options = {}) {
|
|
808
|
-
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
809
|
-
const startX = useRef(0);
|
|
810
|
-
const startY = useRef(0);
|
|
811
|
-
const startTime = useRef(0);
|
|
812
|
-
const currentX = useRef(0);
|
|
813
|
-
const tracking = useRef(false);
|
|
814
|
-
const offsetXRef = useRef(0);
|
|
815
|
-
const isSwipingRef = useRef(false);
|
|
816
|
-
const onPointerDown = useCallback((e) => {
|
|
817
|
-
startX.current = e.clientX;
|
|
818
|
-
startY.current = e.clientY;
|
|
819
|
-
currentX.current = e.clientX;
|
|
820
|
-
startTime.current = Date.now();
|
|
821
|
-
tracking.current = true;
|
|
822
|
-
isSwipingRef.current = false;
|
|
823
|
-
offsetXRef.current = 0;
|
|
824
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
825
|
-
}, []);
|
|
826
|
-
const onPointerMove = useCallback((e) => {
|
|
827
|
-
if (!tracking.current) return;
|
|
828
|
-
if (preventDefault) e.preventDefault();
|
|
829
|
-
currentX.current = e.clientX;
|
|
830
|
-
const dx = e.clientX - startX.current;
|
|
831
|
-
const dy = e.clientY - startY.current;
|
|
832
|
-
if (Math.abs(dx) > 10 && Math.abs(dx) > Math.abs(dy)) {
|
|
833
|
-
isSwipingRef.current = true;
|
|
834
|
-
offsetXRef.current = dx;
|
|
835
|
-
}
|
|
836
|
-
}, [preventDefault]);
|
|
837
|
-
const onPointerUp = useCallback((e) => {
|
|
838
|
-
if (!tracking.current) return;
|
|
839
|
-
tracking.current = false;
|
|
840
|
-
const dx = e.clientX - startX.current;
|
|
841
|
-
const dy = e.clientY - startY.current;
|
|
842
|
-
const elapsed = Date.now() - startTime.current;
|
|
843
|
-
const velocity = Math.abs(dx) / Math.max(elapsed, 1);
|
|
844
|
-
offsetXRef.current = 0;
|
|
845
|
-
isSwipingRef.current = false;
|
|
846
|
-
if (Math.abs(dx) < threshold && velocity < velocityThreshold) return;
|
|
847
|
-
if (Math.abs(dx) > Math.abs(dy)) {
|
|
848
|
-
if (dx < -threshold) callbacks.onSwipeLeft?.();
|
|
849
|
-
else if (dx > threshold) callbacks.onSwipeRight?.();
|
|
850
|
-
} else {
|
|
851
|
-
if (dy < -threshold) callbacks.onSwipeUp?.();
|
|
852
|
-
else if (dy > threshold) callbacks.onSwipeDown?.();
|
|
853
|
-
}
|
|
854
|
-
}, [threshold, velocityThreshold, callbacks]);
|
|
855
|
-
const onPointerCancel = useCallback(() => {
|
|
856
|
-
tracking.current = false;
|
|
857
|
-
offsetXRef.current = 0;
|
|
858
|
-
isSwipingRef.current = false;
|
|
859
|
-
}, []);
|
|
860
|
-
return {
|
|
861
|
-
onPointerDown,
|
|
862
|
-
onPointerMove,
|
|
863
|
-
onPointerUp,
|
|
864
|
-
onPointerCancel,
|
|
865
|
-
offsetX: offsetXRef.current,
|
|
866
|
-
isSwiping: isSwipingRef.current
|
|
867
|
-
};
|
|
868
|
-
}
|
|
869
|
-
var init_useSwipeGesture = __esm({
|
|
870
|
-
"hooks/useSwipeGesture.ts"() {
|
|
871
|
-
"use client";
|
|
872
|
-
}
|
|
873
|
-
});
|
|
874
|
-
function useLongPress(onLongPress, options = {}) {
|
|
875
|
-
const { duration = 500, moveThreshold = 10 } = options;
|
|
876
|
-
const timerRef = useRef(null);
|
|
877
|
-
const startPos = useRef({ x: 0, y: 0 });
|
|
878
|
-
const isPressedRef = useRef(false);
|
|
879
|
-
const firedRef = useRef(false);
|
|
880
|
-
const cancel = useCallback(() => {
|
|
881
|
-
if (timerRef.current) {
|
|
882
|
-
clearTimeout(timerRef.current);
|
|
883
|
-
timerRef.current = null;
|
|
884
|
-
}
|
|
885
|
-
isPressedRef.current = false;
|
|
886
|
-
}, []);
|
|
887
|
-
const onPointerDown = useCallback((e) => {
|
|
888
|
-
firedRef.current = false;
|
|
889
|
-
startPos.current = { x: e.clientX, y: e.clientY };
|
|
890
|
-
isPressedRef.current = true;
|
|
891
|
-
timerRef.current = setTimeout(() => {
|
|
892
|
-
firedRef.current = true;
|
|
893
|
-
isPressedRef.current = false;
|
|
894
|
-
onLongPress();
|
|
895
|
-
}, duration);
|
|
896
|
-
}, [duration, onLongPress]);
|
|
897
|
-
const onPointerMove = useCallback((e) => {
|
|
898
|
-
if (!isPressedRef.current) return;
|
|
899
|
-
const dx = e.clientX - startPos.current.x;
|
|
900
|
-
const dy = e.clientY - startPos.current.y;
|
|
901
|
-
if (Math.sqrt(dx * dx + dy * dy) > moveThreshold) {
|
|
902
|
-
cancel();
|
|
903
|
-
}
|
|
904
|
-
}, [moveThreshold, cancel]);
|
|
905
|
-
const onPointerUp = useCallback(() => {
|
|
906
|
-
cancel();
|
|
907
|
-
}, [cancel]);
|
|
908
|
-
const onPointerCancel = useCallback(() => {
|
|
909
|
-
cancel();
|
|
910
|
-
}, [cancel]);
|
|
911
|
-
return {
|
|
912
|
-
onPointerDown,
|
|
913
|
-
onPointerMove,
|
|
914
|
-
onPointerUp,
|
|
915
|
-
onPointerCancel,
|
|
916
|
-
isPressed: isPressedRef.current
|
|
917
|
-
};
|
|
918
|
-
}
|
|
919
|
-
var init_useLongPress = __esm({
|
|
920
|
-
"hooks/useLongPress.ts"() {
|
|
921
|
-
"use client";
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
function useDragReorder(initialItems, onReorder) {
|
|
925
|
-
const [items, setItems] = useState(initialItems);
|
|
926
|
-
const [dragIndex, setDragIndex] = useState(-1);
|
|
927
|
-
const [dragOverIndex, setDragOverIndex] = useState(-1);
|
|
928
|
-
const itemsRef = useRef(initialItems);
|
|
929
|
-
if (initialItems !== itemsRef.current) {
|
|
930
|
-
itemsRef.current = initialItems;
|
|
931
|
-
setItems(initialItems);
|
|
932
|
-
}
|
|
933
|
-
const isDragging = dragIndex >= 0;
|
|
934
|
-
const handleDragStart = useCallback((index) => (e) => {
|
|
935
|
-
e.preventDefault();
|
|
936
|
-
setDragIndex(index);
|
|
937
|
-
setDragOverIndex(index);
|
|
938
|
-
e.target.setPointerCapture?.(e.pointerId);
|
|
939
|
-
}, []);
|
|
940
|
-
const handleDragMove = useCallback((index) => (e) => {
|
|
941
|
-
if (dragIndex < 0) return;
|
|
942
|
-
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
943
|
-
if (!target) return;
|
|
944
|
-
let el = target;
|
|
945
|
-
while (el && !el.dataset.dragIndex) {
|
|
946
|
-
el = el.parentElement;
|
|
947
|
-
}
|
|
948
|
-
if (el?.dataset.dragIndex) {
|
|
949
|
-
const overIndex = parseInt(el.dataset.dragIndex, 10);
|
|
950
|
-
if (!isNaN(overIndex) && overIndex !== dragOverIndex) {
|
|
951
|
-
setDragOverIndex(overIndex);
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
}, [dragIndex, dragOverIndex]);
|
|
955
|
-
const handleDragEnd = useCallback(() => {
|
|
956
|
-
if (dragIndex >= 0 && dragOverIndex >= 0 && dragIndex !== dragOverIndex) {
|
|
957
|
-
const newItems = [...items];
|
|
958
|
-
const [movedItem] = newItems.splice(dragIndex, 1);
|
|
959
|
-
newItems.splice(dragOverIndex, 0, movedItem);
|
|
960
|
-
setItems(newItems);
|
|
961
|
-
onReorder(dragIndex, dragOverIndex, items[dragIndex]);
|
|
962
|
-
}
|
|
963
|
-
setDragIndex(-1);
|
|
964
|
-
setDragOverIndex(-1);
|
|
965
|
-
}, [dragIndex, dragOverIndex, items, onReorder]);
|
|
966
|
-
const getDragHandleProps = useCallback((index) => ({
|
|
967
|
-
onPointerDown: handleDragStart(index),
|
|
968
|
-
style: { cursor: "grab", touchAction: "none" },
|
|
969
|
-
"aria-grabbed": dragIndex === index,
|
|
970
|
-
role: "button"
|
|
971
|
-
}), [handleDragStart, dragIndex]);
|
|
972
|
-
const getItemProps = useCallback((index) => ({
|
|
973
|
-
onPointerMove: handleDragMove(index),
|
|
974
|
-
onPointerUp: handleDragEnd,
|
|
975
|
-
"aria-dropeffect": "move",
|
|
976
|
-
"data-drag-index": String(index),
|
|
977
|
-
style: {
|
|
978
|
-
opacity: dragIndex === index ? 0.5 : 1,
|
|
979
|
-
transition: isDragging ? "transform 150ms ease" : void 0,
|
|
980
|
-
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
|
|
981
|
-
}
|
|
982
|
-
}), [handleDragMove, handleDragEnd, dragIndex, dragOverIndex, isDragging]);
|
|
983
|
-
return {
|
|
984
|
-
items,
|
|
985
|
-
dragIndex,
|
|
986
|
-
dragOverIndex,
|
|
987
|
-
isDragging,
|
|
988
|
-
getDragHandleProps,
|
|
989
|
-
getItemProps
|
|
990
|
-
};
|
|
991
|
-
}
|
|
992
|
-
var init_useDragReorder = __esm({
|
|
993
|
-
"hooks/useDragReorder.ts"() {
|
|
994
|
-
"use client";
|
|
995
|
-
}
|
|
996
|
-
});
|
|
997
|
-
function useInfiniteScroll(onLoadMore, options = {}) {
|
|
998
|
-
const { rootMargin = "200px", hasMore = true, isLoading = false } = options;
|
|
999
|
-
const observerRef = useRef(null);
|
|
1000
|
-
const callbackRef = useRef(onLoadMore);
|
|
1001
|
-
callbackRef.current = onLoadMore;
|
|
1002
|
-
const hasMoreRef = useRef(hasMore);
|
|
1003
|
-
hasMoreRef.current = hasMore;
|
|
1004
|
-
const isLoadingRef = useRef(isLoading);
|
|
1005
|
-
isLoadingRef.current = isLoading;
|
|
1006
|
-
useEffect(() => {
|
|
1007
|
-
return () => {
|
|
1008
|
-
observerRef.current?.disconnect();
|
|
1009
|
-
};
|
|
1010
|
-
}, []);
|
|
1011
|
-
const sentinelRef = useCallback((node) => {
|
|
1012
|
-
observerRef.current?.disconnect();
|
|
1013
|
-
if (!node) return;
|
|
1014
|
-
observerRef.current = new IntersectionObserver(
|
|
1015
|
-
(entries) => {
|
|
1016
|
-
const entry = entries[0];
|
|
1017
|
-
if (entry.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
|
|
1018
|
-
callbackRef.current();
|
|
1019
|
-
}
|
|
1020
|
-
},
|
|
1021
|
-
{ rootMargin }
|
|
1022
|
-
);
|
|
1023
|
-
observerRef.current.observe(node);
|
|
1024
|
-
}, [rootMargin]);
|
|
1025
|
-
return { sentinelRef };
|
|
1026
|
-
}
|
|
1027
|
-
var init_useInfiniteScroll = __esm({
|
|
1028
|
-
"hooks/useInfiniteScroll.ts"() {
|
|
1029
|
-
"use client";
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
|
-
function usePullToRefresh(onRefresh, options = {}) {
|
|
1033
|
-
const { threshold = 60, maxPull = 120 } = options;
|
|
1034
|
-
const [pullDistance, setPullDistance] = useState(0);
|
|
1035
|
-
const [isPulling, setIsPulling] = useState(false);
|
|
1036
|
-
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
1037
|
-
const startY = useRef(0);
|
|
1038
|
-
const scrollTopRef = useRef(0);
|
|
1039
|
-
const onTouchStart = useCallback((e) => {
|
|
1040
|
-
const container = e.currentTarget;
|
|
1041
|
-
scrollTopRef.current = container.scrollTop;
|
|
1042
|
-
if (scrollTopRef.current <= 0) {
|
|
1043
|
-
startY.current = e.touches[0].clientY;
|
|
1044
|
-
setIsPulling(true);
|
|
1045
|
-
}
|
|
1046
|
-
}, []);
|
|
1047
|
-
const onTouchMove = useCallback((e) => {
|
|
1048
|
-
if (!isPulling || isRefreshing) return;
|
|
1049
|
-
const container = e.currentTarget;
|
|
1050
|
-
if (container.scrollTop > 0) {
|
|
1051
|
-
setPullDistance(0);
|
|
1052
|
-
return;
|
|
1053
|
-
}
|
|
1054
|
-
const dy = e.touches[0].clientY - startY.current;
|
|
1055
|
-
if (dy > 0) {
|
|
1056
|
-
const distance = Math.min(dy * 0.5, maxPull);
|
|
1057
|
-
setPullDistance(distance);
|
|
1058
|
-
}
|
|
1059
|
-
}, [isPulling, isRefreshing, maxPull]);
|
|
1060
|
-
const onTouchEnd = useCallback(() => {
|
|
1061
|
-
if (!isPulling) return;
|
|
1062
|
-
setIsPulling(false);
|
|
1063
|
-
if (pullDistance >= threshold && !isRefreshing) {
|
|
1064
|
-
setIsRefreshing(true);
|
|
1065
|
-
setPullDistance(threshold);
|
|
1066
|
-
onRefresh();
|
|
1067
|
-
} else {
|
|
1068
|
-
setPullDistance(0);
|
|
1069
|
-
}
|
|
1070
|
-
}, [isPulling, pullDistance, threshold, isRefreshing, onRefresh]);
|
|
1071
|
-
const endRefresh = useCallback(() => {
|
|
1072
|
-
setIsRefreshing(false);
|
|
1073
|
-
setPullDistance(0);
|
|
1074
|
-
}, []);
|
|
1075
|
-
const containerProps = {
|
|
1076
|
-
onTouchStart,
|
|
1077
|
-
onTouchMove,
|
|
1078
|
-
onTouchEnd,
|
|
1079
|
-
style: {
|
|
1080
|
-
transform: pullDistance > 0 ? `translateY(${pullDistance}px)` : void 0,
|
|
1081
|
-
transition: isPulling ? "none" : "transform 300ms ease-out"
|
|
1082
|
-
}
|
|
1083
|
-
};
|
|
1084
|
-
return {
|
|
1085
|
-
pullDistance,
|
|
1086
|
-
isPulling,
|
|
1087
|
-
isRefreshing,
|
|
1088
|
-
containerProps,
|
|
1089
|
-
endRefresh
|
|
1090
|
-
};
|
|
1091
|
-
}
|
|
1092
|
-
var init_usePullToRefresh = __esm({
|
|
1093
|
-
"hooks/usePullToRefresh.ts"() {
|
|
1094
|
-
"use client";
|
|
1095
|
-
}
|
|
1096
|
-
});
|
|
1097
|
-
function EntitySchemaProvider({
|
|
1098
|
-
entities,
|
|
1099
|
-
traitLinkedEntities,
|
|
1100
|
-
orbitalsByTrait,
|
|
1101
|
-
children
|
|
1102
|
-
}) {
|
|
1103
|
-
const entitiesMap = useMemo(() => {
|
|
1104
|
-
const map = /* @__PURE__ */ new Map();
|
|
1105
|
-
for (const entity of entities) {
|
|
1106
|
-
map.set(entity.name, entity);
|
|
1107
|
-
}
|
|
1108
|
-
return map;
|
|
1109
|
-
}, [entities]);
|
|
1110
|
-
const linkedMap = useMemo(() => {
|
|
1111
|
-
return traitLinkedEntities ?? /* @__PURE__ */ new Map();
|
|
1112
|
-
}, [traitLinkedEntities]);
|
|
1113
|
-
const orbitalsMap = useMemo(() => {
|
|
1114
|
-
return orbitalsByTrait ?? /* @__PURE__ */ new Map();
|
|
1115
|
-
}, [orbitalsByTrait]);
|
|
1116
|
-
const contextValue = useMemo(
|
|
1117
|
-
() => ({
|
|
1118
|
-
entities: entitiesMap,
|
|
1119
|
-
traitLinkedEntities: linkedMap,
|
|
1120
|
-
orbitalsByTrait: orbitalsMap
|
|
1121
|
-
}),
|
|
1122
|
-
[entitiesMap, linkedMap, orbitalsMap]
|
|
1123
|
-
);
|
|
1124
|
-
return /* @__PURE__ */ jsx(EntitySchemaContext.Provider, { value: contextValue, children });
|
|
1125
|
-
}
|
|
1126
|
-
function useEntitySchema() {
|
|
1127
|
-
const context = useContext(EntitySchemaContext);
|
|
1128
|
-
if (!context) {
|
|
1129
|
-
throw new Error("useEntitySchema must be used within an EntitySchemaProvider");
|
|
1130
|
-
}
|
|
1131
|
-
return context;
|
|
1132
|
-
}
|
|
1133
|
-
function useEntityDefinition(entityName) {
|
|
1134
|
-
const { entities } = useEntitySchema();
|
|
1135
|
-
return entities.get(entityName);
|
|
1136
|
-
}
|
|
1137
|
-
function useEntitySchemaOptional() {
|
|
1138
|
-
return useContext(EntitySchemaContext);
|
|
1139
|
-
}
|
|
1140
|
-
var EntitySchemaContext;
|
|
1141
|
-
var init_EntitySchemaContext = __esm({
|
|
1142
|
-
"runtime/EntitySchemaContext.tsx"() {
|
|
1143
|
-
EntitySchemaContext = createContext(null);
|
|
1144
|
-
}
|
|
1145
|
-
});
|
|
1146
|
-
function cn(...inputs) {
|
|
1147
|
-
return twMerge(clsx(inputs));
|
|
1148
|
-
}
|
|
1149
|
-
var init_cn = __esm({
|
|
1150
|
-
"lib/cn.ts"() {
|
|
1151
|
-
}
|
|
1152
|
-
});
|
|
1153
288
|
var paddingStyles, paddingXStyles, paddingYStyles, marginStyles, marginXStyles, marginYStyles, bgStyles, roundedStyles, shadowStyles, displayStyles, overflowStyles, positionStyles, Box;
|
|
1154
289
|
var init_Box = __esm({
|
|
1155
290
|
"components/core/atoms/Box.tsx"() {
|
|
@@ -2521,7 +1656,6 @@ var init_Modal = __esm({
|
|
|
2521
1656
|
init_Overlay();
|
|
2522
1657
|
init_cn();
|
|
2523
1658
|
init_useEventBus();
|
|
2524
|
-
init_useTranslate();
|
|
2525
1659
|
sizeClasses2 = {
|
|
2526
1660
|
sm: "max-w-md",
|
|
2527
1661
|
md: "max-w-2xl",
|
|
@@ -2743,7 +1877,6 @@ var init_Drawer = __esm({
|
|
|
2743
1877
|
init_Overlay();
|
|
2744
1878
|
init_cn();
|
|
2745
1879
|
init_useEventBus();
|
|
2746
|
-
init_useTranslate();
|
|
2747
1880
|
sizeWidths = {
|
|
2748
1881
|
sm: "w-full sm:w-80",
|
|
2749
1882
|
// 320px
|
|
@@ -3016,7 +2149,6 @@ var init_Toast = __esm({
|
|
|
3016
2149
|
init_Badge();
|
|
3017
2150
|
init_cn();
|
|
3018
2151
|
init_useEventBus();
|
|
3019
|
-
init_useTranslate();
|
|
3020
2152
|
variantClasses = {
|
|
3021
2153
|
success: "bg-card border-[length:var(--border-width)] border-success",
|
|
3022
2154
|
error: "bg-card border-[length:var(--border-width)] border-error",
|
|
@@ -3978,7 +3110,6 @@ var init_Input = __esm({
|
|
|
3978
3110
|
"components/core/atoms/Input.tsx"() {
|
|
3979
3111
|
init_cn();
|
|
3980
3112
|
init_Icon();
|
|
3981
|
-
init_useTranslate();
|
|
3982
3113
|
Input = React84__default.forwardRef(
|
|
3983
3114
|
({
|
|
3984
3115
|
className,
|
|
@@ -4362,7 +3493,6 @@ var init_FilterPill = __esm({
|
|
|
4362
3493
|
"components/core/atoms/FilterPill.tsx"() {
|
|
4363
3494
|
init_cn();
|
|
4364
3495
|
init_useEventBus();
|
|
4365
|
-
init_useTranslate();
|
|
4366
3496
|
init_Icon();
|
|
4367
3497
|
variantStyles5 = {
|
|
4368
3498
|
default: [
|
|
@@ -5749,7 +4879,6 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5749
4879
|
init_Typography();
|
|
5750
4880
|
init_Divider();
|
|
5751
4881
|
init_cn();
|
|
5752
|
-
init_useTranslate();
|
|
5753
4882
|
positionStyles2 = {
|
|
5754
4883
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5755
4884
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -6360,6 +5489,41 @@ var init_AnimatedCounter = __esm({
|
|
|
6360
5489
|
AnimatedCounter.displayName = "AnimatedCounter";
|
|
6361
5490
|
}
|
|
6362
5491
|
});
|
|
5492
|
+
function useInfiniteScroll(onLoadMore, options = {}) {
|
|
5493
|
+
const { rootMargin = "200px", hasMore = true, isLoading = false } = options;
|
|
5494
|
+
const observerRef = useRef(null);
|
|
5495
|
+
const callbackRef = useRef(onLoadMore);
|
|
5496
|
+
callbackRef.current = onLoadMore;
|
|
5497
|
+
const hasMoreRef = useRef(hasMore);
|
|
5498
|
+
hasMoreRef.current = hasMore;
|
|
5499
|
+
const isLoadingRef = useRef(isLoading);
|
|
5500
|
+
isLoadingRef.current = isLoading;
|
|
5501
|
+
useEffect(() => {
|
|
5502
|
+
return () => {
|
|
5503
|
+
observerRef.current?.disconnect();
|
|
5504
|
+
};
|
|
5505
|
+
}, []);
|
|
5506
|
+
const sentinelRef = useCallback((node) => {
|
|
5507
|
+
observerRef.current?.disconnect();
|
|
5508
|
+
if (!node) return;
|
|
5509
|
+
observerRef.current = new IntersectionObserver(
|
|
5510
|
+
(entries) => {
|
|
5511
|
+
const entry = entries[0];
|
|
5512
|
+
if (entry.isIntersecting && hasMoreRef.current && !isLoadingRef.current) {
|
|
5513
|
+
callbackRef.current();
|
|
5514
|
+
}
|
|
5515
|
+
},
|
|
5516
|
+
{ rootMargin }
|
|
5517
|
+
);
|
|
5518
|
+
observerRef.current.observe(node);
|
|
5519
|
+
}, [rootMargin]);
|
|
5520
|
+
return { sentinelRef };
|
|
5521
|
+
}
|
|
5522
|
+
var init_useInfiniteScroll = __esm({
|
|
5523
|
+
"hooks/useInfiniteScroll.ts"() {
|
|
5524
|
+
"use client";
|
|
5525
|
+
}
|
|
5526
|
+
});
|
|
6363
5527
|
var InfiniteScrollSentinel;
|
|
6364
5528
|
var init_InfiniteScrollSentinel = __esm({
|
|
6365
5529
|
"components/core/atoms/InfiniteScrollSentinel.tsx"() {
|
|
@@ -8708,7 +7872,6 @@ var init_ErrorState = __esm({
|
|
|
8708
7872
|
init_Typography();
|
|
8709
7873
|
init_Icon();
|
|
8710
7874
|
init_useEventBus();
|
|
8711
|
-
init_useTranslate();
|
|
8712
7875
|
ErrorState = ({
|
|
8713
7876
|
title,
|
|
8714
7877
|
message,
|
|
@@ -8751,7 +7914,6 @@ var init_ErrorBoundary = __esm({
|
|
|
8751
7914
|
"use client";
|
|
8752
7915
|
init_cn();
|
|
8753
7916
|
init_ErrorState();
|
|
8754
|
-
init_useTranslate();
|
|
8755
7917
|
DefaultFallback = ({ error, onRetry }) => {
|
|
8756
7918
|
const { t } = useTranslate();
|
|
8757
7919
|
return /* @__PURE__ */ jsx(
|
|
@@ -8901,7 +8063,6 @@ var init_Skeleton = __esm({
|
|
|
8901
8063
|
"components/core/molecules/Skeleton.tsx"() {
|
|
8902
8064
|
"use client";
|
|
8903
8065
|
init_cn();
|
|
8904
|
-
init_useTranslate();
|
|
8905
8066
|
init_Box();
|
|
8906
8067
|
init_Stack();
|
|
8907
8068
|
init_Stack();
|
|
@@ -9578,7 +8739,6 @@ var AboutPageTemplate;
|
|
|
9578
8739
|
var init_AboutPageTemplate = __esm({
|
|
9579
8740
|
"components/marketing/templates/AboutPageTemplate.tsx"() {
|
|
9580
8741
|
init_cn();
|
|
9581
|
-
init_useTranslate();
|
|
9582
8742
|
init_Stack();
|
|
9583
8743
|
init_Box();
|
|
9584
8744
|
init_Typography();
|
|
@@ -9683,7 +8843,6 @@ var init_Alert = __esm({
|
|
|
9683
8843
|
init_Icon();
|
|
9684
8844
|
init_Typography();
|
|
9685
8845
|
init_useEventBus();
|
|
9686
|
-
init_useTranslate();
|
|
9687
8846
|
variantBorderClasses = {
|
|
9688
8847
|
info: "border-info",
|
|
9689
8848
|
success: "border-success",
|
|
@@ -10043,7 +9202,6 @@ var init_Menu = __esm({
|
|
|
10043
9202
|
init_Badge();
|
|
10044
9203
|
init_cn();
|
|
10045
9204
|
init_useEventBus();
|
|
10046
|
-
init_useTranslate();
|
|
10047
9205
|
Menu = ({
|
|
10048
9206
|
trigger,
|
|
10049
9207
|
items,
|
|
@@ -10051,7 +9209,7 @@ var init_Menu = __esm({
|
|
|
10051
9209
|
className
|
|
10052
9210
|
}) => {
|
|
10053
9211
|
const eventBus = useEventBus();
|
|
10054
|
-
const { t } = useTranslate();
|
|
9212
|
+
const { t, direction } = useTranslate();
|
|
10055
9213
|
const [isOpen, setIsOpen] = useState(false);
|
|
10056
9214
|
const [activeSubMenu, setActiveSubMenu] = useState(null);
|
|
10057
9215
|
const [triggerRect, setTriggerRect] = useState(null);
|
|
@@ -10105,6 +9263,18 @@ var init_Menu = __esm({
|
|
|
10105
9263
|
"bottom-start": "top-full left-0 mt-2",
|
|
10106
9264
|
"bottom-end": "top-full right-0 mt-2"
|
|
10107
9265
|
};
|
|
9266
|
+
const rtlMirror = {
|
|
9267
|
+
"top-left": "top-right",
|
|
9268
|
+
"top-right": "top-left",
|
|
9269
|
+
"bottom-left": "bottom-right",
|
|
9270
|
+
"bottom-right": "bottom-left",
|
|
9271
|
+
"top-start": "top-end",
|
|
9272
|
+
"top-end": "top-start",
|
|
9273
|
+
"bottom-start": "bottom-end",
|
|
9274
|
+
"bottom-end": "bottom-start"
|
|
9275
|
+
};
|
|
9276
|
+
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
9277
|
+
const subMenuSideClass = direction === "rtl" ? "right-full mr-2" : "left-full ml-2";
|
|
10108
9278
|
const triggerChild = React84__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
|
|
10109
9279
|
const triggerElement = React84__default.cloneElement(
|
|
10110
9280
|
triggerChild,
|
|
@@ -10132,7 +9302,7 @@ var init_Menu = __esm({
|
|
|
10132
9302
|
onMouseEnter: () => hasSubMenu && setActiveSubMenu(itemId),
|
|
10133
9303
|
"data-testid": item.event ? `action-${item.event}` : void 0,
|
|
10134
9304
|
className: cn(
|
|
10135
|
-
"w-full flex items-center justify-between gap-3 px-4 py-2 text-
|
|
9305
|
+
"w-full flex items-center justify-between gap-3 px-4 py-2 text-start",
|
|
10136
9306
|
"text-sm transition-colors",
|
|
10137
9307
|
"hover:bg-muted",
|
|
10138
9308
|
"focus:outline-none focus:bg-muted",
|
|
@@ -10151,7 +9321,7 @@ var init_Menu = __esm({
|
|
|
10151
9321
|
}
|
|
10152
9322
|
),
|
|
10153
9323
|
item.badge !== void 0 && /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", children: item.badge }),
|
|
10154
|
-
hasSubMenu && /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
9324
|
+
hasSubMenu && /* @__PURE__ */ jsx(Icon, { name: direction === "rtl" ? "chevron-left" : "chevron-right", size: "sm", className: "flex-shrink-0" })
|
|
10155
9325
|
] })
|
|
10156
9326
|
},
|
|
10157
9327
|
itemId
|
|
@@ -10171,7 +9341,8 @@ var init_Menu = __esm({
|
|
|
10171
9341
|
Box,
|
|
10172
9342
|
{
|
|
10173
9343
|
className: cn(
|
|
10174
|
-
"absolute
|
|
9344
|
+
"absolute top-0 z-50",
|
|
9345
|
+
subMenuSideClass,
|
|
10175
9346
|
menuContainerStyles
|
|
10176
9347
|
),
|
|
10177
9348
|
children: renderMenuItems(item.subMenu)
|
|
@@ -10189,12 +9360,12 @@ var init_Menu = __esm({
|
|
|
10189
9360
|
className: cn(
|
|
10190
9361
|
"absolute z-50",
|
|
10191
9362
|
menuContainerStyles,
|
|
10192
|
-
positionClasses3[
|
|
9363
|
+
positionClasses3[effectivePosition],
|
|
10193
9364
|
className
|
|
10194
9365
|
),
|
|
10195
9366
|
style: {
|
|
10196
|
-
left:
|
|
10197
|
-
right:
|
|
9367
|
+
left: effectivePosition.includes("left") ? 0 : "auto",
|
|
9368
|
+
right: effectivePosition.includes("right") ? 0 : "auto"
|
|
10198
9369
|
},
|
|
10199
9370
|
role: "menu",
|
|
10200
9371
|
children: renderMenuItems(items)
|
|
@@ -10331,7 +9502,6 @@ var init_FloatingActionButton = __esm({
|
|
|
10331
9502
|
init_Typography();
|
|
10332
9503
|
init_cn();
|
|
10333
9504
|
init_useEventBus();
|
|
10334
|
-
init_useTranslate();
|
|
10335
9505
|
FloatingActionButton = ({
|
|
10336
9506
|
action,
|
|
10337
9507
|
actionPayload,
|
|
@@ -10515,7 +9685,7 @@ var init_MapView = __esm({
|
|
|
10515
9685
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
10516
9686
|
const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback113, useState: useState103 } = React84__default;
|
|
10517
9687
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
10518
|
-
const { useEventBus:
|
|
9688
|
+
const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
10519
9689
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
10520
9690
|
const map = useMap();
|
|
10521
9691
|
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
@@ -10557,7 +9727,7 @@ var init_MapView = __esm({
|
|
|
10557
9727
|
className,
|
|
10558
9728
|
showAttribution = true
|
|
10559
9729
|
}) {
|
|
10560
|
-
const eventBus =
|
|
9730
|
+
const eventBus = useEventBus3();
|
|
10561
9731
|
const [clickedPosition, setClickedPosition] = useState103(null);
|
|
10562
9732
|
const handleMapClick = useCallback113((lat, lng) => {
|
|
10563
9733
|
if (showClickedPin) {
|
|
@@ -11253,7 +10423,6 @@ var init_ActionTile = __esm({
|
|
|
11253
10423
|
"components/game/organisms/puzzles/sequencer/ActionTile.tsx"() {
|
|
11254
10424
|
init_atoms2();
|
|
11255
10425
|
init_cn();
|
|
11256
|
-
init_useTranslate();
|
|
11257
10426
|
DRAG_MIME = "application/x-almadar-slot-item";
|
|
11258
10427
|
SIZE_CONFIG = {
|
|
11259
10428
|
sm: { px: "px-2 py-1", icon: "text-lg", text: "text-xs" },
|
|
@@ -11291,7 +10460,6 @@ var init_ActionPalette = __esm({
|
|
|
11291
10460
|
"components/game/organisms/puzzles/sequencer/ActionPalette.tsx"() {
|
|
11292
10461
|
init_atoms2();
|
|
11293
10462
|
init_cn();
|
|
11294
|
-
init_useTranslate();
|
|
11295
10463
|
init_ActionTile();
|
|
11296
10464
|
ActionPalette.displayName = "ActionPalette";
|
|
11297
10465
|
}
|
|
@@ -11301,7 +10469,6 @@ var init_AuthLayout = __esm({
|
|
|
11301
10469
|
"components/core/templates/AuthLayout.tsx"() {
|
|
11302
10470
|
"use client";
|
|
11303
10471
|
init_cn();
|
|
11304
|
-
init_useTranslate();
|
|
11305
10472
|
init_Box();
|
|
11306
10473
|
init_Stack();
|
|
11307
10474
|
init_Typography();
|
|
@@ -11446,7 +10613,6 @@ var init_LoadingState = __esm({
|
|
|
11446
10613
|
init_atoms2();
|
|
11447
10614
|
init_Stack();
|
|
11448
10615
|
init_Typography();
|
|
11449
|
-
init_useTranslate();
|
|
11450
10616
|
LoadingState = ({
|
|
11451
10617
|
title,
|
|
11452
10618
|
message,
|
|
@@ -12630,7 +11796,6 @@ var init_IsometricCanvas = __esm({
|
|
|
12630
11796
|
"use client";
|
|
12631
11797
|
init_cn();
|
|
12632
11798
|
init_useEventBus();
|
|
12633
|
-
init_useTranslate();
|
|
12634
11799
|
init_Box();
|
|
12635
11800
|
init_Stack();
|
|
12636
11801
|
init_Icon();
|
|
@@ -12994,7 +12159,6 @@ var init_BattleBoard = __esm({
|
|
|
12994
12159
|
"use client";
|
|
12995
12160
|
init_cn();
|
|
12996
12161
|
init_useEventBus();
|
|
12997
|
-
init_useTranslate();
|
|
12998
12162
|
init_Box();
|
|
12999
12163
|
init_Button();
|
|
13000
12164
|
init_Typography();
|
|
@@ -13754,7 +12918,6 @@ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
13754
12918
|
var init_BehaviorView = __esm({
|
|
13755
12919
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
13756
12920
|
"use client";
|
|
13757
|
-
init_useTranslate();
|
|
13758
12921
|
init_AvlState();
|
|
13759
12922
|
init_AvlTransitionLane();
|
|
13760
12923
|
init_AvlSwimLane();
|
|
@@ -13869,7 +13032,6 @@ var MIN_DIAGRAM_WIDTH, ScaledDiagram;
|
|
|
13869
13032
|
var init_ScaledDiagram = __esm({
|
|
13870
13033
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
13871
13034
|
init_Box();
|
|
13872
|
-
init_useTranslate();
|
|
13873
13035
|
init_cn();
|
|
13874
13036
|
MIN_DIAGRAM_WIDTH = 200;
|
|
13875
13037
|
ScaledDiagram = ({
|
|
@@ -14012,7 +13174,6 @@ var init_CodeBlock = __esm({
|
|
|
14012
13174
|
init_Textarea();
|
|
14013
13175
|
init_Icon();
|
|
14014
13176
|
init_useEventBus();
|
|
14015
|
-
init_useTranslate();
|
|
14016
13177
|
SyntaxHighlighter.registerLanguage("json", langJson);
|
|
14017
13178
|
SyntaxHighlighter.registerLanguage("javascript", langJavascript);
|
|
14018
13179
|
SyntaxHighlighter.registerLanguage("js", langJavascript);
|
|
@@ -14519,7 +13680,6 @@ var init_MarkdownContent = __esm({
|
|
|
14519
13680
|
init_katex_min();
|
|
14520
13681
|
init_Box();
|
|
14521
13682
|
init_CodeBlock();
|
|
14522
|
-
init_useTranslate();
|
|
14523
13683
|
init_cn();
|
|
14524
13684
|
MarkdownContent = React84__default.memo(
|
|
14525
13685
|
({ content, direction, className }) => {
|
|
@@ -14686,6 +13846,56 @@ var init_MarkdownContent = __esm({
|
|
|
14686
13846
|
MarkdownContent.displayName = "MarkdownContent";
|
|
14687
13847
|
}
|
|
14688
13848
|
});
|
|
13849
|
+
function useLongPress(onLongPress, options = {}) {
|
|
13850
|
+
const { duration = 500, moveThreshold = 10 } = options;
|
|
13851
|
+
const timerRef = useRef(null);
|
|
13852
|
+
const startPos = useRef({ x: 0, y: 0 });
|
|
13853
|
+
const isPressedRef = useRef(false);
|
|
13854
|
+
const firedRef = useRef(false);
|
|
13855
|
+
const cancel = useCallback(() => {
|
|
13856
|
+
if (timerRef.current) {
|
|
13857
|
+
clearTimeout(timerRef.current);
|
|
13858
|
+
timerRef.current = null;
|
|
13859
|
+
}
|
|
13860
|
+
isPressedRef.current = false;
|
|
13861
|
+
}, []);
|
|
13862
|
+
const onPointerDown = useCallback((e) => {
|
|
13863
|
+
firedRef.current = false;
|
|
13864
|
+
startPos.current = { x: e.clientX, y: e.clientY };
|
|
13865
|
+
isPressedRef.current = true;
|
|
13866
|
+
timerRef.current = setTimeout(() => {
|
|
13867
|
+
firedRef.current = true;
|
|
13868
|
+
isPressedRef.current = false;
|
|
13869
|
+
onLongPress();
|
|
13870
|
+
}, duration);
|
|
13871
|
+
}, [duration, onLongPress]);
|
|
13872
|
+
const onPointerMove = useCallback((e) => {
|
|
13873
|
+
if (!isPressedRef.current) return;
|
|
13874
|
+
const dx = e.clientX - startPos.current.x;
|
|
13875
|
+
const dy = e.clientY - startPos.current.y;
|
|
13876
|
+
if (Math.sqrt(dx * dx + dy * dy) > moveThreshold) {
|
|
13877
|
+
cancel();
|
|
13878
|
+
}
|
|
13879
|
+
}, [moveThreshold, cancel]);
|
|
13880
|
+
const onPointerUp = useCallback(() => {
|
|
13881
|
+
cancel();
|
|
13882
|
+
}, [cancel]);
|
|
13883
|
+
const onPointerCancel = useCallback(() => {
|
|
13884
|
+
cancel();
|
|
13885
|
+
}, [cancel]);
|
|
13886
|
+
return {
|
|
13887
|
+
onPointerDown,
|
|
13888
|
+
onPointerMove,
|
|
13889
|
+
onPointerUp,
|
|
13890
|
+
onPointerCancel,
|
|
13891
|
+
isPressed: isPressedRef.current
|
|
13892
|
+
};
|
|
13893
|
+
}
|
|
13894
|
+
var init_useLongPress = __esm({
|
|
13895
|
+
"hooks/useLongPress.ts"() {
|
|
13896
|
+
"use client";
|
|
13897
|
+
}
|
|
13898
|
+
});
|
|
14689
13899
|
function Card2({
|
|
14690
13900
|
title,
|
|
14691
13901
|
subtitle,
|
|
@@ -14774,7 +13984,6 @@ var init_Card2 = __esm({
|
|
|
14774
13984
|
"components/core/molecules/Card.tsx"() {
|
|
14775
13985
|
"use client";
|
|
14776
13986
|
init_useEventBus();
|
|
14777
|
-
init_useTranslate();
|
|
14778
13987
|
init_useLongPress();
|
|
14779
13988
|
Card2.displayName = "Card";
|
|
14780
13989
|
}
|
|
@@ -14788,7 +13997,6 @@ var init_QuizBlock = __esm({
|
|
|
14788
13997
|
init_Button();
|
|
14789
13998
|
init_Icon();
|
|
14790
13999
|
init_Box();
|
|
14791
|
-
init_useTranslate();
|
|
14792
14000
|
init_cn();
|
|
14793
14001
|
QuizBlock = ({
|
|
14794
14002
|
question,
|
|
@@ -14831,7 +14039,6 @@ var init_StateMachineView = __esm({
|
|
|
14831
14039
|
init_Typography();
|
|
14832
14040
|
init_Button();
|
|
14833
14041
|
init_Icon();
|
|
14834
|
-
init_useTranslate();
|
|
14835
14042
|
init_useEventBus();
|
|
14836
14043
|
init_cn();
|
|
14837
14044
|
StateNode = ({ state, config }) => {
|
|
@@ -16198,7 +15405,6 @@ var init_JazariStateMachine = __esm({
|
|
|
16198
15405
|
init_StateMachineView();
|
|
16199
15406
|
init_visualizer();
|
|
16200
15407
|
init_svg_paths();
|
|
16201
|
-
init_useTranslate();
|
|
16202
15408
|
init_cn();
|
|
16203
15409
|
JAZARI_VISUALIZER_CONFIG = {
|
|
16204
15410
|
...DEFAULT_CONFIG,
|
|
@@ -16354,7 +15560,6 @@ var init_ContentRenderer = __esm({
|
|
|
16354
15560
|
init_ScaledDiagram();
|
|
16355
15561
|
init_JazariStateMachine();
|
|
16356
15562
|
init_parseContentSegments();
|
|
16357
|
-
init_useTranslate();
|
|
16358
15563
|
init_cn();
|
|
16359
15564
|
ContentRenderer = ({
|
|
16360
15565
|
content,
|
|
@@ -16448,7 +15653,6 @@ var init_BookChapterView = __esm({
|
|
|
16448
15653
|
init_ScaledDiagram();
|
|
16449
15654
|
init_ContentRenderer();
|
|
16450
15655
|
init_JazariStateMachine();
|
|
16451
|
-
init_useTranslate();
|
|
16452
15656
|
init_cn();
|
|
16453
15657
|
BookChapterView = ({
|
|
16454
15658
|
chapter,
|
|
@@ -16487,7 +15691,6 @@ var init_BookCoverPage = __esm({
|
|
|
16487
15691
|
init_Typography();
|
|
16488
15692
|
init_Button();
|
|
16489
15693
|
init_Box();
|
|
16490
|
-
init_useTranslate();
|
|
16491
15694
|
init_cn();
|
|
16492
15695
|
BookCoverPage = ({
|
|
16493
15696
|
title,
|
|
@@ -16567,7 +15770,6 @@ var init_BookNavBar = __esm({
|
|
|
16567
15770
|
init_Typography();
|
|
16568
15771
|
init_ProgressBar();
|
|
16569
15772
|
init_Box();
|
|
16570
|
-
init_useTranslate();
|
|
16571
15773
|
init_cn();
|
|
16572
15774
|
BookNavBar = ({
|
|
16573
15775
|
currentPage,
|
|
@@ -16669,7 +15871,6 @@ var init_BookTableOfContents = __esm({
|
|
|
16669
15871
|
init_Button();
|
|
16670
15872
|
init_Box();
|
|
16671
15873
|
init_Badge();
|
|
16672
|
-
init_useTranslate();
|
|
16673
15874
|
init_cn();
|
|
16674
15875
|
BookTableOfContents = ({
|
|
16675
15876
|
parts,
|
|
@@ -16729,7 +15930,6 @@ var init_EmptyState = __esm({
|
|
|
16729
15930
|
init_Stack();
|
|
16730
15931
|
init_Typography();
|
|
16731
15932
|
init_useEventBus();
|
|
16732
|
-
init_useTranslate();
|
|
16733
15933
|
ICON_NAME_ALIASES = {
|
|
16734
15934
|
check: "check-circle",
|
|
16735
15935
|
error: "x-circle",
|
|
@@ -16900,7 +16100,6 @@ var init_BookViewer = __esm({
|
|
|
16900
16100
|
init_Box();
|
|
16901
16101
|
init_Stack();
|
|
16902
16102
|
init_useEventBus();
|
|
16903
|
-
init_useTranslate();
|
|
16904
16103
|
init_cn();
|
|
16905
16104
|
init_BookCoverPage();
|
|
16906
16105
|
init_BookTableOfContents();
|
|
@@ -17332,7 +16531,6 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
17332
16531
|
init_FilterPill();
|
|
17333
16532
|
init_Box();
|
|
17334
16533
|
init_useEventBus();
|
|
17335
|
-
init_useTranslate();
|
|
17336
16534
|
init_cn();
|
|
17337
16535
|
END_OF_SURVEY = "end-of-survey";
|
|
17338
16536
|
RuleRow = ({
|
|
@@ -17785,7 +16983,6 @@ var init_Breadcrumb = __esm({
|
|
|
17785
16983
|
init_Typography();
|
|
17786
16984
|
init_cn();
|
|
17787
16985
|
init_useEventBus();
|
|
17788
|
-
init_useTranslate();
|
|
17789
16986
|
Breadcrumb = ({
|
|
17790
16987
|
items,
|
|
17791
16988
|
separator = "chevron-right",
|
|
@@ -18021,7 +17218,6 @@ var init_BuilderBoard = __esm({
|
|
|
18021
17218
|
"components/game/organisms/puzzles/builder/BuilderBoard.tsx"() {
|
|
18022
17219
|
init_atoms2();
|
|
18023
17220
|
init_useEventBus();
|
|
18024
|
-
init_useTranslate();
|
|
18025
17221
|
BuilderBoard.displayName = "BuilderBoard";
|
|
18026
17222
|
}
|
|
18027
17223
|
});
|
|
@@ -18148,6 +17344,73 @@ var init_ButtonGroup = __esm({
|
|
|
18148
17344
|
ButtonGroup.displayName = "ButtonGroup";
|
|
18149
17345
|
}
|
|
18150
17346
|
});
|
|
17347
|
+
function useSwipeGesture(callbacks, options = {}) {
|
|
17348
|
+
const { threshold = 50, velocityThreshold = 0.3, preventDefault = false } = options;
|
|
17349
|
+
const startX = useRef(0);
|
|
17350
|
+
const startY = useRef(0);
|
|
17351
|
+
const startTime = useRef(0);
|
|
17352
|
+
const currentX = useRef(0);
|
|
17353
|
+
const tracking = useRef(false);
|
|
17354
|
+
const offsetXRef = useRef(0);
|
|
17355
|
+
const isSwipingRef = useRef(false);
|
|
17356
|
+
const onPointerDown = useCallback((e) => {
|
|
17357
|
+
startX.current = e.clientX;
|
|
17358
|
+
startY.current = e.clientY;
|
|
17359
|
+
currentX.current = e.clientX;
|
|
17360
|
+
startTime.current = Date.now();
|
|
17361
|
+
tracking.current = true;
|
|
17362
|
+
isSwipingRef.current = false;
|
|
17363
|
+
offsetXRef.current = 0;
|
|
17364
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
17365
|
+
}, []);
|
|
17366
|
+
const onPointerMove = useCallback((e) => {
|
|
17367
|
+
if (!tracking.current) return;
|
|
17368
|
+
if (preventDefault) e.preventDefault();
|
|
17369
|
+
currentX.current = e.clientX;
|
|
17370
|
+
const dx = e.clientX - startX.current;
|
|
17371
|
+
const dy = e.clientY - startY.current;
|
|
17372
|
+
if (Math.abs(dx) > 10 && Math.abs(dx) > Math.abs(dy)) {
|
|
17373
|
+
isSwipingRef.current = true;
|
|
17374
|
+
offsetXRef.current = dx;
|
|
17375
|
+
}
|
|
17376
|
+
}, [preventDefault]);
|
|
17377
|
+
const onPointerUp = useCallback((e) => {
|
|
17378
|
+
if (!tracking.current) return;
|
|
17379
|
+
tracking.current = false;
|
|
17380
|
+
const dx = e.clientX - startX.current;
|
|
17381
|
+
const dy = e.clientY - startY.current;
|
|
17382
|
+
const elapsed = Date.now() - startTime.current;
|
|
17383
|
+
const velocity = Math.abs(dx) / Math.max(elapsed, 1);
|
|
17384
|
+
offsetXRef.current = 0;
|
|
17385
|
+
isSwipingRef.current = false;
|
|
17386
|
+
if (Math.abs(dx) < threshold && velocity < velocityThreshold) return;
|
|
17387
|
+
if (Math.abs(dx) > Math.abs(dy)) {
|
|
17388
|
+
if (dx < -threshold) callbacks.onSwipeLeft?.();
|
|
17389
|
+
else if (dx > threshold) callbacks.onSwipeRight?.();
|
|
17390
|
+
} else {
|
|
17391
|
+
if (dy < -threshold) callbacks.onSwipeUp?.();
|
|
17392
|
+
else if (dy > threshold) callbacks.onSwipeDown?.();
|
|
17393
|
+
}
|
|
17394
|
+
}, [threshold, velocityThreshold, callbacks]);
|
|
17395
|
+
const onPointerCancel = useCallback(() => {
|
|
17396
|
+
tracking.current = false;
|
|
17397
|
+
offsetXRef.current = 0;
|
|
17398
|
+
isSwipingRef.current = false;
|
|
17399
|
+
}, []);
|
|
17400
|
+
return {
|
|
17401
|
+
onPointerDown,
|
|
17402
|
+
onPointerMove,
|
|
17403
|
+
onPointerUp,
|
|
17404
|
+
onPointerCancel,
|
|
17405
|
+
offsetX: offsetXRef.current,
|
|
17406
|
+
isSwiping: isSwipingRef.current
|
|
17407
|
+
};
|
|
17408
|
+
}
|
|
17409
|
+
var init_useSwipeGesture = __esm({
|
|
17410
|
+
"hooks/useSwipeGesture.ts"() {
|
|
17411
|
+
"use client";
|
|
17412
|
+
}
|
|
17413
|
+
});
|
|
18151
17414
|
function dayWindowForViewport(width) {
|
|
18152
17415
|
if (width <= 640) return 1;
|
|
18153
17416
|
if (width <= 1024) return 3;
|
|
@@ -18432,7 +17695,6 @@ var init_CalendarGrid = __esm({
|
|
|
18432
17695
|
init_TimeSlotCell();
|
|
18433
17696
|
init_useEventBus();
|
|
18434
17697
|
init_useSwipeGesture();
|
|
18435
|
-
init_useTranslate();
|
|
18436
17698
|
SHORT_DATE = { month: "short", day: "numeric" };
|
|
18437
17699
|
CalendarGrid.displayName = "CalendarGrid";
|
|
18438
17700
|
}
|
|
@@ -19741,7 +19003,6 @@ var init_Pagination = __esm({
|
|
|
19741
19003
|
init_Stack();
|
|
19742
19004
|
init_cn();
|
|
19743
19005
|
init_useEventBus();
|
|
19744
|
-
init_useTranslate();
|
|
19745
19006
|
Pagination = ({
|
|
19746
19007
|
currentPage,
|
|
19747
19008
|
totalPages,
|
|
@@ -19945,7 +19206,6 @@ var init_CardGrid = __esm({
|
|
|
19945
19206
|
init_cn();
|
|
19946
19207
|
init_getNestedValue();
|
|
19947
19208
|
init_useEventBus();
|
|
19948
|
-
init_useTranslate();
|
|
19949
19209
|
init_atoms2();
|
|
19950
19210
|
init_Badge();
|
|
19951
19211
|
init_Box();
|
|
@@ -20174,7 +19434,6 @@ var init_Carousel = __esm({
|
|
|
20174
19434
|
init_cn();
|
|
20175
19435
|
init_useEventBus();
|
|
20176
19436
|
init_useSwipeGesture();
|
|
20177
|
-
init_useTranslate();
|
|
20178
19437
|
init_Box();
|
|
20179
19438
|
init_Stack();
|
|
20180
19439
|
init_Button();
|
|
@@ -20411,7 +19670,6 @@ var init_CaseStudyOrganism = __esm({
|
|
|
20411
19670
|
"use client";
|
|
20412
19671
|
init_cn();
|
|
20413
19672
|
init_useEventBus();
|
|
20414
|
-
init_useTranslate();
|
|
20415
19673
|
init_Stack();
|
|
20416
19674
|
init_Typography();
|
|
20417
19675
|
init_SimpleGrid();
|
|
@@ -20616,7 +19874,6 @@ var init_Chart = __esm({
|
|
|
20616
19874
|
init_ErrorState();
|
|
20617
19875
|
init_EmptyState();
|
|
20618
19876
|
init_useEventBus();
|
|
20619
|
-
init_useTranslate();
|
|
20620
19877
|
CHART_COLORS = [
|
|
20621
19878
|
"var(--color-primary)",
|
|
20622
19879
|
"var(--color-success)",
|
|
@@ -21524,7 +20781,6 @@ var init_ClassifierBoard = __esm({
|
|
|
21524
20781
|
"components/game/organisms/puzzles/classifier/ClassifierBoard.tsx"() {
|
|
21525
20782
|
init_atoms2();
|
|
21526
20783
|
init_useEventBus();
|
|
21527
|
-
init_useTranslate();
|
|
21528
20784
|
ClassifierBoard.displayName = "ClassifierBoard";
|
|
21529
20785
|
}
|
|
21530
20786
|
});
|
|
@@ -21556,7 +20812,6 @@ var init_CodeView = __esm({
|
|
|
21556
20812
|
"components/game/organisms/puzzles/state-architect/CodeView.tsx"() {
|
|
21557
20813
|
init_atoms2();
|
|
21558
20814
|
init_cn();
|
|
21559
|
-
init_useTranslate();
|
|
21560
20815
|
CodeView.displayName = "CodeView";
|
|
21561
20816
|
}
|
|
21562
20817
|
});
|
|
@@ -21570,7 +20825,6 @@ var init_Tabs = __esm({
|
|
|
21570
20825
|
init_Box();
|
|
21571
20826
|
init_cn();
|
|
21572
20827
|
init_useEventBus();
|
|
21573
|
-
init_useTranslate();
|
|
21574
20828
|
Tabs = ({
|
|
21575
20829
|
items,
|
|
21576
20830
|
tabs,
|
|
@@ -21747,7 +21001,6 @@ var init_CodeViewer = __esm({
|
|
|
21747
21001
|
init_EmptyState();
|
|
21748
21002
|
init_Tabs();
|
|
21749
21003
|
init_useEventBus();
|
|
21750
|
-
init_useTranslate();
|
|
21751
21004
|
DIFF_STYLES = {
|
|
21752
21005
|
add: {
|
|
21753
21006
|
bg: "bg-success/10",
|
|
@@ -22119,7 +21372,6 @@ var init_ConfirmDialog = __esm({
|
|
|
22119
21372
|
init_Box();
|
|
22120
21373
|
init_Stack();
|
|
22121
21374
|
init_cn();
|
|
22122
|
-
init_useTranslate();
|
|
22123
21375
|
variantConfig = {
|
|
22124
21376
|
danger: {
|
|
22125
21377
|
icon: Trash2,
|
|
@@ -22601,7 +21853,6 @@ var init_DashboardGrid = __esm({
|
|
|
22601
21853
|
"components/core/organisms/layout/DashboardGrid.tsx"() {
|
|
22602
21854
|
init_cn();
|
|
22603
21855
|
init_Box();
|
|
22604
|
-
init_useTranslate();
|
|
22605
21856
|
gapStyles5 = {
|
|
22606
21857
|
sm: "gap-2",
|
|
22607
21858
|
md: "gap-4",
|
|
@@ -22656,6 +21907,20 @@ var init_DashboardGrid = __esm({
|
|
|
22656
21907
|
DashboardGrid.displayName = "DashboardGrid";
|
|
22657
21908
|
}
|
|
22658
21909
|
});
|
|
21910
|
+
|
|
21911
|
+
// hooks/useAuthContext.ts
|
|
21912
|
+
function useAuthContext() {
|
|
21913
|
+
return {
|
|
21914
|
+
user: null,
|
|
21915
|
+
loading: false,
|
|
21916
|
+
signIn: void 0,
|
|
21917
|
+
signOut: void 0
|
|
21918
|
+
};
|
|
21919
|
+
}
|
|
21920
|
+
var init_useAuthContext = __esm({
|
|
21921
|
+
"hooks/useAuthContext.ts"() {
|
|
21922
|
+
}
|
|
21923
|
+
});
|
|
22659
21924
|
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
22660
21925
|
var init_CurrentPagePathContext = __esm({
|
|
22661
21926
|
"context/CurrentPagePathContext.tsx"() {
|
|
@@ -22681,7 +21946,6 @@ var init_DashboardLayout = __esm({
|
|
|
22681
21946
|
init_Icon();
|
|
22682
21947
|
init_useAuthContext();
|
|
22683
21948
|
init_useEventBus();
|
|
22684
|
-
init_useTranslate();
|
|
22685
21949
|
init_CurrentPagePathContext();
|
|
22686
21950
|
DashboardLayout = ({
|
|
22687
21951
|
appName = "{{APP_TITLE}}",
|
|
@@ -24026,7 +23290,6 @@ var init_DataGrid = __esm({
|
|
|
24026
23290
|
init_cn();
|
|
24027
23291
|
init_getNestedValue();
|
|
24028
23292
|
init_useEventBus();
|
|
24029
|
-
init_useTranslate();
|
|
24030
23293
|
init_Box();
|
|
24031
23294
|
init_Stack();
|
|
24032
23295
|
init_Typography();
|
|
@@ -24465,7 +23728,6 @@ var init_DataList = __esm({
|
|
|
24465
23728
|
init_cn();
|
|
24466
23729
|
init_getNestedValue();
|
|
24467
23730
|
init_useEventBus();
|
|
24468
|
-
init_useTranslate();
|
|
24469
23731
|
init_Box();
|
|
24470
23732
|
init_Stack();
|
|
24471
23733
|
init_Typography();
|
|
@@ -24520,7 +23782,6 @@ var init_FileTree = __esm({
|
|
|
24520
23782
|
init_Box();
|
|
24521
23783
|
init_Typography();
|
|
24522
23784
|
init_Icon();
|
|
24523
|
-
init_useTranslate();
|
|
24524
23785
|
TreeNodeItem = ({
|
|
24525
23786
|
node,
|
|
24526
23787
|
depth,
|
|
@@ -24650,6 +23911,70 @@ var init_FormField = __esm({
|
|
|
24650
23911
|
FormField.displayName = "FormField";
|
|
24651
23912
|
}
|
|
24652
23913
|
});
|
|
23914
|
+
function getOrCreateStore(query) {
|
|
23915
|
+
if (!queryStores.has(query)) {
|
|
23916
|
+
queryStores.set(query, {
|
|
23917
|
+
search: "",
|
|
23918
|
+
filters: {},
|
|
23919
|
+
sortField: void 0,
|
|
23920
|
+
sortDirection: void 0,
|
|
23921
|
+
listeners: /* @__PURE__ */ new Set()
|
|
23922
|
+
});
|
|
23923
|
+
}
|
|
23924
|
+
return queryStores.get(query);
|
|
23925
|
+
}
|
|
23926
|
+
function useQuerySingleton(query) {
|
|
23927
|
+
const [, forceUpdate] = useState({});
|
|
23928
|
+
if (!query) {
|
|
23929
|
+
return null;
|
|
23930
|
+
}
|
|
23931
|
+
const store = useMemo(() => getOrCreateStore(query), [query]);
|
|
23932
|
+
useMemo(() => {
|
|
23933
|
+
const listener = () => forceUpdate({});
|
|
23934
|
+
store.listeners.add(listener);
|
|
23935
|
+
return () => {
|
|
23936
|
+
store.listeners.delete(listener);
|
|
23937
|
+
};
|
|
23938
|
+
}, [store]);
|
|
23939
|
+
const notifyListeners3 = useCallback(() => {
|
|
23940
|
+
store.listeners.forEach((listener) => listener());
|
|
23941
|
+
}, [store]);
|
|
23942
|
+
const setSearch = useCallback((value) => {
|
|
23943
|
+
store.search = value;
|
|
23944
|
+
notifyListeners3();
|
|
23945
|
+
}, [store, notifyListeners3]);
|
|
23946
|
+
const setFilter = useCallback((key, value) => {
|
|
23947
|
+
store.filters = { ...store.filters, [key]: value };
|
|
23948
|
+
notifyListeners3();
|
|
23949
|
+
}, [store, notifyListeners3]);
|
|
23950
|
+
const clearFilters = useCallback(() => {
|
|
23951
|
+
store.filters = {};
|
|
23952
|
+
store.search = "";
|
|
23953
|
+
notifyListeners3();
|
|
23954
|
+
}, [store, notifyListeners3]);
|
|
23955
|
+
const setSort = useCallback((field, direction) => {
|
|
23956
|
+
store.sortField = field;
|
|
23957
|
+
store.sortDirection = direction;
|
|
23958
|
+
notifyListeners3();
|
|
23959
|
+
}, [store, notifyListeners3]);
|
|
23960
|
+
return {
|
|
23961
|
+
search: store.search,
|
|
23962
|
+
setSearch,
|
|
23963
|
+
filters: store.filters,
|
|
23964
|
+
setFilter,
|
|
23965
|
+
clearFilters,
|
|
23966
|
+
sortField: store.sortField,
|
|
23967
|
+
sortDirection: store.sortDirection,
|
|
23968
|
+
setSort
|
|
23969
|
+
};
|
|
23970
|
+
}
|
|
23971
|
+
var queryStores;
|
|
23972
|
+
var init_useQuerySingleton = __esm({
|
|
23973
|
+
"hooks/useQuerySingleton.ts"() {
|
|
23974
|
+
"use client";
|
|
23975
|
+
queryStores = /* @__PURE__ */ new Map();
|
|
23976
|
+
}
|
|
23977
|
+
});
|
|
24653
23978
|
var resolveFilterType, lookStyles6, FilterGroup;
|
|
24654
23979
|
var init_FilterGroup = __esm({
|
|
24655
23980
|
"components/core/molecules/FilterGroup.tsx"() {
|
|
@@ -24663,7 +23988,6 @@ var init_FilterGroup = __esm({
|
|
|
24663
23988
|
init_Icon();
|
|
24664
23989
|
init_useEventBus();
|
|
24665
23990
|
init_useQuerySingleton();
|
|
24666
|
-
init_useTranslate();
|
|
24667
23991
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
24668
23992
|
lookStyles6 = {
|
|
24669
23993
|
toolbar: "",
|
|
@@ -25305,7 +24629,6 @@ var init_RelationSelect = __esm({
|
|
|
25305
24629
|
init_Spinner();
|
|
25306
24630
|
init_Typography();
|
|
25307
24631
|
init_debug();
|
|
25308
|
-
init_useTranslate();
|
|
25309
24632
|
isRelationsDebugEnabled = () => isDebugEnabled();
|
|
25310
24633
|
RelationSelect = ({
|
|
25311
24634
|
value,
|
|
@@ -25530,7 +24853,6 @@ var init_SearchInput = __esm({
|
|
|
25530
24853
|
init_cn();
|
|
25531
24854
|
init_useEventBus();
|
|
25532
24855
|
init_useQuerySingleton();
|
|
25533
|
-
init_useTranslate();
|
|
25534
24856
|
SearchInput = ({
|
|
25535
24857
|
value,
|
|
25536
24858
|
onSearch,
|
|
@@ -25633,7 +24955,6 @@ var init_SidePanel = __esm({
|
|
|
25633
24955
|
init_Typography();
|
|
25634
24956
|
init_cn();
|
|
25635
24957
|
init_useEventBus();
|
|
25636
|
-
init_useTranslate();
|
|
25637
24958
|
SidePanel = ({
|
|
25638
24959
|
title,
|
|
25639
24960
|
children,
|
|
@@ -25812,7 +25133,6 @@ var init_WizardNavigation = __esm({
|
|
|
25812
25133
|
init_Icon();
|
|
25813
25134
|
init_cn();
|
|
25814
25135
|
init_useEventBus();
|
|
25815
|
-
init_useTranslate();
|
|
25816
25136
|
WizardNavigation = ({
|
|
25817
25137
|
currentStep,
|
|
25818
25138
|
totalSteps,
|
|
@@ -25900,7 +25220,6 @@ var init_RepeatableFormSection = __esm({
|
|
|
25900
25220
|
init_Card();
|
|
25901
25221
|
init_Icon();
|
|
25902
25222
|
init_useEventBus();
|
|
25903
|
-
init_useTranslate();
|
|
25904
25223
|
RepeatableFormSection = ({
|
|
25905
25224
|
sectionType,
|
|
25906
25225
|
title,
|
|
@@ -26031,7 +25350,6 @@ var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
|
26031
25350
|
var init_ViolationAlert = __esm({
|
|
26032
25351
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
26033
25352
|
init_cn();
|
|
26034
|
-
init_useTranslate();
|
|
26035
25353
|
init_Box();
|
|
26036
25354
|
init_Stack();
|
|
26037
25355
|
init_Typography();
|
|
@@ -26537,7 +25855,6 @@ var init_LineChart = __esm({
|
|
|
26537
25855
|
"use client";
|
|
26538
25856
|
init_cn();
|
|
26539
25857
|
init_atoms2();
|
|
26540
|
-
init_useTranslate();
|
|
26541
25858
|
LineChart2 = ({
|
|
26542
25859
|
data,
|
|
26543
25860
|
width = 400,
|
|
@@ -28493,7 +27810,6 @@ var init_GraphView = __esm({
|
|
|
28493
27810
|
"use client";
|
|
28494
27811
|
init_cn();
|
|
28495
27812
|
init_atoms2();
|
|
28496
|
-
init_useTranslate();
|
|
28497
27813
|
GROUP_COLORS = [
|
|
28498
27814
|
"#3b82f6",
|
|
28499
27815
|
// blue-500
|
|
@@ -28819,7 +28135,6 @@ var init_NumberStepper = __esm({
|
|
|
28819
28135
|
init_cn();
|
|
28820
28136
|
init_Icon();
|
|
28821
28137
|
init_useEventBus();
|
|
28822
|
-
init_useTranslate();
|
|
28823
28138
|
sizeStyles10 = {
|
|
28824
28139
|
sm: {
|
|
28825
28140
|
button: "w-7 h-7",
|
|
@@ -29160,7 +28475,6 @@ var init_UploadDropZone = __esm({
|
|
|
29160
28475
|
init_Icon();
|
|
29161
28476
|
init_Typography();
|
|
29162
28477
|
init_useEventBus();
|
|
29163
|
-
init_useTranslate();
|
|
29164
28478
|
UploadDropZone = ({
|
|
29165
28479
|
accept,
|
|
29166
28480
|
maxSize,
|
|
@@ -29327,7 +28641,6 @@ var init_Lightbox = __esm({
|
|
|
29327
28641
|
init_Icon();
|
|
29328
28642
|
init_cn();
|
|
29329
28643
|
init_useEventBus();
|
|
29330
|
-
init_useTranslate();
|
|
29331
28644
|
Lightbox = ({
|
|
29332
28645
|
images = [],
|
|
29333
28646
|
currentIndex = 0,
|
|
@@ -29812,7 +29125,6 @@ var init_TableView = __esm({
|
|
|
29812
29125
|
init_cn();
|
|
29813
29126
|
init_getNestedValue();
|
|
29814
29127
|
init_useEventBus();
|
|
29815
|
-
init_useTranslate();
|
|
29816
29128
|
init_Box();
|
|
29817
29129
|
init_Stack();
|
|
29818
29130
|
init_Typography();
|
|
@@ -30016,7 +29328,6 @@ var init_Meter = __esm({
|
|
|
30016
29328
|
init_LoadingState();
|
|
30017
29329
|
init_ErrorState();
|
|
30018
29330
|
init_useEventBus();
|
|
30019
|
-
init_useTranslate();
|
|
30020
29331
|
DEFAULT_THRESHOLDS = [
|
|
30021
29332
|
{ value: 30, color: "var(--color-error)" },
|
|
30022
29333
|
{ value: 70, color: "var(--color-warning)" },
|
|
@@ -30397,6 +29708,79 @@ var init_SwipeableRow = __esm({
|
|
|
30397
29708
|
SwipeableRow.displayName = "SwipeableRow";
|
|
30398
29709
|
}
|
|
30399
29710
|
});
|
|
29711
|
+
function useDragReorder(initialItems, onReorder) {
|
|
29712
|
+
const [items, setItems] = useState(initialItems);
|
|
29713
|
+
const [dragIndex, setDragIndex] = useState(-1);
|
|
29714
|
+
const [dragOverIndex, setDragOverIndex] = useState(-1);
|
|
29715
|
+
const itemsRef = useRef(initialItems);
|
|
29716
|
+
if (initialItems !== itemsRef.current) {
|
|
29717
|
+
itemsRef.current = initialItems;
|
|
29718
|
+
setItems(initialItems);
|
|
29719
|
+
}
|
|
29720
|
+
const isDragging = dragIndex >= 0;
|
|
29721
|
+
const handleDragStart = useCallback((index) => (e) => {
|
|
29722
|
+
e.preventDefault();
|
|
29723
|
+
setDragIndex(index);
|
|
29724
|
+
setDragOverIndex(index);
|
|
29725
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
29726
|
+
}, []);
|
|
29727
|
+
const handleDragMove = useCallback((index) => (e) => {
|
|
29728
|
+
if (dragIndex < 0) return;
|
|
29729
|
+
const target = document.elementFromPoint(e.clientX, e.clientY);
|
|
29730
|
+
if (!target) return;
|
|
29731
|
+
let el = target;
|
|
29732
|
+
while (el && !el.dataset.dragIndex) {
|
|
29733
|
+
el = el.parentElement;
|
|
29734
|
+
}
|
|
29735
|
+
if (el?.dataset.dragIndex) {
|
|
29736
|
+
const overIndex = parseInt(el.dataset.dragIndex, 10);
|
|
29737
|
+
if (!isNaN(overIndex) && overIndex !== dragOverIndex) {
|
|
29738
|
+
setDragOverIndex(overIndex);
|
|
29739
|
+
}
|
|
29740
|
+
}
|
|
29741
|
+
}, [dragIndex, dragOverIndex]);
|
|
29742
|
+
const handleDragEnd = useCallback(() => {
|
|
29743
|
+
if (dragIndex >= 0 && dragOverIndex >= 0 && dragIndex !== dragOverIndex) {
|
|
29744
|
+
const newItems = [...items];
|
|
29745
|
+
const [movedItem] = newItems.splice(dragIndex, 1);
|
|
29746
|
+
newItems.splice(dragOverIndex, 0, movedItem);
|
|
29747
|
+
setItems(newItems);
|
|
29748
|
+
onReorder(dragIndex, dragOverIndex, items[dragIndex]);
|
|
29749
|
+
}
|
|
29750
|
+
setDragIndex(-1);
|
|
29751
|
+
setDragOverIndex(-1);
|
|
29752
|
+
}, [dragIndex, dragOverIndex, items, onReorder]);
|
|
29753
|
+
const getDragHandleProps = useCallback((index) => ({
|
|
29754
|
+
onPointerDown: handleDragStart(index),
|
|
29755
|
+
style: { cursor: "grab", touchAction: "none" },
|
|
29756
|
+
"aria-grabbed": dragIndex === index,
|
|
29757
|
+
role: "button"
|
|
29758
|
+
}), [handleDragStart, dragIndex]);
|
|
29759
|
+
const getItemProps = useCallback((index) => ({
|
|
29760
|
+
onPointerMove: handleDragMove(index),
|
|
29761
|
+
onPointerUp: handleDragEnd,
|
|
29762
|
+
"aria-dropeffect": "move",
|
|
29763
|
+
"data-drag-index": String(index),
|
|
29764
|
+
style: {
|
|
29765
|
+
opacity: dragIndex === index ? 0.5 : 1,
|
|
29766
|
+
transition: isDragging ? "transform 150ms ease" : void 0,
|
|
29767
|
+
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
|
|
29768
|
+
}
|
|
29769
|
+
}), [handleDragMove, handleDragEnd, dragIndex, dragOverIndex, isDragging]);
|
|
29770
|
+
return {
|
|
29771
|
+
items,
|
|
29772
|
+
dragIndex,
|
|
29773
|
+
dragOverIndex,
|
|
29774
|
+
isDragging,
|
|
29775
|
+
getDragHandleProps,
|
|
29776
|
+
getItemProps
|
|
29777
|
+
};
|
|
29778
|
+
}
|
|
29779
|
+
var init_useDragReorder = __esm({
|
|
29780
|
+
"hooks/useDragReorder.ts"() {
|
|
29781
|
+
"use client";
|
|
29782
|
+
}
|
|
29783
|
+
});
|
|
30400
29784
|
function useSafeEventBus10() {
|
|
30401
29785
|
try {
|
|
30402
29786
|
return useEventBus();
|
|
@@ -30507,6 +29891,71 @@ var init_SortableList = __esm({
|
|
|
30507
29891
|
SortableList.displayName = "SortableList";
|
|
30508
29892
|
}
|
|
30509
29893
|
});
|
|
29894
|
+
function usePullToRefresh(onRefresh, options = {}) {
|
|
29895
|
+
const { threshold = 60, maxPull = 120 } = options;
|
|
29896
|
+
const [pullDistance, setPullDistance] = useState(0);
|
|
29897
|
+
const [isPulling, setIsPulling] = useState(false);
|
|
29898
|
+
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
29899
|
+
const startY = useRef(0);
|
|
29900
|
+
const scrollTopRef = useRef(0);
|
|
29901
|
+
const onTouchStart = useCallback((e) => {
|
|
29902
|
+
const container = e.currentTarget;
|
|
29903
|
+
scrollTopRef.current = container.scrollTop;
|
|
29904
|
+
if (scrollTopRef.current <= 0) {
|
|
29905
|
+
startY.current = e.touches[0].clientY;
|
|
29906
|
+
setIsPulling(true);
|
|
29907
|
+
}
|
|
29908
|
+
}, []);
|
|
29909
|
+
const onTouchMove = useCallback((e) => {
|
|
29910
|
+
if (!isPulling || isRefreshing) return;
|
|
29911
|
+
const container = e.currentTarget;
|
|
29912
|
+
if (container.scrollTop > 0) {
|
|
29913
|
+
setPullDistance(0);
|
|
29914
|
+
return;
|
|
29915
|
+
}
|
|
29916
|
+
const dy = e.touches[0].clientY - startY.current;
|
|
29917
|
+
if (dy > 0) {
|
|
29918
|
+
const distance = Math.min(dy * 0.5, maxPull);
|
|
29919
|
+
setPullDistance(distance);
|
|
29920
|
+
}
|
|
29921
|
+
}, [isPulling, isRefreshing, maxPull]);
|
|
29922
|
+
const onTouchEnd = useCallback(() => {
|
|
29923
|
+
if (!isPulling) return;
|
|
29924
|
+
setIsPulling(false);
|
|
29925
|
+
if (pullDistance >= threshold && !isRefreshing) {
|
|
29926
|
+
setIsRefreshing(true);
|
|
29927
|
+
setPullDistance(threshold);
|
|
29928
|
+
onRefresh();
|
|
29929
|
+
} else {
|
|
29930
|
+
setPullDistance(0);
|
|
29931
|
+
}
|
|
29932
|
+
}, [isPulling, pullDistance, threshold, isRefreshing, onRefresh]);
|
|
29933
|
+
const endRefresh = useCallback(() => {
|
|
29934
|
+
setIsRefreshing(false);
|
|
29935
|
+
setPullDistance(0);
|
|
29936
|
+
}, []);
|
|
29937
|
+
const containerProps = {
|
|
29938
|
+
onTouchStart,
|
|
29939
|
+
onTouchMove,
|
|
29940
|
+
onTouchEnd,
|
|
29941
|
+
style: {
|
|
29942
|
+
transform: pullDistance > 0 ? `translateY(${pullDistance}px)` : void 0,
|
|
29943
|
+
transition: isPulling ? "none" : "transform 300ms ease-out"
|
|
29944
|
+
}
|
|
29945
|
+
};
|
|
29946
|
+
return {
|
|
29947
|
+
pullDistance,
|
|
29948
|
+
isPulling,
|
|
29949
|
+
isRefreshing,
|
|
29950
|
+
containerProps,
|
|
29951
|
+
endRefresh
|
|
29952
|
+
};
|
|
29953
|
+
}
|
|
29954
|
+
var init_usePullToRefresh = __esm({
|
|
29955
|
+
"hooks/usePullToRefresh.ts"() {
|
|
29956
|
+
"use client";
|
|
29957
|
+
}
|
|
29958
|
+
});
|
|
30510
29959
|
function useSafeEventBus11() {
|
|
30511
29960
|
try {
|
|
30512
29961
|
return useEventBus();
|
|
@@ -31825,7 +31274,6 @@ var init_VoteStack = __esm({
|
|
|
31825
31274
|
init_cn();
|
|
31826
31275
|
init_Icon();
|
|
31827
31276
|
init_useEventBus();
|
|
31828
|
-
init_useTranslate();
|
|
31829
31277
|
sizeStyles12 = {
|
|
31830
31278
|
sm: {
|
|
31831
31279
|
button: "w-7 h-7",
|
|
@@ -32280,7 +31728,6 @@ var init_QrScanner = __esm({
|
|
|
32280
31728
|
init_atoms2();
|
|
32281
31729
|
init_Icon();
|
|
32282
31730
|
init_useEventBus();
|
|
32283
|
-
init_useTranslate();
|
|
32284
31731
|
QrScanner = ({
|
|
32285
31732
|
onScan,
|
|
32286
31733
|
scanEvent,
|
|
@@ -32507,7 +31954,6 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32507
31954
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32508
31955
|
init_cn();
|
|
32509
31956
|
init_useEventBus();
|
|
32510
|
-
init_useTranslate();
|
|
32511
31957
|
init_Typography();
|
|
32512
31958
|
init_Box();
|
|
32513
31959
|
init_Label();
|
|
@@ -33463,7 +32909,6 @@ var init_RichBlockEditor = __esm({
|
|
|
33463
32909
|
init_Input();
|
|
33464
32910
|
init_Icon();
|
|
33465
32911
|
init_useEventBus();
|
|
33466
|
-
init_useTranslate();
|
|
33467
32912
|
TOOLBAR_ENTRIES = [
|
|
33468
32913
|
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
33469
32914
|
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
@@ -33654,7 +33099,6 @@ var init_ReplyTree = __esm({
|
|
|
33654
33099
|
"use client";
|
|
33655
33100
|
init_cn();
|
|
33656
33101
|
init_useEventBus();
|
|
33657
|
-
init_useTranslate();
|
|
33658
33102
|
init_atoms2();
|
|
33659
33103
|
init_VoteStack();
|
|
33660
33104
|
ReplyTreeNode = ({
|
|
@@ -33962,7 +33406,6 @@ var init_VersionDiff = __esm({
|
|
|
33962
33406
|
"use client";
|
|
33963
33407
|
init_cn();
|
|
33964
33408
|
init_useEventBus();
|
|
33965
|
-
init_useTranslate();
|
|
33966
33409
|
init_atoms2();
|
|
33967
33410
|
init_Stack();
|
|
33968
33411
|
INLINE_STYLES = {
|
|
@@ -34278,7 +33721,6 @@ var init_DocBreadcrumb = __esm({
|
|
|
34278
33721
|
init_Stack();
|
|
34279
33722
|
init_Typography();
|
|
34280
33723
|
init_Icon();
|
|
34281
|
-
init_useTranslate();
|
|
34282
33724
|
DocBreadcrumb = ({
|
|
34283
33725
|
items,
|
|
34284
33726
|
className
|
|
@@ -34707,7 +34149,6 @@ var init_DocSearch = __esm({
|
|
|
34707
34149
|
init_Typography();
|
|
34708
34150
|
init_Icon();
|
|
34709
34151
|
init_Input();
|
|
34710
|
-
init_useTranslate();
|
|
34711
34152
|
}
|
|
34712
34153
|
});
|
|
34713
34154
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -34720,7 +34161,6 @@ var init_DocSidebar = __esm({
|
|
|
34720
34161
|
init_Stack();
|
|
34721
34162
|
init_Typography();
|
|
34722
34163
|
init_Icon();
|
|
34723
|
-
init_useTranslate();
|
|
34724
34164
|
DocSidebarCategory = ({ item, depth }) => {
|
|
34725
34165
|
const [expanded, setExpanded] = useState(
|
|
34726
34166
|
() => item.items?.some(function hasActive(child) {
|
|
@@ -34827,7 +34267,6 @@ var init_DocTOC = __esm({
|
|
|
34827
34267
|
init_Box();
|
|
34828
34268
|
init_Stack();
|
|
34829
34269
|
init_Typography();
|
|
34830
|
-
init_useTranslate();
|
|
34831
34270
|
DocTOC = ({
|
|
34832
34271
|
items,
|
|
34833
34272
|
activeId,
|
|
@@ -35562,7 +35001,6 @@ var init_Header = __esm({
|
|
|
35562
35001
|
init_Stack();
|
|
35563
35002
|
init_Typography();
|
|
35564
35003
|
init_cn();
|
|
35565
|
-
init_useTranslate();
|
|
35566
35004
|
lookStyles8 = {
|
|
35567
35005
|
"compact-bar": "",
|
|
35568
35006
|
hero: "py-section min-h-[200px] [&_h1]:text-display-1",
|
|
@@ -35882,7 +35320,6 @@ var init_Sidebar = __esm({
|
|
|
35882
35320
|
init_Typography();
|
|
35883
35321
|
init_cn();
|
|
35884
35322
|
init_useEventBus();
|
|
35885
|
-
init_useTranslate();
|
|
35886
35323
|
SidebarNavItem = ({ item, collapsed }) => {
|
|
35887
35324
|
const Icon3 = item.icon;
|
|
35888
35325
|
const isActive = item.active ?? item.isActive;
|
|
@@ -36136,7 +35573,6 @@ var init_WizardContainer = __esm({
|
|
|
36136
35573
|
init_Stack();
|
|
36137
35574
|
init_Icon();
|
|
36138
35575
|
init_cn();
|
|
36139
|
-
init_useTranslate();
|
|
36140
35576
|
WizardContainer = ({
|
|
36141
35577
|
steps,
|
|
36142
35578
|
currentStep: controlledStep,
|
|
@@ -36710,7 +36146,6 @@ var init_SignaturePad = __esm({
|
|
|
36710
36146
|
init_LoadingState();
|
|
36711
36147
|
init_ErrorState();
|
|
36712
36148
|
init_useEventBus();
|
|
36713
|
-
init_useTranslate();
|
|
36714
36149
|
SignaturePad = ({
|
|
36715
36150
|
label,
|
|
36716
36151
|
helperText,
|
|
@@ -36904,7 +36339,6 @@ var init_DocumentViewer = __esm({
|
|
|
36904
36339
|
init_EmptyState();
|
|
36905
36340
|
init_Tabs();
|
|
36906
36341
|
init_useEventBus();
|
|
36907
|
-
init_useTranslate();
|
|
36908
36342
|
DocumentViewer = ({
|
|
36909
36343
|
title,
|
|
36910
36344
|
src,
|
|
@@ -37109,7 +36543,6 @@ var init_GraphCanvas = __esm({
|
|
|
37109
36543
|
init_ErrorState();
|
|
37110
36544
|
init_EmptyState();
|
|
37111
36545
|
init_useEventBus();
|
|
37112
|
-
init_useTranslate();
|
|
37113
36546
|
GROUP_COLORS2 = [
|
|
37114
36547
|
"var(--color-primary)",
|
|
37115
36548
|
"var(--color-success)",
|
|
@@ -37847,7 +37280,6 @@ var init_DataTable = __esm({
|
|
|
37847
37280
|
init_molecules2();
|
|
37848
37281
|
init_Icon();
|
|
37849
37282
|
init_useEventBus();
|
|
37850
|
-
init_useTranslate();
|
|
37851
37283
|
init_types3();
|
|
37852
37284
|
lookStyles9 = {
|
|
37853
37285
|
dense: "",
|
|
@@ -37994,7 +37426,6 @@ var init_DebuggerBoard = __esm({
|
|
|
37994
37426
|
"components/game/organisms/puzzles/debugger/DebuggerBoard.tsx"() {
|
|
37995
37427
|
init_atoms2();
|
|
37996
37428
|
init_useEventBus();
|
|
37997
|
-
init_useTranslate();
|
|
37998
37429
|
DebuggerBoard.displayName = "DebuggerBoard";
|
|
37999
37430
|
}
|
|
38000
37431
|
});
|
|
@@ -38165,7 +37596,6 @@ var init_DetailPanel = __esm({
|
|
|
38165
37596
|
init_cn();
|
|
38166
37597
|
init_getNestedValue();
|
|
38167
37598
|
init_useEventBus();
|
|
38168
|
-
init_useTranslate();
|
|
38169
37599
|
ReactMarkdown2 = lazy(() => import('react-markdown'));
|
|
38170
37600
|
DetailPanel = ({
|
|
38171
37601
|
title: propTitle,
|
|
@@ -38744,7 +38174,6 @@ var init_TraitStateViewer = __esm({
|
|
|
38744
38174
|
"components/game/organisms/TraitStateViewer.tsx"() {
|
|
38745
38175
|
"use client";
|
|
38746
38176
|
init_cn();
|
|
38747
|
-
init_useTranslate();
|
|
38748
38177
|
init_Box();
|
|
38749
38178
|
init_Typography();
|
|
38750
38179
|
init_Stack();
|
|
@@ -38803,7 +38232,6 @@ var init_RuleEditor = __esm({
|
|
|
38803
38232
|
"components/game/organisms/puzzles/event-handler/RuleEditor.tsx"() {
|
|
38804
38233
|
init_atoms2();
|
|
38805
38234
|
init_cn();
|
|
38806
|
-
init_useTranslate();
|
|
38807
38235
|
RuleEditor.displayName = "RuleEditor";
|
|
38808
38236
|
}
|
|
38809
38237
|
});
|
|
@@ -38878,7 +38306,6 @@ var init_ObjectRulePanel = __esm({
|
|
|
38878
38306
|
"components/game/organisms/puzzles/event-handler/ObjectRulePanel.tsx"() {
|
|
38879
38307
|
init_atoms2();
|
|
38880
38308
|
init_cn();
|
|
38881
|
-
init_useTranslate();
|
|
38882
38309
|
init_TraitStateViewer();
|
|
38883
38310
|
init_RuleEditor();
|
|
38884
38311
|
nextRuleId = 1;
|
|
@@ -38923,7 +38350,6 @@ var init_EventLog = __esm({
|
|
|
38923
38350
|
"components/game/organisms/puzzles/event-handler/EventLog.tsx"() {
|
|
38924
38351
|
init_atoms2();
|
|
38925
38352
|
init_cn();
|
|
38926
|
-
init_useTranslate();
|
|
38927
38353
|
STATUS_STYLES = {
|
|
38928
38354
|
pending: "text-muted-foreground",
|
|
38929
38355
|
active: "text-primary animate-pulse",
|
|
@@ -39137,7 +38563,6 @@ var init_EventHandlerBoard = __esm({
|
|
|
39137
38563
|
init_atoms2();
|
|
39138
38564
|
init_cn();
|
|
39139
38565
|
init_useEventBus();
|
|
39140
|
-
init_useTranslate();
|
|
39141
38566
|
init_TraitStateViewer();
|
|
39142
38567
|
init_ObjectRulePanel();
|
|
39143
38568
|
init_EventLog();
|
|
@@ -39207,7 +38632,6 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39207
38632
|
"use client";
|
|
39208
38633
|
init_cn();
|
|
39209
38634
|
init_useEventBus();
|
|
39210
|
-
init_useTranslate();
|
|
39211
38635
|
init_Stack();
|
|
39212
38636
|
init_Typography();
|
|
39213
38637
|
init_FeatureGrid();
|
|
@@ -39390,7 +38814,6 @@ var init_Form = __esm({
|
|
|
39390
38814
|
init_RelationSelect();
|
|
39391
38815
|
init_Alert();
|
|
39392
38816
|
init_useEventBus();
|
|
39393
|
-
init_useTranslate();
|
|
39394
38817
|
init_debug();
|
|
39395
38818
|
layoutStyles = {
|
|
39396
38819
|
vertical: "flex flex-col",
|
|
@@ -40550,7 +39973,6 @@ var init_HeroOrganism = __esm({
|
|
|
40550
39973
|
"use client";
|
|
40551
39974
|
init_cn();
|
|
40552
39975
|
init_useEventBus();
|
|
40553
|
-
init_useTranslate();
|
|
40554
39976
|
init_HeroSection();
|
|
40555
39977
|
init_LoadingState();
|
|
40556
39978
|
init_ErrorState();
|
|
@@ -40656,7 +40078,6 @@ var LandingPageTemplate;
|
|
|
40656
40078
|
var init_LandingPageTemplate = __esm({
|
|
40657
40079
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
40658
40080
|
init_cn();
|
|
40659
|
-
init_useTranslate();
|
|
40660
40081
|
init_Stack();
|
|
40661
40082
|
init_Box();
|
|
40662
40083
|
init_Container();
|
|
@@ -40856,7 +40277,6 @@ var init_List = __esm({
|
|
|
40856
40277
|
init_cn();
|
|
40857
40278
|
init_getNestedValue();
|
|
40858
40279
|
init_useEventBus();
|
|
40859
|
-
init_useTranslate();
|
|
40860
40280
|
init_types3();
|
|
40861
40281
|
STATUS_STYLES2 = {
|
|
40862
40282
|
complete: {
|
|
@@ -41351,7 +40771,6 @@ var init_MasterDetail = __esm({
|
|
|
41351
40771
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41352
40772
|
"use client";
|
|
41353
40773
|
init_DataTable();
|
|
41354
|
-
init_useTranslate();
|
|
41355
40774
|
MasterDetail.displayName = "MasterDetail";
|
|
41356
40775
|
}
|
|
41357
40776
|
});
|
|
@@ -41360,7 +40779,6 @@ var init_MasterDetailLayout = __esm({
|
|
|
41360
40779
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41361
40780
|
init_cn();
|
|
41362
40781
|
init_Typography();
|
|
41363
|
-
init_useTranslate();
|
|
41364
40782
|
DefaultEmptyDetail = () => {
|
|
41365
40783
|
const { t } = useTranslate();
|
|
41366
40784
|
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
@@ -41421,7 +40839,6 @@ var init_MediaGallery = __esm({
|
|
|
41421
40839
|
init_ErrorState();
|
|
41422
40840
|
init_EmptyState();
|
|
41423
40841
|
init_useEventBus();
|
|
41424
|
-
init_useTranslate();
|
|
41425
40842
|
COLUMN_CLASSES = {
|
|
41426
40843
|
2: "grid-cols-2",
|
|
41427
40844
|
3: "grid-cols-2 sm:grid-cols-3",
|
|
@@ -41822,7 +41239,6 @@ var init_NegotiatorBoard = __esm({
|
|
|
41822
41239
|
"components/game/organisms/puzzles/negotiator/NegotiatorBoard.tsx"() {
|
|
41823
41240
|
init_atoms2();
|
|
41824
41241
|
init_useEventBus();
|
|
41825
|
-
init_useTranslate();
|
|
41826
41242
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
41827
41243
|
}
|
|
41828
41244
|
});
|
|
@@ -41832,7 +41248,6 @@ var init_PricingOrganism = __esm({
|
|
|
41832
41248
|
"use client";
|
|
41833
41249
|
init_cn();
|
|
41834
41250
|
init_useEventBus();
|
|
41835
|
-
init_useTranslate();
|
|
41836
41251
|
init_Stack();
|
|
41837
41252
|
init_Typography();
|
|
41838
41253
|
init_PricingGrid();
|
|
@@ -41882,7 +41297,6 @@ var PricingPageTemplate;
|
|
|
41882
41297
|
var init_PricingPageTemplate = __esm({
|
|
41883
41298
|
"components/marketing/templates/PricingPageTemplate.tsx"() {
|
|
41884
41299
|
init_cn();
|
|
41885
|
-
init_useTranslate();
|
|
41886
41300
|
init_Stack();
|
|
41887
41301
|
init_Box();
|
|
41888
41302
|
init_Container();
|
|
@@ -42465,7 +41879,6 @@ var init_TraitsTab = __esm({
|
|
|
42465
41879
|
init_Typography();
|
|
42466
41880
|
init_Stack();
|
|
42467
41881
|
init_EmptyState();
|
|
42468
|
-
init_useTranslate();
|
|
42469
41882
|
TraitsTab.displayName = "TraitsTab";
|
|
42470
41883
|
}
|
|
42471
41884
|
});
|
|
@@ -42543,7 +41956,6 @@ var init_TicksTab = __esm({
|
|
|
42543
41956
|
init_Stack();
|
|
42544
41957
|
init_Card();
|
|
42545
41958
|
init_EmptyState();
|
|
42546
|
-
init_useTranslate();
|
|
42547
41959
|
TicksTab.displayName = "TicksTab";
|
|
42548
41960
|
}
|
|
42549
41961
|
});
|
|
@@ -42617,7 +42029,6 @@ var init_EntitiesTab = __esm({
|
|
|
42617
42029
|
init_Typography();
|
|
42618
42030
|
init_Stack();
|
|
42619
42031
|
init_EmptyState();
|
|
42620
|
-
init_useTranslate();
|
|
42621
42032
|
EntitiesTab.displayName = "EntitiesTab";
|
|
42622
42033
|
}
|
|
42623
42034
|
});
|
|
@@ -42734,7 +42145,6 @@ var init_EventFlowTab = __esm({
|
|
|
42734
42145
|
init_Button();
|
|
42735
42146
|
init_Checkbox();
|
|
42736
42147
|
init_EmptyState();
|
|
42737
|
-
init_useTranslate();
|
|
42738
42148
|
TYPE_BADGES = {
|
|
42739
42149
|
trait: { variant: "primary", icon: "\u{1F504}" },
|
|
42740
42150
|
tick: { variant: "warning", icon: "\u23F1\uFE0F" },
|
|
@@ -42829,7 +42239,6 @@ var init_GuardsPanel = __esm({
|
|
|
42829
42239
|
init_ButtonGroup();
|
|
42830
42240
|
init_Button();
|
|
42831
42241
|
init_EmptyState();
|
|
42832
|
-
init_useTranslate();
|
|
42833
42242
|
GuardsPanel.displayName = "GuardsPanel";
|
|
42834
42243
|
}
|
|
42835
42244
|
});
|
|
@@ -42905,7 +42314,6 @@ var init_VerificationTab = __esm({
|
|
|
42905
42314
|
init_Typography();
|
|
42906
42315
|
init_Stack();
|
|
42907
42316
|
init_EmptyState();
|
|
42908
|
-
init_useTranslate();
|
|
42909
42317
|
STATUS_CONFIG = {
|
|
42910
42318
|
pass: { variant: "success", icon: "\u2713", label: "PASS" },
|
|
42911
42319
|
fail: { variant: "danger", icon: "\u2717", label: "FAIL" },
|
|
@@ -43041,7 +42449,6 @@ var init_TransitionTimeline = __esm({
|
|
|
43041
42449
|
init_Typography();
|
|
43042
42450
|
init_EmptyState();
|
|
43043
42451
|
init_Checkbox();
|
|
43044
|
-
init_useTranslate();
|
|
43045
42452
|
EFFECT_STATUS_VARIANT = {
|
|
43046
42453
|
executed: "success",
|
|
43047
42454
|
failed: "danger",
|
|
@@ -43131,7 +42538,6 @@ var init_ServerBridgeTab = __esm({
|
|
|
43131
42538
|
init_Stack();
|
|
43132
42539
|
init_Card();
|
|
43133
42540
|
init_EmptyState();
|
|
43134
|
-
init_useTranslate();
|
|
43135
42541
|
ServerBridgeTab.displayName = "ServerBridgeTab";
|
|
43136
42542
|
}
|
|
43137
42543
|
});
|
|
@@ -43296,7 +42702,6 @@ var init_EventDispatcherTab = __esm({
|
|
|
43296
42702
|
init_Stack();
|
|
43297
42703
|
init_EmptyState();
|
|
43298
42704
|
init_useEventBus();
|
|
43299
|
-
init_useTranslate();
|
|
43300
42705
|
EventDispatcherTab.displayName = "EventDispatcherTab";
|
|
43301
42706
|
}
|
|
43302
42707
|
});
|
|
@@ -43671,7 +43076,6 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43671
43076
|
init_TransitionTimeline();
|
|
43672
43077
|
init_ServerBridgeTab();
|
|
43673
43078
|
init_EventDispatcherTab();
|
|
43674
|
-
init_useTranslate();
|
|
43675
43079
|
init_RuntimeDebugger();
|
|
43676
43080
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43677
43081
|
}
|
|
@@ -44158,7 +43562,6 @@ var init_SequencerBoard = __esm({
|
|
|
44158
43562
|
init_atoms2();
|
|
44159
43563
|
init_cn();
|
|
44160
43564
|
init_useEventBus();
|
|
44161
|
-
init_useTranslate();
|
|
44162
43565
|
init_TraitStateViewer();
|
|
44163
43566
|
init_SequenceBar();
|
|
44164
43567
|
init_ActionPalette();
|
|
@@ -44177,7 +43580,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44177
43580
|
"use client";
|
|
44178
43581
|
init_cn();
|
|
44179
43582
|
init_useEventBus();
|
|
44180
|
-
init_useTranslate();
|
|
44181
43583
|
init_Stack();
|
|
44182
43584
|
init_Typography();
|
|
44183
43585
|
init_SimpleGrid();
|
|
@@ -44736,7 +44138,6 @@ var init_SimulatorBoard = __esm({
|
|
|
44736
44138
|
"components/game/organisms/puzzles/simulator/SimulatorBoard.tsx"() {
|
|
44737
44139
|
init_atoms2();
|
|
44738
44140
|
init_useEventBus();
|
|
44739
|
-
init_useTranslate();
|
|
44740
44141
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
44741
44142
|
}
|
|
44742
44143
|
});
|
|
@@ -44841,7 +44242,6 @@ var init_StatCard = __esm({
|
|
|
44841
44242
|
init_Button();
|
|
44842
44243
|
init_Sparkline();
|
|
44843
44244
|
init_useEventBus();
|
|
44844
|
-
init_useTranslate();
|
|
44845
44245
|
init_Icon();
|
|
44846
44246
|
StatCard = ({
|
|
44847
44247
|
label: propLabel,
|
|
@@ -45197,7 +44597,6 @@ var init_VariablePanel = __esm({
|
|
|
45197
44597
|
"components/game/organisms/puzzles/state-architect/VariablePanel.tsx"() {
|
|
45198
44598
|
init_atoms2();
|
|
45199
44599
|
init_cn();
|
|
45200
|
-
init_useTranslate();
|
|
45201
44600
|
VariablePanel.displayName = "VariablePanel";
|
|
45202
44601
|
}
|
|
45203
44602
|
});
|
|
@@ -45514,7 +44913,6 @@ var init_StateArchitectBoard = __esm({
|
|
|
45514
44913
|
init_atoms2();
|
|
45515
44914
|
init_cn();
|
|
45516
44915
|
init_useEventBus();
|
|
45517
|
-
init_useTranslate();
|
|
45518
44916
|
init_TraitStateViewer();
|
|
45519
44917
|
init_StateNode();
|
|
45520
44918
|
init_TransitionArrow();
|
|
@@ -45534,7 +44932,6 @@ var init_StatsOrganism = __esm({
|
|
|
45534
44932
|
"components/marketing/organisms/StatsOrganism.tsx"() {
|
|
45535
44933
|
"use client";
|
|
45536
44934
|
init_cn();
|
|
45537
|
-
init_useTranslate();
|
|
45538
44935
|
init_StatsGrid();
|
|
45539
44936
|
init_LoadingState();
|
|
45540
44937
|
init_ErrorState();
|
|
@@ -45577,7 +44974,6 @@ var init_StepFlowOrganism = __esm({
|
|
|
45577
44974
|
"components/core/organisms/StepFlowOrganism.tsx"() {
|
|
45578
44975
|
"use client";
|
|
45579
44976
|
init_cn();
|
|
45580
|
-
init_useTranslate();
|
|
45581
44977
|
init_Stack();
|
|
45582
44978
|
init_Typography();
|
|
45583
44979
|
init_StepFlow();
|
|
@@ -45747,7 +45143,6 @@ var init_TeamOrganism = __esm({
|
|
|
45747
45143
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
45748
45144
|
"use client";
|
|
45749
45145
|
init_cn();
|
|
45750
|
-
init_useTranslate();
|
|
45751
45146
|
init_Stack();
|
|
45752
45147
|
init_Typography();
|
|
45753
45148
|
init_SimpleGrid();
|
|
@@ -45805,7 +45200,6 @@ var init_Timeline = __esm({
|
|
|
45805
45200
|
init_LoadingState();
|
|
45806
45201
|
init_ErrorState();
|
|
45807
45202
|
init_EmptyState();
|
|
45808
|
-
init_useTranslate();
|
|
45809
45203
|
lookStyles10 = {
|
|
45810
45204
|
"vertical-compact": "gap-1 [&>*]:py-1",
|
|
45811
45205
|
"vertical-spacious": "",
|
|
@@ -47877,7 +47271,6 @@ var init_UISlotRenderer = __esm({
|
|
|
47877
47271
|
init_Box();
|
|
47878
47272
|
init_Typography();
|
|
47879
47273
|
init_useEventBus();
|
|
47880
|
-
init_useTranslate();
|
|
47881
47274
|
init_slot_types();
|
|
47882
47275
|
init_cn();
|
|
47883
47276
|
init_ErrorBoundary();
|
|
@@ -47933,10 +47326,7 @@ var init_UISlotRenderer = __esm({
|
|
|
47933
47326
|
UISlotRenderer.displayName = "UISlotRenderer";
|
|
47934
47327
|
}
|
|
47935
47328
|
});
|
|
47936
|
-
|
|
47937
|
-
// hooks/index.ts
|
|
47938
|
-
init_useEventBus();
|
|
47939
|
-
var log2 = createLogger("almadar:ui:effects:client-handlers");
|
|
47329
|
+
var log = createLogger("almadar:ui:effects:client-handlers");
|
|
47940
47330
|
function createClientEffectHandlers(options) {
|
|
47941
47331
|
const { eventBus, slotSetter, navigate, notify, callService } = options;
|
|
47942
47332
|
return {
|
|
@@ -47945,10 +47335,10 @@ function createClientEffectHandlers(options) {
|
|
|
47945
47335
|
eventBus.emit(prefixedEvent, payload);
|
|
47946
47336
|
},
|
|
47947
47337
|
persist: async () => {
|
|
47948
|
-
|
|
47338
|
+
log.warn("persist is server-side only, ignored on client");
|
|
47949
47339
|
},
|
|
47950
47340
|
set: () => {
|
|
47951
|
-
|
|
47341
|
+
log.warn("set is server-side only, ignored on client");
|
|
47952
47342
|
},
|
|
47953
47343
|
callService: async (service, action, params) => {
|
|
47954
47344
|
if (callService) return callService(service, action, params);
|
|
@@ -47977,10 +47367,10 @@ function createClientEffectHandlers(options) {
|
|
|
47977
47367
|
slotSetter.addPattern(slot, pattern, props);
|
|
47978
47368
|
},
|
|
47979
47369
|
navigate: navigate ?? ((path) => {
|
|
47980
|
-
|
|
47370
|
+
log.warn("No navigate handler, ignoring", { path });
|
|
47981
47371
|
}),
|
|
47982
47372
|
notify: notify ?? ((msg, type) => {
|
|
47983
|
-
|
|
47373
|
+
log.debug("notify", { type, message: msg });
|
|
47984
47374
|
})
|
|
47985
47375
|
};
|
|
47986
47376
|
}
|
|
@@ -48130,7 +47520,7 @@ function normalizeEventKey(eventKey) {
|
|
|
48130
47520
|
return eventKey.startsWith("UI:") ? eventKey.slice(3) : eventKey;
|
|
48131
47521
|
}
|
|
48132
47522
|
function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
48133
|
-
const eventBus = useEventBus();
|
|
47523
|
+
const eventBus = useEventBus$1();
|
|
48134
47524
|
const { entities } = useEntitySchema();
|
|
48135
47525
|
const traitConfigsByName = options?.traitConfigsByName;
|
|
48136
47526
|
const orbitalsByTrait = options?.orbitalsByTrait;
|