@selvajs/ui 6.6.0-beta.4 → 6.6.0-beta.5
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/components/ErrorScreen.svelte +6 -2
- package/dist/components/compute/AppLayout.svelte +157 -71
- package/dist/components/compute/AppLayout.svelte.d.ts +6 -0
- package/dist/components/compute/ComputeApp.svelte +39 -20
- package/dist/components/compute/ComputeApp.svelte.d.ts +19 -2
- package/dist/components/compute/ComputeMessagesDialog.svelte +30 -40
- package/dist/components/compute/ParameterPresetManager.svelte +7 -44
- package/dist/components/compute/ParameterPresetManager.svelte.d.ts +4 -5
- package/dist/components/compute/SolveMessages.svelte +30 -37
- package/dist/components/compute/SolveMessages.svelte.d.ts +0 -12
- package/dist/components/layout/PageFooter.svelte +21 -11
- package/dist/components/preview/ChartOutput.svelte +12 -7
- package/dist/components/preview/Group.svelte +33 -18
- package/dist/components/preview/HelpButton.svelte +4 -2
- package/dist/components/preview/ImageOutput.svelte +427 -68
- package/dist/components/preview/InputControl.svelte +11 -2
- package/dist/components/preview/OutputDisplay.svelte +17 -12
- package/dist/components/preview/TabContent.svelte +3 -0
- package/dist/components/preview/inputs/ColorInput.svelte +3 -1
- package/dist/components/preview/inputs/ColorInput.svelte.d.ts +1 -0
- package/dist/components/preview/inputs/DropdownInput.svelte +4 -1
- package/dist/components/preview/inputs/FileInput.svelte +50 -34
- package/dist/components/preview/inputs/NumberInput.svelte +92 -10
- package/dist/components/preview/inputs/NumberInput.svelte.d.ts +2 -0
- package/dist/components/preview/inputs/TextInput.svelte +8 -3
- package/dist/components/primitives/CalculateButton.svelte +49 -23
- package/dist/components/primitives/CalculateButton.svelte.d.ts +3 -0
- package/dist/components/primitives/SolvingIndicator.svelte +21 -17
- package/dist/components/primitives/badge/badge.svelte +2 -2
- package/dist/components/primitives/badge/badge.svelte.d.ts +4 -4
- package/dist/components/primitives/button/button.svelte +2 -2
- package/dist/components/primitives/button/button.svelte.d.ts +4 -4
- package/dist/components/primitives/checkbox/checkbox.svelte +1 -1
- package/dist/components/primitives/dialog/dialog-content.svelte +6 -2
- package/dist/components/primitives/input/input.svelte +2 -2
- package/dist/components/primitives/input-group/input-group.svelte +1 -1
- package/dist/components/primitives/mode-toggle/mode-toggle.svelte +4 -1
- package/dist/components/primitives/scroll-area/scroll-area.svelte +1 -1
- package/dist/components/primitives/search/search.svelte +1 -1
- package/dist/components/primitives/select/select-trigger.svelte +1 -1
- package/dist/components/primitives/slider/slider.svelte +7 -2
- package/dist/components/primitives/slider/slider.svelte.d.ts +5 -1
- package/dist/components/primitives/switch/switch.svelte +1 -1
- package/dist/components/primitives/tabs/tabs-trigger.svelte +1 -1
- package/dist/components/primitives/tabs/tabs-trigger.svelte.d.ts +1 -1
- package/dist/components/primitives/textarea/textarea.svelte +1 -1
- package/dist/components/primitives/toggle/toggle.svelte +1 -1
- package/dist/components/primitives/toggle/toggle.svelte.d.ts +1 -1
- package/dist/components/viewer/Viewer.svelte +20 -17
- package/dist/compute/run-panel-action.d.ts +8 -0
- package/dist/compute/run-panel-action.js +12 -0
- package/dist/compute/useSolveSession.svelte.js +3 -0
- package/dist/i18n/localeContext.svelte.d.ts +10 -3
- package/dist/i18n/localeContext.svelte.js +27 -5
- package/dist/i18n/messages.d.ts +115 -2
- package/dist/i18n/messages.js +199 -11
- package/dist/index.d.ts +1 -1
- package/dist/public.d.ts +1 -1
- package/dist/schema/visibility-rules.js +21 -0
- package/dist/styles/base.css +9 -6
- package/dist/types/actionButton.d.ts +17 -3
- package/dist/types/presetLabels.d.ts +3 -2
- package/dist/types/presetLabels.js +9 -8
- package/package.json +4 -4
- package/src/lib/components/ErrorScreen.svelte +6 -2
- package/src/lib/components/compute/AppLayout.svelte +157 -71
- package/src/lib/components/compute/ComputeApp.svelte +39 -20
- package/src/lib/components/compute/ComputeMessagesDialog.svelte +30 -40
- package/src/lib/components/compute/ParameterPresetManager.svelte +7 -44
- package/src/lib/components/compute/SolveMessages.svelte +30 -37
- package/src/lib/components/layout/PageFooter.svelte +21 -11
- package/src/lib/components/preview/ChartOutput.svelte +12 -7
- package/src/lib/components/preview/Group.svelte +33 -18
- package/src/lib/components/preview/HelpButton.svelte +4 -2
- package/src/lib/components/preview/ImageOutput.svelte +427 -68
- package/src/lib/components/preview/InputControl.svelte +11 -2
- package/src/lib/components/preview/OutputDisplay.svelte +17 -12
- package/src/lib/components/preview/TabContent.svelte +3 -0
- package/src/lib/components/preview/inputs/ColorInput.svelte +3 -1
- package/src/lib/components/preview/inputs/DropdownInput.svelte +4 -1
- package/src/lib/components/preview/inputs/FileInput.svelte +50 -34
- package/src/lib/components/preview/inputs/NumberInput.svelte +92 -10
- package/src/lib/components/preview/inputs/TextInput.svelte +8 -3
- package/src/lib/components/primitives/CalculateButton.svelte +49 -23
- package/src/lib/components/primitives/SolvingIndicator.svelte +21 -17
- package/src/lib/components/primitives/badge/badge.svelte +2 -2
- package/src/lib/components/primitives/button/button.svelte +2 -2
- package/src/lib/components/primitives/checkbox/checkbox.svelte +1 -1
- package/src/lib/components/primitives/dialog/dialog-content.svelte +6 -2
- package/src/lib/components/primitives/input/input.svelte +2 -2
- package/src/lib/components/primitives/input-group/input-group.svelte +1 -1
- package/src/lib/components/primitives/mode-toggle/mode-toggle.svelte +4 -1
- package/src/lib/components/primitives/scroll-area/scroll-area.svelte +1 -1
- package/src/lib/components/primitives/search/search.svelte +1 -1
- package/src/lib/components/primitives/select/select-trigger.svelte +1 -1
- package/src/lib/components/primitives/slider/slider.svelte +7 -2
- package/src/lib/components/primitives/switch/switch.svelte +1 -1
- package/src/lib/components/primitives/tabs/tabs-trigger.svelte +1 -1
- package/src/lib/components/primitives/textarea/textarea.svelte +1 -1
- package/src/lib/components/primitives/toggle/toggle.svelte +1 -1
- package/src/lib/components/viewer/Viewer.svelte +20 -17
- package/src/lib/compute/run-panel-action.ts +16 -0
- package/src/lib/compute/useSolveSession.svelte.ts +3 -0
- package/src/lib/i18n/localeContext.svelte.ts +40 -5
- package/src/lib/i18n/messages.ts +351 -13
- package/src/lib/index.ts +1 -0
- package/src/lib/public.ts +1 -0
- package/src/lib/schema/visibility-rules.ts +23 -0
- package/src/lib/styles/base.css +9 -6
- package/src/lib/types/actionButton.ts +16 -3
- package/src/lib/types/presetLabels.ts +13 -11
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -20,6 +20,13 @@ export interface ViewerMessages {
|
|
|
20
20
|
viewLeft: string;
|
|
21
21
|
viewBottom: string;
|
|
22
22
|
viewIso: string;
|
|
23
|
+
lookTechnical: string;
|
|
24
|
+
lookStudio: string;
|
|
25
|
+
lookShowcase: string;
|
|
26
|
+
lookArctic: string;
|
|
27
|
+
lookXray: string;
|
|
28
|
+
lookLineart: string;
|
|
29
|
+
lookWireframe: string;
|
|
23
30
|
searchObjects: string;
|
|
24
31
|
clearSearch: string;
|
|
25
32
|
expandLayer: string;
|
|
@@ -49,8 +56,6 @@ export interface ViewerMessages {
|
|
|
49
56
|
moreTab: string;
|
|
50
57
|
scrollTabsBack: string;
|
|
51
58
|
scrollTabsForward: string;
|
|
52
|
-
expandPanel: string;
|
|
53
|
-
collapsePanel: string;
|
|
54
59
|
/** `{side}` is replaced with `panelSideLeft` / `panelSideRight`. */
|
|
55
60
|
expandSidePanel: string;
|
|
56
61
|
panelSideLeft: string;
|
|
@@ -62,8 +67,116 @@ export interface ViewerMessages {
|
|
|
62
67
|
pressToCalculate: string;
|
|
63
68
|
calculate: string;
|
|
64
69
|
upToDate: string;
|
|
70
|
+
/** The panel footer's ⋯ menu: saving and loading inputs, plus the host's own actions. */
|
|
71
|
+
moreActions: string;
|
|
72
|
+
/** Under a menu action that solves before it runs, while the inputs have changed. */
|
|
73
|
+
calculatesFirst: string;
|
|
74
|
+
/** `{count}` is replaced with the number of errors. */
|
|
75
|
+
errorCountOne: string;
|
|
76
|
+
errorCountOther: string;
|
|
77
|
+
/** `{count}` is replaced with the number of warnings. */
|
|
78
|
+
warningCountOne: string;
|
|
79
|
+
warningCountOther: string;
|
|
80
|
+
/** `{count}` is replaced with the number of notes. */
|
|
81
|
+
noteCountOne: string;
|
|
82
|
+
noteCountOther: string;
|
|
83
|
+
/** `{count}` is replaced with the number of messages. */
|
|
84
|
+
lastSolveMessagesOne: string;
|
|
85
|
+
lastSolveMessagesOther: string;
|
|
86
|
+
messagesTitle: string;
|
|
87
|
+
/** `{name}` is replaced with the copyright holder, `{year}` with the current year. */
|
|
88
|
+
copyright: string;
|
|
89
|
+
close: string;
|
|
90
|
+
toggleTheme: string;
|
|
91
|
+
errorTitle: string;
|
|
92
|
+
goHome: string;
|
|
93
|
+
selectOption: string;
|
|
94
|
+
noOptionsYet: string;
|
|
95
|
+
/** `{min}` is replaced with the field's minimum. */
|
|
96
|
+
minValue: string;
|
|
97
|
+
/** `{max}` is replaced with the field's maximum. */
|
|
98
|
+
maxValue: string;
|
|
99
|
+
fineDragHint: string;
|
|
100
|
+
/** `{max}` is replaced with the field's character limit. */
|
|
101
|
+
maxLength: string;
|
|
102
|
+
invalidFormat: string;
|
|
103
|
+
invalidPattern: string;
|
|
104
|
+
fileModeUpload: string;
|
|
105
|
+
fileModeUrl: string;
|
|
106
|
+
fileUrlLabel: string;
|
|
107
|
+
fetchFile: string;
|
|
108
|
+
fetchingFile: string;
|
|
109
|
+
fileUrlPublic: string;
|
|
110
|
+
chooseFile: string;
|
|
111
|
+
/** `{formats}` is replaced with the accepted extensions. */
|
|
112
|
+
acceptedFormats: string;
|
|
113
|
+
/** `{ext}` is replaced with the file's extension. */
|
|
114
|
+
uploadedFile: string;
|
|
115
|
+
/** `{ext}` is replaced with the file's extension, `{size}` with its size in MB. */
|
|
116
|
+
uploadedFileSize: string;
|
|
117
|
+
/** `{ext}` is replaced with the file's extension, `{size}` with its size in KB. */
|
|
118
|
+
fileLoaded: string;
|
|
119
|
+
urlInvalid: string;
|
|
120
|
+
urlProtocolUnsupported: string;
|
|
121
|
+
/** `{status}` is replaced with the HTTP status the server answered with. */
|
|
122
|
+
urlServerError: string;
|
|
123
|
+
/** `{ext}` is replaced with the rejected extension, `{formats}` with the accepted ones. */
|
|
124
|
+
fileFormatNotAccepted: string;
|
|
125
|
+
/** `{size}` is replaced with the file's size in MB, `{max}` with the limit in MB. */
|
|
126
|
+
fileTooLarge: string;
|
|
127
|
+
fileTooLargeUseUpload: string;
|
|
128
|
+
fileReadFailed: string;
|
|
129
|
+
/** `{host}` is replaced with the URL's host name. */
|
|
130
|
+
urlUnreachable: string;
|
|
131
|
+
urlUnreachableHint: string;
|
|
132
|
+
urlHintSharePoint: string;
|
|
133
|
+
urlHintGoogleDrive: string;
|
|
134
|
+
urlHintDropbox: string;
|
|
135
|
+
unknownError: string;
|
|
136
|
+
waitingForData: string;
|
|
137
|
+
waitingForFiles: string;
|
|
138
|
+
/** `{count}` is replaced with the number of files. */
|
|
139
|
+
fileCount: string;
|
|
140
|
+
duplicateFilesTitle: string;
|
|
141
|
+
duplicatePathsOne: string;
|
|
142
|
+
duplicatePathsOther: string;
|
|
143
|
+
duplicateFilesHint: string;
|
|
144
|
+
downloadFile: string;
|
|
145
|
+
/** `{count}` is replaced with the number of files. */
|
|
146
|
+
downloadFiles: string;
|
|
147
|
+
downloading: string;
|
|
148
|
+
downloadFailed: string;
|
|
149
|
+
copy: string;
|
|
150
|
+
copied: string;
|
|
151
|
+
chartReceiving: string;
|
|
152
|
+
chartRenderFailed: string;
|
|
153
|
+
/** `{error}` is replaced with the browser's reason. */
|
|
154
|
+
fullscreenUnavailable: string;
|
|
155
|
+
/** `{error}` is replaced with the browser's reason. */
|
|
156
|
+
exitFullscreenFailed: string;
|
|
157
|
+
imageViewer: string;
|
|
158
|
+
imageLoading: string;
|
|
159
|
+
/** `{ext}` is replaced with the file's extension, `{formats}` with the supported ones. */
|
|
160
|
+
imageUnsupported: string;
|
|
161
|
+
imageUnknownFormat: string;
|
|
162
|
+
/** `{file}` is replaced with the file's name. */
|
|
163
|
+
imageDecodeFailed: string;
|
|
164
|
+
previousImage: string;
|
|
165
|
+
nextImage: string;
|
|
166
|
+
zoomHint: string;
|
|
167
|
+
zoomIn: string;
|
|
168
|
+
zoomOut: string;
|
|
169
|
+
zoomFit: string;
|
|
170
|
+
zoomActual: string;
|
|
171
|
+
downloadImage: string;
|
|
65
172
|
}
|
|
66
173
|
export declare const VIEWER_MESSAGES: Record<Locale, ViewerMessages>;
|
|
67
174
|
export declare const DEFAULT_LOCALE: Locale;
|
|
68
175
|
/** Resolve a catalog for a locale, falling back to English for unknown locales. */
|
|
69
176
|
export declare function messagesFor(locale: Locale | undefined): ViewerMessages;
|
|
177
|
+
/** Layers a host's partial overrides over a full catalog. An `undefined` entry keeps the base string. */
|
|
178
|
+
export declare function withOverrides(base: ViewerMessages, overrides: Partial<ViewerMessages> | undefined): ViewerMessages;
|
|
179
|
+
/** Fills each `{name}` placeholder from `vars`; an unknown placeholder is left as written. */
|
|
180
|
+
export declare function formatMessage(template: string, vars: Record<string, string | number>): string;
|
|
181
|
+
/** Picks the singular or plural form for `count` and fills its `{count}`. */
|
|
182
|
+
export declare function formatCount(count: number, one: string, other: string): string;
|
package/dist/i18n/messages.js
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
// Only the strings @selvajs/ui renders itself. Names coming from a Grasshopper
|
|
6
6
|
// definition — meshes, layers, metadata keys — live in the user's .gh file and
|
|
7
7
|
// cannot be translated here.
|
|
8
|
+
//
|
|
9
|
+
// A `{name}` in a message is a placeholder the component fills in. Pairs ending in
|
|
10
|
+
// `One`/`Other` are the singular and plural forms of one message.
|
|
8
11
|
const en = {
|
|
9
12
|
toolsMenu: 'Viewer tools',
|
|
10
13
|
switchToOrthographic: 'Orthographic camera',
|
|
@@ -26,6 +29,13 @@ const en = {
|
|
|
26
29
|
viewLeft: 'Left',
|
|
27
30
|
viewBottom: 'Bottom',
|
|
28
31
|
viewIso: 'Isometric',
|
|
32
|
+
lookTechnical: 'Technical',
|
|
33
|
+
lookStudio: 'Studio',
|
|
34
|
+
lookShowcase: 'Showcase',
|
|
35
|
+
lookArctic: 'Arctic',
|
|
36
|
+
lookXray: 'X-Ray',
|
|
37
|
+
lookLineart: 'Line Art',
|
|
38
|
+
lookWireframe: 'Wireframe',
|
|
29
39
|
searchObjects: 'Search objects...',
|
|
30
40
|
clearSearch: 'Clear search',
|
|
31
41
|
expandLayer: 'Expand layer',
|
|
@@ -40,7 +50,7 @@ const en = {
|
|
|
40
50
|
noResultsFor: 'No results for "{query}"',
|
|
41
51
|
objectFallbackName: 'Object',
|
|
42
52
|
noMetadata: 'No metadata',
|
|
43
|
-
loadingSchema: 'Loading
|
|
53
|
+
loadingSchema: 'Loading…',
|
|
44
54
|
solveBlocked: 'The definition stopped this solve. No results were produced.',
|
|
45
55
|
solveBlockedTitle: 'Solve stopped',
|
|
46
56
|
solveMessagesTitle: 'Solve messages',
|
|
@@ -54,18 +64,94 @@ const en = {
|
|
|
54
64
|
moreTab: 'More',
|
|
55
65
|
scrollTabsBack: 'Previous tabs',
|
|
56
66
|
scrollTabsForward: 'More tabs',
|
|
57
|
-
expandPanel: 'Expand panel',
|
|
58
|
-
collapsePanel: 'Collapse panel',
|
|
59
67
|
expandSidePanel: 'Expand {side} panel',
|
|
60
68
|
panelSideLeft: 'left',
|
|
61
69
|
panelSideRight: 'right',
|
|
62
70
|
tabNoGroups: 'This tab has no groups configured.',
|
|
63
71
|
solving: 'Solving',
|
|
64
72
|
solvingEllipsis: 'Solving...',
|
|
65
|
-
solvingSubtitle: '
|
|
73
|
+
solvingSubtitle: 'This can take a moment…',
|
|
66
74
|
pressToCalculate: 'Press to calculate',
|
|
67
75
|
calculate: 'Calculate',
|
|
68
|
-
upToDate: 'Up to date'
|
|
76
|
+
upToDate: 'Up to date',
|
|
77
|
+
moreActions: 'More actions',
|
|
78
|
+
calculatesFirst: 'Calculates first',
|
|
79
|
+
errorCountOne: '{count} error',
|
|
80
|
+
errorCountOther: '{count} errors',
|
|
81
|
+
warningCountOne: '{count} warning',
|
|
82
|
+
warningCountOther: '{count} warnings',
|
|
83
|
+
noteCountOne: '{count} note',
|
|
84
|
+
noteCountOther: '{count} notes',
|
|
85
|
+
lastSolveMessagesOne: '{count} message from the last solve',
|
|
86
|
+
lastSolveMessagesOther: '{count} messages from the last solve',
|
|
87
|
+
messagesTitle: 'Messages',
|
|
88
|
+
copyright: 'by {name} © {year}',
|
|
89
|
+
close: 'Close',
|
|
90
|
+
toggleTheme: 'Toggle theme',
|
|
91
|
+
errorTitle: 'Error',
|
|
92
|
+
goHome: 'Go Home',
|
|
93
|
+
selectOption: 'Select an option...',
|
|
94
|
+
noOptionsYet: 'No options available yet.',
|
|
95
|
+
minValue: 'Minimum value is {min}',
|
|
96
|
+
maxValue: 'Maximum value is {max}',
|
|
97
|
+
fineDragHint: 'Hold Shift to drag finely',
|
|
98
|
+
maxLength: 'Maximum {max} characters allowed',
|
|
99
|
+
invalidFormat: 'Invalid format',
|
|
100
|
+
invalidPattern: 'Invalid validation pattern configured',
|
|
101
|
+
fileModeUpload: 'Upload',
|
|
102
|
+
fileModeUrl: 'URL',
|
|
103
|
+
fileUrlLabel: 'File URL',
|
|
104
|
+
fetchFile: 'Fetch',
|
|
105
|
+
fetchingFile: 'Fetching...',
|
|
106
|
+
fileUrlPublic: 'URL must be publicly accessible (no login required).',
|
|
107
|
+
chooseFile: 'Choose File or Drag & Drop',
|
|
108
|
+
acceptedFormats: 'Accepted formats: {formats}',
|
|
109
|
+
uploadedFile: 'Uploaded file ({ext})',
|
|
110
|
+
uploadedFileSize: 'Uploaded file ({ext}, {size}MB)',
|
|
111
|
+
fileLoaded: 'Loaded {ext} ({size} KB)',
|
|
112
|
+
urlInvalid: 'Invalid URL — make sure it starts with https://',
|
|
113
|
+
urlProtocolUnsupported: 'Only http:// and https:// URLs are supported.',
|
|
114
|
+
urlServerError: 'Server returned {status}. Check the URL is correct and publicly accessible.',
|
|
115
|
+
fileFormatNotAccepted: 'File format "{ext}" is not accepted. Allowed: {formats}',
|
|
116
|
+
fileTooLarge: 'File too large: {size}MB (max {max}MB).',
|
|
117
|
+
fileTooLargeUseUpload: 'Download it and use Upload instead.',
|
|
118
|
+
fileReadFailed: 'Failed to read the downloaded file.',
|
|
119
|
+
urlUnreachable: 'Could not reach "{host}" — the file may not exist, or the server does not allow browser access.',
|
|
120
|
+
urlUnreachableHint: 'Check that the URL is correct and the file is publicly accessible. If the server requires login, download the file and use the Upload option instead.',
|
|
121
|
+
urlHintSharePoint: 'SharePoint/OneDrive blocks browser access. Open the file in SharePoint, use "Download" to save it locally, then upload it here.',
|
|
122
|
+
urlHintGoogleDrive: 'Google Drive blocks browser access. Use "Download" in Google Drive to save the file locally, then upload it here.',
|
|
123
|
+
urlHintDropbox: 'Dropbox links may block browser access. Try changing "?dl=0" to "?dl=1" in the URL, or download and upload instead.',
|
|
124
|
+
unknownError: 'Unknown error',
|
|
125
|
+
waitingForData: 'Waiting for data...',
|
|
126
|
+
waitingForFiles: 'Waiting for file data...',
|
|
127
|
+
fileCount: '{count} files',
|
|
128
|
+
duplicateFilesTitle: 'Duplicate file names detected',
|
|
129
|
+
duplicatePathsOne: 'The following path appears more than once:',
|
|
130
|
+
duplicatePathsOther: 'The following paths appear more than once:',
|
|
131
|
+
duplicateFilesHint: 'Rename outputs in your Grasshopper definition so each file has a unique name.',
|
|
132
|
+
downloadFile: 'Download File',
|
|
133
|
+
downloadFiles: 'Download {count} Files',
|
|
134
|
+
downloading: 'Downloading...',
|
|
135
|
+
downloadFailed: 'Download failed',
|
|
136
|
+
copy: 'Copy',
|
|
137
|
+
copied: 'Copied!',
|
|
138
|
+
chartReceiving: 'Receiving chart data...',
|
|
139
|
+
chartRenderFailed: 'Failed to render chart',
|
|
140
|
+
fullscreenUnavailable: 'Fullscreen unavailable: {error}',
|
|
141
|
+
exitFullscreenFailed: 'Exit fullscreen failed: {error}',
|
|
142
|
+
imageViewer: 'image viewer',
|
|
143
|
+
imageLoading: 'Loading image…',
|
|
144
|
+
imageUnsupported: 'Unsupported image format: {ext}. Supported: {formats}',
|
|
145
|
+
imageUnknownFormat: '(unknown)',
|
|
146
|
+
imageDecodeFailed: "Couldn't decode {file}",
|
|
147
|
+
previousImage: 'Previous image',
|
|
148
|
+
nextImage: 'Next image',
|
|
149
|
+
zoomHint: 'Hold Ctrl or ⌘ and scroll to zoom',
|
|
150
|
+
zoomIn: 'Zoom in',
|
|
151
|
+
zoomOut: 'Zoom out',
|
|
152
|
+
zoomFit: 'Fit',
|
|
153
|
+
zoomActual: 'Actual pixels',
|
|
154
|
+
downloadImage: 'Download image'
|
|
69
155
|
};
|
|
70
156
|
const de = {
|
|
71
157
|
toolsMenu: 'Viewer-Werkzeuge',
|
|
@@ -88,6 +174,13 @@ const de = {
|
|
|
88
174
|
viewLeft: 'Links',
|
|
89
175
|
viewBottom: 'Unten',
|
|
90
176
|
viewIso: 'Isometrisch',
|
|
177
|
+
lookTechnical: 'Technisch',
|
|
178
|
+
lookStudio: 'Studio',
|
|
179
|
+
lookShowcase: 'Präsentation',
|
|
180
|
+
lookArctic: 'Arktis',
|
|
181
|
+
lookXray: 'Röntgen',
|
|
182
|
+
lookLineart: 'Strichzeichnung',
|
|
183
|
+
lookWireframe: 'Drahtgitter',
|
|
91
184
|
searchObjects: 'Objekte suchen...',
|
|
92
185
|
clearSearch: 'Suche löschen',
|
|
93
186
|
expandLayer: 'Ebene aufklappen',
|
|
@@ -102,7 +195,7 @@ const de = {
|
|
|
102
195
|
noResultsFor: 'Keine Ergebnisse für „{query}“',
|
|
103
196
|
objectFallbackName: 'Objekt',
|
|
104
197
|
noMetadata: 'Keine Metadaten',
|
|
105
|
-
loadingSchema: '
|
|
198
|
+
loadingSchema: 'Wird geladen…',
|
|
106
199
|
solveBlocked: 'Die Definition hat diese Berechnung gestoppt. Es wurden keine Ergebnisse erzeugt.',
|
|
107
200
|
solveBlockedTitle: 'Berechnung gestoppt',
|
|
108
201
|
solveMessagesTitle: 'Meldungen zur Berechnung',
|
|
@@ -116,18 +209,94 @@ const de = {
|
|
|
116
209
|
moreTab: 'Mehr',
|
|
117
210
|
scrollTabsBack: 'Vorherige Tabs',
|
|
118
211
|
scrollTabsForward: 'Weitere Tabs',
|
|
119
|
-
expandPanel: 'Bereich aufklappen',
|
|
120
|
-
collapsePanel: 'Bereich zuklappen',
|
|
121
212
|
expandSidePanel: '{side} Bereich aufklappen',
|
|
122
213
|
panelSideLeft: 'Linken',
|
|
123
214
|
panelSideRight: 'Rechten',
|
|
124
215
|
tabNoGroups: 'Für diesen Tab sind keine Gruppen konfiguriert.',
|
|
125
216
|
solving: 'Berechnung läuft',
|
|
126
217
|
solvingEllipsis: 'Berechnung läuft...',
|
|
127
|
-
solvingSubtitle: '
|
|
128
|
-
pressToCalculate: '
|
|
218
|
+
solvingSubtitle: 'Das kann einen Moment dauern…',
|
|
219
|
+
pressToCalculate: 'Berechnen',
|
|
129
220
|
calculate: 'Berechnen',
|
|
130
|
-
upToDate: '
|
|
221
|
+
upToDate: 'Berechnet',
|
|
222
|
+
moreActions: 'Weitere Aktionen',
|
|
223
|
+
calculatesFirst: 'Berechnet zuerst',
|
|
224
|
+
errorCountOne: '{count} Fehler',
|
|
225
|
+
errorCountOther: '{count} Fehler',
|
|
226
|
+
warningCountOne: '{count} Warnung',
|
|
227
|
+
warningCountOther: '{count} Warnungen',
|
|
228
|
+
noteCountOne: '{count} Hinweis',
|
|
229
|
+
noteCountOther: '{count} Hinweise',
|
|
230
|
+
lastSolveMessagesOne: '{count} Meldung der letzten Berechnung',
|
|
231
|
+
lastSolveMessagesOther: '{count} Meldungen der letzten Berechnung',
|
|
232
|
+
messagesTitle: 'Meldungen',
|
|
233
|
+
copyright: 'von {name} © {year}',
|
|
234
|
+
close: 'Schliessen',
|
|
235
|
+
toggleTheme: 'Farbschema wechseln',
|
|
236
|
+
errorTitle: 'Fehler',
|
|
237
|
+
goHome: 'Zur Startseite',
|
|
238
|
+
selectOption: 'Option wählen…',
|
|
239
|
+
noOptionsYet: 'Noch keine Optionen verfügbar.',
|
|
240
|
+
minValue: 'Der kleinste erlaubte Wert ist {min}',
|
|
241
|
+
maxValue: 'Der grösste erlaubte Wert ist {max}',
|
|
242
|
+
fineDragHint: 'Umschalttaste halten für feine Schritte',
|
|
243
|
+
maxLength: 'Höchstens {max} Zeichen erlaubt',
|
|
244
|
+
invalidFormat: 'Ungültiges Format',
|
|
245
|
+
invalidPattern: 'Ungültiges Prüfmuster hinterlegt',
|
|
246
|
+
fileModeUpload: 'Hochladen',
|
|
247
|
+
fileModeUrl: 'URL',
|
|
248
|
+
fileUrlLabel: 'Datei-URL',
|
|
249
|
+
fetchFile: 'Abrufen',
|
|
250
|
+
fetchingFile: 'Wird abgerufen…',
|
|
251
|
+
fileUrlPublic: 'Die URL muss öffentlich erreichbar sein (ohne Anmeldung).',
|
|
252
|
+
chooseFile: 'Datei wählen oder hierher ziehen',
|
|
253
|
+
acceptedFormats: 'Erlaubte Formate: {formats}',
|
|
254
|
+
uploadedFile: 'Hochgeladene Datei ({ext})',
|
|
255
|
+
uploadedFileSize: 'Hochgeladene Datei ({ext}, {size} MB)',
|
|
256
|
+
fileLoaded: '{ext} geladen ({size} KB)',
|
|
257
|
+
urlInvalid: 'Ungültige URL – sie muss mit https:// beginnen',
|
|
258
|
+
urlProtocolUnsupported: 'Nur http://- und https://-URLs werden unterstützt.',
|
|
259
|
+
urlServerError: 'Der Server antwortete mit {status}. Ist die URL korrekt und öffentlich erreichbar?',
|
|
260
|
+
fileFormatNotAccepted: 'Dateiformat „{ext}“ ist nicht erlaubt. Erlaubt: {formats}',
|
|
261
|
+
fileTooLarge: 'Datei zu gross: {size} MB (höchstens {max} MB).',
|
|
262
|
+
fileTooLargeUseUpload: 'Datei herunterladen und stattdessen über „Hochladen“ einfügen.',
|
|
263
|
+
fileReadFailed: 'Die heruntergeladene Datei konnte nicht gelesen werden.',
|
|
264
|
+
urlUnreachable: '„{host}“ ist nicht erreichbar – die Datei existiert vielleicht nicht, oder der Server erlaubt keinen Zugriff aus dem Browser.',
|
|
265
|
+
urlUnreachableHint: 'Prüfen, ob die URL stimmt und die Datei öffentlich erreichbar ist. Verlangt der Server eine Anmeldung: Datei herunterladen und über „Hochladen“ einfügen.',
|
|
266
|
+
urlHintSharePoint: 'SharePoint/OneDrive sperrt den Zugriff aus dem Browser. Datei in SharePoint öffnen, mit „Herunterladen“ lokal speichern und hier hochladen.',
|
|
267
|
+
urlHintGoogleDrive: 'Google Drive sperrt den Zugriff aus dem Browser. Datei in Google Drive mit „Herunterladen“ lokal speichern und hier hochladen.',
|
|
268
|
+
urlHintDropbox: 'Dropbox-Links sperren den Zugriff aus dem Browser oft. In der URL „?dl=0“ durch „?dl=1“ ersetzen oder die Datei herunterladen und hochladen.',
|
|
269
|
+
unknownError: 'Unbekannter Fehler',
|
|
270
|
+
waitingForData: 'Noch keine Daten',
|
|
271
|
+
waitingForFiles: 'Noch keine Dateien',
|
|
272
|
+
fileCount: '{count} Dateien',
|
|
273
|
+
duplicateFilesTitle: 'Doppelte Dateinamen',
|
|
274
|
+
duplicatePathsOne: 'Dieser Pfad kommt mehrfach vor:',
|
|
275
|
+
duplicatePathsOther: 'Diese Pfade kommen mehrfach vor:',
|
|
276
|
+
duplicateFilesHint: 'Ausgaben in der Grasshopper-Definition umbenennen, damit jede Datei einen eindeutigen Namen hat.',
|
|
277
|
+
downloadFile: 'Datei herunterladen',
|
|
278
|
+
downloadFiles: '{count} Dateien herunterladen',
|
|
279
|
+
downloading: 'Wird heruntergeladen…',
|
|
280
|
+
downloadFailed: 'Download fehlgeschlagen',
|
|
281
|
+
copy: 'Kopieren',
|
|
282
|
+
copied: 'Kopiert!',
|
|
283
|
+
chartReceiving: 'Diagrammdaten werden empfangen…',
|
|
284
|
+
chartRenderFailed: 'Diagramm konnte nicht dargestellt werden',
|
|
285
|
+
fullscreenUnavailable: 'Vollbild nicht verfügbar: {error}',
|
|
286
|
+
exitFullscreenFailed: 'Vollbild konnte nicht beendet werden: {error}',
|
|
287
|
+
imageViewer: 'Bildbetrachter',
|
|
288
|
+
imageLoading: 'Bild wird geladen…',
|
|
289
|
+
imageUnsupported: 'Bildformat nicht unterstützt: {ext}. Unterstützt: {formats}',
|
|
290
|
+
imageUnknownFormat: '(unbekannt)',
|
|
291
|
+
imageDecodeFailed: '{file} konnte nicht gelesen werden',
|
|
292
|
+
previousImage: 'Vorheriges Bild',
|
|
293
|
+
nextImage: 'Nächstes Bild',
|
|
294
|
+
zoomHint: 'Zum Zoomen Strg oder ⌘ halten und scrollen',
|
|
295
|
+
zoomIn: 'Vergrössern',
|
|
296
|
+
zoomOut: 'Verkleinern',
|
|
297
|
+
zoomFit: 'Einpassen',
|
|
298
|
+
zoomActual: 'Originalgrösse',
|
|
299
|
+
downloadImage: 'Bild herunterladen'
|
|
131
300
|
};
|
|
132
301
|
export const VIEWER_MESSAGES = { en, de };
|
|
133
302
|
export const DEFAULT_LOCALE = 'en';
|
|
@@ -135,3 +304,22 @@ export const DEFAULT_LOCALE = 'en';
|
|
|
135
304
|
export function messagesFor(locale) {
|
|
136
305
|
return VIEWER_MESSAGES[locale ?? DEFAULT_LOCALE] ?? VIEWER_MESSAGES[DEFAULT_LOCALE];
|
|
137
306
|
}
|
|
307
|
+
/** Layers a host's partial overrides over a full catalog. An `undefined` entry keeps the base string. */
|
|
308
|
+
export function withOverrides(base, overrides) {
|
|
309
|
+
if (!overrides)
|
|
310
|
+
return base;
|
|
311
|
+
const merged = { ...base };
|
|
312
|
+
for (const [key, value] of Object.entries(overrides)) {
|
|
313
|
+
if (value !== undefined)
|
|
314
|
+
merged[key] = value;
|
|
315
|
+
}
|
|
316
|
+
return merged;
|
|
317
|
+
}
|
|
318
|
+
/** Fills each `{name}` placeholder from `vars`; an unknown placeholder is left as written. */
|
|
319
|
+
export function formatMessage(template, vars) {
|
|
320
|
+
return template.replace(/\{(\w+)\}/g, (placeholder, name) => name in vars ? String(vars[name]) : placeholder);
|
|
321
|
+
}
|
|
322
|
+
/** Picks the singular or plural form for `count` and fills its `{count}`. */
|
|
323
|
+
export function formatCount(count, one, other) {
|
|
324
|
+
return formatMessage(count === 1 ? one : other, { count });
|
|
325
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export * from './schema/dynamic-value-list';
|
|
|
11
11
|
export * from './schema/traversal';
|
|
12
12
|
export * from './compute/solving.svelte';
|
|
13
13
|
export { useSolveSession } from './compute/useSolveSession.svelte';
|
|
14
|
-
export { createSolveSession, createRequestResponseDriver, type SolveSession, type SolveSessionArgs, type SolveDriver, type SolveReporter, type LiveSolveState, type SolvePhase, EMPTY_LIVE_SOLVE, decodeOutcome, finalizeResult, type SolveOutcome } from '@selvajs/solve/client';
|
|
14
|
+
export { createSolveSession, createRequestResponseDriver, type SolveSession, type SolveSessionArgs, type SolveSettlement, type SolveDriver, type SolveReporter, type LiveSolveState, type SolvePhase, EMPTY_LIVE_SOLVE, decodeOutcome, finalizeResult, type SolveOutcome } from '@selvajs/solve/client';
|
|
15
15
|
export { writeExternalValue, readExternalValue, clearExternalValue, getExternalInputs, type ExternalValueRef, type ExternalInput } from '@selvajs/solve/client';
|
|
16
16
|
export * from './contexts/footerContext.svelte';
|
|
17
17
|
export * from './contexts/clientSlotContext.svelte';
|
package/dist/public.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { VIEWER_MESSAGES, DEFAULT_LOCALE, messagesFor } from './i18n/messages';
|
|
|
8
8
|
export { setLocaleContext, getLocaleContext, type LocaleContext } from './i18n/localeContext.svelte';
|
|
9
9
|
export { default as ErrorScreen } from './components/ErrorScreen.svelte';
|
|
10
10
|
export { useSolveSession } from './compute/useSolveSession.svelte';
|
|
11
|
-
export { createSolveSession, createRequestResponseDriver, type SolveSession, type SolveSessionArgs, type SolveDriver, type SolveReporter, type LiveSolveState, type SolvePhase } from '@selvajs/solve/client';
|
|
11
|
+
export { createSolveSession, createRequestResponseDriver, type SolveSession, type SolveSessionArgs, type SolveSettlement, type SolveDriver, type SolveReporter, type LiveSolveState, type SolvePhase } from '@selvajs/solve/client';
|
|
12
12
|
export type { ClientSlotArgs, ClientSlot } from './contexts/clientSlotContext.svelte';
|
|
13
13
|
export { writeExternalValue, readExternalValue, clearExternalValue, getExternalInputs, type ExternalValueRef, type ExternalInput } from '@selvajs/solve/client';
|
|
14
14
|
export * from './schema/defaults';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isFileData } from '../utils/file-download';
|
|
1
2
|
const toStringArray = (value) => {
|
|
2
3
|
if (Array.isArray(value))
|
|
3
4
|
return value.map(String);
|
|
@@ -50,6 +51,9 @@ export function evaluateVisibility(item, values) {
|
|
|
50
51
|
if ('visible' in item && item.visible === false) {
|
|
51
52
|
return { visible: false, disabled: false };
|
|
52
53
|
}
|
|
54
|
+
if (item.type === 'output' && drawsNothing(item, values[item.paramId])) {
|
|
55
|
+
return { visible: false, disabled: false };
|
|
56
|
+
}
|
|
53
57
|
if (!item.visibilityCondition?.rules)
|
|
54
58
|
return { visible: true, disabled: false };
|
|
55
59
|
const { action = 'show', defaultValue } = item.visibilityCondition;
|
|
@@ -57,6 +61,23 @@ export function evaluateVisibility(item, values) {
|
|
|
57
61
|
const actionFn = ACTIONS[action] ?? ACTIONS.show;
|
|
58
62
|
return actionFn(met, defaultValue);
|
|
59
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* An image or chart output has nothing to draw until a solve returns its data, and an empty
|
|
66
|
+
* preview box would hold its group, tab and pane open; it counts as hidden until then. A dynamic
|
|
67
|
+
* value list output never draws: it only feeds the options of an input.
|
|
68
|
+
*/
|
|
69
|
+
function drawsNothing(item, value) {
|
|
70
|
+
switch (item.widgetType) {
|
|
71
|
+
case 'image':
|
|
72
|
+
return !(Array.isArray(value) ? value.some(isFileData) : isFileData(value));
|
|
73
|
+
case 'chart':
|
|
74
|
+
return value === undefined || value === null || value === '';
|
|
75
|
+
case 'dynamicValueList':
|
|
76
|
+
return true;
|
|
77
|
+
default:
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
60
81
|
/** Must stay identical to the key the renderers use in their `{#each}` blocks. */
|
|
61
82
|
export function itemKey(item) {
|
|
62
83
|
return item.type === 'linebreak' ? item.id : item.paramId;
|
package/dist/styles/base.css
CHANGED
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
--muted-foreground: oklch(0.5 0 0);
|
|
20
20
|
--accent: oklch(0.93 0 0);
|
|
21
21
|
--accent-foreground: oklch(0.3 0 0);
|
|
22
|
-
|
|
22
|
+
/* 4.5:1 as small text on background, card and muted, and under white text. */
|
|
23
|
+
--destructive: oklch(0.55 0.19 27);
|
|
23
24
|
--destructive-foreground: oklch(0.985 0 0);
|
|
24
25
|
--border: oklch(0.86 0 0);
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
/* Field borders and unchecked boxes: at least 3:1 against background, card and muted, the
|
|
27
|
+
WCAG minimum for a control's boundary. Same for the focus ring, which is drawn opaque. */
|
|
28
|
+
--input: oklch(0.62 0 0);
|
|
29
|
+
--ring: oklch(0.55 0 0);
|
|
27
30
|
--success: oklch(0.66 0.14 145);
|
|
28
31
|
--success-foreground: oklch(0.99 0 0);
|
|
29
32
|
--warning: oklch(0.78 0.12 75);
|
|
@@ -42,7 +45,7 @@
|
|
|
42
45
|
--sidebar-accent: oklch(0.93 0 0);
|
|
43
46
|
--sidebar-accent-foreground: oklch(0.3 0 0);
|
|
44
47
|
--sidebar-border: oklch(0.88 0 0);
|
|
45
|
-
--sidebar-ring: oklch(0.
|
|
48
|
+
--sidebar-ring: oklch(0.55 0 0);
|
|
46
49
|
--inputparam: oklch(1 0 0);
|
|
47
50
|
--outputparam: oklch(1 0 0);
|
|
48
51
|
/* Scrim behind modal dialogs and drawers. */
|
|
@@ -67,7 +70,7 @@
|
|
|
67
70
|
--destructive: oklch(0.7 0.17 22);
|
|
68
71
|
--destructive-foreground: oklch(0.985 0 0);
|
|
69
72
|
--border: oklch(1 0 0 / 14%);
|
|
70
|
-
--input: oklch(1 0 0 /
|
|
73
|
+
--input: oklch(1 0 0 / 36%);
|
|
71
74
|
--ring: oklch(0.74 0 0);
|
|
72
75
|
--success: oklch(0.74 0.15 145);
|
|
73
76
|
--success-foreground: oklch(0.18 0.03 145);
|
|
@@ -179,7 +182,7 @@
|
|
|
179
182
|
|
|
180
183
|
@layer base {
|
|
181
184
|
* {
|
|
182
|
-
@apply border-border outline-ring
|
|
185
|
+
@apply border-border outline-ring;
|
|
183
186
|
}
|
|
184
187
|
html,
|
|
185
188
|
body {
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
+
import type { SolveSettlement } from '@selvajs/solve/client';
|
|
2
|
+
/** A host action, listed in the panel footer's ⋯ menu after saving and loading inputs. */
|
|
1
3
|
export interface ActionButton {
|
|
2
4
|
id: string;
|
|
3
5
|
label: string;
|
|
4
6
|
/** A Svelte component, rendered before the label. */
|
|
5
7
|
icon?: any;
|
|
6
|
-
variant?: 'default' | '
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
variant?: 'default' | 'destructive';
|
|
9
|
+
/** Shows the action as unavailable instead of hiding it. Pair it with a `hint` saying why. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** A short line under the label: why it is disabled, or what it does. */
|
|
12
|
+
hint?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The action needs the result for the current inputs: picking it solves first when inputs
|
|
15
|
+
* changed, waits for a solve that is running or under review, and runs `onclick` only if
|
|
16
|
+
* that solve is applied. `onclick` then receives it. A refused or failed solve already shows
|
|
17
|
+
* its messages, so the action just doesn't run.
|
|
18
|
+
*/
|
|
19
|
+
solvesFirst?: boolean;
|
|
20
|
+
onclick: (settled?: Extract<SolveSettlement, {
|
|
21
|
+
status: 'applied';
|
|
22
|
+
}>) => void | Promise<void>;
|
|
9
23
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* unset keys fall back to `DEFAULT_PRESET_LABELS`.
|
|
4
4
|
*/
|
|
5
5
|
export interface PresetLabels {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
saveMenuItem: string;
|
|
7
|
+
loadMenuItem: string;
|
|
8
8
|
saveDialogTitle: string;
|
|
9
9
|
saveDialogDescription: string;
|
|
10
10
|
saveNameLabel: string;
|
|
@@ -16,6 +16,7 @@ export interface PresetLabels {
|
|
|
16
16
|
saveTagsLabel: string;
|
|
17
17
|
saveTagsPlaceholder: string;
|
|
18
18
|
saveNameRequired: string;
|
|
19
|
+
saveConfirmButton: string;
|
|
19
20
|
loadDialogTitle: string;
|
|
20
21
|
loadDialogDescription: string;
|
|
21
22
|
loadFromFileButton: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const DEFAULT_PRESET_LABELS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
saveDialogTitle: 'Save
|
|
5
|
-
saveDialogDescription: 'Save the current
|
|
6
|
-
saveNameLabel: '
|
|
2
|
+
saveMenuItem: 'Save inputs…',
|
|
3
|
+
loadMenuItem: 'Load inputs…',
|
|
4
|
+
saveDialogTitle: 'Save inputs',
|
|
5
|
+
saveDialogDescription: 'Save the current input values as a .slvp file',
|
|
6
|
+
saveNameLabel: 'Name *',
|
|
7
7
|
saveNamePlaceholder: 'e.g., Design Option A',
|
|
8
8
|
saveDescriptionLabel: 'Description',
|
|
9
9
|
saveDescriptionPlaceholder: 'Optional description of this state',
|
|
@@ -11,9 +11,10 @@ export const DEFAULT_PRESET_LABELS = {
|
|
|
11
11
|
saveAuthorPlaceholder: 'Your name or email',
|
|
12
12
|
saveTagsLabel: 'Tags',
|
|
13
13
|
saveTagsPlaceholder: 'facade, option-a, client-approved (comma-separated)',
|
|
14
|
-
saveNameRequired: 'Please enter a name for
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
saveNameRequired: 'Please enter a name for these inputs',
|
|
15
|
+
saveConfirmButton: 'Save',
|
|
16
|
+
loadDialogTitle: 'Load inputs',
|
|
17
|
+
loadDialogDescription: 'Select a .slvp file from your drive to load',
|
|
17
18
|
loadFromFileButton: 'Select .slvp File',
|
|
18
19
|
loadEmptyList: 'No saved states found',
|
|
19
20
|
loadImportError: 'Failed to import state: ',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selvajs/ui",
|
|
3
|
-
"version": "6.6.0-beta.
|
|
3
|
+
"version": "6.6.0-beta.5",
|
|
4
4
|
"description": "Shared UI components and utilities for Selva applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VektorNode",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"three": "^0.186.1",
|
|
62
62
|
"@selvajs/compute": "^4.2.2-beta.0",
|
|
63
63
|
"@selvajs/schemas": "^5.2.0",
|
|
64
|
-
"@selvajs/solve": "^1.
|
|
64
|
+
"@selvajs/solve": "^1.3.0-beta.2",
|
|
65
65
|
"@selvajs/visualization": "^1.5.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
"vitest": "^5.0.2",
|
|
93
93
|
"@selvajs/compute": "4.2.2-beta.0",
|
|
94
94
|
"@selvajs/config": "0.0.4",
|
|
95
|
-
"@selvajs/schemas": "5.2.0",
|
|
96
95
|
"@selvajs/visualization": "1.5.0",
|
|
97
|
-
"@selvajs/solve": "1.
|
|
96
|
+
"@selvajs/solve": "1.3.0-beta.2",
|
|
97
|
+
"@selvajs/schemas": "5.2.0"
|
|
98
98
|
},
|
|
99
99
|
"scripts": {
|
|
100
100
|
"predev": "node ../../scripts/sync-shared-assets.js",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as Card from './primitives/card/index.js';
|
|
4
4
|
import { Button } from './primitives/button/index.js';
|
|
5
5
|
import Callout from './primitives/Callout.svelte';
|
|
6
|
+
import { getLocaleContext } from '$lib/i18n/localeContext.svelte';
|
|
6
7
|
|
|
7
8
|
interface Props {
|
|
8
9
|
status?: number;
|
|
@@ -12,6 +13,9 @@
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
let { status = 500, message, details, homeLink = '/' }: Props = $props();
|
|
16
|
+
|
|
17
|
+
const locale = getLocaleContext();
|
|
18
|
+
const t = $derived(locale.messages);
|
|
15
19
|
</script>
|
|
16
20
|
|
|
17
21
|
<div class="p-4 flex min-h-screen items-center justify-center bg-background">
|
|
@@ -26,7 +30,7 @@
|
|
|
26
30
|
</Card.Header>
|
|
27
31
|
<Card.Content>
|
|
28
32
|
<div class="gap-4 flex flex-col">
|
|
29
|
-
<Callout tone="danger" title=
|
|
33
|
+
<Callout tone="danger" title={t.errorTitle}>
|
|
30
34
|
{#if message}{message}{/if}
|
|
31
35
|
</Callout>
|
|
32
36
|
{#if details}
|
|
@@ -37,7 +41,7 @@
|
|
|
37
41
|
</div>
|
|
38
42
|
</Card.Content>
|
|
39
43
|
<Card.Footer>
|
|
40
|
-
<Button variant="outline" href={homeLink} rel="external" class="w-full">
|
|
44
|
+
<Button variant="outline" href={homeLink} rel="external" class="w-full">{t.goHome}</Button>
|
|
41
45
|
</Card.Footer>
|
|
42
46
|
</Card.Root>
|
|
43
47
|
</div>
|