@svadmin/ui 0.75.0 → 0.77.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 (53) hide show
  1. package/dist/app.css +383 -22
  2. package/dist/app.theme.css +383 -22
  3. package/dist/component-registry.d.ts +300 -0
  4. package/dist/component-registry.js +2 -0
  5. package/dist/components/AppFooter.svelte +137 -0
  6. package/dist/components/AppFooter.svelte.d.ts +25 -0
  7. package/dist/components/CodeEditor.svelte +145 -0
  8. package/dist/components/CodeEditor.svelte.d.ts +26 -0
  9. package/dist/components/HighlightText.svelte +46 -0
  10. package/dist/components/HighlightText.svelte.d.ts +13 -0
  11. package/dist/components/JsonEditor.svelte +182 -0
  12. package/dist/components/JsonEditor.svelte.d.ts +22 -0
  13. package/dist/components/Layout.svelte +38 -5
  14. package/dist/components/Layout.svelte.d.ts +4 -3
  15. package/dist/components/Marquee.svelte +104 -0
  16. package/dist/components/Marquee.svelte.d.ts +20 -0
  17. package/dist/components/MediaPlayer.svelte +104 -0
  18. package/dist/components/MediaPlayer.svelte.d.ts +21 -0
  19. package/dist/components/PhoneInput.svelte +157 -0
  20. package/dist/components/PhoneInput.svelte.d.ts +26 -0
  21. package/dist/components/QRCode.svelte +88 -0
  22. package/dist/components/QRCode.svelte.d.ts +22 -0
  23. package/dist/components/ResizableGrid.svelte +252 -0
  24. package/dist/components/ResizableGrid.svelte.d.ts +34 -0
  25. package/dist/components/Sidebar.svelte +1 -1
  26. package/dist/components/TopProgressBar.svelte +90 -0
  27. package/dist/components/TopProgressBar.svelte.d.ts +15 -0
  28. package/dist/components/browser.svelte.d.ts +65 -0
  29. package/dist/components/browser.svelte.js +228 -0
  30. package/dist/components/charts/AreaChart.svelte +78 -0
  31. package/dist/components/charts/AreaChart.svelte.d.ts +17 -0
  32. package/dist/components/charts/ScatterChart.svelte +82 -0
  33. package/dist/components/charts/ScatterChart.svelte.d.ts +17 -0
  34. package/dist/components/charts/index.d.ts +2 -0
  35. package/dist/components/charts/index.js +2 -0
  36. package/dist/components/code-editor-presets.d.ts +14 -0
  37. package/dist/components/code-editor-presets.js +14 -0
  38. package/dist/components/content/ContentPageHeader.svelte +17 -3
  39. package/dist/components/content/ContentPageHeader.svelte.d.ts +1 -0
  40. package/dist/components/content/ContentPageShell.svelte +12 -3
  41. package/dist/components/content/ContentPageShell.svelte.d.ts +1 -0
  42. package/dist/components/content/MetricBlock.svelte +1 -1
  43. package/dist/components/highlight.d.ts +16 -0
  44. package/dist/components/highlight.js +68 -0
  45. package/dist/components/media.svelte.d.ts +27 -0
  46. package/dist/components/media.svelte.js +60 -0
  47. package/dist/components/phone-dial-codes.d.ts +19 -0
  48. package/dist/components/phone-dial-codes.js +112 -0
  49. package/dist/index.d.ts +19 -1
  50. package/dist/index.js +14 -1
  51. package/dist/recipes.d.ts +77 -38
  52. package/dist/recipes.js +33 -8
  53. package/package.json +64 -4
package/dist/index.d.ts CHANGED
@@ -196,7 +196,7 @@ export { default as RetryTaskButton } from "./components/RetryTaskButton.svelte"
196
196
  export { default as CancelTaskButton } from "./components/CancelTaskButton.svelte";
197
197
  export { default as DraggableGrid } from "./components/DraggableGrid.svelte";
198
198
  export type { GridModule } from "./types.js";
199
- export { BarChart, LineChart, PieChart } from './components/charts/index.js';
199
+ export { BarChart, LineChart, PieChart, AreaChart, ScatterChart } from './components/charts/index.js';
200
200
  export { default as NumberField } from './components/fields/NumberField.svelte';
201
201
  export { default as DateField } from './components/fields/DateField.svelte';
202
202
  export { default as EmailField } from './components/fields/EmailField.svelte';
@@ -341,3 +341,21 @@ export { default as MediaThumbnail } from './components/content/MediaThumbnail.s
341
341
  export type { MediaThumbnailSize, MediaThumbnailFit } from './components/content/MediaThumbnail.svelte';
342
342
  export { default as FileBrowser } from './components/content/FileBrowser.svelte';
343
343
  export type { FileBrowserData, FileBrowserInit, FileBrowserMenuOptions, FileBrowserProps } from './components/content/FileBrowser.svelte';
344
+ export { default as HighlightText } from './components/HighlightText.svelte';
345
+ export { splitHighlights, escapeRegExp } from './components/highlight.js';
346
+ export type { HighlightSegment, SplitHighlightsOptions } from './components/highlight.js';
347
+ export { default as Marquee } from './components/Marquee.svelte';
348
+ export { default as MediaPlayer } from './components/MediaPlayer.svelte';
349
+ export { default as TopProgressBar } from './components/TopProgressBar.svelte';
350
+ export { default as PhoneInput } from './components/PhoneInput.svelte';
351
+ export { PHONE_DIAL_CODES, findDialCodeByCountry, toE164, splitE164, formatNationalNumber, } from './components/phone-dial-codes.js';
352
+ export type { PhoneDialCode } from './components/phone-dial-codes.js';
353
+ export { useMediaQuery, useDeviceDetect, MOBILE_QUERY, TABLET_QUERY, TOUCH_QUERY, REDUCED_MOTION_QUERY, DARK_QUERY, } from './components/media.svelte.js';
354
+ export type { MediaQueryState, DeviceDetectState } from './components/media.svelte.js';
355
+ export { useClipboard, useLocalStorage, useDebouncedValue, useInterval, useEventListener, useOnClickOutside, useWindowSize, } from './components/browser.svelte.js';
356
+ export type { ClipboardState, ClipboardOptions, LocalStorageState, DebouncedValue, WindowSize, SwipeHandlers, } from './components/browser.svelte.js';
357
+ export { useSwipe } from './components/browser.svelte.js';
358
+ export { default as AppFooter } from './components/AppFooter.svelte';
359
+ export type { FooterLink, FooterColumn } from './components/AppFooter.svelte';
360
+ export { default as ResizableGrid } from './components/ResizableGrid.svelte';
361
+ export type { GridItem } from './components/ResizableGrid.svelte';
package/dist/index.js CHANGED
@@ -153,7 +153,7 @@ export { default as RetryTaskButton } from "./components/RetryTaskButton.svelte"
153
153
  export { default as CancelTaskButton } from "./components/CancelTaskButton.svelte";
154
154
  export { default as DraggableGrid } from "./components/DraggableGrid.svelte";
155
155
  // Dashboard Charts (zero-dependency SVG)
156
- export { BarChart, LineChart, PieChart } from './components/charts/index.js';
156
+ export { BarChart, LineChart, PieChart, AreaChart, ScatterChart } from './components/charts/index.js';
157
157
  // Field display components
158
158
  export { default as NumberField } from './components/fields/NumberField.svelte';
159
159
  export { default as DateField } from './components/fields/DateField.svelte';
@@ -280,3 +280,16 @@ export { default as FilterDropdown } from './components/FilterDropdown.svelte';
280
280
  export { default as BatchActionBar } from './components/BatchActionBar.svelte';
281
281
  export { default as MediaThumbnail } from './components/content/MediaThumbnail.svelte';
282
282
  export { default as FileBrowser } from './components/content/FileBrowser.svelte';
283
+ // Ecosystem utilities: highlighting, marquee, media, progress, phone, responsive
284
+ export { default as HighlightText } from './components/HighlightText.svelte';
285
+ export { splitHighlights, escapeRegExp } from './components/highlight.js';
286
+ export { default as Marquee } from './components/Marquee.svelte';
287
+ export { default as MediaPlayer } from './components/MediaPlayer.svelte';
288
+ export { default as TopProgressBar } from './components/TopProgressBar.svelte';
289
+ export { default as PhoneInput } from './components/PhoneInput.svelte';
290
+ export { PHONE_DIAL_CODES, findDialCodeByCountry, toE164, splitE164, formatNationalNumber, } from './components/phone-dial-codes.js';
291
+ export { useMediaQuery, useDeviceDetect, MOBILE_QUERY, TABLET_QUERY, TOUCH_QUERY, REDUCED_MOTION_QUERY, DARK_QUERY, } from './components/media.svelte.js';
292
+ export { useClipboard, useLocalStorage, useDebouncedValue, useInterval, useEventListener, useOnClickOutside, useWindowSize, } from './components/browser.svelte.js';
293
+ export { useSwipe } from './components/browser.svelte.js';
294
+ export { default as AppFooter } from './components/AppFooter.svelte';
295
+ export { default as ResizableGrid } from './components/ResizableGrid.svelte';
package/dist/recipes.d.ts CHANGED
@@ -120,6 +120,14 @@ declare const contentPageRecipeStyles: import("tailwind-variants").TVReturnType<
120
120
  root: string;
121
121
  };
122
122
  };
123
+ density: {
124
+ compact: {
125
+ root: string;
126
+ };
127
+ comfortable: {
128
+ root: string;
129
+ };
130
+ };
123
131
  }, {
124
132
  root: string;
125
133
  }, undefined, {
@@ -134,6 +142,14 @@ declare const contentPageRecipeStyles: import("tailwind-variants").TVReturnType<
134
142
  root: string;
135
143
  };
136
144
  };
145
+ density: {
146
+ compact: {
147
+ root: string;
148
+ };
149
+ comfortable: {
150
+ root: string;
151
+ };
152
+ };
137
153
  }, {
138
154
  root: string;
139
155
  }, import("tailwind-variants").TVReturnTypeLike<{
@@ -148,38 +164,37 @@ declare const contentPageRecipeStyles: import("tailwind-variants").TVReturnType<
148
164
  root: string;
149
165
  };
150
166
  };
167
+ density: {
168
+ compact: {
169
+ root: string;
170
+ };
171
+ comfortable: {
172
+ root: string;
173
+ };
174
+ };
151
175
  }, {
152
176
  root: string;
153
177
  }>>;
154
178
  declare const contentHeaderRecipeStyles: import("tailwind-variants").TVReturnType<{
155
- [key: string]: {
156
- [key: string]: import("tailwind-variants").ClassValue | {
157
- title?: import("tailwind-variants").ClassValue;
158
- description?: import("tailwind-variants").ClassValue;
159
- root?: import("tailwind-variants").ClassValue;
160
- row?: import("tailwind-variants").ClassValue;
161
- heading?: import("tailwind-variants").ClassValue;
162
- breadcrumbs?: import("tailwind-variants").ClassValue;
163
- currentCrumb?: import("tailwind-variants").ClassValue;
164
- eyebrow?: import("tailwind-variants").ClassValue;
165
- actions?: import("tailwind-variants").ClassValue;
179
+ density: {
180
+ compact: {
181
+ root: string;
182
+ row: string;
183
+ heading: string;
184
+ title: string;
185
+ description: string;
186
+ actions: string;
166
187
  };
167
- };
168
- } | {
169
- [x: string]: {
170
- [x: string]: import("tailwind-variants").ClassValue | {
171
- title?: import("tailwind-variants").ClassValue;
172
- description?: import("tailwind-variants").ClassValue;
173
- root?: import("tailwind-variants").ClassValue;
174
- row?: import("tailwind-variants").ClassValue;
175
- heading?: import("tailwind-variants").ClassValue;
176
- breadcrumbs?: import("tailwind-variants").ClassValue;
177
- currentCrumb?: import("tailwind-variants").ClassValue;
178
- eyebrow?: import("tailwind-variants").ClassValue;
179
- actions?: import("tailwind-variants").ClassValue;
188
+ comfortable: {
189
+ root: string;
190
+ row: string;
191
+ heading: string;
192
+ title: string;
193
+ description: string;
194
+ actions: string;
180
195
  };
181
196
  };
182
- } | {}, {
197
+ }, {
183
198
  root: string;
184
199
  breadcrumbs: string;
185
200
  currentCrumb: string;
@@ -190,20 +205,25 @@ declare const contentHeaderRecipeStyles: import("tailwind-variants").TVReturnTyp
190
205
  description: string;
191
206
  actions: string;
192
207
  }, undefined, {
193
- [key: string]: {
194
- [key: string]: import("tailwind-variants").ClassValue | {
195
- title?: import("tailwind-variants").ClassValue;
196
- description?: import("tailwind-variants").ClassValue;
197
- root?: import("tailwind-variants").ClassValue;
198
- row?: import("tailwind-variants").ClassValue;
199
- heading?: import("tailwind-variants").ClassValue;
200
- breadcrumbs?: import("tailwind-variants").ClassValue;
201
- currentCrumb?: import("tailwind-variants").ClassValue;
202
- eyebrow?: import("tailwind-variants").ClassValue;
203
- actions?: import("tailwind-variants").ClassValue;
208
+ density: {
209
+ compact: {
210
+ root: string;
211
+ row: string;
212
+ heading: string;
213
+ title: string;
214
+ description: string;
215
+ actions: string;
216
+ };
217
+ comfortable: {
218
+ root: string;
219
+ row: string;
220
+ heading: string;
221
+ title: string;
222
+ description: string;
223
+ actions: string;
204
224
  };
205
225
  };
206
- } | {}, {
226
+ }, {
207
227
  root: string;
208
228
  breadcrumbs: string;
209
229
  currentCrumb: string;
@@ -213,7 +233,26 @@ declare const contentHeaderRecipeStyles: import("tailwind-variants").TVReturnTyp
213
233
  title: string;
214
234
  description: string;
215
235
  actions: string;
216
- }, import("tailwind-variants").TVReturnTypeLike<unknown, {
236
+ }, import("tailwind-variants").TVReturnTypeLike<{
237
+ density: {
238
+ compact: {
239
+ root: string;
240
+ row: string;
241
+ heading: string;
242
+ title: string;
243
+ description: string;
244
+ actions: string;
245
+ };
246
+ comfortable: {
247
+ root: string;
248
+ row: string;
249
+ heading: string;
250
+ title: string;
251
+ description: string;
252
+ actions: string;
253
+ };
254
+ };
255
+ }, {
217
256
  root: string;
218
257
  breadcrumbs: string;
219
258
  currentCrumb: string;
package/dist/recipes.js CHANGED
@@ -55,28 +55,53 @@ const buttonRecipeDefaults = { variant: "default", size: "default" };
55
55
  const badgeRecipeDefaults = { variant: "default" };
56
56
  const textareaRecipeStyles = tv({ base: "svadmin-textarea" });
57
57
  const contentPageRecipeStyles = tv({
58
- slots: { root: `${semantic.page} svadmin-content-page space-y-6` },
58
+ slots: { root: `${semantic.page} svadmin-content-page` },
59
59
  variants: {
60
60
  width: {
61
61
  narrow: { root: "max-w-3xl" },
62
62
  default: { root: "max-w-[74rem]" },
63
63
  wide: { root: "max-w-[92rem]" },
64
64
  },
65
+ density: {
66
+ compact: { root: "space-y-4" },
67
+ comfortable: { root: "space-y-6" },
68
+ },
65
69
  },
66
- defaultVariants: { width: "default" },
70
+ defaultVariants: { width: "default", density: "comfortable" },
67
71
  });
68
72
  const contentHeaderRecipeStyles = tv({
69
73
  slots: {
70
- root: "svadmin-content-header space-y-3",
74
+ root: "svadmin-content-header",
71
75
  breadcrumbs: `${semantic.group} text-xs text-muted-foreground`,
72
76
  currentCrumb: "text-foreground",
73
- row: "flex flex-col gap-6 sm:flex-row sm:items-start sm:justify-between",
74
- heading: "min-w-0 space-y-1",
77
+ row: "flex flex-col sm:flex-row sm:items-start sm:justify-between",
78
+ heading: "min-w-0",
75
79
  eyebrow: "text-xs font-medium text-muted-foreground",
76
- title: "text-xl font-semibold leading-tight text-foreground",
77
- description: "max-w-2xl text-sm leading-6 text-muted-foreground",
78
- actions: "flex shrink-0 flex-wrap items-center gap-2",
80
+ title: "font-semibold leading-tight text-foreground",
81
+ description: "max-w-2xl text-muted-foreground",
82
+ actions: "flex shrink-0 flex-wrap items-center",
79
83
  },
84
+ variants: {
85
+ density: {
86
+ compact: {
87
+ root: "space-y-2",
88
+ row: "gap-3",
89
+ heading: "space-y-0.5",
90
+ title: "text-lg leading-tight",
91
+ description: "text-[0.8125rem] leading-5",
92
+ actions: "gap-1.5",
93
+ },
94
+ comfortable: {
95
+ root: "space-y-3",
96
+ row: "gap-6",
97
+ heading: "space-y-1",
98
+ title: "text-xl leading-tight",
99
+ description: "text-sm leading-6",
100
+ actions: "gap-2",
101
+ },
102
+ },
103
+ },
104
+ defaultVariants: { density: "comfortable" },
80
105
  });
81
106
  const metricBlockRecipeStyles = tv({
82
107
  slots: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/ui",
3
- "version": "0.75.0",
3
+ "version": "0.77.0",
4
4
  "description": "Pre-built admin UI components — AdminApp, AutoTable, AutoForm, Sidebar, Layout",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -51,6 +51,25 @@
51
51
  "default": "./dist/components/*.svelte"
52
52
  },
53
53
  "./components/*": "./dist/components/*",
54
+ "./code-editor": {
55
+ "types": "./dist/components/CodeEditor.svelte.d.ts",
56
+ "svelte": "./dist/components/CodeEditor.svelte",
57
+ "default": "./dist/components/CodeEditor.svelte"
58
+ },
59
+ "./code-editor/presets": {
60
+ "types": "./dist/components/code-editor-presets.d.ts",
61
+ "default": "./dist/components/code-editor-presets.js"
62
+ },
63
+ "./json-editor": {
64
+ "types": "./dist/components/JsonEditor.svelte.d.ts",
65
+ "svelte": "./dist/components/JsonEditor.svelte",
66
+ "default": "./dist/components/JsonEditor.svelte"
67
+ },
68
+ "./qr-code": {
69
+ "types": "./dist/components/QRCode.svelte.d.ts",
70
+ "svelte": "./dist/components/QRCode.svelte",
71
+ "default": "./dist/components/QRCode.svelte"
72
+ },
54
73
  "./design-contract": {
55
74
  "types": "./dist/design-contract.d.ts",
56
75
  "default": "./dist/design-contract.js"
@@ -65,10 +84,18 @@
65
84
  }
66
85
  },
67
86
  "peerDependencies": {
68
- "@svadmin/core": "^0.55.0",
87
+ "@codemirror/lang-javascript": "^6.0.0",
88
+ "@codemirror/lang-json": "^6.0.0",
89
+ "@codemirror/lang-markdown": "^6.0.0",
90
+ "@codemirror/lang-sql": "^6.0.0",
91
+ "@svadmin/core": "^0.57.0",
69
92
  "@tanstack/svelte-query": "^6.1.48",
93
+ "codemirror": "^6.0.0",
70
94
  "isomorphic-dompurify": "^3.23.0",
71
- "svelte": "^5.56.10"
95
+ "qrcode": "^1.5.4",
96
+ "svelte": "^5.56.10",
97
+ "svelte-codemirror-editor": "^2.1.0",
98
+ "svelte-jsoneditor": "^3.13.0"
72
99
  },
73
100
  "peerDependenciesMeta": {
74
101
  "isomorphic-dompurify": {
@@ -85,6 +112,30 @@
85
112
  },
86
113
  "svelte": {
87
114
  "optional": true
115
+ },
116
+ "codemirror": {
117
+ "optional": true
118
+ },
119
+ "qrcode": {
120
+ "optional": true
121
+ },
122
+ "svelte-codemirror-editor": {
123
+ "optional": true
124
+ },
125
+ "@codemirror/lang-javascript": {
126
+ "optional": true
127
+ },
128
+ "@codemirror/lang-json": {
129
+ "optional": true
130
+ },
131
+ "@codemirror/lang-markdown": {
132
+ "optional": true
133
+ },
134
+ "@codemirror/lang-sql": {
135
+ "optional": true
136
+ },
137
+ "svelte-jsoneditor": {
138
+ "optional": true
88
139
  }
89
140
  },
90
141
  "dependencies": {
@@ -119,17 +170,26 @@
119
170
  "access": "public"
120
171
  },
121
172
  "devDependencies": {
173
+ "@codemirror/lang-javascript": "^6.2.5",
174
+ "@codemirror/lang-json": "^6.0.2",
175
+ "@codemirror/lang-markdown": "^6.5.2",
176
+ "@codemirror/lang-sql": "^6.10.0",
122
177
  "@happy-dom/global-registrator": "^20.11.12",
123
- "@svadmin/ai-elements": "^0.10.0",
178
+ "@svadmin/ai-elements": "^0.10.2",
124
179
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
125
180
  "@tailwindcss/cli": "4.3.3",
126
181
  "@testing-library/dom": "^10.4.1",
127
182
  "@testing-library/svelte": "^5.4.2",
128
183
  "@testing-library/user-event": "^14.6.6",
184
+ "@types/qrcode": "^1.5.6",
185
+ "codemirror": "^6.0.2",
129
186
  "happy-dom": "^20.11.12",
130
187
  "postcss": "^8.5.26",
131
188
  "postcss-selector-parser": "^7.1.1",
189
+ "qrcode": "^1.5.4",
132
190
  "shadcn-svelte": "^1.7.0",
191
+ "svelte-codemirror-editor": "^2.1.0",
192
+ "svelte-jsoneditor": "^3.13.0",
133
193
  "tailwindcss": "4.3.3",
134
194
  "vitest": "^4.1.11"
135
195
  },