@almadar/ui 5.21.9 → 5.21.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,520 +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
- };
2508
- }
2509
- });
2510
- function useTranslate() {
2511
- return useContext(I18nContext);
2512
- }
2513
- function createTranslate(messages) {
2514
- return (key, params) => {
2515
- let msg = messages[key] ?? coreLocale[key] ?? key;
2516
- if (params) {
2517
- for (const [k, v] of Object.entries(params)) {
2518
- msg = msg.split(`{{${k}}}`).join(String(v));
2519
- }
2520
- }
2521
- return msg;
2522
- };
2523
- }
2524
- var _meta, coreMessages, coreLocale, I18nContext, I18nProvider;
2525
- var init_useTranslate = __esm({
2526
- "hooks/useTranslate.ts"() {
2527
- "use client";
2528
- init_en();
2529
- ({ $meta: _meta, ...coreMessages } = en_default);
2530
- coreLocale = coreMessages;
2531
- I18nContext = createContext({
2532
- locale: "en",
2533
- direction: "ltr",
2534
- t: (key) => coreLocale[key] ?? key
2535
- // core locale fallback
2536
- });
2537
- I18nContext.displayName = "I18nContext";
2538
- I18nProvider = I18nContext.Provider;
2539
- }
2540
- });
2541
2034
  var Input;
2542
2035
  var init_Input = __esm({
2543
2036
  "components/core/atoms/Input.tsx"() {
2544
2037
  init_cn();
2545
2038
  init_Icon();
2546
- init_useTranslate();
2547
2039
  Input = React79__default.forwardRef(
2548
2040
  ({
2549
2041
  className,
@@ -3018,7 +2510,6 @@ var init_FilterPill = __esm({
3018
2510
  "components/core/atoms/FilterPill.tsx"() {
3019
2511
  init_cn();
3020
2512
  init_useEventBus();
3021
- init_useTranslate();
3022
2513
  init_Icon();
3023
2514
  variantStyles4 = {
3024
2515
  default: [
@@ -4965,7 +4456,6 @@ var init_LawReferenceTooltip = __esm({
4965
4456
  init_Typography();
4966
4457
  init_Divider();
4967
4458
  init_cn();
4968
- init_useTranslate();
4969
4459
  positionStyles2 = {
4970
4460
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
4971
4461
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
@@ -6748,7 +6238,6 @@ var init_Modal = __esm({
6748
6238
  init_Overlay();
6749
6239
  init_cn();
6750
6240
  init_useEventBus();
6751
- init_useTranslate();
6752
6241
  sizeClasses6 = {
6753
6242
  sm: "max-w-md",
6754
6243
  md: "max-w-2xl",
@@ -6970,7 +6459,6 @@ var init_Drawer = __esm({
6970
6459
  init_Overlay();
6971
6460
  init_cn();
6972
6461
  init_useEventBus();
6973
- init_useTranslate();
6974
6462
  sizeWidths = {
6975
6463
  sm: "w-full sm:w-80",
6976
6464
  // 320px
@@ -7152,7 +6640,6 @@ var init_Toast = __esm({
7152
6640
  init_Badge();
7153
6641
  init_cn();
7154
6642
  init_useEventBus();
7155
- init_useTranslate();
7156
6643
  variantClasses = {
7157
6644
  success: "bg-card border-[length:var(--border-width)] border-success",
7158
6645
  error: "bg-card border-[length:var(--border-width)] border-error",
@@ -7279,7 +6766,6 @@ var init_ErrorState = __esm({
7279
6766
  init_Typography();
7280
6767
  init_Icon();
7281
6768
  init_useEventBus();
7282
- init_useTranslate();
7283
6769
  ErrorState = ({
7284
6770
  title,
7285
6771
  message,
@@ -7322,7 +6808,6 @@ var init_ErrorBoundary = __esm({
7322
6808
  "use client";
7323
6809
  init_cn();
7324
6810
  init_ErrorState();
7325
- init_useTranslate();
7326
6811
  DefaultFallback = ({ error, onRetry }) => {
7327
6812
  const { t } = useTranslate();
7328
6813
  return /* @__PURE__ */ jsx(
@@ -7472,7 +6957,6 @@ var init_Skeleton = __esm({
7472
6957
  "components/core/molecules/Skeleton.tsx"() {
7473
6958
  "use client";
7474
6959
  init_cn();
7475
- init_useTranslate();
7476
6960
  init_Box();
7477
6961
  init_Stack();
7478
6962
  init_Stack();
@@ -8122,7 +7606,6 @@ var AboutPageTemplate;
8122
7606
  var init_AboutPageTemplate = __esm({
8123
7607
  "components/marketing/templates/AboutPageTemplate.tsx"() {
8124
7608
  init_cn();
8125
- init_useTranslate();
8126
7609
  init_Stack();
8127
7610
  init_Box();
8128
7611
  init_Typography();
@@ -8227,7 +7710,6 @@ var init_Alert = __esm({
8227
7710
  init_Icon();
8228
7711
  init_Typography();
8229
7712
  init_useEventBus();
8230
- init_useTranslate();
8231
7713
  variantBorderClasses = {
8232
7714
  info: "border-info",
8233
7715
  success: "border-success",
@@ -8587,7 +8069,6 @@ var init_Menu = __esm({
8587
8069
  init_Badge();
8588
8070
  init_cn();
8589
8071
  init_useEventBus();
8590
- init_useTranslate();
8591
8072
  Menu = ({
8592
8073
  trigger,
8593
8074
  items,
@@ -8875,7 +8356,6 @@ var init_FloatingActionButton = __esm({
8875
8356
  init_Typography();
8876
8357
  init_cn();
8877
8358
  init_useEventBus();
8878
- init_useTranslate();
8879
8359
  FloatingActionButton = ({
8880
8360
  action,
8881
8361
  actionPayload,
@@ -9057,13 +8537,13 @@ var init_MapView = __esm({
9057
8537
  shadowSize: [41, 41]
9058
8538
  });
9059
8539
  L.Marker.prototype.options.icon = defaultIcon;
9060
- const { useEffect: useEffect74, useRef: useRef68, useCallback: useCallback128, useState: useState112 } = React79__default;
8540
+ const { useEffect: useEffect69, useRef: useRef66, useCallback: useCallback113, useState: useState99 } = React79__default;
9061
8541
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9062
8542
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9063
8543
  function MapUpdater({ centerLat, centerLng, zoom }) {
9064
8544
  const map = useMap();
9065
- const prevRef = useRef68({ centerLat, centerLng, zoom });
9066
- useEffect74(() => {
8545
+ const prevRef = useRef66({ centerLat, centerLng, zoom });
8546
+ useEffect69(() => {
9067
8547
  const prev = prevRef.current;
9068
8548
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
9069
8549
  map.setView([centerLat, centerLng], zoom);
@@ -9074,7 +8554,7 @@ var init_MapView = __esm({
9074
8554
  }
9075
8555
  function MapClickHandler({ onMapClick }) {
9076
8556
  const map = useMap();
9077
- useEffect74(() => {
8557
+ useEffect69(() => {
9078
8558
  if (!onMapClick) return;
9079
8559
  const handler = (e) => {
9080
8560
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -9102,8 +8582,8 @@ var init_MapView = __esm({
9102
8582
  showAttribution = true
9103
8583
  }) {
9104
8584
  const eventBus = useEventBus2();
9105
- const [clickedPosition, setClickedPosition] = useState112(null);
9106
- const handleMapClick = useCallback128((lat, lng) => {
8585
+ const [clickedPosition, setClickedPosition] = useState99(null);
8586
+ const handleMapClick = useCallback113((lat, lng) => {
9107
8587
  if (showClickedPin) {
9108
8588
  setClickedPosition({ lat, lng });
9109
8589
  }
@@ -9112,7 +8592,7 @@ var init_MapView = __esm({
9112
8592
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
9113
8593
  }
9114
8594
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
9115
- const handleMarkerClick = useCallback128((marker) => {
8595
+ const handleMarkerClick = useCallback113((marker) => {
9116
8596
  onMarkerClick?.(marker);
9117
8597
  if (markerClickEvent) {
9118
8598
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -9978,7 +9458,6 @@ var init_ActionTile = __esm({
9978
9458
  "components/game/organisms/puzzles/sequencer/ActionTile.tsx"() {
9979
9459
  init_atoms2();
9980
9460
  init_cn();
9981
- init_useTranslate();
9982
9461
  DRAG_MIME = "application/x-almadar-slot-item";
9983
9462
  SIZE_CONFIG = {
9984
9463
  sm: { px: "px-2 py-1", icon: "text-lg", text: "text-xs" },
@@ -10016,7 +9495,6 @@ var init_ActionPalette = __esm({
10016
9495
  "components/game/organisms/puzzles/sequencer/ActionPalette.tsx"() {
10017
9496
  init_atoms2();
10018
9497
  init_cn();
10019
- init_useTranslate();
10020
9498
  init_ActionTile();
10021
9499
  ActionPalette.displayName = "ActionPalette";
10022
9500
  }
@@ -10026,7 +9504,6 @@ var init_AuthLayout = __esm({
10026
9504
  "components/core/templates/AuthLayout.tsx"() {
10027
9505
  "use client";
10028
9506
  init_cn();
10029
- init_useTranslate();
10030
9507
  init_Box();
10031
9508
  init_Stack();
10032
9509
  init_Typography();
@@ -10171,7 +9648,6 @@ var init_LoadingState = __esm({
10171
9648
  init_atoms2();
10172
9649
  init_Stack();
10173
9650
  init_Typography();
10174
- init_useTranslate();
10175
9651
  LoadingState = ({
10176
9652
  title,
10177
9653
  message,
@@ -11254,7 +10730,6 @@ var init_IsometricCanvas = __esm({
11254
10730
  "use client";
11255
10731
  init_cn();
11256
10732
  init_useEventBus();
11257
- init_useTranslate();
11258
10733
  init_Box();
11259
10734
  init_Stack();
11260
10735
  init_Icon();
@@ -11618,7 +11093,6 @@ var init_BattleBoard = __esm({
11618
11093
  "use client";
11619
11094
  init_cn();
11620
11095
  init_useEventBus();
11621
- init_useTranslate();
11622
11096
  init_Box();
11623
11097
  init_Button();
11624
11098
  init_Typography();
@@ -12378,7 +11852,6 @@ var log4, SWIM_GUTTER, CENTER_W, BehaviorView;
12378
11852
  var init_BehaviorView = __esm({
12379
11853
  "components/avl/molecules/BehaviorView.tsx"() {
12380
11854
  "use client";
12381
- init_useTranslate();
12382
11855
  init_AvlState();
12383
11856
  init_AvlTransitionLane();
12384
11857
  init_AvlSwimLane();
@@ -12493,7 +11966,6 @@ var MIN_DIAGRAM_WIDTH, ScaledDiagram;
12493
11966
  var init_ScaledDiagram = __esm({
12494
11967
  "components/core/molecules/ScaledDiagram.tsx"() {
12495
11968
  init_Box();
12496
- init_useTranslate();
12497
11969
  init_cn();
12498
11970
  MIN_DIAGRAM_WIDTH = 200;
12499
11971
  ScaledDiagram = ({
@@ -12636,7 +12108,6 @@ var init_CodeBlock = __esm({
12636
12108
  init_Textarea();
12637
12109
  init_Icon();
12638
12110
  init_useEventBus();
12639
- init_useTranslate();
12640
12111
  SyntaxHighlighter.registerLanguage("json", langJson);
12641
12112
  SyntaxHighlighter.registerLanguage("javascript", langJavascript);
12642
12113
  SyntaxHighlighter.registerLanguage("js", langJavascript);
@@ -13143,7 +12614,6 @@ var init_MarkdownContent = __esm({
13143
12614
  init_katex_min();
13144
12615
  init_Box();
13145
12616
  init_CodeBlock();
13146
- init_useTranslate();
13147
12617
  init_cn();
13148
12618
  MarkdownContent = React79__default.memo(
13149
12619
  ({ content, direction, className }) => {
@@ -13448,7 +12918,6 @@ var init_Card2 = __esm({
13448
12918
  "components/core/molecules/Card.tsx"() {
13449
12919
  "use client";
13450
12920
  init_useEventBus();
13451
- init_useTranslate();
13452
12921
  init_useLongPress();
13453
12922
  Card2.displayName = "Card";
13454
12923
  }
@@ -13462,7 +12931,6 @@ var init_QuizBlock = __esm({
13462
12931
  init_Button();
13463
12932
  init_Icon();
13464
12933
  init_Box();
13465
- init_useTranslate();
13466
12934
  init_cn();
13467
12935
  QuizBlock = ({
13468
12936
  question,
@@ -13505,7 +12973,6 @@ var init_StateMachineView = __esm({
13505
12973
  init_Typography();
13506
12974
  init_Button();
13507
12975
  init_Icon();
13508
- init_useTranslate();
13509
12976
  init_useEventBus();
13510
12977
  init_cn();
13511
12978
  StateNode = ({ state, config }) => {
@@ -14872,7 +14339,6 @@ var init_JazariStateMachine = __esm({
14872
14339
  init_StateMachineView();
14873
14340
  init_visualizer();
14874
14341
  init_svg_paths();
14875
- init_useTranslate();
14876
14342
  init_cn();
14877
14343
  JAZARI_VISUALIZER_CONFIG = {
14878
14344
  ...DEFAULT_CONFIG,
@@ -15028,7 +14494,6 @@ var init_ContentRenderer = __esm({
15028
14494
  init_ScaledDiagram();
15029
14495
  init_JazariStateMachine();
15030
14496
  init_parseContentSegments();
15031
- init_useTranslate();
15032
14497
  init_cn();
15033
14498
  ContentRenderer = ({
15034
14499
  content,
@@ -15122,7 +14587,6 @@ var init_BookChapterView = __esm({
15122
14587
  init_ScaledDiagram();
15123
14588
  init_ContentRenderer();
15124
14589
  init_JazariStateMachine();
15125
- init_useTranslate();
15126
14590
  init_cn();
15127
14591
  BookChapterView = ({
15128
14592
  chapter,
@@ -15161,7 +14625,6 @@ var init_BookCoverPage = __esm({
15161
14625
  init_Typography();
15162
14626
  init_Button();
15163
14627
  init_Box();
15164
- init_useTranslate();
15165
14628
  init_cn();
15166
14629
  BookCoverPage = ({
15167
14630
  title,
@@ -15241,7 +14704,6 @@ var init_BookNavBar = __esm({
15241
14704
  init_Typography();
15242
14705
  init_ProgressBar();
15243
14706
  init_Box();
15244
- init_useTranslate();
15245
14707
  init_cn();
15246
14708
  BookNavBar = ({
15247
14709
  currentPage,
@@ -15343,7 +14805,6 @@ var init_BookTableOfContents = __esm({
15343
14805
  init_Button();
15344
14806
  init_Box();
15345
14807
  init_Badge();
15346
- init_useTranslate();
15347
14808
  init_cn();
15348
14809
  BookTableOfContents = ({
15349
14810
  parts,
@@ -15403,7 +14864,6 @@ var init_EmptyState = __esm({
15403
14864
  init_Stack();
15404
14865
  init_Typography();
15405
14866
  init_useEventBus();
15406
- init_useTranslate();
15407
14867
  ICON_NAME_ALIASES = {
15408
14868
  check: "check-circle",
15409
14869
  error: "x-circle",
@@ -15574,7 +15034,6 @@ var init_BookViewer = __esm({
15574
15034
  init_Box();
15575
15035
  init_Stack();
15576
15036
  init_useEventBus();
15577
- init_useTranslate();
15578
15037
  init_cn();
15579
15038
  init_BookCoverPage();
15580
15039
  init_BookTableOfContents();
@@ -16006,7 +15465,6 @@ var init_BranchingLogicBuilder = __esm({
16006
15465
  init_FilterPill();
16007
15466
  init_Box();
16008
15467
  init_useEventBus();
16009
- init_useTranslate();
16010
15468
  init_cn();
16011
15469
  END_OF_SURVEY = "end-of-survey";
16012
15470
  RuleRow = ({
@@ -16459,7 +15917,6 @@ var init_Breadcrumb = __esm({
16459
15917
  init_Typography();
16460
15918
  init_cn();
16461
15919
  init_useEventBus();
16462
- init_useTranslate();
16463
15920
  Breadcrumb = ({
16464
15921
  items,
16465
15922
  separator = "chevron-right",
@@ -16695,7 +16152,6 @@ var init_BuilderBoard = __esm({
16695
16152
  "components/game/organisms/puzzles/builder/BuilderBoard.tsx"() {
16696
16153
  init_atoms2();
16697
16154
  init_useEventBus();
16698
- init_useTranslate();
16699
16155
  BuilderBoard.displayName = "BuilderBoard";
16700
16156
  }
16701
16157
  });
@@ -17173,7 +16629,6 @@ var init_CalendarGrid = __esm({
17173
16629
  init_TimeSlotCell();
17174
16630
  init_useEventBus();
17175
16631
  init_useSwipeGesture();
17176
- init_useTranslate();
17177
16632
  SHORT_DATE = { month: "short", day: "numeric" };
17178
16633
  CalendarGrid.displayName = "CalendarGrid";
17179
16634
  }
@@ -18482,7 +17937,6 @@ var init_Pagination = __esm({
18482
17937
  init_Stack();
18483
17938
  init_cn();
18484
17939
  init_useEventBus();
18485
- init_useTranslate();
18486
17940
  Pagination = ({
18487
17941
  currentPage,
18488
17942
  totalPages,
@@ -18686,7 +18140,6 @@ var init_CardGrid = __esm({
18686
18140
  init_cn();
18687
18141
  init_getNestedValue();
18688
18142
  init_useEventBus();
18689
- init_useTranslate();
18690
18143
  init_atoms2();
18691
18144
  init_Badge();
18692
18145
  init_Box();
@@ -18915,7 +18368,6 @@ var init_Carousel = __esm({
18915
18368
  init_cn();
18916
18369
  init_useEventBus();
18917
18370
  init_useSwipeGesture();
18918
- init_useTranslate();
18919
18371
  init_Box();
18920
18372
  init_Stack();
18921
18373
  init_Button();
@@ -19152,7 +18604,6 @@ var init_CaseStudyOrganism = __esm({
19152
18604
  "use client";
19153
18605
  init_cn();
19154
18606
  init_useEventBus();
19155
- init_useTranslate();
19156
18607
  init_Stack();
19157
18608
  init_Typography();
19158
18609
  init_SimpleGrid();
@@ -19357,7 +18808,6 @@ var init_Chart = __esm({
19357
18808
  init_ErrorState();
19358
18809
  init_EmptyState();
19359
18810
  init_useEventBus();
19360
- init_useTranslate();
19361
18811
  CHART_COLORS = [
19362
18812
  "var(--color-primary)",
19363
18813
  "var(--color-success)",
@@ -20311,7 +19761,6 @@ var init_ClassifierBoard = __esm({
20311
19761
  "components/game/organisms/puzzles/classifier/ClassifierBoard.tsx"() {
20312
19762
  init_atoms2();
20313
19763
  init_useEventBus();
20314
- init_useTranslate();
20315
19764
  ClassifierBoard.displayName = "ClassifierBoard";
20316
19765
  }
20317
19766
  });
@@ -20343,7 +19792,6 @@ var init_CodeView = __esm({
20343
19792
  "components/game/organisms/puzzles/state-architect/CodeView.tsx"() {
20344
19793
  init_atoms2();
20345
19794
  init_cn();
20346
- init_useTranslate();
20347
19795
  CodeView.displayName = "CodeView";
20348
19796
  }
20349
19797
  });
@@ -20357,7 +19805,6 @@ var init_Tabs = __esm({
20357
19805
  init_Box();
20358
19806
  init_cn();
20359
19807
  init_useEventBus();
20360
- init_useTranslate();
20361
19808
  Tabs = ({
20362
19809
  items,
20363
19810
  tabs,
@@ -20534,7 +19981,6 @@ var init_CodeViewer = __esm({
20534
19981
  init_EmptyState();
20535
19982
  init_Tabs();
20536
19983
  init_useEventBus();
20537
- init_useTranslate();
20538
19984
  DIFF_STYLES = {
20539
19985
  add: {
20540
19986
  bg: "bg-success/10",
@@ -20963,7 +20409,6 @@ var init_ConfirmDialog = __esm({
20963
20409
  init_Box();
20964
20410
  init_Stack();
20965
20411
  init_cn();
20966
- init_useTranslate();
20967
20412
  variantConfig = {
20968
20413
  danger: {
20969
20414
  icon: Trash2,
@@ -21569,7 +21014,6 @@ var init_DashboardGrid = __esm({
21569
21014
  "components/core/organisms/layout/DashboardGrid.tsx"() {
21570
21015
  init_cn();
21571
21016
  init_Box();
21572
- init_useTranslate();
21573
21017
  gapStyles5 = {
21574
21018
  sm: "gap-2",
21575
21019
  md: "gap-4",
@@ -21663,7 +21107,6 @@ var init_DashboardLayout = __esm({
21663
21107
  init_Icon();
21664
21108
  init_useAuthContext();
21665
21109
  init_useEventBus();
21666
- init_useTranslate();
21667
21110
  init_CurrentPagePathContext();
21668
21111
  DashboardLayout = ({
21669
21112
  appName = "{{APP_TITLE}}",
@@ -21720,12 +21163,8 @@ var init_DashboardLayout = __esm({
21720
21163
  const location = useLocation();
21721
21164
  const ctxPagePath = useCurrentPagePath();
21722
21165
  const activePath = currentPath ?? ctxPagePath ?? location.pathname;
21723
- const { user: authUser, signOut: authSignOut } = useAuthContext();
21724
- const user = userProp || (authUser ? {
21725
- name: authUser.displayName || authUser.email?.split("@")[0] || "User",
21726
- email: authUser.email || "",
21727
- avatar: authUser.photoURL || void 0
21728
- } : null);
21166
+ const { signOut: authSignOut } = useAuthContext();
21167
+ const user = userProp || (null);
21729
21168
  const { t } = useTranslate();
21730
21169
  const handleSignOut = onSignOutProp || authSignOut;
21731
21170
  const showSidebar = layoutMode === "sidebar";
@@ -22392,7 +21831,7 @@ function useDataDnd(args) {
22392
21831
  ({ id, children }) => {
22393
21832
  const {
22394
21833
  attributes,
22395
- listeners: listeners8,
21834
+ listeners: listeners7,
22396
21835
  setNodeRef,
22397
21836
  transform,
22398
21837
  transition,
@@ -22415,7 +21854,7 @@ function useDataDnd(args) {
22415
21854
  ref: setNodeRef,
22416
21855
  style,
22417
21856
  ...attributes,
22418
- ...listeners8,
21857
+ ...listeners7,
22419
21858
  children
22420
21859
  }
22421
21860
  );
@@ -23012,7 +22451,6 @@ var init_DataGrid = __esm({
23012
22451
  init_cn();
23013
22452
  init_getNestedValue();
23014
22453
  init_useEventBus();
23015
- init_useTranslate();
23016
22454
  init_Box();
23017
22455
  init_Stack();
23018
22456
  init_Typography();
@@ -23451,7 +22889,6 @@ var init_DataList = __esm({
23451
22889
  init_cn();
23452
22890
  init_getNestedValue();
23453
22891
  init_useEventBus();
23454
- init_useTranslate();
23455
22892
  init_Box();
23456
22893
  init_Stack();
23457
22894
  init_Typography();
@@ -23506,7 +22943,6 @@ var init_FileTree = __esm({
23506
22943
  init_Box();
23507
22944
  init_Typography();
23508
22945
  init_Icon();
23509
- init_useTranslate();
23510
22946
  TreeNodeItem = ({
23511
22947
  node,
23512
22948
  depth,
@@ -23693,14 +23129,6 @@ function useQuerySingleton(query) {
23693
23129
  setSort
23694
23130
  };
23695
23131
  }
23696
- function parseQueryBinding(binding) {
23697
- const cleaned = binding.startsWith("@") ? binding.slice(1) : binding;
23698
- const parts = cleaned.split(".");
23699
- return {
23700
- query: parts[0],
23701
- field: parts.length > 1 ? parts.slice(1).join(".") : void 0
23702
- };
23703
- }
23704
23132
  var queryStores;
23705
23133
  var init_useQuerySingleton = __esm({
23706
23134
  "hooks/useQuerySingleton.ts"() {
@@ -23721,7 +23149,6 @@ var init_FilterGroup = __esm({
23721
23149
  init_Icon();
23722
23150
  init_useEventBus();
23723
23151
  init_useQuerySingleton();
23724
- init_useTranslate();
23725
23152
  resolveFilterType = (filter) => filter.filterType ?? filter.type;
23726
23153
  lookStyles6 = {
23727
23154
  toolbar: "",
@@ -24373,7 +23800,6 @@ var init_Coachmark = __esm({
24373
23800
  init_Button();
24374
23801
  init_Icon();
24375
23802
  init_cn();
24376
- init_useTranslate();
24377
23803
  GAP = 10;
24378
23804
  EDGE = 8;
24379
23805
  Coachmark = ({
@@ -24614,13 +24040,12 @@ var init_RelationSelect = __esm({
24614
24040
  init_Spinner();
24615
24041
  init_Typography();
24616
24042
  init_debug();
24617
- init_useTranslate();
24618
24043
  isRelationsDebugEnabled = () => isDebugEnabled();
24619
24044
  RelationSelect = ({
24620
24045
  value,
24621
24046
  onChange,
24622
24047
  options = [],
24623
- placeholder = "Select...",
24048
+ placeholder,
24624
24049
  required = false,
24625
24050
  disabled = false,
24626
24051
  isLoading = false,
@@ -24632,6 +24057,7 @@ var init_RelationSelect = __esm({
24632
24057
  emptyMessage
24633
24058
  }) => {
24634
24059
  const { t } = useTranslate();
24060
+ const resolvedPlaceholder = placeholder ?? t("relationSelect.selectPlaceholder");
24635
24061
  const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
24636
24062
  const resolvedEmptyMessage = emptyMessage ?? t("empty.noOptionsFound");
24637
24063
  const [isOpen, setIsOpen] = useState(false);
@@ -24741,7 +24167,7 @@ var init_RelationSelect = __esm({
24741
24167
  children: isLoading ? /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
24742
24168
  /* @__PURE__ */ jsx(Spinner, { size: "sm" }),
24743
24169
  /* @__PURE__ */ jsx(Typography, { as: "span", children: t("common.loading") })
24744
- ] }) : selectedOption ? selectedOption.label : placeholder
24170
+ ] }) : selectedOption ? selectedOption.label : resolvedPlaceholder
24745
24171
  }
24746
24172
  ),
24747
24173
  /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
@@ -24838,7 +24264,6 @@ var init_SearchInput = __esm({
24838
24264
  init_cn();
24839
24265
  init_useEventBus();
24840
24266
  init_useQuerySingleton();
24841
- init_useTranslate();
24842
24267
  SearchInput = ({
24843
24268
  value,
24844
24269
  onSearch,
@@ -24941,7 +24366,6 @@ var init_SidePanel = __esm({
24941
24366
  init_Typography();
24942
24367
  init_cn();
24943
24368
  init_useEventBus();
24944
- init_useTranslate();
24945
24369
  SidePanel = ({
24946
24370
  title,
24947
24371
  children,
@@ -25120,7 +24544,6 @@ var init_WizardNavigation = __esm({
25120
24544
  init_Icon();
25121
24545
  init_cn();
25122
24546
  init_useEventBus();
25123
- init_useTranslate();
25124
24547
  WizardNavigation = ({
25125
24548
  currentStep,
25126
24549
  totalSteps,
@@ -25208,7 +24631,6 @@ var init_RepeatableFormSection = __esm({
25208
24631
  init_Card();
25209
24632
  init_Icon();
25210
24633
  init_useEventBus();
25211
- init_useTranslate();
25212
24634
  RepeatableFormSection = ({
25213
24635
  sectionType,
25214
24636
  title,
@@ -25339,7 +24761,6 @@ var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
25339
24761
  var init_ViolationAlert = __esm({
25340
24762
  "components/core/molecules/ViolationAlert.tsx"() {
25341
24763
  init_cn();
25342
- init_useTranslate();
25343
24764
  init_Box();
25344
24765
  init_Stack();
25345
24766
  init_Typography();
@@ -25845,7 +25266,6 @@ var init_LineChart = __esm({
25845
25266
  "use client";
25846
25267
  init_cn();
25847
25268
  init_atoms2();
25848
- init_useTranslate();
25849
25269
  LineChart2 = ({
25850
25270
  data,
25851
25271
  width = 400,
@@ -28085,7 +27505,6 @@ var init_GraphView = __esm({
28085
27505
  "use client";
28086
27506
  init_cn();
28087
27507
  init_atoms2();
28088
- init_useTranslate();
28089
27508
  GROUP_COLORS = [
28090
27509
  "#3b82f6",
28091
27510
  // blue-500
@@ -28411,7 +27830,6 @@ var init_NumberStepper = __esm({
28411
27830
  init_cn();
28412
27831
  init_Icon();
28413
27832
  init_useEventBus();
28414
- init_useTranslate();
28415
27833
  sizeStyles10 = {
28416
27834
  sm: {
28417
27835
  button: "w-7 h-7",
@@ -28752,7 +28170,6 @@ var init_UploadDropZone = __esm({
28752
28170
  init_Icon();
28753
28171
  init_Typography();
28754
28172
  init_useEventBus();
28755
- init_useTranslate();
28756
28173
  UploadDropZone = ({
28757
28174
  accept,
28758
28175
  maxSize,
@@ -28919,7 +28336,6 @@ var init_Lightbox = __esm({
28919
28336
  init_Icon();
28920
28337
  init_cn();
28921
28338
  init_useEventBus();
28922
- init_useTranslate();
28923
28339
  Lightbox = ({
28924
28340
  images = [],
28925
28341
  currentIndex = 0,
@@ -29404,7 +28820,6 @@ var init_TableView = __esm({
29404
28820
  init_cn();
29405
28821
  init_getNestedValue();
29406
28822
  init_useEventBus();
29407
- init_useTranslate();
29408
28823
  init_Box();
29409
28824
  init_Stack();
29410
28825
  init_Typography();
@@ -29608,7 +29023,6 @@ var init_Meter = __esm({
29608
29023
  init_LoadingState();
29609
29024
  init_ErrorState();
29610
29025
  init_useEventBus();
29611
- init_useTranslate();
29612
29026
  DEFAULT_THRESHOLDS = [
29613
29027
  { value: 30, color: "var(--color-error)" },
29614
29028
  { value: 70, color: "var(--color-warning)" },
@@ -31555,7 +30969,6 @@ var init_VoteStack = __esm({
31555
30969
  init_cn();
31556
30970
  init_Icon();
31557
30971
  init_useEventBus();
31558
- init_useTranslate();
31559
30972
  sizeStyles12 = {
31560
30973
  sm: {
31561
30974
  button: "w-7 h-7",
@@ -32010,7 +31423,6 @@ var init_QrScanner = __esm({
32010
31423
  init_atoms2();
32011
31424
  init_Icon();
32012
31425
  init_useEventBus();
32013
- init_useTranslate();
32014
31426
  QrScanner = ({
32015
31427
  onScan,
32016
31428
  scanEvent,
@@ -32237,7 +31649,6 @@ var init_OptionConstraintGroup = __esm({
32237
31649
  "components/core/molecules/OptionConstraintGroup.tsx"() {
32238
31650
  init_cn();
32239
31651
  init_useEventBus();
32240
- init_useTranslate();
32241
31652
  init_Typography();
32242
31653
  init_Box();
32243
31654
  init_Label();
@@ -33193,7 +32604,6 @@ var init_RichBlockEditor = __esm({
33193
32604
  init_Input();
33194
32605
  init_Icon();
33195
32606
  init_useEventBus();
33196
- init_useTranslate();
33197
32607
  TOOLBAR_ENTRIES = [
33198
32608
  { type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
33199
32609
  { type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
@@ -33384,7 +32794,6 @@ var init_ReplyTree = __esm({
33384
32794
  "use client";
33385
32795
  init_cn();
33386
32796
  init_useEventBus();
33387
- init_useTranslate();
33388
32797
  init_atoms2();
33389
32798
  init_VoteStack();
33390
32799
  ReplyTreeNode = ({
@@ -33692,7 +33101,6 @@ var init_VersionDiff = __esm({
33692
33101
  "use client";
33693
33102
  init_cn();
33694
33103
  init_useEventBus();
33695
- init_useTranslate();
33696
33104
  init_atoms2();
33697
33105
  init_Stack();
33698
33106
  INLINE_STYLES = {
@@ -34008,7 +33416,6 @@ var init_DocBreadcrumb = __esm({
34008
33416
  init_Stack();
34009
33417
  init_Typography();
34010
33418
  init_Icon();
34011
- init_useTranslate();
34012
33419
  DocBreadcrumb = ({
34013
33420
  items,
34014
33421
  className
@@ -34437,7 +33844,6 @@ var init_DocSearch = __esm({
34437
33844
  init_Typography();
34438
33845
  init_Icon();
34439
33846
  init_Input();
34440
- init_useTranslate();
34441
33847
  }
34442
33848
  });
34443
33849
  var DocSidebarCategory, DocSidebar;
@@ -34450,7 +33856,6 @@ var init_DocSidebar = __esm({
34450
33856
  init_Stack();
34451
33857
  init_Typography();
34452
33858
  init_Icon();
34453
- init_useTranslate();
34454
33859
  DocSidebarCategory = ({ item, depth }) => {
34455
33860
  const [expanded, setExpanded] = useState(
34456
33861
  () => item.items?.some(function hasActive(child) {
@@ -34557,7 +33962,6 @@ var init_DocTOC = __esm({
34557
33962
  init_Box();
34558
33963
  init_Stack();
34559
33964
  init_Typography();
34560
- init_useTranslate();
34561
33965
  DocTOC = ({
34562
33966
  items,
34563
33967
  activeId,
@@ -35291,7 +34695,6 @@ var init_FormSection = __esm({
35291
34695
  init_Button();
35292
34696
  init_Stack();
35293
34697
  init_Icon();
35294
- init_useTranslate();
35295
34698
  init_useEventBus();
35296
34699
  FormSection = ({
35297
34700
  title,
@@ -35420,7 +34823,6 @@ var init_Header = __esm({
35420
34823
  init_Stack();
35421
34824
  init_Typography();
35422
34825
  init_cn();
35423
- init_useTranslate();
35424
34826
  lookStyles8 = {
35425
34827
  "compact-bar": "",
35426
34828
  hero: "py-section min-h-[200px] [&_h1]:text-display-1",
@@ -35740,7 +35142,6 @@ var init_Sidebar = __esm({
35740
35142
  init_Typography();
35741
35143
  init_cn();
35742
35144
  init_useEventBus();
35743
- init_useTranslate();
35744
35145
  SidebarNavItem = ({ item, collapsed }) => {
35745
35146
  const Icon3 = item.icon;
35746
35147
  const isActive = item.active ?? item.isActive;
@@ -35994,7 +35395,6 @@ var init_WizardContainer = __esm({
35994
35395
  init_Stack();
35995
35396
  init_Icon();
35996
35397
  init_cn();
35997
- init_useTranslate();
35998
35398
  WizardContainer = ({
35999
35399
  steps,
36000
35400
  currentStep: controlledStep,
@@ -36171,14 +35571,14 @@ var init_WizardContainer = __esm({
36171
35571
  });
36172
35572
  function calculateComplexity(schema) {
36173
35573
  if (!schema) return 1;
36174
- const entities2 = schema.dataEntities?.length || 0;
35574
+ const entities = schema.dataEntities?.length || 0;
36175
35575
  const pages = schema.ui?.pages?.length || 0;
36176
35576
  const traits2 = schema.traits?.length || 0;
36177
35577
  const sections = schema.ui?.pages?.reduce(
36178
35578
  (acc, page) => acc + (page.sections?.length || 0),
36179
35579
  0
36180
35580
  ) || 0;
36181
- return entities2 * 3 + pages * 2 + traits2 * 2 + sections * 1;
35581
+ return entities * 3 + pages * 2 + traits2 * 2 + sections * 1;
36182
35582
  }
36183
35583
  function getOrbitalType(complexity) {
36184
35584
  if (complexity <= 3) return "1s";
@@ -36568,7 +35968,6 @@ var init_SignaturePad = __esm({
36568
35968
  init_LoadingState();
36569
35969
  init_ErrorState();
36570
35970
  init_useEventBus();
36571
- init_useTranslate();
36572
35971
  SignaturePad = ({
36573
35972
  label,
36574
35973
  helperText,
@@ -36762,7 +36161,6 @@ var init_DocumentViewer = __esm({
36762
36161
  init_EmptyState();
36763
36162
  init_Tabs();
36764
36163
  init_useEventBus();
36765
- init_useTranslate();
36766
36164
  DocumentViewer = ({
36767
36165
  title,
36768
36166
  src,
@@ -36967,7 +36365,6 @@ var init_GraphCanvas = __esm({
36967
36365
  init_ErrorState();
36968
36366
  init_EmptyState();
36969
36367
  init_useEventBus();
36970
- init_useTranslate();
36971
36368
  GROUP_COLORS2 = [
36972
36369
  "var(--color-primary)",
36973
36370
  "var(--color-success)",
@@ -37825,7 +37222,6 @@ var init_DataTable = __esm({
37825
37222
  init_molecules2();
37826
37223
  init_Icon();
37827
37224
  init_useEventBus();
37828
- init_useTranslate();
37829
37225
  init_types3();
37830
37226
  lookStyles9 = {
37831
37227
  dense: "",
@@ -37972,7 +37368,6 @@ var init_DebuggerBoard = __esm({
37972
37368
  "components/game/organisms/puzzles/debugger/DebuggerBoard.tsx"() {
37973
37369
  init_atoms2();
37974
37370
  init_useEventBus();
37975
- init_useTranslate();
37976
37371
  DebuggerBoard.displayName = "DebuggerBoard";
37977
37372
  }
37978
37373
  });
@@ -38143,7 +37538,6 @@ var init_DetailPanel = __esm({
38143
37538
  init_cn();
38144
37539
  init_getNestedValue();
38145
37540
  init_useEventBus();
38146
- init_useTranslate();
38147
37541
  ReactMarkdown2 = lazy(() => import('react-markdown'));
38148
37542
  DetailPanel = ({
38149
37543
  title: propTitle,
@@ -38817,7 +38211,6 @@ var init_TraitStateViewer = __esm({
38817
38211
  "components/game/organisms/TraitStateViewer.tsx"() {
38818
38212
  "use client";
38819
38213
  init_cn();
38820
- init_useTranslate();
38821
38214
  init_Box();
38822
38215
  init_Typography();
38823
38216
  init_Stack();
@@ -38876,7 +38269,6 @@ var init_RuleEditor = __esm({
38876
38269
  "components/game/organisms/puzzles/event-handler/RuleEditor.tsx"() {
38877
38270
  init_atoms2();
38878
38271
  init_cn();
38879
- init_useTranslate();
38880
38272
  RuleEditor.displayName = "RuleEditor";
38881
38273
  }
38882
38274
  });
@@ -38951,7 +38343,6 @@ var init_ObjectRulePanel = __esm({
38951
38343
  "components/game/organisms/puzzles/event-handler/ObjectRulePanel.tsx"() {
38952
38344
  init_atoms2();
38953
38345
  init_cn();
38954
- init_useTranslate();
38955
38346
  init_TraitStateViewer();
38956
38347
  init_RuleEditor();
38957
38348
  nextRuleId = 1;
@@ -38996,7 +38387,6 @@ var init_EventLog = __esm({
38996
38387
  "components/game/organisms/puzzles/event-handler/EventLog.tsx"() {
38997
38388
  init_atoms2();
38998
38389
  init_cn();
38999
- init_useTranslate();
39000
38390
  STATUS_STYLES = {
39001
38391
  pending: "text-muted-foreground",
39002
38392
  active: "text-primary animate-pulse",
@@ -39210,7 +38600,6 @@ var init_EventHandlerBoard = __esm({
39210
38600
  init_atoms2();
39211
38601
  init_cn();
39212
38602
  init_useEventBus();
39213
- init_useTranslate();
39214
38603
  init_TraitStateViewer();
39215
38604
  init_ObjectRulePanel();
39216
38605
  init_EventLog();
@@ -39280,7 +38669,6 @@ var init_FeatureGridOrganism = __esm({
39280
38669
  "use client";
39281
38670
  init_cn();
39282
38671
  init_useEventBus();
39283
- init_useTranslate();
39284
38672
  init_Stack();
39285
38673
  init_Typography();
39286
38674
  init_FeatureGrid();
@@ -39463,7 +38851,6 @@ var init_Form = __esm({
39463
38851
  init_RelationSelect();
39464
38852
  init_Alert();
39465
38853
  init_useEventBus();
39466
- init_useTranslate();
39467
38854
  init_debug();
39468
38855
  layoutStyles = {
39469
38856
  vertical: "flex flex-col",
@@ -40630,7 +40017,6 @@ var init_HeroOrganism = __esm({
40630
40017
  "use client";
40631
40018
  init_cn();
40632
40019
  init_useEventBus();
40633
- init_useTranslate();
40634
40020
  init_HeroSection();
40635
40021
  init_LoadingState();
40636
40022
  init_ErrorState();
@@ -40736,7 +40122,6 @@ var LandingPageTemplate;
40736
40122
  var init_LandingPageTemplate = __esm({
40737
40123
  "components/marketing/templates/LandingPageTemplate.tsx"() {
40738
40124
  init_cn();
40739
- init_useTranslate();
40740
40125
  init_Stack();
40741
40126
  init_Box();
40742
40127
  init_Container();
@@ -40936,7 +40321,6 @@ var init_List = __esm({
40936
40321
  init_cn();
40937
40322
  init_getNestedValue();
40938
40323
  init_useEventBus();
40939
- init_useTranslate();
40940
40324
  init_types3();
40941
40325
  STATUS_STYLES2 = {
40942
40326
  complete: {
@@ -41431,7 +40815,6 @@ var init_MasterDetail = __esm({
41431
40815
  "components/core/organisms/MasterDetail.tsx"() {
41432
40816
  "use client";
41433
40817
  init_DataTable();
41434
- init_useTranslate();
41435
40818
  MasterDetail.displayName = "MasterDetail";
41436
40819
  }
41437
40820
  });
@@ -41440,7 +40823,6 @@ var init_MasterDetailLayout = __esm({
41440
40823
  "components/core/organisms/layout/MasterDetailLayout.tsx"() {
41441
40824
  init_cn();
41442
40825
  init_Typography();
41443
- init_useTranslate();
41444
40826
  DefaultEmptyDetail = () => {
41445
40827
  const { t } = useTranslate();
41446
40828
  return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
@@ -41501,7 +40883,6 @@ var init_MediaGallery = __esm({
41501
40883
  init_ErrorState();
41502
40884
  init_EmptyState();
41503
40885
  init_useEventBus();
41504
- init_useTranslate();
41505
40886
  COLUMN_CLASSES = {
41506
40887
  2: "grid-cols-2",
41507
40888
  3: "grid-cols-2 sm:grid-cols-3",
@@ -41995,7 +41376,6 @@ var init_NegotiatorBoard = __esm({
41995
41376
  "components/game/organisms/puzzles/negotiator/NegotiatorBoard.tsx"() {
41996
41377
  init_atoms2();
41997
41378
  init_useEventBus();
41998
- init_useTranslate();
41999
41379
  NegotiatorBoard.displayName = "NegotiatorBoard";
42000
41380
  }
42001
41381
  });
@@ -42005,7 +41385,6 @@ var init_PricingOrganism = __esm({
42005
41385
  "use client";
42006
41386
  init_cn();
42007
41387
  init_useEventBus();
42008
- init_useTranslate();
42009
41388
  init_Stack();
42010
41389
  init_Typography();
42011
41390
  init_PricingGrid();
@@ -42055,7 +41434,6 @@ var PricingPageTemplate;
42055
41434
  var init_PricingPageTemplate = __esm({
42056
41435
  "components/marketing/templates/PricingPageTemplate.tsx"() {
42057
41436
  init_cn();
42058
- init_useTranslate();
42059
41437
  init_Stack();
42060
41438
  init_Box();
42061
41439
  init_Container();
@@ -42222,13 +41600,13 @@ function getEntitySnapshot() {
42222
41600
  if (!entityProvider) {
42223
41601
  return null;
42224
41602
  }
42225
- const entities2 = entityProvider();
41603
+ const entities = entityProvider();
42226
41604
  return {
42227
- entities: entities2,
41605
+ entities,
42228
41606
  timestamp: Date.now(),
42229
- totalCount: entities2.length,
41607
+ totalCount: entities.length,
42230
41608
  singletons: {},
42231
- 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 })),
42232
41610
  persistent: {}
42233
41611
  };
42234
41612
  }
@@ -42664,7 +42042,6 @@ var init_TraitsTab = __esm({
42664
42042
  init_Typography();
42665
42043
  init_Stack();
42666
42044
  init_EmptyState();
42667
- init_useTranslate();
42668
42045
  TraitsTab.displayName = "TraitsTab";
42669
42046
  }
42670
42047
  });
@@ -42742,7 +42119,6 @@ var init_TicksTab = __esm({
42742
42119
  init_Stack();
42743
42120
  init_Card();
42744
42121
  init_EmptyState();
42745
- init_useTranslate();
42746
42122
  TicksTab.displayName = "TicksTab";
42747
42123
  }
42748
42124
  });
@@ -42816,7 +42192,6 @@ var init_EntitiesTab = __esm({
42816
42192
  init_Typography();
42817
42193
  init_Stack();
42818
42194
  init_EmptyState();
42819
- init_useTranslate();
42820
42195
  EntitiesTab.displayName = "EntitiesTab";
42821
42196
  }
42822
42197
  });
@@ -42933,7 +42308,6 @@ var init_EventFlowTab = __esm({
42933
42308
  init_Button();
42934
42309
  init_Checkbox();
42935
42310
  init_EmptyState();
42936
- init_useTranslate();
42937
42311
  TYPE_BADGES = {
42938
42312
  trait: { variant: "primary", icon: "\u{1F504}" },
42939
42313
  tick: { variant: "warning", icon: "\u23F1\uFE0F" },
@@ -43028,7 +42402,6 @@ var init_GuardsPanel = __esm({
43028
42402
  init_ButtonGroup();
43029
42403
  init_Button();
43030
42404
  init_EmptyState();
43031
- init_useTranslate();
43032
42405
  GuardsPanel.displayName = "GuardsPanel";
43033
42406
  }
43034
42407
  });
@@ -43104,7 +42477,6 @@ var init_VerificationTab = __esm({
43104
42477
  init_Typography();
43105
42478
  init_Stack();
43106
42479
  init_EmptyState();
43107
- init_useTranslate();
43108
42480
  STATUS_CONFIG = {
43109
42481
  pass: { variant: "success", icon: "\u2713", label: "PASS" },
43110
42482
  fail: { variant: "danger", icon: "\u2717", label: "FAIL" },
@@ -43240,7 +42612,6 @@ var init_TransitionTimeline = __esm({
43240
42612
  init_Typography();
43241
42613
  init_EmptyState();
43242
42614
  init_Checkbox();
43243
- init_useTranslate();
43244
42615
  EFFECT_STATUS_VARIANT = {
43245
42616
  executed: "success",
43246
42617
  failed: "danger",
@@ -43330,7 +42701,6 @@ var init_ServerBridgeTab = __esm({
43330
42701
  init_Stack();
43331
42702
  init_Card();
43332
42703
  init_EmptyState();
43333
- init_useTranslate();
43334
42704
  ServerBridgeTab.displayName = "ServerBridgeTab";
43335
42705
  }
43336
42706
  });
@@ -43410,7 +42780,7 @@ function getAllEvents(traits2) {
43410
42780
  function EventDispatcherTab({ traits: traits2, schema }) {
43411
42781
  const eventBus = useEventBus();
43412
42782
  const { t } = useTranslate();
43413
- const [log18, setLog] = React79.useState([]);
42783
+ const [log8, setLog] = React79.useState([]);
43414
42784
  const prevStatesRef = React79.useRef(/* @__PURE__ */ new Map());
43415
42785
  React79.useEffect(() => {
43416
42786
  for (const trait of traits2) {
@@ -43474,9 +42844,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
43474
42844
  /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
43475
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)) })
43476
42846
  ] }),
43477
- log18.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
42847
+ log8.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
43478
42848
  /* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
43479
- /* @__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: [
43480
42850
  /* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
43481
42851
  " ",
43482
42852
  /* @__PURE__ */ jsx("span", { className: "text-gray-500", children: entry.from }),
@@ -43495,7 +42865,6 @@ var init_EventDispatcherTab = __esm({
43495
42865
  init_Stack();
43496
42866
  init_EmptyState();
43497
42867
  init_useEventBus();
43498
- init_useTranslate();
43499
42868
  EventDispatcherTab.displayName = "EventDispatcherTab";
43500
42869
  }
43501
42870
  });
@@ -43870,7 +43239,6 @@ var init_RuntimeDebugger2 = __esm({
43870
43239
  init_TransitionTimeline();
43871
43240
  init_ServerBridgeTab();
43872
43241
  init_EventDispatcherTab();
43873
- init_useTranslate();
43874
43242
  init_RuntimeDebugger();
43875
43243
  RuntimeDebugger.displayName = "RuntimeDebugger";
43876
43244
  }
@@ -44357,7 +43725,6 @@ var init_SequencerBoard = __esm({
44357
43725
  init_atoms2();
44358
43726
  init_cn();
44359
43727
  init_useEventBus();
44360
- init_useTranslate();
44361
43728
  init_TraitStateViewer();
44362
43729
  init_SequenceBar();
44363
43730
  init_ActionPalette();
@@ -44376,7 +43743,6 @@ var init_ShowcaseOrganism = __esm({
44376
43743
  "use client";
44377
43744
  init_cn();
44378
43745
  init_useEventBus();
44379
- init_useTranslate();
44380
43746
  init_Stack();
44381
43747
  init_Typography();
44382
43748
  init_SimpleGrid();
@@ -44935,7 +44301,6 @@ var init_SimulatorBoard = __esm({
44935
44301
  "components/game/organisms/puzzles/simulator/SimulatorBoard.tsx"() {
44936
44302
  init_atoms2();
44937
44303
  init_useEventBus();
44938
- init_useTranslate();
44939
44304
  SimulatorBoard.displayName = "SimulatorBoard";
44940
44305
  }
44941
44306
  });
@@ -45151,7 +44516,6 @@ var init_StatCard = __esm({
45151
44516
  init_Button();
45152
44517
  init_Sparkline();
45153
44518
  init_useEventBus();
45154
- init_useTranslate();
45155
44519
  init_Icon();
45156
44520
  StatCard = ({
45157
44521
  label: propLabel,
@@ -45507,7 +44871,6 @@ var init_VariablePanel = __esm({
45507
44871
  "components/game/organisms/puzzles/state-architect/VariablePanel.tsx"() {
45508
44872
  init_atoms2();
45509
44873
  init_cn();
45510
- init_useTranslate();
45511
44874
  VariablePanel.displayName = "VariablePanel";
45512
44875
  }
45513
44876
  });
@@ -45824,7 +45187,6 @@ var init_StateArchitectBoard = __esm({
45824
45187
  init_atoms2();
45825
45188
  init_cn();
45826
45189
  init_useEventBus();
45827
- init_useTranslate();
45828
45190
  init_TraitStateViewer();
45829
45191
  init_StateNode();
45830
45192
  init_TransitionArrow();
@@ -45844,7 +45206,6 @@ var init_StatsOrganism = __esm({
45844
45206
  "components/marketing/organisms/StatsOrganism.tsx"() {
45845
45207
  "use client";
45846
45208
  init_cn();
45847
- init_useTranslate();
45848
45209
  init_StatsGrid();
45849
45210
  init_LoadingState();
45850
45211
  init_ErrorState();
@@ -45958,7 +45319,6 @@ var init_StepFlowOrganism = __esm({
45958
45319
  "components/core/organisms/StepFlowOrganism.tsx"() {
45959
45320
  "use client";
45960
45321
  init_cn();
45961
- init_useTranslate();
45962
45322
  init_Stack();
45963
45323
  init_Typography();
45964
45324
  init_StepFlow();
@@ -46128,7 +45488,6 @@ var init_TeamOrganism = __esm({
46128
45488
  "components/marketing/organisms/TeamOrganism.tsx"() {
46129
45489
  "use client";
46130
45490
  init_cn();
46131
- init_useTranslate();
46132
45491
  init_Stack();
46133
45492
  init_Typography();
46134
45493
  init_SimpleGrid();
@@ -46186,7 +45545,6 @@ var init_Timeline = __esm({
46186
45545
  init_LoadingState();
46187
45546
  init_ErrorState();
46188
45547
  init_EmptyState();
46189
- init_useTranslate();
46190
45548
  lookStyles10 = {
46191
45549
  "vertical-compact": "gap-1 [&>*]:py-1",
46192
45550
  "vertical-spacious": "",
@@ -48376,7 +47734,6 @@ var init_UISlotRenderer = __esm({
48376
47734
  init_Box();
48377
47735
  init_Typography();
48378
47736
  init_useEventBus();
48379
- init_useTranslate();
48380
47737
  init_slot_types();
48381
47738
  init_cn();
48382
47739
  init_ErrorBoundary();
@@ -49722,1622 +49079,5 @@ init_AboutPageTemplate();
49722
49079
 
49723
49080
  // components/index.ts
49724
49081
  init_cn();
49725
- var log8 = createLogger("almadar:ui:orbital-history");
49726
- function useOrbitalHistory(options) {
49727
- const { appId, authToken, userId, onHistoryChange, onRevertSuccess } = options;
49728
- const getHeaders = useCallback(() => {
49729
- const headers = {
49730
- "Content-Type": "application/json"
49731
- };
49732
- if (authToken) {
49733
- headers["Authorization"] = `Bearer ${authToken}`;
49734
- }
49735
- if (userId) {
49736
- headers["x-user-id"] = userId;
49737
- }
49738
- return headers;
49739
- }, [authToken, userId]);
49740
- const [timeline, setTimeline] = useState([]);
49741
- const [currentVersion, setCurrentVersion] = useState(1);
49742
- const [isLoading, setIsLoading] = useState(false);
49743
- const [error, setError] = useState(null);
49744
- const refresh = useCallback(async () => {
49745
- if (!appId) return;
49746
- setIsLoading(true);
49747
- setError(null);
49748
- try {
49749
- const headers = getHeaders();
49750
- const [changesetsRes, snapshotsRes] = await Promise.all([
49751
- fetch(`/api/graphs/${appId}/history/changesets`, { headers }),
49752
- fetch(`/api/graphs/${appId}/history/snapshots`, { headers })
49753
- ]);
49754
- if (!changesetsRes.ok) {
49755
- throw new Error(`Failed to fetch changesets: ${changesetsRes.status}`);
49756
- }
49757
- if (!snapshotsRes.ok) {
49758
- throw new Error(`Failed to fetch snapshots: ${snapshotsRes.status}`);
49759
- }
49760
- const changesetsData = await changesetsRes.json();
49761
- const snapshotsData = await snapshotsRes.json();
49762
- const changesetItems = (changesetsData.changesets || []).map((cs) => ({
49763
- id: cs.id,
49764
- type: "changeset",
49765
- version: cs.version,
49766
- timestamp: cs.timestamp,
49767
- description: `Version ${cs.version}`,
49768
- source: cs.source,
49769
- summary: cs.summary
49770
- }));
49771
- const snapshotItems = (snapshotsData.snapshots || []).map((snap) => ({
49772
- id: snap.id,
49773
- type: "snapshot",
49774
- version: snap.version,
49775
- timestamp: snap.timestamp,
49776
- description: snap.reason || `Snapshot v${snap.version}`,
49777
- reason: snap.reason
49778
- }));
49779
- const mergedTimeline = [...changesetItems, ...snapshotItems].sort(
49780
- (a, b) => b.timestamp - a.timestamp
49781
- );
49782
- setTimeline(mergedTimeline);
49783
- if (mergedTimeline.length > 0) {
49784
- setCurrentVersion(mergedTimeline[0].version);
49785
- }
49786
- } catch (err) {
49787
- log8.error("Failed to load history", { error: err instanceof Error ? err : String(err) });
49788
- setError(err instanceof Error ? err.message : "Failed to load history");
49789
- } finally {
49790
- setIsLoading(false);
49791
- }
49792
- }, [appId, getHeaders]);
49793
- const revertToSnapshot = useCallback(async (snapshotId) => {
49794
- if (!appId) {
49795
- return { success: false, error: "No app ID provided" };
49796
- }
49797
- try {
49798
- const response = await fetch(`/api/graphs/${appId}/history/revert/${snapshotId}`, {
49799
- method: "POST",
49800
- headers: getHeaders()
49801
- });
49802
- if (!response.ok) {
49803
- const errorData = await response.json().catch(() => ({}));
49804
- throw new Error(errorData.error || `Failed to revert: ${response.status}`);
49805
- }
49806
- const data = await response.json();
49807
- if (data.success && data.schema) {
49808
- await refresh();
49809
- onRevertSuccess?.(data.schema);
49810
- return {
49811
- success: true,
49812
- restoredSchema: data.schema
49813
- };
49814
- }
49815
- return {
49816
- success: false,
49817
- error: data.error || "Unknown error during revert"
49818
- };
49819
- } catch (err) {
49820
- log8.error("Failed to revert", { error: err instanceof Error ? err : String(err) });
49821
- return {
49822
- success: false,
49823
- error: err instanceof Error ? err.message : "Failed to revert"
49824
- };
49825
- }
49826
- }, [appId, getHeaders, refresh, onRevertSuccess]);
49827
- useEffect(() => {
49828
- if (appId && authToken && userId) {
49829
- refresh();
49830
- }
49831
- }, [appId, authToken, userId]);
49832
- useEffect(() => {
49833
- onHistoryChange?.(timeline);
49834
- }, [timeline]);
49835
- return {
49836
- timeline,
49837
- currentVersion,
49838
- isLoading,
49839
- error,
49840
- revertToSnapshot,
49841
- refresh
49842
- };
49843
- }
49844
- var log9 = createLogger("almadar:ui:filesystem");
49845
- function useFileSystem() {
49846
- const [status, setStatus] = useState("idle");
49847
- const [error, setError] = useState(null);
49848
- const [isLoading, setIsLoading] = useState(false);
49849
- const [files, setFiles] = useState([]);
49850
- const [selectedFile, setSelectedFile] = useState(null);
49851
- const [selectedPath, setSelectedPath] = useState(null);
49852
- const [previewUrl, setPreviewUrl] = useState(null);
49853
- const [fileContents, setFileContents] = useState(/* @__PURE__ */ new Map());
49854
- const boot = useCallback(async () => {
49855
- setStatus("booting");
49856
- setError(null);
49857
- setIsLoading(true);
49858
- try {
49859
- log9.debug("Booting WebContainer");
49860
- await new Promise((resolve) => setTimeout(resolve, 100));
49861
- setStatus("ready");
49862
- } catch (err) {
49863
- setError(err instanceof Error ? err.message : "Failed to boot");
49864
- setStatus("error");
49865
- } finally {
49866
- setIsLoading(false);
49867
- }
49868
- }, []);
49869
- const mountFiles = useCallback(async (filesToMount) => {
49870
- setIsLoading(true);
49871
- try {
49872
- let filesArray;
49873
- if (Array.isArray(filesToMount)) {
49874
- filesArray = filesToMount;
49875
- } else {
49876
- filesArray = [];
49877
- const flattenTree = (obj, basePath = "") => {
49878
- for (const [key, value] of Object.entries(obj)) {
49879
- const path = basePath ? `${basePath}/${key}` : key;
49880
- if (value && typeof value === "object" && "file" in value) {
49881
- const fileObj = value;
49882
- filesArray.push({ path, content: fileObj.file.contents || "" });
49883
- } else if (value && typeof value === "object" && "directory" in value) {
49884
- const dirObj = value;
49885
- flattenTree(dirObj.directory, path);
49886
- }
49887
- }
49888
- };
49889
- flattenTree(filesToMount);
49890
- }
49891
- const newContents = /* @__PURE__ */ new Map();
49892
- for (const file of filesArray) {
49893
- newContents.set(file.path, file.content);
49894
- }
49895
- setFileContents(newContents);
49896
- const newTree = [];
49897
- for (const file of filesArray) {
49898
- const parts = file.path.split("/").filter(Boolean);
49899
- let current = newTree;
49900
- for (let i = 0; i < parts.length; i++) {
49901
- const part = parts[i];
49902
- const isFile = i === parts.length - 1;
49903
- const currentPath = "/" + parts.slice(0, i + 1).join("/");
49904
- let node = current.find((n) => n.name === part);
49905
- if (!node) {
49906
- node = {
49907
- path: currentPath,
49908
- name: part,
49909
- type: isFile ? "file" : "directory",
49910
- children: isFile ? void 0 : []
49911
- };
49912
- current.push(node);
49913
- }
49914
- if (!isFile && node && node.children) {
49915
- current = node.children;
49916
- }
49917
- }
49918
- }
49919
- setFiles(newTree);
49920
- setStatus("running");
49921
- } catch (err) {
49922
- log9.error("Failed to mount files", { error: err instanceof Error ? err : String(err) });
49923
- } finally {
49924
- setIsLoading(false);
49925
- }
49926
- }, []);
49927
- const readFile = useCallback(async (path) => {
49928
- return fileContents.get(path) || "";
49929
- }, [fileContents]);
49930
- const writeFile = useCallback(async (path, content) => {
49931
- setFileContents((prev) => {
49932
- const next = new Map(prev);
49933
- next.set(path, content);
49934
- return next;
49935
- });
49936
- }, []);
49937
- const selectFile = useCallback(async (path) => {
49938
- const content = fileContents.get(path) || "";
49939
- const ext = path.split(".").pop()?.toLowerCase() || "";
49940
- const languageMap = {
49941
- ts: "typescript",
49942
- tsx: "typescript",
49943
- js: "javascript",
49944
- jsx: "javascript",
49945
- json: "json",
49946
- md: "markdown",
49947
- css: "css",
49948
- html: "html",
49949
- orb: "json"
49950
- };
49951
- setSelectedPath(path);
49952
- setSelectedFile({
49953
- path,
49954
- content,
49955
- language: languageMap[ext] || "plaintext",
49956
- isDirty: false
49957
- });
49958
- }, [fileContents]);
49959
- const updateContent = useCallback((pathOrContent, contentArg) => {
49960
- const path = contentArg !== void 0 ? pathOrContent : selectedPath;
49961
- const content = contentArg !== void 0 ? contentArg : pathOrContent;
49962
- if (!path) {
49963
- log9.warn("updateContent called without path and no file selected");
49964
- return;
49965
- }
49966
- setFileContents((prev) => {
49967
- const next = new Map(prev);
49968
- next.set(path, content);
49969
- return next;
49970
- });
49971
- if (selectedPath === path) {
49972
- setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
49973
- }
49974
- }, [selectedPath]);
49975
- const updateSelectedContent = useCallback((content) => {
49976
- setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
49977
- }, []);
49978
- const refreshTree = useCallback(async () => {
49979
- log9.debug("Refreshing tree");
49980
- }, []);
49981
- const runCommand = useCallback(async (command) => {
49982
- log9.debug("Running command", { command });
49983
- return { exitCode: 0, output: "" };
49984
- }, []);
49985
- const startDevServer = useCallback(async () => {
49986
- log9.debug("Starting dev server");
49987
- setPreviewUrl("http://localhost:5173");
49988
- }, []);
49989
- return {
49990
- status,
49991
- error,
49992
- isLoading,
49993
- files,
49994
- selectedFile,
49995
- selectedPath,
49996
- previewUrl,
49997
- boot,
49998
- mountFiles,
49999
- readFile,
50000
- writeFile,
50001
- selectFile,
50002
- updateContent,
50003
- updateSelectedContent,
50004
- refreshTree,
50005
- runCommand,
50006
- startDevServer
50007
- };
50008
- }
50009
- var log10 = createLogger("almadar:ui:extensions");
50010
- var defaultManifest = {
50011
- languages: {
50012
- typescript: { extensions: [".ts", ".tsx"], icon: "ts", color: "#3178c6" },
50013
- javascript: { extensions: [".js", ".jsx"], icon: "js", color: "#f7df1e" },
50014
- json: { extensions: [".json", ".orb"], icon: "json", color: "#000000" },
50015
- css: { extensions: [".css"], icon: "css", color: "#264de4" },
50016
- html: { extensions: [".html"], icon: "html", color: "#e34c26" },
50017
- markdown: { extensions: [".md", ".mdx"], icon: "md", color: "#083fa1" }
50018
- },
50019
- extensions: []
50020
- };
50021
- function useExtensions(options) {
50022
- const { appId, loadOnMount = true } = options;
50023
- const [extensions, setExtensions] = useState([]);
50024
- const [manifest] = useState(defaultManifest);
50025
- const [isLoading, setIsLoading] = useState(false);
50026
- const [error, setError] = useState(null);
50027
- const loadExtension = useCallback(async (extensionId) => {
50028
- log10.debug("Loading extension", { extensionId });
50029
- }, []);
50030
- const loadExtensions = useCallback(async () => {
50031
- setIsLoading(true);
50032
- setError(null);
50033
- try {
50034
- const defaultExtensions = [
50035
- { id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
50036
- { id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
50037
- { id: "json", name: "JSON", language: "json", loaded: true },
50038
- { id: "css", name: "CSS", language: "css", loaded: true },
50039
- { id: "html", name: "HTML", language: "html", loaded: true },
50040
- { id: "markdown", name: "Markdown", language: "markdown", loaded: true }
50041
- ];
50042
- setExtensions(defaultExtensions);
50043
- } catch (err) {
50044
- setError(err instanceof Error ? err.message : "Failed to load extensions");
50045
- } finally {
50046
- setIsLoading(false);
50047
- }
50048
- }, []);
50049
- const getExtensionForFile = useCallback((filename) => {
50050
- const ext = filename.split(".").pop()?.toLowerCase();
50051
- if (!ext) return null;
50052
- const languageMap = {
50053
- ts: "typescript",
50054
- tsx: "typescript",
50055
- js: "javascript",
50056
- jsx: "javascript",
50057
- json: "json",
50058
- md: "markdown",
50059
- css: "css",
50060
- html: "html",
50061
- orb: "json"
50062
- };
50063
- const language = languageMap[ext];
50064
- if (!language) return null;
50065
- return extensions.find((e) => e.language === language) || null;
50066
- }, [extensions]);
50067
- useEffect(() => {
50068
- if (!appId || !loadOnMount) return;
50069
- const loadExtensions2 = async () => {
50070
- setIsLoading(true);
50071
- setError(null);
50072
- try {
50073
- const defaultExtensions = [
50074
- { id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
50075
- { id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
50076
- { id: "json", name: "JSON", language: "json", loaded: true },
50077
- { id: "css", name: "CSS", language: "css", loaded: true },
50078
- { id: "html", name: "HTML", language: "html", loaded: true },
50079
- { id: "markdown", name: "Markdown", language: "markdown", loaded: true }
50080
- ];
50081
- setExtensions(defaultExtensions);
50082
- } catch (err) {
50083
- setError(err instanceof Error ? err.message : "Failed to load extensions");
50084
- } finally {
50085
- setIsLoading(false);
50086
- }
50087
- };
50088
- loadExtensions2();
50089
- }, [appId, loadOnMount]);
50090
- return {
50091
- extensions,
50092
- manifest,
50093
- isLoading,
50094
- error,
50095
- loadExtension,
50096
- loadExtensions,
50097
- getExtensionForFile
50098
- };
50099
- }
50100
- var log11 = createLogger("almadar:ui:file-editor");
50101
- function useFileEditor(options) {
50102
- const { extensions, fileSystem, onSchemaUpdate } = options;
50103
- const [openFiles, setOpenFiles] = useState([]);
50104
- const [activeFilePath, setActiveFilePath] = useState(null);
50105
- const [isSaving, setIsSaving] = useState(false);
50106
- const activeFile = openFiles.find((f3) => f3.path === activeFilePath) || null;
50107
- const openFile = useCallback(async (path) => {
50108
- const existing = openFiles.find((f3) => f3.path === path);
50109
- if (existing) {
50110
- setActiveFilePath(path);
50111
- return;
50112
- }
50113
- try {
50114
- const content = await fileSystem.readFile(path);
50115
- const ext = extensions.getExtensionForFile(path);
50116
- const newFile = {
50117
- path,
50118
- content,
50119
- isDirty: false,
50120
- language: ext?.language
50121
- };
50122
- setOpenFiles((prev) => [...prev, newFile]);
50123
- setActiveFilePath(path);
50124
- } catch (err) {
50125
- log11.error("Failed to open file", { error: err instanceof Error ? err : String(err) });
50126
- }
50127
- }, [openFiles, fileSystem, extensions]);
50128
- const closeFile = useCallback((path) => {
50129
- setOpenFiles((prev) => prev.filter((f3) => f3.path !== path));
50130
- if (activeFilePath === path) {
50131
- const remaining = openFiles.filter((f3) => f3.path !== path);
50132
- setActiveFilePath(remaining.length > 0 ? remaining[0].path : null);
50133
- }
50134
- }, [activeFilePath, openFiles]);
50135
- const setActiveFile = useCallback((path) => {
50136
- setActiveFilePath(path);
50137
- }, []);
50138
- const updateFileContent = useCallback((path, content) => {
50139
- setOpenFiles(
50140
- (prev) => prev.map(
50141
- (f3) => f3.path === path ? { ...f3, content, isDirty: true } : f3
50142
- )
50143
- );
50144
- }, []);
50145
- const handleFileEdit = useCallback(async (path, content) => {
50146
- try {
50147
- await fileSystem.writeFile(path, content);
50148
- let action = "saved";
50149
- if (path.endsWith(".orb") || path.endsWith("schema.json")) {
50150
- try {
50151
- const schema = JSON.parse(content);
50152
- await onSchemaUpdate?.(schema);
50153
- action = "updated_schema";
50154
- } catch {
50155
- }
50156
- } else if (path.includes("/extensions/")) {
50157
- action = path.endsWith(".new") ? "converted_extension" : "saved_extension";
50158
- }
50159
- return { success: true, action };
50160
- } catch (err) {
50161
- return {
50162
- success: false,
50163
- error: err instanceof Error ? err.message : "Failed to save file"
50164
- };
50165
- }
50166
- }, [fileSystem, onSchemaUpdate]);
50167
- const saveFile = useCallback(async (path) => {
50168
- const file = openFiles.find((f3) => f3.path === path);
50169
- if (!file) return;
50170
- setIsSaving(true);
50171
- try {
50172
- await fileSystem.writeFile(path, file.content);
50173
- setOpenFiles(
50174
- (prev) => prev.map(
50175
- (f3) => f3.path === path ? { ...f3, isDirty: false } : f3
50176
- )
50177
- );
50178
- if (path.endsWith(".orb") || path.endsWith("schema.json")) {
50179
- try {
50180
- const schema = JSON.parse(file.content);
50181
- await onSchemaUpdate?.(schema);
50182
- } catch {
50183
- }
50184
- }
50185
- } catch (err) {
50186
- log11.error("Failed to save file", { error: err instanceof Error ? err : String(err) });
50187
- } finally {
50188
- setIsSaving(false);
50189
- }
50190
- }, [openFiles, fileSystem, onSchemaUpdate]);
50191
- const saveAllFiles = useCallback(async () => {
50192
- setIsSaving(true);
50193
- try {
50194
- const dirtyFiles = openFiles.filter((f3) => f3.isDirty);
50195
- for (const file of dirtyFiles) {
50196
- await saveFile(file.path);
50197
- }
50198
- } finally {
50199
- setIsSaving(false);
50200
- }
50201
- }, [openFiles, saveFile]);
50202
- return {
50203
- openFiles,
50204
- activeFile,
50205
- isSaving,
50206
- openFile,
50207
- closeFile,
50208
- setActiveFile,
50209
- updateFileContent,
50210
- handleFileEdit,
50211
- saveFile,
50212
- saveAllFiles
50213
- };
50214
- }
50215
- var log12 = createLogger("almadar:ui:compile");
50216
- function useCompile() {
50217
- const [isCompiling, setIsCompiling] = useState(false);
50218
- const [stage, setStage] = useState("idle");
50219
- const [lastResult, setLastResult] = useState(null);
50220
- const [error, setError] = useState(null);
50221
- const compileSchema = useCallback(async (schema) => {
50222
- setIsCompiling(true);
50223
- setStage("compiling");
50224
- setError(null);
50225
- try {
50226
- log12.debug("Compiling schema", { name: schema.name });
50227
- const result = {
50228
- success: true,
50229
- files: []
50230
- };
50231
- setLastResult(result);
50232
- setStage("done");
50233
- return result;
50234
- } catch (err) {
50235
- const errorMessage = err instanceof Error ? err.message : "Compilation failed";
50236
- setError(errorMessage);
50237
- setStage("error");
50238
- setLastResult({ success: false, errors: [errorMessage] });
50239
- return null;
50240
- } finally {
50241
- setIsCompiling(false);
50242
- }
50243
- }, []);
50244
- return {
50245
- isCompiling,
50246
- stage,
50247
- lastResult,
50248
- error,
50249
- compileSchema
50250
- };
50251
- }
50252
- var log13 = createLogger("almadar:ui:preview");
50253
- function usePreview(options) {
50254
- const [previewUrl, setPreviewUrl] = useState(null);
50255
- const [isLoading, setIsLoading] = useState(!!options?.appId);
50256
- const [error, setError] = useState(null);
50257
- const [loadError, setLoadError] = useState(null);
50258
- const [app, setApp] = useState(null);
50259
- const [isFullscreen, setIsFullscreen] = useState(false);
50260
- const [isExecutingEvent, setIsExecutingEvent] = useState(false);
50261
- const [errorToast, setErrorToast] = useState(null);
50262
- const [currentStateName, setCurrentStateName] = useState(null);
50263
- const [notificationsList, setNotificationsList] = useState([]);
50264
- const [isPanelOpen, setIsPanelOpen] = useState(false);
50265
- const notifications = useMemo(() => ({
50266
- notifications: notificationsList,
50267
- isPanelOpen,
50268
- closePanel: () => setIsPanelOpen(false),
50269
- dismissNotification: (id) => {
50270
- setNotificationsList((prev) => prev.filter((n) => n.id !== id));
50271
- },
50272
- markAsRead: (id) => {
50273
- setNotificationsList(
50274
- (prev) => prev.map((n) => n.id === id ? { ...n, read: true } : n)
50275
- );
50276
- },
50277
- clearAll: () => setNotificationsList([])
50278
- }), [notificationsList, isPanelOpen]);
50279
- useEffect(() => {
50280
- const appId = options?.appId;
50281
- if (!appId) {
50282
- setApp(null);
50283
- setIsLoading(false);
50284
- return;
50285
- }
50286
- log13.debug("Setting up preview for app", { appId });
50287
- setPreviewUrl(`/api/orbitals/${appId}`);
50288
- setIsLoading(false);
50289
- }, [options?.appId]);
50290
- const startPreview = useCallback(async () => {
50291
- log13.debug("startPreview called");
50292
- }, []);
50293
- const stopPreview = useCallback(async () => {
50294
- setIsLoading(true);
50295
- try {
50296
- log13.debug("Stopping preview server");
50297
- setPreviewUrl(null);
50298
- setApp(null);
50299
- } finally {
50300
- setIsLoading(false);
50301
- }
50302
- }, []);
50303
- const refresh = useCallback(async () => {
50304
- if (!previewUrl) return;
50305
- log13.debug("Refreshing preview");
50306
- setPreviewUrl(`${previewUrl.split("?")[0]}?t=${Date.now()}`);
50307
- }, [previewUrl]);
50308
- const handleRefresh = useCallback(async () => {
50309
- log13.debug("Handle refresh");
50310
- await refresh();
50311
- }, [refresh]);
50312
- const handleReset = useCallback(async () => {
50313
- log13.debug("Resetting preview");
50314
- setError(null);
50315
- setLoadError(null);
50316
- setErrorToast(null);
50317
- setIsExecutingEvent(false);
50318
- setCurrentStateName(null);
50319
- }, []);
50320
- const toggleFullscreen = useCallback(() => {
50321
- setIsFullscreen((prev) => !prev);
50322
- }, []);
50323
- const dismissErrorToast = useCallback(() => {
50324
- setErrorToast(null);
50325
- }, []);
50326
- return {
50327
- previewUrl,
50328
- isLoading,
50329
- error,
50330
- loadError,
50331
- app,
50332
- isFullscreen,
50333
- isExecutingEvent,
50334
- errorToast,
50335
- currentStateName,
50336
- notifications,
50337
- startPreview,
50338
- stopPreview,
50339
- refresh,
50340
- handleRefresh,
50341
- handleReset,
50342
- toggleFullscreen,
50343
- setErrorToast,
50344
- dismissErrorToast
50345
- };
50346
- }
50347
- var log14 = createLogger("almadar:ui:agent-chat");
50348
- function useAgentChat(options) {
50349
- const [messages, setMessages] = useState([]);
50350
- const [status, setStatus] = useState("idle");
50351
- const [activities, setActivities] = useState([]);
50352
- const [todos, setTodos] = useState([]);
50353
- const [schemaDiffs, setSchemaDiffs] = useState([]);
50354
- const [isLoading, setIsLoading] = useState(false);
50355
- const [error, setError] = useState(null);
50356
- const [threadId] = useState(null);
50357
- const [interrupt, setInterrupt] = useState(null);
50358
- const sendMessage = useCallback(async (content) => {
50359
- setIsLoading(true);
50360
- setStatus("running");
50361
- setError(null);
50362
- try {
50363
- const userMessage = {
50364
- id: Date.now().toString(),
50365
- role: "user",
50366
- content,
50367
- timestamp: Date.now()
50368
- };
50369
- setMessages((prev) => [...prev, userMessage]);
50370
- log14.debug("Sending message", { content });
50371
- const assistantMessage = {
50372
- id: (Date.now() + 1).toString(),
50373
- role: "assistant",
50374
- content: "Agent chat is not yet implemented.",
50375
- timestamp: Date.now()
50376
- };
50377
- setMessages((prev) => [...prev, assistantMessage]);
50378
- setStatus("idle");
50379
- options?.onComplete?.();
50380
- } catch (err) {
50381
- setError(err instanceof Error ? err.message : "Failed to send message");
50382
- setStatus("error");
50383
- } finally {
50384
- setIsLoading(false);
50385
- }
50386
- }, [options]);
50387
- const startGeneration = useCallback(async (skill, prompt, genOptions) => {
50388
- setStatus("running");
50389
- setIsLoading(true);
50390
- setError(null);
50391
- const skillName = Array.isArray(skill) ? skill[0] : skill;
50392
- try {
50393
- log14.debug("Starting generation", () => ({ skillName, prompt, genOptions: JSON.stringify(genOptions) }));
50394
- await new Promise((resolve) => setTimeout(resolve, 100));
50395
- setStatus("complete");
50396
- options?.onComplete?.();
50397
- } catch (err) {
50398
- setError(err instanceof Error ? err.message : "Generation failed");
50399
- setStatus("error");
50400
- } finally {
50401
- setIsLoading(false);
50402
- }
50403
- }, [options]);
50404
- const continueConversation = useCallback(async (message) => {
50405
- log14.debug("Continue conversation", { message: Array.isArray(message) ? message : [message] });
50406
- }, []);
50407
- const resumeWithDecision = useCallback(async (decisions) => {
50408
- log14.debug("Resume with decision", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
50409
- setInterrupt(null);
50410
- }, []);
50411
- const cancel = useCallback(() => {
50412
- setStatus("idle");
50413
- setIsLoading(false);
50414
- setInterrupt(null);
50415
- }, []);
50416
- const clearMessages = useCallback(() => {
50417
- setMessages([]);
50418
- }, []);
50419
- const clearHistory = useCallback(() => {
50420
- setMessages([]);
50421
- setActivities([]);
50422
- setTodos([]);
50423
- setSchemaDiffs([]);
50424
- setError(null);
50425
- }, []);
50426
- return {
50427
- messages,
50428
- status,
50429
- activities,
50430
- todos,
50431
- schemaDiffs,
50432
- isLoading,
50433
- error,
50434
- threadId,
50435
- interrupt,
50436
- sendMessage,
50437
- startGeneration,
50438
- continueConversation,
50439
- resumeWithDecision,
50440
- cancel,
50441
- clearMessages,
50442
- clearHistory
50443
- };
50444
- }
50445
- var log15 = createLogger("almadar:ui:validation");
50446
- function useValidation() {
50447
- const [result, setResult] = useState(null);
50448
- const [isValidating, setIsValidating] = useState(false);
50449
- const [error, setError] = useState(null);
50450
- const [stage, setStage] = useState("idle");
50451
- const [isFixing, setIsFixing] = useState(false);
50452
- const [progressMessage, setProgressMessage] = useState(null);
50453
- const validate = useCallback(async (appId) => {
50454
- setIsValidating(true);
50455
- setError(null);
50456
- setStage("validating");
50457
- setProgressMessage("Validating schema...");
50458
- try {
50459
- log15.debug("Validating app", { appId });
50460
- const validationResult = {
50461
- valid: true,
50462
- errors: [],
50463
- warnings: []
50464
- };
50465
- setResult(validationResult);
50466
- setStage("complete");
50467
- setProgressMessage(null);
50468
- return validationResult;
50469
- } catch (err) {
50470
- const errorMessage = err instanceof Error ? err.message : "Validation failed";
50471
- setError(errorMessage);
50472
- const failedResult = {
50473
- valid: false,
50474
- errors: [{ code: "VALIDATION_ERROR", message: errorMessage, severity: "error" }],
50475
- warnings: []
50476
- };
50477
- setResult(failedResult);
50478
- setStage("complete");
50479
- setProgressMessage(null);
50480
- return failedResult;
50481
- } finally {
50482
- setIsValidating(false);
50483
- }
50484
- }, []);
50485
- const clearResult = useCallback(() => {
50486
- setResult(null);
50487
- setError(null);
50488
- }, []);
50489
- const reset = useCallback(() => {
50490
- setResult(null);
50491
- setError(null);
50492
- setStage("idle");
50493
- setIsFixing(false);
50494
- setProgressMessage(null);
50495
- setIsValidating(false);
50496
- }, []);
50497
- return {
50498
- result,
50499
- isValidating,
50500
- error,
50501
- stage,
50502
- isFixing,
50503
- progressMessage,
50504
- errors: result?.errors ?? [],
50505
- warnings: result?.warnings ?? [],
50506
- isValid: result?.valid ?? false,
50507
- validate,
50508
- clearResult,
50509
- reset
50510
- };
50511
- }
50512
- var log16 = createLogger("almadar:ui:deep-agent");
50513
- function useDeepAgentGeneration() {
50514
- const [requests, setRequests] = useState([]);
50515
- const [currentRequest, setCurrentRequest] = useState(null);
50516
- const [isGenerating, setIsGenerating] = useState(false);
50517
- const [isLoading, setIsLoading] = useState(false);
50518
- const [isComplete, setIsComplete] = useState(false);
50519
- const [progress, setProgress] = useState({ stage: "idle", percent: 0, message: "" });
50520
- const [error, setError] = useState(null);
50521
- const [interrupt, setInterrupt] = useState(null);
50522
- const generate = useCallback(async (prompt) => {
50523
- setIsGenerating(true);
50524
- setIsLoading(true);
50525
- setIsComplete(false);
50526
- setError(null);
50527
- setProgress({ stage: "starting", percent: 0, message: "Starting generation..." });
50528
- const request = {
50529
- id: Date.now().toString(),
50530
- prompt,
50531
- status: "running"
50532
- };
50533
- setCurrentRequest(request);
50534
- setRequests((prev) => [...prev, request]);
50535
- try {
50536
- log16.debug("Generating from prompt", { prompt });
50537
- await new Promise((resolve) => setTimeout(resolve, 100));
50538
- request.status = "completed";
50539
- setCurrentRequest(request);
50540
- setIsComplete(true);
50541
- setProgress({ stage: "complete", percent: 100, message: "Generation complete" });
50542
- return null;
50543
- } catch (err) {
50544
- const errorMessage = err instanceof Error ? err.message : "Generation failed";
50545
- setError(errorMessage);
50546
- request.status = "failed";
50547
- request.error = errorMessage;
50548
- setCurrentRequest(request);
50549
- return null;
50550
- } finally {
50551
- setIsGenerating(false);
50552
- setIsLoading(false);
50553
- }
50554
- }, []);
50555
- const startGeneration = useCallback(async (skill, prompt, _options) => {
50556
- log16.debug("Starting generation with skill", { skill });
50557
- await generate(prompt);
50558
- }, [generate]);
50559
- const cancelGeneration = useCallback(() => {
50560
- if (currentRequest) {
50561
- currentRequest.status = "failed";
50562
- currentRequest.error = "Cancelled by user";
50563
- setCurrentRequest(null);
50564
- }
50565
- setIsGenerating(false);
50566
- setIsLoading(false);
50567
- setIsComplete(false);
50568
- setProgress({ stage: "idle", percent: 0, message: "" });
50569
- }, [currentRequest]);
50570
- const clearRequests = useCallback(() => {
50571
- setRequests([]);
50572
- setCurrentRequest(null);
50573
- setError(null);
50574
- setProgress({ stage: "idle", percent: 0, message: "" });
50575
- setIsComplete(false);
50576
- }, []);
50577
- const submitInterruptDecisions = useCallback((decisions) => {
50578
- log16.debug("Submitting interrupt decisions", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
50579
- setInterrupt(null);
50580
- }, []);
50581
- return {
50582
- requests,
50583
- currentRequest,
50584
- isGenerating,
50585
- isLoading,
50586
- isComplete,
50587
- progress,
50588
- error,
50589
- interrupt,
50590
- generate,
50591
- startGeneration,
50592
- cancelGeneration,
50593
- clearRequests,
50594
- submitInterruptDecisions
50595
- };
50596
- }
50597
-
50598
- // hooks/index.ts
50599
- init_useEventBus();
50600
- var log17 = createLogger("almadar:ui:ui-slots");
50601
- var DEFAULT_SOURCE_KEY = "__default__";
50602
- var MULTI_SOURCE_STACK_TRAIT = "__multi_source_stack__";
50603
- var ALL_SLOTS2 = [
50604
- "main",
50605
- "sidebar",
50606
- "modal",
50607
- "drawer",
50608
- "overlay",
50609
- "center",
50610
- "toast",
50611
- "hud-top",
50612
- "hud-bottom",
50613
- "hud-left",
50614
- "hud-right",
50615
- "floating"
50616
- ];
50617
- var DEFAULT_SLOTS = ALL_SLOTS2.reduce(
50618
- (acc, slot) => {
50619
- acc[slot] = null;
50620
- return acc;
50621
- },
50622
- {}
50623
- );
50624
- var DEFAULT_SOURCES = ALL_SLOTS2.reduce(
50625
- (acc, slot) => {
50626
- acc[slot] = {};
50627
- return acc;
50628
- },
50629
- {}
50630
- );
50631
- var idCounter = 0;
50632
- function generateId() {
50633
- return `slot-content-${++idCounter}-${Date.now()}`;
50634
- }
50635
- function aggregateSlot(sources) {
50636
- if (!sources) return null;
50637
- const entries = Object.entries(sources);
50638
- if (entries.length === 0) return null;
50639
- if (entries.length === 1) return entries[0][1];
50640
- const children = entries.map(([, entry]) => ({
50641
- type: entry.pattern,
50642
- ...entry.props
50643
- }));
50644
- const stackId = `slot-content-stack-${entries.map(([k]) => k).join("-")}`;
50645
- return {
50646
- id: stackId,
50647
- pattern: "stack",
50648
- props: {
50649
- direction: "vertical",
50650
- gap: "lg",
50651
- children
50652
- },
50653
- priority: 0,
50654
- animation: "fade",
50655
- sourceTrait: MULTI_SOURCE_STACK_TRAIT
50656
- };
50657
- }
50658
- function useUISlotManager() {
50659
- const [sources, setSources] = useState(DEFAULT_SOURCES);
50660
- const subscribersRef = useRef(/* @__PURE__ */ new Set());
50661
- const timersRef = useRef(/* @__PURE__ */ new Map());
50662
- const traitIndexRef = useRef(/* @__PURE__ */ new Map());
50663
- const traitSubscribersRef = useRef(/* @__PURE__ */ new Map());
50664
- const slots = useMemo(() => {
50665
- const out = { ...DEFAULT_SLOTS };
50666
- for (const slot of ALL_SLOTS2) {
50667
- out[slot] = aggregateSlot(sources[slot]);
50668
- }
50669
- return out;
50670
- }, [sources]);
50671
- useEffect(() => {
50672
- return () => {
50673
- timersRef.current.forEach((timer) => clearTimeout(timer));
50674
- timersRef.current.clear();
50675
- };
50676
- }, []);
50677
- const notifySubscribers = useCallback((slot, content) => {
50678
- subscribersRef.current.forEach((callback) => {
50679
- try {
50680
- callback(slot, content);
50681
- } catch (error) {
50682
- log17.error("Subscriber error", { error: error instanceof Error ? error : String(error) });
50683
- }
50684
- });
50685
- }, []);
50686
- const notifyTraitSubscribers = useCallback(
50687
- (traitName, content) => {
50688
- const subs = traitSubscribersRef.current.get(traitName);
50689
- if (!subs) return;
50690
- subs.forEach((callback) => {
50691
- try {
50692
- callback(content);
50693
- } catch (error) {
50694
- log17.error("Trait subscriber error", { traitName, error: error instanceof Error ? error : String(error) });
50695
- }
50696
- });
50697
- },
50698
- []
50699
- );
50700
- const indexTraitRender = useCallback(
50701
- (traitName, content) => {
50702
- traitIndexRef.current.set(traitName, content);
50703
- },
50704
- []
50705
- );
50706
- const unindexTrait = useCallback((traitName) => {
50707
- traitIndexRef.current.delete(traitName);
50708
- }, []);
50709
- const render = useCallback(
50710
- (config) => {
50711
- const id = generateId();
50712
- const sourceKey = config.sourceTrait ?? DEFAULT_SOURCE_KEY;
50713
- const content = {
50714
- id,
50715
- pattern: config.pattern,
50716
- props: config.props ?? {},
50717
- priority: config.priority ?? 0,
50718
- animation: config.animation ?? "fade",
50719
- onDismiss: config.onDismiss,
50720
- sourceTrait: config.sourceTrait,
50721
- slot: config.target,
50722
- transitionEvent: config.transitionEvent,
50723
- fromState: config.fromState,
50724
- entity: config.entity
50725
- };
50726
- if (config.autoDismissMs && config.autoDismissMs > 0) {
50727
- content.autoDismissAt = Date.now() + config.autoDismissMs;
50728
- const timer = setTimeout(() => {
50729
- setSources((prev) => {
50730
- const slotSources = prev[config.target];
50731
- if (slotSources && slotSources[sourceKey]?.id === id) {
50732
- content.onDismiss?.();
50733
- const next = { ...slotSources };
50734
- delete next[sourceKey];
50735
- const updated = { ...prev, [config.target]: next };
50736
- notifySubscribers(config.target, aggregateSlot(next));
50737
- return updated;
50738
- }
50739
- return prev;
50740
- });
50741
- timersRef.current.delete(id);
50742
- }, config.autoDismissMs);
50743
- timersRef.current.set(id, timer);
50744
- }
50745
- setSources((prev) => {
50746
- const slotSources = prev[config.target] ?? {};
50747
- const existing = slotSources[sourceKey];
50748
- if (existing && existing.priority > content.priority) {
50749
- log17.warn("Slot already has higher priority content", {
50750
- slot: config.target,
50751
- sourceKey,
50752
- existingPriority: existing.priority,
50753
- newPriority: content.priority
50754
- });
50755
- return prev;
50756
- }
50757
- const nextSources = {
50758
- ...slotSources,
50759
- [sourceKey]: content
50760
- };
50761
- const nextAll = { ...prev, [config.target]: nextSources };
50762
- if (content.sourceTrait) {
50763
- indexTraitRender(content.sourceTrait, content);
50764
- notifyTraitSubscribers(content.sourceTrait, content);
50765
- }
50766
- log17.info("slot:written", {
50767
- slot: config.target,
50768
- sourceKey,
50769
- sourceTrait: content.sourceTrait,
50770
- patternType: content.pattern,
50771
- priority: content.priority
50772
- });
50773
- notifySubscribers(config.target, aggregateSlot(nextSources));
50774
- return nextAll;
50775
- });
50776
- return id;
50777
- },
50778
- [notifySubscribers, notifyTraitSubscribers, indexTraitRender]
50779
- );
50780
- const clear = useCallback(
50781
- (slot) => {
50782
- setSources((prev) => {
50783
- const slotSources = prev[slot];
50784
- if (!slotSources || Object.keys(slotSources).length === 0) {
50785
- return prev;
50786
- }
50787
- for (const content of Object.values(slotSources)) {
50788
- const timer = timersRef.current.get(content.id);
50789
- if (timer) {
50790
- clearTimeout(timer);
50791
- timersRef.current.delete(content.id);
50792
- }
50793
- content.onDismiss?.();
50794
- if (content.sourceTrait) {
50795
- unindexTrait(content.sourceTrait);
50796
- notifyTraitSubscribers(content.sourceTrait, null);
50797
- }
50798
- }
50799
- notifySubscribers(slot, null);
50800
- return { ...prev, [slot]: {} };
50801
- });
50802
- },
50803
- [notifySubscribers, notifyTraitSubscribers, unindexTrait]
50804
- );
50805
- const clearBySource = useCallback(
50806
- (slot, sourceTrait) => {
50807
- const sourceKey = sourceTrait;
50808
- setSources((prev) => {
50809
- const slotSources = prev[slot];
50810
- if (!slotSources || !(sourceKey in slotSources)) {
50811
- log17.debug("slot:clear-noop", { slot, sourceTrait, reason: !slotSources ? "no-slot" : "no-source" });
50812
- return prev;
50813
- }
50814
- const content = slotSources[sourceKey];
50815
- const timer = timersRef.current.get(content.id);
50816
- if (timer) {
50817
- clearTimeout(timer);
50818
- timersRef.current.delete(content.id);
50819
- }
50820
- content.onDismiss?.();
50821
- if (content.sourceTrait) {
50822
- unindexTrait(content.sourceTrait);
50823
- notifyTraitSubscribers(content.sourceTrait, null);
50824
- }
50825
- const nextSources = { ...slotSources };
50826
- delete nextSources[sourceKey];
50827
- log17.info("slot:cleared", { slot, sourceTrait, lastPatternType: content.pattern });
50828
- notifySubscribers(slot, aggregateSlot(nextSources));
50829
- return { ...prev, [slot]: nextSources };
50830
- });
50831
- },
50832
- [notifySubscribers, notifyTraitSubscribers, unindexTrait]
50833
- );
50834
- const clearById = useCallback(
50835
- (id) => {
50836
- setSources((prev) => {
50837
- for (const slot of ALL_SLOTS2) {
50838
- const slotSources = prev[slot];
50839
- if (!slotSources) continue;
50840
- const matchKey = Object.keys(slotSources).find(
50841
- (k) => slotSources[k].id === id
50842
- );
50843
- if (!matchKey) continue;
50844
- const content = slotSources[matchKey];
50845
- const timer = timersRef.current.get(id);
50846
- if (timer) {
50847
- clearTimeout(timer);
50848
- timersRef.current.delete(id);
50849
- }
50850
- content.onDismiss?.();
50851
- if (content.sourceTrait) {
50852
- unindexTrait(content.sourceTrait);
50853
- notifyTraitSubscribers(content.sourceTrait, null);
50854
- }
50855
- const nextSources = { ...slotSources };
50856
- delete nextSources[matchKey];
50857
- notifySubscribers(slot, aggregateSlot(nextSources));
50858
- return { ...prev, [slot]: nextSources };
50859
- }
50860
- return prev;
50861
- });
50862
- },
50863
- [notifySubscribers, notifyTraitSubscribers, unindexTrait]
50864
- );
50865
- const clearAll = useCallback(() => {
50866
- timersRef.current.forEach((timer) => clearTimeout(timer));
50867
- timersRef.current.clear();
50868
- setSources((prev) => {
50869
- for (const slot of ALL_SLOTS2) {
50870
- const slotSources = prev[slot];
50871
- if (!slotSources) continue;
50872
- for (const content of Object.values(slotSources)) {
50873
- content.onDismiss?.();
50874
- if (content.sourceTrait) {
50875
- notifyTraitSubscribers(content.sourceTrait, null);
50876
- }
50877
- }
50878
- notifySubscribers(slot, null);
50879
- }
50880
- return DEFAULT_SOURCES;
50881
- });
50882
- traitIndexRef.current.clear();
50883
- }, [notifySubscribers, notifyTraitSubscribers]);
50884
- const subscribe2 = useCallback((callback) => {
50885
- subscribersRef.current.add(callback);
50886
- return () => {
50887
- subscribersRef.current.delete(callback);
50888
- };
50889
- }, []);
50890
- const hasContent = useCallback(
50891
- (slot) => slots[slot] !== null,
50892
- [slots]
50893
- );
50894
- const getContent = useCallback(
50895
- (slot) => slots[slot],
50896
- [slots]
50897
- );
50898
- const getTraitContent = useCallback(
50899
- (traitName) => traitIndexRef.current.get(traitName) ?? null,
50900
- []
50901
- );
50902
- const subscribeTrait = useCallback(
50903
- (traitName, callback) => {
50904
- let set = traitSubscribersRef.current.get(traitName);
50905
- if (!set) {
50906
- set = /* @__PURE__ */ new Set();
50907
- traitSubscribersRef.current.set(traitName, set);
50908
- }
50909
- set.add(callback);
50910
- return () => {
50911
- const s = traitSubscribersRef.current.get(traitName);
50912
- if (!s) return;
50913
- s.delete(callback);
50914
- if (s.size === 0) {
50915
- traitSubscribersRef.current.delete(traitName);
50916
- }
50917
- };
50918
- },
50919
- []
50920
- );
50921
- const updateTraitContent = useCallback(
50922
- (traitName, content) => {
50923
- const id = generateId();
50924
- const fullContent = { ...content, id, sourceTrait: traitName };
50925
- indexTraitRender(traitName, fullContent);
50926
- notifyTraitSubscribers(traitName, fullContent);
50927
- return id;
50928
- },
50929
- [indexTraitRender, notifyTraitSubscribers]
50930
- );
50931
- return {
50932
- slots,
50933
- render,
50934
- clear,
50935
- clearBySource,
50936
- clearById,
50937
- clearAll,
50938
- subscribe: subscribe2,
50939
- hasContent,
50940
- getContent,
50941
- getTraitContent,
50942
- subscribeTrait,
50943
- updateTraitContent
50944
- };
50945
- }
50946
-
50947
- // hooks/useUIEvents.ts
50948
- init_useEventBus();
50949
- var UI_PREFIX = "UI:";
50950
- function useUIEvents(dispatch, traitName, validEvents, eventBusInstance) {
50951
- const defaultEventBus = useEventBus();
50952
- const eventBus = eventBusInstance ?? defaultEventBus;
50953
- const validEventsKey = validEvents.slice().sort().join(",");
50954
- const stableValidEvents = useMemo(
50955
- () => validEvents,
50956
- [validEventsKey]
50957
- // intentional — validEventsKey is the stable dep
50958
- );
50959
- useEffect(() => {
50960
- const unsubscribes = [];
50961
- for (const smEvent of stableValidEvents) {
50962
- const handler = (event) => {
50963
- if (event.source && event.source.dispatched) {
50964
- return;
50965
- }
50966
- dispatch(smEvent, event.payload);
50967
- };
50968
- unsubscribes.push(
50969
- eventBus.on(`${UI_PREFIX}${traitName}.${smEvent}`, handler)
50970
- );
50971
- }
50972
- return () => {
50973
- for (const unsub of unsubscribes) {
50974
- if (typeof unsub === "function") unsub();
50975
- }
50976
- };
50977
- }, [eventBus, dispatch, traitName, stableValidEvents]);
50978
- }
50979
- function useTraitListens(dispatch, listens, eventBusInstance) {
50980
- const defaultEventBus = useEventBus();
50981
- const eventBus = eventBusInstance ?? defaultEventBus;
50982
- const stableKey = listens.map((l) => `${l.sourceKey}->${l.trigger}`).sort().join("|");
50983
- const stableListens = useMemo(
50984
- () => listens,
50985
- [stableKey]
50986
- // intentional
50987
- );
50988
- useEffect(() => {
50989
- const unsubscribes = [];
50990
- for (const spec of stableListens) {
50991
- const handler = (event) => {
50992
- dispatch(spec.trigger, event.payload);
50993
- };
50994
- unsubscribes.push(eventBus.on(`${UI_PREFIX}${spec.sourceKey}`, handler));
50995
- }
50996
- return () => {
50997
- for (const unsub of unsubscribes) {
50998
- if (typeof unsub === "function") unsub();
50999
- }
51000
- };
51001
- }, [eventBus, dispatch, stableListens]);
51002
- }
51003
-
51004
- // hooks/index.ts
51005
- init_useQuerySingleton();
51006
-
51007
- // stores/entityStore.ts
51008
- var entities = /* @__PURE__ */ new Map();
51009
- var listeners7 = /* @__PURE__ */ new Set();
51010
- var idCounter2 = 0;
51011
- function subscribe(listener) {
51012
- listeners7.add(listener);
51013
- return () => listeners7.delete(listener);
51014
- }
51015
- function notify() {
51016
- listeners7.forEach((listener) => listener());
51017
- }
51018
- function getEntity(id) {
51019
- return entities.get(id);
51020
- }
51021
- function getByType(type) {
51022
- const types = Array.isArray(type) ? type : [type];
51023
- return [...entities.values()].filter((e) => types.includes(e.type));
51024
- }
51025
- function getAllEntities() {
51026
- return [...entities.values()];
51027
- }
51028
- function getSingleton(type) {
51029
- return [...entities.values()].find((e) => e.type === type);
51030
- }
51031
- function spawnEntity(config) {
51032
- const id = config.id ?? `entity_${++idCounter2}`;
51033
- const entity = { ...config, id };
51034
- entities = new Map(entities);
51035
- entities.set(id, entity);
51036
- notify();
51037
- return id;
51038
- }
51039
- function updateEntity(id, updates) {
51040
- const entity = entities.get(id);
51041
- if (entity) {
51042
- entities = new Map(entities);
51043
- entities.set(id, { ...entity, ...updates });
51044
- notify();
51045
- }
51046
- }
51047
- function updateSingleton(type, updates) {
51048
- const entity = getSingleton(type);
51049
- if (entity) {
51050
- updateEntity(entity.id, updates);
51051
- }
51052
- }
51053
- function removeEntity(id) {
51054
- if (entities.has(id)) {
51055
- entities = new Map(entities);
51056
- entities.delete(id);
51057
- notify();
51058
- }
51059
- }
51060
- function clearEntities() {
51061
- entities = /* @__PURE__ */ new Map();
51062
- notify();
51063
- }
51064
- function getSnapshot2() {
51065
- return entities;
51066
- }
51067
-
51068
- // hooks/useEntities.ts
51069
- function useEntities() {
51070
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51071
- return {
51072
- entities: entities2,
51073
- getEntity,
51074
- getByType,
51075
- getAllEntities,
51076
- getSingleton,
51077
- spawnEntity,
51078
- updateEntity,
51079
- updateSingleton,
51080
- removeEntity,
51081
- clearEntities
51082
- };
51083
- }
51084
- function useEntity(id) {
51085
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51086
- return entities2.get(id);
51087
- }
51088
- function useEntitiesByType(type) {
51089
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51090
- return [...entities2.values()].filter((e) => e.type === type);
51091
- }
51092
- function useSingletonEntity(type) {
51093
- const entities2 = useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
51094
- return [...entities2.values()].find((e) => e.type === type);
51095
- }
51096
- function usePlayer() {
51097
- const player = useSingletonEntity("Player");
51098
- const update = useCallback((updates) => {
51099
- if (player) updateEntity(player.id, updates);
51100
- }, [player?.id]);
51101
- return { player, updatePlayer: update };
51102
- }
51103
- function usePhysics() {
51104
- const physics = useSingletonEntity("Physics");
51105
- const update = useCallback((updates) => {
51106
- if (physics) updateEntity(physics.id, updates);
51107
- }, [physics?.id]);
51108
- return { physics, updatePhysics: update };
51109
- }
51110
- function useInput() {
51111
- const input = useSingletonEntity("Input");
51112
- const update = useCallback((updates) => {
51113
- if (input) updateEntity(input.id, updates);
51114
- }, [input?.id]);
51115
- return { input, updateInput: update };
51116
- }
51117
-
51118
- // hooks/index.ts
51119
- init_useTranslate();
51120
- init_useAuthContext();
51121
- init_useSwipeGesture();
51122
- init_useLongPress();
51123
- init_useDragReorder();
51124
- init_useInfiniteScroll();
51125
- init_usePullToRefresh();
51126
- function getDistance(touches) {
51127
- const dx = touches[0].clientX - touches[1].clientX;
51128
- const dy = touches[0].clientY - touches[1].clientY;
51129
- return Math.sqrt(dx * dx + dy * dy);
51130
- }
51131
- function usePinchZoom(options = {}) {
51132
- const { minScale = 0.5, maxScale = 4 } = options;
51133
- const [scale, setScale] = useState(1);
51134
- const [isPinching, setIsPinching] = useState(false);
51135
- const initialDistance = useRef(0);
51136
- const initialScale = useRef(1);
51137
- const onTouchStart = useCallback((e) => {
51138
- if (e.touches.length === 2) {
51139
- initialDistance.current = getDistance(e.touches);
51140
- initialScale.current = scale;
51141
- setIsPinching(true);
51142
- }
51143
- }, [scale]);
51144
- const onTouchMove = useCallback((e) => {
51145
- if (e.touches.length !== 2 || !isPinching) return;
51146
- e.preventDefault();
51147
- const currentDistance = getDistance(e.touches);
51148
- const ratio = currentDistance / initialDistance.current;
51149
- const newScale = Math.min(maxScale, Math.max(minScale, initialScale.current * ratio));
51150
- setScale(newScale);
51151
- }, [isPinching, minScale, maxScale]);
51152
- const onTouchEnd = useCallback(() => {
51153
- setIsPinching(false);
51154
- }, []);
51155
- const resetZoom = useCallback(() => {
51156
- setScale(1);
51157
- }, []);
51158
- return {
51159
- scale,
51160
- isPinching,
51161
- gestureProps: {
51162
- onTouchStart,
51163
- onTouchMove,
51164
- onTouchEnd
51165
- },
51166
- resetZoom
51167
- };
51168
- }
51169
-
51170
- // hooks/useDraggable.ts
51171
- init_useEventBus();
51172
- var ALMADAR_DND_MIME = "application/x-almadar-dnd";
51173
- function useDraggable({ payload, disabled = false }) {
51174
- const [isDragging, setIsDragging] = useState(false);
51175
- const eventBus = useEventBus();
51176
- const handleDragStart = useCallback(
51177
- (e) => {
51178
- if (disabled) {
51179
- e.preventDefault();
51180
- return;
51181
- }
51182
- e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
51183
- e.dataTransfer.effectAllowed = "copy";
51184
- setIsDragging(true);
51185
- eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
51186
- },
51187
- [disabled, payload, eventBus]
51188
- );
51189
- const handleDragEnd = useCallback(
51190
- (e) => {
51191
- setIsDragging(false);
51192
- eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
51193
- },
51194
- [payload, eventBus]
51195
- );
51196
- const dragProps = useMemo(
51197
- () => ({
51198
- draggable: !disabled,
51199
- onDragStart: handleDragStart,
51200
- onDragEnd: handleDragEnd,
51201
- "aria-grabbed": isDragging
51202
- }),
51203
- [disabled, handleDragStart, handleDragEnd, isDragging]
51204
- );
51205
- return { dragProps, isDragging };
51206
- }
51207
-
51208
- // hooks/useDropZone.ts
51209
- init_useEventBus();
51210
- function parsePayload(e) {
51211
- try {
51212
- const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
51213
- if (!raw) return null;
51214
- const parsed = JSON.parse(raw);
51215
- if (typeof parsed.kind !== "string" || !parsed.data) return null;
51216
- return parsed;
51217
- } catch {
51218
- return null;
51219
- }
51220
- }
51221
- function hasAlmadarPayload(e) {
51222
- return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
51223
- }
51224
- function useDropZone({ accepts, onDrop, disabled = false }) {
51225
- const [isOver, setIsOver] = useState(false);
51226
- const eventBus = useEventBus();
51227
- const handleDragOver = useCallback(
51228
- (e) => {
51229
- if (disabled) return;
51230
- if (!hasAlmadarPayload(e)) return;
51231
- e.preventDefault();
51232
- e.dataTransfer.dropEffect = "copy";
51233
- setIsOver(true);
51234
- },
51235
- [disabled]
51236
- );
51237
- const handleDragLeave = useCallback(
51238
- (e) => {
51239
- setIsOver(false);
51240
- },
51241
- []
51242
- );
51243
- const handleDrop = useCallback(
51244
- (e) => {
51245
- e.preventDefault();
51246
- setIsOver(false);
51247
- if (disabled) return;
51248
- const payload = parsePayload(e);
51249
- if (!payload) return;
51250
- if (!accepts.includes(payload.kind)) return;
51251
- const position = { x: e.clientX, y: e.clientY };
51252
- onDrop(payload, position);
51253
- eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
51254
- },
51255
- [disabled, accepts, onDrop, eventBus]
51256
- );
51257
- const dropProps = useMemo(
51258
- () => ({
51259
- onDragOver: handleDragOver,
51260
- onDragLeave: handleDragLeave,
51261
- onDrop: handleDrop
51262
- }),
51263
- [handleDragOver, handleDragLeave, handleDrop]
51264
- );
51265
- return { dropProps, isOver };
51266
- }
51267
- var API_BASE = typeof process !== "undefined" && process.env?.VITE_API_URL ? process.env.VITE_API_URL : "http://localhost:3000";
51268
- function getUserId() {
51269
- return localStorage.getItem("userId") || "anonymous";
51270
- }
51271
- async function fetchWithAuth(endpoint, options) {
51272
- const userId = getUserId();
51273
- const response = await fetch(`${API_BASE}${endpoint}`, {
51274
- ...options,
51275
- headers: {
51276
- "Content-Type": "application/json",
51277
- "x-user-id": userId,
51278
- ...options?.headers
51279
- }
51280
- });
51281
- if (!response.ok) {
51282
- const error = await response.json().catch(() => ({ error: response.statusText }));
51283
- throw new Error(error.error || error.message || "Request failed");
51284
- }
51285
- return response.json();
51286
- }
51287
- function useGitHubStatus() {
51288
- return useQuery({
51289
- queryKey: ["github", "status"],
51290
- queryFn: () => fetchWithAuth("/api/github/status"),
51291
- staleTime: 6e4,
51292
- // 1 minute
51293
- retry: false
51294
- });
51295
- }
51296
- function useConnectGitHub() {
51297
- const connectGitHub = useCallback(() => {
51298
- const userId = getUserId();
51299
- const state = btoa(JSON.stringify({ userId, returnUrl: window.location.href }));
51300
- window.location.href = `${API_BASE}/api/github/oauth/authorize?state=${state}`;
51301
- }, []);
51302
- return { connectGitHub };
51303
- }
51304
- function useDisconnectGitHub() {
51305
- const queryClient = useQueryClient();
51306
- return useMutation({
51307
- mutationFn: () => fetchWithAuth("/api/github/disconnect", { method: "POST" }),
51308
- onSuccess: () => {
51309
- queryClient.invalidateQueries({ queryKey: ["github", "status"] });
51310
- queryClient.removeQueries({ queryKey: ["github", "repos"] });
51311
- }
51312
- });
51313
- }
51314
- function useGitHubRepos(page = 1, perPage = 30) {
51315
- return useQuery({
51316
- queryKey: ["github", "repos", page, perPage],
51317
- queryFn: () => fetchWithAuth(`/api/github/repos?page=${page}&per_page=${perPage}`),
51318
- enabled: true,
51319
- // Only fetch if user is connected
51320
- staleTime: 3e5
51321
- // 5 minutes
51322
- });
51323
- }
51324
- function useGitHubRepo(owner, repo, enabled = true) {
51325
- return useQuery({
51326
- queryKey: ["github", "repo", owner, repo],
51327
- queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}`),
51328
- enabled: enabled && !!owner && !!repo,
51329
- staleTime: 3e5
51330
- // 5 minutes
51331
- });
51332
- }
51333
- function useGitHubBranches(owner, repo, enabled = true) {
51334
- return useQuery({
51335
- queryKey: ["github", "branches", owner, repo],
51336
- queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}/branches`),
51337
- enabled: enabled && !!owner && !!repo,
51338
- staleTime: 6e4
51339
- // 1 minute
51340
- });
51341
- }
51342
49082
 
51343
- 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 };