windmill-components 1.82.5 → 1.82.7

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 (160) hide show
  1. package/common.d.ts +2 -2
  2. package/components/ArgInput.svelte +52 -72
  3. package/components/ArgInput.svelte.d.ts +1 -3
  4. package/components/DisplayResult.svelte +17 -17
  5. package/components/Editor.svelte +0 -3
  6. package/components/Editor.svelte.d.ts +0 -1
  7. package/components/FieldHeader.svelte +0 -1
  8. package/components/FieldHeader.svelte.d.ts +0 -4
  9. package/components/FlowBuilder.svelte +5 -0
  10. package/components/FlowViewer.svelte +0 -1
  11. package/components/InputTransformForm.svelte +0 -1
  12. package/components/LightweightArgInput.svelte +1 -14
  13. package/components/LightweightArgInput.svelte.d.ts +1 -3
  14. package/components/Multiselect.svelte.d.ts +2 -2
  15. package/components/SimpleEditor.svelte +0 -1
  16. package/components/SimpleEditor.svelte.d.ts +0 -1
  17. package/components/TemplateEditor.svelte +0 -1
  18. package/components/Toggle.svelte +1 -1
  19. package/components/Toggle.svelte.d.ts +0 -1
  20. package/components/apps/components/buttons/AppButton.svelte +3 -17
  21. package/components/apps/components/buttons/AppForm.svelte +2 -10
  22. package/components/apps/components/buttons/AppFormButton.svelte +58 -82
  23. package/components/apps/components/display/AppDisplayComponent.svelte +23 -17
  24. package/components/apps/components/display/AppHtml.svelte +7 -1
  25. package/components/apps/components/display/AppHtml.svelte.d.ts +2 -0
  26. package/components/apps/components/display/AppMap.svelte +1 -1
  27. package/components/apps/components/display/AppPdf.svelte +1 -1
  28. package/components/apps/components/display/PlotlyHtml.svelte +20 -3
  29. package/components/apps/components/display/PlotlyHtml.svelte.d.ts +2 -0
  30. package/components/apps/components/display/table/AppAggridTable.svelte +1 -1
  31. package/components/apps/components/display/table/AppTable.svelte +21 -14
  32. package/components/apps/components/helpers/HiddenComponent.svelte +3 -2
  33. package/components/apps/components/helpers/HiddenComponent.svelte.d.ts +2 -1
  34. package/components/apps/components/helpers/InputValue.svelte +3 -3
  35. package/components/apps/components/helpers/RefreshButton.svelte +3 -10
  36. package/components/apps/components/helpers/RefreshButton.svelte.d.ts +1 -0
  37. package/components/apps/components/helpers/RunnableComponent.svelte +19 -15
  38. package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +2 -1
  39. package/components/apps/components/helpers/RunnableWrapper.svelte +3 -1
  40. package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +1 -0
  41. package/components/apps/components/helpers/eval.d.ts +3 -1
  42. package/components/apps/components/helpers/eval.js +4 -2
  43. package/components/apps/components/inputs/AppCheckbox.svelte +0 -4
  44. package/components/apps/components/inputs/AppDateInput.svelte +2 -2
  45. package/components/apps/components/inputs/AppMultiSelect.svelte +13 -5
  46. package/components/apps/components/inputs/AppMultiSelect.svelte.d.ts +0 -2
  47. package/components/apps/components/inputs/AppNumberInput.svelte +3 -3
  48. package/components/apps/components/inputs/AppSelect.svelte +11 -4
  49. package/components/apps/components/inputs/AppSelect.svelte.d.ts +0 -2
  50. package/components/apps/components/inputs/AppSliderInputs.svelte +1 -1
  51. package/components/apps/components/inputs/AppTextInput.svelte +53 -43
  52. package/components/apps/components/inputs/AppTextInput.svelte.d.ts +1 -1
  53. package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +1 -1
  54. package/components/apps/components/layout/AppContainer.svelte +2 -2
  55. package/components/apps/components/layout/AppDrawer.svelte +1 -2
  56. package/components/apps/components/layout/AppSplitpanes.svelte +3 -3
  57. package/components/apps/components/layout/AppTabs.svelte +1 -1
  58. package/components/apps/editor/AppEditor.svelte +49 -21
  59. package/components/apps/editor/AppEditorHeader.svelte +5 -0
  60. package/components/apps/editor/AppPreview.svelte +18 -7
  61. package/components/apps/editor/ComponentHeader.svelte +1 -0
  62. package/components/apps/editor/ComponentHeader.svelte.d.ts +1 -1
  63. package/components/apps/editor/GridEditor.svelte +22 -12
  64. package/components/apps/editor/GridViewer.svelte +2 -2
  65. package/components/apps/editor/GridViewer.svelte.d.ts +1 -1
  66. package/components/apps/editor/RecomputeAllComponents.svelte +5 -7
  67. package/components/apps/editor/SettingsPanel.svelte +4 -4
  68. package/components/apps/editor/SubGridEditor.svelte +13 -12
  69. package/components/apps/editor/appUtils.d.ts +1 -0
  70. package/components/apps/editor/appUtils.js +19 -0
  71. package/components/apps/editor/component/Component.svelte +19 -8
  72. package/components/apps/editor/component/Component.svelte.d.ts +1 -1
  73. package/components/apps/editor/component/ComponentNavigation.svelte +57 -47
  74. package/components/apps/editor/component/README.md +4 -0
  75. package/components/apps/editor/component/components.d.ts +38 -28
  76. package/components/apps/editor/component/components.js +34 -27
  77. package/components/apps/editor/component/sets.js +2 -1
  78. package/components/apps/editor/componentsPanel/ComponentList.svelte +1 -1
  79. package/components/apps/editor/componentsPanel/CssProperty.svelte +62 -48
  80. package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +3 -2
  81. package/components/apps/editor/componentsPanel/CssSettings.svelte +1 -0
  82. package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte +170 -0
  83. package/components/apps/editor/componentsPanel/QuickStyleMenu.svelte.d.ts +18 -0
  84. package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte +130 -0
  85. package/components/apps/editor/componentsPanel/QuickStyleProperty.svelte.d.ts +21 -0
  86. package/components/apps/editor/componentsPanel/quickStyleProperties.d.ts +535 -0
  87. package/components/apps/editor/componentsPanel/quickStyleProperties.js +598 -0
  88. package/components/apps/editor/componentsPanel/store.js +4 -4
  89. package/components/apps/editor/contextPanel/ComponentOutput.svelte +2 -26
  90. package/components/apps/editor/contextPanel/ComponentOutput.svelte.d.ts +0 -1
  91. package/components/apps/editor/contextPanel/ComponentOutputViewer.svelte +8 -6
  92. package/components/apps/editor/contextPanel/ContextPanel.svelte +7 -14
  93. package/components/apps/editor/contextPanel/components/BackgroundScriptOutput.svelte +2 -25
  94. package/components/apps/editor/contextPanel/components/OutputHeader.svelte +29 -40
  95. package/components/apps/editor/contextPanel/components/OutputHeader.svelte.d.ts +1 -2
  96. package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +2 -7
  97. package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte.d.ts +1 -1
  98. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +10 -11
  99. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +4 -3
  100. package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte.d.ts +1 -0
  101. package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +0 -1
  102. package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +2 -2
  103. package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte +2 -0
  104. package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +22 -19
  105. package/components/apps/editor/settingsPanel/ComponentPanel.svelte +42 -13
  106. package/components/apps/editor/settingsPanel/GridTab.svelte +1 -2
  107. package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +2 -1
  108. package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +4 -0
  109. package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +1 -0
  110. package/components/apps/editor/settingsPanel/SelectedRunnable.svelte +1 -2
  111. package/components/apps/editor/settingsPanel/StylePanel.svelte +61 -0
  112. package/components/apps/editor/settingsPanel/StylePanel.svelte.d.ts +17 -0
  113. package/components/apps/editor/settingsPanel/TableActions.svelte +3 -3
  114. package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte +12 -12
  115. package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +3 -2
  116. package/components/apps/editor/settingsPanel/inputEditor/EvalInputEditor.svelte +5 -1
  117. package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte +3 -3
  118. package/components/apps/editor/settingsPanel/inputEditor/JsonEditor.svelte +3 -2
  119. package/components/apps/editor/settingsPanel/inputEditor/JsonEditor.svelte.d.ts +4 -1
  120. package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +2 -2
  121. package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte +47 -0
  122. package/components/apps/editor/settingsPanel/secondaryMenu/SecondaryMenu.svelte.d.ts +14 -0
  123. package/components/apps/editor/settingsPanel/secondaryMenu/index.d.ts +2 -0
  124. package/components/apps/editor/settingsPanel/secondaryMenu/index.js +2 -0
  125. package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.d.ts +12 -0
  126. package/components/apps/editor/settingsPanel/secondaryMenu/menuStore.js +10 -0
  127. package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte +1 -1
  128. package/components/apps/inputType.d.ts +2 -2
  129. package/components/apps/rx.d.ts +2 -2
  130. package/components/apps/svelte-grid/Grid.svelte +50 -34
  131. package/components/apps/svelte-grid/Grid.svelte.d.ts +14 -9
  132. package/components/apps/svelte-grid/MoveResize.svelte +76 -55
  133. package/components/apps/svelte-grid/MoveResize.svelte.d.ts +15 -9
  134. package/components/apps/svelte-grid/utils/helper.d.ts +0 -1
  135. package/components/apps/svelte-grid/utils/helper.js +0 -3
  136. package/components/apps/types.d.ts +9 -5
  137. package/components/apps/utils.d.ts +2 -0
  138. package/components/apps/utils.js +31 -1
  139. package/components/common/button/ButtonPopup.svelte +5 -2
  140. package/components/common/button/ButtonPopup.svelte.d.ts +5 -1
  141. package/components/common/button/ButtonPopupItem.svelte +2 -1
  142. package/components/common/button/ButtonPopupItem.svelte.d.ts +1 -0
  143. package/components/common/clearableInput/ClearableInput.svelte +56 -0
  144. package/components/common/clearableInput/ClearableInput.svelte.d.ts +28 -0
  145. package/components/common/index.d.ts +1 -0
  146. package/components/common/index.js +1 -0
  147. package/components/common/kbd/Kbd.svelte +4 -1
  148. package/components/common/kbd/Kbd.svelte.d.ts +6 -14
  149. package/components/common/menu/Menu.svelte +8 -2
  150. package/components/common/menu/Menu.svelte.d.ts +4 -1
  151. package/components/common/modal/AlwaysMountedModal.svelte +109 -0
  152. package/components/common/modal/AlwaysMountedModal.svelte.d.ts +22 -0
  153. package/components/flows/map/MapItem.svelte +3 -3
  154. package/components/scriptEditor/LogPanel.svelte +3 -3
  155. package/infer.js +6 -1
  156. package/package.json +11 -2
  157. package/utils.d.ts +1 -0
  158. package/utils.js +3 -0
  159. package/components/apps/editor/contextPanel/components/MinMaxButton.svelte +0 -25
  160. package/components/apps/editor/contextPanel/components/MinMaxButton.svelte.d.ts +0 -16
@@ -0,0 +1,130 @@
1
+ <script>import { createEventDispatcher, getContext } from 'svelte';
2
+ import { Button, ClearableInput, Menu } from '../../../common';
3
+ import Popover from '../../../Popover.svelte';
4
+ import ColorInput from '../settingsPanel/inputEditor/ColorInput.svelte';
5
+ import { StylePropertyType, StylePropertyUnits, STYLE_STORE_KEY } from './quickStyleProperties';
6
+ export let prop;
7
+ export let value;
8
+ export let inline = false;
9
+ const styleStore = getContext(STYLE_STORE_KEY);
10
+ const dispatch = createEventDispatcher();
11
+ const key = prop.key;
12
+ const type = prop.value?.['type'];
13
+ let unit = StylePropertyUnits[0];
14
+ let internalValue;
15
+ $: internalValue = value ? +value.replace(unit, '') : '';
16
+ $: dispatch('change', value);
17
+ function updateValue(next) {
18
+ value = next ? next + unit : '';
19
+ }
20
+ function updateUnit(next) {
21
+ value = value?.replace(unit, next) || '';
22
+ unit = next;
23
+ }
24
+ </script>
25
+
26
+ <div class={inline && type !== StylePropertyType.color ? '' : 'w-full'}>
27
+ {#if prop.value['title']}
28
+ <div class="font-medium text-xs text-gray-500">
29
+ {prop.value['title']}
30
+ </div>
31
+ {/if}
32
+ <div class="flex gap-1">
33
+ {#if type === StylePropertyType.color}
34
+ <ColorInput bind:value />
35
+ {#each $styleStore.topColors as color}
36
+ <Popover placement="bottom" notClickable disapperTimoout={0} class="flex">
37
+ <Button
38
+ color="light"
39
+ size="xs"
40
+ variant="border"
41
+ btnClasses="!p-0 !w-[34px] !h-[34px]"
42
+ aria-label="Set {key} to {color}"
43
+ style={`background-color: ${color};`}
44
+ on:click={() => (value = color)}
45
+ />
46
+ <svelte:fragment slot="text">{color}</svelte:fragment>
47
+ </Popover>
48
+ {/each}
49
+ {:else if type === StylePropertyType.number}
50
+ <ClearableInput
51
+ type="number"
52
+ bind:value
53
+ step={prop.value?.['step'] || 1}
54
+ min={prop.value?.['min']}
55
+ max={prop.value?.['max']}
56
+ />
57
+ {:else if type === StylePropertyType.unit}
58
+ <ClearableInput
59
+ wrapperClass="flex items-center {inline ? '!grow-0' : ''}"
60
+ inputClass="!border-r-0 !rounded-r-none {inline ? '!w-[90px]' : ''}"
61
+ buttonClass="!right-9"
62
+ type="number"
63
+ value={internalValue}
64
+ on:change={({ detail }) => updateValue(detail)}
65
+ >
66
+ <Menu
67
+ let:close
68
+ noMinW
69
+ wrapperClasses="h-full bg-white rounded-r-md border-y border-r border-gray-300 pr-0.5"
70
+ popupClasses="!mt-0"
71
+ >
72
+ <button
73
+ slot="trigger"
74
+ type="button"
75
+ class="font-normal text-xs px-1 py-1.5 w-8 rounded mt-0.5 duration-200 hover:bg-gray-200/90"
76
+ >
77
+ {unit}
78
+ </button>
79
+ <ul class="bg-white rounded border py-1 overflow-auto">
80
+ {#each StylePropertyUnits as u}
81
+ <li class="w-full">
82
+ <Button
83
+ type="button"
84
+ color="light"
85
+ size="xs"
86
+ variant="contained"
87
+ btnClasses="!justify-start !rounded-none !w-full !px-3 !py-1.5"
88
+ on:click={() => {
89
+ updateUnit(u)
90
+ close()
91
+ }}
92
+ >
93
+ {u}
94
+ </Button>
95
+ </li>
96
+ {/each}
97
+ </ul>
98
+ </Menu>
99
+ </ClearableInput>
100
+ {:else if type === StylePropertyType.text}
101
+ {#each prop.value?.['options'] || [] as option}
102
+ <Popover placement="bottom" notClickable disapperTimoout={0}>
103
+ <Button
104
+ color={value === option.text ? 'dark' : 'light'}
105
+ size="xs"
106
+ variant={value === option.text ? 'contained' : 'border'}
107
+ btnClasses="!p-1 !min-w-[34px] !h-[34px]"
108
+ aria-label="Set {key} to {option.text}"
109
+ on:click={() => {
110
+ if (value === option.text) {
111
+ value = ''
112
+ } else {
113
+ value = option.text
114
+ }
115
+ }}
116
+ >
117
+ {#if typeof option.icon === 'string'}
118
+ {option.icon}
119
+ {:else}
120
+ <svelte:component this={option.icon} size={18} />
121
+ {/if}
122
+ </Button>
123
+ <svelte:fragment slot="text">{option.text}</svelte:fragment>
124
+ </Popover>
125
+ {:else}
126
+ <ClearableInput inputClass="min-w-[32px]" bind:value />
127
+ {/each}
128
+ {/if}
129
+ </div>
130
+ </div>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import { type StyleStoreValue } from './quickStyleProperties';
3
+ declare const __propDef: {
4
+ props: {
5
+ prop: StyleStoreValue['style'][number]['prop'];
6
+ value: string | undefined;
7
+ inline?: boolean | undefined;
8
+ };
9
+ events: {
10
+ change: CustomEvent<any>;
11
+ } & {
12
+ [evt: string]: CustomEvent<any>;
13
+ };
14
+ slots: {};
15
+ };
16
+ export type QuickStylePropertyProps = typeof __propDef.props;
17
+ export type QuickStylePropertyEvents = typeof __propDef.events;
18
+ export type QuickStylePropertySlots = typeof __propDef.slots;
19
+ export default class QuickStyleProperty extends SvelteComponentTyped<QuickStylePropertyProps, QuickStylePropertyEvents, QuickStylePropertySlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,535 @@
1
+ import { AlignCenter, AlignJustify, AlignLeft, AlignRight, Asterisk, Eye, EyeOff, Grid, Italic, Mouse, MousePointer, Pointer, RectangleHorizontal, Slash, Square, StretchVertical, Strikethrough, Type, Underline } from 'lucide-svelte';
2
+ import type { components } from '../component';
3
+ export declare const STYLE_STORE_KEY: "style_store";
4
+ export type StyleStore = ReturnType<typeof createStyleStore>;
5
+ export type StyleStoreValue = {
6
+ style: {
7
+ prop: (typeof StyleProperty)[number];
8
+ value: string | undefined;
9
+ }[];
10
+ topColors: TopColors;
11
+ };
12
+ export declare function createStyleStore(properties: StylePropertyKey[]): {
13
+ subscribe: (this: void, run: import("svelte/store").Subscriber<StyleStoreValue>, invalidate?: ((value?: StyleStoreValue | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
14
+ set: (this: void, value: StyleStoreValue) => void;
15
+ update: (this: void, updater: import("svelte/store").Updater<StyleStoreValue>) => void;
16
+ updatePropValue: (key: StylePropertyKey, value?: string) => void;
17
+ getProp(key: StylePropertyKey): {
18
+ prop: {
19
+ prop: {
20
+ readonly key: "display";
21
+ readonly value: {
22
+ readonly type: StylePropertyType.text;
23
+ readonly options: readonly [{
24
+ readonly text: "block";
25
+ readonly icon: typeof Square;
26
+ }, {
27
+ readonly text: "inline-block";
28
+ readonly icon: typeof RectangleHorizontal;
29
+ }, {
30
+ readonly text: "flex";
31
+ readonly icon: typeof StretchVertical;
32
+ }, {
33
+ readonly text: "grid";
34
+ readonly icon: typeof Grid;
35
+ }];
36
+ };
37
+ } | {
38
+ readonly key: "padding";
39
+ readonly value: readonly [{
40
+ readonly type: StylePropertyType.unit;
41
+ readonly title: "top";
42
+ }, {
43
+ readonly type: StylePropertyType.unit;
44
+ readonly title: "right";
45
+ }, {
46
+ readonly type: StylePropertyType.unit;
47
+ readonly title: "bottom";
48
+ }, {
49
+ readonly type: StylePropertyType.unit;
50
+ readonly title: "left";
51
+ }];
52
+ } | {
53
+ readonly key: "opacity";
54
+ readonly value: {
55
+ readonly type: StylePropertyType.number;
56
+ readonly step: 0.1;
57
+ readonly min: 0;
58
+ readonly max: 1;
59
+ };
60
+ } | {
61
+ readonly key: "cursor";
62
+ readonly value: {
63
+ readonly type: StylePropertyType.text;
64
+ readonly options: readonly [{
65
+ readonly text: "default";
66
+ readonly icon: typeof MousePointer;
67
+ }, {
68
+ readonly text: "pointer";
69
+ readonly icon: typeof Pointer;
70
+ }];
71
+ };
72
+ } | {
73
+ readonly key: "width";
74
+ readonly value: {
75
+ readonly type: StylePropertyType.unit;
76
+ };
77
+ } | {
78
+ readonly key: "min-width";
79
+ readonly value: {
80
+ readonly type: StylePropertyType.unit;
81
+ };
82
+ } | {
83
+ readonly key: "max-width";
84
+ readonly value: {
85
+ readonly type: StylePropertyType.unit;
86
+ };
87
+ } | {
88
+ readonly key: "height";
89
+ readonly value: {
90
+ readonly type: StylePropertyType.unit;
91
+ };
92
+ } | {
93
+ readonly key: "min-height";
94
+ readonly value: {
95
+ readonly type: StylePropertyType.unit;
96
+ };
97
+ } | {
98
+ readonly key: "max-height";
99
+ readonly value: {
100
+ readonly type: StylePropertyType.unit;
101
+ };
102
+ } | {
103
+ readonly key: "border";
104
+ readonly value: readonly [{
105
+ readonly type: StylePropertyType.unit;
106
+ readonly title: "width";
107
+ }, {
108
+ readonly type: StylePropertyType.text;
109
+ readonly title: "style";
110
+ readonly options: readonly [{
111
+ readonly text: "solid";
112
+ readonly icon: "___";
113
+ }, {
114
+ readonly text: "dashed";
115
+ readonly icon: "_ _";
116
+ }, {
117
+ readonly text: "dotted";
118
+ readonly icon: ". .";
119
+ }];
120
+ }, {
121
+ readonly type: StylePropertyType.color;
122
+ readonly title: "color";
123
+ }];
124
+ } | {
125
+ readonly key: "border-radius";
126
+ readonly value: {
127
+ readonly type: StylePropertyType.unit;
128
+ };
129
+ } | {
130
+ readonly key: "box-shadow";
131
+ readonly value: readonly [{
132
+ readonly type: StylePropertyType.unit;
133
+ readonly title: "offset-x";
134
+ }, {
135
+ readonly type: StylePropertyType.unit;
136
+ readonly title: "offset-y";
137
+ }, {
138
+ readonly type: StylePropertyType.unit;
139
+ readonly title: "blur";
140
+ }, {
141
+ readonly type: StylePropertyType.unit;
142
+ readonly title: "spread";
143
+ }, {
144
+ readonly type: StylePropertyType.color;
145
+ readonly title: "color";
146
+ }];
147
+ } | {
148
+ readonly key: "background-color";
149
+ readonly value: {
150
+ readonly type: StylePropertyType.color;
151
+ };
152
+ } | {
153
+ readonly key: "color";
154
+ readonly value: {
155
+ readonly type: StylePropertyType.color;
156
+ };
157
+ } | {
158
+ readonly key: "font-size";
159
+ readonly value: {
160
+ readonly type: StylePropertyType.unit;
161
+ };
162
+ } | {
163
+ readonly key: "font-family";
164
+ readonly value: {
165
+ readonly type: StylePropertyType.text;
166
+ };
167
+ } | {
168
+ readonly key: "font-weight";
169
+ readonly value: {
170
+ readonly type: StylePropertyType.number;
171
+ };
172
+ } | {
173
+ readonly key: "font-style";
174
+ readonly value: {
175
+ readonly type: StylePropertyType.text;
176
+ readonly options: readonly [{
177
+ readonly text: "normal";
178
+ readonly icon: typeof Type;
179
+ }, {
180
+ readonly text: "italic";
181
+ readonly icon: typeof Italic;
182
+ }];
183
+ };
184
+ } | {
185
+ readonly key: "text-align";
186
+ readonly value: {
187
+ readonly type: StylePropertyType.text;
188
+ readonly options: readonly [{
189
+ readonly text: "left";
190
+ readonly icon: typeof AlignLeft;
191
+ }, {
192
+ readonly text: "center";
193
+ readonly icon: typeof AlignCenter;
194
+ }, {
195
+ readonly text: "right";
196
+ readonly icon: typeof AlignRight;
197
+ }, {
198
+ readonly text: "justify";
199
+ readonly icon: typeof AlignJustify;
200
+ }];
201
+ };
202
+ } | {
203
+ readonly key: "text-decoration";
204
+ readonly value: {
205
+ readonly type: StylePropertyType.text;
206
+ readonly options: readonly [{
207
+ readonly text: "none";
208
+ readonly icon: typeof Slash;
209
+ }, {
210
+ readonly text: "underline";
211
+ readonly icon: typeof Underline;
212
+ }, {
213
+ readonly text: "line-through";
214
+ readonly icon: typeof Strikethrough;
215
+ }];
216
+ };
217
+ } | {
218
+ readonly key: "text-transform";
219
+ readonly value: {
220
+ readonly type: StylePropertyType.text;
221
+ readonly options: readonly [{
222
+ readonly text: "none";
223
+ readonly icon: typeof Slash;
224
+ }, {
225
+ readonly text: "capitalize";
226
+ readonly icon: "Aa";
227
+ }, {
228
+ readonly text: "uppercase";
229
+ readonly icon: "AA";
230
+ }, {
231
+ readonly text: "lowercase";
232
+ readonly icon: "aa";
233
+ }];
234
+ };
235
+ } | {
236
+ readonly key: "line-height";
237
+ readonly value: {
238
+ readonly type: StylePropertyType.unit;
239
+ };
240
+ } | {
241
+ readonly key: "letter-spacing";
242
+ readonly value: {
243
+ readonly type: StylePropertyType.unit;
244
+ };
245
+ } | {
246
+ readonly key: "word-spacing";
247
+ readonly value: {
248
+ readonly type: StylePropertyType.unit;
249
+ };
250
+ } | {
251
+ readonly key: "overflow";
252
+ readonly value: {
253
+ readonly type: StylePropertyType.text;
254
+ readonly options: readonly [{
255
+ readonly text: "auto";
256
+ readonly icon: typeof Asterisk;
257
+ }, {
258
+ readonly text: "visible";
259
+ readonly icon: typeof Eye;
260
+ }, {
261
+ readonly text: "hidden";
262
+ readonly icon: typeof EyeOff;
263
+ }, {
264
+ readonly text: "scroll";
265
+ readonly icon: typeof Mouse;
266
+ }];
267
+ };
268
+ };
269
+ value: string | undefined;
270
+ };
271
+ index: number | undefined;
272
+ };
273
+ resetStyle: () => void;
274
+ setTopColors: (colors: TopColors) => void;
275
+ };
276
+ export declare enum StylePropertyType {
277
+ 'color' = "color",
278
+ 'unit' = "unit",
279
+ 'number' = "number",
280
+ 'text' = "text"
281
+ }
282
+ export declare const StylePropertyUnits: string[];
283
+ export type TopColors = [] | [string] | [string, string] | [string, string, string];
284
+ export type StylePropertyKey = (typeof StyleProperty)[number]['key'];
285
+ export declare const StyleProperty: readonly [{
286
+ readonly key: "display";
287
+ readonly value: {
288
+ readonly type: StylePropertyType.text;
289
+ readonly options: readonly [{
290
+ readonly text: "block";
291
+ readonly icon: typeof Square;
292
+ }, {
293
+ readonly text: "inline-block";
294
+ readonly icon: typeof RectangleHorizontal;
295
+ }, {
296
+ readonly text: "flex";
297
+ readonly icon: typeof StretchVertical;
298
+ }, {
299
+ readonly text: "grid";
300
+ readonly icon: typeof Grid;
301
+ }];
302
+ };
303
+ }, {
304
+ readonly key: "padding";
305
+ readonly value: readonly [{
306
+ readonly type: StylePropertyType.unit;
307
+ readonly title: "top";
308
+ }, {
309
+ readonly type: StylePropertyType.unit;
310
+ readonly title: "right";
311
+ }, {
312
+ readonly type: StylePropertyType.unit;
313
+ readonly title: "bottom";
314
+ }, {
315
+ readonly type: StylePropertyType.unit;
316
+ readonly title: "left";
317
+ }];
318
+ }, {
319
+ readonly key: "opacity";
320
+ readonly value: {
321
+ readonly type: StylePropertyType.number;
322
+ readonly step: 0.1;
323
+ readonly min: 0;
324
+ readonly max: 1;
325
+ };
326
+ }, {
327
+ readonly key: "cursor";
328
+ readonly value: {
329
+ readonly type: StylePropertyType.text;
330
+ readonly options: readonly [{
331
+ readonly text: "default";
332
+ readonly icon: typeof MousePointer;
333
+ }, {
334
+ readonly text: "pointer";
335
+ readonly icon: typeof Pointer;
336
+ }];
337
+ };
338
+ }, {
339
+ readonly key: "width";
340
+ readonly value: {
341
+ readonly type: StylePropertyType.unit;
342
+ };
343
+ }, {
344
+ readonly key: "min-width";
345
+ readonly value: {
346
+ readonly type: StylePropertyType.unit;
347
+ };
348
+ }, {
349
+ readonly key: "max-width";
350
+ readonly value: {
351
+ readonly type: StylePropertyType.unit;
352
+ };
353
+ }, {
354
+ readonly key: "height";
355
+ readonly value: {
356
+ readonly type: StylePropertyType.unit;
357
+ };
358
+ }, {
359
+ readonly key: "min-height";
360
+ readonly value: {
361
+ readonly type: StylePropertyType.unit;
362
+ };
363
+ }, {
364
+ readonly key: "max-height";
365
+ readonly value: {
366
+ readonly type: StylePropertyType.unit;
367
+ };
368
+ }, {
369
+ readonly key: "border";
370
+ readonly value: readonly [{
371
+ readonly type: StylePropertyType.unit;
372
+ readonly title: "width";
373
+ }, {
374
+ readonly type: StylePropertyType.text;
375
+ readonly title: "style";
376
+ readonly options: readonly [{
377
+ readonly text: "solid";
378
+ readonly icon: "___";
379
+ }, {
380
+ readonly text: "dashed";
381
+ readonly icon: "_ _";
382
+ }, {
383
+ readonly text: "dotted";
384
+ readonly icon: ". .";
385
+ }];
386
+ }, {
387
+ readonly type: StylePropertyType.color;
388
+ readonly title: "color";
389
+ }];
390
+ }, {
391
+ readonly key: "border-radius";
392
+ readonly value: {
393
+ readonly type: StylePropertyType.unit;
394
+ };
395
+ }, {
396
+ readonly key: "box-shadow";
397
+ readonly value: readonly [{
398
+ readonly type: StylePropertyType.unit;
399
+ readonly title: "offset-x";
400
+ }, {
401
+ readonly type: StylePropertyType.unit;
402
+ readonly title: "offset-y";
403
+ }, {
404
+ readonly type: StylePropertyType.unit;
405
+ readonly title: "blur";
406
+ }, {
407
+ readonly type: StylePropertyType.unit;
408
+ readonly title: "spread";
409
+ }, {
410
+ readonly type: StylePropertyType.color;
411
+ readonly title: "color";
412
+ }];
413
+ }, {
414
+ readonly key: "background-color";
415
+ readonly value: {
416
+ readonly type: StylePropertyType.color;
417
+ };
418
+ }, {
419
+ readonly key: "color";
420
+ readonly value: {
421
+ readonly type: StylePropertyType.color;
422
+ };
423
+ }, {
424
+ readonly key: "font-size";
425
+ readonly value: {
426
+ readonly type: StylePropertyType.unit;
427
+ };
428
+ }, {
429
+ readonly key: "font-family";
430
+ readonly value: {
431
+ readonly type: StylePropertyType.text;
432
+ };
433
+ }, {
434
+ readonly key: "font-weight";
435
+ readonly value: {
436
+ readonly type: StylePropertyType.number;
437
+ };
438
+ }, {
439
+ readonly key: "font-style";
440
+ readonly value: {
441
+ readonly type: StylePropertyType.text;
442
+ readonly options: readonly [{
443
+ readonly text: "normal";
444
+ readonly icon: typeof Type;
445
+ }, {
446
+ readonly text: "italic";
447
+ readonly icon: typeof Italic;
448
+ }];
449
+ };
450
+ }, {
451
+ readonly key: "text-align";
452
+ readonly value: {
453
+ readonly type: StylePropertyType.text;
454
+ readonly options: readonly [{
455
+ readonly text: "left";
456
+ readonly icon: typeof AlignLeft;
457
+ }, {
458
+ readonly text: "center";
459
+ readonly icon: typeof AlignCenter;
460
+ }, {
461
+ readonly text: "right";
462
+ readonly icon: typeof AlignRight;
463
+ }, {
464
+ readonly text: "justify";
465
+ readonly icon: typeof AlignJustify;
466
+ }];
467
+ };
468
+ }, {
469
+ readonly key: "text-decoration";
470
+ readonly value: {
471
+ readonly type: StylePropertyType.text;
472
+ readonly options: readonly [{
473
+ readonly text: "none";
474
+ readonly icon: typeof Slash;
475
+ }, {
476
+ readonly text: "underline";
477
+ readonly icon: typeof Underline;
478
+ }, {
479
+ readonly text: "line-through";
480
+ readonly icon: typeof Strikethrough;
481
+ }];
482
+ };
483
+ }, {
484
+ readonly key: "text-transform";
485
+ readonly value: {
486
+ readonly type: StylePropertyType.text;
487
+ readonly options: readonly [{
488
+ readonly text: "none";
489
+ readonly icon: typeof Slash;
490
+ }, {
491
+ readonly text: "capitalize";
492
+ readonly icon: "Aa";
493
+ }, {
494
+ readonly text: "uppercase";
495
+ readonly icon: "AA";
496
+ }, {
497
+ readonly text: "lowercase";
498
+ readonly icon: "aa";
499
+ }];
500
+ };
501
+ }, {
502
+ readonly key: "line-height";
503
+ readonly value: {
504
+ readonly type: StylePropertyType.unit;
505
+ };
506
+ }, {
507
+ readonly key: "letter-spacing";
508
+ readonly value: {
509
+ readonly type: StylePropertyType.unit;
510
+ };
511
+ }, {
512
+ readonly key: "word-spacing";
513
+ readonly value: {
514
+ readonly type: StylePropertyType.unit;
515
+ };
516
+ }, {
517
+ readonly key: "overflow";
518
+ readonly value: {
519
+ readonly type: StylePropertyType.text;
520
+ readonly options: readonly [{
521
+ readonly text: "auto";
522
+ readonly icon: typeof Asterisk;
523
+ }, {
524
+ readonly text: "visible";
525
+ readonly icon: typeof Eye;
526
+ }, {
527
+ readonly text: "hidden";
528
+ readonly icon: typeof EyeOff;
529
+ }, {
530
+ readonly text: "scroll";
531
+ readonly icon: typeof Mouse;
532
+ }];
533
+ };
534
+ }];
535
+ export declare const quickStyleProperties: Record<keyof typeof components, Record<string, StylePropertyKey[]>>;