@x33025/sveltely 0.1.17 → 0.1.19
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.
- package/dist/actions/LoaderOverlay.svelte +33 -8
- package/dist/actions/LoaderOverlay.svelte.d.ts +3 -0
- package/dist/actions/loader.d.ts +3 -0
- package/dist/actions/loader.js +20 -7
- package/dist/components/Library/AnimatedNumber/AnimatedNumber.demo.svelte +3 -9
- package/dist/components/Library/ArticleEditor/ArticleEditor.svelte +3 -3
- package/dist/components/Library/ArticleEditor/ArticleEditorBody.svelte +59 -74
- package/dist/components/Library/ArticleEditor/ArticleEditorHeader.svelte +21 -31
- package/dist/components/Library/ArticleEditor/{ArticleBlockCode.svelte → Blocks/Code.svelte} +2 -3
- package/dist/components/Library/ArticleEditor/Blocks/Code.svelte.d.ts +8 -0
- package/dist/components/Library/ArticleEditor/{ArticleBlockFAQ.svelte → Blocks/FAQ.svelte} +3 -3
- package/dist/components/Library/ArticleEditor/Blocks/FAQ.svelte.d.ts +8 -0
- package/dist/components/Library/ArticleEditor/{ArticleBlockHeading.svelte → Blocks/Heading.svelte} +9 -9
- package/dist/components/Library/ArticleEditor/{ArticleBlockHeading.svelte.d.ts → Blocks/Heading.svelte.d.ts} +4 -4
- package/dist/components/Library/ArticleEditor/Blocks/Image.svelte +32 -0
- package/dist/components/Library/ArticleEditor/Blocks/Image.svelte.d.ts +10 -0
- package/dist/components/Library/ArticleEditor/{ArticleBlockList.svelte → Blocks/List.svelte} +4 -4
- package/dist/components/Library/ArticleEditor/{ArticleBlockList.svelte.d.ts → Blocks/List.svelte.d.ts} +4 -4
- package/dist/components/Library/ArticleEditor/{ArticleBlockParagraph.svelte → Blocks/Paragraph.svelte} +3 -3
- package/dist/components/Library/ArticleEditor/{ArticleBlockFallback.svelte.d.ts → Blocks/Paragraph.svelte.d.ts} +4 -4
- package/dist/components/Library/ArticleEditor/{ArticleBlockTable.svelte → Blocks/Table.svelte} +1 -1
- package/dist/components/Library/ArticleEditor/{ArticleBlockTable.svelte.d.ts → Blocks/Table.svelte.d.ts} +4 -4
- package/dist/components/Library/ArticleEditor/Blocks/index.d.ts +7 -0
- package/dist/components/Library/ArticleEditor/Blocks/index.js +7 -0
- package/dist/components/Library/ArticleEditor/index.d.ts +1 -9
- package/dist/components/Library/ArticleEditor/index.js +1 -9
- package/dist/components/Library/AsyncButton/AsyncButton.demo.svelte +2 -6
- package/dist/components/Library/AsyncButton/AsyncButton.svelte +9 -5
- package/dist/components/Library/AsyncButton/AsyncButton.svelte.d.ts +2 -1
- package/dist/components/Library/Button/Button.demo.svelte +2 -17
- package/dist/components/Library/Button/Button.demo.svelte.d.ts +0 -1
- package/dist/components/Library/Button/Button.svelte +15 -16
- package/dist/components/Library/Button/Button.svelte.d.ts +2 -1
- package/dist/components/Library/Calendar/Calendar.svelte +17 -27
- package/dist/components/Library/Checkbox/Checkbox.demo.svelte +7 -4
- package/dist/components/Library/Checkbox/Checkbox.svelte +24 -61
- package/dist/components/Library/Checkbox/Checkbox.svelte.d.ts +2 -4
- package/dist/components/Library/ChipInput/ChipInput.demo.svelte +2 -2
- package/dist/components/Library/ChipInput/ChipInput.svelte +7 -11
- package/dist/components/Library/ChipInput/ChipInput.svelte.d.ts +3 -2
- package/dist/components/Library/Dropdown/Action.svelte +1 -1
- package/dist/components/Library/Dropdown/Dropdown.demo.svelte +10 -10
- package/dist/components/Library/Dropdown/Dropdown.svelte +2 -6
- package/dist/components/Library/Dropdown/Item.svelte +2 -2
- package/dist/components/Library/Dropdown/Section.svelte +1 -1
- package/dist/components/Library/Dropdown/Trigger.svelte +3 -7
- package/dist/components/Library/Image/Image.demo.svelte +3 -3
- package/dist/components/Library/Image/Image.svelte +57 -12
- package/dist/components/Library/Image/Image.svelte.d.ts +1 -2
- package/dist/components/Library/Image/ImagePlaceholder.demo.svelte +12 -0
- package/dist/components/Library/Image/ImagePlaceholder.demo.svelte.d.ts +23 -0
- package/dist/components/Library/Image/ImagePlaceholder.svelte +28 -4
- package/dist/components/Library/Image/ImagePlaceholder.svelte.d.ts +1 -1
- package/dist/components/Library/Image/index.d.ts +1 -0
- package/dist/components/Library/Image/index.js +1 -0
- package/dist/components/Library/ImageMask/BrushPreview.svelte +6 -6
- package/dist/components/Library/ImageMask/ImageMask.demo.svelte +10 -8
- package/dist/components/Library/ImageMask/ImageMask.svelte +14 -6
- package/dist/components/Library/ImageMask/ImageMask.svelte.d.ts +1 -2
- package/dist/components/Library/ImageMask/MaskLayer.svelte +12 -6
- package/dist/components/Library/Label/Label.demo.svelte +9 -3
- package/dist/components/Library/Label/Label.svelte +8 -2
- package/dist/components/Library/Link/Link.svelte +10 -22
- package/dist/components/Library/Link/Link.svelte.d.ts +2 -3
- package/dist/components/Library/Loader/Loader.demo.svelte +9 -3
- package/dist/components/Library/NavigationStack/Link.svelte +8 -12
- package/dist/components/Library/NavigationStack/Link.svelte.d.ts +1 -3
- package/dist/components/Library/NavigationStack/SidebarToggle.svelte +8 -2
- package/dist/components/Library/NumberField/NumberField.svelte +21 -17
- package/dist/components/Library/NumberField/NumberField.svelte.d.ts +4 -2
- package/dist/components/Library/Pagination/Pagination.svelte +3 -3
- package/dist/components/Library/Popover/Popover.svelte +2 -7
- package/dist/components/Library/ScrollView/ScrollView.demo.svelte +50 -0
- package/dist/components/Library/ScrollView/ScrollView.demo.svelte.d.ts +10 -0
- package/dist/components/Library/ScrollView/ScrollView.svelte +414 -67
- package/dist/components/Library/ScrollView/ScrollView.svelte.d.ts +17 -1
- package/dist/components/Library/ScrollView/index.d.ts +1 -1
- package/dist/components/Library/SearchField/SearchField.demo.svelte +2 -2
- package/dist/components/Library/SearchField/SearchField.svelte +9 -4
- package/dist/components/Library/SearchField/SearchField.svelte.d.ts +2 -1
- package/dist/components/Library/SegmentedPicker/SegmentedPicker.demo.svelte +2 -2
- package/dist/components/Library/SegmentedPicker/SegmentedPicker.svelte +7 -7
- package/dist/components/Library/Sheet/Sheet.demo.svelte +1 -1
- package/dist/components/Library/Sheet/Sheet.svelte +2 -7
- package/dist/components/Library/Slider/Slider.demo.svelte +1 -1
- package/dist/components/Library/Slider/Slider.svelte +11 -7
- package/dist/components/Library/Slider/Slider.svelte.d.ts +2 -1
- package/dist/components/Library/Spinner/Spinner.demo.svelte +1 -1
- package/dist/components/Library/Switch/Switch.demo.svelte +7 -4
- package/dist/components/Library/Switch/Switch.svelte +28 -68
- package/dist/components/Library/Switch/Switch.svelte.d.ts +2 -4
- package/dist/components/Library/Table/Column.svelte +81 -0
- package/dist/components/Library/Table/Column.svelte.d.ts +39 -0
- package/dist/components/Library/Table/Table.demo.svelte +148 -0
- package/dist/components/Library/Table/Table.demo.svelte.d.ts +10 -0
- package/dist/components/Library/Table/Table.svelte +624 -0
- package/dist/components/Library/Table/Table.svelte.d.ts +42 -0
- package/dist/components/Library/Table/context.d.ts +5 -0
- package/dist/components/Library/Table/context.js +2 -0
- package/dist/components/Library/Table/index.js +5 -0
- package/dist/components/Library/Table/types.d.ts +37 -0
- package/dist/components/Library/Table/types.js +1 -0
- package/dist/components/Library/Text/Text.demo.svelte +21 -0
- package/dist/components/Library/Text/Text.demo.svelte.d.ts +24 -0
- package/dist/components/Library/Text/Text.svelte +41 -0
- package/dist/components/Library/Text/Text.svelte.d.ts +9 -0
- package/dist/components/Library/Text/index.d.ts +1 -0
- package/dist/components/Library/Text/index.js +1 -0
- package/dist/components/Library/TextEditor/TextEditor.svelte +15 -9
- package/dist/components/Library/TextEditor/TextEditor.svelte.d.ts +2 -4
- package/dist/components/Library/TextField/TextField.demo.svelte +1 -1
- package/dist/components/Library/TextField/TextField.svelte +21 -18
- package/dist/components/Library/TextField/TextField.svelte.d.ts +4 -2
- package/dist/components/Library/TextShimmer/TextShimmer.demo.svelte +1 -1
- package/dist/components/Library/TimePicker/TimePicker.demo.svelte +10 -2
- package/dist/components/Library/TimePicker/TimePicker.svelte +10 -5
- package/dist/components/Library/TokenSearchField/TokenSearchField.demo.svelte +4 -2
- package/dist/components/Library/TokenSearchField/TokenSearchField.svelte +11 -11
- package/dist/components/Library/TokenSearchField/TokenSearchField.svelte.d.ts +2 -1
- package/dist/components/Library/WheelPicker/WheelColumn.svelte +183 -126
- package/dist/components/Library/WheelPicker/WheelPicker.svelte +4 -4
- package/dist/components/Library/WheelPicker/WheelPicker.svelte.d.ts +2 -2
- package/dist/components/Library/WheelPicker/index.d.ts +1 -1
- package/dist/components/Library/WheelPicker/types.d.ts +6 -0
- package/dist/components/Local/ColorStyleControls.svelte +201 -0
- package/dist/components/Local/ColorStyleControls.svelte.d.ts +13 -0
- package/dist/components/Local/HeroCard.svelte +3 -3
- package/dist/components/Local/LayoutStyleControls.svelte +67 -0
- package/dist/components/Local/LayoutStyleControls.svelte.d.ts +11 -0
- package/dist/components/Local/StyleControls.svelte +48 -124
- package/dist/components/Local/StyleControls.svelte.d.ts +7 -5
- package/dist/index.d.ts +9 -2
- package/dist/index.js +5 -1
- package/dist/style/index.css +7 -12
- package/dist/style/label.d.ts +2 -1
- package/dist/style/label.js +2 -1
- package/dist/style/surface.js +4 -0
- package/dist/style/text-editor.d.ts +2 -13
- package/dist/style/text-editor.js +1 -12
- package/dist/style/text.d.ts +26 -0
- package/dist/style/text.js +69 -0
- package/dist/style/tooltip.d.ts +4 -0
- package/dist/style/tooltip.js +1 -0
- package/dist/style.css +41 -114
- package/package.json +1 -1
- package/dist/components/Library/ArticleEditor/ArticleBlockCode.svelte.d.ts +0 -8
- package/dist/components/Library/ArticleEditor/ArticleBlockFAQ.svelte.d.ts +0 -8
- package/dist/components/Library/ArticleEditor/ArticleBlockFallback.svelte +0 -79
- package/dist/components/Library/ArticleEditor/ArticleBlockImage.svelte +0 -48
- package/dist/components/Library/ArticleEditor/ArticleBlockImage.svelte.d.ts +0 -9
- package/dist/components/Library/ArticleEditor/ArticleBlockParagraph.svelte.d.ts +0 -15
- package/dist/components/Library/ArticleEditor/ArticleImagePreview.svelte +0 -71
- package/dist/components/Library/ArticleEditor/ArticleImagePreview.svelte.d.ts +0 -8
package/dist/style.css
CHANGED
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
--color-blue-500: oklch(62.3% 0.214 259.815);
|
|
14
14
|
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
15
15
|
--color-gray-700: oklch(37.3% 0.034 259.733);
|
|
16
|
+
--color-zinc-50: oklch(98.5% 0 0);
|
|
16
17
|
--color-zinc-100: oklch(96.7% 0.001 286.375);
|
|
17
18
|
--color-zinc-200: oklch(92% 0.004 286.32);
|
|
18
19
|
--color-zinc-300: oklch(87.1% 0.006 286.286);
|
|
20
|
+
--color-zinc-400: oklch(70.5% 0.015 286.067);
|
|
19
21
|
--color-zinc-500: oklch(55.2% 0.016 285.938);
|
|
20
|
-
--color-zinc-700: oklch(37% 0.013 285.805);
|
|
21
22
|
--color-zinc-900: oklch(21% 0.006 285.885);
|
|
22
23
|
--color-zinc-950: oklch(14.1% 0.005 285.823);
|
|
23
24
|
--color-black: #000;
|
|
@@ -30,19 +31,11 @@
|
|
|
30
31
|
--text-xs--line-height: calc(1 / 0.75);
|
|
31
32
|
--text-sm: 0.875rem;
|
|
32
33
|
--text-sm--line-height: calc(1.25 / 0.875);
|
|
33
|
-
--text-xl: 1.25rem;
|
|
34
|
-
--text-xl--line-height: calc(1.75 / 1.25);
|
|
35
|
-
--text-2xl: 1.5rem;
|
|
36
|
-
--text-2xl--line-height: calc(2 / 1.5);
|
|
37
34
|
--text-3xl: 1.875rem;
|
|
38
35
|
--text-3xl--line-height: calc(2.25 / 1.875);
|
|
39
|
-
--text-4xl: 2.25rem;
|
|
40
|
-
--text-4xl--line-height: calc(2.5 / 2.25);
|
|
41
36
|
--font-weight-medium: 500;
|
|
42
37
|
--font-weight-semibold: 600;
|
|
43
38
|
--tracking-tight: -0.025em;
|
|
44
|
-
--tracking-wide: 0.025em;
|
|
45
|
-
--leading-tight: 1.25;
|
|
46
39
|
--radius-md: 0.375rem;
|
|
47
40
|
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
48
41
|
--animate-spin: spin 1s linear infinite;
|
|
@@ -276,6 +269,12 @@
|
|
|
276
269
|
.table {
|
|
277
270
|
display: table;
|
|
278
271
|
}
|
|
272
|
+
.table-cell {
|
|
273
|
+
display: table-cell;
|
|
274
|
+
}
|
|
275
|
+
.table-row {
|
|
276
|
+
display: table-row;
|
|
277
|
+
}
|
|
279
278
|
.aspect-square {
|
|
280
279
|
aspect-ratio: 1 / 1;
|
|
281
280
|
}
|
|
@@ -290,9 +289,6 @@
|
|
|
290
289
|
.h-5 {
|
|
291
290
|
height: calc(var(--spacing) * 5);
|
|
292
291
|
}
|
|
293
|
-
.h-10 {
|
|
294
|
-
height: calc(var(--spacing) * 10);
|
|
295
|
-
}
|
|
296
292
|
.h-36 {
|
|
297
293
|
height: calc(var(--spacing) * 36);
|
|
298
294
|
}
|
|
@@ -356,9 +352,6 @@
|
|
|
356
352
|
.animate-spin {
|
|
357
353
|
animation: var(--animate-spin);
|
|
358
354
|
}
|
|
359
|
-
.cursor-pointer {
|
|
360
|
-
cursor: pointer;
|
|
361
|
-
}
|
|
362
355
|
.touch-none {
|
|
363
356
|
touch-action: none;
|
|
364
357
|
}
|
|
@@ -417,13 +410,6 @@
|
|
|
417
410
|
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
|
418
411
|
}
|
|
419
412
|
}
|
|
420
|
-
.space-y-2 {
|
|
421
|
-
:where(& > :not(:last-child)) {
|
|
422
|
-
--tw-space-y-reverse: 0;
|
|
423
|
-
margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));
|
|
424
|
-
margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
413
|
.space-y-4 {
|
|
428
414
|
:where(& > :not(:last-child)) {
|
|
429
415
|
--tw-space-y-reverse: 0;
|
|
@@ -496,18 +482,12 @@
|
|
|
496
482
|
.bg-zinc-200 {
|
|
497
483
|
background-color: var(--color-zinc-200);
|
|
498
484
|
}
|
|
499
|
-
.bg-zinc-950 {
|
|
500
|
-
background-color: var(--color-zinc-950);
|
|
501
|
-
}
|
|
502
485
|
.object-contain {
|
|
503
486
|
object-fit: contain;
|
|
504
487
|
}
|
|
505
488
|
.object-cover {
|
|
506
489
|
object-fit: cover;
|
|
507
490
|
}
|
|
508
|
-
.p-1 {
|
|
509
|
-
padding: calc(var(--spacing) * 1);
|
|
510
|
-
}
|
|
511
491
|
.p-3 {
|
|
512
492
|
padding: calc(var(--spacing) * 3);
|
|
513
493
|
}
|
|
@@ -517,15 +497,9 @@
|
|
|
517
497
|
.px-2 {
|
|
518
498
|
padding-inline: calc(var(--spacing) * 2);
|
|
519
499
|
}
|
|
520
|
-
.px-4 {
|
|
521
|
-
padding-inline: calc(var(--spacing) * 4);
|
|
522
|
-
}
|
|
523
500
|
.py-1 {
|
|
524
501
|
padding-block: calc(var(--spacing) * 1);
|
|
525
502
|
}
|
|
526
|
-
.py-4 {
|
|
527
|
-
padding-block: calc(var(--spacing) * 4);
|
|
528
|
-
}
|
|
529
503
|
.pb-4 {
|
|
530
504
|
padding-bottom: calc(var(--spacing) * 4);
|
|
531
505
|
}
|
|
@@ -538,62 +512,29 @@
|
|
|
538
512
|
.text-left {
|
|
539
513
|
text-align: left;
|
|
540
514
|
}
|
|
541
|
-
.font-mono {
|
|
542
|
-
font-family: var(--font-mono);
|
|
543
|
-
}
|
|
544
|
-
.text-2xl {
|
|
545
|
-
font-size: var(--text-2xl);
|
|
546
|
-
line-height: var(--tw-leading, var(--text-2xl--line-height));
|
|
547
|
-
}
|
|
548
515
|
.text-3xl {
|
|
549
516
|
font-size: var(--text-3xl);
|
|
550
517
|
line-height: var(--tw-leading, var(--text-3xl--line-height));
|
|
551
518
|
}
|
|
552
|
-
.text-4xl {
|
|
553
|
-
font-size: var(--text-4xl);
|
|
554
|
-
line-height: var(--tw-leading, var(--text-4xl--line-height));
|
|
555
|
-
}
|
|
556
519
|
.text-sm {
|
|
557
520
|
font-size: var(--text-sm);
|
|
558
521
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
559
522
|
}
|
|
560
|
-
.text-xl {
|
|
561
|
-
font-size: var(--text-xl);
|
|
562
|
-
line-height: var(--tw-leading, var(--text-xl--line-height));
|
|
563
|
-
}
|
|
564
523
|
.text-xs {
|
|
565
524
|
font-size: var(--text-xs);
|
|
566
525
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
567
526
|
}
|
|
568
|
-
.text-\[15px\] {
|
|
569
|
-
font-size: 15px;
|
|
570
|
-
}
|
|
571
|
-
.text-\[16px\] {
|
|
572
|
-
font-size: 16px;
|
|
573
|
-
}
|
|
574
527
|
.text-\[17px\] {
|
|
575
528
|
font-size: 17px;
|
|
576
529
|
}
|
|
577
|
-
.leading-6 {
|
|
578
|
-
--tw-leading: calc(var(--spacing) * 6);
|
|
579
|
-
line-height: calc(var(--spacing) * 6);
|
|
580
|
-
}
|
|
581
530
|
.leading-7 {
|
|
582
531
|
--tw-leading: calc(var(--spacing) * 7);
|
|
583
532
|
line-height: calc(var(--spacing) * 7);
|
|
584
533
|
}
|
|
585
|
-
.leading-8 {
|
|
586
|
-
--tw-leading: calc(var(--spacing) * 8);
|
|
587
|
-
line-height: calc(var(--spacing) * 8);
|
|
588
|
-
}
|
|
589
534
|
.leading-none {
|
|
590
535
|
--tw-leading: 1;
|
|
591
536
|
line-height: 1;
|
|
592
537
|
}
|
|
593
|
-
.leading-tight {
|
|
594
|
-
--tw-leading: var(--leading-tight);
|
|
595
|
-
line-height: var(--leading-tight);
|
|
596
|
-
}
|
|
597
538
|
.font-medium {
|
|
598
539
|
--tw-font-weight: var(--font-weight-medium);
|
|
599
540
|
font-weight: var(--font-weight-medium);
|
|
@@ -602,30 +543,18 @@
|
|
|
602
543
|
--tw-font-weight: var(--font-weight-semibold);
|
|
603
544
|
font-weight: var(--font-weight-semibold);
|
|
604
545
|
}
|
|
605
|
-
.tracking-\[-0\.03em\] {
|
|
606
|
-
--tw-tracking: -0.03em;
|
|
607
|
-
letter-spacing: -0.03em;
|
|
608
|
-
}
|
|
609
|
-
.tracking-\[-0\.025em\] {
|
|
610
|
-
--tw-tracking: -0.025em;
|
|
611
|
-
letter-spacing: -0.025em;
|
|
612
|
-
}
|
|
613
546
|
.tracking-tight {
|
|
614
547
|
--tw-tracking: var(--tracking-tight);
|
|
615
548
|
letter-spacing: var(--tracking-tight);
|
|
616
549
|
}
|
|
617
|
-
.tracking-wide {
|
|
618
|
-
--tw-tracking: var(--tracking-wide);
|
|
619
|
-
letter-spacing: var(--tracking-wide);
|
|
620
|
-
}
|
|
621
550
|
.whitespace-nowrap {
|
|
622
551
|
white-space: nowrap;
|
|
623
552
|
}
|
|
624
|
-
.text-\[var\(--sveltely-primary-color\)\] {
|
|
625
|
-
color: var(--sveltely-primary-color);
|
|
553
|
+
.text-\[var\(--sveltely-text-primary-color\)\] {
|
|
554
|
+
color: var(--sveltely-text-primary-color);
|
|
626
555
|
}
|
|
627
|
-
.text-\[var\(--sveltely-secondary-color\)\] {
|
|
628
|
-
color: var(--sveltely-secondary-color);
|
|
556
|
+
.text-\[var\(--sveltely-text-secondary-color\)\] {
|
|
557
|
+
color: var(--sveltely-text-secondary-color);
|
|
629
558
|
}
|
|
630
559
|
.text-gray-700 {
|
|
631
560
|
color: var(--color-gray-700);
|
|
@@ -633,22 +562,19 @@
|
|
|
633
562
|
.text-red-600 {
|
|
634
563
|
color: var(--color-red-600);
|
|
635
564
|
}
|
|
636
|
-
.text-zinc-100 {
|
|
637
|
-
color: var(--color-zinc-100);
|
|
638
|
-
}
|
|
639
|
-
.text-zinc-700 {
|
|
640
|
-
color: var(--color-zinc-700);
|
|
641
|
-
}
|
|
642
565
|
.text-zinc-950 {
|
|
643
566
|
color: var(--color-zinc-950);
|
|
644
567
|
}
|
|
645
|
-
.uppercase {
|
|
646
|
-
text-transform: uppercase;
|
|
647
|
-
}
|
|
648
568
|
.tabular-nums {
|
|
649
569
|
--tw-numeric-spacing: tabular-nums;
|
|
650
570
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
651
571
|
}
|
|
572
|
+
.opacity-0 {
|
|
573
|
+
opacity: 0%;
|
|
574
|
+
}
|
|
575
|
+
.opacity-100 {
|
|
576
|
+
opacity: 100%;
|
|
577
|
+
}
|
|
652
578
|
.outline {
|
|
653
579
|
outline-style: var(--tw-outline-style);
|
|
654
580
|
outline-width: 1px;
|
|
@@ -701,6 +627,15 @@
|
|
|
701
627
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
702
628
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
703
629
|
}
|
|
630
|
+
.transition-opacity {
|
|
631
|
+
transition-property: opacity;
|
|
632
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
633
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
634
|
+
}
|
|
635
|
+
.duration-150 {
|
|
636
|
+
--tw-duration: 150ms;
|
|
637
|
+
transition-duration: 150ms;
|
|
638
|
+
}
|
|
704
639
|
.ease-in-out {
|
|
705
640
|
--tw-ease: var(--ease-in-out);
|
|
706
641
|
transition-timing-function: var(--ease-in-out);
|
|
@@ -823,9 +758,9 @@
|
|
|
823
758
|
background-color: var(--color-zinc-200);
|
|
824
759
|
}
|
|
825
760
|
}
|
|
826
|
-
.disabled\:text-\[var\(--sveltely-secondary-color\)\] {
|
|
761
|
+
.disabled\:text-\[var\(--sveltely-text-secondary-color\)\] {
|
|
827
762
|
&:disabled {
|
|
828
|
-
color: var(--sveltely-secondary-color);
|
|
763
|
+
color: var(--sveltely-text-secondary-color);
|
|
829
764
|
}
|
|
830
765
|
}
|
|
831
766
|
.disabled\:opacity-50 {
|
|
@@ -853,23 +788,13 @@
|
|
|
853
788
|
--sveltely-padding-x: 0.75rem;
|
|
854
789
|
--sveltely-padding-y: 0.75rem;
|
|
855
790
|
--sveltely-gap: 0.5rem;
|
|
856
|
-
--sveltely-primary-color: var(--color-zinc-900);
|
|
857
|
-
--sveltely-secondary-color: var(--color-zinc-500);
|
|
858
|
-
--sveltely-
|
|
859
|
-
--sveltely-inactive-color: var(--color-zinc-100);
|
|
791
|
+
--sveltely-text-primary-color: var(--color-zinc-900);
|
|
792
|
+
--sveltely-text-secondary-color: var(--color-zinc-500);
|
|
793
|
+
--sveltely-text-tertiary-color: var(--color-zinc-400);
|
|
860
794
|
--sveltely-background-color: white;
|
|
861
|
-
--sveltely-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
}
|
|
865
|
-
--sveltely-inactive-hover-color: var(--sveltely-inactive-color);
|
|
866
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
867
|
-
--sveltely-inactive-hover-color: color-mix(in oklab, var(--sveltely-inactive-color) 88%, white);
|
|
868
|
-
}
|
|
869
|
-
--sveltely-active-hover-color: var(--sveltely-active-color);
|
|
870
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
871
|
-
--sveltely-active-hover-color: color-mix(in oklab, var(--sveltely-active-color) 88%, white);
|
|
872
|
-
}
|
|
795
|
+
--sveltely-control-active-color: var(--color-zinc-900);
|
|
796
|
+
--sveltely-control-inactive-color: var(--color-zinc-100);
|
|
797
|
+
--sveltely-control-background-color: var(--color-zinc-50);
|
|
873
798
|
--sveltely-shadow: 0 16px 40px rgb(0 0 0 / 0.12), 0 4px 14px rgb(0 0 0 / 0.08);
|
|
874
799
|
--sveltely-border-radius-nested: clamp(
|
|
875
800
|
0px,
|
|
@@ -883,7 +808,7 @@
|
|
|
883
808
|
height: 100%;
|
|
884
809
|
overflow: hidden;
|
|
885
810
|
background: var(--sveltely-background-color);
|
|
886
|
-
color: var(--sveltely-primary-color);
|
|
811
|
+
color: var(--sveltely-text-primary-color);
|
|
887
812
|
-webkit-user-select: none;
|
|
888
813
|
user-select: none;
|
|
889
814
|
}
|
|
@@ -895,9 +820,6 @@
|
|
|
895
820
|
appearance: none;
|
|
896
821
|
background-clip: padding-box;
|
|
897
822
|
}
|
|
898
|
-
button {
|
|
899
|
-
cursor: pointer;
|
|
900
|
-
}
|
|
901
823
|
button:disabled {
|
|
902
824
|
cursor: not-allowed;
|
|
903
825
|
}
|
|
@@ -1099,6 +1021,10 @@
|
|
|
1099
1021
|
syntax: "*";
|
|
1100
1022
|
inherits: false;
|
|
1101
1023
|
}
|
|
1024
|
+
@property --tw-duration {
|
|
1025
|
+
syntax: "*";
|
|
1026
|
+
inherits: false;
|
|
1027
|
+
}
|
|
1102
1028
|
@property --tw-ease {
|
|
1103
1029
|
syntax: "*";
|
|
1104
1030
|
inherits: false;
|
|
@@ -1149,6 +1075,7 @@
|
|
|
1149
1075
|
--tw-backdrop-opacity: initial;
|
|
1150
1076
|
--tw-backdrop-saturate: initial;
|
|
1151
1077
|
--tw-backdrop-sepia: initial;
|
|
1078
|
+
--tw-duration: initial;
|
|
1152
1079
|
--tw-ease: initial;
|
|
1153
1080
|
}
|
|
1154
1081
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { BlockDraft } from './types.js';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
block: BlockDraft;
|
|
4
|
-
onUpdate: (id: string, patch: Partial<BlockDraft>) => void;
|
|
5
|
-
};
|
|
6
|
-
declare const ArticleBlockCode: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
-
type ArticleBlockCode = ReturnType<typeof ArticleBlockCode>;
|
|
8
|
-
export default ArticleBlockCode;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { BlockDraft } from './types.js';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
block: BlockDraft;
|
|
4
|
-
onUpdateItem: (blockID: string, index: number, field: 'question' | 'answer', value: string) => void;
|
|
5
|
-
};
|
|
6
|
-
declare const ArticleBlockFAQ: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
-
type ArticleBlockFAQ = ReturnType<typeof ArticleBlockFAQ>;
|
|
8
|
-
export default ArticleBlockFAQ;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import TextEditor from '../TextEditor';
|
|
3
|
-
import type { BlockDraft } from './types.js';
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
block,
|
|
7
|
-
onUpdate,
|
|
8
|
-
onCreateParagraphAfter,
|
|
9
|
-
onMergeBlockWithPrevious,
|
|
10
|
-
onConvertToList,
|
|
11
|
-
onRemoveBlock,
|
|
12
|
-
shouldFocus,
|
|
13
|
-
focusPosition,
|
|
14
|
-
onFocused
|
|
15
|
-
} = $props<{
|
|
16
|
-
block: BlockDraft;
|
|
17
|
-
onUpdate: (id: string, patch: Partial<BlockDraft>) => void;
|
|
18
|
-
onCreateParagraphAfter?: (id: string, text?: string, currentText?: string | null) => void;
|
|
19
|
-
onMergeBlockWithPrevious?: (id: string) => void;
|
|
20
|
-
onConvertToList?: (id: string, kind: 'bullet_list' | 'numbered_list') => void;
|
|
21
|
-
onRemoveBlock?: (id: string) => void;
|
|
22
|
-
shouldFocus?: boolean;
|
|
23
|
-
focusPosition?: number | null;
|
|
24
|
-
onFocused?: () => void;
|
|
25
|
-
}>();
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<TextEditor
|
|
29
|
-
autosize
|
|
30
|
-
rows={1}
|
|
31
|
-
value={block.text ?? ''}
|
|
32
|
-
onInput={(event) =>
|
|
33
|
-
onUpdate(block.id, {
|
|
34
|
-
text: (event.currentTarget as HTMLTextAreaElement).value
|
|
35
|
-
})}
|
|
36
|
-
onKeyDown={(event) => {
|
|
37
|
-
const value = (event.currentTarget as HTMLTextAreaElement).value.trim();
|
|
38
|
-
if (event.key === ' ' && value === '-') {
|
|
39
|
-
event.preventDefault();
|
|
40
|
-
onConvertToList?.(block.id, 'bullet_list');
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (event.key === ' ' && /^\d+\.$/.test(value)) {
|
|
44
|
-
event.preventDefault();
|
|
45
|
-
onConvertToList?.(block.id, 'numbered_list');
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (event.key === 'Enter' && !event.shiftKey) {
|
|
49
|
-
event.preventDefault();
|
|
50
|
-
const textarea = event.currentTarget as HTMLTextAreaElement;
|
|
51
|
-
const text = textarea.value;
|
|
52
|
-
const before = text.slice(0, textarea.selectionStart);
|
|
53
|
-
const after = text.slice(textarea.selectionEnd);
|
|
54
|
-
if (!text.trim()) {
|
|
55
|
-
onRemoveBlock?.(block.id);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
onCreateParagraphAfter?.(block.id, after, before);
|
|
59
|
-
}
|
|
60
|
-
if (
|
|
61
|
-
event.key === 'Backspace' &&
|
|
62
|
-
!event.shiftKey &&
|
|
63
|
-
!event.metaKey &&
|
|
64
|
-
!event.ctrlKey &&
|
|
65
|
-
!event.altKey
|
|
66
|
-
) {
|
|
67
|
-
const textarea = event.currentTarget as HTMLTextAreaElement;
|
|
68
|
-
if (textarea.selectionStart === 0 && textarea.selectionEnd === 0) {
|
|
69
|
-
event.preventDefault();
|
|
70
|
-
onMergeBlockWithPrevious?.(block.id);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}}
|
|
74
|
-
{shouldFocus}
|
|
75
|
-
{focusPosition}
|
|
76
|
-
{onFocused}
|
|
77
|
-
className="text-[16px] leading-7 text-zinc-700 placeholder:text-zinc-300"
|
|
78
|
-
placeholder="Block content"
|
|
79
|
-
/>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import ArticleImagePreview from './ArticleImagePreview.svelte';
|
|
3
|
-
import TextEditor from '../TextEditor';
|
|
4
|
-
import type { BlockDraft } from './types.js';
|
|
5
|
-
|
|
6
|
-
let { block, titleFallback, onUpdate } = $props<{
|
|
7
|
-
block: BlockDraft;
|
|
8
|
-
titleFallback: string;
|
|
9
|
-
onUpdate: (id: string, patch: Partial<BlockDraft>) => void;
|
|
10
|
-
}>();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<div class="article-block-image">
|
|
14
|
-
<ArticleImagePreview src={block.imageURL} alt={block.imageAlt ?? titleFallback} />
|
|
15
|
-
<div>
|
|
16
|
-
<TextEditor
|
|
17
|
-
autosize
|
|
18
|
-
rows={1}
|
|
19
|
-
className="article-block-image-description"
|
|
20
|
-
value={block.imageAlt ?? ''}
|
|
21
|
-
onInput={(event) =>
|
|
22
|
-
onUpdate(block.id, {
|
|
23
|
-
imageAlt: (event.currentTarget as HTMLTextAreaElement).value
|
|
24
|
-
})}
|
|
25
|
-
placeholder="Alt text"
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<style>
|
|
31
|
-
.article-block-image {
|
|
32
|
-
display: grid;
|
|
33
|
-
gap: 1rem;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
:global(.article-block-image-description) {
|
|
37
|
-
border: 0;
|
|
38
|
-
background: transparent;
|
|
39
|
-
padding: 0;
|
|
40
|
-
color: #3f3f46;
|
|
41
|
-
font-size: 0.875rem;
|
|
42
|
-
line-height: 1.5rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:global(.article-block-image-description::placeholder) {
|
|
46
|
-
color: #d4d4d8;
|
|
47
|
-
}
|
|
48
|
-
</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { BlockDraft } from './types.js';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
block: BlockDraft;
|
|
4
|
-
titleFallback: string;
|
|
5
|
-
onUpdate: (id: string, patch: Partial<BlockDraft>) => void;
|
|
6
|
-
};
|
|
7
|
-
declare const ArticleBlockImage: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
-
type ArticleBlockImage = ReturnType<typeof ArticleBlockImage>;
|
|
9
|
-
export default ArticleBlockImage;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { BlockDraft } from './types.js';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
block: BlockDraft;
|
|
4
|
-
onUpdate: (id: string, patch: Partial<BlockDraft>) => void;
|
|
5
|
-
onCreateParagraphAfter?: (id: string, text?: string, currentText?: string | null) => void;
|
|
6
|
-
onMergeBlockWithPrevious?: (id: string) => void;
|
|
7
|
-
onConvertToList?: (id: string, kind: 'bullet_list' | 'numbered_list') => void;
|
|
8
|
-
onRemoveBlock?: (id: string) => void;
|
|
9
|
-
shouldFocus?: boolean;
|
|
10
|
-
focusPosition?: number | null;
|
|
11
|
-
onFocused?: () => void;
|
|
12
|
-
};
|
|
13
|
-
declare const ArticleBlockParagraph: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
|
-
type ArticleBlockParagraph = ReturnType<typeof ArticleBlockParagraph>;
|
|
15
|
-
export default ArticleBlockParagraph;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { ImageIcon } from '@lucide/svelte';
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
src,
|
|
6
|
-
alt,
|
|
7
|
-
aspectRatio = '4 / 3'
|
|
8
|
-
} = $props<{
|
|
9
|
-
src?: string | null;
|
|
10
|
-
alt: string;
|
|
11
|
-
aspectRatio?: string;
|
|
12
|
-
}>();
|
|
13
|
-
|
|
14
|
-
let imageLoaded = $state(false);
|
|
15
|
-
let imageFailed = $state(false);
|
|
16
|
-
|
|
17
|
-
$effect(() => {
|
|
18
|
-
src;
|
|
19
|
-
imageLoaded = false;
|
|
20
|
-
imageFailed = false;
|
|
21
|
-
});
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<div class="article-image-preview" style={`aspect-ratio: ${aspectRatio};`}>
|
|
25
|
-
{#if src && !imageFailed}
|
|
26
|
-
<img
|
|
27
|
-
{src}
|
|
28
|
-
{alt}
|
|
29
|
-
class="article-image-preview-media"
|
|
30
|
-
class:article-image-preview-media-loaded={imageLoaded}
|
|
31
|
-
onload={() => (imageLoaded = true)}
|
|
32
|
-
onerror={() => (imageFailed = true)}
|
|
33
|
-
/>
|
|
34
|
-
{/if}
|
|
35
|
-
{#if !src || !imageLoaded || imageFailed}
|
|
36
|
-
<div class="article-image-preview-placeholder" aria-hidden="true">
|
|
37
|
-
<ImageIcon size={32} strokeWidth={1.75} />
|
|
38
|
-
</div>
|
|
39
|
-
{/if}
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<style>
|
|
43
|
-
.article-image-preview {
|
|
44
|
-
position: relative;
|
|
45
|
-
display: grid;
|
|
46
|
-
place-items: center;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
background: #f4f4f5;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.article-image-preview-media {
|
|
52
|
-
display: block;
|
|
53
|
-
width: 100%;
|
|
54
|
-
height: 100%;
|
|
55
|
-
object-fit: cover;
|
|
56
|
-
opacity: 0;
|
|
57
|
-
transition: opacity 120ms ease;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.article-image-preview-media-loaded {
|
|
61
|
-
opacity: 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.article-image-preview-placeholder {
|
|
65
|
-
position: absolute;
|
|
66
|
-
inset: 0;
|
|
67
|
-
display: grid;
|
|
68
|
-
place-items: center;
|
|
69
|
-
color: #a1a1aa;
|
|
70
|
-
}
|
|
71
|
-
</style>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
src?: string | null;
|
|
3
|
-
alt: string;
|
|
4
|
-
aspectRatio?: string;
|
|
5
|
-
};
|
|
6
|
-
declare const ArticleImagePreview: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
7
|
-
type ArticleImagePreview = ReturnType<typeof ArticleImagePreview>;
|
|
8
|
-
export default ArticleImagePreview;
|