@placeholderco/placeholder-ui 2.1.1 → 2.2.1

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 (87) hide show
  1. package/dist/app.css +0 -10
  2. package/dist/editors/CodeMirror.svelte +295 -297
  3. package/dist/editors/tiptap/LinkActionMenu.svelte +6 -1
  4. package/dist/editors/tiptap/TipTap.svelte +1 -1
  5. package/dist/editors/tiptap/extensions/Alert.js +17 -17
  6. package/dist/editors/tiptap/extensions/Div.js +19 -19
  7. package/dist/editors/tiptap/extensions/Span.js +14 -14
  8. package/dist/editors/tiptap/toolbar/AlertButton.svelte +254 -253
  9. package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte +11 -11
  10. package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte +11 -11
  11. package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte +11 -11
  12. package/dist/editors/tiptap/toolbar/AlignRightButton.svelte +11 -11
  13. package/dist/editors/tiptap/toolbar/BoldButton.svelte +11 -11
  14. package/dist/editors/tiptap/toolbar/BulletListButton.svelte +11 -11
  15. package/dist/editors/tiptap/toolbar/CodeButton.svelte +11 -11
  16. package/dist/editors/tiptap/toolbar/ColorButton.svelte +265 -265
  17. package/dist/editors/tiptap/toolbar/DocumentButton.svelte +51 -51
  18. package/dist/editors/tiptap/toolbar/HeadingButton.svelte +21 -21
  19. package/dist/editors/tiptap/toolbar/HtmlButton.svelte +48 -52
  20. package/dist/editors/tiptap/toolbar/ImageButton.svelte +35 -39
  21. package/dist/editors/tiptap/toolbar/ItalicButton.svelte +11 -11
  22. package/dist/editors/tiptap/toolbar/LinkButton.svelte +249 -249
  23. package/dist/editors/tiptap/toolbar/OrderedListButton.svelte +11 -11
  24. package/dist/editors/tiptap/toolbar/RedoButton.svelte +11 -11
  25. package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte +11 -11
  26. package/dist/editors/tiptap/toolbar/SubscriptButton.svelte +11 -11
  27. package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte +11 -11
  28. package/dist/editors/tiptap/toolbar/TableButton.svelte +231 -224
  29. package/dist/editors/tiptap/toolbar/ToolbarButton.svelte +59 -65
  30. package/dist/editors/tiptap/toolbar/UnderlineButton.svelte +11 -11
  31. package/dist/editors/tiptap/toolbar/UndoButton.svelte +11 -11
  32. package/dist/form/Autocomplete.svelte +24 -22
  33. package/dist/form/AutocompleteMulti.svelte +24 -22
  34. package/dist/form/Checkbox.svelte +4 -4
  35. package/dist/form/Chips.svelte +15 -7
  36. package/dist/form/ColorPicker.svelte +5 -20
  37. package/dist/form/ComboBox.svelte +4 -4
  38. package/dist/form/ComboBoxItemBuilder.svelte +14 -32
  39. package/dist/form/ComboBoxMulti.svelte +7 -3
  40. package/dist/form/CronBuilder.svelte +32 -110
  41. package/dist/form/DatePicker.svelte +9 -28
  42. package/dist/form/DateRangePicker.svelte +46 -36
  43. package/dist/form/DateTimePicker.svelte +11 -30
  44. package/dist/form/Number.svelte +1 -3
  45. package/dist/form/RadioGroup.svelte +1 -3
  46. package/dist/form/Select.svelte +25 -28
  47. package/dist/form/SelectMulti.svelte +36 -54
  48. package/dist/form/StringArrayBuilder.svelte +1 -3
  49. package/dist/form/TextArea.svelte +5 -6
  50. package/dist/form/Textbox.svelte +10 -4
  51. package/dist/form/TimePicker.svelte +10 -4
  52. package/dist/icon/Icon.svelte +8 -4
  53. package/dist/index.d.ts +147 -146
  54. package/dist/index.js +78 -77
  55. package/dist/layout/CustomNavbar.svelte +1 -1
  56. package/dist/layout/Navbar.svelte +3 -4
  57. package/dist/layout/Navbar.svelte.d.ts +1 -2
  58. package/dist/layout/NavbarItemDisplay.svelte +1 -1
  59. package/dist/layout/NavbarItemView.svelte +3 -1
  60. package/dist/layout/Sidenav.svelte +1 -1
  61. package/dist/models/ComboBoxItem.d.ts +4 -4
  62. package/dist/models/NotifyModel.js +0 -1
  63. package/dist/theme.svelte.d.ts +1 -1
  64. package/dist/theme.svelte.js +46 -22
  65. package/dist/ui/Accordion.svelte +1 -3
  66. package/dist/ui/AccordionItem.svelte +8 -16
  67. package/dist/ui/Badge.svelte +11 -19
  68. package/dist/ui/Button.svelte +15 -17
  69. package/dist/ui/ButtonVariant.d.ts +1 -7
  70. package/dist/ui/ContextMenu.svelte +5 -11
  71. package/dist/ui/Dialog.svelte +74 -30
  72. package/dist/ui/Dialog.svelte.d.ts +8 -2
  73. package/dist/ui/Dropdown.svelte +21 -10
  74. package/dist/ui/MultiSortable.svelte +1 -3
  75. package/dist/ui/Pagination.svelte +2 -2
  76. package/dist/ui/Popover.svelte +16 -37
  77. package/dist/ui/ProgressBar.svelte +4 -10
  78. package/dist/ui/ProgressBarVariant.d.ts +2 -7
  79. package/dist/ui/ThemeSwitcher.svelte +2 -1
  80. package/dist/ui/Tooltip.svelte +1 -37
  81. package/dist/util/DateFunctions.js +1 -1
  82. package/dist/util/Floating.d.ts +70 -0
  83. package/dist/util/Floating.js +321 -0
  84. package/dist/util/NavigateTo.js +2 -2
  85. package/dist/util/Transitions.d.ts +1 -1
  86. package/dist/util/Transitions.js +1 -1
  87. package/package.json +1 -1
@@ -1,261 +1,262 @@
1
1
  <script lang="ts">
2
- import type { Editor } from '@tiptap/core'
3
- import ToolbarButton from './ToolbarButton.svelte'
4
- import { iconAlertTriangle } from '../../../icon/index.js'
5
-
6
- interface Props {
7
- editor: Editor
8
- }
9
-
10
- let { editor }: Props = $props()
11
-
12
- let showDialog = $state(false)
13
- let dialogElement: HTMLDivElement | undefined = $state()
14
- let titleInputElement: HTMLInputElement | undefined = $state()
15
- let selectedVariant = $state('default')
16
- let alertTitle = $state('Alert')
17
-
18
- const variants = [
19
- { value: 'default', label: 'Default', color: 'var(--ui-accent)' },
20
- { value: 'warning', label: 'Warning', color: '#ffc107' },
21
- { value: 'danger', label: 'Danger', color: '#dc3545' }
22
- ]
23
-
24
- const toggleDialog = () => {
25
- showDialog = !showDialog
26
- if (showDialog) {
27
- // Focus and select the title input when dialog opens
28
- setTimeout(() => {
29
- titleInputElement?.focus()
30
- titleInputElement?.select()
31
- }, 0)
32
- }
33
- }
34
-
35
- const insertAlert = () => {
36
- editor
37
- .chain()
38
- .focus()
39
- .setAlert({
40
- variant: selectedVariant,
41
- title: alertTitle || 'Alert'
42
- })
43
- .run()
44
-
45
- showDialog = false
46
- // Reset to defaults
47
- selectedVariant = 'default'
48
- alertTitle = 'Alert'
49
- }
50
-
51
- const closeDialog = () => {
52
- showDialog = false
53
- selectedVariant = 'default'
54
- alertTitle = 'Alert'
55
- }
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconAlertTriangle } from '../../../icon/index.js';
5
+
6
+ interface Props {
7
+ editor: Editor;
8
+ }
9
+
10
+ let { editor }: Props = $props();
11
+
12
+ let showDialog = $state(false);
13
+ let dialogElement: HTMLDivElement | undefined = $state();
14
+ let titleInputElement: HTMLInputElement | undefined = $state();
15
+ let selectedVariant = $state('default');
16
+ let alertTitle = $state('Alert');
17
+
18
+ const variants = [
19
+ { value: 'default', label: 'Default', color: 'var(--ui-accent)' },
20
+ { value: 'warning', label: 'Warning', color: '#ffc107' },
21
+ { value: 'danger', label: 'Danger', color: '#dc3545' }
22
+ ];
23
+
24
+ const toggleDialog = () => {
25
+ showDialog = !showDialog;
26
+ if (showDialog) {
27
+ // Focus and select the title input when dialog opens
28
+ setTimeout(() => {
29
+ titleInputElement?.focus();
30
+ titleInputElement?.select();
31
+ }, 0);
32
+ }
33
+ };
34
+
35
+ const insertAlert = () => {
36
+ editor
37
+ .chain()
38
+ .focus()
39
+ .setAlert({
40
+ variant: selectedVariant,
41
+ title: alertTitle || 'Alert'
42
+ })
43
+ .run();
44
+
45
+ showDialog = false;
46
+ // Reset to defaults
47
+ selectedVariant = 'default';
48
+ alertTitle = 'Alert';
49
+ };
50
+
51
+ const closeDialog = () => {
52
+ showDialog = false;
53
+ selectedVariant = 'default';
54
+ alertTitle = 'Alert';
55
+ };
56
56
  </script>
57
57
 
58
58
  <div style="position: relative; display: inline-block;">
59
- <ToolbarButton
60
- icon={iconAlertTriangle}
61
- title="Insert Alert"
62
- active={showDialog}
63
- onclick={toggleDialog}
64
- />
65
-
66
- {#if showDialog}
67
- <div class="alert-dialog" bind:this={dialogElement}>
68
- <div class="dialog-header">
69
- <h4>Insert Alert</h4>
70
- </div>
71
-
72
- <div class="dialog-body">
73
- <div class="form-group">
74
- <label for="alert-title">Title</label>
75
- <input
76
- id="alert-title"
77
- type="text"
78
- bind:this={titleInputElement}
79
- bind:value={alertTitle}
80
- placeholder="Enter alert title"
81
- class="form-input"
82
- />
83
- </div>
84
-
85
- <div class="form-group">
86
- <label for="alert-variants">Variant</label>
87
- <div id="alert-variants" class="variant-grid" role="group" aria-label="Alert variant selection">
88
- {#each variants as variant}
89
- <button
90
- class="variant-button"
91
- class:active={selectedVariant === variant.value}
92
- style="border-left: 4px solid {variant.color}"
93
- onclick={() => (selectedVariant = variant.value)}
94
- type="button"
95
- >
96
- {variant.label}
97
- </button>
98
- {/each}
99
- </div>
100
- </div>
101
- </div>
102
-
103
- <div class="dialog-footer">
104
- <button class="btn btn-secondary" onclick={closeDialog} type="button">
105
- Cancel
106
- </button>
107
- <button class="btn btn-primary" onclick={insertAlert} type="button">
108
- Insert
109
- </button>
110
- </div>
111
- </div>
112
- {/if}
59
+ <ToolbarButton
60
+ icon={iconAlertTriangle}
61
+ title="Insert Alert"
62
+ active={showDialog}
63
+ onclick={toggleDialog}
64
+ />
65
+
66
+ {#if showDialog}
67
+ <div class="alert-dialog" bind:this={dialogElement}>
68
+ <div class="dialog-header">
69
+ <h4>Insert Alert</h4>
70
+ </div>
71
+
72
+ <div class="dialog-body">
73
+ <div class="form-group">
74
+ <label for="alert-title">Title</label>
75
+ <input
76
+ id="alert-title"
77
+ type="text"
78
+ bind:this={titleInputElement}
79
+ bind:value={alertTitle}
80
+ placeholder="Enter alert title"
81
+ class="form-input"
82
+ />
83
+ </div>
84
+
85
+ <div class="form-group">
86
+ <label for="alert-variants">Variant</label>
87
+ <div
88
+ id="alert-variants"
89
+ class="variant-grid"
90
+ role="group"
91
+ aria-label="Alert variant selection"
92
+ >
93
+ {#each variants as variant}
94
+ <button
95
+ class="variant-button"
96
+ class:active={selectedVariant === variant.value}
97
+ style="border-left: 4px solid {variant.color}"
98
+ onclick={() => (selectedVariant = variant.value)}
99
+ type="button"
100
+ >
101
+ {variant.label}
102
+ </button>
103
+ {/each}
104
+ </div>
105
+ </div>
106
+ </div>
107
+
108
+ <div class="dialog-footer">
109
+ <button class="btn btn-secondary" onclick={closeDialog} type="button"> Cancel </button>
110
+ <button class="btn btn-primary" onclick={insertAlert} type="button"> Insert </button>
111
+ </div>
112
+ </div>
113
+ {/if}
113
114
  </div>
114
115
 
115
116
  <style>
116
- .alert-dialog {
117
- position: absolute;
118
- top: 100%;
119
- right: 0;
120
- margin-top: 4px;
121
- display: flex;
122
- flex-direction: column;
123
- background: var(--paper-body-bg);
124
- border: 1px solid var(--border-color);
125
- border-radius: 6px;
126
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
127
- z-index: 1000;
128
- min-width: 300px;
129
- max-width: 350px;
130
- }
131
-
132
- :global(.dark) .alert-dialog {
133
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
134
- }
135
-
136
- .dialog-header {
137
- padding: 12px 16px;
138
- border-bottom: 1px solid var(--border-color);
139
- }
140
-
141
- .dialog-header h4 {
142
- margin: 0;
143
- font-size: 14px;
144
- font-weight: 600;
145
- color: var(--text-color);
146
- }
147
-
148
- .dialog-body {
149
- padding: 16px;
150
- display: flex;
151
- flex-direction: column;
152
- gap: 16px;
153
- }
154
-
155
- .form-group {
156
- display: flex;
157
- flex-direction: column;
158
- gap: 8px;
159
- }
160
-
161
- .form-group label {
162
- font-size: 12px;
163
- font-weight: 600;
164
- color: var(--text-color);
165
- }
166
-
167
- .form-input {
168
- padding: 8px 12px;
169
- border: 1px solid var(--border-color);
170
- border-radius: 4px;
171
- background: var(--input-bg);
172
- color: var(--text-color);
173
- font-size: 13px;
174
- font-family: inherit;
175
- }
176
-
177
- .form-input:focus {
178
- outline: none;
179
- border-color: var(--ui-primary);
180
- }
181
-
182
- :global(.dark) .form-input:focus {
183
- border-color: var(--ui-accent);
184
- }
185
-
186
- .variant-grid {
187
- display: flex;
188
- flex-direction: column;
189
- gap: 8px;
190
- }
191
-
192
- .variant-button {
193
- width: 100%;
194
- padding: 10px 12px;
195
- border: 1px solid var(--border-color);
196
- border-radius: 4px;
197
- background: var(--paper-body-bg);
198
- color: var(--text-color);
199
- font-size: 13px;
200
- font-weight: 500;
201
- cursor: pointer;
202
- transition: all 0.15s ease;
203
- text-align: left;
204
- }
205
-
206
- .variant-button:hover {
207
- background: var(--page-bg);
208
- }
209
-
210
- .variant-button.active {
211
- background: var(--page-bg);
212
- border-color: var(--ui-primary);
213
- font-weight: 600;
214
- }
215
-
216
- :global(.dark) .variant-button.active {
217
- border-color: var(--ui-accent);
218
- }
219
-
220
- .dialog-footer {
221
- padding: 12px 16px;
222
- border-top: 1px solid var(--border-color);
223
- display: flex;
224
- gap: 8px;
225
- justify-content: flex-end;
226
- }
227
-
228
- .btn {
229
- padding: 6px 16px;
230
- border: none;
231
- border-radius: 4px;
232
- font-size: 13px;
233
- font-weight: 500;
234
- cursor: pointer;
235
- transition: all 0.15s ease;
236
- }
237
-
238
- .btn-secondary {
239
- background: var(--page-bg);
240
- color: var(--text-color);
241
- border: 1px solid var(--border-color);
242
- }
243
-
244
- .btn-secondary:hover {
245
- background: var(--border-color);
246
- }
247
-
248
- .btn-primary {
249
- background: var(--ui-primary);
250
- color: var(--off-white);
251
- }
252
-
253
- .btn-primary:hover {
254
- opacity: 0.9;
255
- }
256
-
257
- :global(.dark) .btn-primary {
258
- background: var(--ui-accent);
259
- color: var(--ui-primary);
260
- }
117
+ .alert-dialog {
118
+ position: absolute;
119
+ top: 100%;
120
+ right: 0;
121
+ margin-top: 4px;
122
+ display: flex;
123
+ flex-direction: column;
124
+ background: var(--paper-body-bg);
125
+ border: 1px solid var(--border-color);
126
+ border-radius: 6px;
127
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
128
+ z-index: 1000;
129
+ min-width: 300px;
130
+ max-width: 350px;
131
+ }
132
+
133
+ :global(.dark) .alert-dialog {
134
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
135
+ }
136
+
137
+ .dialog-header {
138
+ padding: 12px 16px;
139
+ border-bottom: 1px solid var(--border-color);
140
+ }
141
+
142
+ .dialog-header h4 {
143
+ margin: 0;
144
+ font-size: 14px;
145
+ font-weight: 600;
146
+ color: var(--text-color);
147
+ }
148
+
149
+ .dialog-body {
150
+ padding: 16px;
151
+ display: flex;
152
+ flex-direction: column;
153
+ gap: 16px;
154
+ }
155
+
156
+ .form-group {
157
+ display: flex;
158
+ flex-direction: column;
159
+ gap: 8px;
160
+ }
161
+
162
+ .form-group label {
163
+ font-size: 12px;
164
+ font-weight: 600;
165
+ color: var(--text-color);
166
+ }
167
+
168
+ .form-input {
169
+ padding: 8px 12px;
170
+ border: 1px solid var(--border-color);
171
+ border-radius: 4px;
172
+ background: var(--input-bg);
173
+ color: var(--text-color);
174
+ font-size: 13px;
175
+ font-family: inherit;
176
+ }
177
+
178
+ .form-input:focus {
179
+ outline: none;
180
+ border-color: var(--ui-primary);
181
+ }
182
+
183
+ :global(.dark) .form-input:focus {
184
+ border-color: var(--ui-accent);
185
+ }
186
+
187
+ .variant-grid {
188
+ display: flex;
189
+ flex-direction: column;
190
+ gap: 8px;
191
+ }
192
+
193
+ .variant-button {
194
+ width: 100%;
195
+ padding: 10px 12px;
196
+ border: 1px solid var(--border-color);
197
+ border-radius: 4px;
198
+ background: var(--paper-body-bg);
199
+ color: var(--text-color);
200
+ font-size: 13px;
201
+ font-weight: 500;
202
+ cursor: pointer;
203
+ transition: all 0.15s ease;
204
+ text-align: left;
205
+ }
206
+
207
+ .variant-button:hover {
208
+ background: var(--page-bg);
209
+ }
210
+
211
+ .variant-button.active {
212
+ background: var(--page-bg);
213
+ border-color: var(--ui-primary);
214
+ font-weight: 600;
215
+ }
216
+
217
+ :global(.dark) .variant-button.active {
218
+ border-color: var(--ui-accent);
219
+ }
220
+
221
+ .dialog-footer {
222
+ padding: 12px 16px;
223
+ border-top: 1px solid var(--border-color);
224
+ display: flex;
225
+ gap: 8px;
226
+ justify-content: flex-end;
227
+ }
228
+
229
+ .btn {
230
+ padding: 6px 16px;
231
+ border: none;
232
+ border-radius: 4px;
233
+ font-size: 13px;
234
+ font-weight: 500;
235
+ cursor: pointer;
236
+ transition: all 0.15s ease;
237
+ }
238
+
239
+ .btn-secondary {
240
+ background: var(--page-bg);
241
+ color: var(--text-color);
242
+ border: 1px solid var(--border-color);
243
+ }
244
+
245
+ .btn-secondary:hover {
246
+ background: var(--border-color);
247
+ }
248
+
249
+ .btn-primary {
250
+ background: var(--ui-primary);
251
+ color: var(--off-white);
252
+ }
253
+
254
+ .btn-primary:hover {
255
+ opacity: 0.9;
256
+ }
257
+
258
+ :global(.dark) .btn-primary {
259
+ background: var(--ui-accent);
260
+ color: var(--ui-primary);
261
+ }
261
262
  </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 { iconAlignCenter } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconAlignCenter } 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={iconAlignCenter}
15
- title="Align Center"
16
- active={editor.isActive({ textAlign: 'center' })}
17
- onclick={() => editor.chain().focus().setTextAlign('center').run()}
14
+ icon={iconAlignCenter}
15
+ title="Align Center"
16
+ active={editor.isActive({ textAlign: 'center' })}
17
+ onclick={() => editor.chain().focus().setTextAlign('center').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 { iconAlignJustified } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconAlignJustified } 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={iconAlignJustified}
15
- title="Justify"
16
- active={editor.isActive({ textAlign: 'justify' })}
17
- onclick={() => editor.chain().focus().setTextAlign('justify').run()}
14
+ icon={iconAlignJustified}
15
+ title="Justify"
16
+ active={editor.isActive({ textAlign: 'justify' })}
17
+ onclick={() => editor.chain().focus().setTextAlign('justify').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 { iconAlignLeft } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconAlignLeft } 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={iconAlignLeft}
15
- title="Align Left"
16
- active={editor.isActive({ textAlign: 'left' })}
17
- onclick={() => editor.chain().focus().setTextAlign('left').run()}
14
+ icon={iconAlignLeft}
15
+ title="Align Left"
16
+ active={editor.isActive({ textAlign: 'left' })}
17
+ onclick={() => editor.chain().focus().setTextAlign('left').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 { iconAlignRight } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconAlignRight } 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={iconAlignRight}
15
- title="Align Right"
16
- active={editor.isActive({ textAlign: 'right' })}
17
- onclick={() => editor.chain().focus().setTextAlign('right').run()}
14
+ icon={iconAlignRight}
15
+ title="Align Right"
16
+ active={editor.isActive({ textAlign: 'right' })}
17
+ onclick={() => editor.chain().focus().setTextAlign('right').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 { iconBold } from '../../../icon/index.js'
2
+ import type { Editor } from '@tiptap/core';
3
+ import ToolbarButton from './ToolbarButton.svelte';
4
+ import { iconBold } 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={iconBold}
15
- title="Bold"
16
- active={editor.isActive('bold')}
17
- onclick={() => editor.chain().focus().toggleBold().run()}
14
+ icon={iconBold}
15
+ title="Bold"
16
+ active={editor.isActive('bold')}
17
+ onclick={() => editor.chain().focus().toggleBold().run()}
18
18
  />