@almadar/ui 5.21.7 → 5.21.9
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 +970 -650
- package/dist/avl/index.js +970 -650
- package/dist/components/game/organisms/three/index.cjs +489 -1
- package/dist/components/game/organisms/three/index.js +489 -1
- package/dist/components/index.cjs +675 -370
- package/dist/components/index.js +675 -370
- package/dist/docs/index.cjs +300 -5
- package/dist/docs/index.js +300 -5
- package/dist/hooks/index.cjs +296 -3
- package/dist/hooks/index.js +296 -3
- package/dist/locales/index.cjs +896 -9
- package/dist/locales/index.js +896 -9
- package/dist/providers/index.cjs +675 -370
- package/dist/providers/index.js +675 -370
- package/dist/runtime/index.cjs +675 -370
- package/dist/runtime/index.js +675 -370
- package/locales/ar.json +300 -31
- package/locales/en.json +296 -31
- package/locales/sl.json +300 -31
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -3851,6 +3851,503 @@ var init_Stack = __esm({
|
|
|
3851
3851
|
HStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "horizontal", ...props });
|
|
3852
3852
|
}
|
|
3853
3853
|
});
|
|
3854
|
+
|
|
3855
|
+
// locales/en.json
|
|
3856
|
+
var en_default;
|
|
3857
|
+
var init_en = __esm({
|
|
3858
|
+
"locales/en.json"() {
|
|
3859
|
+
en_default = {
|
|
3860
|
+
$meta: {
|
|
3861
|
+
locale: "en",
|
|
3862
|
+
direction: "ltr"
|
|
3863
|
+
},
|
|
3864
|
+
"common.save": "Save",
|
|
3865
|
+
"common.cancel": "Cancel",
|
|
3866
|
+
"common.delete": "Delete",
|
|
3867
|
+
"common.close": "Close",
|
|
3868
|
+
"common.confirm": "Are you sure?",
|
|
3869
|
+
"common.create": "Create",
|
|
3870
|
+
"common.edit": "Edit",
|
|
3871
|
+
"common.view": "View",
|
|
3872
|
+
"common.add": "Add",
|
|
3873
|
+
"common.remove": "Remove",
|
|
3874
|
+
"common.search": "Search...",
|
|
3875
|
+
"common.filter": "Filter",
|
|
3876
|
+
"common.actions": "Actions",
|
|
3877
|
+
"common.yes": "Yes",
|
|
3878
|
+
"common.no": "No",
|
|
3879
|
+
"common.selected": "selected",
|
|
3880
|
+
"common.ok": "OK",
|
|
3881
|
+
"common.done": "Done",
|
|
3882
|
+
"common.apply": "Apply",
|
|
3883
|
+
"common.reset": "Reset",
|
|
3884
|
+
"common.refresh": "Refresh",
|
|
3885
|
+
"common.export": "Export",
|
|
3886
|
+
"common.import": "Import",
|
|
3887
|
+
"common.copy": "Copy",
|
|
3888
|
+
"common.settings": "Settings",
|
|
3889
|
+
"nav.previous": "Previous",
|
|
3890
|
+
"nav.next": "Next",
|
|
3891
|
+
"nav.back": "Back",
|
|
3892
|
+
"nav.home": "Home",
|
|
3893
|
+
"form.submit": "Submit",
|
|
3894
|
+
"form.saving": "Saving...",
|
|
3895
|
+
"form.required": "This field is required",
|
|
3896
|
+
"form.invalidEmail": "Enter a valid email address",
|
|
3897
|
+
"form.selectPlaceholder": "Select {{label}}...",
|
|
3898
|
+
"form.searchPlaceholder": "Search {{entity}}...",
|
|
3899
|
+
"table.empty.title": "No items found",
|
|
3900
|
+
"table.empty.description": "No items to display.",
|
|
3901
|
+
"table.search.placeholder": "Search...",
|
|
3902
|
+
"table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
|
|
3903
|
+
"table.pagination.page": "Page {{page}} of {{totalPages}}",
|
|
3904
|
+
"table.bulk.selected": "{{count}} selected",
|
|
3905
|
+
"table.loading": "Loading...",
|
|
3906
|
+
"status.loading": "Loading...",
|
|
3907
|
+
"status.scheduled": "Scheduled",
|
|
3908
|
+
"status.inProgress": "In Progress",
|
|
3909
|
+
"status.completed": "Completed",
|
|
3910
|
+
"status.cancelled": "Cancelled",
|
|
3911
|
+
"status.pending": "Pending",
|
|
3912
|
+
"status.active": "Active",
|
|
3913
|
+
"status.inactive": "Inactive",
|
|
3914
|
+
"status.draft": "Draft",
|
|
3915
|
+
"status.archived": "Archived",
|
|
3916
|
+
"error.generic": "Something went wrong",
|
|
3917
|
+
"error.retry": "Try again",
|
|
3918
|
+
"error.notFound": "Not found",
|
|
3919
|
+
"error.loadFailed": "Failed to load: {{message}}",
|
|
3920
|
+
"error.configMissing": "Configuration not found for: {{id}}",
|
|
3921
|
+
"common.loading": "Loading...",
|
|
3922
|
+
"common.showMore": "Show More",
|
|
3923
|
+
"common.showLess": "Show Less",
|
|
3924
|
+
"common.noResults": "No results found",
|
|
3925
|
+
"common.saveChanges": "Save Changes",
|
|
3926
|
+
"common.retry": "Retry",
|
|
3927
|
+
"common.open": "Open",
|
|
3928
|
+
"common.back": "Back",
|
|
3929
|
+
"empty.noItems": "No items",
|
|
3930
|
+
"empty.noData": "No data available",
|
|
3931
|
+
"empty.noItemsYet": "No items yet",
|
|
3932
|
+
"empty.noItemsAdded": "No items added yet",
|
|
3933
|
+
"empty.noOptionsFound": "No options found",
|
|
3934
|
+
"list.addItemPlaceholder": "Add new item...",
|
|
3935
|
+
"error.occurred": "An error occurred",
|
|
3936
|
+
"error.failedToLoad": "Failed to load data",
|
|
3937
|
+
"wizard.back": "Back",
|
|
3938
|
+
"wizard.next": "Next",
|
|
3939
|
+
"wizard.complete": "Complete",
|
|
3940
|
+
"wizard.stepOf": "Step {{current}} of {{total}}",
|
|
3941
|
+
"pagination.previous": "Previous",
|
|
3942
|
+
"pagination.next": "Next",
|
|
3943
|
+
"pagination.total": "Total:",
|
|
3944
|
+
"pagination.show": "Show:",
|
|
3945
|
+
"pagination.goTo": "Go to:",
|
|
3946
|
+
"pagination.go": "Go",
|
|
3947
|
+
"auth.signIn": "Sign in",
|
|
3948
|
+
"auth.signOut": "Sign out",
|
|
3949
|
+
"dialog.confirm": "Confirm",
|
|
3950
|
+
"dialog.cancel": "Cancel",
|
|
3951
|
+
"dialog.loading": "Loading...",
|
|
3952
|
+
"dialog.delete.title": "Delete {{item}}?",
|
|
3953
|
+
"dialog.delete.message": "This action cannot be undone.",
|
|
3954
|
+
"trait.availableActions": "Available Actions",
|
|
3955
|
+
"trait.transitions": "Transitions",
|
|
3956
|
+
"trait.availableNow": "Available now",
|
|
3957
|
+
"book.startReading": "Start Reading",
|
|
3958
|
+
"book.tableOfContents": "Table of Contents",
|
|
3959
|
+
"book.partNumber": "Part {{number}}",
|
|
3960
|
+
"book.print": "Print",
|
|
3961
|
+
"book.previousPage": "Previous page",
|
|
3962
|
+
"book.nextPage": "Next page",
|
|
3963
|
+
"quiz.showAnswer": "Show answer",
|
|
3964
|
+
"quiz.hideAnswer": "Hide answer",
|
|
3965
|
+
"aria.closeModal": "Close modal",
|
|
3966
|
+
"aria.closeToast": "Dismiss toast",
|
|
3967
|
+
"aria.closeAlert": "Dismiss alert",
|
|
3968
|
+
"aria.removeFilter": "Remove filter",
|
|
3969
|
+
"aria.closeDrawer": "Close drawer",
|
|
3970
|
+
"aria.closePanel": "Close panel",
|
|
3971
|
+
"aria.previousImage": "Previous image",
|
|
3972
|
+
"aria.nextImage": "Next image",
|
|
3973
|
+
"aria.dismiss": "Dismiss",
|
|
3974
|
+
"aria.previousSlide": "Previous slide",
|
|
3975
|
+
"aria.nextSlide": "Next slide",
|
|
3976
|
+
"aria.previousDays": "Previous days",
|
|
3977
|
+
"aria.nextDays": "Next days",
|
|
3978
|
+
"aria.decrease": "Decrease",
|
|
3979
|
+
"aria.increase": "Increase",
|
|
3980
|
+
"aria.breadcrumb": "Breadcrumb",
|
|
3981
|
+
"aria.tableOfContents": "Table of contents",
|
|
3982
|
+
"aria.docsSidebar": "Documentation sidebar",
|
|
3983
|
+
"aria.selectAllRows": "Select all rows",
|
|
3984
|
+
"aria.selectAll": "Select all",
|
|
3985
|
+
"aria.upvote": "Upvote",
|
|
3986
|
+
"aria.downvote": "Downvote",
|
|
3987
|
+
"aria.qrScanner": "QR scanner",
|
|
3988
|
+
"aria.mockScanDev": "Mock scan (dev)",
|
|
3989
|
+
"aria.openMenu": "Open menu",
|
|
3990
|
+
"aria.closeMenu": "Close menu",
|
|
3991
|
+
"aria.openSidebar": "Open sidebar",
|
|
3992
|
+
"sidebar.expand": "Expand sidebar",
|
|
3993
|
+
"sidebar.collapse": "Collapse sidebar",
|
|
3994
|
+
"sidebar.close": "Close sidebar",
|
|
3995
|
+
"loading.items": "Loading items...",
|
|
3996
|
+
"card.imageAlt": "Image",
|
|
3997
|
+
"canvas.emptyMessage": "No content",
|
|
3998
|
+
"canvas.errorTitle": "Canvas error",
|
|
3999
|
+
"book.noData": "No data",
|
|
4000
|
+
"common.notifications": "Notifications",
|
|
4001
|
+
"common.remaining": "{{count}} remaining",
|
|
4002
|
+
"error.somethingWentWrong": "Something went wrong",
|
|
4003
|
+
"error.loadingItems": "Loading items...",
|
|
4004
|
+
"error.noItemsFound": "No items found",
|
|
4005
|
+
"debug.noEntityData": "No entity data",
|
|
4006
|
+
"debug.noEntities": "No entities",
|
|
4007
|
+
"debug.noTicks": "No ticks registered",
|
|
4008
|
+
"debug.noActiveTraits": "No active traits",
|
|
4009
|
+
"debug.noGuardEvaluations": "No guard evaluations",
|
|
4010
|
+
"debug.noBridgeData": "No bridge data",
|
|
4011
|
+
"debug.status": "Status",
|
|
4012
|
+
"debug.eventsForwarded": "Events Forwarded (Client \u2192 Server)",
|
|
4013
|
+
"debug.eventsReceived": "Events Received (Server \u2192 Client)",
|
|
4014
|
+
"debug.lastHeartbeat": "Last Heartbeat",
|
|
4015
|
+
"debug.noEventsYet": "No events yet",
|
|
4016
|
+
"debug.noTransitionsRecorded": "No transitions recorded",
|
|
4017
|
+
"debug.noVerificationChecks": "No verification checks yet",
|
|
4018
|
+
"display.chartError": "Chart error",
|
|
4019
|
+
"display.codeViewerError": "Code viewer error",
|
|
4020
|
+
"display.noCode": "No code",
|
|
4021
|
+
"display.documentError": "Document error",
|
|
4022
|
+
"display.noDocument": "No document",
|
|
4023
|
+
"display.graphError": "Graph error",
|
|
4024
|
+
"display.noGraphData": "No graph data",
|
|
4025
|
+
"display.galleryError": "Gallery error",
|
|
4026
|
+
"display.noMedia": "No media",
|
|
4027
|
+
"display.meterError": "Meter error",
|
|
4028
|
+
"display.signaturePadError": "Signature pad error",
|
|
4029
|
+
"display.timelineError": "Timeline error",
|
|
4030
|
+
"display.noEvents": "No events",
|
|
4031
|
+
"template.features": "Features",
|
|
4032
|
+
"template.howItWorks": "How It Works",
|
|
4033
|
+
"template.showcase": "Showcase",
|
|
4034
|
+
"template.faq": "Frequently Asked Questions",
|
|
4035
|
+
"template.ourTeam": "Our Team",
|
|
4036
|
+
"template.caseStudies": "Case Studies",
|
|
4037
|
+
"richBlockEditor.toolbar.text": "Text",
|
|
4038
|
+
"richBlockEditor.toolbar.h1": "H1",
|
|
4039
|
+
"richBlockEditor.toolbar.h2": "H2",
|
|
4040
|
+
"richBlockEditor.toolbar.h3": "H3",
|
|
4041
|
+
"richBlockEditor.toolbar.bulletList": "Bullet list",
|
|
4042
|
+
"richBlockEditor.toolbar.numbered": "Numbered",
|
|
4043
|
+
"richBlockEditor.toolbar.quote": "Quote",
|
|
4044
|
+
"richBlockEditor.toolbar.code": "Code",
|
|
4045
|
+
"richBlockEditor.toolbar.divider": "Divider",
|
|
4046
|
+
"richBlockEditor.toolbar.image": "Image",
|
|
4047
|
+
"richBlockEditor.blockType.paragraph": "Text",
|
|
4048
|
+
"richBlockEditor.blockType.heading1": "Heading 1",
|
|
4049
|
+
"richBlockEditor.blockType.heading2": "Heading 2",
|
|
4050
|
+
"richBlockEditor.blockType.heading3": "Heading 3",
|
|
4051
|
+
"richBlockEditor.blockType.bulletList": "Bullet list",
|
|
4052
|
+
"richBlockEditor.blockType.numberedList": "Numbered list",
|
|
4053
|
+
"richBlockEditor.blockType.quote": "Quote",
|
|
4054
|
+
"richBlockEditor.blockType.code": "Code",
|
|
4055
|
+
"richBlockEditor.blockType.divider": "Divider",
|
|
4056
|
+
"richBlockEditor.blockType.image": "Image",
|
|
4057
|
+
"richBlockEditor.blockActions": "Block actions",
|
|
4058
|
+
"richBlockEditor.duplicate": "Duplicate",
|
|
4059
|
+
"richBlockEditor.turnInto": "Turn into",
|
|
4060
|
+
"richBlockEditor.placeholder.heading1": "Heading 1",
|
|
4061
|
+
"richBlockEditor.placeholder.heading2": "Heading 2",
|
|
4062
|
+
"richBlockEditor.placeholder.heading3": "Heading 3",
|
|
4063
|
+
"richBlockEditor.placeholder.quote": "Quote",
|
|
4064
|
+
"richBlockEditor.placeholder.code": "Enter code",
|
|
4065
|
+
"richBlockEditor.placeholder.paragraph": "Start writing...",
|
|
4066
|
+
"richBlockEditor.placeholder.listItem": "List item",
|
|
4067
|
+
"richBlockEditor.placeholder.caption": "Caption (optional)",
|
|
4068
|
+
"richBlockEditor.aria.heading1Block": "Heading 1 block",
|
|
4069
|
+
"richBlockEditor.aria.heading2Block": "Heading 2 block",
|
|
4070
|
+
"richBlockEditor.aria.heading3Block": "Heading 3 block",
|
|
4071
|
+
"richBlockEditor.aria.quoteBlock": "Quote block",
|
|
4072
|
+
"richBlockEditor.aria.codeBlock": "Code block",
|
|
4073
|
+
"richBlockEditor.aria.codeLanguage": "Code language",
|
|
4074
|
+
"richBlockEditor.aria.imageUrl": "Image URL",
|
|
4075
|
+
"richBlockEditor.aria.imageCaption": "Image caption",
|
|
4076
|
+
"richBlockEditor.aria.listItem": "List item",
|
|
4077
|
+
"richBlockEditor.aria.removeListItem": "Remove list item",
|
|
4078
|
+
"richBlockEditor.aria.paragraphBlock": "Paragraph block",
|
|
4079
|
+
"richBlockEditor.embeddedImage": "Embedded image",
|
|
4080
|
+
"richBlockEditor.noImageUrl": "No image URL set",
|
|
4081
|
+
"richBlockEditor.addItem": "Add item",
|
|
4082
|
+
"richBlockEditor.insertParagraphBelow": "Insert paragraph below",
|
|
4083
|
+
"richBlockEditor.editorToolbar": "Block editor toolbar",
|
|
4084
|
+
"richBlockEditor.insertEntry": "Insert {{label}}",
|
|
4085
|
+
"versionDiff.compare": "Compare",
|
|
4086
|
+
"versionDiff.to": "to",
|
|
4087
|
+
"versionDiff.beforeRevision": "Before revision",
|
|
4088
|
+
"versionDiff.afterRevision": "After revision",
|
|
4089
|
+
"versionDiff.switchToInline": "Switch to inline view",
|
|
4090
|
+
"versionDiff.switchToSideBySide": "Switch to side-by-side view",
|
|
4091
|
+
"versionDiff.revert": "Revert",
|
|
4092
|
+
"versionDiff.byAuthor": " by {{author}}",
|
|
4093
|
+
"violationAlert.actionType.measure": "Corrective Measure",
|
|
4094
|
+
"violationAlert.actionType.admin": "Administrative Action",
|
|
4095
|
+
"violationAlert.actionType.penalty": "Penalty Proceedings",
|
|
4096
|
+
"violationAlert.fallbackMessage": "Violation",
|
|
4097
|
+
"violationAlert.adminLabel": "Admin:",
|
|
4098
|
+
"violationAlert.penaltyLabel": "Penalty:",
|
|
4099
|
+
"violationAlert.goToField": "Go to field",
|
|
4100
|
+
"branchingLogic.title": "Branching logic",
|
|
4101
|
+
"branchingLogic.if": "If",
|
|
4102
|
+
"branchingLogic.goTo": "go to",
|
|
4103
|
+
"branchingLogic.rules": "Rules",
|
|
4104
|
+
"branchingLogic.logicGraph": "Logic graph",
|
|
4105
|
+
"branchingLogic.addRule": "Add rule",
|
|
4106
|
+
"branchingLogic.deleteRule": "Delete rule",
|
|
4107
|
+
"branchingLogic.endOfSurvey": "End of survey",
|
|
4108
|
+
"branchingLogic.brokenReference": "Broken reference",
|
|
4109
|
+
"branchingLogic.selectQuestion": "Select question",
|
|
4110
|
+
"branchingLogic.selectTarget": "Select target",
|
|
4111
|
+
"branchingLogic.selectValue": "Select value",
|
|
4112
|
+
"branchingLogic.addValue": "Add value",
|
|
4113
|
+
"branchingLogic.value": "Value",
|
|
4114
|
+
"branchingLogic.typeValuePressEnter": "Type value, press Enter",
|
|
4115
|
+
"branchingLogic.operatorEquals": "equals",
|
|
4116
|
+
"branchingLogic.operatorNotEquals": "does not equal",
|
|
4117
|
+
"branchingLogic.operatorContains": "contains",
|
|
4118
|
+
"branchingLogic.operatorIn": "is one of",
|
|
4119
|
+
"branchingLogic.graphAriaLabel": "Branching logic graph",
|
|
4120
|
+
"branchingLogic.ruleCountOne": "{{count}} rule",
|
|
4121
|
+
"branchingLogic.ruleCountOther": "{{count}} rules",
|
|
4122
|
+
"branchingLogic.brokenCount": "{{count}} broken",
|
|
4123
|
+
"branchingLogic.emptyNoQuestions": "Add questions before building branching rules.",
|
|
4124
|
+
"branchingLogic.emptyNoRules": "No rules yet. Add a rule to define branching logic.",
|
|
4125
|
+
"filterGroup.filters": "Filters",
|
|
4126
|
+
"filterGroup.all": "All",
|
|
4127
|
+
"filterGroup.clear": "Clear",
|
|
4128
|
+
"filterGroup.clearAll": "Clear all",
|
|
4129
|
+
"filterGroup.from": "From",
|
|
4130
|
+
"filterGroup.to": "To",
|
|
4131
|
+
"filterGroup.allOf": "All {{label}}",
|
|
4132
|
+
"filterGroup.activeCount": "{{count}} active",
|
|
4133
|
+
"debug.guardEvaluationsHint": "Guard evaluations will appear when transitions or ticks with guards execute",
|
|
4134
|
+
"debug.expression": "Expression",
|
|
4135
|
+
"debug.inputs": "Inputs",
|
|
4136
|
+
"debug.trait": "Trait",
|
|
4137
|
+
"debug.filterAll": "All",
|
|
4138
|
+
"debug.filterPassed": "Passed",
|
|
4139
|
+
"debug.filterFailed": "Failed",
|
|
4140
|
+
"debug.traitsInitHint": "Traits will appear when the state machine initializes",
|
|
4141
|
+
"debug.traitsMountHint": "Traits will appear when components using them are mounted",
|
|
4142
|
+
"debug.activeStates": "Active States",
|
|
4143
|
+
"debug.availableEvents": "Available Events",
|
|
4144
|
+
"debug.noTransitionsFromState": "No transitions from current state",
|
|
4145
|
+
"debug.guarded": "guarded",
|
|
4146
|
+
"debug.otherEvents": "Other Events (not available from current state)",
|
|
4147
|
+
"debug.recentTransitions": "Recent Transitions",
|
|
4148
|
+
"debug.transitionsCount": "{{count}} transitions",
|
|
4149
|
+
"debug.states": "States",
|
|
4150
|
+
"debug.transitions": "Transitions",
|
|
4151
|
+
"debug.guards": "Guards",
|
|
4152
|
+
"debug.debugModeHint": "Debug mode may not be enabled",
|
|
4153
|
+
"debug.entitiesSpawnHint": "Entities will appear when spawned",
|
|
4154
|
+
"debug.singleton": "Singleton",
|
|
4155
|
+
"debug.singletonsCount": "Singletons ({{count}})",
|
|
4156
|
+
"debug.runtimeCount": "Runtime ({{count}})",
|
|
4157
|
+
"debug.moreEntities": "+{{count}} more entities",
|
|
4158
|
+
"debug.persistent": "Persistent",
|
|
4159
|
+
"debug.loadedCount": "{{count}} loaded",
|
|
4160
|
+
"debug.notLoaded": "not loaded",
|
|
4161
|
+
"debug.eventsExecuteHint": "Events will appear as traits, ticks, and other systems execute",
|
|
4162
|
+
"debug.allCount": "All ({{count}})",
|
|
4163
|
+
"debug.autoScroll": "Auto-scroll",
|
|
4164
|
+
"debug.transitionsProcessHint": "Transitions will appear as the state machine processes events",
|
|
4165
|
+
"debug.transitionsRecorded": "{{count}} transitions recorded",
|
|
4166
|
+
"debug.guardLabel": "guard:",
|
|
4167
|
+
"debug.effectsCount": "{{count}} effects",
|
|
4168
|
+
"debug.bridgeInitHint": "The ServerBridge has not been initialized. Bridge health will appear once the runtime connects to the server.",
|
|
4169
|
+
"debug.never": "Never",
|
|
4170
|
+
"debug.connected": "Connected",
|
|
4171
|
+
"debug.disconnected": "Disconnected",
|
|
4172
|
+
"debug.lastError": "Last Error",
|
|
4173
|
+
"debug.totalEventsProcessed": "{{count}} total events processed",
|
|
4174
|
+
"debug.server": "server",
|
|
4175
|
+
"debug.clientEffectsCount": "{{count}} clientEffects",
|
|
4176
|
+
"debug.emitLabel": "emit:",
|
|
4177
|
+
"debug.rowsCount": "{{count}} rows",
|
|
4178
|
+
"debug.serverResponse": "server response",
|
|
4179
|
+
"debug.collapseVerificationTimeline": "Collapse verification timeline",
|
|
4180
|
+
"debug.expandVerificationTimeline": "Expand verification timeline",
|
|
4181
|
+
"debug.failCount": "{{count}} fail",
|
|
4182
|
+
"debug.ok": "OK",
|
|
4183
|
+
"debug.localCount": "{{count}} local",
|
|
4184
|
+
"debug.serverCount": "{{count}} server",
|
|
4185
|
+
"debug.waitingForTransitions": "Waiting for transitions...",
|
|
4186
|
+
"debug.tabDispatch": "Dispatch",
|
|
4187
|
+
"debug.tabVerify": "Verify",
|
|
4188
|
+
"debug.tabVerifyAlert": "Verify (!)",
|
|
4189
|
+
"debug.tabTimeline": "Timeline",
|
|
4190
|
+
"debug.tabBridge": "Bridge",
|
|
4191
|
+
"debug.tabTraits": "Traits",
|
|
4192
|
+
"debug.tabTicks": "Ticks",
|
|
4193
|
+
"debug.tabEntities": "Entities",
|
|
4194
|
+
"debug.tabEvents": "Events",
|
|
4195
|
+
"debug.tabGuards": "Guards",
|
|
4196
|
+
"debug.debugger": "Debugger",
|
|
4197
|
+
"debug.failedCount": "{{count}} failed",
|
|
4198
|
+
"debug.traitsCount": "{{count}} traits",
|
|
4199
|
+
"debug.idle": "Idle",
|
|
4200
|
+
"debug.openDebugger": "Open Debugger (`)",
|
|
4201
|
+
"debug.kflowVerifier": "KFlow Verifier",
|
|
4202
|
+
"debug.allPassing": "All passing",
|
|
4203
|
+
"debug.runtime": "Runtime",
|
|
4204
|
+
"debug.close": "Close (`)",
|
|
4205
|
+
"debug.toggleHint": "Press ` to toggle | window.__orbitalVerification for automation",
|
|
4206
|
+
"replyTree.expandReplies": "Expand replies",
|
|
4207
|
+
"replyTree.collapseReplies": "Collapse replies",
|
|
4208
|
+
"replyTree.voteOnReplyBy": "Vote on reply by {{author}}",
|
|
4209
|
+
"replyTree.replyTo": "Reply to {{author}}",
|
|
4210
|
+
"replyTree.replyToPlaceholder": "Reply to {{author}}\u2026",
|
|
4211
|
+
"replyTree.reply": "Reply",
|
|
4212
|
+
"replyTree.flagReplyBy": "Flag reply by {{author}}",
|
|
4213
|
+
"replyTree.flag": "Flag",
|
|
4214
|
+
"replyTree.send": "Send",
|
|
4215
|
+
"replyTree.continueThread": "Continue thread",
|
|
4216
|
+
"replyTree.noRepliesYet": "No replies yet.",
|
|
4217
|
+
"signaturePad.label": "Signature",
|
|
4218
|
+
"signaturePad.helperText": "Draw your signature above",
|
|
4219
|
+
"signaturePad.clear": "Clear",
|
|
4220
|
+
"signaturePad.confirm": "Confirm",
|
|
4221
|
+
"qrScanner.cameraUnavailable": "Camera unavailable",
|
|
4222
|
+
"qrScanner.paused": "Paused",
|
|
4223
|
+
"qrScanner.resumeScanning": "Resume scanning",
|
|
4224
|
+
"qrScanner.pauseScanning": "Pause scanning",
|
|
4225
|
+
"qrScanner.switchToFrontCamera": "Switch to front camera",
|
|
4226
|
+
"qrScanner.switchToRearCamera": "Switch to rear camera",
|
|
4227
|
+
"qrScanner.mockScan": "Mock Scan",
|
|
4228
|
+
"docSearch.placeholder": "Search documentation...",
|
|
4229
|
+
"stateMachine.loading": "Loading state machine\u2026",
|
|
4230
|
+
"stateMachine.noStateMachine": "No state machine to visualize",
|
|
4231
|
+
"avl.trigger": "Trigger",
|
|
4232
|
+
"avl.guard": "Guard",
|
|
4233
|
+
"avl.effects": "Effects",
|
|
4234
|
+
"avl.props": "Props",
|
|
4235
|
+
"avl.entity": "Entity",
|
|
4236
|
+
"avl.traits": "Traits",
|
|
4237
|
+
"avl.transition": "Transition",
|
|
4238
|
+
"avl.onEntity": "on {{entity}}",
|
|
4239
|
+
"avl.linkedTo": "linked to {{entity}}",
|
|
4240
|
+
"avl.pressEscToZoomOut": "Press Esc to zoom out",
|
|
4241
|
+
"avl.zoomIn": "Zoom in",
|
|
4242
|
+
"avl.zoomOut": "Zoom out",
|
|
4243
|
+
"avl.orbitalLabel": "Orbital: {{name}}",
|
|
4244
|
+
"avl.orbitalLabelHighlighted": "Orbital: {{name}} (highlighted)",
|
|
4245
|
+
"avl.noTraitData": "No trait data",
|
|
4246
|
+
"avl.computingLayout": "Computing layout...",
|
|
4247
|
+
"avl.noStateMachine": "No state machine",
|
|
4248
|
+
"avl.listensFor": "listens for {{event}}",
|
|
4249
|
+
"avl.emits": "emits {{event}}",
|
|
4250
|
+
"avl.pageLayout": "Page Layout",
|
|
4251
|
+
"avl.overlaySuffix": "(overlay)",
|
|
4252
|
+
"orbPreview.previewBadge": "Preview",
|
|
4253
|
+
"orbPreview.doubleClickToOpen": "Double-click to open",
|
|
4254
|
+
"orbPreview.dropToAddAndOpen": "Drop to add and open",
|
|
4255
|
+
"orbPreview.dispatching": "Coordinator is dispatching to this orbital",
|
|
4256
|
+
"orbPreview.noPreview": "No preview available",
|
|
4257
|
+
"orbPreview.screensCount": "{{count}} screens",
|
|
4258
|
+
"detailView.noTransitionData": "No transition data",
|
|
4259
|
+
"orbInspector.required": "req",
|
|
4260
|
+
"orbInspector.addField": "Add Field",
|
|
4261
|
+
"orbInspector.serviceMode": "Service Mode",
|
|
4262
|
+
"orbInspector.standalone": "Standalone",
|
|
4263
|
+
"orbInspector.embedded": "Embedded",
|
|
4264
|
+
"orbInspector.rendersOwnUi": "Renders its own UI",
|
|
4265
|
+
"orbInspector.headless": "Headless, wired to other behaviors",
|
|
4266
|
+
"orbInspector.addEffect": "Add Effect",
|
|
4267
|
+
"orbInspector.guardExpression": "Guard expression",
|
|
4268
|
+
"orbInspector.selectPatternForStyles": "Select a pattern to view its style tokens.",
|
|
4269
|
+
"orbInspector.tokens": "Tokens",
|
|
4270
|
+
"orbInspector.noTokenContract": "No token contract declared for this pattern.",
|
|
4271
|
+
"orbInspector.variant": "Variant",
|
|
4272
|
+
"orbInspector.size": "Size",
|
|
4273
|
+
"orbInspector.statesCount": "{{count}} states",
|
|
4274
|
+
"orbInspector.onEntity": " on {{entity}}",
|
|
4275
|
+
"orbInspector.projectThemeTokens": "Project theme tokens",
|
|
4276
|
+
"orbInspector.tokenGroup.colors": "Colors",
|
|
4277
|
+
"orbInspector.tokenGroup.radii": "Radii",
|
|
4278
|
+
"orbInspector.tokenGroup.spacing": "Spacing",
|
|
4279
|
+
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
4280
|
+
"orbInspector.tab.inspector": "Inspector",
|
|
4281
|
+
"orbInspector.tab.styles": "Styles",
|
|
4282
|
+
"orbInspector.tab.code": "Code",
|
|
4283
|
+
"canvas.goBackToOverview": "Go back to overview",
|
|
4284
|
+
"canvas.overview": "Overview",
|
|
4285
|
+
"canvas.expanded": "Expanded",
|
|
4286
|
+
"canvas.modulesCount": "{{count}} modules",
|
|
4287
|
+
"canvas.screensCount": "{{count}} screens",
|
|
4288
|
+
"canvas.switchToView": "Switch to {{label}} view",
|
|
4289
|
+
"lawReference.viewFullText": "View full law text",
|
|
4290
|
+
"statCard.defaultLabel": "Stat",
|
|
4291
|
+
"statCard.vsLastPeriod": "vs last period",
|
|
4292
|
+
"mediaGallery.upload": "Upload",
|
|
4293
|
+
"mediaGallery.noMediaDescription": "No media items to display.",
|
|
4294
|
+
"pagination.jumpPlaceholder": "Page",
|
|
4295
|
+
"table.selectRow": "Select row {{id}}",
|
|
4296
|
+
"card.selectItem": "Select {{item}}",
|
|
4297
|
+
"card.itemFallback": "item",
|
|
4298
|
+
"fileTree.noFiles": "No files",
|
|
4299
|
+
"masterDetail.selectItem": "Select an item to view details",
|
|
4300
|
+
"empty.createFirst": "Create your first item to get started.",
|
|
4301
|
+
"upload.dropOrBrowse": "Drop files here or click to browse",
|
|
4302
|
+
"upload.dropFilesHere": "Drop files here",
|
|
4303
|
+
"upload.accepted": "Accepted: {{accept}}",
|
|
4304
|
+
"upload.maxSize": "Max size: {{size}}",
|
|
4305
|
+
"upload.maxFiles": "Up to {{count}} files",
|
|
4306
|
+
"upload.error.maxFiles": "Maximum {{count}} files allowed",
|
|
4307
|
+
"upload.error.invalidType": "Invalid file type: {{name}}",
|
|
4308
|
+
"upload.error.tooLarge": "File too large: {{name}} (max {{size}})",
|
|
4309
|
+
"optionConstraint.requiredOne": "Required, pick 1",
|
|
4310
|
+
"optionConstraint.optionalOne": "Optional, pick up to 1",
|
|
4311
|
+
"optionConstraint.pickExactly": "Pick exactly {{count}}",
|
|
4312
|
+
"optionConstraint.pickRange": "Pick {{min}}-{{max}}",
|
|
4313
|
+
"optionConstraint.pickAtLeast": "Pick at least {{count}}",
|
|
4314
|
+
"optionConstraint.pickUpTo": "Pick up to {{count}}",
|
|
4315
|
+
"optionConstraint.optional": "Optional",
|
|
4316
|
+
"optionConstraint.outOfStock": "Out of stock",
|
|
4317
|
+
"optionConstraint.error.pickOne": "Pick 1 option",
|
|
4318
|
+
"optionConstraint.error.pickOnlyOne": "Pick only 1 option",
|
|
4319
|
+
"optionConstraint.error.pickMore": "Pick at least {{count}} more",
|
|
4320
|
+
"optionConstraint.error.removeOptions": "Remove {{count}} options",
|
|
4321
|
+
"stateMachine.pinned": "Pinned",
|
|
4322
|
+
"stateMachine.eventCount": "{{count}} events",
|
|
4323
|
+
"stateMachine.externalEffects": "External Effects",
|
|
4324
|
+
"stateMachine.legend.initial": "Initial",
|
|
4325
|
+
"stateMachine.legend.final": "Final",
|
|
4326
|
+
"stateMachine.legend.state": "State",
|
|
4327
|
+
"stateMachine.legend.multiEvent": "Multi-event"
|
|
4328
|
+
};
|
|
4329
|
+
}
|
|
4330
|
+
});
|
|
4331
|
+
function useTranslate() {
|
|
4332
|
+
return useContext(I18nContext);
|
|
4333
|
+
}
|
|
4334
|
+
var _meta, coreMessages, coreLocale, I18nContext;
|
|
4335
|
+
var init_useTranslate = __esm({
|
|
4336
|
+
"hooks/useTranslate.ts"() {
|
|
4337
|
+
"use client";
|
|
4338
|
+
init_en();
|
|
4339
|
+
({ $meta: _meta, ...coreMessages } = en_default);
|
|
4340
|
+
coreLocale = coreMessages;
|
|
4341
|
+
I18nContext = createContext({
|
|
4342
|
+
locale: "en",
|
|
4343
|
+
direction: "ltr",
|
|
4344
|
+
t: (key) => coreLocale[key] ?? key
|
|
4345
|
+
// core locale fallback
|
|
4346
|
+
});
|
|
4347
|
+
I18nContext.displayName = "I18nContext";
|
|
4348
|
+
I18nContext.Provider;
|
|
4349
|
+
}
|
|
4350
|
+
});
|
|
3854
4351
|
var MAX_VISIBLE_EFFECTS, AvlTransitionLane;
|
|
3855
4352
|
var init_AvlTransitionLane = __esm({
|
|
3856
4353
|
"components/avl/molecules/AvlTransitionLane.tsx"() {
|
|
@@ -4480,6 +4977,7 @@ var log2, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
4480
4977
|
var init_BehaviorView = __esm({
|
|
4481
4978
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
4482
4979
|
"use client";
|
|
4980
|
+
init_useTranslate();
|
|
4483
4981
|
init_AvlState();
|
|
4484
4982
|
init_AvlTransitionLane();
|
|
4485
4983
|
init_AvlSwimLane();
|
|
@@ -4489,6 +4987,7 @@ var init_BehaviorView = __esm({
|
|
|
4489
4987
|
SWIM_GUTTER = 120;
|
|
4490
4988
|
CENTER_W = 360;
|
|
4491
4989
|
BehaviorView = ({ data }) => {
|
|
4990
|
+
const { t } = useTranslate();
|
|
4492
4991
|
const [layout, setLayout] = useState(null);
|
|
4493
4992
|
const traitName = data.traits[0]?.name;
|
|
4494
4993
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -4498,10 +4997,10 @@ var init_BehaviorView = __esm({
|
|
|
4498
4997
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log2.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
4499
4998
|
}, [dataKey]);
|
|
4500
4999
|
if (!traitData) {
|
|
4501
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
5000
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
|
|
4502
5001
|
}
|
|
4503
5002
|
if (!layout) {
|
|
4504
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
5003
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.computingLayout") });
|
|
4505
5004
|
}
|
|
4506
5005
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
4507
5006
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -4517,10 +5016,7 @@ var init_BehaviorView = __esm({
|
|
|
4517
5016
|
const machineHeight = scaledH + 100;
|
|
4518
5017
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
4519
5018
|
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 20, textAnchor: "middle", fill: "var(--color-foreground)", fontSize: 18, fontWeight: "700", fontFamily: "inherit", children: traitData.name }),
|
|
4520
|
-
/* @__PURE__ */
|
|
4521
|
-
"on ",
|
|
4522
|
-
traitData.linkedEntity
|
|
4523
|
-
] }),
|
|
5019
|
+
/* @__PURE__ */ jsx("text", { x: CENTER_W / 2, y: 36, textAnchor: "middle", fill: "var(--color-muted-foreground)", fontSize: 11, opacity: 0.5, fontFamily: "inherit", children: t("avl.onEntity", { entity: traitData.linkedEntity }) }),
|
|
4524
5020
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
4525
5021
|
/* @__PURE__ */ jsx("marker", { id: "bvArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.forward.color, opacity: 0.7 }) }),
|
|
4526
5022
|
/* @__PURE__ */ jsx("marker", { id: "bvArrowBack", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.backward.color, opacity: 0.5 }) })
|
|
@@ -6322,210 +6818,6 @@ var init_Overlay = __esm({
|
|
|
6322
6818
|
};
|
|
6323
6819
|
}
|
|
6324
6820
|
});
|
|
6325
|
-
|
|
6326
|
-
// locales/en.json
|
|
6327
|
-
var en_default;
|
|
6328
|
-
var init_en = __esm({
|
|
6329
|
-
"locales/en.json"() {
|
|
6330
|
-
en_default = {
|
|
6331
|
-
$meta: { locale: "en", direction: "ltr" },
|
|
6332
|
-
"common.save": "Save",
|
|
6333
|
-
"common.cancel": "Cancel",
|
|
6334
|
-
"common.delete": "Delete",
|
|
6335
|
-
"common.close": "Close",
|
|
6336
|
-
"common.confirm": "Are you sure?",
|
|
6337
|
-
"common.create": "Create",
|
|
6338
|
-
"common.edit": "Edit",
|
|
6339
|
-
"common.view": "View",
|
|
6340
|
-
"common.add": "Add",
|
|
6341
|
-
"common.remove": "Remove",
|
|
6342
|
-
"common.search": "Search...",
|
|
6343
|
-
"common.filter": "Filter",
|
|
6344
|
-
"common.actions": "Actions",
|
|
6345
|
-
"common.yes": "Yes",
|
|
6346
|
-
"common.no": "No",
|
|
6347
|
-
"common.selected": "selected",
|
|
6348
|
-
"common.ok": "OK",
|
|
6349
|
-
"common.done": "Done",
|
|
6350
|
-
"common.apply": "Apply",
|
|
6351
|
-
"common.reset": "Reset",
|
|
6352
|
-
"common.refresh": "Refresh",
|
|
6353
|
-
"common.export": "Export",
|
|
6354
|
-
"common.import": "Import",
|
|
6355
|
-
"common.copy": "Copy",
|
|
6356
|
-
"common.settings": "Settings",
|
|
6357
|
-
"nav.previous": "Previous",
|
|
6358
|
-
"nav.next": "Next",
|
|
6359
|
-
"nav.back": "Back",
|
|
6360
|
-
"nav.home": "Home",
|
|
6361
|
-
"form.submit": "Submit",
|
|
6362
|
-
"form.saving": "Saving...",
|
|
6363
|
-
"form.required": "This field is required",
|
|
6364
|
-
"form.invalidEmail": "Enter a valid email address",
|
|
6365
|
-
"form.selectPlaceholder": "Select {{label}}...",
|
|
6366
|
-
"form.searchPlaceholder": "Search {{entity}}...",
|
|
6367
|
-
"table.empty.title": "No items found",
|
|
6368
|
-
"table.empty.description": "No items to display.",
|
|
6369
|
-
"table.search.placeholder": "Search...",
|
|
6370
|
-
"table.pagination.showing": "Showing {{start}} to {{end}} of {{total}} results",
|
|
6371
|
-
"table.pagination.page": "Page {{page}} of {{totalPages}}",
|
|
6372
|
-
"table.bulk.selected": "{{count}} selected",
|
|
6373
|
-
"table.loading": "Loading...",
|
|
6374
|
-
"status.loading": "Loading...",
|
|
6375
|
-
"status.scheduled": "Scheduled",
|
|
6376
|
-
"status.inProgress": "In Progress",
|
|
6377
|
-
"status.completed": "Completed",
|
|
6378
|
-
"status.cancelled": "Cancelled",
|
|
6379
|
-
"status.pending": "Pending",
|
|
6380
|
-
"status.active": "Active",
|
|
6381
|
-
"status.inactive": "Inactive",
|
|
6382
|
-
"status.draft": "Draft",
|
|
6383
|
-
"status.archived": "Archived",
|
|
6384
|
-
"error.generic": "Something went wrong",
|
|
6385
|
-
"error.retry": "Try again",
|
|
6386
|
-
"error.notFound": "Not found",
|
|
6387
|
-
"error.loadFailed": "Failed to load: {{message}}",
|
|
6388
|
-
"error.configMissing": "Configuration not found for: {{id}}",
|
|
6389
|
-
"common.loading": "Loading...",
|
|
6390
|
-
"common.showMore": "Show More",
|
|
6391
|
-
"common.showLess": "Show Less",
|
|
6392
|
-
"common.noResults": "No results found",
|
|
6393
|
-
"common.saveChanges": "Save Changes",
|
|
6394
|
-
"common.retry": "Retry",
|
|
6395
|
-
"common.open": "Open",
|
|
6396
|
-
"common.back": "Back",
|
|
6397
|
-
"empty.noItems": "No items",
|
|
6398
|
-
"empty.noData": "No data available",
|
|
6399
|
-
"empty.noItemsYet": "No items yet",
|
|
6400
|
-
"empty.noItemsAdded": "No items added yet",
|
|
6401
|
-
"empty.noOptionsFound": "No options found",
|
|
6402
|
-
"list.addItemPlaceholder": "Add new item...",
|
|
6403
|
-
"error.occurred": "An error occurred",
|
|
6404
|
-
"error.failedToLoad": "Failed to load data",
|
|
6405
|
-
"wizard.back": "Back",
|
|
6406
|
-
"wizard.next": "Next",
|
|
6407
|
-
"wizard.complete": "Complete",
|
|
6408
|
-
"wizard.stepOf": "Step {{current}} of {{total}}",
|
|
6409
|
-
"pagination.previous": "Previous",
|
|
6410
|
-
"pagination.next": "Next",
|
|
6411
|
-
"pagination.total": "Total:",
|
|
6412
|
-
"pagination.show": "Show:",
|
|
6413
|
-
"pagination.goTo": "Go to:",
|
|
6414
|
-
"pagination.go": "Go",
|
|
6415
|
-
"auth.signIn": "Sign in",
|
|
6416
|
-
"auth.signOut": "Sign out",
|
|
6417
|
-
"dialog.confirm": "Confirm",
|
|
6418
|
-
"dialog.cancel": "Cancel",
|
|
6419
|
-
"dialog.loading": "Loading...",
|
|
6420
|
-
"dialog.delete.title": "Delete {{item}}?",
|
|
6421
|
-
"dialog.delete.message": "This action cannot be undone.",
|
|
6422
|
-
"trait.availableActions": "Available Actions",
|
|
6423
|
-
"trait.transitions": "Transitions",
|
|
6424
|
-
"trait.availableNow": "Available now",
|
|
6425
|
-
"book.startReading": "Start Reading",
|
|
6426
|
-
"book.tableOfContents": "Table of Contents",
|
|
6427
|
-
"book.partNumber": "Part {{number}}",
|
|
6428
|
-
"book.print": "Print",
|
|
6429
|
-
"book.previousPage": "Previous page",
|
|
6430
|
-
"book.nextPage": "Next page",
|
|
6431
|
-
"quiz.showAnswer": "Show answer",
|
|
6432
|
-
"quiz.hideAnswer": "Hide answer",
|
|
6433
|
-
"aria.closeModal": "Close modal",
|
|
6434
|
-
"aria.closeToast": "Dismiss toast",
|
|
6435
|
-
"aria.closeAlert": "Dismiss alert",
|
|
6436
|
-
"aria.removeFilter": "Remove filter",
|
|
6437
|
-
"aria.closeDrawer": "Close drawer",
|
|
6438
|
-
"aria.closePanel": "Close panel",
|
|
6439
|
-
"aria.previousImage": "Previous image",
|
|
6440
|
-
"aria.nextImage": "Next image",
|
|
6441
|
-
"aria.dismiss": "Dismiss",
|
|
6442
|
-
"aria.previousSlide": "Previous slide",
|
|
6443
|
-
"aria.nextSlide": "Next slide",
|
|
6444
|
-
"aria.previousDays": "Previous days",
|
|
6445
|
-
"aria.nextDays": "Next days",
|
|
6446
|
-
"aria.decrease": "Decrease",
|
|
6447
|
-
"aria.increase": "Increase",
|
|
6448
|
-
"aria.breadcrumb": "Breadcrumb",
|
|
6449
|
-
"aria.tableOfContents": "Table of contents",
|
|
6450
|
-
"aria.docsSidebar": "Documentation sidebar",
|
|
6451
|
-
"aria.selectAllRows": "Select all rows",
|
|
6452
|
-
"aria.selectAll": "Select all",
|
|
6453
|
-
"aria.upvote": "Upvote",
|
|
6454
|
-
"aria.downvote": "Downvote",
|
|
6455
|
-
"aria.qrScanner": "QR scanner",
|
|
6456
|
-
"aria.mockScanDev": "Mock scan (dev)",
|
|
6457
|
-
"aria.openMenu": "Open menu",
|
|
6458
|
-
"aria.closeMenu": "Close menu",
|
|
6459
|
-
"aria.openSidebar": "Open sidebar",
|
|
6460
|
-
"sidebar.expand": "Expand sidebar",
|
|
6461
|
-
"sidebar.collapse": "Collapse sidebar",
|
|
6462
|
-
"sidebar.close": "Close sidebar",
|
|
6463
|
-
"loading.items": "Loading items...",
|
|
6464
|
-
"card.imageAlt": "Image",
|
|
6465
|
-
"canvas.emptyMessage": "No content",
|
|
6466
|
-
"canvas.errorTitle": "Canvas error",
|
|
6467
|
-
"book.noData": "No data",
|
|
6468
|
-
"common.notifications": "Notifications",
|
|
6469
|
-
"common.remaining": "{{count}} remaining",
|
|
6470
|
-
"error.somethingWentWrong": "Something went wrong",
|
|
6471
|
-
"error.loadingItems": "Loading items...",
|
|
6472
|
-
"error.noItemsFound": "No items found",
|
|
6473
|
-
"error.notFound": "Not found",
|
|
6474
|
-
"debug.noEntityData": "No entity data",
|
|
6475
|
-
"debug.noEntities": "No entities",
|
|
6476
|
-
"debug.noTicks": "No ticks registered",
|
|
6477
|
-
"debug.noActiveTraits": "No active traits",
|
|
6478
|
-
"debug.noGuardEvaluations": "No guard evaluations",
|
|
6479
|
-
"debug.noBridgeData": "No bridge data",
|
|
6480
|
-
"debug.status": "Status",
|
|
6481
|
-
"debug.eventsForwarded": "Events Forwarded (Client \u2192 Server)",
|
|
6482
|
-
"debug.eventsReceived": "Events Received (Server \u2192 Client)",
|
|
6483
|
-
"debug.lastHeartbeat": "Last Heartbeat",
|
|
6484
|
-
"debug.noEventsYet": "No events yet",
|
|
6485
|
-
"debug.noTransitionsRecorded": "No transitions recorded",
|
|
6486
|
-
"debug.noVerificationChecks": "No verification checks yet",
|
|
6487
|
-
"display.chartError": "Chart error",
|
|
6488
|
-
"display.codeViewerError": "Code viewer error",
|
|
6489
|
-
"display.noCode": "No code",
|
|
6490
|
-
"display.documentError": "Document error",
|
|
6491
|
-
"display.noDocument": "No document",
|
|
6492
|
-
"display.graphError": "Graph error",
|
|
6493
|
-
"display.noGraphData": "No graph data",
|
|
6494
|
-
"display.galleryError": "Gallery error",
|
|
6495
|
-
"display.noMedia": "No media",
|
|
6496
|
-
"display.meterError": "Meter error",
|
|
6497
|
-
"display.signaturePadError": "Signature pad error",
|
|
6498
|
-
"display.timelineError": "Timeline error",
|
|
6499
|
-
"display.noEvents": "No events",
|
|
6500
|
-
"template.features": "Features",
|
|
6501
|
-
"template.howItWorks": "How It Works",
|
|
6502
|
-
"template.showcase": "Showcase",
|
|
6503
|
-
"template.faq": "Frequently Asked Questions",
|
|
6504
|
-
"template.ourTeam": "Our Team",
|
|
6505
|
-
"template.caseStudies": "Case Studies"
|
|
6506
|
-
};
|
|
6507
|
-
}
|
|
6508
|
-
});
|
|
6509
|
-
function useTranslate() {
|
|
6510
|
-
return useContext(I18nContext);
|
|
6511
|
-
}
|
|
6512
|
-
var _meta, coreMessages, coreLocale, I18nContext;
|
|
6513
|
-
var init_useTranslate = __esm({
|
|
6514
|
-
"hooks/useTranslate.ts"() {
|
|
6515
|
-
"use client";
|
|
6516
|
-
init_en();
|
|
6517
|
-
({ $meta: _meta, ...coreMessages } = en_default);
|
|
6518
|
-
coreLocale = coreMessages;
|
|
6519
|
-
I18nContext = createContext({
|
|
6520
|
-
locale: "en",
|
|
6521
|
-
direction: "ltr",
|
|
6522
|
-
t: (key) => coreLocale[key] ?? key
|
|
6523
|
-
// core locale fallback
|
|
6524
|
-
});
|
|
6525
|
-
I18nContext.displayName = "I18nContext";
|
|
6526
|
-
I18nContext.Provider;
|
|
6527
|
-
}
|
|
6528
|
-
});
|
|
6529
6821
|
var sizeClasses2, minWidthClasses, lookStyles, Modal;
|
|
6530
6822
|
var init_Modal = __esm({
|
|
6531
6823
|
"components/core/molecules/Modal.tsx"() {
|
|
@@ -9504,6 +9796,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
9504
9796
|
init_Typography();
|
|
9505
9797
|
init_Divider();
|
|
9506
9798
|
init_cn();
|
|
9799
|
+
init_useTranslate();
|
|
9507
9800
|
positionStyles2 = {
|
|
9508
9801
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
9509
9802
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -9522,6 +9815,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
9522
9815
|
position = "top",
|
|
9523
9816
|
className
|
|
9524
9817
|
}) => {
|
|
9818
|
+
const { t } = useTranslate();
|
|
9525
9819
|
const [isVisible, setIsVisible] = React97__default.useState(false);
|
|
9526
9820
|
const timeoutRef = React97__default.useRef(null);
|
|
9527
9821
|
const handleMouseEnter = () => {
|
|
@@ -9605,7 +9899,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
9605
9899
|
target: "_blank",
|
|
9606
9900
|
rel: "noopener noreferrer",
|
|
9607
9901
|
onClick: (e) => e.stopPropagation(),
|
|
9608
|
-
children: "
|
|
9902
|
+
children: t("lawReference.viewFullText")
|
|
9609
9903
|
}
|
|
9610
9904
|
)
|
|
9611
9905
|
] }),
|
|
@@ -17093,7 +17387,7 @@ var init_CodeBlock = __esm({
|
|
|
17093
17387
|
const isLolo = language === "lolo";
|
|
17094
17388
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
17095
17389
|
const eventBus = useEventBus();
|
|
17096
|
-
const { t
|
|
17390
|
+
const { t } = useTranslate();
|
|
17097
17391
|
const scrollRef = useRef(null);
|
|
17098
17392
|
const codeRef = useRef(null);
|
|
17099
17393
|
const savedScrollLeftRef = useRef(0);
|
|
@@ -17348,7 +17642,7 @@ var init_CodeBlock = __esm({
|
|
|
17348
17642
|
size: "sm",
|
|
17349
17643
|
onClick: handleCopy,
|
|
17350
17644
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
17351
|
-
"aria-label": "
|
|
17645
|
+
"aria-label": t("common.copy"),
|
|
17352
17646
|
children: copied ? /* @__PURE__ */ jsx(Icon, { name: "check", className: "w-4 h-4 text-green-400" }) : /* @__PURE__ */ jsx(Icon, { name: "copy", className: "w-4 h-4" })
|
|
17353
17647
|
}
|
|
17354
17648
|
)
|
|
@@ -17569,9 +17863,18 @@ var init_MarkdownContent = __esm({
|
|
|
17569
17863
|
);
|
|
17570
17864
|
}
|
|
17571
17865
|
return /* @__PURE__ */ jsx(
|
|
17572
|
-
"
|
|
17866
|
+
"code",
|
|
17573
17867
|
{
|
|
17868
|
+
...props,
|
|
17869
|
+
className: codeClassName,
|
|
17574
17870
|
style: {
|
|
17871
|
+
backgroundColor: "var(--color-muted)",
|
|
17872
|
+
color: "var(--color-foreground)",
|
|
17873
|
+
border: "1px solid var(--color-border)",
|
|
17874
|
+
padding: "0.125rem 0.375rem",
|
|
17875
|
+
borderRadius: "0.25rem",
|
|
17876
|
+
fontSize: "0.875em",
|
|
17877
|
+
fontFamily: "ui-monospace, monospace",
|
|
17575
17878
|
whiteSpace: "pre-wrap",
|
|
17576
17879
|
wordBreak: "break-word"
|
|
17577
17880
|
},
|
|
@@ -17994,7 +18297,7 @@ var init_StateMachineView = __esm({
|
|
|
17994
18297
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
17995
18298
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
17996
18299
|
const isSingle2 = bundle.labels.length === 1;
|
|
17997
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
18300
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
17998
18301
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
17999
18302
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
18000
18303
|
const cx = fromState.x;
|
|
@@ -18120,7 +18423,7 @@ var init_StateMachineView = __esm({
|
|
|
18120
18423
|
const controlX = midX + perpX;
|
|
18121
18424
|
const controlY = midY + perpY;
|
|
18122
18425
|
const isSingle = bundle.labels.length === 1;
|
|
18123
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
18426
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
18124
18427
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
18125
18428
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
18126
18429
|
const curveMidpoint = {
|
|
@@ -18275,7 +18578,7 @@ var init_StateMachineView = __esm({
|
|
|
18275
18578
|
{
|
|
18276
18579
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
18277
18580
|
style: { backgroundColor: "var(--color-success)" },
|
|
18278
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
18581
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
18279
18582
|
}
|
|
18280
18583
|
),
|
|
18281
18584
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -18297,10 +18600,7 @@ var init_StateMachineView = __esm({
|
|
|
18297
18600
|
{
|
|
18298
18601
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
18299
18602
|
style: { backgroundColor: "var(--color-accent)" },
|
|
18300
|
-
children: /* @__PURE__ */
|
|
18301
|
-
bundle.labels.length,
|
|
18302
|
-
" events"
|
|
18303
|
-
] })
|
|
18603
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
18304
18604
|
}
|
|
18305
18605
|
)
|
|
18306
18606
|
]
|
|
@@ -18445,7 +18745,7 @@ var init_StateMachineView = __esm({
|
|
|
18445
18745
|
align: "center",
|
|
18446
18746
|
className: "mb-2",
|
|
18447
18747
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
18448
|
-
children: "
|
|
18748
|
+
children: t("stateMachine.externalEffects")
|
|
18449
18749
|
}
|
|
18450
18750
|
),
|
|
18451
18751
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -18465,10 +18765,10 @@ var init_StateMachineView = __esm({
|
|
|
18465
18765
|
Legend = ({ config, y }) => {
|
|
18466
18766
|
const { t } = useTranslate();
|
|
18467
18767
|
const items = [
|
|
18468
|
-
{ label: "
|
|
18469
|
-
{ label: "
|
|
18470
|
-
{ label: "
|
|
18471
|
-
{ label: "
|
|
18768
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
18769
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
18770
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
18771
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
18472
18772
|
];
|
|
18473
18773
|
return /* @__PURE__ */ jsx(
|
|
18474
18774
|
HStack,
|
|
@@ -18483,8 +18783,8 @@ var init_StateMachineView = __esm({
|
|
|
18483
18783
|
{
|
|
18484
18784
|
className: "w-3 h-3 rounded-full",
|
|
18485
18785
|
style: {
|
|
18486
|
-
backgroundColor: item.
|
|
18487
|
-
border: item.
|
|
18786
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
18787
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
18488
18788
|
}
|
|
18489
18789
|
}
|
|
18490
18790
|
),
|
|
@@ -18496,7 +18796,7 @@ var init_StateMachineView = __esm({
|
|
|
18496
18796
|
children: item.label
|
|
18497
18797
|
}
|
|
18498
18798
|
)
|
|
18499
|
-
] }, item.
|
|
18799
|
+
] }, item.key))
|
|
18500
18800
|
}
|
|
18501
18801
|
);
|
|
18502
18802
|
};
|
|
@@ -19290,13 +19590,13 @@ var init_JazariStateMachine = __esm({
|
|
|
19290
19590
|
);
|
|
19291
19591
|
}, [resolvedTrait, entityFields]);
|
|
19292
19592
|
if (isLoading) {
|
|
19293
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
19593
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
19294
19594
|
}
|
|
19295
19595
|
if (error) {
|
|
19296
19596
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
19297
19597
|
}
|
|
19298
19598
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
19299
|
-
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
19599
|
+
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
19300
19600
|
}
|
|
19301
19601
|
return /* @__PURE__ */ jsx(
|
|
19302
19602
|
StateMachineView,
|
|
@@ -20340,13 +20640,13 @@ var init_LayoutPatterns = __esm({
|
|
|
20340
20640
|
function generateRuleId() {
|
|
20341
20641
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
20342
20642
|
}
|
|
20343
|
-
function questionsToOptions(questions,
|
|
20643
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
20344
20644
|
const opts = questions.map((q) => ({
|
|
20345
20645
|
value: q.id,
|
|
20346
20646
|
label: q.label
|
|
20347
20647
|
}));
|
|
20348
|
-
if (
|
|
20349
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
20648
|
+
if (endOfSurveyLabel !== null) {
|
|
20649
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
20350
20650
|
}
|
|
20351
20651
|
return opts;
|
|
20352
20652
|
}
|
|
@@ -20355,7 +20655,7 @@ function isRuleBroken(rule, questions) {
|
|
|
20355
20655
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
20356
20656
|
return !sourceExists || !targetExists;
|
|
20357
20657
|
}
|
|
20358
|
-
var END_OF_SURVEY,
|
|
20658
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
20359
20659
|
var init_BranchingLogicBuilder = __esm({
|
|
20360
20660
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
20361
20661
|
"use client";
|
|
@@ -20368,14 +20668,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20368
20668
|
init_FilterPill();
|
|
20369
20669
|
init_Box();
|
|
20370
20670
|
init_useEventBus();
|
|
20671
|
+
init_useTranslate();
|
|
20371
20672
|
init_cn();
|
|
20372
20673
|
END_OF_SURVEY = "end-of-survey";
|
|
20373
|
-
OPERATOR_OPTIONS = [
|
|
20374
|
-
{ value: "equals", label: "equals" },
|
|
20375
|
-
{ value: "not-equals", label: "does not equal" },
|
|
20376
|
-
{ value: "contains", label: "contains" },
|
|
20377
|
-
{ value: "in", label: "is one of" }
|
|
20378
|
-
];
|
|
20379
20674
|
RuleRow = ({
|
|
20380
20675
|
rule,
|
|
20381
20676
|
questions,
|
|
@@ -20384,8 +20679,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20384
20679
|
onChange,
|
|
20385
20680
|
onDelete
|
|
20386
20681
|
}) => {
|
|
20387
|
-
const
|
|
20388
|
-
const
|
|
20682
|
+
const { t } = useTranslate();
|
|
20683
|
+
const operatorOptions = useMemo(
|
|
20684
|
+
() => [
|
|
20685
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
20686
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
20687
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
20688
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
20689
|
+
],
|
|
20690
|
+
[t]
|
|
20691
|
+
);
|
|
20692
|
+
const sourceOptions = useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
20693
|
+
const targetOptions = useMemo(
|
|
20694
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
20695
|
+
[questions, t]
|
|
20696
|
+
);
|
|
20389
20697
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
20390
20698
|
const valueOptions = useMemo(() => {
|
|
20391
20699
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -20430,22 +20738,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20430
20738
|
),
|
|
20431
20739
|
children: [
|
|
20432
20740
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
20433
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
20741
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
20434
20742
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
20435
20743
|
Select,
|
|
20436
20744
|
{
|
|
20437
20745
|
options: sourceOptions,
|
|
20438
20746
|
value: rule.sourceQuestionId,
|
|
20439
|
-
placeholder: "
|
|
20747
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
20440
20748
|
onChange: handleSource,
|
|
20441
20749
|
disabled: readOnly,
|
|
20442
|
-
error: broken ? "
|
|
20750
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
20443
20751
|
}
|
|
20444
20752
|
) }),
|
|
20445
20753
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
20446
20754
|
Select,
|
|
20447
20755
|
{
|
|
20448
|
-
options:
|
|
20756
|
+
options: operatorOptions,
|
|
20449
20757
|
value: rule.operator,
|
|
20450
20758
|
onChange: handleOperator,
|
|
20451
20759
|
disabled: readOnly
|
|
@@ -20468,7 +20776,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20468
20776
|
{
|
|
20469
20777
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
20470
20778
|
value: "",
|
|
20471
|
-
placeholder: "
|
|
20779
|
+
placeholder: t("branchingLogic.addValue"),
|
|
20472
20780
|
onChange: handleAddChip,
|
|
20473
20781
|
disabled: readOnly
|
|
20474
20782
|
}
|
|
@@ -20476,7 +20784,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20476
20784
|
Input,
|
|
20477
20785
|
{
|
|
20478
20786
|
inputType: "text",
|
|
20479
|
-
placeholder: "
|
|
20787
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
20480
20788
|
value: "",
|
|
20481
20789
|
onKeyDown: (e) => {
|
|
20482
20790
|
if (e.key !== "Enter") return;
|
|
@@ -20494,7 +20802,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20494
20802
|
{
|
|
20495
20803
|
options: valueOptions,
|
|
20496
20804
|
value: scalarValue,
|
|
20497
|
-
placeholder: "
|
|
20805
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
20498
20806
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
20499
20807
|
disabled: readOnly
|
|
20500
20808
|
}
|
|
@@ -20502,7 +20810,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20502
20810
|
Input,
|
|
20503
20811
|
{
|
|
20504
20812
|
inputType: "text",
|
|
20505
|
-
placeholder: "
|
|
20813
|
+
placeholder: t("branchingLogic.value"),
|
|
20506
20814
|
value: scalarValue,
|
|
20507
20815
|
onChange: handleScalarValue,
|
|
20508
20816
|
disabled: readOnly
|
|
@@ -20510,17 +20818,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20510
20818
|
) }),
|
|
20511
20819
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
20512
20820
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
20513
|
-
"
|
|
20821
|
+
t("branchingLogic.goTo")
|
|
20514
20822
|
] }),
|
|
20515
20823
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
20516
20824
|
Select,
|
|
20517
20825
|
{
|
|
20518
20826
|
options: targetOptions,
|
|
20519
20827
|
value: rule.targetQuestionId,
|
|
20520
|
-
placeholder: "
|
|
20828
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
20521
20829
|
onChange: handleTarget,
|
|
20522
20830
|
disabled: readOnly,
|
|
20523
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
20831
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
20524
20832
|
}
|
|
20525
20833
|
) }),
|
|
20526
20834
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -20532,11 +20840,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20532
20840
|
action: "DELETE_RULE",
|
|
20533
20841
|
actionPayload: { ruleId: rule.id },
|
|
20534
20842
|
onClick: onDelete,
|
|
20535
|
-
"aria-label": "
|
|
20843
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
20536
20844
|
}
|
|
20537
20845
|
)
|
|
20538
20846
|
] }),
|
|
20539
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
20847
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
20540
20848
|
]
|
|
20541
20849
|
}
|
|
20542
20850
|
);
|
|
@@ -20546,10 +20854,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20546
20854
|
NODE_GAP_Y = 80;
|
|
20547
20855
|
PADDING = 32;
|
|
20548
20856
|
LogicGraph = ({ questions, rules }) => {
|
|
20857
|
+
const { t } = useTranslate();
|
|
20858
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
20549
20859
|
const layout = useMemo(() => {
|
|
20550
20860
|
const items = [
|
|
20551
20861
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
20552
|
-
{ id: END_OF_SURVEY, label:
|
|
20862
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
20553
20863
|
];
|
|
20554
20864
|
const positions = {};
|
|
20555
20865
|
items.forEach((item, i) => {
|
|
@@ -20561,14 +20871,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20561
20871
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
20562
20872
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
20563
20873
|
return { items, positions, width, height };
|
|
20564
|
-
}, [questions]);
|
|
20874
|
+
}, [questions, endOfSurveyLabel]);
|
|
20565
20875
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
20566
20876
|
"svg",
|
|
20567
20877
|
{
|
|
20568
20878
|
width: layout.width,
|
|
20569
20879
|
height: layout.height,
|
|
20570
20880
|
role: "img",
|
|
20571
|
-
"aria-label": "
|
|
20881
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
20572
20882
|
style: { display: "block" },
|
|
20573
20883
|
children: [
|
|
20574
20884
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -20676,6 +20986,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20676
20986
|
readOnly = false,
|
|
20677
20987
|
className
|
|
20678
20988
|
}) => {
|
|
20989
|
+
const { t } = useTranslate();
|
|
20679
20990
|
const eventBus = useEventBus();
|
|
20680
20991
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
20681
20992
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -20728,16 +21039,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20728
21039
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
20729
21040
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
20730
21041
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
20731
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
21042
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
20732
21043
|
/* @__PURE__ */ jsx(
|
|
20733
21044
|
Badge,
|
|
20734
21045
|
{
|
|
20735
21046
|
variant: "neutral",
|
|
20736
21047
|
size: "sm",
|
|
20737
|
-
label:
|
|
21048
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
20738
21049
|
}
|
|
20739
21050
|
),
|
|
20740
|
-
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
21051
|
+
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
21052
|
+
Badge,
|
|
21053
|
+
{
|
|
21054
|
+
variant: "error",
|
|
21055
|
+
size: "sm",
|
|
21056
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
21057
|
+
}
|
|
21058
|
+
)
|
|
20741
21059
|
] }),
|
|
20742
21060
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
20743
21061
|
/* @__PURE__ */ jsx(
|
|
@@ -20748,7 +21066,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20748
21066
|
leftIcon: Pencil,
|
|
20749
21067
|
action: "VIEW_EDIT",
|
|
20750
21068
|
onClick: () => setView("edit"),
|
|
20751
|
-
children: "
|
|
21069
|
+
children: t("branchingLogic.rules")
|
|
20752
21070
|
}
|
|
20753
21071
|
),
|
|
20754
21072
|
/* @__PURE__ */ jsx(
|
|
@@ -20759,13 +21077,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20759
21077
|
leftIcon: Eye,
|
|
20760
21078
|
action: "VIEW_GRAPH",
|
|
20761
21079
|
onClick: () => setView("graph"),
|
|
20762
|
-
children: "
|
|
21080
|
+
children: t("branchingLogic.logicGraph")
|
|
20763
21081
|
}
|
|
20764
21082
|
)
|
|
20765
21083
|
] })
|
|
20766
21084
|
] }),
|
|
20767
21085
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
20768
|
-
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
21086
|
+
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? t("branchingLogic.emptyNoQuestions") : t("branchingLogic.emptyNoRules") }) }) : rules.map((rule) => /* @__PURE__ */ jsx(
|
|
20769
21087
|
RuleRow,
|
|
20770
21088
|
{
|
|
20771
21089
|
rule,
|
|
@@ -20786,7 +21104,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20786
21104
|
action: "ADD_RULE",
|
|
20787
21105
|
onClick: handleAddRule,
|
|
20788
21106
|
disabled: noQuestions,
|
|
20789
|
-
children: "
|
|
21107
|
+
children: t("branchingLogic.addRule")
|
|
20790
21108
|
}
|
|
20791
21109
|
) })
|
|
20792
21110
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -21413,7 +21731,7 @@ function CalendarGrid({
|
|
|
21413
21731
|
onClick: stepPrev,
|
|
21414
21732
|
"aria-disabled": !canPrev || void 0,
|
|
21415
21733
|
"aria-label": t("aria.previousDays"),
|
|
21416
|
-
children: "
|
|
21734
|
+
children: t("nav.previous")
|
|
21417
21735
|
}
|
|
21418
21736
|
),
|
|
21419
21737
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -21426,7 +21744,7 @@ function CalendarGrid({
|
|
|
21426
21744
|
onClick: stepNext,
|
|
21427
21745
|
"aria-disabled": !canNext || void 0,
|
|
21428
21746
|
"aria-label": t("aria.nextDays"),
|
|
21429
|
-
children: "
|
|
21747
|
+
children: t("nav.next")
|
|
21430
21748
|
}
|
|
21431
21749
|
)
|
|
21432
21750
|
] }),
|
|
@@ -22976,7 +23294,7 @@ var init_Pagination = __esm({
|
|
|
22976
23294
|
type: "number",
|
|
22977
23295
|
value: jumpToPage,
|
|
22978
23296
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
22979
|
-
placeholder: "
|
|
23297
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
22980
23298
|
className: "w-20",
|
|
22981
23299
|
onKeyDown: (e) => {
|
|
22982
23300
|
if (e.key === "Enter") {
|
|
@@ -23114,13 +23432,10 @@ var init_CardGrid = __esm({
|
|
|
23114
23432
|
return children;
|
|
23115
23433
|
}
|
|
23116
23434
|
if (isLoading) {
|
|
23117
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
23435
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("loading.items") }) });
|
|
23118
23436
|
}
|
|
23119
23437
|
if (error) {
|
|
23120
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
23121
|
-
"Error loading items: ",
|
|
23122
|
-
error.message
|
|
23123
|
-
] }) });
|
|
23438
|
+
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "error", children: t("error.loadFailed", { message: error.message }) }) });
|
|
23124
23439
|
}
|
|
23125
23440
|
if (normalizedData.length === 0) {
|
|
23126
23441
|
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-12 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
|
|
@@ -26986,7 +27301,7 @@ function DataGrid({
|
|
|
26986
27301
|
onChange: () => toggleSelection(id),
|
|
26987
27302
|
onClick: (e) => e.stopPropagation(),
|
|
26988
27303
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
26989
|
-
"aria-label":
|
|
27304
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
26990
27305
|
}
|
|
26991
27306
|
),
|
|
26992
27307
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -27184,7 +27499,7 @@ function formatDate3(value) {
|
|
|
27184
27499
|
if (isNaN(d.getTime())) return String(value);
|
|
27185
27500
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
27186
27501
|
}
|
|
27187
|
-
function formatValue2(value, format) {
|
|
27502
|
+
function formatValue2(value, format, boolLabels) {
|
|
27188
27503
|
if (value === void 0 || value === null) return "";
|
|
27189
27504
|
switch (format) {
|
|
27190
27505
|
case "date":
|
|
@@ -27196,7 +27511,7 @@ function formatValue2(value, format) {
|
|
|
27196
27511
|
case "percent":
|
|
27197
27512
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
27198
27513
|
case "boolean":
|
|
27199
|
-
return value ? "Yes" : "No";
|
|
27514
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
27200
27515
|
default:
|
|
27201
27516
|
return String(value);
|
|
27202
27517
|
}
|
|
@@ -27492,7 +27807,7 @@ function DataList({
|
|
|
27492
27807
|
field.label ?? fieldLabel3(field.name),
|
|
27493
27808
|
":"
|
|
27494
27809
|
] }),
|
|
27495
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
27810
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
27496
27811
|
] }, field.name);
|
|
27497
27812
|
}) }),
|
|
27498
27813
|
progressFields.map((field) => {
|
|
@@ -27622,6 +27937,7 @@ var init_FileTree = __esm({
|
|
|
27622
27937
|
init_Box();
|
|
27623
27938
|
init_Typography();
|
|
27624
27939
|
init_Icon();
|
|
27940
|
+
init_useTranslate();
|
|
27625
27941
|
TreeNodeItem = ({
|
|
27626
27942
|
node,
|
|
27627
27943
|
depth,
|
|
@@ -27707,8 +28023,9 @@ var init_FileTree = __esm({
|
|
|
27707
28023
|
className,
|
|
27708
28024
|
indent = 16
|
|
27709
28025
|
}) => {
|
|
28026
|
+
const { t } = useTranslate();
|
|
27710
28027
|
if (tree.length === 0) {
|
|
27711
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
28028
|
+
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
27712
28029
|
}
|
|
27713
28030
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
27714
28031
|
TreeNodeItem,
|
|
@@ -27827,6 +28144,7 @@ var init_FilterGroup = __esm({
|
|
|
27827
28144
|
init_Icon();
|
|
27828
28145
|
init_useEventBus();
|
|
27829
28146
|
init_useQuerySingleton();
|
|
28147
|
+
init_useTranslate();
|
|
27830
28148
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
27831
28149
|
lookStyles6 = {
|
|
27832
28150
|
toolbar: "",
|
|
@@ -27847,6 +28165,7 @@ var init_FilterGroup = __esm({
|
|
|
27847
28165
|
isLoading,
|
|
27848
28166
|
look = "toolbar"
|
|
27849
28167
|
}) => {
|
|
28168
|
+
const { t } = useTranslate();
|
|
27850
28169
|
const eventBus = useEventBus();
|
|
27851
28170
|
const queryState = useQuerySingleton(query);
|
|
27852
28171
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -27928,7 +28247,7 @@ var init_FilterGroup = __esm({
|
|
|
27928
28247
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
27929
28248
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
27930
28249
|
),
|
|
27931
|
-
children: "
|
|
28250
|
+
children: t("filterGroup.all")
|
|
27932
28251
|
}
|
|
27933
28252
|
),
|
|
27934
28253
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -27956,7 +28275,7 @@ var init_FilterGroup = __esm({
|
|
|
27956
28275
|
size: "sm",
|
|
27957
28276
|
onClick: handleClearAll,
|
|
27958
28277
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
27959
|
-
children: "
|
|
28278
|
+
children: t("filterGroup.clear")
|
|
27960
28279
|
}
|
|
27961
28280
|
)
|
|
27962
28281
|
]
|
|
@@ -27967,7 +28286,7 @@ var init_FilterGroup = __esm({
|
|
|
27967
28286
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
27968
28287
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
27969
28288
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
27970
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
28289
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
27971
28290
|
] }),
|
|
27972
28291
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
27973
28292
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -27990,7 +28309,7 @@ var init_FilterGroup = __esm({
|
|
|
27990
28309
|
`${filter.field}_from`,
|
|
27991
28310
|
e.target.value || null
|
|
27992
28311
|
),
|
|
27993
|
-
placeholder: "
|
|
28312
|
+
placeholder: t("filterGroup.from"),
|
|
27994
28313
|
clearable: true,
|
|
27995
28314
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
27996
28315
|
}
|
|
@@ -28004,7 +28323,7 @@ var init_FilterGroup = __esm({
|
|
|
28004
28323
|
`${filter.field}_to`,
|
|
28005
28324
|
e.target.value || null
|
|
28006
28325
|
),
|
|
28007
|
-
placeholder: "
|
|
28326
|
+
placeholder: t("filterGroup.to"),
|
|
28008
28327
|
clearable: true,
|
|
28009
28328
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
28010
28329
|
}
|
|
@@ -28024,7 +28343,7 @@ var init_FilterGroup = __esm({
|
|
|
28024
28343
|
value: selectedValues[filter.field] || "all",
|
|
28025
28344
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
28026
28345
|
options: [
|
|
28027
|
-
{ value: "all", label: "
|
|
28346
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
28028
28347
|
...filter.options?.map((opt) => ({
|
|
28029
28348
|
value: opt,
|
|
28030
28349
|
label: opt
|
|
@@ -28041,7 +28360,7 @@ var init_FilterGroup = __esm({
|
|
|
28041
28360
|
onClick: handleClearAll,
|
|
28042
28361
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
28043
28362
|
className: "self-start",
|
|
28044
|
-
children: "
|
|
28363
|
+
children: t("filterGroup.clearAll")
|
|
28045
28364
|
}
|
|
28046
28365
|
)
|
|
28047
28366
|
] });
|
|
@@ -28107,7 +28426,7 @@ var init_FilterGroup = __esm({
|
|
|
28107
28426
|
value: selectedValues[filter.field] || "all",
|
|
28108
28427
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
28109
28428
|
options: [
|
|
28110
|
-
{ value: "all", label:
|
|
28429
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
28111
28430
|
...filter.options?.map((opt) => ({
|
|
28112
28431
|
value: opt,
|
|
28113
28432
|
label: opt
|
|
@@ -28136,7 +28455,7 @@ var init_FilterGroup = __esm({
|
|
|
28136
28455
|
field
|
|
28137
28456
|
);
|
|
28138
28457
|
}),
|
|
28139
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
28458
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
28140
28459
|
] })
|
|
28141
28460
|
]
|
|
28142
28461
|
}
|
|
@@ -28161,7 +28480,7 @@ var init_FilterGroup = __esm({
|
|
|
28161
28480
|
className: "text-muted-foreground",
|
|
28162
28481
|
children: [
|
|
28163
28482
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
28164
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
28483
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
28165
28484
|
]
|
|
28166
28485
|
}
|
|
28167
28486
|
),
|
|
@@ -28187,7 +28506,7 @@ var init_FilterGroup = __esm({
|
|
|
28187
28506
|
`${filter.field}_from`,
|
|
28188
28507
|
e.target.value || null
|
|
28189
28508
|
),
|
|
28190
|
-
placeholder: "
|
|
28509
|
+
placeholder: t("filterGroup.from"),
|
|
28191
28510
|
clearable: true,
|
|
28192
28511
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
28193
28512
|
className: "min-w-[130px]"
|
|
@@ -28203,7 +28522,7 @@ var init_FilterGroup = __esm({
|
|
|
28203
28522
|
`${filter.field}_to`,
|
|
28204
28523
|
e.target.value || null
|
|
28205
28524
|
),
|
|
28206
|
-
placeholder: "
|
|
28525
|
+
placeholder: t("filterGroup.to"),
|
|
28207
28526
|
clearable: true,
|
|
28208
28527
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
28209
28528
|
className: "min-w-[130px]"
|
|
@@ -28225,7 +28544,7 @@ var init_FilterGroup = __esm({
|
|
|
28225
28544
|
value: selectedValues[filter.field] || "all",
|
|
28226
28545
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
28227
28546
|
options: [
|
|
28228
|
-
{ value: "all", label: "
|
|
28547
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
28229
28548
|
...filter.options?.map((opt) => ({
|
|
28230
28549
|
value: opt,
|
|
28231
28550
|
label: opt
|
|
@@ -28236,10 +28555,7 @@ var init_FilterGroup = __esm({
|
|
|
28236
28555
|
)
|
|
28237
28556
|
] }, filter.field)),
|
|
28238
28557
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
28239
|
-
/* @__PURE__ */
|
|
28240
|
-
activeFilterCount,
|
|
28241
|
-
" active"
|
|
28242
|
-
] }),
|
|
28558
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
28243
28559
|
/* @__PURE__ */ jsx(
|
|
28244
28560
|
Button,
|
|
28245
28561
|
{
|
|
@@ -28247,7 +28563,7 @@ var init_FilterGroup = __esm({
|
|
|
28247
28563
|
size: "sm",
|
|
28248
28564
|
onClick: handleClearAll,
|
|
28249
28565
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
28250
|
-
children: "
|
|
28566
|
+
children: t("filterGroup.clearAll")
|
|
28251
28567
|
}
|
|
28252
28568
|
)
|
|
28253
28569
|
] })
|
|
@@ -29191,19 +29507,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
29191
29507
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
29192
29508
|
}
|
|
29193
29509
|
});
|
|
29194
|
-
var
|
|
29510
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
29195
29511
|
var init_ViolationAlert = __esm({
|
|
29196
29512
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
29197
29513
|
init_cn();
|
|
29514
|
+
init_useTranslate();
|
|
29198
29515
|
init_Box();
|
|
29199
29516
|
init_Stack();
|
|
29200
29517
|
init_Typography();
|
|
29201
29518
|
init_Button();
|
|
29202
29519
|
init_Icon();
|
|
29203
|
-
|
|
29204
|
-
measure: "
|
|
29205
|
-
admin: "
|
|
29206
|
-
penalty: "
|
|
29520
|
+
actionTypeLabelKeys = {
|
|
29521
|
+
measure: "violationAlert.actionType.measure",
|
|
29522
|
+
admin: "violationAlert.actionType.admin",
|
|
29523
|
+
penalty: "violationAlert.actionType.penalty"
|
|
29207
29524
|
};
|
|
29208
29525
|
actionTypeIcons = {
|
|
29209
29526
|
measure: "alert-triangle",
|
|
@@ -29220,10 +29537,11 @@ var init_ViolationAlert = __esm({
|
|
|
29220
29537
|
className,
|
|
29221
29538
|
...flatProps
|
|
29222
29539
|
}) => {
|
|
29540
|
+
const { t } = useTranslate();
|
|
29223
29541
|
const resolvedViolation = violation ?? {
|
|
29224
29542
|
law: "",
|
|
29225
29543
|
article: "",
|
|
29226
|
-
message: flatProps.message ?? "
|
|
29544
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
29227
29545
|
actionType: "measure"
|
|
29228
29546
|
};
|
|
29229
29547
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -29308,7 +29626,7 @@ var init_ViolationAlert = __esm({
|
|
|
29308
29626
|
{
|
|
29309
29627
|
variant: "caption",
|
|
29310
29628
|
className: cn(textColor, "opacity-75"),
|
|
29311
|
-
children:
|
|
29629
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
29312
29630
|
}
|
|
29313
29631
|
)
|
|
29314
29632
|
] })
|
|
@@ -29339,7 +29657,7 @@ var init_ViolationAlert = __esm({
|
|
|
29339
29657
|
{
|
|
29340
29658
|
variant: "caption",
|
|
29341
29659
|
className: cn(textColor, "opacity-75"),
|
|
29342
|
-
children: "
|
|
29660
|
+
children: t("violationAlert.adminLabel")
|
|
29343
29661
|
}
|
|
29344
29662
|
),
|
|
29345
29663
|
/* @__PURE__ */ jsx(
|
|
@@ -29358,7 +29676,7 @@ var init_ViolationAlert = __esm({
|
|
|
29358
29676
|
{
|
|
29359
29677
|
variant: "caption",
|
|
29360
29678
|
className: cn(textColor, "opacity-75"),
|
|
29361
|
-
children: "
|
|
29679
|
+
children: t("violationAlert.penaltyLabel")
|
|
29362
29680
|
}
|
|
29363
29681
|
),
|
|
29364
29682
|
/* @__PURE__ */ jsx(
|
|
@@ -29383,7 +29701,7 @@ var init_ViolationAlert = __esm({
|
|
|
29383
29701
|
className: cn(textColor, "self-start"),
|
|
29384
29702
|
children: [
|
|
29385
29703
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
29386
|
-
"
|
|
29704
|
+
t("violationAlert.goToField")
|
|
29387
29705
|
]
|
|
29388
29706
|
}
|
|
29389
29707
|
)
|
|
@@ -29699,6 +30017,7 @@ var init_LineChart = __esm({
|
|
|
29699
30017
|
"use client";
|
|
29700
30018
|
init_cn();
|
|
29701
30019
|
init_atoms2();
|
|
30020
|
+
init_useTranslate();
|
|
29702
30021
|
LineChart2 = ({
|
|
29703
30022
|
data,
|
|
29704
30023
|
width = 400,
|
|
@@ -29710,6 +30029,7 @@ var init_LineChart = __esm({
|
|
|
29710
30029
|
areaColor = "var(--color-primary)",
|
|
29711
30030
|
className
|
|
29712
30031
|
}) => {
|
|
30032
|
+
const { t } = useTranslate();
|
|
29713
30033
|
const gradientId = useId();
|
|
29714
30034
|
const safeData = data ?? [];
|
|
29715
30035
|
const sortedData = useMemo(() => {
|
|
@@ -29746,7 +30066,7 @@ var init_LineChart = __esm({
|
|
|
29746
30066
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
29747
30067
|
}, [linePath, points, height, showArea]);
|
|
29748
30068
|
if (safeData.length === 0) {
|
|
29749
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
30069
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
29750
30070
|
}
|
|
29751
30071
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
29752
30072
|
"svg",
|
|
@@ -31653,6 +31973,7 @@ var init_GraphView = __esm({
|
|
|
31653
31973
|
"use client";
|
|
31654
31974
|
init_cn();
|
|
31655
31975
|
init_atoms2();
|
|
31976
|
+
init_useTranslate();
|
|
31656
31977
|
GROUP_COLORS = [
|
|
31657
31978
|
"#3b82f6",
|
|
31658
31979
|
// blue-500
|
|
@@ -31685,6 +32006,7 @@ var init_GraphView = __esm({
|
|
|
31685
32006
|
showLabels = true,
|
|
31686
32007
|
zoomToFit = true
|
|
31687
32008
|
}) => {
|
|
32009
|
+
const { t } = useTranslate();
|
|
31688
32010
|
const containerRef = useRef(null);
|
|
31689
32011
|
const animRef = useRef(0);
|
|
31690
32012
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -31862,7 +32184,7 @@ var init_GraphView = __esm({
|
|
|
31862
32184
|
[onNodeClick]
|
|
31863
32185
|
);
|
|
31864
32186
|
if (nodes.length === 0) {
|
|
31865
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: "
|
|
32187
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center", className), style: { width: w, height: h }, children: /* @__PURE__ */ jsx(Box, { className: "text-muted-foreground text-sm", children: t("display.noGraphData") }) });
|
|
31866
32188
|
}
|
|
31867
32189
|
return /* @__PURE__ */ jsx(
|
|
31868
32190
|
Box,
|
|
@@ -32318,11 +32640,12 @@ var init_UploadDropZone = __esm({
|
|
|
32318
32640
|
init_Icon();
|
|
32319
32641
|
init_Typography();
|
|
32320
32642
|
init_useEventBus();
|
|
32643
|
+
init_useTranslate();
|
|
32321
32644
|
UploadDropZone = ({
|
|
32322
32645
|
accept,
|
|
32323
32646
|
maxSize,
|
|
32324
32647
|
maxFiles = 1,
|
|
32325
|
-
label
|
|
32648
|
+
label,
|
|
32326
32649
|
description,
|
|
32327
32650
|
disabled = false,
|
|
32328
32651
|
action,
|
|
@@ -32330,22 +32653,24 @@ var init_UploadDropZone = __esm({
|
|
|
32330
32653
|
onFiles,
|
|
32331
32654
|
className
|
|
32332
32655
|
}) => {
|
|
32656
|
+
const { t } = useTranslate();
|
|
32657
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
32333
32658
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
32334
32659
|
const [error, setError] = useState(null);
|
|
32335
32660
|
const inputRef = useRef(null);
|
|
32336
32661
|
const eventBus = useSafeEventBus7();
|
|
32337
32662
|
const defaultDescription = [
|
|
32338
|
-
accept ?
|
|
32339
|
-
maxSize ?
|
|
32340
|
-
maxFiles > 1 ?
|
|
32663
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
32664
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
32665
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
32341
32666
|
].filter(Boolean).join(". ");
|
|
32342
32667
|
const validateFiles = useCallback(
|
|
32343
32668
|
(files) => {
|
|
32344
32669
|
if (files.length > maxFiles) {
|
|
32345
|
-
return { valid: [], error:
|
|
32670
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
32346
32671
|
}
|
|
32347
32672
|
if (accept) {
|
|
32348
|
-
const acceptedTypes = accept.split(",").map((
|
|
32673
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
32349
32674
|
const invalid = files.filter((file) => {
|
|
32350
32675
|
return !acceptedTypes.some((type) => {
|
|
32351
32676
|
if (type.endsWith("/*")) {
|
|
@@ -32355,7 +32680,7 @@ var init_UploadDropZone = __esm({
|
|
|
32355
32680
|
});
|
|
32356
32681
|
});
|
|
32357
32682
|
if (invalid.length > 0) {
|
|
32358
|
-
return { valid: [], error:
|
|
32683
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
32359
32684
|
}
|
|
32360
32685
|
}
|
|
32361
32686
|
if (maxSize) {
|
|
@@ -32363,13 +32688,13 @@ var init_UploadDropZone = __esm({
|
|
|
32363
32688
|
if (tooLarge.length > 0) {
|
|
32364
32689
|
return {
|
|
32365
32690
|
valid: [],
|
|
32366
|
-
error:
|
|
32691
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
32367
32692
|
};
|
|
32368
32693
|
}
|
|
32369
32694
|
}
|
|
32370
32695
|
return { valid: files, error: null };
|
|
32371
32696
|
},
|
|
32372
|
-
[accept, maxSize, maxFiles]
|
|
32697
|
+
[accept, maxSize, maxFiles, t]
|
|
32373
32698
|
);
|
|
32374
32699
|
const handleFiles = useCallback(
|
|
32375
32700
|
(files) => {
|
|
@@ -32440,7 +32765,7 @@ var init_UploadDropZone = __esm({
|
|
|
32440
32765
|
handleClick();
|
|
32441
32766
|
}
|
|
32442
32767
|
},
|
|
32443
|
-
"aria-label":
|
|
32768
|
+
"aria-label": resolvedLabel,
|
|
32444
32769
|
children: [
|
|
32445
32770
|
/* @__PURE__ */ jsx(
|
|
32446
32771
|
"input",
|
|
@@ -32456,7 +32781,7 @@ var init_UploadDropZone = __esm({
|
|
|
32456
32781
|
}
|
|
32457
32782
|
),
|
|
32458
32783
|
error ? /* @__PURE__ */ jsx(Icon, { name: "file-warning", size: "lg", className: "text-error mb-2" }) : /* @__PURE__ */ jsx(Icon, { name: "upload", size: "lg", className: "text-muted-foreground mb-2" }),
|
|
32459
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
32784
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
32460
32785
|
error ? /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "error", className: "text-center", children: error }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", className: "text-center", children: description ?? defaultDescription })
|
|
32461
32786
|
]
|
|
32462
32787
|
}
|
|
@@ -32878,7 +33203,7 @@ function TableView({
|
|
|
32878
33203
|
{
|
|
32879
33204
|
checked: selected.has(id),
|
|
32880
33205
|
onChange: () => toggleRow(id),
|
|
32881
|
-
"aria-label":
|
|
33206
|
+
"aria-label": t("table.selectRow", { id })
|
|
32882
33207
|
}
|
|
32883
33208
|
) }),
|
|
32884
33209
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -35725,7 +36050,7 @@ var init_QrScanner = __esm({
|
|
|
35725
36050
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
35726
36051
|
children: [
|
|
35727
36052
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
35728
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
36053
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
35729
36054
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
35730
36055
|
]
|
|
35731
36056
|
}
|
|
@@ -35736,7 +36061,7 @@ var init_QrScanner = __esm({
|
|
|
35736
36061
|
position: "absolute",
|
|
35737
36062
|
display: "flex",
|
|
35738
36063
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
35739
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
36064
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
35740
36065
|
}
|
|
35741
36066
|
),
|
|
35742
36067
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -35755,7 +36080,7 @@ var init_QrScanner = __esm({
|
|
|
35755
36080
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
35756
36081
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
35757
36082
|
),
|
|
35758
|
-
"aria-label": isPaused ? "
|
|
36083
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
35759
36084
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
35760
36085
|
}
|
|
35761
36086
|
),
|
|
@@ -35768,7 +36093,7 @@ var init_QrScanner = __esm({
|
|
|
35768
36093
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
35769
36094
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
35770
36095
|
),
|
|
35771
|
-
"aria-label":
|
|
36096
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
35772
36097
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
35773
36098
|
}
|
|
35774
36099
|
),
|
|
@@ -35782,7 +36107,7 @@ var init_QrScanner = __esm({
|
|
|
35782
36107
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
35783
36108
|
),
|
|
35784
36109
|
"aria-label": t("aria.mockScanDev"),
|
|
35785
|
-
children: "
|
|
36110
|
+
children: t("qrScanner.mockScan")
|
|
35786
36111
|
}
|
|
35787
36112
|
)
|
|
35788
36113
|
]
|
|
@@ -35800,6 +36125,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35800
36125
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
35801
36126
|
init_cn();
|
|
35802
36127
|
init_useEventBus();
|
|
36128
|
+
init_useTranslate();
|
|
35803
36129
|
init_Typography();
|
|
35804
36130
|
init_Box();
|
|
35805
36131
|
init_Label();
|
|
@@ -35809,36 +36135,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35809
36135
|
const sign = delta >= 0 ? "+" : "-";
|
|
35810
36136
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
35811
36137
|
};
|
|
35812
|
-
constraintHint = (constraint) => {
|
|
36138
|
+
constraintHint = (constraint, t) => {
|
|
35813
36139
|
if (constraint.type === "single") {
|
|
35814
|
-
return constraint.required ? "
|
|
36140
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
35815
36141
|
}
|
|
35816
36142
|
const { min, max } = constraint;
|
|
35817
36143
|
if (min && max) {
|
|
35818
|
-
return min === max ?
|
|
36144
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
35819
36145
|
}
|
|
35820
|
-
if (min) return
|
|
35821
|
-
if (max) return
|
|
35822
|
-
return "
|
|
36146
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
36147
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
36148
|
+
return t("optionConstraint.optional");
|
|
35823
36149
|
};
|
|
35824
|
-
validateSelection = (selected, constraint) => {
|
|
36150
|
+
validateSelection = (selected, constraint, t) => {
|
|
35825
36151
|
if (constraint.type === "single") {
|
|
35826
36152
|
if (constraint.required && selected.length === 0) {
|
|
35827
|
-
return "
|
|
36153
|
+
return t("optionConstraint.error.pickOne");
|
|
35828
36154
|
}
|
|
35829
36155
|
if (selected.length > 1) {
|
|
35830
|
-
return "
|
|
36156
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
35831
36157
|
}
|
|
35832
36158
|
return void 0;
|
|
35833
36159
|
}
|
|
35834
36160
|
const { min, max } = constraint;
|
|
35835
36161
|
if (min !== void 0 && selected.length < min) {
|
|
35836
36162
|
const remaining = min - selected.length;
|
|
35837
|
-
return
|
|
36163
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
35838
36164
|
}
|
|
35839
36165
|
if (max !== void 0 && selected.length > max) {
|
|
35840
36166
|
const excess = selected.length - max;
|
|
35841
|
-
return
|
|
36167
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
35842
36168
|
}
|
|
35843
36169
|
return void 0;
|
|
35844
36170
|
};
|
|
@@ -35855,8 +36181,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35855
36181
|
className
|
|
35856
36182
|
}) => {
|
|
35857
36183
|
const eventBus = useEventBus();
|
|
35858
|
-
const
|
|
35859
|
-
const
|
|
36184
|
+
const { t } = useTranslate();
|
|
36185
|
+
const hint = constraintHint(constraint, t);
|
|
36186
|
+
const error = validateSelection(selected, constraint, t);
|
|
35860
36187
|
const inputName = `option-${groupId}`;
|
|
35861
36188
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
35862
36189
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -35956,7 +36283,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35956
36283
|
variant: "caption",
|
|
35957
36284
|
color: "warning",
|
|
35958
36285
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
35959
|
-
children: "
|
|
36286
|
+
children: t("optionConstraint.outOfStock")
|
|
35960
36287
|
}
|
|
35961
36288
|
)
|
|
35962
36289
|
]
|
|
@@ -36278,6 +36605,7 @@ function changeBlockType(block, type) {
|
|
|
36278
36605
|
return { id: block.id, type, content: seed };
|
|
36279
36606
|
}
|
|
36280
36607
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
36608
|
+
const { t } = useTranslate();
|
|
36281
36609
|
const [open, setOpen] = useState(false);
|
|
36282
36610
|
const ref = useRef(null);
|
|
36283
36611
|
useEffect(() => {
|
|
@@ -36297,7 +36625,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36297
36625
|
{
|
|
36298
36626
|
type: "button",
|
|
36299
36627
|
variant: "ghost",
|
|
36300
|
-
"aria-label": "
|
|
36628
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
36301
36629
|
className: cn(
|
|
36302
36630
|
"inline-flex items-center justify-center",
|
|
36303
36631
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -36319,7 +36647,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36319
36647
|
"py-1 text-sm"
|
|
36320
36648
|
),
|
|
36321
36649
|
children: [
|
|
36322
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
36650
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
36323
36651
|
/* @__PURE__ */ jsxs(
|
|
36324
36652
|
Button,
|
|
36325
36653
|
{
|
|
@@ -36333,7 +36661,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36333
36661
|
},
|
|
36334
36662
|
children: [
|
|
36335
36663
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
36336
|
-
"
|
|
36664
|
+
" ",
|
|
36665
|
+
t("richBlockEditor.duplicate")
|
|
36337
36666
|
]
|
|
36338
36667
|
}
|
|
36339
36668
|
),
|
|
@@ -36350,14 +36679,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36350
36679
|
},
|
|
36351
36680
|
children: [
|
|
36352
36681
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
36353
|
-
"
|
|
36682
|
+
" ",
|
|
36683
|
+
t("common.delete")
|
|
36354
36684
|
]
|
|
36355
36685
|
}
|
|
36356
36686
|
),
|
|
36357
36687
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36358
36688
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
36359
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
36360
|
-
CHANGEABLE_TYPES.filter((
|
|
36689
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
36690
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsx(
|
|
36361
36691
|
Button,
|
|
36362
36692
|
{
|
|
36363
36693
|
type: "button",
|
|
@@ -36365,12 +36695,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36365
36695
|
role: "menuitem",
|
|
36366
36696
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
36367
36697
|
onClick: () => {
|
|
36368
|
-
onChangeType(
|
|
36698
|
+
onChangeType(bt);
|
|
36369
36699
|
setOpen(false);
|
|
36370
36700
|
},
|
|
36371
|
-
children:
|
|
36701
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
36372
36702
|
},
|
|
36373
|
-
|
|
36703
|
+
bt
|
|
36374
36704
|
))
|
|
36375
36705
|
] })
|
|
36376
36706
|
]
|
|
@@ -36432,6 +36762,7 @@ function BlockRow({
|
|
|
36432
36762
|
onInsertAfter,
|
|
36433
36763
|
onChangeType
|
|
36434
36764
|
}) {
|
|
36765
|
+
const { t } = useTranslate();
|
|
36435
36766
|
const setContent = useCallback(
|
|
36436
36767
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
36437
36768
|
[onUpdate]
|
|
@@ -36481,8 +36812,8 @@ function BlockRow({
|
|
|
36481
36812
|
tag: "h1",
|
|
36482
36813
|
value: block.content ?? "",
|
|
36483
36814
|
readOnly,
|
|
36484
|
-
placeholder: placeholder ?? "
|
|
36485
|
-
ariaLabel: "
|
|
36815
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
36816
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
36486
36817
|
className: "text-3xl font-bold leading-tight",
|
|
36487
36818
|
onValueChange: setContent
|
|
36488
36819
|
}
|
|
@@ -36494,8 +36825,8 @@ function BlockRow({
|
|
|
36494
36825
|
tag: "h2",
|
|
36495
36826
|
value: block.content ?? "",
|
|
36496
36827
|
readOnly,
|
|
36497
|
-
placeholder: placeholder ?? "
|
|
36498
|
-
ariaLabel: "
|
|
36828
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
36829
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
36499
36830
|
className: "text-2xl font-semibold leading-tight",
|
|
36500
36831
|
onValueChange: setContent
|
|
36501
36832
|
}
|
|
@@ -36507,8 +36838,8 @@ function BlockRow({
|
|
|
36507
36838
|
tag: "h3",
|
|
36508
36839
|
value: block.content ?? "",
|
|
36509
36840
|
readOnly,
|
|
36510
|
-
placeholder: placeholder ?? "
|
|
36511
|
-
ariaLabel: "
|
|
36841
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
36842
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
36512
36843
|
className: "text-xl font-semibold leading-tight",
|
|
36513
36844
|
onValueChange: setContent
|
|
36514
36845
|
}
|
|
@@ -36520,8 +36851,8 @@ function BlockRow({
|
|
|
36520
36851
|
tag: "blockquote",
|
|
36521
36852
|
value: block.content ?? "",
|
|
36522
36853
|
readOnly,
|
|
36523
|
-
placeholder: placeholder ?? "
|
|
36524
|
-
ariaLabel: "
|
|
36854
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
36855
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
36525
36856
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
36526
36857
|
onValueChange: setContent
|
|
36527
36858
|
}
|
|
@@ -36529,13 +36860,13 @@ function BlockRow({
|
|
|
36529
36860
|
case "code":
|
|
36530
36861
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
36531
36862
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
36532
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
36863
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
36533
36864
|
!readOnly && /* @__PURE__ */ jsx(
|
|
36534
36865
|
Input,
|
|
36535
36866
|
{
|
|
36536
36867
|
inputType: "text",
|
|
36537
36868
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
36538
|
-
"aria-label": "
|
|
36869
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
36539
36870
|
className: cn(
|
|
36540
36871
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
36541
36872
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -36551,8 +36882,8 @@ function BlockRow({
|
|
|
36551
36882
|
tag: "pre",
|
|
36552
36883
|
value: block.content ?? "",
|
|
36553
36884
|
readOnly,
|
|
36554
|
-
placeholder: placeholder ?? "
|
|
36555
|
-
ariaLabel: "
|
|
36885
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
36886
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
36556
36887
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
36557
36888
|
onValueChange: setContent
|
|
36558
36889
|
}
|
|
@@ -36565,7 +36896,7 @@ function BlockRow({
|
|
|
36565
36896
|
const caption = String(block.metadata?.caption ?? "");
|
|
36566
36897
|
const imgProps = {
|
|
36567
36898
|
src: url,
|
|
36568
|
-
alt: caption || "
|
|
36899
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
36569
36900
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
36570
36901
|
};
|
|
36571
36902
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -36579,7 +36910,8 @@ function BlockRow({
|
|
|
36579
36910
|
),
|
|
36580
36911
|
children: [
|
|
36581
36912
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
36582
|
-
"
|
|
36913
|
+
" ",
|
|
36914
|
+
t("richBlockEditor.noImageUrl")
|
|
36583
36915
|
]
|
|
36584
36916
|
}
|
|
36585
36917
|
),
|
|
@@ -36590,7 +36922,7 @@ function BlockRow({
|
|
|
36590
36922
|
inputType: "url",
|
|
36591
36923
|
value: url,
|
|
36592
36924
|
placeholder: "https://example.com/image.png",
|
|
36593
|
-
"aria-label": "
|
|
36925
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
36594
36926
|
className: cn(
|
|
36595
36927
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
36596
36928
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -36603,8 +36935,8 @@ function BlockRow({
|
|
|
36603
36935
|
{
|
|
36604
36936
|
inputType: "text",
|
|
36605
36937
|
value: caption,
|
|
36606
|
-
placeholder: "
|
|
36607
|
-
"aria-label": "
|
|
36938
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
36939
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
36608
36940
|
className: cn(
|
|
36609
36941
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
36610
36942
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -36635,8 +36967,8 @@ function BlockRow({
|
|
|
36635
36967
|
tag: "span",
|
|
36636
36968
|
value: child.content ?? "",
|
|
36637
36969
|
readOnly,
|
|
36638
|
-
placeholder: "
|
|
36639
|
-
ariaLabel: "
|
|
36970
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
36971
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
36640
36972
|
className: "inline-block min-w-[1ch] flex-1",
|
|
36641
36973
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
36642
36974
|
}
|
|
@@ -36646,7 +36978,7 @@ function BlockRow({
|
|
|
36646
36978
|
{
|
|
36647
36979
|
type: "button",
|
|
36648
36980
|
variant: "ghost",
|
|
36649
|
-
"aria-label": "
|
|
36981
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
36650
36982
|
className: cn(
|
|
36651
36983
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
36652
36984
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -36668,7 +37000,8 @@ function BlockRow({
|
|
|
36668
37000
|
onClick: addListItem,
|
|
36669
37001
|
children: [
|
|
36670
37002
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
36671
|
-
"
|
|
37003
|
+
" ",
|
|
37004
|
+
t("richBlockEditor.addItem")
|
|
36672
37005
|
]
|
|
36673
37006
|
}
|
|
36674
37007
|
) })
|
|
@@ -36684,8 +37017,8 @@ function BlockRow({
|
|
|
36684
37017
|
tag: "p",
|
|
36685
37018
|
value: block.content ?? "",
|
|
36686
37019
|
readOnly,
|
|
36687
|
-
placeholder: placeholder ?? "
|
|
36688
|
-
ariaLabel: "
|
|
37020
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
37021
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
36689
37022
|
className: "leading-7",
|
|
36690
37023
|
onValueChange: setContent
|
|
36691
37024
|
}
|
|
@@ -36708,7 +37041,7 @@ function BlockRow({
|
|
|
36708
37041
|
{
|
|
36709
37042
|
type: "button",
|
|
36710
37043
|
variant: "ghost",
|
|
36711
|
-
"aria-label": "
|
|
37044
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
36712
37045
|
className: cn(
|
|
36713
37046
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
36714
37047
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -36735,7 +37068,7 @@ function BlockRow({
|
|
|
36735
37068
|
}
|
|
36736
37069
|
);
|
|
36737
37070
|
}
|
|
36738
|
-
var TOOLBAR_ENTRIES,
|
|
37071
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
36739
37072
|
var init_RichBlockEditor = __esm({
|
|
36740
37073
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
36741
37074
|
"use client";
|
|
@@ -36748,29 +37081,30 @@ var init_RichBlockEditor = __esm({
|
|
|
36748
37081
|
init_Input();
|
|
36749
37082
|
init_Icon();
|
|
36750
37083
|
init_useEventBus();
|
|
37084
|
+
init_useTranslate();
|
|
36751
37085
|
TOOLBAR_ENTRIES = [
|
|
36752
|
-
{ type: "paragraph",
|
|
36753
|
-
{ type: "heading-1",
|
|
36754
|
-
{ type: "heading-2",
|
|
36755
|
-
{ type: "heading-3",
|
|
36756
|
-
{ type: "bullet-list",
|
|
36757
|
-
{ type: "numbered-list",
|
|
36758
|
-
{ type: "quote",
|
|
36759
|
-
{ type: "code",
|
|
36760
|
-
{ type: "divider",
|
|
36761
|
-
{ type: "image",
|
|
37086
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
37087
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
37088
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: Heading2 },
|
|
37089
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: Heading3 },
|
|
37090
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: List },
|
|
37091
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: ListOrdered },
|
|
37092
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: Quote },
|
|
37093
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: Code },
|
|
37094
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: Minus },
|
|
37095
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: Image$1 }
|
|
36762
37096
|
];
|
|
36763
|
-
|
|
36764
|
-
paragraph: "
|
|
36765
|
-
"heading-1": "
|
|
36766
|
-
"heading-2": "
|
|
36767
|
-
"heading-3": "
|
|
36768
|
-
"bullet-list": "
|
|
36769
|
-
"numbered-list": "
|
|
36770
|
-
quote: "
|
|
36771
|
-
code: "
|
|
36772
|
-
divider: "
|
|
36773
|
-
image: "
|
|
37097
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
37098
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
37099
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
37100
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
37101
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
37102
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
37103
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
37104
|
+
quote: "richBlockEditor.blockType.quote",
|
|
37105
|
+
code: "richBlockEditor.blockType.code",
|
|
37106
|
+
divider: "richBlockEditor.blockType.divider",
|
|
37107
|
+
image: "richBlockEditor.blockType.image"
|
|
36774
37108
|
};
|
|
36775
37109
|
CHANGEABLE_TYPES = [
|
|
36776
37110
|
"paragraph",
|
|
@@ -36804,6 +37138,7 @@ var init_RichBlockEditor = __esm({
|
|
|
36804
37138
|
showToolbar = true,
|
|
36805
37139
|
className
|
|
36806
37140
|
}) => {
|
|
37141
|
+
const { t } = useTranslate();
|
|
36807
37142
|
const [blocks, setBlocks] = useState(
|
|
36808
37143
|
() => normalizeBlocks(initialBlocks)
|
|
36809
37144
|
);
|
|
@@ -36875,25 +37210,26 @@ var init_RichBlockEditor = __esm({
|
|
|
36875
37210
|
Box,
|
|
36876
37211
|
{
|
|
36877
37212
|
role: "toolbar",
|
|
36878
|
-
"aria-label": "
|
|
37213
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
36879
37214
|
className: cn(
|
|
36880
37215
|
"flex flex-wrap items-center gap-1",
|
|
36881
37216
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
36882
37217
|
),
|
|
36883
37218
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
36884
37219
|
const Icon3 = entry.icon;
|
|
37220
|
+
const entryLabel = t(entry.labelKey);
|
|
36885
37221
|
return /* @__PURE__ */ jsxs(
|
|
36886
37222
|
Button,
|
|
36887
37223
|
{
|
|
36888
37224
|
type: "button",
|
|
36889
37225
|
variant: "ghost",
|
|
36890
37226
|
size: "sm",
|
|
36891
|
-
"aria-label":
|
|
36892
|
-
title:
|
|
37227
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
37228
|
+
title: entryLabel,
|
|
36893
37229
|
onClick: () => handleAppend(entry.type),
|
|
36894
37230
|
children: [
|
|
36895
37231
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
36896
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
37232
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
36897
37233
|
]
|
|
36898
37234
|
},
|
|
36899
37235
|
entry.type
|
|
@@ -36936,6 +37272,7 @@ var init_ReplyTree = __esm({
|
|
|
36936
37272
|
"use client";
|
|
36937
37273
|
init_cn();
|
|
36938
37274
|
init_useEventBus();
|
|
37275
|
+
init_useTranslate();
|
|
36939
37276
|
init_atoms2();
|
|
36940
37277
|
init_VoteStack();
|
|
36941
37278
|
ReplyTreeNode = ({
|
|
@@ -36955,6 +37292,7 @@ var init_ReplyTree = __esm({
|
|
|
36955
37292
|
showActions
|
|
36956
37293
|
}) => {
|
|
36957
37294
|
const eventBus = useEventBus();
|
|
37295
|
+
const { t } = useTranslate();
|
|
36958
37296
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
36959
37297
|
const isCollapsed = collapsedSet.has(node.id);
|
|
36960
37298
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -37001,7 +37339,7 @@ var init_ReplyTree = __esm({
|
|
|
37001
37339
|
variant: "ghost",
|
|
37002
37340
|
size: "sm",
|
|
37003
37341
|
onClick: handleToggle,
|
|
37004
|
-
"aria-label": isCollapsed ? "
|
|
37342
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
37005
37343
|
"aria-expanded": !isCollapsed,
|
|
37006
37344
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
37007
37345
|
className: cn(
|
|
@@ -37042,7 +37380,7 @@ var init_ReplyTree = __esm({
|
|
|
37042
37380
|
onVote: handleVote,
|
|
37043
37381
|
size: "sm",
|
|
37044
37382
|
variant: "horizontal",
|
|
37045
|
-
label:
|
|
37383
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
37046
37384
|
}
|
|
37047
37385
|
),
|
|
37048
37386
|
/* @__PURE__ */ jsx(
|
|
@@ -37052,8 +37390,8 @@ var init_ReplyTree = __esm({
|
|
|
37052
37390
|
size: "sm",
|
|
37053
37391
|
leftIcon: "message-square",
|
|
37054
37392
|
onClick: handleReply,
|
|
37055
|
-
"aria-label":
|
|
37056
|
-
children: "
|
|
37393
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
37394
|
+
children: t("replyTree.reply")
|
|
37057
37395
|
}
|
|
37058
37396
|
),
|
|
37059
37397
|
/* @__PURE__ */ jsx(
|
|
@@ -37063,8 +37401,8 @@ var init_ReplyTree = __esm({
|
|
|
37063
37401
|
size: "sm",
|
|
37064
37402
|
leftIcon: "flag",
|
|
37065
37403
|
onClick: handleFlag,
|
|
37066
|
-
"aria-label":
|
|
37067
|
-
children: "
|
|
37404
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
37405
|
+
children: t("replyTree.flag")
|
|
37068
37406
|
}
|
|
37069
37407
|
)
|
|
37070
37408
|
] }),
|
|
@@ -37075,9 +37413,9 @@ var init_ReplyTree = __esm({
|
|
|
37075
37413
|
inputType: "textarea",
|
|
37076
37414
|
rows: 2,
|
|
37077
37415
|
value: draft,
|
|
37078
|
-
placeholder:
|
|
37416
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
37079
37417
|
onChange: (e) => setDraft(e.target.value),
|
|
37080
|
-
"aria-label":
|
|
37418
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
37081
37419
|
}
|
|
37082
37420
|
),
|
|
37083
37421
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -37089,10 +37427,10 @@ var init_ReplyTree = __esm({
|
|
|
37089
37427
|
leftIcon: "send",
|
|
37090
37428
|
onClick: handleSubmitReply,
|
|
37091
37429
|
disabled: !draft.trim(),
|
|
37092
|
-
children: "
|
|
37430
|
+
children: t("replyTree.send")
|
|
37093
37431
|
}
|
|
37094
37432
|
),
|
|
37095
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
37433
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
37096
37434
|
] })
|
|
37097
37435
|
] }),
|
|
37098
37436
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -37106,7 +37444,7 @@ var init_ReplyTree = __esm({
|
|
|
37106
37444
|
"self-start gap-1 px-0 h-auto",
|
|
37107
37445
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
37108
37446
|
),
|
|
37109
|
-
children: "
|
|
37447
|
+
children: t("replyTree.continueThread")
|
|
37110
37448
|
}
|
|
37111
37449
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
37112
37450
|
ReplyTreeNode,
|
|
@@ -37145,6 +37483,7 @@ var init_ReplyTree = __esm({
|
|
|
37145
37483
|
showActions = true,
|
|
37146
37484
|
className
|
|
37147
37485
|
}) => {
|
|
37486
|
+
const { t } = useTranslate();
|
|
37148
37487
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
37149
37488
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
37150
37489
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -37163,7 +37502,7 @@ var init_ReplyTree = __esm({
|
|
|
37163
37502
|
});
|
|
37164
37503
|
}, []);
|
|
37165
37504
|
if (nodeList.length === 0) {
|
|
37166
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
37505
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
37167
37506
|
}
|
|
37168
37507
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
37169
37508
|
ReplyTreeNode,
|
|
@@ -37241,6 +37580,7 @@ var init_VersionDiff = __esm({
|
|
|
37241
37580
|
"use client";
|
|
37242
37581
|
init_cn();
|
|
37243
37582
|
init_useEventBus();
|
|
37583
|
+
init_useTranslate();
|
|
37244
37584
|
init_atoms2();
|
|
37245
37585
|
init_Stack();
|
|
37246
37586
|
INLINE_STYLES = {
|
|
@@ -37263,6 +37603,7 @@ var init_VersionDiff = __esm({
|
|
|
37263
37603
|
language,
|
|
37264
37604
|
className
|
|
37265
37605
|
}) => {
|
|
37606
|
+
const { t } = useTranslate();
|
|
37266
37607
|
const eventBus = useEventBus();
|
|
37267
37608
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
37268
37609
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -37344,24 +37685,24 @@ var init_VersionDiff = __esm({
|
|
|
37344
37685
|
children: [
|
|
37345
37686
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
37346
37687
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
37347
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
37688
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
37348
37689
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
37349
37690
|
Select,
|
|
37350
37691
|
{
|
|
37351
37692
|
options,
|
|
37352
37693
|
value: activeBeforeId,
|
|
37353
37694
|
onChange: handleBeforeChange,
|
|
37354
|
-
"aria-label": "
|
|
37695
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
37355
37696
|
}
|
|
37356
37697
|
) }),
|
|
37357
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
37698
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
37358
37699
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
37359
37700
|
Select,
|
|
37360
37701
|
{
|
|
37361
37702
|
options,
|
|
37362
37703
|
value: activeAfterId,
|
|
37363
37704
|
onChange: handleAfterChange,
|
|
37364
|
-
"aria-label": "
|
|
37705
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
37365
37706
|
}
|
|
37366
37707
|
) }),
|
|
37367
37708
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -37382,7 +37723,7 @@ var init_VersionDiff = __esm({
|
|
|
37382
37723
|
size: "sm",
|
|
37383
37724
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
37384
37725
|
onClick: handleViewToggle,
|
|
37385
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
37726
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
37386
37727
|
}
|
|
37387
37728
|
),
|
|
37388
37729
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -37392,7 +37733,7 @@ var init_VersionDiff = __esm({
|
|
|
37392
37733
|
size: "sm",
|
|
37393
37734
|
icon: "rotate-ccw",
|
|
37394
37735
|
onClick: handleRevert,
|
|
37395
|
-
children: "
|
|
37736
|
+
children: t("versionDiff.revert")
|
|
37396
37737
|
}
|
|
37397
37738
|
)
|
|
37398
37739
|
] })
|
|
@@ -37409,12 +37750,12 @@ var init_VersionDiff = __esm({
|
|
|
37409
37750
|
children: [
|
|
37410
37751
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
37411
37752
|
beforeRev?.label,
|
|
37412
|
-
beforeRev?.author ?
|
|
37753
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
37413
37754
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
37414
37755
|
] }),
|
|
37415
37756
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
37416
37757
|
afterRev?.label,
|
|
37417
|
-
afterRev?.author ?
|
|
37758
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
37418
37759
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
37419
37760
|
] })
|
|
37420
37761
|
]
|
|
@@ -37807,10 +38148,12 @@ var init_DocPagination = __esm({
|
|
|
37807
38148
|
}
|
|
37808
38149
|
});
|
|
37809
38150
|
function DocSearch({
|
|
37810
|
-
placeholder
|
|
38151
|
+
placeholder,
|
|
37811
38152
|
onSearch,
|
|
37812
38153
|
className
|
|
37813
38154
|
}) {
|
|
38155
|
+
const { t } = useTranslate();
|
|
38156
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
37814
38157
|
const [query, setQuery] = useState("");
|
|
37815
38158
|
const [results, setResults] = useState([]);
|
|
37816
38159
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -37917,7 +38260,7 @@ function DocSearch({
|
|
|
37917
38260
|
Input,
|
|
37918
38261
|
{
|
|
37919
38262
|
inputType: "search",
|
|
37920
|
-
placeholder,
|
|
38263
|
+
placeholder: resolvedPlaceholder,
|
|
37921
38264
|
value: query,
|
|
37922
38265
|
onChange: handleChange,
|
|
37923
38266
|
onFocus: handleFocus,
|
|
@@ -37982,6 +38325,7 @@ var init_DocSearch = __esm({
|
|
|
37982
38325
|
init_Typography();
|
|
37983
38326
|
init_Icon();
|
|
37984
38327
|
init_Input();
|
|
38328
|
+
init_useTranslate();
|
|
37985
38329
|
}
|
|
37986
38330
|
});
|
|
37987
38331
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -39577,8 +39921,8 @@ var init_SignaturePad = __esm({
|
|
|
39577
39921
|
init_useEventBus();
|
|
39578
39922
|
init_useTranslate();
|
|
39579
39923
|
SignaturePad = ({
|
|
39580
|
-
label
|
|
39581
|
-
helperText
|
|
39924
|
+
label,
|
|
39925
|
+
helperText,
|
|
39582
39926
|
strokeColor,
|
|
39583
39927
|
strokeWidth = 2,
|
|
39584
39928
|
height = 200,
|
|
@@ -39594,6 +39938,8 @@ var init_SignaturePad = __esm({
|
|
|
39594
39938
|
}) => {
|
|
39595
39939
|
const eventBus = useEventBus();
|
|
39596
39940
|
const { t } = useTranslate();
|
|
39941
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
39942
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
39597
39943
|
const canvasRef = useRef(null);
|
|
39598
39944
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
39599
39945
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -39696,7 +40042,7 @@ var init_SignaturePad = __esm({
|
|
|
39696
40042
|
);
|
|
39697
40043
|
}
|
|
39698
40044
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
39699
|
-
|
|
40045
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
39700
40046
|
/* @__PURE__ */ jsx(
|
|
39701
40047
|
Box,
|
|
39702
40048
|
{
|
|
@@ -39725,7 +40071,7 @@ var init_SignaturePad = __esm({
|
|
|
39725
40071
|
)
|
|
39726
40072
|
}
|
|
39727
40073
|
),
|
|
39728
|
-
|
|
40074
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
39729
40075
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
39730
40076
|
/* @__PURE__ */ jsx(
|
|
39731
40077
|
Button,
|
|
@@ -39735,7 +40081,7 @@ var init_SignaturePad = __esm({
|
|
|
39735
40081
|
icon: Eraser,
|
|
39736
40082
|
onClick: clearSignature,
|
|
39737
40083
|
disabled: !hasSignature,
|
|
39738
|
-
children: "
|
|
40084
|
+
children: t("signaturePad.clear")
|
|
39739
40085
|
}
|
|
39740
40086
|
),
|
|
39741
40087
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -39746,7 +40092,7 @@ var init_SignaturePad = __esm({
|
|
|
39746
40092
|
icon: Check,
|
|
39747
40093
|
onClick: confirmSignature,
|
|
39748
40094
|
disabled: !hasSignature,
|
|
39749
|
-
children: "
|
|
40095
|
+
children: t("signaturePad.confirm")
|
|
39750
40096
|
}
|
|
39751
40097
|
)
|
|
39752
40098
|
] })
|
|
@@ -44191,6 +44537,7 @@ function MasterDetail({
|
|
|
44191
44537
|
className,
|
|
44192
44538
|
...rest
|
|
44193
44539
|
}) {
|
|
44540
|
+
const { t } = useTranslate();
|
|
44194
44541
|
const loading = externalLoading ?? false;
|
|
44195
44542
|
const isLoading = externalIsLoading ?? false;
|
|
44196
44543
|
const error = externalError ?? null;
|
|
@@ -44203,8 +44550,8 @@ function MasterDetail({
|
|
|
44203
44550
|
isLoading: loading || isLoading,
|
|
44204
44551
|
error,
|
|
44205
44552
|
className,
|
|
44206
|
-
emptyTitle: "
|
|
44207
|
-
emptyDescription: "
|
|
44553
|
+
emptyTitle: t("table.empty.title"),
|
|
44554
|
+
emptyDescription: t("empty.createFirst"),
|
|
44208
44555
|
...rest
|
|
44209
44556
|
}
|
|
44210
44557
|
);
|
|
@@ -44213,6 +44560,7 @@ var init_MasterDetail = __esm({
|
|
|
44213
44560
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
44214
44561
|
"use client";
|
|
44215
44562
|
init_DataTable();
|
|
44563
|
+
init_useTranslate();
|
|
44216
44564
|
MasterDetail.displayName = "MasterDetail";
|
|
44217
44565
|
}
|
|
44218
44566
|
});
|
|
@@ -44221,14 +44569,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
44221
44569
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
44222
44570
|
init_cn();
|
|
44223
44571
|
init_Typography();
|
|
44224
|
-
|
|
44225
|
-
|
|
44226
|
-
{
|
|
44227
|
-
|
|
44228
|
-
|
|
44229
|
-
|
|
44230
|
-
|
|
44231
|
-
|
|
44572
|
+
init_useTranslate();
|
|
44573
|
+
DefaultEmptyDetail = () => {
|
|
44574
|
+
const { t } = useTranslate();
|
|
44575
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
44576
|
+
Typography,
|
|
44577
|
+
{
|
|
44578
|
+
variant: "body2",
|
|
44579
|
+
className: "text-muted-foreground",
|
|
44580
|
+
children: t("masterDetail.selectItem")
|
|
44581
|
+
}
|
|
44582
|
+
) });
|
|
44583
|
+
};
|
|
44232
44584
|
MasterDetailLayout = ({
|
|
44233
44585
|
master,
|
|
44234
44586
|
detail,
|
|
@@ -44355,7 +44707,7 @@ var init_MediaGallery = __esm({
|
|
|
44355
44707
|
{
|
|
44356
44708
|
icon: Image$1,
|
|
44357
44709
|
title: t("display.noMedia"),
|
|
44358
|
-
description: "
|
|
44710
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
44359
44711
|
className
|
|
44360
44712
|
}
|
|
44361
44713
|
);
|
|
@@ -44372,7 +44724,7 @@ var init_MediaGallery = __esm({
|
|
|
44372
44724
|
size: "sm",
|
|
44373
44725
|
icon: Upload,
|
|
44374
44726
|
action: "MEDIA_UPLOAD",
|
|
44375
|
-
children: "
|
|
44727
|
+
children: t("mediaGallery.upload")
|
|
44376
44728
|
}
|
|
44377
44729
|
),
|
|
44378
44730
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -44386,10 +44738,7 @@ var init_MediaGallery = __esm({
|
|
|
44386
44738
|
))
|
|
44387
44739
|
] })
|
|
44388
44740
|
] }),
|
|
44389
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
44390
|
-
selectedItems.length,
|
|
44391
|
-
" selected"
|
|
44392
|
-
] }) }),
|
|
44741
|
+
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */ jsx(Badge, { variant: "info", children: t("table.bulk.selected", { count: selectedItems.length }) }) }),
|
|
44393
44742
|
/* @__PURE__ */ jsx(
|
|
44394
44743
|
Box,
|
|
44395
44744
|
{
|
|
@@ -45263,7 +45612,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45263
45612
|
EmptyState,
|
|
45264
45613
|
{
|
|
45265
45614
|
title: t("debug.noActiveTraits"),
|
|
45266
|
-
description: "
|
|
45615
|
+
description: t("debug.traitsMountHint"),
|
|
45267
45616
|
className: "py-8"
|
|
45268
45617
|
}
|
|
45269
45618
|
);
|
|
@@ -45273,14 +45622,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45273
45622
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
45274
45623
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
45275
45624
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
45276
|
-
/* @__PURE__ */
|
|
45277
|
-
trait.transitionCount,
|
|
45278
|
-
" transitions"
|
|
45279
|
-
] })
|
|
45625
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
45280
45626
|
] }),
|
|
45281
45627
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
45282
45628
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45283
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45629
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
45284
45630
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
45285
45631
|
Badge,
|
|
45286
45632
|
{
|
|
@@ -45292,7 +45638,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45292
45638
|
)) })
|
|
45293
45639
|
] }),
|
|
45294
45640
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
45295
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45641
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
45296
45642
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
45297
45643
|
t2.from,
|
|
45298
45644
|
" \u2192 ",
|
|
@@ -45311,7 +45657,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45311
45657
|
] }, i)) })
|
|
45312
45658
|
] }),
|
|
45313
45659
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
45314
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45660
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
45315
45661
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
45316
45662
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
45317
45663
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -45417,7 +45763,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
45417
45763
|
EmptyState,
|
|
45418
45764
|
{
|
|
45419
45765
|
title: t("debug.noEntityData"),
|
|
45420
|
-
description: "
|
|
45766
|
+
description: t("debug.debugModeHint"),
|
|
45421
45767
|
className: "py-8"
|
|
45422
45768
|
}
|
|
45423
45769
|
);
|
|
@@ -45430,7 +45776,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
45430
45776
|
EmptyState,
|
|
45431
45777
|
{
|
|
45432
45778
|
title: t("debug.noEntities"),
|
|
45433
|
-
description: "
|
|
45779
|
+
description: t("debug.entitiesSpawnHint"),
|
|
45434
45780
|
className: "py-8"
|
|
45435
45781
|
}
|
|
45436
45782
|
);
|
|
@@ -45438,7 +45784,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
45438
45784
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
45439
45785
|
id: `singleton-${name}`,
|
|
45440
45786
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
45441
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
45787
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
45442
45788
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
45443
45789
|
] }),
|
|
45444
45790
|
content: /* @__PURE__ */ jsx("pre", { className: "text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-40", children: JSON.stringify(data, null, 2) })
|
|
@@ -45456,31 +45802,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
45456
45802
|
}));
|
|
45457
45803
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
45458
45804
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
45459
|
-
/* @__PURE__ */
|
|
45460
|
-
"Singletons (",
|
|
45461
|
-
singletonItems.length,
|
|
45462
|
-
")"
|
|
45463
|
-
] }),
|
|
45805
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
45464
45806
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
45465
45807
|
] }),
|
|
45466
45808
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
45467
|
-
/* @__PURE__ */
|
|
45468
|
-
"Runtime (",
|
|
45469
|
-
runtimeEntities.length,
|
|
45470
|
-
")"
|
|
45471
|
-
] }),
|
|
45809
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
45472
45810
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
45473
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
45474
|
-
"+",
|
|
45475
|
-
runtimeEntities.length - 20,
|
|
45476
|
-
" more entities"
|
|
45477
|
-
] })
|
|
45811
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
45478
45812
|
] }),
|
|
45479
45813
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
45480
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45814
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
45481
45815
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
45482
45816
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
45483
|
-
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
45817
|
+
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
45484
45818
|
] }, type)) })
|
|
45485
45819
|
] })
|
|
45486
45820
|
] });
|
|
@@ -45524,7 +45858,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
45524
45858
|
EmptyState,
|
|
45525
45859
|
{
|
|
45526
45860
|
title: t("debug.noEventsYet"),
|
|
45527
|
-
description: "
|
|
45861
|
+
description: t("debug.eventsExecuteHint"),
|
|
45528
45862
|
className: "py-8"
|
|
45529
45863
|
}
|
|
45530
45864
|
);
|
|
@@ -45535,17 +45869,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
45535
45869
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
45536
45870
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
45537
45871
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
45538
|
-
/* @__PURE__ */
|
|
45872
|
+
/* @__PURE__ */ jsx(
|
|
45539
45873
|
Button,
|
|
45540
45874
|
{
|
|
45541
45875
|
size: "sm",
|
|
45542
45876
|
variant: filter === "all" ? "primary" : "secondary",
|
|
45543
45877
|
onClick: () => setFilter("all"),
|
|
45544
|
-
children:
|
|
45545
|
-
"All (",
|
|
45546
|
-
events2.length,
|
|
45547
|
-
")"
|
|
45548
|
-
]
|
|
45878
|
+
children: t("debug.allCount", { count: events2.length })
|
|
45549
45879
|
}
|
|
45550
45880
|
),
|
|
45551
45881
|
eventTypes.map((type) => {
|
|
@@ -45575,7 +45905,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
45575
45905
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
45576
45906
|
}
|
|
45577
45907
|
),
|
|
45578
|
-
"
|
|
45908
|
+
t("debug.autoScroll")
|
|
45579
45909
|
] })
|
|
45580
45910
|
] }),
|
|
45581
45911
|
/* @__PURE__ */ jsx(
|
|
@@ -45633,7 +45963,7 @@ function GuardsPanel({ guards }) {
|
|
|
45633
45963
|
EmptyState,
|
|
45634
45964
|
{
|
|
45635
45965
|
title: t("debug.noGuardEvaluations"),
|
|
45636
|
-
description: "
|
|
45966
|
+
description: t("debug.guardEvaluationsHint"),
|
|
45637
45967
|
className: "py-8"
|
|
45638
45968
|
}
|
|
45639
45969
|
);
|
|
@@ -45664,15 +45994,15 @@ function GuardsPanel({ guards }) {
|
|
|
45664
45994
|
] }),
|
|
45665
45995
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
45666
45996
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45667
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
45997
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
45668
45998
|
/* @__PURE__ */ jsx("code", { className: "block mt-1 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 px-2 py-1 rounded", children: guard.expression })
|
|
45669
45999
|
] }),
|
|
45670
46000
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45671
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
46001
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
45672
46002
|
/* @__PURE__ */ jsx("pre", { className: "mt-1 text-xs text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 p-2 rounded overflow-auto max-h-24", children: JSON.stringify(guard.inputs, null, 2) })
|
|
45673
46003
|
] }),
|
|
45674
46004
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45675
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
46005
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
45676
46006
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
45677
46007
|
] })
|
|
45678
46008
|
] })
|
|
@@ -45690,9 +46020,9 @@ function GuardsPanel({ guards }) {
|
|
|
45690
46020
|
] })
|
|
45691
46021
|
] }),
|
|
45692
46022
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
45693
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
45694
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
45695
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
46023
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
46024
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
46025
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
45696
46026
|
] })
|
|
45697
46027
|
] }),
|
|
45698
46028
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -45818,7 +46148,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
45818
46148
|
EmptyState,
|
|
45819
46149
|
{
|
|
45820
46150
|
title: t("debug.noTransitionsRecorded"),
|
|
45821
|
-
description: "
|
|
46151
|
+
description: t("debug.transitionsProcessHint"),
|
|
45822
46152
|
className: "py-8"
|
|
45823
46153
|
}
|
|
45824
46154
|
);
|
|
@@ -45835,10 +46165,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
45835
46165
|
const sorted = [...transitions].reverse();
|
|
45836
46166
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
45837
46167
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
45838
|
-
/* @__PURE__ */
|
|
45839
|
-
transitions.length,
|
|
45840
|
-
" transitions recorded"
|
|
45841
|
-
] }),
|
|
46168
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
45842
46169
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
45843
46170
|
/* @__PURE__ */ jsx(
|
|
45844
46171
|
Checkbox,
|
|
@@ -45847,7 +46174,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
45847
46174
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
45848
46175
|
}
|
|
45849
46176
|
),
|
|
45850
|
-
"
|
|
46177
|
+
t("debug.autoScroll")
|
|
45851
46178
|
] })
|
|
45852
46179
|
] }),
|
|
45853
46180
|
/* @__PURE__ */ jsx(
|
|
@@ -45890,15 +46217,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
45890
46217
|
variant: trace.guardResult ? "success" : "danger",
|
|
45891
46218
|
size: "sm",
|
|
45892
46219
|
children: [
|
|
45893
|
-
"
|
|
46220
|
+
t("debug.guardLabel"),
|
|
46221
|
+
" ",
|
|
45894
46222
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
45895
46223
|
]
|
|
45896
46224
|
}
|
|
45897
46225
|
),
|
|
45898
|
-
/* @__PURE__ */
|
|
45899
|
-
trace.effects.length,
|
|
45900
|
-
" effects"
|
|
45901
|
-
] })
|
|
46226
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
45902
46227
|
] }),
|
|
45903
46228
|
isExpanded && trace.effects.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-2 mt-1 mb-2 pl-2 border-l border-gray-200 dark:border-gray-700 space-y-1", children: trace.effects.map((effect, eIdx) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
45904
46229
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -45947,13 +46272,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
45947
46272
|
EmptyState,
|
|
45948
46273
|
{
|
|
45949
46274
|
title: t("debug.noBridgeData"),
|
|
45950
|
-
description: "
|
|
46275
|
+
description: t("debug.bridgeInitHint"),
|
|
45951
46276
|
className: "py-8"
|
|
45952
46277
|
}
|
|
45953
46278
|
);
|
|
45954
46279
|
}
|
|
45955
46280
|
const formatTime4 = (ts) => {
|
|
45956
|
-
if (ts === 0) return "
|
|
46281
|
+
if (ts === 0) return t("debug.never");
|
|
45957
46282
|
const d = new Date(ts);
|
|
45958
46283
|
return d.toLocaleTimeString("en-US", {
|
|
45959
46284
|
hour12: false,
|
|
@@ -45966,14 +46291,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
45966
46291
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
45967
46292
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
45968
46293
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
45969
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
46294
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
45970
46295
|
] }),
|
|
45971
46296
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
45972
46297
|
/* @__PURE__ */ jsx(
|
|
45973
46298
|
StatRow,
|
|
45974
46299
|
{
|
|
45975
46300
|
label: t("debug.status"),
|
|
45976
|
-
value: bridge.connected ? "
|
|
46301
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
45977
46302
|
variant: bridge.connected ? "success" : "danger"
|
|
45978
46303
|
}
|
|
45979
46304
|
),
|
|
@@ -46001,13 +46326,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
46001
46326
|
] })
|
|
46002
46327
|
] }),
|
|
46003
46328
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
46004
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
46329
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
46005
46330
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
46006
46331
|
] }),
|
|
46007
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
46008
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
46009
|
-
" total events processed"
|
|
46010
|
-
] }) })
|
|
46332
|
+
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400", children: t("debug.totalEventsProcessed", { count: bridge.eventsForwarded + bridge.eventsReceived }) }) })
|
|
46011
46333
|
] }) });
|
|
46012
46334
|
}
|
|
46013
46335
|
var init_ServerBridgeTab = __esm({
|
|
@@ -46117,7 +46439,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46117
46439
|
EmptyState,
|
|
46118
46440
|
{
|
|
46119
46441
|
title: t("debug.noActiveTraits"),
|
|
46120
|
-
description: "
|
|
46442
|
+
description: t("debug.traitsInitHint"),
|
|
46121
46443
|
className: "py-8"
|
|
46122
46444
|
}
|
|
46123
46445
|
);
|
|
@@ -46134,7 +46456,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46134
46456
|
};
|
|
46135
46457
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
46136
46458
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
46137
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46459
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
46138
46460
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
46139
46461
|
trait.name,
|
|
46140
46462
|
": ",
|
|
@@ -46142,8 +46464,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46142
46464
|
] }, trait.id)) })
|
|
46143
46465
|
] }),
|
|
46144
46466
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
46145
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46146
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
46467
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
46468
|
+
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: t("debug.noTransitionsFromState") }) : /* @__PURE__ */ jsx(Stack, { gap: "xs", children: availableEvents.map(({ event, transitions }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
46147
46469
|
/* @__PURE__ */ jsx(
|
|
46148
46470
|
Button,
|
|
46149
46471
|
{
|
|
@@ -46155,15 +46477,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46155
46477
|
}
|
|
46156
46478
|
),
|
|
46157
46479
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
46158
|
-
transitions.some((
|
|
46480
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
46159
46481
|
] }, event)) })
|
|
46160
46482
|
] }),
|
|
46161
46483
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
46162
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46484
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
46163
46485
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
|
|
46164
46486
|
] }),
|
|
46165
46487
|
log16.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
46166
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46488
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
46167
46489
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log16.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
46168
46490
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
46169
46491
|
" ",
|
|
@@ -46194,21 +46516,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
46194
46516
|
}
|
|
46195
46517
|
});
|
|
46196
46518
|
function ServerResponseRow({ sr }) {
|
|
46519
|
+
const { t } = useTranslate();
|
|
46197
46520
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
46198
46521
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
46199
46522
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
46200
46523
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
46201
46524
|
sr.success ? "\u2713" : "\u2717",
|
|
46202
|
-
"
|
|
46525
|
+
" ",
|
|
46526
|
+
t("debug.server")
|
|
46203
46527
|
] }),
|
|
46204
46528
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
46205
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
46206
|
-
sr.clientEffects,
|
|
46207
|
-
" clientEffect",
|
|
46208
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
46209
|
-
] }),
|
|
46529
|
+
sr.clientEffects > 0 && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-purple-500/15 text-purple-600 dark:text-purple-300", children: t("debug.clientEffectsCount", { count: sr.clientEffects }) }),
|
|
46210
46530
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
46211
|
-
"
|
|
46531
|
+
t("debug.emitLabel"),
|
|
46532
|
+
" ",
|
|
46212
46533
|
sr.emittedEvents.join(", ")
|
|
46213
46534
|
] }),
|
|
46214
46535
|
sr.error && /* @__PURE__ */ jsx("span", { className: "px-1 rounded bg-red-500/15 text-red-600 dark:text-red-400 truncate max-w-[300px]", children: sr.error })
|
|
@@ -46216,13 +46537,12 @@ function ServerResponseRow({ sr }) {
|
|
|
46216
46537
|
entityEntries.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-0.5", children: entityEntries.map(([name, count]) => /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-[var(--color-card)] text-foreground", children: [
|
|
46217
46538
|
name,
|
|
46218
46539
|
": ",
|
|
46219
|
-
count
|
|
46220
|
-
" row",
|
|
46221
|
-
count !== 1 ? "s" : ""
|
|
46540
|
+
t("debug.rowsCount", { count })
|
|
46222
46541
|
] }, name)) })
|
|
46223
46542
|
] });
|
|
46224
46543
|
}
|
|
46225
46544
|
function TransitionRow({ trace }) {
|
|
46545
|
+
const { t } = useTranslate();
|
|
46226
46546
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
46227
46547
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
46228
46548
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -46230,7 +46550,7 @@ function TransitionRow({ trace }) {
|
|
|
46230
46550
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
46231
46551
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
46232
46552
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
46233
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
46553
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
46234
46554
|
] }),
|
|
46235
46555
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
46236
46556
|
] });
|
|
@@ -46271,6 +46591,7 @@ function VerifyModePanel({
|
|
|
46271
46591
|
serverCount,
|
|
46272
46592
|
localCount
|
|
46273
46593
|
}) {
|
|
46594
|
+
const { t } = useTranslate();
|
|
46274
46595
|
const [expanded, setExpanded] = React97.useState(true);
|
|
46275
46596
|
const scrollRef = React97.useRef(null);
|
|
46276
46597
|
const prevCountRef = React97.useRef(0);
|
|
@@ -46301,30 +46622,20 @@ function VerifyModePanel({
|
|
|
46301
46622
|
onClick: () => setExpanded((v) => !v),
|
|
46302
46623
|
className: "px-3 py-1.5 flex items-center gap-3 text-xs font-mono border-b border-border flex-shrink-0 w-full text-left hover:bg-[var(--color-card-hover,transparent)] cursor-pointer",
|
|
46303
46624
|
"aria-expanded": expanded,
|
|
46304
|
-
"aria-label": expanded ? "
|
|
46625
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
46305
46626
|
"data-testid": "debugger-verify-toggle",
|
|
46306
46627
|
children: [
|
|
46307
46628
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
46308
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
46309
|
-
/* @__PURE__ */
|
|
46310
|
-
|
|
46311
|
-
" local"
|
|
46312
|
-
] }),
|
|
46313
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
46314
|
-
serverCount,
|
|
46315
|
-
" server"
|
|
46316
|
-
] }),
|
|
46629
|
+
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
46630
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
46631
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
46317
46632
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
46318
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
46319
|
-
transitions.length,
|
|
46320
|
-
" transition",
|
|
46321
|
-
transitions.length !== 1 ? "s" : ""
|
|
46322
|
-
] })
|
|
46633
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
46323
46634
|
]
|
|
46324
46635
|
}
|
|
46325
46636
|
),
|
|
46326
46637
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
46327
|
-
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: "
|
|
46638
|
+
/* @__PURE__ */ jsx("div", { ref: scrollRef, className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "px-2 py-1", children: transitions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-foreground/50 text-xs font-mono py-2 text-center", children: t("debug.waitingForTransitions") }) : /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: transitions.map((trace) => /* @__PURE__ */ jsx(TransitionRow, { trace }, trace.id)) }) }) }),
|
|
46328
46639
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
46329
46640
|
] })
|
|
46330
46641
|
]
|
|
@@ -46340,6 +46651,7 @@ function RuntimeDebugger({
|
|
|
46340
46651
|
defaultTab,
|
|
46341
46652
|
schema
|
|
46342
46653
|
}) {
|
|
46654
|
+
const { t } = useTranslate();
|
|
46343
46655
|
const [isCollapsed, setIsCollapsed] = React97.useState(mode === "verify" ? true : defaultCollapsed);
|
|
46344
46656
|
const [isVisible, setIsVisible] = React97.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
46345
46657
|
const debugData = useDebugData();
|
|
@@ -46378,55 +46690,55 @@ function RuntimeDebugger({
|
|
|
46378
46690
|
const tabItems = [
|
|
46379
46691
|
{
|
|
46380
46692
|
id: "dispatch",
|
|
46381
|
-
label: "
|
|
46693
|
+
label: t("debug.tabDispatch"),
|
|
46382
46694
|
badge: debugData.traits.length || void 0,
|
|
46383
46695
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
46384
46696
|
},
|
|
46385
46697
|
{
|
|
46386
46698
|
id: "verify",
|
|
46387
|
-
label: failedChecks > 0 ? "
|
|
46699
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
46388
46700
|
badge: verification.summary.totalChecks || void 0,
|
|
46389
46701
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
46390
46702
|
},
|
|
46391
46703
|
{
|
|
46392
46704
|
id: "timeline",
|
|
46393
|
-
label: "
|
|
46705
|
+
label: t("debug.tabTimeline"),
|
|
46394
46706
|
badge: verification.transitions.length || void 0,
|
|
46395
46707
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
46396
46708
|
},
|
|
46397
46709
|
{
|
|
46398
46710
|
id: "bridge",
|
|
46399
|
-
label: "
|
|
46711
|
+
label: t("debug.tabBridge"),
|
|
46400
46712
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
46401
46713
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
46402
46714
|
},
|
|
46403
46715
|
{
|
|
46404
46716
|
id: "traits",
|
|
46405
|
-
label: "
|
|
46717
|
+
label: t("debug.tabTraits"),
|
|
46406
46718
|
badge: debugData.traits.length || void 0,
|
|
46407
46719
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
46408
46720
|
},
|
|
46409
46721
|
{
|
|
46410
46722
|
id: "ticks",
|
|
46411
|
-
label: "
|
|
46412
|
-
badge: debugData.ticks.filter((
|
|
46723
|
+
label: t("debug.tabTicks"),
|
|
46724
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
46413
46725
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
46414
46726
|
},
|
|
46415
46727
|
{
|
|
46416
46728
|
id: "entities",
|
|
46417
|
-
label: "
|
|
46729
|
+
label: t("debug.tabEntities"),
|
|
46418
46730
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
46419
46731
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
46420
46732
|
},
|
|
46421
46733
|
{
|
|
46422
46734
|
id: "events",
|
|
46423
|
-
label: "
|
|
46735
|
+
label: t("debug.tabEvents"),
|
|
46424
46736
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
46425
46737
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
46426
46738
|
},
|
|
46427
46739
|
{
|
|
46428
46740
|
id: "guards",
|
|
46429
|
-
label: "
|
|
46741
|
+
label: t("debug.tabGuards"),
|
|
46430
46742
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
46431
46743
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
46432
46744
|
}
|
|
@@ -46454,15 +46766,10 @@ function RuntimeDebugger({
|
|
|
46454
46766
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
46455
46767
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
46456
46768
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
46457
|
-
"
|
|
46769
|
+
" ",
|
|
46770
|
+
t("debug.debugger")
|
|
46458
46771
|
] }),
|
|
46459
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
46460
|
-
failedChecks,
|
|
46461
|
-
" failed"
|
|
46462
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
46463
|
-
debugData.traits.length,
|
|
46464
|
-
" traits"
|
|
46465
|
-
] }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
46772
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.traitsCount", { count: debugData.traits.length }) }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.idle") })
|
|
46466
46773
|
] })
|
|
46467
46774
|
}
|
|
46468
46775
|
),
|
|
@@ -46480,9 +46787,9 @@ function RuntimeDebugger({
|
|
|
46480
46787
|
);
|
|
46481
46788
|
}
|
|
46482
46789
|
if (mode === "verify") {
|
|
46483
|
-
const traitStates = debugData.traits.map((
|
|
46484
|
-
const serverEntries = verification.transitions.filter((
|
|
46485
|
-
const localEntries = verification.transitions.filter((
|
|
46790
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
46791
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
46792
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
46486
46793
|
return /* @__PURE__ */ jsx(
|
|
46487
46794
|
VerifyModePanel,
|
|
46488
46795
|
{
|
|
@@ -46514,7 +46821,7 @@ function RuntimeDebugger({
|
|
|
46514
46821
|
variant: "secondary",
|
|
46515
46822
|
size: "sm",
|
|
46516
46823
|
className: "runtime-debugger__toggle",
|
|
46517
|
-
title: "
|
|
46824
|
+
title: t("debug.openDebugger"),
|
|
46518
46825
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
46519
46826
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
46520
46827
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -46524,11 +46831,8 @@ function RuntimeDebugger({
|
|
|
46524
46831
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
46525
46832
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
46526
46833
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
46527
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
46528
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
46529
|
-
failedChecks,
|
|
46530
|
-
" failed"
|
|
46531
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
46834
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
46835
|
+
failedChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "danger", size: "sm", children: t("debug.failedCount", { count: failedChecks }) }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: t("debug.allPassing") }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: t("debug.runtime") })
|
|
46532
46836
|
] }),
|
|
46533
46837
|
/* @__PURE__ */ jsx(
|
|
46534
46838
|
Button,
|
|
@@ -46536,7 +46840,7 @@ function RuntimeDebugger({
|
|
|
46536
46840
|
onClick: () => setIsCollapsed(true),
|
|
46537
46841
|
variant: "ghost",
|
|
46538
46842
|
size: "sm",
|
|
46539
|
-
title: "
|
|
46843
|
+
title: t("debug.close"),
|
|
46540
46844
|
children: "x"
|
|
46541
46845
|
}
|
|
46542
46846
|
)
|
|
@@ -46550,7 +46854,7 @@ function RuntimeDebugger({
|
|
|
46550
46854
|
className: "runtime-debugger__tabs"
|
|
46551
46855
|
}
|
|
46552
46856
|
) }),
|
|
46553
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
46857
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
46554
46858
|
] })
|
|
46555
46859
|
}
|
|
46556
46860
|
);
|
|
@@ -46576,6 +46880,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
46576
46880
|
init_TransitionTimeline();
|
|
46577
46881
|
init_ServerBridgeTab();
|
|
46578
46882
|
init_EventDispatcherTab();
|
|
46883
|
+
init_useTranslate();
|
|
46579
46884
|
init_RuntimeDebugger();
|
|
46580
46885
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
46581
46886
|
}
|
|
@@ -47864,7 +48169,7 @@ var init_StatCard = __esm({
|
|
|
47864
48169
|
}
|
|
47865
48170
|
);
|
|
47866
48171
|
}
|
|
47867
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
48172
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
47868
48173
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
47869
48174
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
47870
48175
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -47907,7 +48212,7 @@ var init_StatCard = __esm({
|
|
|
47907
48212
|
]
|
|
47908
48213
|
}
|
|
47909
48214
|
),
|
|
47910
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
48215
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
47911
48216
|
] }),
|
|
47912
48217
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
47913
48218
|
] }),
|
|
@@ -52112,6 +52417,9 @@ var AvlEmitListen = ({
|
|
|
52112
52417
|
] });
|
|
52113
52418
|
};
|
|
52114
52419
|
AvlEmitListen.displayName = "AvlEmitListen";
|
|
52420
|
+
|
|
52421
|
+
// components/avl/molecules/AvlSlotMap.tsx
|
|
52422
|
+
init_useTranslate();
|
|
52115
52423
|
var SLOT_PRESETS = {
|
|
52116
52424
|
header: { x: 10, y: 5, width: 340, height: 35 },
|
|
52117
52425
|
main: { x: 120, y: 50, width: 230, height: 195 },
|
|
@@ -52156,6 +52464,7 @@ var AvlSlotMap = ({
|
|
|
52156
52464
|
color = "var(--color-primary)",
|
|
52157
52465
|
animated = false
|
|
52158
52466
|
}) => {
|
|
52467
|
+
const { t } = useTranslate();
|
|
52159
52468
|
const ox = (600 - pageWidth) / 2;
|
|
52160
52469
|
const oy = (400 - pageHeight) / 2;
|
|
52161
52470
|
let unknownIdx = 0;
|
|
@@ -52206,7 +52515,7 @@ var AvlSlotMap = ({
|
|
|
52206
52515
|
fontSize: 10,
|
|
52207
52516
|
fontFamily: "inherit",
|
|
52208
52517
|
fontWeight: "bold",
|
|
52209
|
-
children: "
|
|
52518
|
+
children: t("avl.pageLayout")
|
|
52210
52519
|
}
|
|
52211
52520
|
),
|
|
52212
52521
|
resolvedSlots.map((slot) => {
|
|
@@ -52255,7 +52564,7 @@ var AvlSlotMap = ({
|
|
|
52255
52564
|
opacity: 0.6,
|
|
52256
52565
|
children: [
|
|
52257
52566
|
slot.name,
|
|
52258
|
-
isOverlay ?
|
|
52567
|
+
isOverlay ? ` ${t("avl.overlaySuffix")}` : ""
|
|
52259
52568
|
]
|
|
52260
52569
|
}
|
|
52261
52570
|
)
|
|
@@ -53187,23 +53496,25 @@ var SystemNode = ({ data }) => {
|
|
|
53187
53496
|
SystemNode.displayName = "SystemNode";
|
|
53188
53497
|
|
|
53189
53498
|
// components/avl/molecules/DetailView.tsx
|
|
53499
|
+
init_useTranslate();
|
|
53190
53500
|
init_AvlState();
|
|
53191
53501
|
init_AvlEffect();
|
|
53192
53502
|
init_types();
|
|
53193
53503
|
var DetailView = ({ data }) => {
|
|
53504
|
+
const { t } = useTranslate();
|
|
53194
53505
|
const traitName = data.traits[0]?.name;
|
|
53195
53506
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
53196
53507
|
if (!traitData || traitData.transitions.length === 0) {
|
|
53197
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border-2 border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: "
|
|
53508
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-lg border-2 border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("detailView.noTransitionData") });
|
|
53198
53509
|
}
|
|
53199
53510
|
const transition = traitData.transitions[0];
|
|
53200
53511
|
const fromState = traitData.states.find((s) => s.name === transition.from);
|
|
53201
53512
|
const toState = traitData.states.find((s) => s.name === transition.to);
|
|
53202
53513
|
const transitionCounts = {};
|
|
53203
53514
|
for (const s of traitData.states) transitionCounts[s.name] = 0;
|
|
53204
|
-
for (const
|
|
53205
|
-
transitionCounts[
|
|
53206
|
-
transitionCounts[
|
|
53515
|
+
for (const t2 of traitData.transitions) {
|
|
53516
|
+
transitionCounts[t2.from] = (transitionCounts[t2.from] ?? 0) + 1;
|
|
53517
|
+
transitionCounts[t2.to] = (transitionCounts[t2.to] ?? 0) + 1;
|
|
53207
53518
|
}
|
|
53208
53519
|
const maxTC = Math.max(...Object.values(transitionCounts), 0);
|
|
53209
53520
|
const fromRole = getStateRole(transition.from, fromState?.isInitial, fromState?.isTerminal, transitionCounts[transition.from] ?? 0, maxTC);
|
|
@@ -53220,21 +53531,21 @@ var DetailView = ({ data }) => {
|
|
|
53220
53531
|
] }) }),
|
|
53221
53532
|
/* @__PURE__ */ jsxs("div", { className: "px-4 py-3 space-y-3", children: [
|
|
53222
53533
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
53223
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: "
|
|
53534
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: t("avl.trigger") }),
|
|
53224
53535
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
53225
53536
|
/* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx(AvlEvent, { x: 8, y: 8, size: 7 }) }),
|
|
53226
53537
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[var(--color-foreground)]", children: transition.event })
|
|
53227
53538
|
] })
|
|
53228
53539
|
] }),
|
|
53229
53540
|
hasGuard && /* @__PURE__ */ jsxs("div", { children: [
|
|
53230
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: "
|
|
53541
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: t("avl.guard") }),
|
|
53231
53542
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
53232
53543
|
/* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 14 14", children: /* @__PURE__ */ jsx(AvlGuard, { x: 7, y: 7, size: 6 }) }),
|
|
53233
53544
|
/* @__PURE__ */ jsx("span", { className: "text-xs font-mono text-[var(--color-muted-foreground)] opacity-60", children: typeof transition.guard === "string" ? transition.guard : JSON.stringify(transition.guard) })
|
|
53234
53545
|
] })
|
|
53235
53546
|
] }),
|
|
53236
53547
|
transition.effects.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
53237
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: "
|
|
53548
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: t("avl.effects") }),
|
|
53238
53549
|
/* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: transition.effects.map((effect, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1.5", children: [
|
|
53239
53550
|
/* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--color-muted-foreground)] w-3 text-right mt-0.5", children: [
|
|
53240
53551
|
i + 1,
|
|
@@ -53270,6 +53581,7 @@ AvlOrbitalNode.displayName = "AvlOrbitalNode";
|
|
|
53270
53581
|
|
|
53271
53582
|
// components/avl/molecules/AvlTransitionEdge.tsx
|
|
53272
53583
|
init_types();
|
|
53584
|
+
init_useTranslate();
|
|
53273
53585
|
var AvlTransitionEdge = ({
|
|
53274
53586
|
id,
|
|
53275
53587
|
sourceX,
|
|
@@ -53282,6 +53594,7 @@ var AvlTransitionEdge = ({
|
|
|
53282
53594
|
markerEnd,
|
|
53283
53595
|
style
|
|
53284
53596
|
}) => {
|
|
53597
|
+
const { t } = useTranslate();
|
|
53285
53598
|
const [path, labelX, labelY] = getBezierPath({
|
|
53286
53599
|
sourceX,
|
|
53287
53600
|
sourceY,
|
|
@@ -53313,9 +53626,9 @@ var AvlTransitionEdge = ({
|
|
|
53313
53626
|
className: "absolute pointer-events-all nodrag nopan flex items-center gap-1",
|
|
53314
53627
|
style: { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)` },
|
|
53315
53628
|
children: [
|
|
53316
|
-
data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-amber-500 bg-amber-500/10 shrink-0", title: "
|
|
53629
|
+
data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-amber-500 bg-amber-500/10 shrink-0", title: t("avl.guard") }),
|
|
53317
53630
|
/* @__PURE__ */ jsx("div", { className: "px-2 py-0.5 text-xs font-medium rounded-full bg-[var(--color-card)] border border-[var(--color-border)] text-[var(--color-foreground)] truncate max-w-[160px]", children: data?.event ?? "" }),
|
|
53318
|
-
data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-violet-500/80 shrink-0", title: "
|
|
53631
|
+
data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-violet-500/80 shrink-0", title: t("avl.effects") })
|
|
53319
53632
|
]
|
|
53320
53633
|
}
|
|
53321
53634
|
) })
|
|
@@ -56636,6 +56949,7 @@ function BrowserPlayground({
|
|
|
56636
56949
|
|
|
56637
56950
|
// components/avl/molecules/OrbPreviewNode.tsx
|
|
56638
56951
|
init_useEventBus();
|
|
56952
|
+
init_useTranslate();
|
|
56639
56953
|
|
|
56640
56954
|
// components/avl/molecules/useCanvasDnd.tsx
|
|
56641
56955
|
init_useEventBus();
|
|
@@ -57123,6 +57437,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57123
57437
|
const screenSize = useContext(ScreenSizeContext);
|
|
57124
57438
|
const preset = SCREEN_SIZE_PRESETS[screenSize];
|
|
57125
57439
|
const { select } = useContext(PatternSelectionContext);
|
|
57440
|
+
const { t } = useTranslate();
|
|
57126
57441
|
const eventBus = useEventBus();
|
|
57127
57442
|
const reactFlow = useReactFlow();
|
|
57128
57443
|
const contentRef = useRef(null);
|
|
@@ -57143,7 +57458,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57143
57458
|
const isSuccess = status === "success";
|
|
57144
57459
|
const isError = status === "error";
|
|
57145
57460
|
const label = isImportedGroup ? data.behaviorAlias ?? "" : isExpanded ? `${data.transitionEvent ?? ""}` : data.orbitalName;
|
|
57146
|
-
const sublabel = isImportedGroup ? `${data.behaviorName ?? ""}${typeof data.transitionCount === "number" && data.transitionCount > 1 ? ` \xB7 ${data.transitionCount}
|
|
57461
|
+
const sublabel = isImportedGroup ? `${data.behaviorName ?? ""}${typeof data.transitionCount === "number" && data.transitionCount > 1 ? ` \xB7 ${t("orbPreview.screensCount", { count: data.transitionCount })}` : ""}` : isExpanded ? `${data.fromState ?? ""} \u2192 ${data.toState ?? ""}` : data.entityName ?? "";
|
|
57147
57462
|
const orbitalSchema = useMemo(() => {
|
|
57148
57463
|
const fullSchema = data._fullSchema;
|
|
57149
57464
|
if (!fullSchema) return void 0;
|
|
@@ -57311,7 +57626,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57311
57626
|
color: "var(--color-muted-foreground)",
|
|
57312
57627
|
zIndex: 3
|
|
57313
57628
|
},
|
|
57314
|
-
children: "
|
|
57629
|
+
children: t("orbPreview.previewBadge")
|
|
57315
57630
|
}
|
|
57316
57631
|
),
|
|
57317
57632
|
hovered && !dragActive && !l1IsOver && /* @__PURE__ */ jsx(
|
|
@@ -57333,7 +57648,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57333
57648
|
},
|
|
57334
57649
|
children: [
|
|
57335
57650
|
/* @__PURE__ */ jsx("span", { style: { fontSize: 12 }, children: "\u279E" }),
|
|
57336
|
-
"
|
|
57651
|
+
t("orbPreview.doubleClickToOpen")
|
|
57337
57652
|
]
|
|
57338
57653
|
}
|
|
57339
57654
|
)
|
|
@@ -57356,7 +57671,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57356
57671
|
color: "var(--color-primary-foreground)",
|
|
57357
57672
|
boxShadow: "var(--shadow-lg)"
|
|
57358
57673
|
},
|
|
57359
|
-
children: "
|
|
57674
|
+
children: t("orbPreview.dropToAddAndOpen")
|
|
57360
57675
|
}
|
|
57361
57676
|
)
|
|
57362
57677
|
}
|
|
@@ -57390,7 +57705,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57390
57705
|
borderTopColor: "transparent",
|
|
57391
57706
|
zIndex: 2
|
|
57392
57707
|
},
|
|
57393
|
-
title: "
|
|
57708
|
+
title: t("orbPreview.dispatching")
|
|
57394
57709
|
}
|
|
57395
57710
|
)
|
|
57396
57711
|
] }),
|
|
@@ -57486,7 +57801,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57486
57801
|
height: "auto"
|
|
57487
57802
|
}
|
|
57488
57803
|
) })
|
|
57489
|
-
) : /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center", style: { minHeight: preset.minHeight }, children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: "
|
|
57804
|
+
) : /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center", style: { minHeight: preset.minHeight }, children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: t("orbPreview.noPreview") }) })
|
|
57490
57805
|
]
|
|
57491
57806
|
}
|
|
57492
57807
|
),
|
|
@@ -58077,7 +58392,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58077
58392
|
const handleRemoveEffect = useCallback((effectIndex) => {
|
|
58078
58393
|
eventBus.emit("UI:REMOVE_EFFECT", { effectIndex });
|
|
58079
58394
|
}, [eventBus]);
|
|
58080
|
-
const headerTitle = selectedPattern ? selectedPattern.patternType : isExpanded ? transitionEvent || "
|
|
58395
|
+
const headerTitle = selectedPattern ? selectedPattern.patternType : isExpanded ? transitionEvent || t("avl.transition") : orbitalName;
|
|
58081
58396
|
return /* @__PURE__ */ jsxs(Box, { className: "flex flex-col bg-card border-l border-border h-full w-full sm:w-[340px]", children: [
|
|
58082
58397
|
/* @__PURE__ */ jsxs(Box, { className: "shrink-0 border-b border-border", children: [
|
|
58083
58398
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between px-4 py-2", children: [
|
|
@@ -58094,7 +58409,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58094
58409
|
{
|
|
58095
58410
|
onClick: onClose,
|
|
58096
58411
|
className: "text-muted-foreground hover:text-foreground text-sm cursor-pointer bg-transparent border-none p-1",
|
|
58097
|
-
"aria-label": "
|
|
58412
|
+
"aria-label": t("common.close"),
|
|
58098
58413
|
children: "\xD7"
|
|
58099
58414
|
}
|
|
58100
58415
|
)
|
|
@@ -58104,7 +58419,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58104
58419
|
{
|
|
58105
58420
|
onClick: () => setActiveTab(tab),
|
|
58106
58421
|
className: `pb-2 text-xs font-medium border-b-2 cursor-pointer bg-transparent border-x-0 border-t-0 px-0 capitalize ${activeTab === tab ? "border-[var(--color-primary)] text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"}`,
|
|
58107
|
-
children: tab
|
|
58422
|
+
children: t(`orbInspector.tab.${tab}`)
|
|
58108
58423
|
},
|
|
58109
58424
|
tab
|
|
58110
58425
|
)) })
|
|
@@ -58150,7 +58465,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58150
58465
|
/* ── Inspector Tab ── */
|
|
58151
58466
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58152
58467
|
selectedPattern && patternDef?.propsSchema && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58153
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58468
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.props") }),
|
|
58154
58469
|
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1.5", children: Object.entries(patternDef.propsSchema).slice(0, 12).map(([propName, propSchema]) => {
|
|
58155
58470
|
const ps = propSchema;
|
|
58156
58471
|
const explicitValue = patternConfig ? patternConfig[propName] : void 0;
|
|
@@ -58184,7 +58499,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58184
58499
|
}) })
|
|
58185
58500
|
] }),
|
|
58186
58501
|
userType === "architect" && (selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58187
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58502
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.entity") }),
|
|
58188
58503
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2 mb-2", children: [
|
|
58189
58504
|
/* @__PURE__ */ jsx("svg", { width: 14, height: 14, children: /* @__PURE__ */ jsx("circle", { cx: 7, cy: 7, r: 5, fill: "var(--color-primary)" }) }),
|
|
58190
58505
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-semibold text-xs", children: entity.name }),
|
|
@@ -58227,7 +58542,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58227
58542
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58228
58543
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-mono flex-1", children: f3.name }),
|
|
58229
58544
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: f3.type }),
|
|
58230
|
-
f3.required && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary text-[9px]", children: t("
|
|
58545
|
+
f3.required && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary text-[9px]", children: t("orbInspector.required") })
|
|
58231
58546
|
] })
|
|
58232
58547
|
] }, f3.name)) }),
|
|
58233
58548
|
editable && /* @__PURE__ */ jsxs(
|
|
@@ -58239,13 +58554,13 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58239
58554
|
className: "mt-2 text-xs w-full",
|
|
58240
58555
|
children: [
|
|
58241
58556
|
/* @__PURE__ */ jsx(Icon, { name: "plus", size: "xs", className: "mr-1" }),
|
|
58242
|
-
t("
|
|
58557
|
+
t("orbInspector.addField")
|
|
58243
58558
|
]
|
|
58244
58559
|
}
|
|
58245
58560
|
)
|
|
58246
58561
|
] }),
|
|
58247
58562
|
editable && !selectedPattern && !isExpanded && node.layer === "Services" && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58248
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58563
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.serviceMode") }),
|
|
58249
58564
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
58250
58565
|
/* @__PURE__ */ jsxs(
|
|
58251
58566
|
Button,
|
|
@@ -58258,7 +58573,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58258
58573
|
},
|
|
58259
58574
|
children: [
|
|
58260
58575
|
/* @__PURE__ */ jsx(Icon, { name: "monitor", size: "xs", className: "mr-1" }),
|
|
58261
|
-
t("
|
|
58576
|
+
t("orbInspector.standalone")
|
|
58262
58577
|
]
|
|
58263
58578
|
}
|
|
58264
58579
|
),
|
|
@@ -58273,25 +58588,22 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58273
58588
|
},
|
|
58274
58589
|
children: [
|
|
58275
58590
|
/* @__PURE__ */ jsx(Icon, { name: "cpu", size: "xs", className: "mr-1" }),
|
|
58276
|
-
t("
|
|
58591
|
+
t("orbInspector.embedded")
|
|
58277
58592
|
]
|
|
58278
58593
|
}
|
|
58279
58594
|
)
|
|
58280
58595
|
] }),
|
|
58281
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs mt-1", children: hasRenderUi ? t("
|
|
58596
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs mt-1", children: hasRenderUi ? t("orbInspector.rendersOwnUi") : t("orbInspector.headless") })
|
|
58282
58597
|
] }),
|
|
58283
58598
|
!selectedPattern && !isExpanded && traits2.length > 0 && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58284
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: "
|
|
58285
|
-
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1", children: traits2.map((
|
|
58286
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-semibold", children:
|
|
58287
|
-
/* @__PURE__ */
|
|
58288
|
-
|
|
58289
|
-
" states"
|
|
58290
|
-
] })
|
|
58291
|
-
] }, t2.name)) })
|
|
58599
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.traits") }),
|
|
58600
|
+
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1", children: traits2.map((tr) => /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
58601
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-semibold", children: tr.name }),
|
|
58602
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: t("orbInspector.statesCount", { count: tr.stateCount }) })
|
|
58603
|
+
] }, tr.name)) })
|
|
58292
58604
|
] }),
|
|
58293
58605
|
isExpanded && fromState && toState && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58294
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: "
|
|
58606
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.transition") }),
|
|
58295
58607
|
/* @__PURE__ */ jsxs("svg", { width: "100%", height: 44, viewBox: "0 0 280 44", children: [
|
|
58296
58608
|
/* @__PURE__ */ jsx(AvlState, { x: 8, y: 8, name: fromState, role: getStateRole(fromState), width: 90, height: 26 }),
|
|
58297
58609
|
/* @__PURE__ */ jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "#1E293B", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
|
|
@@ -58300,7 +58612,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58300
58612
|
] }),
|
|
58301
58613
|
traitName && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
58302
58614
|
traitName,
|
|
58303
|
-
entityName ?
|
|
58615
|
+
entityName ? t("orbInspector.onEntity", { entity: entityName }) : ""
|
|
58304
58616
|
] })
|
|
58305
58617
|
] }),
|
|
58306
58618
|
isExpanded && transitionEvent && /* @__PURE__ */ jsx(Box, { className: "px-4 py-2 border-b border-border/40", children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
@@ -58313,7 +58625,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58313
58625
|
Input,
|
|
58314
58626
|
{
|
|
58315
58627
|
defaultValue: formatExpression(transition?.guard ?? guard),
|
|
58316
|
-
placeholder: t("
|
|
58628
|
+
placeholder: t("orbInspector.guardExpression"),
|
|
58317
58629
|
className: "flex-1 text-xs font-mono h-6",
|
|
58318
58630
|
onBlur: (e) => handleGuardChange(e.target.value)
|
|
58319
58631
|
}
|
|
@@ -58321,7 +58633,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58321
58633
|
] }) }),
|
|
58322
58634
|
userType === "architect" && (effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58323
58635
|
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: [
|
|
58324
|
-
t("
|
|
58636
|
+
t("avl.effects"),
|
|
58325
58637
|
" (",
|
|
58326
58638
|
effectTypes.length,
|
|
58327
58639
|
")"
|
|
@@ -58378,7 +58690,7 @@ function AddEffectButton({ onAdd }) {
|
|
|
58378
58690
|
className: "text-xs w-full",
|
|
58379
58691
|
children: [
|
|
58380
58692
|
/* @__PURE__ */ jsx(Icon, { name: "plus", size: "xs", className: "mr-1" }),
|
|
58381
|
-
t("
|
|
58693
|
+
t("orbInspector.addEffect")
|
|
58382
58694
|
]
|
|
58383
58695
|
}
|
|
58384
58696
|
),
|
|
@@ -58439,7 +58751,7 @@ var PHASE_2_TOKEN_FALLBACK = {
|
|
|
58439
58751
|
function StylesTab({ patternType, patternDef, patternConfig, editable, onPropChange, themeManifest, isDesignSystem }) {
|
|
58440
58752
|
const { t } = useTranslate();
|
|
58441
58753
|
if (!patternType) {
|
|
58442
|
-
return /* @__PURE__ */ jsx(Box, { className: "p-4", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: t("
|
|
58754
|
+
return /* @__PURE__ */ jsx(Box, { className: "p-4", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: t("orbInspector.selectPatternForStyles") }) });
|
|
58443
58755
|
}
|
|
58444
58756
|
const tier = patternDef?.category ?? "Pattern";
|
|
58445
58757
|
const tokens = PHASE_2_TOKEN_FALLBACK[patternType] ?? [];
|
|
@@ -58460,11 +58772,11 @@ function StylesTab({ patternType, patternDef, patternConfig, editable, onPropCha
|
|
|
58460
58772
|
)
|
|
58461
58773
|
] }),
|
|
58462
58774
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
58463
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58464
|
-
tokens.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs italic", children: t("
|
|
58775
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.tokens") }),
|
|
58776
|
+
tokens.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs italic", children: t("orbInspector.noTokenContract") }) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1", children: tokens.map((token) => /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-mono text-xs", children: token }) }, token)) })
|
|
58465
58777
|
] }),
|
|
58466
58778
|
variantEnum && variantEnum.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
58467
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58779
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.variant") }),
|
|
58468
58780
|
/* @__PURE__ */ jsx(Box, { className: "flex flex-wrap gap-1", children: variantEnum.map((variant) => {
|
|
58469
58781
|
const isActive = variant === currentVariant || !currentVariant && variant === "default";
|
|
58470
58782
|
return /* @__PURE__ */ jsx(
|
|
@@ -58484,7 +58796,7 @@ function StylesTab({ patternType, patternDef, patternConfig, editable, onPropCha
|
|
|
58484
58796
|
}) })
|
|
58485
58797
|
] }),
|
|
58486
58798
|
sizeEnum && sizeEnum.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
58487
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58799
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.size") }),
|
|
58488
58800
|
/* @__PURE__ */ jsx(Box, { className: "flex flex-wrap gap-1", children: sizeEnum.map((size) => {
|
|
58489
58801
|
const isActive = size === currentSize || !currentSize && size === "md";
|
|
58490
58802
|
return /* @__PURE__ */ jsx(
|
|
@@ -58507,20 +58819,21 @@ function StylesTab({ patternType, patternDef, patternConfig, editable, onPropCha
|
|
|
58507
58819
|
] });
|
|
58508
58820
|
}
|
|
58509
58821
|
var TOKEN_GROUPS = [
|
|
58510
|
-
{ group: "colors",
|
|
58511
|
-
{ group: "radii",
|
|
58512
|
-
{ group: "spacing",
|
|
58513
|
-
{ group: "shadows",
|
|
58822
|
+
{ group: "colors", labelKey: "orbInspector.tokenGroup.colors" },
|
|
58823
|
+
{ group: "radii", labelKey: "orbInspector.tokenGroup.radii" },
|
|
58824
|
+
{ group: "spacing", labelKey: "orbInspector.tokenGroup.spacing" },
|
|
58825
|
+
{ group: "shadows", labelKey: "orbInspector.tokenGroup.shadows" }
|
|
58514
58826
|
];
|
|
58515
58827
|
function TokenEditorSection({ themeManifest, onPropChange }) {
|
|
58828
|
+
const { t } = useTranslate();
|
|
58516
58829
|
const tokens = themeManifest.tokens ?? {};
|
|
58517
58830
|
return /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-3 pt-2 border-t border-border/40", children: [
|
|
58518
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs uppercase tracking-wider text-muted-foreground", children: "
|
|
58519
|
-
TOKEN_GROUPS.map(({ group,
|
|
58831
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs uppercase tracking-wider text-muted-foreground", children: t("orbInspector.projectThemeTokens") }),
|
|
58832
|
+
TOKEN_GROUPS.map(({ group, labelKey }) => {
|
|
58520
58833
|
const entries = Object.entries(tokens[group] ?? {});
|
|
58521
58834
|
if (entries.length === 0) return null;
|
|
58522
58835
|
return /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-1.5", children: [
|
|
58523
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-mono text-muted-foreground", children:
|
|
58836
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-mono text-muted-foreground", children: t(labelKey) }),
|
|
58524
58837
|
entries.map(([key, value]) => /* @__PURE__ */ jsx(
|
|
58525
58838
|
TokenRow,
|
|
58526
58839
|
{
|
|
@@ -58568,6 +58881,7 @@ init_Typography();
|
|
|
58568
58881
|
init_Badge();
|
|
58569
58882
|
|
|
58570
58883
|
// components/avl/organisms/AvlTraitScene.tsx
|
|
58884
|
+
init_useTranslate();
|
|
58571
58885
|
init_AvlState();
|
|
58572
58886
|
init_AvlTransitionLane();
|
|
58573
58887
|
init_AvlSwimLane();
|
|
@@ -58581,6 +58895,7 @@ var AvlTraitScene = ({
|
|
|
58581
58895
|
color = "var(--color-primary)",
|
|
58582
58896
|
onTransitionClick
|
|
58583
58897
|
}) => {
|
|
58898
|
+
const { t } = useTranslate();
|
|
58584
58899
|
const [layout, setLayout] = useState(null);
|
|
58585
58900
|
const dataKey = useMemo(() => JSON.stringify(data), [data]);
|
|
58586
58901
|
useEffect(() => {
|
|
@@ -58589,7 +58904,7 @@ var AvlTraitScene = ({
|
|
|
58589
58904
|
});
|
|
58590
58905
|
}, [dataKey]);
|
|
58591
58906
|
if (!layout) {
|
|
58592
|
-
return /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("text", { x: 300, y: 200, textAnchor: "middle", fill: color, fontSize: 12, opacity: 0.5, children: "
|
|
58907
|
+
return /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("text", { x: 300, y: 200, textAnchor: "middle", fill: color, fontSize: 12, opacity: 0.5, children: t("avl.computingLayout") }) });
|
|
58593
58908
|
}
|
|
58594
58909
|
const hasExternal = data.listenedEvents.length > 0 || data.emittedEvents.length > 0;
|
|
58595
58910
|
const machineOffsetX = hasExternal ? 0 : 30;
|
|
@@ -58604,10 +58919,7 @@ var AvlTraitScene = ({
|
|
|
58604
58919
|
const machineHeight = scaledH + 100;
|
|
58605
58920
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
58606
58921
|
/* @__PURE__ */ jsx("text", { x: CENTER_W2 / 2, y: 20, textAnchor: "middle", fill: color, fontSize: 20, fontWeight: "700", fontFamily: "inherit", children: data.name }),
|
|
58607
|
-
/* @__PURE__ */
|
|
58608
|
-
"linked to ",
|
|
58609
|
-
data.linkedEntity
|
|
58610
|
-
] }),
|
|
58922
|
+
/* @__PURE__ */ jsx("text", { x: CENTER_W2 / 2, y: 38, textAnchor: "middle", fill: color, fontSize: 11, opacity: 0.5, fontFamily: "inherit", children: t("avl.linkedTo", { entity: data.linkedEntity }) }),
|
|
58611
58923
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
58612
58924
|
/* @__PURE__ */ jsx("marker", { id: "traitArrowV2", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.forward.color, opacity: 0.7 }) }),
|
|
58613
58925
|
/* @__PURE__ */ jsx("marker", { id: "traitArrowBack", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: CONNECTION_COLORS.backward.color, opacity: 0.5 }) })
|
|
@@ -58682,6 +58994,9 @@ var AvlTraitScene = ({
|
|
|
58682
58994
|
);
|
|
58683
58995
|
};
|
|
58684
58996
|
AvlTraitScene.displayName = "AvlTraitScene";
|
|
58997
|
+
|
|
58998
|
+
// components/avl/molecules/TraitCardNode.tsx
|
|
58999
|
+
init_useTranslate();
|
|
58685
59000
|
var TraitCardSelectionContext = createContext({
|
|
58686
59001
|
selectTransition: () => {
|
|
58687
59002
|
}
|
|
@@ -58691,6 +59006,7 @@ var SCENE_WIDTH = 600;
|
|
|
58691
59006
|
var SCENE_HEIGHT = 400;
|
|
58692
59007
|
var TraitCardNodeInner = (props) => {
|
|
58693
59008
|
const data = props.data;
|
|
59009
|
+
const { t } = useTranslate();
|
|
58694
59010
|
const { selectTransition } = useContext(TraitCardSelectionContext);
|
|
58695
59011
|
const orbitalName = data.orbitalName;
|
|
58696
59012
|
const traitName = data.traitName ?? "";
|
|
@@ -58716,7 +59032,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
58716
59032
|
position: Position.Left,
|
|
58717
59033
|
id: `listen-${event}`,
|
|
58718
59034
|
style: { top: `${(i + 1) / (listens.length + 1) * 100}%` },
|
|
58719
|
-
"aria-label":
|
|
59035
|
+
"aria-label": t("avl.listensFor", { event })
|
|
58720
59036
|
},
|
|
58721
59037
|
`listen-${event}`
|
|
58722
59038
|
)),
|
|
@@ -58727,7 +59043,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
58727
59043
|
position: Position.Right,
|
|
58728
59044
|
id: `emit-${event}`,
|
|
58729
59045
|
style: { top: `${(i + 1) / (emits.length + 1) * 100}%` },
|
|
58730
|
-
"aria-label":
|
|
59046
|
+
"aria-label": t("avl.emits", { event })
|
|
58731
59047
|
},
|
|
58732
59048
|
`emit-${event}`
|
|
58733
59049
|
)),
|
|
@@ -58754,14 +59070,14 @@ var TraitCardNodeInner = (props) => {
|
|
|
58754
59070
|
{
|
|
58755
59071
|
data: traitLevelData,
|
|
58756
59072
|
onTransitionClick: (idx) => {
|
|
58757
|
-
const
|
|
58758
|
-
if (!
|
|
59073
|
+
const t2 = transitions[idx];
|
|
59074
|
+
if (!t2) return;
|
|
58759
59075
|
selectTransition({
|
|
58760
59076
|
orbitalName,
|
|
58761
59077
|
traitName,
|
|
58762
|
-
transitionEvent:
|
|
58763
|
-
fromState:
|
|
58764
|
-
toState:
|
|
59078
|
+
transitionEvent: t2.event,
|
|
59079
|
+
fromState: t2.fromState,
|
|
59080
|
+
toState: t2.toState,
|
|
58765
59081
|
index: idx
|
|
58766
59082
|
});
|
|
58767
59083
|
}
|
|
@@ -58769,7 +59085,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
58769
59085
|
)
|
|
58770
59086
|
}
|
|
58771
59087
|
)
|
|
58772
|
-
) : /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "
|
|
59088
|
+
) : /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("avl.noStateMachine") })
|
|
58773
59089
|
] })
|
|
58774
59090
|
]
|
|
58775
59091
|
}
|
|
@@ -58780,6 +59096,7 @@ TraitCardNode.displayName = "TraitCardNode";
|
|
|
58780
59096
|
|
|
58781
59097
|
// components/avl/organisms/FlowCanvas.tsx
|
|
58782
59098
|
init_useEventBus();
|
|
59099
|
+
init_useTranslate();
|
|
58783
59100
|
var flowCanvasLog = createLogger("almadar:ui:flow-canvas");
|
|
58784
59101
|
var NODE_TYPES = {
|
|
58785
59102
|
preview: OrbPreviewNode,
|
|
@@ -58823,6 +59140,7 @@ function FlowCanvasInner({
|
|
|
58823
59140
|
userType = "builder",
|
|
58824
59141
|
themeManifest
|
|
58825
59142
|
}) {
|
|
59143
|
+
const { t } = useTranslate();
|
|
58826
59144
|
const NODE_TYPES2 = useMemo(() => ({
|
|
58827
59145
|
preview: OrbPreviewNode,
|
|
58828
59146
|
behaviorCompose: BehaviorComposeNode,
|
|
@@ -58875,13 +59193,13 @@ function FlowCanvasInner({
|
|
|
58875
59193
|
}), [selectedPattern]);
|
|
58876
59194
|
const [atBehaviorLevel, setAtBehaviorLevel] = useState(composeLevel === "behavior");
|
|
58877
59195
|
const { composeNodes, composeEdges, overviewNodes, overviewEdges, expandedNodes, expandedEdges, behaviorExpandedNodes, behaviorExpandedEdges, traitExpandedNodes, traitExpandedEdges } = useMemo(() => {
|
|
58878
|
-
const
|
|
59196
|
+
const t2 = perfStart("compose-graph");
|
|
58879
59197
|
const compose = composeLevel === "behavior" && behaviorEntries?.length ? behaviorsToComposeGraph(behaviorEntries, behaviorWires ?? [], layoutHint) : { nodes: [], edges: [] };
|
|
58880
59198
|
const overview = schemaToOverviewGraph(parsedSchema, mockData, behaviorMeta, layoutHint, orbitalStatus, screenSize);
|
|
58881
59199
|
const expanded = expandedOrbital ? orbitalToExpandedGraph(parsedSchema, expandedOrbital, mockData, screenSize) : { nodes: [], edges: [] };
|
|
58882
59200
|
const behaviorExpanded = expandedOrbital && expandedBehaviorAlias ? orbitalAliasToExpandedGraph(parsedSchema, expandedOrbital, expandedBehaviorAlias, mockData, screenSize) : { nodes: [], edges: [] };
|
|
58883
59201
|
const traitExpanded = expandedOrbital ? orbitalToTraitGraph(parsedSchema, expandedOrbital) : { nodes: [], edges: [] };
|
|
58884
|
-
perfEnd("compose-graph",
|
|
59202
|
+
perfEnd("compose-graph", t2, {
|
|
58885
59203
|
composeNodes: compose.nodes.length,
|
|
58886
59204
|
overviewNodes: overview.nodes.length,
|
|
58887
59205
|
expandedNodes: expanded.nodes.length,
|
|
@@ -59134,12 +59452,12 @@ function FlowCanvasInner({
|
|
|
59134
59452
|
{
|
|
59135
59453
|
onClick: handleGoBack,
|
|
59136
59454
|
className: "text-muted-foreground hover:text-foreground text-sm cursor-pointer bg-transparent border-none p-0",
|
|
59137
|
-
"aria-label": "
|
|
59455
|
+
"aria-label": t("canvas.goBackToOverview"),
|
|
59138
59456
|
children: "\u2190"
|
|
59139
59457
|
}
|
|
59140
59458
|
),
|
|
59141
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium", children: level === "overview" ? "
|
|
59142
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: level === "overview" ?
|
|
59459
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium", children: level === "overview" ? t("canvas.overview") : expandedOrbital ?? t("canvas.expanded") }),
|
|
59460
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: level === "overview" ? t("canvas.modulesCount", { count: nodes.length }) : t("canvas.screensCount", { count: nodes.length }) })
|
|
59143
59461
|
] }),
|
|
59144
59462
|
/* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 px-2 py-1 rounded-md bg-card/80 border border-border/40 backdrop-blur-sm", children: screenSizeKeys.map((size) => {
|
|
59145
59463
|
const p2 = SCREEN_SIZE_PRESETS[size];
|
|
@@ -59155,7 +59473,7 @@ function FlowCanvasInner({
|
|
|
59155
59473
|
},
|
|
59156
59474
|
className: `px-2 py-1 text-xs font-medium rounded cursor-pointer border-none transition-colors ${active ? "bg-primary text-primary-foreground" : "bg-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,
|
|
59157
59475
|
title: `${p2.label} (${p2.width}px)`,
|
|
59158
|
-
"aria-label":
|
|
59476
|
+
"aria-label": t("canvas.switchToView", { label: p2.label }),
|
|
59159
59477
|
children: p2.label
|
|
59160
59478
|
},
|
|
59161
59479
|
size
|
|
@@ -59537,6 +59855,7 @@ init_Stack();
|
|
|
59537
59855
|
init_Typography();
|
|
59538
59856
|
init_Button();
|
|
59539
59857
|
init_Icon();
|
|
59858
|
+
init_useTranslate();
|
|
59540
59859
|
var UNIT_DISPLAY_W = 240;
|
|
59541
59860
|
var UNIT_DISPLAY_H = 160;
|
|
59542
59861
|
function layoutOrbitals(count, containerW, containerH) {
|
|
@@ -59727,6 +60046,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
59727
60046
|
minZoom = 0.4,
|
|
59728
60047
|
maxZoom = 3
|
|
59729
60048
|
}) => {
|
|
60049
|
+
const { t } = useTranslate();
|
|
59730
60050
|
const parsedSchema = useMemo(() => {
|
|
59731
60051
|
if (typeof schemaProp === "string") return JSON.parse(schemaProp);
|
|
59732
60052
|
return schemaProp;
|
|
@@ -59794,9 +60114,9 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
59794
60114
|
(ctx) => {
|
|
59795
60115
|
if (ctx.level !== "transition" || !ctx.trait || !ctx.transition) return;
|
|
59796
60116
|
const orbital = parsedSchema.orbitals?.find((o) => o.name === ctx.orbital);
|
|
59797
|
-
const traitRef = orbital?.traits?.find((
|
|
60117
|
+
const traitRef = orbital?.traits?.find((t2) => isInlineTrait(t2) && t2.name === ctx.trait);
|
|
59798
60118
|
if (!traitRef || !isInlineTrait(traitRef)) return;
|
|
59799
|
-
const idx = traitRef.stateMachine?.transitions?.findIndex((
|
|
60119
|
+
const idx = traitRef.stateMachine?.transitions?.findIndex((t2) => t2.event === ctx.transition) ?? -1;
|
|
59800
60120
|
if (idx < 0) return;
|
|
59801
60121
|
dispatch({ type: "SELECT_TRAIT", trait: ctx.trait });
|
|
59802
60122
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: idx, targetPosition: { x: 0, y: 0 } });
|
|
@@ -59972,7 +60292,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
59972
60292
|
borderRadius: 4,
|
|
59973
60293
|
opacity: 0.8
|
|
59974
60294
|
},
|
|
59975
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "small", style: { color }, children: "
|
|
60295
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "small", style: { color }, children: t("avl.pressEscToZoomOut") })
|
|
59976
60296
|
}
|
|
59977
60297
|
),
|
|
59978
60298
|
state.level === "application" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -60024,7 +60344,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
60024
60344
|
onKeyDown: (e) => {
|
|
60025
60345
|
if (e.key === "Enter" || e.key === " ") handleSelect(view.name);
|
|
60026
60346
|
},
|
|
60027
|
-
"aria-label":
|
|
60347
|
+
"aria-label": isHighlighted ? t("avl.orbitalLabelHighlighted", { name: view.name }) : t("avl.orbitalLabel", { name: view.name }),
|
|
60028
60348
|
position: "absolute",
|
|
60029
60349
|
style: {
|
|
60030
60350
|
left: view.cx - UNIT_DISPLAY_W / 2,
|
|
@@ -60072,9 +60392,9 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
60072
60392
|
zIndex: 30
|
|
60073
60393
|
},
|
|
60074
60394
|
children: [
|
|
60075
|
-
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: zoomIn, title: "
|
|
60076
|
-
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: zoomOut, title: "
|
|
60077
|
-
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: resetZoom, title: "
|
|
60395
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: zoomIn, title: t("avl.zoomIn"), action: "COSMIC_ZOOM_IN", children: /* @__PURE__ */ jsx(Icon, { name: "plus", size: "sm" }) }),
|
|
60396
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: zoomOut, title: t("avl.zoomOut"), action: "COSMIC_ZOOM_OUT", children: /* @__PURE__ */ jsx(Icon, { name: "minus", size: "sm" }) }),
|
|
60397
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: resetZoom, title: t("common.reset"), action: "COSMIC_ZOOM_RESET", children: /* @__PURE__ */ jsx(Icon, { name: "maximize", size: "sm" }) })
|
|
60078
60398
|
]
|
|
60079
60399
|
}
|
|
60080
60400
|
)
|