@finsweet/webflow-apps-utils 1.0.2 → 1.0.3

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 (226) hide show
  1. package/README.md +162 -1
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +1 -0
  4. package/dist/providers/GlobalProvider.mdx +322 -0
  5. package/dist/providers/GlobalProvider.svelte +58 -0
  6. package/dist/providers/GlobalProvider.svelte.d.ts +4 -0
  7. package/dist/providers/configuratorUtils.d.ts +37 -0
  8. package/dist/providers/configuratorUtils.js +219 -0
  9. package/dist/providers/globalContext.svelte.d.ts +18 -0
  10. package/dist/providers/globalContext.svelte.js +439 -0
  11. package/dist/providers/index.d.ts +5 -0
  12. package/dist/providers/index.js +7 -0
  13. package/dist/providers/types.d.ts +103 -0
  14. package/dist/providers/types.js +6 -0
  15. package/dist/router/README.md +2 -2
  16. package/dist/stores/index.d.ts +0 -1
  17. package/dist/stores/index.js +0 -1
  18. package/dist/types/webflow.d.ts +31 -47
  19. package/dist/ui/components/LoadingScreen.svelte +2 -1
  20. package/dist/ui/components/button/Button.svelte +1 -1
  21. package/dist/ui/components/button-group/ButtonGroup.stories.js +112 -0
  22. package/dist/ui/components/{ButtonGroup.svelte → button-group/ButtonGroup.svelte} +20 -33
  23. package/dist/ui/components/button-group/ButtonGroup.svelte.d.ts +13 -0
  24. package/dist/ui/components/button-group/index.d.ts +2 -0
  25. package/dist/ui/components/button-group/index.js +1 -0
  26. package/dist/ui/components/button-group/types.d.ts +32 -0
  27. package/dist/ui/components/checkbox/Checkbox.stories.d.ts +55 -0
  28. package/dist/ui/components/checkbox/Checkbox.stories.js +162 -0
  29. package/dist/ui/components/checkbox/Checkbox.svelte +141 -0
  30. package/dist/ui/components/checkbox/Checkbox.svelte.d.ts +4 -0
  31. package/dist/ui/components/checkbox/index.d.ts +2 -0
  32. package/dist/ui/components/checkbox/index.js +1 -0
  33. package/dist/ui/components/checkbox/types.d.ts +32 -0
  34. package/dist/ui/components/controlled-buttons/ControlledButtons.stories.d.ts +32 -0
  35. package/dist/ui/components/controlled-buttons/ControlledButtons.stories.js +152 -0
  36. package/dist/ui/components/{buttons/FooterButton.svelte → controlled-buttons/ControlledButtons.svelte} +18 -67
  37. package/dist/ui/components/controlled-buttons/ControlledButtons.svelte.d.ts +4 -0
  38. package/dist/ui/components/controlled-buttons/index.d.ts +2 -0
  39. package/dist/ui/components/controlled-buttons/index.js +1 -0
  40. package/dist/ui/components/{buttons → controlled-buttons}/types.d.ts +11 -4
  41. package/dist/ui/components/divider/Divider.stories.svelte +134 -0
  42. package/dist/ui/components/{clickable/Clickable.stories.svelte.d.ts → divider/Divider.stories.svelte.d.ts} +4 -4
  43. package/dist/ui/components/divider/Divider.svelte +30 -0
  44. package/dist/ui/components/divider/Divider.svelte.d.ts +4 -0
  45. package/dist/ui/components/divider/index.d.ts +2 -0
  46. package/dist/ui/components/divider/index.js +1 -0
  47. package/dist/ui/components/divider/types.d.ts +23 -0
  48. package/dist/ui/components/divider/types.js +1 -0
  49. package/dist/ui/components/iframe/Iframe.stories.svelte +122 -0
  50. package/dist/ui/components/{ToggleItem.svelte.d.ts → iframe/Iframe.stories.svelte.d.ts} +7 -8
  51. package/dist/ui/components/iframe/Iframe.svelte +75 -0
  52. package/dist/ui/components/iframe/Iframe.svelte.d.ts +4 -0
  53. package/dist/ui/components/iframe/index.d.ts +2 -0
  54. package/dist/ui/components/iframe/index.js +1 -0
  55. package/dist/ui/components/iframe/types.d.ts +38 -0
  56. package/dist/ui/components/iframe/types.js +1 -0
  57. package/dist/ui/components/index.d.ts +12 -39
  58. package/dist/ui/components/index.js +12 -39
  59. package/dist/ui/components/input/Input.stories.d.ts +24 -0
  60. package/dist/ui/components/input/Input.stories.js +98 -0
  61. package/dist/ui/components/input/Input.svelte +321 -80
  62. package/dist/ui/components/input/types.d.ts +27 -1
  63. package/dist/ui/components/layout/Layout.stories.svelte +3 -3
  64. package/dist/ui/components/layout/Layout.svelte +3 -5
  65. package/dist/ui/components/layout/common/EditModeMessage.svelte +24 -12
  66. package/dist/ui/components/layout/{ExampleLayout.svelte → examples/ExampleLayout.svelte} +34 -22
  67. package/dist/ui/components/layout/examples/Wrapper.svelte +9 -0
  68. package/dist/ui/components/{NoSettingsNeeded.svelte.d.ts → layout/examples/Wrapper.svelte.d.ts} +3 -3
  69. package/dist/ui/components/layout/examples/index.d.ts +2 -0
  70. package/dist/ui/components/layout/examples/index.js +2 -0
  71. package/dist/ui/components/layout/index.d.ts +2 -1
  72. package/dist/ui/components/layout/index.js +2 -1
  73. package/dist/ui/components/modal/Example.svelte +320 -0
  74. package/dist/ui/components/modal/Example.svelte.d.ts +3 -0
  75. package/dist/ui/components/modal/Modal.stories.svelte +18 -0
  76. package/dist/ui/components/modal/Modal.stories.svelte.d.ts +26 -0
  77. package/dist/ui/components/modal/Modal.svelte +490 -0
  78. package/dist/ui/components/modal/Modal.svelte.d.ts +130 -0
  79. package/dist/ui/components/modal/index.d.ts +2 -0
  80. package/dist/ui/components/modal/index.js +1 -0
  81. package/dist/ui/components/modal/types.d.ts +75 -0
  82. package/dist/ui/components/modal/types.js +1 -0
  83. package/dist/ui/components/notification/Notification.stories.svelte +228 -0
  84. package/dist/ui/components/{ToggleList.svelte.d.ts → notification/Notification.stories.svelte.d.ts} +9 -21
  85. package/dist/ui/components/notification/Notification.svelte +289 -0
  86. package/dist/ui/components/notification/Notification.svelte.d.ts +67 -0
  87. package/dist/ui/components/notification/index.d.ts +2 -0
  88. package/dist/ui/components/notification/index.js +1 -0
  89. package/dist/ui/components/notification/types.d.ts +68 -0
  90. package/dist/ui/components/notification/types.js +1 -0
  91. package/dist/ui/components/section/Section.stories.svelte +263 -0
  92. package/dist/ui/components/section/Section.stories.svelte.d.ts +27 -0
  93. package/dist/ui/components/section/Section.svelte +324 -0
  94. package/dist/ui/components/section/Section.svelte.d.ts +5 -0
  95. package/dist/ui/components/section/index.d.ts +2 -0
  96. package/dist/ui/components/section/index.js +1 -0
  97. package/dist/ui/components/section/types.d.ts +106 -0
  98. package/dist/ui/components/section/types.js +1 -0
  99. package/dist/ui/components/{ImageUpload.svelte → shared/ImageUpload.svelte} +3 -3
  100. package/dist/ui/components/{SelectBodyOrDivBlock.svelte → shared/SelectBodyOrDivBlock.svelte} +1 -1
  101. package/dist/ui/components/shared/index.d.ts +2 -0
  102. package/dist/ui/components/shared/index.js +2 -0
  103. package/dist/ui/index.css +33 -5
  104. package/dist/utils/api/checkIfAppModeIsDesign.d.ts +1 -2
  105. package/dist/utils/api/checkIfAppModeIsDesign.js +1 -2
  106. package/dist/utils/api/clipboard/handlePaste.d.ts +6 -37
  107. package/dist/utils/api/clipboard/handlePaste.js +2 -6
  108. package/dist/utils/api/getAllAssets.d.ts +1 -2
  109. package/dist/utils/api/getAllAssets.js +1 -2
  110. package/dist/utils/api/getFinsweetComponentsEnvironment.d.ts +1 -2
  111. package/dist/utils/api/getFinsweetComponentsEnvironment.js +3 -6
  112. package/dist/utils/api/index.d.ts +0 -1
  113. package/dist/utils/api/index.js +0 -1
  114. package/dist/utils/api/insertWithXSCP.d.ts +1 -2
  115. package/dist/utils/api/insertWithXSCP.js +1 -2
  116. package/dist/utils/auth/crossWindowLogin.d.ts +3 -0
  117. package/dist/utils/auth/crossWindowLogin.js +3 -0
  118. package/dist/utils/auth/index.d.ts +9 -25
  119. package/dist/utils/auth/index.js +9 -25
  120. package/dist/utils/browser-storage/localStorage.d.ts +4 -12
  121. package/dist/utils/browser-storage/localStorage.js +4 -12
  122. package/dist/utils/browser-storage/sessionStorage.d.ts +4 -12
  123. package/dist/utils/browser-storage/sessionStorage.js +4 -12
  124. package/dist/utils/custom-code/api.d.ts +3 -7
  125. package/dist/utils/custom-code/api.js +3 -7
  126. package/dist/utils/helpers/cleanupTooltipMessage.d.ts +1 -2
  127. package/dist/utils/helpers/cleanupTooltipMessage.js +1 -2
  128. package/dist/utils/helpers/goto.d.ts +1 -4
  129. package/dist/utils/helpers/goto.js +2 -7
  130. package/dist/utils/helpers/index.d.ts +1 -0
  131. package/dist/utils/helpers/index.js +1 -0
  132. package/dist/utils/helpers/noop.d.ts +1 -1
  133. package/dist/utils/helpers/noop.js +1 -1
  134. package/dist/utils/helpers/numbers.d.ts +4 -14
  135. package/dist/utils/helpers/numbers.js +4 -14
  136. package/dist/utils/helpers/objectsToModuleExports.d.ts +1 -3
  137. package/dist/utils/helpers/objectsToModuleExports.js +1 -3
  138. package/dist/utils/helpers/trimText.d.ts +1 -8
  139. package/dist/utils/helpers/trimText.js +1 -8
  140. package/dist/utils/index.d.ts +4 -0
  141. package/dist/utils/index.js +4 -0
  142. package/dist/utils/logger/index.d.ts +0 -2
  143. package/dist/utils/logger/index.js +0 -2
  144. package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.d.ts +1 -3
  145. package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.js +1 -3
  146. package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.d.ts +1 -5
  147. package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.js +1 -5
  148. package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.d.ts +1 -4
  149. package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.js +1 -4
  150. package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.d.ts +1 -3
  151. package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.js +1 -3
  152. package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.d.ts +1 -4
  153. package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.js +1 -4
  154. package/dist/utils/webflow-canvas/attributes/setStyles.d.ts +1 -3
  155. package/dist/utils/webflow-canvas/attributes/setStyles.js +1 -3
  156. package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.d.ts +1 -8
  157. package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.js +1 -13
  158. package/dist/utils/webflow-canvas/findInstanceElement.d.ts +0 -6
  159. package/dist/utils/webflow-canvas/findInstanceElement.js +1 -7
  160. package/dist/utils/webflow-canvas/getAllPages.d.ts +3 -10
  161. package/dist/utils/webflow-canvas/getAllPages.js +3 -10
  162. package/dist/utils/webflow-canvas/getSiteStagingUrl.d.ts +1 -4
  163. package/dist/utils/webflow-canvas/getSiteStagingUrl.js +1 -4
  164. package/dist/utils/webflow-canvas/index.d.ts +1 -0
  165. package/dist/utils/webflow-canvas/index.js +1 -0
  166. package/package.json +9 -2
  167. package/dist/stores/globalStore.d.ts +0 -10
  168. package/dist/stores/globalStore.js +0 -10
  169. package/dist/ui/components/ButtonGroup.svelte.d.ts +0 -28
  170. package/dist/ui/components/Checkbox.svelte +0 -94
  171. package/dist/ui/components/Checkbox.svelte.d.ts +0 -36
  172. package/dist/ui/components/Copy.svelte +0 -329
  173. package/dist/ui/components/Copy.svelte.d.ts +0 -35
  174. package/dist/ui/components/CustomModal.svelte +0 -192
  175. package/dist/ui/components/CustomModal.svelte.d.ts +0 -45
  176. package/dist/ui/components/DisableInEditMode.svelte +0 -66
  177. package/dist/ui/components/DisableInEditMode.svelte.d.ts +0 -33
  178. package/dist/ui/components/Divider.svelte +0 -31
  179. package/dist/ui/components/Divider.svelte.d.ts +0 -31
  180. package/dist/ui/components/Header.svelte +0 -30
  181. package/dist/ui/components/Header.svelte.d.ts +0 -20
  182. package/dist/ui/components/Iframe.svelte +0 -89
  183. package/dist/ui/components/Iframe.svelte.d.ts +0 -40
  184. package/dist/ui/components/InjectComponent.svelte +0 -297
  185. package/dist/ui/components/InjectComponent.svelte.d.ts +0 -27
  186. package/dist/ui/components/Modal.svelte +0 -139
  187. package/dist/ui/components/Modal.svelte.d.ts +0 -42
  188. package/dist/ui/components/Navbar.svelte +0 -132
  189. package/dist/ui/components/Navbar.svelte.d.ts +0 -29
  190. package/dist/ui/components/NoSettingsNeeded.svelte +0 -31
  191. package/dist/ui/components/Notification.svelte +0 -193
  192. package/dist/ui/components/Notification.svelte.d.ts +0 -64
  193. package/dist/ui/components/PlusMinusButton.svelte +0 -91
  194. package/dist/ui/components/PlusMinusButton.svelte.d.ts +0 -22
  195. package/dist/ui/components/PreviewBar.svelte +0 -40
  196. package/dist/ui/components/PreviewBar.svelte.d.ts +0 -20
  197. package/dist/ui/components/ScrollableContent.svelte +0 -18
  198. package/dist/ui/components/ScrollableContent.svelte.d.ts +0 -31
  199. package/dist/ui/components/Section.svelte +0 -97
  200. package/dist/ui/components/Section.svelte.d.ts +0 -50
  201. package/dist/ui/components/Spacer.svelte +0 -9
  202. package/dist/ui/components/Spacer.svelte.d.ts +0 -22
  203. package/dist/ui/components/SpinnerPlusMinus.svelte +0 -75
  204. package/dist/ui/components/SpinnerPlusMinus.svelte.d.ts +0 -23
  205. package/dist/ui/components/SpinnerUpDown.svelte +0 -194
  206. package/dist/ui/components/SpinnerUpDown.svelte.d.ts +0 -31
  207. package/dist/ui/components/Tabs.svelte +0 -71
  208. package/dist/ui/components/Tabs.svelte.d.ts +0 -26
  209. package/dist/ui/components/ToggleItem.svelte +0 -29
  210. package/dist/ui/components/ToggleList.svelte +0 -57
  211. package/dist/ui/components/buttons/FooterButton.svelte.d.ts +0 -10
  212. package/dist/ui/components/buttons/index.d.ts +0 -5
  213. package/dist/ui/components/buttons/index.js +0 -5
  214. package/dist/ui/components/clickable/Clickable.stories.svelte +0 -213
  215. package/dist/ui/components/clickable/Clickable.svelte +0 -93
  216. package/dist/ui/components/clickable/Clickable.svelte.d.ts +0 -4
  217. package/dist/ui/components/clickable/index.d.ts +0 -2
  218. package/dist/ui/components/clickable/index.js +0 -1
  219. package/dist/ui/components/clickable/types.d.ts +0 -17
  220. package/dist/utils/api/copyPaste/index.d.ts +0 -18
  221. /package/dist/ui/components/{buttons → button-group}/types.js +0 -0
  222. /package/dist/ui/components/{clickable → checkbox}/types.js +0 -0
  223. /package/dist/{utils/api/copyPaste/index.js → ui/components/controlled-buttons/types.js} +0 -0
  224. /package/dist/ui/components/layout/{ExampleLayout.svelte.d.ts → examples/ExampleLayout.svelte.d.ts} +0 -0
  225. /package/dist/ui/components/{ImageUpload.svelte.d.ts → shared/ImageUpload.svelte.d.ts} +0 -0
  226. /package/dist/ui/components/{SelectBodyOrDivBlock.svelte.d.ts → shared/SelectBodyOrDivBlock.svelte.d.ts} +0 -0
@@ -1,193 +0,0 @@
1
- <script lang="ts">
2
- import type { Component } from 'svelte';
3
-
4
- import { TimesIcon, WarningCircleOutlineIcon } from '../icons';
5
- import { Text } from '.';
6
-
7
- /**
8
- * The class name to apply to the notification.
9
- */
10
- export let className = '';
11
- /**
12
- * The message to display.
13
- */
14
- export let message = '';
15
- /**
16
- * The link to navigate to.
17
- */
18
- export let link = '';
19
- /**
20
- * The title of the notification.
21
- */
22
- export let title = '';
23
- /**
24
- * Title font weight
25
- */
26
- export let titleFontWeight = 600;
27
- /**
28
- * The title of the link.
29
- */
30
- export let linkTitle = '';
31
- /**
32
- * Whether to show the close icon.
33
- */
34
- export let closeIcon = true;
35
- /**
36
- * The icon to display.
37
- */
38
- export let defaultIcon: Component = WarningCircleOutlineIcon;
39
- /**
40
- * The icon to display for the link.
41
- */
42
- export let linkIcon: Component | null = null;
43
- /**
44
- * The type of notification. Defaults to 'warning'.
45
- * You can pass a color string to use a custom color.
46
- */
47
- export let type: 'warning' | 'error' | string = 'warning';
48
- /**
49
- * Whether to show the richtext message
50
- */
51
- export let richtextMessage = false;
52
- /**
53
- * Whether to show the richtext title
54
- */
55
- export let richTextTitle = false;
56
- /**
57
- * Whether to show the border left
58
- */
59
- export let borderLeft = true;
60
-
61
- let colors: {
62
- icon: string;
63
- border: string;
64
- };
65
-
66
- $: {
67
- if (type === 'warning') {
68
- colors = {
69
- icon: '#FFD301',
70
- border: 'var(--yellowBorder)'
71
- };
72
- }
73
-
74
- if (type === 'error') {
75
- colors = {
76
- icon: '#FF8A8A',
77
- border: 'var(--redBorder)'
78
- };
79
- }
80
-
81
- if (type === 'success') {
82
- colors = {
83
- icon: '#63D489',
84
- border: 'var(--greenIcon)'
85
- };
86
- }
87
-
88
- if (type !== 'warning' && type !== 'error' && type !== 'success') {
89
- // accept string as color code
90
- colors = {
91
- icon: type,
92
- border: type
93
- };
94
- }
95
- }
96
- </script>
97
-
98
- <div
99
- class="wrapper {className}"
100
- style={!borderLeft ? '' : `border-left: 2px solid ${colors.border};`}
101
- >
102
- <span style="color:{colors.icon};">
103
- <svelte:component this={defaultIcon} />
104
- </span>
105
- <div class="content">
106
- {#if title}
107
- <Text
108
- label={title}
109
- fontSize="normal"
110
- fontWeight={titleFontWeight.toString()}
111
- raw={richTextTitle}
112
- />
113
- {/if}
114
- <div class="message">
115
- {#if message}
116
- <Text label={message} fontColor="var(--text2)" raw={richtextMessage} />
117
- {/if}
118
-
119
- {#if link && linkTitle}
120
- <a href={link} class="link" target="_blank"
121
- ><span>{linkTitle}</span>
122
- <svelte:component this={linkIcon} />
123
- </a>
124
- {/if}
125
- </div>
126
- <slot name="actions" />
127
- </div>
128
- <div
129
- style={!closeIcon ? 'display:none;' : ''}
130
- on:click
131
- on:keydown={() => {}}
132
- tabindex="0"
133
- role="button"
134
- aria-label="Close"
135
- class="close-icon"
136
- >
137
- <TimesIcon />
138
- </div>
139
- </div>
140
-
141
- <style>
142
- .content {
143
- display: flex;
144
- padding-right: var(--spacing-24, 24px);
145
- flex-direction: column;
146
- align-items: flex-start;
147
- gap: 4px;
148
- flex: 1 0 0;
149
- }
150
- .close-icon {
151
- cursor: pointer;
152
- }
153
- .link :global(svg) {
154
- color: var(--blue-blue-text, #8ac2ff);
155
- }
156
- .link {
157
- color: var(--blue-blue-text, #8ac2ff);
158
- font-family: Inter;
159
- font-size: 11px;
160
- font-style: normal;
161
- font-weight: 400;
162
- line-height: 16px;
163
- cursor: pointer;
164
- text-decoration: none;
165
- display: flex;
166
- justify-content: center;
167
- align-items: center;
168
- width: max-content;
169
- }
170
- .wrapper {
171
- display: flex;
172
- padding: 8px;
173
- align-items: flex-start;
174
- gap: 8px;
175
- align-self: stretch;
176
- border-radius: 4px;
177
- background: var(--background-background-3, #363636);
178
- }
179
- .message {
180
- color: var(--text-text-2, #bdbdbd);
181
- font-family: Inter;
182
- font-size: 11px;
183
- font-style: normal;
184
- font-weight: 400;
185
- line-height: 16px;
186
- display: flex;
187
- flex-direction: column;
188
- justify-content: center;
189
- align-items: flex-start;
190
- gap: 4px;
191
- align-self: stretch;
192
- }
193
- </style>
@@ -1,64 +0,0 @@
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
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const Notification: $$__sveltets_2_IsomorphicComponent<{
16
- /**
17
- * The class name to apply to the notification.
18
- */ className?: string;
19
- /**
20
- * The message to display.
21
- */ message?: string;
22
- /**
23
- * The link to navigate to.
24
- */ link?: string;
25
- /**
26
- * The title of the notification.
27
- */ title?: string;
28
- /**
29
- * Title font weight
30
- */ titleFontWeight?: number;
31
- /**
32
- * The title of the link.
33
- */ linkTitle?: string;
34
- /**
35
- * Whether to show the close icon.
36
- */ closeIcon?: boolean;
37
- /**
38
- * The icon to display.
39
- */ defaultIcon?: Component;
40
- /**
41
- * The icon to display for the link.
42
- */ linkIcon?: Component | null;
43
- /**
44
- * The type of notification. Defaults to 'warning'.
45
- * You can pass a color string to use a custom color.
46
- */ type?: "warning" | "error" | string;
47
- /**
48
- * Whether to show the richtext message
49
- */ richtextMessage?: boolean;
50
- /**
51
- * Whether to show the richtext title
52
- */ richTextTitle?: boolean;
53
- /**
54
- * Whether to show the border left
55
- */ borderLeft?: boolean;
56
- }, {
57
- click: MouseEvent;
58
- } & {
59
- [evt: string]: CustomEvent<any>;
60
- }, {
61
- actions: {};
62
- }, {}, string>;
63
- type Notification = InstanceType<typeof Notification>;
64
- export default Notification;
@@ -1,91 +0,0 @@
1
- <script lang="ts">
2
- import { createEventDispatcher } from 'svelte';
3
-
4
- import { PlusIcon, SubtractIcon } from '../icons';
5
-
6
- export let delta: -1 | 1;
7
-
8
- type CustomEventDetail = {
9
- click: typeof delta;
10
- };
11
-
12
- // Create the event dispatcher with typed events
13
- const dispatch = createEventDispatcher<CustomEventDetail>();
14
-
15
- /**
16
- * Handle the click event and dispatch the custom click event
17
- */
18
- const handleClick = () => {
19
- dispatch('click', delta);
20
- };
21
- </script>
22
-
23
- <button class={delta === -1 ? 'input_left-button' : 'input_right-button'} on:click={handleClick}>
24
- <div class="width-12">
25
- {#if delta === -1}
26
- <SubtractIcon />
27
- {:else}
28
- <PlusIcon />
29
- {/if}
30
- </div>
31
- </button>
32
-
33
- <style>
34
- .input_left-button {
35
- width: 100%;
36
- border-color: var(--border2);
37
- outline: 0px;
38
- cursor: default;
39
- user-select: none;
40
- padding: var(--padding-tiny);
41
- box-sizing: border-box;
42
- font-family: inherit;
43
- font-size: inherit;
44
- position: relative;
45
- display: flex;
46
- align-items: center;
47
- justify-content: center;
48
- height: 24px;
49
- border-radius: var(--border-radius) 0px 0px var(--border-radius);
50
- color: var(--text1);
51
- background: var(--actionSecondaryBackground);
52
- border-width: 1px 0px 1px 1px;
53
- border-style: solid;
54
- align-self: center;
55
- }
56
-
57
- .input_right-button {
58
- width: 100%;
59
- border-color: var(--border2);
60
- outline: 0px;
61
- cursor: default;
62
- user-select: none;
63
- padding: var(--padding-tiny);
64
- box-sizing: border-box;
65
- font-family: inherit;
66
- font-size: inherit;
67
- position: relative;
68
- display: flex;
69
- align-items: center;
70
- justify-content: center;
71
- height: 24px;
72
- border-radius: 0px var(--border-radius) var(--border-radius) 0px;
73
- color: var(--text1);
74
- background: var(--actionSecondaryBackground);
75
- border-width: 1px 1px 1px 0px;
76
- border-style: solid;
77
- align-self: center;
78
- }
79
-
80
- .input_left-button:hover {
81
- background: var(--actionSecondaryBackgroundHover);
82
- }
83
- .input_right-button:hover {
84
- background: var(--actionSecondaryBackgroundHover);
85
- }
86
-
87
- .width-12 {
88
- width: var(--font-size-large);
89
- height: var(--font-size-large);
90
- }
91
- </style>
@@ -1,22 +0,0 @@
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: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- declare const PlusMinusButton: $$__sveltets_2_IsomorphicComponent<{
15
- delta: -1 | 1;
16
- }, {
17
- click: CustomEvent<1 | -1>;
18
- } & {
19
- [evt: string]: CustomEvent<any>;
20
- }, {}, {}, string>;
21
- type PlusMinusButton = InstanceType<typeof PlusMinusButton>;
22
- export default PlusMinusButton;
@@ -1,40 +0,0 @@
1
- <script lang="ts">
2
- import { EyeIcon } from '../icons';
3
-
4
- export let text = 'Preview';
5
- </script>
6
-
7
- <div class="preview-header">
8
- <EyeIcon />
9
- {text}
10
- </div>
11
-
12
- <style>
13
- .preview-header {
14
- display: flex;
15
- align-self: stretch;
16
- justify-content: start;
17
- align-items: center;
18
- background: var(--background1, #1e1e1e);
19
- padding: 0px var(--spacing-12, 12px);
20
- gap: 8px;
21
- height: 40px;
22
- min-height: 40px;
23
- /* Make it stick to the top */
24
- position: sticky;
25
- right: 0;
26
- left: 0;
27
- z-index: 9999999;
28
- top: 0;
29
- }
30
- .preview-header::after {
31
- content: '';
32
- display: block;
33
- width: 100%;
34
- height: 1px;
35
- background-color: var(--border1, rgba(255, 255, 255, 0.13));
36
- position: absolute;
37
- bottom: 1px;
38
- left: 0;
39
- }
40
- </style>
@@ -1,20 +0,0 @@
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: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- declare const PreviewBar: $$__sveltets_2_IsomorphicComponent<{
15
- text?: string;
16
- }, {
17
- [evt: string]: CustomEvent<any>;
18
- }, {}, {}, string>;
19
- type PreviewBar = InstanceType<typeof PreviewBar>;
20
- export default PreviewBar;
@@ -1,18 +0,0 @@
1
- <script lang="ts">
2
- import 'simplebar/dist/simplebar.min.css';
3
- import 'simplebar';
4
- export let className = '';
5
- </script>
6
-
7
- <div class={`scrollable-content ${className}`} data-simplebar>
8
- <slot></slot>
9
- <div class="scrollable-placeholder"></div>
10
- </div>
11
-
12
- <style>
13
- .scrollable-placeholder {
14
- height: 1px;
15
- background-color: transparent;
16
- width: 100%;
17
- }
18
- </style>
@@ -1,31 +0,0 @@
1
- import 'simplebar/dist/simplebar.min.css';
2
- import 'simplebar';
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
- $set?: any;
12
- $on?: any;
13
- };
14
- z_$$bindings?: Bindings;
15
- }
16
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
17
- default: any;
18
- } ? Props extends Record<string, never> ? any : {
19
- children?: any;
20
- } : {});
21
- declare const ScrollableContent: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
22
- className?: string;
23
- }, {
24
- default: {};
25
- }>, {
26
- [evt: string]: CustomEvent<any>;
27
- }, {
28
- default: {};
29
- }, {}, string>;
30
- type ScrollableContent = InstanceType<typeof ScrollableContent>;
31
- export default ScrollableContent;
@@ -1,97 +0,0 @@
1
- <script lang="ts">
2
- /**
3
- * Whether to hide the section
4
- */
5
- export let hide = false;
6
-
7
- /**
8
- * Whether to show borders
9
- */
10
- export let borders: Array<'top' | 'bottom' | 'left' | 'right'> = [];
11
- /**
12
- * Whether to show a active state
13
- */
14
- export let active = false;
15
- /**
16
- * Whether to show a clickable state
17
- */
18
- export let clickable = false;
19
-
20
- /**
21
- * Custom class name
22
- */
23
- export let className = '';
24
- /**
25
- * Whether to show a disabled state
26
- */
27
- export let disabled = false;
28
- </script>
29
-
30
- {#if !hide}
31
- <div
32
- class="section-wrap {active ? 'active' : ''} {clickable ? 'clickable' : ''} {className}"
33
- on:click
34
- on:mouseover
35
- on:mouseleave
36
- class:disabled
37
- role="button"
38
- tabindex="-1"
39
- on:focus={() => {}}
40
- on:keydown={() => {}}
41
- class:border-top={borders.includes('top')}
42
- class:border-bottom={borders.includes('bottom')}
43
- class:border-left={borders.includes('left')}
44
- class:border-right={borders.includes('right')}
45
- >
46
- <slot></slot>
47
- </div>
48
- {/if}
49
-
50
- <style>
51
- .section-wrap {
52
- display: flex;
53
- padding: var(--Spacing-12, 12px);
54
- flex-direction: column;
55
- align-items: flex-start;
56
- gap: var(--Spacing-8, 8px);
57
- align-self: stretch;
58
- position: relative;
59
- border: 1px solid transparent;
60
- }
61
-
62
- .section-wrap :global(.dropdown-wrapper) {
63
- align-self: stretch;
64
- justify-content: space-between;
65
- width: 100%;
66
- }
67
-
68
- .section-wrap.border-top {
69
- border-top: 1px solid var(--border1);
70
- }
71
- .section-wrap.border-left {
72
- border-left: 1px solid var(--border1);
73
- }
74
- .section-wrap.border-right {
75
- border-right: 1px solid var(--border1);
76
- }
77
- .section-wrap.border-bottom {
78
- border-bottom: 1px solid var(--border1);
79
- }
80
-
81
- .clickable:hover {
82
- background: var(--defaultLightHover);
83
- }
84
- .section-wrap.active {
85
- border-bottom: 1px solid var(--background2);
86
- background: var(--defaultLightActive);
87
- }
88
-
89
- .clickable {
90
- cursor: pointer;
91
- }
92
-
93
- .section-wrap.disabled {
94
- opacity: 0.5;
95
- cursor: not-allowed;
96
- }
97
- </style>
@@ -1,50 +0,0 @@
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: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
- default: any;
16
- } ? Props extends Record<string, never> ? any : {
17
- children?: any;
18
- } : {});
19
- declare const Section: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
- /**
21
- * Whether to hide the section
22
- */ hide?: boolean;
23
- /**
24
- * Whether to show borders
25
- */ borders?: Array<"top" | "bottom" | "left" | "right">;
26
- /**
27
- * Whether to show a active state
28
- */ active?: boolean;
29
- /**
30
- * Whether to show a clickable state
31
- */ clickable?: boolean;
32
- /**
33
- * Custom class name
34
- */ className?: string;
35
- /**
36
- * Whether to show a disabled state
37
- */ disabled?: boolean;
38
- }, {
39
- default: {};
40
- }>, {
41
- click: MouseEvent;
42
- mouseover: MouseEvent;
43
- mouseleave: MouseEvent;
44
- } & {
45
- [evt: string]: CustomEvent<any>;
46
- }, {
47
- default: {};
48
- }, {}, string>;
49
- type Section = InstanceType<typeof Section>;
50
- export default Section;
@@ -1,9 +0,0 @@
1
- <script lang="ts">
2
- export let height = '100%';
3
- export let width = '100%';
4
- export let backgroundColor = '';
5
- </script>
6
-
7
- <div
8
- style={`min-height: ${height}; min-width: ${width}; background-color: ${backgroundColor};`}
9
- ></div>
@@ -1,22 +0,0 @@
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: Props & {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
13
- }
14
- declare const Spacer: $$__sveltets_2_IsomorphicComponent<{
15
- height?: string;
16
- width?: string;
17
- backgroundColor?: string;
18
- }, {
19
- [evt: string]: CustomEvent<any>;
20
- }, {}, {}, string>;
21
- type Spacer = InstanceType<typeof Spacer>;
22
- export default Spacer;