@almadar/ui 5.21.10 → 5.21.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +156 -792
- package/dist/avl/index.js +4 -640
- package/dist/components/game/organisms/three/index.cjs +2 -489
- package/dist/components/game/organisms/three/index.js +1 -488
- package/dist/components/index.cjs +172 -2481
- package/dist/components/index.js +27 -2289
- package/dist/providers/index.cjs +141 -761
- package/dist/providers/index.js +1 -621
- package/dist/runtime/index.cjs +580 -1203
- package/dist/runtime/index.js +441 -1064
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ var LucideIcons2 = require('lucide-react');
|
|
|
10
10
|
var PhosphorIcons = require('@phosphor-icons/react');
|
|
11
11
|
var TablerIcons = require('@tabler/icons-react');
|
|
12
12
|
var FaIcons = require('react-icons/fa');
|
|
13
|
+
var hooks = require('@almadar/ui/hooks');
|
|
13
14
|
var evaluator = require('@almadar/evaluator');
|
|
14
15
|
var reactDom = require('react-dom');
|
|
15
16
|
var reactRouterDom = require('react-router-dom');
|
|
@@ -45,7 +46,6 @@ var react = require('@xyflow/react');
|
|
|
45
46
|
var context = require('@almadar/ui/context');
|
|
46
47
|
var patterns = require('@almadar/patterns');
|
|
47
48
|
var fiber = require('@react-three/fiber');
|
|
48
|
-
var reactQuery = require('@tanstack/react-query');
|
|
49
49
|
|
|
50
50
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
51
51
|
|
|
@@ -1159,11 +1159,11 @@ function ensureObserver() {
|
|
|
1159
1159
|
});
|
|
1160
1160
|
cachedFamily = getCurrentIconFamily();
|
|
1161
1161
|
}
|
|
1162
|
-
function subscribeIconFamily(
|
|
1162
|
+
function subscribeIconFamily(notify) {
|
|
1163
1163
|
ensureObserver();
|
|
1164
|
-
listeners.add(
|
|
1164
|
+
listeners.add(notify);
|
|
1165
1165
|
return () => {
|
|
1166
|
-
listeners.delete(
|
|
1166
|
+
listeners.delete(notify);
|
|
1167
1167
|
};
|
|
1168
1168
|
}
|
|
1169
1169
|
function getIconFamilySnapshot() {
|
|
@@ -2079,521 +2079,11 @@ var init_Button = __esm({
|
|
|
2079
2079
|
exports.Button.displayName = "Button";
|
|
2080
2080
|
}
|
|
2081
2081
|
});
|
|
2082
|
-
|
|
2083
|
-
// locales/en.json
|
|
2084
|
-
var en_default;
|
|
2085
|
-
var init_en = __esm({
|
|
2086
|
-
"locales/en.json"() {
|
|
2087
|
-
en_default = {
|
|
2088
|
-
$meta: {
|
|
2089
|
-
locale: "en",
|
|
2090
|
-
direction: "ltr"
|
|
2091
|
-
},
|
|
2092
|
-
"common.save": "Save",
|
|
2093
|
-
"common.cancel": "Cancel",
|
|
2094
|
-
"common.delete": "Delete",
|
|
2095
|
-
"common.close": "Close",
|
|
2096
|
-
"common.confirm": "Are you sure?",
|
|
2097
|
-
"common.create": "Create",
|
|
2098
|
-
"common.edit": "Edit",
|
|
2099
|
-
"common.view": "View",
|
|
2100
|
-
"common.add": "Add",
|
|
2101
|
-
"common.remove": "Remove",
|
|
2102
|
-
"common.search": "Search...",
|
|
2103
|
-
"common.filter": "Filter",
|
|
2104
|
-
"common.actions": "Actions",
|
|
2105
|
-
"common.yes": "Yes",
|
|
2106
|
-
"common.no": "No",
|
|
2107
|
-
"common.selected": "selected",
|
|
2108
|
-
"common.ok": "OK",
|
|
2109
|
-
"common.done": "Done",
|
|
2110
|
-
"common.apply": "Apply",
|
|
2111
|
-
"common.reset": "Reset",
|
|
2112
|
-
"common.refresh": "Refresh",
|
|
2113
|
-
"common.export": "Export",
|
|
2114
|
-
"common.import": "Import",
|
|
2115
|
-
"common.copy": "Copy",
|
|
2116
|
-
"common.settings": "Settings",
|
|
2117
|
-
"nav.previous": "Previous",
|
|
2118
|
-
"nav.next": "Next",
|
|
2119
|
-
"nav.back": "Back",
|
|
2120
|
-
"nav.home": "Home",
|
|
2121
|
-
"form.submit": "Submit",
|
|
2122
|
-
"form.saving": "Saving...",
|
|
2123
|
-
"form.required": "This field is required",
|
|
2124
|
-
"form.invalidEmail": "Enter a valid email address",
|
|
2125
|
-
"form.selectPlaceholder": "Select {{label}}...",
|
|
2126
|
-
"form.searchPlaceholder": "Search {{entity}}...",
|
|
2127
|
-
"table.empty.title": "No items found",
|
|
2128
|
-
"table.empty.description": "No items to display.",
|
|
2129
|
-
"table.search.placeholder": "Search...",
|
|
2130
|
-
"table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
|
|
2131
|
-
"table.pagination.page": "Page {{page}} of {{totalPages}}",
|
|
2132
|
-
"table.bulk.selected": "{{count}} selected",
|
|
2133
|
-
"table.loading": "Loading...",
|
|
2134
|
-
"status.loading": "Loading...",
|
|
2135
|
-
"status.scheduled": "Scheduled",
|
|
2136
|
-
"status.inProgress": "In Progress",
|
|
2137
|
-
"status.completed": "Completed",
|
|
2138
|
-
"status.cancelled": "Cancelled",
|
|
2139
|
-
"status.pending": "Pending",
|
|
2140
|
-
"status.active": "Active",
|
|
2141
|
-
"status.inactive": "Inactive",
|
|
2142
|
-
"status.draft": "Draft",
|
|
2143
|
-
"status.archived": "Archived",
|
|
2144
|
-
"error.generic": "Something went wrong",
|
|
2145
|
-
"error.retry": "Try again",
|
|
2146
|
-
"error.notFound": "Not found",
|
|
2147
|
-
"error.loadFailed": "Failed to load: {{message}}",
|
|
2148
|
-
"error.configMissing": "Configuration not found for: {{id}}",
|
|
2149
|
-
"common.loading": "Loading...",
|
|
2150
|
-
"common.showMore": "Show More",
|
|
2151
|
-
"common.showLess": "Show Less",
|
|
2152
|
-
"common.noResults": "No results found",
|
|
2153
|
-
"common.saveChanges": "Save Changes",
|
|
2154
|
-
"common.retry": "Retry",
|
|
2155
|
-
"common.open": "Open",
|
|
2156
|
-
"common.back": "Back",
|
|
2157
|
-
"empty.noItems": "No items",
|
|
2158
|
-
"empty.noData": "No data available",
|
|
2159
|
-
"empty.noItemsYet": "No items yet",
|
|
2160
|
-
"empty.noItemsAdded": "No items added yet",
|
|
2161
|
-
"empty.noOptionsFound": "No options found",
|
|
2162
|
-
"list.addItemPlaceholder": "Add new item...",
|
|
2163
|
-
"error.occurred": "An error occurred",
|
|
2164
|
-
"error.failedToLoad": "Failed to load data",
|
|
2165
|
-
"wizard.back": "Back",
|
|
2166
|
-
"wizard.next": "Next",
|
|
2167
|
-
"wizard.complete": "Complete",
|
|
2168
|
-
"wizard.stepOf": "Step {{current}} of {{total}}",
|
|
2169
|
-
"pagination.previous": "Previous",
|
|
2170
|
-
"pagination.next": "Next",
|
|
2171
|
-
"pagination.total": "Total:",
|
|
2172
|
-
"pagination.show": "Show:",
|
|
2173
|
-
"pagination.goTo": "Go to:",
|
|
2174
|
-
"pagination.go": "Go",
|
|
2175
|
-
"auth.signIn": "Sign in",
|
|
2176
|
-
"auth.signOut": "Sign out",
|
|
2177
|
-
"dialog.confirm": "Confirm",
|
|
2178
|
-
"dialog.cancel": "Cancel",
|
|
2179
|
-
"dialog.loading": "Loading...",
|
|
2180
|
-
"dialog.delete.title": "Delete {{item}}?",
|
|
2181
|
-
"dialog.delete.message": "This action cannot be undone.",
|
|
2182
|
-
"trait.availableActions": "Available Actions",
|
|
2183
|
-
"trait.transitions": "Transitions",
|
|
2184
|
-
"trait.availableNow": "Available now",
|
|
2185
|
-
"book.startReading": "Start Reading",
|
|
2186
|
-
"book.tableOfContents": "Table of Contents",
|
|
2187
|
-
"book.partNumber": "Part {{number}}",
|
|
2188
|
-
"book.print": "Print",
|
|
2189
|
-
"book.previousPage": "Previous page",
|
|
2190
|
-
"book.nextPage": "Next page",
|
|
2191
|
-
"quiz.showAnswer": "Show answer",
|
|
2192
|
-
"quiz.hideAnswer": "Hide answer",
|
|
2193
|
-
"aria.closeModal": "Close modal",
|
|
2194
|
-
"aria.closeToast": "Dismiss toast",
|
|
2195
|
-
"aria.closeAlert": "Dismiss alert",
|
|
2196
|
-
"aria.removeFilter": "Remove filter",
|
|
2197
|
-
"aria.closeDrawer": "Close drawer",
|
|
2198
|
-
"aria.closePanel": "Close panel",
|
|
2199
|
-
"aria.previousImage": "Previous image",
|
|
2200
|
-
"aria.nextImage": "Next image",
|
|
2201
|
-
"aria.dismiss": "Dismiss",
|
|
2202
|
-
"aria.previousSlide": "Previous slide",
|
|
2203
|
-
"aria.nextSlide": "Next slide",
|
|
2204
|
-
"aria.previousDays": "Previous days",
|
|
2205
|
-
"aria.nextDays": "Next days",
|
|
2206
|
-
"aria.decrease": "Decrease",
|
|
2207
|
-
"aria.increase": "Increase",
|
|
2208
|
-
"aria.breadcrumb": "Breadcrumb",
|
|
2209
|
-
"aria.tableOfContents": "Table of contents",
|
|
2210
|
-
"aria.docsSidebar": "Documentation sidebar",
|
|
2211
|
-
"aria.selectAllRows": "Select all rows",
|
|
2212
|
-
"aria.selectAll": "Select all",
|
|
2213
|
-
"aria.upvote": "Upvote",
|
|
2214
|
-
"aria.downvote": "Downvote",
|
|
2215
|
-
"aria.qrScanner": "QR scanner",
|
|
2216
|
-
"aria.mockScanDev": "Mock scan (dev)",
|
|
2217
|
-
"aria.openMenu": "Open menu",
|
|
2218
|
-
"aria.closeMenu": "Close menu",
|
|
2219
|
-
"aria.openSidebar": "Open sidebar",
|
|
2220
|
-
"sidebar.expand": "Expand sidebar",
|
|
2221
|
-
"sidebar.collapse": "Collapse sidebar",
|
|
2222
|
-
"sidebar.close": "Close sidebar",
|
|
2223
|
-
"loading.items": "Loading items...",
|
|
2224
|
-
"card.imageAlt": "Image",
|
|
2225
|
-
"canvas.emptyMessage": "No content",
|
|
2226
|
-
"canvas.errorTitle": "Canvas error",
|
|
2227
|
-
"book.noData": "No data",
|
|
2228
|
-
"common.notifications": "Notifications",
|
|
2229
|
-
"common.remaining": "{{count}} remaining",
|
|
2230
|
-
"error.somethingWentWrong": "Something went wrong",
|
|
2231
|
-
"error.loadingItems": "Loading items...",
|
|
2232
|
-
"error.noItemsFound": "No items found",
|
|
2233
|
-
"debug.noEntityData": "No entity data",
|
|
2234
|
-
"debug.noEntities": "No entities",
|
|
2235
|
-
"debug.noTicks": "No ticks registered",
|
|
2236
|
-
"debug.noActiveTraits": "No active traits",
|
|
2237
|
-
"debug.noGuardEvaluations": "No guard evaluations",
|
|
2238
|
-
"debug.noBridgeData": "No bridge data",
|
|
2239
|
-
"debug.status": "Status",
|
|
2240
|
-
"debug.eventsForwarded": "Events Forwarded (Client \u2192 Server)",
|
|
2241
|
-
"debug.eventsReceived": "Events Received (Server \u2192 Client)",
|
|
2242
|
-
"debug.lastHeartbeat": "Last Heartbeat",
|
|
2243
|
-
"debug.noEventsYet": "No events yet",
|
|
2244
|
-
"debug.noTransitionsRecorded": "No transitions recorded",
|
|
2245
|
-
"debug.noVerificationChecks": "No verification checks yet",
|
|
2246
|
-
"display.chartError": "Chart error",
|
|
2247
|
-
"display.codeViewerError": "Code viewer error",
|
|
2248
|
-
"display.noCode": "No code",
|
|
2249
|
-
"display.documentError": "Document error",
|
|
2250
|
-
"display.noDocument": "No document",
|
|
2251
|
-
"display.graphError": "Graph error",
|
|
2252
|
-
"display.noGraphData": "No graph data",
|
|
2253
|
-
"display.galleryError": "Gallery error",
|
|
2254
|
-
"display.noMedia": "No media",
|
|
2255
|
-
"display.meterError": "Meter error",
|
|
2256
|
-
"display.signaturePadError": "Signature pad error",
|
|
2257
|
-
"display.timelineError": "Timeline error",
|
|
2258
|
-
"display.noEvents": "No events",
|
|
2259
|
-
"template.features": "Features",
|
|
2260
|
-
"template.howItWorks": "How It Works",
|
|
2261
|
-
"template.showcase": "Showcase",
|
|
2262
|
-
"template.faq": "Frequently Asked Questions",
|
|
2263
|
-
"template.ourTeam": "Our Team",
|
|
2264
|
-
"template.caseStudies": "Case Studies",
|
|
2265
|
-
"richBlockEditor.toolbar.text": "Text",
|
|
2266
|
-
"richBlockEditor.toolbar.h1": "H1",
|
|
2267
|
-
"richBlockEditor.toolbar.h2": "H2",
|
|
2268
|
-
"richBlockEditor.toolbar.h3": "H3",
|
|
2269
|
-
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
2270
|
-
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
2271
|
-
"richBlockEditor.toolbar.quote": "Quote",
|
|
2272
|
-
"richBlockEditor.toolbar.code": "Code",
|
|
2273
|
-
"richBlockEditor.toolbar.divider": "Divider",
|
|
2274
|
-
"richBlockEditor.toolbar.image": "Image",
|
|
2275
|
-
"richBlockEditor.blockType.paragraph": "Text",
|
|
2276
|
-
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
2277
|
-
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
2278
|
-
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
2279
|
-
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
2280
|
-
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
2281
|
-
"richBlockEditor.blockType.quote": "Quote",
|
|
2282
|
-
"richBlockEditor.blockType.code": "Code",
|
|
2283
|
-
"richBlockEditor.blockType.divider": "Divider",
|
|
2284
|
-
"richBlockEditor.blockType.image": "Image",
|
|
2285
|
-
"richBlockEditor.blockActions": "Block actions",
|
|
2286
|
-
"richBlockEditor.duplicate": "Duplicate",
|
|
2287
|
-
"richBlockEditor.turnInto": "Turn into",
|
|
2288
|
-
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
2289
|
-
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
2290
|
-
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
2291
|
-
"richBlockEditor.placeholder.quote": "Quote",
|
|
2292
|
-
"richBlockEditor.placeholder.code": "Enter code",
|
|
2293
|
-
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
2294
|
-
"richBlockEditor.placeholder.listItem": "List item",
|
|
2295
|
-
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
2296
|
-
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
2297
|
-
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
2298
|
-
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
2299
|
-
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
2300
|
-
"richBlockEditor.aria.codeBlock": "Code block",
|
|
2301
|
-
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
2302
|
-
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
2303
|
-
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
2304
|
-
"richBlockEditor.aria.listItem": "List item",
|
|
2305
|
-
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
2306
|
-
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
2307
|
-
"richBlockEditor.embeddedImage": "Embedded image",
|
|
2308
|
-
"richBlockEditor.noImageUrl": "No image URL set",
|
|
2309
|
-
"richBlockEditor.addItem": "Add item",
|
|
2310
|
-
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
2311
|
-
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
2312
|
-
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
2313
|
-
"versionDiff.compare": "Compare",
|
|
2314
|
-
"versionDiff.to": "to",
|
|
2315
|
-
"versionDiff.beforeRevision": "Before revision",
|
|
2316
|
-
"versionDiff.afterRevision": "After revision",
|
|
2317
|
-
"versionDiff.switchToInline": "Switch to inline view",
|
|
2318
|
-
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
2319
|
-
"versionDiff.revert": "Revert",
|
|
2320
|
-
"versionDiff.byAuthor": " by {{author}}",
|
|
2321
|
-
"violationAlert.actionType.measure": "Corrective Measure",
|
|
2322
|
-
"violationAlert.actionType.admin": "Administrative Action",
|
|
2323
|
-
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
2324
|
-
"violationAlert.fallbackMessage": "Violation",
|
|
2325
|
-
"violationAlert.adminLabel": "Admin:",
|
|
2326
|
-
"violationAlert.penaltyLabel": "Penalty:",
|
|
2327
|
-
"violationAlert.goToField": "Go to field",
|
|
2328
|
-
"branchingLogic.title": "Branching logic",
|
|
2329
|
-
"branchingLogic.if": "If",
|
|
2330
|
-
"branchingLogic.goTo": "go to",
|
|
2331
|
-
"branchingLogic.rules": "Rules",
|
|
2332
|
-
"branchingLogic.logicGraph": "Logic graph",
|
|
2333
|
-
"branchingLogic.addRule": "Add rule",
|
|
2334
|
-
"branchingLogic.deleteRule": "Delete rule",
|
|
2335
|
-
"branchingLogic.endOfSurvey": "End of survey",
|
|
2336
|
-
"branchingLogic.brokenReference": "Broken reference",
|
|
2337
|
-
"branchingLogic.selectQuestion": "Select question",
|
|
2338
|
-
"branchingLogic.selectTarget": "Select target",
|
|
2339
|
-
"branchingLogic.selectValue": "Select value",
|
|
2340
|
-
"branchingLogic.addValue": "Add value",
|
|
2341
|
-
"branchingLogic.value": "Value",
|
|
2342
|
-
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
2343
|
-
"branchingLogic.operatorEquals": "equals",
|
|
2344
|
-
"branchingLogic.operatorNotEquals": "does not equal",
|
|
2345
|
-
"branchingLogic.operatorContains": "contains",
|
|
2346
|
-
"branchingLogic.operatorIn": "is one of",
|
|
2347
|
-
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
2348
|
-
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
2349
|
-
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
2350
|
-
"branchingLogic.brokenCount": "{{count}} broken",
|
|
2351
|
-
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
2352
|
-
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
2353
|
-
"filterGroup.filters": "Filters",
|
|
2354
|
-
"filterGroup.all": "All",
|
|
2355
|
-
"filterGroup.clear": "Clear",
|
|
2356
|
-
"filterGroup.clearAll": "Clear all",
|
|
2357
|
-
"filterGroup.from": "From",
|
|
2358
|
-
"filterGroup.to": "To",
|
|
2359
|
-
"filterGroup.allOf": "All {{label}}",
|
|
2360
|
-
"filterGroup.activeCount": "{{count}} active",
|
|
2361
|
-
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
2362
|
-
"debug.expression": "Expression",
|
|
2363
|
-
"debug.inputs": "Inputs",
|
|
2364
|
-
"debug.trait": "Trait",
|
|
2365
|
-
"debug.filterAll": "All",
|
|
2366
|
-
"debug.filterPassed": "Passed",
|
|
2367
|
-
"debug.filterFailed": "Failed",
|
|
2368
|
-
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
2369
|
-
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
2370
|
-
"debug.activeStates": "Active States",
|
|
2371
|
-
"debug.availableEvents": "Available Events",
|
|
2372
|
-
"debug.noTransitionsFromState": "No transitions from current state",
|
|
2373
|
-
"debug.guarded": "guarded",
|
|
2374
|
-
"debug.otherEvents": "Other Events (not available from current state)",
|
|
2375
|
-
"debug.recentTransitions": "Recent Transitions",
|
|
2376
|
-
"debug.transitionsCount": "{{count}} transitions",
|
|
2377
|
-
"debug.states": "States",
|
|
2378
|
-
"debug.transitions": "Transitions",
|
|
2379
|
-
"debug.guards": "Guards",
|
|
2380
|
-
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
2381
|
-
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
2382
|
-
"debug.singleton": "Singleton",
|
|
2383
|
-
"debug.singletonsCount": "Singletons ({{count}})",
|
|
2384
|
-
"debug.runtimeCount": "Runtime ({{count}})",
|
|
2385
|
-
"debug.moreEntities": "+{{count}} more entities",
|
|
2386
|
-
"debug.persistent": "Persistent",
|
|
2387
|
-
"debug.loadedCount": "{{count}} loaded",
|
|
2388
|
-
"debug.notLoaded": "not loaded",
|
|
2389
|
-
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
2390
|
-
"debug.allCount": "All ({{count}})",
|
|
2391
|
-
"debug.autoScroll": "Auto-scroll",
|
|
2392
|
-
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
2393
|
-
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
2394
|
-
"debug.guardLabel": "guard:",
|
|
2395
|
-
"debug.effectsCount": "{{count}} effects",
|
|
2396
|
-
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
2397
|
-
"debug.never": "Never",
|
|
2398
|
-
"debug.connected": "Connected",
|
|
2399
|
-
"debug.disconnected": "Disconnected",
|
|
2400
|
-
"debug.lastError": "Last Error",
|
|
2401
|
-
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
2402
|
-
"debug.server": "server",
|
|
2403
|
-
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
2404
|
-
"debug.emitLabel": "emit:",
|
|
2405
|
-
"debug.rowsCount": "{{count}} rows",
|
|
2406
|
-
"debug.serverResponse": "server response",
|
|
2407
|
-
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
2408
|
-
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
2409
|
-
"debug.failCount": "{{count}} fail",
|
|
2410
|
-
"debug.ok": "OK",
|
|
2411
|
-
"debug.localCount": "{{count}} local",
|
|
2412
|
-
"debug.serverCount": "{{count}} server",
|
|
2413
|
-
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
2414
|
-
"debug.tabDispatch": "Dispatch",
|
|
2415
|
-
"debug.tabVerify": "Verify",
|
|
2416
|
-
"debug.tabVerifyAlert": "Verify (!)",
|
|
2417
|
-
"debug.tabTimeline": "Timeline",
|
|
2418
|
-
"debug.tabBridge": "Bridge",
|
|
2419
|
-
"debug.tabTraits": "Traits",
|
|
2420
|
-
"debug.tabTicks": "Ticks",
|
|
2421
|
-
"debug.tabEntities": "Entities",
|
|
2422
|
-
"debug.tabEvents": "Events",
|
|
2423
|
-
"debug.tabGuards": "Guards",
|
|
2424
|
-
"debug.debugger": "Debugger",
|
|
2425
|
-
"debug.failedCount": "{{count}} failed",
|
|
2426
|
-
"debug.traitsCount": "{{count}} traits",
|
|
2427
|
-
"debug.idle": "Idle",
|
|
2428
|
-
"debug.openDebugger": "Open Debugger (`)",
|
|
2429
|
-
"debug.kflowVerifier": "KFlow Verifier",
|
|
2430
|
-
"debug.allPassing": "All passing",
|
|
2431
|
-
"debug.runtime": "Runtime",
|
|
2432
|
-
"debug.close": "Close (`)",
|
|
2433
|
-
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
2434
|
-
"replyTree.expandReplies": "Expand replies",
|
|
2435
|
-
"replyTree.collapseReplies": "Collapse replies",
|
|
2436
|
-
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
2437
|
-
"replyTree.replyTo": "Reply to {{author}}",
|
|
2438
|
-
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
2439
|
-
"replyTree.reply": "Reply",
|
|
2440
|
-
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
2441
|
-
"replyTree.flag": "Flag",
|
|
2442
|
-
"replyTree.send": "Send",
|
|
2443
|
-
"replyTree.continueThread": "Continue thread",
|
|
2444
|
-
"replyTree.noRepliesYet": "No replies yet.",
|
|
2445
|
-
"signaturePad.label": "Signature",
|
|
2446
|
-
"signaturePad.helperText": "Draw your signature above",
|
|
2447
|
-
"signaturePad.clear": "Clear",
|
|
2448
|
-
"signaturePad.confirm": "Confirm",
|
|
2449
|
-
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
2450
|
-
"qrScanner.paused": "Paused",
|
|
2451
|
-
"qrScanner.resumeScanning": "Resume scanning",
|
|
2452
|
-
"qrScanner.pauseScanning": "Pause scanning",
|
|
2453
|
-
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
2454
|
-
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
2455
|
-
"qrScanner.mockScan": "Mock Scan",
|
|
2456
|
-
"docSearch.placeholder": "Search documentation...",
|
|
2457
|
-
"stateMachine.loading": "Loading state machine\u2026",
|
|
2458
|
-
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
2459
|
-
"avl.trigger": "Trigger",
|
|
2460
|
-
"avl.guard": "Guard",
|
|
2461
|
-
"avl.effects": "Effects",
|
|
2462
|
-
"avl.props": "Props",
|
|
2463
|
-
"avl.entity": "Entity",
|
|
2464
|
-
"avl.traits": "Traits",
|
|
2465
|
-
"avl.transition": "Transition",
|
|
2466
|
-
"avl.onEntity": "on {{entity}}",
|
|
2467
|
-
"avl.linkedTo": "linked to {{entity}}",
|
|
2468
|
-
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
2469
|
-
"avl.zoomIn": "Zoom in",
|
|
2470
|
-
"avl.zoomOut": "Zoom out",
|
|
2471
|
-
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
2472
|
-
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
2473
|
-
"avl.noTraitData": "No trait data",
|
|
2474
|
-
"avl.computingLayout": "Computing layout...",
|
|
2475
|
-
"avl.noStateMachine": "No state machine",
|
|
2476
|
-
"avl.listensFor": "listens for {{event}}",
|
|
2477
|
-
"avl.emits": "emits {{event}}",
|
|
2478
|
-
"avl.pageLayout": "Page Layout",
|
|
2479
|
-
"avl.overlaySuffix": "(overlay)",
|
|
2480
|
-
"orbPreview.previewBadge": "Preview",
|
|
2481
|
-
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
2482
|
-
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
2483
|
-
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
2484
|
-
"orbPreview.noPreview": "No preview available",
|
|
2485
|
-
"orbPreview.screensCount": "{{count}} screens",
|
|
2486
|
-
"detailView.noTransitionData": "No transition data",
|
|
2487
|
-
"orbInspector.required": "req",
|
|
2488
|
-
"orbInspector.addField": "Add Field",
|
|
2489
|
-
"orbInspector.serviceMode": "Service Mode",
|
|
2490
|
-
"orbInspector.standalone": "Standalone",
|
|
2491
|
-
"orbInspector.embedded": "Embedded",
|
|
2492
|
-
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
2493
|
-
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
2494
|
-
"orbInspector.addEffect": "Add Effect",
|
|
2495
|
-
"orbInspector.guardExpression": "Guard expression",
|
|
2496
|
-
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
2497
|
-
"orbInspector.tokens": "Tokens",
|
|
2498
|
-
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
2499
|
-
"orbInspector.variant": "Variant",
|
|
2500
|
-
"orbInspector.size": "Size",
|
|
2501
|
-
"orbInspector.statesCount": "{{count}} states",
|
|
2502
|
-
"orbInspector.onEntity": " on {{entity}}",
|
|
2503
|
-
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
2504
|
-
"orbInspector.tokenGroup.colors": "Colors",
|
|
2505
|
-
"orbInspector.tokenGroup.radii": "Radii",
|
|
2506
|
-
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
2507
|
-
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
2508
|
-
"orbInspector.tab.inspector": "Inspector",
|
|
2509
|
-
"orbInspector.tab.styles": "Styles",
|
|
2510
|
-
"orbInspector.tab.code": "Code",
|
|
2511
|
-
"canvas.goBackToOverview": "Go back to overview",
|
|
2512
|
-
"canvas.overview": "Overview",
|
|
2513
|
-
"canvas.expanded": "Expanded",
|
|
2514
|
-
"canvas.modulesCount": "{{count}} modules",
|
|
2515
|
-
"canvas.screensCount": "{{count}} screens",
|
|
2516
|
-
"canvas.switchToView": "Switch to {{label}} view",
|
|
2517
|
-
"lawReference.viewFullText": "View full law text",
|
|
2518
|
-
"statCard.defaultLabel": "Stat",
|
|
2519
|
-
"statCard.vsLastPeriod": "vs last period",
|
|
2520
|
-
"mediaGallery.upload": "Upload",
|
|
2521
|
-
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
2522
|
-
"pagination.jumpPlaceholder": "Page",
|
|
2523
|
-
"table.selectRow": "Select row {{id}}",
|
|
2524
|
-
"card.selectItem": "Select {{item}}",
|
|
2525
|
-
"card.itemFallback": "item",
|
|
2526
|
-
"fileTree.noFiles": "No files",
|
|
2527
|
-
"masterDetail.selectItem": "Select an item to view details",
|
|
2528
|
-
"empty.createFirst": "Create your first item to get started.",
|
|
2529
|
-
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
2530
|
-
"upload.dropFilesHere": "Drop files here",
|
|
2531
|
-
"upload.accepted": "Accepted: {{accept}}",
|
|
2532
|
-
"upload.maxSize": "Max size: {{size}}",
|
|
2533
|
-
"upload.maxFiles": "Up to {{count}} files",
|
|
2534
|
-
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
2535
|
-
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
2536
|
-
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
2537
|
-
"optionConstraint.requiredOne": "Required, pick 1",
|
|
2538
|
-
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
2539
|
-
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
2540
|
-
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
2541
|
-
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
2542
|
-
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
2543
|
-
"optionConstraint.optional": "Optional",
|
|
2544
|
-
"optionConstraint.outOfStock": "Out of stock",
|
|
2545
|
-
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
2546
|
-
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
2547
|
-
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
2548
|
-
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
2549
|
-
"stateMachine.pinned": "Pinned",
|
|
2550
|
-
"stateMachine.eventCount": "{{count}} events",
|
|
2551
|
-
"stateMachine.externalEffects": "External Effects",
|
|
2552
|
-
"stateMachine.legend.initial": "Initial",
|
|
2553
|
-
"stateMachine.legend.final": "Final",
|
|
2554
|
-
"stateMachine.legend.state": "State",
|
|
2555
|
-
"stateMachine.legend.multiEvent": "Multi-event",
|
|
2556
|
-
"relationSelect.selectPlaceholder": "Select..."
|
|
2557
|
-
};
|
|
2558
|
-
}
|
|
2559
|
-
});
|
|
2560
|
-
function useTranslate() {
|
|
2561
|
-
return React79.useContext(I18nContext);
|
|
2562
|
-
}
|
|
2563
|
-
function createTranslate(messages) {
|
|
2564
|
-
return (key, params) => {
|
|
2565
|
-
let msg = messages[key] ?? coreLocale[key] ?? key;
|
|
2566
|
-
if (params) {
|
|
2567
|
-
for (const [k, v] of Object.entries(params)) {
|
|
2568
|
-
msg = msg.split(`{{${k}}}`).join(String(v));
|
|
2569
|
-
}
|
|
2570
|
-
}
|
|
2571
|
-
return msg;
|
|
2572
|
-
};
|
|
2573
|
-
}
|
|
2574
|
-
var _meta, coreMessages, coreLocale, I18nContext; exports.I18nProvider = void 0;
|
|
2575
|
-
var init_useTranslate = __esm({
|
|
2576
|
-
"hooks/useTranslate.ts"() {
|
|
2577
|
-
"use client";
|
|
2578
|
-
init_en();
|
|
2579
|
-
({ $meta: _meta, ...coreMessages } = en_default);
|
|
2580
|
-
coreLocale = coreMessages;
|
|
2581
|
-
I18nContext = React79.createContext({
|
|
2582
|
-
locale: "en",
|
|
2583
|
-
direction: "ltr",
|
|
2584
|
-
t: (key) => coreLocale[key] ?? key
|
|
2585
|
-
// core locale fallback
|
|
2586
|
-
});
|
|
2587
|
-
I18nContext.displayName = "I18nContext";
|
|
2588
|
-
exports.I18nProvider = I18nContext.Provider;
|
|
2589
|
-
}
|
|
2590
|
-
});
|
|
2591
2082
|
exports.Input = void 0;
|
|
2592
2083
|
var init_Input = __esm({
|
|
2593
2084
|
"components/core/atoms/Input.tsx"() {
|
|
2594
2085
|
init_cn();
|
|
2595
2086
|
init_Icon();
|
|
2596
|
-
init_useTranslate();
|
|
2597
2087
|
exports.Input = React79__namespace.default.forwardRef(
|
|
2598
2088
|
({
|
|
2599
2089
|
className,
|
|
@@ -2611,7 +2101,7 @@ var init_Input = __esm({
|
|
|
2611
2101
|
onChange,
|
|
2612
2102
|
...props
|
|
2613
2103
|
}, ref) => {
|
|
2614
|
-
const { t } = useTranslate();
|
|
2104
|
+
const { t } = hooks.useTranslate();
|
|
2615
2105
|
const type = inputType || htmlType || "text";
|
|
2616
2106
|
const IconComponent = typeof iconProp === "string" ? resolveIcon(iconProp) : iconProp;
|
|
2617
2107
|
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-icon-default w-icon-default" });
|
|
@@ -3068,7 +2558,6 @@ var init_FilterPill = __esm({
|
|
|
3068
2558
|
"components/core/atoms/FilterPill.tsx"() {
|
|
3069
2559
|
init_cn();
|
|
3070
2560
|
init_useEventBus();
|
|
3071
|
-
init_useTranslate();
|
|
3072
2561
|
init_Icon();
|
|
3073
2562
|
variantStyles4 = {
|
|
3074
2563
|
default: [
|
|
@@ -3124,7 +2613,7 @@ var init_FilterPill = __esm({
|
|
|
3124
2613
|
...props
|
|
3125
2614
|
}, ref) => {
|
|
3126
2615
|
const eventBus = useEventBus();
|
|
3127
|
-
const { t } = useTranslate();
|
|
2616
|
+
const { t } = hooks.useTranslate();
|
|
3128
2617
|
const payloadLabel = typeof children === "string" || typeof children === "number" ? children : label;
|
|
3129
2618
|
const handleClick = React79.useCallback(() => {
|
|
3130
2619
|
onClick?.();
|
|
@@ -5015,7 +4504,6 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5015
4504
|
init_Typography();
|
|
5016
4505
|
init_Divider();
|
|
5017
4506
|
init_cn();
|
|
5018
|
-
init_useTranslate();
|
|
5019
4507
|
positionStyles2 = {
|
|
5020
4508
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
5021
4509
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -5034,7 +4522,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
5034
4522
|
position = "top",
|
|
5035
4523
|
className
|
|
5036
4524
|
}) => {
|
|
5037
|
-
const { t } = useTranslate();
|
|
4525
|
+
const { t } = hooks.useTranslate();
|
|
5038
4526
|
const [isVisible, setIsVisible] = React79__namespace.default.useState(false);
|
|
5039
4527
|
const timeoutRef = React79__namespace.default.useRef(null);
|
|
5040
4528
|
const handleMouseEnter = () => {
|
|
@@ -6798,7 +6286,6 @@ var init_Modal = __esm({
|
|
|
6798
6286
|
init_Overlay();
|
|
6799
6287
|
init_cn();
|
|
6800
6288
|
init_useEventBus();
|
|
6801
|
-
init_useTranslate();
|
|
6802
6289
|
sizeClasses6 = {
|
|
6803
6290
|
sm: "max-w-md",
|
|
6804
6291
|
md: "max-w-2xl",
|
|
@@ -6836,7 +6323,7 @@ var init_Modal = __esm({
|
|
|
6836
6323
|
look = "centered-card"
|
|
6837
6324
|
}) => {
|
|
6838
6325
|
const eventBus = useEventBus();
|
|
6839
|
-
const { t } = useTranslate();
|
|
6326
|
+
const { t } = hooks.useTranslate();
|
|
6840
6327
|
const modalRef = React79.useRef(null);
|
|
6841
6328
|
const previousActiveElement = React79.useRef(null);
|
|
6842
6329
|
const [dragY, setDragY] = React79.useState(0);
|
|
@@ -7020,7 +6507,6 @@ var init_Drawer = __esm({
|
|
|
7020
6507
|
init_Overlay();
|
|
7021
6508
|
init_cn();
|
|
7022
6509
|
init_useEventBus();
|
|
7023
|
-
init_useTranslate();
|
|
7024
6510
|
sizeWidths = {
|
|
7025
6511
|
sm: "w-full sm:w-80",
|
|
7026
6512
|
// 320px
|
|
@@ -7046,7 +6532,7 @@ var init_Drawer = __esm({
|
|
|
7046
6532
|
closeEvent
|
|
7047
6533
|
}) => {
|
|
7048
6534
|
const eventBus = useEventBus();
|
|
7049
|
-
const { t } = useTranslate();
|
|
6535
|
+
const { t } = hooks.useTranslate();
|
|
7050
6536
|
const drawerRef = React79.useRef(null);
|
|
7051
6537
|
const previousActiveElement = React79.useRef(null);
|
|
7052
6538
|
React79.useEffect(() => {
|
|
@@ -7202,7 +6688,6 @@ var init_Toast = __esm({
|
|
|
7202
6688
|
init_Badge();
|
|
7203
6689
|
init_cn();
|
|
7204
6690
|
init_useEventBus();
|
|
7205
|
-
init_useTranslate();
|
|
7206
6691
|
variantClasses = {
|
|
7207
6692
|
success: "bg-card border-[length:var(--border-width)] border-success",
|
|
7208
6693
|
error: "bg-card border-[length:var(--border-width)] border-error",
|
|
@@ -7236,7 +6721,7 @@ var init_Toast = __esm({
|
|
|
7236
6721
|
actionEvent
|
|
7237
6722
|
}) => {
|
|
7238
6723
|
const eventBus = useEventBus();
|
|
7239
|
-
const { t } = useTranslate();
|
|
6724
|
+
const { t } = hooks.useTranslate();
|
|
7240
6725
|
const handleDismiss = () => {
|
|
7241
6726
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
7242
6727
|
onDismiss?.();
|
|
@@ -7329,7 +6814,6 @@ var init_ErrorState = __esm({
|
|
|
7329
6814
|
init_Typography();
|
|
7330
6815
|
init_Icon();
|
|
7331
6816
|
init_useEventBus();
|
|
7332
|
-
init_useTranslate();
|
|
7333
6817
|
exports.ErrorState = ({
|
|
7334
6818
|
title,
|
|
7335
6819
|
message,
|
|
@@ -7339,7 +6823,7 @@ var init_ErrorState = __esm({
|
|
|
7339
6823
|
retryEvent
|
|
7340
6824
|
}) => {
|
|
7341
6825
|
const eventBus = useEventBus();
|
|
7342
|
-
const { t } = useTranslate();
|
|
6826
|
+
const { t } = hooks.useTranslate();
|
|
7343
6827
|
const handleRetry = () => {
|
|
7344
6828
|
if (retryEvent) eventBus.emit(`UI:${retryEvent}`, {});
|
|
7345
6829
|
onRetry?.();
|
|
@@ -7372,9 +6856,8 @@ var init_ErrorBoundary = __esm({
|
|
|
7372
6856
|
"use client";
|
|
7373
6857
|
init_cn();
|
|
7374
6858
|
init_ErrorState();
|
|
7375
|
-
init_useTranslate();
|
|
7376
6859
|
DefaultFallback = ({ error, onRetry }) => {
|
|
7377
|
-
const { t } = useTranslate();
|
|
6860
|
+
const { t } = hooks.useTranslate();
|
|
7378
6861
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7379
6862
|
exports.ErrorState,
|
|
7380
6863
|
{
|
|
@@ -7501,7 +6984,7 @@ function Skeleton({
|
|
|
7501
6984
|
fields,
|
|
7502
6985
|
className
|
|
7503
6986
|
}) {
|
|
7504
|
-
const { t: _t } = useTranslate();
|
|
6987
|
+
const { t: _t } = hooks.useTranslate();
|
|
7505
6988
|
switch (variant) {
|
|
7506
6989
|
case "header":
|
|
7507
6990
|
return /* @__PURE__ */ jsxRuntime.jsx(HeaderSkeleton, { className });
|
|
@@ -7522,7 +7005,6 @@ var init_Skeleton = __esm({
|
|
|
7522
7005
|
"components/core/molecules/Skeleton.tsx"() {
|
|
7523
7006
|
"use client";
|
|
7524
7007
|
init_cn();
|
|
7525
|
-
init_useTranslate();
|
|
7526
7008
|
init_Box();
|
|
7527
7009
|
init_Stack();
|
|
7528
7010
|
init_Stack();
|
|
@@ -8172,7 +7654,6 @@ exports.AboutPageTemplate = void 0;
|
|
|
8172
7654
|
var init_AboutPageTemplate = __esm({
|
|
8173
7655
|
"components/marketing/templates/AboutPageTemplate.tsx"() {
|
|
8174
7656
|
init_cn();
|
|
8175
|
-
init_useTranslate();
|
|
8176
7657
|
init_Stack();
|
|
8177
7658
|
init_Box();
|
|
8178
7659
|
init_Typography();
|
|
@@ -8188,7 +7669,7 @@ var init_AboutPageTemplate = __esm({
|
|
|
8188
7669
|
entity,
|
|
8189
7670
|
className
|
|
8190
7671
|
}) => {
|
|
8191
|
-
const { t } = useTranslate();
|
|
7672
|
+
const { t } = hooks.useTranslate();
|
|
8192
7673
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
8193
7674
|
if (!resolved) return null;
|
|
8194
7675
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -8277,7 +7758,6 @@ var init_Alert = __esm({
|
|
|
8277
7758
|
init_Icon();
|
|
8278
7759
|
init_Typography();
|
|
8279
7760
|
init_useEventBus();
|
|
8280
|
-
init_useTranslate();
|
|
8281
7761
|
variantBorderClasses = {
|
|
8282
7762
|
info: "border-info",
|
|
8283
7763
|
success: "border-success",
|
|
@@ -8309,7 +7789,7 @@ var init_Alert = __esm({
|
|
|
8309
7789
|
dismissEvent
|
|
8310
7790
|
}) => {
|
|
8311
7791
|
const eventBus = useEventBus();
|
|
8312
|
-
const { t } = useTranslate();
|
|
7792
|
+
const { t } = hooks.useTranslate();
|
|
8313
7793
|
const handleDismissCallback = onDismiss || onClose;
|
|
8314
7794
|
const handleDismiss = () => {
|
|
8315
7795
|
if (dismissEvent) eventBus.emit(`UI:${dismissEvent}`, {});
|
|
@@ -8637,7 +8117,6 @@ var init_Menu = __esm({
|
|
|
8637
8117
|
init_Badge();
|
|
8638
8118
|
init_cn();
|
|
8639
8119
|
init_useEventBus();
|
|
8640
|
-
init_useTranslate();
|
|
8641
8120
|
exports.Menu = ({
|
|
8642
8121
|
trigger,
|
|
8643
8122
|
items,
|
|
@@ -8645,7 +8124,7 @@ var init_Menu = __esm({
|
|
|
8645
8124
|
className
|
|
8646
8125
|
}) => {
|
|
8647
8126
|
const eventBus = useEventBus();
|
|
8648
|
-
const { t } = useTranslate();
|
|
8127
|
+
const { t } = hooks.useTranslate();
|
|
8649
8128
|
const [isOpen, setIsOpen] = React79.useState(false);
|
|
8650
8129
|
const [activeSubMenu, setActiveSubMenu] = React79.useState(null);
|
|
8651
8130
|
const [triggerRect, setTriggerRect] = React79.useState(null);
|
|
@@ -8925,7 +8404,6 @@ var init_FloatingActionButton = __esm({
|
|
|
8925
8404
|
init_Typography();
|
|
8926
8405
|
init_cn();
|
|
8927
8406
|
init_useEventBus();
|
|
8928
|
-
init_useTranslate();
|
|
8929
8407
|
exports.FloatingActionButton = ({
|
|
8930
8408
|
action,
|
|
8931
8409
|
actionPayload,
|
|
@@ -8938,7 +8416,7 @@ var init_FloatingActionButton = __esm({
|
|
|
8938
8416
|
className
|
|
8939
8417
|
}) => {
|
|
8940
8418
|
const eventBus = useEventBus();
|
|
8941
|
-
const { t } = useTranslate();
|
|
8419
|
+
const { t } = hooks.useTranslate();
|
|
8942
8420
|
const resolvedAction = icon ? {
|
|
8943
8421
|
icon,
|
|
8944
8422
|
onClick: () => {
|
|
@@ -9107,13 +8585,13 @@ var init_MapView = __esm({
|
|
|
9107
8585
|
shadowSize: [41, 41]
|
|
9108
8586
|
});
|
|
9109
8587
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
9110
|
-
const { useEffect:
|
|
8588
|
+
const { useEffect: useEffect69, useRef: useRef66, useCallback: useCallback113, useState: useState99 } = React79__namespace.default;
|
|
9111
8589
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
9112
8590
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
9113
8591
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
9114
8592
|
const map = useMap();
|
|
9115
|
-
const prevRef =
|
|
9116
|
-
|
|
8593
|
+
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
8594
|
+
useEffect69(() => {
|
|
9117
8595
|
const prev = prevRef.current;
|
|
9118
8596
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
9119
8597
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -9124,7 +8602,7 @@ var init_MapView = __esm({
|
|
|
9124
8602
|
}
|
|
9125
8603
|
function MapClickHandler({ onMapClick }) {
|
|
9126
8604
|
const map = useMap();
|
|
9127
|
-
|
|
8605
|
+
useEffect69(() => {
|
|
9128
8606
|
if (!onMapClick) return;
|
|
9129
8607
|
const handler = (e) => {
|
|
9130
8608
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -9152,8 +8630,8 @@ var init_MapView = __esm({
|
|
|
9152
8630
|
showAttribution = true
|
|
9153
8631
|
}) {
|
|
9154
8632
|
const eventBus = useEventBus2();
|
|
9155
|
-
const [clickedPosition, setClickedPosition] =
|
|
9156
|
-
const handleMapClick =
|
|
8633
|
+
const [clickedPosition, setClickedPosition] = useState99(null);
|
|
8634
|
+
const handleMapClick = useCallback113((lat, lng) => {
|
|
9157
8635
|
if (showClickedPin) {
|
|
9158
8636
|
setClickedPosition({ lat, lng });
|
|
9159
8637
|
}
|
|
@@ -9162,7 +8640,7 @@ var init_MapView = __esm({
|
|
|
9162
8640
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
9163
8641
|
}
|
|
9164
8642
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
9165
|
-
const handleMarkerClick =
|
|
8643
|
+
const handleMarkerClick = useCallback113((marker) => {
|
|
9166
8644
|
onMarkerClick?.(marker);
|
|
9167
8645
|
if (markerClickEvent) {
|
|
9168
8646
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -9989,7 +9467,7 @@ function ActionTile({
|
|
|
9989
9467
|
categoryColors,
|
|
9990
9468
|
className
|
|
9991
9469
|
}) {
|
|
9992
|
-
useTranslate();
|
|
9470
|
+
hooks.useTranslate();
|
|
9993
9471
|
const config = SIZE_CONFIG[size];
|
|
9994
9472
|
const catColor = categoryColors?.[action.category];
|
|
9995
9473
|
const handleDragStart = React79.useCallback((e) => {
|
|
@@ -10028,7 +9506,6 @@ var init_ActionTile = __esm({
|
|
|
10028
9506
|
"components/game/organisms/puzzles/sequencer/ActionTile.tsx"() {
|
|
10029
9507
|
init_atoms2();
|
|
10030
9508
|
init_cn();
|
|
10031
|
-
init_useTranslate();
|
|
10032
9509
|
DRAG_MIME = "application/x-almadar-slot-item";
|
|
10033
9510
|
SIZE_CONFIG = {
|
|
10034
9511
|
sm: { px: "px-2 py-1", icon: "text-lg", text: "text-xs" },
|
|
@@ -10047,7 +9524,7 @@ function ActionPalette({
|
|
|
10047
9524
|
label,
|
|
10048
9525
|
className
|
|
10049
9526
|
}) {
|
|
10050
|
-
const { t } = useTranslate();
|
|
9527
|
+
const { t } = hooks.useTranslate();
|
|
10051
9528
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
10052
9529
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: label ?? t("sequencer.actions") }),
|
|
10053
9530
|
/* @__PURE__ */ jsxRuntime.jsx(exports.HStack, { className: "flex-wrap", gap: "sm", children: (actions ?? []).map((action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10066,7 +9543,6 @@ var init_ActionPalette = __esm({
|
|
|
10066
9543
|
"components/game/organisms/puzzles/sequencer/ActionPalette.tsx"() {
|
|
10067
9544
|
init_atoms2();
|
|
10068
9545
|
init_cn();
|
|
10069
|
-
init_useTranslate();
|
|
10070
9546
|
init_ActionTile();
|
|
10071
9547
|
ActionPalette.displayName = "ActionPalette";
|
|
10072
9548
|
}
|
|
@@ -10076,7 +9552,6 @@ var init_AuthLayout = __esm({
|
|
|
10076
9552
|
"components/core/templates/AuthLayout.tsx"() {
|
|
10077
9553
|
"use client";
|
|
10078
9554
|
init_cn();
|
|
10079
|
-
init_useTranslate();
|
|
10080
9555
|
init_Box();
|
|
10081
9556
|
init_Stack();
|
|
10082
9557
|
init_Typography();
|
|
@@ -10087,7 +9562,7 @@ var init_AuthLayout = __esm({
|
|
|
10087
9562
|
showBranding = true,
|
|
10088
9563
|
brandingContent
|
|
10089
9564
|
}) => {
|
|
10090
|
-
const { t } = useTranslate();
|
|
9565
|
+
const { t } = hooks.useTranslate();
|
|
10091
9566
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "min-h-screen flex", children: [
|
|
10092
9567
|
showBranding && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10093
9568
|
exports.VStack,
|
|
@@ -10221,13 +9696,12 @@ var init_LoadingState = __esm({
|
|
|
10221
9696
|
init_atoms2();
|
|
10222
9697
|
init_Stack();
|
|
10223
9698
|
init_Typography();
|
|
10224
|
-
init_useTranslate();
|
|
10225
9699
|
exports.LoadingState = ({
|
|
10226
9700
|
title,
|
|
10227
9701
|
message,
|
|
10228
9702
|
className
|
|
10229
9703
|
}) => {
|
|
10230
|
-
const { t } = useTranslate();
|
|
9704
|
+
const { t } = hooks.useTranslate();
|
|
10231
9705
|
const displayMessage = message ?? t("common.loading");
|
|
10232
9706
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10233
9707
|
exports.VStack,
|
|
@@ -10607,7 +10081,7 @@ function IsometricCanvas({
|
|
|
10607
10081
|
const unitsProp = Array.isArray(_unitsPropRaw) ? _unitsPropRaw : [];
|
|
10608
10082
|
const featuresProp = Array.isArray(_featuresPropRaw) ? _featuresPropRaw : [];
|
|
10609
10083
|
const eventBus = useEventBus();
|
|
10610
|
-
const { t } = useTranslate();
|
|
10084
|
+
const { t } = hooks.useTranslate();
|
|
10611
10085
|
const canvasRef = React79.useRef(null);
|
|
10612
10086
|
const containerRef = React79.useRef(null);
|
|
10613
10087
|
const minimapRef = React79.useRef(null);
|
|
@@ -11304,7 +10778,6 @@ var init_IsometricCanvas = __esm({
|
|
|
11304
10778
|
"use client";
|
|
11305
10779
|
init_cn();
|
|
11306
10780
|
init_useEventBus();
|
|
11307
|
-
init_useTranslate();
|
|
11308
10781
|
init_Box();
|
|
11309
10782
|
init_Stack();
|
|
11310
10783
|
init_Icon();
|
|
@@ -11364,7 +10837,7 @@ function BattleBoard({
|
|
|
11364
10837
|
const currentTurn = entity.turn;
|
|
11365
10838
|
const gameResult = entity.gameResult;
|
|
11366
10839
|
const eventBus = useEventBus();
|
|
11367
|
-
const { t } = useTranslate();
|
|
10840
|
+
const { t } = hooks.useTranslate();
|
|
11368
10841
|
const [hoveredTile, setHoveredTile] = React79.useState(null);
|
|
11369
10842
|
const [isShaking, setIsShaking] = React79.useState(false);
|
|
11370
10843
|
const selectedUnit = React79.useMemo(
|
|
@@ -11668,7 +11141,6 @@ var init_BattleBoard = __esm({
|
|
|
11668
11141
|
"use client";
|
|
11669
11142
|
init_cn();
|
|
11670
11143
|
init_useEventBus();
|
|
11671
|
-
init_useTranslate();
|
|
11672
11144
|
init_Box();
|
|
11673
11145
|
init_Button();
|
|
11674
11146
|
init_Typography();
|
|
@@ -12428,7 +11900,6 @@ var log4, SWIM_GUTTER, CENTER_W; exports.BehaviorView = void 0;
|
|
|
12428
11900
|
var init_BehaviorView = __esm({
|
|
12429
11901
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
12430
11902
|
"use client";
|
|
12431
|
-
init_useTranslate();
|
|
12432
11903
|
init_AvlState();
|
|
12433
11904
|
init_AvlTransitionLane();
|
|
12434
11905
|
init_AvlSwimLane();
|
|
@@ -12438,7 +11909,7 @@ var init_BehaviorView = __esm({
|
|
|
12438
11909
|
SWIM_GUTTER = 120;
|
|
12439
11910
|
CENTER_W = 360;
|
|
12440
11911
|
exports.BehaviorView = ({ data }) => {
|
|
12441
|
-
const { t } = useTranslate();
|
|
11912
|
+
const { t } = hooks.useTranslate();
|
|
12442
11913
|
const [layout, setLayout] = React79.useState(null);
|
|
12443
11914
|
const traitName = data.traits[0]?.name;
|
|
12444
11915
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -12543,14 +12014,13 @@ var MIN_DIAGRAM_WIDTH; exports.ScaledDiagram = void 0;
|
|
|
12543
12014
|
var init_ScaledDiagram = __esm({
|
|
12544
12015
|
"components/core/molecules/ScaledDiagram.tsx"() {
|
|
12545
12016
|
init_Box();
|
|
12546
|
-
init_useTranslate();
|
|
12547
12017
|
init_cn();
|
|
12548
12018
|
MIN_DIAGRAM_WIDTH = 200;
|
|
12549
12019
|
exports.ScaledDiagram = ({
|
|
12550
12020
|
children,
|
|
12551
12021
|
className
|
|
12552
12022
|
}) => {
|
|
12553
|
-
const { t: _t } = useTranslate();
|
|
12023
|
+
const { t: _t } = hooks.useTranslate();
|
|
12554
12024
|
const wrapperRef = React79.useRef(null);
|
|
12555
12025
|
const contentRef = React79.useRef(null);
|
|
12556
12026
|
const [layout, setLayout] = React79.useState(null);
|
|
@@ -12686,7 +12156,6 @@ var init_CodeBlock = __esm({
|
|
|
12686
12156
|
init_Textarea();
|
|
12687
12157
|
init_Icon();
|
|
12688
12158
|
init_useEventBus();
|
|
12689
|
-
init_useTranslate();
|
|
12690
12159
|
SyntaxHighlighter__default.default.registerLanguage("json", langJson__default.default);
|
|
12691
12160
|
SyntaxHighlighter__default.default.registerLanguage("javascript", langJavascript__default.default);
|
|
12692
12161
|
SyntaxHighlighter__default.default.registerLanguage("js", langJavascript__default.default);
|
|
@@ -12775,7 +12244,7 @@ var init_CodeBlock = __esm({
|
|
|
12775
12244
|
const isLolo = language === "lolo";
|
|
12776
12245
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark__default.default;
|
|
12777
12246
|
const eventBus = useEventBus();
|
|
12778
|
-
const { t } = useTranslate();
|
|
12247
|
+
const { t } = hooks.useTranslate();
|
|
12779
12248
|
const scrollRef = React79.useRef(null);
|
|
12780
12249
|
const codeRef = React79.useRef(null);
|
|
12781
12250
|
const savedScrollLeftRef = React79.useRef(0);
|
|
@@ -13193,11 +12662,10 @@ var init_MarkdownContent = __esm({
|
|
|
13193
12662
|
init_katex_min();
|
|
13194
12663
|
init_Box();
|
|
13195
12664
|
init_CodeBlock();
|
|
13196
|
-
init_useTranslate();
|
|
13197
12665
|
init_cn();
|
|
13198
12666
|
exports.MarkdownContent = React79__namespace.default.memo(
|
|
13199
12667
|
({ content, direction, className }) => {
|
|
13200
|
-
const { t: _t } = useTranslate();
|
|
12668
|
+
const { t: _t } = hooks.useTranslate();
|
|
13201
12669
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
13202
12670
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
13203
12671
|
exports.Box,
|
|
@@ -13423,7 +12891,7 @@ function Card2({
|
|
|
13423
12891
|
longPressPayload
|
|
13424
12892
|
}) {
|
|
13425
12893
|
const eventBus = useEventBus();
|
|
13426
|
-
const { t } = useTranslate();
|
|
12894
|
+
const { t } = hooks.useTranslate();
|
|
13427
12895
|
const isClickable = !!onClick || !!action;
|
|
13428
12896
|
const handleLongPress = React79.useCallback(() => {
|
|
13429
12897
|
if (longPressEvent) {
|
|
@@ -13498,7 +12966,6 @@ var init_Card2 = __esm({
|
|
|
13498
12966
|
"components/core/molecules/Card.tsx"() {
|
|
13499
12967
|
"use client";
|
|
13500
12968
|
init_useEventBus();
|
|
13501
|
-
init_useTranslate();
|
|
13502
12969
|
init_useLongPress();
|
|
13503
12970
|
Card2.displayName = "Card";
|
|
13504
12971
|
}
|
|
@@ -13512,14 +12979,13 @@ var init_QuizBlock = __esm({
|
|
|
13512
12979
|
init_Button();
|
|
13513
12980
|
init_Icon();
|
|
13514
12981
|
init_Box();
|
|
13515
|
-
init_useTranslate();
|
|
13516
12982
|
init_cn();
|
|
13517
12983
|
exports.QuizBlock = ({
|
|
13518
12984
|
question,
|
|
13519
12985
|
answer,
|
|
13520
12986
|
className
|
|
13521
12987
|
}) => {
|
|
13522
|
-
const { t } = useTranslate();
|
|
12988
|
+
const { t } = hooks.useTranslate();
|
|
13523
12989
|
const [revealed, setRevealed] = React79.useState(false);
|
|
13524
12990
|
return /* @__PURE__ */ jsxRuntime.jsx(Card2, { className: cn("my-4 border-blue-200 dark:border-blue-800", className), children: /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "sm", className: "p-4", children: [
|
|
13525
12991
|
/* @__PURE__ */ jsxRuntime.jsxs(exports.HStack, { gap: "sm", align: "start", children: [
|
|
@@ -13555,11 +13021,10 @@ var init_StateMachineView = __esm({
|
|
|
13555
13021
|
init_Typography();
|
|
13556
13022
|
init_Button();
|
|
13557
13023
|
init_Icon();
|
|
13558
|
-
init_useTranslate();
|
|
13559
13024
|
init_useEventBus();
|
|
13560
13025
|
init_cn();
|
|
13561
13026
|
StateNode = ({ state, config }) => {
|
|
13562
|
-
const { t } = useTranslate();
|
|
13027
|
+
const { t } = hooks.useTranslate();
|
|
13563
13028
|
const size = state.radius * 2;
|
|
13564
13029
|
let borderColor = config.colors.nodeBorder;
|
|
13565
13030
|
let borderWidth = 2;
|
|
@@ -13666,7 +13131,7 @@ var init_StateMachineView = __esm({
|
|
|
13666
13131
|
);
|
|
13667
13132
|
};
|
|
13668
13133
|
TransitionBundleArrow = ({ bundle, states, bundleIndex, config, onClick, onHover }) => {
|
|
13669
|
-
const { t } = useTranslate();
|
|
13134
|
+
const { t } = hooks.useTranslate();
|
|
13670
13135
|
const groupRef = React79.useRef(null);
|
|
13671
13136
|
const fromState = states.find((s) => s.name === bundle.from);
|
|
13672
13137
|
const toState = states.find((s) => s.name === bundle.to);
|
|
@@ -13916,7 +13381,7 @@ var init_StateMachineView = __esm({
|
|
|
13916
13381
|
);
|
|
13917
13382
|
};
|
|
13918
13383
|
BundleTooltip = ({ tooltip, config }) => {
|
|
13919
|
-
const { t } = useTranslate();
|
|
13384
|
+
const { t } = hooks.useTranslate();
|
|
13920
13385
|
if (!tooltip.visible || !tooltip.bundle) return null;
|
|
13921
13386
|
const { bundle } = tooltip;
|
|
13922
13387
|
const isSingle = bundle.labels.length === 1;
|
|
@@ -14068,7 +13533,7 @@ var init_StateMachineView = __esm({
|
|
|
14068
13533
|
);
|
|
14069
13534
|
};
|
|
14070
13535
|
EntityBox = ({ entity, config }) => {
|
|
14071
|
-
const { t } = useTranslate();
|
|
13536
|
+
const { t } = hooks.useTranslate();
|
|
14072
13537
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14073
13538
|
exports.VStack,
|
|
14074
13539
|
{
|
|
@@ -14109,7 +13574,7 @@ var init_StateMachineView = __esm({
|
|
|
14109
13574
|
);
|
|
14110
13575
|
};
|
|
14111
13576
|
OutputsBox = ({ outputs, config }) => {
|
|
14112
|
-
const { t } = useTranslate();
|
|
13577
|
+
const { t } = hooks.useTranslate();
|
|
14113
13578
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14114
13579
|
exports.VStack,
|
|
14115
13580
|
{
|
|
@@ -14151,7 +13616,7 @@ var init_StateMachineView = __esm({
|
|
|
14151
13616
|
);
|
|
14152
13617
|
};
|
|
14153
13618
|
Legend = ({ config, y }) => {
|
|
14154
|
-
const { t } = useTranslate();
|
|
13619
|
+
const { t } = hooks.useTranslate();
|
|
14155
13620
|
const items = [
|
|
14156
13621
|
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
14157
13622
|
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
@@ -14195,7 +13660,7 @@ var init_StateMachineView = __esm({
|
|
|
14195
13660
|
isLoading: _isLoading,
|
|
14196
13661
|
error: _error
|
|
14197
13662
|
}) => {
|
|
14198
|
-
const { t } = useTranslate();
|
|
13663
|
+
const { t } = hooks.useTranslate();
|
|
14199
13664
|
const [tooltip, setTooltip] = React79.useState({
|
|
14200
13665
|
visible: false,
|
|
14201
13666
|
pinned: false,
|
|
@@ -14922,7 +14387,6 @@ var init_JazariStateMachine = __esm({
|
|
|
14922
14387
|
init_StateMachineView();
|
|
14923
14388
|
init_visualizer();
|
|
14924
14389
|
init_svg_paths();
|
|
14925
|
-
init_useTranslate();
|
|
14926
14390
|
init_cn();
|
|
14927
14391
|
JAZARI_VISUALIZER_CONFIG = {
|
|
14928
14392
|
...DEFAULT_CONFIG,
|
|
@@ -14958,7 +14422,7 @@ var init_JazariStateMachine = __esm({
|
|
|
14958
14422
|
isLoading = false,
|
|
14959
14423
|
error = null
|
|
14960
14424
|
}) => {
|
|
14961
|
-
const { t } = useTranslate();
|
|
14425
|
+
const { t } = hooks.useTranslate();
|
|
14962
14426
|
const resolvedTrait = React79.useMemo(
|
|
14963
14427
|
() => extractTrait(schema, traitProp, traitIndex),
|
|
14964
14428
|
[schema, traitProp, traitIndex]
|
|
@@ -15078,7 +14542,6 @@ var init_ContentRenderer = __esm({
|
|
|
15078
14542
|
init_ScaledDiagram();
|
|
15079
14543
|
init_JazariStateMachine();
|
|
15080
14544
|
init_parseContentSegments();
|
|
15081
|
-
init_useTranslate();
|
|
15082
14545
|
init_cn();
|
|
15083
14546
|
exports.ContentRenderer = ({
|
|
15084
14547
|
content,
|
|
@@ -15086,7 +14549,7 @@ var init_ContentRenderer = __esm({
|
|
|
15086
14549
|
direction,
|
|
15087
14550
|
className
|
|
15088
14551
|
}) => {
|
|
15089
|
-
const { t: _t } = useTranslate();
|
|
14552
|
+
const { t: _t } = hooks.useTranslate();
|
|
15090
14553
|
const segments = React79.useMemo(
|
|
15091
14554
|
() => segmentsProp ?? parseContentSegments(content),
|
|
15092
14555
|
[segmentsProp, content]
|
|
@@ -15172,14 +14635,13 @@ var init_BookChapterView = __esm({
|
|
|
15172
14635
|
init_ScaledDiagram();
|
|
15173
14636
|
init_ContentRenderer();
|
|
15174
14637
|
init_JazariStateMachine();
|
|
15175
|
-
init_useTranslate();
|
|
15176
14638
|
init_cn();
|
|
15177
14639
|
exports.BookChapterView = ({
|
|
15178
14640
|
chapter,
|
|
15179
14641
|
direction,
|
|
15180
14642
|
className
|
|
15181
14643
|
}) => {
|
|
15182
|
-
const { t: _t } = useTranslate();
|
|
14644
|
+
const { t: _t } = hooks.useTranslate();
|
|
15183
14645
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15184
14646
|
exports.VStack,
|
|
15185
14647
|
{
|
|
@@ -15211,7 +14673,6 @@ var init_BookCoverPage = __esm({
|
|
|
15211
14673
|
init_Typography();
|
|
15212
14674
|
init_Button();
|
|
15213
14675
|
init_Box();
|
|
15214
|
-
init_useTranslate();
|
|
15215
14676
|
init_cn();
|
|
15216
14677
|
exports.BookCoverPage = ({
|
|
15217
14678
|
title,
|
|
@@ -15221,7 +14682,7 @@ var init_BookCoverPage = __esm({
|
|
|
15221
14682
|
direction,
|
|
15222
14683
|
className
|
|
15223
14684
|
}) => {
|
|
15224
|
-
const { t } = useTranslate();
|
|
14685
|
+
const { t } = hooks.useTranslate();
|
|
15225
14686
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15226
14687
|
exports.VStack,
|
|
15227
14688
|
{
|
|
@@ -15291,7 +14752,6 @@ var init_BookNavBar = __esm({
|
|
|
15291
14752
|
init_Typography();
|
|
15292
14753
|
init_ProgressBar();
|
|
15293
14754
|
init_Box();
|
|
15294
|
-
init_useTranslate();
|
|
15295
14755
|
init_cn();
|
|
15296
14756
|
exports.BookNavBar = ({
|
|
15297
14757
|
currentPage,
|
|
@@ -15300,7 +14760,7 @@ var init_BookNavBar = __esm({
|
|
|
15300
14760
|
direction,
|
|
15301
14761
|
className
|
|
15302
14762
|
}) => {
|
|
15303
|
-
const { t } = useTranslate();
|
|
14763
|
+
const { t } = hooks.useTranslate();
|
|
15304
14764
|
const isRtl = direction === "rtl";
|
|
15305
14765
|
const progress = totalPages > 1 ? currentPage / (totalPages - 1) * 100 : 0;
|
|
15306
14766
|
const PrevIcon = isRtl ? LucideIcons2.ChevronRight : LucideIcons2.ChevronLeft;
|
|
@@ -15393,7 +14853,6 @@ var init_BookTableOfContents = __esm({
|
|
|
15393
14853
|
init_Button();
|
|
15394
14854
|
init_Box();
|
|
15395
14855
|
init_Badge();
|
|
15396
|
-
init_useTranslate();
|
|
15397
14856
|
init_cn();
|
|
15398
14857
|
exports.BookTableOfContents = ({
|
|
15399
14858
|
parts,
|
|
@@ -15401,7 +14860,7 @@ var init_BookTableOfContents = __esm({
|
|
|
15401
14860
|
direction,
|
|
15402
14861
|
className
|
|
15403
14862
|
}) => {
|
|
15404
|
-
const { t } = useTranslate();
|
|
14863
|
+
const { t } = hooks.useTranslate();
|
|
15405
14864
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15406
14865
|
exports.VStack,
|
|
15407
14866
|
{
|
|
@@ -15453,7 +14912,6 @@ var init_EmptyState = __esm({
|
|
|
15453
14912
|
init_Stack();
|
|
15454
14913
|
init_Typography();
|
|
15455
14914
|
init_useEventBus();
|
|
15456
|
-
init_useTranslate();
|
|
15457
14915
|
ICON_NAME_ALIASES = {
|
|
15458
14916
|
check: "check-circle",
|
|
15459
14917
|
error: "x-circle",
|
|
@@ -15479,7 +14937,7 @@ var init_EmptyState = __esm({
|
|
|
15479
14937
|
look = "icon-only"
|
|
15480
14938
|
}) => {
|
|
15481
14939
|
const eventBus = useEventBus();
|
|
15482
|
-
const { t } = useTranslate();
|
|
14940
|
+
const { t } = hooks.useTranslate();
|
|
15483
14941
|
const handleAction = () => {
|
|
15484
14942
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, {});
|
|
15485
14943
|
onAction?.();
|
|
@@ -15624,7 +15082,6 @@ var init_BookViewer = __esm({
|
|
|
15624
15082
|
init_Box();
|
|
15625
15083
|
init_Stack();
|
|
15626
15084
|
init_useEventBus();
|
|
15627
|
-
init_useTranslate();
|
|
15628
15085
|
init_cn();
|
|
15629
15086
|
init_BookCoverPage();
|
|
15630
15087
|
init_BookTableOfContents();
|
|
@@ -15650,7 +15107,7 @@ var init_BookViewer = __esm({
|
|
|
15650
15107
|
className
|
|
15651
15108
|
}) => {
|
|
15652
15109
|
const eventBus = useEventBus();
|
|
15653
|
-
const { t } = useTranslate();
|
|
15110
|
+
const { t } = hooks.useTranslate();
|
|
15654
15111
|
const [currentPage, setCurrentPage] = React79.useState(initialPage);
|
|
15655
15112
|
const resolvedFieldMap = React79.useMemo(() => resolveFieldMap(fieldMap), [fieldMap]);
|
|
15656
15113
|
const book = React79.useMemo(() => {
|
|
@@ -16056,7 +15513,6 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16056
15513
|
init_FilterPill();
|
|
16057
15514
|
init_Box();
|
|
16058
15515
|
init_useEventBus();
|
|
16059
|
-
init_useTranslate();
|
|
16060
15516
|
init_cn();
|
|
16061
15517
|
END_OF_SURVEY = "end-of-survey";
|
|
16062
15518
|
RuleRow = ({
|
|
@@ -16067,7 +15523,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16067
15523
|
onChange,
|
|
16068
15524
|
onDelete
|
|
16069
15525
|
}) => {
|
|
16070
|
-
const { t } = useTranslate();
|
|
15526
|
+
const { t } = hooks.useTranslate();
|
|
16071
15527
|
const operatorOptions = React79.useMemo(
|
|
16072
15528
|
() => [
|
|
16073
15529
|
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
@@ -16242,7 +15698,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16242
15698
|
NODE_GAP_Y = 80;
|
|
16243
15699
|
PADDING = 32;
|
|
16244
15700
|
LogicGraph = ({ questions, rules }) => {
|
|
16245
|
-
const { t } = useTranslate();
|
|
15701
|
+
const { t } = hooks.useTranslate();
|
|
16246
15702
|
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
16247
15703
|
const layout = React79.useMemo(() => {
|
|
16248
15704
|
const items = [
|
|
@@ -16374,7 +15830,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
16374
15830
|
readOnly = false,
|
|
16375
15831
|
className
|
|
16376
15832
|
}) => {
|
|
16377
|
-
const { t } = useTranslate();
|
|
15833
|
+
const { t } = hooks.useTranslate();
|
|
16378
15834
|
const eventBus = useEventBus();
|
|
16379
15835
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
16380
15836
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -16509,7 +15965,6 @@ var init_Breadcrumb = __esm({
|
|
|
16509
15965
|
init_Typography();
|
|
16510
15966
|
init_cn();
|
|
16511
15967
|
init_useEventBus();
|
|
16512
|
-
init_useTranslate();
|
|
16513
15968
|
exports.Breadcrumb = ({
|
|
16514
15969
|
items,
|
|
16515
15970
|
separator = "chevron-right",
|
|
@@ -16517,7 +15972,7 @@ var init_Breadcrumb = __esm({
|
|
|
16517
15972
|
className
|
|
16518
15973
|
}) => {
|
|
16519
15974
|
const eventBus = useEventBus();
|
|
16520
|
-
const { t } = useTranslate();
|
|
15975
|
+
const { t } = hooks.useTranslate();
|
|
16521
15976
|
const displayItems = maxItems && items.length > maxItems ? [
|
|
16522
15977
|
...items.slice(0, 1),
|
|
16523
15978
|
{ label: "...", isCurrent: false },
|
|
@@ -16596,7 +16051,7 @@ function BuilderBoard({
|
|
|
16596
16051
|
className
|
|
16597
16052
|
}) {
|
|
16598
16053
|
const { emit } = useEventBus();
|
|
16599
|
-
const { t } = useTranslate();
|
|
16054
|
+
const { t } = hooks.useTranslate();
|
|
16600
16055
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
16601
16056
|
const [placements, setPlacements] = React79.useState({});
|
|
16602
16057
|
const [headerError, setHeaderError] = React79.useState(false);
|
|
@@ -16745,7 +16200,6 @@ var init_BuilderBoard = __esm({
|
|
|
16745
16200
|
"components/game/organisms/puzzles/builder/BuilderBoard.tsx"() {
|
|
16746
16201
|
init_atoms2();
|
|
16747
16202
|
init_useEventBus();
|
|
16748
|
-
init_useTranslate();
|
|
16749
16203
|
BuilderBoard.displayName = "BuilderBoard";
|
|
16750
16204
|
}
|
|
16751
16205
|
});
|
|
@@ -17013,7 +16467,7 @@ function CalendarGrid({
|
|
|
17013
16467
|
}) {
|
|
17014
16468
|
const evs = Array.isArray(events2) ? events2 : events2 ? [events2] : [];
|
|
17015
16469
|
const eventBus = useEventBus();
|
|
17016
|
-
const { t } = useTranslate();
|
|
16470
|
+
const { t } = hooks.useTranslate();
|
|
17017
16471
|
const longPressTimer = React79.useRef(null);
|
|
17018
16472
|
const resolvedWeekStart = React79.useMemo(
|
|
17019
16473
|
() => weekStart ? getStartOfWeek(weekStart) : getStartOfWeek(/* @__PURE__ */ new Date()),
|
|
@@ -17223,7 +16677,6 @@ var init_CalendarGrid = __esm({
|
|
|
17223
16677
|
init_TimeSlotCell();
|
|
17224
16678
|
init_useEventBus();
|
|
17225
16679
|
init_useSwipeGesture();
|
|
17226
|
-
init_useTranslate();
|
|
17227
16680
|
SHORT_DATE = { month: "short", day: "numeric" };
|
|
17228
16681
|
CalendarGrid.displayName = "CalendarGrid";
|
|
17229
16682
|
}
|
|
@@ -18532,7 +17985,6 @@ var init_Pagination = __esm({
|
|
|
18532
17985
|
init_Stack();
|
|
18533
17986
|
init_cn();
|
|
18534
17987
|
init_useEventBus();
|
|
18535
|
-
init_useTranslate();
|
|
18536
17988
|
exports.Pagination = ({
|
|
18537
17989
|
currentPage,
|
|
18538
17990
|
totalPages,
|
|
@@ -18551,7 +18003,7 @@ var init_Pagination = __esm({
|
|
|
18551
18003
|
pageSizeChangeEvent
|
|
18552
18004
|
}) => {
|
|
18553
18005
|
const eventBus = useEventBus();
|
|
18554
|
-
const { t } = useTranslate();
|
|
18006
|
+
const { t } = hooks.useTranslate();
|
|
18555
18007
|
const [jumpToPage, setJumpToPage] = React79.useState("");
|
|
18556
18008
|
const handlePageChange = (page) => {
|
|
18557
18009
|
if (pageChangeEvent) eventBus.emit(`UI:${pageChangeEvent}`, { page });
|
|
@@ -18736,7 +18188,6 @@ var init_CardGrid = __esm({
|
|
|
18736
18188
|
init_cn();
|
|
18737
18189
|
init_getNestedValue();
|
|
18738
18190
|
init_useEventBus();
|
|
18739
|
-
init_useTranslate();
|
|
18740
18191
|
init_atoms2();
|
|
18741
18192
|
init_Badge();
|
|
18742
18193
|
init_Box();
|
|
@@ -18780,7 +18231,7 @@ var init_CardGrid = __esm({
|
|
|
18780
18231
|
imageField
|
|
18781
18232
|
}) => {
|
|
18782
18233
|
const eventBus = useEventBus();
|
|
18783
|
-
const { t } = useTranslate();
|
|
18234
|
+
const { t } = hooks.useTranslate();
|
|
18784
18235
|
const effectiveFieldNames = normalizeFields(fields).length > 0 ? normalizeFields(fields) : fieldNames ?? normalizeFields(columns);
|
|
18785
18236
|
const gridTemplateColumns = `repeat(auto-fit, minmax(min(${minCardWidth}px, 100%), 1fr))`;
|
|
18786
18237
|
const normalizedData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -18965,7 +18416,6 @@ var init_Carousel = __esm({
|
|
|
18965
18416
|
init_cn();
|
|
18966
18417
|
init_useEventBus();
|
|
18967
18418
|
init_useSwipeGesture();
|
|
18968
|
-
init_useTranslate();
|
|
18969
18419
|
init_Box();
|
|
18970
18420
|
init_Stack();
|
|
18971
18421
|
init_Button();
|
|
@@ -18986,7 +18436,7 @@ var init_Carousel = __esm({
|
|
|
18986
18436
|
const scrollRef = React79.useRef(null);
|
|
18987
18437
|
const autoPlayRef = React79.useRef(null);
|
|
18988
18438
|
const eventBus = useSafeEventBus3();
|
|
18989
|
-
const { t } = useTranslate();
|
|
18439
|
+
const { t } = hooks.useTranslate();
|
|
18990
18440
|
const safeItems = items ?? [];
|
|
18991
18441
|
const totalSlides = safeItems.length;
|
|
18992
18442
|
const emitSlideChange = React79.useCallback(
|
|
@@ -19202,7 +18652,6 @@ var init_CaseStudyOrganism = __esm({
|
|
|
19202
18652
|
"use client";
|
|
19203
18653
|
init_cn();
|
|
19204
18654
|
init_useEventBus();
|
|
19205
|
-
init_useTranslate();
|
|
19206
18655
|
init_Stack();
|
|
19207
18656
|
init_Typography();
|
|
19208
18657
|
init_SimpleGrid();
|
|
@@ -19218,7 +18667,7 @@ var init_CaseStudyOrganism = __esm({
|
|
|
19218
18667
|
subtitle
|
|
19219
18668
|
}) => {
|
|
19220
18669
|
useEventBus();
|
|
19221
|
-
const { t } = useTranslate();
|
|
18670
|
+
const { t } = hooks.useTranslate();
|
|
19222
18671
|
const items = React79.useMemo(
|
|
19223
18672
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
19224
18673
|
[entity]
|
|
@@ -19407,7 +18856,6 @@ var init_Chart = __esm({
|
|
|
19407
18856
|
init_ErrorState();
|
|
19408
18857
|
init_EmptyState();
|
|
19409
18858
|
init_useEventBus();
|
|
19410
|
-
init_useTranslate();
|
|
19411
18859
|
CHART_COLORS = [
|
|
19412
18860
|
"var(--color-primary)",
|
|
19413
18861
|
"var(--color-success)",
|
|
@@ -19980,7 +19428,7 @@ var init_Chart = __esm({
|
|
|
19980
19428
|
}) => {
|
|
19981
19429
|
const resolvedLook = look ?? (chartType ? LOOK_FROM_CHART_TYPE[chartType] : "bar-vertical");
|
|
19982
19430
|
const eventBus = useEventBus();
|
|
19983
|
-
const { t } = useTranslate();
|
|
19431
|
+
const { t } = hooks.useTranslate();
|
|
19984
19432
|
const handleAction = React79.useCallback(
|
|
19985
19433
|
(action) => {
|
|
19986
19434
|
if (action.event) {
|
|
@@ -20223,7 +19671,7 @@ function ClassifierBoard({
|
|
|
20223
19671
|
className
|
|
20224
19672
|
}) {
|
|
20225
19673
|
const { emit } = useEventBus();
|
|
20226
|
-
const { t } = useTranslate();
|
|
19674
|
+
const { t } = hooks.useTranslate();
|
|
20227
19675
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
20228
19676
|
const [assignments, setAssignments] = React79.useState({});
|
|
20229
19677
|
const [headerError, setHeaderError] = React79.useState(false);
|
|
@@ -20361,7 +19809,6 @@ var init_ClassifierBoard = __esm({
|
|
|
20361
19809
|
"components/game/organisms/puzzles/classifier/ClassifierBoard.tsx"() {
|
|
20362
19810
|
init_atoms2();
|
|
20363
19811
|
init_useEventBus();
|
|
20364
|
-
init_useTranslate();
|
|
20365
19812
|
ClassifierBoard.displayName = "ClassifierBoard";
|
|
20366
19813
|
}
|
|
20367
19814
|
});
|
|
@@ -20371,7 +19818,7 @@ function CodeView({
|
|
|
20371
19818
|
defaultExpanded = false,
|
|
20372
19819
|
className
|
|
20373
19820
|
}) {
|
|
20374
|
-
const { t } = useTranslate();
|
|
19821
|
+
const { t } = hooks.useTranslate();
|
|
20375
19822
|
const [expanded, setExpanded] = React79.useState(defaultExpanded);
|
|
20376
19823
|
const jsonString = JSON.stringify(data, null, 2);
|
|
20377
19824
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { className: cn("rounded-lg border border-border overflow-hidden", className), gap: "none", children: [
|
|
@@ -20393,7 +19840,6 @@ var init_CodeView = __esm({
|
|
|
20393
19840
|
"components/game/organisms/puzzles/state-architect/CodeView.tsx"() {
|
|
20394
19841
|
init_atoms2();
|
|
20395
19842
|
init_cn();
|
|
20396
|
-
init_useTranslate();
|
|
20397
19843
|
CodeView.displayName = "CodeView";
|
|
20398
19844
|
}
|
|
20399
19845
|
});
|
|
@@ -20407,7 +19853,6 @@ var init_Tabs = __esm({
|
|
|
20407
19853
|
init_Box();
|
|
20408
19854
|
init_cn();
|
|
20409
19855
|
init_useEventBus();
|
|
20410
|
-
init_useTranslate();
|
|
20411
19856
|
exports.Tabs = ({
|
|
20412
19857
|
items,
|
|
20413
19858
|
tabs,
|
|
@@ -20425,7 +19870,7 @@ var init_Tabs = __esm({
|
|
|
20425
19870
|
id: id || value || ""
|
|
20426
19871
|
}));
|
|
20427
19872
|
const eventBus = useEventBus();
|
|
20428
|
-
const { t } = useTranslate();
|
|
19873
|
+
const { t } = hooks.useTranslate();
|
|
20429
19874
|
const initialActive = safeItems.find((item) => item.active)?.id;
|
|
20430
19875
|
const [internalActiveTab, setInternalActiveTab] = React79.useState(
|
|
20431
19876
|
defaultActiveTab || initialActive || safeItems[0]?.id || ""
|
|
@@ -20584,7 +20029,6 @@ var init_CodeViewer = __esm({
|
|
|
20584
20029
|
init_EmptyState();
|
|
20585
20030
|
init_Tabs();
|
|
20586
20031
|
init_useEventBus();
|
|
20587
|
-
init_useTranslate();
|
|
20588
20032
|
DIFF_STYLES = {
|
|
20589
20033
|
add: {
|
|
20590
20034
|
bg: "bg-success/10",
|
|
@@ -20622,7 +20066,7 @@ var init_CodeViewer = __esm({
|
|
|
20622
20066
|
className
|
|
20623
20067
|
}) => {
|
|
20624
20068
|
const eventBus = useEventBus();
|
|
20625
|
-
const { t } = useTranslate();
|
|
20069
|
+
const { t } = hooks.useTranslate();
|
|
20626
20070
|
const [copied, setCopied] = React79.useState(false);
|
|
20627
20071
|
const [wrap, setWrap] = React79.useState(wordWrap);
|
|
20628
20072
|
const [activeFileIndex, setActiveFileIndex] = React79.useState(0);
|
|
@@ -21013,7 +20457,6 @@ var init_ConfirmDialog = __esm({
|
|
|
21013
20457
|
init_Box();
|
|
21014
20458
|
init_Stack();
|
|
21015
20459
|
init_cn();
|
|
21016
|
-
init_useTranslate();
|
|
21017
20460
|
variantConfig = {
|
|
21018
20461
|
danger: {
|
|
21019
20462
|
icon: LucideIcons2.Trash2,
|
|
@@ -21061,7 +20504,7 @@ var init_ConfirmDialog = __esm({
|
|
|
21061
20504
|
className
|
|
21062
20505
|
}) => {
|
|
21063
20506
|
const config = variantConfig[variant];
|
|
21064
|
-
const { t } = useTranslate();
|
|
20507
|
+
const { t } = hooks.useTranslate();
|
|
21065
20508
|
const resolvedMessage = message ?? description ?? "";
|
|
21066
20509
|
const resolvedConfirmText = confirmText ?? confirmLabel ?? t("dialog.confirm");
|
|
21067
20510
|
const resolvedCancelText = cancelText ?? cancelLabel ?? t("dialog.cancel");
|
|
@@ -21619,7 +21062,6 @@ var init_DashboardGrid = __esm({
|
|
|
21619
21062
|
"components/core/organisms/layout/DashboardGrid.tsx"() {
|
|
21620
21063
|
init_cn();
|
|
21621
21064
|
init_Box();
|
|
21622
|
-
init_useTranslate();
|
|
21623
21065
|
gapStyles5 = {
|
|
21624
21066
|
sm: "gap-2",
|
|
21625
21067
|
md: "gap-4",
|
|
@@ -21646,7 +21088,7 @@ var init_DashboardGrid = __esm({
|
|
|
21646
21088
|
cells,
|
|
21647
21089
|
className
|
|
21648
21090
|
}) => {
|
|
21649
|
-
const { t: _t } = useTranslate();
|
|
21091
|
+
const { t: _t } = hooks.useTranslate();
|
|
21650
21092
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21651
21093
|
exports.Box,
|
|
21652
21094
|
{
|
|
@@ -21713,7 +21155,6 @@ var init_DashboardLayout = __esm({
|
|
|
21713
21155
|
init_Icon();
|
|
21714
21156
|
init_useAuthContext();
|
|
21715
21157
|
init_useEventBus();
|
|
21716
|
-
init_useTranslate();
|
|
21717
21158
|
init_CurrentPagePathContext();
|
|
21718
21159
|
exports.DashboardLayout = ({
|
|
21719
21160
|
appName = "{{APP_TITLE}}",
|
|
@@ -21770,13 +21211,9 @@ var init_DashboardLayout = __esm({
|
|
|
21770
21211
|
const location = reactRouterDom.useLocation();
|
|
21771
21212
|
const ctxPagePath = useCurrentPagePath();
|
|
21772
21213
|
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
21773
|
-
const {
|
|
21774
|
-
const user = userProp || (
|
|
21775
|
-
|
|
21776
|
-
email: authUser.email || "",
|
|
21777
|
-
avatar: authUser.photoURL || void 0
|
|
21778
|
-
} : null);
|
|
21779
|
-
const { t } = useTranslate();
|
|
21214
|
+
const { signOut: authSignOut } = useAuthContext();
|
|
21215
|
+
const user = userProp || (null);
|
|
21216
|
+
const { t } = hooks.useTranslate();
|
|
21780
21217
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
21781
21218
|
const showSidebar = layoutMode === "sidebar";
|
|
21782
21219
|
const showHeader = layoutMode !== "minimal";
|
|
@@ -22442,7 +21879,7 @@ function useDataDnd(args) {
|
|
|
22442
21879
|
({ id, children }) => {
|
|
22443
21880
|
const {
|
|
22444
21881
|
attributes,
|
|
22445
|
-
listeners:
|
|
21882
|
+
listeners: listeners7,
|
|
22446
21883
|
setNodeRef,
|
|
22447
21884
|
transform,
|
|
22448
21885
|
transition,
|
|
@@ -22465,7 +21902,7 @@ function useDataDnd(args) {
|
|
|
22465
21902
|
ref: setNodeRef,
|
|
22466
21903
|
style,
|
|
22467
21904
|
...attributes,
|
|
22468
|
-
...
|
|
21905
|
+
...listeners7,
|
|
22469
21906
|
children
|
|
22470
21907
|
}
|
|
22471
21908
|
);
|
|
@@ -22747,7 +22184,7 @@ function DataGrid({
|
|
|
22747
22184
|
look = "dense"
|
|
22748
22185
|
}) {
|
|
22749
22186
|
const eventBus = useEventBus();
|
|
22750
|
-
const { t } = useTranslate();
|
|
22187
|
+
const { t } = hooks.useTranslate();
|
|
22751
22188
|
const [selectedIds, setSelectedIds] = React79.useState(/* @__PURE__ */ new Set());
|
|
22752
22189
|
const [visibleCount, setVisibleCount] = React79.useState(pageSize || Infinity);
|
|
22753
22190
|
const fieldDefs = fields ?? columns ?? [];
|
|
@@ -23062,7 +22499,6 @@ var init_DataGrid = __esm({
|
|
|
23062
22499
|
init_cn();
|
|
23063
22500
|
init_getNestedValue();
|
|
23064
22501
|
init_useEventBus();
|
|
23065
|
-
init_useTranslate();
|
|
23066
22502
|
init_Box();
|
|
23067
22503
|
init_Stack();
|
|
23068
22504
|
init_Typography();
|
|
@@ -23187,7 +22623,7 @@ function DataList({
|
|
|
23187
22623
|
look = "dense"
|
|
23188
22624
|
}) {
|
|
23189
22625
|
const eventBus = useEventBus();
|
|
23190
|
-
const { t } = useTranslate();
|
|
22626
|
+
const { t } = hooks.useTranslate();
|
|
23191
22627
|
const [visibleCount, setVisibleCount] = React79__namespace.default.useState(pageSize || Infinity);
|
|
23192
22628
|
const fieldDefs = fields ?? columns ?? [];
|
|
23193
22629
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -23501,7 +22937,6 @@ var init_DataList = __esm({
|
|
|
23501
22937
|
init_cn();
|
|
23502
22938
|
init_getNestedValue();
|
|
23503
22939
|
init_useEventBus();
|
|
23504
|
-
init_useTranslate();
|
|
23505
22940
|
init_Box();
|
|
23506
22941
|
init_Stack();
|
|
23507
22942
|
init_Typography();
|
|
@@ -23556,7 +22991,6 @@ var init_FileTree = __esm({
|
|
|
23556
22991
|
init_Box();
|
|
23557
22992
|
init_Typography();
|
|
23558
22993
|
init_Icon();
|
|
23559
|
-
init_useTranslate();
|
|
23560
22994
|
TreeNodeItem = ({
|
|
23561
22995
|
node,
|
|
23562
22996
|
depth,
|
|
@@ -23642,7 +23076,7 @@ var init_FileTree = __esm({
|
|
|
23642
23076
|
className,
|
|
23643
23077
|
indent = 16
|
|
23644
23078
|
}) => {
|
|
23645
|
-
const { t } = useTranslate();
|
|
23079
|
+
const { t } = hooks.useTranslate();
|
|
23646
23080
|
if (tree.length === 0) {
|
|
23647
23081
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
23648
23082
|
}
|
|
@@ -23743,14 +23177,6 @@ function useQuerySingleton(query) {
|
|
|
23743
23177
|
setSort
|
|
23744
23178
|
};
|
|
23745
23179
|
}
|
|
23746
|
-
function parseQueryBinding(binding) {
|
|
23747
|
-
const cleaned = binding.startsWith("@") ? binding.slice(1) : binding;
|
|
23748
|
-
const parts = cleaned.split(".");
|
|
23749
|
-
return {
|
|
23750
|
-
query: parts[0],
|
|
23751
|
-
field: parts.length > 1 ? parts.slice(1).join(".") : void 0
|
|
23752
|
-
};
|
|
23753
|
-
}
|
|
23754
23180
|
var queryStores;
|
|
23755
23181
|
var init_useQuerySingleton = __esm({
|
|
23756
23182
|
"hooks/useQuerySingleton.ts"() {
|
|
@@ -23771,7 +23197,6 @@ var init_FilterGroup = __esm({
|
|
|
23771
23197
|
init_Icon();
|
|
23772
23198
|
init_useEventBus();
|
|
23773
23199
|
init_useQuerySingleton();
|
|
23774
|
-
init_useTranslate();
|
|
23775
23200
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
23776
23201
|
lookStyles6 = {
|
|
23777
23202
|
toolbar: "",
|
|
@@ -23792,7 +23217,7 @@ var init_FilterGroup = __esm({
|
|
|
23792
23217
|
isLoading,
|
|
23793
23218
|
look = "toolbar"
|
|
23794
23219
|
}) => {
|
|
23795
|
-
const { t } = useTranslate();
|
|
23220
|
+
const { t } = hooks.useTranslate();
|
|
23796
23221
|
const eventBus = useEventBus();
|
|
23797
23222
|
const queryState = useQuerySingleton(query);
|
|
23798
23223
|
const [selectedValues, setSelectedValues] = React79.useState(
|
|
@@ -24423,7 +23848,6 @@ var init_Coachmark = __esm({
|
|
|
24423
23848
|
init_Button();
|
|
24424
23849
|
init_Icon();
|
|
24425
23850
|
init_cn();
|
|
24426
|
-
init_useTranslate();
|
|
24427
23851
|
GAP = 10;
|
|
24428
23852
|
EDGE = 8;
|
|
24429
23853
|
exports.Coachmark = ({
|
|
@@ -24442,7 +23866,7 @@ var init_Coachmark = __esm({
|
|
|
24442
23866
|
className
|
|
24443
23867
|
}) => {
|
|
24444
23868
|
const cardRef = React79.useRef(null);
|
|
24445
|
-
const { t } = useTranslate();
|
|
23869
|
+
const { t } = hooks.useTranslate();
|
|
24446
23870
|
const rect = useAnchorRect(anchor, open);
|
|
24447
23871
|
const [pos, setPos] = React79.useState(null);
|
|
24448
23872
|
const centered = open && !rect && fallbackCentered;
|
|
@@ -24664,7 +24088,6 @@ var init_RelationSelect = __esm({
|
|
|
24664
24088
|
init_Spinner();
|
|
24665
24089
|
init_Typography();
|
|
24666
24090
|
init_debug();
|
|
24667
|
-
init_useTranslate();
|
|
24668
24091
|
isRelationsDebugEnabled = () => isDebugEnabled();
|
|
24669
24092
|
exports.RelationSelect = ({
|
|
24670
24093
|
value,
|
|
@@ -24681,7 +24104,7 @@ var init_RelationSelect = __esm({
|
|
|
24681
24104
|
searchPlaceholder,
|
|
24682
24105
|
emptyMessage
|
|
24683
24106
|
}) => {
|
|
24684
|
-
const { t } = useTranslate();
|
|
24107
|
+
const { t } = hooks.useTranslate();
|
|
24685
24108
|
const resolvedPlaceholder = placeholder ?? t("relationSelect.selectPlaceholder");
|
|
24686
24109
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
24687
24110
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noOptionsFound");
|
|
@@ -24889,7 +24312,6 @@ var init_SearchInput = __esm({
|
|
|
24889
24312
|
init_cn();
|
|
24890
24313
|
init_useEventBus();
|
|
24891
24314
|
init_useQuerySingleton();
|
|
24892
|
-
init_useTranslate();
|
|
24893
24315
|
exports.SearchInput = ({
|
|
24894
24316
|
value,
|
|
24895
24317
|
onSearch,
|
|
@@ -24904,7 +24326,7 @@ var init_SearchInput = __esm({
|
|
|
24904
24326
|
...props
|
|
24905
24327
|
}) => {
|
|
24906
24328
|
const eventBus = useEventBus();
|
|
24907
|
-
const { t } = useTranslate();
|
|
24329
|
+
const { t } = hooks.useTranslate();
|
|
24908
24330
|
const resolvedPlaceholder = placeholder ?? t("common.search");
|
|
24909
24331
|
const queryState = useQuerySingleton(query);
|
|
24910
24332
|
const initialValue = queryState?.search ?? value ?? "";
|
|
@@ -24992,7 +24414,6 @@ var init_SidePanel = __esm({
|
|
|
24992
24414
|
init_Typography();
|
|
24993
24415
|
init_cn();
|
|
24994
24416
|
init_useEventBus();
|
|
24995
|
-
init_useTranslate();
|
|
24996
24417
|
exports.SidePanel = ({
|
|
24997
24418
|
title,
|
|
24998
24419
|
children,
|
|
@@ -25005,7 +24426,7 @@ var init_SidePanel = __esm({
|
|
|
25005
24426
|
closeEvent
|
|
25006
24427
|
}) => {
|
|
25007
24428
|
const eventBus = useEventBus();
|
|
25008
|
-
const { t } = useTranslate();
|
|
24429
|
+
const { t } = hooks.useTranslate();
|
|
25009
24430
|
const handleClose = () => {
|
|
25010
24431
|
if (closeEvent) eventBus.emit(`UI:${closeEvent}`, {});
|
|
25011
24432
|
onClose();
|
|
@@ -25171,7 +24592,6 @@ var init_WizardNavigation = __esm({
|
|
|
25171
24592
|
init_Icon();
|
|
25172
24593
|
init_cn();
|
|
25173
24594
|
init_useEventBus();
|
|
25174
|
-
init_useTranslate();
|
|
25175
24595
|
exports.WizardNavigation = ({
|
|
25176
24596
|
currentStep,
|
|
25177
24597
|
totalSteps,
|
|
@@ -25192,7 +24612,7 @@ var init_WizardNavigation = __esm({
|
|
|
25192
24612
|
className
|
|
25193
24613
|
}) => {
|
|
25194
24614
|
const eventBus = useSafeEventBus4();
|
|
25195
|
-
const { t } = useTranslate();
|
|
24615
|
+
const { t } = hooks.useTranslate();
|
|
25196
24616
|
const resolvedBackLabel = backLabel ?? t("wizard.back");
|
|
25197
24617
|
const resolvedNextLabel = nextLabel ?? t("wizard.next");
|
|
25198
24618
|
const resolvedCompleteLabel = completeLabel ?? t("wizard.complete");
|
|
@@ -25259,7 +24679,6 @@ var init_RepeatableFormSection = __esm({
|
|
|
25259
24679
|
init_Card();
|
|
25260
24680
|
init_Icon();
|
|
25261
24681
|
init_useEventBus();
|
|
25262
|
-
init_useTranslate();
|
|
25263
24682
|
exports.RepeatableFormSection = ({
|
|
25264
24683
|
sectionType,
|
|
25265
24684
|
title,
|
|
@@ -25280,7 +24699,7 @@ var init_RepeatableFormSection = __esm({
|
|
|
25280
24699
|
showAuditInfo = false
|
|
25281
24700
|
}) => {
|
|
25282
24701
|
const eventBus = useEventBus();
|
|
25283
|
-
const { t } = useTranslate();
|
|
24702
|
+
const { t } = hooks.useTranslate();
|
|
25284
24703
|
const resolvedAddLabel = addLabel ?? t("common.add");
|
|
25285
24704
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noItemsAdded");
|
|
25286
24705
|
const safeItems = items ?? [];
|
|
@@ -25390,7 +24809,6 @@ var actionTypeLabelKeys, actionTypeIcons; exports.ViolationAlert = void 0;
|
|
|
25390
24809
|
var init_ViolationAlert = __esm({
|
|
25391
24810
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
25392
24811
|
init_cn();
|
|
25393
|
-
init_useTranslate();
|
|
25394
24812
|
init_Box();
|
|
25395
24813
|
init_Stack();
|
|
25396
24814
|
init_Typography();
|
|
@@ -25416,7 +24834,7 @@ var init_ViolationAlert = __esm({
|
|
|
25416
24834
|
className,
|
|
25417
24835
|
...flatProps
|
|
25418
24836
|
}) => {
|
|
25419
|
-
const { t } = useTranslate();
|
|
24837
|
+
const { t } = hooks.useTranslate();
|
|
25420
24838
|
const resolvedViolation = violation ?? {
|
|
25421
24839
|
law: "",
|
|
25422
24840
|
article: "",
|
|
@@ -25896,7 +25314,6 @@ var init_LineChart = __esm({
|
|
|
25896
25314
|
"use client";
|
|
25897
25315
|
init_cn();
|
|
25898
25316
|
init_atoms2();
|
|
25899
|
-
init_useTranslate();
|
|
25900
25317
|
exports.LineChart = ({
|
|
25901
25318
|
data,
|
|
25902
25319
|
width = 400,
|
|
@@ -25908,7 +25325,7 @@ var init_LineChart = __esm({
|
|
|
25908
25325
|
areaColor = "var(--color-primary)",
|
|
25909
25326
|
className
|
|
25910
25327
|
}) => {
|
|
25911
|
-
const { t } = useTranslate();
|
|
25328
|
+
const { t } = hooks.useTranslate();
|
|
25912
25329
|
const gradientId = React79.useId();
|
|
25913
25330
|
const safeData = data ?? [];
|
|
25914
25331
|
const sortedData = React79.useMemo(() => {
|
|
@@ -28136,7 +27553,6 @@ var init_GraphView = __esm({
|
|
|
28136
27553
|
"use client";
|
|
28137
27554
|
init_cn();
|
|
28138
27555
|
init_atoms2();
|
|
28139
|
-
init_useTranslate();
|
|
28140
27556
|
GROUP_COLORS = [
|
|
28141
27557
|
"#3b82f6",
|
|
28142
27558
|
// blue-500
|
|
@@ -28169,7 +27585,7 @@ var init_GraphView = __esm({
|
|
|
28169
27585
|
showLabels = true,
|
|
28170
27586
|
zoomToFit = true
|
|
28171
27587
|
}) => {
|
|
28172
|
-
const { t } = useTranslate();
|
|
27588
|
+
const { t } = hooks.useTranslate();
|
|
28173
27589
|
const containerRef = React79.useRef(null);
|
|
28174
27590
|
const animRef = React79.useRef(0);
|
|
28175
27591
|
const [simNodes, setSimNodes] = React79.useState([]);
|
|
@@ -28462,7 +27878,6 @@ var init_NumberStepper = __esm({
|
|
|
28462
27878
|
init_cn();
|
|
28463
27879
|
init_Icon();
|
|
28464
27880
|
init_useEventBus();
|
|
28465
|
-
init_useTranslate();
|
|
28466
27881
|
sizeStyles10 = {
|
|
28467
27882
|
sm: {
|
|
28468
27883
|
button: "w-7 h-7",
|
|
@@ -28496,7 +27911,7 @@ var init_NumberStepper = __esm({
|
|
|
28496
27911
|
label
|
|
28497
27912
|
}) => {
|
|
28498
27913
|
const eventBus = useSafeEventBus5();
|
|
28499
|
-
const { t } = useTranslate();
|
|
27914
|
+
const { t } = hooks.useTranslate();
|
|
28500
27915
|
const intervalRef = React79.useRef(null);
|
|
28501
27916
|
const timeoutRef = React79.useRef(null);
|
|
28502
27917
|
const isAtMin = min !== void 0 && value <= min;
|
|
@@ -28803,7 +28218,6 @@ var init_UploadDropZone = __esm({
|
|
|
28803
28218
|
init_Icon();
|
|
28804
28219
|
init_Typography();
|
|
28805
28220
|
init_useEventBus();
|
|
28806
|
-
init_useTranslate();
|
|
28807
28221
|
exports.UploadDropZone = ({
|
|
28808
28222
|
accept,
|
|
28809
28223
|
maxSize,
|
|
@@ -28816,7 +28230,7 @@ var init_UploadDropZone = __esm({
|
|
|
28816
28230
|
onFiles,
|
|
28817
28231
|
className
|
|
28818
28232
|
}) => {
|
|
28819
|
-
const { t } = useTranslate();
|
|
28233
|
+
const { t } = hooks.useTranslate();
|
|
28820
28234
|
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
28821
28235
|
const [isDragOver, setIsDragOver] = React79.useState(false);
|
|
28822
28236
|
const [error, setError] = React79.useState(null);
|
|
@@ -28970,7 +28384,6 @@ var init_Lightbox = __esm({
|
|
|
28970
28384
|
init_Icon();
|
|
28971
28385
|
init_cn();
|
|
28972
28386
|
init_useEventBus();
|
|
28973
|
-
init_useTranslate();
|
|
28974
28387
|
exports.Lightbox = ({
|
|
28975
28388
|
images = [],
|
|
28976
28389
|
currentIndex = 0,
|
|
@@ -28985,7 +28398,7 @@ var init_Lightbox = __esm({
|
|
|
28985
28398
|
const [index, setIndex] = React79.useState(currentIndex);
|
|
28986
28399
|
const [touchStartX, setTouchStartX] = React79.useState(null);
|
|
28987
28400
|
const eventBus = useSafeEventBus8();
|
|
28988
|
-
const { t } = useTranslate();
|
|
28401
|
+
const { t } = hooks.useTranslate();
|
|
28989
28402
|
React79.useEffect(() => {
|
|
28990
28403
|
setIndex(currentIndex);
|
|
28991
28404
|
}, [currentIndex]);
|
|
@@ -29223,7 +28636,7 @@ function TableView({
|
|
|
29223
28636
|
dndRoot
|
|
29224
28637
|
}) {
|
|
29225
28638
|
const eventBus = useEventBus();
|
|
29226
|
-
const { t } = useTranslate();
|
|
28639
|
+
const { t } = hooks.useTranslate();
|
|
29227
28640
|
const [visibleCount, setVisibleCount] = React79__namespace.default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
29228
28641
|
const [localSelected, setLocalSelected] = React79__namespace.default.useState(/* @__PURE__ */ new Set());
|
|
29229
28642
|
const colDefs = columns ?? fields ?? [];
|
|
@@ -29455,7 +28868,6 @@ var init_TableView = __esm({
|
|
|
29455
28868
|
init_cn();
|
|
29456
28869
|
init_getNestedValue();
|
|
29457
28870
|
init_useEventBus();
|
|
29458
|
-
init_useTranslate();
|
|
29459
28871
|
init_Box();
|
|
29460
28872
|
init_Stack();
|
|
29461
28873
|
init_Typography();
|
|
@@ -29659,7 +29071,6 @@ var init_Meter = __esm({
|
|
|
29659
29071
|
init_LoadingState();
|
|
29660
29072
|
init_ErrorState();
|
|
29661
29073
|
init_useEventBus();
|
|
29662
|
-
init_useTranslate();
|
|
29663
29074
|
DEFAULT_THRESHOLDS = [
|
|
29664
29075
|
{ value: 30, color: "var(--color-error)" },
|
|
29665
29076
|
{ value: 70, color: "var(--color-warning)" },
|
|
@@ -29687,7 +29098,7 @@ var init_Meter = __esm({
|
|
|
29687
29098
|
className
|
|
29688
29099
|
}) => {
|
|
29689
29100
|
const eventBus = useEventBus();
|
|
29690
|
-
const { t } = useTranslate();
|
|
29101
|
+
const { t } = hooks.useTranslate();
|
|
29691
29102
|
const handleAction = React79.useCallback(
|
|
29692
29103
|
(action) => {
|
|
29693
29104
|
if (action.event) {
|
|
@@ -31606,7 +31017,6 @@ var init_VoteStack = __esm({
|
|
|
31606
31017
|
init_cn();
|
|
31607
31018
|
init_Icon();
|
|
31608
31019
|
init_useEventBus();
|
|
31609
|
-
init_useTranslate();
|
|
31610
31020
|
sizeStyles12 = {
|
|
31611
31021
|
sm: {
|
|
31612
31022
|
button: "w-7 h-7",
|
|
@@ -31639,7 +31049,7 @@ var init_VoteStack = __esm({
|
|
|
31639
31049
|
const isUp = userVote === "up";
|
|
31640
31050
|
const isDown = userVote === "down";
|
|
31641
31051
|
const eventBus = useEventBus();
|
|
31642
|
-
const { t } = useTranslate();
|
|
31052
|
+
const { t } = hooks.useTranslate();
|
|
31643
31053
|
const handleUp = React79.useCallback(() => {
|
|
31644
31054
|
const next = isUp ? null : "up";
|
|
31645
31055
|
onVote?.(next);
|
|
@@ -32061,7 +31471,6 @@ var init_QrScanner = __esm({
|
|
|
32061
31471
|
init_atoms2();
|
|
32062
31472
|
init_Icon();
|
|
32063
31473
|
init_useEventBus();
|
|
32064
|
-
init_useTranslate();
|
|
32065
31474
|
exports.QrScanner = ({
|
|
32066
31475
|
onScan,
|
|
32067
31476
|
scanEvent,
|
|
@@ -32074,7 +31483,7 @@ var init_QrScanner = __esm({
|
|
|
32074
31483
|
className
|
|
32075
31484
|
}) => {
|
|
32076
31485
|
const eventBus = useEventBus();
|
|
32077
|
-
const { t } = useTranslate();
|
|
31486
|
+
const { t } = hooks.useTranslate();
|
|
32078
31487
|
const videoRef = React79.useRef(null);
|
|
32079
31488
|
const streamRef = React79.useRef(null);
|
|
32080
31489
|
const scanIntervalRef = React79.useRef(null);
|
|
@@ -32288,7 +31697,6 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32288
31697
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
32289
31698
|
init_cn();
|
|
32290
31699
|
init_useEventBus();
|
|
32291
|
-
init_useTranslate();
|
|
32292
31700
|
init_Typography();
|
|
32293
31701
|
init_Box();
|
|
32294
31702
|
init_Label();
|
|
@@ -32344,7 +31752,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
32344
31752
|
className
|
|
32345
31753
|
}) => {
|
|
32346
31754
|
const eventBus = useEventBus();
|
|
32347
|
-
const { t } = useTranslate();
|
|
31755
|
+
const { t } = hooks.useTranslate();
|
|
32348
31756
|
const hint = constraintHint(constraint, t);
|
|
32349
31757
|
const error = validateSelection(selected, constraint, t);
|
|
32350
31758
|
const inputName = `option-${groupId}`;
|
|
@@ -32768,7 +32176,7 @@ function changeBlockType(block, type) {
|
|
|
32768
32176
|
return { id: block.id, type, content: seed };
|
|
32769
32177
|
}
|
|
32770
32178
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
32771
|
-
const { t } = useTranslate();
|
|
32179
|
+
const { t } = hooks.useTranslate();
|
|
32772
32180
|
const [open, setOpen] = React79.useState(false);
|
|
32773
32181
|
const ref = React79.useRef(null);
|
|
32774
32182
|
React79.useEffect(() => {
|
|
@@ -32925,7 +32333,7 @@ function BlockRow({
|
|
|
32925
32333
|
onInsertAfter,
|
|
32926
32334
|
onChangeType
|
|
32927
32335
|
}) {
|
|
32928
|
-
const { t } = useTranslate();
|
|
32336
|
+
const { t } = hooks.useTranslate();
|
|
32929
32337
|
const setContent = React79.useCallback(
|
|
32930
32338
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
32931
32339
|
[onUpdate]
|
|
@@ -33244,7 +32652,6 @@ var init_RichBlockEditor = __esm({
|
|
|
33244
32652
|
init_Input();
|
|
33245
32653
|
init_Icon();
|
|
33246
32654
|
init_useEventBus();
|
|
33247
|
-
init_useTranslate();
|
|
33248
32655
|
TOOLBAR_ENTRIES = [
|
|
33249
32656
|
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: LucideIcons2.Type },
|
|
33250
32657
|
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: LucideIcons2.Heading1 },
|
|
@@ -33301,7 +32708,7 @@ var init_RichBlockEditor = __esm({
|
|
|
33301
32708
|
showToolbar = true,
|
|
33302
32709
|
className
|
|
33303
32710
|
}) => {
|
|
33304
|
-
const { t } = useTranslate();
|
|
32711
|
+
const { t } = hooks.useTranslate();
|
|
33305
32712
|
const [blocks, setBlocks] = React79.useState(
|
|
33306
32713
|
() => normalizeBlocks(initialBlocks)
|
|
33307
32714
|
);
|
|
@@ -33435,7 +32842,6 @@ var init_ReplyTree = __esm({
|
|
|
33435
32842
|
"use client";
|
|
33436
32843
|
init_cn();
|
|
33437
32844
|
init_useEventBus();
|
|
33438
|
-
init_useTranslate();
|
|
33439
32845
|
init_atoms2();
|
|
33440
32846
|
init_VoteStack();
|
|
33441
32847
|
ReplyTreeNode = ({
|
|
@@ -33455,7 +32861,7 @@ var init_ReplyTree = __esm({
|
|
|
33455
32861
|
showActions
|
|
33456
32862
|
}) => {
|
|
33457
32863
|
const eventBus = useEventBus();
|
|
33458
|
-
const { t } = useTranslate();
|
|
32864
|
+
const { t } = hooks.useTranslate();
|
|
33459
32865
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
33460
32866
|
const isCollapsed = collapsedSet.has(node.id);
|
|
33461
32867
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -33646,7 +33052,7 @@ var init_ReplyTree = __esm({
|
|
|
33646
33052
|
showActions = true,
|
|
33647
33053
|
className
|
|
33648
33054
|
}) => {
|
|
33649
|
-
const { t } = useTranslate();
|
|
33055
|
+
const { t } = hooks.useTranslate();
|
|
33650
33056
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
33651
33057
|
const [collapsedSet, setCollapsedSet] = React79.useState(() => {
|
|
33652
33058
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -33743,7 +33149,6 @@ var init_VersionDiff = __esm({
|
|
|
33743
33149
|
"use client";
|
|
33744
33150
|
init_cn();
|
|
33745
33151
|
init_useEventBus();
|
|
33746
|
-
init_useTranslate();
|
|
33747
33152
|
init_atoms2();
|
|
33748
33153
|
init_Stack();
|
|
33749
33154
|
INLINE_STYLES = {
|
|
@@ -33766,7 +33171,7 @@ var init_VersionDiff = __esm({
|
|
|
33766
33171
|
language,
|
|
33767
33172
|
className
|
|
33768
33173
|
}) => {
|
|
33769
|
-
const { t } = useTranslate();
|
|
33174
|
+
const { t } = hooks.useTranslate();
|
|
33770
33175
|
const eventBus = useEventBus();
|
|
33771
33176
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
33772
33177
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -34059,12 +33464,11 @@ var init_DocBreadcrumb = __esm({
|
|
|
34059
33464
|
init_Stack();
|
|
34060
33465
|
init_Typography();
|
|
34061
33466
|
init_Icon();
|
|
34062
|
-
init_useTranslate();
|
|
34063
33467
|
exports.DocBreadcrumb = ({
|
|
34064
33468
|
items,
|
|
34065
33469
|
className
|
|
34066
33470
|
}) => {
|
|
34067
|
-
const { t } = useTranslate();
|
|
33471
|
+
const { t } = hooks.useTranslate();
|
|
34068
33472
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34069
33473
|
exports.Box,
|
|
34070
33474
|
{
|
|
@@ -34315,7 +33719,7 @@ function DocSearch({
|
|
|
34315
33719
|
onSearch,
|
|
34316
33720
|
className
|
|
34317
33721
|
}) {
|
|
34318
|
-
const { t } = useTranslate();
|
|
33722
|
+
const { t } = hooks.useTranslate();
|
|
34319
33723
|
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
34320
33724
|
const [query, setQuery] = React79.useState("");
|
|
34321
33725
|
const [results, setResults] = React79.useState([]);
|
|
@@ -34488,7 +33892,6 @@ var init_DocSearch = __esm({
|
|
|
34488
33892
|
init_Typography();
|
|
34489
33893
|
init_Icon();
|
|
34490
33894
|
init_Input();
|
|
34491
|
-
init_useTranslate();
|
|
34492
33895
|
}
|
|
34493
33896
|
});
|
|
34494
33897
|
var DocSidebarCategory; exports.DocSidebar = void 0;
|
|
@@ -34501,7 +33904,6 @@ var init_DocSidebar = __esm({
|
|
|
34501
33904
|
init_Stack();
|
|
34502
33905
|
init_Typography();
|
|
34503
33906
|
init_Icon();
|
|
34504
|
-
init_useTranslate();
|
|
34505
33907
|
DocSidebarCategory = ({ item, depth }) => {
|
|
34506
33908
|
const [expanded, setExpanded] = React79.useState(
|
|
34507
33909
|
() => item.items?.some(function hasActive(child) {
|
|
@@ -34586,7 +33988,7 @@ var init_DocSidebar = __esm({
|
|
|
34586
33988
|
items,
|
|
34587
33989
|
className
|
|
34588
33990
|
}) => {
|
|
34589
|
-
const { t } = useTranslate();
|
|
33991
|
+
const { t } = hooks.useTranslate();
|
|
34590
33992
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34591
33993
|
exports.Box,
|
|
34592
33994
|
{
|
|
@@ -34608,13 +34010,12 @@ var init_DocTOC = __esm({
|
|
|
34608
34010
|
init_Box();
|
|
34609
34011
|
init_Stack();
|
|
34610
34012
|
init_Typography();
|
|
34611
|
-
init_useTranslate();
|
|
34612
34013
|
exports.DocTOC = ({
|
|
34613
34014
|
items,
|
|
34614
34015
|
activeId,
|
|
34615
34016
|
className
|
|
34616
34017
|
}) => {
|
|
34617
|
-
const { t } = useTranslate();
|
|
34018
|
+
const { t } = hooks.useTranslate();
|
|
34618
34019
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
34619
34020
|
exports.Box,
|
|
34620
34021
|
{
|
|
@@ -35342,7 +34743,6 @@ var init_FormSection = __esm({
|
|
|
35342
34743
|
init_Button();
|
|
35343
34744
|
init_Stack();
|
|
35344
34745
|
init_Icon();
|
|
35345
|
-
init_useTranslate();
|
|
35346
34746
|
init_useEventBus();
|
|
35347
34747
|
exports.FormSection = ({
|
|
35348
34748
|
title,
|
|
@@ -35355,7 +34755,7 @@ var init_FormSection = __esm({
|
|
|
35355
34755
|
className
|
|
35356
34756
|
}) => {
|
|
35357
34757
|
const [collapsed, setCollapsed] = React79__namespace.default.useState(defaultCollapsed);
|
|
35358
|
-
const { t } = useTranslate();
|
|
34758
|
+
const { t } = hooks.useTranslate();
|
|
35359
34759
|
const eventBus = useEventBus();
|
|
35360
34760
|
const gridClass = {
|
|
35361
34761
|
1: "grid-cols-1",
|
|
@@ -35471,7 +34871,6 @@ var init_Header = __esm({
|
|
|
35471
34871
|
init_Stack();
|
|
35472
34872
|
init_Typography();
|
|
35473
34873
|
init_cn();
|
|
35474
|
-
init_useTranslate();
|
|
35475
34874
|
lookStyles8 = {
|
|
35476
34875
|
"compact-bar": "",
|
|
35477
34876
|
hero: "py-section min-h-[200px] [&_h1]:text-display-1",
|
|
@@ -35500,7 +34899,7 @@ var init_Header = __esm({
|
|
|
35500
34899
|
onLogoClick,
|
|
35501
34900
|
className
|
|
35502
34901
|
}) => {
|
|
35503
|
-
const { t } = useTranslate();
|
|
34902
|
+
const { t } = hooks.useTranslate();
|
|
35504
34903
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
35505
34904
|
const userInitials = userAvatar?.initials || userName?.[0]?.toUpperCase() || "U";
|
|
35506
34905
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -35791,7 +35190,6 @@ var init_Sidebar = __esm({
|
|
|
35791
35190
|
init_Typography();
|
|
35792
35191
|
init_cn();
|
|
35793
35192
|
init_useEventBus();
|
|
35794
|
-
init_useTranslate();
|
|
35795
35193
|
SidebarNavItem = ({ item, collapsed }) => {
|
|
35796
35194
|
const Icon3 = item.icon;
|
|
35797
35195
|
const isActive = item.active ?? item.isActive;
|
|
@@ -35855,7 +35253,7 @@ var init_Sidebar = __esm({
|
|
|
35855
35253
|
className
|
|
35856
35254
|
}) => {
|
|
35857
35255
|
const { emit } = useEventBus();
|
|
35858
|
-
const { t } = useTranslate();
|
|
35256
|
+
const { t } = hooks.useTranslate();
|
|
35859
35257
|
const [internalCollapsed, setInternalCollapsed] = React79.useState(defaultCollapsed);
|
|
35860
35258
|
const collapsed = controlledCollapsed !== void 0 ? controlledCollapsed : internalCollapsed;
|
|
35861
35259
|
const handleToggle = React79.useCallback(() => {
|
|
@@ -36045,7 +35443,6 @@ var init_WizardContainer = __esm({
|
|
|
36045
35443
|
init_Stack();
|
|
36046
35444
|
init_Icon();
|
|
36047
35445
|
init_cn();
|
|
36048
|
-
init_useTranslate();
|
|
36049
35446
|
exports.WizardContainer = ({
|
|
36050
35447
|
steps,
|
|
36051
35448
|
currentStep: controlledStep,
|
|
@@ -36058,7 +35455,7 @@ var init_WizardContainer = __esm({
|
|
|
36058
35455
|
entity: _entity
|
|
36059
35456
|
// Accept but don't use directly yet
|
|
36060
35457
|
}) => {
|
|
36061
|
-
const { t } = useTranslate();
|
|
35458
|
+
const { t } = hooks.useTranslate();
|
|
36062
35459
|
const [internalStep, setInternalStep] = React79.useState(0);
|
|
36063
35460
|
const normalizedControlledStep = (() => {
|
|
36064
35461
|
if (controlledStep === void 0 || controlledStep === null)
|
|
@@ -36222,14 +35619,14 @@ var init_WizardContainer = __esm({
|
|
|
36222
35619
|
});
|
|
36223
35620
|
function calculateComplexity(schema) {
|
|
36224
35621
|
if (!schema) return 1;
|
|
36225
|
-
const
|
|
35622
|
+
const entities = schema.dataEntities?.length || 0;
|
|
36226
35623
|
const pages = schema.ui?.pages?.length || 0;
|
|
36227
35624
|
const traits2 = schema.traits?.length || 0;
|
|
36228
35625
|
const sections = schema.ui?.pages?.reduce(
|
|
36229
35626
|
(acc, page) => acc + (page.sections?.length || 0),
|
|
36230
35627
|
0
|
|
36231
35628
|
) || 0;
|
|
36232
|
-
return
|
|
35629
|
+
return entities * 3 + pages * 2 + traits2 * 2 + sections * 1;
|
|
36233
35630
|
}
|
|
36234
35631
|
function getOrbitalType(complexity) {
|
|
36235
35632
|
if (complexity <= 3) return "1s";
|
|
@@ -36619,7 +36016,6 @@ var init_SignaturePad = __esm({
|
|
|
36619
36016
|
init_LoadingState();
|
|
36620
36017
|
init_ErrorState();
|
|
36621
36018
|
init_useEventBus();
|
|
36622
|
-
init_useTranslate();
|
|
36623
36019
|
exports.SignaturePad = ({
|
|
36624
36020
|
label,
|
|
36625
36021
|
helperText,
|
|
@@ -36637,7 +36033,7 @@ var init_SignaturePad = __esm({
|
|
|
36637
36033
|
className
|
|
36638
36034
|
}) => {
|
|
36639
36035
|
const eventBus = useEventBus();
|
|
36640
|
-
const { t } = useTranslate();
|
|
36036
|
+
const { t } = hooks.useTranslate();
|
|
36641
36037
|
const resolvedLabel = label ?? t("signaturePad.label");
|
|
36642
36038
|
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
36643
36039
|
const canvasRef = React79.useRef(null);
|
|
@@ -36813,7 +36209,6 @@ var init_DocumentViewer = __esm({
|
|
|
36813
36209
|
init_EmptyState();
|
|
36814
36210
|
init_Tabs();
|
|
36815
36211
|
init_useEventBus();
|
|
36816
|
-
init_useTranslate();
|
|
36817
36212
|
exports.DocumentViewer = ({
|
|
36818
36213
|
title,
|
|
36819
36214
|
src,
|
|
@@ -36833,7 +36228,7 @@ var init_DocumentViewer = __esm({
|
|
|
36833
36228
|
className
|
|
36834
36229
|
}) => {
|
|
36835
36230
|
const eventBus = useEventBus();
|
|
36836
|
-
const { t } = useTranslate();
|
|
36231
|
+
const { t } = hooks.useTranslate();
|
|
36837
36232
|
const [zoom, setZoom] = React79.useState(100);
|
|
36838
36233
|
const [currentPage, setCurrentPage] = React79.useState(propPage ?? 1);
|
|
36839
36234
|
const [activeDocIndex, setActiveDocIndex] = React79.useState(0);
|
|
@@ -37018,7 +36413,6 @@ var init_GraphCanvas = __esm({
|
|
|
37018
36413
|
init_ErrorState();
|
|
37019
36414
|
init_EmptyState();
|
|
37020
36415
|
init_useEventBus();
|
|
37021
|
-
init_useTranslate();
|
|
37022
36416
|
GROUP_COLORS2 = [
|
|
37023
36417
|
"var(--color-primary)",
|
|
37024
36418
|
"var(--color-success)",
|
|
@@ -37045,7 +36439,7 @@ var init_GraphCanvas = __esm({
|
|
|
37045
36439
|
className
|
|
37046
36440
|
}) => {
|
|
37047
36441
|
const eventBus = useEventBus();
|
|
37048
|
-
const { t } = useTranslate();
|
|
36442
|
+
const { t } = hooks.useTranslate();
|
|
37049
36443
|
const canvasRef = React79.useRef(null);
|
|
37050
36444
|
const animRef = React79.useRef(0);
|
|
37051
36445
|
const [zoom, setZoom] = React79.useState(1);
|
|
@@ -37515,7 +36909,7 @@ function DataTable({
|
|
|
37515
36909
|
null
|
|
37516
36910
|
);
|
|
37517
36911
|
const eventBus = useEventBus();
|
|
37518
|
-
const { t } = useTranslate();
|
|
36912
|
+
const { t } = hooks.useTranslate();
|
|
37519
36913
|
const resolvedEmptyTitle = emptyTitle ?? t("table.empty.title");
|
|
37520
36914
|
const resolvedEmptyDescription = emptyDescription ?? t("table.empty.description");
|
|
37521
36915
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
@@ -37876,7 +37270,6 @@ var init_DataTable = __esm({
|
|
|
37876
37270
|
init_molecules2();
|
|
37877
37271
|
init_Icon();
|
|
37878
37272
|
init_useEventBus();
|
|
37879
|
-
init_useTranslate();
|
|
37880
37273
|
init_types3();
|
|
37881
37274
|
lookStyles9 = {
|
|
37882
37275
|
dense: "",
|
|
@@ -37894,7 +37287,7 @@ function DebuggerBoard({
|
|
|
37894
37287
|
className
|
|
37895
37288
|
}) {
|
|
37896
37289
|
const { emit } = useEventBus();
|
|
37897
|
-
const { t } = useTranslate();
|
|
37290
|
+
const { t } = hooks.useTranslate();
|
|
37898
37291
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
37899
37292
|
const [flaggedLines, setFlaggedLines] = React79.useState(/* @__PURE__ */ new Set());
|
|
37900
37293
|
const [headerError, setHeaderError] = React79.useState(false);
|
|
@@ -38023,7 +37416,6 @@ var init_DebuggerBoard = __esm({
|
|
|
38023
37416
|
"components/game/organisms/puzzles/debugger/DebuggerBoard.tsx"() {
|
|
38024
37417
|
init_atoms2();
|
|
38025
37418
|
init_useEventBus();
|
|
38026
|
-
init_useTranslate();
|
|
38027
37419
|
DebuggerBoard.displayName = "DebuggerBoard";
|
|
38028
37420
|
}
|
|
38029
37421
|
});
|
|
@@ -38194,7 +37586,6 @@ var init_DetailPanel = __esm({
|
|
|
38194
37586
|
init_cn();
|
|
38195
37587
|
init_getNestedValue();
|
|
38196
37588
|
init_useEventBus();
|
|
38197
|
-
init_useTranslate();
|
|
38198
37589
|
ReactMarkdown2 = React79.lazy(() => import('react-markdown'));
|
|
38199
37590
|
exports.DetailPanel = ({
|
|
38200
37591
|
title: propTitle,
|
|
@@ -38214,7 +37605,7 @@ var init_DetailPanel = __esm({
|
|
|
38214
37605
|
error
|
|
38215
37606
|
}) => {
|
|
38216
37607
|
const eventBus = useEventBus();
|
|
38217
|
-
const { t } = useTranslate();
|
|
37608
|
+
const { t } = hooks.useTranslate();
|
|
38218
37609
|
const isFieldDefArray = (arr) => {
|
|
38219
37610
|
if (!arr || arr.length === 0) return false;
|
|
38220
37611
|
const first = arr[0];
|
|
@@ -38707,7 +38098,7 @@ function CompactView({
|
|
|
38707
38098
|
stateStyles,
|
|
38708
38099
|
className
|
|
38709
38100
|
}) {
|
|
38710
|
-
const { t } = useTranslate();
|
|
38101
|
+
const { t } = hooks.useTranslate();
|
|
38711
38102
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38712
38103
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38713
38104
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38743,7 +38134,7 @@ function FullView({
|
|
|
38743
38134
|
stateStyles,
|
|
38744
38135
|
className
|
|
38745
38136
|
}) {
|
|
38746
|
-
const { t } = useTranslate();
|
|
38137
|
+
const { t } = hooks.useTranslate();
|
|
38747
38138
|
const config = SIZE_CONFIG2[size || "md"];
|
|
38748
38139
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
38749
38140
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
@@ -38868,7 +38259,6 @@ var init_TraitStateViewer = __esm({
|
|
|
38868
38259
|
"components/game/organisms/TraitStateViewer.tsx"() {
|
|
38869
38260
|
"use client";
|
|
38870
38261
|
init_cn();
|
|
38871
|
-
init_useTranslate();
|
|
38872
38262
|
init_Box();
|
|
38873
38263
|
init_Typography();
|
|
38874
38264
|
init_Stack();
|
|
@@ -38890,7 +38280,7 @@ function RuleEditor({
|
|
|
38890
38280
|
disabled = false,
|
|
38891
38281
|
className
|
|
38892
38282
|
}) {
|
|
38893
|
-
const { t } = useTranslate();
|
|
38283
|
+
const { t } = hooks.useTranslate();
|
|
38894
38284
|
const handleWhenChange = React79.useCallback((e) => {
|
|
38895
38285
|
onChange({ ...rule, whenEvent: e.target.value });
|
|
38896
38286
|
}, [rule, onChange]);
|
|
@@ -38927,7 +38317,6 @@ var init_RuleEditor = __esm({
|
|
|
38927
38317
|
"components/game/organisms/puzzles/event-handler/RuleEditor.tsx"() {
|
|
38928
38318
|
init_atoms2();
|
|
38929
38319
|
init_cn();
|
|
38930
|
-
init_useTranslate();
|
|
38931
38320
|
RuleEditor.displayName = "RuleEditor";
|
|
38932
38321
|
}
|
|
38933
38322
|
});
|
|
@@ -38937,7 +38326,7 @@ function ObjectRulePanel({
|
|
|
38937
38326
|
disabled = false,
|
|
38938
38327
|
className
|
|
38939
38328
|
}) {
|
|
38940
|
-
const { t } = useTranslate();
|
|
38329
|
+
const { t } = hooks.useTranslate();
|
|
38941
38330
|
const maxRules = object.maxRules || 3;
|
|
38942
38331
|
const canAdd = object.rules.length < maxRules;
|
|
38943
38332
|
const handleRuleChange = React79.useCallback((index, updatedRule) => {
|
|
@@ -39002,7 +38391,6 @@ var init_ObjectRulePanel = __esm({
|
|
|
39002
38391
|
"components/game/organisms/puzzles/event-handler/ObjectRulePanel.tsx"() {
|
|
39003
38392
|
init_atoms2();
|
|
39004
38393
|
init_cn();
|
|
39005
|
-
init_useTranslate();
|
|
39006
38394
|
init_TraitStateViewer();
|
|
39007
38395
|
init_RuleEditor();
|
|
39008
38396
|
nextRuleId = 1;
|
|
@@ -39015,7 +38403,7 @@ function EventLog({
|
|
|
39015
38403
|
label,
|
|
39016
38404
|
className
|
|
39017
38405
|
}) {
|
|
39018
|
-
const { t } = useTranslate();
|
|
38406
|
+
const { t } = hooks.useTranslate();
|
|
39019
38407
|
const scrollRef = React79.useRef(null);
|
|
39020
38408
|
React79.useEffect(() => {
|
|
39021
38409
|
if (scrollRef.current) {
|
|
@@ -39047,7 +38435,6 @@ var init_EventLog = __esm({
|
|
|
39047
38435
|
"components/game/organisms/puzzles/event-handler/EventLog.tsx"() {
|
|
39048
38436
|
init_atoms2();
|
|
39049
38437
|
init_cn();
|
|
39050
|
-
init_useTranslate();
|
|
39051
38438
|
STATUS_STYLES = {
|
|
39052
38439
|
pending: "text-muted-foreground",
|
|
39053
38440
|
active: "text-primary animate-pulse",
|
|
@@ -39071,7 +38458,7 @@ function EventHandlerBoard({
|
|
|
39071
38458
|
className
|
|
39072
38459
|
}) {
|
|
39073
38460
|
const { emit } = useEventBus();
|
|
39074
|
-
const { t } = useTranslate();
|
|
38461
|
+
const { t } = hooks.useTranslate();
|
|
39075
38462
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
39076
38463
|
const entityObjects = resolved?.objects ?? [];
|
|
39077
38464
|
const [objects, setObjects] = React79.useState(entityObjects);
|
|
@@ -39261,7 +38648,6 @@ var init_EventHandlerBoard = __esm({
|
|
|
39261
38648
|
init_atoms2();
|
|
39262
38649
|
init_cn();
|
|
39263
38650
|
init_useEventBus();
|
|
39264
|
-
init_useTranslate();
|
|
39265
38651
|
init_TraitStateViewer();
|
|
39266
38652
|
init_ObjectRulePanel();
|
|
39267
38653
|
init_EventLog();
|
|
@@ -39331,7 +38717,6 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39331
38717
|
"use client";
|
|
39332
38718
|
init_cn();
|
|
39333
38719
|
init_useEventBus();
|
|
39334
|
-
init_useTranslate();
|
|
39335
38720
|
init_Stack();
|
|
39336
38721
|
init_Typography();
|
|
39337
38722
|
init_FeatureGrid();
|
|
@@ -39347,7 +38732,7 @@ var init_FeatureGridOrganism = __esm({
|
|
|
39347
38732
|
subtitle
|
|
39348
38733
|
}) => {
|
|
39349
38734
|
const eventBus = useEventBus();
|
|
39350
|
-
const { t } = useTranslate();
|
|
38735
|
+
const { t } = hooks.useTranslate();
|
|
39351
38736
|
const items = React79.useMemo(
|
|
39352
38737
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
39353
38738
|
[entity]
|
|
@@ -39514,7 +38899,6 @@ var init_Form = __esm({
|
|
|
39514
38899
|
init_RelationSelect();
|
|
39515
38900
|
init_Alert();
|
|
39516
38901
|
init_useEventBus();
|
|
39517
|
-
init_useTranslate();
|
|
39518
38902
|
init_debug();
|
|
39519
38903
|
layoutStyles = {
|
|
39520
38904
|
vertical: "flex flex-col",
|
|
@@ -39565,7 +38949,7 @@ var init_Form = __esm({
|
|
|
39565
38949
|
...props
|
|
39566
38950
|
}) => {
|
|
39567
38951
|
const eventBus = useEventBus();
|
|
39568
|
-
const { t } = useTranslate();
|
|
38952
|
+
const { t } = hooks.useTranslate();
|
|
39569
38953
|
const resolvedSubmitLabel = submitLabel ?? t("common.save");
|
|
39570
38954
|
const resolvedCancelLabel = cancelLabel ?? t("common.cancel");
|
|
39571
38955
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
@@ -40681,7 +40065,6 @@ var init_HeroOrganism = __esm({
|
|
|
40681
40065
|
"use client";
|
|
40682
40066
|
init_cn();
|
|
40683
40067
|
init_useEventBus();
|
|
40684
|
-
init_useTranslate();
|
|
40685
40068
|
init_HeroSection();
|
|
40686
40069
|
init_LoadingState();
|
|
40687
40070
|
init_ErrorState();
|
|
@@ -40693,7 +40076,7 @@ var init_HeroOrganism = __esm({
|
|
|
40693
40076
|
children
|
|
40694
40077
|
}) => {
|
|
40695
40078
|
const eventBus = useEventBus();
|
|
40696
|
-
const { t } = useTranslate();
|
|
40079
|
+
const { t } = hooks.useTranslate();
|
|
40697
40080
|
const resolved = React79.useMemo(
|
|
40698
40081
|
() => Array.isArray(entity) ? entity[0] : entity && typeof entity === "object" ? entity : void 0,
|
|
40699
40082
|
[entity]
|
|
@@ -40787,7 +40170,6 @@ exports.LandingPageTemplate = void 0;
|
|
|
40787
40170
|
var init_LandingPageTemplate = __esm({
|
|
40788
40171
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
40789
40172
|
init_cn();
|
|
40790
|
-
init_useTranslate();
|
|
40791
40173
|
init_Stack();
|
|
40792
40174
|
init_Box();
|
|
40793
40175
|
init_Container();
|
|
@@ -40805,7 +40187,7 @@ var init_LandingPageTemplate = __esm({
|
|
|
40805
40187
|
featureColumns = 3,
|
|
40806
40188
|
className
|
|
40807
40189
|
}) => {
|
|
40808
|
-
const { t } = useTranslate();
|
|
40190
|
+
const { t } = hooks.useTranslate();
|
|
40809
40191
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
40810
40192
|
if (!resolved) return null;
|
|
40811
40193
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -40987,7 +40369,6 @@ var init_List = __esm({
|
|
|
40987
40369
|
init_cn();
|
|
40988
40370
|
init_getNestedValue();
|
|
40989
40371
|
init_useEventBus();
|
|
40990
|
-
init_useTranslate();
|
|
40991
40372
|
init_types3();
|
|
40992
40373
|
STATUS_STYLES2 = {
|
|
40993
40374
|
complete: {
|
|
@@ -41112,7 +40493,7 @@ var init_List = __esm({
|
|
|
41112
40493
|
entityType
|
|
41113
40494
|
}) => {
|
|
41114
40495
|
const eventBus = useEventBus();
|
|
41115
|
-
const { t } = useTranslate();
|
|
40496
|
+
const { t } = hooks.useTranslate();
|
|
41116
40497
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noData");
|
|
41117
40498
|
const effectiveFieldNames = normalizeFields2(fields).length > 0 ? normalizeFields2(fields) : fieldNames;
|
|
41118
40499
|
const rawItems = React79.useMemo(() => {
|
|
@@ -41459,7 +40840,7 @@ function MasterDetail({
|
|
|
41459
40840
|
className,
|
|
41460
40841
|
...rest
|
|
41461
40842
|
}) {
|
|
41462
|
-
const { t } = useTranslate();
|
|
40843
|
+
const { t } = hooks.useTranslate();
|
|
41463
40844
|
const loading = externalLoading ?? false;
|
|
41464
40845
|
const isLoading = externalIsLoading ?? false;
|
|
41465
40846
|
const error = externalError ?? null;
|
|
@@ -41482,7 +40863,6 @@ var init_MasterDetail = __esm({
|
|
|
41482
40863
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
41483
40864
|
"use client";
|
|
41484
40865
|
init_DataTable();
|
|
41485
|
-
init_useTranslate();
|
|
41486
40866
|
MasterDetail.displayName = "MasterDetail";
|
|
41487
40867
|
}
|
|
41488
40868
|
});
|
|
@@ -41491,9 +40871,8 @@ var init_MasterDetailLayout = __esm({
|
|
|
41491
40871
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
41492
40872
|
init_cn();
|
|
41493
40873
|
init_Typography();
|
|
41494
|
-
init_useTranslate();
|
|
41495
40874
|
DefaultEmptyDetail = () => {
|
|
41496
|
-
const { t } = useTranslate();
|
|
40875
|
+
const { t } = hooks.useTranslate();
|
|
41497
40876
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
41498
40877
|
exports.Typography,
|
|
41499
40878
|
{
|
|
@@ -41552,7 +40931,6 @@ var init_MediaGallery = __esm({
|
|
|
41552
40931
|
init_ErrorState();
|
|
41553
40932
|
init_EmptyState();
|
|
41554
40933
|
init_useEventBus();
|
|
41555
|
-
init_useTranslate();
|
|
41556
40934
|
COLUMN_CLASSES = {
|
|
41557
40935
|
2: "grid-cols-2",
|
|
41558
40936
|
3: "grid-cols-2 sm:grid-cols-3",
|
|
@@ -41581,7 +40959,7 @@ var init_MediaGallery = __esm({
|
|
|
41581
40959
|
className
|
|
41582
40960
|
}) => {
|
|
41583
40961
|
const eventBus = useEventBus();
|
|
41584
|
-
const { t } = useTranslate();
|
|
40962
|
+
const { t } = hooks.useTranslate();
|
|
41585
40963
|
const [lightboxItem, setLightboxItem] = React79.useState(null);
|
|
41586
40964
|
const closeLightbox = React79.useCallback(() => setLightboxItem(null), []);
|
|
41587
40965
|
useEventListener("UI:LIGHTBOX_CLOSE", closeLightbox);
|
|
@@ -41916,7 +41294,7 @@ function NegotiatorBoard({
|
|
|
41916
41294
|
className
|
|
41917
41295
|
}) {
|
|
41918
41296
|
const { emit } = useEventBus();
|
|
41919
|
-
const { t } = useTranslate();
|
|
41297
|
+
const { t } = hooks.useTranslate();
|
|
41920
41298
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
41921
41299
|
const [history, setHistory] = React79.useState([]);
|
|
41922
41300
|
const [headerError, setHeaderError] = React79.useState(false);
|
|
@@ -42046,7 +41424,6 @@ var init_NegotiatorBoard = __esm({
|
|
|
42046
41424
|
"components/game/organisms/puzzles/negotiator/NegotiatorBoard.tsx"() {
|
|
42047
41425
|
init_atoms2();
|
|
42048
41426
|
init_useEventBus();
|
|
42049
|
-
init_useTranslate();
|
|
42050
41427
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
42051
41428
|
}
|
|
42052
41429
|
});
|
|
@@ -42056,7 +41433,6 @@ var init_PricingOrganism = __esm({
|
|
|
42056
41433
|
"use client";
|
|
42057
41434
|
init_cn();
|
|
42058
41435
|
init_useEventBus();
|
|
42059
|
-
init_useTranslate();
|
|
42060
41436
|
init_Stack();
|
|
42061
41437
|
init_Typography();
|
|
42062
41438
|
init_PricingGrid();
|
|
@@ -42071,7 +41447,7 @@ var init_PricingOrganism = __esm({
|
|
|
42071
41447
|
subtitle
|
|
42072
41448
|
}) => {
|
|
42073
41449
|
useEventBus();
|
|
42074
|
-
const { t } = useTranslate();
|
|
41450
|
+
const { t } = hooks.useTranslate();
|
|
42075
41451
|
const items = React79.useMemo(
|
|
42076
41452
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
42077
41453
|
[entity]
|
|
@@ -42106,7 +41482,6 @@ exports.PricingPageTemplate = void 0;
|
|
|
42106
41482
|
var init_PricingPageTemplate = __esm({
|
|
42107
41483
|
"components/marketing/templates/PricingPageTemplate.tsx"() {
|
|
42108
41484
|
init_cn();
|
|
42109
|
-
init_useTranslate();
|
|
42110
41485
|
init_Stack();
|
|
42111
41486
|
init_Box();
|
|
42112
41487
|
init_Container();
|
|
@@ -42119,7 +41494,7 @@ var init_PricingPageTemplate = __esm({
|
|
|
42119
41494
|
entity,
|
|
42120
41495
|
className
|
|
42121
41496
|
}) => {
|
|
42122
|
-
const { t } = useTranslate();
|
|
41497
|
+
const { t } = hooks.useTranslate();
|
|
42123
41498
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
42124
41499
|
if (!resolved) return null;
|
|
42125
41500
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { gap: "none", className: cn("w-full", className), children: [
|
|
@@ -42273,13 +41648,13 @@ function getEntitySnapshot() {
|
|
|
42273
41648
|
if (!entityProvider) {
|
|
42274
41649
|
return null;
|
|
42275
41650
|
}
|
|
42276
|
-
const
|
|
41651
|
+
const entities = entityProvider();
|
|
42277
41652
|
return {
|
|
42278
|
-
entities
|
|
41653
|
+
entities,
|
|
42279
41654
|
timestamp: Date.now(),
|
|
42280
|
-
totalCount:
|
|
41655
|
+
totalCount: entities.length,
|
|
42281
41656
|
singletons: {},
|
|
42282
|
-
runtime:
|
|
41657
|
+
runtime: entities.map((e) => ({ id: e.id, type: e.type, data: e.fields })),
|
|
42283
41658
|
persistent: {}
|
|
42284
41659
|
};
|
|
42285
41660
|
}
|
|
@@ -42647,7 +42022,7 @@ var init_WalkMinimap = __esm({
|
|
|
42647
42022
|
}
|
|
42648
42023
|
});
|
|
42649
42024
|
function TraitsTab({ traits: traits2 }) {
|
|
42650
|
-
const { t } = useTranslate();
|
|
42025
|
+
const { t } = hooks.useTranslate();
|
|
42651
42026
|
if (traits2.length === 0) {
|
|
42652
42027
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42653
42028
|
exports.EmptyState,
|
|
@@ -42715,12 +42090,11 @@ var init_TraitsTab = __esm({
|
|
|
42715
42090
|
init_Typography();
|
|
42716
42091
|
init_Stack();
|
|
42717
42092
|
init_EmptyState();
|
|
42718
|
-
init_useTranslate();
|
|
42719
42093
|
TraitsTab.displayName = "TraitsTab";
|
|
42720
42094
|
}
|
|
42721
42095
|
});
|
|
42722
42096
|
function TicksTab({ ticks: ticks2 }) {
|
|
42723
|
-
const { t } = useTranslate();
|
|
42097
|
+
const { t } = hooks.useTranslate();
|
|
42724
42098
|
const activeTicks = ticks2.filter((t2) => t2.active);
|
|
42725
42099
|
const inactiveTicks = ticks2.filter((t2) => !t2.active);
|
|
42726
42100
|
if (ticks2.length === 0) {
|
|
@@ -42793,12 +42167,11 @@ var init_TicksTab = __esm({
|
|
|
42793
42167
|
init_Stack();
|
|
42794
42168
|
init_Card();
|
|
42795
42169
|
init_EmptyState();
|
|
42796
|
-
init_useTranslate();
|
|
42797
42170
|
TicksTab.displayName = "TicksTab";
|
|
42798
42171
|
}
|
|
42799
42172
|
});
|
|
42800
42173
|
function EntitiesTab({ snapshot }) {
|
|
42801
|
-
const { t } = useTranslate();
|
|
42174
|
+
const { t } = hooks.useTranslate();
|
|
42802
42175
|
if (!snapshot) {
|
|
42803
42176
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
42804
42177
|
exports.EmptyState,
|
|
@@ -42867,12 +42240,11 @@ var init_EntitiesTab = __esm({
|
|
|
42867
42240
|
init_Typography();
|
|
42868
42241
|
init_Stack();
|
|
42869
42242
|
init_EmptyState();
|
|
42870
|
-
init_useTranslate();
|
|
42871
42243
|
EntitiesTab.displayName = "EntitiesTab";
|
|
42872
42244
|
}
|
|
42873
42245
|
});
|
|
42874
42246
|
function EventFlowTab({ events: events2 }) {
|
|
42875
|
-
const { t } = useTranslate();
|
|
42247
|
+
const { t } = hooks.useTranslate();
|
|
42876
42248
|
const [filter, setFilter] = React79__namespace.useState("all");
|
|
42877
42249
|
const containerRef = React79__namespace.useRef(null);
|
|
42878
42250
|
const [autoScroll, setAutoScroll] = React79__namespace.useState(true);
|
|
@@ -42984,7 +42356,6 @@ var init_EventFlowTab = __esm({
|
|
|
42984
42356
|
init_Button();
|
|
42985
42357
|
init_Checkbox();
|
|
42986
42358
|
init_EmptyState();
|
|
42987
|
-
init_useTranslate();
|
|
42988
42359
|
TYPE_BADGES = {
|
|
42989
42360
|
trait: { variant: "primary", icon: "\u{1F504}" },
|
|
42990
42361
|
tick: { variant: "warning", icon: "\u23F1\uFE0F" },
|
|
@@ -42997,7 +42368,7 @@ var init_EventFlowTab = __esm({
|
|
|
42997
42368
|
}
|
|
42998
42369
|
});
|
|
42999
42370
|
function GuardsPanel({ guards }) {
|
|
43000
|
-
const { t } = useTranslate();
|
|
42371
|
+
const { t } = hooks.useTranslate();
|
|
43001
42372
|
const [filter, setFilter] = React79__namespace.useState("all");
|
|
43002
42373
|
if (guards.length === 0) {
|
|
43003
42374
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -43079,12 +42450,11 @@ var init_GuardsPanel = __esm({
|
|
|
43079
42450
|
init_ButtonGroup();
|
|
43080
42451
|
init_Button();
|
|
43081
42452
|
init_EmptyState();
|
|
43082
|
-
init_useTranslate();
|
|
43083
42453
|
GuardsPanel.displayName = "GuardsPanel";
|
|
43084
42454
|
}
|
|
43085
42455
|
});
|
|
43086
42456
|
function VerificationTab({ checks, summary }) {
|
|
43087
|
-
const { t } = useTranslate();
|
|
42457
|
+
const { t } = hooks.useTranslate();
|
|
43088
42458
|
if (checks.length === 0) {
|
|
43089
42459
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43090
42460
|
exports.EmptyState,
|
|
@@ -43155,7 +42525,6 @@ var init_VerificationTab = __esm({
|
|
|
43155
42525
|
init_Typography();
|
|
43156
42526
|
init_Stack();
|
|
43157
42527
|
init_EmptyState();
|
|
43158
|
-
init_useTranslate();
|
|
43159
42528
|
STATUS_CONFIG = {
|
|
43160
42529
|
pass: { variant: "success", icon: "\u2713", label: "PASS" },
|
|
43161
42530
|
fail: { variant: "danger", icon: "\u2717", label: "FAIL" },
|
|
@@ -43175,7 +42544,7 @@ function EffectBadge({ effect }) {
|
|
|
43175
42544
|
] });
|
|
43176
42545
|
}
|
|
43177
42546
|
function TransitionTimeline({ transitions }) {
|
|
43178
|
-
const { t } = useTranslate();
|
|
42547
|
+
const { t } = hooks.useTranslate();
|
|
43179
42548
|
const containerRef = React79__namespace.useRef(null);
|
|
43180
42549
|
const [autoScroll, setAutoScroll] = React79__namespace.useState(true);
|
|
43181
42550
|
const [expandedId, setExpandedId] = React79__namespace.useState(null);
|
|
@@ -43291,7 +42660,6 @@ var init_TransitionTimeline = __esm({
|
|
|
43291
42660
|
init_Typography();
|
|
43292
42661
|
init_EmptyState();
|
|
43293
42662
|
init_Checkbox();
|
|
43294
|
-
init_useTranslate();
|
|
43295
42663
|
EFFECT_STATUS_VARIANT = {
|
|
43296
42664
|
executed: "success",
|
|
43297
42665
|
failed: "danger",
|
|
@@ -43307,7 +42675,7 @@ function StatRow({ label, value, variant }) {
|
|
|
43307
42675
|
] });
|
|
43308
42676
|
}
|
|
43309
42677
|
function ServerBridgeTab({ bridge }) {
|
|
43310
|
-
const { t } = useTranslate();
|
|
42678
|
+
const { t } = hooks.useTranslate();
|
|
43311
42679
|
if (!bridge) {
|
|
43312
42680
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43313
42681
|
exports.EmptyState,
|
|
@@ -43381,7 +42749,6 @@ var init_ServerBridgeTab = __esm({
|
|
|
43381
42749
|
init_Stack();
|
|
43382
42750
|
init_Card();
|
|
43383
42751
|
init_EmptyState();
|
|
43384
|
-
init_useTranslate();
|
|
43385
42752
|
ServerBridgeTab.displayName = "ServerBridgeTab";
|
|
43386
42753
|
}
|
|
43387
42754
|
});
|
|
@@ -43460,8 +42827,8 @@ function getAllEvents(traits2) {
|
|
|
43460
42827
|
}
|
|
43461
42828
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
43462
42829
|
const eventBus = useEventBus();
|
|
43463
|
-
const { t } = useTranslate();
|
|
43464
|
-
const [
|
|
42830
|
+
const { t } = hooks.useTranslate();
|
|
42831
|
+
const [log8, setLog] = React79__namespace.useState([]);
|
|
43465
42832
|
const prevStatesRef = React79__namespace.useRef(/* @__PURE__ */ new Map());
|
|
43466
42833
|
React79__namespace.useEffect(() => {
|
|
43467
42834
|
for (const trait of traits2) {
|
|
@@ -43525,9 +42892,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
43525
42892
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
43526
42893
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(exports.Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
43527
42894
|
] }),
|
|
43528
|
-
|
|
42895
|
+
log8.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
43529
42896
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
43530
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children:
|
|
42897
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Stack, { gap: "xs", children: log8.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
43531
42898
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
43532
42899
|
" ",
|
|
43533
42900
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
|
|
@@ -43546,7 +42913,6 @@ var init_EventDispatcherTab = __esm({
|
|
|
43546
42913
|
init_Stack();
|
|
43547
42914
|
init_EmptyState();
|
|
43548
42915
|
init_useEventBus();
|
|
43549
|
-
init_useTranslate();
|
|
43550
42916
|
EventDispatcherTab.displayName = "EventDispatcherTab";
|
|
43551
42917
|
}
|
|
43552
42918
|
});
|
|
@@ -43557,7 +42923,7 @@ var init_RuntimeDebugger = __esm({
|
|
|
43557
42923
|
}
|
|
43558
42924
|
});
|
|
43559
42925
|
function ServerResponseRow({ sr }) {
|
|
43560
|
-
const { t } = useTranslate();
|
|
42926
|
+
const { t } = hooks.useTranslate();
|
|
43561
42927
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
43562
42928
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
43563
42929
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -43583,7 +42949,7 @@ function ServerResponseRow({ sr }) {
|
|
|
43583
42949
|
] });
|
|
43584
42950
|
}
|
|
43585
42951
|
function TransitionRow({ trace }) {
|
|
43586
|
-
const { t } = useTranslate();
|
|
42952
|
+
const { t } = hooks.useTranslate();
|
|
43587
42953
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
43588
42954
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
43589
42955
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -43632,7 +42998,7 @@ function VerifyModePanel({
|
|
|
43632
42998
|
serverCount,
|
|
43633
42999
|
localCount
|
|
43634
43000
|
}) {
|
|
43635
|
-
const { t } = useTranslate();
|
|
43001
|
+
const { t } = hooks.useTranslate();
|
|
43636
43002
|
const [expanded, setExpanded] = React79__namespace.useState(true);
|
|
43637
43003
|
const scrollRef = React79__namespace.useRef(null);
|
|
43638
43004
|
const prevCountRef = React79__namespace.useRef(0);
|
|
@@ -43692,7 +43058,7 @@ function RuntimeDebugger({
|
|
|
43692
43058
|
defaultTab,
|
|
43693
43059
|
schema
|
|
43694
43060
|
}) {
|
|
43695
|
-
const { t } = useTranslate();
|
|
43061
|
+
const { t } = hooks.useTranslate();
|
|
43696
43062
|
const [isCollapsed, setIsCollapsed] = React79__namespace.useState(mode === "verify" ? true : defaultCollapsed);
|
|
43697
43063
|
const [isVisible, setIsVisible] = React79__namespace.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
43698
43064
|
const debugData = useDebugData();
|
|
@@ -43921,7 +43287,6 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
43921
43287
|
init_TransitionTimeline();
|
|
43922
43288
|
init_ServerBridgeTab();
|
|
43923
43289
|
init_EventDispatcherTab();
|
|
43924
|
-
init_useTranslate();
|
|
43925
43290
|
init_RuntimeDebugger();
|
|
43926
43291
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
43927
43292
|
}
|
|
@@ -44215,7 +43580,7 @@ function SequencerBoard({
|
|
|
44215
43580
|
className
|
|
44216
43581
|
}) {
|
|
44217
43582
|
const { emit } = useEventBus();
|
|
44218
|
-
const { t } = useTranslate();
|
|
43583
|
+
const { t } = hooks.useTranslate();
|
|
44219
43584
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44220
43585
|
const [headerError, setHeaderError] = React79.useState(false);
|
|
44221
43586
|
const [slots, setSlots] = React79.useState(
|
|
@@ -44408,7 +43773,6 @@ var init_SequencerBoard = __esm({
|
|
|
44408
43773
|
init_atoms2();
|
|
44409
43774
|
init_cn();
|
|
44410
43775
|
init_useEventBus();
|
|
44411
|
-
init_useTranslate();
|
|
44412
43776
|
init_TraitStateViewer();
|
|
44413
43777
|
init_SequenceBar();
|
|
44414
43778
|
init_ActionPalette();
|
|
@@ -44427,7 +43791,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44427
43791
|
"use client";
|
|
44428
43792
|
init_cn();
|
|
44429
43793
|
init_useEventBus();
|
|
44430
|
-
init_useTranslate();
|
|
44431
43794
|
init_Stack();
|
|
44432
43795
|
init_Typography();
|
|
44433
43796
|
init_SimpleGrid();
|
|
@@ -44444,7 +43807,7 @@ var init_ShowcaseOrganism = __esm({
|
|
|
44444
43807
|
subtitle
|
|
44445
43808
|
}) => {
|
|
44446
43809
|
useEventBus();
|
|
44447
|
-
const { t } = useTranslate();
|
|
43810
|
+
const { t } = hooks.useTranslate();
|
|
44448
43811
|
const items = React79.useMemo(
|
|
44449
43812
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
44450
43813
|
[entity]
|
|
@@ -44838,7 +44201,7 @@ function SimulatorBoard({
|
|
|
44838
44201
|
className
|
|
44839
44202
|
}) {
|
|
44840
44203
|
const { emit } = useEventBus();
|
|
44841
|
-
const { t } = useTranslate();
|
|
44204
|
+
const { t } = hooks.useTranslate();
|
|
44842
44205
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
44843
44206
|
const parameters = resolved?.parameters ?? [];
|
|
44844
44207
|
const [values, setValues] = React79.useState(() => {
|
|
@@ -44986,7 +44349,6 @@ var init_SimulatorBoard = __esm({
|
|
|
44986
44349
|
"components/game/organisms/puzzles/simulator/SimulatorBoard.tsx"() {
|
|
44987
44350
|
init_atoms2();
|
|
44988
44351
|
init_useEventBus();
|
|
44989
|
-
init_useTranslate();
|
|
44990
44352
|
SimulatorBoard.displayName = "SimulatorBoard";
|
|
44991
44353
|
}
|
|
44992
44354
|
});
|
|
@@ -45202,7 +44564,6 @@ var init_StatCard = __esm({
|
|
|
45202
44564
|
init_Button();
|
|
45203
44565
|
init_Sparkline();
|
|
45204
44566
|
init_useEventBus();
|
|
45205
|
-
init_useTranslate();
|
|
45206
44567
|
init_Icon();
|
|
45207
44568
|
exports.StatCard = ({
|
|
45208
44569
|
label: propLabel,
|
|
@@ -45229,7 +44590,7 @@ var init_StatCard = __esm({
|
|
|
45229
44590
|
const Icon3 = typeof iconProp === "string" ? resolveIcon(iconProp) ?? void 0 : iconProp;
|
|
45230
44591
|
const labelToUse = propLabel ?? propTitle;
|
|
45231
44592
|
const eventBus = useEventBus();
|
|
45232
|
-
const { t } = useTranslate();
|
|
44593
|
+
const { t } = hooks.useTranslate();
|
|
45233
44594
|
const handleActionClick = React79__namespace.default.useCallback(() => {
|
|
45234
44595
|
if (action?.event) {
|
|
45235
44596
|
eventBus.emit(`UI:${action.event}`, {});
|
|
@@ -45520,7 +44881,7 @@ function VariablePanel({
|
|
|
45520
44881
|
variables,
|
|
45521
44882
|
className
|
|
45522
44883
|
}) {
|
|
45523
|
-
const { t } = useTranslate();
|
|
44884
|
+
const { t } = hooks.useTranslate();
|
|
45524
44885
|
return /* @__PURE__ */ jsxRuntime.jsxs(exports.VStack, { className: cn("p-3 rounded-lg bg-card border border-border", className), gap: "sm", children: [
|
|
45525
44886
|
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: t("stateArchitect.variables", { name: entityName }) }),
|
|
45526
44887
|
variables.map((v) => {
|
|
@@ -45558,7 +44919,6 @@ var init_VariablePanel = __esm({
|
|
|
45558
44919
|
"components/game/organisms/puzzles/state-architect/VariablePanel.tsx"() {
|
|
45559
44920
|
init_atoms2();
|
|
45560
44921
|
init_cn();
|
|
45561
|
-
init_useTranslate();
|
|
45562
44922
|
VariablePanel.displayName = "VariablePanel";
|
|
45563
44923
|
}
|
|
45564
44924
|
});
|
|
@@ -45584,7 +44944,7 @@ function StateArchitectBoard({
|
|
|
45584
44944
|
className
|
|
45585
44945
|
}) {
|
|
45586
44946
|
const { emit } = useEventBus();
|
|
45587
|
-
const { t } = useTranslate();
|
|
44947
|
+
const { t } = hooks.useTranslate();
|
|
45588
44948
|
const resolved = Array.isArray(entity) ? entity[0] : entity;
|
|
45589
44949
|
const [transitions, setTransitions] = React79.useState(resolved?.transitions ?? []);
|
|
45590
44950
|
const [headerError, setHeaderError] = React79.useState(false);
|
|
@@ -45875,7 +45235,6 @@ var init_StateArchitectBoard = __esm({
|
|
|
45875
45235
|
init_atoms2();
|
|
45876
45236
|
init_cn();
|
|
45877
45237
|
init_useEventBus();
|
|
45878
|
-
init_useTranslate();
|
|
45879
45238
|
init_TraitStateViewer();
|
|
45880
45239
|
init_StateNode();
|
|
45881
45240
|
init_TransitionArrow();
|
|
@@ -45895,7 +45254,6 @@ var init_StatsOrganism = __esm({
|
|
|
45895
45254
|
"components/marketing/organisms/StatsOrganism.tsx"() {
|
|
45896
45255
|
"use client";
|
|
45897
45256
|
init_cn();
|
|
45898
|
-
init_useTranslate();
|
|
45899
45257
|
init_StatsGrid();
|
|
45900
45258
|
init_LoadingState();
|
|
45901
45259
|
init_ErrorState();
|
|
@@ -45906,7 +45264,7 @@ var init_StatsOrganism = __esm({
|
|
|
45906
45264
|
className,
|
|
45907
45265
|
columns = 3
|
|
45908
45266
|
}) => {
|
|
45909
|
-
const { t } = useTranslate();
|
|
45267
|
+
const { t } = hooks.useTranslate();
|
|
45910
45268
|
const items = React79.useMemo(
|
|
45911
45269
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
45912
45270
|
[entity]
|
|
@@ -46009,7 +45367,6 @@ var init_StepFlowOrganism = __esm({
|
|
|
46009
45367
|
"components/core/organisms/StepFlowOrganism.tsx"() {
|
|
46010
45368
|
"use client";
|
|
46011
45369
|
init_cn();
|
|
46012
|
-
init_useTranslate();
|
|
46013
45370
|
init_Stack();
|
|
46014
45371
|
init_Typography();
|
|
46015
45372
|
init_StepFlow();
|
|
@@ -46025,7 +45382,7 @@ var init_StepFlowOrganism = __esm({
|
|
|
46025
45382
|
heading,
|
|
46026
45383
|
subtitle
|
|
46027
45384
|
}) => {
|
|
46028
|
-
const { t } = useTranslate();
|
|
45385
|
+
const { t } = hooks.useTranslate();
|
|
46029
45386
|
const items = React79.useMemo(
|
|
46030
45387
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
46031
45388
|
[entity]
|
|
@@ -46179,7 +45536,6 @@ var init_TeamOrganism = __esm({
|
|
|
46179
45536
|
"components/marketing/organisms/TeamOrganism.tsx"() {
|
|
46180
45537
|
"use client";
|
|
46181
45538
|
init_cn();
|
|
46182
|
-
init_useTranslate();
|
|
46183
45539
|
init_Stack();
|
|
46184
45540
|
init_Typography();
|
|
46185
45541
|
init_SimpleGrid();
|
|
@@ -46194,7 +45550,7 @@ var init_TeamOrganism = __esm({
|
|
|
46194
45550
|
heading,
|
|
46195
45551
|
subtitle
|
|
46196
45552
|
}) => {
|
|
46197
|
-
const { t } = useTranslate();
|
|
45553
|
+
const { t } = hooks.useTranslate();
|
|
46198
45554
|
const items = React79.useMemo(
|
|
46199
45555
|
() => Array.isArray(entity) ? entity : entity && typeof entity === "object" ? [entity] : [],
|
|
46200
45556
|
[entity]
|
|
@@ -46237,7 +45593,6 @@ var init_Timeline = __esm({
|
|
|
46237
45593
|
init_LoadingState();
|
|
46238
45594
|
init_ErrorState();
|
|
46239
45595
|
init_EmptyState();
|
|
46240
|
-
init_useTranslate();
|
|
46241
45596
|
lookStyles10 = {
|
|
46242
45597
|
"vertical-compact": "gap-1 [&>*]:py-1",
|
|
46243
45598
|
"vertical-spacious": "",
|
|
@@ -46277,7 +45632,7 @@ var init_Timeline = __esm({
|
|
|
46277
45632
|
className,
|
|
46278
45633
|
look = "vertical-spacious"
|
|
46279
45634
|
}) => {
|
|
46280
|
-
const { t } = useTranslate();
|
|
45635
|
+
const { t } = hooks.useTranslate();
|
|
46281
45636
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46282
45637
|
const items = React79__namespace.default.useMemo(() => {
|
|
46283
45638
|
if (propItems) return propItems;
|
|
@@ -47847,7 +47202,7 @@ function UISlotComponent({
|
|
|
47847
47202
|
}) {
|
|
47848
47203
|
const { slots, clear } = context.useUISlots();
|
|
47849
47204
|
const eventBus = useEventBus();
|
|
47850
|
-
const { t } = useTranslate();
|
|
47205
|
+
const { t } = hooks.useTranslate();
|
|
47851
47206
|
const suspenseConfig = React79.useContext(SuspenseConfigContext);
|
|
47852
47207
|
const contained = React79.useContext(SlotContainedContext);
|
|
47853
47208
|
const content = slots[slot];
|
|
@@ -47949,7 +47304,7 @@ function CompiledPortal({ slot, className, pattern, sourceTrait, children }) {
|
|
|
47949
47304
|
const [portalRoot, setPortalRoot] = React79.useState(null);
|
|
47950
47305
|
const slotsBus = context.useUISlots();
|
|
47951
47306
|
const eventBus = useEventBus();
|
|
47952
|
-
const { t } = useTranslate();
|
|
47307
|
+
const { t } = hooks.useTranslate();
|
|
47953
47308
|
React79.useEffect(() => {
|
|
47954
47309
|
setPortalRoot(getOrCreatePortalRoot());
|
|
47955
47310
|
}, []);
|
|
@@ -48239,7 +47594,7 @@ function SlotContentRenderer({
|
|
|
48239
47594
|
}
|
|
48240
47595
|
}
|
|
48241
47596
|
const eventBus = useEventBus();
|
|
48242
|
-
const { t } = useTranslate();
|
|
47597
|
+
const { t } = hooks.useTranslate();
|
|
48243
47598
|
const schemaCtx = useEntitySchemaOptional();
|
|
48244
47599
|
let entityDef;
|
|
48245
47600
|
if (typeof entityProp === "string" && entityProp.length > 0 && schemaCtx) {
|
|
@@ -48427,7 +47782,6 @@ var init_UISlotRenderer = __esm({
|
|
|
48427
47782
|
init_Box();
|
|
48428
47783
|
init_Typography();
|
|
48429
47784
|
init_useEventBus();
|
|
48430
|
-
init_useTranslate();
|
|
48431
47785
|
init_slot_types();
|
|
48432
47786
|
init_cn();
|
|
48433
47787
|
init_ErrorBoundary();
|
|
@@ -49773,1625 +49127,7 @@ init_AboutPageTemplate();
|
|
|
49773
49127
|
|
|
49774
49128
|
// components/index.ts
|
|
49775
49129
|
init_cn();
|
|
49776
|
-
var log8 = logger.createLogger("almadar:ui:orbital-history");
|
|
49777
|
-
function useOrbitalHistory(options) {
|
|
49778
|
-
const { appId, authToken, userId, onHistoryChange, onRevertSuccess } = options;
|
|
49779
|
-
const getHeaders = React79.useCallback(() => {
|
|
49780
|
-
const headers = {
|
|
49781
|
-
"Content-Type": "application/json"
|
|
49782
|
-
};
|
|
49783
|
-
if (authToken) {
|
|
49784
|
-
headers["Authorization"] = `Bearer ${authToken}`;
|
|
49785
|
-
}
|
|
49786
|
-
if (userId) {
|
|
49787
|
-
headers["x-user-id"] = userId;
|
|
49788
|
-
}
|
|
49789
|
-
return headers;
|
|
49790
|
-
}, [authToken, userId]);
|
|
49791
|
-
const [timeline, setTimeline] = React79.useState([]);
|
|
49792
|
-
const [currentVersion, setCurrentVersion] = React79.useState(1);
|
|
49793
|
-
const [isLoading, setIsLoading] = React79.useState(false);
|
|
49794
|
-
const [error, setError] = React79.useState(null);
|
|
49795
|
-
const refresh = React79.useCallback(async () => {
|
|
49796
|
-
if (!appId) return;
|
|
49797
|
-
setIsLoading(true);
|
|
49798
|
-
setError(null);
|
|
49799
|
-
try {
|
|
49800
|
-
const headers = getHeaders();
|
|
49801
|
-
const [changesetsRes, snapshotsRes] = await Promise.all([
|
|
49802
|
-
fetch(`/api/graphs/${appId}/history/changesets`, { headers }),
|
|
49803
|
-
fetch(`/api/graphs/${appId}/history/snapshots`, { headers })
|
|
49804
|
-
]);
|
|
49805
|
-
if (!changesetsRes.ok) {
|
|
49806
|
-
throw new Error(`Failed to fetch changesets: ${changesetsRes.status}`);
|
|
49807
|
-
}
|
|
49808
|
-
if (!snapshotsRes.ok) {
|
|
49809
|
-
throw new Error(`Failed to fetch snapshots: ${snapshotsRes.status}`);
|
|
49810
|
-
}
|
|
49811
|
-
const changesetsData = await changesetsRes.json();
|
|
49812
|
-
const snapshotsData = await snapshotsRes.json();
|
|
49813
|
-
const changesetItems = (changesetsData.changesets || []).map((cs) => ({
|
|
49814
|
-
id: cs.id,
|
|
49815
|
-
type: "changeset",
|
|
49816
|
-
version: cs.version,
|
|
49817
|
-
timestamp: cs.timestamp,
|
|
49818
|
-
description: `Version ${cs.version}`,
|
|
49819
|
-
source: cs.source,
|
|
49820
|
-
summary: cs.summary
|
|
49821
|
-
}));
|
|
49822
|
-
const snapshotItems = (snapshotsData.snapshots || []).map((snap) => ({
|
|
49823
|
-
id: snap.id,
|
|
49824
|
-
type: "snapshot",
|
|
49825
|
-
version: snap.version,
|
|
49826
|
-
timestamp: snap.timestamp,
|
|
49827
|
-
description: snap.reason || `Snapshot v${snap.version}`,
|
|
49828
|
-
reason: snap.reason
|
|
49829
|
-
}));
|
|
49830
|
-
const mergedTimeline = [...changesetItems, ...snapshotItems].sort(
|
|
49831
|
-
(a, b) => b.timestamp - a.timestamp
|
|
49832
|
-
);
|
|
49833
|
-
setTimeline(mergedTimeline);
|
|
49834
|
-
if (mergedTimeline.length > 0) {
|
|
49835
|
-
setCurrentVersion(mergedTimeline[0].version);
|
|
49836
|
-
}
|
|
49837
|
-
} catch (err) {
|
|
49838
|
-
log8.error("Failed to load history", { error: err instanceof Error ? err : String(err) });
|
|
49839
|
-
setError(err instanceof Error ? err.message : "Failed to load history");
|
|
49840
|
-
} finally {
|
|
49841
|
-
setIsLoading(false);
|
|
49842
|
-
}
|
|
49843
|
-
}, [appId, getHeaders]);
|
|
49844
|
-
const revertToSnapshot = React79.useCallback(async (snapshotId) => {
|
|
49845
|
-
if (!appId) {
|
|
49846
|
-
return { success: false, error: "No app ID provided" };
|
|
49847
|
-
}
|
|
49848
|
-
try {
|
|
49849
|
-
const response = await fetch(`/api/graphs/${appId}/history/revert/${snapshotId}`, {
|
|
49850
|
-
method: "POST",
|
|
49851
|
-
headers: getHeaders()
|
|
49852
|
-
});
|
|
49853
|
-
if (!response.ok) {
|
|
49854
|
-
const errorData = await response.json().catch(() => ({}));
|
|
49855
|
-
throw new Error(errorData.error || `Failed to revert: ${response.status}`);
|
|
49856
|
-
}
|
|
49857
|
-
const data = await response.json();
|
|
49858
|
-
if (data.success && data.schema) {
|
|
49859
|
-
await refresh();
|
|
49860
|
-
onRevertSuccess?.(data.schema);
|
|
49861
|
-
return {
|
|
49862
|
-
success: true,
|
|
49863
|
-
restoredSchema: data.schema
|
|
49864
|
-
};
|
|
49865
|
-
}
|
|
49866
|
-
return {
|
|
49867
|
-
success: false,
|
|
49868
|
-
error: data.error || "Unknown error during revert"
|
|
49869
|
-
};
|
|
49870
|
-
} catch (err) {
|
|
49871
|
-
log8.error("Failed to revert", { error: err instanceof Error ? err : String(err) });
|
|
49872
|
-
return {
|
|
49873
|
-
success: false,
|
|
49874
|
-
error: err instanceof Error ? err.message : "Failed to revert"
|
|
49875
|
-
};
|
|
49876
|
-
}
|
|
49877
|
-
}, [appId, getHeaders, refresh, onRevertSuccess]);
|
|
49878
|
-
React79.useEffect(() => {
|
|
49879
|
-
if (appId && authToken && userId) {
|
|
49880
|
-
refresh();
|
|
49881
|
-
}
|
|
49882
|
-
}, [appId, authToken, userId]);
|
|
49883
|
-
React79.useEffect(() => {
|
|
49884
|
-
onHistoryChange?.(timeline);
|
|
49885
|
-
}, [timeline]);
|
|
49886
|
-
return {
|
|
49887
|
-
timeline,
|
|
49888
|
-
currentVersion,
|
|
49889
|
-
isLoading,
|
|
49890
|
-
error,
|
|
49891
|
-
revertToSnapshot,
|
|
49892
|
-
refresh
|
|
49893
|
-
};
|
|
49894
|
-
}
|
|
49895
|
-
var log9 = logger.createLogger("almadar:ui:filesystem");
|
|
49896
|
-
function useFileSystem() {
|
|
49897
|
-
const [status, setStatus] = React79.useState("idle");
|
|
49898
|
-
const [error, setError] = React79.useState(null);
|
|
49899
|
-
const [isLoading, setIsLoading] = React79.useState(false);
|
|
49900
|
-
const [files, setFiles] = React79.useState([]);
|
|
49901
|
-
const [selectedFile, setSelectedFile] = React79.useState(null);
|
|
49902
|
-
const [selectedPath, setSelectedPath] = React79.useState(null);
|
|
49903
|
-
const [previewUrl, setPreviewUrl] = React79.useState(null);
|
|
49904
|
-
const [fileContents, setFileContents] = React79.useState(/* @__PURE__ */ new Map());
|
|
49905
|
-
const boot = React79.useCallback(async () => {
|
|
49906
|
-
setStatus("booting");
|
|
49907
|
-
setError(null);
|
|
49908
|
-
setIsLoading(true);
|
|
49909
|
-
try {
|
|
49910
|
-
log9.debug("Booting WebContainer");
|
|
49911
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
49912
|
-
setStatus("ready");
|
|
49913
|
-
} catch (err) {
|
|
49914
|
-
setError(err instanceof Error ? err.message : "Failed to boot");
|
|
49915
|
-
setStatus("error");
|
|
49916
|
-
} finally {
|
|
49917
|
-
setIsLoading(false);
|
|
49918
|
-
}
|
|
49919
|
-
}, []);
|
|
49920
|
-
const mountFiles = React79.useCallback(async (filesToMount) => {
|
|
49921
|
-
setIsLoading(true);
|
|
49922
|
-
try {
|
|
49923
|
-
let filesArray;
|
|
49924
|
-
if (Array.isArray(filesToMount)) {
|
|
49925
|
-
filesArray = filesToMount;
|
|
49926
|
-
} else {
|
|
49927
|
-
filesArray = [];
|
|
49928
|
-
const flattenTree = (obj, basePath = "") => {
|
|
49929
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
49930
|
-
const path = basePath ? `${basePath}/${key}` : key;
|
|
49931
|
-
if (value && typeof value === "object" && "file" in value) {
|
|
49932
|
-
const fileObj = value;
|
|
49933
|
-
filesArray.push({ path, content: fileObj.file.contents || "" });
|
|
49934
|
-
} else if (value && typeof value === "object" && "directory" in value) {
|
|
49935
|
-
const dirObj = value;
|
|
49936
|
-
flattenTree(dirObj.directory, path);
|
|
49937
|
-
}
|
|
49938
|
-
}
|
|
49939
|
-
};
|
|
49940
|
-
flattenTree(filesToMount);
|
|
49941
|
-
}
|
|
49942
|
-
const newContents = /* @__PURE__ */ new Map();
|
|
49943
|
-
for (const file of filesArray) {
|
|
49944
|
-
newContents.set(file.path, file.content);
|
|
49945
|
-
}
|
|
49946
|
-
setFileContents(newContents);
|
|
49947
|
-
const newTree = [];
|
|
49948
|
-
for (const file of filesArray) {
|
|
49949
|
-
const parts = file.path.split("/").filter(Boolean);
|
|
49950
|
-
let current = newTree;
|
|
49951
|
-
for (let i = 0; i < parts.length; i++) {
|
|
49952
|
-
const part = parts[i];
|
|
49953
|
-
const isFile = i === parts.length - 1;
|
|
49954
|
-
const currentPath = "/" + parts.slice(0, i + 1).join("/");
|
|
49955
|
-
let node = current.find((n) => n.name === part);
|
|
49956
|
-
if (!node) {
|
|
49957
|
-
node = {
|
|
49958
|
-
path: currentPath,
|
|
49959
|
-
name: part,
|
|
49960
|
-
type: isFile ? "file" : "directory",
|
|
49961
|
-
children: isFile ? void 0 : []
|
|
49962
|
-
};
|
|
49963
|
-
current.push(node);
|
|
49964
|
-
}
|
|
49965
|
-
if (!isFile && node && node.children) {
|
|
49966
|
-
current = node.children;
|
|
49967
|
-
}
|
|
49968
|
-
}
|
|
49969
|
-
}
|
|
49970
|
-
setFiles(newTree);
|
|
49971
|
-
setStatus("running");
|
|
49972
|
-
} catch (err) {
|
|
49973
|
-
log9.error("Failed to mount files", { error: err instanceof Error ? err : String(err) });
|
|
49974
|
-
} finally {
|
|
49975
|
-
setIsLoading(false);
|
|
49976
|
-
}
|
|
49977
|
-
}, []);
|
|
49978
|
-
const readFile = React79.useCallback(async (path) => {
|
|
49979
|
-
return fileContents.get(path) || "";
|
|
49980
|
-
}, [fileContents]);
|
|
49981
|
-
const writeFile = React79.useCallback(async (path, content) => {
|
|
49982
|
-
setFileContents((prev) => {
|
|
49983
|
-
const next = new Map(prev);
|
|
49984
|
-
next.set(path, content);
|
|
49985
|
-
return next;
|
|
49986
|
-
});
|
|
49987
|
-
}, []);
|
|
49988
|
-
const selectFile = React79.useCallback(async (path) => {
|
|
49989
|
-
const content = fileContents.get(path) || "";
|
|
49990
|
-
const ext = path.split(".").pop()?.toLowerCase() || "";
|
|
49991
|
-
const languageMap = {
|
|
49992
|
-
ts: "typescript",
|
|
49993
|
-
tsx: "typescript",
|
|
49994
|
-
js: "javascript",
|
|
49995
|
-
jsx: "javascript",
|
|
49996
|
-
json: "json",
|
|
49997
|
-
md: "markdown",
|
|
49998
|
-
css: "css",
|
|
49999
|
-
html: "html",
|
|
50000
|
-
orb: "json"
|
|
50001
|
-
};
|
|
50002
|
-
setSelectedPath(path);
|
|
50003
|
-
setSelectedFile({
|
|
50004
|
-
path,
|
|
50005
|
-
content,
|
|
50006
|
-
language: languageMap[ext] || "plaintext",
|
|
50007
|
-
isDirty: false
|
|
50008
|
-
});
|
|
50009
|
-
}, [fileContents]);
|
|
50010
|
-
const updateContent = React79.useCallback((pathOrContent, contentArg) => {
|
|
50011
|
-
const path = contentArg !== void 0 ? pathOrContent : selectedPath;
|
|
50012
|
-
const content = contentArg !== void 0 ? contentArg : pathOrContent;
|
|
50013
|
-
if (!path) {
|
|
50014
|
-
log9.warn("updateContent called without path and no file selected");
|
|
50015
|
-
return;
|
|
50016
|
-
}
|
|
50017
|
-
setFileContents((prev) => {
|
|
50018
|
-
const next = new Map(prev);
|
|
50019
|
-
next.set(path, content);
|
|
50020
|
-
return next;
|
|
50021
|
-
});
|
|
50022
|
-
if (selectedPath === path) {
|
|
50023
|
-
setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
|
|
50024
|
-
}
|
|
50025
|
-
}, [selectedPath]);
|
|
50026
|
-
const updateSelectedContent = React79.useCallback((content) => {
|
|
50027
|
-
setSelectedFile((prev) => prev ? { ...prev, content, isDirty: true } : null);
|
|
50028
|
-
}, []);
|
|
50029
|
-
const refreshTree = React79.useCallback(async () => {
|
|
50030
|
-
log9.debug("Refreshing tree");
|
|
50031
|
-
}, []);
|
|
50032
|
-
const runCommand = React79.useCallback(async (command) => {
|
|
50033
|
-
log9.debug("Running command", { command });
|
|
50034
|
-
return { exitCode: 0, output: "" };
|
|
50035
|
-
}, []);
|
|
50036
|
-
const startDevServer = React79.useCallback(async () => {
|
|
50037
|
-
log9.debug("Starting dev server");
|
|
50038
|
-
setPreviewUrl("http://localhost:5173");
|
|
50039
|
-
}, []);
|
|
50040
|
-
return {
|
|
50041
|
-
status,
|
|
50042
|
-
error,
|
|
50043
|
-
isLoading,
|
|
50044
|
-
files,
|
|
50045
|
-
selectedFile,
|
|
50046
|
-
selectedPath,
|
|
50047
|
-
previewUrl,
|
|
50048
|
-
boot,
|
|
50049
|
-
mountFiles,
|
|
50050
|
-
readFile,
|
|
50051
|
-
writeFile,
|
|
50052
|
-
selectFile,
|
|
50053
|
-
updateContent,
|
|
50054
|
-
updateSelectedContent,
|
|
50055
|
-
refreshTree,
|
|
50056
|
-
runCommand,
|
|
50057
|
-
startDevServer
|
|
50058
|
-
};
|
|
50059
|
-
}
|
|
50060
|
-
var log10 = logger.createLogger("almadar:ui:extensions");
|
|
50061
|
-
var defaultManifest = {
|
|
50062
|
-
languages: {
|
|
50063
|
-
typescript: { extensions: [".ts", ".tsx"], icon: "ts", color: "#3178c6" },
|
|
50064
|
-
javascript: { extensions: [".js", ".jsx"], icon: "js", color: "#f7df1e" },
|
|
50065
|
-
json: { extensions: [".json", ".orb"], icon: "json", color: "#000000" },
|
|
50066
|
-
css: { extensions: [".css"], icon: "css", color: "#264de4" },
|
|
50067
|
-
html: { extensions: [".html"], icon: "html", color: "#e34c26" },
|
|
50068
|
-
markdown: { extensions: [".md", ".mdx"], icon: "md", color: "#083fa1" }
|
|
50069
|
-
},
|
|
50070
|
-
extensions: []
|
|
50071
|
-
};
|
|
50072
|
-
function useExtensions(options) {
|
|
50073
|
-
const { appId, loadOnMount = true } = options;
|
|
50074
|
-
const [extensions, setExtensions] = React79.useState([]);
|
|
50075
|
-
const [manifest] = React79.useState(defaultManifest);
|
|
50076
|
-
const [isLoading, setIsLoading] = React79.useState(false);
|
|
50077
|
-
const [error, setError] = React79.useState(null);
|
|
50078
|
-
const loadExtension = React79.useCallback(async (extensionId) => {
|
|
50079
|
-
log10.debug("Loading extension", { extensionId });
|
|
50080
|
-
}, []);
|
|
50081
|
-
const loadExtensions = React79.useCallback(async () => {
|
|
50082
|
-
setIsLoading(true);
|
|
50083
|
-
setError(null);
|
|
50084
|
-
try {
|
|
50085
|
-
const defaultExtensions = [
|
|
50086
|
-
{ id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
|
|
50087
|
-
{ id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
|
|
50088
|
-
{ id: "json", name: "JSON", language: "json", loaded: true },
|
|
50089
|
-
{ id: "css", name: "CSS", language: "css", loaded: true },
|
|
50090
|
-
{ id: "html", name: "HTML", language: "html", loaded: true },
|
|
50091
|
-
{ id: "markdown", name: "Markdown", language: "markdown", loaded: true }
|
|
50092
|
-
];
|
|
50093
|
-
setExtensions(defaultExtensions);
|
|
50094
|
-
} catch (err) {
|
|
50095
|
-
setError(err instanceof Error ? err.message : "Failed to load extensions");
|
|
50096
|
-
} finally {
|
|
50097
|
-
setIsLoading(false);
|
|
50098
|
-
}
|
|
50099
|
-
}, []);
|
|
50100
|
-
const getExtensionForFile = React79.useCallback((filename) => {
|
|
50101
|
-
const ext = filename.split(".").pop()?.toLowerCase();
|
|
50102
|
-
if (!ext) return null;
|
|
50103
|
-
const languageMap = {
|
|
50104
|
-
ts: "typescript",
|
|
50105
|
-
tsx: "typescript",
|
|
50106
|
-
js: "javascript",
|
|
50107
|
-
jsx: "javascript",
|
|
50108
|
-
json: "json",
|
|
50109
|
-
md: "markdown",
|
|
50110
|
-
css: "css",
|
|
50111
|
-
html: "html",
|
|
50112
|
-
orb: "json"
|
|
50113
|
-
};
|
|
50114
|
-
const language = languageMap[ext];
|
|
50115
|
-
if (!language) return null;
|
|
50116
|
-
return extensions.find((e) => e.language === language) || null;
|
|
50117
|
-
}, [extensions]);
|
|
50118
|
-
React79.useEffect(() => {
|
|
50119
|
-
if (!appId || !loadOnMount) return;
|
|
50120
|
-
const loadExtensions2 = async () => {
|
|
50121
|
-
setIsLoading(true);
|
|
50122
|
-
setError(null);
|
|
50123
|
-
try {
|
|
50124
|
-
const defaultExtensions = [
|
|
50125
|
-
{ id: "typescript", name: "TypeScript", language: "typescript", loaded: true },
|
|
50126
|
-
{ id: "javascript", name: "JavaScript", language: "javascript", loaded: true },
|
|
50127
|
-
{ id: "json", name: "JSON", language: "json", loaded: true },
|
|
50128
|
-
{ id: "css", name: "CSS", language: "css", loaded: true },
|
|
50129
|
-
{ id: "html", name: "HTML", language: "html", loaded: true },
|
|
50130
|
-
{ id: "markdown", name: "Markdown", language: "markdown", loaded: true }
|
|
50131
|
-
];
|
|
50132
|
-
setExtensions(defaultExtensions);
|
|
50133
|
-
} catch (err) {
|
|
50134
|
-
setError(err instanceof Error ? err.message : "Failed to load extensions");
|
|
50135
|
-
} finally {
|
|
50136
|
-
setIsLoading(false);
|
|
50137
|
-
}
|
|
50138
|
-
};
|
|
50139
|
-
loadExtensions2();
|
|
50140
|
-
}, [appId, loadOnMount]);
|
|
50141
|
-
return {
|
|
50142
|
-
extensions,
|
|
50143
|
-
manifest,
|
|
50144
|
-
isLoading,
|
|
50145
|
-
error,
|
|
50146
|
-
loadExtension,
|
|
50147
|
-
loadExtensions,
|
|
50148
|
-
getExtensionForFile
|
|
50149
|
-
};
|
|
50150
|
-
}
|
|
50151
|
-
var log11 = logger.createLogger("almadar:ui:file-editor");
|
|
50152
|
-
function useFileEditor(options) {
|
|
50153
|
-
const { extensions, fileSystem, onSchemaUpdate } = options;
|
|
50154
|
-
const [openFiles, setOpenFiles] = React79.useState([]);
|
|
50155
|
-
const [activeFilePath, setActiveFilePath] = React79.useState(null);
|
|
50156
|
-
const [isSaving, setIsSaving] = React79.useState(false);
|
|
50157
|
-
const activeFile = openFiles.find((f3) => f3.path === activeFilePath) || null;
|
|
50158
|
-
const openFile = React79.useCallback(async (path) => {
|
|
50159
|
-
const existing = openFiles.find((f3) => f3.path === path);
|
|
50160
|
-
if (existing) {
|
|
50161
|
-
setActiveFilePath(path);
|
|
50162
|
-
return;
|
|
50163
|
-
}
|
|
50164
|
-
try {
|
|
50165
|
-
const content = await fileSystem.readFile(path);
|
|
50166
|
-
const ext = extensions.getExtensionForFile(path);
|
|
50167
|
-
const newFile = {
|
|
50168
|
-
path,
|
|
50169
|
-
content,
|
|
50170
|
-
isDirty: false,
|
|
50171
|
-
language: ext?.language
|
|
50172
|
-
};
|
|
50173
|
-
setOpenFiles((prev) => [...prev, newFile]);
|
|
50174
|
-
setActiveFilePath(path);
|
|
50175
|
-
} catch (err) {
|
|
50176
|
-
log11.error("Failed to open file", { error: err instanceof Error ? err : String(err) });
|
|
50177
|
-
}
|
|
50178
|
-
}, [openFiles, fileSystem, extensions]);
|
|
50179
|
-
const closeFile = React79.useCallback((path) => {
|
|
50180
|
-
setOpenFiles((prev) => prev.filter((f3) => f3.path !== path));
|
|
50181
|
-
if (activeFilePath === path) {
|
|
50182
|
-
const remaining = openFiles.filter((f3) => f3.path !== path);
|
|
50183
|
-
setActiveFilePath(remaining.length > 0 ? remaining[0].path : null);
|
|
50184
|
-
}
|
|
50185
|
-
}, [activeFilePath, openFiles]);
|
|
50186
|
-
const setActiveFile = React79.useCallback((path) => {
|
|
50187
|
-
setActiveFilePath(path);
|
|
50188
|
-
}, []);
|
|
50189
|
-
const updateFileContent = React79.useCallback((path, content) => {
|
|
50190
|
-
setOpenFiles(
|
|
50191
|
-
(prev) => prev.map(
|
|
50192
|
-
(f3) => f3.path === path ? { ...f3, content, isDirty: true } : f3
|
|
50193
|
-
)
|
|
50194
|
-
);
|
|
50195
|
-
}, []);
|
|
50196
|
-
const handleFileEdit = React79.useCallback(async (path, content) => {
|
|
50197
|
-
try {
|
|
50198
|
-
await fileSystem.writeFile(path, content);
|
|
50199
|
-
let action = "saved";
|
|
50200
|
-
if (path.endsWith(".orb") || path.endsWith("schema.json")) {
|
|
50201
|
-
try {
|
|
50202
|
-
const schema = JSON.parse(content);
|
|
50203
|
-
await onSchemaUpdate?.(schema);
|
|
50204
|
-
action = "updated_schema";
|
|
50205
|
-
} catch {
|
|
50206
|
-
}
|
|
50207
|
-
} else if (path.includes("/extensions/")) {
|
|
50208
|
-
action = path.endsWith(".new") ? "converted_extension" : "saved_extension";
|
|
50209
|
-
}
|
|
50210
|
-
return { success: true, action };
|
|
50211
|
-
} catch (err) {
|
|
50212
|
-
return {
|
|
50213
|
-
success: false,
|
|
50214
|
-
error: err instanceof Error ? err.message : "Failed to save file"
|
|
50215
|
-
};
|
|
50216
|
-
}
|
|
50217
|
-
}, [fileSystem, onSchemaUpdate]);
|
|
50218
|
-
const saveFile = React79.useCallback(async (path) => {
|
|
50219
|
-
const file = openFiles.find((f3) => f3.path === path);
|
|
50220
|
-
if (!file) return;
|
|
50221
|
-
setIsSaving(true);
|
|
50222
|
-
try {
|
|
50223
|
-
await fileSystem.writeFile(path, file.content);
|
|
50224
|
-
setOpenFiles(
|
|
50225
|
-
(prev) => prev.map(
|
|
50226
|
-
(f3) => f3.path === path ? { ...f3, isDirty: false } : f3
|
|
50227
|
-
)
|
|
50228
|
-
);
|
|
50229
|
-
if (path.endsWith(".orb") || path.endsWith("schema.json")) {
|
|
50230
|
-
try {
|
|
50231
|
-
const schema = JSON.parse(file.content);
|
|
50232
|
-
await onSchemaUpdate?.(schema);
|
|
50233
|
-
} catch {
|
|
50234
|
-
}
|
|
50235
|
-
}
|
|
50236
|
-
} catch (err) {
|
|
50237
|
-
log11.error("Failed to save file", { error: err instanceof Error ? err : String(err) });
|
|
50238
|
-
} finally {
|
|
50239
|
-
setIsSaving(false);
|
|
50240
|
-
}
|
|
50241
|
-
}, [openFiles, fileSystem, onSchemaUpdate]);
|
|
50242
|
-
const saveAllFiles = React79.useCallback(async () => {
|
|
50243
|
-
setIsSaving(true);
|
|
50244
|
-
try {
|
|
50245
|
-
const dirtyFiles = openFiles.filter((f3) => f3.isDirty);
|
|
50246
|
-
for (const file of dirtyFiles) {
|
|
50247
|
-
await saveFile(file.path);
|
|
50248
|
-
}
|
|
50249
|
-
} finally {
|
|
50250
|
-
setIsSaving(false);
|
|
50251
|
-
}
|
|
50252
|
-
}, [openFiles, saveFile]);
|
|
50253
|
-
return {
|
|
50254
|
-
openFiles,
|
|
50255
|
-
activeFile,
|
|
50256
|
-
isSaving,
|
|
50257
|
-
openFile,
|
|
50258
|
-
closeFile,
|
|
50259
|
-
setActiveFile,
|
|
50260
|
-
updateFileContent,
|
|
50261
|
-
handleFileEdit,
|
|
50262
|
-
saveFile,
|
|
50263
|
-
saveAllFiles
|
|
50264
|
-
};
|
|
50265
|
-
}
|
|
50266
|
-
var log12 = logger.createLogger("almadar:ui:compile");
|
|
50267
|
-
function useCompile() {
|
|
50268
|
-
const [isCompiling, setIsCompiling] = React79.useState(false);
|
|
50269
|
-
const [stage, setStage] = React79.useState("idle");
|
|
50270
|
-
const [lastResult, setLastResult] = React79.useState(null);
|
|
50271
|
-
const [error, setError] = React79.useState(null);
|
|
50272
|
-
const compileSchema = React79.useCallback(async (schema) => {
|
|
50273
|
-
setIsCompiling(true);
|
|
50274
|
-
setStage("compiling");
|
|
50275
|
-
setError(null);
|
|
50276
|
-
try {
|
|
50277
|
-
log12.debug("Compiling schema", { name: schema.name });
|
|
50278
|
-
const result = {
|
|
50279
|
-
success: true,
|
|
50280
|
-
files: []
|
|
50281
|
-
};
|
|
50282
|
-
setLastResult(result);
|
|
50283
|
-
setStage("done");
|
|
50284
|
-
return result;
|
|
50285
|
-
} catch (err) {
|
|
50286
|
-
const errorMessage = err instanceof Error ? err.message : "Compilation failed";
|
|
50287
|
-
setError(errorMessage);
|
|
50288
|
-
setStage("error");
|
|
50289
|
-
setLastResult({ success: false, errors: [errorMessage] });
|
|
50290
|
-
return null;
|
|
50291
|
-
} finally {
|
|
50292
|
-
setIsCompiling(false);
|
|
50293
|
-
}
|
|
50294
|
-
}, []);
|
|
50295
|
-
return {
|
|
50296
|
-
isCompiling,
|
|
50297
|
-
stage,
|
|
50298
|
-
lastResult,
|
|
50299
|
-
error,
|
|
50300
|
-
compileSchema
|
|
50301
|
-
};
|
|
50302
|
-
}
|
|
50303
|
-
var log13 = logger.createLogger("almadar:ui:preview");
|
|
50304
|
-
function usePreview(options) {
|
|
50305
|
-
const [previewUrl, setPreviewUrl] = React79.useState(null);
|
|
50306
|
-
const [isLoading, setIsLoading] = React79.useState(!!options?.appId);
|
|
50307
|
-
const [error, setError] = React79.useState(null);
|
|
50308
|
-
const [loadError, setLoadError] = React79.useState(null);
|
|
50309
|
-
const [app, setApp] = React79.useState(null);
|
|
50310
|
-
const [isFullscreen, setIsFullscreen] = React79.useState(false);
|
|
50311
|
-
const [isExecutingEvent, setIsExecutingEvent] = React79.useState(false);
|
|
50312
|
-
const [errorToast, setErrorToast] = React79.useState(null);
|
|
50313
|
-
const [currentStateName, setCurrentStateName] = React79.useState(null);
|
|
50314
|
-
const [notificationsList, setNotificationsList] = React79.useState([]);
|
|
50315
|
-
const [isPanelOpen, setIsPanelOpen] = React79.useState(false);
|
|
50316
|
-
const notifications = React79.useMemo(() => ({
|
|
50317
|
-
notifications: notificationsList,
|
|
50318
|
-
isPanelOpen,
|
|
50319
|
-
closePanel: () => setIsPanelOpen(false),
|
|
50320
|
-
dismissNotification: (id) => {
|
|
50321
|
-
setNotificationsList((prev) => prev.filter((n) => n.id !== id));
|
|
50322
|
-
},
|
|
50323
|
-
markAsRead: (id) => {
|
|
50324
|
-
setNotificationsList(
|
|
50325
|
-
(prev) => prev.map((n) => n.id === id ? { ...n, read: true } : n)
|
|
50326
|
-
);
|
|
50327
|
-
},
|
|
50328
|
-
clearAll: () => setNotificationsList([])
|
|
50329
|
-
}), [notificationsList, isPanelOpen]);
|
|
50330
|
-
React79.useEffect(() => {
|
|
50331
|
-
const appId = options?.appId;
|
|
50332
|
-
if (!appId) {
|
|
50333
|
-
setApp(null);
|
|
50334
|
-
setIsLoading(false);
|
|
50335
|
-
return;
|
|
50336
|
-
}
|
|
50337
|
-
log13.debug("Setting up preview for app", { appId });
|
|
50338
|
-
setPreviewUrl(`/api/orbitals/${appId}`);
|
|
50339
|
-
setIsLoading(false);
|
|
50340
|
-
}, [options?.appId]);
|
|
50341
|
-
const startPreview = React79.useCallback(async () => {
|
|
50342
|
-
log13.debug("startPreview called");
|
|
50343
|
-
}, []);
|
|
50344
|
-
const stopPreview = React79.useCallback(async () => {
|
|
50345
|
-
setIsLoading(true);
|
|
50346
|
-
try {
|
|
50347
|
-
log13.debug("Stopping preview server");
|
|
50348
|
-
setPreviewUrl(null);
|
|
50349
|
-
setApp(null);
|
|
50350
|
-
} finally {
|
|
50351
|
-
setIsLoading(false);
|
|
50352
|
-
}
|
|
50353
|
-
}, []);
|
|
50354
|
-
const refresh = React79.useCallback(async () => {
|
|
50355
|
-
if (!previewUrl) return;
|
|
50356
|
-
log13.debug("Refreshing preview");
|
|
50357
|
-
setPreviewUrl(`${previewUrl.split("?")[0]}?t=${Date.now()}`);
|
|
50358
|
-
}, [previewUrl]);
|
|
50359
|
-
const handleRefresh = React79.useCallback(async () => {
|
|
50360
|
-
log13.debug("Handle refresh");
|
|
50361
|
-
await refresh();
|
|
50362
|
-
}, [refresh]);
|
|
50363
|
-
const handleReset = React79.useCallback(async () => {
|
|
50364
|
-
log13.debug("Resetting preview");
|
|
50365
|
-
setError(null);
|
|
50366
|
-
setLoadError(null);
|
|
50367
|
-
setErrorToast(null);
|
|
50368
|
-
setIsExecutingEvent(false);
|
|
50369
|
-
setCurrentStateName(null);
|
|
50370
|
-
}, []);
|
|
50371
|
-
const toggleFullscreen = React79.useCallback(() => {
|
|
50372
|
-
setIsFullscreen((prev) => !prev);
|
|
50373
|
-
}, []);
|
|
50374
|
-
const dismissErrorToast = React79.useCallback(() => {
|
|
50375
|
-
setErrorToast(null);
|
|
50376
|
-
}, []);
|
|
50377
|
-
return {
|
|
50378
|
-
previewUrl,
|
|
50379
|
-
isLoading,
|
|
50380
|
-
error,
|
|
50381
|
-
loadError,
|
|
50382
|
-
app,
|
|
50383
|
-
isFullscreen,
|
|
50384
|
-
isExecutingEvent,
|
|
50385
|
-
errorToast,
|
|
50386
|
-
currentStateName,
|
|
50387
|
-
notifications,
|
|
50388
|
-
startPreview,
|
|
50389
|
-
stopPreview,
|
|
50390
|
-
refresh,
|
|
50391
|
-
handleRefresh,
|
|
50392
|
-
handleReset,
|
|
50393
|
-
toggleFullscreen,
|
|
50394
|
-
setErrorToast,
|
|
50395
|
-
dismissErrorToast
|
|
50396
|
-
};
|
|
50397
|
-
}
|
|
50398
|
-
var log14 = logger.createLogger("almadar:ui:agent-chat");
|
|
50399
|
-
function useAgentChat(options) {
|
|
50400
|
-
const [messages, setMessages] = React79.useState([]);
|
|
50401
|
-
const [status, setStatus] = React79.useState("idle");
|
|
50402
|
-
const [activities, setActivities] = React79.useState([]);
|
|
50403
|
-
const [todos, setTodos] = React79.useState([]);
|
|
50404
|
-
const [schemaDiffs, setSchemaDiffs] = React79.useState([]);
|
|
50405
|
-
const [isLoading, setIsLoading] = React79.useState(false);
|
|
50406
|
-
const [error, setError] = React79.useState(null);
|
|
50407
|
-
const [threadId] = React79.useState(null);
|
|
50408
|
-
const [interrupt, setInterrupt] = React79.useState(null);
|
|
50409
|
-
const sendMessage = React79.useCallback(async (content) => {
|
|
50410
|
-
setIsLoading(true);
|
|
50411
|
-
setStatus("running");
|
|
50412
|
-
setError(null);
|
|
50413
|
-
try {
|
|
50414
|
-
const userMessage = {
|
|
50415
|
-
id: Date.now().toString(),
|
|
50416
|
-
role: "user",
|
|
50417
|
-
content,
|
|
50418
|
-
timestamp: Date.now()
|
|
50419
|
-
};
|
|
50420
|
-
setMessages((prev) => [...prev, userMessage]);
|
|
50421
|
-
log14.debug("Sending message", { content });
|
|
50422
|
-
const assistantMessage = {
|
|
50423
|
-
id: (Date.now() + 1).toString(),
|
|
50424
|
-
role: "assistant",
|
|
50425
|
-
content: "Agent chat is not yet implemented.",
|
|
50426
|
-
timestamp: Date.now()
|
|
50427
|
-
};
|
|
50428
|
-
setMessages((prev) => [...prev, assistantMessage]);
|
|
50429
|
-
setStatus("idle");
|
|
50430
|
-
options?.onComplete?.();
|
|
50431
|
-
} catch (err) {
|
|
50432
|
-
setError(err instanceof Error ? err.message : "Failed to send message");
|
|
50433
|
-
setStatus("error");
|
|
50434
|
-
} finally {
|
|
50435
|
-
setIsLoading(false);
|
|
50436
|
-
}
|
|
50437
|
-
}, [options]);
|
|
50438
|
-
const startGeneration = React79.useCallback(async (skill, prompt, genOptions) => {
|
|
50439
|
-
setStatus("running");
|
|
50440
|
-
setIsLoading(true);
|
|
50441
|
-
setError(null);
|
|
50442
|
-
const skillName = Array.isArray(skill) ? skill[0] : skill;
|
|
50443
|
-
try {
|
|
50444
|
-
log14.debug("Starting generation", () => ({ skillName, prompt, genOptions: JSON.stringify(genOptions) }));
|
|
50445
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
50446
|
-
setStatus("complete");
|
|
50447
|
-
options?.onComplete?.();
|
|
50448
|
-
} catch (err) {
|
|
50449
|
-
setError(err instanceof Error ? err.message : "Generation failed");
|
|
50450
|
-
setStatus("error");
|
|
50451
|
-
} finally {
|
|
50452
|
-
setIsLoading(false);
|
|
50453
|
-
}
|
|
50454
|
-
}, [options]);
|
|
50455
|
-
const continueConversation = React79.useCallback(async (message) => {
|
|
50456
|
-
log14.debug("Continue conversation", { message: Array.isArray(message) ? message : [message] });
|
|
50457
|
-
}, []);
|
|
50458
|
-
const resumeWithDecision = React79.useCallback(async (decisions) => {
|
|
50459
|
-
log14.debug("Resume with decision", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
|
|
50460
|
-
setInterrupt(null);
|
|
50461
|
-
}, []);
|
|
50462
|
-
const cancel = React79.useCallback(() => {
|
|
50463
|
-
setStatus("idle");
|
|
50464
|
-
setIsLoading(false);
|
|
50465
|
-
setInterrupt(null);
|
|
50466
|
-
}, []);
|
|
50467
|
-
const clearMessages = React79.useCallback(() => {
|
|
50468
|
-
setMessages([]);
|
|
50469
|
-
}, []);
|
|
50470
|
-
const clearHistory = React79.useCallback(() => {
|
|
50471
|
-
setMessages([]);
|
|
50472
|
-
setActivities([]);
|
|
50473
|
-
setTodos([]);
|
|
50474
|
-
setSchemaDiffs([]);
|
|
50475
|
-
setError(null);
|
|
50476
|
-
}, []);
|
|
50477
|
-
return {
|
|
50478
|
-
messages,
|
|
50479
|
-
status,
|
|
50480
|
-
activities,
|
|
50481
|
-
todos,
|
|
50482
|
-
schemaDiffs,
|
|
50483
|
-
isLoading,
|
|
50484
|
-
error,
|
|
50485
|
-
threadId,
|
|
50486
|
-
interrupt,
|
|
50487
|
-
sendMessage,
|
|
50488
|
-
startGeneration,
|
|
50489
|
-
continueConversation,
|
|
50490
|
-
resumeWithDecision,
|
|
50491
|
-
cancel,
|
|
50492
|
-
clearMessages,
|
|
50493
|
-
clearHistory
|
|
50494
|
-
};
|
|
50495
|
-
}
|
|
50496
|
-
var log15 = logger.createLogger("almadar:ui:validation");
|
|
50497
|
-
function useValidation() {
|
|
50498
|
-
const [result, setResult] = React79.useState(null);
|
|
50499
|
-
const [isValidating, setIsValidating] = React79.useState(false);
|
|
50500
|
-
const [error, setError] = React79.useState(null);
|
|
50501
|
-
const [stage, setStage] = React79.useState("idle");
|
|
50502
|
-
const [isFixing, setIsFixing] = React79.useState(false);
|
|
50503
|
-
const [progressMessage, setProgressMessage] = React79.useState(null);
|
|
50504
|
-
const validate = React79.useCallback(async (appId) => {
|
|
50505
|
-
setIsValidating(true);
|
|
50506
|
-
setError(null);
|
|
50507
|
-
setStage("validating");
|
|
50508
|
-
setProgressMessage("Validating schema...");
|
|
50509
|
-
try {
|
|
50510
|
-
log15.debug("Validating app", { appId });
|
|
50511
|
-
const validationResult = {
|
|
50512
|
-
valid: true,
|
|
50513
|
-
errors: [],
|
|
50514
|
-
warnings: []
|
|
50515
|
-
};
|
|
50516
|
-
setResult(validationResult);
|
|
50517
|
-
setStage("complete");
|
|
50518
|
-
setProgressMessage(null);
|
|
50519
|
-
return validationResult;
|
|
50520
|
-
} catch (err) {
|
|
50521
|
-
const errorMessage = err instanceof Error ? err.message : "Validation failed";
|
|
50522
|
-
setError(errorMessage);
|
|
50523
|
-
const failedResult = {
|
|
50524
|
-
valid: false,
|
|
50525
|
-
errors: [{ code: "VALIDATION_ERROR", message: errorMessage, severity: "error" }],
|
|
50526
|
-
warnings: []
|
|
50527
|
-
};
|
|
50528
|
-
setResult(failedResult);
|
|
50529
|
-
setStage("complete");
|
|
50530
|
-
setProgressMessage(null);
|
|
50531
|
-
return failedResult;
|
|
50532
|
-
} finally {
|
|
50533
|
-
setIsValidating(false);
|
|
50534
|
-
}
|
|
50535
|
-
}, []);
|
|
50536
|
-
const clearResult = React79.useCallback(() => {
|
|
50537
|
-
setResult(null);
|
|
50538
|
-
setError(null);
|
|
50539
|
-
}, []);
|
|
50540
|
-
const reset = React79.useCallback(() => {
|
|
50541
|
-
setResult(null);
|
|
50542
|
-
setError(null);
|
|
50543
|
-
setStage("idle");
|
|
50544
|
-
setIsFixing(false);
|
|
50545
|
-
setProgressMessage(null);
|
|
50546
|
-
setIsValidating(false);
|
|
50547
|
-
}, []);
|
|
50548
|
-
return {
|
|
50549
|
-
result,
|
|
50550
|
-
isValidating,
|
|
50551
|
-
error,
|
|
50552
|
-
stage,
|
|
50553
|
-
isFixing,
|
|
50554
|
-
progressMessage,
|
|
50555
|
-
errors: result?.errors ?? [],
|
|
50556
|
-
warnings: result?.warnings ?? [],
|
|
50557
|
-
isValid: result?.valid ?? false,
|
|
50558
|
-
validate,
|
|
50559
|
-
clearResult,
|
|
50560
|
-
reset
|
|
50561
|
-
};
|
|
50562
|
-
}
|
|
50563
|
-
var log16 = logger.createLogger("almadar:ui:deep-agent");
|
|
50564
|
-
function useDeepAgentGeneration() {
|
|
50565
|
-
const [requests, setRequests] = React79.useState([]);
|
|
50566
|
-
const [currentRequest, setCurrentRequest] = React79.useState(null);
|
|
50567
|
-
const [isGenerating, setIsGenerating] = React79.useState(false);
|
|
50568
|
-
const [isLoading, setIsLoading] = React79.useState(false);
|
|
50569
|
-
const [isComplete, setIsComplete] = React79.useState(false);
|
|
50570
|
-
const [progress, setProgress] = React79.useState({ stage: "idle", percent: 0, message: "" });
|
|
50571
|
-
const [error, setError] = React79.useState(null);
|
|
50572
|
-
const [interrupt, setInterrupt] = React79.useState(null);
|
|
50573
|
-
const generate = React79.useCallback(async (prompt) => {
|
|
50574
|
-
setIsGenerating(true);
|
|
50575
|
-
setIsLoading(true);
|
|
50576
|
-
setIsComplete(false);
|
|
50577
|
-
setError(null);
|
|
50578
|
-
setProgress({ stage: "starting", percent: 0, message: "Starting generation..." });
|
|
50579
|
-
const request = {
|
|
50580
|
-
id: Date.now().toString(),
|
|
50581
|
-
prompt,
|
|
50582
|
-
status: "running"
|
|
50583
|
-
};
|
|
50584
|
-
setCurrentRequest(request);
|
|
50585
|
-
setRequests((prev) => [...prev, request]);
|
|
50586
|
-
try {
|
|
50587
|
-
log16.debug("Generating from prompt", { prompt });
|
|
50588
|
-
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
50589
|
-
request.status = "completed";
|
|
50590
|
-
setCurrentRequest(request);
|
|
50591
|
-
setIsComplete(true);
|
|
50592
|
-
setProgress({ stage: "complete", percent: 100, message: "Generation complete" });
|
|
50593
|
-
return null;
|
|
50594
|
-
} catch (err) {
|
|
50595
|
-
const errorMessage = err instanceof Error ? err.message : "Generation failed";
|
|
50596
|
-
setError(errorMessage);
|
|
50597
|
-
request.status = "failed";
|
|
50598
|
-
request.error = errorMessage;
|
|
50599
|
-
setCurrentRequest(request);
|
|
50600
|
-
return null;
|
|
50601
|
-
} finally {
|
|
50602
|
-
setIsGenerating(false);
|
|
50603
|
-
setIsLoading(false);
|
|
50604
|
-
}
|
|
50605
|
-
}, []);
|
|
50606
|
-
const startGeneration = React79.useCallback(async (skill, prompt, _options) => {
|
|
50607
|
-
log16.debug("Starting generation with skill", { skill });
|
|
50608
|
-
await generate(prompt);
|
|
50609
|
-
}, [generate]);
|
|
50610
|
-
const cancelGeneration = React79.useCallback(() => {
|
|
50611
|
-
if (currentRequest) {
|
|
50612
|
-
currentRequest.status = "failed";
|
|
50613
|
-
currentRequest.error = "Cancelled by user";
|
|
50614
|
-
setCurrentRequest(null);
|
|
50615
|
-
}
|
|
50616
|
-
setIsGenerating(false);
|
|
50617
|
-
setIsLoading(false);
|
|
50618
|
-
setIsComplete(false);
|
|
50619
|
-
setProgress({ stage: "idle", percent: 0, message: "" });
|
|
50620
|
-
}, [currentRequest]);
|
|
50621
|
-
const clearRequests = React79.useCallback(() => {
|
|
50622
|
-
setRequests([]);
|
|
50623
|
-
setCurrentRequest(null);
|
|
50624
|
-
setError(null);
|
|
50625
|
-
setProgress({ stage: "idle", percent: 0, message: "" });
|
|
50626
|
-
setIsComplete(false);
|
|
50627
|
-
}, []);
|
|
50628
|
-
const submitInterruptDecisions = React79.useCallback((decisions) => {
|
|
50629
|
-
log16.debug("Submitting interrupt decisions", () => ({ decisions: JSON.stringify(decisions), count: decisions.length }));
|
|
50630
|
-
setInterrupt(null);
|
|
50631
|
-
}, []);
|
|
50632
|
-
return {
|
|
50633
|
-
requests,
|
|
50634
|
-
currentRequest,
|
|
50635
|
-
isGenerating,
|
|
50636
|
-
isLoading,
|
|
50637
|
-
isComplete,
|
|
50638
|
-
progress,
|
|
50639
|
-
error,
|
|
50640
|
-
interrupt,
|
|
50641
|
-
generate,
|
|
50642
|
-
startGeneration,
|
|
50643
|
-
cancelGeneration,
|
|
50644
|
-
clearRequests,
|
|
50645
|
-
submitInterruptDecisions
|
|
50646
|
-
};
|
|
50647
|
-
}
|
|
50648
49130
|
|
|
50649
|
-
// hooks/index.ts
|
|
50650
|
-
init_useEventBus();
|
|
50651
|
-
var log17 = logger.createLogger("almadar:ui:ui-slots");
|
|
50652
|
-
var DEFAULT_SOURCE_KEY = "__default__";
|
|
50653
|
-
var MULTI_SOURCE_STACK_TRAIT = "__multi_source_stack__";
|
|
50654
|
-
var ALL_SLOTS2 = [
|
|
50655
|
-
"main",
|
|
50656
|
-
"sidebar",
|
|
50657
|
-
"modal",
|
|
50658
|
-
"drawer",
|
|
50659
|
-
"overlay",
|
|
50660
|
-
"center",
|
|
50661
|
-
"toast",
|
|
50662
|
-
"hud-top",
|
|
50663
|
-
"hud-bottom",
|
|
50664
|
-
"hud-left",
|
|
50665
|
-
"hud-right",
|
|
50666
|
-
"floating"
|
|
50667
|
-
];
|
|
50668
|
-
var DEFAULT_SLOTS = ALL_SLOTS2.reduce(
|
|
50669
|
-
(acc, slot) => {
|
|
50670
|
-
acc[slot] = null;
|
|
50671
|
-
return acc;
|
|
50672
|
-
},
|
|
50673
|
-
{}
|
|
50674
|
-
);
|
|
50675
|
-
var DEFAULT_SOURCES = ALL_SLOTS2.reduce(
|
|
50676
|
-
(acc, slot) => {
|
|
50677
|
-
acc[slot] = {};
|
|
50678
|
-
return acc;
|
|
50679
|
-
},
|
|
50680
|
-
{}
|
|
50681
|
-
);
|
|
50682
|
-
var idCounter = 0;
|
|
50683
|
-
function generateId() {
|
|
50684
|
-
return `slot-content-${++idCounter}-${Date.now()}`;
|
|
50685
|
-
}
|
|
50686
|
-
function aggregateSlot(sources) {
|
|
50687
|
-
if (!sources) return null;
|
|
50688
|
-
const entries = Object.entries(sources);
|
|
50689
|
-
if (entries.length === 0) return null;
|
|
50690
|
-
if (entries.length === 1) return entries[0][1];
|
|
50691
|
-
const children = entries.map(([, entry]) => ({
|
|
50692
|
-
type: entry.pattern,
|
|
50693
|
-
...entry.props
|
|
50694
|
-
}));
|
|
50695
|
-
const stackId = `slot-content-stack-${entries.map(([k]) => k).join("-")}`;
|
|
50696
|
-
return {
|
|
50697
|
-
id: stackId,
|
|
50698
|
-
pattern: "stack",
|
|
50699
|
-
props: {
|
|
50700
|
-
direction: "vertical",
|
|
50701
|
-
gap: "lg",
|
|
50702
|
-
children
|
|
50703
|
-
},
|
|
50704
|
-
priority: 0,
|
|
50705
|
-
animation: "fade",
|
|
50706
|
-
sourceTrait: MULTI_SOURCE_STACK_TRAIT
|
|
50707
|
-
};
|
|
50708
|
-
}
|
|
50709
|
-
function useUISlotManager() {
|
|
50710
|
-
const [sources, setSources] = React79.useState(DEFAULT_SOURCES);
|
|
50711
|
-
const subscribersRef = React79.useRef(/* @__PURE__ */ new Set());
|
|
50712
|
-
const timersRef = React79.useRef(/* @__PURE__ */ new Map());
|
|
50713
|
-
const traitIndexRef = React79.useRef(/* @__PURE__ */ new Map());
|
|
50714
|
-
const traitSubscribersRef = React79.useRef(/* @__PURE__ */ new Map());
|
|
50715
|
-
const slots = React79.useMemo(() => {
|
|
50716
|
-
const out = { ...DEFAULT_SLOTS };
|
|
50717
|
-
for (const slot of ALL_SLOTS2) {
|
|
50718
|
-
out[slot] = aggregateSlot(sources[slot]);
|
|
50719
|
-
}
|
|
50720
|
-
return out;
|
|
50721
|
-
}, [sources]);
|
|
50722
|
-
React79.useEffect(() => {
|
|
50723
|
-
return () => {
|
|
50724
|
-
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
50725
|
-
timersRef.current.clear();
|
|
50726
|
-
};
|
|
50727
|
-
}, []);
|
|
50728
|
-
const notifySubscribers = React79.useCallback((slot, content) => {
|
|
50729
|
-
subscribersRef.current.forEach((callback) => {
|
|
50730
|
-
try {
|
|
50731
|
-
callback(slot, content);
|
|
50732
|
-
} catch (error) {
|
|
50733
|
-
log17.error("Subscriber error", { error: error instanceof Error ? error : String(error) });
|
|
50734
|
-
}
|
|
50735
|
-
});
|
|
50736
|
-
}, []);
|
|
50737
|
-
const notifyTraitSubscribers = React79.useCallback(
|
|
50738
|
-
(traitName, content) => {
|
|
50739
|
-
const subs = traitSubscribersRef.current.get(traitName);
|
|
50740
|
-
if (!subs) return;
|
|
50741
|
-
subs.forEach((callback) => {
|
|
50742
|
-
try {
|
|
50743
|
-
callback(content);
|
|
50744
|
-
} catch (error) {
|
|
50745
|
-
log17.error("Trait subscriber error", { traitName, error: error instanceof Error ? error : String(error) });
|
|
50746
|
-
}
|
|
50747
|
-
});
|
|
50748
|
-
},
|
|
50749
|
-
[]
|
|
50750
|
-
);
|
|
50751
|
-
const indexTraitRender = React79.useCallback(
|
|
50752
|
-
(traitName, content) => {
|
|
50753
|
-
traitIndexRef.current.set(traitName, content);
|
|
50754
|
-
},
|
|
50755
|
-
[]
|
|
50756
|
-
);
|
|
50757
|
-
const unindexTrait = React79.useCallback((traitName) => {
|
|
50758
|
-
traitIndexRef.current.delete(traitName);
|
|
50759
|
-
}, []);
|
|
50760
|
-
const render = React79.useCallback(
|
|
50761
|
-
(config) => {
|
|
50762
|
-
const id = generateId();
|
|
50763
|
-
const sourceKey = config.sourceTrait ?? DEFAULT_SOURCE_KEY;
|
|
50764
|
-
const content = {
|
|
50765
|
-
id,
|
|
50766
|
-
pattern: config.pattern,
|
|
50767
|
-
props: config.props ?? {},
|
|
50768
|
-
priority: config.priority ?? 0,
|
|
50769
|
-
animation: config.animation ?? "fade",
|
|
50770
|
-
onDismiss: config.onDismiss,
|
|
50771
|
-
sourceTrait: config.sourceTrait,
|
|
50772
|
-
slot: config.target,
|
|
50773
|
-
transitionEvent: config.transitionEvent,
|
|
50774
|
-
fromState: config.fromState,
|
|
50775
|
-
entity: config.entity
|
|
50776
|
-
};
|
|
50777
|
-
if (config.autoDismissMs && config.autoDismissMs > 0) {
|
|
50778
|
-
content.autoDismissAt = Date.now() + config.autoDismissMs;
|
|
50779
|
-
const timer = setTimeout(() => {
|
|
50780
|
-
setSources((prev) => {
|
|
50781
|
-
const slotSources = prev[config.target];
|
|
50782
|
-
if (slotSources && slotSources[sourceKey]?.id === id) {
|
|
50783
|
-
content.onDismiss?.();
|
|
50784
|
-
const next = { ...slotSources };
|
|
50785
|
-
delete next[sourceKey];
|
|
50786
|
-
const updated = { ...prev, [config.target]: next };
|
|
50787
|
-
notifySubscribers(config.target, aggregateSlot(next));
|
|
50788
|
-
return updated;
|
|
50789
|
-
}
|
|
50790
|
-
return prev;
|
|
50791
|
-
});
|
|
50792
|
-
timersRef.current.delete(id);
|
|
50793
|
-
}, config.autoDismissMs);
|
|
50794
|
-
timersRef.current.set(id, timer);
|
|
50795
|
-
}
|
|
50796
|
-
setSources((prev) => {
|
|
50797
|
-
const slotSources = prev[config.target] ?? {};
|
|
50798
|
-
const existing = slotSources[sourceKey];
|
|
50799
|
-
if (existing && existing.priority > content.priority) {
|
|
50800
|
-
log17.warn("Slot already has higher priority content", {
|
|
50801
|
-
slot: config.target,
|
|
50802
|
-
sourceKey,
|
|
50803
|
-
existingPriority: existing.priority,
|
|
50804
|
-
newPriority: content.priority
|
|
50805
|
-
});
|
|
50806
|
-
return prev;
|
|
50807
|
-
}
|
|
50808
|
-
const nextSources = {
|
|
50809
|
-
...slotSources,
|
|
50810
|
-
[sourceKey]: content
|
|
50811
|
-
};
|
|
50812
|
-
const nextAll = { ...prev, [config.target]: nextSources };
|
|
50813
|
-
if (content.sourceTrait) {
|
|
50814
|
-
indexTraitRender(content.sourceTrait, content);
|
|
50815
|
-
notifyTraitSubscribers(content.sourceTrait, content);
|
|
50816
|
-
}
|
|
50817
|
-
log17.info("slot:written", {
|
|
50818
|
-
slot: config.target,
|
|
50819
|
-
sourceKey,
|
|
50820
|
-
sourceTrait: content.sourceTrait,
|
|
50821
|
-
patternType: content.pattern,
|
|
50822
|
-
priority: content.priority
|
|
50823
|
-
});
|
|
50824
|
-
notifySubscribers(config.target, aggregateSlot(nextSources));
|
|
50825
|
-
return nextAll;
|
|
50826
|
-
});
|
|
50827
|
-
return id;
|
|
50828
|
-
},
|
|
50829
|
-
[notifySubscribers, notifyTraitSubscribers, indexTraitRender]
|
|
50830
|
-
);
|
|
50831
|
-
const clear = React79.useCallback(
|
|
50832
|
-
(slot) => {
|
|
50833
|
-
setSources((prev) => {
|
|
50834
|
-
const slotSources = prev[slot];
|
|
50835
|
-
if (!slotSources || Object.keys(slotSources).length === 0) {
|
|
50836
|
-
return prev;
|
|
50837
|
-
}
|
|
50838
|
-
for (const content of Object.values(slotSources)) {
|
|
50839
|
-
const timer = timersRef.current.get(content.id);
|
|
50840
|
-
if (timer) {
|
|
50841
|
-
clearTimeout(timer);
|
|
50842
|
-
timersRef.current.delete(content.id);
|
|
50843
|
-
}
|
|
50844
|
-
content.onDismiss?.();
|
|
50845
|
-
if (content.sourceTrait) {
|
|
50846
|
-
unindexTrait(content.sourceTrait);
|
|
50847
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
50848
|
-
}
|
|
50849
|
-
}
|
|
50850
|
-
notifySubscribers(slot, null);
|
|
50851
|
-
return { ...prev, [slot]: {} };
|
|
50852
|
-
});
|
|
50853
|
-
},
|
|
50854
|
-
[notifySubscribers, notifyTraitSubscribers, unindexTrait]
|
|
50855
|
-
);
|
|
50856
|
-
const clearBySource = React79.useCallback(
|
|
50857
|
-
(slot, sourceTrait) => {
|
|
50858
|
-
const sourceKey = sourceTrait;
|
|
50859
|
-
setSources((prev) => {
|
|
50860
|
-
const slotSources = prev[slot];
|
|
50861
|
-
if (!slotSources || !(sourceKey in slotSources)) {
|
|
50862
|
-
log17.debug("slot:clear-noop", { slot, sourceTrait, reason: !slotSources ? "no-slot" : "no-source" });
|
|
50863
|
-
return prev;
|
|
50864
|
-
}
|
|
50865
|
-
const content = slotSources[sourceKey];
|
|
50866
|
-
const timer = timersRef.current.get(content.id);
|
|
50867
|
-
if (timer) {
|
|
50868
|
-
clearTimeout(timer);
|
|
50869
|
-
timersRef.current.delete(content.id);
|
|
50870
|
-
}
|
|
50871
|
-
content.onDismiss?.();
|
|
50872
|
-
if (content.sourceTrait) {
|
|
50873
|
-
unindexTrait(content.sourceTrait);
|
|
50874
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
50875
|
-
}
|
|
50876
|
-
const nextSources = { ...slotSources };
|
|
50877
|
-
delete nextSources[sourceKey];
|
|
50878
|
-
log17.info("slot:cleared", { slot, sourceTrait, lastPatternType: content.pattern });
|
|
50879
|
-
notifySubscribers(slot, aggregateSlot(nextSources));
|
|
50880
|
-
return { ...prev, [slot]: nextSources };
|
|
50881
|
-
});
|
|
50882
|
-
},
|
|
50883
|
-
[notifySubscribers, notifyTraitSubscribers, unindexTrait]
|
|
50884
|
-
);
|
|
50885
|
-
const clearById = React79.useCallback(
|
|
50886
|
-
(id) => {
|
|
50887
|
-
setSources((prev) => {
|
|
50888
|
-
for (const slot of ALL_SLOTS2) {
|
|
50889
|
-
const slotSources = prev[slot];
|
|
50890
|
-
if (!slotSources) continue;
|
|
50891
|
-
const matchKey = Object.keys(slotSources).find(
|
|
50892
|
-
(k) => slotSources[k].id === id
|
|
50893
|
-
);
|
|
50894
|
-
if (!matchKey) continue;
|
|
50895
|
-
const content = slotSources[matchKey];
|
|
50896
|
-
const timer = timersRef.current.get(id);
|
|
50897
|
-
if (timer) {
|
|
50898
|
-
clearTimeout(timer);
|
|
50899
|
-
timersRef.current.delete(id);
|
|
50900
|
-
}
|
|
50901
|
-
content.onDismiss?.();
|
|
50902
|
-
if (content.sourceTrait) {
|
|
50903
|
-
unindexTrait(content.sourceTrait);
|
|
50904
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
50905
|
-
}
|
|
50906
|
-
const nextSources = { ...slotSources };
|
|
50907
|
-
delete nextSources[matchKey];
|
|
50908
|
-
notifySubscribers(slot, aggregateSlot(nextSources));
|
|
50909
|
-
return { ...prev, [slot]: nextSources };
|
|
50910
|
-
}
|
|
50911
|
-
return prev;
|
|
50912
|
-
});
|
|
50913
|
-
},
|
|
50914
|
-
[notifySubscribers, notifyTraitSubscribers, unindexTrait]
|
|
50915
|
-
);
|
|
50916
|
-
const clearAll = React79.useCallback(() => {
|
|
50917
|
-
timersRef.current.forEach((timer) => clearTimeout(timer));
|
|
50918
|
-
timersRef.current.clear();
|
|
50919
|
-
setSources((prev) => {
|
|
50920
|
-
for (const slot of ALL_SLOTS2) {
|
|
50921
|
-
const slotSources = prev[slot];
|
|
50922
|
-
if (!slotSources) continue;
|
|
50923
|
-
for (const content of Object.values(slotSources)) {
|
|
50924
|
-
content.onDismiss?.();
|
|
50925
|
-
if (content.sourceTrait) {
|
|
50926
|
-
notifyTraitSubscribers(content.sourceTrait, null);
|
|
50927
|
-
}
|
|
50928
|
-
}
|
|
50929
|
-
notifySubscribers(slot, null);
|
|
50930
|
-
}
|
|
50931
|
-
return DEFAULT_SOURCES;
|
|
50932
|
-
});
|
|
50933
|
-
traitIndexRef.current.clear();
|
|
50934
|
-
}, [notifySubscribers, notifyTraitSubscribers]);
|
|
50935
|
-
const subscribe2 = React79.useCallback((callback) => {
|
|
50936
|
-
subscribersRef.current.add(callback);
|
|
50937
|
-
return () => {
|
|
50938
|
-
subscribersRef.current.delete(callback);
|
|
50939
|
-
};
|
|
50940
|
-
}, []);
|
|
50941
|
-
const hasContent = React79.useCallback(
|
|
50942
|
-
(slot) => slots[slot] !== null,
|
|
50943
|
-
[slots]
|
|
50944
|
-
);
|
|
50945
|
-
const getContent = React79.useCallback(
|
|
50946
|
-
(slot) => slots[slot],
|
|
50947
|
-
[slots]
|
|
50948
|
-
);
|
|
50949
|
-
const getTraitContent = React79.useCallback(
|
|
50950
|
-
(traitName) => traitIndexRef.current.get(traitName) ?? null,
|
|
50951
|
-
[]
|
|
50952
|
-
);
|
|
50953
|
-
const subscribeTrait = React79.useCallback(
|
|
50954
|
-
(traitName, callback) => {
|
|
50955
|
-
let set = traitSubscribersRef.current.get(traitName);
|
|
50956
|
-
if (!set) {
|
|
50957
|
-
set = /* @__PURE__ */ new Set();
|
|
50958
|
-
traitSubscribersRef.current.set(traitName, set);
|
|
50959
|
-
}
|
|
50960
|
-
set.add(callback);
|
|
50961
|
-
return () => {
|
|
50962
|
-
const s = traitSubscribersRef.current.get(traitName);
|
|
50963
|
-
if (!s) return;
|
|
50964
|
-
s.delete(callback);
|
|
50965
|
-
if (s.size === 0) {
|
|
50966
|
-
traitSubscribersRef.current.delete(traitName);
|
|
50967
|
-
}
|
|
50968
|
-
};
|
|
50969
|
-
},
|
|
50970
|
-
[]
|
|
50971
|
-
);
|
|
50972
|
-
const updateTraitContent = React79.useCallback(
|
|
50973
|
-
(traitName, content) => {
|
|
50974
|
-
const id = generateId();
|
|
50975
|
-
const fullContent = { ...content, id, sourceTrait: traitName };
|
|
50976
|
-
indexTraitRender(traitName, fullContent);
|
|
50977
|
-
notifyTraitSubscribers(traitName, fullContent);
|
|
50978
|
-
return id;
|
|
50979
|
-
},
|
|
50980
|
-
[indexTraitRender, notifyTraitSubscribers]
|
|
50981
|
-
);
|
|
50982
|
-
return {
|
|
50983
|
-
slots,
|
|
50984
|
-
render,
|
|
50985
|
-
clear,
|
|
50986
|
-
clearBySource,
|
|
50987
|
-
clearById,
|
|
50988
|
-
clearAll,
|
|
50989
|
-
subscribe: subscribe2,
|
|
50990
|
-
hasContent,
|
|
50991
|
-
getContent,
|
|
50992
|
-
getTraitContent,
|
|
50993
|
-
subscribeTrait,
|
|
50994
|
-
updateTraitContent
|
|
50995
|
-
};
|
|
50996
|
-
}
|
|
50997
|
-
|
|
50998
|
-
// hooks/useUIEvents.ts
|
|
50999
|
-
init_useEventBus();
|
|
51000
|
-
var UI_PREFIX = "UI:";
|
|
51001
|
-
function useUIEvents(dispatch, traitName, validEvents, eventBusInstance) {
|
|
51002
|
-
const defaultEventBus = useEventBus();
|
|
51003
|
-
const eventBus = eventBusInstance ?? defaultEventBus;
|
|
51004
|
-
const validEventsKey = validEvents.slice().sort().join(",");
|
|
51005
|
-
const stableValidEvents = React79.useMemo(
|
|
51006
|
-
() => validEvents,
|
|
51007
|
-
[validEventsKey]
|
|
51008
|
-
// intentional — validEventsKey is the stable dep
|
|
51009
|
-
);
|
|
51010
|
-
React79.useEffect(() => {
|
|
51011
|
-
const unsubscribes = [];
|
|
51012
|
-
for (const smEvent of stableValidEvents) {
|
|
51013
|
-
const handler = (event) => {
|
|
51014
|
-
if (event.source && event.source.dispatched) {
|
|
51015
|
-
return;
|
|
51016
|
-
}
|
|
51017
|
-
dispatch(smEvent, event.payload);
|
|
51018
|
-
};
|
|
51019
|
-
unsubscribes.push(
|
|
51020
|
-
eventBus.on(`${UI_PREFIX}${traitName}.${smEvent}`, handler)
|
|
51021
|
-
);
|
|
51022
|
-
}
|
|
51023
|
-
return () => {
|
|
51024
|
-
for (const unsub of unsubscribes) {
|
|
51025
|
-
if (typeof unsub === "function") unsub();
|
|
51026
|
-
}
|
|
51027
|
-
};
|
|
51028
|
-
}, [eventBus, dispatch, traitName, stableValidEvents]);
|
|
51029
|
-
}
|
|
51030
|
-
function useTraitListens(dispatch, listens, eventBusInstance) {
|
|
51031
|
-
const defaultEventBus = useEventBus();
|
|
51032
|
-
const eventBus = eventBusInstance ?? defaultEventBus;
|
|
51033
|
-
const stableKey = listens.map((l) => `${l.sourceKey}->${l.trigger}`).sort().join("|");
|
|
51034
|
-
const stableListens = React79.useMemo(
|
|
51035
|
-
() => listens,
|
|
51036
|
-
[stableKey]
|
|
51037
|
-
// intentional
|
|
51038
|
-
);
|
|
51039
|
-
React79.useEffect(() => {
|
|
51040
|
-
const unsubscribes = [];
|
|
51041
|
-
for (const spec of stableListens) {
|
|
51042
|
-
const handler = (event) => {
|
|
51043
|
-
dispatch(spec.trigger, event.payload);
|
|
51044
|
-
};
|
|
51045
|
-
unsubscribes.push(eventBus.on(`${UI_PREFIX}${spec.sourceKey}`, handler));
|
|
51046
|
-
}
|
|
51047
|
-
return () => {
|
|
51048
|
-
for (const unsub of unsubscribes) {
|
|
51049
|
-
if (typeof unsub === "function") unsub();
|
|
51050
|
-
}
|
|
51051
|
-
};
|
|
51052
|
-
}, [eventBus, dispatch, stableListens]);
|
|
51053
|
-
}
|
|
51054
|
-
|
|
51055
|
-
// hooks/index.ts
|
|
51056
|
-
init_useQuerySingleton();
|
|
51057
|
-
|
|
51058
|
-
// stores/entityStore.ts
|
|
51059
|
-
var entities = /* @__PURE__ */ new Map();
|
|
51060
|
-
var listeners7 = /* @__PURE__ */ new Set();
|
|
51061
|
-
var idCounter2 = 0;
|
|
51062
|
-
function subscribe(listener) {
|
|
51063
|
-
listeners7.add(listener);
|
|
51064
|
-
return () => listeners7.delete(listener);
|
|
51065
|
-
}
|
|
51066
|
-
function notify() {
|
|
51067
|
-
listeners7.forEach((listener) => listener());
|
|
51068
|
-
}
|
|
51069
|
-
function getEntity(id) {
|
|
51070
|
-
return entities.get(id);
|
|
51071
|
-
}
|
|
51072
|
-
function getByType(type) {
|
|
51073
|
-
const types = Array.isArray(type) ? type : [type];
|
|
51074
|
-
return [...entities.values()].filter((e) => types.includes(e.type));
|
|
51075
|
-
}
|
|
51076
|
-
function getAllEntities() {
|
|
51077
|
-
return [...entities.values()];
|
|
51078
|
-
}
|
|
51079
|
-
function getSingleton(type) {
|
|
51080
|
-
return [...entities.values()].find((e) => e.type === type);
|
|
51081
|
-
}
|
|
51082
|
-
function spawnEntity(config) {
|
|
51083
|
-
const id = config.id ?? `entity_${++idCounter2}`;
|
|
51084
|
-
const entity = { ...config, id };
|
|
51085
|
-
entities = new Map(entities);
|
|
51086
|
-
entities.set(id, entity);
|
|
51087
|
-
notify();
|
|
51088
|
-
return id;
|
|
51089
|
-
}
|
|
51090
|
-
function updateEntity(id, updates) {
|
|
51091
|
-
const entity = entities.get(id);
|
|
51092
|
-
if (entity) {
|
|
51093
|
-
entities = new Map(entities);
|
|
51094
|
-
entities.set(id, { ...entity, ...updates });
|
|
51095
|
-
notify();
|
|
51096
|
-
}
|
|
51097
|
-
}
|
|
51098
|
-
function updateSingleton(type, updates) {
|
|
51099
|
-
const entity = getSingleton(type);
|
|
51100
|
-
if (entity) {
|
|
51101
|
-
updateEntity(entity.id, updates);
|
|
51102
|
-
}
|
|
51103
|
-
}
|
|
51104
|
-
function removeEntity(id) {
|
|
51105
|
-
if (entities.has(id)) {
|
|
51106
|
-
entities = new Map(entities);
|
|
51107
|
-
entities.delete(id);
|
|
51108
|
-
notify();
|
|
51109
|
-
}
|
|
51110
|
-
}
|
|
51111
|
-
function clearEntities() {
|
|
51112
|
-
entities = /* @__PURE__ */ new Map();
|
|
51113
|
-
notify();
|
|
51114
|
-
}
|
|
51115
|
-
function getSnapshot2() {
|
|
51116
|
-
return entities;
|
|
51117
|
-
}
|
|
51118
|
-
|
|
51119
|
-
// hooks/useEntities.ts
|
|
51120
|
-
function useEntities() {
|
|
51121
|
-
const entities2 = React79.useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
|
|
51122
|
-
return {
|
|
51123
|
-
entities: entities2,
|
|
51124
|
-
getEntity,
|
|
51125
|
-
getByType,
|
|
51126
|
-
getAllEntities,
|
|
51127
|
-
getSingleton,
|
|
51128
|
-
spawnEntity,
|
|
51129
|
-
updateEntity,
|
|
51130
|
-
updateSingleton,
|
|
51131
|
-
removeEntity,
|
|
51132
|
-
clearEntities
|
|
51133
|
-
};
|
|
51134
|
-
}
|
|
51135
|
-
function useEntity(id) {
|
|
51136
|
-
const entities2 = React79.useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
|
|
51137
|
-
return entities2.get(id);
|
|
51138
|
-
}
|
|
51139
|
-
function useEntitiesByType(type) {
|
|
51140
|
-
const entities2 = React79.useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
|
|
51141
|
-
return [...entities2.values()].filter((e) => e.type === type);
|
|
51142
|
-
}
|
|
51143
|
-
function useSingletonEntity(type) {
|
|
51144
|
-
const entities2 = React79.useSyncExternalStore(subscribe, getSnapshot2, getSnapshot2);
|
|
51145
|
-
return [...entities2.values()].find((e) => e.type === type);
|
|
51146
|
-
}
|
|
51147
|
-
function usePlayer() {
|
|
51148
|
-
const player = useSingletonEntity("Player");
|
|
51149
|
-
const update = React79.useCallback((updates) => {
|
|
51150
|
-
if (player) updateEntity(player.id, updates);
|
|
51151
|
-
}, [player?.id]);
|
|
51152
|
-
return { player, updatePlayer: update };
|
|
51153
|
-
}
|
|
51154
|
-
function usePhysics() {
|
|
51155
|
-
const physics = useSingletonEntity("Physics");
|
|
51156
|
-
const update = React79.useCallback((updates) => {
|
|
51157
|
-
if (physics) updateEntity(physics.id, updates);
|
|
51158
|
-
}, [physics?.id]);
|
|
51159
|
-
return { physics, updatePhysics: update };
|
|
51160
|
-
}
|
|
51161
|
-
function useInput() {
|
|
51162
|
-
const input = useSingletonEntity("Input");
|
|
51163
|
-
const update = React79.useCallback((updates) => {
|
|
51164
|
-
if (input) updateEntity(input.id, updates);
|
|
51165
|
-
}, [input?.id]);
|
|
51166
|
-
return { input, updateInput: update };
|
|
51167
|
-
}
|
|
51168
|
-
|
|
51169
|
-
// hooks/index.ts
|
|
51170
|
-
init_useTranslate();
|
|
51171
|
-
init_useAuthContext();
|
|
51172
|
-
init_useSwipeGesture();
|
|
51173
|
-
init_useLongPress();
|
|
51174
|
-
init_useDragReorder();
|
|
51175
|
-
init_useInfiniteScroll();
|
|
51176
|
-
init_usePullToRefresh();
|
|
51177
|
-
function getDistance(touches) {
|
|
51178
|
-
const dx = touches[0].clientX - touches[1].clientX;
|
|
51179
|
-
const dy = touches[0].clientY - touches[1].clientY;
|
|
51180
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
51181
|
-
}
|
|
51182
|
-
function usePinchZoom(options = {}) {
|
|
51183
|
-
const { minScale = 0.5, maxScale = 4 } = options;
|
|
51184
|
-
const [scale, setScale] = React79.useState(1);
|
|
51185
|
-
const [isPinching, setIsPinching] = React79.useState(false);
|
|
51186
|
-
const initialDistance = React79.useRef(0);
|
|
51187
|
-
const initialScale = React79.useRef(1);
|
|
51188
|
-
const onTouchStart = React79.useCallback((e) => {
|
|
51189
|
-
if (e.touches.length === 2) {
|
|
51190
|
-
initialDistance.current = getDistance(e.touches);
|
|
51191
|
-
initialScale.current = scale;
|
|
51192
|
-
setIsPinching(true);
|
|
51193
|
-
}
|
|
51194
|
-
}, [scale]);
|
|
51195
|
-
const onTouchMove = React79.useCallback((e) => {
|
|
51196
|
-
if (e.touches.length !== 2 || !isPinching) return;
|
|
51197
|
-
e.preventDefault();
|
|
51198
|
-
const currentDistance = getDistance(e.touches);
|
|
51199
|
-
const ratio = currentDistance / initialDistance.current;
|
|
51200
|
-
const newScale = Math.min(maxScale, Math.max(minScale, initialScale.current * ratio));
|
|
51201
|
-
setScale(newScale);
|
|
51202
|
-
}, [isPinching, minScale, maxScale]);
|
|
51203
|
-
const onTouchEnd = React79.useCallback(() => {
|
|
51204
|
-
setIsPinching(false);
|
|
51205
|
-
}, []);
|
|
51206
|
-
const resetZoom = React79.useCallback(() => {
|
|
51207
|
-
setScale(1);
|
|
51208
|
-
}, []);
|
|
51209
|
-
return {
|
|
51210
|
-
scale,
|
|
51211
|
-
isPinching,
|
|
51212
|
-
gestureProps: {
|
|
51213
|
-
onTouchStart,
|
|
51214
|
-
onTouchMove,
|
|
51215
|
-
onTouchEnd
|
|
51216
|
-
},
|
|
51217
|
-
resetZoom
|
|
51218
|
-
};
|
|
51219
|
-
}
|
|
51220
|
-
|
|
51221
|
-
// hooks/useDraggable.ts
|
|
51222
|
-
init_useEventBus();
|
|
51223
|
-
var ALMADAR_DND_MIME = "application/x-almadar-dnd";
|
|
51224
|
-
function useDraggable({ payload, disabled = false }) {
|
|
51225
|
-
const [isDragging, setIsDragging] = React79.useState(false);
|
|
51226
|
-
const eventBus = useEventBus();
|
|
51227
|
-
const handleDragStart = React79.useCallback(
|
|
51228
|
-
(e) => {
|
|
51229
|
-
if (disabled) {
|
|
51230
|
-
e.preventDefault();
|
|
51231
|
-
return;
|
|
51232
|
-
}
|
|
51233
|
-
e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
|
|
51234
|
-
e.dataTransfer.effectAllowed = "copy";
|
|
51235
|
-
setIsDragging(true);
|
|
51236
|
-
eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
|
|
51237
|
-
},
|
|
51238
|
-
[disabled, payload, eventBus]
|
|
51239
|
-
);
|
|
51240
|
-
const handleDragEnd = React79.useCallback(
|
|
51241
|
-
(e) => {
|
|
51242
|
-
setIsDragging(false);
|
|
51243
|
-
eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
|
|
51244
|
-
},
|
|
51245
|
-
[payload, eventBus]
|
|
51246
|
-
);
|
|
51247
|
-
const dragProps = React79.useMemo(
|
|
51248
|
-
() => ({
|
|
51249
|
-
draggable: !disabled,
|
|
51250
|
-
onDragStart: handleDragStart,
|
|
51251
|
-
onDragEnd: handleDragEnd,
|
|
51252
|
-
"aria-grabbed": isDragging
|
|
51253
|
-
}),
|
|
51254
|
-
[disabled, handleDragStart, handleDragEnd, isDragging]
|
|
51255
|
-
);
|
|
51256
|
-
return { dragProps, isDragging };
|
|
51257
|
-
}
|
|
51258
|
-
|
|
51259
|
-
// hooks/useDropZone.ts
|
|
51260
|
-
init_useEventBus();
|
|
51261
|
-
function parsePayload(e) {
|
|
51262
|
-
try {
|
|
51263
|
-
const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
|
|
51264
|
-
if (!raw) return null;
|
|
51265
|
-
const parsed = JSON.parse(raw);
|
|
51266
|
-
if (typeof parsed.kind !== "string" || !parsed.data) return null;
|
|
51267
|
-
return parsed;
|
|
51268
|
-
} catch {
|
|
51269
|
-
return null;
|
|
51270
|
-
}
|
|
51271
|
-
}
|
|
51272
|
-
function hasAlmadarPayload(e) {
|
|
51273
|
-
return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
|
|
51274
|
-
}
|
|
51275
|
-
function useDropZone({ accepts, onDrop, disabled = false }) {
|
|
51276
|
-
const [isOver, setIsOver] = React79.useState(false);
|
|
51277
|
-
const eventBus = useEventBus();
|
|
51278
|
-
const handleDragOver = React79.useCallback(
|
|
51279
|
-
(e) => {
|
|
51280
|
-
if (disabled) return;
|
|
51281
|
-
if (!hasAlmadarPayload(e)) return;
|
|
51282
|
-
e.preventDefault();
|
|
51283
|
-
e.dataTransfer.dropEffect = "copy";
|
|
51284
|
-
setIsOver(true);
|
|
51285
|
-
},
|
|
51286
|
-
[disabled]
|
|
51287
|
-
);
|
|
51288
|
-
const handleDragLeave = React79.useCallback(
|
|
51289
|
-
(e) => {
|
|
51290
|
-
setIsOver(false);
|
|
51291
|
-
},
|
|
51292
|
-
[]
|
|
51293
|
-
);
|
|
51294
|
-
const handleDrop = React79.useCallback(
|
|
51295
|
-
(e) => {
|
|
51296
|
-
e.preventDefault();
|
|
51297
|
-
setIsOver(false);
|
|
51298
|
-
if (disabled) return;
|
|
51299
|
-
const payload = parsePayload(e);
|
|
51300
|
-
if (!payload) return;
|
|
51301
|
-
if (!accepts.includes(payload.kind)) return;
|
|
51302
|
-
const position = { x: e.clientX, y: e.clientY };
|
|
51303
|
-
onDrop(payload, position);
|
|
51304
|
-
eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
|
|
51305
|
-
},
|
|
51306
|
-
[disabled, accepts, onDrop, eventBus]
|
|
51307
|
-
);
|
|
51308
|
-
const dropProps = React79.useMemo(
|
|
51309
|
-
() => ({
|
|
51310
|
-
onDragOver: handleDragOver,
|
|
51311
|
-
onDragLeave: handleDragLeave,
|
|
51312
|
-
onDrop: handleDrop
|
|
51313
|
-
}),
|
|
51314
|
-
[handleDragOver, handleDragLeave, handleDrop]
|
|
51315
|
-
);
|
|
51316
|
-
return { dropProps, isOver };
|
|
51317
|
-
}
|
|
51318
|
-
var API_BASE = typeof process !== "undefined" && process.env?.VITE_API_URL ? process.env.VITE_API_URL : "http://localhost:3000";
|
|
51319
|
-
function getUserId() {
|
|
51320
|
-
return localStorage.getItem("userId") || "anonymous";
|
|
51321
|
-
}
|
|
51322
|
-
async function fetchWithAuth(endpoint, options) {
|
|
51323
|
-
const userId = getUserId();
|
|
51324
|
-
const response = await fetch(`${API_BASE}${endpoint}`, {
|
|
51325
|
-
...options,
|
|
51326
|
-
headers: {
|
|
51327
|
-
"Content-Type": "application/json",
|
|
51328
|
-
"x-user-id": userId,
|
|
51329
|
-
...options?.headers
|
|
51330
|
-
}
|
|
51331
|
-
});
|
|
51332
|
-
if (!response.ok) {
|
|
51333
|
-
const error = await response.json().catch(() => ({ error: response.statusText }));
|
|
51334
|
-
throw new Error(error.error || error.message || "Request failed");
|
|
51335
|
-
}
|
|
51336
|
-
return response.json();
|
|
51337
|
-
}
|
|
51338
|
-
function useGitHubStatus() {
|
|
51339
|
-
return reactQuery.useQuery({
|
|
51340
|
-
queryKey: ["github", "status"],
|
|
51341
|
-
queryFn: () => fetchWithAuth("/api/github/status"),
|
|
51342
|
-
staleTime: 6e4,
|
|
51343
|
-
// 1 minute
|
|
51344
|
-
retry: false
|
|
51345
|
-
});
|
|
51346
|
-
}
|
|
51347
|
-
function useConnectGitHub() {
|
|
51348
|
-
const connectGitHub = React79.useCallback(() => {
|
|
51349
|
-
const userId = getUserId();
|
|
51350
|
-
const state = btoa(JSON.stringify({ userId, returnUrl: window.location.href }));
|
|
51351
|
-
window.location.href = `${API_BASE}/api/github/oauth/authorize?state=${state}`;
|
|
51352
|
-
}, []);
|
|
51353
|
-
return { connectGitHub };
|
|
51354
|
-
}
|
|
51355
|
-
function useDisconnectGitHub() {
|
|
51356
|
-
const queryClient = reactQuery.useQueryClient();
|
|
51357
|
-
return reactQuery.useMutation({
|
|
51358
|
-
mutationFn: () => fetchWithAuth("/api/github/disconnect", { method: "POST" }),
|
|
51359
|
-
onSuccess: () => {
|
|
51360
|
-
queryClient.invalidateQueries({ queryKey: ["github", "status"] });
|
|
51361
|
-
queryClient.removeQueries({ queryKey: ["github", "repos"] });
|
|
51362
|
-
}
|
|
51363
|
-
});
|
|
51364
|
-
}
|
|
51365
|
-
function useGitHubRepos(page = 1, perPage = 30) {
|
|
51366
|
-
return reactQuery.useQuery({
|
|
51367
|
-
queryKey: ["github", "repos", page, perPage],
|
|
51368
|
-
queryFn: () => fetchWithAuth(`/api/github/repos?page=${page}&per_page=${perPage}`),
|
|
51369
|
-
enabled: true,
|
|
51370
|
-
// Only fetch if user is connected
|
|
51371
|
-
staleTime: 3e5
|
|
51372
|
-
// 5 minutes
|
|
51373
|
-
});
|
|
51374
|
-
}
|
|
51375
|
-
function useGitHubRepo(owner, repo, enabled = true) {
|
|
51376
|
-
return reactQuery.useQuery({
|
|
51377
|
-
queryKey: ["github", "repo", owner, repo],
|
|
51378
|
-
queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}`),
|
|
51379
|
-
enabled: enabled && !!owner && !!repo,
|
|
51380
|
-
staleTime: 3e5
|
|
51381
|
-
// 5 minutes
|
|
51382
|
-
});
|
|
51383
|
-
}
|
|
51384
|
-
function useGitHubBranches(owner, repo, enabled = true) {
|
|
51385
|
-
return reactQuery.useQuery({
|
|
51386
|
-
queryKey: ["github", "branches", owner, repo],
|
|
51387
|
-
queryFn: () => fetchWithAuth(`/api/github/repos/${owner}/${repo}/branches`),
|
|
51388
|
-
enabled: enabled && !!owner && !!repo,
|
|
51389
|
-
staleTime: 6e4
|
|
51390
|
-
// 1 minute
|
|
51391
|
-
});
|
|
51392
|
-
}
|
|
51393
|
-
|
|
51394
|
-
exports.ALMADAR_DND_MIME = ALMADAR_DND_MIME;
|
|
51395
49131
|
exports.ActionButton = ActionButton;
|
|
51396
49132
|
exports.ActionButtons = ActionButtons;
|
|
51397
49133
|
exports.ActionCard = Card2;
|
|
@@ -51412,7 +49148,6 @@ exports.CombatLog = CombatLog;
|
|
|
51412
49148
|
exports.ComboCounter = ComboCounter;
|
|
51413
49149
|
exports.ControlButton = ControlButton;
|
|
51414
49150
|
exports.CraftingRecipe = CraftingRecipe;
|
|
51415
|
-
exports.DEFAULT_SLOTS = DEFAULT_SLOTS;
|
|
51416
49151
|
exports.DPad = DPad;
|
|
51417
49152
|
exports.DamageNumber = DamageNumber;
|
|
51418
49153
|
exports.DataGrid = DataGrid;
|
|
@@ -51506,80 +49241,36 @@ exports.applyTemporaryEffect = applyTemporaryEffect;
|
|
|
51506
49241
|
exports.calculateAttackTargets = calculateAttackTargets;
|
|
51507
49242
|
exports.calculateDamage = calculateDamage;
|
|
51508
49243
|
exports.calculateValidMoves = calculateValidMoves;
|
|
51509
|
-
exports.clearEntities = clearEntities;
|
|
51510
49244
|
exports.cn = cn;
|
|
51511
49245
|
exports.combatAnimations = combatAnimations;
|
|
51512
49246
|
exports.combatClasses = combatClasses;
|
|
51513
49247
|
exports.combatEffects = combatEffects;
|
|
51514
49248
|
exports.createInitialGameState = createInitialGameState;
|
|
51515
|
-
exports.createTranslate = createTranslate;
|
|
51516
49249
|
exports.createUnitAnimationState = createUnitAnimationState;
|
|
51517
49250
|
exports.drawSprite = drawSprite;
|
|
51518
49251
|
exports.generateCombatMessage = generateCombatMessage;
|
|
51519
|
-
exports.getAllEntities = getAllEntities;
|
|
51520
|
-
exports.getByType = getByType;
|
|
51521
49252
|
exports.getCurrentFrame = getCurrentFrame;
|
|
51522
|
-
exports.getEntity = getEntity;
|
|
51523
|
-
exports.getSingleton = getSingleton;
|
|
51524
49253
|
exports.getTileDimensions = getTileDimensions;
|
|
51525
49254
|
exports.inferDirection = inferDirection;
|
|
51526
49255
|
exports.isoToScreen = isoToScreen;
|
|
51527
49256
|
exports.mapBookData = mapBookData;
|
|
51528
|
-
exports.parseQueryBinding = parseQueryBinding;
|
|
51529
|
-
exports.removeEntity = removeEntity;
|
|
51530
49257
|
exports.resolveFieldMap = resolveFieldMap;
|
|
51531
49258
|
exports.resolveFrame = resolveFrame;
|
|
51532
49259
|
exports.resolveSheetDirection = resolveSheetDirection;
|
|
51533
49260
|
exports.screenToIso = screenToIso;
|
|
51534
|
-
exports.spawnEntity = spawnEntity;
|
|
51535
49261
|
exports.tickAnimationState = tickAnimationState;
|
|
51536
49262
|
exports.transitionAnimation = transitionAnimation;
|
|
51537
|
-
exports.updateEntity = updateEntity;
|
|
51538
|
-
exports.updateSingleton = updateSingleton;
|
|
51539
|
-
exports.useAgentChat = useAgentChat;
|
|
51540
49263
|
exports.useAnchorRect = useAnchorRect;
|
|
51541
|
-
exports.useAuthContext = useAuthContext;
|
|
51542
49264
|
exports.useBattleState = useBattleState;
|
|
51543
49265
|
exports.useCamera = useCamera;
|
|
51544
|
-
exports.useCompile = useCompile;
|
|
51545
|
-
exports.useConnectGitHub = useConnectGitHub;
|
|
51546
|
-
exports.useDeepAgentGeneration = useDeepAgentGeneration;
|
|
51547
|
-
exports.useDisconnectGitHub = useDisconnectGitHub;
|
|
51548
|
-
exports.useDragReorder = useDragReorder;
|
|
51549
|
-
exports.useDraggable = useDraggable;
|
|
51550
|
-
exports.useDropZone = useDropZone;
|
|
51551
|
-
exports.useEmitEvent = useEmitEvent;
|
|
51552
|
-
exports.useEntities = useEntities;
|
|
51553
|
-
exports.useEntitiesByType = useEntitiesByType;
|
|
51554
|
-
exports.useEntityById = useEntity;
|
|
51555
|
-
exports.useEventBus = useEventBus;
|
|
51556
|
-
exports.useEventListener = useEventListener;
|
|
51557
|
-
exports.useExtensions = useExtensions;
|
|
51558
|
-
exports.useFileEditor = useFileEditor;
|
|
51559
|
-
exports.useFileSystem = useFileSystem;
|
|
51560
49266
|
exports.useGameAudio = useGameAudio;
|
|
51561
49267
|
exports.useGameAudioContext = useGameAudioContext;
|
|
51562
|
-
exports.useGitHubBranches = useGitHubBranches;
|
|
51563
|
-
exports.useGitHubRepo = useGitHubRepo;
|
|
51564
|
-
exports.useGitHubRepos = useGitHubRepos;
|
|
51565
|
-
exports.useGitHubStatus = useGitHubStatus;
|
|
51566
49268
|
exports.useImageCache = useImageCache;
|
|
51567
|
-
exports.useInfiniteScroll = useInfiniteScroll;
|
|
51568
|
-
exports.useInput = useInput;
|
|
51569
|
-
exports.useLongPress = useLongPress;
|
|
51570
|
-
exports.useOrbitalHistory = useOrbitalHistory;
|
|
51571
|
-
exports.usePhysics = usePhysics;
|
|
51572
49269
|
exports.usePhysics2D = usePhysics2D;
|
|
51573
|
-
exports.usePinchZoom = usePinchZoom;
|
|
51574
|
-
exports.usePlayer = usePlayer;
|
|
51575
|
-
exports.usePreview = usePreview;
|
|
51576
|
-
exports.usePullToRefresh = usePullToRefresh;
|
|
51577
|
-
exports.useQuerySingleton = useQuerySingleton;
|
|
51578
|
-
exports.useSingletonEntity = useSingletonEntity;
|
|
51579
49270
|
exports.useSpriteAnimations = useSpriteAnimations;
|
|
51580
|
-
|
|
51581
|
-
exports.
|
|
51582
|
-
|
|
51583
|
-
|
|
51584
|
-
|
|
51585
|
-
|
|
49271
|
+
Object.keys(hooks).forEach(function (k) {
|
|
49272
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
49273
|
+
enumerable: true,
|
|
49274
|
+
get: function () { return hooks[k]; }
|
|
49275
|
+
});
|
|
49276
|
+
});
|