@almadar/ui 5.21.10 → 5.21.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import * as React79 from 'react';
3
- import React79__default, { useContext, useMemo, useRef, useEffect, useCallback, createContext, Suspense, useState, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
3
+ import React79__default, { useContext, useMemo, useRef, useEffect, useCallback, Suspense, useState, lazy, createContext, useLayoutEffect, useId, useSyncExternalStore } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
@@ -10,6 +10,8 @@ import { Loader2, X, List, Printer, ChevronRight, ChevronLeft, CheckCircle, XCir
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
+ import { useTranslate } from '@almadar/ui/hooks';
14
+ export * from '@almadar/ui/hooks';
13
15
  import { evaluate, createMinimalContext } from '@almadar/evaluator';
14
16
  import { createPortal } from 'react-dom';
15
17
  import { Link, Outlet, useLocation } from 'react-router-dom';
@@ -45,7 +47,6 @@ import { useNodeId, ReactFlowProvider, Handle, Position } from '@xyflow/react';
45
47
  import { useUISlots } from '@almadar/ui/context';
46
48
  import { getPatternDefinition, getComponentForPattern as getComponentForPattern$1 } from '@almadar/patterns';
47
49
  import { context, Canvas } from '@react-three/fiber';
48
- import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
49
50
 
50
51
  var __defProp = Object.defineProperty;
51
52
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1110,11 +1111,11 @@ function ensureObserver() {
1110
1111
  });
1111
1112
  cachedFamily = getCurrentIconFamily();
1112
1113
  }
1113
- function subscribeIconFamily(notify2) {
1114
+ function subscribeIconFamily(notify) {
1114
1115
  ensureObserver();
1115
- listeners.add(notify2);
1116
+ listeners.add(notify);
1116
1117
  return () => {
1117
- listeners.delete(notify2);
1118
+ listeners.delete(notify);
1118
1119
  };
1119
1120
  }
1120
1121
  function getIconFamilySnapshot() {
@@ -2030,521 +2031,11 @@ var init_Button = __esm({
2030
2031
  Button.displayName = "Button";
2031
2032
  }
2032
2033
  });
2033
-
2034
- // locales/en.json
2035
- var en_default;
2036
- var init_en = __esm({
2037
- "locales/en.json"() {
2038
- en_default = {
2039
- $meta: {
2040
- locale: "en",
2041
- direction: "ltr"
2042
- },
2043
- "common.save": "Save",
2044
- "common.cancel": "Cancel",
2045
- "common.delete": "Delete",
2046
- "common.close": "Close",
2047
- "common.confirm": "Are you sure?",
2048
- "common.create": "Create",
2049
- "common.edit": "Edit",
2050
- "common.view": "View",
2051
- "common.add": "Add",
2052
- "common.remove": "Remove",
2053
- "common.search": "Search...",
2054
- "common.filter": "Filter",
2055
- "common.actions": "Actions",
2056
- "common.yes": "Yes",
2057
- "common.no": "No",
2058
- "common.selected": "selected",
2059
- "common.ok": "OK",
2060
- "common.done": "Done",
2061
- "common.apply": "Apply",
2062
- "common.reset": "Reset",
2063
- "common.refresh": "Refresh",
2064
- "common.export": "Export",
2065
- "common.import": "Import",
2066
- "common.copy": "Copy",
2067
- "common.settings": "Settings",
2068
- "nav.previous": "Previous",
2069
- "nav.next": "Next",
2070
- "nav.back": "Back",
2071
- "nav.home": "Home",
2072
- "form.submit": "Submit",
2073
- "form.saving": "Saving...",
2074
- "form.required": "This field is required",
2075
- "form.invalidEmail": "Enter a valid email address",
2076
- "form.selectPlaceholder": "Select {{label}}...",
2077
- "form.searchPlaceholder": "Search {{entity}}...",
2078
- "table.empty.title": "No items found",
2079
- "table.empty.description": "No items to display.",
2080
- "table.search.placeholder": "Search...",
2081
- "table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
2082
- "table.pagination.page": "Page {{page}} of {{totalPages}}",
2083
- "table.bulk.selected": "{{count}} selected",
2084
- "table.loading": "Loading...",
2085
- "status.loading": "Loading...",
2086
- "status.scheduled": "Scheduled",
2087
- "status.inProgress": "In Progress",
2088
- "status.completed": "Completed",
2089
- "status.cancelled": "Cancelled",
2090
- "status.pending": "Pending",
2091
- "status.active": "Active",
2092
- "status.inactive": "Inactive",
2093
- "status.draft": "Draft",
2094
- "status.archived": "Archived",
2095
- "error.generic": "Something went wrong",
2096
- "error.retry": "Try again",
2097
- "error.notFound": "Not found",
2098
- "error.loadFailed": "Failed to load: {{message}}",
2099
- "error.configMissing": "Configuration not found for: {{id}}",
2100
- "common.loading": "Loading...",
2101
- "common.showMore": "Show More",
2102
- "common.showLess": "Show Less",
2103
- "common.noResults": "No results found",
2104
- "common.saveChanges": "Save Changes",
2105
- "common.retry": "Retry",
2106
- "common.open": "Open",
2107
- "common.back": "Back",
2108
- "empty.noItems": "No items",
2109
- "empty.noData": "No data available",
2110
- "empty.noItemsYet": "No items yet",
2111
- "empty.noItemsAdded": "No items added yet",
2112
- "empty.noOptionsFound": "No options found",
2113
- "list.addItemPlaceholder": "Add new item...",
2114
- "error.occurred": "An error occurred",
2115
- "error.failedToLoad": "Failed to load data",
2116
- "wizard.back": "Back",
2117
- "wizard.next": "Next",
2118
- "wizard.complete": "Complete",
2119
- "wizard.stepOf": "Step {{current}} of {{total}}",
2120
- "pagination.previous": "Previous",
2121
- "pagination.next": "Next",
2122
- "pagination.total": "Total:",
2123
- "pagination.show": "Show:",
2124
- "pagination.goTo": "Go to:",
2125
- "pagination.go": "Go",
2126
- "auth.signIn": "Sign in",
2127
- "auth.signOut": "Sign out",
2128
- "dialog.confirm": "Confirm",
2129
- "dialog.cancel": "Cancel",
2130
- "dialog.loading": "Loading...",
2131
- "dialog.delete.title": "Delete {{item}}?",
2132
- "dialog.delete.message": "This action cannot be undone.",
2133
- "trait.availableActions": "Available Actions",
2134
- "trait.transitions": "Transitions",
2135
- "trait.availableNow": "Available now",
2136
- "book.startReading": "Start Reading",
2137
- "book.tableOfContents": "Table of Contents",
2138
- "book.partNumber": "Part {{number}}",
2139
- "book.print": "Print",
2140
- "book.previousPage": "Previous page",
2141
- "book.nextPage": "Next page",
2142
- "quiz.showAnswer": "Show answer",
2143
- "quiz.hideAnswer": "Hide answer",
2144
- "aria.closeModal": "Close modal",
2145
- "aria.closeToast": "Dismiss toast",
2146
- "aria.closeAlert": "Dismiss alert",
2147
- "aria.removeFilter": "Remove filter",
2148
- "aria.closeDrawer": "Close drawer",
2149
- "aria.closePanel": "Close panel",
2150
- "aria.previousImage": "Previous image",
2151
- "aria.nextImage": "Next image",
2152
- "aria.dismiss": "Dismiss",
2153
- "aria.previousSlide": "Previous slide",
2154
- "aria.nextSlide": "Next slide",
2155
- "aria.previousDays": "Previous days",
2156
- "aria.nextDays": "Next days",
2157
- "aria.decrease": "Decrease",
2158
- "aria.increase": "Increase",
2159
- "aria.breadcrumb": "Breadcrumb",
2160
- "aria.tableOfContents": "Table of contents",
2161
- "aria.docsSidebar": "Documentation sidebar",
2162
- "aria.selectAllRows": "Select all rows",
2163
- "aria.selectAll": "Select all",
2164
- "aria.upvote": "Upvote",
2165
- "aria.downvote": "Downvote",
2166
- "aria.qrScanner": "QR scanner",
2167
- "aria.mockScanDev": "Mock scan (dev)",
2168
- "aria.openMenu": "Open menu",
2169
- "aria.closeMenu": "Close menu",
2170
- "aria.openSidebar": "Open sidebar",
2171
- "sidebar.expand": "Expand sidebar",
2172
- "sidebar.collapse": "Collapse sidebar",
2173
- "sidebar.close": "Close sidebar",
2174
- "loading.items": "Loading items...",
2175
- "card.imageAlt": "Image",
2176
- "canvas.emptyMessage": "No content",
2177
- "canvas.errorTitle": "Canvas error",
2178
- "book.noData": "No data",
2179
- "common.notifications": "Notifications",
2180
- "common.remaining": "{{count}} remaining",
2181
- "error.somethingWentWrong": "Something went wrong",
2182
- "error.loadingItems": "Loading items...",
2183
- "error.noItemsFound": "No items found",
2184
- "debug.noEntityData": "No entity data",
2185
- "debug.noEntities": "No entities",
2186
- "debug.noTicks": "No ticks registered",
2187
- "debug.noActiveTraits": "No active traits",
2188
- "debug.noGuardEvaluations": "No guard evaluations",
2189
- "debug.noBridgeData": "No bridge data",
2190
- "debug.status": "Status",
2191
- "debug.eventsForwarded": "Events Forwarded (Client \u2192 Server)",
2192
- "debug.eventsReceived": "Events Received (Server \u2192 Client)",
2193
- "debug.lastHeartbeat": "Last Heartbeat",
2194
- "debug.noEventsYet": "No events yet",
2195
- "debug.noTransitionsRecorded": "No transitions recorded",
2196
- "debug.noVerificationChecks": "No verification checks yet",
2197
- "display.chartError": "Chart error",
2198
- "display.codeViewerError": "Code viewer error",
2199
- "display.noCode": "No code",
2200
- "display.documentError": "Document error",
2201
- "display.noDocument": "No document",
2202
- "display.graphError": "Graph error",
2203
- "display.noGraphData": "No graph data",
2204
- "display.galleryError": "Gallery error",
2205
- "display.noMedia": "No media",
2206
- "display.meterError": "Meter error",
2207
- "display.signaturePadError": "Signature pad error",
2208
- "display.timelineError": "Timeline error",
2209
- "display.noEvents": "No events",
2210
- "template.features": "Features",
2211
- "template.howItWorks": "How It Works",
2212
- "template.showcase": "Showcase",
2213
- "template.faq": "Frequently Asked Questions",
2214
- "template.ourTeam": "Our Team",
2215
- "template.caseStudies": "Case Studies",
2216
- "richBlockEditor.toolbar.text": "Text",
2217
- "richBlockEditor.toolbar.h1": "H1",
2218
- "richBlockEditor.toolbar.h2": "H2",
2219
- "richBlockEditor.toolbar.h3": "H3",
2220
- "richBlockEditor.toolbar.bulletList": "Bullet list",
2221
- "richBlockEditor.toolbar.numbered": "Numbered",
2222
- "richBlockEditor.toolbar.quote": "Quote",
2223
- "richBlockEditor.toolbar.code": "Code",
2224
- "richBlockEditor.toolbar.divider": "Divider",
2225
- "richBlockEditor.toolbar.image": "Image",
2226
- "richBlockEditor.blockType.paragraph": "Text",
2227
- "richBlockEditor.blockType.heading1": "Heading 1",
2228
- "richBlockEditor.blockType.heading2": "Heading 2",
2229
- "richBlockEditor.blockType.heading3": "Heading 3",
2230
- "richBlockEditor.blockType.bulletList": "Bullet list",
2231
- "richBlockEditor.blockType.numberedList": "Numbered list",
2232
- "richBlockEditor.blockType.quote": "Quote",
2233
- "richBlockEditor.blockType.code": "Code",
2234
- "richBlockEditor.blockType.divider": "Divider",
2235
- "richBlockEditor.blockType.image": "Image",
2236
- "richBlockEditor.blockActions": "Block actions",
2237
- "richBlockEditor.duplicate": "Duplicate",
2238
- "richBlockEditor.turnInto": "Turn into",
2239
- "richBlockEditor.placeholder.heading1": "Heading 1",
2240
- "richBlockEditor.placeholder.heading2": "Heading 2",
2241
- "richBlockEditor.placeholder.heading3": "Heading 3",
2242
- "richBlockEditor.placeholder.quote": "Quote",
2243
- "richBlockEditor.placeholder.code": "Enter code",
2244
- "richBlockEditor.placeholder.paragraph": "Start writing...",
2245
- "richBlockEditor.placeholder.listItem": "List item",
2246
- "richBlockEditor.placeholder.caption": "Caption (optional)",
2247
- "richBlockEditor.aria.heading1Block": "Heading 1 block",
2248
- "richBlockEditor.aria.heading2Block": "Heading 2 block",
2249
- "richBlockEditor.aria.heading3Block": "Heading 3 block",
2250
- "richBlockEditor.aria.quoteBlock": "Quote block",
2251
- "richBlockEditor.aria.codeBlock": "Code block",
2252
- "richBlockEditor.aria.codeLanguage": "Code language",
2253
- "richBlockEditor.aria.imageUrl": "Image URL",
2254
- "richBlockEditor.aria.imageCaption": "Image caption",
2255
- "richBlockEditor.aria.listItem": "List item",
2256
- "richBlockEditor.aria.removeListItem": "Remove list item",
2257
- "richBlockEditor.aria.paragraphBlock": "Paragraph block",
2258
- "richBlockEditor.embeddedImage": "Embedded image",
2259
- "richBlockEditor.noImageUrl": "No image URL set",
2260
- "richBlockEditor.addItem": "Add item",
2261
- "richBlockEditor.insertParagraphBelow": "Insert paragraph below",
2262
- "richBlockEditor.editorToolbar": "Block editor toolbar",
2263
- "richBlockEditor.insertEntry": "Insert {{label}}",
2264
- "versionDiff.compare": "Compare",
2265
- "versionDiff.to": "to",
2266
- "versionDiff.beforeRevision": "Before revision",
2267
- "versionDiff.afterRevision": "After revision",
2268
- "versionDiff.switchToInline": "Switch to inline view",
2269
- "versionDiff.switchToSideBySide": "Switch to side-by-side view",
2270
- "versionDiff.revert": "Revert",
2271
- "versionDiff.byAuthor": " by {{author}}",
2272
- "violationAlert.actionType.measure": "Corrective Measure",
2273
- "violationAlert.actionType.admin": "Administrative Action",
2274
- "violationAlert.actionType.penalty": "Penalty Proceedings",
2275
- "violationAlert.fallbackMessage": "Violation",
2276
- "violationAlert.adminLabel": "Admin:",
2277
- "violationAlert.penaltyLabel": "Penalty:",
2278
- "violationAlert.goToField": "Go to field",
2279
- "branchingLogic.title": "Branching logic",
2280
- "branchingLogic.if": "If",
2281
- "branchingLogic.goTo": "go to",
2282
- "branchingLogic.rules": "Rules",
2283
- "branchingLogic.logicGraph": "Logic graph",
2284
- "branchingLogic.addRule": "Add rule",
2285
- "branchingLogic.deleteRule": "Delete rule",
2286
- "branchingLogic.endOfSurvey": "End of survey",
2287
- "branchingLogic.brokenReference": "Broken reference",
2288
- "branchingLogic.selectQuestion": "Select question",
2289
- "branchingLogic.selectTarget": "Select target",
2290
- "branchingLogic.selectValue": "Select value",
2291
- "branchingLogic.addValue": "Add value",
2292
- "branchingLogic.value": "Value",
2293
- "branchingLogic.typeValuePressEnter": "Type value, press Enter",
2294
- "branchingLogic.operatorEquals": "equals",
2295
- "branchingLogic.operatorNotEquals": "does not equal",
2296
- "branchingLogic.operatorContains": "contains",
2297
- "branchingLogic.operatorIn": "is one of",
2298
- "branchingLogic.graphAriaLabel": "Branching logic graph",
2299
- "branchingLogic.ruleCountOne": "{{count}} rule",
2300
- "branchingLogic.ruleCountOther": "{{count}} rules",
2301
- "branchingLogic.brokenCount": "{{count}} broken",
2302
- "branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
2303
- "branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
2304
- "filterGroup.filters": "Filters",
2305
- "filterGroup.all": "All",
2306
- "filterGroup.clear": "Clear",
2307
- "filterGroup.clearAll": "Clear all",
2308
- "filterGroup.from": "From",
2309
- "filterGroup.to": "To",
2310
- "filterGroup.allOf": "All {{label}}",
2311
- "filterGroup.activeCount": "{{count}} active",
2312
- "debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
2313
- "debug.expression": "Expression",
2314
- "debug.inputs": "Inputs",
2315
- "debug.trait": "Trait",
2316
- "debug.filterAll": "All",
2317
- "debug.filterPassed": "Passed",
2318
- "debug.filterFailed": "Failed",
2319
- "debug.traitsInitHint": "Traits will appear when the state machine initializes",
2320
- "debug.traitsMountHint": "Traits will appear when components using them are mounted",
2321
- "debug.activeStates": "Active States",
2322
- "debug.availableEvents": "Available Events",
2323
- "debug.noTransitionsFromState": "No transitions from current state",
2324
- "debug.guarded": "guarded",
2325
- "debug.otherEvents": "Other Events (not available from current state)",
2326
- "debug.recentTransitions": "Recent Transitions",
2327
- "debug.transitionsCount": "{{count}} transitions",
2328
- "debug.states": "States",
2329
- "debug.transitions": "Transitions",
2330
- "debug.guards": "Guards",
2331
- "debug.debugModeHint": "Debug mode may not be enabled",
2332
- "debug.entitiesSpawnHint": "Entities will appear when spawned",
2333
- "debug.singleton": "Singleton",
2334
- "debug.singletonsCount": "Singletons ({{count}})",
2335
- "debug.runtimeCount": "Runtime ({{count}})",
2336
- "debug.moreEntities": "+{{count}} more entities",
2337
- "debug.persistent": "Persistent",
2338
- "debug.loadedCount": "{{count}} loaded",
2339
- "debug.notLoaded": "not loaded",
2340
- "debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
2341
- "debug.allCount": "All ({{count}})",
2342
- "debug.autoScroll": "Auto-scroll",
2343
- "debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
2344
- "debug.transitionsRecorded": "{{count}} transitions recorded",
2345
- "debug.guardLabel": "guard:",
2346
- "debug.effectsCount": "{{count}} effects",
2347
- "debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
2348
- "debug.never": "Never",
2349
- "debug.connected": "Connected",
2350
- "debug.disconnected": "Disconnected",
2351
- "debug.lastError": "Last Error",
2352
- "debug.totalEventsProcessed": "{{count}} total events processed",
2353
- "debug.server": "server",
2354
- "debug.clientEffectsCount": "{{count}} clientEffects",
2355
- "debug.emitLabel": "emit:",
2356
- "debug.rowsCount": "{{count}} rows",
2357
- "debug.serverResponse": "server response",
2358
- "debug.collapseVerificationTimeline": "Collapse verification timeline",
2359
- "debug.expandVerificationTimeline": "Expand verification timeline",
2360
- "debug.failCount": "{{count}} fail",
2361
- "debug.ok": "OK",
2362
- "debug.localCount": "{{count}} local",
2363
- "debug.serverCount": "{{count}} server",
2364
- "debug.waitingForTransitions": "Waiting for transitions...",
2365
- "debug.tabDispatch": "Dispatch",
2366
- "debug.tabVerify": "Verify",
2367
- "debug.tabVerifyAlert": "Verify (!)",
2368
- "debug.tabTimeline": "Timeline",
2369
- "debug.tabBridge": "Bridge",
2370
- "debug.tabTraits": "Traits",
2371
- "debug.tabTicks": "Ticks",
2372
- "debug.tabEntities": "Entities",
2373
- "debug.tabEvents": "Events",
2374
- "debug.tabGuards": "Guards",
2375
- "debug.debugger": "Debugger",
2376
- "debug.failedCount": "{{count}} failed",
2377
- "debug.traitsCount": "{{count}} traits",
2378
- "debug.idle": "Idle",
2379
- "debug.openDebugger": "Open Debugger (`)",
2380
- "debug.kflowVerifier": "KFlow Verifier",
2381
- "debug.allPassing": "All passing",
2382
- "debug.runtime": "Runtime",
2383
- "debug.close": "Close (`)",
2384
- "debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
2385
- "replyTree.expandReplies": "Expand replies",
2386
- "replyTree.collapseReplies": "Collapse replies",
2387
- "replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
2388
- "replyTree.replyTo": "Reply to {{author}}",
2389
- "replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
2390
- "replyTree.reply": "Reply",
2391
- "replyTree.flagReplyBy": "Flag reply by {{author}}",
2392
- "replyTree.flag": "Flag",
2393
- "replyTree.send": "Send",
2394
- "replyTree.continueThread": "Continue thread",
2395
- "replyTree.noRepliesYet": "No replies yet.",
2396
- "signaturePad.label": "Signature",
2397
- "signaturePad.helperText": "Draw your signature above",
2398
- "signaturePad.clear": "Clear",
2399
- "signaturePad.confirm": "Confirm",
2400
- "qrScanner.cameraUnavailable": "Camera unavailable",
2401
- "qrScanner.paused": "Paused",
2402
- "qrScanner.resumeScanning": "Resume scanning",
2403
- "qrScanner.pauseScanning": "Pause scanning",
2404
- "qrScanner.switchToFrontCamera": "Switch to front camera",
2405
- "qrScanner.switchToRearCamera": "Switch to rear camera",
2406
- "qrScanner.mockScan": "Mock Scan",
2407
- "docSearch.placeholder": "Search documentation...",
2408
- "stateMachine.loading": "Loading state machine\u2026",
2409
- "stateMachine.noStateMachine": "No state machine to visualize",
2410
- "avl.trigger": "Trigger",
2411
- "avl.guard": "Guard",
2412
- "avl.effects": "Effects",
2413
- "avl.props": "Props",
2414
- "avl.entity": "Entity",
2415
- "avl.traits": "Traits",
2416
- "avl.transition": "Transition",
2417
- "avl.onEntity": "on {{entity}}",
2418
- "avl.linkedTo": "linked to {{entity}}",
2419
- "avl.pressEscToZoomOut": "Press Esc to zoom out",
2420
- "avl.zoomIn": "Zoom in",
2421
- "avl.zoomOut": "Zoom out",
2422
- "avl.orbitalLabel": "Orbital: {{name}}",
2423
- "avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
2424
- "avl.noTraitData": "No trait data",
2425
- "avl.computingLayout": "Computing layout...",
2426
- "avl.noStateMachine": "No state machine",
2427
- "avl.listensFor": "listens for {{event}}",
2428
- "avl.emits": "emits {{event}}",
2429
- "avl.pageLayout": "Page Layout",
2430
- "avl.overlaySuffix": "(overlay)",
2431
- "orbPreview.previewBadge": "Preview",
2432
- "orbPreview.doubleClickToOpen": "Double-click to open",
2433
- "orbPreview.dropToAddAndOpen": "Drop to add and open",
2434
- "orbPreview.dispatching": "Coordinator is dispatching to this orbital",
2435
- "orbPreview.noPreview": "No preview available",
2436
- "orbPreview.screensCount": "{{count}} screens",
2437
- "detailView.noTransitionData": "No transition data",
2438
- "orbInspector.required": "req",
2439
- "orbInspector.addField": "Add Field",
2440
- "orbInspector.serviceMode": "Service Mode",
2441
- "orbInspector.standalone": "Standalone",
2442
- "orbInspector.embedded": "Embedded",
2443
- "orbInspector.rendersOwnUi": "Renders its own UI",
2444
- "orbInspector.headless": "Headless, wired to other behaviors",
2445
- "orbInspector.addEffect": "Add Effect",
2446
- "orbInspector.guardExpression": "Guard expression",
2447
- "orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
2448
- "orbInspector.tokens": "Tokens",
2449
- "orbInspector.noTokenContract": "No token contract declared for this pattern.",
2450
- "orbInspector.variant": "Variant",
2451
- "orbInspector.size": "Size",
2452
- "orbInspector.statesCount": "{{count}} states",
2453
- "orbInspector.onEntity": " on {{entity}}",
2454
- "orbInspector.projectThemeTokens": "Project theme tokens",
2455
- "orbInspector.tokenGroup.colors": "Colors",
2456
- "orbInspector.tokenGroup.radii": "Radii",
2457
- "orbInspector.tokenGroup.spacing": "Spacing",
2458
- "orbInspector.tokenGroup.shadows": "Shadows",
2459
- "orbInspector.tab.inspector": "Inspector",
2460
- "orbInspector.tab.styles": "Styles",
2461
- "orbInspector.tab.code": "Code",
2462
- "canvas.goBackToOverview": "Go back to overview",
2463
- "canvas.overview": "Overview",
2464
- "canvas.expanded": "Expanded",
2465
- "canvas.modulesCount": "{{count}} modules",
2466
- "canvas.screensCount": "{{count}} screens",
2467
- "canvas.switchToView": "Switch to {{label}} view",
2468
- "lawReference.viewFullText": "View full law text",
2469
- "statCard.defaultLabel": "Stat",
2470
- "statCard.vsLastPeriod": "vs last period",
2471
- "mediaGallery.upload": "Upload",
2472
- "mediaGallery.noMediaDescription": "No media items to display.",
2473
- "pagination.jumpPlaceholder": "Page",
2474
- "table.selectRow": "Select row {{id}}",
2475
- "card.selectItem": "Select {{item}}",
2476
- "card.itemFallback": "item",
2477
- "fileTree.noFiles": "No files",
2478
- "masterDetail.selectItem": "Select an item to view details",
2479
- "empty.createFirst": "Create your first item to get started.",
2480
- "upload.dropOrBrowse": "Drop files here or click to browse",
2481
- "upload.dropFilesHere": "Drop files here",
2482
- "upload.accepted": "Accepted: {{accept}}",
2483
- "upload.maxSize": "Max size: {{size}}",
2484
- "upload.maxFiles": "Up to {{count}} files",
2485
- "upload.error.maxFiles": "Maximum {{count}} files allowed",
2486
- "upload.error.invalidType": "Invalid file type: {{name}}",
2487
- "upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
2488
- "optionConstraint.requiredOne": "Required, pick 1",
2489
- "optionConstraint.optionalOne": "Optional, pick up to 1",
2490
- "optionConstraint.pickExactly": "Pick exactly {{count}}",
2491
- "optionConstraint.pickRange": "Pick {{min}}-{{max}}",
2492
- "optionConstraint.pickAtLeast": "Pick at least {{count}}",
2493
- "optionConstraint.pickUpTo": "Pick up to {{count}}",
2494
- "optionConstraint.optional": "Optional",
2495
- "optionConstraint.outOfStock": "Out of stock",
2496
- "optionConstraint.error.pickOne": "Pick 1 option",
2497
- "optionConstraint.error.pickOnlyOne": "Pick only 1 option",
2498
- "optionConstraint.error.pickMore": "Pick at least {{count}} more",
2499
- "optionConstraint.error.removeOptions": "Remove {{count}} options",
2500
- "stateMachine.pinned": "Pinned",
2501
- "stateMachine.eventCount": "{{count}} events",
2502
- "stateMachine.externalEffects": "External Effects",
2503
- "stateMachine.legend.initial": "Initial",
2504
- "stateMachine.legend.final": "Final",
2505
- "stateMachine.legend.state": "State",
2506
- "stateMachine.legend.multiEvent": "Multi-event",
2507
- "relationSelect.selectPlaceholder": "Select..."
2508
- };
2509
- }
2510
- });
2511
- function useTranslate() {
2512
- return useContext(I18nContext);
2513
- }
2514
- function createTranslate(messages) {
2515
- return (key, params) => {
2516
- let msg = messages[key] ?? coreLocale[key] ?? key;
2517
- if (params) {
2518
- for (const [k, v] of Object.entries(params)) {
2519
- msg = msg.split(`{{${k}}}`).join(String(v));
2520
- }
2521
- }
2522
- return msg;
2523
- };
2524
- }
2525
- var _meta, coreMessages, coreLocale, I18nContext, I18nProvider;
2526
- var init_useTranslate = __esm({
2527
- "hooks/useTranslate.ts"() {
2528
- "use client";
2529
- init_en();
2530
- ({ $meta: _meta, ...coreMessages } = en_default);
2531
- coreLocale = coreMessages;
2532
- I18nContext = createContext({
2533
- locale: "en",
2534
- direction: "ltr",
2535
- t: (key) => coreLocale[key] ?? key
2536
- // core locale fallback
2537
- });
2538
- I18nContext.displayName = "I18nContext";
2539
- I18nProvider = I18nContext.Provider;
2540
- }
2541
- });
2542
2034
  var Input;
2543
2035
  var init_Input = __esm({
2544
2036
  "components/core/atoms/Input.tsx"() {
2545
2037
  init_cn();
2546
2038
  init_Icon();
2547
- init_useTranslate();
2548
2039
  Input = React79__default.forwardRef(
2549
2040
  ({
2550
2041
  className,
@@ -3019,7 +2510,6 @@ var init_FilterPill = __esm({
3019
2510
  "components/core/atoms/FilterPill.tsx"() {
3020
2511
  init_cn();
3021
2512
  init_useEventBus();
3022
- init_useTranslate();
3023
2513
  init_Icon();
3024
2514
  variantStyles4 = {
3025
2515
  default: [
@@ -4966,7 +4456,6 @@ var init_LawReferenceTooltip = __esm({
4966
4456
  init_Typography();
4967
4457
  init_Divider();
4968
4458
  init_cn();
4969
- init_useTranslate();
4970
4459
  positionStyles2 = {
4971
4460
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
4972
4461
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
@@ -6749,7 +6238,6 @@ var init_Modal = __esm({
6749
6238
  init_Overlay();
6750
6239
  init_cn();
6751
6240
  init_useEventBus();
6752
- init_useTranslate();
6753
6241
  sizeClasses6 = {
6754
6242
  sm: "max-w-md",
6755
6243
  md: "max-w-2xl",
@@ -6971,7 +6459,6 @@ var init_Drawer = __esm({
6971
6459
  init_Overlay();
6972
6460
  init_cn();
6973
6461
  init_useEventBus();
6974
- init_useTranslate();
6975
6462
  sizeWidths = {
6976
6463
  sm: "w-full sm:w-80",
6977
6464
  // 320px
@@ -7153,7 +6640,6 @@ var init_Toast = __esm({
7153
6640
  init_Badge();
7154
6641
  init_cn();
7155
6642
  init_useEventBus();
7156
- init_useTranslate();
7157
6643
  variantClasses = {
7158
6644
  success: "bg-card border-[length:var(--border-width)] border-success",
7159
6645
  error: "bg-card border-[length:var(--border-width)] border-error",
@@ -7280,7 +6766,6 @@ var init_ErrorState = __esm({
7280
6766
  init_Typography();
7281
6767
  init_Icon();
7282
6768
  init_useEventBus();
7283
- init_useTranslate();
7284
6769
  ErrorState = ({
7285
6770
  title,
7286
6771
  message,
@@ -7323,7 +6808,6 @@ var init_ErrorBoundary = __esm({
7323
6808
  "use client";
7324
6809
  init_cn();
7325
6810
  init_ErrorState();
7326
- init_useTranslate();
7327
6811
  DefaultFallback = ({ error, onRetry }) => {
7328
6812
  const { t } = useTranslate();
7329
6813
  return /* @__PURE__ */ jsx(
@@ -7473,7 +6957,6 @@ var init_Skeleton = __esm({
7473
6957
  "components/core/molecules/Skeleton.tsx"() {
7474
6958
  "use client";
7475
6959
  init_cn();
7476
- init_useTranslate();
7477
6960
  init_Box();
7478
6961
  init_Stack();
7479
6962
  init_Stack();
@@ -8123,7 +7606,6 @@ var AboutPageTemplate;
8123
7606
  var init_AboutPageTemplate = __esm({
8124
7607
  "components/marketing/templates/AboutPageTemplate.tsx"() {
8125
7608
  init_cn();
8126
- init_useTranslate();
8127
7609
  init_Stack();
8128
7610
  init_Box();
8129
7611
  init_Typography();
@@ -8228,7 +7710,6 @@ var init_Alert = __esm({
8228
7710
  init_Icon();
8229
7711
  init_Typography();
8230
7712
  init_useEventBus();
8231
- init_useTranslate();
8232
7713
  variantBorderClasses = {
8233
7714
  info: "border-info",
8234
7715
  success: "border-success",
@@ -8588,7 +8069,6 @@ var init_Menu = __esm({
8588
8069
  init_Badge();
8589
8070
  init_cn();
8590
8071
  init_useEventBus();
8591
- init_useTranslate();
8592
8072
  Menu = ({
8593
8073
  trigger,
8594
8074
  items,
@@ -8876,7 +8356,6 @@ var init_FloatingActionButton = __esm({
8876
8356
  init_Typography();
8877
8357
  init_cn();
8878
8358
  init_useEventBus();
8879
- init_useTranslate();
8880
8359
  FloatingActionButton = ({
8881
8360
  action,
8882
8361
  actionPayload,
@@ -9058,13 +8537,13 @@ var init_MapView = __esm({
9058
8537
  shadowSize: [41, 41]
9059
8538
  });
9060
8539
  L.Marker.prototype.options.icon = defaultIcon;
9061
- const { useEffect: useEffect74, useRef: useRef68, useCallback: useCallback128, useState: useState112 } = React79__default;
8540
+ const { useEffect: useEffect69, useRef: useRef66, useCallback: useCallback113, useState: useState99 } = React79__default;
9062
8541
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9063
8542
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9064
8543
  function MapUpdater({ centerLat, centerLng, zoom }) {
9065
8544
  const map = useMap();
9066
- const prevRef = useRef68({ centerLat, centerLng, zoom });
9067
- useEffect74(() => {
8545
+ const prevRef = useRef66({ centerLat, centerLng, zoom });
8546
+ useEffect69(() => {
9068
8547
  const prev = prevRef.current;
9069
8548
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
9070
8549
  map.setView([centerLat, centerLng], zoom);
@@ -9075,7 +8554,7 @@ var init_MapView = __esm({
9075
8554
  }
9076
8555
  function MapClickHandler({ onMapClick }) {
9077
8556
  const map = useMap();
9078
- useEffect74(() => {
8557
+ useEffect69(() => {
9079
8558
  if (!onMapClick) return;
9080
8559
  const handler = (e) => {
9081
8560
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -9103,8 +8582,8 @@ var init_MapView = __esm({
9103
8582
  showAttribution = true
9104
8583
  }) {
9105
8584
  const eventBus = useEventBus2();
9106
- const [clickedPosition, setClickedPosition] = useState112(null);
9107
- const handleMapClick = useCallback128((lat, lng) => {
8585
+ const [clickedPosition, setClickedPosition] = useState99(null);
8586
+ const handleMapClick = useCallback113((lat, lng) => {
9108
8587
  if (showClickedPin) {
9109
8588
  setClickedPosition({ lat, lng });
9110
8589
  }
@@ -9113,7 +8592,7 @@ var init_MapView = __esm({
9113
8592
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
9114
8593
  }
9115
8594
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
9116
- const handleMarkerClick = useCallback128((marker) => {
8595
+ const handleMarkerClick = useCallback113((marker) => {
9117
8596
  onMarkerClick?.(marker);
9118
8597
  if (markerClickEvent) {
9119
8598
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -9979,7 +9458,6 @@ var init_ActionTile = __esm({
9979
9458
  "components/game/organisms/puzzles/sequencer/ActionTile.tsx"() {
9980
9459
  init_atoms2();
9981
9460
  init_cn();
9982
- init_useTranslate();
9983
9461
  DRAG_MIME = "application/x-almadar-slot-item";
9984
9462
  SIZE_CONFIG = {
9985
9463
  sm: { px: "px-2 py-1", icon: "text-lg", text: "text-xs" },
@@ -10017,7 +9495,6 @@ var init_ActionPalette = __esm({
10017
9495
  "components/game/organisms/puzzles/sequencer/ActionPalette.tsx"() {
10018
9496
  init_atoms2();
10019
9497
  init_cn();
10020
- init_useTranslate();
10021
9498
  init_ActionTile();
10022
9499
  ActionPalette.displayName = "ActionPalette";
10023
9500
  }
@@ -10027,7 +9504,6 @@ var init_AuthLayout = __esm({
10027
9504
  "components/core/templates/AuthLayout.tsx"() {
10028
9505
  "use client";
10029
9506
  init_cn();
10030
- init_useTranslate();
10031
9507
  init_Box();
10032
9508
  init_Stack();
10033
9509
  init_Typography();
@@ -10172,7 +9648,6 @@ var init_LoadingState = __esm({
10172
9648
  init_atoms2();
10173
9649
  init_Stack();
10174
9650
  init_Typography();
10175
- init_useTranslate();
10176
9651
  LoadingState = ({
10177
9652
  title,
10178
9653
  message,
@@ -11255,7 +10730,6 @@ var init_IsometricCanvas = __esm({
11255
10730
  "use client";
11256
10731
  init_cn();
11257
10732
  init_useEventBus();
11258
- init_useTranslate();
11259
10733
  init_Box();
11260
10734
  init_Stack();
11261
10735
  init_Icon();
@@ -11619,7 +11093,6 @@ var init_BattleBoard = __esm({
11619
11093
  "use client";
11620
11094
  init_cn();
11621
11095
  init_useEventBus();
11622
- init_useTranslate();
11623
11096
  init_Box();
11624
11097
  init_Button();
11625
11098
  init_Typography();
@@ -12379,7 +11852,6 @@ var log4, SWIM_GUTTER, CENTER_W, BehaviorView;
12379
11852
  var init_BehaviorView = __esm({
12380
11853
  "components/avl/molecules/BehaviorView.tsx"() {
12381
11854
  "use client";
12382
- init_useTranslate();
12383
11855
  init_AvlState();
12384
11856
  init_AvlTransitionLane();
12385
11857
  init_AvlSwimLane();
@@ -12494,7 +11966,6 @@ var MIN_DIAGRAM_WIDTH, ScaledDiagram;
12494
11966
  var init_ScaledDiagram = __esm({
12495
11967
  "components/core/molecules/ScaledDiagram.tsx"() {
12496
11968
  init_Box();
12497
- init_useTranslate();
12498
11969
  init_cn();
12499
11970
  MIN_DIAGRAM_WIDTH = 200;
12500
11971
  ScaledDiagram = ({
@@ -12637,7 +12108,6 @@ var init_CodeBlock = __esm({
12637
12108
  init_Textarea();
12638
12109
  init_Icon();
12639
12110
  init_useEventBus();
12640
- init_useTranslate();
12641
12111
  SyntaxHighlighter.registerLanguage("json", langJson);
12642
12112
  SyntaxHighlighter.registerLanguage("javascript", langJavascript);
12643
12113
  SyntaxHighlighter.registerLanguage("js", langJavascript);
@@ -13144,7 +12614,6 @@ var init_MarkdownContent = __esm({
13144
12614
  init_katex_min();
13145
12615
  init_Box();
13146
12616
  init_CodeBlock();
13147
- init_useTranslate();
13148
12617
  init_cn();
13149
12618
  MarkdownContent = React79__default.memo(
13150
12619
  ({ content, direction, className }) => {
@@ -13449,7 +12918,6 @@ var init_Card2 = __esm({
13449
12918
  "components/core/molecules/Card.tsx"() {
13450
12919
  "use client";
13451
12920
  init_useEventBus();
13452
- init_useTranslate();
13453
12921
  init_useLongPress();
13454
12922
  Card2.displayName = "Card";
13455
12923
  }
@@ -13463,7 +12931,6 @@ var init_QuizBlock = __esm({
13463
12931
  init_Button();
13464
12932
  init_Icon();
13465
12933
  init_Box();
13466
- init_useTranslate();
13467
12934
  init_cn();
13468
12935
  QuizBlock = ({
13469
12936
  question,
@@ -13506,7 +12973,6 @@ var init_StateMachineView = __esm({
13506
12973
  init_Typography();
13507
12974
  init_Button();
13508
12975
  init_Icon();
13509
- init_useTranslate();
13510
12976
  init_useEventBus();
13511
12977
  init_cn();
13512
12978
  StateNode = ({ state, config }) => {
@@ -14873,7 +14339,6 @@ var init_JazariStateMachine = __esm({
14873
14339
  init_StateMachineView();
14874
14340
  init_visualizer();
14875
14341
  init_svg_paths();
14876
- init_useTranslate();
14877
14342
  init_cn();
14878
14343
  JAZARI_VISUALIZER_CONFIG = {
14879
14344
  ...DEFAULT_CONFIG,
@@ -15029,7 +14494,6 @@ var init_ContentRenderer = __esm({
15029
14494
  init_ScaledDiagram();
15030
14495
  init_JazariStateMachine();
15031
14496
  init_parseContentSegments();
15032
- init_useTranslate();
15033
14497
  init_cn();
15034
14498
  ContentRenderer = ({
15035
14499
  content,
@@ -15123,7 +14587,6 @@ var init_BookChapterView = __esm({
15123
14587
  init_ScaledDiagram();
15124
14588
  init_ContentRenderer();
15125
14589
  init_JazariStateMachine();
15126
- init_useTranslate();
15127
14590
  init_cn();
15128
14591
  BookChapterView = ({
15129
14592
  chapter,
@@ -15162,7 +14625,6 @@ var init_BookCoverPage = __esm({
15162
14625
  init_Typography();
15163
14626
  init_Button();
15164
14627
  init_Box();
15165
- init_useTranslate();
15166
14628
  init_cn();
15167
14629
  BookCoverPage = ({
15168
14630
  title,
@@ -15242,7 +14704,6 @@ var init_BookNavBar = __esm({
15242
14704
  init_Typography();
15243
14705
  init_ProgressBar();
15244
14706
  init_Box();
15245
- init_useTranslate();
15246
14707
  init_cn();
15247
14708
  BookNavBar = ({
15248
14709
  currentPage,
@@ -15344,7 +14805,6 @@ var init_BookTableOfContents = __esm({
15344
14805
  init_Button();
15345
14806
  init_Box();
15346
14807
  init_Badge();
15347
- init_useTranslate();
15348
14808
  init_cn();
15349
14809
  BookTableOfContents = ({
15350
14810
  parts,
@@ -15404,7 +14864,6 @@ var init_EmptyState = __esm({
15404
14864
  init_Stack();
15405
14865
  init_Typography();
15406
14866
  init_useEventBus();
15407
- init_useTranslate();
15408
14867
  ICON_NAME_ALIASES = {
15409
14868
  check: "check-circle",
15410
14869
  error: "x-circle",
@@ -15575,7 +15034,6 @@ var init_BookViewer = __esm({
15575
15034
  init_Box();
15576
15035
  init_Stack();
15577
15036
  init_useEventBus();
15578
- init_useTranslate();
15579
15037
  init_cn();
15580
15038
  init_BookCoverPage();
15581
15039
  init_BookTableOfContents();
@@ -16007,7 +15465,6 @@ var init_BranchingLogicBuilder = __esm({
16007
15465
  init_FilterPill();
16008
15466
  init_Box();
16009
15467
  init_useEventBus();
16010
- init_useTranslate();
16011
15468
  init_cn();
16012
15469
  END_OF_SURVEY = "end-of-survey";
16013
15470
  RuleRow = ({
@@ -16460,7 +15917,6 @@ var init_Breadcrumb = __esm({
16460
15917
  init_Typography();
16461
15918
  init_cn();
16462
15919
  init_useEventBus();
16463
- init_useTranslate();
16464
15920
  Breadcrumb = ({
16465
15921
  items,
16466
15922
  separator = "chevron-right",
@@ -16696,7 +16152,6 @@ var init_BuilderBoard = __esm({
16696
16152
  "components/game/organisms/puzzles/builder/BuilderBoard.tsx"() {
16697
16153
  init_atoms2();
16698
16154
  init_useEventBus();
16699
- init_useTranslate();
16700
16155
  BuilderBoard.displayName = "BuilderBoard";
16701
16156
  }
16702
16157
  });
@@ -17174,7 +16629,6 @@ var init_CalendarGrid = __esm({
17174
16629
  init_TimeSlotCell();
17175
16630
  init_useEventBus();
17176
16631
  init_useSwipeGesture();
17177
- init_useTranslate();
17178
16632
  SHORT_DATE = { month: "short", day: "numeric" };
17179
16633
  CalendarGrid.displayName = "CalendarGrid";
17180
16634
  }
@@ -18483,7 +17937,6 @@ var init_Pagination = __esm({
18483
17937
  init_Stack();
18484
17938
  init_cn();
18485
17939
  init_useEventBus();
18486
- init_useTranslate();
18487
17940
  Pagination = ({
18488
17941
  currentPage,
18489
17942
  totalPages,
@@ -18687,7 +18140,6 @@ var init_CardGrid = __esm({
18687
18140
  init_cn();
18688
18141
  init_getNestedValue();
18689
18142
  init_useEventBus();
18690
- init_useTranslate();
18691
18143
  init_atoms2();
18692
18144
  init_Badge();
18693
18145
  init_Box();
@@ -18916,7 +18368,6 @@ var init_Carousel = __esm({
18916
18368
  init_cn();
18917
18369
  init_useEventBus();
18918
18370
  init_useSwipeGesture();
18919
- init_useTranslate();
18920
18371
  init_Box();
18921
18372
  init_Stack();
18922
18373
  init_Button();
@@ -19153,7 +18604,6 @@ var init_CaseStudyOrganism = __esm({
19153
18604
  "use client";
19154
18605
  init_cn();
19155
18606
  init_useEventBus();
19156
- init_useTranslate();
19157
18607
  init_Stack();
19158
18608
  init_Typography();
19159
18609
  init_SimpleGrid();
@@ -19358,7 +18808,6 @@ var init_Chart = __esm({
19358
18808
  init_ErrorState();
19359
18809
  init_EmptyState();
19360
18810
  init_useEventBus();
19361
- init_useTranslate();
19362
18811
  CHART_COLORS = [
19363
18812
  "var(--color-primary)",
19364
18813
  "var(--color-success)",
@@ -20312,7 +19761,6 @@ var init_ClassifierBoard = __esm({
20312
19761
  "components/game/organisms/puzzles/classifier/ClassifierBoard.tsx"() {
20313
19762
  init_atoms2();
20314
19763
  init_useEventBus();
20315
- init_useTranslate();
20316
19764
  ClassifierBoard.displayName = "ClassifierBoard";
20317
19765
  }
20318
19766
  });
@@ -20344,7 +19792,6 @@ var init_CodeView = __esm({
20344
19792
  "components/game/organisms/puzzles/state-architect/CodeView.tsx"() {
20345
19793
  init_atoms2();
20346
19794
  init_cn();
20347
- init_useTranslate();
20348
19795
  CodeView.displayName = "CodeView";
20349
19796
  }
20350
19797
  });
@@ -20358,7 +19805,6 @@ var init_Tabs = __esm({
20358
19805
  init_Box();
20359
19806
  init_cn();
20360
19807
  init_useEventBus();
20361
- init_useTranslate();
20362
19808
  Tabs = ({
20363
19809
  items,
20364
19810
  tabs,
@@ -20535,7 +19981,6 @@ var init_CodeViewer = __esm({
20535
19981
  init_EmptyState();
20536
19982
  init_Tabs();
20537
19983
  init_useEventBus();
20538
- init_useTranslate();
20539
19984
  DIFF_STYLES = {
20540
19985
  add: {
20541
19986
  bg: "bg-success/10",
@@ -20964,7 +20409,6 @@ var init_ConfirmDialog = __esm({
20964
20409
  init_Box();
20965
20410
  init_Stack();
20966
20411
  init_cn();
20967
- init_useTranslate();
20968
20412
  variantConfig = {
20969
20413
  danger: {
20970
20414
  icon: Trash2,
@@ -21570,7 +21014,6 @@ var init_DashboardGrid = __esm({
21570
21014
  "components/core/organisms/layout/DashboardGrid.tsx"() {
21571
21015
  init_cn();
21572
21016
  init_Box();
21573
- init_useTranslate();
21574
21017
  gapStyles5 = {
21575
21018
  sm: "gap-2",
21576
21019
  md: "gap-4",
@@ -21664,7 +21107,6 @@ var init_DashboardLayout = __esm({
21664
21107
  init_Icon();
21665
21108
  init_useAuthContext();
21666
21109
  init_useEventBus();
21667
- init_useTranslate();
21668
21110
  init_CurrentPagePathContext();
21669
21111
  DashboardLayout = ({
21670
21112
  appName = "{{APP_TITLE}}",
@@ -21721,12 +21163,8 @@ var init_DashboardLayout = __esm({
21721
21163
  const location = useLocation();
21722
21164
  const ctxPagePath = useCurrentPagePath();
21723
21165
  const activePath = currentPath ?? ctxPagePath ?? location.pathname;
21724
- const { user: authUser, signOut: authSignOut } = useAuthContext();
21725
- const user = userProp || (authUser ? {
21726
- name: authUser.displayName || authUser.email?.split("@")[0] || "User",
21727
- email: authUser.email || "",
21728
- avatar: authUser.photoURL || void 0
21729
- } : null);
21166
+ const { signOut: authSignOut } = useAuthContext();
21167
+ const user = userProp || (null);
21730
21168
  const { t } = useTranslate();
21731
21169
  const handleSignOut = onSignOutProp || authSignOut;
21732
21170
  const showSidebar = layoutMode === "sidebar";
@@ -22393,7 +21831,7 @@ function useDataDnd(args) {
22393
21831
  ({ id, children }) => {
22394
21832
  const {
22395
21833
  attributes,
22396
- listeners: listeners8,
21834
+ listeners: listeners7,
22397
21835
  setNodeRef,
22398
21836
  transform,
22399
21837
  transition,
@@ -22416,7 +21854,7 @@ function useDataDnd(args) {
22416
21854
  ref: setNodeRef,
22417
21855
  style,
22418
21856
  ...attributes,
22419
- ...listeners8,
21857
+ ...listeners7,
22420
21858
  children
22421
21859
  }
22422
21860
  );
@@ -23013,7 +22451,6 @@ var init_DataGrid = __esm({
23013
22451
  init_cn();
23014
22452
  init_getNestedValue();
23015
22453
  init_useEventBus();
23016
- init_useTranslate();
23017
22454
  init_Box();
23018
22455
  init_Stack();
23019
22456
  init_Typography();
@@ -23452,7 +22889,6 @@ var init_DataList = __esm({
23452
22889
  init_cn();
23453
22890
  init_getNestedValue();
23454
22891
  init_useEventBus();
23455
- init_useTranslate();
23456
22892
  init_Box();
23457
22893
  init_Stack();
23458
22894
  init_Typography();
@@ -23507,7 +22943,6 @@ var init_FileTree = __esm({
23507
22943
  init_Box();
23508
22944
  init_Typography();
23509
22945
  init_Icon();
23510
- init_useTranslate();
23511
22946
  TreeNodeItem = ({
23512
22947
  node,
23513
22948
  depth,
@@ -23694,14 +23129,6 @@ function useQuerySingleton(query) {
23694
23129
  setSort
23695
23130
  };
23696
23131
  }
23697
- function parseQueryBinding(binding) {
23698
- const cleaned = binding.startsWith("@") ? binding.slice(1) : binding;
23699
- const parts = cleaned.split(".");
23700
- return {
23701
- query: parts[0],
23702
- field: parts.length > 1 ? parts.slice(1).join(".") : void 0
23703
- };
23704
- }
23705
23132
  var queryStores;
23706
23133
  var init_useQuerySingleton = __esm({
23707
23134
  "hooks/useQuerySingleton.ts"() {
@@ -23722,7 +23149,6 @@ var init_FilterGroup = __esm({
23722
23149
  init_Icon();
23723
23150
  init_useEventBus();
23724
23151
  init_useQuerySingleton();
23725
- init_useTranslate();
23726
23152
  resolveFilterType = (filter) => filter.filterType ?? filter.type;
23727
23153
  lookStyles6 = {
23728
23154
  toolbar: "",
@@ -24374,7 +23800,6 @@ var init_Coachmark = __esm({
24374
23800
  init_Button();
24375
23801
  init_Icon();
24376
23802
  init_cn();
24377
- init_useTranslate();
24378
23803
  GAP = 10;
24379
23804
  EDGE = 8;
24380
23805
  Coachmark = ({
@@ -24615,7 +24040,6 @@ var init_RelationSelect = __esm({
24615
24040
  init_Spinner();
24616
24041
  init_Typography();
24617
24042
  init_debug();
24618
- init_useTranslate();
24619
24043
  isRelationsDebugEnabled = () => isDebugEnabled();
24620
24044
  RelationSelect = ({
24621
24045
  value,
@@ -24840,7 +24264,6 @@ var init_SearchInput = __esm({
24840
24264
  init_cn();
24841
24265
  init_useEventBus();
24842
24266
  init_useQuerySingleton();
24843
- init_useTranslate();
24844
24267
  SearchInput = ({
24845
24268
  value,
24846
24269
  onSearch,
@@ -24943,7 +24366,6 @@ var init_SidePanel = __esm({
24943
24366
  init_Typography();
24944
24367
  init_cn();
24945
24368
  init_useEventBus();
24946
- init_useTranslate();
24947
24369
  SidePanel = ({
24948
24370
  title,
24949
24371
  children,
@@ -25122,7 +24544,6 @@ var init_WizardNavigation = __esm({
25122
24544
  init_Icon();
25123
24545
  init_cn();
25124
24546
  init_useEventBus();
25125
- init_useTranslate();
25126
24547
  WizardNavigation = ({
25127
24548
  currentStep,
25128
24549
  totalSteps,
@@ -25210,7 +24631,6 @@ var init_RepeatableFormSection = __esm({
25210
24631
  init_Card();
25211
24632
  init_Icon();
25212
24633
  init_useEventBus();
25213
- init_useTranslate();
25214
24634
  RepeatableFormSection = ({
25215
24635
  sectionType,
25216
24636
  title,
@@ -25341,7 +24761,6 @@ var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
25341
24761
  var init_ViolationAlert = __esm({
25342
24762
  "components/core/molecules/ViolationAlert.tsx"() {
25343
24763
  init_cn();
25344
- init_useTranslate();
25345
24764
  init_Box();
25346
24765
  init_Stack();
25347
24766
  init_Typography();
@@ -25847,7 +25266,6 @@ var init_LineChart = __esm({
25847
25266
  "use client";
25848
25267
  init_cn();
25849
25268
  init_atoms2();
25850
- init_useTranslate();
25851
25269
  LineChart2 = ({
25852
25270
  data,
25853
25271
  width = 400,
@@ -28087,7 +27505,6 @@ var init_GraphView = __esm({
28087
27505
  "use client";
28088
27506
  init_cn();
28089
27507
  init_atoms2();
28090
- init_useTranslate();
28091
27508
  GROUP_COLORS = [
28092
27509
  "#3b82f6",
28093
27510
  // blue-500
@@ -28413,7 +27830,6 @@ var init_NumberStepper = __esm({
28413
27830
  init_cn();
28414
27831
  init_Icon();
28415
27832
  init_useEventBus();
28416
- init_useTranslate();
28417
27833
  sizeStyles10 = {
28418
27834
  sm: {
28419
27835
  button: "w-7 h-7",
@@ -28754,7 +28170,6 @@ var init_UploadDropZone = __esm({
28754
28170
  init_Icon();
28755
28171
  init_Typography();
28756
28172
  init_useEventBus();
28757
- init_useTranslate();
28758
28173
  UploadDropZone = ({
28759
28174
  accept,
28760
28175
  maxSize,
@@ -28921,7 +28336,6 @@ var init_Lightbox = __esm({
28921
28336
  init_Icon();
28922
28337
  init_cn();
28923
28338
  init_useEventBus();
28924
- init_useTranslate();
28925
28339
  Lightbox = ({
28926
28340
  images = [],
28927
28341
  currentIndex = 0,
@@ -29406,7 +28820,6 @@ var init_TableView = __esm({
29406
28820
  init_cn();
29407
28821
  init_getNestedValue();
29408
28822
  init_useEventBus();
29409
- init_useTranslate();
29410
28823
  init_Box();
29411
28824
  init_Stack();
29412
28825
  init_Typography();
@@ -29610,7 +29023,6 @@ var init_Meter = __esm({
29610
29023
  init_LoadingState();
29611
29024
  init_ErrorState();
29612
29025
  init_useEventBus();
29613
- init_useTranslate();
29614
29026
  DEFAULT_THRESHOLDS = [
29615
29027
  { value: 30, color: "var(--color-error)" },
29616
29028
  { value: 70, color: "var(--color-warning)" },
@@ -31557,7 +30969,6 @@ var init_VoteStack = __esm({
31557
30969
  init_cn();
31558
30970
  init_Icon();
31559
30971
  init_useEventBus();
31560
- init_useTranslate();
31561
30972
  sizeStyles12 = {
31562
30973
  sm: {
31563
30974
  button: "w-7 h-7",
@@ -32012,7 +31423,6 @@ var init_QrScanner = __esm({
32012
31423
  init_atoms2();
32013
31424
  init_Icon();
32014
31425
  init_useEventBus();
32015
- init_useTranslate();
32016
31426
  QrScanner = ({
32017
31427
  onScan,
32018
31428
  scanEvent,
@@ -32239,7 +31649,6 @@ var init_OptionConstraintGroup = __esm({
32239
31649
  "components/core/molecules/OptionConstraintGroup.tsx"() {
32240
31650
  init_cn();
32241
31651
  init_useEventBus();
32242
- init_useTranslate();
32243
31652
  init_Typography();
32244
31653
  init_Box();
32245
31654
  init_Label();
@@ -33195,7 +32604,6 @@ var init_RichBlockEditor = __esm({
33195
32604
  init_Input();
33196
32605
  init_Icon();
33197
32606
  init_useEventBus();
33198
- init_useTranslate();
33199
32607
  TOOLBAR_ENTRIES = [
33200
32608
  { type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
33201
32609
  { type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
@@ -33386,7 +32794,6 @@ var init_ReplyTree = __esm({
33386
32794
  "use client";
33387
32795
  init_cn();
33388
32796
  init_useEventBus();
33389
- init_useTranslate();
33390
32797
  init_atoms2();
33391
32798
  init_VoteStack();
33392
32799
  ReplyTreeNode = ({
@@ -33694,7 +33101,6 @@ var init_VersionDiff = __esm({
33694
33101
  "use client";
33695
33102
  init_cn();
33696
33103
  init_useEventBus();
33697
- init_useTranslate();
33698
33104
  init_atoms2();
33699
33105
  init_Stack();
33700
33106
  INLINE_STYLES = {
@@ -34010,7 +33416,6 @@ var init_DocBreadcrumb = __esm({
34010
33416
  init_Stack();
34011
33417
  init_Typography();
34012
33418
  init_Icon();
34013
- init_useTranslate();
34014
33419
  DocBreadcrumb = ({
34015
33420
  items,
34016
33421
  className
@@ -34439,7 +33844,6 @@ var init_DocSearch = __esm({
34439
33844
  init_Typography();
34440
33845
  init_Icon();
34441
33846
  init_Input();
34442
- init_useTranslate();
34443
33847
  }
34444
33848
  });
34445
33849
  var DocSidebarCategory, DocSidebar;
@@ -34452,7 +33856,6 @@ var init_DocSidebar = __esm({
34452
33856
  init_Stack();
34453
33857
  init_Typography();
34454
33858
  init_Icon();
34455
- init_useTranslate();
34456
33859
  DocSidebarCategory = ({ item, depth }) => {
34457
33860
  const [expanded, setExpanded] = useState(
34458
33861
  () => item.items?.some(function hasActive(child) {
@@ -34559,7 +33962,6 @@ var init_DocTOC = __esm({
34559
33962
  init_Box();
34560
33963
  init_Stack();
34561
33964
  init_Typography();
34562
- init_useTranslate();
34563
33965
  DocTOC = ({
34564
33966
  items,
34565
33967
  activeId,
@@ -35293,7 +34695,6 @@ var init_FormSection = __esm({
35293
34695
  init_Button();
35294
34696
  init_Stack();
35295
34697
  init_Icon();
35296
- init_useTranslate();
35297
34698
  init_useEventBus();
35298
34699
  FormSection = ({
35299
34700
  title,
@@ -35422,7 +34823,6 @@ var init_Header = __esm({
35422
34823
  init_Stack();
35423
34824
  init_Typography();
35424
34825
  init_cn();
35425
- init_useTranslate();
35426
34826
  lookStyles8 = {
35427
34827
  "compact-bar": "",
35428
34828
  hero: "py-section min-h-[200px] [&_h1]:text-display-1",
@@ -35742,7 +35142,6 @@ var init_Sidebar = __esm({
35742
35142
  init_Typography();
35743
35143
  init_cn();
35744
35144
  init_useEventBus();
35745
- init_useTranslate();
35746
35145
  SidebarNavItem = ({ item, collapsed }) => {
35747
35146
  const Icon3 = item.icon;
35748
35147
  const isActive = item.active ?? item.isActive;
@@ -35996,7 +35395,6 @@ var init_WizardContainer = __esm({
35996
35395
  init_Stack();
35997
35396
  init_Icon();
35998
35397
  init_cn();
35999
- init_useTranslate();
36000
35398
  WizardContainer = ({
36001
35399
  steps,
36002
35400
  currentStep: controlledStep,
@@ -36173,14 +35571,14 @@ var init_WizardContainer = __esm({
36173
35571
  });
36174
35572
  function calculateComplexity(schema) {
36175
35573
  if (!schema) return 1;
36176
- const entities2 = schema.dataEntities?.length || 0;
35574
+ const entities = schema.dataEntities?.length || 0;
36177
35575
  const pages = schema.ui?.pages?.length || 0;
36178
35576
  const traits2 = schema.traits?.length || 0;
36179
35577
  const sections = schema.ui?.pages?.reduce(
36180
35578
  (acc, page) => acc + (page.sections?.length || 0),
36181
35579
  0
36182
35580
  ) || 0;
36183
- return entities2 * 3 + pages * 2 + traits2 * 2 + sections * 1;
35581
+ return entities * 3 + pages * 2 + traits2 * 2 + sections * 1;
36184
35582
  }
36185
35583
  function getOrbitalType(complexity) {
36186
35584
  if (complexity <= 3) return "1s";
@@ -36570,7 +35968,6 @@ var init_SignaturePad = __esm({
36570
35968
  init_LoadingState();
36571
35969
  init_ErrorState();
36572
35970
  init_useEventBus();
36573
- init_useTranslate();
36574
35971
  SignaturePad = ({
36575
35972
  label,
36576
35973
  helperText,
@@ -36764,7 +36161,6 @@ var init_DocumentViewer = __esm({
36764
36161
  init_EmptyState();
36765
36162
  init_Tabs();
36766
36163
  init_useEventBus();
36767
- init_useTranslate();
36768
36164
  DocumentViewer = ({
36769
36165
  title,
36770
36166
  src,
@@ -36969,7 +36365,6 @@ var init_GraphCanvas = __esm({
36969
36365
  init_ErrorState();
36970
36366
  init_EmptyState();
36971
36367
  init_useEventBus();
36972
- init_useTranslate();
36973
36368
  GROUP_COLORS2 = [
36974
36369
  "var(--color-primary)",
36975
36370
  "var(--color-success)",
@@ -37827,7 +37222,6 @@ var init_DataTable = __esm({
37827
37222
  init_molecules2();
37828
37223
  init_Icon();
37829
37224
  init_useEventBus();
37830
- init_useTranslate();
37831
37225
  init_types3();
37832
37226
  lookStyles9 = {
37833
37227
  dense: "",
@@ -37974,7 +37368,6 @@ var init_DebuggerBoard = __esm({
37974
37368
  "components/game/organisms/puzzles/debugger/DebuggerBoard.tsx"() {
37975
37369
  init_atoms2();
37976
37370
  init_useEventBus();
37977
- init_useTranslate();
37978
37371
  DebuggerBoard.displayName = "DebuggerBoard";
37979
37372
  }
37980
37373
  });
@@ -38145,7 +37538,6 @@ var init_DetailPanel = __esm({
38145
37538
  init_cn();
38146
37539
  init_getNestedValue();
38147
37540
  init_useEventBus();
38148
- init_useTranslate();
38149
37541
  ReactMarkdown2 = lazy(() => import('react-markdown'));
38150
37542
  DetailPanel = ({
38151
37543
  title: propTitle,
@@ -38819,7 +38211,6 @@ var init_TraitStateViewer = __esm({
38819
38211
  "components/game/organisms/TraitStateViewer.tsx"() {
38820
38212
  "use client";
38821
38213
  init_cn();
38822
- init_useTranslate();
38823
38214
  init_Box();
38824
38215
  init_Typography();
38825
38216
  init_Stack();
@@ -38878,7 +38269,6 @@ var init_RuleEditor = __esm({
38878
38269
  "components/game/organisms/puzzles/event-handler/RuleEditor.tsx"() {
38879
38270
  init_atoms2();
38880
38271
  init_cn();
38881
- init_useTranslate();
38882
38272
  RuleEditor.displayName = "RuleEditor";
38883
38273
  }
38884
38274
  });
@@ -38953,7 +38343,6 @@ var init_ObjectRulePanel = __esm({
38953
38343
  "components/game/organisms/puzzles/event-handler/ObjectRulePanel.tsx"() {
38954
38344
  init_atoms2();
38955
38345
  init_cn();
38956
- init_useTranslate();
38957
38346
  init_TraitStateViewer();
38958
38347
  init_RuleEditor();
38959
38348
  nextRuleId = 1;
@@ -38998,7 +38387,6 @@ var init_EventLog = __esm({
38998
38387
  "components/game/organisms/puzzles/event-handler/EventLog.tsx"() {
38999
38388
  init_atoms2();
39000
38389
  init_cn();
39001
- init_useTranslate();
39002
38390
  STATUS_STYLES = {
39003
38391
  pending: "text-muted-foreground",
39004
38392
  active: "text-primary animate-pulse",
@@ -39212,7 +38600,6 @@ var init_EventHandlerBoard = __esm({
39212
38600
  init_atoms2();
39213
38601
  init_cn();
39214
38602
  init_useEventBus();
39215
- init_useTranslate();
39216
38603
  init_TraitStateViewer();
39217
38604
  init_ObjectRulePanel();
39218
38605
  init_EventLog();
@@ -39282,7 +38669,6 @@ var init_FeatureGridOrganism = __esm({
39282
38669
  "use client";
39283
38670
  init_cn();
39284
38671
  init_useEventBus();
39285
- init_useTranslate();
39286
38672
  init_Stack();
39287
38673
  init_Typography();
39288
38674
  init_FeatureGrid();
@@ -39465,7 +38851,6 @@ var init_Form = __esm({
39465
38851
  init_RelationSelect();
39466
38852
  init_Alert();
39467
38853
  init_useEventBus();
39468
- init_useTranslate();
39469
38854
  init_debug();
39470
38855
  layoutStyles = {
39471
38856
  vertical: "flex flex-col",
@@ -40632,7 +40017,6 @@ var init_HeroOrganism = __esm({
40632
40017
  "use client";
40633
40018
  init_cn();
40634
40019
  init_useEventBus();
40635
- init_useTranslate();
40636
40020
  init_HeroSection();
40637
40021
  init_LoadingState();
40638
40022
  init_ErrorState();
@@ -40738,7 +40122,6 @@ var LandingPageTemplate;
40738
40122
  var init_LandingPageTemplate = __esm({
40739
40123
  "components/marketing/templates/LandingPageTemplate.tsx"() {
40740
40124
  init_cn();
40741
- init_useTranslate();
40742
40125
  init_Stack();
40743
40126
  init_Box();
40744
40127
  init_Container();
@@ -40938,7 +40321,6 @@ var init_List = __esm({
40938
40321
  init_cn();
40939
40322
  init_getNestedValue();
40940
40323
  init_useEventBus();
40941
- init_useTranslate();
40942
40324
  init_types3();
40943
40325
  STATUS_STYLES2 = {
40944
40326
  complete: {
@@ -41433,7 +40815,6 @@ var init_MasterDetail = __esm({
41433
40815
  "components/core/organisms/MasterDetail.tsx"() {
41434
40816
  "use client";
41435
40817
  init_DataTable();
41436
- init_useTranslate();
41437
40818
  MasterDetail.displayName = "MasterDetail";
41438
40819
  }
41439
40820
  });
@@ -41442,7 +40823,6 @@ var init_MasterDetailLayout = __esm({
41442
40823
  "components/core/organisms/layout/MasterDetailLayout.tsx"() {
41443
40824
  init_cn();
41444
40825
  init_Typography();
41445
- init_useTranslate();
41446
40826
  DefaultEmptyDetail = () => {
41447
40827
  const { t } = useTranslate();
41448
40828
  return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
@@ -41503,7 +40883,6 @@ var init_MediaGallery = __esm({
41503
40883
  init_ErrorState();
41504
40884
  init_EmptyState();
41505
40885
  init_useEventBus();
41506
- init_useTranslate();
41507
40886
  COLUMN_CLASSES = {
41508
40887
  2: "grid-cols-2",
41509
40888
  3: "grid-cols-2 sm:grid-cols-3",
@@ -41997,7 +41376,6 @@ var init_NegotiatorBoard = __esm({
41997
41376
  "components/game/organisms/puzzles/negotiator/NegotiatorBoard.tsx"() {
41998
41377
  init_atoms2();
41999
41378
  init_useEventBus();
42000
- init_useTranslate();
42001
41379
  NegotiatorBoard.displayName = "NegotiatorBoard";
42002
41380
  }
42003
41381
  });
@@ -42007,7 +41385,6 @@ var init_PricingOrganism = __esm({
42007
41385
  "use client";
42008
41386
  init_cn();
42009
41387
  init_useEventBus();
42010
- init_useTranslate();
42011
41388
  init_Stack();
42012
41389
  init_Typography();
42013
41390
  init_PricingGrid();
@@ -42057,7 +41434,6 @@ var PricingPageTemplate;
42057
41434
  var init_PricingPageTemplate = __esm({
42058
41435
  "components/marketing/templates/PricingPageTemplate.tsx"() {
42059
41436
  init_cn();
42060
- init_useTranslate();
42061
41437
  init_Stack();
42062
41438
  init_Box();
42063
41439
  init_Container();
@@ -42224,13 +41600,13 @@ function getEntitySnapshot() {
42224
41600
  if (!entityProvider) {
42225
41601
  return null;
42226
41602
  }
42227
- const entities2 = entityProvider();
41603
+ const entities = entityProvider();
42228
41604
  return {
42229
- entities: entities2,
41605
+ entities,
42230
41606
  timestamp: Date.now(),
42231
- totalCount: entities2.length,
41607
+ totalCount: entities.length,
42232
41608
  singletons: {},
42233
- runtime: entities2.map((e) => ({ id: e.id, type: e.type, data: e.fields })),
41609
+ runtime: entities.map((e) => ({ id: e.id, type: e.type, data: e.fields })),
42234
41610
  persistent: {}
42235
41611
  };
42236
41612
  }
@@ -42666,7 +42042,6 @@ var init_TraitsTab = __esm({
42666
42042
  init_Typography();
42667
42043
  init_Stack();
42668
42044
  init_EmptyState();
42669
- init_useTranslate();
42670
42045
  TraitsTab.displayName = "TraitsTab";
42671
42046
  }
42672
42047
  });
@@ -42744,7 +42119,6 @@ var init_TicksTab = __esm({
42744
42119
  init_Stack();
42745
42120
  init_Card();
42746
42121
  init_EmptyState();
42747
- init_useTranslate();
42748
42122
  TicksTab.displayName = "TicksTab";
42749
42123
  }
42750
42124
  });
@@ -42818,7 +42192,6 @@ var init_EntitiesTab = __esm({
42818
42192
  init_Typography();
42819
42193
  init_Stack();
42820
42194
  init_EmptyState();
42821
- init_useTranslate();
42822
42195
  EntitiesTab.displayName = "EntitiesTab";
42823
42196
  }
42824
42197
  });
@@ -42935,7 +42308,6 @@ var init_EventFlowTab = __esm({
42935
42308
  init_Button();
42936
42309
  init_Checkbox();
42937
42310
  init_EmptyState();
42938
- init_useTranslate();
42939
42311
  TYPE_BADGES = {
42940
42312
  trait: { variant: "primary", icon: "\u{1F504}" },
42941
42313
  tick: { variant: "warning", icon: "\u23F1\uFE0F" },
@@ -43030,7 +42402,6 @@ var init_GuardsPanel = __esm({
43030
42402
  init_ButtonGroup();
43031
42403
  init_Button();
43032
42404
  init_EmptyState();
43033
- init_useTranslate();
43034
42405
  GuardsPanel.displayName = "GuardsPanel";
43035
42406
  }
43036
42407
  });
@@ -43106,7 +42477,6 @@ var init_VerificationTab = __esm({
43106
42477
  init_Typography();
43107
42478
  init_Stack();
43108
42479
  init_EmptyState();
43109
- init_useTranslate();
43110
42480
  STATUS_CONFIG = {
43111
42481
  pass: { variant: "success", icon: "\u2713", label: "PASS" },
43112
42482
  fail: { variant: "danger", icon: "\u2717", label: "FAIL" },
@@ -43242,7 +42612,6 @@ var init_TransitionTimeline = __esm({
43242
42612
  init_Typography();
43243
42613
  init_EmptyState();
43244
42614
  init_Checkbox();
43245
- init_useTranslate();
43246
42615
  EFFECT_STATUS_VARIANT = {
43247
42616
  executed: "success",
43248
42617
  failed: "danger",
@@ -43332,7 +42701,6 @@ var init_ServerBridgeTab = __esm({
43332
42701
  init_Stack();
43333
42702
  init_Card();
43334
42703
  init_EmptyState();
43335
- init_useTranslate();
43336
42704
  ServerBridgeTab.displayName = "ServerBridgeTab";
43337
42705
  }
43338
42706
  });
@@ -43412,7 +42780,7 @@ function getAllEvents(traits2) {
43412
42780
  function EventDispatcherTab({ traits: traits2, schema }) {
43413
42781
  const eventBus = useEventBus();
43414
42782
  const { t } = useTranslate();
43415
- const [log18, setLog] = React79.useState([]);
42783
+ const [log8, setLog] = React79.useState([]);
43416
42784
  const prevStatesRef = React79.useRef(/* @__PURE__ */ new Map());
43417
42785
  React79.useEffect(() => {
43418
42786
  for (const trait of traits2) {
@@ -43476,9 +42844,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
43476
42844
  /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
43477
42845
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
43478
42846
  ] }),
43479
- log18.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
42847
+ log8.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
43480
42848
  /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
43481
- /* @__PURE__ */ jsx(Stack, { gap: "xs", children: log18.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
42849
+ /* @__PURE__ */ jsx(Stack, { gap: "xs", children: log8.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
43482
42850
  /* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
43483
42851
  " ",
43484
42852
  /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: entry.from }),
@@ -43497,7 +42865,6 @@ var init_EventDispatcherTab = __esm({
43497
42865
  init_Stack();
43498
42866
  init_EmptyState();
43499
42867
  init_useEventBus();
43500
- init_useTranslate();
43501
42868
  EventDispatcherTab.displayName = "EventDispatcherTab";
43502
42869
  }
43503
42870
  });
@@ -43872,7 +43239,6 @@ var init_RuntimeDebugger2 = __esm({
43872
43239
  init_TransitionTimeline();
43873
43240
  init_ServerBridgeTab();
43874
43241
  init_EventDispatcherTab();
43875
- init_useTranslate();
43876
43242
  init_RuntimeDebugger();
43877
43243
  RuntimeDebugger.displayName = "RuntimeDebugger";
43878
43244
  }
@@ -44359,7 +43725,6 @@ var init_SequencerBoard = __esm({
44359
43725
  init_atoms2();
44360
43726
  init_cn();
44361
43727
  init_useEventBus();
44362
- init_useTranslate();
44363
43728
  init_TraitStateViewer();
44364
43729
  init_SequenceBar();
44365
43730
  init_ActionPalette();
@@ -44378,7 +43743,6 @@ var init_ShowcaseOrganism = __esm({
44378
43743
  "use client";
44379
43744
  init_cn();
44380
43745
  init_useEventBus();
44381
- init_useTranslate();
44382
43746
  init_Stack();
44383
43747
  init_Typography();
44384
43748
  init_SimpleGrid();
@@ -44937,7 +44301,6 @@ var init_SimulatorBoard = __esm({
44937
44301
  "components/game/organisms/puzzles/simulator/SimulatorBoard.tsx"() {
44938
44302
  init_atoms2();
44939
44303
  init_useEventBus();
44940
- init_useTranslate();
44941
44304
  SimulatorBoard.displayName = "SimulatorBoard";
44942
44305
  }
44943
44306
  });
@@ -45153,7 +44516,6 @@ var init_StatCard = __esm({
45153
44516
  init_Button();
45154
44517
  init_Sparkline();
45155
44518
  init_useEventBus();
45156
- init_useTranslate();
45157
44519
  init_Icon();
45158
44520
  StatCard = ({
45159
44521
  label: propLabel,
@@ -45509,7 +44871,6 @@ var init_VariablePanel = __esm({
45509
44871
  "components/game/organisms/puzzles/state-architect/VariablePanel.tsx"() {
45510
44872
  init_atoms2();
45511
44873
  init_cn();
45512
- init_useTranslate();
45513
44874
  VariablePanel.displayName = "VariablePanel";
45514
44875
  }
45515
44876
  });
@@ -45826,7 +45187,6 @@ var init_StateArchitectBoard = __esm({
45826
45187
  init_atoms2();
45827
45188
  init_cn();
45828
45189
  init_useEventBus();
45829
- init_useTranslate();
45830
45190
  init_TraitStateViewer();
45831
45191
  init_StateNode();
45832
45192
  init_TransitionArrow();
@@ -45846,7 +45206,6 @@ var init_StatsOrganism = __esm({
45846
45206
  "components/marketing/organisms/StatsOrganism.tsx"() {
45847
45207
  "use client";
45848
45208
  init_cn();
45849
- init_useTranslate();
45850
45209
  init_StatsGrid();
45851
45210
  init_LoadingState();
45852
45211
  init_ErrorState();
@@ -45960,7 +45319,6 @@ var init_StepFlowOrganism = __esm({
45960
45319
  "components/core/organisms/StepFlowOrganism.tsx"() {
45961
45320
  "use client";
45962
45321
  init_cn();
45963
- init_useTranslate();
45964
45322
  init_Stack();
45965
45323
  init_Typography();
45966
45324
  init_StepFlow();
@@ -46130,7 +45488,6 @@ var init_TeamOrganism = __esm({
46130
45488
  "components/marketing/organisms/TeamOrganism.tsx"() {
46131
45489
  "use client";
46132
45490
  init_cn();
46133
- init_useTranslate();
46134
45491
  init_Stack();
46135
45492
  init_Typography();
46136
45493
  init_SimpleGrid();
@@ -46188,7 +45545,6 @@ var init_Timeline = __esm({
46188
45545
  init_LoadingState();
46189
45546
  init_ErrorState();
46190
45547
  init_EmptyState();
46191
- init_useTranslate();
46192
45548
  lookStyles10 = {
46193
45549
  "vertical-compact": "gap-1 [&>*]:py-1",
46194
45550
  "vertical-spacious": "",
@@ -48378,7 +47734,6 @@ var init_UISlotRenderer = __esm({
48378
47734
  init_Box();
48379
47735
  init_Typography();
48380
47736
  init_useEventBus();
48381
- init_useTranslate();
48382
47737
  init_slot_types();
48383
47738
  init_cn();
48384
47739
  init_ErrorBoundary();
@@ -49724,1622 +49079,5 @@ init_AboutPageTemplate();
49724
49079
 
49725
49080
  // components/index.ts
49726
49081
  init_cn();
49727
- var log8 = createLogger("almadar:ui:orbital-history");
49728
- function useOrbitalHistory(options) {
49729
- const { appId, authToken, userId, onHistoryChange, onRevertSuccess } = options;
49730
- const getHeaders = useCallback(() => {
49731
- const headers = {
49732
- "Content-Type": "application/json"
49733
- };
49734
- if (authToken) {
49735
- headers["Authorization"] = `Bearer ${authToken}`;
49736
- }
49737
- if (userId) {
49738
- headers["x-user-id"] = userId;
49739
- }
49740
- return headers;
49741
- }, [authToken, userId]);
49742
- const [timeline, setTimeline] = useState([]);
49743
- const [currentVersion, setCurrentVersion] = useState(1);
49744
- const [isLoading, setIsLoading] = useState(false);
49745
- const [error, setError] = useState(null);
49746
- const refresh = useCallback(async () => {
49747
- if (!appId) return;
49748
- setIsLoading(true);
49749
- setError(null);
49750
- try {
49751
- const headers = getHeaders();
49752
- const [changesetsRes, snapshotsRes] = await Promise.all([
49753
- fetch(`/api/graphs/${appId}/history/changesets`, { headers }),
49754
- fetch(`/api/graphs/${appId}/history/snapshots`, { headers })
49755
- ]);
49756
- if (!changesetsRes.ok) {
49757
- throw new Error(`Failed to fetch changesets: ${changesetsRes.status}`);
49758
- }
49759
- if (!snapshotsRes.ok) {
49760
- throw new Error(`Failed to fetch snapshots: ${snapshotsRes.status}`);
49761
- }
49762
- const changesetsData = await changesetsRes.json();
49763
- const snapshotsData = await snapshotsRes.json();
49764
- const changesetItems = (changesetsData.changesets || []).map((cs) => ({
49765
- id: cs.id,
49766
- type: "changeset",
49767
- version: cs.version,
49768
- timestamp: cs.timestamp,
49769
- description: `Version ${cs.version}`,
49770
- source: cs.source,
49771
- summary: cs.summary
49772
- }));
49773
- const snapshotItems = (snapshotsData.snapshots || []).map((snap) => ({
49774
- id: snap.id,
49775
- type: "snapshot",
49776
- version: snap.version,
49777
- timestamp: snap.timestamp,
49778
- description: snap.reason || `Snapshot v${snap.version}`,
49779
- reason: snap.reason
49780
- }));
49781
- const mergedTimeline = [...changesetItems, ...snapshotItems].sort(
49782
- (a, b) => b.timestamp - a.timestamp
49783
- );
49784
- setTimeline(mergedTimeline);
49785
- if (mergedTimeline.length > 0) {
49786
- setCurrentVersion(mergedTimeline[0].version);
49787
- }
49788
- } catch (err) {
49789
- log8.error("Failed to load history", { error: err instanceof Error ? err : String(err) });
49790
- setError(err instanceof Error ? err.message : "Failed to load history");
49791
- } finally {
49792
- setIsLoading(false);
49793
- }
49794
- }, [appId, getHeaders]);
49795
- const revertToSnapshot = useCallback(async (snapshotId) => {
49796
- if (!appId) {
49797
- return { success: false, error: "No app ID provided" };
49798
- }
49799
- try {
49800
- const response = await fetch(`/api/graphs/${appId}/history/revert/${snapshotId}`, {
49801
- method: "POST",
49802
- headers: getHeaders()
49803
- });
49804
- if (!response.ok) {
49805
- const errorData = await response.json().catch(() => ({}));
49806
- throw new Error(errorData.error || `Failed to revert: ${response.status}`);
49807
- }
49808
- const data = await response.json();
49809
- if (data.success && data.schema) {
49810
- await refresh();
49811
- onRevertSuccess?.(data.schema);
49812
- return {
49813
- success: true,
49814
- restoredSchema: data.schema
49815
- };
49816
- }
49817
- return {
49818
- success: false,
49819
- error: data.error || "Unknown error during revert"
49820
- };
49821
- } catch (err) {
49822
- log8.error("Failed to revert", { error: err instanceof Error ? err : String(err) });
49823
- return {
49824
- success: false,
49825
- error: err instanceof Error ? err.message : "Failed to revert"
49826
- };
49827
- }
49828
- }, [appId, getHeaders, refresh, onRevertSuccess]);
49829
- useEffect(() => {
49830
- if (appId && authToken && userId) {
49831
- refresh();
49832
- }
49833
- }, [appId, authToken, userId]);
49834
- useEffect(() => {
49835
- onHistoryChange?.(timeline);
49836
- }, [timeline]);
49837
- return {
49838
- timeline,
49839
- currentVersion,
49840
- isLoading,
49841
- error,
49842
- revertToSnapshot,
49843
- refresh
49844
- };
49845
- }
49846
- var log9 = createLogger("almadar:ui:filesystem");
49847
- function useFileSystem() {
49848
- const [status, setStatus] = useState("idle");
49849
- const [error, setError] = useState(null);
49850
- const [isLoading, setIsLoading] = useState(false);
49851
- const [files, setFiles] = useState([]);
49852
- const [selectedFile, setSelectedFile] = useState(null);
49853
- const [selectedPath, setSelectedPath] = useState(null);
49854
- const [previewUrl, setPreviewUrl] = useState(null);
49855
- const [fileContents, setFileContents] = useState(/* @__PURE__ */ new Map());
49856
- const boot = useCallback(async () => {
49857
- setStatus("booting");
49858
- setError(null);
49859
- setIsLoading(true);
49860
- try {
49861
- log9.debug("Booting WebContainer");
49862
- await new Promise((resolve) => setTimeout(resolve, 100));
49863
- setStatus("ready");
49864
- } catch (err) {
49865
- setError(err instanceof Error ? err.message : "Failed to boot");
49866
- setStatus("error");
49867
- } finally {
49868
- setIsLoading(false);
49869
- }
49870
- }, []);
49871
- const mountFiles = useCallback(async (filesToMount) => {
49872
- setIsLoading(true);
49873
- try {
49874
- let filesArray;
49875
- if (Array.isArray(filesToMount)) {
49876
- filesArray = filesToMount;
49877
- } else {
49878
- filesArray = [];
49879
- const flattenTree = (obj, basePath = "") => {
49880
- for (const [key, value] of Object.entries(obj)) {
49881
- const path = basePath ? `${basePath}/${key}` : key;
49882
- if (value && typeof value === "object" && "file" in value) {
49883
- const fileObj = value;
49884
- filesArray.push({ path, content: fileObj.file.contents || "" });
49885
- } else if (value && typeof value === "object" && "directory" in value) {
49886
- const dirObj = value;
49887
- flattenTree(dirObj.directory, path);
49888
- }
49889
- }
49890
- };
49891
- flattenTree(filesToMount);
49892
- }
49893
- const newContents = /* @__PURE__ */ new Map();
49894
- for (const file of filesArray) {
49895
- newContents.set(file.path, file.content);
49896
- }
49897
- setFileContents(newContents);
49898
- const newTree = [];
49899
- for (const file of filesArray) {
49900
- const parts = file.path.split("/").filter(Boolean);
49901
- let current = newTree;
49902
- for (let i = 0; i < parts.length; i++) {
49903
- const part = parts[i];
49904
- const isFile = i === parts.length - 1;
49905
- const currentPath = "/" + parts.slice(0, i + 1).join("/");
49906
- let node = current.find((n) => n.name === part);
49907
- if (!node) {
49908
- node = {
49909
- path: currentPath,
49910
- name: part,
49911
- type: isFile ? "file" : "directory",
49912
- children: isFile ? void 0 : []
49913
- };
49914
- current.push(node);
49915
- }
49916
- if (!isFile && node && node.children) {
49917
- current = node.children;
49918
- }
49919
- }
49920
- }
49921
- setFiles(newTree);
49922
- setStatus("running");
49923
- } catch (err) {
49924
- log9.error("Failed to mount files", { error: err instanceof Error ? err : String(err) });
49925
- } finally {
49926
- setIsLoading(false);
49927
- }
49928
- }, []);
49929
- const readFile = useCallback(async (path) => {
49930
- return fileContents.get(path) || "";
49931
- }, [fileContents]);
49932
- const writeFile = useCallback(async (path, content) => {
49933
- setFileContents((prev) => {
49934
- const next = new Map(prev);
49935
- next.set(path, content);
49936
- return next;
49937
- });
49938
- }, []);
49939
- const selectFile = useCallback(async (path) => {
49940
- const content = fileContents.get(path) || "";
49941
- const ext = path.split(".").pop()?.toLowerCase() || "";
49942
- const languageMap = {
49943
- ts: "typescript",
49944
- tsx: "typescript",
49945
- js: "javascript",
49946
- jsx: "javascript",
49947
- json: "json",
49948
- md: "markdown",
49949
- css: "css",
49950
- html: "html",
49951
- orb: "json"
49952
- };
49953
- setSelectedPath(path);
49954
- setSelectedFile({
49955
- path,
49956
- content,
49957
- language: languageMap[ext] || "plaintext",
49958
- isDirty: false
49959
- });
49960
- }, [fileContents]);
49961
- const updateContent = useCallback((pathOrContent, contentArg) => {
49962
- const path = contentArg !== void 0 ? pathOrContent : selectedPath;
49963
- const content = contentArg !== void 0 ? contentArg : pathOrContent;
49964
- if (!path) {
49965
- log9.warn("updateContent called without path and no file selected");
49966
- return;
49967
- }
49968
- setFileContents((prev) => {
49969
- const next = new Map(prev);
49970
- next.set(path, content);
49971
- return next;
49972
- });
49973
- if (selectedPath === path) {
49974
- setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
49975
- }
49976
- }, [selectedPath]);
49977
- const updateSelectedContent = useCallback((content) => {
49978
- setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
49979
- }, []);
49980
- const refreshTree = useCallback(async () => {
49981
- log9.debug("Refreshing tree");
49982
- }, []);
49983
- const runCommand = useCallback(async (command) => {
49984
- log9.debug("Running command", { command });
49985
- return { exitCode: 0, output: "" };
49986
- }, []);
49987
- const startDevServer = useCallback(async () => {
49988
- log9.debug("Starting dev server");
49989
- setPreviewUrl("http://localhost:5173");
49990
- }, []);
49991
- return {
49992
- status,
49993
- error,
49994
- isLoading,
49995
- files,
49996
- selectedFile,
49997
- selectedPath,
49998
- previewUrl,
49999
- boot,
50000
- mountFiles,
50001
- readFile,
50002
- writeFile,
50003
- selectFile,
50004
- updateContent,
50005
- updateSelectedContent,
50006
- refreshTree,
50007
- runCommand,
50008
- startDevServer
50009
- };
50010
- }
50011
- var log10 = createLogger("almadar:ui:extensions");
50012
- var defaultManifest = {
50013
- languages: {
50014
- typescript: { extensions: [".ts", ".tsx"], icon: "ts", color: "#3178c6" },
50015
- javascript: { extensions: [".js", ".jsx"], icon: "js", color: "#f7df1e" },
50016
- json: { extensions: [".json", ".orb"], icon: "json", color: "#000000" },
50017
- css: { extensions: [".css"], icon: "css", color: "#264de4" },
50018
- html: { extensions: [".html"], icon: "html", color: "#e34c26" },
50019
- markdown: { extensions: [".md", ".mdx"], icon: "md", color: "#083fa1" }
50020
- },
50021
- extensions: []
50022
- };
50023
- function useExtensions(options) {
50024
- const { appId, loadOnMount = true } = options;
50025
- const [extensions, setExtensions] = useState([]);
50026
- const [manifest] = useState(defaultManifest);
50027
- const [isLoading, setIsLoading] = useState(false);
50028
- const [error, setError] = useState(null);
50029
- const loadExtension = useCallback(async (extensionId) => {
50030
- log10.debug("Loading extension", { extensionId });
50031
- }, []);
50032
- const loadExtensions = useCallback(async () => {
50033
- setIsLoading(true);
50034
- setError(null);
50035
- try {
50036
- const defaultExtensions = [
50037
- { id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
50038
- { id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
50039
- { id: "json", name: "JSON", language: "json", loaded: true },
50040
- { id: "css", name: "CSS", language: "css", loaded: true },
50041
- { id: "html", name: "HTML", language: "html", loaded: true },
50042
- { id: "markdown", name: "Markdown", language: "markdown", loaded: true }
50043
- ];
50044
- setExtensions(defaultExtensions);
50045
- } catch (err) {
50046
- setError(err instanceof Error ? err.message : "Failed to load extensions");
50047
- } finally {
50048
- setIsLoading(false);
50049
- }
50050
- }, []);
50051
- const getExtensionForFile = useCallback((filename) => {
50052
- const ext = filename.split(".").pop()?.toLowerCase();
50053
- if (!ext) return null;
50054
- const languageMap = {
50055
- ts: "typescript",
50056
- tsx: "typescript",
50057
- js: "javascript",
50058
- jsx: "javascript",
50059
- json: "json",
50060
- md: "markdown",
50061
- css: "css",
50062
- html: "html",
50063
- orb: "json"
50064
- };
50065
- const language = languageMap[ext];
50066
- if (!language) return null;
50067
- return extensions.find((e) => e.language === language) || null;
50068
- }, [extensions]);
50069
- useEffect(() => {
50070
- if (!appId || !loadOnMount) return;
50071
- const loadExtensions2 = async () => {
50072
- setIsLoading(true);
50073
- setError(null);
50074
- try {
50075
- const defaultExtensions = [
50076
- { id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
50077
- { id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
50078
- { id: "json", name: "JSON", language: "json", loaded: true },
50079
- { id: "css", name: "CSS", language: "css", loaded: true },
50080
- { id: "html", name: "HTML", language: "html", loaded: true },
50081
- { id: "markdown", name: "Markdown", language: "markdown", loaded: true }
50082
- ];
50083
- setExtensions(defaultExtensions);
50084
- } catch (err) {
50085
- setError(err instanceof Error ? err.message : "Failed to load extensions");
50086
- } finally {
50087
- setIsLoading(false);
50088
- }
50089
- };
50090
- loadExtensions2();
50091
- }, [appId, loadOnMount]);
50092
- return {
50093
- extensions,
50094
- manifest,
50095
- isLoading,
50096
- error,
50097
- loadExtension,
50098
- loadExtensions,
50099
- getExtensionForFile
50100
- };
50101
- }
50102
- var log11 = createLogger("almadar:ui:file-editor");
50103
- function useFileEditor(options) {
50104
- const { extensions, fileSystem, onSchemaUpdate } = options;
50105
- const [openFiles, setOpenFiles] = useState([]);
50106
- const [activeFilePath, setActiveFilePath] = useState(null);
50107
- const [isSaving, setIsSaving] = useState(false);
50108
- const activeFile = openFiles.find((f3) => f3.path === activeFilePath) || null;
50109
- const openFile = useCallback(async (path) => {
50110
- const existing = openFiles.find((f3) => f3.path === path);
50111
- if (existing) {
50112
- setActiveFilePath(path);
50113
- return;
50114
- }
50115
- try {
50116
- const content = await fileSystem.readFile(path);
50117
- const ext = extensions.getExtensionForFile(path);
50118
- const newFile = {
50119
- path,
50120
- content,
50121
- isDirty: false,
50122
- language: ext?.language
50123
- };
50124
- setOpenFiles((prev) => [...prev, newFile]);
50125
- setActiveFilePath(path);
50126
- } catch (err) {
50127
- log11.error("Failed to open file", { error: err instanceof Error ? err : String(err) });
50128
- }
50129
- }, [openFiles, fileSystem, extensions]);
50130
- const closeFile = useCallback((path) => {
50131
- setOpenFiles((prev) => prev.filter((f3) => f3.path !== path));
50132
- if (activeFilePath === path) {
50133
- const remaining = openFiles.filter((f3) => f3.path !== path);
50134
- setActiveFilePath(remaining.length > 0 ? remaining[0].path : null);
50135
- }
50136
- }, [activeFilePath, openFiles]);
50137
- const setActiveFile = useCallback((path) => {
50138
- setActiveFilePath(path);
50139
- }, []);
50140
- const updateFileContent = useCallback((path, content) => {
50141
- setOpenFiles(
50142
- (prev) => prev.map(
50143
- (f3) => f3.path === path ? { ...f3, content, isDirty: true } : f3
50144
- )
50145
- );
50146
- }, []);
50147
- const handleFileEdit = useCallback(async (path, content) => {
50148
- try {
50149
- await fileSystem.writeFile(path, content);
50150
- let action = "saved";
50151
- if (path.endsWith(".orb") || path.endsWith("schema.json")) {
50152
- try {
50153
- const schema = JSON.parse(content);
50154
- await onSchemaUpdate?.(schema);
50155
- action = "updated_schema";
50156
- } catch {
50157
- }
50158
- } else if (path.includes("/extensions/")) {
50159
- action = path.endsWith(".new") ? "converted_extension" : "saved_extension";
50160
- }
50161
- return { success: true, action };
50162
- } catch (err) {
50163
- return {
50164
- success: false,
50165
- error: err instanceof Error ? err.message : "Failed to save file"
50166
- };
50167
- }
50168
- }, [fileSystem, onSchemaUpdate]);
50169
- const saveFile = useCallback(async (path) => {
50170
- const file = openFiles.find((f3) => f3.path === path);
50171
- if (!file) return;
50172
- setIsSaving(true);
50173
- try {
50174
- await fileSystem.writeFile(path, file.content);
50175
- setOpenFiles(
50176
- (prev) => prev.map(
50177
- (f3) => f3.path === path ? { ...f3, isDirty: false } : f3
50178
- )
50179
- );
50180
- if (path.endsWith(".orb") || path.endsWith("schema.json")) {
50181
- try {
50182
- const schema = JSON.parse(file.content);
50183
- await onSchemaUpdate?.(schema);
50184
- } catch {
50185
- }
50186
- }
50187
- } catch (err) {
50188
- log11.error("Failed to save file", { error: err instanceof Error ? err : String(err) });
50189
- } finally {
50190
- setIsSaving(false);
50191
- }
50192
- }, [openFiles, fileSystem, onSchemaUpdate]);
50193
- const saveAllFiles = useCallback(async () => {
50194
- setIsSaving(true);
50195
- try {
50196
- const dirtyFiles = openFiles.filter((f3) => f3.isDirty);
50197
- for (const file of dirtyFiles) {
50198
- await saveFile(file.path);
50199
- }
50200
- } finally {
50201
- setIsSaving(false);
50202
- }
50203
- }, [openFiles, saveFile]);
50204
- return {
50205
- openFiles,
50206
- activeFile,
50207
- isSaving,
50208
- openFile,
50209
- closeFile,
50210
- setActiveFile,
50211
- updateFileContent,
50212
- handleFileEdit,
50213
- saveFile,
50214
- saveAllFiles
50215
- };
50216
- }
50217
- var log12 = createLogger("almadar:ui:compile");
50218
- function useCompile() {
50219
- const [isCompiling, setIsCompiling] = useState(false);
50220
- const [stage, setStage] = useState("idle");
50221
- const [lastResult, setLastResult] = useState(null);
50222
- const [error, setError] = useState(null);
50223
- const compileSchema = useCallback(async (schema) => {
50224
- setIsCompiling(true);
50225
- setStage("compiling");
50226
- setError(null);
50227
- try {
50228
- log12.debug("Compiling schema", { name: schema.name });
50229
- const result = {
50230
- success: true,
50231
- files: []
50232
- };
50233
- setLastResult(result);
50234
- setStage("done");
50235
- return result;
50236
- } catch (err) {
50237
- const errorMessage = err instanceof Error ? err.message : "Compilation failed";
50238
- setError(errorMessage);
50239
- setStage("error");
50240
- setLastResult({ success: false, errors: [errorMessage] });
50241
- return null;
50242
- } finally {
50243
- setIsCompiling(false);
50244
- }
50245
- }, []);
50246
- return {
50247
- isCompiling,
50248
- stage,
50249
- lastResult,
50250
- error,
50251
- compileSchema
50252
- };
50253
- }
50254
- var log13 = createLogger("almadar:ui:preview");
50255
- function usePreview(options) {
50256
- const [previewUrl, setPreviewUrl] = useState(null);
50257
- const [isLoading, setIsLoading] = useState(!!options?.appId);
50258
- const [error, setError] = useState(null);
50259
- const [loadError, setLoadError] = useState(null);
50260
- const [app, setApp] = useState(null);
50261
- const [isFullscreen, setIsFullscreen] = useState(false);
50262
- const [isExecutingEvent, setIsExecutingEvent] = useState(false);
50263
- const [errorToast, setErrorToast] = useState(null);
50264
- const [currentStateName, setCurrentStateName] = useState(null);
50265
- const [notificationsList, setNotificationsList] = useState([]);
50266
- const [isPanelOpen, setIsPanelOpen] = useState(false);
50267
- const notifications = useMemo(() => ({
50268
- notifications: notificationsList,
50269
- isPanelOpen,
50270
- closePanel: () => setIsPanelOpen(false),
50271
- dismissNotification: (id) => {
50272
- setNotificationsList((prev) => prev.filter((n) => n.id !== id));
50273
- },
50274
- markAsRead: (id) => {
50275
- setNotificationsList(
50276
- (prev) => prev.map((n) => n.id === id ? { ...n, read: true } : n)
50277
- );
50278
- },
50279
- clearAll: () => setNotificationsList([])
50280
- }), [notificationsList, isPanelOpen]);
50281
- useEffect(() => {
50282
- const appId = options?.appId;
50283
- if (!appId) {
50284
- setApp(null);
50285
- setIsLoading(false);
50286
- return;
50287
- }
50288
- log13.debug("Setting up preview for app", { appId });
50289
- setPreviewUrl(`/api/orbitals/${appId}`);
50290
- setIsLoading(false);
50291
- }, [options?.appId]);
50292
- const startPreview = useCallback(async () => {
50293
- log13.debug("startPreview called");
50294
- }, []);
50295
- const stopPreview = useCallback(async () => {
50296
- setIsLoading(true);
50297
- try {
50298
- log13.debug("Stopping preview server");
50299
- setPreviewUrl(null);
50300
- setApp(null);
50301
- } finally {
50302
- setIsLoading(false);
50303
- }
50304
- }, []);
50305
- const refresh = useCallback(async () => {
50306
- if (!previewUrl) return;
50307
- log13.debug("Refreshing preview");
50308
- setPreviewUrl(`${previewUrl.split("?")[0]}?t=${Date.now()}`);
50309
- }, [previewUrl]);
50310
- const handleRefresh = useCallback(async () => {
50311
- log13.debug("Handle refresh");
50312
- await refresh();
50313
- }, [refresh]);
50314
- const handleReset = useCallback(async () => {
50315
- log13.debug("Resetting preview");
50316
- setError(null);
50317
- setLoadError(null);
50318
- setErrorToast(null);
50319
- setIsExecutingEvent(false);
50320
- setCurrentStateName(null);
50321
- }, []);
50322
- const toggleFullscreen = useCallback(() => {
50323
- setIsFullscreen((prev) => !prev);
50324
- }, []);
50325
- const dismissErrorToast = useCallback(() => {
50326
- setErrorToast(null);
50327
- }, []);
50328
- return {
50329
- previewUrl,
50330
- isLoading,
50331
- error,
50332
- loadError,
50333
- app,
50334
- isFullscreen,
50335
- isExecutingEvent,
50336
- errorToast,
50337
- currentStateName,
50338
- notifications,
50339
- startPreview,
50340
- stopPreview,
50341
- refresh,
50342
- handleRefresh,
50343
- handleReset,
50344
- toggleFullscreen,
50345
- setErrorToast,
50346
- dismissErrorToast
50347
- };
50348
- }
50349
- var log14 = createLogger("almadar:ui:agent-chat");
50350
- function useAgentChat(options) {
50351
- const [messages, setMessages] = useState([]);
50352
- const [status, setStatus] = useState("idle");
50353
- const [activities, setActivities] = useState([]);
50354
- const [todos, setTodos] = useState([]);
50355
- const [schemaDiffs, setSchemaDiffs] = useState([]);
50356
- const [isLoading, setIsLoading] = useState(false);
50357
- const [error, setError] = useState(null);
50358
- const [threadId] = useState(null);
50359
- const [interrupt, setInterrupt] = useState(null);
50360
- const sendMessage = useCallback(async (content) => {
50361
- setIsLoading(true);
50362
- setStatus("running");
50363
- setError(null);
50364
- try {
50365
- const userMessage = {
50366
- id: Date.now().toString(),
50367
- role: "user",
50368
- content,
50369
- timestamp: Date.now()
50370
- };
50371
- setMessages((prev) => [...prev, userMessage]);
50372
- log14.debug("Sending message", { content });
50373
- const assistantMessage = {
50374
- id: (Date.now() + 1).toString(),
50375
- role: "assistant",
50376
- content: "Agent chat is not yet implemented.",
50377
- timestamp: Date.now()
50378
- };
50379
- setMessages((prev) => [...prev, assistantMessage]);
50380
- setStatus("idle");
50381
- options?.onComplete?.();
50382
- } catch (err) {
50383
- setError(err instanceof Error ? err.message : "Failed to send message");
50384
- setStatus("error");
50385
- } finally {
50386
- setIsLoading(false);
50387
- }
50388
- }, [options]);
50389
- const startGeneration = useCallback(async (skill, prompt, genOptions) => {
50390
- setStatus("running");
50391
- setIsLoading(true);
50392
- setError(null);
50393
- const skillName = Array.isArray(skill) ? skill[0] : skill;
50394
- try {
50395
- log14.debug("Starting generation", () => ({ skillName, prompt, genOptions: JSON.stringify(genOptions) }));
50396
- await new Promise((resolve) => setTimeout(resolve, 100));
50397
- setStatus("complete");
50398
- options?.onComplete?.();
50399
- } catch (err) {
50400
- setError(err instanceof Error ? err.message : "Generation failed");
50401
- setStatus("error");
50402
- } finally {
50403
- setIsLoading(false);
50404
- }
50405
- }, [options]);
50406
- const continueConversation = useCallback(async (message) => {
50407
- log14.debug("Continue conversation", { message: Array.isArray(message) ? message : [message] });
50408
- }, []);
50409
- const resumeWithDecision = useCallback(async (decisions) => {
50410
- log14.debug("Resume with decision", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
50411
- setInterrupt(null);
50412
- }, []);
50413
- const cancel = useCallback(() => {
50414
- setStatus("idle");
50415
- setIsLoading(false);
50416
- setInterrupt(null);
50417
- }, []);
50418
- const clearMessages = useCallback(() => {
50419
- setMessages([]);
50420
- }, []);
50421
- const clearHistory = useCallback(() => {
50422
- setMessages([]);
50423
- setActivities([]);
50424
- setTodos([]);
50425
- setSchemaDiffs([]);
50426
- setError(null);
50427
- }, []);
50428
- return {
50429
- messages,
50430
- status,
50431
- activities,
50432
- todos,
50433
- schemaDiffs,
50434
- isLoading,
50435
- error,
50436
- threadId,
50437
- interrupt,
50438
- sendMessage,
50439
- startGeneration,
50440
- continueConversation,
50441
- resumeWithDecision,
50442
- cancel,
50443
- clearMessages,
50444
- clearHistory
50445
- };
50446
- }
50447
- var log15 = createLogger("almadar:ui:validation");
50448
- function useValidation() {
50449
- const [result, setResult] = useState(null);
50450
- const [isValidating, setIsValidating] = useState(false);
50451
- const [error, setError] = useState(null);
50452
- const [stage, setStage] = useState("idle");
50453
- const [isFixing, setIsFixing] = useState(false);
50454
- const [progressMessage, setProgressMessage] = useState(null);
50455
- const validate = useCallback(async (appId) => {
50456
- setIsValidating(true);
50457
- setError(null);
50458
- setStage("validating");
50459
- setProgressMessage("Validating schema...");
50460
- try {
50461
- log15.debug("Validating app", { appId });
50462
- const validationResult = {
50463
- valid: true,
50464
- errors: [],
50465
- warnings: []
50466
- };
50467
- setResult(validationResult);
50468
- setStage("complete");
50469
- setProgressMessage(null);
50470
- return validationResult;
50471
- } catch (err) {
50472
- const errorMessage = err instanceof Error ? err.message : "Validation failed";
50473
- setError(errorMessage);
50474
- const failedResult = {
50475
- valid: false,
50476
- errors: [{ code: "VALIDATION_ERROR", message: errorMessage, severity: "error" }],
50477
- warnings: []
50478
- };
50479
- setResult(failedResult);
50480
- setStage("complete");
50481
- setProgressMessage(null);
50482
- return failedResult;
50483
- } finally {
50484
- setIsValidating(false);
50485
- }
50486
- }, []);
50487
- const clearResult = useCallback(() => {
50488
- setResult(null);
50489
- setError(null);
50490
- }, []);
50491
- const reset = useCallback(() => {
50492
- setResult(null);
50493
- setError(null);
50494
- setStage("idle");
50495
- setIsFixing(false);
50496
- setProgressMessage(null);
50497
- setIsValidating(false);
50498
- }, []);
50499
- return {
50500
- result,
50501
- isValidating,
50502
- error,
50503
- stage,
50504
- isFixing,
50505
- progressMessage,
50506
- errors: result?.errors ?? [],
50507
- warnings: result?.warnings ?? [],
50508
- isValid: result?.valid ?? false,
50509
- validate,
50510
- clearResult,
50511
- reset
50512
- };
50513
- }
50514
- var log16 = createLogger("almadar:ui:deep-agent");
50515
- function useDeepAgentGeneration() {
50516
- const [requests, setRequests] = useState([]);
50517
- const [currentRequest, setCurrentRequest] = useState(null);
50518
- const [isGenerating, setIsGenerating] = useState(false);
50519
- const [isLoading, setIsLoading] = useState(false);
50520
- const [isComplete, setIsComplete] = useState(false);
50521
- const [progress, setProgress] = useState({ stage: "idle", percent: 0, message: "" });
50522
- const [error, setError] = useState(null);
50523
- const [interrupt, setInterrupt] = useState(null);
50524
- const generate = useCallback(async (prompt) => {
50525
- setIsGenerating(true);
50526
- setIsLoading(true);
50527
- setIsComplete(false);
50528
- setError(null);
50529
- setProgress({ stage: "starting", percent: 0, message: "Starting generation..." });
50530
- const request = {
50531
- id: Date.now().toString(),
50532
- prompt,
50533
- status: "running"
50534
- };
50535
- setCurrentRequest(request);
50536
- setRequests((prev) => [...prev, request]);
50537
- try {
50538
- log16.debug("Generating from prompt", { prompt });
50539
- await new Promise((resolve) => setTimeout(resolve, 100));
50540
- request.status = "completed";
50541
- setCurrentRequest(request);
50542
- setIsComplete(true);
50543
- setProgress({ stage: "complete", percent: 100, message: "Generation complete" });
50544
- return null;
50545
- } catch (err) {
50546
- const errorMessage = err instanceof Error ? err.message : "Generation failed";
50547
- setError(errorMessage);
50548
- request.status = "failed";
50549
- request.error = errorMessage;
50550
- setCurrentRequest(request);
50551
- return null;
50552
- } finally {
50553
- setIsGenerating(false);
50554
- setIsLoading(false);
50555
- }
50556
- }, []);
50557
- const startGeneration = useCallback(async (skill, prompt, _options) => {
50558
- log16.debug("Starting generation with skill", { skill });
50559
- await generate(prompt);
50560
- }, [generate]);
50561
- const cancelGeneration = useCallback(() => {
50562
- if (currentRequest) {
50563
- currentRequest.status = "failed";
50564
- currentRequest.error = "Cancelled by user";
50565
- setCurrentRequest(null);
50566
- }
50567
- setIsGenerating(false);
50568
- setIsLoading(false);
50569
- setIsComplete(false);
50570
- setProgress({ stage: "idle", percent: 0, message: "" });
50571
- }, [currentRequest]);
50572
- const clearRequests = useCallback(() => {
50573
- setRequests([]);
50574
- setCurrentRequest(null);
50575
- setError(null);
50576
- setProgress({ stage: "idle", percent: 0, message: "" });
50577
- setIsComplete(false);
50578
- }, []);
50579
- const submitInterruptDecisions = useCallback((decisions) => {
50580
- log16.debug("Submitting interrupt decisions", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
50581
- setInterrupt(null);
50582
- }, []);
50583
- return {
50584
- requests,
50585
- currentRequest,
50586
- isGenerating,
50587
- isLoading,
50588
- isComplete,
50589
- progress,
50590
- error,
50591
- interrupt,
50592
- generate,
50593
- startGeneration,
50594
- cancelGeneration,
50595
- clearRequests,
50596
- submitInterruptDecisions
50597
- };
50598
- }
50599
-
50600
- // hooks/index.ts
50601
- init_useEventBus();
50602
- var log17 = createLogger("almadar:ui:ui-slots");
50603
- var DEFAULT_SOURCE_KEY = "__default__";
50604
- var MULTI_SOURCE_STACK_TRAIT = "__multi_source_stack__";
50605
- var ALL_SLOTS2 = [
50606
- "main",
50607
- "sidebar",
50608
- "modal",
50609
- "drawer",
50610
- "overlay",
50611
- "center",
50612
- "toast",
50613
- "hud-top",
50614
- "hud-bottom",
50615
- "hud-left",
50616
- "hud-right",
50617
- "floating"
50618
- ];
50619
- var DEFAULT_SLOTS = ALL_SLOTS2.reduce(
50620
- (acc, slot) => {
50621
- acc[slot] = null;
50622
- return acc;
50623
- },
50624
- {}
50625
- );
50626
- var DEFAULT_SOURCES = ALL_SLOTS2.reduce(
50627
- (acc, slot) => {
50628
- acc[slot] = {};
50629
- return acc;
50630
- },
50631
- {}
50632
- );
50633
- var idCounter = 0;
50634
- function generateId() {
50635
- return `slot-content-${++idCounter}-${Date.now()}`;
50636
- }
50637
- function aggregateSlot(sources) {
50638
- if (!sources) return null;
50639
- const entries = Object.entries(sources);
50640
- if (entries.length === 0) return null;
50641
- if (entries.length === 1) return entries[0][1];
50642
- const children = entries.map(([, entry]) => ({
50643
- type: entry.pattern,
50644
- ...entry.props
50645
- }));
50646
- const stackId = `slot-content-stack-${entries.map(([k]) => k).join("-")}`;
50647
- return {
50648
- id: stackId,
50649
- pattern: "stack",
50650
- props: {
50651
- direction: "vertical",
50652
- gap: "lg",
50653
- children
50654
- },
50655
- priority: 0,
50656
- animation: "fade",
50657
- sourceTrait: MULTI_SOURCE_STACK_TRAIT
50658
- };
50659
- }
50660
- function useUISlotManager() {
50661
- const [sources, setSources] = useState(DEFAULT_SOURCES);
50662
- const subscribersRef = useRef(/* @__PURE__ */ new Set());
50663
- const timersRef = useRef(/* @__PURE__ */ new Map());
50664
- const traitIndexRef = useRef(/* @__PURE__ */ new Map());
50665
- const traitSubscribersRef = useRef(/* @__PURE__ */ new Map());
50666
- const slots = useMemo(() => {
50667
- const out = { ...DEFAULT_SLOTS };
50668
- for (const slot of ALL_SLOTS2) {
50669
- out[slot] = aggregateSlot(sources[slot]);
50670
- }
50671
- return out;
50672
- }, [sources]);
50673
- useEffect(() => {
50674
- return () => {
50675
- timersRef.current.forEach((timer) => clearTimeout(timer));
50676
- timersRef.current.clear();
50677
- };
50678
- }, []);
50679
- const notifySubscribers = useCallback((slot, content) => {
50680
- subscribersRef.current.forEach((callback) => {
50681
- try {
50682
- callback(slot, content);
50683
- } catch (error) {
50684
- log17.error("Subscriber error", { error: error instanceof Error ? error : String(error) });
50685
- }
50686
- });
50687
- }, []);
50688
- const notifyTraitSubscribers = useCallback(
50689
- (traitName, content) => {
50690
- const subs = traitSubscribersRef.current.get(traitName);
50691
- if (!subs) return;
50692
- subs.forEach((callback) => {
50693
- try {
50694
- callback(content);
50695
- } catch (error) {
50696
- log17.error("Trait subscriber error", { traitName, error: error instanceof Error ? error : String(error) });
50697
- }
50698
- });
50699
- },
50700
- []
50701
- );
50702
- const indexTraitRender = useCallback(
50703
- (traitName, content) => {
50704
- traitIndexRef.current.set(traitName, content);
50705
- },
50706
- []
50707
- );
50708
- const unindexTrait = useCallback((traitName) => {
50709
- traitIndexRef.current.delete(traitName);
50710
- }, []);
50711
- const render = useCallback(
50712
- (config) => {
50713
- const id = generateId();
50714
- const sourceKey = config.sourceTrait ?? DEFAULT_SOURCE_KEY;
50715
- const content = {
50716
- id,
50717
- pattern: config.pattern,
50718
- props: config.props ?? {},
50719
- priority: config.priority ?? 0,
50720
- animation: config.animation ?? "fade",
50721
- onDismiss: config.onDismiss,
50722
- sourceTrait: config.sourceTrait,
50723
- slot: config.target,
50724
- transitionEvent: config.transitionEvent,
50725
- fromState: config.fromState,
50726
- entity: config.entity
50727
- };
50728
- if (config.autoDismissMs && config.autoDismissMs > 0) {
50729
- content.autoDismissAt = Date.now() + config.autoDismissMs;
50730
- const timer = setTimeout(() => {
50731
- setSources((prev) => {
50732
- const slotSources = prev[config.target];
50733
- if (slotSources && slotSources[sourceKey]?.id === id) {
50734
- content.onDismiss?.();
50735
- const next = { ...slotSources };
50736
- delete next[sourceKey];
50737
- const updated = { ...prev, [config.target]: next };
50738
- notifySubscribers(config.target, aggregateSlot(next));
50739
- return updated;
50740
- }
50741
- return prev;
50742
- });
50743
- timersRef.current.delete(id);
50744
- }, config.autoDismissMs);
50745
- timersRef.current.set(id, timer);
50746
- }
50747
- setSources((prev) => {
50748
- const slotSources = prev[config.target] ?? {};
50749
- const existing = slotSources[sourceKey];
50750
- if (existing && existing.priority > content.priority) {
50751
- log17.warn("Slot already has higher priority content", {
50752
- slot: config.target,
50753
- sourceKey,
50754
- existingPriority: existing.priority,
50755
- newPriority: content.priority
50756
- });
50757
- return prev;
50758
- }
50759
- const nextSources = {
50760
- ...slotSources,
50761
- [sourceKey]: content
50762
- };
50763
- const nextAll = { ...prev, [config.target]: nextSources };
50764
- if (content.sourceTrait) {
50765
- indexTraitRender(content.sourceTrait, content);
50766
- notifyTraitSubscribers(content.sourceTrait, content);
50767
- }
50768
- log17.info("slot:written", {
50769
- slot: config.target,
50770
- sourceKey,
50771
- sourceTrait: content.sourceTrait,
50772
- patternType: content.pattern,
50773
- priority: content.priority
50774
- });
50775
- notifySubscribers(config.target, aggregateSlot(nextSources));
50776
- return nextAll;
50777
- });
50778
- return id;
50779
- },
50780
- [notifySubscribers, notifyTraitSubscribers, indexTraitRender]
50781
- );
50782
- const clear = useCallback(
50783
- (slot) => {
50784
- setSources((prev) => {
50785
- const slotSources = prev[slot];
50786
- if (!slotSources || Object.keys(slotSources).length === 0) {
50787
- return prev;
50788
- }
50789
- for (const content of Object.values(slotSources)) {
50790
- const timer = timersRef.current.get(content.id);
50791
- if (timer) {
50792
- clearTimeout(timer);
50793
- timersRef.current.delete(content.id);
50794
- }
50795
- content.onDismiss?.();
50796
- if (content.sourceTrait) {
50797
- unindexTrait(content.sourceTrait);
50798
- notifyTraitSubscribers(content.sourceTrait, null);
50799
- }
50800
- }
50801
- notifySubscribers(slot, null);
50802
- return { ...prev, [slot]: {} };
50803
- });
50804
- },
50805
- [notifySubscribers, notifyTraitSubscribers, unindexTrait]
50806
- );
50807
- const clearBySource = useCallback(
50808
- (slot, sourceTrait) => {
50809
- const sourceKey = sourceTrait;
50810
- setSources((prev) => {
50811
- const slotSources = prev[slot];
50812
- if (!slotSources || !(sourceKey in slotSources)) {
50813
- log17.debug("slot:clear-noop", { slot, sourceTrait, reason: !slotSources ? "no-slot" : "no-source" });
50814
- return prev;
50815
- }
50816
- const content = slotSources[sourceKey];
50817
- const timer = timersRef.current.get(content.id);
50818
- if (timer) {
50819
- clearTimeout(timer);
50820
- timersRef.current.delete(content.id);
50821
- }
50822
- content.onDismiss?.();
50823
- if (content.sourceTrait) {
50824
- unindexTrait(content.sourceTrait);
50825
- notifyTraitSubscribers(content.sourceTrait, null);
50826
- }
50827
- const nextSources = { ...slotSources };
50828
- delete nextSources[sourceKey];
50829
- log17.info("slot:cleared", { slot, sourceTrait, lastPatternType: content.pattern });
50830
- notifySubscribers(slot, aggregateSlot(nextSources));
50831
- return { ...prev, [slot]: nextSources };
50832
- });
50833
- },
50834
- [notifySubscribers, notifyTraitSubscribers, unindexTrait]
50835
- );
50836
- const clearById = useCallback(
50837
- (id) => {
50838
- setSources((prev) => {
50839
- for (const slot of ALL_SLOTS2) {
50840
- const slotSources = prev[slot];
50841
- if (!slotSources) continue;
50842
- const matchKey = Object.keys(slotSources).find(
50843
- (k) => slotSources[k].id === id
50844
- );
50845
- if (!matchKey) continue;
50846
- const content = slotSources[matchKey];
50847
- const timer = timersRef.current.get(id);
50848
- if (timer) {
50849
- clearTimeout(timer);
50850
- timersRef.current.delete(id);
50851
- }
50852
- content.onDismiss?.();
50853
- if (content.sourceTrait) {
50854
- unindexTrait(content.sourceTrait);
50855
- notifyTraitSubscribers(content.sourceTrait, null);
50856
- }
50857
- const nextSources = { ...slotSources };
50858
- delete nextSources[matchKey];
50859
- notifySubscribers(slot, aggregateSlot(nextSources));
50860
- return { ...prev, [slot]: nextSources };
50861
- }
50862
- return prev;
50863
- });
50864
- },
50865
- [notifySubscribers, notifyTraitSubscribers, unindexTrait]
50866
- );
50867
- const clearAll = useCallback(() => {
50868
- timersRef.current.forEach((timer) => clearTimeout(timer));
50869
- timersRef.current.clear();
50870
- setSources((prev) => {
50871
- for (const slot of ALL_SLOTS2) {
50872
- const slotSources = prev[slot];
50873
- if (!slotSources) continue;
50874
- for (const content of Object.values(slotSources)) {
50875
- content.onDismiss?.();
50876
- if (content.sourceTrait) {
50877
- notifyTraitSubscribers(content.sourceTrait, null);
50878
- }
50879
- }
50880
- notifySubscribers(slot, null);
50881
- }
50882
- return DEFAULT_SOURCES;
50883
- });
50884
- traitIndexRef.current.clear();
50885
- }, [notifySubscribers, notifyTraitSubscribers]);
50886
- const subscribe2 = useCallback((callback) => {
50887
- subscribersRef.current.add(callback);
50888
- return () => {
50889
- subscribersRef.current.delete(callback);
50890
- };
50891
- }, []);
50892
- const hasContent = useCallback(
50893
- (slot) => slots[slot] !== null,
50894
- [slots]
50895
- );
50896
- const getContent = useCallback(
50897
- (slot) => slots[slot],
50898
- [slots]
50899
- );
50900
- const getTraitContent = useCallback(
50901
- (traitName) => traitIndexRef.current.get(traitName) ?? null,
50902
- []
50903
- );
50904
- const subscribeTrait = useCallback(
50905
- (traitName, callback) => {
50906
- let set = traitSubscribersRef.current.get(traitName);
50907
- if (!set) {
50908
- set = /* @__PURE__ */ new Set();
50909
- traitSubscribersRef.current.set(traitName, set);
50910
- }
50911
- set.add(callback);
50912
- return () => {
50913
- const s = traitSubscribersRef.current.get(traitName);
50914
- if (!s) return;
50915
- s.delete(callback);
50916
- if (s.size === 0) {
50917
- traitSubscribersRef.current.delete(traitName);
50918
- }
50919
- };
50920
- },
50921
- []
50922
- );
50923
- const updateTraitContent = useCallback(
50924
- (traitName, content) => {
50925
- const id = generateId();
50926
- const fullContent = { ...content, id, sourceTrait: traitName };
50927
- indexTraitRender(traitName, fullContent);
50928
- notifyTraitSubscribers(traitName, fullContent);
50929
- return id;
50930
- },
50931
- [indexTraitRender, notifyTraitSubscribers]
50932
- );
50933
- return {
50934
- slots,
50935
- render,
50936
- clear,
50937
- clearBySource,
50938
- clearById,
50939
- clearAll,
50940
- subscribe: subscribe2,
50941
- hasContent,
50942
- getContent,
50943
- getTraitContent,
50944
- subscribeTrait,
50945
- updateTraitContent
50946
- };
50947
- }
50948
-
50949
- // hooks/useUIEvents.ts
50950
- init_useEventBus();
50951
- var UI_PREFIX = "UI:";
50952
- function useUIEvents(dispatch, traitName, validEvents, eventBusInstance) {
50953
- const defaultEventBus = useEventBus();
50954
- const eventBus = eventBusInstance ?? defaultEventBus;
50955
- const validEventsKey = validEvents.slice().sort().join(",");
50956
- const stableValidEvents = useMemo(
50957
- () => validEvents,
50958
- [validEventsKey]
50959
- // intentional — validEventsKey is the stable dep
50960
- );
50961
- useEffect(() => {
50962
- const unsubscribes = [];
50963
- for (const smEvent of stableValidEvents) {
50964
- const handler = (event) => {
50965
- if (event.source && event.source.dispatched) {
50966
- return;
50967
- }
50968
- dispatch(smEvent, event.payload);
50969
- };
50970
- unsubscribes.push(
50971
- eventBus.on(`${UI_PREFIX}${traitName}.${smEvent}`, handler)
50972
- );
50973
- }
50974
- return () => {
50975
- for (const unsub of unsubscribes) {
50976
- if (typeof unsub === "function") unsub();
50977
- }
50978
- };
50979
- }, [eventBus, dispatch, traitName, stableValidEvents]);
50980
- }
50981
- function useTraitListens(dispatch, listens, eventBusInstance) {
50982
- const defaultEventBus = useEventBus();
50983
- const eventBus = eventBusInstance ?? defaultEventBus;
50984
- const stableKey = listens.map((l) => `${l.sourceKey}->${l.trigger}`).sort().join("|");
50985
- const stableListens = useMemo(
50986
- () => listens,
50987
- [stableKey]
50988
- // intentional
50989
- );
50990
- useEffect(() => {
50991
- const unsubscribes = [];
50992
- for (const spec of stableListens) {
50993
- const handler = (event) => {
50994
- dispatch(spec.trigger, event.payload);
50995
- };
50996
- unsubscribes.push(eventBus.on(`${UI_PREFIX}${spec.sourceKey}`, handler));
50997
- }
50998
- return () => {
50999
- for (const unsub of unsubscribes) {
51000
- if (typeof unsub === "function") unsub();
51001
- }
51002
- };
51003
- }, [eventBus, dispatch, stableListens]);
51004
- }
51005
-
51006
- // hooks/index.ts
51007
- init_useQuerySingleton();
51008
-
51009
- // stores/entityStore.ts
51010
- var entities = /* @__PURE__ */ new Map();
51011
- var listeners7 = /* @__PURE__ */ new Set();
51012
- var idCounter2 = 0;
51013
- function subscribe(listener) {
51014
- listeners7.add(listener);
51015
- return () => listeners7.delete(listener);
51016
- }
51017
- function notify() {
51018
- listeners7.forEach((listener) => listener());
51019
- }
51020
- function getEntity(id) {
51021
- return entities.get(id);
51022
- }
51023
- function getByType(type) {
51024
- const types = Array.isArray(type) ? type : [type];
51025
- return [...entities.values()].filter((e) => types.includes(e.type));
51026
- }
51027
- function getAllEntities() {
51028
- return [...entities.values()];
51029
- }
51030
- function getSingleton(type) {
51031
- return [...entities.values()].find((e) => e.type === type);
51032
- }
51033
- function spawnEntity(config) {
51034
- const id = config.id ?? `entity_${++idCounter2}`;
51035
- const entity = { ...config, id };
51036
- entities = new Map(entities);
51037
- entities.set(id, entity);
51038
- notify();
51039
- return id;
51040
- }
51041
- function updateEntity(id, updates) {
51042
- const entity = entities.get(id);
51043
- if (entity) {
51044
- entities = new Map(entities);
51045
- entities.set(id, { ...entity, ...updates });
51046
- notify();
51047
- }
51048
- }
51049
- function updateSingleton(type, updates) {
51050
- const entity = getSingleton(type);
51051
- if (entity) {
51052
- updateEntity(entity.id, updates);
51053
- }
51054
- }
51055
- function removeEntity(id) {
51056
- if (entities.has(id)) {
51057
- entities = new Map(entities);
51058
- entities.delete(id);
51059
- notify();
51060
- }
51061
- }
51062
- function clearEntities() {
51063
- entities = /* @__PURE__ */ new Map();
51064
- notify();
51065
- }
51066
- function getSnapshot2() {
51067
- return entities;
51068
- }
51069
-
51070
- // hooks/useEntities.ts
51071
- function useEntities() {
51072
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51073
- return {
51074
- entities: entities2,
51075
- getEntity,
51076
- getByType,
51077
- getAllEntities,
51078
- getSingleton,
51079
- spawnEntity,
51080
- updateEntity,
51081
- updateSingleton,
51082
- removeEntity,
51083
- clearEntities
51084
- };
51085
- }
51086
- function useEntity(id) {
51087
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51088
- return entities2.get(id);
51089
- }
51090
- function useEntitiesByType(type) {
51091
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51092
- return [...entities2.values()].filter((e) => e.type === type);
51093
- }
51094
- function useSingletonEntity(type) {
51095
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51096
- return [...entities2.values()].find((e) => e.type === type);
51097
- }
51098
- function usePlayer() {
51099
- const player = useSingletonEntity("Player");
51100
- const update = useCallback((updates) => {
51101
- if (player) updateEntity(player.id, updates);
51102
- }, [player?.id]);
51103
- return { player, updatePlayer: update };
51104
- }
51105
- function usePhysics() {
51106
- const physics = useSingletonEntity("Physics");
51107
- const update = useCallback((updates) => {
51108
- if (physics) updateEntity(physics.id, updates);
51109
- }, [physics?.id]);
51110
- return { physics, updatePhysics: update };
51111
- }
51112
- function useInput() {
51113
- const input = useSingletonEntity("Input");
51114
- const update = useCallback((updates) => {
51115
- if (input) updateEntity(input.id, updates);
51116
- }, [input?.id]);
51117
- return { input, updateInput: update };
51118
- }
51119
-
51120
- // hooks/index.ts
51121
- init_useTranslate();
51122
- init_useAuthContext();
51123
- init_useSwipeGesture();
51124
- init_useLongPress();
51125
- init_useDragReorder();
51126
- init_useInfiniteScroll();
51127
- init_usePullToRefresh();
51128
- function getDistance(touches) {
51129
- const dx = touches[0].clientX - touches[1].clientX;
51130
- const dy = touches[0].clientY - touches[1].clientY;
51131
- return Math.sqrt(dx * dx + dy * dy);
51132
- }
51133
- function usePinchZoom(options = {}) {
51134
- const { minScale = 0.5, maxScale = 4 } = options;
51135
- const [scale, setScale] = useState(1);
51136
- const [isPinching, setIsPinching] = useState(false);
51137
- const initialDistance = useRef(0);
51138
- const initialScale = useRef(1);
51139
- const onTouchStart = useCallback((e) => {
51140
- if (e.touches.length === 2) {
51141
- initialDistance.current = getDistance(e.touches);
51142
- initialScale.current = scale;
51143
- setIsPinching(true);
51144
- }
51145
- }, [scale]);
51146
- const onTouchMove = useCallback((e) => {
51147
- if (e.touches.length !== 2 || !isPinching) return;
51148
- e.preventDefault();
51149
- const currentDistance = getDistance(e.touches);
51150
- const ratio = currentDistance / initialDistance.current;
51151
- const newScale = Math.min(maxScale, Math.max(minScale, initialScale.current * ratio));
51152
- setScale(newScale);
51153
- }, [isPinching, minScale, maxScale]);
51154
- const onTouchEnd = useCallback(() => {
51155
- setIsPinching(false);
51156
- }, []);
51157
- const resetZoom = useCallback(() => {
51158
- setScale(1);
51159
- }, []);
51160
- return {
51161
- scale,
51162
- isPinching,
51163
- gestureProps: {
51164
- onTouchStart,
51165
- onTouchMove,
51166
- onTouchEnd
51167
- },
51168
- resetZoom
51169
- };
51170
- }
51171
-
51172
- // hooks/useDraggable.ts
51173
- init_useEventBus();
51174
- var ALMADAR_DND_MIME = "application/x-almadar-dnd";
51175
- function useDraggable({ payload, disabled = false }) {
51176
- const [isDragging, setIsDragging] = useState(false);
51177
- const eventBus = useEventBus();
51178
- const handleDragStart = useCallback(
51179
- (e) => {
51180
- if (disabled) {
51181
- e.preventDefault();
51182
- return;
51183
- }
51184
- e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
51185
- e.dataTransfer.effectAllowed = "copy";
51186
- setIsDragging(true);
51187
- eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
51188
- },
51189
- [disabled, payload, eventBus]
51190
- );
51191
- const handleDragEnd = useCallback(
51192
- (e) => {
51193
- setIsDragging(false);
51194
- eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
51195
- },
51196
- [payload, eventBus]
51197
- );
51198
- const dragProps = useMemo(
51199
- () => ({
51200
- draggable: !disabled,
51201
- onDragStart: handleDragStart,
51202
- onDragEnd: handleDragEnd,
51203
- "aria-grabbed": isDragging
51204
- }),
51205
- [disabled, handleDragStart, handleDragEnd, isDragging]
51206
- );
51207
- return { dragProps, isDragging };
51208
- }
51209
-
51210
- // hooks/useDropZone.ts
51211
- init_useEventBus();
51212
- function parsePayload(e) {
51213
- try {
51214
- const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
51215
- if (!raw) return null;
51216
- const parsed = JSON.parse(raw);
51217
- if (typeof parsed.kind !== "string" || !parsed.data) return null;
51218
- return parsed;
51219
- } catch {
51220
- return null;
51221
- }
51222
- }
51223
- function hasAlmadarPayload(e) {
51224
- return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
51225
- }
51226
- function useDropZone({ accepts, onDrop, disabled = false }) {
51227
- const [isOver, setIsOver] = useState(false);
51228
- const eventBus = useEventBus();
51229
- const handleDragOver = useCallback(
51230
- (e) => {
51231
- if (disabled) return;
51232
- if (!hasAlmadarPayload(e)) return;
51233
- e.preventDefault();
51234
- e.dataTransfer.dropEffect = "copy";
51235
- setIsOver(true);
51236
- },
51237
- [disabled]
51238
- );
51239
- const handleDragLeave = useCallback(
51240
- (e) => {
51241
- setIsOver(false);
51242
- },
51243
- []
51244
- );
51245
- const handleDrop = useCallback(
51246
- (e) => {
51247
- e.preventDefault();
51248
- setIsOver(false);
51249
- if (disabled) return;
51250
- const payload = parsePayload(e);
51251
- if (!payload) return;
51252
- if (!accepts.includes(payload.kind)) return;
51253
- const position = { x: e.clientX, y: e.clientY };
51254
- onDrop(payload, position);
51255
- eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
51256
- },
51257
- [disabled, accepts, onDrop, eventBus]
51258
- );
51259
- const dropProps = useMemo(
51260
- () => ({
51261
- onDragOver: handleDragOver,
51262
- onDragLeave: handleDragLeave,
51263
- onDrop: handleDrop
51264
- }),
51265
- [handleDragOver, handleDragLeave, handleDrop]
51266
- );
51267
- return { dropProps, isOver };
51268
- }
51269
- var API_BASE = typeof process !== "undefined" && process.env?.VITE_API_URL ? process.env.VITE_API_URL : "http://localhost:3000";
51270
- function getUserId() {
51271
- return localStorage.getItem("userId") || "anonymous";
51272
- }
51273
- async function fetchWithAuth(endpoint, options) {
51274
- const userId = getUserId();
51275
- const response = await fetch(`${API_BASE}${endpoint}`, {
51276
- ...options,
51277
- headers: {
51278
- "Content-Type": "application/json",
51279
- "x-user-id": userId,
51280
- ...options?.headers
51281
- }
51282
- });
51283
- if (!response.ok) {
51284
- const error = await response.json().catch(() => ({ error: response.statusText }));
51285
- throw new Error(error.error || error.message || "Request failed");
51286
- }
51287
- return response.json();
51288
- }
51289
- function useGitHubStatus() {
51290
- return useQuery({
51291
- queryKey: ["github", "status"],
51292
- queryFn: () => fetchWithAuth("/api/github/status"),
51293
- staleTime: 6e4,
51294
- // 1 minute
51295
- retry: false
51296
- });
51297
- }
51298
- function useConnectGitHub() {
51299
- const connectGitHub = useCallback(() => {
51300
- const userId = getUserId();
51301
- const state = btoa(JSON.stringify({ userId, returnUrl: window.location.href }));
51302
- window.location.href = `${API_BASE}/api/github/oauth/authorize?state=${state}`;
51303
- }, []);
51304
- return { connectGitHub };
51305
- }
51306
- function useDisconnectGitHub() {
51307
- const queryClient = useQueryClient();
51308
- return useMutation({
51309
- mutationFn: () => fetchWithAuth("/api/github/disconnect", { method: "POST" }),
51310
- onSuccess: () => {
51311
- queryClient.invalidateQueries({ queryKey: ["github", "status"] });
51312
- queryClient.removeQueries({ queryKey: ["github", "repos"] });
51313
- }
51314
- });
51315
- }
51316
- function useGitHubRepos(page = 1, perPage = 30) {
51317
- return useQuery({
51318
- queryKey: ["github", "repos", page, perPage],
51319
- queryFn: () => fetchWithAuth(`/api/github/repos?page=${page}&per_page=${perPage}`),
51320
- enabled: true,
51321
- // Only fetch if user is connected
51322
- staleTime: 3e5
51323
- // 5 minutes
51324
- });
51325
- }
51326
- function useGitHubRepo(owner, repo, enabled = true) {
51327
- return useQuery({
51328
- queryKey: ["github", "repo", owner, repo],
51329
- queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}`),
51330
- enabled: enabled && !!owner && !!repo,
51331
- staleTime: 3e5
51332
- // 5 minutes
51333
- });
51334
- }
51335
- function useGitHubBranches(owner, repo, enabled = true) {
51336
- return useQuery({
51337
- queryKey: ["github", "branches", owner, repo],
51338
- queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}/branches`),
51339
- enabled: enabled && !!owner && !!repo,
51340
- staleTime: 6e4
51341
- // 1 minute
51342
- });
51343
- }
51344
49082
 
51345
- export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, Coachmark, CodeBlock, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocCodeBlock, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FeatureRenderer2 as FeatureRenderer, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, clearEntities, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createTranslate, createUnitAnimationState, drawSprite, generateCombatMessage, getAllEntities, getByType, getCurrentFrame, getEntity, getSingleton, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseQueryBinding, pendulum, projectileMotion, removeEntity, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, spawnEntity, springOscillator, tickAnimationState, transitionAnimation, updateEntity, updateSingleton, useAgentChat, useAnchorRect, useAuthContext, useBattleState, useCamera, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEntities, useEntitiesByType, useEntity as useEntityById, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGameAudioContext, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, usePhysics, usePhysics2D, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useSingletonEntity, useSpriteAnimations, useSwipeGesture, useTraitListens, useTranslate, useUIEvents, useUISlotManager, useValidation };
49083
+ export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, ClassifierBoard, Coachmark, CodeBlock, CodeView, CodeViewer, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocCodeBlock, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FeatureRenderer2 as FeatureRenderer, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, HStack, Header, Heading, HealthBar, HealthPanel, HeroOrganism, HeroSection, IDENTITY_BOOK_FIELDS, Icon, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerCanvas, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, drawSprite, generateCombatMessage, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, mapBookData, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, transitionAnimation, useAnchorRect, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };