@spring-systems/core 0.8.0

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.
Files changed (101) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +8 -0
  3. package/README.md +77 -0
  4. package/dist/adapters/index.d.ts +246 -0
  5. package/dist/adapters/index.js +56 -0
  6. package/dist/adapters/index.js.map +1 -0
  7. package/dist/auth/index.d.ts +17 -0
  8. package/dist/auth/index.js +19 -0
  9. package/dist/auth/index.js.map +1 -0
  10. package/dist/chunk-5D6XE7NJ.js +16 -0
  11. package/dist/chunk-5D6XE7NJ.js.map +1 -0
  12. package/dist/chunk-EFUBAQCV.js +94 -0
  13. package/dist/chunk-EFUBAQCV.js.map +1 -0
  14. package/dist/chunk-F2SIMWZ5.js +173 -0
  15. package/dist/chunk-F2SIMWZ5.js.map +1 -0
  16. package/dist/chunk-F7WUQJH7.js +399 -0
  17. package/dist/chunk-F7WUQJH7.js.map +1 -0
  18. package/dist/chunk-GON7Q32Q.js +176 -0
  19. package/dist/chunk-GON7Q32Q.js.map +1 -0
  20. package/dist/chunk-GXU75LQX.js +182 -0
  21. package/dist/chunk-GXU75LQX.js.map +1 -0
  22. package/dist/chunk-HFELOXDQ.js +110 -0
  23. package/dist/chunk-HFELOXDQ.js.map +1 -0
  24. package/dist/chunk-KX32MU3I.js +190 -0
  25. package/dist/chunk-KX32MU3I.js.map +1 -0
  26. package/dist/chunk-MEWPYTWC.js +284 -0
  27. package/dist/chunk-MEWPYTWC.js.map +1 -0
  28. package/dist/chunk-N2L4TUC4.js +34 -0
  29. package/dist/chunk-N2L4TUC4.js.map +1 -0
  30. package/dist/chunk-NQQIVCLX.js +47 -0
  31. package/dist/chunk-NQQIVCLX.js.map +1 -0
  32. package/dist/chunk-OSSX443T.js +146 -0
  33. package/dist/chunk-OSSX443T.js.map +1 -0
  34. package/dist/chunk-PT4DIYUK.js +78 -0
  35. package/dist/chunk-PT4DIYUK.js.map +1 -0
  36. package/dist/chunk-QAVWXARR.js +51 -0
  37. package/dist/chunk-QAVWXARR.js.map +1 -0
  38. package/dist/chunk-RRWKDFAB.js +143 -0
  39. package/dist/chunk-RRWKDFAB.js.map +1 -0
  40. package/dist/chunk-RUCXSQEY.js +42 -0
  41. package/dist/chunk-RUCXSQEY.js.map +1 -0
  42. package/dist/chunk-S6RPCN5H.js +64 -0
  43. package/dist/chunk-S6RPCN5H.js.map +1 -0
  44. package/dist/chunk-S7MKRNMI.js +153 -0
  45. package/dist/chunk-S7MKRNMI.js.map +1 -0
  46. package/dist/chunk-SQB4F3EF.js +55 -0
  47. package/dist/chunk-SQB4F3EF.js.map +1 -0
  48. package/dist/chunk-U5OH3GAI.js +399 -0
  49. package/dist/chunk-U5OH3GAI.js.map +1 -0
  50. package/dist/chunk-UDT2RPX2.js +43 -0
  51. package/dist/chunk-UDT2RPX2.js.map +1 -0
  52. package/dist/config/index.d.ts +63 -0
  53. package/dist/config/index.js +109 -0
  54. package/dist/config/index.js.map +1 -0
  55. package/dist/devtools/index.d.ts +54 -0
  56. package/dist/devtools/index.js +67 -0
  57. package/dist/devtools/index.js.map +1 -0
  58. package/dist/errors/index.d.ts +39 -0
  59. package/dist/errors/index.js +21 -0
  60. package/dist/errors/index.js.map +1 -0
  61. package/dist/events/index.d.ts +153 -0
  62. package/dist/events/index.js +12 -0
  63. package/dist/events/index.js.map +1 -0
  64. package/dist/form-types-D3MdGpjA.d.ts +290 -0
  65. package/dist/framework-config-types-DeUbx4bu.d.ts +574 -0
  66. package/dist/i18n/index.d.ts +37 -0
  67. package/dist/i18n/index.js +7 -0
  68. package/dist/i18n/index.js.map +1 -0
  69. package/dist/index.d.ts +9 -0
  70. package/dist/index.js +42 -0
  71. package/dist/index.js.map +1 -0
  72. package/dist/instance/index.d.ts +112 -0
  73. package/dist/instance/index.js +37 -0
  74. package/dist/instance/index.js.map +1 -0
  75. package/dist/logger/index.d.ts +44 -0
  76. package/dist/logger/index.js +27 -0
  77. package/dist/logger/index.js.map +1 -0
  78. package/dist/middleware/index.d.ts +91 -0
  79. package/dist/middleware/index.js +23 -0
  80. package/dist/middleware/index.js.map +1 -0
  81. package/dist/middleware-registry-DT002qRd.d.ts +60 -0
  82. package/dist/middleware-types-DVG9C1qJ.d.ts +85 -0
  83. package/dist/plugins/index.d.ts +104 -0
  84. package/dist/plugins/index.js +16 -0
  85. package/dist/plugins/index.js.map +1 -0
  86. package/dist/runtime-env-config-CajOEJCP.d.ts +148 -0
  87. package/dist/security-sanitize-Bb0PExM6.d.ts +9 -0
  88. package/dist/spring-instance-EbUh4mQb.d.ts +119 -0
  89. package/dist/testing/index.d.ts +129 -0
  90. package/dist/testing/index.js +171 -0
  91. package/dist/testing/index.js.map +1 -0
  92. package/dist/types/index.d.ts +85 -0
  93. package/dist/types/index.js +72 -0
  94. package/dist/types/index.js.map +1 -0
  95. package/dist/utils/index.d.ts +143 -0
  96. package/dist/utils/index.js +786 -0
  97. package/dist/utils/index.js.map +1 -0
  98. package/dist/validation/index.d.ts +48 -0
  99. package/dist/validation/index.js +147 -0
  100. package/dist/validation/index.js.map +1 -0
  101. package/package.json +142 -0
@@ -0,0 +1,574 @@
1
+ /**
2
+ * Shared capability type contract.
3
+ * This file is intentionally runtime-free to avoid circular dependencies.
4
+ * @module capability-types
5
+ */
6
+ /**
7
+ * Extensible capability map. Consumers and plugins extend via declaration merging:
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * declare module "@spring-systems/core/config" {
12
+ * interface CapabilityMap {
13
+ * "myPlugin:feature": boolean;
14
+ * }
15
+ * }
16
+ * ```
17
+ */
18
+ interface CapabilityMap {
19
+ /** Enable chart components (EChart, area, donut, line) */
20
+ charts: boolean;
21
+ /** Enable advanced filtering with custom operators */
22
+ advancedFiltering: boolean;
23
+ /** Enable bulk operations on lists (bulk delete, bulk edit) */
24
+ bulkOperations: boolean;
25
+ /** Enable data export functionality */
26
+ export: boolean | {
27
+ enabled: boolean;
28
+ formats: string[];
29
+ };
30
+ /** Enable drag-and-drop reordering in lists and trees */
31
+ dragAndDrop: boolean;
32
+ /** Enable real-time updates via SignalR */
33
+ realtime: boolean;
34
+ }
35
+
36
+ /** Empty GUID for new records */
37
+ declare const emptyGuid = "00000000-0000-0000-0000-000000000000";
38
+ /** Generic interface for select options */
39
+ interface CodeList {
40
+ id_public: string;
41
+ name: string;
42
+ code?: string;
43
+ version?: number;
44
+ }
45
+ /** Interface for persons (full_name) */
46
+ interface CodeListFullName {
47
+ id_public: string;
48
+ full_name: string;
49
+ first_name: string;
50
+ last_name?: string;
51
+ }
52
+ interface CodeListNumber {
53
+ id_public: number;
54
+ name: string;
55
+ }
56
+ type Operator = "=" | ">" | ">=" | "<" | "<=" | "!=" | "in" | "between";
57
+ /** CSS selector for an open dialog (detection in shortcut hooks) */
58
+ declare const DIALOG_CONTENT_SELECTOR = ".spring-dialog-content";
59
+ /** DnD TouchSensor activation constraint (delay + tolerance) */
60
+ declare const DND_TOUCH_CONSTRAINT: {
61
+ readonly delay: 200;
62
+ readonly tolerance: 5;
63
+ };
64
+ declare const STORAGE_KEYS: {
65
+ readonly LANGUAGE: "language";
66
+ readonly COLOR_THEME: "colorTheme";
67
+ };
68
+ /** Union type of all storage key values. */
69
+ type StorageKey = (typeof STORAGE_KEYS)[keyof typeof STORAGE_KEYS];
70
+
71
+ /**
72
+ * Theme variable contract for the SPRING framework.
73
+ * Projects override these via CSS `@theme` in their globals.css.
74
+ * @module theme
75
+ */
76
+ /** Template literal type for SPRING CSS custom properties. */
77
+ type SpringCssVariable = `--spring-${string}`;
78
+ interface SpringThemeVariables {
79
+ colorPrimary: string;
80
+ colorPrimaryLight: string;
81
+ colorPrimaryDark: string;
82
+ colorSecondaryDark: string;
83
+ colorDanger: string;
84
+ colorSuccess: string;
85
+ colorSuccessLight: string;
86
+ colorBg: string;
87
+ colorBgLight: string;
88
+ colorPanel: string;
89
+ colorBorder: string;
90
+ colorActive: string;
91
+ colorDisabledBg: string;
92
+ colorText: string;
93
+ colorTextMuted: string;
94
+ colorTextDisabled: string;
95
+ colorTextSecondary: string;
96
+ colorPanelSecondary: string;
97
+ colorPanelDashboard: string;
98
+ colorPanelDashboardSecondary: string;
99
+ colorPanelAlt: string;
100
+ colorChartBg: string;
101
+ colorDarkLightSecondary: string;
102
+ fontSizeXxs: string;
103
+ fontSizeXs: string;
104
+ fontSizeSm: string;
105
+ fontSizeMd: string;
106
+ fontSizeLg: string;
107
+ fontSizeXl: string;
108
+ fontSize2xl: string;
109
+ radiusXs: string;
110
+ radiusSm: string;
111
+ radiusMd: string;
112
+ radiusLg: string;
113
+ radiusXl: string;
114
+ radiusDialog: string;
115
+ radiusPanel: string;
116
+ shadowXs: string;
117
+ shadowSm: string;
118
+ shadowMd: string;
119
+ shadowLg: string;
120
+ shadowPopup: string;
121
+ shadowNavbar: string;
122
+ shadowInset: string;
123
+ shadowBottom: string;
124
+ shadowDnd: string;
125
+ shadowDndLg: string;
126
+ shadowDragSm: string;
127
+ shadowSubtle: string;
128
+ shadowRingWhite: string;
129
+ transitionFast: string;
130
+ transitionNormal: string;
131
+ opacityGhost: string;
132
+ opacitySubtle: string;
133
+ opacityDisabled: string;
134
+ opacityMuted: string;
135
+ opacityOverlay: string;
136
+ opacityHover: string;
137
+ opacityHigh: string;
138
+ opacityNearOpaque: string;
139
+ sizeInputHeight: string;
140
+ fontFamilyBase: string;
141
+ }
142
+ declare const DEFAULT_THEME: {
143
+ readonly colorPrimary: "#2563EB";
144
+ readonly colorPrimaryLight: "#2563eb1f";
145
+ readonly colorPrimaryDark: "#1d4ed8";
146
+ readonly colorSecondaryDark: "#1e3a5f";
147
+ readonly colorDanger: "#b91c1c";
148
+ readonly colorSuccess: "#15803d";
149
+ readonly colorSuccessLight: "#e5f3ec";
150
+ readonly colorBg: "#dfebfb";
151
+ readonly colorBgLight: "#eff6ff";
152
+ readonly colorPanel: "white";
153
+ readonly colorBorder: "#a2a3b8";
154
+ readonly colorActive: "#ffbf49";
155
+ readonly colorDisabledBg: "#e4e4e4";
156
+ readonly colorText: "black";
157
+ readonly colorTextMuted: "#666666";
158
+ readonly colorTextDisabled: "#636363";
159
+ readonly colorTextSecondary: "white";
160
+ readonly colorPanelSecondary: "white";
161
+ readonly colorPanelDashboard: "#dfebfb";
162
+ readonly colorPanelDashboardSecondary: "#cbdbf2";
163
+ readonly colorPanelAlt: "#f9fafb";
164
+ readonly colorChartBg: "#201f25";
165
+ readonly colorDarkLightSecondary: "#eff6ff";
166
+ readonly fontSizeXxs: "10px";
167
+ readonly fontSizeXs: "11px";
168
+ readonly fontSizeSm: "12px";
169
+ readonly fontSizeMd: "13px";
170
+ readonly fontSizeLg: "14px";
171
+ readonly fontSizeXl: "16px";
172
+ readonly fontSize2xl: "22px";
173
+ readonly radiusXs: "1px";
174
+ readonly radiusSm: "3px";
175
+ readonly radiusMd: "6px";
176
+ readonly radiusLg: "12px";
177
+ readonly radiusXl: "16px";
178
+ readonly radiusDialog: "8px";
179
+ readonly radiusPanel: "10px";
180
+ readonly shadowXs: "0 1px 2px rgba(0, 0, 0, 0.06)";
181
+ readonly shadowSm: "0 2px 6px rgba(0, 0, 0, 0.06)";
182
+ readonly shadowMd: "0 4px 12px rgba(0, 0, 0, 0.15)";
183
+ readonly shadowLg: "0 4px 16px rgba(0, 0, 0, 0.12)";
184
+ readonly shadowPopup: "0 12px 32px rgba(0, 0, 0, 0.18), 0 6px 12px rgba(0, 0, 0, 0.12)";
185
+ readonly shadowNavbar: "0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.12)";
186
+ readonly shadowInset: "inset 0 2px 4px rgba(0, 0, 0, 0.04)";
187
+ readonly shadowBottom: "0 -2px 5px rgba(0, 0, 0, 0.2)";
188
+ readonly shadowDnd: "0 4px 12px rgba(0, 0, 0, 0.25)";
189
+ readonly shadowDndLg: "0 4px 12px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.2)";
190
+ readonly shadowDragSm: "0 2px 8px rgba(0, 0, 0, 0.2)";
191
+ readonly shadowSubtle: "0 2px 4px rgba(0, 0, 0, 0.15)";
192
+ readonly shadowRingWhite: "inset 0 0 0 2px rgba(255, 255, 255, 0.5)";
193
+ readonly transitionFast: "0.15s ease";
194
+ readonly transitionNormal: "0.3s ease";
195
+ readonly opacityGhost: "0.35";
196
+ readonly opacitySubtle: "0.4";
197
+ readonly opacityDisabled: "0.5";
198
+ readonly opacityMuted: "0.6";
199
+ readonly opacityOverlay: "0.7";
200
+ readonly opacityHover: "0.8";
201
+ readonly opacityHigh: "0.85";
202
+ readonly opacityNearOpaque: "0.9";
203
+ readonly sizeInputHeight: "27px";
204
+ readonly fontFamilyBase: "Verdana, Geneva, sans-serif";
205
+ };
206
+ declare const CAMEL_TO_CSS: {
207
+ readonly colorPrimary: "--spring-color-primary";
208
+ readonly colorPrimaryLight: "--spring-color-primary-light";
209
+ readonly colorPrimaryDark: "--spring-color-primary-dark";
210
+ readonly colorSecondaryDark: "--spring-color-secondary-dark";
211
+ readonly colorDanger: "--spring-color-danger";
212
+ readonly colorSuccess: "--spring-color-success";
213
+ readonly colorSuccessLight: "--spring-color-success-light";
214
+ readonly colorBg: "--spring-color-bg";
215
+ readonly colorBgLight: "--spring-color-bg-light";
216
+ readonly colorPanel: "--spring-color-panel";
217
+ readonly colorBorder: "--spring-color-border";
218
+ readonly colorActive: "--spring-color-active";
219
+ readonly colorDisabledBg: "--spring-color-disabled-bg";
220
+ readonly colorText: "--spring-color-text";
221
+ readonly colorTextMuted: "--spring-color-text-muted";
222
+ readonly colorTextDisabled: "--spring-color-text-disabled";
223
+ readonly colorTextSecondary: "--spring-color-text-secondary";
224
+ readonly colorPanelSecondary: "--spring-color-panel-secondary";
225
+ readonly colorPanelDashboard: "--spring-color-panel-dashboard";
226
+ readonly colorPanelDashboardSecondary: "--spring-color-panel-dashboard-secondary";
227
+ readonly colorPanelAlt: "--spring-color-panel-alt";
228
+ readonly colorChartBg: "--spring-color-chart-bg";
229
+ readonly colorDarkLightSecondary: "--spring-color-dark-light-secondary";
230
+ readonly fontSizeXxs: "--spring-font-size-xxs";
231
+ readonly fontSizeXs: "--spring-font-size-xs";
232
+ readonly fontSizeSm: "--spring-font-size-sm";
233
+ readonly fontSizeMd: "--spring-font-size-md";
234
+ readonly fontSizeLg: "--spring-font-size-lg";
235
+ readonly fontSizeXl: "--spring-font-size-xl";
236
+ readonly fontSize2xl: "--spring-font-size-2xl";
237
+ readonly radiusXs: "--spring-radius-xs";
238
+ readonly radiusSm: "--spring-radius-sm";
239
+ readonly radiusMd: "--spring-radius-md";
240
+ readonly radiusLg: "--spring-radius-lg";
241
+ readonly radiusXl: "--spring-radius-xl";
242
+ readonly radiusDialog: "--spring-radius-dialog";
243
+ readonly radiusPanel: "--spring-radius-panel";
244
+ readonly shadowXs: "--spring-shadow-xs";
245
+ readonly shadowSm: "--spring-shadow-sm";
246
+ readonly shadowMd: "--spring-shadow-md";
247
+ readonly shadowLg: "--spring-shadow-lg";
248
+ readonly shadowPopup: "--spring-shadow-popup";
249
+ readonly shadowNavbar: "--spring-shadow-navbar";
250
+ readonly shadowInset: "--spring-shadow-inset";
251
+ readonly shadowBottom: "--spring-shadow-bottom";
252
+ readonly shadowDnd: "--spring-shadow-dnd";
253
+ readonly shadowDndLg: "--spring-shadow-dnd-lg";
254
+ readonly shadowDragSm: "--spring-shadow-drag-sm";
255
+ readonly shadowSubtle: "--spring-shadow-subtle";
256
+ readonly shadowRingWhite: "--spring-shadow-ring-white";
257
+ readonly transitionFast: "--spring-transition-fast";
258
+ readonly transitionNormal: "--spring-transition-normal";
259
+ readonly opacityGhost: "--spring-opacity-ghost";
260
+ readonly opacitySubtle: "--spring-opacity-subtle";
261
+ readonly opacityDisabled: "--spring-opacity-disabled";
262
+ readonly opacityMuted: "--spring-opacity-muted";
263
+ readonly opacityOverlay: "--spring-opacity-overlay";
264
+ readonly opacityHover: "--spring-opacity-hover";
265
+ readonly opacityHigh: "--spring-opacity-high";
266
+ readonly opacityNearOpaque: "--spring-opacity-near-opaque";
267
+ readonly sizeInputHeight: "--spring-size-input-height";
268
+ readonly fontFamilyBase: "--spring-font-family-base";
269
+ };
270
+ /** Per-component theme tokens. Values can reference --spring-* variables. */
271
+ interface SpringComponentTokens {
272
+ button?: {
273
+ borderRadius?: string;
274
+ paddingX?: string;
275
+ paddingY?: string;
276
+ fontSize?: string;
277
+ primaryBg?: string;
278
+ primaryColor?: string;
279
+ primaryHoverFilter?: string;
280
+ outlineBorderColor?: string;
281
+ ghostHoverBg?: string;
282
+ minWidth?: string;
283
+ /** Small size overrides */
284
+ smPaddingX?: string;
285
+ smPaddingY?: string;
286
+ smFontSize?: string;
287
+ smMinWidth?: string;
288
+ /** Large size overrides */
289
+ lgPaddingX?: string;
290
+ lgPaddingY?: string;
291
+ lgFontSize?: string;
292
+ lgMinWidth?: string;
293
+ };
294
+ list?: {
295
+ rowHeight?: string;
296
+ headerBg?: string;
297
+ headerColor?: string;
298
+ stripedBg?: string;
299
+ selectedBg?: string;
300
+ hoverBg?: string;
301
+ borderColor?: string;
302
+ fontSize?: string;
303
+ };
304
+ form?: {
305
+ fieldSpacing?: string;
306
+ labelColor?: string;
307
+ labelFontSize?: string;
308
+ inputHeight?: string;
309
+ inputBg?: string;
310
+ inputBorderColor?: string;
311
+ inputFocusBorderColor?: string;
312
+ inputFontSize?: string;
313
+ inputBorderRadius?: string;
314
+ };
315
+ dialog?: {
316
+ backdropColor?: string;
317
+ maxWidth?: string;
318
+ borderRadius?: string;
319
+ padding?: string;
320
+ shadowColor?: string;
321
+ };
322
+ page?: {
323
+ headerBg?: string;
324
+ headerBorderColor?: string;
325
+ navigationBg?: string;
326
+ navigationWidth?: string;
327
+ contentBg?: string;
328
+ };
329
+ panel?: {
330
+ bg?: string;
331
+ borderColor?: string;
332
+ borderRadius?: string;
333
+ padding?: string;
334
+ };
335
+ }
336
+ /**
337
+ * Default dark theme overrides.
338
+ * Only includes color tokens that change between light and dark modes.
339
+ * Non-color tokens (fonts, spacing, shadows) inherit from the light theme.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * // Generate dark mode CSS
344
+ * const css = themeToCSSDark(DEFAULT_DARK_THEME);
345
+ * // Produces @media (prefers-color-scheme: dark) { ... }
346
+ * // and [data-spring-theme="dark"] { ... }
347
+ * ```
348
+ */
349
+ declare const DEFAULT_DARK_THEME: {
350
+ readonly colorPrimary: "#7c78d8";
351
+ readonly colorPrimaryLight: "#7c78d81f";
352
+ readonly colorPrimaryDark: "#9d9ae0";
353
+ readonly colorSecondaryDark: "#c8c6f0";
354
+ readonly colorDanger: "#ef4444";
355
+ readonly colorSuccess: "#22c55e";
356
+ readonly colorSuccessLight: "#1a3a2a";
357
+ readonly colorBg: "#1a1b2e";
358
+ readonly colorBgLight: "#222340";
359
+ readonly colorPanel: "#2a2b45";
360
+ readonly colorBorder: "#4a4b6a";
361
+ readonly colorActive: "#f59e0b";
362
+ readonly colorDisabledBg: "#3a3b55";
363
+ readonly colorText: "#e4e4f0";
364
+ readonly colorTextMuted: "#a0a0b8";
365
+ readonly colorTextDisabled: "#6a6a80";
366
+ readonly colorTextSecondary: "#f0f0ff";
367
+ readonly colorPanelSecondary: "#32334d";
368
+ readonly colorPanelDashboard: "#1e1f35";
369
+ readonly colorPanelDashboardSecondary: "#262742";
370
+ readonly colorPanelAlt: "#32334d";
371
+ readonly colorChartBg: "#1a1b2e";
372
+ readonly colorDarkLightSecondary: "#2e2f4a";
373
+ readonly shadowXs: "0 1px 2px rgba(0, 0, 0, 0.2)";
374
+ readonly shadowSm: "0 2px 6px rgba(0, 0, 0, 0.25)";
375
+ readonly shadowMd: "0 4px 12px rgba(0, 0, 0, 0.4)";
376
+ readonly shadowLg: "0 4px 16px rgba(0, 0, 0, 0.35)";
377
+ readonly shadowPopup: "0 12px 32px rgba(0, 0, 0, 0.5), 0 6px 12px rgba(0, 0, 0, 0.35)";
378
+ readonly shadowNavbar: "0 2px 8px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.3)";
379
+ readonly shadowInset: "inset 0 2px 4px rgba(0, 0, 0, 0.15)";
380
+ readonly shadowBottom: "0 -2px 5px rgba(0, 0, 0, 0.4)";
381
+ readonly shadowDnd: "0 4px 12px rgba(0, 0, 0, 0.5)";
382
+ readonly shadowDndLg: "0 4px 12px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45)";
383
+ readonly shadowDragSm: "0 2px 8px rgba(0, 0, 0, 0.45)";
384
+ readonly shadowSubtle: "0 2px 4px rgba(0, 0, 0, 0.35)";
385
+ readonly shadowRingWhite: "inset 0 0 0 2px rgba(255, 255, 255, 0.3)";
386
+ };
387
+ declare function createTheme(overrides: Partial<SpringThemeVariables>): SpringThemeVariables;
388
+ /**
389
+ * Read the resolved theme from the DOM (computed CSS variable values).
390
+ * Falls back to DEFAULT_THEME when running on the server or in tests.
391
+ */
392
+ declare function getResolvedTheme(): SpringThemeVariables;
393
+ declare function themeToCSS(theme: SpringThemeVariables, componentTokens?: SpringComponentTokens): string;
394
+ /**
395
+ * Generate dark mode CSS. Uses [data-spring-theme="dark"] selector for programmatic toggling.
396
+ * Only includes variables that are explicitly set in the dark theme (partial overrides).
397
+ */
398
+ declare function themeToCSSDark(darkOverrides: Partial<SpringThemeVariables>): string;
399
+ declare function themeToCSSVariables(theme: SpringThemeVariables, componentTokens?: SpringComponentTokens): Record<string, string>;
400
+
401
+ /**
402
+ * Framework configuration type definitions.
403
+ * Extracted into a standalone file with zero runtime imports to allow
404
+ * spring-instance.ts to reference FrameworkConfig without circular dependencies.
405
+ * @module framework-config-types
406
+ */
407
+
408
+ interface DateFormatConfig {
409
+ date: string;
410
+ dateTime: string;
411
+ dateTimeSeconds: string;
412
+ time: string;
413
+ }
414
+ /** Supported layout variants for multi-layout architecture. */
415
+ type LayoutVariant = "admin" | "website" | "minimal" | "custom";
416
+ /** Configuration for a named layout. */
417
+ interface LayoutConfig {
418
+ variant: LayoutVariant;
419
+ /** Navigation items for this layout. Falls back to navigation.items when not set. */
420
+ navigation?: NavigationMenuItem[];
421
+ /** Whether this layout requires authentication. Default: true for admin, false for others. */
422
+ requiresAuth?: boolean;
423
+ /** CSS class on the root layout element. */
424
+ className?: string;
425
+ /** Override logo for this layout. */
426
+ logo?: {
427
+ src: string;
428
+ alt: string;
429
+ };
430
+ }
431
+ /** A single navigation menu item for the main sidebar/navigation. */
432
+ interface NavigationMenuItem {
433
+ /** Unique key identifying this menu item */
434
+ key: string;
435
+ /** Display label (can be a translation key) */
436
+ label: string;
437
+ /** Optional icon identifier (registered via ui/icons) */
438
+ icon?: string;
439
+ /** Route path this menu item navigates to */
440
+ route: string;
441
+ /** Nested child menu items (for hierarchical navigation) */
442
+ children?: NavigationMenuItem[];
443
+ /** Permission keys required to see this menu item */
444
+ permissions?: string[];
445
+ /** Capability key — item is hidden when the capability is disabled */
446
+ capability?: keyof CapabilityMap;
447
+ }
448
+ interface FrameworkConfig {
449
+ app: {
450
+ name: string;
451
+ defaultRoute: string;
452
+ htmlLang: string;
453
+ skipLinkText: string;
454
+ supportEmail: string;
455
+ logo: {
456
+ src: string;
457
+ alt: string;
458
+ };
459
+ };
460
+ auth: {
461
+ sessionCookiePrefix: string;
462
+ publicAuthPaths: readonly string[];
463
+ sessionExpiredCodes: readonly string[];
464
+ loginFormFieldPrefix: string;
465
+ /** Allows storing access token in JavaScript memory (default: true). Set false to enforce cookie-only auth. */
466
+ allowInMemoryTokenStorage?: boolean;
467
+ /** API path for login endpoint (default: "auth/login") */
468
+ loginPath?: string;
469
+ /** API path for logout endpoint (default: "auth/logout") */
470
+ logoutPath?: string;
471
+ /** API path for user info endpoint (default: "auth/info") */
472
+ infoPath?: string;
473
+ /** Field names in the login response JSON for token extraction */
474
+ tokenResponseFields?: {
475
+ accessToken: string;
476
+ refreshToken: string;
477
+ };
478
+ /** Field name for the username in the login request body (default: "username") */
479
+ loginUsernameField?: string;
480
+ };
481
+ proxy: {
482
+ corsAllowedHeaders: string;
483
+ maxProxyPathLength: number;
484
+ safeHashPattern: RegExp;
485
+ /** Path prefixes to block in production (return 404). Example: ["/test/", "/internal/"] */
486
+ blockedPathPrefixesInProd?: string[];
487
+ };
488
+ csp: {
489
+ thirdPartyScriptSources: readonly string[];
490
+ thirdPartyConnectSources: readonly string[];
491
+ thirdPartyImageSources: readonly string[];
492
+ thirdPartyFrameSources: readonly string[];
493
+ };
494
+ i18n: {
495
+ languages: readonly CodeList[];
496
+ defaultLanguageCode: string;
497
+ numberLocale: string;
498
+ dayjsLocale: string;
499
+ dateFormats: DateFormatConfig;
500
+ };
501
+ theme: Partial<SpringThemeVariables>;
502
+ darkTheme: Partial<SpringThemeVariables>;
503
+ componentTokens: SpringComponentTokens;
504
+ limits: {
505
+ maxFileSize: number;
506
+ autocompleteDebounceMs: number;
507
+ /** Maximum number of simultaneously opened page tabs in UI navigation. Default: 10 */
508
+ maxOpenedTabs?: number;
509
+ signalrIdleTimeoutMs: number;
510
+ /** SignalR server timeout in milliseconds (default: 30000) */
511
+ signalrServerTimeoutMs: number;
512
+ /** SignalR keep-alive ping interval in milliseconds (default: 10000) */
513
+ signalrKeepAliveIntervalMs: number;
514
+ /** SignalR reconnect delay sequence in milliseconds (default: [0, 1000, 2000, 5000, 10000, 15000]) */
515
+ signalrReconnectDelaysMs: readonly number[];
516
+ /** Idle session timeout in milliseconds — triggers logout after inactivity (default: 1800000 = 30 min) */
517
+ idleSessionTimeoutMs: number;
518
+ };
519
+ api?: {
520
+ /** URL pattern for list endpoints. Use ${route} and ${id} placeholders. Default: "${route}/list" */
521
+ listUrlPattern?: string;
522
+ /** URL pattern for detail endpoints with metadata. Default: "${route}/${id}" */
523
+ detailWithMetaPattern?: string;
524
+ /** URL pattern for entity detail. Default: "${route}/${id}" */
525
+ detailUrlPattern?: string;
526
+ /** Date string sentinel treated as null (default: "0001-01-01T00:00:00") */
527
+ nullDateSentinel?: string;
528
+ /** HTTP request timeout in milliseconds (default: 30000) */
529
+ timeoutMs?: number;
530
+ /** Maximum number of automatic retries for failed idempotent requests (default: 2) */
531
+ retryMaxAttempts?: number;
532
+ /** Base delay in milliseconds before first retry, doubles for each subsequent attempt (default: 1000) */
533
+ retryBaseDelayMs?: number;
534
+ /** Maximum total time in milliseconds allowed for all retry attempts (default: 60000) */
535
+ retryMaxTotalMs?: number;
536
+ /** HTTP status codes that trigger an automatic retry (default: [502, 503, 429]) */
537
+ retryableStatusCodes?: number[];
538
+ /** Default page size for list requests (default: 20) */
539
+ defaultPageSize?: number;
540
+ /** When true, API client throws extracted errors by default unless requestInit.throwOnError overrides it. */
541
+ defaultThrowOnError?: boolean;
542
+ /**
543
+ * When true, searchGet() throws on unexpected payload shape (non-array and non-{data: array}).
544
+ * Default false preserves legacy behavior (warn + return []).
545
+ */
546
+ searchGetStrictShape?: boolean;
547
+ /** Optional request adapter — transforms list request data before sending to the backend. Simpler alternative to list:beforeLoad middleware. */
548
+ requestAdapter?: (data: Record<string, unknown>) => Record<string, unknown>;
549
+ };
550
+ navigation?: {
551
+ /** Menu items for the main navigation. If empty, no navigation is rendered. */
552
+ items?: NavigationMenuItem[];
553
+ };
554
+ /** Named layout configurations for multi-layout architecture. */
555
+ layouts?: Record<string, LayoutConfig>;
556
+ }
557
+ interface FrameworkConfigOverrides {
558
+ app?: Partial<FrameworkConfig["app"]>;
559
+ auth?: Partial<FrameworkConfig["auth"]>;
560
+ proxy?: Partial<FrameworkConfig["proxy"]>;
561
+ csp?: Partial<FrameworkConfig["csp"]>;
562
+ i18n?: Partial<Omit<FrameworkConfig["i18n"], "dateFormats">> & {
563
+ dateFormats?: Partial<DateFormatConfig>;
564
+ };
565
+ theme?: Partial<SpringThemeVariables>;
566
+ darkTheme?: Partial<SpringThemeVariables>;
567
+ componentTokens?: SpringComponentTokens;
568
+ limits?: Partial<FrameworkConfig["limits"]>;
569
+ api?: Partial<NonNullable<FrameworkConfig["api"]>>;
570
+ navigation?: Partial<NonNullable<FrameworkConfig["navigation"]>>;
571
+ layouts?: Record<string, Pick<LayoutConfig, "variant"> & Partial<Omit<LayoutConfig, "variant">>>;
572
+ }
573
+
574
+ export { CAMEL_TO_CSS as C, DEFAULT_DARK_THEME as D, type FrameworkConfigOverrides as F, type LayoutVariant as L, type NavigationMenuItem as N, type Operator as O, STORAGE_KEYS as S, type FrameworkConfig as a, type LayoutConfig as b, type CapabilityMap as c, type CodeList as d, type CodeListFullName as e, type CodeListNumber as f, DEFAULT_THEME as g, DIALOG_CONTENT_SELECTOR as h, DND_TOUCH_CONSTRAINT as i, type DateFormatConfig as j, type SpringComponentTokens as k, type SpringCssVariable as l, type SpringThemeVariables as m, type StorageKey as n, createTheme as o, emptyGuid as p, getResolvedTheme as q, themeToCSSDark as r, themeToCSSVariables as s, themeToCSS as t };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Built-in default messages for framework UI strings.
3
+ * These provide a working default so the framework operates out of the box
4
+ * without requiring a ContentAdapter for basic validation messages.
5
+ * Consumers can override via setContentAdapter() for full i18n.
6
+ * @module default-messages
7
+ */
8
+ declare const DEFAULT_MESSAGES: {
9
+ readonly "admin-fill-value": "This field is required";
10
+ readonly "admin-invalid-phone-number-format": "Invalid phone number format";
11
+ readonly "admin-invalid-email-format": "Invalid email format";
12
+ readonly "admin-email-contains-multiple-addresses": "Field contains multiple email addresses";
13
+ readonly "admin-invalid-url-format": "Invalid URL format";
14
+ readonly "admin-password-min-length": "Password must be at least 8 characters";
15
+ readonly "admin-password-uppercase": "Password must contain an uppercase letter";
16
+ readonly "admin-password-lowercase": "Password must contain a lowercase letter";
17
+ readonly "admin-password-digit": "Password must contain a digit";
18
+ readonly "admin-password-special-char": "Password must contain a special character";
19
+ readonly "admin-yes": "Yes";
20
+ readonly "admin-no": "No";
21
+ readonly "admin-login-failed": "Login failed";
22
+ readonly "admin-session-expired": "Session expired. Please log in again.";
23
+ readonly "admin-fill-all-required-fields": "Please fill in all required fields";
24
+ readonly "admin-username": "Username";
25
+ readonly "admin-detail": "Detail";
26
+ readonly "admin-not-found": "Not found";
27
+ readonly "admin-unknown-error": "Unknown error";
28
+ readonly "admin-validation-error": "Validation error";
29
+ readonly "admin-sorted-ascending": "Sorted ascending";
30
+ readonly "admin-sorted-descending": "Sorted descending";
31
+ readonly "admin-sort-cleared": "Sort cleared";
32
+ readonly "admin-of": "of";
33
+ readonly "admin-rows-selected": "rows selected";
34
+ readonly "admin-tree": "Tree";
35
+ };
36
+
37
+ export { DEFAULT_MESSAGES };
@@ -0,0 +1,7 @@
1
+ import {
2
+ DEFAULT_MESSAGES
3
+ } from "../chunk-N2L4TUC4.js";
4
+ export {
5
+ DEFAULT_MESSAGES
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,9 @@
1
+ export { c as configureCapabilities, a as configureFramework, g as getCapabilities, b as getCapability, d as getFrameworkConfig, h as hasCapability } from './runtime-env-config-CajOEJCP.js';
2
+ export { eventBus } from './events/index.js';
3
+ export { g as getMiddlewareRunner, r as registerMiddleware } from './middleware-registry-DT002qRd.js';
4
+ import './framework-config-types-DeUbx4bu.js';
5
+ import './middleware-types-DVG9C1qJ.js';
6
+
7
+ declare const SPRING_CORE_VERSION: string;
8
+
9
+ export { SPRING_CORE_VERSION };
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
1
+ import "./chunk-SQB4F3EF.js";
2
+ import {
3
+ eventBus
4
+ } from "./chunk-OSSX443T.js";
5
+ import {
6
+ getMiddlewareRunner,
7
+ registerMiddleware
8
+ } from "./chunk-MEWPYTWC.js";
9
+ import "./chunk-U5OH3GAI.js";
10
+ import "./chunk-UDT2RPX2.js";
11
+ import {
12
+ configureCapabilities,
13
+ getCapabilities,
14
+ getCapability,
15
+ hasCapability
16
+ } from "./chunk-S7MKRNMI.js";
17
+ import "./chunk-5D6XE7NJ.js";
18
+ import {
19
+ configureFramework,
20
+ getFrameworkConfig
21
+ } from "./chunk-F7WUQJH7.js";
22
+ import "./chunk-S6RPCN5H.js";
23
+ import "./chunk-RUCXSQEY.js";
24
+ import "./chunk-KX32MU3I.js";
25
+ import "./chunk-EFUBAQCV.js";
26
+ import "./chunk-PT4DIYUK.js";
27
+
28
+ // src/index.ts
29
+ var SPRING_CORE_VERSION = true ? "0.8.0" : "0.0.0-dev";
30
+ export {
31
+ SPRING_CORE_VERSION,
32
+ configureCapabilities,
33
+ configureFramework,
34
+ eventBus,
35
+ getCapabilities,
36
+ getCapability,
37
+ getFrameworkConfig,
38
+ getMiddlewareRunner,
39
+ hasCapability,
40
+ registerMiddleware
41
+ };
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @spring-systems/core\n// Core types, utilities, and configuration for Spring Systems SPRING.\n// Use sub-path imports for tree-shaking: @spring-systems/core/config, /utils, /types, etc.\n//\n// Convenience re-exports for the most commonly used APIs:\nexport {\n configureCapabilities,\n configureFramework,\n getCapabilities,\n getCapability,\n getFrameworkConfig,\n hasCapability,\n} from \"./config\";\nexport { eventBus } from \"./events/event-bus\";\nexport { getMiddlewareRunner, registerMiddleware } from \"./middleware\";\n\ndeclare const __VERSION__: string;\nexport const SPRING_CORE_VERSION: string = typeof __VERSION__ !== \"undefined\" ? __VERSION__ : \"0.0.0-dev\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,IAAM,sBAA8B,OAAqC,UAAc;","names":[]}