@placeholderco/placeholder-ui 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/editors/CodeMirror.svelte +295 -297
  2. package/dist/editors/tiptap/LinkActionMenu.svelte +6 -1
  3. package/dist/editors/tiptap/extensions/Alert.js +17 -17
  4. package/dist/editors/tiptap/extensions/Div.js +19 -19
  5. package/dist/editors/tiptap/extensions/Span.js +14 -14
  6. package/dist/editors/tiptap/toolbar/AlertButton.svelte +254 -253
  7. package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte +11 -11
  8. package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte +11 -11
  9. package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte +11 -11
  10. package/dist/editors/tiptap/toolbar/AlignRightButton.svelte +11 -11
  11. package/dist/editors/tiptap/toolbar/BoldButton.svelte +11 -11
  12. package/dist/editors/tiptap/toolbar/BulletListButton.svelte +11 -11
  13. package/dist/editors/tiptap/toolbar/CodeButton.svelte +11 -11
  14. package/dist/editors/tiptap/toolbar/ColorButton.svelte +265 -265
  15. package/dist/editors/tiptap/toolbar/DocumentButton.svelte +51 -51
  16. package/dist/editors/tiptap/toolbar/HeadingButton.svelte +21 -21
  17. package/dist/editors/tiptap/toolbar/HtmlButton.svelte +48 -52
  18. package/dist/editors/tiptap/toolbar/ImageButton.svelte +35 -39
  19. package/dist/editors/tiptap/toolbar/ItalicButton.svelte +11 -11
  20. package/dist/editors/tiptap/toolbar/LinkButton.svelte +249 -249
  21. package/dist/editors/tiptap/toolbar/OrderedListButton.svelte +11 -11
  22. package/dist/editors/tiptap/toolbar/RedoButton.svelte +11 -11
  23. package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte +11 -11
  24. package/dist/editors/tiptap/toolbar/SubscriptButton.svelte +11 -11
  25. package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte +11 -11
  26. package/dist/editors/tiptap/toolbar/TableButton.svelte +231 -224
  27. package/dist/editors/tiptap/toolbar/ToolbarButton.svelte +59 -65
  28. package/dist/editors/tiptap/toolbar/UnderlineButton.svelte +11 -11
  29. package/dist/editors/tiptap/toolbar/UndoButton.svelte +11 -11
  30. package/dist/form/Autocomplete.svelte +24 -22
  31. package/dist/form/AutocompleteMulti.svelte +24 -22
  32. package/dist/form/Checkbox.svelte +4 -4
  33. package/dist/form/Chips.svelte +15 -7
  34. package/dist/form/ColorPicker.svelte +5 -20
  35. package/dist/form/ComboBox.svelte +4 -4
  36. package/dist/form/ComboBoxItemBuilder.svelte +14 -32
  37. package/dist/form/ComboBoxMulti.svelte +7 -3
  38. package/dist/form/CronBuilder.svelte +32 -110
  39. package/dist/form/DatePicker.svelte +9 -28
  40. package/dist/form/DateRangePicker.svelte +46 -36
  41. package/dist/form/DateTimePicker.svelte +11 -30
  42. package/dist/form/Number.svelte +1 -3
  43. package/dist/form/RadioGroup.svelte +1 -3
  44. package/dist/form/Select.svelte +25 -28
  45. package/dist/form/SelectMulti.svelte +36 -38
  46. package/dist/form/StringArrayBuilder.svelte +1 -3
  47. package/dist/form/TextArea.svelte +5 -6
  48. package/dist/form/Textbox.svelte +10 -4
  49. package/dist/form/TimePicker.svelte +10 -4
  50. package/dist/icon/Icon.svelte +5 -1
  51. package/dist/index.d.ts +147 -146
  52. package/dist/index.js +78 -77
  53. package/dist/layout/CustomNavbar.svelte +1 -1
  54. package/dist/layout/NavbarItemDisplay.svelte +1 -1
  55. package/dist/layout/NavbarItemView.svelte +3 -1
  56. package/dist/layout/Sidenav.svelte +1 -1
  57. package/dist/models/ComboBoxItem.d.ts +4 -4
  58. package/dist/models/NotifyModel.js +0 -1
  59. package/dist/theme.svelte.d.ts +1 -1
  60. package/dist/theme.svelte.js +46 -22
  61. package/dist/ui/Accordion.svelte +1 -3
  62. package/dist/ui/Badge.svelte +4 -5
  63. package/dist/ui/Button.svelte +7 -1
  64. package/dist/ui/ContextMenu.svelte +5 -11
  65. package/dist/ui/Dialog.svelte +16 -3
  66. package/dist/ui/Dialog.svelte.d.ts +7 -1
  67. package/dist/ui/Dropdown.svelte +21 -10
  68. package/dist/ui/MultiSortable.svelte +1 -3
  69. package/dist/ui/Pagination.svelte +2 -2
  70. package/dist/ui/Popover.svelte +16 -37
  71. package/dist/ui/ProgressBar.svelte +1 -4
  72. package/dist/ui/ThemeSwitcher.svelte +2 -1
  73. package/dist/ui/Tooltip.svelte +1 -37
  74. package/dist/util/DateFunctions.js +1 -1
  75. package/dist/util/Floating.d.ts +70 -0
  76. package/dist/util/Floating.js +321 -0
  77. package/dist/util/NavigateTo.js +2 -2
  78. package/dist/util/Transitions.d.ts +1 -1
  79. package/dist/util/Transitions.js +1 -1
  80. package/package.json +1 -1
@@ -1,257 +1,257 @@
1
1
  <script lang="ts">
2
- import type { Editor } from '@tiptap/core'
3
- import ToolbarButton from './ToolbarButton.svelte'
4
- import { iconLink } from '../../../icon/index.js'
5
-
6
- interface Props {
7
- editor: Editor
8
- }
9
-
10
- let { editor }: Props = $props()
11
-
12
- let showLinkInput = $state(false)
13
- let linkUrl = $state('')
14
- let linkOpenInNewTab = $state(false)
15
- let linkInputElement: HTMLInputElement | undefined = $state()
16
- let linkDropdownElement: HTMLDivElement | undefined = $state()
17
-
18
- const toggleLink = () => {
19
- const attrs = editor.getAttributes('link')
20
- linkUrl = attrs?.href || ''
21
- linkOpenInNewTab = attrs?.target === '_blank'
22
- showLinkInput = !showLinkInput
23
-
24
- if (showLinkInput) {
25
- setTimeout(() => {
26
- linkInputElement?.focus()
27
- linkInputElement?.select()
28
- }, 0)
29
- }
30
- }
31
-
32
- const setLink = () => {
33
- if (linkUrl === '') {
34
- editor.chain().focus().extendMarkRange('link').unsetLink().run()
35
- } else {
36
- const linkAttrs: { href: string; target?: string; rel?: string } = { href: linkUrl }
37
- if (linkOpenInNewTab) {
38
- linkAttrs.target = '_blank'
39
- linkAttrs.rel = 'noopener noreferrer'
40
- }
41
- editor.chain().focus().extendMarkRange('link').setLink(linkAttrs).run()
42
- }
43
- showLinkInput = false
44
- linkUrl = ''
45
- linkOpenInNewTab = false
46
- }
47
-
48
- const updateLinkTarget = () => {
49
- if (!linkUrl) return
50
-
51
- const linkAttrs: { href: string; target?: string; rel?: string } = { href: linkUrl }
52
- if (linkOpenInNewTab) {
53
- linkAttrs.target = '_blank'
54
- linkAttrs.rel = 'noopener noreferrer'
55
- }
56
-
57
- if (editor.isActive('link')) {
58
- editor.chain().focus().extendMarkRange('link').setLink(linkAttrs).run()
59
- } else if (!editor.state.selection.empty) {
60
- editor.chain().focus().setLink(linkAttrs).run()
61
- }
62
- }
63
-
64
- const removeLink = () => {
65
- editor.chain().focus().extendMarkRange('link').unsetLink().run()
66
- showLinkInput = false
67
- linkUrl = ''
68
- linkOpenInNewTab = false
69
- }
70
-
71
- const handleLinkKeydown = (e: KeyboardEvent) => {
72
- if (e.key === 'Enter') {
73
- e.preventDefault()
74
- setLink()
75
- } else if (e.key === 'Escape') {
76
- showLinkInput = false
77
- linkUrl = ''
78
- linkOpenInNewTab = false
79
- }
80
- }
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconLink } from '../../../icon/index.js';
5
+
6
+ interface Props {
7
+ editor: Editor;
8
+ }
9
+
10
+ let { editor }: Props = $props();
11
+
12
+ let showLinkInput = $state(false);
13
+ let linkUrl = $state('');
14
+ let linkOpenInNewTab = $state(false);
15
+ let linkInputElement: HTMLInputElement | undefined = $state();
16
+ let linkDropdownElement: HTMLDivElement | undefined = $state();
17
+
18
+ const toggleLink = () => {
19
+ const attrs = editor.getAttributes('link');
20
+ linkUrl = attrs?.href || '';
21
+ linkOpenInNewTab = attrs?.target === '_blank';
22
+ showLinkInput = !showLinkInput;
23
+
24
+ if (showLinkInput) {
25
+ setTimeout(() => {
26
+ linkInputElement?.focus();
27
+ linkInputElement?.select();
28
+ }, 0);
29
+ }
30
+ };
31
+
32
+ const setLink = () => {
33
+ if (linkUrl === '') {
34
+ editor.chain().focus().extendMarkRange('link').unsetLink().run();
35
+ } else {
36
+ const linkAttrs: { href: string; target?: string; rel?: string } = { href: linkUrl };
37
+ if (linkOpenInNewTab) {
38
+ linkAttrs.target = '_blank';
39
+ linkAttrs.rel = 'noopener noreferrer';
40
+ }
41
+ editor.chain().focus().extendMarkRange('link').setLink(linkAttrs).run();
42
+ }
43
+ showLinkInput = false;
44
+ linkUrl = '';
45
+ linkOpenInNewTab = false;
46
+ };
47
+
48
+ const updateLinkTarget = () => {
49
+ if (!linkUrl) return;
50
+
51
+ const linkAttrs: { href: string; target?: string; rel?: string } = { href: linkUrl };
52
+ if (linkOpenInNewTab) {
53
+ linkAttrs.target = '_blank';
54
+ linkAttrs.rel = 'noopener noreferrer';
55
+ }
56
+
57
+ if (editor.isActive('link')) {
58
+ editor.chain().focus().extendMarkRange('link').setLink(linkAttrs).run();
59
+ } else if (!editor.state.selection.empty) {
60
+ editor.chain().focus().setLink(linkAttrs).run();
61
+ }
62
+ };
63
+
64
+ const removeLink = () => {
65
+ editor.chain().focus().extendMarkRange('link').unsetLink().run();
66
+ showLinkInput = false;
67
+ linkUrl = '';
68
+ linkOpenInNewTab = false;
69
+ };
70
+
71
+ const handleLinkKeydown = (e: KeyboardEvent) => {
72
+ if (e.key === 'Enter') {
73
+ e.preventDefault();
74
+ setLink();
75
+ } else if (e.key === 'Escape') {
76
+ showLinkInput = false;
77
+ linkUrl = '';
78
+ linkOpenInNewTab = false;
79
+ }
80
+ };
81
81
  </script>
82
82
 
83
83
  <div style="position: relative; display: inline-block;">
84
- <ToolbarButton
85
- icon={iconLink}
86
- title="Link"
87
- active={editor.isActive('link')}
88
- onclick={toggleLink}
89
- />
90
-
91
- {#if showLinkInput}
92
- <div class="link-dropdown" bind:this={linkDropdownElement}>
93
- <div class="link-input-row">
94
- <input
95
- type="text"
96
- bind:this={linkInputElement}
97
- bind:value={linkUrl}
98
- onkeydown={handleLinkKeydown}
99
- placeholder="Enter URL"
100
- class="link-input"
101
- />
102
- <button onclick={setLink} class="link-submit-button" title="Apply">✓</button>
103
- {#if editor.isActive('link')}
104
- <button onclick={removeLink} class="link-remove-button" title="Remove Link">✕</button>
105
- {/if}
106
- </div>
107
- <label class="link-checkbox-label">
108
- <input
109
- type="checkbox"
110
- bind:checked={linkOpenInNewTab}
111
- onchange={updateLinkTarget}
112
- class="link-checkbox"
113
- />
114
- <span>Open in new tab</span>
115
- </label>
116
- </div>
117
- {/if}
84
+ <ToolbarButton
85
+ icon={iconLink}
86
+ title="Link"
87
+ active={editor.isActive('link')}
88
+ onclick={toggleLink}
89
+ />
90
+
91
+ {#if showLinkInput}
92
+ <div class="link-dropdown" bind:this={linkDropdownElement}>
93
+ <div class="link-input-row">
94
+ <input
95
+ type="text"
96
+ bind:this={linkInputElement}
97
+ bind:value={linkUrl}
98
+ onkeydown={handleLinkKeydown}
99
+ placeholder="Enter URL"
100
+ class="link-input"
101
+ />
102
+ <button onclick={setLink} class="link-submit-button" title="Apply">✓</button>
103
+ {#if editor.isActive('link')}
104
+ <button onclick={removeLink} class="link-remove-button" title="Remove Link">✕</button>
105
+ {/if}
106
+ </div>
107
+ <label class="link-checkbox-label">
108
+ <input
109
+ type="checkbox"
110
+ bind:checked={linkOpenInNewTab}
111
+ onchange={updateLinkTarget}
112
+ class="link-checkbox"
113
+ />
114
+ <span>Open in new tab</span>
115
+ </label>
116
+ </div>
117
+ {/if}
118
118
  </div>
119
119
 
120
120
  <style>
121
- .link-dropdown {
122
- position: absolute;
123
- top: 100%;
124
- left: 0;
125
- margin-top: 4px;
126
- display: flex;
127
- flex-direction: column;
128
- gap: 8px;
129
- padding: 8px;
130
- background: var(--paper-body-bg);
131
- border: 1px solid var(--border-color);
132
- border-radius: 4px;
133
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
134
- z-index: 1000;
135
- min-width: 320px;
136
- }
137
-
138
- :global(.dark) .link-dropdown {
139
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
140
- }
141
-
142
- .link-input-row {
143
- display: flex;
144
- gap: 4px;
145
- }
146
-
147
- .link-input {
148
- flex: 1;
149
- padding: 6px 10px;
150
- border: 1px solid var(--border-color);
151
- border-radius: 4px;
152
- font-size: 14px;
153
- outline: none;
154
- font-family: inherit;
155
- background: var(--paper-body-bg);
156
- color: var(--text-color);
157
- }
158
-
159
- .link-input::placeholder {
160
- color: var(--placeholder-color);
161
- }
162
-
163
- .link-input:focus {
164
- border-color: var(--ui-primary);
165
- box-shadow: 0 0 0 2px rgba(var(--ui-primary-rgbc), 0.1);
166
- }
167
-
168
- :global(.dark) .link-input:focus {
169
- border-color: var(--ui-accent);
170
- box-shadow: 0 0 0 2px rgba(var(--ui-accent-rgbc), 0.1);
171
- }
172
-
173
- .link-checkbox-label {
174
- display: flex;
175
- align-items: center;
176
- gap: 6px;
177
- font-size: 14px;
178
- color: var(--text-color);
179
- cursor: pointer;
180
- user-select: none;
181
- }
182
-
183
- .link-checkbox {
184
- width: 16px;
185
- height: 16px;
186
- cursor: pointer;
187
- accent-color: var(--ui-primary);
188
- }
189
-
190
- :global(.dark) .link-checkbox {
191
- accent-color: var(--ui-accent);
192
- }
193
-
194
- .link-checkbox-label:hover {
195
- color: var(--ui-primary);
196
- }
197
-
198
- :global(.dark) .link-checkbox-label:hover {
199
- color: var(--ui-accent);
200
- }
201
-
202
- .link-submit-button {
203
- display: flex;
204
- align-items: center;
205
- justify-content: center;
206
- padding: 6px 12px;
207
- border: none;
208
- background: var(--ui-primary);
209
- color: white;
210
- border-radius: 4px;
211
- cursor: pointer;
212
- font-size: 16px;
213
- font-weight: bold;
214
- transition: background 0.15s ease;
215
- }
216
-
217
- .link-submit-button:hover {
218
- background: var(--ui-tertiary-dark);
219
- }
220
-
221
- :global(.dark) .link-submit-button {
222
- background: var(--ui-accent);
223
- color: var(--ui-primary);
224
- }
225
-
226
- :global(.dark) .link-submit-button:hover {
227
- background: var(--ui-accent-dark);
228
- }
229
-
230
- .link-remove-button {
231
- display: flex;
232
- align-items: center;
233
- justify-content: center;
234
- padding: 6px 12px;
235
- border: none;
236
- background: var(--ui-tertiary);
237
- color: var(--ui-primary);
238
- border-radius: 4px;
239
- cursor: pointer;
240
- font-size: 16px;
241
- font-weight: bold;
242
- transition: background 0.15s ease;
243
- }
244
-
245
- .link-remove-button:hover {
246
- background: var(--ui-tertiary-dark);
247
- }
248
-
249
- :global(.dark) .link-remove-button {
250
- background: var(--ui-accent);
251
- color: var(--ui-primary);
252
- }
253
-
254
- :global(.dark) .link-remove-button:hover {
255
- background: var(--ui-accent-dark);
256
- }
121
+ .link-dropdown {
122
+ position: absolute;
123
+ top: 100%;
124
+ left: 0;
125
+ margin-top: 4px;
126
+ display: flex;
127
+ flex-direction: column;
128
+ gap: 8px;
129
+ padding: 8px;
130
+ background: var(--paper-body-bg);
131
+ border: 1px solid var(--border-color);
132
+ border-radius: 4px;
133
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
134
+ z-index: 1000;
135
+ min-width: 320px;
136
+ }
137
+
138
+ :global(.dark) .link-dropdown {
139
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
140
+ }
141
+
142
+ .link-input-row {
143
+ display: flex;
144
+ gap: 4px;
145
+ }
146
+
147
+ .link-input {
148
+ flex: 1;
149
+ padding: 6px 10px;
150
+ border: 1px solid var(--border-color);
151
+ border-radius: 4px;
152
+ font-size: 14px;
153
+ outline: none;
154
+ font-family: inherit;
155
+ background: var(--paper-body-bg);
156
+ color: var(--text-color);
157
+ }
158
+
159
+ .link-input::placeholder {
160
+ color: var(--placeholder-color);
161
+ }
162
+
163
+ .link-input:focus {
164
+ border-color: var(--ui-primary);
165
+ box-shadow: 0 0 0 2px rgba(var(--ui-primary-rgbc), 0.1);
166
+ }
167
+
168
+ :global(.dark) .link-input:focus {
169
+ border-color: var(--ui-accent);
170
+ box-shadow: 0 0 0 2px rgba(var(--ui-accent-rgbc), 0.1);
171
+ }
172
+
173
+ .link-checkbox-label {
174
+ display: flex;
175
+ align-items: center;
176
+ gap: 6px;
177
+ font-size: 14px;
178
+ color: var(--text-color);
179
+ cursor: pointer;
180
+ user-select: none;
181
+ }
182
+
183
+ .link-checkbox {
184
+ width: 16px;
185
+ height: 16px;
186
+ cursor: pointer;
187
+ accent-color: var(--ui-primary);
188
+ }
189
+
190
+ :global(.dark) .link-checkbox {
191
+ accent-color: var(--ui-accent);
192
+ }
193
+
194
+ .link-checkbox-label:hover {
195
+ color: var(--ui-primary);
196
+ }
197
+
198
+ :global(.dark) .link-checkbox-label:hover {
199
+ color: var(--ui-accent);
200
+ }
201
+
202
+ .link-submit-button {
203
+ display: flex;
204
+ align-items: center;
205
+ justify-content: center;
206
+ padding: 6px 12px;
207
+ border: none;
208
+ background: var(--ui-primary);
209
+ color: white;
210
+ border-radius: 4px;
211
+ cursor: pointer;
212
+ font-size: 16px;
213
+ font-weight: bold;
214
+ transition: background 0.15s ease;
215
+ }
216
+
217
+ .link-submit-button:hover {
218
+ background: var(--ui-tertiary-dark);
219
+ }
220
+
221
+ :global(.dark) .link-submit-button {
222
+ background: var(--ui-accent);
223
+ color: var(--ui-primary);
224
+ }
225
+
226
+ :global(.dark) .link-submit-button:hover {
227
+ background: var(--ui-accent-dark);
228
+ }
229
+
230
+ .link-remove-button {
231
+ display: flex;
232
+ align-items: center;
233
+ justify-content: center;
234
+ padding: 6px 12px;
235
+ border: none;
236
+ background: var(--ui-tertiary);
237
+ color: var(--ui-primary);
238
+ border-radius: 4px;
239
+ cursor: pointer;
240
+ font-size: 16px;
241
+ font-weight: bold;
242
+ transition: background 0.15s ease;
243
+ }
244
+
245
+ .link-remove-button:hover {
246
+ background: var(--ui-tertiary-dark);
247
+ }
248
+
249
+ :global(.dark) .link-remove-button {
250
+ background: var(--ui-accent);
251
+ color: var(--ui-primary);
252
+ }
253
+
254
+ :global(.dark) .link-remove-button:hover {
255
+ background: var(--ui-accent-dark);
256
+ }
257
257
  </style>
@@ -1,18 +1,18 @@
1
1
  <script lang="ts">
2
- import type { Editor } from '@tiptap/core'
3
- import ToolbarButton from './ToolbarButton.svelte'
4
- import { iconListNumbers } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconListNumbers } from '../../../icon/index.js';
5
5
 
6
- interface Props {
7
- editor: Editor
8
- }
6
+ interface Props {
7
+ editor: Editor;
8
+ }
9
9
 
10
- let { editor }: Props = $props()
10
+ let { editor }: Props = $props();
11
11
  </script>
12
12
 
13
13
  <ToolbarButton
14
- icon={iconListNumbers}
15
- title="Numbered List"
16
- active={editor.isActive('orderedList')}
17
- onclick={() => editor.chain().focus().toggleOrderedList().run()}
14
+ icon={iconListNumbers}
15
+ title="Numbered List"
16
+ active={editor.isActive('orderedList')}
17
+ onclick={() => editor.chain().focus().toggleOrderedList().run()}
18
18
  />
@@ -1,18 +1,18 @@
1
1
  <script lang="ts">
2
- import type { Editor } from '@tiptap/core'
3
- import ToolbarButton from './ToolbarButton.svelte'
4
- import { iconArrowForwardUp } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconArrowForwardUp } from '../../../icon/index.js';
5
5
 
6
- interface Props {
7
- editor: Editor
8
- }
6
+ interface Props {
7
+ editor: Editor;
8
+ }
9
9
 
10
- let { editor }: Props = $props()
10
+ let { editor }: Props = $props();
11
11
  </script>
12
12
 
13
13
  <ToolbarButton
14
- icon={iconArrowForwardUp}
15
- title="Redo"
16
- disabled={!editor.can().redo()}
17
- onclick={() => editor.chain().focus().redo().run()}
14
+ icon={iconArrowForwardUp}
15
+ title="Redo"
16
+ disabled={!editor.can().redo()}
17
+ onclick={() => editor.chain().focus().redo().run()}
18
18
  />
@@ -1,18 +1,18 @@
1
1
  <script lang="ts">
2
- import type { Editor } from '@tiptap/core'
3
- import ToolbarButton from './ToolbarButton.svelte'
4
- import { iconStrikethrough } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconStrikethrough } from '../../../icon/index.js';
5
5
 
6
- interface Props {
7
- editor: Editor
8
- }
6
+ interface Props {
7
+ editor: Editor;
8
+ }
9
9
 
10
- let { editor }: Props = $props()
10
+ let { editor }: Props = $props();
11
11
  </script>
12
12
 
13
13
  <ToolbarButton
14
- icon={iconStrikethrough}
15
- title="Strikethrough"
16
- active={editor.isActive('strike')}
17
- onclick={() => editor.chain().focus().toggleStrike().run()}
14
+ icon={iconStrikethrough}
15
+ title="Strikethrough"
16
+ active={editor.isActive('strike')}
17
+ onclick={() => editor.chain().focus().toggleStrike().run()}
18
18
  />
@@ -1,18 +1,18 @@
1
1
  <script lang="ts">
2
- import type { Editor } from '@tiptap/core'
3
- import ToolbarButton from './ToolbarButton.svelte'
4
- import { iconSubscript } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconSubscript } from '../../../icon/index.js';
5
5
 
6
- interface Props {
7
- editor: Editor
8
- }
6
+ interface Props {
7
+ editor: Editor;
8
+ }
9
9
 
10
- let { editor }: Props = $props()
10
+ let { editor }: Props = $props();
11
11
  </script>
12
12
 
13
13
  <ToolbarButton
14
- icon={iconSubscript}
15
- title="Subscript"
16
- active={editor.isActive('subscript')}
17
- onclick={() => editor.chain().focus().toggleSubscript().run()}
14
+ icon={iconSubscript}
15
+ title="Subscript"
16
+ active={editor.isActive('subscript')}
17
+ onclick={() => editor.chain().focus().toggleSubscript().run()}
18
18
  />
@@ -1,18 +1,18 @@
1
1
  <script lang="ts">
2
- import type { Editor } from '@tiptap/core'
3
- import ToolbarButton from './ToolbarButton.svelte'
4
- import { iconSuperscript } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconSuperscript } from '../../../icon/index.js';
5
5
 
6
- interface Props {
7
- editor: Editor
8
- }
6
+ interface Props {
7
+ editor: Editor;
8
+ }
9
9
 
10
- let { editor }: Props = $props()
10
+ let { editor }: Props = $props();
11
11
  </script>
12
12
 
13
13
  <ToolbarButton
14
- icon={iconSuperscript}
15
- title="Superscript"
16
- active={editor.isActive('superscript')}
17
- onclick={() => editor.chain().focus().toggleSuperscript().run()}
14
+ icon={iconSuperscript}
15
+ title="Superscript"
16
+ active={editor.isActive('superscript')}
17
+ onclick={() => editor.chain().focus().toggleSuperscript().run()}
18
18
  />