@fragments-sdk/ui 0.10.0 → 0.11.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.
- package/dist/assets/ui.css +329 -26
- package/dist/blocks/BlogEditor.block.d.ts +3 -0
- package/dist/blocks/BlogEditor.block.d.ts.map +1 -0
- package/dist/codeblock.cjs +37 -10
- package/dist/codeblock.cjs.map +1 -1
- package/dist/codeblock.js +15 -10
- package/dist/codeblock.js.map +1 -1
- package/dist/components/AppShell/AppShell.module.scss.cjs +14 -14
- package/dist/components/AppShell/AppShell.module.scss.js +14 -14
- package/dist/components/CodeBlock/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.cjs +2 -1
- package/dist/components/Drawer/index.cjs.map +1 -1
- package/dist/components/Drawer/index.d.ts +3 -1
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +2 -1
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Editor/Editor.module.scss.cjs +57 -0
- package/dist/components/Editor/Editor.module.scss.cjs.map +1 -0
- package/dist/components/Editor/Editor.module.scss.js +57 -0
- package/dist/components/Editor/Editor.module.scss.js.map +1 -0
- package/dist/components/Editor/index.cjs +548 -0
- package/dist/components/Editor/index.cjs.map +1 -0
- package/dist/components/Editor/index.d.ts +107 -0
- package/dist/components/Editor/index.d.ts.map +1 -0
- package/dist/components/Editor/index.js +531 -0
- package/dist/components/Editor/index.js.map +1 -0
- package/dist/components/Sidebar/index.cjs +14 -16
- package/dist/components/Sidebar/index.cjs.map +1 -1
- package/dist/components/Sidebar/index.d.ts +4 -6
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +14 -16
- package/dist/components/Sidebar/index.js.map +1 -1
- package/dist/index.cjs +22 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/keyboard-shortcuts.cjs +295 -0
- package/dist/utils/keyboard-shortcuts.cjs.map +1 -0
- package/dist/utils/keyboard-shortcuts.d.ts +293 -0
- package/dist/utils/keyboard-shortcuts.d.ts.map +1 -0
- package/dist/utils/keyboard-shortcuts.js +295 -0
- package/dist/utils/keyboard-shortcuts.js.map +1 -0
- package/fragments.json +1 -1
- package/package.json +28 -3
- package/src/blocks/BlogEditor.block.ts +34 -0
- package/src/components/AppShell/AppShell.module.scss +12 -13
- package/src/components/CodeBlock/index.tsx +15 -11
- package/src/components/Drawer/index.tsx +4 -1
- package/src/components/Editor/Editor.fragment.tsx +322 -0
- package/src/components/Editor/Editor.module.scss +333 -0
- package/src/components/Editor/Editor.test.tsx +174 -0
- package/src/components/Editor/index.tsx +815 -0
- package/src/components/Sidebar/index.tsx +16 -22
- package/src/index.ts +43 -0
- package/src/utils/keyboard-shortcuts.test.ts +357 -0
- package/src/utils/keyboard-shortcuts.ts +502 -0
package/dist/assets/ui.css
CHANGED
|
@@ -5836,7 +5836,7 @@ a {
|
|
|
5836
5836
|
overflow: visible;
|
|
5837
5837
|
outline: none;
|
|
5838
5838
|
box-shadow: 0 0 0 var(--fui-focus-ring-offset, 2px) var(--fui-bg-primary, #ffffff), 0 0 0 calc(var(--fui-focus-ring-offset, 2px) + var(--fui-focus-ring-width, 2px)) var(--fui-focus-ring-color, #18181b);
|
|
5839
|
-
}.
|
|
5839
|
+
}._root_10ypa_1 {
|
|
5840
5840
|
display: grid;
|
|
5841
5841
|
min-height: 100vh;
|
|
5842
5842
|
min-height: 100dvh;
|
|
@@ -5847,7 +5847,7 @@ a {
|
|
|
5847
5847
|
transition: grid-template-columns var(--fui-transition-normal, 200ms) ease;
|
|
5848
5848
|
}
|
|
5849
5849
|
@media (max-width: 767px) {
|
|
5850
|
-
.
|
|
5850
|
+
._root_10ypa_1 {
|
|
5851
5851
|
grid-template-areas: "header" "main" "aside";
|
|
5852
5852
|
grid-template-columns: 1fr;
|
|
5853
5853
|
grid-template-rows: var(--appshell-header-height, 56px) 1fr auto;
|
|
@@ -5855,21 +5855,21 @@ a {
|
|
|
5855
5855
|
}
|
|
5856
5856
|
}
|
|
5857
5857
|
|
|
5858
|
-
.
|
|
5858
|
+
._sidebarLayout_10ypa_20 {
|
|
5859
5859
|
grid-template-areas: "sidebar header header" "sidebar main aside";
|
|
5860
5860
|
}
|
|
5861
5861
|
@media (max-width: 767px) {
|
|
5862
|
-
.
|
|
5862
|
+
._sidebarLayout_10ypa_20 {
|
|
5863
5863
|
grid-template-areas: "header" "main" "aside";
|
|
5864
5864
|
grid-template-columns: 1fr;
|
|
5865
5865
|
}
|
|
5866
5866
|
}
|
|
5867
5867
|
|
|
5868
|
-
.
|
|
5868
|
+
._sidebarFloatingLayout_10ypa_30 {
|
|
5869
5869
|
background-color: var(--fui-bg-primary, #ffffff);
|
|
5870
5870
|
}
|
|
5871
5871
|
|
|
5872
|
-
.
|
|
5872
|
+
._header_10ypa_34 {
|
|
5873
5873
|
grid-area: header;
|
|
5874
5874
|
position: sticky;
|
|
5875
5875
|
top: 0;
|
|
@@ -5878,11 +5878,11 @@ a {
|
|
|
5878
5878
|
background-color: var(--fui-bg-primary, #ffffff);
|
|
5879
5879
|
}
|
|
5880
5880
|
|
|
5881
|
-
.
|
|
5881
|
+
._headerFloating_10ypa_43 {
|
|
5882
5882
|
background-color: var(--fui-bg-primary, #ffffff);
|
|
5883
5883
|
}
|
|
5884
5884
|
|
|
5885
|
-
.
|
|
5885
|
+
._sidebar_10ypa_20 {
|
|
5886
5886
|
grid-area: sidebar;
|
|
5887
5887
|
position: sticky;
|
|
5888
5888
|
top: var(--appshell-header-height, 56px);
|
|
@@ -5892,7 +5892,7 @@ a {
|
|
|
5892
5892
|
overflow: hidden;
|
|
5893
5893
|
}
|
|
5894
5894
|
@media (max-width: 767px) {
|
|
5895
|
-
.
|
|
5895
|
+
._sidebar_10ypa_20 {
|
|
5896
5896
|
position: fixed;
|
|
5897
5897
|
top: 0;
|
|
5898
5898
|
left: 0;
|
|
@@ -5902,77 +5902,76 @@ a {
|
|
|
5902
5902
|
height: 100dvh;
|
|
5903
5903
|
z-index: 51;
|
|
5904
5904
|
}
|
|
5905
|
-
.
|
|
5905
|
+
._sidebar_10ypa_20 > .root {
|
|
5906
5906
|
width: var(--appshell-sidebar-expanded-width, 240px);
|
|
5907
5907
|
}
|
|
5908
5908
|
}
|
|
5909
|
-
.
|
|
5909
|
+
._sidebar_10ypa_20 .root {
|
|
5910
5910
|
height: 100%;
|
|
5911
5911
|
}
|
|
5912
5912
|
@media (max-width: 767px) {
|
|
5913
|
-
.
|
|
5913
|
+
._sidebar_10ypa_20 .root {
|
|
5914
5914
|
height: 100vh;
|
|
5915
5915
|
height: 100dvh;
|
|
5916
5916
|
}
|
|
5917
5917
|
}
|
|
5918
5918
|
|
|
5919
|
-
.
|
|
5919
|
+
._sidebarFullHeight_10ypa_81 {
|
|
5920
5920
|
top: 0;
|
|
5921
5921
|
height: 100vh;
|
|
5922
5922
|
height: 100dvh;
|
|
5923
5923
|
z-index: var(--fui-header-z-index, 40);
|
|
5924
5924
|
}
|
|
5925
|
-
.
|
|
5925
|
+
._sidebarFullHeight_10ypa_81 .root {
|
|
5926
5926
|
height: 100%;
|
|
5927
5927
|
}
|
|
5928
5928
|
|
|
5929
|
-
.
|
|
5929
|
+
._sidebarFloating_10ypa_30 .root {
|
|
5930
5930
|
background-color: var(--fui-bg-primary, #ffffff);
|
|
5931
5931
|
}
|
|
5932
5932
|
|
|
5933
|
-
.
|
|
5933
|
+
._main_10ypa_95 {
|
|
5934
5934
|
grid-area: main;
|
|
5935
5935
|
min-height: 0;
|
|
5936
5936
|
min-width: 0;
|
|
5937
5937
|
background-color: var(--fui-bg-primary, #ffffff);
|
|
5938
|
-
overflow-x: hidden;
|
|
5939
5938
|
}
|
|
5940
5939
|
|
|
5941
|
-
.
|
|
5940
|
+
._mainFloating_10ypa_102 {
|
|
5942
5941
|
border-radius: var(--fui-radius-xl, 0.857rem);
|
|
5943
5942
|
background-color: var(--fui-bg-secondary, #f4f4f5);
|
|
5944
5943
|
overflow: hidden;
|
|
5945
5944
|
}
|
|
5946
5945
|
@media (max-width: 767px) {
|
|
5947
|
-
.
|
|
5946
|
+
._mainFloating_10ypa_102 {
|
|
5948
5947
|
border-radius: var(--fui-radius-lg, 0.571rem);
|
|
5949
5948
|
width: 100%;
|
|
5950
5949
|
}
|
|
5951
5950
|
}
|
|
5952
5951
|
|
|
5953
|
-
.
|
|
5952
|
+
._paddingSm_10ypa_114 {
|
|
5954
5953
|
padding: var(--fui-padding-container-sm);
|
|
5955
5954
|
}
|
|
5956
5955
|
|
|
5957
|
-
.
|
|
5956
|
+
._paddingMd_10ypa_118 {
|
|
5958
5957
|
padding: var(--fui-padding-container-md);
|
|
5959
5958
|
}
|
|
5960
5959
|
@media (min-width: 768px) {
|
|
5961
|
-
.
|
|
5960
|
+
._paddingMd_10ypa_118 {
|
|
5962
5961
|
padding: var(--fui-padding-container-lg);
|
|
5963
5962
|
}
|
|
5964
5963
|
}
|
|
5965
5964
|
|
|
5966
|
-
.
|
|
5965
|
+
._paddingLg_10ypa_127 {
|
|
5967
5966
|
padding: var(--fui-padding-container-lg);
|
|
5968
5967
|
}
|
|
5969
5968
|
@media (min-width: 768px) {
|
|
5970
|
-
.
|
|
5969
|
+
._paddingLg_10ypa_127 {
|
|
5971
5970
|
padding: var(--fui-padding-container-xl);
|
|
5972
5971
|
}
|
|
5973
5972
|
}
|
|
5974
5973
|
|
|
5975
|
-
.
|
|
5974
|
+
._aside_10ypa_136 {
|
|
5976
5975
|
grid-area: aside;
|
|
5977
5976
|
position: sticky;
|
|
5978
5977
|
top: var(--appshell-header-height, 56px);
|
|
@@ -5985,7 +5984,7 @@ a {
|
|
|
5985
5984
|
overflow: hidden;
|
|
5986
5985
|
}
|
|
5987
5986
|
@media (max-width: 767px) {
|
|
5988
|
-
.
|
|
5987
|
+
._aside_10ypa_136 {
|
|
5989
5988
|
position: static;
|
|
5990
5989
|
width: 100%;
|
|
5991
5990
|
height: auto;
|
|
@@ -10385,6 +10384,310 @@ a {
|
|
|
10385
10384
|
outline: 2px solid var(--fui-color-accent);
|
|
10386
10385
|
outline-offset: -2px;
|
|
10387
10386
|
}
|
|
10387
|
+
}._editor_49q64_1 {
|
|
10388
|
+
background-color: var(--fui-bg-elevated, #ffffff);
|
|
10389
|
+
border: 1px solid var(--fui-border, rgba(0, 0, 0, 0.08));
|
|
10390
|
+
border-radius: var(--fui-radius-lg, 0.571rem);
|
|
10391
|
+
display: flex;
|
|
10392
|
+
flex-direction: column;
|
|
10393
|
+
min-width: 400px;
|
|
10394
|
+
overflow: hidden;
|
|
10395
|
+
}
|
|
10396
|
+
._editor_49q64_1:focus-within:not([data-disabled]) {
|
|
10397
|
+
outline: none;
|
|
10398
|
+
box-shadow: 0 0 0 var(--fui-focus-ring-offset, 2px) var(--fui-bg-primary, #ffffff), 0 0 0 calc(var(--fui-focus-ring-offset, 2px) + var(--fui-focus-ring-width, 2px)) var(--fui-focus-ring-color, #18181b);
|
|
10399
|
+
}
|
|
10400
|
+
._editor_49q64_1[data-disabled] {
|
|
10401
|
+
opacity: 0.5;
|
|
10402
|
+
pointer-events: none;
|
|
10403
|
+
}
|
|
10404
|
+
._editor_49q64_1[data-readonly] ._contentTextarea_49q64_18 {
|
|
10405
|
+
cursor: default;
|
|
10406
|
+
}
|
|
10407
|
+
._editor_49q64_1[data-size=sm] ._content_49q64_18,
|
|
10408
|
+
._editor_49q64_1[data-size=sm] ._contentTextarea_49q64_18,
|
|
10409
|
+
._editor_49q64_1[data-size=sm] .tiptap {
|
|
10410
|
+
min-height: 120px;
|
|
10411
|
+
}
|
|
10412
|
+
._editor_49q64_1[data-size=md] ._content_49q64_18,
|
|
10413
|
+
._editor_49q64_1[data-size=md] ._contentTextarea_49q64_18,
|
|
10414
|
+
._editor_49q64_1[data-size=md] .tiptap {
|
|
10415
|
+
min-height: 200px;
|
|
10416
|
+
}
|
|
10417
|
+
._editor_49q64_1[data-size=lg] ._content_49q64_18,
|
|
10418
|
+
._editor_49q64_1[data-size=lg] ._contentTextarea_49q64_18,
|
|
10419
|
+
._editor_49q64_1[data-size=lg] .tiptap {
|
|
10420
|
+
min-height: 400px;
|
|
10421
|
+
}
|
|
10422
|
+
|
|
10423
|
+
._toolbar_49q64_37 {
|
|
10424
|
+
display: flex;
|
|
10425
|
+
align-items: center;
|
|
10426
|
+
justify-content: space-between;
|
|
10427
|
+
flex-wrap: wrap;
|
|
10428
|
+
gap: var(--fui-space-2, 1rem);
|
|
10429
|
+
padding: var(--fui-padding-item-xs, 0.5rem) var(--fui-padding-item-sm, 1rem);
|
|
10430
|
+
border-bottom: 1px solid var(--fui-border, rgba(0, 0, 0, 0.08));
|
|
10431
|
+
background-color: var(--fui-bg-secondary, #f4f4f5);
|
|
10432
|
+
}
|
|
10433
|
+
|
|
10434
|
+
._toolbarGroup_49q64_48 {
|
|
10435
|
+
display: flex;
|
|
10436
|
+
align-items: center;
|
|
10437
|
+
gap: var(--fui-space-0-5, 0.15rem);
|
|
10438
|
+
}
|
|
10439
|
+
|
|
10440
|
+
._toolbarButton_49q64_54 {
|
|
10441
|
+
appearance: none;
|
|
10442
|
+
background: transparent;
|
|
10443
|
+
border: none;
|
|
10444
|
+
padding: 0;
|
|
10445
|
+
margin: 0;
|
|
10446
|
+
font: inherit;
|
|
10447
|
+
color: inherit;
|
|
10448
|
+
cursor: pointer;
|
|
10449
|
+
}
|
|
10450
|
+
._toolbarButton_49q64_54:disabled {
|
|
10451
|
+
cursor: not-allowed;
|
|
10452
|
+
}
|
|
10453
|
+
._toolbarButton_49q64_54 {
|
|
10454
|
+
transition: background-color var(--fui-transition-fast, 150ms ease), border-color var(--fui-transition-fast, 150ms ease), box-shadow var(--fui-transition-fast, 150ms ease), opacity var(--fui-transition-fast, 150ms ease);
|
|
10455
|
+
}
|
|
10456
|
+
._toolbarButton_49q64_54:focus-visible {
|
|
10457
|
+
outline: none;
|
|
10458
|
+
box-shadow: 0 0 0 var(--fui-focus-ring-offset, 2px) var(--fui-bg-primary, #ffffff), 0 0 0 calc(var(--fui-focus-ring-offset, 2px) + var(--fui-focus-ring-width, 2px)) var(--fui-focus-ring-color, #18181b);
|
|
10459
|
+
}
|
|
10460
|
+
._toolbarButton_49q64_54:disabled, ._toolbarButton_49q64_54[data-disabled] {
|
|
10461
|
+
opacity: 0.5;
|
|
10462
|
+
pointer-events: none;
|
|
10463
|
+
}
|
|
10464
|
+
._toolbarButton_49q64_54 {
|
|
10465
|
+
min-width: var(--fui-target-size-min, 1.714rem);
|
|
10466
|
+
min-height: var(--fui-target-size-min, 1.714rem);
|
|
10467
|
+
display: inline-flex;
|
|
10468
|
+
align-items: center;
|
|
10469
|
+
justify-content: center;
|
|
10470
|
+
display: inline-flex;
|
|
10471
|
+
align-items: center;
|
|
10472
|
+
justify-content: center;
|
|
10473
|
+
width: 2rem;
|
|
10474
|
+
height: 2rem;
|
|
10475
|
+
border-radius: var(--fui-radius-md, 0.429rem);
|
|
10476
|
+
background-color: transparent;
|
|
10477
|
+
color: var(--fui-text-secondary, #52525b);
|
|
10478
|
+
}
|
|
10479
|
+
._toolbarButton_49q64_54:hover:not(:disabled) {
|
|
10480
|
+
background-color: var(--fui-bg-hover, rgba(0, 0, 0, 0.04));
|
|
10481
|
+
color: var(--fui-text-primary, #18181b);
|
|
10482
|
+
}
|
|
10483
|
+
._toolbarButton_49q64_54:active:not(:disabled) {
|
|
10484
|
+
background-color: var(--fui-bg-active, rgba(0, 0, 0, 0.06));
|
|
10485
|
+
}
|
|
10486
|
+
._toolbarButton_49q64_54 svg {
|
|
10487
|
+
width: 1rem;
|
|
10488
|
+
height: 1rem;
|
|
10489
|
+
}
|
|
10490
|
+
|
|
10491
|
+
._toolbarButtonActive_49q64_105 {
|
|
10492
|
+
color: var(--fui-color-accent, #18181b);
|
|
10493
|
+
background-color: var(--fui-bg-tertiary, #f4f4f5);
|
|
10494
|
+
}
|
|
10495
|
+
._toolbarButtonActive_49q64_105:hover:not(:disabled) {
|
|
10496
|
+
color: var(--fui-color-accent-hover, rgb(62.88, 62.88, 70.74));
|
|
10497
|
+
}
|
|
10498
|
+
|
|
10499
|
+
._separator_49q64_113 {
|
|
10500
|
+
width: 1px;
|
|
10501
|
+
height: 1rem;
|
|
10502
|
+
background-color: var(--fui-border, rgba(0, 0, 0, 0.08));
|
|
10503
|
+
margin: 0 var(--fui-space-1, 0.5rem);
|
|
10504
|
+
flex-shrink: 0;
|
|
10505
|
+
}
|
|
10506
|
+
|
|
10507
|
+
._statusIndicator_49q64_121 {
|
|
10508
|
+
font-family: var(--fui-font-sans, Geist Sans, Geist, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif);
|
|
10509
|
+
font-size: var(--fui-font-size-xs, 0.857rem);
|
|
10510
|
+
color: var(--fui-text-secondary, #52525b);
|
|
10511
|
+
font-size: var(--fui-font-size-2xs, 0.714rem);
|
|
10512
|
+
font-weight: var(--fui-font-weight-medium, 500);
|
|
10513
|
+
text-transform: uppercase;
|
|
10514
|
+
letter-spacing: 0.05em;
|
|
10515
|
+
color: var(--fui-text-tertiary, #71717a);
|
|
10516
|
+
white-space: nowrap;
|
|
10517
|
+
padding: 0 var(--fui-space-2, 1rem);
|
|
10518
|
+
}
|
|
10519
|
+
|
|
10520
|
+
._statusError_49q64_134 {
|
|
10521
|
+
color: var(--fui-color-danger, #ef4444);
|
|
10522
|
+
}
|
|
10523
|
+
|
|
10524
|
+
._content_49q64_18 {
|
|
10525
|
+
flex: 1;
|
|
10526
|
+
min-height: 200px;
|
|
10527
|
+
overflow-y: auto;
|
|
10528
|
+
}
|
|
10529
|
+
|
|
10530
|
+
._contentRich_49q64_144 .tiptap {
|
|
10531
|
+
padding: var(--fui-padding-inline-md, 1.5rem);
|
|
10532
|
+
min-height: 200px;
|
|
10533
|
+
outline: none;
|
|
10534
|
+
font-family: var(--fui-font-sans, Geist Sans, Geist, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif);
|
|
10535
|
+
font-size: var(--fui-font-size-sm, 1rem);
|
|
10536
|
+
line-height: var(--fui-line-height-normal, 1.5);
|
|
10537
|
+
color: var(--fui-text-primary, #18181b);
|
|
10538
|
+
-webkit-font-smoothing: antialiased;
|
|
10539
|
+
-moz-osx-font-smoothing: grayscale;
|
|
10540
|
+
line-height: var(--fui-line-height-relaxed, 1.625);
|
|
10541
|
+
font-size: var(--fui-font-size-base, 1.143rem);
|
|
10542
|
+
}
|
|
10543
|
+
._contentRich_49q64_144 .tiptap:focus-visible {
|
|
10544
|
+
outline: none;
|
|
10545
|
+
}
|
|
10546
|
+
._contentRich_49q64_144 .tiptap p._is-editor-empty_49q64_160:first-child::before {
|
|
10547
|
+
content: attr(data-placeholder);
|
|
10548
|
+
float: left;
|
|
10549
|
+
color: var(--fui-text-tertiary, #71717a);
|
|
10550
|
+
pointer-events: none;
|
|
10551
|
+
height: 0;
|
|
10552
|
+
}
|
|
10553
|
+
._contentRich_49q64_144 .tiptap h1 {
|
|
10554
|
+
font-size: var(--fui-font-size-2xl, 2.143rem);
|
|
10555
|
+
font-weight: var(--fui-font-weight-semibold, 600);
|
|
10556
|
+
line-height: var(--fui-line-height-tight, 1.25);
|
|
10557
|
+
margin: 0 0 var(--fui-space-3, 1.5rem);
|
|
10558
|
+
}
|
|
10559
|
+
._contentRich_49q64_144 .tiptap h2 {
|
|
10560
|
+
font-size: var(--fui-font-size-xl, 1.714rem);
|
|
10561
|
+
font-weight: var(--fui-font-weight-semibold, 600);
|
|
10562
|
+
line-height: var(--fui-line-height-tight, 1.25);
|
|
10563
|
+
margin: 0 0 var(--fui-space-2, 1rem);
|
|
10564
|
+
}
|
|
10565
|
+
._contentRich_49q64_144 .tiptap h3 {
|
|
10566
|
+
font-size: var(--fui-font-size-lg, 1.286rem);
|
|
10567
|
+
font-weight: var(--fui-font-weight-semibold, 600);
|
|
10568
|
+
line-height: var(--fui-line-height-tight, 1.25);
|
|
10569
|
+
margin: 0 0 var(--fui-space-2, 1rem);
|
|
10570
|
+
}
|
|
10571
|
+
._contentRich_49q64_144 .tiptap blockquote {
|
|
10572
|
+
border-left: 3px solid var(--fui-color-accent, #18181b);
|
|
10573
|
+
padding-left: var(--fui-space-4, 2rem);
|
|
10574
|
+
margin: 0 0 var(--fui-space-2, 1rem);
|
|
10575
|
+
color: var(--fui-text-secondary, #52525b);
|
|
10576
|
+
font-style: italic;
|
|
10577
|
+
}
|
|
10578
|
+
._contentRich_49q64_144 .tiptap code {
|
|
10579
|
+
background-color: var(--fui-bg-tertiary, #f4f4f5);
|
|
10580
|
+
border-radius: var(--fui-radius-sm, 0.25rem);
|
|
10581
|
+
padding: 0.15em 0.3em;
|
|
10582
|
+
font-family: var(--fui-font-mono, "Geist Mono", "SF Mono", SFMono-Regular, ui-monospace, "Cascadia Code", Menlo, monospace);
|
|
10583
|
+
font-size: 0.9em;
|
|
10584
|
+
}
|
|
10585
|
+
._contentRich_49q64_144 .tiptap a {
|
|
10586
|
+
color: var(--fui-color-accent, #18181b);
|
|
10587
|
+
text-decoration: underline;
|
|
10588
|
+
cursor: pointer;
|
|
10589
|
+
}
|
|
10590
|
+
._contentRich_49q64_144 .tiptap a:hover {
|
|
10591
|
+
color: var(--fui-color-accent-hover, rgb(62.88, 62.88, 70.74));
|
|
10592
|
+
}
|
|
10593
|
+
._contentRich_49q64_144 .tiptap ul {
|
|
10594
|
+
padding-left: var(--fui-space-5, 2.5rem);
|
|
10595
|
+
list-style-type: disc;
|
|
10596
|
+
}
|
|
10597
|
+
._contentRich_49q64_144 .tiptap ol {
|
|
10598
|
+
padding-left: var(--fui-space-5, 2.5rem);
|
|
10599
|
+
list-style-type: decimal;
|
|
10600
|
+
}
|
|
10601
|
+
._contentRich_49q64_144 .tiptap s {
|
|
10602
|
+
text-decoration: line-through;
|
|
10603
|
+
}
|
|
10604
|
+
._contentRich_49q64_144 .tiptap p {
|
|
10605
|
+
margin: 0 0 var(--fui-space-2, 1rem);
|
|
10606
|
+
}
|
|
10607
|
+
._contentRich_49q64_144 .tiptap p:last-child {
|
|
10608
|
+
margin-bottom: 0;
|
|
10609
|
+
}
|
|
10610
|
+
|
|
10611
|
+
._contentTextarea_49q64_18 {
|
|
10612
|
+
appearance: none;
|
|
10613
|
+
background: transparent;
|
|
10614
|
+
border: none;
|
|
10615
|
+
padding: 0;
|
|
10616
|
+
margin: 0;
|
|
10617
|
+
font: inherit;
|
|
10618
|
+
color: inherit;
|
|
10619
|
+
cursor: pointer;
|
|
10620
|
+
}
|
|
10621
|
+
._contentTextarea_49q64_18:disabled {
|
|
10622
|
+
cursor: not-allowed;
|
|
10623
|
+
}
|
|
10624
|
+
._contentTextarea_49q64_18 {
|
|
10625
|
+
font-family: var(--fui-font-sans, Geist Sans, Geist, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif);
|
|
10626
|
+
font-size: var(--fui-font-size-sm, 1rem);
|
|
10627
|
+
line-height: var(--fui-line-height-normal, 1.5);
|
|
10628
|
+
color: var(--fui-text-primary, #18181b);
|
|
10629
|
+
-webkit-font-smoothing: antialiased;
|
|
10630
|
+
-moz-osx-font-smoothing: grayscale;
|
|
10631
|
+
display: block;
|
|
10632
|
+
width: 100%;
|
|
10633
|
+
height: 100%;
|
|
10634
|
+
min-height: 200px;
|
|
10635
|
+
padding: var(--fui-padding-inline-md, 1.5rem);
|
|
10636
|
+
background: transparent;
|
|
10637
|
+
border: none;
|
|
10638
|
+
resize: none;
|
|
10639
|
+
overflow-y: auto;
|
|
10640
|
+
line-height: var(--fui-line-height-relaxed, 1.625);
|
|
10641
|
+
font-size: var(--fui-font-size-base, 1.143rem);
|
|
10642
|
+
}
|
|
10643
|
+
._contentTextarea_49q64_18::placeholder {
|
|
10644
|
+
color: var(--fui-text-tertiary, #71717a);
|
|
10645
|
+
}
|
|
10646
|
+
._contentTextarea_49q64_18:focus-visible {
|
|
10647
|
+
outline: none;
|
|
10648
|
+
}
|
|
10649
|
+
._contentTextarea_49q64_18:disabled {
|
|
10650
|
+
cursor: not-allowed;
|
|
10651
|
+
}
|
|
10652
|
+
|
|
10653
|
+
._statusBar_49q64_267 {
|
|
10654
|
+
display: flex;
|
|
10655
|
+
align-items: center;
|
|
10656
|
+
justify-content: space-between;
|
|
10657
|
+
gap: var(--fui-space-2, 1rem);
|
|
10658
|
+
padding: var(--fui-padding-item-xs, 0.5rem) var(--fui-padding-item-sm, 1rem);
|
|
10659
|
+
border-top: 1px solid var(--fui-border, rgba(0, 0, 0, 0.08));
|
|
10660
|
+
background-color: var(--fui-bg-secondary, #f4f4f5);
|
|
10661
|
+
}
|
|
10662
|
+
|
|
10663
|
+
._statusBarLeft_49q64_277 {
|
|
10664
|
+
display: flex;
|
|
10665
|
+
align-items: center;
|
|
10666
|
+
gap: var(--fui-space-2, 1rem);
|
|
10667
|
+
}
|
|
10668
|
+
|
|
10669
|
+
._statusBarRight_49q64_283 {
|
|
10670
|
+
display: flex;
|
|
10671
|
+
align-items: center;
|
|
10672
|
+
gap: var(--fui-space-2, 1rem);
|
|
10673
|
+
margin-left: auto;
|
|
10674
|
+
}
|
|
10675
|
+
|
|
10676
|
+
._statusBarItem_49q64_290 {
|
|
10677
|
+
font-family: var(--fui-font-sans, Geist Sans, Geist, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif);
|
|
10678
|
+
font-size: var(--fui-font-size-xs, 0.857rem);
|
|
10679
|
+
color: var(--fui-text-secondary, #52525b);
|
|
10680
|
+
white-space: nowrap;
|
|
10681
|
+
}
|
|
10682
|
+
|
|
10683
|
+
._statusBarItemWarning_49q64_297 {
|
|
10684
|
+
color: var(--fui-color-warning, #f59e0b);
|
|
10685
|
+
font-weight: var(--fui-font-weight-medium, 500);
|
|
10686
|
+
}
|
|
10687
|
+
|
|
10688
|
+
._statusBarItemError_49q64_302 {
|
|
10689
|
+
color: var(--fui-color-danger, #ef4444);
|
|
10690
|
+
font-weight: var(--fui-font-weight-medium, 500);
|
|
10388
10691
|
}._root_wjgd1_1 {
|
|
10389
10692
|
display: flex;
|
|
10390
10693
|
align-items: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlogEditor.block.d.ts","sourceRoot":"","sources":["../../src/blocks/BlogEditor.block.ts"],"names":[],"mappings":";AAEA,wBA+BG"}
|
package/dist/codeblock.cjs
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
2
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
25
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
26
|
const React = require("react");
|
|
@@ -23,17 +45,22 @@ function _interopNamespaceDefault(e) {
|
|
|
23
45
|
}
|
|
24
46
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
25
47
|
let _codeToHtml = null;
|
|
26
|
-
let
|
|
48
|
+
let _shikiLoadPromise = null;
|
|
27
49
|
let _shikiFailed = false;
|
|
28
|
-
function loadShikiDeps() {
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
async function loadShikiDeps() {
|
|
51
|
+
if (_codeToHtml) return;
|
|
52
|
+
if (_shikiFailed) return;
|
|
53
|
+
if (!_shikiLoadPromise) {
|
|
54
|
+
_shikiLoadPromise = (async () => {
|
|
55
|
+
try {
|
|
56
|
+
const shiki = await import("shiki");
|
|
57
|
+
_codeToHtml = shiki.codeToHtml;
|
|
58
|
+
} catch {
|
|
59
|
+
_shikiFailed = true;
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
36
62
|
}
|
|
63
|
+
await _shikiLoadPromise;
|
|
37
64
|
}
|
|
38
65
|
function CopyIcon({ className }) {
|
|
39
66
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -375,7 +402,7 @@ const CodeBlockBase = React__namespace.forwardRef(function CodeBlock2({
|
|
|
375
402
|
let cancelled = false;
|
|
376
403
|
setHighlight((prev) => ({ ...prev, loading: true }));
|
|
377
404
|
const run = async () => {
|
|
378
|
-
loadShikiDeps();
|
|
405
|
+
await loadShikiDeps();
|
|
379
406
|
const fallbackHtml = `<pre class="shiki"><code>${escapeHtml(visibleCode)}</code></pre>`;
|
|
380
407
|
if (_shikiFailed || !_codeToHtml) {
|
|
381
408
|
if (_shikiFailed && process.env.NODE_ENV === "development") {
|