lutra 0.0.33 → 0.1.4

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 (274) hide show
  1. package/README.md +4 -24
  2. package/dist/components/AspectRatio.svelte +26 -0
  3. package/dist/components/AspectRatio.svelte.d.ts +8 -0
  4. package/dist/components/Avatar.svelte +105 -0
  5. package/dist/components/Avatar.svelte.d.ts +14 -0
  6. package/dist/{display → components}/Close.svelte +25 -7
  7. package/dist/components/Close.svelte.d.ts +7 -0
  8. package/dist/components/ContextTip.svelte +41 -0
  9. package/dist/components/ContextTip.svelte.d.ts +7 -0
  10. package/dist/components/Dialog.svelte +78 -0
  11. package/dist/components/Dialog.svelte.d.ts +14 -0
  12. package/dist/components/Icon.svelte +62 -0
  13. package/dist/components/Icon.svelte.d.ts +8 -0
  14. package/dist/{display → components}/IconButton.svelte +43 -14
  15. package/dist/components/IconButton.svelte.d.ts +16 -0
  16. package/dist/components/Image.svelte +172 -0
  17. package/dist/components/Image.svelte.d.ts +56 -0
  18. package/dist/{display → components}/Indicator.svelte +44 -9
  19. package/dist/components/Indicator.svelte.d.ts +12 -0
  20. package/dist/{display → components}/Inset.svelte +8 -3
  21. package/dist/components/Inset.svelte.d.ts +7 -0
  22. package/dist/components/Layout.svelte +33 -0
  23. package/dist/components/Layout.svelte.d.ts +11 -0
  24. package/dist/components/MenuDropdown.svelte +195 -0
  25. package/dist/components/MenuDropdown.svelte.d.ts +16 -0
  26. package/dist/{nav → components}/MenuItem.svelte +46 -38
  27. package/dist/components/MenuItem.svelte.d.ts +11 -0
  28. package/dist/components/MenuItemContent.svelte +25 -0
  29. package/dist/components/MenuItemContent.svelte.d.ts +10 -0
  30. package/dist/{nav → components}/MenuTypes.d.ts +19 -5
  31. package/dist/components/Modal.svelte +149 -0
  32. package/dist/components/Modal.svelte.d.ts +16 -0
  33. package/dist/{display → components}/Notification.svelte +33 -22
  34. package/dist/components/Notification.svelte.d.ts +12 -0
  35. package/dist/components/Overlay.svelte +31 -0
  36. package/dist/components/Overlay.svelte.d.ts +14 -0
  37. package/dist/{layout → components}/OverlayContainer.svelte +6 -3
  38. package/dist/{layout → components}/OverlayContainer.svelte.d.ts +4 -1
  39. package/dist/components/OverlayLayer.svelte +168 -0
  40. package/dist/components/OverlayLayer.svelte.d.ts +8 -0
  41. package/dist/components/PageContent.svelte +108 -0
  42. package/dist/components/PageContent.svelte.d.ts +38 -0
  43. package/dist/components/TabbedContent.svelte +74 -0
  44. package/dist/components/TabbedContent.svelte.d.ts +11 -0
  45. package/dist/components/TabbedContentItem.svelte +33 -0
  46. package/dist/components/TabbedContentItem.svelte.d.ts +10 -0
  47. package/dist/components/Table.svelte +41 -0
  48. package/dist/components/Table.svelte.d.ts +13 -0
  49. package/dist/{nav → components}/Tabs.svelte +99 -41
  50. package/dist/components/Tabs.svelte.d.ts +20 -0
  51. package/dist/components/Tag.svelte +120 -0
  52. package/dist/components/Tag.svelte.d.ts +21 -0
  53. package/dist/components/Theme.svelte +105 -0
  54. package/dist/components/Theme.svelte.d.ts +17 -0
  55. package/dist/{display → components}/Tooltip.svelte +41 -16
  56. package/dist/components/Tooltip.svelte.d.ts +12 -0
  57. package/dist/components/UIContent.svelte +19 -0
  58. package/dist/components/UIContent.svelte.d.ts +7 -0
  59. package/dist/components/index.d.ts +28 -0
  60. package/dist/components/index.js +29 -0
  61. package/dist/{display → components}/notifications.svelte.d.ts +1 -1
  62. package/dist/{display → components}/notifications.svelte.js +3 -4
  63. package/dist/{layout → components}/overlays.svelte.d.ts +4 -2
  64. package/dist/config.d.ts +30 -0
  65. package/dist/config.js +18 -0
  66. package/dist/css/1-props.css +440 -0
  67. package/dist/css/2-base.css +343 -0
  68. package/dist/css/3-typo.css +106 -0
  69. package/dist/css/4-layout.css +368 -0
  70. package/dist/css/5-media.css +116 -0
  71. package/dist/css/lutra.css +7 -0
  72. package/dist/css/themes/DefaultTheme.css +209 -0
  73. package/dist/form/Button.svelte +35 -16
  74. package/dist/form/Button.svelte.d.ts +8 -19
  75. package/dist/form/Datepicker.svelte +311 -0
  76. package/dist/form/Datepicker.svelte.d.ts +9 -0
  77. package/dist/form/FieldContent.svelte +69 -44
  78. package/dist/form/FieldContent.svelte.d.ts +7 -17
  79. package/dist/form/FieldError.svelte +16 -6
  80. package/dist/form/FieldError.svelte.d.ts +4 -15
  81. package/dist/form/Fieldset.svelte +48 -13
  82. package/dist/form/Fieldset.svelte.d.ts +5 -16
  83. package/dist/form/Form.svelte +158 -74
  84. package/dist/form/Form.svelte.d.ts +17 -17
  85. package/dist/form/{FieldActions.svelte → FormActions.svelte} +29 -17
  86. package/dist/form/FormActions.svelte.d.ts +9 -0
  87. package/dist/form/FormSection.svelte +96 -0
  88. package/dist/form/FormSection.svelte.d.ts +9 -0
  89. package/dist/form/ImageUpload.svelte +134 -94
  90. package/dist/form/ImageUpload.svelte.d.ts +5 -16
  91. package/dist/form/Input.svelte +254 -136
  92. package/dist/form/Input.svelte.d.ts +12 -21
  93. package/dist/form/InputLength.svelte +15 -5
  94. package/dist/form/InputLength.svelte.d.ts +4 -15
  95. package/dist/form/Label.svelte +55 -11
  96. package/dist/form/Label.svelte.d.ts +6 -15
  97. package/dist/form/LogoUpload.svelte +36 -21
  98. package/dist/form/LogoUpload.svelte.d.ts +4 -15
  99. package/dist/form/Select.svelte +100 -50
  100. package/dist/form/Select.svelte.d.ts +5 -16
  101. package/dist/form/Textarea.svelte +200 -98
  102. package/dist/form/Textarea.svelte.d.ts +11 -24
  103. package/dist/form/Toggle.svelte +3 -1
  104. package/dist/form/Toggle.svelte.d.ts +4 -1
  105. package/dist/form/client.svelte.d.ts +1 -0
  106. package/dist/form/client.svelte.js +6 -2
  107. package/dist/form/form.d.ts +10 -9
  108. package/dist/form/form.js +37 -32
  109. package/dist/form/index.d.ts +3 -4
  110. package/dist/form/index.js +3 -4
  111. package/dist/form/types.d.ts +9 -16
  112. package/dist/icons/IconAlert.svelte.d.ts +4 -1
  113. package/dist/icons/IconCopy.svelte.d.ts +4 -1
  114. package/dist/icons/IconDone.svelte.d.ts +4 -1
  115. package/dist/icons/IconError.svelte.d.ts +4 -1
  116. package/dist/icons/IconHelp.svelte.d.ts +4 -1
  117. package/dist/icons/IconHide.svelte.d.ts +4 -1
  118. package/dist/icons/IconInfo.svelte.d.ts +4 -1
  119. package/dist/icons/IconLink.svelte.d.ts +4 -1
  120. package/dist/icons/IconMenuBurger.svelte.d.ts +4 -1
  121. package/dist/icons/IconMenuDots.svelte.d.ts +4 -1
  122. package/dist/icons/IconSearch.svelte.d.ts +4 -1
  123. package/dist/icons/IconShow.svelte.d.ts +4 -1
  124. package/dist/icons/IconSuccess.svelte.d.ts +4 -1
  125. package/dist/icons/IconWarning.svelte.d.ts +4 -1
  126. package/dist/index.d.ts +3 -1
  127. package/dist/index.js +3 -2
  128. package/dist/types.d.ts +39 -0
  129. package/dist/types.js +25 -0
  130. package/dist/util/StringOrComponent.svelte +20 -0
  131. package/dist/util/StringOrComponent.svelte.d.ts +8 -0
  132. package/dist/util/StringOrSnippet.svelte +16 -0
  133. package/dist/util/StringOrSnippet.svelte.d.ts +8 -0
  134. package/dist/{utils → util}/dom.js +1 -2
  135. package/dist/util/locale.d.ts +1 -0
  136. package/dist/util/locale.js +47 -0
  137. package/dist/util/settings.d.ts +4 -0
  138. package/package.json +35 -79
  139. package/dist/color.css +0 -0
  140. package/dist/display/Avatar.svelte +0 -61
  141. package/dist/display/Avatar.svelte.d.ts +0 -19
  142. package/dist/display/Badge.svelte +0 -91
  143. package/dist/display/Badge.svelte.d.ts +0 -30
  144. package/dist/display/Callout.svelte +0 -109
  145. package/dist/display/Callout.svelte.d.ts +0 -28
  146. package/dist/display/Close.svelte.d.ts +0 -18
  147. package/dist/display/Code.svelte +0 -190
  148. package/dist/display/Code.svelte.d.ts +0 -32
  149. package/dist/display/ContextTip.svelte +0 -23
  150. package/dist/display/ContextTip.svelte.d.ts +0 -18
  151. package/dist/display/DataList.svelte +0 -16
  152. package/dist/display/DataList.svelte.d.ts +0 -21
  153. package/dist/display/Details.svelte +0 -49
  154. package/dist/display/Details.svelte.d.ts +0 -27
  155. package/dist/display/Hero.svelte +0 -50
  156. package/dist/display/Hero.svelte.d.ts +0 -26
  157. package/dist/display/Icon.svelte +0 -39
  158. package/dist/display/Icon.svelte.d.ts +0 -19
  159. package/dist/display/IconButton.svelte.d.ts +0 -27
  160. package/dist/display/Image.svelte +0 -91
  161. package/dist/display/Image.svelte.d.ts +0 -26
  162. package/dist/display/Indicator.svelte.d.ts +0 -23
  163. package/dist/display/Inset.svelte.d.ts +0 -18
  164. package/dist/display/LineChart.svelte +0 -385
  165. package/dist/display/LineChart.svelte.d.ts +0 -24
  166. package/dist/display/LoadingIndicator.svelte +0 -33
  167. package/dist/display/LoadingIndicator.svelte.d.ts +0 -15
  168. package/dist/display/Modal.svelte +0 -116
  169. package/dist/display/Modal.svelte.d.ts +0 -27
  170. package/dist/display/Notification.svelte.d.ts +0 -23
  171. package/dist/display/Panel.svelte +0 -23
  172. package/dist/display/Panel.svelte.d.ts +0 -19
  173. package/dist/display/Popup.svelte +0 -111
  174. package/dist/display/Popup.svelte.d.ts +0 -25
  175. package/dist/display/Stat.svelte +0 -81
  176. package/dist/display/Stat.svelte.d.ts +0 -30
  177. package/dist/display/Table.svelte +0 -28
  178. package/dist/display/Table.svelte.d.ts +0 -24
  179. package/dist/display/TablePaginator.svelte +0 -51
  180. package/dist/display/TablePaginator.svelte.d.ts +0 -21
  181. package/dist/display/Tag.svelte +0 -90
  182. package/dist/display/Tag.svelte.d.ts +0 -32
  183. package/dist/display/Tooltip.svelte.d.ts +0 -23
  184. package/dist/display/chart.d.ts +0 -78
  185. package/dist/display/chart.js +0 -212
  186. package/dist/display/index.d.ts +0 -24
  187. package/dist/display/index.js +0 -24
  188. package/dist/form/FieldActions.svelte.d.ts +0 -20
  189. package/dist/form/FieldContainer.svelte +0 -37
  190. package/dist/form/FieldContainer.svelte.d.ts +0 -19
  191. package/dist/form/FieldSection.svelte +0 -86
  192. package/dist/form/FieldSection.svelte.d.ts +0 -20
  193. package/dist/layout/Layout.svelte +0 -47
  194. package/dist/layout/Layout.svelte.d.ts +0 -22
  195. package/dist/layout/LayoutFooter.svelte +0 -21
  196. package/dist/layout/LayoutFooter.svelte.d.ts +0 -18
  197. package/dist/layout/LayoutGrid.svelte +0 -51
  198. package/dist/layout/LayoutGrid.svelte.d.ts +0 -27
  199. package/dist/layout/LayoutHeader.svelte +0 -97
  200. package/dist/layout/LayoutHeader.svelte.d.ts +0 -34
  201. package/dist/layout/LayoutSideMenu.svelte +0 -55
  202. package/dist/layout/LayoutSideMenu.svelte.d.ts +0 -21
  203. package/dist/layout/LayoutTypes.d.ts +0 -15
  204. package/dist/layout/LayoutTypes.js +0 -9
  205. package/dist/layout/Overlay.svelte +0 -20
  206. package/dist/layout/Overlay.svelte.d.ts +0 -25
  207. package/dist/layout/OverlayLayer.svelte +0 -140
  208. package/dist/layout/OverlayLayer.svelte.d.ts +0 -19
  209. package/dist/layout/PageContent.svelte +0 -82
  210. package/dist/layout/PageContent.svelte.d.ts +0 -25
  211. package/dist/layout/Theme.svelte +0 -243
  212. package/dist/layout/Theme.svelte.d.ts +0 -19
  213. package/dist/layout/UIContent.svelte +0 -15
  214. package/dist/layout/UIContent.svelte.d.ts +0 -18
  215. package/dist/layout/index.d.ts +0 -11
  216. package/dist/layout/index.js +0 -11
  217. package/dist/nav/Breadcrumb.svelte +0 -82
  218. package/dist/nav/Breadcrumb.svelte.d.ts +0 -28
  219. package/dist/nav/Menu.svelte +0 -170
  220. package/dist/nav/Menu.svelte.d.ts +0 -27
  221. package/dist/nav/MenuItem.svelte.d.ts +0 -22
  222. package/dist/nav/NavMenu.svelte +0 -181
  223. package/dist/nav/NavMenu.svelte.d.ts +0 -19
  224. package/dist/nav/TabbedContent.svelte +0 -43
  225. package/dist/nav/TabbedContent.svelte.d.ts +0 -23
  226. package/dist/nav/Tabs.svelte.d.ts +0 -25
  227. package/dist/nav/index.d.ts +0 -7
  228. package/dist/nav/index.js +0 -6
  229. package/dist/style.css +0 -950
  230. package/dist/typo/Clamp.svelte +0 -25
  231. package/dist/typo/Clamp.svelte.d.ts +0 -24
  232. package/dist/typo/H.svelte +0 -52
  233. package/dist/typo/H.svelte.d.ts +0 -28
  234. package/dist/typo/H1.svelte +0 -14
  235. package/dist/typo/H1.svelte.d.ts +0 -26
  236. package/dist/typo/H2.svelte +0 -14
  237. package/dist/typo/H2.svelte.d.ts +0 -26
  238. package/dist/typo/H3.svelte +0 -14
  239. package/dist/typo/H3.svelte.d.ts +0 -26
  240. package/dist/typo/H4.svelte +0 -14
  241. package/dist/typo/H4.svelte.d.ts +0 -26
  242. package/dist/typo/H5.svelte +0 -14
  243. package/dist/typo/H5.svelte.d.ts +0 -26
  244. package/dist/typo/H6.svelte +0 -14
  245. package/dist/typo/H6.svelte.d.ts +0 -26
  246. package/dist/typo/P.svelte +0 -34
  247. package/dist/typo/P.svelte.d.ts +0 -26
  248. package/dist/typo/index.d.ts +0 -9
  249. package/dist/typo/index.js +0 -9
  250. package/dist/utils/StringOrComponent.svelte +0 -14
  251. package/dist/utils/StringOrComponent.svelte.d.ts +0 -19
  252. package/dist/utils/StringOrSnippet.svelte +0 -11
  253. package/dist/utils/StringOrSnippet.svelte.d.ts +0 -19
  254. package/dist/utils/defaults.d.ts +0 -4
  255. package/dist/utils/hooks.server.d.ts +0 -2
  256. package/dist/utils/hooks.server.js +0 -16
  257. package/dist/utils/id.d.ts +0 -1
  258. package/dist/utils/id.js +0 -3
  259. package/dist/utils/index.d.ts +0 -9
  260. package/dist/utils/index.js +0 -6
  261. package/dist/utils/isSnippet.d.ts +0 -3
  262. package/dist/utils/isSnippet.js +0 -11
  263. /package/dist/{nav → components}/MenuTypes.js +0 -0
  264. /package/dist/{layout → components}/overlays.svelte.js +0 -0
  265. /package/dist/{utils → util}/attr.d.ts +0 -0
  266. /package/dist/{utils → util}/attr.js +0 -0
  267. /package/dist/{utils → util}/color.d.ts +0 -0
  268. /package/dist/{utils → util}/color.js +0 -0
  269. /package/dist/{utils → util}/dom.d.ts +0 -0
  270. /package/dist/{utils → util}/keyboard.svelte.d.ts +0 -0
  271. /package/dist/{utils → util}/keyboard.svelte.js +0 -0
  272. /package/dist/{utils/defaults.js → util/settings.js} +0 -0
  273. /package/dist/{utils → util}/transitions.d.ts +0 -0
  274. /package/dist/{utils → util}/transitions.js +0 -0
@@ -1,28 +1,16 @@
1
1
  import { type Snippet } from "svelte";
2
- import type { Autocomplete } from "../form/types.js";
3
- 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> {
4
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
5
- $$bindings?: Bindings;
6
- } & Exports;
7
- (internal: unknown, props: Props & {
8
- $$events?: Events;
9
- $$slots?: Slots;
10
- }): Exports;
11
- z_$$bindings?: Bindings;
12
- }
13
- declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
2
+ import type { Autocomplete } from "./types.js";
3
+ type $$ComponentProps = {
14
4
  /** Whether the input should be autofocused. */
15
5
  autofocus?: boolean;
16
6
  /** Whether the input should be autocapitalized. */
17
- autocapitalize?: boolean | "off" | "none" | "on" | "sentences" | "words" | "characters";
7
+ autocapitalize?: boolean | 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
18
8
  /** Specifies whether autocomplete is enabled for the input. */
19
9
  autocomplete?: Autocomplete;
20
- /** Whether the input should be autocorrected. (Safari only) */
21
- autocorrect?: boolean;
22
10
  /** Whether the input should resize automatically. */
23
11
  autoresize?: boolean;
24
12
  /** A hint to the browser for which capture method to use. */
25
- capture?: "user" | "environment";
13
+ capture?: 'user' | 'environment';
26
14
  /** Whether the input should be checked. */
27
15
  checked?: boolean;
28
16
  /** Whether the input should be contained. */
@@ -36,7 +24,7 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
36
24
  /** Whether the input should be disabled. */
37
25
  disabled?: boolean;
38
26
  /** A hint to the browser for which enter key to display for the input. */
39
- enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
27
+ enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
40
28
  /** The height of the input element. Valid for image inputs. */
41
29
  height?: number;
42
30
  /** Help text to display below the input. */
@@ -46,7 +34,7 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
46
34
  /** Whether the input should be indeterminate. */
47
35
  indeterminate?: boolean;
48
36
  /** A hint to the browser for which keyboard to display. This is only used for type="text" inputs. Strongly consider using type="email" or type="url" etc. instead */
49
- inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
37
+ inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
50
38
  /** The label for the input */
51
39
  label?: string | Snippet;
52
40
  /** Context tooltip for a label. Renders with a questionmark using ContextTip. */
@@ -86,9 +74,9 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
86
74
  /** Whether the input should be required. */
87
75
  required?: boolean;
88
76
  /** Whether the textarea is resizable. */
89
- resize?: boolean | "both" | "horizontal" | "vertical" | "none";
77
+ resize?: boolean | 'both' | 'horizontal' | 'vertical' | 'none';
90
78
  /** The shape of the input element. */
91
- shape?: "default" | "rounded" | "pill" | "circle";
79
+ shape?: 'default' | 'rounded' | 'pill' | 'circle';
92
80
  /** Spellcheck the input. */
93
81
  spellcheck?: boolean;
94
82
  /** A number that specifies the granularity that the value must adhere to. Valid for date, month, week, time, datetime-local, number, and range. */
@@ -101,8 +89,7 @@ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
101
89
  title?: string;
102
90
  /** The value of the input element. */
103
91
  value?: string | null;
104
- }, {
105
- [evt: string]: CustomEvent<any>;
106
- }, {}, {}, "value" | "id">;
107
- type Textarea = InstanceType<typeof Textarea>;
92
+ };
93
+ declare const Textarea: import("svelte").Component<$$ComponentProps, {}, "id" | "value">;
94
+ type Textarea = ReturnType<typeof Textarea>;
108
95
  export default Textarea;
@@ -1,2 +1,4 @@
1
- <script lang="ts"></script>
1
+ <script lang="ts">
2
+
3
+ </script>
2
4
 
@@ -5,7 +5,10 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
5
5
  (internal: unknown, props: {
6
6
  $$events?: Events;
7
7
  $$slots?: Slots;
8
- }): Exports;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
9
12
  z_$$bindings?: Bindings;
10
13
  }
11
14
  declare const Toggle: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
@@ -7,6 +7,7 @@ import type { LutraForm } from "./types.js";
7
7
  */
8
8
  export declare function useForm(form: LutraForm<any>): LutraForm<any> & {
9
9
  originalData: any;
10
+ domForm: null;
10
11
  data: any;
11
12
  state: string;
12
13
  };
@@ -6,6 +6,7 @@
6
6
  export function useForm(form) {
7
7
  let _form = Object.assign(form, {
8
8
  originalData: JSON.parse(JSON.stringify(form.data ?? {})),
9
+ domForm: null,
9
10
  data: form.data ?? {},
10
11
  state: 'idle',
11
12
  });
@@ -63,8 +64,11 @@ export function fieldKeydown(form, name, el, validator, onkeydown) {
63
64
  };
64
65
  }
65
66
  function getTypedValue(el) {
66
- if (el?.type === 'number')
67
- return parseFloat(el.value);
67
+ if (el?.type === 'number') {
68
+ const parsed = parseFloat(el.value);
69
+ // Zod v4 no longer accepts infinite values
70
+ return isFinite(parsed) ? parsed : el.value;
71
+ }
68
72
  if (el?.type === 'checkbox')
69
73
  return el.checked;
70
74
  return el?.value;
@@ -1,17 +1,18 @@
1
1
  import { Bodyguard, type BodyguardFormConfig, type BodyguardResult, type GenericIssue, type JSONLike } from "@auth70/bodyguard";
2
2
  import type { RequestEvent } from "@sveltejs/kit";
3
- import type { ZodType, infer as Infer } from "zod";
4
- import type { LutraForm, FormField, FormIssue, ZodTypes } from "./types.js";
3
+ import type { infer as Infer } from "zod";
4
+ import { type ZodTypes } from "zodex";
5
+ import type { LutraForm, FormField, FormIssue } from "./types.js";
5
6
  export declare const bodyguard: Bodyguard;
6
7
  /**
7
8
  * Get fields from a Zod schema.
8
- * @param {ZodObject<any>} schema - The schema to get fields from.
9
+ * @param {ZodTypes} schema - The schema to get fields from.
9
10
  * @returns {Record<string, any>} - The fields from the schema.
10
11
  */
11
- export declare function getFieldsFromSchema(schema: ZodType, data?: BodyguardResult<any>, parents?: string[]): Record<string, FormField>;
12
+ export declare function getFieldsFromSchema<Z extends ZodTypes>(schema: Z, data?: BodyguardResult<any>, parents?: string[]): Record<string, FormField>;
12
13
  /**
13
14
  * Server page load call. Optionally with a default object to populate the form with from locals.
14
- * @param {ZodType} schema - The schema to parse the form with.
15
+ * @param {ZodTypes} schema - The schema to parse the form with.
15
16
  * @param {RequestEvent} event - The event to load the (possible) form from.
16
17
  * @param {JSONLike | string} objOrName - The default object to populate the form with, or the name of the object in locals.
17
18
  * @param {JSONLike} obj - The default object to populate the form with.
@@ -26,19 +27,19 @@ export declare function loadForm<Z extends ZodTypes>(schema: Z, event: RequestEv
26
27
  export declare function parseFormIssues(issues: GenericIssue[]): FormIssue[];
27
28
  /**
28
29
  * Parse a form using a schema.
29
- * @param {ZodType} schema - The schema to parse the form with.
30
+ * @param {ZodTypes} schema - The schema to parse the form with.
30
31
  * @param {Request} request - The request to parse.
31
32
  * @param {BodyguardFormConfig | string} optsOrName - The options for the form validation, or the name of the form in locals.
32
33
  * @param {BodyguardFormConfig} opts - The options for the form validation.
33
34
  * @returns {Promise<{ valid: false } | { valid: true, data: Infer<Z> }>} - The result of the form validation.
34
35
  */
35
- export declare function parseForm<Z extends ZodType>(schema: Z, event: RequestEvent, optsOrName?: BodyguardFormConfig | string, opts?: BodyguardFormConfig): Promise<LutraForm<Z>>;
36
+ export declare function parseForm<Z extends ZodTypes>(schema: Z, event: RequestEvent, optsOrName?: BodyguardFormConfig | string, opts?: BodyguardFormConfig): Promise<LutraForm<Z>>;
36
37
  /**
37
38
  * Convert an array path from a Zod issue to a string path for a form field.
38
- * @param {(string | number)[]} path - The path to convert.
39
+ * @param {PropertyKey[]} path - The path to convert.
39
40
  * @returns {string} - The string path.
40
41
  */
41
- export declare function arrayPathToStringPath(path: (string | number)[]): string;
42
+ export declare function arrayPathToStringPath(path: PropertyKey[]): string;
42
43
  /**
43
44
  * Get a value from an object using a string path.
44
45
  * @param {any} obj - The object to get the value from.
package/dist/form/form.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Bodyguard } from "@auth70/bodyguard";
2
- import { ZodArray, ZodNullable, ZodOptional, ZodEffects, ZodObject, ZodDefault, ZodString, ZodNumber, ZodBoolean, ZodDate } from "zod";
3
- import { zerialize, dezerialize } from "@auth70/zodex-esm";
2
+ import { ZodArray, ZodNullable, ZodOptional, ZodObject, ZodDefault, ZodString, ZodNumber, ZodBoolean, ZodDate } from "zod";
3
+ import { zerialize, dezerialize } from "zodex";
4
4
  export const bodyguard = new Bodyguard();
5
5
  /**
6
6
  * Map a Zod type to a field type as a string.
@@ -14,9 +14,6 @@ function mapZodTypeToFieldType(schema) {
14
14
  if (schema instanceof ZodOptional) {
15
15
  return mapZodTypeToFieldType(schema.unwrap());
16
16
  }
17
- if (schema instanceof ZodEffects) {
18
- return mapZodTypeToFieldType(schema._def?.schema ?? schema);
19
- }
20
17
  if (schema instanceof ZodArray) {
21
18
  return `Array<${mapZodTypeToFieldType(schema.element)}>`;
22
19
  }
@@ -24,7 +21,7 @@ function mapZodTypeToFieldType(schema) {
24
21
  return 'object';
25
22
  }
26
23
  if (schema instanceof ZodDefault) {
27
- return mapZodTypeToFieldType(schema._def.innerType);
24
+ return mapZodTypeToFieldType(schema._zod.def.innerType);
28
25
  }
29
26
  if (schema instanceof ZodDate) {
30
27
  return 'date';
@@ -42,7 +39,7 @@ function mapZodTypeToFieldType(schema) {
42
39
  }
43
40
  /**
44
41
  * Get fields from a Zod schema.
45
- * @param {ZodObject<any>} schema - The schema to get fields from.
42
+ * @param {ZodTypes} schema - The schema to get fields from.
46
43
  * @returns {Record<string, any>} - The fields from the schema.
47
44
  */
48
45
  export function getFieldsFromSchema(schema, data, parents) {
@@ -51,17 +48,14 @@ export function getFieldsFromSchema(schema, data, parents) {
51
48
  else
52
49
  parents = [...parents];
53
50
  const fields = {};
54
- if (schema instanceof ZodEffects) {
55
- return getFieldsFromSchema(schema._def.schema, data);
56
- }
57
51
  if (!(schema instanceof ZodObject)) {
58
52
  console.error('[lutra] getFieldsFromSchema: Schema is not an object:', schema.constructor.name);
59
53
  return fields;
60
54
  }
61
55
  for (const key in schema.shape) {
62
56
  const field = schema.shape[key];
63
- // Fields can be wrapped like ZodDefault._def.innerType._def.InnerType, etc. We want the last inner type's definition.
64
- // On the way, let's check if any of the _def include a defaultValue.
57
+ // Fields can be wrapped like ZodDefault.def.innerType.def.InnerType, etc. We want the last inner type's definition.
58
+ // On the way, let's check if any of the def include a defaultValue.
65
59
  let required = true;
66
60
  let defaultValue = undefined;
67
61
  let min = undefined;
@@ -70,24 +64,26 @@ export function getFieldsFromSchema(schema, data, parents) {
70
64
  let minlength = undefined;
71
65
  let maxlength = undefined;
72
66
  let type = field;
73
- while (type instanceof ZodEffects || type instanceof ZodOptional || type instanceof ZodDefault || type instanceof ZodNullable) {
67
+ while (type instanceof ZodOptional || type instanceof ZodDefault || type instanceof ZodNullable) {
74
68
  if (type instanceof ZodOptional || type instanceof ZodNullable) {
75
69
  required = false;
76
- type = type._def.innerType;
70
+ type = type._zod.def.innerType;
77
71
  }
78
72
  if (type instanceof ZodDefault) {
79
- defaultValue = type._def.defaultValue();
80
- type = type._def.innerType;
73
+ defaultValue = typeof type._zod.def.defaultValue === 'function'
74
+ ? type._zod.def.defaultValue()
75
+ : type._zod.def.defaultValue;
76
+ type = type._zod.def.innerType;
81
77
  }
82
78
  else {
83
- type = type._def.innerType ? type._def.innerType : type;
79
+ type = type._zod.def.innerType ? type._zod.def.innerType : type;
84
80
  }
85
81
  }
86
82
  // Check for min/max/regex checks
87
- if (type._def.checks) {
88
- for (const check of type._def.checks) {
83
+ if ((type._zod.def).checks) {
84
+ for (const check of type._zod.def.checks) {
89
85
  if (check.kind === 'min') {
90
- if (field instanceof ZodString || field._def?.innerType instanceof ZodString) {
86
+ if (field instanceof ZodString || field._zod?.def?.innerType instanceof ZodString) {
91
87
  minlength = check.value;
92
88
  }
93
89
  else {
@@ -95,7 +91,7 @@ export function getFieldsFromSchema(schema, data, parents) {
95
91
  }
96
92
  }
97
93
  if (check.kind === 'max') {
98
- if (field instanceof ZodString || field._def?.innerType instanceof ZodString) {
94
+ if (field instanceof ZodString || field._zod?.def?.innerType instanceof ZodString) {
99
95
  maxlength = check.value;
100
96
  }
101
97
  else {
@@ -106,7 +102,13 @@ export function getFieldsFromSchema(schema, data, parents) {
106
102
  pattern = check.regex.source;
107
103
  }
108
104
  if (check.kind === 'email') {
109
- // ...
105
+ pattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
106
+ }
107
+ if (check.kind === 'url') {
108
+ pattern = /^(https?:\/\/)?[^\s/$.?#].[^\s]*$/;
109
+ }
110
+ if (check.kind === 'uuid') {
111
+ pattern = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
110
112
  }
111
113
  }
112
114
  }
@@ -150,7 +152,7 @@ export function getFieldsFromSchema(schema, data, parents) {
150
152
  }
151
153
  /**
152
154
  * Server page load call. Optionally with a default object to populate the form with from locals.
153
- * @param {ZodType} schema - The schema to parse the form with.
155
+ * @param {ZodTypes} schema - The schema to parse the form with.
154
156
  * @param {RequestEvent} event - The event to load the (possible) form from.
155
157
  * @param {JSONLike | string} objOrName - The default object to populate the form with, or the name of the object in locals.
156
158
  * @param {JSONLike} obj - The default object to populate the form with.
@@ -198,7 +200,7 @@ export function parseFormIssues(issues) {
198
200
  }
199
201
  /**
200
202
  * Parse a form using a schema.
201
- * @param {ZodType} schema - The schema to parse the form with.
203
+ * @param {ZodTypes} schema - The schema to parse the form with.
202
204
  * @param {Request} request - The request to parse.
203
205
  * @param {BodyguardFormConfig | string} optsOrName - The options for the form validation, or the name of the form in locals.
204
206
  * @param {BodyguardFormConfig} opts - The options for the form validation.
@@ -208,7 +210,7 @@ export async function parseForm(schema, event, optsOrName = 'form', opts) {
208
210
  let name = typeof optsOrName === 'string' ? optsOrName : 'form';
209
211
  opts = typeof optsOrName === 'string' ? opts : optsOrName;
210
212
  // Use bodyguard to parse the form.
211
- const data = await bodyguard.softForm(event.request, schema.parse, opts);
213
+ const data = await bodyguard.softForm(event.request, (input) => schema.parse(input), opts);
212
214
  // Get the fields from the schema.
213
215
  const fields = getFieldsFromSchema(schema, data);
214
216
  // Serialize the schema to send over the wire.
@@ -225,13 +227,14 @@ export async function parseForm(schema, event, optsOrName = 'form', opts) {
225
227
  // Mark fields as tainted if they were in the request.
226
228
  return [key, {
227
229
  ...field,
228
- tainted: data.success ? false : data.value.hasOwnProperty(key),
230
+ tainted: data.success ? false : (data.value && typeof data.value === 'object' && 'hasOwnProperty' in data.value ? data.value.hasOwnProperty(key) : false),
229
231
  }];
230
232
  })),
231
233
  // ensure all fields are present by populating `data` from `fields` instead of trusting `data` to have all fields
232
234
  data: Object.assign(Object.fromEntries(Object.entries(fields).map(([key, value]) => {
233
- return [key, value.isArray ? (data.value[key] || []) : (data.value[key] !== undefined ? data.value[key] : (value.defaultValue ?? null))];
234
- })), data.value),
235
+ const dataValue = data.value && typeof data.value === 'object' ? data.value[key] : undefined;
236
+ return [key, value.isArray ? (dataValue || []) : (dataValue !== undefined ? dataValue : (value.defaultValue ?? null))];
237
+ })), data.value || {}),
235
238
  issues: data.success ? undefined : parseFormIssues(data.error.issues),
236
239
  };
237
240
  // Attach the form to the locals to pass it to the client via loadForm.
@@ -240,16 +243,18 @@ export async function parseForm(schema, event, optsOrName = 'form', opts) {
240
243
  }
241
244
  /**
242
245
  * Convert an array path from a Zod issue to a string path for a form field.
243
- * @param {(string | number)[]} path - The path to convert.
246
+ * @param {PropertyKey[]} path - The path to convert.
244
247
  * @returns {string} - The string path.
245
248
  */
246
249
  export function arrayPathToStringPath(path) {
247
250
  // Joins the path with dots. For arrays, it adds brackets.
251
+ // Symbols are converted to strings using String()
248
252
  return path.map((p) => {
249
- if (p.toString().match(/^\d+$/)) {
250
- return `${p}[]`;
253
+ const pStr = typeof p === 'symbol' ? String(p) : p.toString();
254
+ if (pStr.match(/^\d+$/)) {
255
+ return `${pStr}[]`;
251
256
  }
252
- return p;
257
+ return pStr;
253
258
  }).join('.');
254
259
  }
255
260
  /**
@@ -1,9 +1,7 @@
1
1
  export { default as Button } from './Button.svelte';
2
- export { default as FieldActions } from './FieldActions.svelte';
3
- export { default as FieldContainer } from './FieldContainer.svelte';
4
- export { default as FieldContent } from './FieldContent.svelte';
2
+ export { default as FormActions } from './FormActions.svelte';
5
3
  export { default as FieldError } from './FieldError.svelte';
6
- export { default as FieldSection } from './FieldSection.svelte';
4
+ export { default as FormSection } from './FormSection.svelte';
7
5
  export { default as Fieldset } from './Fieldset.svelte';
8
6
  export { default as Form } from './Form.svelte';
9
7
  export { default as ImageUpload } from './ImageUpload.svelte';
@@ -13,6 +11,7 @@ export { default as Label } from './Label.svelte';
13
11
  export { default as LogoUpload } from './LogoUpload.svelte';
14
12
  export { default as Select } from './Select.svelte';
15
13
  export { default as Textarea } from './Textarea.svelte';
14
+ export { default as Toggle } from './Toggle.svelte';
16
15
  export * from './types.js';
17
16
  export * from './form.js';
18
17
  export * from './client.svelte.js';
@@ -1,9 +1,7 @@
1
1
  export { default as Button } from './Button.svelte';
2
- export { default as FieldActions } from './FieldActions.svelte';
3
- export { default as FieldContainer } from './FieldContainer.svelte';
4
- export { default as FieldContent } from './FieldContent.svelte';
2
+ export { default as FormActions } from './FormActions.svelte';
5
3
  export { default as FieldError } from './FieldError.svelte';
6
- export { default as FieldSection } from './FieldSection.svelte';
4
+ export { default as FormSection } from './FormSection.svelte';
7
5
  export { default as Fieldset } from './Fieldset.svelte';
8
6
  export { default as Form } from './Form.svelte';
9
7
  export { default as ImageUpload } from './ImageUpload.svelte';
@@ -13,6 +11,7 @@ export { default as Label } from './Label.svelte';
13
11
  export { default as LogoUpload } from './LogoUpload.svelte';
14
12
  export { default as Select } from './Select.svelte';
15
13
  export { default as Textarea } from './Textarea.svelte';
14
+ export { default as Toggle } from './Toggle.svelte';
16
15
  export * from './types.js';
17
16
  export * from './form.js';
18
17
  export * from './client.svelte.js';
@@ -1,28 +1,19 @@
1
1
  import type { GenericIssue } from "@auth70/bodyguard";
2
- import type { ZodType, infer as Infer, ZodTuple, ZodBigInt, ZodNaN, ZodSet, ZodVoid, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodRecord, ZodMap, ZodDiscriminatedUnion, ZodUnion, ZodIntersection, ZodNativeEnum, ZodEnum, ZodFunction, ZodLazy, ZodLiteral, ZodCatch, ZodPipeline, ZodBranded, ZodPromise, ZodArray, ZodNullable, ZodOptional, ZodEffects, ZodObject, ZodDefault, ZodString, ZodNumber, ZodBoolean, ZodDate } from "zod";
3
- export type Autocomplete = 'on' | 'off' | AutocompleteSingleToken | AutocompleteBilling | AutocompleteShipping;
4
- export type AutocompleteBilling = 'billing' | `billing ${AutocompleteSingleToken}`;
5
- export type AutocompleteShipping = 'shipping' | `shipping ${AutocompleteSingleToken}`;
2
+ import type { ZodTypes } from "zodex";
3
+ import type { infer as Infer } from "zod";
4
+ import type { FullAutoFill } from "svelte/elements";
5
+ export type Autocomplete = 'on' | 'off' | FullAutoFill;
6
6
  export type BeforeSubmitFn = (opts: {
7
7
  form: HTMLFormElement;
8
8
  data: FormData;
9
9
  cancel: () => void;
10
10
  }) => void | Promise<void>;
11
11
  export type AddBeforeSubmitFn = (id: string, fn: BeforeSubmitFn) => void;
12
- export type AutocompleteSingleToken = `section-${string}` | "name" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "email" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "url" | "photo" | "webauthn";
13
- export type Modifiers = ZodOptional<ZodTypes> | ZodNullable<ZodTypes> | ZodDefault<ZodTypes>;
14
- export type Primitives = ZodString | ZodNumber | ZodNaN | ZodBigInt | ZodBoolean | ZodDate | ZodUndefined | ZodNull | ZodAny | ZodUnknown | ZodNever | ZodVoid;
15
- export type ListCollections = ZodTuple<any, any> | ZodSet<ZodTypes> | ZodArray<ZodTypes>;
16
- export type KVCollections = ZodObject<any> | ZodRecord<any, ZodTypes> | ZodMap<ZodTypes, ZodTypes>;
17
- export type ADTs = ZodUnion<readonly [ZodTypes, ...ZodTypes[]]> | ZodDiscriminatedUnion<any, ZodObject<{
18
- [k: string]: ZodTypes;
19
- }>[]> | ZodIntersection<ZodTypes, ZodTypes> | ZodNativeEnum<any> | ZodEnum<any>;
20
- export type ZodTypes = Modifiers | Primitives | ListCollections | KVCollections | ADTs | ZodFunction<any, ZodTypes> | ZodLazy<ZodTypes> | ZodLiteral<any> | ZodEffects<any, any> | ZodCatch<ZodTypes> | ZodPromise<ZodTypes> | ZodBranded<ZodTypes, any> | ZodPipeline<ZodTypes, ZodTypes>;
21
- export type ZTypeName<T extends ZodTypes> = T["_def"]["typeName"];
22
- export type FormIssue = GenericIssue & {
12
+ export type FormIssue = Omit<GenericIssue, 'path'> & {
23
13
  name: string;
14
+ path: PropertyKey[];
24
15
  };
25
- export type LutraForm<T extends ZodType<any, any>> = {
16
+ export type LutraForm<T extends ZodTypes> = {
26
17
  /** The name of the form. */
27
18
  name: string;
28
19
  /** Whether the form is valid. */
@@ -43,6 +34,8 @@ export type LutraForm<T extends ZodType<any, any>> = {
43
34
  issues?: FormIssue[];
44
35
  /** The state of the form. */
45
36
  state: 'idle' | 'loading' | 'success' | 'error';
37
+ /** The DOM form element. */
38
+ domForm?: HTMLFormElement | null;
46
39
  };
47
40
  export type FormField = {
48
41
  name: string;
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
@@ -18,6 +18,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
18
18
  (internal: unknown, props: {
19
19
  $$events?: Events;
20
20
  $$slots?: Slots;
21
- }): Exports;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
22
25
  z_$$bindings?: Bindings;
23
26
  }
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export {};
1
+ export * from './components/index.js';
2
+ export * from './form/index.js';
3
+ export * from './icons/index.js';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
- "use strict";
2
- // Reexport your entry components here
1
+ export * from './components/index.js';
2
+ export * from './form/index.js';
3
+ export * from './icons/index.js';