lutra 0.0.20 → 0.0.33

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 (192) hide show
  1. package/dist/color.css +0 -0
  2. package/dist/display/Avatar.svelte +1 -1
  3. package/dist/display/Avatar.svelte.d.ts +18 -22
  4. package/dist/display/Badge.svelte +2 -4
  5. package/dist/display/Badge.svelte.d.ts +28 -32
  6. package/dist/display/Callout.svelte +8 -8
  7. package/dist/display/Callout.svelte.d.ts +27 -35
  8. package/dist/display/Close.svelte.d.ts +17 -20
  9. package/dist/display/Code.svelte +26 -31
  10. package/dist/display/Code.svelte.d.ts +31 -30
  11. package/dist/display/ContextTip.svelte +2 -5
  12. package/dist/display/ContextTip.svelte.d.ts +16 -20
  13. package/dist/display/DataList.svelte +16 -0
  14. package/dist/display/DataList.svelte.d.ts +21 -0
  15. package/dist/display/Details.svelte.d.ts +25 -30
  16. package/dist/display/Hero.svelte.d.ts +24 -28
  17. package/dist/display/Icon.svelte +3 -4
  18. package/dist/display/Icon.svelte.d.ts +18 -23
  19. package/dist/display/IconButton.svelte +12 -5
  20. package/dist/display/IconButton.svelte.d.ts +26 -29
  21. package/dist/display/Image.svelte.d.ts +25 -36
  22. package/dist/display/Indicator.svelte.d.ts +21 -22
  23. package/dist/display/Inset.svelte.d.ts +16 -20
  24. package/dist/display/LineChart.svelte +385 -0
  25. package/dist/display/LineChart.svelte.d.ts +24 -0
  26. package/dist/display/LoadingIndicator.svelte +33 -0
  27. package/dist/display/LoadingIndicator.svelte.d.ts +15 -0
  28. package/dist/display/Modal.svelte +116 -0
  29. package/dist/display/Modal.svelte.d.ts +27 -0
  30. package/dist/display/Notification.svelte.d.ts +22 -41
  31. package/dist/display/Panel.svelte +23 -0
  32. package/dist/display/Panel.svelte.d.ts +19 -0
  33. package/dist/display/Popup.svelte.d.ts +23 -28
  34. package/dist/{data → display}/Stat.svelte +9 -17
  35. package/dist/display/Stat.svelte.d.ts +30 -0
  36. package/dist/display/Table.svelte +14 -10
  37. package/dist/display/Table.svelte.d.ts +22 -32
  38. package/dist/display/TablePaginator.svelte +51 -0
  39. package/dist/display/TablePaginator.svelte.d.ts +21 -0
  40. package/dist/display/Tag.svelte.d.ts +29 -32
  41. package/dist/display/Tooltip.svelte +5 -4
  42. package/dist/display/Tooltip.svelte.d.ts +21 -26
  43. package/dist/display/chart.d.ts +78 -0
  44. package/dist/display/chart.js +212 -0
  45. package/dist/display/index.d.ts +11 -1
  46. package/dist/display/index.js +11 -1
  47. package/dist/display/notifications.svelte.d.ts +3 -3
  48. package/dist/display/notifications.svelte.js +2 -2
  49. package/dist/form/Button.svelte +7 -2
  50. package/dist/form/Button.svelte.d.ts +25 -35
  51. package/dist/form/FieldActions.svelte +25 -3
  52. package/dist/form/FieldActions.svelte.d.ts +18 -22
  53. package/dist/form/FieldContainer.svelte +1 -1
  54. package/dist/form/FieldContainer.svelte.d.ts +17 -22
  55. package/dist/form/FieldContent.svelte +52 -33
  56. package/dist/form/FieldContent.svelte.d.ts +28 -56
  57. package/dist/form/FieldError.svelte.d.ts +17 -20
  58. package/dist/form/FieldSection.svelte.d.ts +18 -32
  59. package/dist/form/Fieldset.svelte.d.ts +29 -40
  60. package/dist/form/Form.svelte +55 -17
  61. package/dist/form/Form.svelte.d.ts +36 -31
  62. package/dist/form/ImageUpload.svelte +259 -0
  63. package/dist/form/ImageUpload.svelte.d.ts +31 -0
  64. package/dist/form/Input.svelte +192 -153
  65. package/dist/form/Input.svelte.d.ts +115 -140
  66. package/dist/form/InputLength.svelte.d.ts +19 -20
  67. package/dist/form/Label.svelte +21 -4
  68. package/dist/form/Label.svelte.d.ts +24 -30
  69. package/dist/form/LogoUpload.svelte +100 -0
  70. package/dist/form/LogoUpload.svelte.d.ts +29 -0
  71. package/dist/form/Select.svelte +84 -36
  72. package/dist/form/Select.svelte.d.ts +69 -96
  73. package/dist/form/Textarea.svelte +163 -0
  74. package/dist/form/Textarea.svelte.d.ts +108 -0
  75. package/dist/form/Toggle.svelte +2 -0
  76. package/dist/form/Toggle.svelte.d.ts +15 -0
  77. package/dist/form/client.svelte.d.ts +8 -9
  78. package/dist/form/client.svelte.js +18 -10
  79. package/dist/form/form.d.ts +6 -4
  80. package/dist/form/form.js +23 -9
  81. package/dist/form/index.d.ts +6 -3
  82. package/dist/form/index.js +6 -3
  83. package/dist/form/types.d.ts +11 -1
  84. package/dist/icons/IconAlert.svelte.d.ts +23 -0
  85. package/dist/icons/{Copy.svelte → IconCopy.svelte} +1 -1
  86. package/dist/icons/IconCopy.svelte.d.ts +23 -0
  87. package/dist/icons/IconDone.svelte.d.ts +23 -0
  88. package/dist/icons/IconError.svelte.d.ts +23 -0
  89. package/dist/icons/IconHelp.svelte.d.ts +23 -0
  90. package/dist/icons/IconHide.svelte.d.ts +23 -0
  91. package/dist/icons/IconInfo.svelte.d.ts +23 -0
  92. package/dist/icons/IconLink.svelte.d.ts +23 -0
  93. package/dist/icons/IconMenuBurger.svelte.d.ts +23 -0
  94. package/dist/icons/IconMenuDots.svelte.d.ts +23 -0
  95. package/dist/icons/IconSearch.svelte +3 -0
  96. package/dist/icons/IconSearch.svelte.d.ts +23 -0
  97. package/dist/icons/IconShow.svelte.d.ts +23 -0
  98. package/dist/icons/IconSuccess.svelte.d.ts +23 -0
  99. package/dist/icons/IconWarning.svelte.d.ts +23 -0
  100. package/dist/icons/index.d.ts +14 -11
  101. package/dist/icons/index.js +14 -11
  102. package/dist/layout/Layout.svelte +7 -5
  103. package/dist/layout/Layout.svelte.d.ts +19 -22
  104. package/dist/layout/LayoutFooter.svelte.d.ts +17 -18
  105. package/dist/layout/LayoutGrid.svelte.d.ts +25 -36
  106. package/dist/layout/LayoutHeader.svelte +3 -0
  107. package/dist/layout/LayoutHeader.svelte.d.ts +33 -38
  108. package/dist/layout/LayoutSideMenu.svelte +18 -17
  109. package/dist/layout/LayoutSideMenu.svelte.d.ts +18 -22
  110. package/dist/layout/Overlay.svelte.d.ts +22 -32
  111. package/dist/layout/OverlayContainer.svelte.d.ts +14 -15
  112. package/dist/layout/OverlayLayer.svelte +6 -11
  113. package/dist/layout/OverlayLayer.svelte.d.ts +17 -20
  114. package/dist/layout/PageContent.svelte +9 -24
  115. package/dist/layout/PageContent.svelte.d.ts +23 -26
  116. package/dist/layout/Theme.svelte +19 -4
  117. package/dist/layout/Theme.svelte.d.ts +17 -22
  118. package/dist/layout/UIContent.svelte.d.ts +16 -20
  119. package/dist/layout/index.d.ts +5 -1
  120. package/dist/layout/index.js +5 -1
  121. package/dist/layout/overlays.svelte.d.ts +2 -2
  122. package/dist/nav/Breadcrumb.svelte +1 -1
  123. package/dist/nav/Breadcrumb.svelte.d.ts +26 -31
  124. package/dist/nav/Menu.svelte +6 -13
  125. package/dist/nav/Menu.svelte.d.ts +25 -31
  126. package/dist/nav/MenuItem.svelte +15 -8
  127. package/dist/nav/MenuItem.svelte.d.ts +20 -24
  128. package/dist/nav/MenuTypes.d.ts +7 -7
  129. package/dist/nav/NavMenu.svelte +7 -9
  130. package/dist/nav/NavMenu.svelte.d.ts +17 -18
  131. package/dist/nav/TabbedContent.svelte +1 -1
  132. package/dist/nav/TabbedContent.svelte.d.ts +21 -22
  133. package/dist/nav/Tabs.svelte +53 -13
  134. package/dist/nav/Tabs.svelte.d.ts +24 -25
  135. package/dist/nav/index.d.ts +2 -1
  136. package/dist/nav/index.js +2 -1
  137. package/dist/style.css +176 -79
  138. package/dist/typo/Clamp.svelte.d.ts +22 -26
  139. package/dist/typo/H.svelte.d.ts +26 -30
  140. package/dist/typo/H1.svelte.d.ts +24 -28
  141. package/dist/typo/H2.svelte.d.ts +24 -28
  142. package/dist/typo/H3.svelte.d.ts +24 -28
  143. package/dist/typo/H4.svelte.d.ts +24 -28
  144. package/dist/typo/H5.svelte.d.ts +24 -28
  145. package/dist/typo/H6.svelte.d.ts +24 -28
  146. package/dist/typo/P.svelte.d.ts +24 -28
  147. package/dist/utils/StringOrComponent.svelte +14 -0
  148. package/dist/utils/StringOrComponent.svelte.d.ts +19 -0
  149. package/dist/utils/StringOrSnippet.svelte +11 -0
  150. package/dist/utils/StringOrSnippet.svelte.d.ts +19 -0
  151. package/dist/utils/color.d.ts +1 -1
  152. package/dist/utils/index.d.ts +2 -1
  153. package/dist/utils/index.js +2 -1
  154. package/dist/utils/isSnippet.d.ts +3 -5
  155. package/dist/utils/isSnippet.js +9 -4
  156. package/package.json +32 -25
  157. package/dist/data/Stat.svelte.d.ts +0 -39
  158. package/dist/data/index.d.ts +0 -1
  159. package/dist/data/index.js +0 -1
  160. package/dist/grid/Column.svelte +0 -11
  161. package/dist/grid/Column.svelte.d.ts +0 -22
  162. package/dist/grid/Grid.svelte +0 -19
  163. package/dist/grid/Grid.svelte.d.ts +0 -24
  164. package/dist/grid/Row.svelte +0 -44
  165. package/dist/grid/Row.svelte.d.ts +0 -24
  166. package/dist/icons/Alert.svelte.d.ts +0 -23
  167. package/dist/icons/Copy.svelte.d.ts +0 -23
  168. package/dist/icons/Done.svelte.d.ts +0 -23
  169. package/dist/icons/Error.svelte.d.ts +0 -23
  170. package/dist/icons/Help.svelte.d.ts +0 -23
  171. package/dist/icons/Hide.svelte.d.ts +0 -23
  172. package/dist/icons/Info.svelte.d.ts +0 -23
  173. package/dist/icons/Link.svelte.d.ts +0 -23
  174. package/dist/icons/MenuBurger.svelte.d.ts +0 -23
  175. package/dist/icons/MenuDots.svelte.d.ts +0 -23
  176. package/dist/icons/Show.svelte.d.ts +0 -23
  177. package/dist/icons/Success.svelte.d.ts +0 -23
  178. package/dist/icons/Warning.svelte.d.ts +0 -23
  179. package/dist/utils/StringOrComponentOrSnippet.svelte +0 -14
  180. package/dist/utils/StringOrComponentOrSnippet.svelte.d.ts +0 -24
  181. /package/dist/icons/{Alert.svelte → IconAlert.svelte} +0 -0
  182. /package/dist/icons/{Done.svelte → IconDone.svelte} +0 -0
  183. /package/dist/icons/{Error.svelte → IconError.svelte} +0 -0
  184. /package/dist/icons/{Help.svelte → IconHelp.svelte} +0 -0
  185. /package/dist/icons/{Hide.svelte → IconHide.svelte} +0 -0
  186. /package/dist/icons/{Info.svelte → IconInfo.svelte} +0 -0
  187. /package/dist/icons/{Link.svelte → IconLink.svelte} +0 -0
  188. /package/dist/icons/{MenuBurger.svelte → IconMenuBurger.svelte} +0 -0
  189. /package/dist/icons/{MenuDots.svelte → IconMenuDots.svelte} +0 -0
  190. /package/dist/icons/{Show.svelte → IconShow.svelte} +0 -0
  191. /package/dist/icons/{Success.svelte → IconSuccess.svelte} +0 -0
  192. /package/dist/icons/{Warning.svelte → IconWarning.svelte} +0 -0
@@ -1,30 +1,26 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { type Snippet } from "svelte";
3
- declare const __propDef: {
4
- props: {
5
- center?: boolean | undefined;
6
- lang?: string | undefined;
7
- hr?: boolean | undefined;
8
- subtle?: boolean | undefined;
9
- children: Snippet;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
13
- };
14
- slots: {};
15
- };
16
- export type H2Props = typeof __propDef.props;
17
- export type H2Events = typeof __propDef.events;
18
- export type H2Slots = typeof __propDef.slots;
19
- export default class H2 extends SvelteComponent<H2Props, H2Events, H2Slots> {
20
- constructor(options?: import("svelte").ComponentConstructorOptions<{
21
- center?: boolean | undefined;
22
- lang?: string | undefined;
23
- hr?: boolean | undefined;
24
- subtle?: boolean | undefined;
25
- children: (this: void) => typeof import("svelte").SnippetReturn & {
26
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
27
- };
28
- }>);
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
29
11
  }
30
- export {};
12
+ declare const H2: $$__sveltets_2_IsomorphicComponent<{
13
+ /** Center the text. */
14
+ center?: boolean;
15
+ /** Language of the element */
16
+ lang?: string;
17
+ /** Add a horizontal rule below the text. */
18
+ hr?: boolean;
19
+ /** Make the text subtle. */
20
+ subtle?: boolean;
21
+ children: Snippet;
22
+ }, {
23
+ [evt: string]: CustomEvent<any>;
24
+ }, {}, {}, "">;
25
+ type H2 = InstanceType<typeof H2>;
26
+ export default H2;
@@ -1,30 +1,26 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { type Snippet } from "svelte";
3
- declare const __propDef: {
4
- props: {
5
- center?: boolean | undefined;
6
- lang?: string | undefined;
7
- hr?: boolean | undefined;
8
- subtle?: boolean | undefined;
9
- children: Snippet;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
13
- };
14
- slots: {};
15
- };
16
- export type H3Props = typeof __propDef.props;
17
- export type H3Events = typeof __propDef.events;
18
- export type H3Slots = typeof __propDef.slots;
19
- export default class H3 extends SvelteComponent<H3Props, H3Events, H3Slots> {
20
- constructor(options?: import("svelte").ComponentConstructorOptions<{
21
- center?: boolean | undefined;
22
- lang?: string | undefined;
23
- hr?: boolean | undefined;
24
- subtle?: boolean | undefined;
25
- children: (this: void) => typeof import("svelte").SnippetReturn & {
26
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
27
- };
28
- }>);
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
29
11
  }
30
- export {};
12
+ declare const H3: $$__sveltets_2_IsomorphicComponent<{
13
+ /** Center the text. */
14
+ center?: boolean;
15
+ /** Language of the element */
16
+ lang?: string;
17
+ /** Add a horizontal rule below the text. */
18
+ hr?: boolean;
19
+ /** Make the text subtle. */
20
+ subtle?: boolean;
21
+ children: Snippet;
22
+ }, {
23
+ [evt: string]: CustomEvent<any>;
24
+ }, {}, {}, "">;
25
+ type H3 = InstanceType<typeof H3>;
26
+ export default H3;
@@ -1,30 +1,26 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { type Snippet } from "svelte";
3
- declare const __propDef: {
4
- props: {
5
- center?: boolean | undefined;
6
- lang?: string | undefined;
7
- hr?: boolean | undefined;
8
- subtle?: boolean | undefined;
9
- children: Snippet;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
13
- };
14
- slots: {};
15
- };
16
- export type H4Props = typeof __propDef.props;
17
- export type H4Events = typeof __propDef.events;
18
- export type H4Slots = typeof __propDef.slots;
19
- export default class H4 extends SvelteComponent<H4Props, H4Events, H4Slots> {
20
- constructor(options?: import("svelte").ComponentConstructorOptions<{
21
- center?: boolean | undefined;
22
- lang?: string | undefined;
23
- hr?: boolean | undefined;
24
- subtle?: boolean | undefined;
25
- children: (this: void) => typeof import("svelte").SnippetReturn & {
26
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
27
- };
28
- }>);
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
29
11
  }
30
- export {};
12
+ declare const H4: $$__sveltets_2_IsomorphicComponent<{
13
+ /** Center the text. */
14
+ center?: boolean;
15
+ /** Language of the element */
16
+ lang?: string;
17
+ /** Add a horizontal rule below the text. */
18
+ hr?: boolean;
19
+ /** Make the text subtle. */
20
+ subtle?: boolean;
21
+ children: Snippet;
22
+ }, {
23
+ [evt: string]: CustomEvent<any>;
24
+ }, {}, {}, "">;
25
+ type H4 = InstanceType<typeof H4>;
26
+ export default H4;
@@ -1,30 +1,26 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { type Snippet } from "svelte";
3
- declare const __propDef: {
4
- props: {
5
- center?: boolean | undefined;
6
- lang?: string | undefined;
7
- hr?: boolean | undefined;
8
- subtle?: boolean | undefined;
9
- children: Snippet;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
13
- };
14
- slots: {};
15
- };
16
- export type H5Props = typeof __propDef.props;
17
- export type H5Events = typeof __propDef.events;
18
- export type H5Slots = typeof __propDef.slots;
19
- export default class H5 extends SvelteComponent<H5Props, H5Events, H5Slots> {
20
- constructor(options?: import("svelte").ComponentConstructorOptions<{
21
- center?: boolean | undefined;
22
- lang?: string | undefined;
23
- hr?: boolean | undefined;
24
- subtle?: boolean | undefined;
25
- children: (this: void) => typeof import("svelte").SnippetReturn & {
26
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
27
- };
28
- }>);
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
29
11
  }
30
- export {};
12
+ declare const H5: $$__sveltets_2_IsomorphicComponent<{
13
+ /** Center the text. */
14
+ center?: boolean;
15
+ /** Language of the element */
16
+ lang?: string;
17
+ /** Add a horizontal rule below the text. */
18
+ hr?: boolean;
19
+ /** Make the text subtle. */
20
+ subtle?: boolean;
21
+ children: Snippet;
22
+ }, {
23
+ [evt: string]: CustomEvent<any>;
24
+ }, {}, {}, "">;
25
+ type H5 = InstanceType<typeof H5>;
26
+ export default H5;
@@ -1,30 +1,26 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { type Snippet } from "svelte";
3
- declare const __propDef: {
4
- props: {
5
- center?: boolean | undefined;
6
- lang?: string | undefined;
7
- hr?: boolean | undefined;
8
- subtle?: boolean | undefined;
9
- children: Snippet;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
13
- };
14
- slots: {};
15
- };
16
- export type H6Props = typeof __propDef.props;
17
- export type H6Events = typeof __propDef.events;
18
- export type H6Slots = typeof __propDef.slots;
19
- export default class H6 extends SvelteComponent<H6Props, H6Events, H6Slots> {
20
- constructor(options?: import("svelte").ComponentConstructorOptions<{
21
- center?: boolean | undefined;
22
- lang?: string | undefined;
23
- hr?: boolean | undefined;
24
- subtle?: boolean | undefined;
25
- children: (this: void) => typeof import("svelte").SnippetReturn & {
26
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
27
- };
28
- }>);
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
29
11
  }
30
- export {};
12
+ declare const H6: $$__sveltets_2_IsomorphicComponent<{
13
+ /** Center the text. */
14
+ center?: boolean;
15
+ /** Language of the element */
16
+ lang?: string;
17
+ /** Add a horizontal rule below the text. */
18
+ hr?: boolean;
19
+ /** Make the text subtle. */
20
+ subtle?: boolean;
21
+ children: Snippet;
22
+ }, {
23
+ [evt: string]: CustomEvent<any>;
24
+ }, {}, {}, "">;
25
+ type H6 = InstanceType<typeof H6>;
26
+ export default H6;
@@ -1,30 +1,26 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import { type Snippet } from "svelte";
3
- declare const __propDef: {
4
- props: {
5
- center?: boolean | undefined;
6
- lang?: string | undefined;
7
- subtle?: boolean | undefined;
8
- strong?: boolean | undefined;
9
- children: Snippet;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
13
- };
14
- slots: {};
15
- };
16
- export type PProps = typeof __propDef.props;
17
- export type PEvents = typeof __propDef.events;
18
- export type PSlots = typeof __propDef.slots;
19
- export default class P extends SvelteComponent<PProps, PEvents, PSlots> {
20
- constructor(options?: import("svelte").ComponentConstructorOptions<{
21
- center?: boolean | undefined;
22
- lang?: string | undefined;
23
- subtle?: boolean | undefined;
24
- strong?: boolean | undefined;
25
- children: (this: void) => typeof import("svelte").SnippetReturn & {
26
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
27
- };
28
- }>);
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
29
11
  }
30
- export {};
12
+ declare const P: $$__sveltets_2_IsomorphicComponent<{
13
+ /** Center the text. */
14
+ center?: boolean;
15
+ /** Language of the element */
16
+ lang?: string;
17
+ /** Make the text subtle. */
18
+ subtle?: boolean;
19
+ /** Make the text strong. */
20
+ strong?: boolean;
21
+ children: Snippet;
22
+ }, {
23
+ [evt: string]: CustomEvent<any>;
24
+ }, {}, {}, "">;
25
+ type P = InstanceType<typeof P>;
26
+ export default P;
@@ -0,0 +1,14 @@
1
+ <script lang="ts">let {
2
+ content,
3
+ props
4
+ } = $props();
5
+ let Content = content;
6
+ </script>
7
+
8
+ {#if content}
9
+ {#if typeof content === 'string'}
10
+ {content}
11
+ {:else if Content}
12
+ <Content {...props} />
13
+ {/if}
14
+ {/if}
@@ -0,0 +1,19 @@
1
+ import type { Component } from "svelte";
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
11
+ }
12
+ declare const StringOrComponent: $$__sveltets_2_IsomorphicComponent<{
13
+ content: string | Component | undefined;
14
+ props?: Record<string, any>;
15
+ }, {
16
+ [evt: string]: CustomEvent<any>;
17
+ }, {}, {}, "">;
18
+ type StringOrComponent = InstanceType<typeof StringOrComponent>;
19
+ export default StringOrComponent;
@@ -0,0 +1,11 @@
1
+ <script lang="ts">let {
2
+ props,
3
+ content
4
+ } = $props();
5
+ </script>
6
+
7
+ {#if typeof content === 'string'}
8
+ {content}
9
+ {:else if content}
10
+ {@render content(props)}
11
+ {/if}
@@ -0,0 +1,19 @@
1
+ import type { Snippet } from "svelte";
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports;
10
+ z_$$bindings?: Bindings;
11
+ }
12
+ declare const StringOrSnippet: $$__sveltets_2_IsomorphicComponent<{
13
+ props?: Record<string, any>;
14
+ content?: string | Snippet<[Record<string, any> | undefined]>;
15
+ }, {
16
+ [evt: string]: CustomEvent<any>;
17
+ }, {}, {}, "">;
18
+ type StringOrSnippet = InstanceType<typeof StringOrSnippet>;
19
+ export default StringOrSnippet;
@@ -42,7 +42,7 @@ export type StatusColorOrString = StatusColor | (string & {});
42
42
  * @param {string} value - The value to check
43
43
  * @returns {boolean} - If the value is a valid StatusColor
44
44
  */
45
- export declare const isStatusColor: (value?: string) => value is "default" | "ok" | "alert" | "warn" | "info" | "task";
45
+ export declare const isStatusColor: (value?: string) => value is StatusColor;
46
46
  /**
47
47
  * Get the CSS variable for a status color
48
48
  * @param {StatusColorOrString} color - The status color
@@ -2,7 +2,8 @@ export { attr } from './attr.js';
2
2
  export { stringToColor, hexToRgb, hexRelativeLuminance, relativeLuminanceW3C, StatusColors, isStatusColor, getStatusColorVar } from './color.js';
3
3
  export type { Defaults } from './defaults.js';
4
4
  export { createId } from './id.js';
5
- export { isSnippet, isComponent } from './isSnippet.js';
6
5
  export type { StatusColor, StatusColorOrString } from './color.js';
7
6
  export { popBezier, popBezierInverse, slidefade, solve_spring, cubicBezier } from './transitions.js';
7
+ export { default as StringOrComponent } from "./StringOrComponent.svelte";
8
+ export { default as StringOrSnippet } from "./StringOrSnippet.svelte";
8
9
  export type { SpringParams } from './transitions.js';
@@ -1,5 +1,6 @@
1
1
  export { attr } from './attr.js';
2
2
  export { stringToColor, hexToRgb, hexRelativeLuminance, relativeLuminanceW3C, StatusColors, isStatusColor, getStatusColorVar } from './color.js';
3
3
  export { createId } from './id.js';
4
- export { isSnippet, isComponent } from './isSnippet.js';
5
4
  export { popBezier, popBezierInverse, slidefade, solve_spring, cubicBezier } from './transitions.js';
5
+ export { default as StringOrComponent } from "./StringOrComponent.svelte";
6
+ export { default as StringOrSnippet } from "./StringOrSnippet.svelte";
@@ -1,5 +1,3 @@
1
- import type { ComponentType } from "svelte";
2
- export declare const isSnippet: (object: unknown) => object is (this: void) => typeof import("svelte").SnippetReturn & {
3
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
4
- };
5
- export declare const isComponent: (object: unknown) => object is ComponentType;
1
+ import type { Component, Snippet } from "svelte";
2
+ export declare const isComponent: (object: unknown) => object is Component;
3
+ export declare const isSnippet: (object: unknown) => object is Snippet;
@@ -1,6 +1,11 @@
1
- export const isSnippet = (object) => {
2
- return !!object && Object.hasOwn(object, Symbol.for('svelte.snippet'));
3
- };
4
1
  export const isComponent = (object) => {
5
- return !isSnippet(object) && typeof object === 'function';
2
+ if (typeof object !== 'function')
3
+ return false;
4
+ const str = object.toString();
5
+ console.log(object.name, str);
6
+ return str.indexOf('$$payload, $$props)') !== -1;
7
+ };
8
+ export const isSnippet = (object) => {
9
+ //console.log('isComponent', object!.toString(), object!.toString().length);
10
+ return !isComponent(object);
6
11
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "lutra",
3
- "version": "0.0.20",
3
+ "version": "0.0.33",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host 0.0.0.0",
6
6
  "props": "node read_props.js",
7
7
  "local": "node local",
8
8
  "build": "vite build && npm run package",
9
9
  "preview": "vite preview",
10
- "package": "npm run props && svelte-kit sync && svelte-package && publint",
10
+ "package": "svelte-kit sync && svelte-package && publint && npm run props",
11
11
  "prepublishOnly": "npm run package",
12
12
  "test": "npm run test:integration && npm run test:unit",
13
13
  "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
@@ -21,10 +21,6 @@
21
21
  "types": "./dist/index.d.ts",
22
22
  "svelte": "./dist/index.js"
23
23
  },
24
- "./data": {
25
- "types": "./dist/data/index.d.ts",
26
- "svelte": "./dist/data/index.js"
27
- },
28
24
  "./display": {
29
25
  "types": "./dist/display/index.d.ts",
30
26
  "svelte": "./dist/display/index.js"
@@ -34,6 +30,10 @@
34
30
  "svelte": "./dist/form/index.js",
35
31
  "import": "./dist/form/index.js"
36
32
  },
33
+ "./form/types": {
34
+ "types": "./dist/form/types.d.ts",
35
+ "import": "./dist/form/types.js"
36
+ },
37
37
  "./icons": {
38
38
  "types": "./dist/icons/index.d.ts",
39
39
  "svelte": "./dist/icons/index.js"
@@ -50,6 +50,10 @@
50
50
  "types": "./dist/typo/index.d.ts",
51
51
  "svelte": "./dist/typo/index.js"
52
52
  },
53
+ "./utils": {
54
+ "types": "./dist/utils/index.d.ts",
55
+ "svelte": "./dist/utils/index.js"
56
+ },
53
57
  "./utils/*": "./dist/utils/*"
54
58
  },
55
59
  "files": [
@@ -62,25 +66,26 @@
62
66
  "svelte": "^4.0.0"
63
67
  },
64
68
  "devDependencies": {
65
- "@playwright/test": "^1.43.1",
66
- "@rollup/browser": "^4.17.2",
67
- "@sveltejs/adapter-auto": "^3.2.0",
68
- "@sveltejs/package": "^2.3.1",
69
- "@sveltejs/vite-plugin-svelte": "^3.1.0",
69
+ "@playwright/test": "^1.46.1",
70
+ "@rollup/browser": "^4.21.2",
71
+ "@sveltejs/adapter-auto": "^3.2.4",
72
+ "@sveltejs/package": "^2.3.4",
73
+ "@sveltejs/vite-plugin-svelte": "^3.1.2",
70
74
  "@types/glob": "8.1.0",
71
- "glob": "^10.3.12",
72
- "highlight.js": "^11.9.0",
73
- "mdsvex": "^0.11.0",
74
- "monaco-editor": "^0.48.0",
75
- "prettier": "^3.2.5",
76
- "prettier-plugin-svelte": "^3.2.3",
77
- "publint": "^0.2.7",
78
- "svelte": "next",
79
- "svelte-check": "^3.7.0",
80
- "tslib": "^2.6.2",
81
- "typescript": "^5.4.5",
82
- "vite": "5.2.10",
83
- "vitest": "1.5.3"
75
+ "@types/ws": "^8.5.12",
76
+ "glob": "^11.0.0",
77
+ "highlight.js": "^11.10.0",
78
+ "mdsvex": "^0.12.3",
79
+ "monaco-editor": "^0.51.0",
80
+ "prettier": "^3.3.3",
81
+ "prettier-plugin-svelte": "^3.2.6",
82
+ "publint": "^0.2.10",
83
+ "svelte": "5.0.0-next.243",
84
+ "svelte-check": "^4.0.0",
85
+ "tslib": "^2.7.0",
86
+ "typescript": "^5.5.4",
87
+ "vite": "5.4.3",
88
+ "vitest": "2.0.5"
84
89
  },
85
90
  "svelte": "./dist/index.js",
86
91
  "types": "./dist/index.d.ts",
@@ -89,7 +94,9 @@
89
94
  "@auth70/bodyguard": "^1.6.2",
90
95
  "@auth70/zodex-esm": "^0.7.3",
91
96
  "blurhash": "^2.0.5",
97
+ "browser-image-compression": "^2.0.2",
92
98
  "esm-env": "^1.0.0",
93
- "zod": "^3.23.5"
99
+ "ws": "^8.18.0",
100
+ "zod": "^3.23.8"
94
101
  }
95
102
  }
@@ -1,39 +0,0 @@
1
- import { SvelteComponent } from "svelte";
2
- import type { ComponentType } from "svelte";
3
- import { type StatusColorOrString } from "../utils/color.js";
4
- declare const __propDef: {
5
- props: {
6
- title?: string | undefined;
7
- value?: string | number | Date | undefined;
8
- prefix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
9
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
10
- }) | ComponentType | undefined;
11
- suffix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
12
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
13
- }) | ComponentType | undefined;
14
- color?: StatusColorOrString | undefined;
15
- formatter?: Intl.NumberFormat | Intl.DateTimeFormat | ((value: number | string | Date | undefined) => string) | undefined;
16
- };
17
- events: {
18
- [evt: string]: CustomEvent<any>;
19
- };
20
- slots: {};
21
- };
22
- export type StatProps = typeof __propDef.props;
23
- export type StatEvents = typeof __propDef.events;
24
- export type StatSlots = typeof __propDef.slots;
25
- export default class Stat extends SvelteComponent<StatProps, StatEvents, StatSlots> {
26
- constructor(options?: import("svelte").ComponentConstructorOptions<{
27
- title?: string | undefined;
28
- value?: string | number | Date | undefined;
29
- prefix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
30
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
31
- }) | ComponentType | undefined;
32
- suffix?: string | ((this: void) => typeof import("svelte").SnippetReturn & {
33
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
34
- }) | ComponentType | undefined;
35
- color?: StatusColorOrString | undefined;
36
- formatter?: Intl.NumberFormat | Intl.DateTimeFormat | ((value: string | number | Date | undefined) => string) | undefined;
37
- }>);
38
- }
39
- export {};
@@ -1 +0,0 @@
1
- export { default as Stat } from './Stat.svelte';
@@ -1 +0,0 @@
1
- export { default as Stat } from './Stat.svelte';
@@ -1,11 +0,0 @@
1
- <script lang="ts">import { setContext } from "svelte";
2
- let { children } = $props();
3
- </script>
4
-
5
- <div class="Column">
6
- {@render children()}
7
- </div>
8
-
9
- <style>
10
-
11
- </style>
@@ -1,22 +0,0 @@
1
- import { SvelteComponent } from "svelte";
2
- import { type Snippet } from "svelte";
3
- declare const __propDef: {
4
- props: {
5
- children: Snippet;
6
- };
7
- events: {
8
- [evt: string]: CustomEvent<any>;
9
- };
10
- slots: {};
11
- };
12
- export type ColumnProps = typeof __propDef.props;
13
- export type ColumnEvents = typeof __propDef.events;
14
- export type ColumnSlots = typeof __propDef.slots;
15
- export default class Column extends SvelteComponent<ColumnProps, ColumnEvents, ColumnSlots> {
16
- constructor(options?: import("svelte").ComponentConstructorOptions<{
17
- children: (this: void) => typeof import("svelte").SnippetReturn & {
18
- _: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
19
- };
20
- }>);
21
- }
22
- export {};