@examind/block-editor 0.1.15 → 0.1.17

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/index.mjs CHANGED
@@ -4473,16 +4473,22 @@ function humanReadableBytes(bytes) {
4473
4473
  return `${Math.round(bytes / Math.pow(1024, i))} ${sizes[i]}`;
4474
4474
  }
4475
4475
  }
4476
- function getNumber(str) {
4477
- const trimmedStr = str.trim();
4478
- if (trimmedStr === "") {
4479
- return void 0;
4476
+ function getNumber(value) {
4477
+ if (typeof value === "number") {
4478
+ return Number.isNaN(value) ? void 0 : value;
4480
4479
  }
4481
- const num = +trimmedStr;
4482
- if (Number.isNaN(num)) {
4483
- return void 0;
4480
+ if (typeof value === "string") {
4481
+ const trimmedStr = value.trim();
4482
+ if (trimmedStr === "") {
4483
+ return void 0;
4484
+ }
4485
+ const num = +trimmedStr;
4486
+ return Number.isNaN(num) ? void 0 : num;
4484
4487
  }
4485
- return num;
4488
+ if (typeof value === "boolean") {
4489
+ return value ? 1 : 0;
4490
+ }
4491
+ return void 0;
4486
4492
  }
4487
4493
  var formatNumber = (num, format) => {
4488
4494
  return format ? numeral(num).format(format) : autoFormatNumber(num);
@@ -5509,14 +5515,18 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
5509
5515
  this.__variable
5510
5516
  );
5511
5517
  if (this.__isPreviewMode) {
5512
- const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5513
- if (variableAsNumber) {
5514
- element.textContent = formatNumber(
5515
- variableAsNumber,
5516
- this.__variableFormat
5517
- );
5518
+ if (this.__variableFormat) {
5519
+ const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5520
+ if (variableAsNumber) {
5521
+ element.textContent = formatNumber(
5522
+ variableAsNumber,
5523
+ this.__variableFormat
5524
+ );
5525
+ } else {
5526
+ element.textContent = "[???]";
5527
+ }
5518
5528
  } else {
5519
- element.textContent = "[???]";
5529
+ element.textContent = this.__variableValue || "[???]";
5520
5530
  }
5521
5531
  } else {
5522
5532
  element.textContent = this.__variable;
@@ -5534,14 +5544,18 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
5534
5544
  }
5535
5545
  updateDOM(_prevNode, dom, _config) {
5536
5546
  if (this.__isPreviewMode) {
5537
- const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5538
- if (variableAsNumber) {
5539
- dom.textContent = formatNumber(
5540
- variableAsNumber,
5541
- this.__variableFormat
5542
- );
5547
+ if (this.__variableFormat) {
5548
+ const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
5549
+ if (variableAsNumber) {
5550
+ dom.textContent = formatNumber(
5551
+ variableAsNumber,
5552
+ this.__variableFormat
5553
+ );
5554
+ } else {
5555
+ dom.textContent = "[???]";
5556
+ }
5543
5557
  } else {
5544
- dom.textContent = "[???]";
5558
+ dom.textContent = this.__variableValue || "[???]";
5545
5559
  }
5546
5560
  } else {
5547
5561
  dom.textContent = this.__variable;
@@ -17744,6 +17758,672 @@ function TypeaheadMenuPlugin() {
17744
17758
  );
17745
17759
  }
17746
17760
 
17761
+ // src/theme/defaultThemeVariables.ts
17762
+ var themeLight = `
17763
+ :host,
17764
+ .theme-light {
17765
+ color-scheme: light;
17766
+
17767
+ --sl-color-primary-50: #f0f9ff;
17768
+ --sl-color-primary-100: #e0f2fe;
17769
+ --sl-color-primary-200: #bae6fd;
17770
+ --sl-color-primary-300: #93c5fd;
17771
+ --sl-color-primary-400: #60a5fa;
17772
+ --sl-color-primary-500: #3b82f6;
17773
+ --sl-color-primary-600: #2563eb;
17774
+ --sl-color-primary-700: #1d4ed8;
17775
+ --sl-color-primary-800: #1e40af;
17776
+ --sl-color-primary-900: #1e3a8a;
17777
+ --sl-color-primary-950: #172554;
17778
+
17779
+ --sl-color-success-50: #f0fdf4;
17780
+ --sl-color-success-100: #dcfce7;
17781
+ --sl-color-success-200: #bbf7d0;
17782
+ --sl-color-success-300: #86efac;
17783
+ --sl-color-success-400: #4ade80;
17784
+ --sl-color-success-500: #22c55e;
17785
+ --sl-color-success-600: #16a34a;
17786
+ --sl-color-success-700: #15803d;
17787
+ --sl-color-success-800: #166534;
17788
+ --sl-color-success-900: #14532d;
17789
+ --sl-color-success-950: #052e16;
17790
+
17791
+ --sl-color-warning-50: #fffbeb;
17792
+ --sl-color-warning-100: #fef3c7;
17793
+ --sl-color-warning-200: #fde68a;
17794
+ --sl-color-warning-300: #fcd34d;
17795
+ --sl-color-warning-400: #fbbf24;
17796
+ --sl-color-warning-500: #f59e0b;
17797
+ --sl-color-warning-600: #d97706;
17798
+ --sl-color-warning-700: #b45309;
17799
+ --sl-color-warning-800: #92400e;
17800
+ --sl-color-warning-900: #78350f;
17801
+ --sl-color-warning-950: #451a03;
17802
+
17803
+ --sl-color-danger-50: #fef2f2;
17804
+ --sl-color-danger-100: #fee2e2;
17805
+ --sl-color-danger-200: #fecaca;
17806
+ --sl-color-danger-300: #fca5a5;
17807
+ --sl-color-danger-400: #f87171;
17808
+ --sl-color-danger-500: #ef4444;
17809
+ --sl-color-danger-600: #dc2626;
17810
+ --sl-color-danger-700: #b91c1c;
17811
+ --sl-color-danger-800: #991b1b;
17812
+ --sl-color-danger-900: #7f1d1d;
17813
+ --sl-color-danger-950: #450a0a;
17814
+
17815
+ --sl-color-neutral-50: #fafafa;
17816
+ --sl-color-neutral-100: #f4f4f5;
17817
+ --sl-color-neutral-200: #e4e4e7;
17818
+ --sl-color-neutral-300: #d4d4d8;
17819
+ --sl-color-neutral-400: #a1a1aa;
17820
+ --sl-color-neutral-500: #71717a;
17821
+ --sl-color-neutral-600: #52525b;
17822
+ --sl-color-neutral-700: #3f3f46;
17823
+ --sl-color-neutral-800: #27272a;
17824
+ --sl-color-neutral-900: #18181b;
17825
+ --sl-color-neutral-950: #09090b;
17826
+
17827
+ --sl-color-neutral-0: #ffffff;
17828
+ --sl-color-neutral-1000: hsl(0, 0%, 0%);
17829
+
17830
+ --sl-border-base: var(--be-border-base);
17831
+ --sl-border-radius-small: calc(var(--sl-border-base) * 0.1875);
17832
+ --sl-border-radius-medium: calc(var(--sl-border-base) * 0.25);
17833
+ --sl-border-radius-large: calc(var(--sl-border-base) * 0.5);
17834
+ --sl-border-radius-x-large: var(
17835
+ --sl-border-base
17836
+ );
17837
+
17838
+ --sl-border-radius-circle: 50%;
17839
+ --sl-border-radius-pill: 9999px;
17840
+
17841
+ --sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);
17842
+ --sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);
17843
+ --sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);
17844
+ --sl-shadow-large: var(
17845
+ --be-shadow-large,
17846
+ 0 2px 8px hsl(240 3.8% 46.1% / 12%)
17847
+ );
17848
+ --sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);
17849
+
17850
+ --sl-spacing-base: var(--be-spacing-base, 1rem);
17851
+ --sl-spacing-3x-small: calc(
17852
+ var(--sl-spacing-base) * 0.125
17853
+ );
17854
+ --sl-spacing-2x-small: calc(
17855
+ var(--sl-spacing-base) * 0.25
17856
+ );
17857
+ --sl-spacing-1_5x-small: calc(
17858
+ var(--sl-spacing-base) * 0.375
17859
+ );
17860
+ --sl-spacing-x-small: calc(
17861
+ var(--sl-spacing-base) * 0.5
17862
+ );
17863
+ --sl-spacing-small: calc(
17864
+ var(--sl-spacing-base) * 0.75
17865
+ );
17866
+ --sl-spacing-medium: var(--sl-spacing-base);
17867
+ --sl-spacing-large: calc(
17868
+ var(--sl-spacing-base) * 1.25
17869
+ );
17870
+ --sl-spacing-x-large: calc(
17871
+ var(--sl-spacing-base) * 1.75
17872
+ );
17873
+ --sl-spacing-2x-large: calc(
17874
+ var(--sl-spacing-base) * 2.25
17875
+ );
17876
+ --sl-spacing-3x-large: calc(
17877
+ var(--sl-spacing-base) * 3
17878
+ );
17879
+ --sl-spacing-4x-large: calc(
17880
+ var(--sl-spacing-base) * 4.5
17881
+ );
17882
+ --sl-spacing-5x-large: calc(var(--sl-spacing-base) * 5);
17883
+
17884
+ --indent-size: var(--sl-spacing-large);
17885
+
17886
+ --sl-transition-x-slow: 1000ms;
17887
+ --sl-transition-slow: 500ms;
17888
+ --sl-transition-medium: 250ms;
17889
+ --sl-transition-fast: 150ms;
17890
+ --sl-transition-x-fast: 50ms;
17891
+
17892
+ --sl-font-mono: SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
17893
+ monospace;
17894
+ --sl-font-sans: var(
17895
+ --be-font-sans,
17896
+ -apple-system,
17897
+ BlinkMacSystemFont,
17898
+ 'Segoe UI',
17899
+ Roboto,
17900
+ Helvetica,
17901
+ Arial,
17902
+ sans-serif,
17903
+ 'Apple Color Emoji',
17904
+ 'Segoe UI Emoji',
17905
+ 'Segoe UI Symbol'
17906
+ );
17907
+ --sl-font-serif: var(
17908
+ --be-font-serif,
17909
+ Georgia,
17910
+ 'Times New Roman',
17911
+ serif
17912
+ );
17913
+
17914
+ --sl-font-size-base: var(--be-font-size-base, 1rem);
17915
+ --sl-font-size-2x-small: calc(var(--sl-font-size-base) * 0.625);
17916
+ --sl-font-size-x-small: calc(var(--sl-font-size-base) * 0.75);
17917
+ --sl-font-size-small: calc(var(--sl-font-size-base) * 0.875);
17918
+ --sl-font-size-medium: var(--sl-font-size-base);
17919
+ --sl-font-size-large: calc(var(--sl-font-size-base) * 1.25);
17920
+ --sl-font-size-x-large: calc(var(--sl-font-size-base) * 1.5);
17921
+ --sl-font-size-2x-large: calc(var(--sl-font-size-base) * 2.25);
17922
+ --sl-font-size-3x-large: calc(var(--sl-font-size-base) * 3);
17923
+ --sl-font-size-4x-large: calc(var(--sl-font-size-base) * 4.5);
17924
+
17925
+ --sl-font-weight-light: 300;
17926
+ --sl-font-weight-normal: 400;
17927
+ --sl-font-weight-semibold: 500;
17928
+ --sl-font-weight-bold: 700;
17929
+
17930
+ --sl-letter-spacing-denser: -0.03em;
17931
+ --sl-letter-spacing-dense: -0.015em;
17932
+ --sl-letter-spacing-normal: normal;
17933
+ --sl-letter-spacing-loose: 0.075em;
17934
+ --sl-letter-spacing-looser: 0.15em;
17935
+
17936
+ --sl-line-height-base: 1;
17937
+ --sl-line-height-x-denser: calc(var(--sl-line-height-base) * 1.1);
17938
+ --sl-line-height-denser: calc(var(--sl-line-height-base) * 1.2);
17939
+ --sl-line-height-dense: calc(var(--sl-line-height-base) * 1.4);
17940
+ --sl-line-height-subnormal: calc(var(--sl-line-height-base) * 1.6);
17941
+ --sl-line-height-normal: calc(var(--sl-line-height-base) * 1.8);
17942
+ --sl-line-height-loose: calc(var(--sl-line-height-base) * 2.2);
17943
+ --sl-line-height-looser: calc(var(--sl-line-height-base) * 2.6);
17944
+
17945
+ --sl-focus-ring-color: var(--sl-color-primary-600);
17946
+ --sl-focus-ring-style: solid;
17947
+ --sl-focus-ring-width: var(--be-focus-ring-width, 1px);
17948
+ --sl-focus-ring: var(--sl-focus-ring-style)
17949
+ var(--sl-focus-ring-width) var(--sl-focus-ring-color);
17950
+ --sl-focus-ring-offset: 1px;
17951
+
17952
+ --sl-button-font-size-small: var(--sl-font-size-x-small);
17953
+ --sl-button-font-size-medium: var(--sl-font-size-small);
17954
+ --sl-button-font-size-large: var(--sl-font-size-medium);
17955
+
17956
+ --sl-input-height-base: 1rem;
17957
+ --sl-input-height-small: calc(var(--sl-input-height-base) * 1.875);
17958
+ --sl-input-height-medium: calc(var(--sl-input-height-base) * 2.5);
17959
+ --sl-input-height-large: calc(var(--sl-input-height-base) * 3.125);
17960
+
17961
+ --sl-input-background-color: var(--sl-color-neutral-0);
17962
+ --sl-input-background-color-hover: var(--sl-input-background-color);
17963
+ --sl-input-background-color-focus: var(--sl-input-background-color);
17964
+ --sl-input-background-color-disabled: var(--sl-color-neutral-100);
17965
+ --sl-input-border-color: var(--sl-color-neutral-300);
17966
+ --sl-input-border-color-hover: var(--sl-color-neutral-400);
17967
+ --sl-input-border-color-focus: var(--sl-color-primary-500);
17968
+ --sl-input-border-color-disabled: var(--sl-color-neutral-300);
17969
+ --sl-input-border-width: 1px;
17970
+ --sl-input-required-content: '*';
17971
+ --sl-input-required-content-offset: -2px;
17972
+ --sl-input-required-content-color: var(--sl-input-label-color);
17973
+
17974
+ --sl-input-border-radius-small: var(--sl-border-radius-medium);
17975
+ --sl-input-border-radius-medium: var(--sl-border-radius-medium);
17976
+ --sl-input-border-radius-large: var(--sl-border-radius-medium);
17977
+
17978
+ --sl-input-font-family: var(--sl-font-sans);
17979
+ --sl-input-font-weight: var(--sl-font-weight-normal);
17980
+ --sl-input-font-size-small: var(--sl-font-size-small);
17981
+ --sl-input-font-size-medium: var(--sl-font-size-medium);
17982
+ --sl-input-font-size-large: var(--sl-font-size-large);
17983
+ --sl-input-letter-spacing: var(--sl-letter-spacing-normal);
17984
+
17985
+ --sl-input-color: var(--sl-color-neutral-700);
17986
+ --sl-input-color-hover: var(--sl-color-neutral-700);
17987
+ --sl-input-color-focus: var(--sl-color-neutral-700);
17988
+ --sl-input-color-disabled: var(--sl-color-neutral-900);
17989
+ --sl-input-icon-color: var(--sl-color-neutral-400);
17990
+ --sl-input-icon-color-hover: var(--sl-color-neutral-500);
17991
+ --sl-input-icon-color-focus: var(--sl-color-neutral-500);
17992
+ --sl-input-placeholder-color: var(--sl-color-neutral-400);
17993
+ --sl-input-placeholder-color-disabled: var(--sl-color-neutral-500);
17994
+ --sl-input-spacing-small: var(--sl-spacing-small);
17995
+ --sl-input-spacing-medium: var(--sl-spacing-medium);
17996
+ --sl-input-spacing-large: var(--sl-spacing-large);
17997
+
17998
+ --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);
17999
+ --sl-input-focus-ring-offset: 0;
18000
+
18001
+ --sl-input-filled-background-color: var(--sl-color-neutral-100);
18002
+ --sl-input-filled-background-color-hover: var(
18003
+ --sl-color-neutral-100
18004
+ );
18005
+ --sl-input-filled-background-color-focus: var(
18006
+ --sl-color-neutral-100
18007
+ );
18008
+ --sl-input-filled-background-color-disabled: var(
18009
+ --sl-color-neutral-100
18010
+ );
18011
+ --sl-input-filled-color: var(--sl-color-neutral-800);
18012
+ --sl-input-filled-color-hover: var(--sl-color-neutral-800);
18013
+ --sl-input-filled-color-focus: var(--sl-color-neutral-700);
18014
+ --sl-input-filled-color-disabled: var(--sl-color-neutral-800);
18015
+
18016
+ --sl-input-label-font-size-small: var(--sl-font-size-small);
18017
+ --sl-input-label-font-size-medium: var(--sl-font-size-medium);
18018
+ --sl-input-label-font-size-large: var(--sl-font-size-large);
18019
+ --sl-input-label-color: inherit;
18020
+
18021
+ --sl-input-help-text-font-size-small: var(--sl-font-size-x-small);
18022
+ --sl-input-help-text-font-size-medium: var(--sl-font-size-small);
18023
+ --sl-input-help-text-font-size-large: var(--sl-font-size-medium);
18024
+ --sl-input-help-text-color: var(--sl-color-neutral-500);
18025
+
18026
+ --sl-toggle-size-small: 0.875rem;
18027
+ --sl-toggle-size-medium: 1.125rem;
18028
+ --sl-toggle-size-large: 1.375rem;
18029
+
18030
+ --sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);
18031
+
18032
+ --sl-panel-background-color: var(--sl-color-neutral-0);
18033
+ --sl-panel-border-color: var(--sl-color-neutral-300);
18034
+ --sl-panel-border-width: 1px;
18035
+
18036
+ --sl-tooltip-border-radius: var(--sl-border-radius-medium);
18037
+ --sl-tooltip-background-color: var(--sl-color-neutral-800);
18038
+ --sl-tooltip-color: var(--sl-color-neutral-0);
18039
+ --sl-tooltip-font-family: var(--sl-font-sans);
18040
+ --sl-tooltip-font-weight: var(--sl-font-weight-normal);
18041
+ --sl-tooltip-font-size: var(--sl-font-size-small);
18042
+ --sl-tooltip-line-height: var(--sl-line-height-dense);
18043
+ --sl-tooltip-padding: var(--sl-spacing-2x-small)
18044
+ var(--sl-spacing-x-small);
18045
+ --sl-tooltip-arrow-size: 6px;
18046
+
18047
+ --sl-z-index-drawer: 700;
18048
+ --sl-z-index-dialog: 800;
18049
+ --sl-z-index-dropdown: 900;
18050
+ --sl-z-index-toast: 950;
18051
+ --sl-z-index-tooltip: 1000;
18052
+
18053
+ --td-footer-background-color: #09090b;
18054
+ --td-footer-color: #e4e4e7;
18055
+
18056
+ --td-code-block-toolbar-cell-background-color: #e2e8f0;
18057
+ --td-code-block-highlighted-background-color: #dbeafe;
18058
+
18059
+ --td-card-color: 'inherit';
18060
+ --td-card-background-color: var(--sl-color-neutral-0);
18061
+ --td-card-background-hover-color: var(--sl-color-neutral-50);
18062
+ --td-card-border-color: rgba(24, 24, 27, 0.08);
18063
+ --td-card-box-shadow-1: rgba(24, 24, 27, 0.02);
18064
+ --td-card-box-shadow-1-y: 3px;
18065
+ --td-card-box-shadow-1-blur: 6px;
18066
+ --td-card-box-shadow-2: rgba(24, 24, 27, 0.04);
18067
+ --td-card-box-shadow-2-y: 2px;
18068
+ --td-card-box-shadow-2-blur: 7px;
18069
+
18070
+ --td-card-hover-border-color: rgba(24, 24, 27, 0.15);
18071
+ --td-card-hover-box-shadow-1: rgba(24, 24, 27, 0.05);
18072
+ --td-card-hover-box-shadow-1-y: 3px;
18073
+ --td-card-hover-box-shadow-1-blur: 6px;
18074
+ --td-card-hover-box-shadow-2: rgba(24, 24, 27, 0.1);
18075
+ --td-card-hover-box-shadow-2-y: 8px;
18076
+ --td-card-hover-box-shadow-2-blur: 15px;
18077
+
18078
+ --td-body-gradient-line-color: #ffffff;
18079
+
18080
+ --td-editor-text-color-blue: hsl(221, 100%, 50%);
18081
+ --td-editor-text-color-purple: hsl(291, 100%, 39%);
18082
+ --td-editor-text-color-red: hsl(4, 100%, 40%);
18083
+ --td-editor-text-color-green: hsl(122, 100%, 23%);
18084
+
18085
+ --td-editor-bg-color-blue: hsl(221, 100%, 50%, 0.1);
18086
+ --td-editor-bg-color-purple: hsl(291, 100%, 39%, 0.1);
18087
+ --td-editor-bg-color-red: hsl(4, 100%, 40%, 0.1);
18088
+ --td-editor-bg-color-green: hsl(122, 100%, 23%, 0.1);
18089
+ }
18090
+ `;
18091
+ var themeDark = `
18092
+ :host,
18093
+ .theme-dark {
18094
+ color-scheme: dark;
18095
+
18096
+ --sl-color-primary-950: #f0f9ff;
18097
+ --sl-color-primary-900: #e0f2fe;
18098
+ --sl-color-primary-800: #bae6fd;
18099
+ --sl-color-primary-700: #93c5fd;
18100
+ --sl-color-primary-600: #60a5fa;
18101
+ --sl-color-primary-500: #3b82f6;
18102
+ --sl-color-primary-400: #2563eb;
18103
+ --sl-color-primary-300: #1d4ed8;
18104
+ --sl-color-primary-200: #1e40af;
18105
+ --sl-color-primary-100: #1e3a8a;
18106
+ --sl-color-primary-50: #172554;
18107
+
18108
+ --sl-color-success-950: #f0fdf4;
18109
+ --sl-color-success-900: #dcfce7;
18110
+ --sl-color-success-800: #bbf7d0;
18111
+ --sl-color-success-700: #86efac;
18112
+ --sl-color-success-600: #4ade80;
18113
+ --sl-color-success-500: #22c55e;
18114
+ --sl-color-success-400: #16a34a;
18115
+ --sl-color-success-300: #15803d;
18116
+ --sl-color-success-200: #166534;
18117
+ --sl-color-success-100: #14532d;
18118
+ --sl-color-success-50: #052e16;
18119
+
18120
+ --sl-color-warning-950: #fffbeb;
18121
+ --sl-color-warning-900: #fef3c7;
18122
+ --sl-color-warning-800: #fde68a;
18123
+ --sl-color-warning-700: #fcd34d;
18124
+ --sl-color-warning-600: #fbbf24;
18125
+ --sl-color-warning-500: #f59e0b;
18126
+ --sl-color-warning-400: #d97706;
18127
+ --sl-color-warning-300: #b45309;
18128
+ --sl-color-warning-200: #92400e;
18129
+ --sl-color-warning-100: #78350f;
18130
+ --sl-color-warning-50: #451a03;
18131
+
18132
+ --sl-color-danger-950: #fef2f2;
18133
+ --sl-color-danger-900: #fee2e2;
18134
+ --sl-color-danger-800: #fecaca;
18135
+ --sl-color-danger-700: #fca5a5;
18136
+ --sl-color-danger-600: #f87171;
18137
+ --sl-color-danger-500: #ef4444;
18138
+ --sl-color-danger-400: #dc2626;
18139
+ --sl-color-danger-300: #b91c1c;
18140
+ --sl-color-danger-200: #991b1b;
18141
+ --sl-color-danger-100: #7f1d1d;
18142
+ --sl-color-danger-50: #450a0a;
18143
+
18144
+ --sl-color-neutral-950: #fafafa;
18145
+ --sl-color-neutral-900: #f4f4f5;
18146
+ --sl-color-neutral-800: #e4e4e7;
18147
+ --sl-color-neutral-700: #d4d4d8;
18148
+ --sl-color-neutral-600: #a1a1aa;
18149
+ --sl-color-neutral-500: #71717a;
18150
+
18151
+ --sl-color-neutral-400: #71717a;
18152
+ --sl-color-neutral-300: #52525b;
18153
+ --sl-color-neutral-200: #3f3f46;
18154
+ --sl-color-neutral-100: #27272a;
18155
+ --sl-color-neutral-50: #18181b;
18156
+ --sl-color-neutral-0: #09090b;
18157
+ --sl-color-neutral-1000: hsl(0, 0%, 100%);
18158
+
18159
+ --sl-border-base: var(--be-border-base);
18160
+ --sl-border-radius-small: calc(var(--sl-border-base) * 0.1875);
18161
+ --sl-border-radius-medium: calc(var(--sl-border-base) * 0.25);
18162
+ --sl-border-radius-large: calc(var(--sl-border-base) * 0.5);
18163
+ --sl-border-radius-x-large: var(
18164
+ --sl-border-base
18165
+ );
18166
+
18167
+ --sl-border-radius-circle: 50%;
18168
+ --sl-border-radius-pill: 9999px;
18169
+
18170
+ --sl-shadow-x-small: 0 1px 2px rgb(0 0 0 / 18%);
18171
+ --sl-shadow-small: 0 1px 2px rgb(0 0 0 / 24%);
18172
+ --sl-shadow-medium: 0 2px 4px rgb(0 0 0 / 24%);
18173
+ --sl-shadow-large: var(
18174
+ --be-shadow-large,
18175
+ 0 2px 8px rgb(0 0 0 / 24%)
18176
+ );
18177
+ --sl-shadow-x-large: 0 4px 16px rgb(0 0 0 / 24%);
18178
+
18179
+ --sl-spacing-base: var(--be-spacing-base, 1rem);
18180
+ --sl-spacing-3x-small: calc(
18181
+ var(--sl-spacing-base) * 0.125
18182
+ );
18183
+ --sl-spacing-2x-small: calc(
18184
+ var(--sl-spacing-base) * 0.25
18185
+ );
18186
+ --sl-spacing-1_5x-small: calc(
18187
+ var(--sl-spacing-base) * 0.375
18188
+ );
18189
+ --sl-spacing-x-small: calc(
18190
+ var(--sl-spacing-base) * 0.5
18191
+ );
18192
+ --sl-spacing-small: calc(
18193
+ var(--sl-spacing-base) * 0.75
18194
+ );
18195
+ --sl-spacing-medium: var(--sl-spacing-base);
18196
+ --sl-spacing-large: calc(
18197
+ var(--sl-spacing-base) * 1.25
18198
+ );
18199
+ --sl-spacing-x-large: calc(
18200
+ var(--sl-spacing-base) * 1.75
18201
+ );
18202
+ --sl-spacing-2x-large: calc(
18203
+ var(--sl-spacing-base) * 2.25
18204
+ );
18205
+ --sl-spacing-3x-large: calc(
18206
+ var(--sl-spacing-base) * 3
18207
+ );
18208
+ --sl-spacing-4x-large: calc(
18209
+ var(--sl-spacing-base) * 4.5
18210
+ );
18211
+ --sl-spacing-5x-large: calc(var(--sl-spacing-base) * 5);
18212
+
18213
+ --indent-size: var(--sl-spacing-large);
18214
+
18215
+ --sl-transition-x-slow: 1000ms;
18216
+ --sl-transition-slow: 500ms;
18217
+ --sl-transition-medium: 250ms;
18218
+ --sl-transition-fast: 150ms;
18219
+ --sl-transition-x-fast: 50ms;
18220
+
18221
+ --sl-font-mono: var(
18222
+ --be-font-mono,
18223
+ SFMono-Regular,
18224
+ Consolas,
18225
+ 'Liberation Mono',
18226
+ Menlo,
18227
+ monospace
18228
+ );
18229
+ --sl-font-sans: var(
18230
+ --be-font-sans,
18231
+ -apple-system,
18232
+ BlinkMacSystemFont,
18233
+ 'Segoe UI',
18234
+ Roboto,
18235
+ Helvetica,
18236
+ Arial,
18237
+ sans-serif,
18238
+ 'Apple Color Emoji',
18239
+ 'Segoe UI Emoji',
18240
+ 'Segoe UI Symbol'
18241
+ );
18242
+ --sl-font-serif: var(
18243
+ --be-font-serif,
18244
+ Georgia,
18245
+ 'Times New Roman',
18246
+ serif
18247
+ );
18248
+
18249
+ --sl-font-size-base: var(--be-font-size-base, 1rem);
18250
+ --sl-font-size-2x-small: calc(var(--sl-font-size-base) * 0.625);
18251
+ --sl-font-size-x-small: calc(var(--sl-font-size-base) * 0.75);
18252
+ --sl-font-size-small: calc(var(--sl-font-size-base) * 0.875);
18253
+ --sl-font-size-medium: var(--sl-font-size-base);
18254
+ --sl-font-size-large: calc(var(--sl-font-size-base) * 1.25);
18255
+ --sl-font-size-x-large: calc(var(--sl-font-size-base) * 1.5);
18256
+ --sl-font-size-2x-large: calc(var(--sl-font-size-base) * 2.25);
18257
+ --sl-font-size-3x-large: calc(var(--sl-font-size-base) * 3);
18258
+ --sl-font-size-4x-large: calc(var(--sl-font-size-base) * 4.5);
18259
+
18260
+ --sl-font-weight-light: 300;
18261
+ --sl-font-weight-normal: 400;
18262
+ --sl-font-weight-semibold: 500;
18263
+ --sl-font-weight-bold: 700;
18264
+
18265
+ --sl-letter-spacing-denser: -0.03em;
18266
+ --sl-letter-spacing-dense: -0.015em;
18267
+ --sl-letter-spacing-normal: normal;
18268
+ --sl-letter-spacing-loose: 0.075em;
18269
+ --sl-letter-spacing-looser: 0.15em;
18270
+
18271
+ --sl-line-height-base: 1;
18272
+ --sl-line-height-x-denser: calc(var(--sl-line-height-base) * 1.1);
18273
+ --sl-line-height-denser: calc(var(--sl-line-height-base) * 1.2);
18274
+ --sl-line-height-dense: calc(var(--sl-line-height-base) * 1.4);
18275
+ --sl-line-height-subnormal: calc(var(--sl-line-height-base) * 1.6);
18276
+ --sl-line-height-normal: calc(var(--sl-line-height-base) * 1.8);
18277
+ --sl-line-height-loose: calc(var(--sl-line-height-base) * 2.2);
18278
+ --sl-line-height-looser: calc(var(--sl-line-height-base) * 2.6);
18279
+
18280
+ --sl-focus-ring-color: var(--sl-color-primary-700);
18281
+ --sl-focus-ring-style: solid;
18282
+ --sl-focus-ring-width: var(--be-focus-ring-width, 1px);
18283
+ --sl-focus-ring: var(--sl-focus-ring-style)
18284
+ var(--sl-focus-ring-width) var(--sl-focus-ring-color);
18285
+ --sl-focus-ring-offset: 1px;
18286
+
18287
+ --sl-button-font-size-small: var(--sl-font-size-x-small);
18288
+ --sl-button-font-size-medium: var(--sl-font-size-small);
18289
+ --sl-button-font-size-large: var(--sl-font-size-medium);
18290
+
18291
+ --sl-input-height-base: 1rem;
18292
+ --sl-input-height-small: calc(var(--sl-input-height-base) * 1.875);
18293
+ --sl-input-height-medium: calc(var(--sl-input-height-base) * 2.5);
18294
+ --sl-input-height-large: calc(var(--sl-input-height-base) * 3.125);
18295
+
18296
+ --sl-input-background-color: var(--sl-color-neutral-0);
18297
+ --sl-input-background-color-hover: var(--sl-input-background-color);
18298
+ --sl-input-background-color-focus: var(--sl-input-background-color);
18299
+ --sl-input-background-color-disabled: var(--sl-color-neutral-100);
18300
+ --sl-input-border-color: var(--sl-color-neutral-300);
18301
+ --sl-input-border-color-hover: var(--sl-color-neutral-400);
18302
+ --sl-input-border-color-focus: var(--sl-color-primary-500);
18303
+ --sl-input-border-color-disabled: var(--sl-color-neutral-300);
18304
+ --sl-input-border-width: 1px;
18305
+ --sl-input-required-content: '*';
18306
+ --sl-input-required-content-offset: -2px;
18307
+ --sl-input-required-content-color: var(--sl-input-label-color);
18308
+
18309
+ --sl-input-border-radius-small: var(--sl-border-radius-medium);
18310
+ --sl-input-border-radius-medium: var(--sl-border-radius-medium);
18311
+ --sl-input-border-radius-large: var(--sl-border-radius-medium);
18312
+
18313
+ --sl-input-font-family: var(--sl-font-sans);
18314
+ --sl-input-font-weight: var(--sl-font-weight-normal);
18315
+ --sl-input-font-size-small: var(--sl-font-size-small);
18316
+ --sl-input-font-size-medium: var(--sl-font-size-medium);
18317
+ --sl-input-font-size-large: var(--sl-font-size-large);
18318
+ --sl-input-letter-spacing: var(--sl-letter-spacing-normal);
18319
+
18320
+ --sl-input-color: var(--sl-color-neutral-700);
18321
+ --sl-input-color-hover: var(--sl-color-neutral-700);
18322
+ --sl-input-color-focus: var(--sl-color-neutral-700);
18323
+ --sl-input-color-disabled: var(--sl-color-neutral-900);
18324
+ --sl-input-icon-color: var(--sl-color-neutral-400);
18325
+ --sl-input-icon-color-hover: var(--sl-color-neutral-500);
18326
+ --sl-input-icon-color-focus: var(--sl-color-neutral-500);
18327
+ --sl-input-placeholder-color: var(--sl-color-neutral-400);
18328
+ --sl-input-placeholder-color-disabled: var(--sl-color-neutral-500);
18329
+ --sl-input-spacing-small: var(--sl-spacing-small);
18330
+ --sl-input-spacing-medium: var(--sl-spacing-medium);
18331
+ --sl-input-spacing-large: var(--sl-spacing-large);
18332
+
18333
+ --sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);
18334
+ --sl-input-focus-ring-offset: 0;
18335
+
18336
+ --sl-input-filled-background-color: var(--sl-color-neutral-100);
18337
+ --sl-input-filled-background-color-hover: var(
18338
+ --sl-color-neutral-100
18339
+ );
18340
+ --sl-input-filled-background-color-focus: var(
18341
+ --sl-color-neutral-100
18342
+ );
18343
+ --sl-input-filled-background-color-disabled: var(
18344
+ --sl-color-neutral-100
18345
+ );
18346
+ --sl-input-filled-color: var(--sl-color-neutral-800);
18347
+ --sl-input-filled-color-hover: var(--sl-color-neutral-800);
18348
+ --sl-input-filled-color-focus: var(--sl-color-neutral-700);
18349
+ --sl-input-filled-color-disabled: var(--sl-color-neutral-800);
18350
+
18351
+ --sl-input-label-font-size-small: var(--sl-font-size-small);
18352
+ --sl-input-label-font-size-medium: var(--sl-font-size-medium);
18353
+ --sl-input-label-font-size-large: var(--sl-font-size-large);
18354
+ --sl-input-label-color: inherit;
18355
+
18356
+ --sl-input-help-text-font-size-small: var(--sl-font-size-x-small);
18357
+ --sl-input-help-text-font-size-medium: var(--sl-font-size-small);
18358
+ --sl-input-help-text-font-size-large: var(--sl-font-size-medium);
18359
+ --sl-input-help-text-color: var(--sl-color-neutral-500);
18360
+
18361
+ --sl-toggle-size-small: 0.875rem;
18362
+ --sl-toggle-size-medium: 1.125rem;
18363
+ --sl-toggle-size-large: 1.375rem;
18364
+
18365
+ --sl-overlay-background-color: hsla(0, 0%, 100%, 0.05);
18366
+
18367
+ --sl-panel-background-color: var(--sl-color-neutral-0);
18368
+ --sl-panel-border-color: var(--sl-color-neutral-300);
18369
+ --sl-panel-border-width: 1px;
18370
+
18371
+ --sl-tooltip-border-radius: var(--sl-border-radius-medium);
18372
+ --sl-tooltip-background-color: var(--sl-color-neutral-800);
18373
+ --sl-tooltip-color: var(--sl-color-neutral-0);
18374
+ --sl-tooltip-font-family: var(--sl-font-sans);
18375
+ --sl-tooltip-font-weight: var(--sl-font-weight-normal);
18376
+ --sl-tooltip-font-size: var(--sl-font-size-small);
18377
+ --sl-tooltip-line-height: var(--sl-line-height-dense);
18378
+ --sl-tooltip-padding: var(--sl-spacing-2x-small)
18379
+ var(--sl-spacing-x-small);
18380
+ --sl-tooltip-arrow-size: 6px;
18381
+
18382
+ --sl-z-index-drawer: 700;
18383
+ --sl-z-index-dialog: 800;
18384
+ --sl-z-index-dropdown: 900;
18385
+ --sl-z-index-toast: 950;
18386
+ --sl-z-index-tooltip: 1000;
18387
+
18388
+ --td-footer-background-color: #09090b;
18389
+ --td-footer-color: #e4e4e7;
18390
+
18391
+ --td-code-block-toolbar-cell-background-color: #09090b;
18392
+ --td-code-block-highlighted-background-color: #1e293b;
18393
+
18394
+ --td-card-color: 'inherit';
18395
+ --td-card-background-color: var(--sl-color-neutral-0);
18396
+ --td-card-background-hover-color: var(--sl-color-neutral-50);
18397
+ --td-card-border-color: rgba(255, 255, 255, 0.1);
18398
+ --td-card-box-shadow-1: rgba(0, 0, 0, 0.05);
18399
+ --td-card-box-shadow-1-y: 3px;
18400
+ --td-card-box-shadow-1-blur: 6px;
18401
+ --td-card-box-shadow-2: rgba(0, 0, 0, 0.1);
18402
+ --td-card-box-shadow-2-y: 8px;
18403
+ --td-card-box-shadow-2-blur: 15px;
18404
+
18405
+ --td-card-hover-border-color: rgba(255, 255, 255, 0.2);
18406
+ --td-card-hover-box-shadow-1: rgba(0, 0, 0, 0.04);
18407
+ --td-card-hover-box-shadow-1-y: 5px;
18408
+ --td-card-hover-box-shadow-1-blur: 10px;
18409
+ --td-card-hover-box-shadow-2: rgba(0, 0, 0, 0.3);
18410
+ --td-card-hover-box-shadow-2-y: 15px;
18411
+ --td-card-hover-box-shadow-2-blur: 25px;
18412
+
18413
+ --td-body-gradient-line-color: #27272a47;
18414
+
18415
+ --td-editor-text-color-blue: hsl(221, 100%, 70%);
18416
+ --td-editor-text-color-purple: hsl(291, 100%, 65%);
18417
+ --td-editor-text-color-red: hsl(4, 100%, 63%);
18418
+ --td-editor-text-color-green: hsl(122, 100%, 34%);
18419
+
18420
+ --td-editor-bg-color-blue: hsl(221, 100%, 70%, 0.2);
18421
+ --td-editor-bg-color-purple: hsl(291, 100%, 65%, 0.2);
18422
+ --td-editor-bg-color-red: hsl(4, 100%, 63%, 0.2);
18423
+ --td-editor-bg-color-green: hsl(122, 100%, 34%, 0.2);
18424
+ }
18425
+ `;
18426
+
17747
18427
  // src/theme/ThemeProvider.tsx
17748
18428
  import {
17749
18429
  createContext as createContext2,
@@ -17752,21 +18432,37 @@ import {
17752
18432
  useRef as useRef57,
17753
18433
  useState as useState19
17754
18434
  } from "react";
17755
- import { jsx as jsx117 } from "react/jsx-runtime";
17756
- var themeVariablesMap = {
18435
+
18436
+ // src/theme/constants.ts
18437
+ var themeSettingsMap = {
17757
18438
  borderBase: "--be-border-base",
17758
18439
  fontSans: "--be-font-sans",
17759
18440
  fontSerif: "--be-font-serif",
17760
18441
  fontMono: "--be-font-mono",
17761
18442
  spacingBase: "--be-spacing-base",
17762
- fontSizeBase: "--be-font-size-base"
18443
+ fontSizeBase: "--be-font-size-base",
18444
+ focusRingWidth: "--be-focus-ring-width",
18445
+ shadowLarge: "--be-shadow-large"
18446
+ };
18447
+ var defaultThemeSettings = {
18448
+ borderBase: "1rem",
18449
+ fontSans: "'Inter', sans-serif",
18450
+ fontSerif: "Georgia, 'Times New Roman', serif",
18451
+ fontMono: "Menlo, Monaco, 'Courier New', monospace",
18452
+ focusRingWidth: "1px",
18453
+ shadowLarge: "rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px",
18454
+ spacingBase: "1rem",
18455
+ fontSizeBase: "1rem"
17763
18456
  };
18457
+
18458
+ // src/theme/ThemeProvider.tsx
18459
+ import { jsx as jsx117, jsxs as jsxs43 } from "react/jsx-runtime";
17764
18460
  var ThemeContext = createContext2(
17765
18461
  void 0
17766
18462
  );
17767
18463
  function ThemeProvider({
17768
18464
  theme,
17769
- themeVariables = {},
18465
+ themeSettings = {},
17770
18466
  children
17771
18467
  }) {
17772
18468
  const rootElementRef = useRef57(null);
@@ -17793,20 +18489,33 @@ function ThemeProvider({
17793
18489
  );
17794
18490
  rootElementRef.current?.classList.add(`theme-${effectiveTheme}`);
17795
18491
  }, [effectiveTheme]);
17796
- return /* @__PURE__ */ jsx117(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsx117(
17797
- "div",
18492
+ return /* @__PURE__ */ jsx117(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ jsxs43(
18493
+ "article",
17798
18494
  {
17799
18495
  ref: rootElementRef,
17800
- className: "theme-settings",
18496
+ className: "be-article",
17801
18497
  style: {
17802
18498
  ...Object.fromEntries(
17803
- Object.entries(themeVariables).map(([key, value]) => [
17804
- themeVariablesMap[key],
18499
+ Object.entries({
18500
+ ...defaultThemeSettings,
18501
+ themeSettings
18502
+ }).map(([key, value]) => [
18503
+ themeSettingsMap[key],
17805
18504
  value
17806
18505
  ])
17807
18506
  )
17808
18507
  },
17809
- children
18508
+ children: [
18509
+ /* @__PURE__ */ jsx117(
18510
+ "style",
18511
+ {
18512
+ dangerouslySetInnerHTML: {
18513
+ __html: effectiveTheme === "light" ? themeLight : themeDark
18514
+ }
18515
+ }
18516
+ ),
18517
+ children
18518
+ ]
17810
18519
  }
17811
18520
  ) });
17812
18521
  }
@@ -17826,16 +18535,16 @@ import React24, {
17826
18535
  useRef as useRef58,
17827
18536
  useState as useState20
17828
18537
  } from "react";
17829
- import { jsx as jsx118, jsxs as jsxs43 } from "react/jsx-runtime";
18538
+ import { jsx as jsx118, jsxs as jsxs44 } from "react/jsx-runtime";
17830
18539
  var TOGGLE_EDITING_MODE = "TOGGLE_EDITING_MODE";
17831
18540
  var RESET_EDITING_MODE = "RESET_EDITING_MODE";
17832
18541
  var BlockEditorContext = React24.createContext(null);
17833
18542
  function BlockEditor(props) {
17834
18543
  const {
17835
- themeSettings,
17836
18544
  editable = true,
17837
18545
  editorState,
17838
18546
  theme,
18547
+ themeSettings,
17839
18548
  onChange,
17840
18549
  children,
17841
18550
  renderSettings
@@ -17851,9 +18560,6 @@ function BlockEditor(props) {
17851
18560
  const drawerRef = useRef58(null);
17852
18561
  const [isBlockEditorReady, setBlockEditorReady] = useState20(false);
17853
18562
  const { historyState } = useSharedHistoryContext();
17854
- const [blockEditorStyleVars, setBlockEditorStyleVars] = useState20({
17855
- "--be-ol-list-style-type": "decimal"
17856
- });
17857
18563
  const handleChange = useCallback11(
17858
18564
  (editorState2, _editor, tags) => {
17859
18565
  if (onChange && !tags?.has("new_state") && !tags?.has("history-merge")) {
@@ -17999,83 +18705,63 @@ function BlockEditor(props) {
17999
18705
  },
18000
18706
  drawer: drawerRef.current,
18001
18707
  isBlockEditorReady,
18002
- blockEditorStyleVars,
18003
- setBlockEditorStyleVars: (value) => {
18004
- setBlockEditorStyleVars({
18005
- ...blockEditorStyleVars,
18006
- ...value
18007
- });
18008
- },
18009
18708
  renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ jsx118("div", {})
18010
18709
  },
18011
- children: /* @__PURE__ */ jsx118(ThemeProvider, { theme, themeVariables: themeSettings, children: /* @__PURE__ */ jsx118(ResizeObserver, { children: /* @__PURE__ */ jsx118(
18012
- "article",
18013
- {
18014
- className: "be-article",
18015
- style: { ...blockEditorStyleVars },
18016
- children: /* @__PURE__ */ jsx118(SharedHistoryContext, { children: /* @__PURE__ */ jsxs43(NodeProvider, { children: [
18017
- /* @__PURE__ */ jsx118(
18018
- "main",
18019
- {
18020
- className: `${settingsPanelSwitch === "on" ? "narrow" : ""}`,
18021
- children: /* @__PURE__ */ jsxs43(
18022
- LexicalComposer,
18023
- {
18024
- initialConfig: { ...initialConfig },
18025
- children: [
18026
- /* @__PURE__ */ jsx118(
18027
- EditorRefPlugin,
18028
- {
18029
- onMountRef: (editor) => editorRef.current = editor
18030
- }
18031
- ),
18032
- /* @__PURE__ */ jsx118(AutoFocusPlugin, {}),
18033
- /* @__PURE__ */ jsx118(AutoBottomParagraphPlugin, {}),
18034
- /* @__PURE__ */ jsx118(
18035
- HistoryPlugin9,
18036
- {
18037
- externalHistoryState: historyState
18038
- }
18039
- ),
18040
- /* @__PURE__ */ jsx118(
18041
- OnChangePlugin,
18042
- {
18043
- onChange: handleChange,
18044
- ignoreSelectionChange: true
18045
- }
18046
- ),
18047
- /* @__PURE__ */ jsx118(OnNestedChangePlugin, { onChange: handleChange }),
18048
- /* @__PURE__ */ jsx118(
18049
- RichTextPlugin7,
18050
- {
18051
- contentEditable: /* @__PURE__ */ jsx118(ContentEditable, {}),
18052
- placeholder: null,
18053
- ErrorBoundary: LexicalErrorBoundary9
18054
- }
18055
- ),
18056
- /* @__PURE__ */ jsx118(NodePastePlugin, {}),
18057
- /* @__PURE__ */ jsx118(ListPlugin2, {}),
18058
- /* @__PURE__ */ jsx118(ListLevelLimitPlugin, {}),
18059
- /* @__PURE__ */ jsx118(TabIndentationPlugin2, {}),
18060
- children,
18061
- /* @__PURE__ */ jsx118(TypeaheadMenuPlugin, {}),
18062
- /* @__PURE__ */ jsx118(TypeaheadMenuAgentPlugin, {}),
18063
- /* @__PURE__ */ jsx118(NodeMouseAnchorPlugin, {}),
18064
- /* @__PURE__ */ jsx118(NodeMousePlugin, {}),
18065
- /* @__PURE__ */ jsx118(TextToolbarPlugin, {}),
18066
- /* @__PURE__ */ jsx118(TextToolbarAgentPlugin, {}),
18067
- /* @__PURE__ */ jsx118(TypeaheadVariableAgentPlugin, {}),
18068
- /* @__PURE__ */ jsx118(VariableComponentPlugin, {}),
18069
- /* @__PURE__ */ jsx118(MarkdownPlugin, {})
18070
- ]
18071
- }
18072
- )
18073
- }
18074
- ),
18075
- /* @__PURE__ */ jsx118(Drawer, { ref: drawerRef })
18076
- ] }) })
18077
- }
18078
- ) }) })
18710
+ children: /* @__PURE__ */ jsx118(ResizeObserver, { children: /* @__PURE__ */ jsx118(ThemeProvider, { theme, themeSettings, children: /* @__PURE__ */ jsx118(SharedHistoryContext, { children: /* @__PURE__ */ jsxs44(NodeProvider, { children: [
18711
+ /* @__PURE__ */ jsx118(
18712
+ "main",
18713
+ {
18714
+ className: `${settingsPanelSwitch === "on" ? "narrow" : ""}`,
18715
+ children: /* @__PURE__ */ jsxs44(LexicalComposer, { initialConfig: { ...initialConfig }, children: [
18716
+ /* @__PURE__ */ jsx118(
18717
+ EditorRefPlugin,
18718
+ {
18719
+ onMountRef: (editor) => editorRef.current = editor
18720
+ }
18721
+ ),
18722
+ /* @__PURE__ */ jsx118(AutoFocusPlugin, {}),
18723
+ /* @__PURE__ */ jsx118(AutoBottomParagraphPlugin, {}),
18724
+ /* @__PURE__ */ jsx118(
18725
+ HistoryPlugin9,
18726
+ {
18727
+ externalHistoryState: historyState
18728
+ }
18729
+ ),
18730
+ /* @__PURE__ */ jsx118(
18731
+ OnChangePlugin,
18732
+ {
18733
+ onChange: handleChange,
18734
+ ignoreSelectionChange: true
18735
+ }
18736
+ ),
18737
+ /* @__PURE__ */ jsx118(OnNestedChangePlugin, { onChange: handleChange }),
18738
+ /* @__PURE__ */ jsx118(
18739
+ RichTextPlugin7,
18740
+ {
18741
+ contentEditable: /* @__PURE__ */ jsx118(ContentEditable, {}),
18742
+ placeholder: null,
18743
+ ErrorBoundary: LexicalErrorBoundary9
18744
+ }
18745
+ ),
18746
+ /* @__PURE__ */ jsx118(NodePastePlugin, {}),
18747
+ /* @__PURE__ */ jsx118(ListPlugin2, {}),
18748
+ /* @__PURE__ */ jsx118(ListLevelLimitPlugin, {}),
18749
+ /* @__PURE__ */ jsx118(TabIndentationPlugin2, {}),
18750
+ children,
18751
+ /* @__PURE__ */ jsx118(TypeaheadMenuPlugin, {}),
18752
+ /* @__PURE__ */ jsx118(TypeaheadMenuAgentPlugin, {}),
18753
+ /* @__PURE__ */ jsx118(NodeMouseAnchorPlugin, {}),
18754
+ /* @__PURE__ */ jsx118(NodeMousePlugin, {}),
18755
+ /* @__PURE__ */ jsx118(TextToolbarPlugin, {}),
18756
+ /* @__PURE__ */ jsx118(TextToolbarAgentPlugin, {}),
18757
+ /* @__PURE__ */ jsx118(TypeaheadVariableAgentPlugin, {}),
18758
+ /* @__PURE__ */ jsx118(VariableComponentPlugin, {}),
18759
+ /* @__PURE__ */ jsx118(MarkdownPlugin, {})
18760
+ ] })
18761
+ }
18762
+ ),
18763
+ /* @__PURE__ */ jsx118(Drawer, { ref: drawerRef })
18764
+ ] }) }) }) })
18079
18765
  }
18080
18766
  );
18081
18767
  }
@@ -18089,24 +18775,31 @@ var useBlockEditor = () => {
18089
18775
  return context;
18090
18776
  };
18091
18777
 
18778
+ // src/BlockEditorStyle.tsx
18779
+ import { jsx as jsx119 } from "react/jsx-runtime";
18780
+ function BlockEditorStyle(props) {
18781
+ const { children, theme, themeSettings } = props;
18782
+ return /* @__PURE__ */ jsx119(ThemeProvider, { theme, themeSettings, children });
18783
+ }
18784
+
18092
18785
  // src/modules/Callout.tsx
18093
18786
  import { useEffect as useEffect83 } from "react";
18094
- import { jsx as jsx119 } from "react/jsx-runtime";
18787
+ import { jsx as jsx120 } from "react/jsx-runtime";
18095
18788
  function Callout() {
18096
18789
  const { registerModule } = useBlockEditor();
18097
18790
  useEffect83(() => {
18098
18791
  registerModule("Callout");
18099
18792
  }, [registerModule]);
18100
- return /* @__PURE__ */ jsx119(CalloutBoxPlugin, {});
18793
+ return /* @__PURE__ */ jsx120(CalloutBoxPlugin, {});
18101
18794
  }
18102
18795
 
18103
18796
  // src/plugins/TreeViewPlugin/index.tsx
18104
18797
  import { useLexicalComposerContext as useLexicalComposerContext64 } from "@lexical/react/LexicalComposerContext";
18105
18798
  import { TreeView } from "@lexical/react/LexicalTreeView";
18106
- import { jsx as jsx120 } from "react/jsx-runtime";
18799
+ import { jsx as jsx121 } from "react/jsx-runtime";
18107
18800
  function TreeViewPlugin() {
18108
18801
  const [editor] = useLexicalComposerContext64();
18109
- return /* @__PURE__ */ jsx120(
18802
+ return /* @__PURE__ */ jsx121(
18110
18803
  TreeView,
18111
18804
  {
18112
18805
  viewClassName: "tree-view-output",
@@ -18122,25 +18815,25 @@ function TreeViewPlugin() {
18122
18815
 
18123
18816
  // src/modules/Debug.tsx
18124
18817
  import { useEffect as useEffect84 } from "react";
18125
- import { jsx as jsx121 } from "react/jsx-runtime";
18818
+ import { jsx as jsx122 } from "react/jsx-runtime";
18126
18819
  function Debug() {
18127
18820
  const { registerModule } = useBlockEditor();
18128
18821
  useEffect84(() => {
18129
18822
  registerModule("Debug");
18130
18823
  }, [registerModule]);
18131
- return /* @__PURE__ */ jsx121(TreeViewPlugin, {});
18824
+ return /* @__PURE__ */ jsx122(TreeViewPlugin, {});
18132
18825
  }
18133
18826
 
18134
18827
  // src/modules/Image.tsx
18135
18828
  import { useEffect as useEffect85 } from "react";
18136
- import { Fragment as Fragment46, jsx as jsx122 } from "react/jsx-runtime";
18829
+ import { Fragment as Fragment46, jsx as jsx123 } from "react/jsx-runtime";
18137
18830
  function Image(props) {
18138
18831
  const { imageSettings } = props;
18139
18832
  const { registerModule } = useBlockEditor();
18140
18833
  useEffect85(() => {
18141
18834
  registerModule("Image");
18142
18835
  }, [registerModule]);
18143
- return /* @__PURE__ */ jsx122(Fragment46, { children: /* @__PURE__ */ jsx122(ImagePlugin, { imageSettings }) });
18836
+ return /* @__PURE__ */ jsx123(Fragment46, { children: /* @__PURE__ */ jsx123(ImagePlugin, { imageSettings }) });
18144
18837
  }
18145
18838
 
18146
18839
  // src/plugins/LinkToolbarPlugin/LinkToolbarPlugin.tsx
@@ -18161,7 +18854,7 @@ import {
18161
18854
  import debounce6 from "lodash-es/debounce";
18162
18855
  import { Pencil, Trash2 as Trash24, X } from "lucide-react";
18163
18856
  import { useCallback as useCallback12, useEffect as useEffect86, useRef as useRef59, useState as useState21 } from "react";
18164
- import { jsx as jsx123, jsxs as jsxs44 } from "react/jsx-runtime";
18857
+ import { jsx as jsx124, jsxs as jsxs45 } from "react/jsx-runtime";
18165
18858
  function LinkToolbarPlugin() {
18166
18859
  const [editor] = useLexicalComposerContext65();
18167
18860
  const popupToolbarRef = useRef59(null);
@@ -18271,12 +18964,12 @@ function LinkToolbarPlugin() {
18271
18964
  }, [editor]);
18272
18965
  const linkUrl = linkNode?.linkUrl;
18273
18966
  const linkTitle = linkNode?.linkUrl;
18274
- return /* @__PURE__ */ jsx123(
18967
+ return /* @__PURE__ */ jsx124(
18275
18968
  PopupToolbar,
18276
18969
  {
18277
18970
  ref: popupToolbarRef,
18278
18971
  onEscape: handleClose,
18279
- toolbar: /* @__PURE__ */ jsxs44(
18972
+ toolbar: /* @__PURE__ */ jsxs45(
18280
18973
  "div",
18281
18974
  {
18282
18975
  style: {
@@ -18289,23 +18982,23 @@ function LinkToolbarPlugin() {
18289
18982
  padding: "var(--sl-spacing-2x-small) var(--sl-spacing-x-small) var(--sl-spacing-2x-small) var(--sl-spacing-medium)"
18290
18983
  },
18291
18984
  children: [
18292
- /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx123(
18985
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ jsx124(
18293
18986
  "sl-tooltip",
18294
18987
  {
18295
18988
  style: { "--show-delay": "1800" },
18296
18989
  hoist: true,
18297
18990
  content: linkUrl || "[Empty URL]",
18298
- children: /* @__PURE__ */ jsx123("span", { className: "line-short-20", children: linkTitle })
18991
+ children: /* @__PURE__ */ jsx124("span", { className: "line-short-20", children: linkTitle })
18299
18992
  }
18300
18993
  ) }) }),
18301
- /* @__PURE__ */ jsxs44(Stack, { className: "stack__row", children: [
18302
- /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123(
18994
+ /* @__PURE__ */ jsxs45(Stack, { className: "stack__row", children: [
18995
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124(
18303
18996
  "sl-tooltip",
18304
18997
  {
18305
18998
  style: { "--show-delay": "1800" },
18306
18999
  hoist: "hoist",
18307
19000
  content: "Edit Link",
18308
- children: /* @__PURE__ */ jsx123(
19001
+ children: /* @__PURE__ */ jsx124(
18309
19002
  Button,
18310
19003
  {
18311
19004
  size: "small",
@@ -18344,13 +19037,13 @@ function LinkToolbarPlugin() {
18344
19037
  )
18345
19038
  }
18346
19039
  ) }),
18347
- /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123(
19040
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124(
18348
19041
  "sl-tooltip",
18349
19042
  {
18350
19043
  style: { "--show-delay": "1800" },
18351
19044
  hoist: "hoist",
18352
19045
  content: "Remove Link",
18353
- children: /* @__PURE__ */ jsx123(
19046
+ children: /* @__PURE__ */ jsx124(
18354
19047
  Button,
18355
19048
  {
18356
19049
  size: "small",
@@ -18385,13 +19078,13 @@ function LinkToolbarPlugin() {
18385
19078
  )
18386
19079
  }
18387
19080
  ) }),
18388
- /* @__PURE__ */ jsx123("div", { children: /* @__PURE__ */ jsx123(
19081
+ /* @__PURE__ */ jsx124("div", { children: /* @__PURE__ */ jsx124(
18389
19082
  "sl-tooltip",
18390
19083
  {
18391
19084
  style: { "--show-delay": "1800" },
18392
19085
  hoist: "hoist",
18393
19086
  content: "Close",
18394
- children: /* @__PURE__ */ jsx123(
19087
+ children: /* @__PURE__ */ jsx124(
18395
19088
  Button,
18396
19089
  {
18397
19090
  size: "small",
@@ -18414,15 +19107,15 @@ function LinkToolbarPlugin() {
18414
19107
 
18415
19108
  // src/modules/Link.tsx
18416
19109
  import { useEffect as useEffect87 } from "react";
18417
- import { Fragment as Fragment47, jsx as jsx124, jsxs as jsxs45 } from "react/jsx-runtime";
19110
+ import { Fragment as Fragment47, jsx as jsx125, jsxs as jsxs46 } from "react/jsx-runtime";
18418
19111
  function Link() {
18419
19112
  const { registerModule } = useBlockEditor();
18420
19113
  useEffect87(() => {
18421
19114
  registerModule("Link");
18422
19115
  }, [registerModule]);
18423
- return /* @__PURE__ */ jsxs45(Fragment47, { children: [
18424
- /* @__PURE__ */ jsx124(LinkEditorPlugin, {}),
18425
- /* @__PURE__ */ jsx124(LinkToolbarPlugin, {})
19116
+ return /* @__PURE__ */ jsxs46(Fragment47, { children: [
19117
+ /* @__PURE__ */ jsx125(LinkEditorPlugin, {}),
19118
+ /* @__PURE__ */ jsx125(LinkToolbarPlugin, {})
18426
19119
  ] });
18427
19120
  }
18428
19121
 
@@ -18437,7 +19130,7 @@ import {
18437
19130
  createCommand as createCommand20
18438
19131
  } from "lexical";
18439
19132
  import { useEffect as useEffect88 } from "react";
18440
- import { Fragment as Fragment48, jsx as jsx125 } from "react/jsx-runtime";
19133
+ import { Fragment as Fragment48, jsx as jsx126 } from "react/jsx-runtime";
18441
19134
  var INSERT_ESSAY_QUESTION_COMMAND = createCommand20("INSERT_ESSAY_QUESTION_COMMAND");
18442
19135
  function EssayQuestionPlugin() {
18443
19136
  const [editor] = useLexicalComposerContext66();
@@ -18475,7 +19168,7 @@ function EssayQuestionPlugin() {
18475
19168
  )
18476
19169
  );
18477
19170
  }, [editor]);
18478
- return /* @__PURE__ */ jsx125(Fragment48, {});
19171
+ return /* @__PURE__ */ jsx126(Fragment48, {});
18479
19172
  }
18480
19173
 
18481
19174
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
@@ -18503,7 +19196,7 @@ function validatePointsInput6(input) {
18503
19196
  }
18504
19197
 
18505
19198
  // src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
18506
- import { jsx as jsx126 } from "react/jsx-runtime";
19199
+ import { jsx as jsx127 } from "react/jsx-runtime";
18507
19200
  function FinancialStatementQuestionSettings(props) {
18508
19201
  const { nodeKey } = props;
18509
19202
  const [editor] = useLexicalComposerContext67();
@@ -18522,7 +19215,7 @@ function FinancialStatementQuestionSettings(props) {
18522
19215
  if (!foundNode) {
18523
19216
  return null;
18524
19217
  }
18525
- return /* @__PURE__ */ jsx126("div", { children: /* @__PURE__ */ jsx126(
19218
+ return /* @__PURE__ */ jsx127("div", { children: /* @__PURE__ */ jsx127(
18526
19219
  TextInput,
18527
19220
  {
18528
19221
  ref: pointsTextInputRef,
@@ -18565,7 +19258,7 @@ import {
18565
19258
  createEditor as createEditor9
18566
19259
  } from "lexical";
18567
19260
  import { useEffect as useEffect90, useRef as useRef61 } from "react";
18568
- import { Fragment as Fragment49, jsx as jsx127, jsxs as jsxs46 } from "react/jsx-runtime";
19261
+ import { Fragment as Fragment49, jsx as jsx128, jsxs as jsxs47 } from "react/jsx-runtime";
18569
19262
  var INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND = createCommand21("INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND");
18570
19263
  function FinancialStatementQuestionPlugin() {
18571
19264
  const {
@@ -18630,21 +19323,21 @@ function FinancialStatementQuestionPlugin() {
18630
19323
  }
18631
19324
  }
18632
19325
  }, [isBlockEditorReady]);
18633
- return /* @__PURE__ */ jsxs46(Fragment49, { children: [
18634
- drawer && /* @__PURE__ */ jsx127(
19326
+ return /* @__PURE__ */ jsxs47(Fragment49, { children: [
19327
+ drawer && /* @__PURE__ */ jsx128(
18635
19328
  StickyToPosition,
18636
19329
  {
18637
19330
  ref: settingsPanelStickyRef,
18638
19331
  container: drawer,
18639
19332
  children: (data, position, isVisible) => {
18640
- return /* @__PURE__ */ jsx127("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx127(
19333
+ return /* @__PURE__ */ jsx128("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx128(
18641
19334
  SettingsCard,
18642
19335
  {
18643
19336
  isVisible: !!isVisible,
18644
19337
  container: drawer,
18645
19338
  title: "Financial Statement Settings",
18646
19339
  onClose: toggleSettingsPanelSwitch,
18647
- children: isVisible && /* @__PURE__ */ jsx127(
19340
+ children: isVisible && /* @__PURE__ */ jsx128(
18648
19341
  FinancialStatementQuestionSettings,
18649
19342
  {
18650
19343
  nodeKey: data.nodeKey
@@ -18656,32 +19349,32 @@ function FinancialStatementQuestionPlugin() {
18656
19349
  }
18657
19350
  }
18658
19351
  ),
18659
- /* @__PURE__ */ jsx127(FillInTheBlankSpaceSettingsPlugin, {})
19352
+ /* @__PURE__ */ jsx128(FillInTheBlankSpaceSettingsPlugin, {})
18660
19353
  ] });
18661
19354
  }
18662
19355
 
18663
19356
  // src/modules/Questions.tsx
18664
19357
  import { useEffect as useEffect91 } from "react";
18665
- import { Fragment as Fragment50, jsx as jsx128, jsxs as jsxs47 } from "react/jsx-runtime";
19358
+ import { Fragment as Fragment50, jsx as jsx129, jsxs as jsxs48 } from "react/jsx-runtime";
18666
19359
  function Questions() {
18667
19360
  const { registerModule } = useBlockEditor();
18668
19361
  useEffect91(() => {
18669
19362
  registerModule("Questions");
18670
19363
  }, [registerModule]);
18671
- return /* @__PURE__ */ jsxs47(Fragment50, { children: [
18672
- /* @__PURE__ */ jsx128(MultipleOptionQuestionPlugin, {}),
18673
- /* @__PURE__ */ jsx128(ShortAnswerQuestionPlugin, {}),
18674
- /* @__PURE__ */ jsx128(MatchingQuestionPlugin, {}),
18675
- /* @__PURE__ */ jsx128(FillInTheBlankQuestionPlugin, {}),
18676
- /* @__PURE__ */ jsx128(JournalEntryQuestionPlugin, {}),
18677
- /* @__PURE__ */ jsx128(FinancialStatementQuestionPlugin, {}),
18678
- /* @__PURE__ */ jsx128(EssayQuestionPlugin, {})
19364
+ return /* @__PURE__ */ jsxs48(Fragment50, { children: [
19365
+ /* @__PURE__ */ jsx129(MultipleOptionQuestionPlugin, {}),
19366
+ /* @__PURE__ */ jsx129(ShortAnswerQuestionPlugin, {}),
19367
+ /* @__PURE__ */ jsx129(MatchingQuestionPlugin, {}),
19368
+ /* @__PURE__ */ jsx129(FillInTheBlankQuestionPlugin, {}),
19369
+ /* @__PURE__ */ jsx129(JournalEntryQuestionPlugin, {}),
19370
+ /* @__PURE__ */ jsx129(FinancialStatementQuestionPlugin, {}),
19371
+ /* @__PURE__ */ jsx129(EssayQuestionPlugin, {})
18679
19372
  ] });
18680
19373
  }
18681
19374
 
18682
19375
  // src/modules/SettingsPanel.tsx
18683
19376
  import { useEffect as useEffect92 } from "react";
18684
- import { jsx as jsx129 } from "react/jsx-runtime";
19377
+ import { jsx as jsx130 } from "react/jsx-runtime";
18685
19378
  function SettingsPanel(props) {
18686
19379
  const { defaultOpen = true } = props;
18687
19380
  const { registerModule, openSettingsPanel } = useBlockEditor();
@@ -18693,7 +19386,7 @@ function SettingsPanel(props) {
18693
19386
  }
18694
19387
  }, 50);
18695
19388
  }, [registerModule, defaultOpen, openSettingsPanel]);
18696
- return /* @__PURE__ */ jsx129(SettingsPanelPlugin, {});
19389
+ return /* @__PURE__ */ jsx130(SettingsPanelPlugin, {});
18697
19390
  }
18698
19391
 
18699
19392
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
@@ -18712,7 +19405,7 @@ import {
18712
19405
  useRef as useRef62,
18713
19406
  useState as useState23
18714
19407
  } from "react";
18715
- import { Fragment as Fragment51, jsx as jsx130, jsxs as jsxs48 } from "react/jsx-runtime";
19408
+ import { Fragment as Fragment51, jsx as jsx131, jsxs as jsxs49 } from "react/jsx-runtime";
18716
19409
  var controlGridStyle = {
18717
19410
  width: "100%",
18718
19411
  display: "flex",
@@ -18934,8 +19627,8 @@ function VariableSettings(props) {
18934
19627
  if (!currentVariableNode) {
18935
19628
  return null;
18936
19629
  }
18937
- return /* @__PURE__ */ jsxs48(Fragment51, { children: [
18938
- /* @__PURE__ */ jsx130("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx130(
19630
+ return /* @__PURE__ */ jsxs49(Fragment51, { children: [
19631
+ /* @__PURE__ */ jsx131("div", { style: formFieldStyle, children: /* @__PURE__ */ jsx131(
18939
19632
  Button,
18940
19633
  {
18941
19634
  className: "button__fullwidth",
@@ -18954,10 +19647,10 @@ function VariableSettings(props) {
18954
19647
  variant: "default"
18955
19648
  }
18956
19649
  ) }),
18957
- /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
18958
- /* @__PURE__ */ jsx130("div", { style: formFieldLabel, children: "Name" }),
18959
- /* @__PURE__ */ jsxs48("div", { style: controlGridStyle, children: [
18960
- /* @__PURE__ */ jsx130("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx130(
19650
+ /* @__PURE__ */ jsxs49("div", { style: formFieldStyle, children: [
19651
+ /* @__PURE__ */ jsx131("div", { style: formFieldLabel, children: "Name" }),
19652
+ /* @__PURE__ */ jsxs49("div", { style: controlGridStyle, children: [
19653
+ /* @__PURE__ */ jsx131("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx131(
18961
19654
  "form",
18962
19655
  {
18963
19656
  onSubmit: (e) => {
@@ -18965,7 +19658,7 @@ function VariableSettings(props) {
18965
19658
  e.preventDefault();
18966
19659
  updateVariableName();
18967
19660
  },
18968
- children: /* @__PURE__ */ jsx130(
19661
+ children: /* @__PURE__ */ jsx131(
18969
19662
  TextInput,
18970
19663
  {
18971
19664
  ref: variableNameInputRef,
@@ -18977,7 +19670,7 @@ function VariableSettings(props) {
18977
19670
  }
18978
19671
  )
18979
19672
  }
18980
- ) : /* @__PURE__ */ jsx130(
19673
+ ) : /* @__PURE__ */ jsx131(
18981
19674
  DropdownButton,
18982
19675
  {
18983
19676
  className: "button__fullwidth button__left_aligned",
@@ -18990,7 +19683,7 @@ function VariableSettings(props) {
18990
19683
  menu: variablesMenu
18991
19684
  }
18992
19685
  ) }),
18993
- /* @__PURE__ */ jsx130("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx130(
19686
+ /* @__PURE__ */ jsx131("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ jsx131(
18994
19687
  Button,
18995
19688
  {
18996
19689
  StartIcon: Save,
@@ -18998,7 +19691,7 @@ function VariableSettings(props) {
18998
19691
  size: "small",
18999
19692
  onClick: updateVariableName
19000
19693
  }
19001
- ) : /* @__PURE__ */ jsx130(
19694
+ ) : /* @__PURE__ */ jsx131(
19002
19695
  Button,
19003
19696
  {
19004
19697
  StartIcon: Pencil2,
@@ -19011,9 +19704,9 @@ function VariableSettings(props) {
19011
19704
  ) })
19012
19705
  ] })
19013
19706
  ] }),
19014
- /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
19015
- /* @__PURE__ */ jsx130("div", { style: formFieldLabel, children: "Type" }),
19016
- /* @__PURE__ */ jsx130(
19707
+ /* @__PURE__ */ jsxs49("div", { style: formFieldStyle, children: [
19708
+ /* @__PURE__ */ jsx131("div", { style: formFieldLabel, children: "Type" }),
19709
+ /* @__PURE__ */ jsx131(
19017
19710
  DropdownButton,
19018
19711
  {
19019
19712
  className: "button__fullwidth button__left_aligned",
@@ -19027,9 +19720,9 @@ function VariableSettings(props) {
19027
19720
  }
19028
19721
  )
19029
19722
  ] }),
19030
- currentVariableNode.getVariableFormat() && /* @__PURE__ */ jsxs48("div", { style: formFieldStyle, children: [
19031
- /* @__PURE__ */ jsx130("div", { style: formFieldLabel, children: "Format" }),
19032
- /* @__PURE__ */ jsx130(
19723
+ currentVariableNode.getVariableFormat() && /* @__PURE__ */ jsxs49("div", { style: formFieldStyle, children: [
19724
+ /* @__PURE__ */ jsx131("div", { style: formFieldLabel, children: "Format" }),
19725
+ /* @__PURE__ */ jsx131(
19033
19726
  DropdownButton,
19034
19727
  {
19035
19728
  className: "button__fullwidth button__left_aligned",
@@ -19043,7 +19736,7 @@ function VariableSettings(props) {
19043
19736
  }
19044
19737
  )
19045
19738
  ] }),
19046
- /* @__PURE__ */ jsx130("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx130(
19739
+ /* @__PURE__ */ jsx131("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ jsx131(
19047
19740
  Button,
19048
19741
  {
19049
19742
  size: "small",
@@ -19085,7 +19778,7 @@ function VariableSettings(props) {
19085
19778
  }
19086
19779
 
19087
19780
  // src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
19088
- import { Fragment as Fragment52, jsx as jsx131 } from "react/jsx-runtime";
19781
+ import { Fragment as Fragment52, jsx as jsx132 } from "react/jsx-runtime";
19089
19782
  function VariableSettingsPlugin() {
19090
19783
  const {
19091
19784
  registerSettingsPanel,
@@ -19104,20 +19797,20 @@ function VariableSettingsPlugin() {
19104
19797
  }
19105
19798
  }
19106
19799
  }, [isBlockEditorReady]);
19107
- return /* @__PURE__ */ jsx131(Fragment52, { children: drawer && /* @__PURE__ */ jsx131(
19800
+ return /* @__PURE__ */ jsx132(Fragment52, { children: drawer && /* @__PURE__ */ jsx132(
19108
19801
  StickyToPosition,
19109
19802
  {
19110
19803
  ref: settingsPanelStickyRef,
19111
19804
  container: drawer,
19112
19805
  children: (data, position, isVisible) => {
19113
- return /* @__PURE__ */ jsx131("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx131(
19806
+ return /* @__PURE__ */ jsx132("div", { style: { width: position.width }, children: /* @__PURE__ */ jsx132(
19114
19807
  SettingsCard,
19115
19808
  {
19116
19809
  isVisible: !!isVisible,
19117
19810
  container: drawer,
19118
19811
  title: "Variable Settings",
19119
19812
  onClose: toggleSettingsPanelSwitch,
19120
- children: /* @__PURE__ */ jsx131(
19813
+ children: /* @__PURE__ */ jsx132(
19121
19814
  VariableSettings,
19122
19815
  {
19123
19816
  nodeKey: data.nodeKey,
@@ -19150,7 +19843,7 @@ import {
19150
19843
  useRef as useRef64,
19151
19844
  useState as useState24
19152
19845
  } from "react";
19153
- import { jsx as jsx132 } from "react/jsx-runtime";
19846
+ import { jsx as jsx133 } from "react/jsx-runtime";
19154
19847
  function VariableToolbarPlugin() {
19155
19848
  const [editor] = useLexicalComposerContext70();
19156
19849
  const popupToolbarRef = useRef64(null);
@@ -19343,12 +20036,12 @@ function VariableToolbarPlugin() {
19343
20036
  ];
19344
20037
  return resultList;
19345
20038
  }, [toolbarState]);
19346
- return /* @__PURE__ */ jsx132(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
20039
+ return /* @__PURE__ */ jsx133(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
19347
20040
  }
19348
20041
 
19349
20042
  // src/modules/Variables.tsx
19350
20043
  import { useEffect as useEffect96 } from "react";
19351
- import { jsx as jsx133, jsxs as jsxs49 } from "react/jsx-runtime";
20044
+ import { jsx as jsx134, jsxs as jsxs50 } from "react/jsx-runtime";
19352
20045
  function Variables(props) {
19353
20046
  const { variablesSettings } = props;
19354
20047
  const { registerModule, setEditingModeDataCallback } = useBlockEditor();
@@ -19362,15 +20055,16 @@ function Variables(props) {
19362
20055
  };
19363
20056
  });
19364
20057
  }, [variablesSettings, setEditingModeDataCallback]);
19365
- return /* @__PURE__ */ jsxs49(VariablesProvider, { variablesSettings, children: [
19366
- /* @__PURE__ */ jsx133(TypeaheadVariablePlugin, {}),
19367
- /* @__PURE__ */ jsx133(VariableSettingsPlugin, {}),
19368
- /* @__PURE__ */ jsx133(VariableToolbarPlugin, {}),
19369
- /* @__PURE__ */ jsx133(VariableToolbarAgentPlugin, {})
20058
+ return /* @__PURE__ */ jsxs50(VariablesProvider, { variablesSettings, children: [
20059
+ /* @__PURE__ */ jsx134(TypeaheadVariablePlugin, {}),
20060
+ /* @__PURE__ */ jsx134(VariableSettingsPlugin, {}),
20061
+ /* @__PURE__ */ jsx134(VariableToolbarPlugin, {}),
20062
+ /* @__PURE__ */ jsx134(VariableToolbarAgentPlugin, {})
19370
20063
  ] });
19371
20064
  }
19372
20065
  export {
19373
20066
  BlockEditor,
20067
+ BlockEditorStyle,
19374
20068
  Callout,
19375
20069
  Debug,
19376
20070
  Image,