sv5ui 1.7.0 → 2.0.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 (85) hide show
  1. package/dist/Alert/alert.types.d.ts +1 -1
  2. package/dist/AvatarGroup/AvatarGroup.svelte +5 -3
  3. package/dist/Banner/Banner.svelte +162 -0
  4. package/dist/Banner/Banner.svelte.d.ts +5 -0
  5. package/dist/Banner/banner.types.d.ts +148 -0
  6. package/dist/Banner/banner.types.js +1 -0
  7. package/dist/Banner/banner.variants.d.ts +293 -0
  8. package/dist/Banner/banner.variants.js +86 -0
  9. package/dist/Banner/index.d.ts +2 -0
  10. package/dist/Banner/index.js +1 -0
  11. package/dist/Button/Button.svelte +7 -6
  12. package/dist/Button/button.types.d.ts +3 -3
  13. package/dist/Collapsible/collapsible.types.d.ts +4 -2
  14. package/dist/Drawer/Drawer.svelte +3 -1
  15. package/dist/DropdownMenu/DropdownMenu.svelte +1 -3
  16. package/dist/DropdownMenu/DropdownMenuTriggerTestWrapper.svelte +12 -0
  17. package/dist/DropdownMenu/DropdownMenuTriggerTestWrapper.svelte.d.ts +7 -0
  18. package/dist/DropdownMenu/dropdown-menu.types.d.ts +17 -9
  19. package/dist/Editor/Editor.svelte +738 -0
  20. package/dist/Editor/Editor.svelte.d.ts +6 -0
  21. package/dist/Editor/EditorUrlPrompt.svelte +111 -0
  22. package/dist/Editor/EditorUrlPrompt.svelte.d.ts +15 -0
  23. package/dist/Editor/SlashPopup.svelte +67 -0
  24. package/dist/Editor/SlashPopup.svelte.d.ts +9 -0
  25. package/dist/Editor/editor.extensions.d.ts +23 -0
  26. package/dist/Editor/editor.extensions.js +123 -0
  27. package/dist/Editor/editor.schemas.d.ts +4 -0
  28. package/dist/Editor/editor.schemas.js +3 -0
  29. package/dist/Editor/editor.slash.svelte.d.ts +34 -0
  30. package/dist/Editor/editor.slash.svelte.js +273 -0
  31. package/dist/Editor/editor.suggestion.d.ts +7 -0
  32. package/dist/Editor/editor.suggestion.js +142 -0
  33. package/dist/Editor/editor.toolbar.d.ts +11 -0
  34. package/dist/Editor/editor.toolbar.js +212 -0
  35. package/dist/Editor/editor.types.d.ts +347 -0
  36. package/dist/Editor/editor.types.js +1 -0
  37. package/dist/Editor/editor.variants.d.ts +308 -0
  38. package/dist/Editor/editor.variants.js +150 -0
  39. package/dist/Editor/index.d.ts +53 -0
  40. package/dist/Editor/index.js +52 -0
  41. package/dist/Icon/icon.types.d.ts +4 -1
  42. package/dist/Input/Input.svelte +22 -16
  43. package/dist/Input/input.variants.d.ts +0 -15
  44. package/dist/Input/input.variants.js +1 -20
  45. package/dist/Link/Link.svelte +4 -3
  46. package/dist/Link/link.types.d.ts +2 -2
  47. package/dist/Pagination/Pagination.svelte +7 -1
  48. package/dist/Pagination/pagination.types.d.ts +4 -1
  49. package/dist/Pagination/pagination.variants.d.ts +0 -72
  50. package/dist/Pagination/pagination.variants.js +6 -30
  51. package/dist/Select/Select.svelte +3 -1
  52. package/dist/Select/select.types.d.ts +5 -9
  53. package/dist/SelectMenu/SelectMenu.svelte +6 -5
  54. package/dist/SelectMenu/SelectMenuFormFieldTestWrapper.svelte +11 -0
  55. package/dist/SelectMenu/SelectMenuFormFieldTestWrapper.svelte.d.ts +7 -0
  56. package/dist/SelectMenu/select-menu.types.d.ts +5 -2
  57. package/dist/SelectMenu/select-menu.variants.d.ts +12 -2
  58. package/dist/SelectMenu/select-menu.variants.js +10 -1
  59. package/dist/Separator/Separator.svelte +9 -2
  60. package/dist/Separator/separator.types.d.ts +5 -0
  61. package/dist/Separator/separator.variants.d.ts +25 -0
  62. package/dist/Separator/separator.variants.js +7 -1
  63. package/dist/Stepper/Stepper.svelte +292 -0
  64. package/dist/Stepper/Stepper.svelte.d.ts +5 -0
  65. package/dist/Stepper/index.d.ts +2 -0
  66. package/dist/Stepper/index.js +1 -0
  67. package/dist/Stepper/stepper.types.d.ts +223 -0
  68. package/dist/Stepper/stepper.types.js +1 -0
  69. package/dist/Stepper/stepper.variants.d.ts +428 -0
  70. package/dist/Stepper/stepper.variants.js +204 -0
  71. package/dist/Tabs/Tabs.svelte +4 -2
  72. package/dist/Tabs/tabs.types.d.ts +4 -6
  73. package/dist/hooks/HookContextProbe.svelte +7 -0
  74. package/dist/hooks/HookContextProbe.svelte.d.ts +18 -0
  75. package/dist/hooks/HookContextProvider.svelte +9 -0
  76. package/dist/hooks/HookContextProvider.svelte.d.ts +18 -0
  77. package/dist/hooks/HookEmitProbe.svelte +14 -0
  78. package/dist/hooks/HookEmitProbe.svelte.d.ts +18 -0
  79. package/dist/hooks/index.d.ts +1 -1
  80. package/dist/hooks/index.js +1 -1
  81. package/dist/hooks/useFormField.svelte.d.ts +0 -31
  82. package/dist/hooks/useFormField.svelte.js +0 -21
  83. package/dist/index.d.ts +2 -0
  84. package/dist/index.js +2 -0
  85. package/package.json +97 -1
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const HookContextProbe: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type HookContextProbe = InstanceType<typeof HookContextProbe>;
18
+ export default HookContextProbe;
@@ -0,0 +1,9 @@
1
+ <script lang="ts">
2
+ import { setContext } from 'svelte'
3
+ import { FORM_FIELD_CONTEXT_KEY } from './useFormField.svelte.js'
4
+ import HookContextProbe from './HookContextProbe.svelte'
5
+
6
+ setContext(FORM_FIELD_CONTEXT_KEY, { name: 'email', size: 'md', ariaId: 'ff' })
7
+ </script>
8
+
9
+ <HookContextProbe />
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const HookContextProvider: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type HookContextProvider = InstanceType<typeof HookContextProvider>;
18
+ export default HookContextProvider;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">
2
+ import { useFormFieldEmit } from './useFormField.svelte.js'
3
+
4
+ const emit = useFormFieldEmit()
5
+
6
+ function fireAll() {
7
+ emit.onBlur()
8
+ emit.onFocus()
9
+ emit.onChange()
10
+ emit.onInput()
11
+ }
12
+ </script>
13
+
14
+ <button data-testid="fire" onclick={fireAll}>fire</button>
@@ -0,0 +1,18 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const HookEmitProbe: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type HookEmitProbe = InstanceType<typeof HookEmitProbe>;
18
+ export default HookEmitProbe;
@@ -2,7 +2,7 @@ export { useMediaQuery } from './useMediaQuery.svelte.js';
2
2
  export type { UseMediaQueryOptions } from './useMediaQuery.svelte.js';
3
3
  export { useClipboard } from './useClipboard.svelte.js';
4
4
  export type { UseClipboardOptions } from './useClipboard.svelte.js';
5
- export { useFormField, useFormFieldEmit, wireFormEvents, FORM_FIELD_CONTEXT_KEY } from './useFormField.svelte.js';
5
+ export { useFormField, useFormFieldEmit, FORM_FIELD_CONTEXT_KEY } from './useFormField.svelte.js';
6
6
  export type { FormFieldContext } from './useFormField.svelte.js';
7
7
  export { useClickOutside } from './useClickOutside.svelte.js';
8
8
  export type { UseClickOutsideOptions } from './useClickOutside.svelte.js';
@@ -1,6 +1,6 @@
1
1
  export { useMediaQuery } from './useMediaQuery.svelte.js';
2
2
  export { useClipboard } from './useClipboard.svelte.js';
3
- export { useFormField, useFormFieldEmit, wireFormEvents, FORM_FIELD_CONTEXT_KEY } from './useFormField.svelte.js';
3
+ export { useFormField, useFormFieldEmit, FORM_FIELD_CONTEXT_KEY } from './useFormField.svelte.js';
4
4
  export { useClickOutside } from './useClickOutside.svelte.js';
5
5
  export { useInfiniteScroll } from './useInfiniteScroll.svelte.js';
6
6
  export { useEscapeKeydown } from './useEscapeKeydown.svelte.js';
@@ -52,34 +52,3 @@ export declare function useFormFieldEmit(): {
52
52
  onChange(): void;
53
53
  onInput(): void;
54
54
  };
55
- /**
56
- * Wires native DOM input events to the parent Form's event emitters while
57
- * preserving any user-supplied handlers. Reduces boilerplate in wrapper
58
- * components (Input, Textarea, etc.) from ~20 lines of handler definitions
59
- * to 4 lines:
60
- *
61
- * ```svelte
62
- * <script>
63
- * const events = wireFormEvents({ onblur, oninput, onchange, onfocus })
64
- * </script>
65
- *
66
- * <input {...events} />
67
- * ```
68
- *
69
- * Each handler fires the Form emitter first, then calls the user handler
70
- * (if any) with the original event.
71
- */
72
- type InputEventHandler<E extends Event = Event> = (event: E) => void;
73
- type FocusEventHandler = InputEventHandler<FocusEvent>;
74
- export declare function wireFormEvents(userHandlers: {
75
- onblur?: FocusEventHandler | null;
76
- oninput?: InputEventHandler | null;
77
- onchange?: InputEventHandler | null;
78
- onfocus?: FocusEventHandler | null;
79
- }): {
80
- onblur(event: FocusEvent): void;
81
- oninput(event: Event): void;
82
- onchange(event: Event): void;
83
- onfocus(event: FocusEvent): void;
84
- };
85
- export {};
@@ -63,24 +63,3 @@ export function useFormFieldEmit() {
63
63
  }
64
64
  };
65
65
  }
66
- export function wireFormEvents(userHandlers) {
67
- const emit = useFormFieldEmit();
68
- return {
69
- onblur(event) {
70
- emit.onBlur();
71
- userHandlers.onblur?.(event);
72
- },
73
- oninput(event) {
74
- emit.onInput();
75
- userHandlers.oninput?.(event);
76
- },
77
- onchange(event) {
78
- emit.onChange();
79
- userHandlers.onchange?.(event);
80
- },
81
- onfocus(event) {
82
- emit.onFocus();
83
- userHandlers.onfocus?.(event);
84
- }
85
- };
86
- }
package/dist/index.d.ts CHANGED
@@ -47,6 +47,8 @@ export * from './ThemeModeButton/index.js';
47
47
  export * from './Table/index.js';
48
48
  export * from './Toast/index.js';
49
49
  export * from './Carousel/index.js';
50
+ export * from './Banner/index.js';
51
+ export * from './Stepper/index.js';
50
52
  export * from './hooks/index.js';
51
53
  export { defineConfig } from './config.js';
52
54
  export type { UIConfig } from './config.js';
package/dist/index.js CHANGED
@@ -48,6 +48,8 @@ export * from './ThemeModeButton/index.js';
48
48
  export * from './Table/index.js';
49
49
  export * from './Toast/index.js';
50
50
  export * from './Carousel/index.js';
51
+ export * from './Banner/index.js';
52
+ export * from './Stepper/index.js';
51
53
  // Composables
52
54
  export * from './hooks/index.js';
53
55
  // Configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sv5ui",
3
- "version": "1.7.0",
3
+ "version": "2.0.0",
4
4
  "description": "A modern Svelte 5 UI component library with Tailwind CSS",
5
5
  "author": "ndlabdev",
6
6
  "license": "MIT",
@@ -42,24 +42,101 @@
42
42
  "svelte": "./dist/index.js",
43
43
  "default": "./dist/index.js"
44
44
  },
45
+ "./editor": {
46
+ "types": "./dist/Editor/index.d.ts",
47
+ "svelte": "./dist/Editor/index.js",
48
+ "default": "./dist/Editor/index.js"
49
+ },
45
50
  "./theme.css": {
46
51
  "import": "./dist/theme.css",
47
52
  "default": "./dist/theme.css"
48
53
  }
49
54
  },
50
55
  "peerDependencies": {
56
+ "@tiptap/core": "^3.0.0",
57
+ "@tiptap/extension-bubble-menu": "^3.0.0",
58
+ "@tiptap/extension-character-count": "^3.0.0",
59
+ "@tiptap/extension-drag-handle": "^3.0.0",
60
+ "@tiptap/extension-image": "^3.0.0",
61
+ "@tiptap/extension-mention": "^3.0.0",
62
+ "@tiptap/extension-placeholder": "^3.0.0",
63
+ "@tiptap/extension-table": "^3.0.0",
64
+ "@tiptap/extension-table-cell": "^3.0.0",
65
+ "@tiptap/extension-table-header": "^3.0.0",
66
+ "@tiptap/extension-table-row": "^3.0.0",
67
+ "@tiptap/extension-text-align": "^3.0.0",
68
+ "@tiptap/extension-typography": "^3.0.0",
69
+ "@tiptap/extension-youtube": "^3.0.0",
70
+ "@tiptap/pm": "^3.0.0",
71
+ "@tiptap/starter-kit": "^3.0.0",
72
+ "@tiptap/suggestion": "^3.0.0",
51
73
  "joi": "^17.0.0 || ^18.0.0",
52
74
  "mode-watcher": "^1.0.0",
53
75
  "svelte": "^5.0.0",
54
76
  "tailwindcss": "^4.0.0",
77
+ "tiptap-markdown": "^0.9.0",
55
78
  "valibot": "^1.0.0",
56
79
  "yup": "^1.7.0",
57
80
  "zod": "^3.24.0 || ^4.0.0"
58
81
  },
59
82
  "peerDependenciesMeta": {
83
+ "@tiptap/core": {
84
+ "optional": true
85
+ },
86
+ "@tiptap/extension-bubble-menu": {
87
+ "optional": true
88
+ },
89
+ "@tiptap/extension-character-count": {
90
+ "optional": true
91
+ },
92
+ "@tiptap/extension-drag-handle": {
93
+ "optional": true
94
+ },
95
+ "@tiptap/extension-image": {
96
+ "optional": true
97
+ },
98
+ "@tiptap/extension-mention": {
99
+ "optional": true
100
+ },
101
+ "@tiptap/extension-placeholder": {
102
+ "optional": true
103
+ },
104
+ "@tiptap/extension-table": {
105
+ "optional": true
106
+ },
107
+ "@tiptap/extension-table-cell": {
108
+ "optional": true
109
+ },
110
+ "@tiptap/extension-table-header": {
111
+ "optional": true
112
+ },
113
+ "@tiptap/extension-table-row": {
114
+ "optional": true
115
+ },
116
+ "@tiptap/extension-text-align": {
117
+ "optional": true
118
+ },
119
+ "@tiptap/extension-typography": {
120
+ "optional": true
121
+ },
122
+ "@tiptap/extension-youtube": {
123
+ "optional": true
124
+ },
125
+ "@tiptap/pm": {
126
+ "optional": true
127
+ },
128
+ "@tiptap/starter-kit": {
129
+ "optional": true
130
+ },
131
+ "@tiptap/suggestion": {
132
+ "optional": true
133
+ },
60
134
  "joi": {
61
135
  "optional": true
62
136
  },
137
+ "tiptap-markdown": {
138
+ "optional": true
139
+ },
63
140
  "valibot": {
64
141
  "optional": true
65
142
  },
@@ -78,6 +155,23 @@
78
155
  "@sveltejs/package": "^2.5.7",
79
156
  "@sveltejs/vite-plugin-svelte": "^6.2.1",
80
157
  "@tailwindcss/vite": "^4.1.17",
158
+ "@tiptap/core": "^3.23.6",
159
+ "@tiptap/extension-bubble-menu": "^3.23.6",
160
+ "@tiptap/extension-character-count": "^3.23.6",
161
+ "@tiptap/extension-drag-handle": "^3.23.6",
162
+ "@tiptap/extension-image": "^3.23.6",
163
+ "@tiptap/extension-mention": "^3.23.6",
164
+ "@tiptap/extension-placeholder": "^3.23.6",
165
+ "@tiptap/extension-table": "^3.23.6",
166
+ "@tiptap/extension-table-cell": "^3.23.6",
167
+ "@tiptap/extension-table-header": "^3.23.6",
168
+ "@tiptap/extension-table-row": "^3.23.6",
169
+ "@tiptap/extension-text-align": "^3.23.6",
170
+ "@tiptap/extension-typography": "^3.23.6",
171
+ "@tiptap/extension-youtube": "^3.23.6",
172
+ "@tiptap/pm": "^3.23.6",
173
+ "@tiptap/starter-kit": "^3.23.6",
174
+ "@tiptap/suggestion": "^3.23.6",
81
175
  "@types/node": "^22",
82
176
  "@vitest/browser-playwright": "^4.0.15",
83
177
  "eslint": "^9.39.1",
@@ -93,6 +187,7 @@
93
187
  "svelte": "^5.45.6",
94
188
  "svelte-check": "^4.3.4",
95
189
  "tailwindcss": "^4.1.17",
190
+ "tiptap-markdown": "^0.9.0",
96
191
  "typescript": "^5.9.3",
97
192
  "typescript-eslint": "^8.48.1",
98
193
  "valibot": "^1.3.1",
@@ -118,6 +213,7 @@
118
213
  "accessible"
119
214
  ],
120
215
  "dependencies": {
216
+ "@floating-ui/dom": "^1.7.4",
121
217
  "@iconify/svelte": "^5.2.1",
122
218
  "@internationalized/date": "^3.11.0",
123
219
  "@standard-schema/spec": "^1.1.0",