domma-js 0.56.0 → 0.58.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 (121) hide show
  1. package/README.md +2 -2
  2. package/assets/types/generated/public/assets/flags/africa.d.ts +6 -0
  3. package/assets/types/generated/public/assets/flags/americas.d.ts +6 -0
  4. package/assets/types/generated/public/assets/flags/asia.d.ts +6 -0
  5. package/assets/types/generated/public/assets/flags/europe.d.ts +9 -0
  6. package/assets/types/generated/public/assets/flags/index.d.ts +11 -0
  7. package/assets/types/generated/public/assets/flags/oceania.d.ts +2 -0
  8. package/assets/types/generated/public/assets/icons/buildings.d.ts +6 -0
  9. package/assets/types/generated/public/assets/icons/code.d.ts +2 -0
  10. package/assets/types/generated/public/assets/icons/commerce.d.ts +7 -0
  11. package/assets/types/generated/public/assets/icons/communication.d.ts +7 -0
  12. package/assets/types/generated/public/assets/icons/devices.d.ts +6 -0
  13. package/assets/types/generated/public/assets/icons/emojis.d.ts +6 -0
  14. package/assets/types/generated/public/assets/icons/files.d.ts +7 -0
  15. package/assets/types/generated/public/assets/icons/finance.d.ts +6 -0
  16. package/assets/types/generated/public/assets/icons/forms.d.ts +5 -0
  17. package/assets/types/generated/public/assets/icons/health.d.ts +6 -0
  18. package/assets/types/generated/public/assets/icons/index.d.ts +24 -0
  19. package/assets/types/generated/public/assets/icons/media.d.ts +7 -0
  20. package/assets/types/generated/public/assets/icons/navigation.d.ts +7 -0
  21. package/assets/types/generated/public/assets/icons/seasonal.d.ts +6 -0
  22. package/assets/types/generated/public/assets/icons/social.d.ts +7 -0
  23. package/assets/types/generated/public/assets/icons/sport.d.ts +6 -0
  24. package/assets/types/generated/public/assets/icons/status.d.ts +7 -0
  25. package/assets/types/generated/public/assets/icons/transport.d.ts +7 -0
  26. package/assets/types/generated/public/assets/icons/ui.d.ts +7 -0
  27. package/assets/types/generated/public/assets/icons/weather.d.ts +6 -0
  28. package/assets/types/generated/src/auth.d.ts +424 -0
  29. package/assets/types/generated/src/avatar.d.ts +270 -0
  30. package/assets/types/generated/src/binding-source.d.ts +58 -0
  31. package/assets/types/generated/src/butterfly-drawing.d.ts +2 -0
  32. package/assets/types/generated/src/component-factory.d.ts +150 -0
  33. package/assets/types/generated/src/component.d.ts +162 -0
  34. package/assets/types/generated/src/components/back-to-top.d.ts +150 -0
  35. package/assets/types/generated/src/components/badge.d.ts +208 -0
  36. package/assets/types/generated/src/components/card.d.ts +189 -0
  37. package/assets/types/generated/src/components/command-palette.d.ts +352 -0
  38. package/assets/types/generated/src/components/dropzone.d.ts +342 -0
  39. package/assets/types/generated/src/components/focus-trap.d.ts +238 -0
  40. package/assets/types/generated/src/components/loader.d.ts +133 -0
  41. package/assets/types/generated/src/components/modal.d.ts +339 -0
  42. package/assets/types/generated/src/components/range-slider.d.ts +267 -0
  43. package/assets/types/generated/src/components/shared.d.ts +91 -0
  44. package/assets/types/generated/src/components/split-pane.d.ts +239 -0
  45. package/assets/types/generated/src/components/toast.d.ts +284 -0
  46. package/assets/types/generated/src/components/tooltip.d.ts +200 -0
  47. package/assets/types/generated/src/components/virtual-list.d.ts +340 -0
  48. package/assets/types/generated/src/config.d.ts +193 -0
  49. package/assets/types/generated/src/context-cursor.d.ts +69 -0
  50. package/assets/types/generated/src/context-menu.d.ts +596 -0
  51. package/assets/types/generated/src/dates.d.ts +367 -0
  52. package/assets/types/generated/src/dom.d.ts +1221 -0
  53. package/assets/types/generated/src/effects.d.ts +1281 -0
  54. package/assets/types/generated/src/elements.d.ts +4994 -0
  55. package/assets/types/generated/src/escape.d.ts +5 -0
  56. package/assets/types/generated/src/flags-bundle.d.ts +4 -0
  57. package/assets/types/generated/src/flags.d.ts +338 -0
  58. package/assets/types/generated/src/forms.d.ts +1060 -0
  59. package/assets/types/generated/src/globals.d.ts +45 -0
  60. package/assets/types/generated/src/http.d.ts +131 -0
  61. package/assets/types/generated/src/i18n.d.ts +261 -0
  62. package/assets/types/generated/src/icons.d.ts +213 -0
  63. package/assets/types/generated/src/index.d.ts +249 -0
  64. package/assets/types/generated/src/input-group.d.ts +135 -0
  65. package/assets/types/generated/src/models.d.ts +968 -0
  66. package/assets/types/generated/src/popover.d.ts +413 -0
  67. package/assets/types/generated/src/router.d.ts +344 -0
  68. package/assets/types/generated/src/safe-url.d.ts +10 -0
  69. package/assets/types/generated/src/sanitize.d.ts +97 -0
  70. package/assets/types/generated/src/schema-builder.d.ts +420 -0
  71. package/assets/types/generated/src/skeleton.d.ts +135 -0
  72. package/assets/types/generated/src/smooth-caret.d.ts +61 -0
  73. package/assets/types/generated/src/sortable.d.ts +368 -0
  74. package/assets/types/generated/src/storage.d.ts +93 -0
  75. package/assets/types/generated/src/tables.d.ts +901 -0
  76. package/assets/types/generated/src/theme.d.ts +262 -0
  77. package/assets/types/generated/src/ticker-tape-drawing.d.ts +2 -0
  78. package/assets/types/generated/src/treeview.d.ts +504 -0
  79. package/assets/types/generated/src/utils.d.ts +1667 -0
  80. package/assets/types/generated/src/web-components/base/domma-element.d.ts +134 -0
  81. package/assets/types/generated/src/web-components/index.d.ts +14 -0
  82. package/assets/types/generated/vendor/domma-reactive.d.ts +587 -0
  83. package/assets/types/index.d.ts +104 -226
  84. package/package.json +5 -2
  85. package/public/dist/bundles/domma-complete.css +20 -14
  86. package/public/dist/bundles/domma-data-focused.css +20 -14
  87. package/public/dist/bundles/domma-essentials.css +20 -14
  88. package/public/dist/bundles/domma-full.css +20 -14
  89. package/public/dist/bundles/domma-minimal.css +8 -8
  90. package/public/dist/domma-flags.esm.js +3 -3
  91. package/public/dist/domma-flags.esm.js.map +1 -1
  92. package/public/dist/domma-flags.min.js +3 -3
  93. package/public/dist/domma-flags.min.js.map +1 -1
  94. package/public/dist/domma-syntax.min.js +3 -3
  95. package/public/dist/domma.css +3 -3
  96. package/public/dist/domma.esm.js +5 -5
  97. package/public/dist/domma.esm.js.map +1 -1
  98. package/public/dist/domma.min.js +5 -5
  99. package/public/dist/domma.min.js.map +1 -1
  100. package/public/dist/elements.css +9 -3
  101. package/public/dist/grid.css +3 -3
  102. package/public/dist/syntax.css +3 -3
  103. package/public/dist/themes/domma-themes.css +3 -3
  104. package/templates/kickstart/.claude/snippets.md +1 -1
  105. package/templates/kickstart/CLAUDE.md +1 -1
  106. package/templates/kickstart/frontend/types/domma.d.ts +7 -4
  107. package/templates/kickstart-spa/.claude/snippets.md +1 -1
  108. package/assets/types/config.d.ts +0 -136
  109. package/assets/types/dates.d.ts +0 -209
  110. package/assets/types/dom.d.ts +0 -448
  111. package/assets/types/elements.d.ts +0 -1168
  112. package/assets/types/flags.d.ts +0 -130
  113. package/assets/types/http.d.ts +0 -97
  114. package/assets/types/i18n.d.ts +0 -99
  115. package/assets/types/icons.d.ts +0 -147
  116. package/assets/types/models.d.ts +0 -260
  117. package/assets/types/smooth-caret.d.ts +0 -12
  118. package/assets/types/storage.d.ts +0 -93
  119. package/assets/types/tables.d.ts +0 -327
  120. package/assets/types/theme.d.ts +0 -137
  121. package/assets/types/utils.d.ts +0 -675
@@ -0,0 +1,262 @@
1
+ export { themeEngine as theme };
2
+ export default themeEngine;
3
+ /**
4
+ * Light/dark mode - the final segment of a standard theme name.
5
+ */
6
+ export type ThemeMode = "light" | "dark";
7
+ /**
8
+ * Colour base of a theme (the name before the final segment), as listed by `listBases()`
9
+ * (`core` is the base of `core-light`).
10
+ */
11
+ export type ThemeVariant = "ocean" | "forest" | "sunset" | "royal" | "lemon" | "silver" | "charcoal" | "christmas" | "unicorn" | "dreamy" | "grayve" | "mint" | "wedding" | "core" | "corporate" | "admin-smooth" | "admin-sharp" | "admin-slate";
12
+ /**
13
+ * Standalone Admin family (no light/dark) - finish-accent full names.
14
+ */
15
+ export type AdminTheme = "admin-smooth-steel" | "admin-smooth-indigo" | "admin-smooth-teal" | "admin-sharp-steel" | "admin-sharp-indigo" | "admin-sharp-teal" | "admin-slate-steel" | "admin-slate-indigo" | "admin-slate-teal";
16
+ /**
17
+ * A full theme name, e.g. 'ocean-dark' or 'admin-sharp-steel'.
18
+ */
19
+ export type ThemeName = `${"ocean" | "forest" | "sunset" | "royal" | "lemon" | "silver" | "charcoal" | "christmas" | "unicorn" | "dreamy" | "grayve" | "mint" | "wedding" | "corporate"}-${ThemeMode}` | "core-light" | AdminTheme;
20
+ /**
21
+ * What `getConfig()` returns.
22
+ */
23
+ export type ThemeConfig = {
24
+ /**
25
+ * Current full theme name
26
+ */
27
+ theme: ThemeName;
28
+ /**
29
+ * Colour base (see `getBase()`)
30
+ */
31
+ base: ThemeVariant;
32
+ /**
33
+ * Final segment (see `getMode()`)
34
+ */
35
+ mode: ThemeMode | "steel" | "indigo" | "teal";
36
+ /**
37
+ * Whether the system preference is followed
38
+ */
39
+ autoDetect: boolean;
40
+ /**
41
+ * Whether the choice is saved to localStorage (undefined before init)
42
+ */
43
+ persist: boolean | undefined;
44
+ /**
45
+ * Whether theming is disabled
46
+ */
47
+ disabled: boolean;
48
+ };
49
+ /**
50
+ * Called with the previous and the new theme name when the theme changes.
51
+ */
52
+ export type ThemeChangeCallback = (oldTheme: ThemeName, newTheme: ThemeName) => void;
53
+ /**
54
+ * Options for `init()`.
55
+ */
56
+ export type ThemeOptions = {
57
+ /**
58
+ * Initial theme (e.g., 'ocean-dark', 'forest-light')
59
+ */
60
+ theme?: ThemeName;
61
+ /**
62
+ * Respect system preference (maps to light/dark variants)
63
+ */
64
+ autoDetect?: boolean;
65
+ /**
66
+ * Save to localStorage
67
+ */
68
+ persist?: boolean;
69
+ /**
70
+ * Disable theming entirely (no classes applied)
71
+ */
72
+ disabled?: boolean;
73
+ /**
74
+ * Target element
75
+ */
76
+ target?: HTMLElement | string;
77
+ };
78
+ export type Theme = ThemeEngine;
79
+ declare const themeEngine: ThemeEngine;
80
+ /**
81
+ * Light/dark mode - the final segment of a standard theme name.
82
+ * @typedef {'light'|'dark'} ThemeMode
83
+ */
84
+ /**
85
+ * Colour base of a theme (the name before the final segment), as listed by `listBases()`
86
+ * (`core` is the base of `core-light`).
87
+ * @typedef {'ocean'|'forest'|'sunset'|'royal'|'lemon'|'silver'|'charcoal'|'christmas'|'unicorn'|'dreamy'|'grayve'|'mint'|'wedding'|'core'|'corporate'|'admin-smooth'|'admin-sharp'|'admin-slate'} ThemeVariant
88
+ */
89
+ /**
90
+ * Standalone Admin family (no light/dark) - finish-accent full names.
91
+ * @typedef {'admin-smooth-steel'|'admin-smooth-indigo'|'admin-smooth-teal'|'admin-sharp-steel'|'admin-sharp-indigo'|'admin-sharp-teal'|'admin-slate-steel'|'admin-slate-indigo'|'admin-slate-teal'} AdminTheme
92
+ */
93
+ /**
94
+ * A full theme name, e.g. 'ocean-dark' or 'admin-sharp-steel'.
95
+ * @typedef {`${'ocean'|'forest'|'sunset'|'royal'|'lemon'|'silver'|'charcoal'|'christmas'|'unicorn'|'dreamy'|'grayve'|'mint'|'wedding'|'corporate'}-${ThemeMode}`|'core-light'|AdminTheme} ThemeName
96
+ */
97
+ /**
98
+ * What `getConfig()` returns.
99
+ * @typedef {object} ThemeConfig
100
+ * @property {ThemeName} theme Current full theme name
101
+ * @property {ThemeVariant} base Colour base (see `getBase()`)
102
+ * @property {ThemeMode|'steel'|'indigo'|'teal'} mode Final segment (see `getMode()`)
103
+ * @property {boolean} autoDetect Whether the system preference is followed
104
+ * @property {boolean|undefined} persist Whether the choice is saved to localStorage (undefined before init)
105
+ * @property {boolean} disabled Whether theming is disabled
106
+ */
107
+ /**
108
+ * Called with the previous and the new theme name when the theme changes.
109
+ * @callback ThemeChangeCallback
110
+ * @param {ThemeName} oldTheme
111
+ * @param {ThemeName} newTheme
112
+ * @returns {void}
113
+ */
114
+ /**
115
+ * Options for `init()`.
116
+ * @typedef {object} ThemeOptions
117
+ * @property {ThemeName} [theme] Initial theme (e.g., 'ocean-dark', 'forest-light')
118
+ * @property {boolean} [autoDetect=false] Respect system preference (maps to light/dark variants)
119
+ * @property {boolean} [persist=true] Save to localStorage
120
+ * @property {boolean} [disabled=false] Disable theming entirely (no classes applied)
121
+ * @property {HTMLElement|string} [target=document.body] Target element
122
+ */
123
+ /** @typedef {ThemeEngine} Theme */
124
+ declare class ThemeEngine {
125
+ _theme: string;
126
+ _listeners: any[];
127
+ _target: HTMLElement | Element;
128
+ _initialised: boolean;
129
+ _systemMediaQuery: MediaQueryList;
130
+ _autoDetect: boolean;
131
+ _disabled: boolean;
132
+ /**
133
+ * Initialise the theme engine
134
+ * @param {ThemeOptions} [options] - Configuration options
135
+ * @returns {this}
136
+ */
137
+ init(options?: ThemeOptions): this;
138
+ _persist: boolean;
139
+ /**
140
+ * Get the current theme (full name, e.g., 'ocean-dark')
141
+ * @returns {ThemeName}
142
+ */
143
+ get(): ThemeName;
144
+ /**
145
+ * Get the theme base colour (everything before the final '-' segment).
146
+ * For standard themes this is the colour name (e.g., 'ocean' from 'ocean-dark').
147
+ * For Admin themes the base is the finish (e.g., 'admin-sharp' from 'admin-sharp-steel').
148
+ * @returns {ThemeVariant}
149
+ */
150
+ getBase(): ThemeVariant;
151
+ /**
152
+ * Get the final '-' segment of the theme name.
153
+ * For standard themes this is the light/dark mode (e.g., 'dark' from 'ocean-dark',
154
+ * 'light' from 'forest-light'). Admin themes have no light/dark mode, so this
155
+ * returns the accent name instead (e.g., 'steel', 'indigo', or 'teal').
156
+ * @returns {ThemeMode|'steel'|'indigo'|'teal'}
157
+ */
158
+ getMode(): ThemeMode | "steel" | "indigo" | "teal";
159
+ /**
160
+ * Check if dark mode is active
161
+ * @returns {boolean}
162
+ */
163
+ isDark(): boolean;
164
+ /**
165
+ * Check if light mode is active
166
+ * @returns {boolean}
167
+ */
168
+ isLight(): boolean;
169
+ /**
170
+ * Set the theme (e.g., 'ocean-dark', 'forest-light')
171
+ * @param {ThemeName} theme - Full theme name
172
+ * @returns {this}
173
+ */
174
+ set(theme: ThemeName): this;
175
+ /**
176
+ * Register a callback for theme changes
177
+ * @param {ThemeChangeCallback} callback - Callback function(oldTheme, newTheme)
178
+ * @returns {() => void} Unsubscribe function
179
+ */
180
+ onChange(callback: ThemeChangeCallback): () => void;
181
+ /**
182
+ * Preview a theme temporarily without saving
183
+ * @param {ThemeName} theme - Theme to preview (e.g., 'ocean-dark')
184
+ * @returns {() => void} Restore function
185
+ */
186
+ preview(theme: ThemeName): () => void;
187
+ /**
188
+ * List all available themes
189
+ * @returns {ThemeName[]} Array of all 33 theme names
190
+ */
191
+ listThemes(): ThemeName[];
192
+ /**
193
+ * List available colour bases (without mode suffix)
194
+ * @returns {ThemeVariant[]}
195
+ */
196
+ listBases(): ThemeVariant[];
197
+ /**
198
+ * Get current theme configuration
199
+ * @returns {ThemeConfig}
200
+ */
201
+ getConfig(): ThemeConfig;
202
+ /**
203
+ * Update the meta theme-color for mobile browsers
204
+ * @private
205
+ */
206
+ private _updateMetaThemeColor;
207
+ /**
208
+ * Check if theming is disabled
209
+ * @returns {boolean}
210
+ */
211
+ isDisabled(): boolean;
212
+ /**
213
+ * Enable theming (if previously disabled)
214
+ * @returns {this}
215
+ */
216
+ enable(): this;
217
+ /**
218
+ * Disable theming (remove all theme classes)
219
+ * @returns {this}
220
+ */
221
+ disable(): this;
222
+ /**
223
+ * Apply the current theme to the target element
224
+ * @param {boolean} [updateMeta=true] - Whether to update meta theme-color
225
+ * @private
226
+ */
227
+ private _applyTheme;
228
+ /**
229
+ * Save theme to localStorage
230
+ * @private
231
+ */
232
+ private _saveToStorage;
233
+ /**
234
+ * Load theme from localStorage with automatic migration from old format
235
+ * @returns {string|null}
236
+ * @private
237
+ */
238
+ private _loadFromStorage;
239
+ /**
240
+ * Get system colour scheme preference
241
+ * @returns {string}
242
+ * @private
243
+ */
244
+ private _getSystemPreference;
245
+ /**
246
+ * Setup listener for system preference changes
247
+ * @private
248
+ */
249
+ private _setupSystemListener;
250
+ /**
251
+ * Notify all registered listeners of theme change
252
+ * @param {string} oldTheme - Previous theme
253
+ * @param {string} newTheme - New theme
254
+ * @private
255
+ */
256
+ private _notifyListeners;
257
+ /**
258
+ * Cleanup and destroy the theme engine
259
+ * @returns {void}
260
+ */
261
+ destroy(): void;
262
+ }
@@ -0,0 +1,2 @@
1
+ export function drawTickerStrip(ctx: any, p: any): void;
2
+ export function advanceTickerStrip(p: any, height: any, opts: any, frames: any): void;