@almadar/ui 5.21.8 → 5.21.10
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 +964 -651
- package/dist/avl/index.js +964 -651
- package/dist/components/game/organisms/three/index.cjs +490 -1
- package/dist/components/game/organisms/three/index.js +490 -1
- package/dist/components/index.cjs +669 -371
- package/dist/components/index.js +669 -371
- package/dist/docs/index.cjs +301 -5
- package/dist/docs/index.js +301 -5
- package/dist/hooks/index.cjs +297 -3
- package/dist/hooks/index.js +297 -3
- package/dist/locales/index.cjs +899 -9
- package/dist/locales/index.js +899 -9
- package/dist/providers/index.cjs +669 -371
- package/dist/providers/index.js +669 -371
- package/dist/runtime/index.cjs +669 -371
- package/dist/runtime/index.js +669 -371
- package/locales/ar.json +301 -31
- package/locales/en.json +297 -31
- package/locales/sl.json +301 -31
- package/package.json +1 -1
package/dist/avl/index.js
CHANGED
|
@@ -3851,6 +3851,504 @@ 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
|
+
"relationSelect.selectPlaceholder": "Select..."
|
|
4329
|
+
};
|
|
4330
|
+
}
|
|
4331
|
+
});
|
|
4332
|
+
function useTranslate() {
|
|
4333
|
+
return useContext(I18nContext);
|
|
4334
|
+
}
|
|
4335
|
+
var _meta, coreMessages, coreLocale, I18nContext;
|
|
4336
|
+
var init_useTranslate = __esm({
|
|
4337
|
+
"hooks/useTranslate.ts"() {
|
|
4338
|
+
"use client";
|
|
4339
|
+
init_en();
|
|
4340
|
+
({ $meta: _meta, ...coreMessages } = en_default);
|
|
4341
|
+
coreLocale = coreMessages;
|
|
4342
|
+
I18nContext = createContext({
|
|
4343
|
+
locale: "en",
|
|
4344
|
+
direction: "ltr",
|
|
4345
|
+
t: (key) => coreLocale[key] ?? key
|
|
4346
|
+
// core locale fallback
|
|
4347
|
+
});
|
|
4348
|
+
I18nContext.displayName = "I18nContext";
|
|
4349
|
+
I18nContext.Provider;
|
|
4350
|
+
}
|
|
4351
|
+
});
|
|
3854
4352
|
var MAX_VISIBLE_EFFECTS, AvlTransitionLane;
|
|
3855
4353
|
var init_AvlTransitionLane = __esm({
|
|
3856
4354
|
"components/avl/molecules/AvlTransitionLane.tsx"() {
|
|
@@ -4480,6 +4978,7 @@ var log2, SWIM_GUTTER, CENTER_W, BehaviorView;
|
|
|
4480
4978
|
var init_BehaviorView = __esm({
|
|
4481
4979
|
"components/avl/molecules/BehaviorView.tsx"() {
|
|
4482
4980
|
"use client";
|
|
4981
|
+
init_useTranslate();
|
|
4483
4982
|
init_AvlState();
|
|
4484
4983
|
init_AvlTransitionLane();
|
|
4485
4984
|
init_AvlSwimLane();
|
|
@@ -4489,6 +4988,7 @@ var init_BehaviorView = __esm({
|
|
|
4489
4988
|
SWIM_GUTTER = 120;
|
|
4490
4989
|
CENTER_W = 360;
|
|
4491
4990
|
BehaviorView = ({ data }) => {
|
|
4991
|
+
const { t } = useTranslate();
|
|
4492
4992
|
const [layout, setLayout] = useState(null);
|
|
4493
4993
|
const traitName = data.traits[0]?.name;
|
|
4494
4994
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
@@ -4498,10 +4998,10 @@ var init_BehaviorView = __esm({
|
|
|
4498
4998
|
computeTraitLayout(traitData).then(setLayout).catch((err) => log2.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
|
|
4499
4999
|
}, [dataKey]);
|
|
4500
5000
|
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: "
|
|
5001
|
+
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
5002
|
}
|
|
4503
5003
|
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: "
|
|
5004
|
+
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
5005
|
}
|
|
4506
5006
|
const hasExternal = traitData.listenedEvents.length > 0 || traitData.emittedEvents.length > 0;
|
|
4507
5007
|
const viewW = hasExternal ? SWIM_GUTTER + CENTER_W + SWIM_GUTTER : CENTER_W + 60;
|
|
@@ -4517,10 +5017,7 @@ var init_BehaviorView = __esm({
|
|
|
4517
5017
|
const machineHeight = scaledH + 100;
|
|
4518
5018
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
4519
5019
|
/* @__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
|
-
] }),
|
|
5020
|
+
/* @__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
5021
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
4525
5022
|
/* @__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
5023
|
/* @__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 +6819,6 @@ var init_Overlay = __esm({
|
|
|
6322
6819
|
};
|
|
6323
6820
|
}
|
|
6324
6821
|
});
|
|
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
6822
|
var sizeClasses2, minWidthClasses, lookStyles, Modal;
|
|
6530
6823
|
var init_Modal = __esm({
|
|
6531
6824
|
"components/core/molecules/Modal.tsx"() {
|
|
@@ -9504,6 +9797,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
9504
9797
|
init_Typography();
|
|
9505
9798
|
init_Divider();
|
|
9506
9799
|
init_cn();
|
|
9800
|
+
init_useTranslate();
|
|
9507
9801
|
positionStyles2 = {
|
|
9508
9802
|
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
9509
9803
|
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
@@ -9522,6 +9816,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
9522
9816
|
position = "top",
|
|
9523
9817
|
className
|
|
9524
9818
|
}) => {
|
|
9819
|
+
const { t } = useTranslate();
|
|
9525
9820
|
const [isVisible, setIsVisible] = React97__default.useState(false);
|
|
9526
9821
|
const timeoutRef = React97__default.useRef(null);
|
|
9527
9822
|
const handleMouseEnter = () => {
|
|
@@ -9605,7 +9900,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
9605
9900
|
target: "_blank",
|
|
9606
9901
|
rel: "noopener noreferrer",
|
|
9607
9902
|
onClick: (e) => e.stopPropagation(),
|
|
9608
|
-
children: "
|
|
9903
|
+
children: t("lawReference.viewFullText")
|
|
9609
9904
|
}
|
|
9610
9905
|
)
|
|
9611
9906
|
] }),
|
|
@@ -17093,7 +17388,7 @@ var init_CodeBlock = __esm({
|
|
|
17093
17388
|
const isLolo = language === "lolo";
|
|
17094
17389
|
const activeStyle = isOrb ? orbStyle : isLolo ? loloStyle : dark;
|
|
17095
17390
|
const eventBus = useEventBus();
|
|
17096
|
-
const { t
|
|
17391
|
+
const { t } = useTranslate();
|
|
17097
17392
|
const scrollRef = useRef(null);
|
|
17098
17393
|
const codeRef = useRef(null);
|
|
17099
17394
|
const savedScrollLeftRef = useRef(0);
|
|
@@ -17348,7 +17643,7 @@ var init_CodeBlock = __esm({
|
|
|
17348
17643
|
size: "sm",
|
|
17349
17644
|
onClick: handleCopy,
|
|
17350
17645
|
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
17351
|
-
"aria-label": "
|
|
17646
|
+
"aria-label": t("common.copy"),
|
|
17352
17647
|
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
17648
|
}
|
|
17354
17649
|
)
|
|
@@ -18003,7 +18298,7 @@ var init_StateMachineView = __esm({
|
|
|
18003
18298
|
const endX2 = fromState.x + Math.cos(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
18004
18299
|
const endY2 = fromState.y + Math.sin(Math.PI / 2 * loopDirection + endAngle) * fromState.radius;
|
|
18005
18300
|
const isSingle2 = bundle.labels.length === 1;
|
|
18006
|
-
const labelText2 = isSingle2 ? bundle.labels[0].event :
|
|
18301
|
+
const labelText2 = isSingle2 ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
18007
18302
|
const bundleColor2 = isSingle2 ? config.colors.arrow : "var(--color-accent)";
|
|
18008
18303
|
const labelWidth2 = labelText2.length * 9 + (isSingle2 ? 24 : 40);
|
|
18009
18304
|
const cx = fromState.x;
|
|
@@ -18129,7 +18424,7 @@ var init_StateMachineView = __esm({
|
|
|
18129
18424
|
const controlX = midX + perpX;
|
|
18130
18425
|
const controlY = midY + perpY;
|
|
18131
18426
|
const isSingle = bundle.labels.length === 1;
|
|
18132
|
-
const labelText = isSingle ? bundle.labels[0].event :
|
|
18427
|
+
const labelText = isSingle ? bundle.labels[0].event : t("stateMachine.eventCount", { count: bundle.labels.length });
|
|
18133
18428
|
const labelWidth = labelText.length * 9 + (isSingle ? 24 : 40);
|
|
18134
18429
|
const bundleColor = isSingle ? config.colors.arrow : "var(--color-accent)";
|
|
18135
18430
|
const curveMidpoint = {
|
|
@@ -18284,7 +18579,7 @@ var init_StateMachineView = __esm({
|
|
|
18284
18579
|
{
|
|
18285
18580
|
className: "absolute -top-2 left-1/2 transform -translate-x-1/2 px-2 py-0.5 rounded-full",
|
|
18286
18581
|
style: { backgroundColor: "var(--color-success)" },
|
|
18287
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: "
|
|
18582
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", weight: "semibold", style: { color: "var(--color-success-foreground)" }, children: t("stateMachine.pinned") })
|
|
18288
18583
|
}
|
|
18289
18584
|
),
|
|
18290
18585
|
!isSingle && /* @__PURE__ */ jsxs(
|
|
@@ -18306,10 +18601,7 @@ var init_StateMachineView = __esm({
|
|
|
18306
18601
|
{
|
|
18307
18602
|
className: "ml-2 px-2 py-0.5 rounded-full",
|
|
18308
18603
|
style: { backgroundColor: "var(--color-accent)" },
|
|
18309
|
-
children: /* @__PURE__ */
|
|
18310
|
-
bundle.labels.length,
|
|
18311
|
-
" events"
|
|
18312
|
-
] })
|
|
18604
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", style: { color: "var(--color-accent-foreground)" }, children: t("stateMachine.eventCount", { count: bundle.labels.length }) })
|
|
18313
18605
|
}
|
|
18314
18606
|
)
|
|
18315
18607
|
]
|
|
@@ -18454,7 +18746,7 @@ var init_StateMachineView = __esm({
|
|
|
18454
18746
|
align: "center",
|
|
18455
18747
|
className: "mb-2",
|
|
18456
18748
|
style: { color: "var(--color-warning)", fontSize: "13px" },
|
|
18457
|
-
children: "
|
|
18749
|
+
children: t("stateMachine.externalEffects")
|
|
18458
18750
|
}
|
|
18459
18751
|
),
|
|
18460
18752
|
outputs.outputs.map((output, idx) => /* @__PURE__ */ jsx(
|
|
@@ -18474,10 +18766,10 @@ var init_StateMachineView = __esm({
|
|
|
18474
18766
|
Legend = ({ config, y }) => {
|
|
18475
18767
|
const { t } = useTranslate();
|
|
18476
18768
|
const items = [
|
|
18477
|
-
{ label: "
|
|
18478
|
-
{ label: "
|
|
18479
|
-
{ label: "
|
|
18480
|
-
{ label: "
|
|
18769
|
+
{ key: "initial", label: t("stateMachine.legend.initial"), color: config.colors.initialNode, isMultiEvent: false },
|
|
18770
|
+
{ key: "final", label: t("stateMachine.legend.final"), color: config.colors.finalNode, isMultiEvent: false },
|
|
18771
|
+
{ key: "state", label: t("stateMachine.legend.state"), color: config.colors.nodeBorder, isMultiEvent: false },
|
|
18772
|
+
{ key: "multiEvent", label: t("stateMachine.legend.multiEvent"), color: "var(--color-accent)", isMultiEvent: true }
|
|
18481
18773
|
];
|
|
18482
18774
|
return /* @__PURE__ */ jsx(
|
|
18483
18775
|
HStack,
|
|
@@ -18492,8 +18784,8 @@ var init_StateMachineView = __esm({
|
|
|
18492
18784
|
{
|
|
18493
18785
|
className: "w-3 h-3 rounded-full",
|
|
18494
18786
|
style: {
|
|
18495
|
-
backgroundColor: item.
|
|
18496
|
-
border: item.
|
|
18787
|
+
backgroundColor: item.isMultiEvent ? item.color : config.colors.node,
|
|
18788
|
+
border: !item.isMultiEvent ? `2px solid ${item.color}` : "none"
|
|
18497
18789
|
}
|
|
18498
18790
|
}
|
|
18499
18791
|
),
|
|
@@ -18505,7 +18797,7 @@ var init_StateMachineView = __esm({
|
|
|
18505
18797
|
children: item.label
|
|
18506
18798
|
}
|
|
18507
18799
|
)
|
|
18508
|
-
] }, item.
|
|
18800
|
+
] }, item.key))
|
|
18509
18801
|
}
|
|
18510
18802
|
);
|
|
18511
18803
|
};
|
|
@@ -19299,13 +19591,13 @@ var init_JazariStateMachine = __esm({
|
|
|
19299
19591
|
);
|
|
19300
19592
|
}, [resolvedTrait, entityFields]);
|
|
19301
19593
|
if (isLoading) {
|
|
19302
|
-
return /* @__PURE__ */ jsx(LoadingState, { message: "
|
|
19594
|
+
return /* @__PURE__ */ jsx(LoadingState, { message: t("stateMachine.loading") });
|
|
19303
19595
|
}
|
|
19304
19596
|
if (error) {
|
|
19305
19597
|
return /* @__PURE__ */ jsx(ErrorState, { message: error instanceof Error ? error.message : String(error) });
|
|
19306
19598
|
}
|
|
19307
19599
|
if (!resolvedTrait || !layoutData || layoutData.states.length === 0) {
|
|
19308
|
-
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: "
|
|
19600
|
+
return /* @__PURE__ */ jsx(Box, { padding: "lg", className: cn("text-center", className), children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "opacity-60", children: t("stateMachine.noStateMachine") }) });
|
|
19309
19601
|
}
|
|
19310
19602
|
return /* @__PURE__ */ jsx(
|
|
19311
19603
|
StateMachineView,
|
|
@@ -20349,13 +20641,13 @@ var init_LayoutPatterns = __esm({
|
|
|
20349
20641
|
function generateRuleId() {
|
|
20350
20642
|
return `rule-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
20351
20643
|
}
|
|
20352
|
-
function questionsToOptions(questions,
|
|
20644
|
+
function questionsToOptions(questions, endOfSurveyLabel) {
|
|
20353
20645
|
const opts = questions.map((q) => ({
|
|
20354
20646
|
value: q.id,
|
|
20355
20647
|
label: q.label
|
|
20356
20648
|
}));
|
|
20357
|
-
if (
|
|
20358
|
-
opts.push({ value: END_OF_SURVEY, label:
|
|
20649
|
+
if (endOfSurveyLabel !== null) {
|
|
20650
|
+
opts.push({ value: END_OF_SURVEY, label: endOfSurveyLabel });
|
|
20359
20651
|
}
|
|
20360
20652
|
return opts;
|
|
20361
20653
|
}
|
|
@@ -20364,7 +20656,7 @@ function isRuleBroken(rule, questions) {
|
|
|
20364
20656
|
const targetExists = rule.targetQuestionId === END_OF_SURVEY || questions.some((q) => q.id === rule.targetQuestionId);
|
|
20365
20657
|
return !sourceExists || !targetExists;
|
|
20366
20658
|
}
|
|
20367
|
-
var END_OF_SURVEY,
|
|
20659
|
+
var END_OF_SURVEY, RuleRow, NODE_WIDTH, NODE_HEIGHT, NODE_GAP_Y, PADDING, LogicGraph, BranchingLogicBuilder;
|
|
20368
20660
|
var init_BranchingLogicBuilder = __esm({
|
|
20369
20661
|
"components/core/molecules/BranchingLogicBuilder.tsx"() {
|
|
20370
20662
|
"use client";
|
|
@@ -20377,14 +20669,9 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20377
20669
|
init_FilterPill();
|
|
20378
20670
|
init_Box();
|
|
20379
20671
|
init_useEventBus();
|
|
20672
|
+
init_useTranslate();
|
|
20380
20673
|
init_cn();
|
|
20381
20674
|
END_OF_SURVEY = "end-of-survey";
|
|
20382
|
-
OPERATOR_OPTIONS = [
|
|
20383
|
-
{ value: "equals", label: "equals" },
|
|
20384
|
-
{ value: "not-equals", label: "does not equal" },
|
|
20385
|
-
{ value: "contains", label: "contains" },
|
|
20386
|
-
{ value: "in", label: "is one of" }
|
|
20387
|
-
];
|
|
20388
20675
|
RuleRow = ({
|
|
20389
20676
|
rule,
|
|
20390
20677
|
questions,
|
|
@@ -20393,8 +20680,21 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20393
20680
|
onChange,
|
|
20394
20681
|
onDelete
|
|
20395
20682
|
}) => {
|
|
20396
|
-
const
|
|
20397
|
-
const
|
|
20683
|
+
const { t } = useTranslate();
|
|
20684
|
+
const operatorOptions = useMemo(
|
|
20685
|
+
() => [
|
|
20686
|
+
{ value: "equals", label: t("branchingLogic.operatorEquals") },
|
|
20687
|
+
{ value: "not-equals", label: t("branchingLogic.operatorNotEquals") },
|
|
20688
|
+
{ value: "contains", label: t("branchingLogic.operatorContains") },
|
|
20689
|
+
{ value: "in", label: t("branchingLogic.operatorIn") }
|
|
20690
|
+
],
|
|
20691
|
+
[t]
|
|
20692
|
+
);
|
|
20693
|
+
const sourceOptions = useMemo(() => questionsToOptions(questions, null), [questions]);
|
|
20694
|
+
const targetOptions = useMemo(
|
|
20695
|
+
() => questionsToOptions(questions, t("branchingLogic.endOfSurvey")),
|
|
20696
|
+
[questions, t]
|
|
20697
|
+
);
|
|
20398
20698
|
const sourceQuestion = questions.find((q) => q.id === rule.sourceQuestionId);
|
|
20399
20699
|
const valueOptions = useMemo(() => {
|
|
20400
20700
|
if (!sourceQuestion?.optionValues) return [];
|
|
@@ -20439,22 +20739,22 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20439
20739
|
),
|
|
20440
20740
|
children: [
|
|
20441
20741
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center gap-2", children: [
|
|
20442
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: "
|
|
20742
|
+
/* @__PURE__ */ jsx(Typography, { variant: "label", weight: "semibold", className: "shrink-0", children: t("branchingLogic.if") }),
|
|
20443
20743
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
20444
20744
|
Select,
|
|
20445
20745
|
{
|
|
20446
20746
|
options: sourceOptions,
|
|
20447
20747
|
value: rule.sourceQuestionId,
|
|
20448
|
-
placeholder: "
|
|
20748
|
+
placeholder: t("branchingLogic.selectQuestion"),
|
|
20449
20749
|
onChange: handleSource,
|
|
20450
20750
|
disabled: readOnly,
|
|
20451
|
-
error: broken ? "
|
|
20751
|
+
error: broken ? t("branchingLogic.brokenReference") : void 0
|
|
20452
20752
|
}
|
|
20453
20753
|
) }),
|
|
20454
20754
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[8rem] basis-32", children: /* @__PURE__ */ jsx(
|
|
20455
20755
|
Select,
|
|
20456
20756
|
{
|
|
20457
|
-
options:
|
|
20757
|
+
options: operatorOptions,
|
|
20458
20758
|
value: rule.operator,
|
|
20459
20759
|
onChange: handleOperator,
|
|
20460
20760
|
disabled: readOnly
|
|
@@ -20477,7 +20777,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20477
20777
|
{
|
|
20478
20778
|
options: valueOptions.filter((o) => !chips.includes(o.value)),
|
|
20479
20779
|
value: "",
|
|
20480
|
-
placeholder: "
|
|
20780
|
+
placeholder: t("branchingLogic.addValue"),
|
|
20481
20781
|
onChange: handleAddChip,
|
|
20482
20782
|
disabled: readOnly
|
|
20483
20783
|
}
|
|
@@ -20485,7 +20785,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20485
20785
|
Input,
|
|
20486
20786
|
{
|
|
20487
20787
|
inputType: "text",
|
|
20488
|
-
placeholder: "
|
|
20788
|
+
placeholder: t("branchingLogic.typeValuePressEnter"),
|
|
20489
20789
|
value: "",
|
|
20490
20790
|
onKeyDown: (e) => {
|
|
20491
20791
|
if (e.key !== "Enter") return;
|
|
@@ -20503,7 +20803,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20503
20803
|
{
|
|
20504
20804
|
options: valueOptions,
|
|
20505
20805
|
value: scalarValue,
|
|
20506
|
-
placeholder: "
|
|
20806
|
+
placeholder: t("branchingLogic.selectValue"),
|
|
20507
20807
|
onChange: (e) => onChange({ ...rule, value: e.target.value }),
|
|
20508
20808
|
disabled: readOnly
|
|
20509
20809
|
}
|
|
@@ -20511,7 +20811,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20511
20811
|
Input,
|
|
20512
20812
|
{
|
|
20513
20813
|
inputType: "text",
|
|
20514
|
-
placeholder: "
|
|
20814
|
+
placeholder: t("branchingLogic.value"),
|
|
20515
20815
|
value: scalarValue,
|
|
20516
20816
|
onChange: handleScalarValue,
|
|
20517
20817
|
disabled: readOnly
|
|
@@ -20519,17 +20819,17 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20519
20819
|
) }),
|
|
20520
20820
|
/* @__PURE__ */ jsxs(Typography, { variant: "label", weight: "semibold", className: "shrink-0 inline-flex items-center gap-1", children: [
|
|
20521
20821
|
/* @__PURE__ */ jsx(ArrowRight, { className: "h-4 w-4" }),
|
|
20522
|
-
"
|
|
20822
|
+
t("branchingLogic.goTo")
|
|
20523
20823
|
] }),
|
|
20524
20824
|
/* @__PURE__ */ jsx(Box, { className: "min-w-[10rem] grow basis-40", children: /* @__PURE__ */ jsx(
|
|
20525
20825
|
Select,
|
|
20526
20826
|
{
|
|
20527
20827
|
options: targetOptions,
|
|
20528
20828
|
value: rule.targetQuestionId,
|
|
20529
|
-
placeholder: "
|
|
20829
|
+
placeholder: t("branchingLogic.selectTarget"),
|
|
20530
20830
|
onChange: handleTarget,
|
|
20531
20831
|
disabled: readOnly,
|
|
20532
|
-
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? "
|
|
20832
|
+
error: broken && rule.targetQuestionId !== END_OF_SURVEY ? t("branchingLogic.brokenReference") : void 0
|
|
20533
20833
|
}
|
|
20534
20834
|
) }),
|
|
20535
20835
|
!readOnly && /* @__PURE__ */ jsx(
|
|
@@ -20541,11 +20841,11 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20541
20841
|
action: "DELETE_RULE",
|
|
20542
20842
|
actionPayload: { ruleId: rule.id },
|
|
20543
20843
|
onClick: onDelete,
|
|
20544
|
-
"aria-label": "
|
|
20844
|
+
"aria-label": t("branchingLogic.deleteRule")
|
|
20545
20845
|
}
|
|
20546
20846
|
)
|
|
20547
20847
|
] }),
|
|
20548
|
-
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: "
|
|
20848
|
+
broken && /* @__PURE__ */ jsx(Badge, { variant: "error", size: "sm", label: t("branchingLogic.brokenReference") })
|
|
20549
20849
|
]
|
|
20550
20850
|
}
|
|
20551
20851
|
);
|
|
@@ -20555,10 +20855,12 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20555
20855
|
NODE_GAP_Y = 80;
|
|
20556
20856
|
PADDING = 32;
|
|
20557
20857
|
LogicGraph = ({ questions, rules }) => {
|
|
20858
|
+
const { t } = useTranslate();
|
|
20859
|
+
const endOfSurveyLabel = t("branchingLogic.endOfSurvey");
|
|
20558
20860
|
const layout = useMemo(() => {
|
|
20559
20861
|
const items = [
|
|
20560
20862
|
...questions.map((q) => ({ id: q.id, label: q.label, isEnd: false })),
|
|
20561
|
-
{ id: END_OF_SURVEY, label:
|
|
20863
|
+
{ id: END_OF_SURVEY, label: endOfSurveyLabel, isEnd: true }
|
|
20562
20864
|
];
|
|
20563
20865
|
const positions = {};
|
|
20564
20866
|
items.forEach((item, i) => {
|
|
@@ -20570,14 +20872,14 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20570
20872
|
const width = NODE_WIDTH + PADDING * 2 + 220;
|
|
20571
20873
|
const height = PADDING * 2 + items.length * (NODE_HEIGHT + NODE_GAP_Y);
|
|
20572
20874
|
return { items, positions, width, height };
|
|
20573
|
-
}, [questions]);
|
|
20875
|
+
}, [questions, endOfSurveyLabel]);
|
|
20574
20876
|
return /* @__PURE__ */ jsx(Box, { className: "overflow-auto rounded-container border border-border bg-card p-2", children: /* @__PURE__ */ jsxs(
|
|
20575
20877
|
"svg",
|
|
20576
20878
|
{
|
|
20577
20879
|
width: layout.width,
|
|
20578
20880
|
height: layout.height,
|
|
20579
20881
|
role: "img",
|
|
20580
|
-
"aria-label": "
|
|
20882
|
+
"aria-label": t("branchingLogic.graphAriaLabel"),
|
|
20581
20883
|
style: { display: "block" },
|
|
20582
20884
|
children: [
|
|
20583
20885
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
@@ -20685,6 +20987,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20685
20987
|
readOnly = false,
|
|
20686
20988
|
className
|
|
20687
20989
|
}) => {
|
|
20990
|
+
const { t } = useTranslate();
|
|
20688
20991
|
const eventBus = useEventBus();
|
|
20689
20992
|
const questions = Array.isArray(questionsProp) ? questionsProp : [];
|
|
20690
20993
|
const rulesInitial = Array.isArray(rulesProp) ? rulesProp : [];
|
|
@@ -20737,16 +21040,23 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20737
21040
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
20738
21041
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
20739
21042
|
/* @__PURE__ */ jsx(GitBranch, { className: "h-5 w-5 text-foreground" }),
|
|
20740
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: "
|
|
21043
|
+
/* @__PURE__ */ jsx(Typography, { variant: "subheading", weight: "semibold", children: t("branchingLogic.title") }),
|
|
20741
21044
|
/* @__PURE__ */ jsx(
|
|
20742
21045
|
Badge,
|
|
20743
21046
|
{
|
|
20744
21047
|
variant: "neutral",
|
|
20745
21048
|
size: "sm",
|
|
20746
|
-
label:
|
|
21049
|
+
label: rules.length === 1 ? t("branchingLogic.ruleCountOne", { count: rules.length }) : t("branchingLogic.ruleCountOther", { count: rules.length })
|
|
20747
21050
|
}
|
|
20748
21051
|
),
|
|
20749
|
-
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
21052
|
+
brokenCount > 0 && /* @__PURE__ */ jsx(
|
|
21053
|
+
Badge,
|
|
21054
|
+
{
|
|
21055
|
+
variant: "error",
|
|
21056
|
+
size: "sm",
|
|
21057
|
+
label: t("branchingLogic.brokenCount", { count: brokenCount })
|
|
21058
|
+
}
|
|
21059
|
+
)
|
|
20750
21060
|
] }),
|
|
20751
21061
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1 rounded-sm border border-border bg-card p-0.5", children: [
|
|
20752
21062
|
/* @__PURE__ */ jsx(
|
|
@@ -20757,7 +21067,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20757
21067
|
leftIcon: Pencil,
|
|
20758
21068
|
action: "VIEW_EDIT",
|
|
20759
21069
|
onClick: () => setView("edit"),
|
|
20760
|
-
children: "
|
|
21070
|
+
children: t("branchingLogic.rules")
|
|
20761
21071
|
}
|
|
20762
21072
|
),
|
|
20763
21073
|
/* @__PURE__ */ jsx(
|
|
@@ -20768,13 +21078,13 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20768
21078
|
leftIcon: Eye,
|
|
20769
21079
|
action: "VIEW_GRAPH",
|
|
20770
21080
|
onClick: () => setView("graph"),
|
|
20771
|
-
children: "
|
|
21081
|
+
children: t("branchingLogic.logicGraph")
|
|
20772
21082
|
}
|
|
20773
21083
|
)
|
|
20774
21084
|
] })
|
|
20775
21085
|
] }),
|
|
20776
21086
|
view === "edit" ? /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-2", children: [
|
|
20777
|
-
rules.length === 0 ? /* @__PURE__ */ jsx(Card, { variant: "bordered", padding: "lg", className: "text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: noQuestions ? "
|
|
21087
|
+
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(
|
|
20778
21088
|
RuleRow,
|
|
20779
21089
|
{
|
|
20780
21090
|
rule,
|
|
@@ -20795,7 +21105,7 @@ var init_BranchingLogicBuilder = __esm({
|
|
|
20795
21105
|
action: "ADD_RULE",
|
|
20796
21106
|
onClick: handleAddRule,
|
|
20797
21107
|
disabled: noQuestions,
|
|
20798
|
-
children: "
|
|
21108
|
+
children: t("branchingLogic.addRule")
|
|
20799
21109
|
}
|
|
20800
21110
|
) })
|
|
20801
21111
|
] }) : /* @__PURE__ */ jsx(LogicGraph, { questions, rules })
|
|
@@ -21422,7 +21732,7 @@ function CalendarGrid({
|
|
|
21422
21732
|
onClick: stepPrev,
|
|
21423
21733
|
"aria-disabled": !canPrev || void 0,
|
|
21424
21734
|
"aria-label": t("aria.previousDays"),
|
|
21425
|
-
children: "
|
|
21735
|
+
children: t("nav.previous")
|
|
21426
21736
|
}
|
|
21427
21737
|
),
|
|
21428
21738
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: formatDateRange(visibleDays[0], visibleDays[visibleDays.length - 1]) }),
|
|
@@ -21435,7 +21745,7 @@ function CalendarGrid({
|
|
|
21435
21745
|
onClick: stepNext,
|
|
21436
21746
|
"aria-disabled": !canNext || void 0,
|
|
21437
21747
|
"aria-label": t("aria.nextDays"),
|
|
21438
|
-
children: "
|
|
21748
|
+
children: t("nav.next")
|
|
21439
21749
|
}
|
|
21440
21750
|
)
|
|
21441
21751
|
] }),
|
|
@@ -22985,7 +23295,7 @@ var init_Pagination = __esm({
|
|
|
22985
23295
|
type: "number",
|
|
22986
23296
|
value: jumpToPage,
|
|
22987
23297
|
onChange: (e) => setJumpToPage(e.target.value),
|
|
22988
|
-
placeholder: "
|
|
23298
|
+
placeholder: t("pagination.jumpPlaceholder"),
|
|
22989
23299
|
className: "w-20",
|
|
22990
23300
|
onKeyDown: (e) => {
|
|
22991
23301
|
if (e.key === "Enter") {
|
|
@@ -23123,13 +23433,10 @@ var init_CardGrid = __esm({
|
|
|
23123
23433
|
return children;
|
|
23124
23434
|
}
|
|
23125
23435
|
if (isLoading) {
|
|
23126
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: "
|
|
23436
|
+
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") }) });
|
|
23127
23437
|
}
|
|
23128
23438
|
if (error) {
|
|
23129
|
-
return /* @__PURE__ */ jsx(Box, { className: "col-span-full text-center py-8 text-error", children: /* @__PURE__ */
|
|
23130
|
-
"Error loading items: ",
|
|
23131
|
-
error.message
|
|
23132
|
-
] }) });
|
|
23439
|
+
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 }) }) });
|
|
23133
23440
|
}
|
|
23134
23441
|
if (normalizedData.length === 0) {
|
|
23135
23442
|
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" }) });
|
|
@@ -26995,7 +27302,7 @@ function DataGrid({
|
|
|
26995
27302
|
onChange: () => toggleSelection(id),
|
|
26996
27303
|
onClick: (e) => e.stopPropagation(),
|
|
26997
27304
|
className: "w-4 h-4 mt-1 flex-shrink-0 accent-primary",
|
|
26998
|
-
"aria-label":
|
|
27305
|
+
"aria-label": t("card.selectItem", { item: titleValue !== void 0 ? String(titleValue) : t("card.itemFallback") })
|
|
26999
27306
|
}
|
|
27000
27307
|
),
|
|
27001
27308
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "flex-1 min-w-0", children: [
|
|
@@ -27193,7 +27500,7 @@ function formatDate3(value) {
|
|
|
27193
27500
|
if (isNaN(d.getTime())) return String(value);
|
|
27194
27501
|
return d.toLocaleDateString(void 0, { year: "numeric", month: "short", day: "numeric" });
|
|
27195
27502
|
}
|
|
27196
|
-
function formatValue2(value, format) {
|
|
27503
|
+
function formatValue2(value, format, boolLabels) {
|
|
27197
27504
|
if (value === void 0 || value === null) return "";
|
|
27198
27505
|
switch (format) {
|
|
27199
27506
|
case "date":
|
|
@@ -27205,7 +27512,7 @@ function formatValue2(value, format) {
|
|
|
27205
27512
|
case "percent":
|
|
27206
27513
|
return typeof value === "number" ? `${Math.round(value)}%` : String(value);
|
|
27207
27514
|
case "boolean":
|
|
27208
|
-
return value ? "Yes" : "No";
|
|
27515
|
+
return value ? boolLabels?.yes ?? "Yes" : boolLabels?.no ?? "No";
|
|
27209
27516
|
default:
|
|
27210
27517
|
return String(value);
|
|
27211
27518
|
}
|
|
@@ -27501,7 +27808,7 @@ function DataList({
|
|
|
27501
27808
|
field.label ?? fieldLabel3(field.name),
|
|
27502
27809
|
":"
|
|
27503
27810
|
] }),
|
|
27504
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format) })
|
|
27811
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", children: formatValue2(value, field.format, { yes: t("common.yes"), no: t("common.no") }) })
|
|
27505
27812
|
] }, field.name);
|
|
27506
27813
|
}) }),
|
|
27507
27814
|
progressFields.map((field) => {
|
|
@@ -27631,6 +27938,7 @@ var init_FileTree = __esm({
|
|
|
27631
27938
|
init_Box();
|
|
27632
27939
|
init_Typography();
|
|
27633
27940
|
init_Icon();
|
|
27941
|
+
init_useTranslate();
|
|
27634
27942
|
TreeNodeItem = ({
|
|
27635
27943
|
node,
|
|
27636
27944
|
depth,
|
|
@@ -27716,8 +28024,9 @@ var init_FileTree = __esm({
|
|
|
27716
28024
|
className,
|
|
27717
28025
|
indent = 16
|
|
27718
28026
|
}) => {
|
|
28027
|
+
const { t } = useTranslate();
|
|
27719
28028
|
if (tree.length === 0) {
|
|
27720
|
-
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: "
|
|
28029
|
+
return /* @__PURE__ */ jsx(Box, { className: `p-4 ${className ?? ""}`, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "muted", children: t("fileTree.noFiles") }) });
|
|
27721
28030
|
}
|
|
27722
28031
|
return /* @__PURE__ */ jsx(Box, { className: `py-1 overflow-y-auto ${className ?? ""}`, role: "tree", children: tree.map((node) => /* @__PURE__ */ jsx(
|
|
27723
28032
|
TreeNodeItem,
|
|
@@ -27836,6 +28145,7 @@ var init_FilterGroup = __esm({
|
|
|
27836
28145
|
init_Icon();
|
|
27837
28146
|
init_useEventBus();
|
|
27838
28147
|
init_useQuerySingleton();
|
|
28148
|
+
init_useTranslate();
|
|
27839
28149
|
resolveFilterType = (filter) => filter.filterType ?? filter.type;
|
|
27840
28150
|
lookStyles6 = {
|
|
27841
28151
|
toolbar: "",
|
|
@@ -27856,6 +28166,7 @@ var init_FilterGroup = __esm({
|
|
|
27856
28166
|
isLoading,
|
|
27857
28167
|
look = "toolbar"
|
|
27858
28168
|
}) => {
|
|
28169
|
+
const { t } = useTranslate();
|
|
27859
28170
|
const eventBus = useEventBus();
|
|
27860
28171
|
const queryState = useQuerySingleton(query);
|
|
27861
28172
|
const [selectedValues, setSelectedValues] = useState(
|
|
@@ -27937,7 +28248,7 @@ var init_FilterGroup = __esm({
|
|
|
27937
28248
|
"px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
|
|
27938
28249
|
!selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
|
|
27939
28250
|
),
|
|
27940
|
-
children: "
|
|
28251
|
+
children: t("filterGroup.all")
|
|
27941
28252
|
}
|
|
27942
28253
|
),
|
|
27943
28254
|
filter.options?.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -27965,7 +28276,7 @@ var init_FilterGroup = __esm({
|
|
|
27965
28276
|
size: "sm",
|
|
27966
28277
|
onClick: handleClearAll,
|
|
27967
28278
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
27968
|
-
children: "
|
|
28279
|
+
children: t("filterGroup.clear")
|
|
27969
28280
|
}
|
|
27970
28281
|
)
|
|
27971
28282
|
]
|
|
@@ -27976,7 +28287,7 @@ var init_FilterGroup = __esm({
|
|
|
27976
28287
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", lookStyles6[look], className), children: [
|
|
27977
28288
|
showIcon && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
27978
28289
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
27979
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
28290
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
27980
28291
|
] }),
|
|
27981
28292
|
filters.map((filter) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
27982
28293
|
/* @__PURE__ */ jsx("label", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wide", children: filter.label }),
|
|
@@ -27999,7 +28310,7 @@ var init_FilterGroup = __esm({
|
|
|
27999
28310
|
`${filter.field}_from`,
|
|
28000
28311
|
e.target.value || null
|
|
28001
28312
|
),
|
|
28002
|
-
placeholder: "
|
|
28313
|
+
placeholder: t("filterGroup.from"),
|
|
28003
28314
|
clearable: true,
|
|
28004
28315
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null)
|
|
28005
28316
|
}
|
|
@@ -28013,7 +28324,7 @@ var init_FilterGroup = __esm({
|
|
|
28013
28324
|
`${filter.field}_to`,
|
|
28014
28325
|
e.target.value || null
|
|
28015
28326
|
),
|
|
28016
|
-
placeholder: "
|
|
28327
|
+
placeholder: t("filterGroup.to"),
|
|
28017
28328
|
clearable: true,
|
|
28018
28329
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null)
|
|
28019
28330
|
}
|
|
@@ -28033,7 +28344,7 @@ var init_FilterGroup = __esm({
|
|
|
28033
28344
|
value: selectedValues[filter.field] || "all",
|
|
28034
28345
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
28035
28346
|
options: [
|
|
28036
|
-
{ value: "all", label: "
|
|
28347
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
28037
28348
|
...filter.options?.map((opt) => ({
|
|
28038
28349
|
value: opt,
|
|
28039
28350
|
label: opt
|
|
@@ -28050,7 +28361,7 @@ var init_FilterGroup = __esm({
|
|
|
28050
28361
|
onClick: handleClearAll,
|
|
28051
28362
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
28052
28363
|
className: "self-start",
|
|
28053
|
-
children: "
|
|
28364
|
+
children: t("filterGroup.clearAll")
|
|
28054
28365
|
}
|
|
28055
28366
|
)
|
|
28056
28367
|
] });
|
|
@@ -28116,7 +28427,7 @@ var init_FilterGroup = __esm({
|
|
|
28116
28427
|
value: selectedValues[filter.field] || "all",
|
|
28117
28428
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
28118
28429
|
options: [
|
|
28119
|
-
{ value: "all", label:
|
|
28430
|
+
{ value: "all", label: t("filterGroup.allOf", { label: filter.label }) },
|
|
28120
28431
|
...filter.options?.map((opt) => ({
|
|
28121
28432
|
value: opt,
|
|
28122
28433
|
label: opt
|
|
@@ -28145,7 +28456,7 @@ var init_FilterGroup = __esm({
|
|
|
28145
28456
|
field
|
|
28146
28457
|
);
|
|
28147
28458
|
}),
|
|
28148
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "
|
|
28459
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: t("filterGroup.clearAll") })
|
|
28149
28460
|
] })
|
|
28150
28461
|
]
|
|
28151
28462
|
}
|
|
@@ -28170,7 +28481,7 @@ var init_FilterGroup = __esm({
|
|
|
28170
28481
|
className: "text-muted-foreground",
|
|
28171
28482
|
children: [
|
|
28172
28483
|
/* @__PURE__ */ jsx(Icon, { name: "filter", className: "h-4 w-4" }),
|
|
28173
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "
|
|
28484
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: t("filterGroup.filters") })
|
|
28174
28485
|
]
|
|
28175
28486
|
}
|
|
28176
28487
|
),
|
|
@@ -28196,7 +28507,7 @@ var init_FilterGroup = __esm({
|
|
|
28196
28507
|
`${filter.field}_from`,
|
|
28197
28508
|
e.target.value || null
|
|
28198
28509
|
),
|
|
28199
|
-
placeholder: "
|
|
28510
|
+
placeholder: t("filterGroup.from"),
|
|
28200
28511
|
clearable: true,
|
|
28201
28512
|
onClear: () => handleFilterSelect(`${filter.field}_from`, null),
|
|
28202
28513
|
className: "min-w-[130px]"
|
|
@@ -28212,7 +28523,7 @@ var init_FilterGroup = __esm({
|
|
|
28212
28523
|
`${filter.field}_to`,
|
|
28213
28524
|
e.target.value || null
|
|
28214
28525
|
),
|
|
28215
|
-
placeholder: "
|
|
28526
|
+
placeholder: t("filterGroup.to"),
|
|
28216
28527
|
clearable: true,
|
|
28217
28528
|
onClear: () => handleFilterSelect(`${filter.field}_to`, null),
|
|
28218
28529
|
className: "min-w-[130px]"
|
|
@@ -28234,7 +28545,7 @@ var init_FilterGroup = __esm({
|
|
|
28234
28545
|
value: selectedValues[filter.field] || "all",
|
|
28235
28546
|
onChange: (e) => handleFilterSelect(filter.field, e.target.value),
|
|
28236
28547
|
options: [
|
|
28237
|
-
{ value: "all", label: "
|
|
28548
|
+
{ value: "all", label: t("filterGroup.all") },
|
|
28238
28549
|
...filter.options?.map((opt) => ({
|
|
28239
28550
|
value: opt,
|
|
28240
28551
|
label: opt
|
|
@@ -28245,10 +28556,7 @@ var init_FilterGroup = __esm({
|
|
|
28245
28556
|
)
|
|
28246
28557
|
] }, filter.field)),
|
|
28247
28558
|
activeFilterCount > 0 && /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "ml-auto", children: [
|
|
28248
|
-
/* @__PURE__ */
|
|
28249
|
-
activeFilterCount,
|
|
28250
|
-
" active"
|
|
28251
|
-
] }),
|
|
28559
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "md", children: t("filterGroup.activeCount", { count: activeFilterCount }) }),
|
|
28252
28560
|
/* @__PURE__ */ jsx(
|
|
28253
28561
|
Button,
|
|
28254
28562
|
{
|
|
@@ -28256,7 +28564,7 @@ var init_FilterGroup = __esm({
|
|
|
28256
28564
|
size: "sm",
|
|
28257
28565
|
onClick: handleClearAll,
|
|
28258
28566
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
|
|
28259
|
-
children: "
|
|
28567
|
+
children: t("filterGroup.clearAll")
|
|
28260
28568
|
}
|
|
28261
28569
|
)
|
|
28262
28570
|
] })
|
|
@@ -28485,7 +28793,7 @@ var init_RelationSelect = __esm({
|
|
|
28485
28793
|
value,
|
|
28486
28794
|
onChange,
|
|
28487
28795
|
options = [],
|
|
28488
|
-
placeholder
|
|
28796
|
+
placeholder,
|
|
28489
28797
|
required = false,
|
|
28490
28798
|
disabled = false,
|
|
28491
28799
|
isLoading = false,
|
|
@@ -28497,6 +28805,7 @@ var init_RelationSelect = __esm({
|
|
|
28497
28805
|
emptyMessage
|
|
28498
28806
|
}) => {
|
|
28499
28807
|
const { t } = useTranslate();
|
|
28808
|
+
const resolvedPlaceholder = placeholder ?? t("relationSelect.selectPlaceholder");
|
|
28500
28809
|
const resolvedSearchPlaceholder = searchPlaceholder ?? t("common.search");
|
|
28501
28810
|
const resolvedEmptyMessage = emptyMessage ?? t("empty.noOptionsFound");
|
|
28502
28811
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -28606,7 +28915,7 @@ var init_RelationSelect = __esm({
|
|
|
28606
28915
|
children: isLoading ? /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
28607
28916
|
/* @__PURE__ */ jsx(Spinner, { size: "sm" }),
|
|
28608
28917
|
/* @__PURE__ */ jsx(Typography, { as: "span", children: t("common.loading") })
|
|
28609
|
-
] }) : selectedOption ? selectedOption.label :
|
|
28918
|
+
] }) : selectedOption ? selectedOption.label : resolvedPlaceholder
|
|
28610
28919
|
}
|
|
28611
28920
|
),
|
|
28612
28921
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
@@ -29200,19 +29509,20 @@ var init_RepeatableFormSection = __esm({
|
|
|
29200
29509
|
RepeatableFormSection.displayName = "RepeatableFormSection";
|
|
29201
29510
|
}
|
|
29202
29511
|
});
|
|
29203
|
-
var
|
|
29512
|
+
var actionTypeLabelKeys, actionTypeIcons, ViolationAlert;
|
|
29204
29513
|
var init_ViolationAlert = __esm({
|
|
29205
29514
|
"components/core/molecules/ViolationAlert.tsx"() {
|
|
29206
29515
|
init_cn();
|
|
29516
|
+
init_useTranslate();
|
|
29207
29517
|
init_Box();
|
|
29208
29518
|
init_Stack();
|
|
29209
29519
|
init_Typography();
|
|
29210
29520
|
init_Button();
|
|
29211
29521
|
init_Icon();
|
|
29212
|
-
|
|
29213
|
-
measure: "
|
|
29214
|
-
admin: "
|
|
29215
|
-
penalty: "
|
|
29522
|
+
actionTypeLabelKeys = {
|
|
29523
|
+
measure: "violationAlert.actionType.measure",
|
|
29524
|
+
admin: "violationAlert.actionType.admin",
|
|
29525
|
+
penalty: "violationAlert.actionType.penalty"
|
|
29216
29526
|
};
|
|
29217
29527
|
actionTypeIcons = {
|
|
29218
29528
|
measure: "alert-triangle",
|
|
@@ -29229,10 +29539,11 @@ var init_ViolationAlert = __esm({
|
|
|
29229
29539
|
className,
|
|
29230
29540
|
...flatProps
|
|
29231
29541
|
}) => {
|
|
29542
|
+
const { t } = useTranslate();
|
|
29232
29543
|
const resolvedViolation = violation ?? {
|
|
29233
29544
|
law: "",
|
|
29234
29545
|
article: "",
|
|
29235
|
-
message: flatProps.message ?? "
|
|
29546
|
+
message: flatProps.message ?? t("violationAlert.fallbackMessage"),
|
|
29236
29547
|
actionType: "measure"
|
|
29237
29548
|
};
|
|
29238
29549
|
const effectiveSeverity = severity ?? (resolvedViolation.actionType === "measure" ? "warning" : "error");
|
|
@@ -29317,7 +29628,7 @@ var init_ViolationAlert = __esm({
|
|
|
29317
29628
|
{
|
|
29318
29629
|
variant: "caption",
|
|
29319
29630
|
className: cn(textColor, "opacity-75"),
|
|
29320
|
-
children:
|
|
29631
|
+
children: t(actionTypeLabelKeys[resolvedViolation.actionType])
|
|
29321
29632
|
}
|
|
29322
29633
|
)
|
|
29323
29634
|
] })
|
|
@@ -29348,7 +29659,7 @@ var init_ViolationAlert = __esm({
|
|
|
29348
29659
|
{
|
|
29349
29660
|
variant: "caption",
|
|
29350
29661
|
className: cn(textColor, "opacity-75"),
|
|
29351
|
-
children: "
|
|
29662
|
+
children: t("violationAlert.adminLabel")
|
|
29352
29663
|
}
|
|
29353
29664
|
),
|
|
29354
29665
|
/* @__PURE__ */ jsx(
|
|
@@ -29367,7 +29678,7 @@ var init_ViolationAlert = __esm({
|
|
|
29367
29678
|
{
|
|
29368
29679
|
variant: "caption",
|
|
29369
29680
|
className: cn(textColor, "opacity-75"),
|
|
29370
|
-
children: "
|
|
29681
|
+
children: t("violationAlert.penaltyLabel")
|
|
29371
29682
|
}
|
|
29372
29683
|
),
|
|
29373
29684
|
/* @__PURE__ */ jsx(
|
|
@@ -29392,7 +29703,7 @@ var init_ViolationAlert = __esm({
|
|
|
29392
29703
|
className: cn(textColor, "self-start"),
|
|
29393
29704
|
children: [
|
|
29394
29705
|
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "sm", className: "mr-1" }),
|
|
29395
|
-
"
|
|
29706
|
+
t("violationAlert.goToField")
|
|
29396
29707
|
]
|
|
29397
29708
|
}
|
|
29398
29709
|
)
|
|
@@ -29708,6 +30019,7 @@ var init_LineChart = __esm({
|
|
|
29708
30019
|
"use client";
|
|
29709
30020
|
init_cn();
|
|
29710
30021
|
init_atoms2();
|
|
30022
|
+
init_useTranslate();
|
|
29711
30023
|
LineChart2 = ({
|
|
29712
30024
|
data,
|
|
29713
30025
|
width = 400,
|
|
@@ -29719,6 +30031,7 @@ var init_LineChart = __esm({
|
|
|
29719
30031
|
areaColor = "var(--color-primary)",
|
|
29720
30032
|
className
|
|
29721
30033
|
}) => {
|
|
30034
|
+
const { t } = useTranslate();
|
|
29722
30035
|
const gradientId = useId();
|
|
29723
30036
|
const safeData = data ?? [];
|
|
29724
30037
|
const sortedData = useMemo(() => {
|
|
@@ -29755,7 +30068,7 @@ var init_LineChart = __esm({
|
|
|
29755
30068
|
return `${linePath} L ${last.x} ${bottom} L ${first.x} ${bottom} Z`;
|
|
29756
30069
|
}, [linePath, points, height, showArea]);
|
|
29757
30070
|
if (safeData.length === 0) {
|
|
29758
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: "
|
|
30071
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center justify-center text-muted-foreground", className), style: { width, height }, children: t("empty.noData") });
|
|
29759
30072
|
}
|
|
29760
30073
|
return /* @__PURE__ */ jsx(Box, { className: cn(className), children: /* @__PURE__ */ jsxs(
|
|
29761
30074
|
"svg",
|
|
@@ -31662,6 +31975,7 @@ var init_GraphView = __esm({
|
|
|
31662
31975
|
"use client";
|
|
31663
31976
|
init_cn();
|
|
31664
31977
|
init_atoms2();
|
|
31978
|
+
init_useTranslate();
|
|
31665
31979
|
GROUP_COLORS = [
|
|
31666
31980
|
"#3b82f6",
|
|
31667
31981
|
// blue-500
|
|
@@ -31694,6 +32008,7 @@ var init_GraphView = __esm({
|
|
|
31694
32008
|
showLabels = true,
|
|
31695
32009
|
zoomToFit = true
|
|
31696
32010
|
}) => {
|
|
32011
|
+
const { t } = useTranslate();
|
|
31697
32012
|
const containerRef = useRef(null);
|
|
31698
32013
|
const animRef = useRef(0);
|
|
31699
32014
|
const [simNodes, setSimNodes] = useState([]);
|
|
@@ -31871,7 +32186,7 @@ var init_GraphView = __esm({
|
|
|
31871
32186
|
[onNodeClick]
|
|
31872
32187
|
);
|
|
31873
32188
|
if (nodes.length === 0) {
|
|
31874
|
-
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: "
|
|
32189
|
+
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") }) });
|
|
31875
32190
|
}
|
|
31876
32191
|
return /* @__PURE__ */ jsx(
|
|
31877
32192
|
Box,
|
|
@@ -32327,11 +32642,12 @@ var init_UploadDropZone = __esm({
|
|
|
32327
32642
|
init_Icon();
|
|
32328
32643
|
init_Typography();
|
|
32329
32644
|
init_useEventBus();
|
|
32645
|
+
init_useTranslate();
|
|
32330
32646
|
UploadDropZone = ({
|
|
32331
32647
|
accept,
|
|
32332
32648
|
maxSize,
|
|
32333
32649
|
maxFiles = 1,
|
|
32334
|
-
label
|
|
32650
|
+
label,
|
|
32335
32651
|
description,
|
|
32336
32652
|
disabled = false,
|
|
32337
32653
|
action,
|
|
@@ -32339,22 +32655,24 @@ var init_UploadDropZone = __esm({
|
|
|
32339
32655
|
onFiles,
|
|
32340
32656
|
className
|
|
32341
32657
|
}) => {
|
|
32658
|
+
const { t } = useTranslate();
|
|
32659
|
+
const resolvedLabel = label ?? t("upload.dropOrBrowse");
|
|
32342
32660
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
32343
32661
|
const [error, setError] = useState(null);
|
|
32344
32662
|
const inputRef = useRef(null);
|
|
32345
32663
|
const eventBus = useSafeEventBus7();
|
|
32346
32664
|
const defaultDescription = [
|
|
32347
|
-
accept ?
|
|
32348
|
-
maxSize ?
|
|
32349
|
-
maxFiles > 1 ?
|
|
32665
|
+
accept ? t("upload.accepted", { accept }) : null,
|
|
32666
|
+
maxSize ? t("upload.maxSize", { size: formatFileSize(maxSize) }) : null,
|
|
32667
|
+
maxFiles > 1 ? t("upload.maxFiles", { count: maxFiles }) : null
|
|
32350
32668
|
].filter(Boolean).join(". ");
|
|
32351
32669
|
const validateFiles = useCallback(
|
|
32352
32670
|
(files) => {
|
|
32353
32671
|
if (files.length > maxFiles) {
|
|
32354
|
-
return { valid: [], error:
|
|
32672
|
+
return { valid: [], error: t("upload.error.maxFiles", { count: maxFiles }) };
|
|
32355
32673
|
}
|
|
32356
32674
|
if (accept) {
|
|
32357
|
-
const acceptedTypes = accept.split(",").map((
|
|
32675
|
+
const acceptedTypes = accept.split(",").map((s) => s.trim());
|
|
32358
32676
|
const invalid = files.filter((file) => {
|
|
32359
32677
|
return !acceptedTypes.some((type) => {
|
|
32360
32678
|
if (type.endsWith("/*")) {
|
|
@@ -32364,7 +32682,7 @@ var init_UploadDropZone = __esm({
|
|
|
32364
32682
|
});
|
|
32365
32683
|
});
|
|
32366
32684
|
if (invalid.length > 0) {
|
|
32367
|
-
return { valid: [], error:
|
|
32685
|
+
return { valid: [], error: t("upload.error.invalidType", { name: invalid[0].name }) };
|
|
32368
32686
|
}
|
|
32369
32687
|
}
|
|
32370
32688
|
if (maxSize) {
|
|
@@ -32372,13 +32690,13 @@ var init_UploadDropZone = __esm({
|
|
|
32372
32690
|
if (tooLarge.length > 0) {
|
|
32373
32691
|
return {
|
|
32374
32692
|
valid: [],
|
|
32375
|
-
error:
|
|
32693
|
+
error: t("upload.error.tooLarge", { name: tooLarge[0].name, size: formatFileSize(maxSize) })
|
|
32376
32694
|
};
|
|
32377
32695
|
}
|
|
32378
32696
|
}
|
|
32379
32697
|
return { valid: files, error: null };
|
|
32380
32698
|
},
|
|
32381
|
-
[accept, maxSize, maxFiles]
|
|
32699
|
+
[accept, maxSize, maxFiles, t]
|
|
32382
32700
|
);
|
|
32383
32701
|
const handleFiles = useCallback(
|
|
32384
32702
|
(files) => {
|
|
@@ -32449,7 +32767,7 @@ var init_UploadDropZone = __esm({
|
|
|
32449
32767
|
handleClick();
|
|
32450
32768
|
}
|
|
32451
32769
|
},
|
|
32452
|
-
"aria-label":
|
|
32770
|
+
"aria-label": resolvedLabel,
|
|
32453
32771
|
children: [
|
|
32454
32772
|
/* @__PURE__ */ jsx(
|
|
32455
32773
|
"input",
|
|
@@ -32465,7 +32783,7 @@ var init_UploadDropZone = __esm({
|
|
|
32465
32783
|
}
|
|
32466
32784
|
),
|
|
32467
32785
|
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" }),
|
|
32468
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? "
|
|
32786
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-center font-medium mb-1", children: isDragOver ? t("upload.dropFilesHere") : resolvedLabel }),
|
|
32469
32787
|
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 })
|
|
32470
32788
|
]
|
|
32471
32789
|
}
|
|
@@ -32887,7 +33205,7 @@ function TableView({
|
|
|
32887
33205
|
{
|
|
32888
33206
|
checked: selected.has(id),
|
|
32889
33207
|
onChange: () => toggleRow(id),
|
|
32890
|
-
"aria-label":
|
|
33208
|
+
"aria-label": t("table.selectRow", { id })
|
|
32891
33209
|
}
|
|
32892
33210
|
) }),
|
|
32893
33211
|
hasRenderProp ? /* @__PURE__ */ jsx(Box, { className: "flex-1 min-w-0", children: children(row, index) }) : colDefs.map((col) => {
|
|
@@ -35734,7 +36052,7 @@ var init_QrScanner = __esm({
|
|
|
35734
36052
|
className: "inset-0 flex-col items-center justify-center gap-2 bg-black bg-opacity-80 text-center",
|
|
35735
36053
|
children: [
|
|
35736
36054
|
/* @__PURE__ */ jsx(Icon, { name: "camera", className: "h-8 w-8 text-white", "aria-hidden": "true" }),
|
|
35737
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
36055
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.cameraUnavailable") }),
|
|
35738
36056
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-white opacity-70", children: cameraError.message })
|
|
35739
36057
|
]
|
|
35740
36058
|
}
|
|
@@ -35745,7 +36063,7 @@ var init_QrScanner = __esm({
|
|
|
35745
36063
|
position: "absolute",
|
|
35746
36064
|
display: "flex",
|
|
35747
36065
|
className: "inset-0 items-center justify-center bg-black bg-opacity-60",
|
|
35748
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: "
|
|
36066
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-white", children: t("qrScanner.paused") })
|
|
35749
36067
|
}
|
|
35750
36068
|
),
|
|
35751
36069
|
showCameraControls && /* @__PURE__ */ jsxs(
|
|
@@ -35764,7 +36082,7 @@ var init_QrScanner = __esm({
|
|
|
35764
36082
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
35765
36083
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
35766
36084
|
),
|
|
35767
|
-
"aria-label": isPaused ? "
|
|
36085
|
+
"aria-label": isPaused ? t("qrScanner.resumeScanning") : t("qrScanner.pauseScanning"),
|
|
35768
36086
|
children: isPaused ? /* @__PURE__ */ jsx(Icon, { name: "play", className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Icon, { name: "pause", className: "h-4 w-4" })
|
|
35769
36087
|
}
|
|
35770
36088
|
),
|
|
@@ -35777,7 +36095,7 @@ var init_QrScanner = __esm({
|
|
|
35777
36095
|
"rounded-full bg-black bg-opacity-60 p-2 text-white",
|
|
35778
36096
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
35779
36097
|
),
|
|
35780
|
-
"aria-label":
|
|
36098
|
+
"aria-label": currentFacing === "environment" ? t("qrScanner.switchToFrontCamera") : t("qrScanner.switchToRearCamera"),
|
|
35781
36099
|
children: /* @__PURE__ */ jsx(Icon, { name: "refresh-cw", className: "h-4 w-4" })
|
|
35782
36100
|
}
|
|
35783
36101
|
),
|
|
@@ -35791,7 +36109,7 @@ var init_QrScanner = __esm({
|
|
|
35791
36109
|
"hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-white"
|
|
35792
36110
|
),
|
|
35793
36111
|
"aria-label": t("aria.mockScanDev"),
|
|
35794
|
-
children: "
|
|
36112
|
+
children: t("qrScanner.mockScan")
|
|
35795
36113
|
}
|
|
35796
36114
|
)
|
|
35797
36115
|
]
|
|
@@ -35809,6 +36127,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35809
36127
|
"components/core/molecules/OptionConstraintGroup.tsx"() {
|
|
35810
36128
|
init_cn();
|
|
35811
36129
|
init_useEventBus();
|
|
36130
|
+
init_useTranslate();
|
|
35812
36131
|
init_Typography();
|
|
35813
36132
|
init_Box();
|
|
35814
36133
|
init_Label();
|
|
@@ -35818,36 +36137,36 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35818
36137
|
const sign = delta >= 0 ? "+" : "-";
|
|
35819
36138
|
return `${sign}$${Math.abs(delta).toFixed(2)}`;
|
|
35820
36139
|
};
|
|
35821
|
-
constraintHint = (constraint) => {
|
|
36140
|
+
constraintHint = (constraint, t) => {
|
|
35822
36141
|
if (constraint.type === "single") {
|
|
35823
|
-
return constraint.required ? "
|
|
36142
|
+
return constraint.required ? t("optionConstraint.requiredOne") : t("optionConstraint.optionalOne");
|
|
35824
36143
|
}
|
|
35825
36144
|
const { min, max } = constraint;
|
|
35826
36145
|
if (min && max) {
|
|
35827
|
-
return min === max ?
|
|
36146
|
+
return min === max ? t("optionConstraint.pickExactly", { count: min }) : t("optionConstraint.pickRange", { min, max });
|
|
35828
36147
|
}
|
|
35829
|
-
if (min) return
|
|
35830
|
-
if (max) return
|
|
35831
|
-
return "
|
|
36148
|
+
if (min) return t("optionConstraint.pickAtLeast", { count: min });
|
|
36149
|
+
if (max) return t("optionConstraint.pickUpTo", { count: max });
|
|
36150
|
+
return t("optionConstraint.optional");
|
|
35832
36151
|
};
|
|
35833
|
-
validateSelection = (selected, constraint) => {
|
|
36152
|
+
validateSelection = (selected, constraint, t) => {
|
|
35834
36153
|
if (constraint.type === "single") {
|
|
35835
36154
|
if (constraint.required && selected.length === 0) {
|
|
35836
|
-
return "
|
|
36155
|
+
return t("optionConstraint.error.pickOne");
|
|
35837
36156
|
}
|
|
35838
36157
|
if (selected.length > 1) {
|
|
35839
|
-
return "
|
|
36158
|
+
return t("optionConstraint.error.pickOnlyOne");
|
|
35840
36159
|
}
|
|
35841
36160
|
return void 0;
|
|
35842
36161
|
}
|
|
35843
36162
|
const { min, max } = constraint;
|
|
35844
36163
|
if (min !== void 0 && selected.length < min) {
|
|
35845
36164
|
const remaining = min - selected.length;
|
|
35846
|
-
return
|
|
36165
|
+
return t("optionConstraint.error.pickMore", { count: remaining });
|
|
35847
36166
|
}
|
|
35848
36167
|
if (max !== void 0 && selected.length > max) {
|
|
35849
36168
|
const excess = selected.length - max;
|
|
35850
|
-
return
|
|
36169
|
+
return t("optionConstraint.error.removeOptions", { count: excess });
|
|
35851
36170
|
}
|
|
35852
36171
|
return void 0;
|
|
35853
36172
|
};
|
|
@@ -35864,8 +36183,9 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35864
36183
|
className
|
|
35865
36184
|
}) => {
|
|
35866
36185
|
const eventBus = useEventBus();
|
|
35867
|
-
const
|
|
35868
|
-
const
|
|
36186
|
+
const { t } = useTranslate();
|
|
36187
|
+
const hint = constraintHint(constraint, t);
|
|
36188
|
+
const error = validateSelection(selected, constraint, t);
|
|
35869
36189
|
const inputName = `option-${groupId}`;
|
|
35870
36190
|
const labelTextSize = size === "sm" ? "text-sm" : "text-base";
|
|
35871
36191
|
const optionGap = size === "sm" ? "gap-2" : "gap-2.5";
|
|
@@ -35965,7 +36285,7 @@ var init_OptionConstraintGroup = __esm({
|
|
|
35965
36285
|
variant: "caption",
|
|
35966
36286
|
color: "warning",
|
|
35967
36287
|
className: "rounded border border-warning/40 px-1.5 py-0.5",
|
|
35968
|
-
children: "
|
|
36288
|
+
children: t("optionConstraint.outOfStock")
|
|
35969
36289
|
}
|
|
35970
36290
|
)
|
|
35971
36291
|
]
|
|
@@ -36287,6 +36607,7 @@ function changeBlockType(block, type) {
|
|
|
36287
36607
|
return { id: block.id, type, content: seed };
|
|
36288
36608
|
}
|
|
36289
36609
|
function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
36610
|
+
const { t } = useTranslate();
|
|
36290
36611
|
const [open, setOpen] = useState(false);
|
|
36291
36612
|
const ref = useRef(null);
|
|
36292
36613
|
useEffect(() => {
|
|
@@ -36306,7 +36627,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36306
36627
|
{
|
|
36307
36628
|
type: "button",
|
|
36308
36629
|
variant: "ghost",
|
|
36309
|
-
"aria-label": "
|
|
36630
|
+
"aria-label": t("richBlockEditor.blockActions"),
|
|
36310
36631
|
className: cn(
|
|
36311
36632
|
"inline-flex items-center justify-center",
|
|
36312
36633
|
"h-6 w-6 rounded-sm p-0 gap-0",
|
|
@@ -36328,7 +36649,7 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36328
36649
|
"py-1 text-sm"
|
|
36329
36650
|
),
|
|
36330
36651
|
children: [
|
|
36331
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children:
|
|
36652
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t(BLOCK_TYPE_LABEL_KEY[block.type]) }),
|
|
36332
36653
|
/* @__PURE__ */ jsxs(
|
|
36333
36654
|
Button,
|
|
36334
36655
|
{
|
|
@@ -36342,7 +36663,8 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36342
36663
|
},
|
|
36343
36664
|
children: [
|
|
36344
36665
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3.5 h-3.5" }),
|
|
36345
|
-
"
|
|
36666
|
+
" ",
|
|
36667
|
+
t("richBlockEditor.duplicate")
|
|
36346
36668
|
]
|
|
36347
36669
|
}
|
|
36348
36670
|
),
|
|
@@ -36359,14 +36681,15 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36359
36681
|
},
|
|
36360
36682
|
children: [
|
|
36361
36683
|
/* @__PURE__ */ jsx(Icon, { name: "trash", className: "w-3.5 h-3.5" }),
|
|
36362
|
-
"
|
|
36684
|
+
" ",
|
|
36685
|
+
t("common.delete")
|
|
36363
36686
|
]
|
|
36364
36687
|
}
|
|
36365
36688
|
),
|
|
36366
36689
|
CHANGEABLE_TYPES.includes(block.type) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36367
36690
|
/* @__PURE__ */ jsx(Box, { className: "my-1 border-t border-border" }),
|
|
36368
|
-
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: "
|
|
36369
|
-
CHANGEABLE_TYPES.filter((
|
|
36691
|
+
/* @__PURE__ */ jsx(Box, { className: "px-2 py-1 text-xs uppercase tracking-wide text-muted-foreground", children: t("richBlockEditor.turnInto") }),
|
|
36692
|
+
CHANGEABLE_TYPES.filter((bt) => bt !== block.type).map((bt) => /* @__PURE__ */ jsx(
|
|
36370
36693
|
Button,
|
|
36371
36694
|
{
|
|
36372
36695
|
type: "button",
|
|
@@ -36374,12 +36697,12 @@ function BlockMenu({ block, readOnly, onDelete, onDuplicate, onChangeType }) {
|
|
|
36374
36697
|
role: "menuitem",
|
|
36375
36698
|
className: "flex w-full items-center gap-2 px-2 py-1.5 text-left justify-start rounded-none",
|
|
36376
36699
|
onClick: () => {
|
|
36377
|
-
onChangeType(
|
|
36700
|
+
onChangeType(bt);
|
|
36378
36701
|
setOpen(false);
|
|
36379
36702
|
},
|
|
36380
|
-
children:
|
|
36703
|
+
children: t(BLOCK_TYPE_LABEL_KEY[bt])
|
|
36381
36704
|
},
|
|
36382
|
-
|
|
36705
|
+
bt
|
|
36383
36706
|
))
|
|
36384
36707
|
] })
|
|
36385
36708
|
]
|
|
@@ -36441,6 +36764,7 @@ function BlockRow({
|
|
|
36441
36764
|
onInsertAfter,
|
|
36442
36765
|
onChangeType
|
|
36443
36766
|
}) {
|
|
36767
|
+
const { t } = useTranslate();
|
|
36444
36768
|
const setContent = useCallback(
|
|
36445
36769
|
(next) => onUpdate((b) => ({ ...b, content: next })),
|
|
36446
36770
|
[onUpdate]
|
|
@@ -36490,8 +36814,8 @@ function BlockRow({
|
|
|
36490
36814
|
tag: "h1",
|
|
36491
36815
|
value: block.content ?? "",
|
|
36492
36816
|
readOnly,
|
|
36493
|
-
placeholder: placeholder ?? "
|
|
36494
|
-
ariaLabel: "
|
|
36817
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading1"),
|
|
36818
|
+
ariaLabel: t("richBlockEditor.aria.heading1Block"),
|
|
36495
36819
|
className: "text-3xl font-bold leading-tight",
|
|
36496
36820
|
onValueChange: setContent
|
|
36497
36821
|
}
|
|
@@ -36503,8 +36827,8 @@ function BlockRow({
|
|
|
36503
36827
|
tag: "h2",
|
|
36504
36828
|
value: block.content ?? "",
|
|
36505
36829
|
readOnly,
|
|
36506
|
-
placeholder: placeholder ?? "
|
|
36507
|
-
ariaLabel: "
|
|
36830
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading2"),
|
|
36831
|
+
ariaLabel: t("richBlockEditor.aria.heading2Block"),
|
|
36508
36832
|
className: "text-2xl font-semibold leading-tight",
|
|
36509
36833
|
onValueChange: setContent
|
|
36510
36834
|
}
|
|
@@ -36516,8 +36840,8 @@ function BlockRow({
|
|
|
36516
36840
|
tag: "h3",
|
|
36517
36841
|
value: block.content ?? "",
|
|
36518
36842
|
readOnly,
|
|
36519
|
-
placeholder: placeholder ?? "
|
|
36520
|
-
ariaLabel: "
|
|
36843
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.heading3"),
|
|
36844
|
+
ariaLabel: t("richBlockEditor.aria.heading3Block"),
|
|
36521
36845
|
className: "text-xl font-semibold leading-tight",
|
|
36522
36846
|
onValueChange: setContent
|
|
36523
36847
|
}
|
|
@@ -36529,8 +36853,8 @@ function BlockRow({
|
|
|
36529
36853
|
tag: "blockquote",
|
|
36530
36854
|
value: block.content ?? "",
|
|
36531
36855
|
readOnly,
|
|
36532
|
-
placeholder: placeholder ?? "
|
|
36533
|
-
ariaLabel: "
|
|
36856
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.quote"),
|
|
36857
|
+
ariaLabel: t("richBlockEditor.aria.quoteBlock"),
|
|
36534
36858
|
className: "border-l-4 border-primary/60 pl-4 italic text-muted-foreground",
|
|
36535
36859
|
onValueChange: setContent
|
|
36536
36860
|
}
|
|
@@ -36538,13 +36862,13 @@ function BlockRow({
|
|
|
36538
36862
|
case "code":
|
|
36539
36863
|
return /* @__PURE__ */ jsxs(Box, { className: "rounded-md border border-border bg-muted/40", children: [
|
|
36540
36864
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b border-border px-3 py-1 text-xs text-muted-foreground", children: [
|
|
36541
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: "
|
|
36865
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "uppercase tracking-wide", children: t("richBlockEditor.blockType.code") }),
|
|
36542
36866
|
!readOnly && /* @__PURE__ */ jsx(
|
|
36543
36867
|
Input,
|
|
36544
36868
|
{
|
|
36545
36869
|
inputType: "text",
|
|
36546
36870
|
value: String(block.metadata?.language ?? "plaintext"),
|
|
36547
|
-
"aria-label": "
|
|
36871
|
+
"aria-label": t("richBlockEditor.aria.codeLanguage"),
|
|
36548
36872
|
className: cn(
|
|
36549
36873
|
"h-6 w-32 rounded-sm border border-border bg-background",
|
|
36550
36874
|
"px-2 text-xs outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -36560,8 +36884,8 @@ function BlockRow({
|
|
|
36560
36884
|
tag: "pre",
|
|
36561
36885
|
value: block.content ?? "",
|
|
36562
36886
|
readOnly,
|
|
36563
|
-
placeholder: placeholder ?? "
|
|
36564
|
-
ariaLabel: "
|
|
36887
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.code"),
|
|
36888
|
+
ariaLabel: t("richBlockEditor.aria.codeBlock"),
|
|
36565
36889
|
className: "block whitespace-pre-wrap p-3 font-mono text-sm leading-relaxed",
|
|
36566
36890
|
onValueChange: setContent
|
|
36567
36891
|
}
|
|
@@ -36574,7 +36898,7 @@ function BlockRow({
|
|
|
36574
36898
|
const caption = String(block.metadata?.caption ?? "");
|
|
36575
36899
|
const imgProps = {
|
|
36576
36900
|
src: url,
|
|
36577
|
-
alt: caption || "
|
|
36901
|
+
alt: caption || t("richBlockEditor.embeddedImage"),
|
|
36578
36902
|
className: "max-h-96 w-full rounded-md border border-border object-contain"
|
|
36579
36903
|
};
|
|
36580
36904
|
return /* @__PURE__ */ jsxs(Box, { className: "space-y-2", children: [
|
|
@@ -36588,7 +36912,8 @@ function BlockRow({
|
|
|
36588
36912
|
),
|
|
36589
36913
|
children: [
|
|
36590
36914
|
/* @__PURE__ */ jsx(Icon, { name: "image", className: "mr-2 w-4 h-4" }),
|
|
36591
|
-
"
|
|
36915
|
+
" ",
|
|
36916
|
+
t("richBlockEditor.noImageUrl")
|
|
36592
36917
|
]
|
|
36593
36918
|
}
|
|
36594
36919
|
),
|
|
@@ -36599,7 +36924,7 @@ function BlockRow({
|
|
|
36599
36924
|
inputType: "url",
|
|
36600
36925
|
value: url,
|
|
36601
36926
|
placeholder: "https://example.com/image.png",
|
|
36602
|
-
"aria-label": "
|
|
36927
|
+
"aria-label": t("richBlockEditor.aria.imageUrl"),
|
|
36603
36928
|
className: cn(
|
|
36604
36929
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
36605
36930
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -36612,8 +36937,8 @@ function BlockRow({
|
|
|
36612
36937
|
{
|
|
36613
36938
|
inputType: "text",
|
|
36614
36939
|
value: caption,
|
|
36615
|
-
placeholder: "
|
|
36616
|
-
"aria-label": "
|
|
36940
|
+
placeholder: t("richBlockEditor.placeholder.caption"),
|
|
36941
|
+
"aria-label": t("richBlockEditor.aria.imageCaption"),
|
|
36617
36942
|
className: cn(
|
|
36618
36943
|
"h-8 flex-1 rounded-sm border border-border bg-background",
|
|
36619
36944
|
"px-2 text-sm outline-none focus:ring-1 focus:ring-ring"
|
|
@@ -36644,8 +36969,8 @@ function BlockRow({
|
|
|
36644
36969
|
tag: "span",
|
|
36645
36970
|
value: child.content ?? "",
|
|
36646
36971
|
readOnly,
|
|
36647
|
-
placeholder: "
|
|
36648
|
-
ariaLabel: "
|
|
36972
|
+
placeholder: t("richBlockEditor.placeholder.listItem"),
|
|
36973
|
+
ariaLabel: t("richBlockEditor.aria.listItem"),
|
|
36649
36974
|
className: "inline-block min-w-[1ch] flex-1",
|
|
36650
36975
|
onValueChange: (next) => setChildContent(child.id, next)
|
|
36651
36976
|
}
|
|
@@ -36655,7 +36980,7 @@ function BlockRow({
|
|
|
36655
36980
|
{
|
|
36656
36981
|
type: "button",
|
|
36657
36982
|
variant: "ghost",
|
|
36658
|
-
"aria-label": "
|
|
36983
|
+
"aria-label": t("richBlockEditor.aria.removeListItem"),
|
|
36659
36984
|
className: cn(
|
|
36660
36985
|
"h-5 w-5 shrink-0 rounded-sm text-muted-foreground p-0 gap-0",
|
|
36661
36986
|
"opacity-0 group-hover/item:opacity-100 hover:bg-muted hover:text-foreground"
|
|
@@ -36677,7 +37002,8 @@ function BlockRow({
|
|
|
36677
37002
|
onClick: addListItem,
|
|
36678
37003
|
children: [
|
|
36679
37004
|
/* @__PURE__ */ jsx(Icon, { name: "plus", className: "w-3 h-3" }),
|
|
36680
|
-
"
|
|
37005
|
+
" ",
|
|
37006
|
+
t("richBlockEditor.addItem")
|
|
36681
37007
|
]
|
|
36682
37008
|
}
|
|
36683
37009
|
) })
|
|
@@ -36693,8 +37019,8 @@ function BlockRow({
|
|
|
36693
37019
|
tag: "p",
|
|
36694
37020
|
value: block.content ?? "",
|
|
36695
37021
|
readOnly,
|
|
36696
|
-
placeholder: placeholder ?? "
|
|
36697
|
-
ariaLabel: "
|
|
37022
|
+
placeholder: placeholder ?? t("richBlockEditor.placeholder.paragraph"),
|
|
37023
|
+
ariaLabel: t("richBlockEditor.aria.paragraphBlock"),
|
|
36698
37024
|
className: "leading-7",
|
|
36699
37025
|
onValueChange: setContent
|
|
36700
37026
|
}
|
|
@@ -36717,7 +37043,7 @@ function BlockRow({
|
|
|
36717
37043
|
{
|
|
36718
37044
|
type: "button",
|
|
36719
37045
|
variant: "ghost",
|
|
36720
|
-
"aria-label": "
|
|
37046
|
+
"aria-label": t("richBlockEditor.insertParagraphBelow"),
|
|
36721
37047
|
className: cn(
|
|
36722
37048
|
"inline-flex h-6 w-6 items-center justify-center rounded-sm p-0 gap-0",
|
|
36723
37049
|
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
@@ -36744,7 +37070,7 @@ function BlockRow({
|
|
|
36744
37070
|
}
|
|
36745
37071
|
);
|
|
36746
37072
|
}
|
|
36747
|
-
var TOOLBAR_ENTRIES,
|
|
37073
|
+
var TOOLBAR_ENTRIES, BLOCK_TYPE_LABEL_KEY, CHANGEABLE_TYPES, _idSeq, BLOCK_TYPES, RichBlockEditor;
|
|
36748
37074
|
var init_RichBlockEditor = __esm({
|
|
36749
37075
|
"components/core/molecules/RichBlockEditor.tsx"() {
|
|
36750
37076
|
"use client";
|
|
@@ -36757,29 +37083,30 @@ var init_RichBlockEditor = __esm({
|
|
|
36757
37083
|
init_Input();
|
|
36758
37084
|
init_Icon();
|
|
36759
37085
|
init_useEventBus();
|
|
37086
|
+
init_useTranslate();
|
|
36760
37087
|
TOOLBAR_ENTRIES = [
|
|
36761
|
-
{ type: "paragraph",
|
|
36762
|
-
{ type: "heading-1",
|
|
36763
|
-
{ type: "heading-2",
|
|
36764
|
-
{ type: "heading-3",
|
|
36765
|
-
{ type: "bullet-list",
|
|
36766
|
-
{ type: "numbered-list",
|
|
36767
|
-
{ type: "quote",
|
|
36768
|
-
{ type: "code",
|
|
36769
|
-
{ type: "divider",
|
|
36770
|
-
{ type: "image",
|
|
37088
|
+
{ type: "paragraph", labelKey: "richBlockEditor.toolbar.text", icon: Type },
|
|
37089
|
+
{ type: "heading-1", labelKey: "richBlockEditor.toolbar.h1", icon: Heading1 },
|
|
37090
|
+
{ type: "heading-2", labelKey: "richBlockEditor.toolbar.h2", icon: Heading2 },
|
|
37091
|
+
{ type: "heading-3", labelKey: "richBlockEditor.toolbar.h3", icon: Heading3 },
|
|
37092
|
+
{ type: "bullet-list", labelKey: "richBlockEditor.toolbar.bulletList", icon: List },
|
|
37093
|
+
{ type: "numbered-list", labelKey: "richBlockEditor.toolbar.numbered", icon: ListOrdered },
|
|
37094
|
+
{ type: "quote", labelKey: "richBlockEditor.toolbar.quote", icon: Quote },
|
|
37095
|
+
{ type: "code", labelKey: "richBlockEditor.toolbar.code", icon: Code },
|
|
37096
|
+
{ type: "divider", labelKey: "richBlockEditor.toolbar.divider", icon: Minus },
|
|
37097
|
+
{ type: "image", labelKey: "richBlockEditor.toolbar.image", icon: Image$1 }
|
|
36771
37098
|
];
|
|
36772
|
-
|
|
36773
|
-
paragraph: "
|
|
36774
|
-
"heading-1": "
|
|
36775
|
-
"heading-2": "
|
|
36776
|
-
"heading-3": "
|
|
36777
|
-
"bullet-list": "
|
|
36778
|
-
"numbered-list": "
|
|
36779
|
-
quote: "
|
|
36780
|
-
code: "
|
|
36781
|
-
divider: "
|
|
36782
|
-
image: "
|
|
37099
|
+
BLOCK_TYPE_LABEL_KEY = {
|
|
37100
|
+
paragraph: "richBlockEditor.blockType.paragraph",
|
|
37101
|
+
"heading-1": "richBlockEditor.blockType.heading1",
|
|
37102
|
+
"heading-2": "richBlockEditor.blockType.heading2",
|
|
37103
|
+
"heading-3": "richBlockEditor.blockType.heading3",
|
|
37104
|
+
"bullet-list": "richBlockEditor.blockType.bulletList",
|
|
37105
|
+
"numbered-list": "richBlockEditor.blockType.numberedList",
|
|
37106
|
+
quote: "richBlockEditor.blockType.quote",
|
|
37107
|
+
code: "richBlockEditor.blockType.code",
|
|
37108
|
+
divider: "richBlockEditor.blockType.divider",
|
|
37109
|
+
image: "richBlockEditor.blockType.image"
|
|
36783
37110
|
};
|
|
36784
37111
|
CHANGEABLE_TYPES = [
|
|
36785
37112
|
"paragraph",
|
|
@@ -36813,6 +37140,7 @@ var init_RichBlockEditor = __esm({
|
|
|
36813
37140
|
showToolbar = true,
|
|
36814
37141
|
className
|
|
36815
37142
|
}) => {
|
|
37143
|
+
const { t } = useTranslate();
|
|
36816
37144
|
const [blocks, setBlocks] = useState(
|
|
36817
37145
|
() => normalizeBlocks(initialBlocks)
|
|
36818
37146
|
);
|
|
@@ -36884,25 +37212,26 @@ var init_RichBlockEditor = __esm({
|
|
|
36884
37212
|
Box,
|
|
36885
37213
|
{
|
|
36886
37214
|
role: "toolbar",
|
|
36887
|
-
"aria-label": "
|
|
37215
|
+
"aria-label": t("richBlockEditor.editorToolbar"),
|
|
36888
37216
|
className: cn(
|
|
36889
37217
|
"flex flex-wrap items-center gap-1",
|
|
36890
37218
|
"border-b border-border bg-muted/30 px-2 py-2"
|
|
36891
37219
|
),
|
|
36892
37220
|
children: TOOLBAR_ENTRIES.map((entry) => {
|
|
36893
37221
|
const Icon3 = entry.icon;
|
|
37222
|
+
const entryLabel = t(entry.labelKey);
|
|
36894
37223
|
return /* @__PURE__ */ jsxs(
|
|
36895
37224
|
Button,
|
|
36896
37225
|
{
|
|
36897
37226
|
type: "button",
|
|
36898
37227
|
variant: "ghost",
|
|
36899
37228
|
size: "sm",
|
|
36900
|
-
"aria-label":
|
|
36901
|
-
title:
|
|
37229
|
+
"aria-label": t("richBlockEditor.insertEntry", { label: entryLabel }),
|
|
37230
|
+
title: entryLabel,
|
|
36902
37231
|
onClick: () => handleAppend(entry.type),
|
|
36903
37232
|
children: [
|
|
36904
37233
|
/* @__PURE__ */ jsx(Icon3, { size: 14 }),
|
|
36905
|
-
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children:
|
|
37234
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", variant: "caption", className: "ml-1 hidden text-xs sm:inline", children: entryLabel })
|
|
36906
37235
|
]
|
|
36907
37236
|
},
|
|
36908
37237
|
entry.type
|
|
@@ -36945,6 +37274,7 @@ var init_ReplyTree = __esm({
|
|
|
36945
37274
|
"use client";
|
|
36946
37275
|
init_cn();
|
|
36947
37276
|
init_useEventBus();
|
|
37277
|
+
init_useTranslate();
|
|
36948
37278
|
init_atoms2();
|
|
36949
37279
|
init_VoteStack();
|
|
36950
37280
|
ReplyTreeNode = ({
|
|
@@ -36964,6 +37294,7 @@ var init_ReplyTree = __esm({
|
|
|
36964
37294
|
showActions
|
|
36965
37295
|
}) => {
|
|
36966
37296
|
const eventBus = useEventBus();
|
|
37297
|
+
const { t } = useTranslate();
|
|
36967
37298
|
const hasReplies = !!node.replies && node.replies.length > 0;
|
|
36968
37299
|
const isCollapsed = collapsedSet.has(node.id);
|
|
36969
37300
|
const atMaxDepth = depth >= maxDepth;
|
|
@@ -37010,7 +37341,7 @@ var init_ReplyTree = __esm({
|
|
|
37010
37341
|
variant: "ghost",
|
|
37011
37342
|
size: "sm",
|
|
37012
37343
|
onClick: handleToggle,
|
|
37013
|
-
"aria-label": isCollapsed ? "
|
|
37344
|
+
"aria-label": isCollapsed ? t("replyTree.expandReplies") : t("replyTree.collapseReplies"),
|
|
37014
37345
|
"aria-expanded": !isCollapsed,
|
|
37015
37346
|
leftIcon: isCollapsed ? "chevron-right" : "chevron-down",
|
|
37016
37347
|
className: cn(
|
|
@@ -37051,7 +37382,7 @@ var init_ReplyTree = __esm({
|
|
|
37051
37382
|
onVote: handleVote,
|
|
37052
37383
|
size: "sm",
|
|
37053
37384
|
variant: "horizontal",
|
|
37054
|
-
label:
|
|
37385
|
+
label: t("replyTree.voteOnReplyBy", { author: node.authorName })
|
|
37055
37386
|
}
|
|
37056
37387
|
),
|
|
37057
37388
|
/* @__PURE__ */ jsx(
|
|
@@ -37061,8 +37392,8 @@ var init_ReplyTree = __esm({
|
|
|
37061
37392
|
size: "sm",
|
|
37062
37393
|
leftIcon: "message-square",
|
|
37063
37394
|
onClick: handleReply,
|
|
37064
|
-
"aria-label":
|
|
37065
|
-
children: "
|
|
37395
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName }),
|
|
37396
|
+
children: t("replyTree.reply")
|
|
37066
37397
|
}
|
|
37067
37398
|
),
|
|
37068
37399
|
/* @__PURE__ */ jsx(
|
|
@@ -37072,8 +37403,8 @@ var init_ReplyTree = __esm({
|
|
|
37072
37403
|
size: "sm",
|
|
37073
37404
|
leftIcon: "flag",
|
|
37074
37405
|
onClick: handleFlag,
|
|
37075
|
-
"aria-label":
|
|
37076
|
-
children: "
|
|
37406
|
+
"aria-label": t("replyTree.flagReplyBy", { author: node.authorName }),
|
|
37407
|
+
children: t("replyTree.flag")
|
|
37077
37408
|
}
|
|
37078
37409
|
)
|
|
37079
37410
|
] }),
|
|
@@ -37084,9 +37415,9 @@ var init_ReplyTree = __esm({
|
|
|
37084
37415
|
inputType: "textarea",
|
|
37085
37416
|
rows: 2,
|
|
37086
37417
|
value: draft,
|
|
37087
|
-
placeholder:
|
|
37418
|
+
placeholder: t("replyTree.replyToPlaceholder", { author: node.authorName }),
|
|
37088
37419
|
onChange: (e) => setDraft(e.target.value),
|
|
37089
|
-
"aria-label":
|
|
37420
|
+
"aria-label": t("replyTree.replyTo", { author: node.authorName })
|
|
37090
37421
|
}
|
|
37091
37422
|
),
|
|
37092
37423
|
/* @__PURE__ */ jsxs(Box, { className: "flex flex-row gap-2 items-center", children: [
|
|
@@ -37098,10 +37429,10 @@ var init_ReplyTree = __esm({
|
|
|
37098
37429
|
leftIcon: "send",
|
|
37099
37430
|
onClick: handleSubmitReply,
|
|
37100
37431
|
disabled: !draft.trim(),
|
|
37101
|
-
children: "
|
|
37432
|
+
children: t("replyTree.send")
|
|
37102
37433
|
}
|
|
37103
37434
|
),
|
|
37104
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: "
|
|
37435
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancelReply, children: t("common.cancel") })
|
|
37105
37436
|
] })
|
|
37106
37437
|
] }),
|
|
37107
37438
|
hasReplies && !isCollapsed && (atMaxDepth ? /* @__PURE__ */ jsx(
|
|
@@ -37115,7 +37446,7 @@ var init_ReplyTree = __esm({
|
|
|
37115
37446
|
"self-start gap-1 px-0 h-auto",
|
|
37116
37447
|
"text-sm text-primary hover:underline hover:bg-transparent"
|
|
37117
37448
|
),
|
|
37118
|
-
children: "
|
|
37449
|
+
children: t("replyTree.continueThread")
|
|
37119
37450
|
}
|
|
37120
37451
|
) : /* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-2 mt-1", children: node.replies.map((child) => /* @__PURE__ */ jsx(
|
|
37121
37452
|
ReplyTreeNode,
|
|
@@ -37154,6 +37485,7 @@ var init_ReplyTree = __esm({
|
|
|
37154
37485
|
showActions = true,
|
|
37155
37486
|
className
|
|
37156
37487
|
}) => {
|
|
37488
|
+
const { t } = useTranslate();
|
|
37157
37489
|
const nodeList = Array.isArray(nodes) ? nodes : nodes ? [nodes] : [];
|
|
37158
37490
|
const [collapsedSet, setCollapsedSet] = useState(() => {
|
|
37159
37491
|
const acc = /* @__PURE__ */ new Set();
|
|
@@ -37172,7 +37504,7 @@ var init_ReplyTree = __esm({
|
|
|
37172
37504
|
});
|
|
37173
37505
|
}, []);
|
|
37174
37506
|
if (nodeList.length === 0) {
|
|
37175
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: "
|
|
37507
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("text-sm text-muted-foreground", className), children: t("replyTree.noRepliesYet") });
|
|
37176
37508
|
}
|
|
37177
37509
|
return /* @__PURE__ */ jsx(Box, { className: cn("flex flex-col gap-2 min-w-0", className), children: nodeList.map((node) => /* @__PURE__ */ jsx(
|
|
37178
37510
|
ReplyTreeNode,
|
|
@@ -37250,6 +37582,7 @@ var init_VersionDiff = __esm({
|
|
|
37250
37582
|
"use client";
|
|
37251
37583
|
init_cn();
|
|
37252
37584
|
init_useEventBus();
|
|
37585
|
+
init_useTranslate();
|
|
37253
37586
|
init_atoms2();
|
|
37254
37587
|
init_Stack();
|
|
37255
37588
|
INLINE_STYLES = {
|
|
@@ -37272,6 +37605,7 @@ var init_VersionDiff = __esm({
|
|
|
37272
37605
|
language,
|
|
37273
37606
|
className
|
|
37274
37607
|
}) => {
|
|
37608
|
+
const { t } = useTranslate();
|
|
37275
37609
|
const eventBus = useEventBus();
|
|
37276
37610
|
const revisions = Array.isArray(revisionsProp) ? revisionsProp : [];
|
|
37277
37611
|
const fallbackBefore = revisions[0]?.id ?? "";
|
|
@@ -37353,24 +37687,24 @@ var init_VersionDiff = __esm({
|
|
|
37353
37687
|
children: [
|
|
37354
37688
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: "flex-wrap", children: [
|
|
37355
37689
|
/* @__PURE__ */ jsx(Icon, { name: "git-commit", size: "sm", className: "text-muted-foreground" }),
|
|
37356
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: "
|
|
37690
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "whitespace-nowrap", children: t("versionDiff.compare") }),
|
|
37357
37691
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
37358
37692
|
Select,
|
|
37359
37693
|
{
|
|
37360
37694
|
options,
|
|
37361
37695
|
value: activeBeforeId,
|
|
37362
37696
|
onChange: handleBeforeChange,
|
|
37363
|
-
"aria-label": "
|
|
37697
|
+
"aria-label": t("versionDiff.beforeRevision")
|
|
37364
37698
|
}
|
|
37365
37699
|
) }),
|
|
37366
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "to" }),
|
|
37700
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: t("versionDiff.to") }),
|
|
37367
37701
|
/* @__PURE__ */ jsx(Box, { className: "min-w-0 md:min-w-[160px]", children: /* @__PURE__ */ jsx(
|
|
37368
37702
|
Select,
|
|
37369
37703
|
{
|
|
37370
37704
|
options,
|
|
37371
37705
|
value: activeAfterId,
|
|
37372
37706
|
onChange: handleAfterChange,
|
|
37373
|
-
"aria-label": "
|
|
37707
|
+
"aria-label": t("versionDiff.afterRevision")
|
|
37374
37708
|
}
|
|
37375
37709
|
) }),
|
|
37376
37710
|
language && /* @__PURE__ */ jsx(Badge, { variant: "default", children: language }),
|
|
@@ -37391,7 +37725,7 @@ var init_VersionDiff = __esm({
|
|
|
37391
37725
|
size: "sm",
|
|
37392
37726
|
icon: activeView === "side-by-side" ? "align-left" : "columns",
|
|
37393
37727
|
onClick: handleViewToggle,
|
|
37394
|
-
"aria-label": activeView === "side-by-side" ? "
|
|
37728
|
+
"aria-label": activeView === "side-by-side" ? t("versionDiff.switchToInline") : t("versionDiff.switchToSideBySide")
|
|
37395
37729
|
}
|
|
37396
37730
|
),
|
|
37397
37731
|
(onRevert || revertEvent) && /* @__PURE__ */ jsx(
|
|
@@ -37401,7 +37735,7 @@ var init_VersionDiff = __esm({
|
|
|
37401
37735
|
size: "sm",
|
|
37402
37736
|
icon: "rotate-ccw",
|
|
37403
37737
|
onClick: handleRevert,
|
|
37404
|
-
children: "
|
|
37738
|
+
children: t("versionDiff.revert")
|
|
37405
37739
|
}
|
|
37406
37740
|
)
|
|
37407
37741
|
] })
|
|
@@ -37418,12 +37752,12 @@ var init_VersionDiff = __esm({
|
|
|
37418
37752
|
children: [
|
|
37419
37753
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
37420
37754
|
beforeRev?.label,
|
|
37421
|
-
beforeRev?.author ?
|
|
37755
|
+
beforeRev?.author ? t("versionDiff.byAuthor", { author: beforeRev.author }) : "",
|
|
37422
37756
|
beforeRev?.timestamp ? ` (${beforeRev.timestamp})` : ""
|
|
37423
37757
|
] }),
|
|
37424
37758
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "truncate", children: [
|
|
37425
37759
|
afterRev?.label,
|
|
37426
|
-
afterRev?.author ?
|
|
37760
|
+
afterRev?.author ? t("versionDiff.byAuthor", { author: afterRev.author }) : "",
|
|
37427
37761
|
afterRev?.timestamp ? ` (${afterRev.timestamp})` : ""
|
|
37428
37762
|
] })
|
|
37429
37763
|
]
|
|
@@ -37816,10 +38150,12 @@ var init_DocPagination = __esm({
|
|
|
37816
38150
|
}
|
|
37817
38151
|
});
|
|
37818
38152
|
function DocSearch({
|
|
37819
|
-
placeholder
|
|
38153
|
+
placeholder,
|
|
37820
38154
|
onSearch,
|
|
37821
38155
|
className
|
|
37822
38156
|
}) {
|
|
38157
|
+
const { t } = useTranslate();
|
|
38158
|
+
const resolvedPlaceholder = placeholder ?? t("docSearch.placeholder");
|
|
37823
38159
|
const [query, setQuery] = useState("");
|
|
37824
38160
|
const [results, setResults] = useState([]);
|
|
37825
38161
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -37926,7 +38262,7 @@ function DocSearch({
|
|
|
37926
38262
|
Input,
|
|
37927
38263
|
{
|
|
37928
38264
|
inputType: "search",
|
|
37929
|
-
placeholder,
|
|
38265
|
+
placeholder: resolvedPlaceholder,
|
|
37930
38266
|
value: query,
|
|
37931
38267
|
onChange: handleChange,
|
|
37932
38268
|
onFocus: handleFocus,
|
|
@@ -37991,6 +38327,7 @@ var init_DocSearch = __esm({
|
|
|
37991
38327
|
init_Typography();
|
|
37992
38328
|
init_Icon();
|
|
37993
38329
|
init_Input();
|
|
38330
|
+
init_useTranslate();
|
|
37994
38331
|
}
|
|
37995
38332
|
});
|
|
37996
38333
|
var DocSidebarCategory, DocSidebar;
|
|
@@ -39586,8 +39923,8 @@ var init_SignaturePad = __esm({
|
|
|
39586
39923
|
init_useEventBus();
|
|
39587
39924
|
init_useTranslate();
|
|
39588
39925
|
SignaturePad = ({
|
|
39589
|
-
label
|
|
39590
|
-
helperText
|
|
39926
|
+
label,
|
|
39927
|
+
helperText,
|
|
39591
39928
|
strokeColor,
|
|
39592
39929
|
strokeWidth = 2,
|
|
39593
39930
|
height = 200,
|
|
@@ -39603,6 +39940,8 @@ var init_SignaturePad = __esm({
|
|
|
39603
39940
|
}) => {
|
|
39604
39941
|
const eventBus = useEventBus();
|
|
39605
39942
|
const { t } = useTranslate();
|
|
39943
|
+
const resolvedLabel = label ?? t("signaturePad.label");
|
|
39944
|
+
const resolvedHelperText = helperText ?? t("signaturePad.helperText");
|
|
39606
39945
|
const canvasRef = useRef(null);
|
|
39607
39946
|
const [isDrawing, setIsDrawing] = useState(false);
|
|
39608
39947
|
const [hasSignature, setHasSignature] = useState(!!value);
|
|
@@ -39705,7 +40044,7 @@ var init_SignaturePad = __esm({
|
|
|
39705
40044
|
);
|
|
39706
40045
|
}
|
|
39707
40046
|
return /* @__PURE__ */ jsx(Card, { className: cn("p-4", className), children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
39708
|
-
|
|
40047
|
+
resolvedLabel && /* @__PURE__ */ jsx(Typography, { variant: "label", weight: "medium", children: resolvedLabel }),
|
|
39709
40048
|
/* @__PURE__ */ jsx(
|
|
39710
40049
|
Box,
|
|
39711
40050
|
{
|
|
@@ -39734,7 +40073,7 @@ var init_SignaturePad = __esm({
|
|
|
39734
40073
|
)
|
|
39735
40074
|
}
|
|
39736
40075
|
),
|
|
39737
|
-
|
|
40076
|
+
resolvedHelperText && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: resolvedHelperText }),
|
|
39738
40077
|
!readOnly && /* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "end", children: [
|
|
39739
40078
|
/* @__PURE__ */ jsx(
|
|
39740
40079
|
Button,
|
|
@@ -39744,7 +40083,7 @@ var init_SignaturePad = __esm({
|
|
|
39744
40083
|
icon: Eraser,
|
|
39745
40084
|
onClick: clearSignature,
|
|
39746
40085
|
disabled: !hasSignature,
|
|
39747
|
-
children: "
|
|
40086
|
+
children: t("signaturePad.clear")
|
|
39748
40087
|
}
|
|
39749
40088
|
),
|
|
39750
40089
|
signEvent && /* @__PURE__ */ jsx(
|
|
@@ -39755,7 +40094,7 @@ var init_SignaturePad = __esm({
|
|
|
39755
40094
|
icon: Check,
|
|
39756
40095
|
onClick: confirmSignature,
|
|
39757
40096
|
disabled: !hasSignature,
|
|
39758
|
-
children: "
|
|
40097
|
+
children: t("signaturePad.confirm")
|
|
39759
40098
|
}
|
|
39760
40099
|
)
|
|
39761
40100
|
] })
|
|
@@ -44200,6 +44539,7 @@ function MasterDetail({
|
|
|
44200
44539
|
className,
|
|
44201
44540
|
...rest
|
|
44202
44541
|
}) {
|
|
44542
|
+
const { t } = useTranslate();
|
|
44203
44543
|
const loading = externalLoading ?? false;
|
|
44204
44544
|
const isLoading = externalIsLoading ?? false;
|
|
44205
44545
|
const error = externalError ?? null;
|
|
@@ -44212,8 +44552,8 @@ function MasterDetail({
|
|
|
44212
44552
|
isLoading: loading || isLoading,
|
|
44213
44553
|
error,
|
|
44214
44554
|
className,
|
|
44215
|
-
emptyTitle: "
|
|
44216
|
-
emptyDescription: "
|
|
44555
|
+
emptyTitle: t("table.empty.title"),
|
|
44556
|
+
emptyDescription: t("empty.createFirst"),
|
|
44217
44557
|
...rest
|
|
44218
44558
|
}
|
|
44219
44559
|
);
|
|
@@ -44222,6 +44562,7 @@ var init_MasterDetail = __esm({
|
|
|
44222
44562
|
"components/core/organisms/MasterDetail.tsx"() {
|
|
44223
44563
|
"use client";
|
|
44224
44564
|
init_DataTable();
|
|
44565
|
+
init_useTranslate();
|
|
44225
44566
|
MasterDetail.displayName = "MasterDetail";
|
|
44226
44567
|
}
|
|
44227
44568
|
});
|
|
@@ -44230,14 +44571,18 @@ var init_MasterDetailLayout = __esm({
|
|
|
44230
44571
|
"components/core/organisms/layout/MasterDetailLayout.tsx"() {
|
|
44231
44572
|
init_cn();
|
|
44232
44573
|
init_Typography();
|
|
44233
|
-
|
|
44234
|
-
|
|
44235
|
-
{
|
|
44236
|
-
|
|
44237
|
-
|
|
44238
|
-
|
|
44239
|
-
|
|
44240
|
-
|
|
44574
|
+
init_useTranslate();
|
|
44575
|
+
DefaultEmptyDetail = () => {
|
|
44576
|
+
const { t } = useTranslate();
|
|
44577
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full border-2 border-dashed border-border", children: /* @__PURE__ */ jsx(
|
|
44578
|
+
Typography,
|
|
44579
|
+
{
|
|
44580
|
+
variant: "body2",
|
|
44581
|
+
className: "text-muted-foreground",
|
|
44582
|
+
children: t("masterDetail.selectItem")
|
|
44583
|
+
}
|
|
44584
|
+
) });
|
|
44585
|
+
};
|
|
44241
44586
|
MasterDetailLayout = ({
|
|
44242
44587
|
master,
|
|
44243
44588
|
detail,
|
|
@@ -44364,7 +44709,7 @@ var init_MediaGallery = __esm({
|
|
|
44364
44709
|
{
|
|
44365
44710
|
icon: Image$1,
|
|
44366
44711
|
title: t("display.noMedia"),
|
|
44367
|
-
description: "
|
|
44712
|
+
description: t("mediaGallery.noMediaDescription"),
|
|
44368
44713
|
className
|
|
44369
44714
|
}
|
|
44370
44715
|
);
|
|
@@ -44381,7 +44726,7 @@ var init_MediaGallery = __esm({
|
|
|
44381
44726
|
size: "sm",
|
|
44382
44727
|
icon: Upload,
|
|
44383
44728
|
action: "MEDIA_UPLOAD",
|
|
44384
|
-
children: "
|
|
44729
|
+
children: t("mediaGallery.upload")
|
|
44385
44730
|
}
|
|
44386
44731
|
),
|
|
44387
44732
|
actions?.map((action, idx) => /* @__PURE__ */ jsx(
|
|
@@ -44395,10 +44740,7 @@ var init_MediaGallery = __esm({
|
|
|
44395
44740
|
))
|
|
44396
44741
|
] })
|
|
44397
44742
|
] }),
|
|
44398
|
-
selectable && selectedItems.length > 0 && /* @__PURE__ */ jsx(HStack, { gap: "sm", align: "center", children: /* @__PURE__ */
|
|
44399
|
-
selectedItems.length,
|
|
44400
|
-
" selected"
|
|
44401
|
-
] }) }),
|
|
44743
|
+
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 }) }) }),
|
|
44402
44744
|
/* @__PURE__ */ jsx(
|
|
44403
44745
|
Box,
|
|
44404
44746
|
{
|
|
@@ -45272,7 +45614,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45272
45614
|
EmptyState,
|
|
45273
45615
|
{
|
|
45274
45616
|
title: t("debug.noActiveTraits"),
|
|
45275
|
-
description: "
|
|
45617
|
+
description: t("debug.traitsMountHint"),
|
|
45276
45618
|
className: "py-8"
|
|
45277
45619
|
}
|
|
45278
45620
|
);
|
|
@@ -45282,14 +45624,11 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45282
45624
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
45283
45625
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-purple-600 dark:text-purple-400", children: trait.name }),
|
|
45284
45626
|
/* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: trait.currentState }),
|
|
45285
|
-
/* @__PURE__ */
|
|
45286
|
-
trait.transitionCount,
|
|
45287
|
-
" transitions"
|
|
45288
|
-
] })
|
|
45627
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500 ml-auto", children: t("debug.transitionsCount", { count: trait.transitionCount }) })
|
|
45289
45628
|
] }),
|
|
45290
45629
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
45291
45630
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45292
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45631
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.states") }),
|
|
45293
45632
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: trait.states.map((state) => /* @__PURE__ */ jsx(
|
|
45294
45633
|
Badge,
|
|
45295
45634
|
{
|
|
@@ -45301,7 +45640,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45301
45640
|
)) })
|
|
45302
45641
|
] }),
|
|
45303
45642
|
trait.transitions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
45304
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45643
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.transitions") }),
|
|
45305
45644
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.transitions.map((t2, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono", children: [
|
|
45306
45645
|
t2.from,
|
|
45307
45646
|
" \u2192 ",
|
|
@@ -45320,7 +45659,7 @@ function TraitsTab({ traits: traits2 }) {
|
|
|
45320
45659
|
] }, i)) })
|
|
45321
45660
|
] }),
|
|
45322
45661
|
trait.guards.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
45323
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45662
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.guards") }),
|
|
45324
45663
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: trait.guards.map((g, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
45325
45664
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: g.name }),
|
|
45326
45665
|
/* @__PURE__ */ jsx(Badge, { variant: g.lastResult === true ? "success" : g.lastResult === false ? "danger" : "default", size: "sm", children: g.lastResult === void 0 ? "?" : g.lastResult ? "\u2713" : "\u2717" })
|
|
@@ -45426,7 +45765,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
45426
45765
|
EmptyState,
|
|
45427
45766
|
{
|
|
45428
45767
|
title: t("debug.noEntityData"),
|
|
45429
|
-
description: "
|
|
45768
|
+
description: t("debug.debugModeHint"),
|
|
45430
45769
|
className: "py-8"
|
|
45431
45770
|
}
|
|
45432
45771
|
);
|
|
@@ -45439,7 +45778,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
45439
45778
|
EmptyState,
|
|
45440
45779
|
{
|
|
45441
45780
|
title: t("debug.noEntities"),
|
|
45442
|
-
description: "
|
|
45781
|
+
description: t("debug.entitiesSpawnHint"),
|
|
45443
45782
|
className: "py-8"
|
|
45444
45783
|
}
|
|
45445
45784
|
);
|
|
@@ -45447,7 +45786,7 @@ function EntitiesTab({ snapshot }) {
|
|
|
45447
45786
|
const singletonItems = singletonEntries.map(([name, data]) => ({
|
|
45448
45787
|
id: `singleton-${name}`,
|
|
45449
45788
|
header: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
45450
|
-
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: "
|
|
45789
|
+
/* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", children: t("debug.singleton") }),
|
|
45451
45790
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "semibold", className: "text-sky-600 dark:text-sky-400", children: name })
|
|
45452
45791
|
] }),
|
|
45453
45792
|
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) })
|
|
@@ -45465,31 +45804,19 @@ function EntitiesTab({ snapshot }) {
|
|
|
45465
45804
|
}));
|
|
45466
45805
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--entities", children: [
|
|
45467
45806
|
singletonItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
45468
|
-
/* @__PURE__ */
|
|
45469
|
-
"Singletons (",
|
|
45470
|
-
singletonItems.length,
|
|
45471
|
-
")"
|
|
45472
|
-
] }),
|
|
45807
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.singletonsCount", { count: singletonItems.length }) }),
|
|
45473
45808
|
/* @__PURE__ */ jsx(Accordion, { items: singletonItems, multiple: true })
|
|
45474
45809
|
] }),
|
|
45475
45810
|
runtimeItems.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
45476
|
-
/* @__PURE__ */
|
|
45477
|
-
"Runtime (",
|
|
45478
|
-
runtimeEntities.length,
|
|
45479
|
-
")"
|
|
45480
|
-
] }),
|
|
45811
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.runtimeCount", { count: runtimeEntities.length }) }),
|
|
45481
45812
|
/* @__PURE__ */ jsx(Accordion, { items: runtimeItems, multiple: true }),
|
|
45482
|
-
runtimeEntities.length > 20 && /* @__PURE__ */
|
|
45483
|
-
"+",
|
|
45484
|
-
runtimeEntities.length - 20,
|
|
45485
|
-
" more entities"
|
|
45486
|
-
] })
|
|
45813
|
+
runtimeEntities.length > 20 && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 text-center mt-2", children: t("debug.moreEntities", { count: runtimeEntities.length - 20 }) })
|
|
45487
45814
|
] }),
|
|
45488
45815
|
persistentEntries.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
45489
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: "
|
|
45816
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-2", children: t("debug.persistent") }),
|
|
45490
45817
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: persistentEntries.map(([type, info]) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
45491
45818
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: type }),
|
|
45492
|
-
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ?
|
|
45819
|
+
/* @__PURE__ */ jsx(Badge, { variant: info.loaded ? "success" : "default", size: "sm", children: info.loaded ? t("debug.loadedCount", { count: info.count }) : t("debug.notLoaded") })
|
|
45493
45820
|
] }, type)) })
|
|
45494
45821
|
] })
|
|
45495
45822
|
] });
|
|
@@ -45533,7 +45860,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
45533
45860
|
EmptyState,
|
|
45534
45861
|
{
|
|
45535
45862
|
title: t("debug.noEventsYet"),
|
|
45536
|
-
description: "
|
|
45863
|
+
description: t("debug.eventsExecuteHint"),
|
|
45537
45864
|
className: "py-8"
|
|
45538
45865
|
}
|
|
45539
45866
|
);
|
|
@@ -45544,17 +45871,13 @@ function EventFlowTab({ events: events2 }) {
|
|
|
45544
45871
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--events", children: [
|
|
45545
45872
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-3 flex-wrap", children: [
|
|
45546
45873
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
45547
|
-
/* @__PURE__ */
|
|
45874
|
+
/* @__PURE__ */ jsx(
|
|
45548
45875
|
Button,
|
|
45549
45876
|
{
|
|
45550
45877
|
size: "sm",
|
|
45551
45878
|
variant: filter === "all" ? "primary" : "secondary",
|
|
45552
45879
|
onClick: () => setFilter("all"),
|
|
45553
|
-
children:
|
|
45554
|
-
"All (",
|
|
45555
|
-
events2.length,
|
|
45556
|
-
")"
|
|
45557
|
-
]
|
|
45880
|
+
children: t("debug.allCount", { count: events2.length })
|
|
45558
45881
|
}
|
|
45559
45882
|
),
|
|
45560
45883
|
eventTypes.map((type) => {
|
|
@@ -45584,7 +45907,7 @@ function EventFlowTab({ events: events2 }) {
|
|
|
45584
45907
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
45585
45908
|
}
|
|
45586
45909
|
),
|
|
45587
|
-
"
|
|
45910
|
+
t("debug.autoScroll")
|
|
45588
45911
|
] })
|
|
45589
45912
|
] }),
|
|
45590
45913
|
/* @__PURE__ */ jsx(
|
|
@@ -45642,7 +45965,7 @@ function GuardsPanel({ guards }) {
|
|
|
45642
45965
|
EmptyState,
|
|
45643
45966
|
{
|
|
45644
45967
|
title: t("debug.noGuardEvaluations"),
|
|
45645
|
-
description: "
|
|
45968
|
+
description: t("debug.guardEvaluationsHint"),
|
|
45646
45969
|
className: "py-8"
|
|
45647
45970
|
}
|
|
45648
45971
|
);
|
|
@@ -45673,15 +45996,15 @@ function GuardsPanel({ guards }) {
|
|
|
45673
45996
|
] }),
|
|
45674
45997
|
content: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
|
|
45675
45998
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45676
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
45999
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.expression") }),
|
|
45677
46000
|
/* @__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 })
|
|
45678
46001
|
] }),
|
|
45679
46002
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45680
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
46003
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.inputs") }),
|
|
45681
46004
|
/* @__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) })
|
|
45682
46005
|
] }),
|
|
45683
46006
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
45684
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: "
|
|
46007
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500", children: t("debug.trait") }),
|
|
45685
46008
|
/* @__PURE__ */ jsx(Typography, { variant: "small", children: guard.context.traitName })
|
|
45686
46009
|
] })
|
|
45687
46010
|
] })
|
|
@@ -45699,9 +46022,9 @@ function GuardsPanel({ guards }) {
|
|
|
45699
46022
|
] })
|
|
45700
46023
|
] }),
|
|
45701
46024
|
/* @__PURE__ */ jsxs(ButtonGroup, { children: [
|
|
45702
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: "
|
|
45703
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: "
|
|
45704
|
-
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: "
|
|
46025
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "all" ? "primary" : "secondary", onClick: () => setFilter("all"), children: t("debug.filterAll") }),
|
|
46026
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "passed" ? "primary" : "secondary", onClick: () => setFilter("passed"), children: t("debug.filterPassed") }),
|
|
46027
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: filter === "failed" ? "primary" : "secondary", onClick: () => setFilter("failed"), children: t("debug.filterFailed") })
|
|
45705
46028
|
] })
|
|
45706
46029
|
] }),
|
|
45707
46030
|
/* @__PURE__ */ jsx("div", { className: "max-h-80 overflow-y-auto", children: /* @__PURE__ */ jsx(Accordion, { items: accordionItems }) })
|
|
@@ -45827,7 +46150,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
45827
46150
|
EmptyState,
|
|
45828
46151
|
{
|
|
45829
46152
|
title: t("debug.noTransitionsRecorded"),
|
|
45830
|
-
description: "
|
|
46153
|
+
description: t("debug.transitionsProcessHint"),
|
|
45831
46154
|
className: "py-8"
|
|
45832
46155
|
}
|
|
45833
46156
|
);
|
|
@@ -45844,10 +46167,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
45844
46167
|
const sorted = [...transitions].reverse();
|
|
45845
46168
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--timeline", children: [
|
|
45846
46169
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
45847
|
-
/* @__PURE__ */
|
|
45848
|
-
transitions.length,
|
|
45849
|
-
" transitions recorded"
|
|
45850
|
-
] }),
|
|
46170
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: t("debug.transitionsRecorded", { count: transitions.length }) }),
|
|
45851
46171
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs text-gray-500 cursor-pointer", children: [
|
|
45852
46172
|
/* @__PURE__ */ jsx(
|
|
45853
46173
|
Checkbox,
|
|
@@ -45856,7 +46176,7 @@ function TransitionTimeline({ transitions }) {
|
|
|
45856
46176
|
onChange: (e) => setAutoScroll(e.target.checked)
|
|
45857
46177
|
}
|
|
45858
46178
|
),
|
|
45859
|
-
"
|
|
46179
|
+
t("debug.autoScroll")
|
|
45860
46180
|
] })
|
|
45861
46181
|
] }),
|
|
45862
46182
|
/* @__PURE__ */ jsx(
|
|
@@ -45899,15 +46219,13 @@ function TransitionTimeline({ transitions }) {
|
|
|
45899
46219
|
variant: trace.guardResult ? "success" : "danger",
|
|
45900
46220
|
size: "sm",
|
|
45901
46221
|
children: [
|
|
45902
|
-
"
|
|
46222
|
+
t("debug.guardLabel"),
|
|
46223
|
+
" ",
|
|
45903
46224
|
trace.guardResult ? "\u2713" : "\u2717"
|
|
45904
46225
|
]
|
|
45905
46226
|
}
|
|
45906
46227
|
),
|
|
45907
|
-
/* @__PURE__ */
|
|
45908
|
-
trace.effects.length,
|
|
45909
|
-
" effects"
|
|
45910
|
-
] })
|
|
46228
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 ml-auto", children: t("debug.effectsCount", { count: trace.effects.length }) })
|
|
45911
46229
|
] }),
|
|
45912
46230
|
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: [
|
|
45913
46231
|
/* @__PURE__ */ jsx(EffectBadge, { effect }),
|
|
@@ -45956,13 +46274,13 @@ function ServerBridgeTab({ bridge }) {
|
|
|
45956
46274
|
EmptyState,
|
|
45957
46275
|
{
|
|
45958
46276
|
title: t("debug.noBridgeData"),
|
|
45959
|
-
description: "
|
|
46277
|
+
description: t("debug.bridgeInitHint"),
|
|
45960
46278
|
className: "py-8"
|
|
45961
46279
|
}
|
|
45962
46280
|
);
|
|
45963
46281
|
}
|
|
45964
46282
|
const formatTime4 = (ts) => {
|
|
45965
|
-
if (ts === 0) return "
|
|
46283
|
+
if (ts === 0) return t("debug.never");
|
|
45966
46284
|
const d = new Date(ts);
|
|
45967
46285
|
return d.toLocaleTimeString("en-US", {
|
|
45968
46286
|
hour12: false,
|
|
@@ -45975,14 +46293,14 @@ function ServerBridgeTab({ bridge }) {
|
|
|
45975
46293
|
/* @__PURE__ */ jsxs(Card, { className: "p-3", children: [
|
|
45976
46294
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
45977
46295
|
/* @__PURE__ */ jsx("div", { className: `w-3 h-3 rounded-full ${bridge.connected ? "bg-green-500 animate-pulse" : "bg-red-500"}` }),
|
|
45978
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? "
|
|
46296
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: bridge.connected ? t("debug.connected") : t("debug.disconnected") })
|
|
45979
46297
|
] }),
|
|
45980
46298
|
/* @__PURE__ */ jsxs(Stack, { gap: "xs", children: [
|
|
45981
46299
|
/* @__PURE__ */ jsx(
|
|
45982
46300
|
StatRow,
|
|
45983
46301
|
{
|
|
45984
46302
|
label: t("debug.status"),
|
|
45985
|
-
value: bridge.connected ? "
|
|
46303
|
+
value: bridge.connected ? t("debug.connected") : t("debug.disconnected"),
|
|
45986
46304
|
variant: bridge.connected ? "success" : "danger"
|
|
45987
46305
|
}
|
|
45988
46306
|
),
|
|
@@ -46010,13 +46328,10 @@ function ServerBridgeTab({ bridge }) {
|
|
|
46010
46328
|
] })
|
|
46011
46329
|
] }),
|
|
46012
46330
|
bridge.lastError && /* @__PURE__ */ jsxs(Card, { className: "p-3 border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-950", children: [
|
|
46013
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: "
|
|
46331
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "semibold", className: "text-red-600 dark:text-red-400 mb-1", children: t("debug.lastError") }),
|
|
46014
46332
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-red-500 font-mono break-all", children: bridge.lastError })
|
|
46015
46333
|
] }),
|
|
46016
|
-
bridge.connected && /* @__PURE__ */ jsx("div", { className: "text-center py-2", children: /* @__PURE__ */
|
|
46017
|
-
bridge.eventsForwarded + bridge.eventsReceived,
|
|
46018
|
-
" total events processed"
|
|
46019
|
-
] }) })
|
|
46334
|
+
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 }) }) })
|
|
46020
46335
|
] }) });
|
|
46021
46336
|
}
|
|
46022
46337
|
var init_ServerBridgeTab = __esm({
|
|
@@ -46126,7 +46441,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46126
46441
|
EmptyState,
|
|
46127
46442
|
{
|
|
46128
46443
|
title: t("debug.noActiveTraits"),
|
|
46129
|
-
description: "
|
|
46444
|
+
description: t("debug.traitsInitHint"),
|
|
46130
46445
|
className: "py-8"
|
|
46131
46446
|
}
|
|
46132
46447
|
);
|
|
@@ -46143,7 +46458,7 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46143
46458
|
};
|
|
46144
46459
|
return /* @__PURE__ */ jsxs("div", { className: "debug-tab debug-tab--dispatch", children: [
|
|
46145
46460
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
46146
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46461
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.activeStates") }),
|
|
46147
46462
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: traits2.map((trait) => /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
46148
46463
|
trait.name,
|
|
46149
46464
|
": ",
|
|
@@ -46151,8 +46466,8 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46151
46466
|
] }, trait.id)) })
|
|
46152
46467
|
] }),
|
|
46153
46468
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
46154
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46155
|
-
availableEvents.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-400 italic", children: "
|
|
46469
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.availableEvents") }),
|
|
46470
|
+
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: [
|
|
46156
46471
|
/* @__PURE__ */ jsx(
|
|
46157
46472
|
Button,
|
|
46158
46473
|
{
|
|
@@ -46164,15 +46479,15 @@ function EventDispatcherTab({ traits: traits2, schema }) {
|
|
|
46164
46479
|
}
|
|
46165
46480
|
),
|
|
46166
46481
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-gray-500", children: transitions.map((t2) => `${t2.from} -> ${t2.to}`).join(", ") }),
|
|
46167
|
-
transitions.some((
|
|
46482
|
+
transitions.some((tr) => tr.guard) && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: t("debug.guarded") })
|
|
46168
46483
|
] }, event)) })
|
|
46169
46484
|
] }),
|
|
46170
46485
|
unavailableEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
46171
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46486
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
|
|
46172
46487
|
/* @__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)) })
|
|
46173
46488
|
] }),
|
|
46174
46489
|
log16.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
46175
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: "
|
|
46490
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
|
|
46176
46491
|
/* @__PURE__ */ jsx(Stack, { gap: "xs", children: log16.map((entry, i) => /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
|
|
46177
46492
|
/* @__PURE__ */ jsx("span", { className: "text-purple-400", children: entry.traitName }),
|
|
46178
46493
|
" ",
|
|
@@ -46203,21 +46518,20 @@ var init_RuntimeDebugger = __esm({
|
|
|
46203
46518
|
}
|
|
46204
46519
|
});
|
|
46205
46520
|
function ServerResponseRow({ sr }) {
|
|
46521
|
+
const { t } = useTranslate();
|
|
46206
46522
|
const entityEntries = Object.entries(sr.dataEntities);
|
|
46207
46523
|
return /* @__PURE__ */ jsxs("div", { className: "ml-4 pl-2 border-l border-purple-500/30 py-0.5 text-xs font-mono", children: [
|
|
46208
46524
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
46209
46525
|
/* @__PURE__ */ jsxs("span", { className: sr.success ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400", children: [
|
|
46210
46526
|
sr.success ? "\u2713" : "\u2717",
|
|
46211
|
-
"
|
|
46527
|
+
" ",
|
|
46528
|
+
t("debug.server")
|
|
46212
46529
|
] }),
|
|
46213
46530
|
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-300", children: sr.orbitalName }),
|
|
46214
|
-
sr.clientEffects > 0 && /* @__PURE__ */
|
|
46215
|
-
sr.clientEffects,
|
|
46216
|
-
" clientEffect",
|
|
46217
|
-
sr.clientEffects !== 1 ? "s" : ""
|
|
46218
|
-
] }),
|
|
46531
|
+
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 }) }),
|
|
46219
46532
|
sr.emittedEvents.length > 0 && /* @__PURE__ */ jsxs("span", { className: "px-1 rounded bg-blue-500/15 text-blue-300", children: [
|
|
46220
|
-
"
|
|
46533
|
+
t("debug.emitLabel"),
|
|
46534
|
+
" ",
|
|
46221
46535
|
sr.emittedEvents.join(", ")
|
|
46222
46536
|
] }),
|
|
46223
46537
|
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 })
|
|
@@ -46225,13 +46539,12 @@ function ServerResponseRow({ sr }) {
|
|
|
46225
46539
|
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: [
|
|
46226
46540
|
name,
|
|
46227
46541
|
": ",
|
|
46228
|
-
count
|
|
46229
|
-
" row",
|
|
46230
|
-
count !== 1 ? "s" : ""
|
|
46542
|
+
t("debug.rowsCount", { count })
|
|
46231
46543
|
] }, name)) })
|
|
46232
46544
|
] });
|
|
46233
46545
|
}
|
|
46234
46546
|
function TransitionRow({ trace }) {
|
|
46547
|
+
const { t } = useTranslate();
|
|
46235
46548
|
const isServerEntry = !!trace.serverResponse && trace.traitName.startsWith("server:");
|
|
46236
46549
|
const hasFailedEffects = trace.effects.some((e) => e.status === "failed");
|
|
46237
46550
|
if (isServerEntry && trace.serverResponse) {
|
|
@@ -46239,7 +46552,7 @@ function TransitionRow({ trace }) {
|
|
|
46239
46552
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 text-xs font-mono", children: [
|
|
46240
46553
|
/* @__PURE__ */ jsx("span", { className: "mt-1.5 w-1.5 h-1.5 rounded-full flex-shrink-0 bg-purple-500" }),
|
|
46241
46554
|
/* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", className: "flex-shrink-0", children: trace.event }),
|
|
46242
|
-
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: "
|
|
46555
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400 flex-shrink-0", children: t("debug.serverResponse") })
|
|
46243
46556
|
] }),
|
|
46244
46557
|
/* @__PURE__ */ jsx(ServerResponseRow, { sr: trace.serverResponse })
|
|
46245
46558
|
] });
|
|
@@ -46280,6 +46593,7 @@ function VerifyModePanel({
|
|
|
46280
46593
|
serverCount,
|
|
46281
46594
|
localCount
|
|
46282
46595
|
}) {
|
|
46596
|
+
const { t } = useTranslate();
|
|
46283
46597
|
const [expanded, setExpanded] = React97.useState(true);
|
|
46284
46598
|
const scrollRef = React97.useRef(null);
|
|
46285
46599
|
const prevCountRef = React97.useRef(0);
|
|
@@ -46310,30 +46624,20 @@ function VerifyModePanel({
|
|
|
46310
46624
|
onClick: () => setExpanded((v) => !v),
|
|
46311
46625
|
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",
|
|
46312
46626
|
"aria-expanded": expanded,
|
|
46313
|
-
"aria-label": expanded ? "
|
|
46627
|
+
"aria-label": expanded ? t("debug.collapseVerificationTimeline") : t("debug.expandVerificationTimeline"),
|
|
46314
46628
|
"data-testid": "debugger-verify-toggle",
|
|
46315
46629
|
children: [
|
|
46316
46630
|
/* @__PURE__ */ jsx("span", { className: "text-foreground/50 w-3", "aria-hidden": true, children: expanded ? "\u25BE" : "\u25B8" }),
|
|
46317
|
-
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ?
|
|
46318
|
-
/* @__PURE__ */
|
|
46319
|
-
|
|
46320
|
-
" local"
|
|
46321
|
-
] }),
|
|
46322
|
-
/* @__PURE__ */ jsxs("span", { className: "text-purple-600 dark:text-purple-400", children: [
|
|
46323
|
-
serverCount,
|
|
46324
|
-
" server"
|
|
46325
|
-
] }),
|
|
46631
|
+
/* @__PURE__ */ jsx(Badge, { variant: failedChecks > 0 ? "danger" : "success", size: "sm", children: failedChecks > 0 ? t("debug.failCount", { count: failedChecks }) : t("debug.ok") }),
|
|
46632
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground/70", children: t("debug.localCount", { count: localCount }) }),
|
|
46633
|
+
/* @__PURE__ */ jsx("span", { className: "text-purple-600 dark:text-purple-400", children: t("debug.serverCount", { count: serverCount }) }),
|
|
46326
46634
|
traitStates && /* @__PURE__ */ jsx("span", { className: "text-cyan-600 dark:text-cyan-400 truncate max-w-[400px]", children: traitStates }),
|
|
46327
|
-
!expanded && transitions.length > 0 && /* @__PURE__ */
|
|
46328
|
-
transitions.length,
|
|
46329
|
-
" transition",
|
|
46330
|
-
transitions.length !== 1 ? "s" : ""
|
|
46331
|
-
] })
|
|
46635
|
+
!expanded && transitions.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-auto text-foreground/50", children: t("debug.transitionsCount", { count: transitions.length }) })
|
|
46332
46636
|
]
|
|
46333
46637
|
}
|
|
46334
46638
|
),
|
|
46335
46639
|
expanded && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
46336
|
-
/* @__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: "
|
|
46640
|
+
/* @__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)) }) }) }),
|
|
46337
46641
|
/* @__PURE__ */ jsx(WalkMinimap, {})
|
|
46338
46642
|
] })
|
|
46339
46643
|
]
|
|
@@ -46349,6 +46653,7 @@ function RuntimeDebugger({
|
|
|
46349
46653
|
defaultTab,
|
|
46350
46654
|
schema
|
|
46351
46655
|
}) {
|
|
46656
|
+
const { t } = useTranslate();
|
|
46352
46657
|
const [isCollapsed, setIsCollapsed] = React97.useState(mode === "verify" ? true : defaultCollapsed);
|
|
46353
46658
|
const [isVisible, setIsVisible] = React97.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
46354
46659
|
const debugData = useDebugData();
|
|
@@ -46387,55 +46692,55 @@ function RuntimeDebugger({
|
|
|
46387
46692
|
const tabItems = [
|
|
46388
46693
|
{
|
|
46389
46694
|
id: "dispatch",
|
|
46390
|
-
label: "
|
|
46695
|
+
label: t("debug.tabDispatch"),
|
|
46391
46696
|
badge: debugData.traits.length || void 0,
|
|
46392
46697
|
content: /* @__PURE__ */ jsx(EventDispatcherTab, { traits: debugData.traits, schema })
|
|
46393
46698
|
},
|
|
46394
46699
|
{
|
|
46395
46700
|
id: "verify",
|
|
46396
|
-
label: failedChecks > 0 ? "
|
|
46701
|
+
label: failedChecks > 0 ? t("debug.tabVerifyAlert") : t("debug.tabVerify"),
|
|
46397
46702
|
badge: verification.summary.totalChecks || void 0,
|
|
46398
46703
|
content: /* @__PURE__ */ jsx(VerificationTab, { checks: verification.checks, summary: verification.summary })
|
|
46399
46704
|
},
|
|
46400
46705
|
{
|
|
46401
46706
|
id: "timeline",
|
|
46402
|
-
label: "
|
|
46707
|
+
label: t("debug.tabTimeline"),
|
|
46403
46708
|
badge: verification.transitions.length || void 0,
|
|
46404
46709
|
content: /* @__PURE__ */ jsx(TransitionTimeline, { transitions: verification.transitions })
|
|
46405
46710
|
},
|
|
46406
46711
|
{
|
|
46407
46712
|
id: "bridge",
|
|
46408
|
-
label: "
|
|
46713
|
+
label: t("debug.tabBridge"),
|
|
46409
46714
|
badge: verification.bridge?.connected ? void 0 : 1,
|
|
46410
46715
|
content: /* @__PURE__ */ jsx(ServerBridgeTab, { bridge: verification.bridge })
|
|
46411
46716
|
},
|
|
46412
46717
|
{
|
|
46413
46718
|
id: "traits",
|
|
46414
|
-
label: "
|
|
46719
|
+
label: t("debug.tabTraits"),
|
|
46415
46720
|
badge: debugData.traits.length || void 0,
|
|
46416
46721
|
content: /* @__PURE__ */ jsx(TraitsTab, { traits: debugData.traits })
|
|
46417
46722
|
},
|
|
46418
46723
|
{
|
|
46419
46724
|
id: "ticks",
|
|
46420
|
-
label: "
|
|
46421
|
-
badge: debugData.ticks.filter((
|
|
46725
|
+
label: t("debug.tabTicks"),
|
|
46726
|
+
badge: debugData.ticks.filter((tick) => tick.active).length || void 0,
|
|
46422
46727
|
content: /* @__PURE__ */ jsx(TicksTab, { ticks: debugData.ticks })
|
|
46423
46728
|
},
|
|
46424
46729
|
{
|
|
46425
46730
|
id: "entities",
|
|
46426
|
-
label: "
|
|
46731
|
+
label: t("debug.tabEntities"),
|
|
46427
46732
|
badge: debugData.entitySnapshot?.runtime.length || void 0,
|
|
46428
46733
|
content: /* @__PURE__ */ jsx(EntitiesTab, { snapshot: debugData.entitySnapshot })
|
|
46429
46734
|
},
|
|
46430
46735
|
{
|
|
46431
46736
|
id: "events",
|
|
46432
|
-
label: "
|
|
46737
|
+
label: t("debug.tabEvents"),
|
|
46433
46738
|
badge: debugData.events.length > 0 ? debugData.events.length : void 0,
|
|
46434
46739
|
content: /* @__PURE__ */ jsx(EventFlowTab, { events: debugData.events })
|
|
46435
46740
|
},
|
|
46436
46741
|
{
|
|
46437
46742
|
id: "guards",
|
|
46438
|
-
label: "
|
|
46743
|
+
label: t("debug.tabGuards"),
|
|
46439
46744
|
badge: debugData.guards.filter((g) => !g.result).length || void 0,
|
|
46440
46745
|
content: /* @__PURE__ */ jsx(GuardsPanel, { guards: debugData.guards })
|
|
46441
46746
|
}
|
|
@@ -46463,15 +46768,10 @@ function RuntimeDebugger({
|
|
|
46463
46768
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
46464
46769
|
/* @__PURE__ */ jsxs(Typography, { variant: "h6", style: { fontSize: "0.75rem" }, children: [
|
|
46465
46770
|
isCollapsed ? "\u25B6" : "\u25BC",
|
|
46466
|
-
"
|
|
46771
|
+
" ",
|
|
46772
|
+
t("debug.debugger")
|
|
46467
46773
|
] }),
|
|
46468
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
46469
|
-
failedChecks,
|
|
46470
|
-
" failed"
|
|
46471
|
-
] }) : debugData.traits.length > 0 ? /* @__PURE__ */ jsxs(Badge, { variant: "success", size: "sm", children: [
|
|
46472
|
-
debugData.traits.length,
|
|
46473
|
-
" traits"
|
|
46474
|
-
] }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Idle" })
|
|
46774
|
+
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") })
|
|
46475
46775
|
] })
|
|
46476
46776
|
}
|
|
46477
46777
|
),
|
|
@@ -46489,9 +46789,9 @@ function RuntimeDebugger({
|
|
|
46489
46789
|
);
|
|
46490
46790
|
}
|
|
46491
46791
|
if (mode === "verify") {
|
|
46492
|
-
const traitStates = debugData.traits.map((
|
|
46493
|
-
const serverEntries = verification.transitions.filter((
|
|
46494
|
-
const localEntries = verification.transitions.filter((
|
|
46792
|
+
const traitStates = debugData.traits.map((t2) => `${t2.name}:${t2.currentState}`).join(" | ");
|
|
46793
|
+
const serverEntries = verification.transitions.filter((t2) => t2.serverResponse);
|
|
46794
|
+
const localEntries = verification.transitions.filter((t2) => !t2.serverResponse);
|
|
46495
46795
|
return /* @__PURE__ */ jsx(
|
|
46496
46796
|
VerifyModePanel,
|
|
46497
46797
|
{
|
|
@@ -46523,7 +46823,7 @@ function RuntimeDebugger({
|
|
|
46523
46823
|
variant: "secondary",
|
|
46524
46824
|
size: "sm",
|
|
46525
46825
|
className: "runtime-debugger__toggle",
|
|
46526
|
-
title: "
|
|
46826
|
+
title: t("debug.openDebugger"),
|
|
46527
46827
|
children: failedChecks > 0 ? /* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
46528
46828
|
/* @__PURE__ */ jsx("span", { children: "V" }),
|
|
46529
46829
|
/* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-2 w-2 h-2 bg-red-500 rounded-full" })
|
|
@@ -46533,11 +46833,8 @@ function RuntimeDebugger({
|
|
|
46533
46833
|
/* @__PURE__ */ jsxs("div", { className: "runtime-debugger__header", children: [
|
|
46534
46834
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
46535
46835
|
/* @__PURE__ */ jsx("span", { className: "text-lg", children: "V" }),
|
|
46536
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "
|
|
46537
|
-
failedChecks > 0 ? /* @__PURE__ */
|
|
46538
|
-
failedChecks,
|
|
46539
|
-
" failed"
|
|
46540
|
-
] }) : verification.summary.totalChecks > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "success", size: "sm", children: "All passing" }) : /* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: "Runtime" })
|
|
46836
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: t("debug.kflowVerifier") }),
|
|
46837
|
+
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") })
|
|
46541
46838
|
] }),
|
|
46542
46839
|
/* @__PURE__ */ jsx(
|
|
46543
46840
|
Button,
|
|
@@ -46545,7 +46842,7 @@ function RuntimeDebugger({
|
|
|
46545
46842
|
onClick: () => setIsCollapsed(true),
|
|
46546
46843
|
variant: "ghost",
|
|
46547
46844
|
size: "sm",
|
|
46548
|
-
title: "
|
|
46845
|
+
title: t("debug.close"),
|
|
46549
46846
|
children: "x"
|
|
46550
46847
|
}
|
|
46551
46848
|
)
|
|
@@ -46559,7 +46856,7 @@ function RuntimeDebugger({
|
|
|
46559
46856
|
className: "runtime-debugger__tabs"
|
|
46560
46857
|
}
|
|
46561
46858
|
) }),
|
|
46562
|
-
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: "
|
|
46859
|
+
/* @__PURE__ */ jsx("div", { className: "runtime-debugger__footer", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-foreground/50", children: t("debug.toggleHint") }) })
|
|
46563
46860
|
] })
|
|
46564
46861
|
}
|
|
46565
46862
|
);
|
|
@@ -46585,6 +46882,7 @@ var init_RuntimeDebugger2 = __esm({
|
|
|
46585
46882
|
init_TransitionTimeline();
|
|
46586
46883
|
init_ServerBridgeTab();
|
|
46587
46884
|
init_EventDispatcherTab();
|
|
46885
|
+
init_useTranslate();
|
|
46588
46886
|
init_RuntimeDebugger();
|
|
46589
46887
|
RuntimeDebugger.displayName = "RuntimeDebugger";
|
|
46590
46888
|
}
|
|
@@ -47873,7 +48171,7 @@ var init_StatCard = __esm({
|
|
|
47873
48171
|
}
|
|
47874
48172
|
);
|
|
47875
48173
|
}
|
|
47876
|
-
const label = schemaStats?.[0]?.label || labelToUse || "
|
|
48174
|
+
const label = schemaStats?.[0]?.label || labelToUse || t("statCard.defaultLabel");
|
|
47877
48175
|
const normalizedPropValue = Array.isArray(propValue) ? propValue[0] ?? propValue.length : propValue;
|
|
47878
48176
|
const value = schemaStats?.[0]?.value ?? normalizedPropValue ?? 0;
|
|
47879
48177
|
const trendDirection = manualDirection || (calculatedTrend === void 0 || calculatedTrend === 0 ? "neutral" : calculatedTrend > 0 ? "up" : "down");
|
|
@@ -47916,7 +48214,7 @@ var init_StatCard = __esm({
|
|
|
47916
48214
|
]
|
|
47917
48215
|
}
|
|
47918
48216
|
),
|
|
47919
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: "
|
|
48217
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", as: "span", children: t("statCard.vsLastPeriod") })
|
|
47920
48218
|
] }),
|
|
47921
48219
|
subtitle && !calculatedTrend && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "secondary", children: subtitle })
|
|
47922
48220
|
] }),
|
|
@@ -52121,6 +52419,9 @@ var AvlEmitListen = ({
|
|
|
52121
52419
|
] });
|
|
52122
52420
|
};
|
|
52123
52421
|
AvlEmitListen.displayName = "AvlEmitListen";
|
|
52422
|
+
|
|
52423
|
+
// components/avl/molecules/AvlSlotMap.tsx
|
|
52424
|
+
init_useTranslate();
|
|
52124
52425
|
var SLOT_PRESETS = {
|
|
52125
52426
|
header: { x: 10, y: 5, width: 340, height: 35 },
|
|
52126
52427
|
main: { x: 120, y: 50, width: 230, height: 195 },
|
|
@@ -52165,6 +52466,7 @@ var AvlSlotMap = ({
|
|
|
52165
52466
|
color = "var(--color-primary)",
|
|
52166
52467
|
animated = false
|
|
52167
52468
|
}) => {
|
|
52469
|
+
const { t } = useTranslate();
|
|
52168
52470
|
const ox = (600 - pageWidth) / 2;
|
|
52169
52471
|
const oy = (400 - pageHeight) / 2;
|
|
52170
52472
|
let unknownIdx = 0;
|
|
@@ -52215,7 +52517,7 @@ var AvlSlotMap = ({
|
|
|
52215
52517
|
fontSize: 10,
|
|
52216
52518
|
fontFamily: "inherit",
|
|
52217
52519
|
fontWeight: "bold",
|
|
52218
|
-
children: "
|
|
52520
|
+
children: t("avl.pageLayout")
|
|
52219
52521
|
}
|
|
52220
52522
|
),
|
|
52221
52523
|
resolvedSlots.map((slot) => {
|
|
@@ -52264,7 +52566,7 @@ var AvlSlotMap = ({
|
|
|
52264
52566
|
opacity: 0.6,
|
|
52265
52567
|
children: [
|
|
52266
52568
|
slot.name,
|
|
52267
|
-
isOverlay ?
|
|
52569
|
+
isOverlay ? ` ${t("avl.overlaySuffix")}` : ""
|
|
52268
52570
|
]
|
|
52269
52571
|
}
|
|
52270
52572
|
)
|
|
@@ -53196,23 +53498,25 @@ var SystemNode = ({ data }) => {
|
|
|
53196
53498
|
SystemNode.displayName = "SystemNode";
|
|
53197
53499
|
|
|
53198
53500
|
// components/avl/molecules/DetailView.tsx
|
|
53501
|
+
init_useTranslate();
|
|
53199
53502
|
init_AvlState();
|
|
53200
53503
|
init_AvlEffect();
|
|
53201
53504
|
init_types();
|
|
53202
53505
|
var DetailView = ({ data }) => {
|
|
53506
|
+
const { t } = useTranslate();
|
|
53203
53507
|
const traitName = data.traits[0]?.name;
|
|
53204
53508
|
const traitData = traitName ? data.traitDetails[traitName] : void 0;
|
|
53205
53509
|
if (!traitData || traitData.transitions.length === 0) {
|
|
53206
|
-
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: "
|
|
53510
|
+
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") });
|
|
53207
53511
|
}
|
|
53208
53512
|
const transition = traitData.transitions[0];
|
|
53209
53513
|
const fromState = traitData.states.find((s) => s.name === transition.from);
|
|
53210
53514
|
const toState = traitData.states.find((s) => s.name === transition.to);
|
|
53211
53515
|
const transitionCounts = {};
|
|
53212
53516
|
for (const s of traitData.states) transitionCounts[s.name] = 0;
|
|
53213
|
-
for (const
|
|
53214
|
-
transitionCounts[
|
|
53215
|
-
transitionCounts[
|
|
53517
|
+
for (const t2 of traitData.transitions) {
|
|
53518
|
+
transitionCounts[t2.from] = (transitionCounts[t2.from] ?? 0) + 1;
|
|
53519
|
+
transitionCounts[t2.to] = (transitionCounts[t2.to] ?? 0) + 1;
|
|
53216
53520
|
}
|
|
53217
53521
|
const maxTC = Math.max(...Object.values(transitionCounts), 0);
|
|
53218
53522
|
const fromRole = getStateRole(transition.from, fromState?.isInitial, fromState?.isTerminal, transitionCounts[transition.from] ?? 0, maxTC);
|
|
@@ -53229,21 +53533,21 @@ var DetailView = ({ data }) => {
|
|
|
53229
53533
|
] }) }),
|
|
53230
53534
|
/* @__PURE__ */ jsxs("div", { className: "px-4 py-3 space-y-3", children: [
|
|
53231
53535
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
53232
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: "
|
|
53536
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: t("avl.trigger") }),
|
|
53233
53537
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
53234
53538
|
/* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx(AvlEvent, { x: 8, y: 8, size: 7 }) }),
|
|
53235
53539
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[var(--color-foreground)]", children: transition.event })
|
|
53236
53540
|
] })
|
|
53237
53541
|
] }),
|
|
53238
53542
|
hasGuard && /* @__PURE__ */ jsxs("div", { children: [
|
|
53239
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: "
|
|
53543
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: t("avl.guard") }),
|
|
53240
53544
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
53241
53545
|
/* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 14 14", children: /* @__PURE__ */ jsx(AvlGuard, { x: 7, y: 7, size: 6 }) }),
|
|
53242
53546
|
/* @__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) })
|
|
53243
53547
|
] })
|
|
53244
53548
|
] }),
|
|
53245
53549
|
transition.effects.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
53246
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: "
|
|
53550
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs uppercase tracking-wider text-[var(--color-muted-foreground)] mb-1", children: t("avl.effects") }),
|
|
53247
53551
|
/* @__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: [
|
|
53248
53552
|
/* @__PURE__ */ jsxs("span", { className: "text-xs text-[var(--color-muted-foreground)] w-3 text-right mt-0.5", children: [
|
|
53249
53553
|
i + 1,
|
|
@@ -53279,6 +53583,7 @@ AvlOrbitalNode.displayName = "AvlOrbitalNode";
|
|
|
53279
53583
|
|
|
53280
53584
|
// components/avl/molecules/AvlTransitionEdge.tsx
|
|
53281
53585
|
init_types();
|
|
53586
|
+
init_useTranslate();
|
|
53282
53587
|
var AvlTransitionEdge = ({
|
|
53283
53588
|
id,
|
|
53284
53589
|
sourceX,
|
|
@@ -53291,6 +53596,7 @@ var AvlTransitionEdge = ({
|
|
|
53291
53596
|
markerEnd,
|
|
53292
53597
|
style
|
|
53293
53598
|
}) => {
|
|
53599
|
+
const { t } = useTranslate();
|
|
53294
53600
|
const [path, labelX, labelY] = getBezierPath({
|
|
53295
53601
|
sourceX,
|
|
53296
53602
|
sourceY,
|
|
@@ -53322,9 +53628,9 @@ var AvlTransitionEdge = ({
|
|
|
53322
53628
|
className: "absolute pointer-events-all nodrag nopan flex items-center gap-1",
|
|
53323
53629
|
style: { transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)` },
|
|
53324
53630
|
children: [
|
|
53325
|
-
data?.hasGuard && /* @__PURE__ */ jsx("div", { className: "w-3 h-3 rotate-45 border border-amber-500 bg-amber-500/10 shrink-0", title: "
|
|
53631
|
+
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") }),
|
|
53326
53632
|
/* @__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 ?? "" }),
|
|
53327
|
-
data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-violet-500/80 shrink-0", title: "
|
|
53633
|
+
data?.hasEffects && /* @__PURE__ */ jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-violet-500/80 shrink-0", title: t("avl.effects") })
|
|
53328
53634
|
]
|
|
53329
53635
|
}
|
|
53330
53636
|
) })
|
|
@@ -56645,6 +56951,7 @@ function BrowserPlayground({
|
|
|
56645
56951
|
|
|
56646
56952
|
// components/avl/molecules/OrbPreviewNode.tsx
|
|
56647
56953
|
init_useEventBus();
|
|
56954
|
+
init_useTranslate();
|
|
56648
56955
|
|
|
56649
56956
|
// components/avl/molecules/useCanvasDnd.tsx
|
|
56650
56957
|
init_useEventBus();
|
|
@@ -57132,6 +57439,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57132
57439
|
const screenSize = useContext(ScreenSizeContext);
|
|
57133
57440
|
const preset = SCREEN_SIZE_PRESETS[screenSize];
|
|
57134
57441
|
const { select } = useContext(PatternSelectionContext);
|
|
57442
|
+
const { t } = useTranslate();
|
|
57135
57443
|
const eventBus = useEventBus();
|
|
57136
57444
|
const reactFlow = useReactFlow();
|
|
57137
57445
|
const contentRef = useRef(null);
|
|
@@ -57152,7 +57460,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57152
57460
|
const isSuccess = status === "success";
|
|
57153
57461
|
const isError = status === "error";
|
|
57154
57462
|
const label = isImportedGroup ? data.behaviorAlias ?? "" : isExpanded ? `${data.transitionEvent ?? ""}` : data.orbitalName;
|
|
57155
|
-
const sublabel = isImportedGroup ? `${data.behaviorName ?? ""}${typeof data.transitionCount === "number" && data.transitionCount > 1 ? ` \xB7 ${data.transitionCount}
|
|
57463
|
+
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 ?? "";
|
|
57156
57464
|
const orbitalSchema = useMemo(() => {
|
|
57157
57465
|
const fullSchema = data._fullSchema;
|
|
57158
57466
|
if (!fullSchema) return void 0;
|
|
@@ -57320,7 +57628,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57320
57628
|
color: "var(--color-muted-foreground)",
|
|
57321
57629
|
zIndex: 3
|
|
57322
57630
|
},
|
|
57323
|
-
children: "
|
|
57631
|
+
children: t("orbPreview.previewBadge")
|
|
57324
57632
|
}
|
|
57325
57633
|
),
|
|
57326
57634
|
hovered && !dragActive && !l1IsOver && /* @__PURE__ */ jsx(
|
|
@@ -57342,7 +57650,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57342
57650
|
},
|
|
57343
57651
|
children: [
|
|
57344
57652
|
/* @__PURE__ */ jsx("span", { style: { fontSize: 12 }, children: "\u279E" }),
|
|
57345
|
-
"
|
|
57653
|
+
t("orbPreview.doubleClickToOpen")
|
|
57346
57654
|
]
|
|
57347
57655
|
}
|
|
57348
57656
|
)
|
|
@@ -57365,7 +57673,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57365
57673
|
color: "var(--color-primary-foreground)",
|
|
57366
57674
|
boxShadow: "var(--shadow-lg)"
|
|
57367
57675
|
},
|
|
57368
|
-
children: "
|
|
57676
|
+
children: t("orbPreview.dropToAddAndOpen")
|
|
57369
57677
|
}
|
|
57370
57678
|
)
|
|
57371
57679
|
}
|
|
@@ -57399,7 +57707,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57399
57707
|
borderTopColor: "transparent",
|
|
57400
57708
|
zIndex: 2
|
|
57401
57709
|
},
|
|
57402
|
-
title: "
|
|
57710
|
+
title: t("orbPreview.dispatching")
|
|
57403
57711
|
}
|
|
57404
57712
|
)
|
|
57405
57713
|
] }),
|
|
@@ -57495,7 +57803,7 @@ var OrbPreviewNodeInner = (props) => {
|
|
|
57495
57803
|
height: "auto"
|
|
57496
57804
|
}
|
|
57497
57805
|
) })
|
|
57498
|
-
) : /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center", style: { minHeight: preset.minHeight }, children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: "
|
|
57806
|
+
) : /* @__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") }) })
|
|
57499
57807
|
]
|
|
57500
57808
|
}
|
|
57501
57809
|
),
|
|
@@ -58086,7 +58394,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58086
58394
|
const handleRemoveEffect = useCallback((effectIndex) => {
|
|
58087
58395
|
eventBus.emit("UI:REMOVE_EFFECT", { effectIndex });
|
|
58088
58396
|
}, [eventBus]);
|
|
58089
|
-
const headerTitle = selectedPattern ? selectedPattern.patternType : isExpanded ? transitionEvent || "
|
|
58397
|
+
const headerTitle = selectedPattern ? selectedPattern.patternType : isExpanded ? transitionEvent || t("avl.transition") : orbitalName;
|
|
58090
58398
|
return /* @__PURE__ */ jsxs(Box, { className: "flex flex-col bg-card border-l border-border h-full w-full sm:w-[340px]", children: [
|
|
58091
58399
|
/* @__PURE__ */ jsxs(Box, { className: "shrink-0 border-b border-border", children: [
|
|
58092
58400
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between px-4 py-2", children: [
|
|
@@ -58103,7 +58411,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58103
58411
|
{
|
|
58104
58412
|
onClick: onClose,
|
|
58105
58413
|
className: "text-muted-foreground hover:text-foreground text-sm cursor-pointer bg-transparent border-none p-1",
|
|
58106
|
-
"aria-label": "
|
|
58414
|
+
"aria-label": t("common.close"),
|
|
58107
58415
|
children: "\xD7"
|
|
58108
58416
|
}
|
|
58109
58417
|
)
|
|
@@ -58113,7 +58421,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58113
58421
|
{
|
|
58114
58422
|
onClick: () => setActiveTab(tab),
|
|
58115
58423
|
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"}`,
|
|
58116
|
-
children: tab
|
|
58424
|
+
children: t(`orbInspector.tab.${tab}`)
|
|
58117
58425
|
},
|
|
58118
58426
|
tab
|
|
58119
58427
|
)) })
|
|
@@ -58159,7 +58467,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58159
58467
|
/* ── Inspector Tab ── */
|
|
58160
58468
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58161
58469
|
selectedPattern && patternDef?.propsSchema && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58162
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58470
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.props") }),
|
|
58163
58471
|
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1.5", children: Object.entries(patternDef.propsSchema).slice(0, 12).map(([propName, propSchema]) => {
|
|
58164
58472
|
const ps = propSchema;
|
|
58165
58473
|
const explicitValue = patternConfig ? patternConfig[propName] : void 0;
|
|
@@ -58193,7 +58501,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58193
58501
|
}) })
|
|
58194
58502
|
] }),
|
|
58195
58503
|
userType === "architect" && (selectedPattern && isEntityPattern || !selectedPattern && !isExpanded) && entity && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58196
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58504
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.entity") }),
|
|
58197
58505
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2 mb-2", children: [
|
|
58198
58506
|
/* @__PURE__ */ jsx("svg", { width: 14, height: 14, children: /* @__PURE__ */ jsx("circle", { cx: 7, cy: 7, r: 5, fill: "var(--color-primary)" }) }),
|
|
58199
58507
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-semibold text-xs", children: entity.name }),
|
|
@@ -58236,7 +58544,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58236
58544
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58237
58545
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-mono flex-1", children: f3.name }),
|
|
58238
58546
|
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: f3.type }),
|
|
58239
|
-
f3.required && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary text-[9px]", children: t("
|
|
58547
|
+
f3.required && /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-primary text-[9px]", children: t("orbInspector.required") })
|
|
58240
58548
|
] })
|
|
58241
58549
|
] }, f3.name)) }),
|
|
58242
58550
|
editable && /* @__PURE__ */ jsxs(
|
|
@@ -58248,13 +58556,13 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58248
58556
|
className: "mt-2 text-xs w-full",
|
|
58249
58557
|
children: [
|
|
58250
58558
|
/* @__PURE__ */ jsx(Icon, { name: "plus", size: "xs", className: "mr-1" }),
|
|
58251
|
-
t("
|
|
58559
|
+
t("orbInspector.addField")
|
|
58252
58560
|
]
|
|
58253
58561
|
}
|
|
58254
58562
|
)
|
|
58255
58563
|
] }),
|
|
58256
58564
|
editable && !selectedPattern && !isExpanded && node.layer === "Services" && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58257
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58565
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.serviceMode") }),
|
|
58258
58566
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", className: "items-center", children: [
|
|
58259
58567
|
/* @__PURE__ */ jsxs(
|
|
58260
58568
|
Button,
|
|
@@ -58267,7 +58575,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58267
58575
|
},
|
|
58268
58576
|
children: [
|
|
58269
58577
|
/* @__PURE__ */ jsx(Icon, { name: "monitor", size: "xs", className: "mr-1" }),
|
|
58270
|
-
t("
|
|
58578
|
+
t("orbInspector.standalone")
|
|
58271
58579
|
]
|
|
58272
58580
|
}
|
|
58273
58581
|
),
|
|
@@ -58282,25 +58590,22 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58282
58590
|
},
|
|
58283
58591
|
children: [
|
|
58284
58592
|
/* @__PURE__ */ jsx(Icon, { name: "cpu", size: "xs", className: "mr-1" }),
|
|
58285
|
-
t("
|
|
58593
|
+
t("orbInspector.embedded")
|
|
58286
58594
|
]
|
|
58287
58595
|
}
|
|
58288
58596
|
)
|
|
58289
58597
|
] }),
|
|
58290
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs mt-1", children: hasRenderUi ? t("
|
|
58598
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs mt-1", children: hasRenderUi ? t("orbInspector.rendersOwnUi") : t("orbInspector.headless") })
|
|
58291
58599
|
] }),
|
|
58292
58600
|
!selectedPattern && !isExpanded && traits2.length > 0 && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58293
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: "
|
|
58294
|
-
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1", children: traits2.map((
|
|
58295
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-semibold", children:
|
|
58296
|
-
/* @__PURE__ */
|
|
58297
|
-
|
|
58298
|
-
" states"
|
|
58299
|
-
] })
|
|
58300
|
-
] }, t2.name)) })
|
|
58601
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.traits") }),
|
|
58602
|
+
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-1", children: traits2.map((tr) => /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
|
|
58603
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-semibold", children: tr.name }),
|
|
58604
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: t("orbInspector.statesCount", { count: tr.stateCount }) })
|
|
58605
|
+
] }, tr.name)) })
|
|
58301
58606
|
] }),
|
|
58302
58607
|
isExpanded && fromState && toState && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58303
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: "
|
|
58608
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("avl.transition") }),
|
|
58304
58609
|
/* @__PURE__ */ jsxs("svg", { width: "100%", height: 44, viewBox: "0 0 280 44", children: [
|
|
58305
58610
|
/* @__PURE__ */ jsx(AvlState, { x: 8, y: 8, name: fromState, role: getStateRole(fromState), width: 90, height: 26 }),
|
|
58306
58611
|
/* @__PURE__ */ jsx("line", { x1: 104, y1: 21, x2: 158, y2: 21, stroke: "#1E293B", strokeWidth: 2, markerEnd: "url(#orb-arrow)" }),
|
|
@@ -58309,7 +58614,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58309
58614
|
] }),
|
|
58310
58615
|
traitName && /* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: [
|
|
58311
58616
|
traitName,
|
|
58312
|
-
entityName ?
|
|
58617
|
+
entityName ? t("orbInspector.onEntity", { entity: entityName }) : ""
|
|
58313
58618
|
] })
|
|
58314
58619
|
] }),
|
|
58315
58620
|
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: [
|
|
@@ -58322,7 +58627,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58322
58627
|
Input,
|
|
58323
58628
|
{
|
|
58324
58629
|
defaultValue: formatExpression(transition?.guard ?? guard),
|
|
58325
|
-
placeholder: t("
|
|
58630
|
+
placeholder: t("orbInspector.guardExpression"),
|
|
58326
58631
|
className: "flex-1 text-xs font-mono h-6",
|
|
58327
58632
|
onBlur: (e) => handleGuardChange(e.target.value)
|
|
58328
58633
|
}
|
|
@@ -58330,7 +58635,7 @@ function OrbInspector({ node, schema, editable = false, userType = "builder", th
|
|
|
58330
58635
|
] }) }),
|
|
58331
58636
|
userType === "architect" && (effectTypes.length > 0 || editable) && isExpanded && /* @__PURE__ */ jsxs(Box, { className: "px-4 py-3 border-b border-border/40", children: [
|
|
58332
58637
|
/* @__PURE__ */ jsxs(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: [
|
|
58333
|
-
t("
|
|
58638
|
+
t("avl.effects"),
|
|
58334
58639
|
" (",
|
|
58335
58640
|
effectTypes.length,
|
|
58336
58641
|
")"
|
|
@@ -58387,7 +58692,7 @@ function AddEffectButton({ onAdd }) {
|
|
|
58387
58692
|
className: "text-xs w-full",
|
|
58388
58693
|
children: [
|
|
58389
58694
|
/* @__PURE__ */ jsx(Icon, { name: "plus", size: "xs", className: "mr-1" }),
|
|
58390
|
-
t("
|
|
58695
|
+
t("orbInspector.addEffect")
|
|
58391
58696
|
]
|
|
58392
58697
|
}
|
|
58393
58698
|
),
|
|
@@ -58448,7 +58753,7 @@ var PHASE_2_TOKEN_FALLBACK = {
|
|
|
58448
58753
|
function StylesTab({ patternType, patternDef, patternConfig, editable, onPropChange, themeManifest, isDesignSystem }) {
|
|
58449
58754
|
const { t } = useTranslate();
|
|
58450
58755
|
if (!patternType) {
|
|
58451
|
-
return /* @__PURE__ */ jsx(Box, { className: "p-4", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: t("
|
|
58756
|
+
return /* @__PURE__ */ jsx(Box, { className: "p-4", children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs", children: t("orbInspector.selectPatternForStyles") }) });
|
|
58452
58757
|
}
|
|
58453
58758
|
const tier = patternDef?.category ?? "Pattern";
|
|
58454
58759
|
const tokens = PHASE_2_TOKEN_FALLBACK[patternType] ?? [];
|
|
@@ -58469,11 +58774,11 @@ function StylesTab({ patternType, patternDef, patternConfig, editable, onPropCha
|
|
|
58469
58774
|
)
|
|
58470
58775
|
] }),
|
|
58471
58776
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
58472
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58473
|
-
tokens.length === 0 ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs italic", children: t("
|
|
58777
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.tokens") }),
|
|
58778
|
+
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)) })
|
|
58474
58779
|
] }),
|
|
58475
58780
|
variantEnum && variantEnum.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
58476
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58781
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.variant") }),
|
|
58477
58782
|
/* @__PURE__ */ jsx(Box, { className: "flex flex-wrap gap-1", children: variantEnum.map((variant) => {
|
|
58478
58783
|
const isActive = variant === currentVariant || !currentVariant && variant === "default";
|
|
58479
58784
|
return /* @__PURE__ */ jsx(
|
|
@@ -58493,7 +58798,7 @@ function StylesTab({ patternType, patternDef, patternConfig, editable, onPropCha
|
|
|
58493
58798
|
}) })
|
|
58494
58799
|
] }),
|
|
58495
58800
|
sizeEnum && sizeEnum.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
58496
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("
|
|
58801
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground text-xs uppercase tracking-wider mb-2", children: t("orbInspector.size") }),
|
|
58497
58802
|
/* @__PURE__ */ jsx(Box, { className: "flex flex-wrap gap-1", children: sizeEnum.map((size) => {
|
|
58498
58803
|
const isActive = size === currentSize || !currentSize && size === "md";
|
|
58499
58804
|
return /* @__PURE__ */ jsx(
|
|
@@ -58516,20 +58821,21 @@ function StylesTab({ patternType, patternDef, patternConfig, editable, onPropCha
|
|
|
58516
58821
|
] });
|
|
58517
58822
|
}
|
|
58518
58823
|
var TOKEN_GROUPS = [
|
|
58519
|
-
{ group: "colors",
|
|
58520
|
-
{ group: "radii",
|
|
58521
|
-
{ group: "spacing",
|
|
58522
|
-
{ group: "shadows",
|
|
58824
|
+
{ group: "colors", labelKey: "orbInspector.tokenGroup.colors" },
|
|
58825
|
+
{ group: "radii", labelKey: "orbInspector.tokenGroup.radii" },
|
|
58826
|
+
{ group: "spacing", labelKey: "orbInspector.tokenGroup.spacing" },
|
|
58827
|
+
{ group: "shadows", labelKey: "orbInspector.tokenGroup.shadows" }
|
|
58523
58828
|
];
|
|
58524
58829
|
function TokenEditorSection({ themeManifest, onPropChange }) {
|
|
58830
|
+
const { t } = useTranslate();
|
|
58525
58831
|
const tokens = themeManifest.tokens ?? {};
|
|
58526
58832
|
return /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-3 pt-2 border-t border-border/40", children: [
|
|
58527
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs uppercase tracking-wider text-muted-foreground", children: "
|
|
58528
|
-
TOKEN_GROUPS.map(({ group,
|
|
58833
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs uppercase tracking-wider text-muted-foreground", children: t("orbInspector.projectThemeTokens") }),
|
|
58834
|
+
TOKEN_GROUPS.map(({ group, labelKey }) => {
|
|
58529
58835
|
const entries = Object.entries(tokens[group] ?? {});
|
|
58530
58836
|
if (entries.length === 0) return null;
|
|
58531
58837
|
return /* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-1.5", children: [
|
|
58532
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-mono text-muted-foreground", children:
|
|
58838
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-xs font-mono text-muted-foreground", children: t(labelKey) }),
|
|
58533
58839
|
entries.map(([key, value]) => /* @__PURE__ */ jsx(
|
|
58534
58840
|
TokenRow,
|
|
58535
58841
|
{
|
|
@@ -58577,6 +58883,7 @@ init_Typography();
|
|
|
58577
58883
|
init_Badge();
|
|
58578
58884
|
|
|
58579
58885
|
// components/avl/organisms/AvlTraitScene.tsx
|
|
58886
|
+
init_useTranslate();
|
|
58580
58887
|
init_AvlState();
|
|
58581
58888
|
init_AvlTransitionLane();
|
|
58582
58889
|
init_AvlSwimLane();
|
|
@@ -58590,6 +58897,7 @@ var AvlTraitScene = ({
|
|
|
58590
58897
|
color = "var(--color-primary)",
|
|
58591
58898
|
onTransitionClick
|
|
58592
58899
|
}) => {
|
|
58900
|
+
const { t } = useTranslate();
|
|
58593
58901
|
const [layout, setLayout] = useState(null);
|
|
58594
58902
|
const dataKey = useMemo(() => JSON.stringify(data), [data]);
|
|
58595
58903
|
useEffect(() => {
|
|
@@ -58598,7 +58906,7 @@ var AvlTraitScene = ({
|
|
|
58598
58906
|
});
|
|
58599
58907
|
}, [dataKey]);
|
|
58600
58908
|
if (!layout) {
|
|
58601
|
-
return /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("text", { x: 300, y: 200, textAnchor: "middle", fill: color, fontSize: 12, opacity: 0.5, children: "
|
|
58909
|
+
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") }) });
|
|
58602
58910
|
}
|
|
58603
58911
|
const hasExternal = data.listenedEvents.length > 0 || data.emittedEvents.length > 0;
|
|
58604
58912
|
const machineOffsetX = hasExternal ? 0 : 30;
|
|
@@ -58613,10 +58921,7 @@ var AvlTraitScene = ({
|
|
|
58613
58921
|
const machineHeight = scaledH + 100;
|
|
58614
58922
|
const renderMachine = /* @__PURE__ */ jsxs("g", { children: [
|
|
58615
58923
|
/* @__PURE__ */ jsx("text", { x: CENTER_W2 / 2, y: 20, textAnchor: "middle", fill: color, fontSize: 20, fontWeight: "700", fontFamily: "inherit", children: data.name }),
|
|
58616
|
-
/* @__PURE__ */
|
|
58617
|
-
"linked to ",
|
|
58618
|
-
data.linkedEntity
|
|
58619
|
-
] }),
|
|
58924
|
+
/* @__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 }) }),
|
|
58620
58925
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
58621
58926
|
/* @__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 }) }),
|
|
58622
58927
|
/* @__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 }) })
|
|
@@ -58691,6 +58996,9 @@ var AvlTraitScene = ({
|
|
|
58691
58996
|
);
|
|
58692
58997
|
};
|
|
58693
58998
|
AvlTraitScene.displayName = "AvlTraitScene";
|
|
58999
|
+
|
|
59000
|
+
// components/avl/molecules/TraitCardNode.tsx
|
|
59001
|
+
init_useTranslate();
|
|
58694
59002
|
var TraitCardSelectionContext = createContext({
|
|
58695
59003
|
selectTransition: () => {
|
|
58696
59004
|
}
|
|
@@ -58700,6 +59008,7 @@ var SCENE_WIDTH = 600;
|
|
|
58700
59008
|
var SCENE_HEIGHT = 400;
|
|
58701
59009
|
var TraitCardNodeInner = (props) => {
|
|
58702
59010
|
const data = props.data;
|
|
59011
|
+
const { t } = useTranslate();
|
|
58703
59012
|
const { selectTransition } = useContext(TraitCardSelectionContext);
|
|
58704
59013
|
const orbitalName = data.orbitalName;
|
|
58705
59014
|
const traitName = data.traitName ?? "";
|
|
@@ -58725,7 +59034,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
58725
59034
|
position: Position.Left,
|
|
58726
59035
|
id: `listen-${event}`,
|
|
58727
59036
|
style: { top: `${(i + 1) / (listens.length + 1) * 100}%` },
|
|
58728
|
-
"aria-label":
|
|
59037
|
+
"aria-label": t("avl.listensFor", { event })
|
|
58729
59038
|
},
|
|
58730
59039
|
`listen-${event}`
|
|
58731
59040
|
)),
|
|
@@ -58736,7 +59045,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
58736
59045
|
position: Position.Right,
|
|
58737
59046
|
id: `emit-${event}`,
|
|
58738
59047
|
style: { top: `${(i + 1) / (emits.length + 1) * 100}%` },
|
|
58739
|
-
"aria-label":
|
|
59048
|
+
"aria-label": t("avl.emits", { event })
|
|
58740
59049
|
},
|
|
58741
59050
|
`emit-${event}`
|
|
58742
59051
|
)),
|
|
@@ -58763,14 +59072,14 @@ var TraitCardNodeInner = (props) => {
|
|
|
58763
59072
|
{
|
|
58764
59073
|
data: traitLevelData,
|
|
58765
59074
|
onTransitionClick: (idx) => {
|
|
58766
|
-
const
|
|
58767
|
-
if (!
|
|
59075
|
+
const t2 = transitions[idx];
|
|
59076
|
+
if (!t2) return;
|
|
58768
59077
|
selectTransition({
|
|
58769
59078
|
orbitalName,
|
|
58770
59079
|
traitName,
|
|
58771
|
-
transitionEvent:
|
|
58772
|
-
fromState:
|
|
58773
|
-
toState:
|
|
59080
|
+
transitionEvent: t2.event,
|
|
59081
|
+
fromState: t2.fromState,
|
|
59082
|
+
toState: t2.toState,
|
|
58774
59083
|
index: idx
|
|
58775
59084
|
});
|
|
58776
59085
|
}
|
|
@@ -58778,7 +59087,7 @@ var TraitCardNodeInner = (props) => {
|
|
|
58778
59087
|
)
|
|
58779
59088
|
}
|
|
58780
59089
|
)
|
|
58781
|
-
) : /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "
|
|
59090
|
+
) : /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: t("avl.noStateMachine") })
|
|
58782
59091
|
] })
|
|
58783
59092
|
]
|
|
58784
59093
|
}
|
|
@@ -58789,6 +59098,7 @@ TraitCardNode.displayName = "TraitCardNode";
|
|
|
58789
59098
|
|
|
58790
59099
|
// components/avl/organisms/FlowCanvas.tsx
|
|
58791
59100
|
init_useEventBus();
|
|
59101
|
+
init_useTranslate();
|
|
58792
59102
|
var flowCanvasLog = createLogger("almadar:ui:flow-canvas");
|
|
58793
59103
|
var NODE_TYPES = {
|
|
58794
59104
|
preview: OrbPreviewNode,
|
|
@@ -58832,6 +59142,7 @@ function FlowCanvasInner({
|
|
|
58832
59142
|
userType = "builder",
|
|
58833
59143
|
themeManifest
|
|
58834
59144
|
}) {
|
|
59145
|
+
const { t } = useTranslate();
|
|
58835
59146
|
const NODE_TYPES2 = useMemo(() => ({
|
|
58836
59147
|
preview: OrbPreviewNode,
|
|
58837
59148
|
behaviorCompose: BehaviorComposeNode,
|
|
@@ -58884,13 +59195,13 @@ function FlowCanvasInner({
|
|
|
58884
59195
|
}), [selectedPattern]);
|
|
58885
59196
|
const [atBehaviorLevel, setAtBehaviorLevel] = useState(composeLevel === "behavior");
|
|
58886
59197
|
const { composeNodes, composeEdges, overviewNodes, overviewEdges, expandedNodes, expandedEdges, behaviorExpandedNodes, behaviorExpandedEdges, traitExpandedNodes, traitExpandedEdges } = useMemo(() => {
|
|
58887
|
-
const
|
|
59198
|
+
const t2 = perfStart("compose-graph");
|
|
58888
59199
|
const compose = composeLevel === "behavior" && behaviorEntries?.length ? behaviorsToComposeGraph(behaviorEntries, behaviorWires ?? [], layoutHint) : { nodes: [], edges: [] };
|
|
58889
59200
|
const overview = schemaToOverviewGraph(parsedSchema, mockData, behaviorMeta, layoutHint, orbitalStatus, screenSize);
|
|
58890
59201
|
const expanded = expandedOrbital ? orbitalToExpandedGraph(parsedSchema, expandedOrbital, mockData, screenSize) : { nodes: [], edges: [] };
|
|
58891
59202
|
const behaviorExpanded = expandedOrbital && expandedBehaviorAlias ? orbitalAliasToExpandedGraph(parsedSchema, expandedOrbital, expandedBehaviorAlias, mockData, screenSize) : { nodes: [], edges: [] };
|
|
58892
59203
|
const traitExpanded = expandedOrbital ? orbitalToTraitGraph(parsedSchema, expandedOrbital) : { nodes: [], edges: [] };
|
|
58893
|
-
perfEnd("compose-graph",
|
|
59204
|
+
perfEnd("compose-graph", t2, {
|
|
58894
59205
|
composeNodes: compose.nodes.length,
|
|
58895
59206
|
overviewNodes: overview.nodes.length,
|
|
58896
59207
|
expandedNodes: expanded.nodes.length,
|
|
@@ -59143,12 +59454,12 @@ function FlowCanvasInner({
|
|
|
59143
59454
|
{
|
|
59144
59455
|
onClick: handleGoBack,
|
|
59145
59456
|
className: "text-muted-foreground hover:text-foreground text-sm cursor-pointer bg-transparent border-none p-0",
|
|
59146
|
-
"aria-label": "
|
|
59457
|
+
"aria-label": t("canvas.goBackToOverview"),
|
|
59147
59458
|
children: "\u2190"
|
|
59148
59459
|
}
|
|
59149
59460
|
),
|
|
59150
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium", children: level === "overview" ? "
|
|
59151
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: level === "overview" ?
|
|
59461
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium", children: level === "overview" ? t("canvas.overview") : expandedOrbital ?? t("canvas.expanded") }),
|
|
59462
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-muted-foreground", children: level === "overview" ? t("canvas.modulesCount", { count: nodes.length }) : t("canvas.screensCount", { count: nodes.length }) })
|
|
59152
59463
|
] }),
|
|
59153
59464
|
/* @__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) => {
|
|
59154
59465
|
const p2 = SCREEN_SIZE_PRESETS[size];
|
|
@@ -59164,7 +59475,7 @@ function FlowCanvasInner({
|
|
|
59164
59475
|
},
|
|
59165
59476
|
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"}`,
|
|
59166
59477
|
title: `${p2.label} (${p2.width}px)`,
|
|
59167
|
-
"aria-label":
|
|
59478
|
+
"aria-label": t("canvas.switchToView", { label: p2.label }),
|
|
59168
59479
|
children: p2.label
|
|
59169
59480
|
},
|
|
59170
59481
|
size
|
|
@@ -59546,6 +59857,7 @@ init_Stack();
|
|
|
59546
59857
|
init_Typography();
|
|
59547
59858
|
init_Button();
|
|
59548
59859
|
init_Icon();
|
|
59860
|
+
init_useTranslate();
|
|
59549
59861
|
var UNIT_DISPLAY_W = 240;
|
|
59550
59862
|
var UNIT_DISPLAY_H = 160;
|
|
59551
59863
|
function layoutOrbitals(count, containerW, containerH) {
|
|
@@ -59736,6 +60048,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
59736
60048
|
minZoom = 0.4,
|
|
59737
60049
|
maxZoom = 3
|
|
59738
60050
|
}) => {
|
|
60051
|
+
const { t } = useTranslate();
|
|
59739
60052
|
const parsedSchema = useMemo(() => {
|
|
59740
60053
|
if (typeof schemaProp === "string") return JSON.parse(schemaProp);
|
|
59741
60054
|
return schemaProp;
|
|
@@ -59803,9 +60116,9 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
59803
60116
|
(ctx) => {
|
|
59804
60117
|
if (ctx.level !== "transition" || !ctx.trait || !ctx.transition) return;
|
|
59805
60118
|
const orbital = parsedSchema.orbitals?.find((o) => o.name === ctx.orbital);
|
|
59806
|
-
const traitRef = orbital?.traits?.find((
|
|
60119
|
+
const traitRef = orbital?.traits?.find((t2) => isInlineTrait(t2) && t2.name === ctx.trait);
|
|
59807
60120
|
if (!traitRef || !isInlineTrait(traitRef)) return;
|
|
59808
|
-
const idx = traitRef.stateMachine?.transitions?.findIndex((
|
|
60121
|
+
const idx = traitRef.stateMachine?.transitions?.findIndex((t2) => t2.event === ctx.transition) ?? -1;
|
|
59809
60122
|
if (idx < 0) return;
|
|
59810
60123
|
dispatch({ type: "SELECT_TRAIT", trait: ctx.trait });
|
|
59811
60124
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: idx, targetPosition: { x: 0, y: 0 } });
|
|
@@ -59981,7 +60294,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
59981
60294
|
borderRadius: 4,
|
|
59982
60295
|
opacity: 0.8
|
|
59983
60296
|
},
|
|
59984
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "small", style: { color }, children: "
|
|
60297
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "small", style: { color }, children: t("avl.pressEscToZoomOut") })
|
|
59985
60298
|
}
|
|
59986
60299
|
),
|
|
59987
60300
|
state.level === "application" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -60033,7 +60346,7 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
60033
60346
|
onKeyDown: (e) => {
|
|
60034
60347
|
if (e.key === "Enter" || e.key === " ") handleSelect(view.name);
|
|
60035
60348
|
},
|
|
60036
|
-
"aria-label":
|
|
60349
|
+
"aria-label": isHighlighted ? t("avl.orbitalLabelHighlighted", { name: view.name }) : t("avl.orbitalLabel", { name: view.name }),
|
|
60037
60350
|
position: "absolute",
|
|
60038
60351
|
style: {
|
|
60039
60352
|
left: view.cx - UNIT_DISPLAY_W / 2,
|
|
@@ -60081,9 +60394,9 @@ var AvlOrbitalsCosmicZoom = ({
|
|
|
60081
60394
|
zIndex: 30
|
|
60082
60395
|
},
|
|
60083
60396
|
children: [
|
|
60084
|
-
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: zoomIn, title: "
|
|
60085
|
-
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: zoomOut, title: "
|
|
60086
|
-
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "sm", onClick: resetZoom, title: "
|
|
60397
|
+
/* @__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" }) }),
|
|
60398
|
+
/* @__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" }) }),
|
|
60399
|
+
/* @__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" }) })
|
|
60087
60400
|
]
|
|
60088
60401
|
}
|
|
60089
60402
|
)
|