@crystallize/design-system 1.16.5 → 1.16.6

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.js CHANGED
@@ -34213,8 +34213,47 @@ var Label2 = (0, import_react92.forwardRef)(({ className, ...delegated }, ref) =
34213
34213
  });
34214
34214
  Label2.displayName = "Label";
34215
34215
 
34216
- // src/input-with-label/input-with-label.tsx
34216
+ // src/tooltip/tooltip.tsx
34217
+ var RadixTooltip = __toESM(require("@radix-ui/react-tooltip"));
34217
34218
  var import_jsx_runtime104 = require("react/jsx-runtime");
34219
+ function Tooltip({
34220
+ children,
34221
+ content,
34222
+ side = "top",
34223
+ align = "center",
34224
+ defaultOpen = false,
34225
+ delayDuration = 800
34226
+ }) {
34227
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(RadixTooltip.Provider, {
34228
+ delayDuration,
34229
+ children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(RadixTooltip.Root, {
34230
+ defaultOpen,
34231
+ children: [
34232
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(RadixTooltip.Trigger, {
34233
+ asChild: true,
34234
+ children
34235
+ }),
34236
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(RadixTooltip.Portal, {
34237
+ children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(RadixTooltip.Content, {
34238
+ align,
34239
+ className: "c-tooltip-content data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade",
34240
+ sideOffset: 5,
34241
+ side,
34242
+ children: [
34243
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(RadixTooltip.Arrow, {
34244
+ className: "c-tooltip-arrow"
34245
+ }),
34246
+ content
34247
+ ]
34248
+ })
34249
+ })
34250
+ ]
34251
+ })
34252
+ });
34253
+ }
34254
+
34255
+ // src/input-with-label/input-with-label.tsx
34256
+ var import_jsx_runtime105 = require("react/jsx-runtime");
34218
34257
  var inputWithLabelStyles = (0, import_class_variance_authority14.cva)(["c-input-with-label"], {
34219
34258
  variants: {
34220
34259
  variant: {
@@ -34231,26 +34270,28 @@ var inputWithLabelStyles = (0, import_class_variance_authority14.cva)(["c-input-
34231
34270
  var InputWithLabel = (0, import_react93.forwardRef)(
34232
34271
  ({ className, label, append, errorMessage, status, variant, id, labelProps, ...delegated }, ref) => {
34233
34272
  const { className: labelClassName, ...labelPropsRest } = labelProps ?? {};
34234
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_jsx_runtime104.Fragment, {
34235
- children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(Label2, {
34273
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_jsx_runtime105.Fragment, {
34274
+ children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Label2, {
34236
34275
  className: inputWithLabelStyles({ status, variant, className: labelClassName }),
34237
34276
  htmlFor: id,
34238
34277
  ...labelPropsRest,
34239
34278
  children: [
34240
34279
  label,
34241
- /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("span", {
34280
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("span", {
34242
34281
  className: "c-input-with-label-input-wrap",
34243
34282
  children: [
34244
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Input, {
34283
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Input, {
34245
34284
  className: (0, import_class_variance_authority14.cx)("c-input-with-label-input", className),
34246
34285
  ref,
34247
34286
  id,
34248
34287
  ...delegated
34249
34288
  }),
34250
- !append && !errorMessage ? null : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", {
34251
- className: "c-input-with-label-append",
34252
- title: errorMessage,
34253
- children: errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Triangle, {}) : append
34289
+ !append && !errorMessage ? null : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, {
34290
+ content: errorMessage,
34291
+ children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", {
34292
+ className: "c-input-with-label-append",
34293
+ children: errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Triangle, {}) : append
34294
+ })
34254
34295
  })
34255
34296
  ]
34256
34297
  })
@@ -34264,12 +34305,12 @@ InputWithLabel.displayName = "InputWithLabel";
34264
34305
  // src/progress/progress.tsx
34265
34306
  var import_class_variance_authority15 = require("class-variance-authority");
34266
34307
  var ProgressPrimitives = __toESM(require("@radix-ui/react-progress"));
34267
- var import_jsx_runtime105 = require("react/jsx-runtime");
34308
+ var import_jsx_runtime106 = require("react/jsx-runtime");
34268
34309
  function Progress({ className, value }) {
34269
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ProgressPrimitives.Root, {
34310
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ProgressPrimitives.Root, {
34270
34311
  className: (0, import_class_variance_authority15.cx)(className, "c-progress-root"),
34271
34312
  value,
34272
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ProgressPrimitives.Indicator, {
34313
+ children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ProgressPrimitives.Indicator, {
34273
34314
  className: "c-progress-indicator",
34274
34315
  style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
34275
34316
  })
@@ -34278,12 +34319,12 @@ function Progress({ className, value }) {
34278
34319
 
34279
34320
  // src/radio/radio.tsx
34280
34321
  var RadioGroupPrimitive2 = __toESM(require("@radix-ui/react-radio-group"));
34281
- var import_jsx_runtime106 = require("react/jsx-runtime");
34322
+ var import_jsx_runtime107 = require("react/jsx-runtime");
34282
34323
  function RadioGroupItem(props) {
34283
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(RadioGroupPrimitive2.Item, {
34324
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RadioGroupPrimitive2.Item, {
34284
34325
  ...props,
34285
34326
  className: "c-radio-item",
34286
- children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(RadioGroupPrimitive2.Indicator, {
34327
+ children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RadioGroupPrimitive2.Indicator, {
34287
34328
  className: "c-radio-indicator"
34288
34329
  })
34289
34330
  });
@@ -34296,18 +34337,18 @@ var Radio = {
34296
34337
  // src/select/select-item.tsx
34297
34338
  var import_react94 = require("react");
34298
34339
  var SelectPrimitives = __toESM(require("@radix-ui/react-select"));
34299
- var import_jsx_runtime107 = require("react/jsx-runtime");
34340
+ var import_jsx_runtime108 = require("react/jsx-runtime");
34300
34341
  var SelectItem = (0, import_react94.forwardRef)((props, ref) => {
34301
34342
  const { children, ...delegated } = props;
34302
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(SelectPrimitives.Item, {
34343
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(SelectPrimitives.Item, {
34303
34344
  className: "c-select-item",
34304
34345
  ref,
34305
34346
  ...delegated,
34306
34347
  children: [
34307
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SelectPrimitives.ItemText, {
34348
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SelectPrimitives.ItemText, {
34308
34349
  children
34309
34350
  }),
34310
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SelectPrimitives.ItemIndicator, {})
34351
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SelectPrimitives.ItemIndicator, {})
34311
34352
  ]
34312
34353
  });
34313
34354
  });
@@ -34317,7 +34358,7 @@ SelectItem.displayName = "SelectItem";
34317
34358
  var import_react95 = require("react");
34318
34359
  var import_class_variance_authority16 = require("class-variance-authority");
34319
34360
  var SelectPrimitives2 = __toESM(require("@radix-ui/react-select"));
34320
- var import_jsx_runtime108 = require("react/jsx-runtime");
34361
+ var import_jsx_runtime109 = require("react/jsx-runtime");
34321
34362
  var selectTriggerStyles = (0, import_class_variance_authority16.cva)("c-select-trigger", {
34322
34363
  variants: {
34323
34364
  size: {
@@ -34333,34 +34374,34 @@ var selectTriggerStyles = (0, import_class_variance_authority16.cva)("c-select-t
34333
34374
  });
34334
34375
  var SelectContainer = (0, import_react95.forwardRef)(
34335
34376
  ({ children, id, placeholder, disabled, size, ...delegated }, ref) => {
34336
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(SelectPrimitives2.Root, {
34377
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(SelectPrimitives2.Root, {
34337
34378
  ...delegated,
34338
34379
  children: [
34339
- /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(SelectPrimitives2.Trigger, {
34380
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(SelectPrimitives2.Trigger, {
34340
34381
  ref,
34341
34382
  className: selectTriggerStyles({ size }),
34342
34383
  disabled,
34343
34384
  id,
34344
34385
  children: [
34345
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SelectPrimitives2.Value, {
34346
- placeholder: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", {
34386
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SelectPrimitives2.Value, {
34387
+ placeholder: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", {
34347
34388
  className: "c-select-value",
34348
34389
  children: placeholder ?? "Select..."
34349
34390
  })
34350
34391
  }),
34351
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Icon.Arrow, {})
34392
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Icon.Arrow, {})
34352
34393
  ]
34353
34394
  }),
34354
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SelectPrimitives2.Portal, {
34355
- children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(SelectPrimitives2.Content, {
34395
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SelectPrimitives2.Portal, {
34396
+ children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(SelectPrimitives2.Content, {
34356
34397
  className: "c-select-content",
34357
34398
  children: [
34358
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SelectPrimitives2.ScrollUpButton, {}),
34359
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SelectPrimitives2.Viewport, {
34399
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SelectPrimitives2.ScrollUpButton, {}),
34400
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SelectPrimitives2.Viewport, {
34360
34401
  className: "c-select-viewport",
34361
34402
  children
34362
34403
  }),
34363
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(SelectPrimitives2.ScrollDownButton, {})
34404
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SelectPrimitives2.ScrollDownButton, {})
34364
34405
  ]
34365
34406
  })
34366
34407
  })
@@ -34380,20 +34421,20 @@ var Select = {
34380
34421
  var import_react96 = require("react");
34381
34422
  var import_class_variance_authority17 = require("class-variance-authority");
34382
34423
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
34383
- var import_jsx_runtime109 = require("react/jsx-runtime");
34424
+ var import_jsx_runtime110 = require("react/jsx-runtime");
34384
34425
  var Slider = (0, import_react96.forwardRef)(({ className, transparentRange, ...delegated }, ref) => {
34385
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(SliderPrimitive.Root, {
34426
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(SliderPrimitive.Root, {
34386
34427
  className: (0, import_class_variance_authority17.cx)("c-slider-root", className),
34387
34428
  ref,
34388
34429
  ...delegated,
34389
34430
  children: [
34390
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SliderPrimitive.Track, {
34431
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SliderPrimitive.Track, {
34391
34432
  className: "c-slider-track",
34392
- children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SliderPrimitive.Range, {
34433
+ children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SliderPrimitive.Range, {
34393
34434
  className: `c-slider-range ${transparentRange ? "c-slider-range-transparent" : ""}`
34394
34435
  })
34395
34436
  }),
34396
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(SliderPrimitive.Thumb, {
34437
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SliderPrimitive.Thumb, {
34397
34438
  className: "c-slider-thumb"
34398
34439
  })
34399
34440
  ]
@@ -34402,7 +34443,7 @@ var Slider = (0, import_react96.forwardRef)(({ className, transparentRange, ...d
34402
34443
 
34403
34444
  // src/tag/tag.tsx
34404
34445
  var import_class_variance_authority18 = require("class-variance-authority");
34405
- var import_jsx_runtime110 = require("react/jsx-runtime");
34446
+ var import_jsx_runtime111 = require("react/jsx-runtime");
34406
34447
  var tagStyles = (0, import_class_variance_authority18.cva)("c-tag", {
34407
34448
  variants: {
34408
34449
  variant: {
@@ -34422,16 +34463,16 @@ var tagStyles = (0, import_class_variance_authority18.cva)("c-tag", {
34422
34463
  }
34423
34464
  });
34424
34465
  function Tag({ children, className, variant, size, prepend, onRemove, ...delegated }) {
34425
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", {
34466
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", {
34426
34467
  className: tagStyles({ className, variant, size }),
34427
34468
  ...delegated,
34428
34469
  children: [
34429
- !prepend ? null : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", {
34470
+ !prepend ? null : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", {
34430
34471
  className: "c-tag__prepend",
34431
34472
  children: prepend
34432
34473
  }),
34433
34474
  children,
34434
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("button", {
34475
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("button", {
34435
34476
  type: "button",
34436
34477
  className: "c-tag__remove-button",
34437
34478
  onClick: (e) => {
@@ -34439,11 +34480,11 @@ function Tag({ children, className, variant, size, prepend, onRemove, ...delegat
34439
34480
  onRemove();
34440
34481
  },
34441
34482
  children: [
34442
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Icon.Cancel, {
34483
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Icon.Cancel, {
34443
34484
  width: 12,
34444
34485
  height: 12
34445
34486
  }),
34446
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", {
34487
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", {
34447
34488
  className: "sr-only",
34448
34489
  children: "Remove"
34449
34490
  })
@@ -34472,11 +34513,11 @@ var import_LexicalContentEditable = require("@lexical/react/LexicalContentEditab
34472
34513
  // src/rich-text-editor/context/SharedHistoryContext.tsx
34473
34514
  var import_react97 = require("react");
34474
34515
  var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
34475
- var import_jsx_runtime111 = require("react/jsx-runtime");
34516
+ var import_jsx_runtime112 = require("react/jsx-runtime");
34476
34517
  var Context = (0, import_react97.createContext)({});
34477
34518
  var SharedHistoryContext = ({ children }) => {
34478
34519
  const historyContext = (0, import_react97.useMemo)(() => ({ historyState: (0, import_LexicalHistoryPlugin.createEmptyHistoryState)() }), []);
34479
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Context.Provider, {
34520
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Context.Provider, {
34480
34521
  value: historyContext,
34481
34522
  children
34482
34523
  });
@@ -34553,14 +34594,14 @@ var translations = {
34553
34594
  var en_default = translations;
34554
34595
 
34555
34596
  // src/rich-text-editor/i18n/index.tsx
34556
- var import_jsx_runtime112 = require("react/jsx-runtime");
34597
+ var import_jsx_runtime113 = require("react/jsx-runtime");
34557
34598
  var I18nContext = (0, import_react98.createContext)(null);
34558
34599
  function I18nProvider({
34559
34600
  labelTranslations,
34560
34601
  children
34561
34602
  }) {
34562
34603
  const translations2 = labelTranslations || en_default;
34563
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(I18nContext.Provider, {
34604
+ return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(I18nContext.Provider, {
34564
34605
  value: translations2,
34565
34606
  children
34566
34607
  });
@@ -35004,7 +35045,7 @@ var BaseNodes = [
35004
35045
  // src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx
35005
35046
  var React = require("react");
35006
35047
  var import_LexicalAutoLinkPlugin = require("@lexical/react/LexicalAutoLinkPlugin");
35007
- var import_jsx_runtime113 = require("react/jsx-runtime");
35048
+ var import_jsx_runtime114 = require("react/jsx-runtime");
35008
35049
  var URL_MATCHER = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
35009
35050
  var EMAIL_MATCHER = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/;
35010
35051
  var MATCHERS = [
@@ -35032,7 +35073,7 @@ var MATCHERS = [
35032
35073
  }
35033
35074
  ];
35034
35075
  function LexicalAutoLinkPlugin() {
35035
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_LexicalAutoLinkPlugin.AutoLinkPlugin, {
35076
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_LexicalAutoLinkPlugin.AutoLinkPlugin, {
35036
35077
  matchers: MATCHERS
35037
35078
  });
35038
35079
  }
@@ -35051,7 +35092,7 @@ var import_react99 = require("react");
35051
35092
  var import_lexical4 = require("lexical");
35052
35093
  var import_use_debounce = require("use-debounce");
35053
35094
  var import_code4 = require("@lexical/code");
35054
- var import_jsx_runtime114 = require("react/jsx-runtime");
35095
+ var import_jsx_runtime115 = require("react/jsx-runtime");
35055
35096
  function CopyButton({ editor, getCodeDOMNode }) {
35056
35097
  const [isCopyCompleted, setCopyCompleted] = (0, import_react99.useState)(false);
35057
35098
  const tr = useTr();
@@ -35080,13 +35121,13 @@ function CopyButton({ editor, getCodeDOMNode }) {
35080
35121
  console.error("Failed to copy: ", err);
35081
35122
  }
35082
35123
  }
35083
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("button", {
35124
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("button", {
35084
35125
  className: "c-rte-code-button",
35085
35126
  onClick: handleClick,
35086
35127
  "aria-label": tr("actionCopyCode"),
35087
- children: isCopyCompleted ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("i", {
35128
+ children: isCopyCompleted ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("i", {
35088
35129
  className: "c-rte-code-button__icon c-rte-icon-success"
35089
- }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("i", {
35130
+ }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("i", {
35090
35131
  className: "c-rte-code-button__icon c-rte-icon-copy"
35091
35132
  })
35092
35133
  });
@@ -35097,7 +35138,7 @@ var React3 = require("react");
35097
35138
  var import_react100 = require("react");
35098
35139
  var import_lexical5 = require("lexical");
35099
35140
  var import_code5 = require("@lexical/code");
35100
- var import_jsx_runtime115 = require("react/jsx-runtime");
35141
+ var import_jsx_runtime116 = require("react/jsx-runtime");
35101
35142
  var PRETTIER_PARSER_MODULES = {
35102
35143
  css: () => Promise.resolve().then(() => __toESM(require_parser_postcss())),
35103
35144
  html: () => Promise.resolve().then(() => __toESM(require_parser_html())),
@@ -35183,22 +35224,22 @@ function PrettierButton({ lang, editor, getCodeDOMNode }) {
35183
35224
  setTipsVisible(false);
35184
35225
  }
35185
35226
  }
35186
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", {
35227
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", {
35187
35228
  className: "c-rte-prettier-wrapper",
35188
35229
  children: [
35189
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("button", {
35230
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("button", {
35190
35231
  className: "c-rte-code-button",
35191
35232
  onClick: handleClick,
35192
35233
  onMouseEnter: handleMouseEnter,
35193
35234
  onMouseLeave: handleMouseLeave,
35194
35235
  "aria-label": tr("actionFormatCode"),
35195
- children: syntaxError ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("i", {
35236
+ children: syntaxError ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("i", {
35196
35237
  className: "c-rte-code-button__icon c-rte-icon-prettier-error"
35197
- }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("i", {
35238
+ }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("i", {
35198
35239
  className: "c-rte-code-button__icon c-rte-icon-prettier"
35199
35240
  })
35200
35241
  }),
35201
- tipsVisible ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("pre", {
35242
+ tipsVisible ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("pre", {
35202
35243
  className: "c-rte-code-error-tips",
35203
35244
  children: syntaxError
35204
35245
  }) : null
@@ -35207,7 +35248,7 @@ function PrettierButton({ lang, editor, getCodeDOMNode }) {
35207
35248
  }
35208
35249
 
35209
35250
  // src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx
35210
- var import_jsx_runtime116 = require("react/jsx-runtime");
35251
+ var import_jsx_runtime117 = require("react/jsx-runtime");
35211
35252
  var CODE_PADDING = 0;
35212
35253
  function CodeActionMenuContainer({ anchorElem }) {
35213
35254
  const [editor] = (0, import_LexicalComposerContext.useLexicalComposerContext)();
@@ -35284,20 +35325,20 @@ function CodeActionMenuContainer({ anchorElem }) {
35284
35325
  });
35285
35326
  const normalizedLang = (0, import_code6.normalizeCodeLang)(lang);
35286
35327
  const codeFriendlyName = (0, import_code6.getLanguageFriendlyName)(lang);
35287
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_jsx_runtime116.Fragment, {
35288
- children: isShown ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", {
35328
+ return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_jsx_runtime117.Fragment, {
35329
+ children: isShown ? /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", {
35289
35330
  className: "c-rte-code-action-menu-container",
35290
35331
  style: { ...position },
35291
35332
  children: [
35292
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", {
35333
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", {
35293
35334
  className: "c-rte-code-highlight-language",
35294
35335
  children: codeFriendlyName
35295
35336
  }),
35296
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(CopyButton, {
35337
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(CopyButton, {
35297
35338
  editor,
35298
35339
  getCodeDOMNode
35299
35340
  }),
35300
- canBePrettier(normalizedLang) ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(PrettierButton, {
35341
+ canBePrettier(normalizedLang) ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(PrettierButton, {
35301
35342
  editor,
35302
35343
  getCodeDOMNode,
35303
35344
  lang: normalizedLang
@@ -35319,7 +35360,7 @@ function getMouseInfo(event) {
35319
35360
  function CodeActionMenuPlugin({
35320
35361
  anchorElem = document.body
35321
35362
  }) {
35322
- return (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(CodeActionMenuContainer, {
35363
+ return (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(CodeActionMenuContainer, {
35323
35364
  anchorElem
35324
35365
  }), anchorElem);
35325
35366
  }
@@ -35338,7 +35379,7 @@ function CodeHighlightPlugin() {
35338
35379
 
35339
35380
  // src/rich-text-editor/plugins/DimensionsDetectorPlugin/index.tsx
35340
35381
  var import_react103 = require("react");
35341
- var import_jsx_runtime117 = require("react/jsx-runtime");
35382
+ var import_jsx_runtime118 = require("react/jsx-runtime");
35342
35383
  function DimensionDetectorPlugin({ onChange }) {
35343
35384
  const [dimensions, setDimensions] = (0, import_react103.useState)();
35344
35385
  const ref = (0, import_react103.useRef)(null);
@@ -35367,7 +35408,7 @@ function DimensionDetectorPlugin({ onChange }) {
35367
35408
  onChange(dimensions);
35368
35409
  }
35369
35410
  }, [dimensions, onChange]);
35370
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", {
35411
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", {
35371
35412
  ref,
35372
35413
  style: { height: 1, marginTop: -1 }
35373
35414
  });
@@ -35386,7 +35427,7 @@ var import_utils = require("@lexical/utils");
35386
35427
  var import_react104 = require("react");
35387
35428
  var import_lexical7 = require("lexical");
35388
35429
  var import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
35389
- var import_jsx_runtime118 = require("react/jsx-runtime");
35430
+ var import_jsx_runtime119 = require("react/jsx-runtime");
35390
35431
  var PREVIEW_CACHE = {};
35391
35432
  var URL_MATCHER2 = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
35392
35433
  function useSuspenseRequest(url) {
@@ -35443,26 +35484,26 @@ function LinkPreviewContent({
35443
35484
  if (!hasPreview) {
35444
35485
  return null;
35445
35486
  }
35446
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", {
35487
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", {
35447
35488
  className: "c-rte-link-preview",
35448
35489
  children: [
35449
- preview.google.image && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", {
35490
+ preview.google.image && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35450
35491
  className: "c-rte-link-preview-image-wrapper",
35451
- children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("img", {
35492
+ children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("img", {
35452
35493
  src: preview.google.image,
35453
35494
  alt: preview.google.title,
35454
35495
  className: "c-rte-link-preview-image"
35455
35496
  })
35456
35497
  }),
35457
- preview.google.title && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", {
35498
+ preview.google.title && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35458
35499
  className: "c-rte-link-preview-title",
35459
35500
  children: preview.google.title
35460
35501
  }),
35461
- preview.google.description && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", {
35502
+ preview.google.description && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35462
35503
  className: "c-rte-link-preview-description",
35463
35504
  children: preview.google.description
35464
35505
  }),
35465
- textContent && textContent !== preview.google.title ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Button, {
35506
+ textContent && textContent !== preview.google.title ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Button, {
35466
35507
  className: "c-rte-link-preview__replace-text-btn",
35467
35508
  onClick: useTitleForText,
35468
35509
  children: tr("linkPreviewReplaceTextWithTitle")
@@ -35471,7 +35512,7 @@ function LinkPreviewContent({
35471
35512
  });
35472
35513
  }
35473
35514
  function Glimmer(props) {
35474
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", {
35515
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35475
35516
  className: "c-rte-link-preview-glimmer",
35476
35517
  ...props,
35477
35518
  style: {
@@ -35483,24 +35524,24 @@ function Glimmer(props) {
35483
35524
  function LinkPreview({
35484
35525
  url
35485
35526
  }) {
35486
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_react104.Suspense, {
35487
- fallback: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_jsx_runtime118.Fragment, {
35527
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_react104.Suspense, {
35528
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, {
35488
35529
  children: [
35489
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Glimmer, {
35530
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Glimmer, {
35490
35531
  style: { height: "80px" },
35491
35532
  index: 0
35492
35533
  }),
35493
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Glimmer, {
35534
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Glimmer, {
35494
35535
  style: { width: "60%" },
35495
35536
  index: 1
35496
35537
  }),
35497
- /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Glimmer, {
35538
+ /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Glimmer, {
35498
35539
  style: { width: "80%" },
35499
35540
  index: 2
35500
35541
  })
35501
35542
  ]
35502
35543
  }),
35503
- children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(LinkPreviewContent, {
35544
+ children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(LinkPreviewContent, {
35504
35545
  url
35505
35546
  })
35506
35547
  });
@@ -35568,7 +35609,7 @@ function validateUrl(url) {
35568
35609
  }
35569
35610
 
35570
35611
  // src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.tsx
35571
- var import_jsx_runtime119 = require("react/jsx-runtime");
35612
+ var import_jsx_runtime120 = require("react/jsx-runtime");
35572
35613
  function FloatingLinkEditor({
35573
35614
  editor,
35574
35615
  isLink,
@@ -35689,41 +35730,41 @@ function FloatingLinkEditor({
35689
35730
  inputRef.current.focus();
35690
35731
  }
35691
35732
  }, [isEditMode]);
35692
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35733
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35693
35734
  ref: editorRef,
35694
35735
  className: "c-rte-link-editor",
35695
- children: isEditMode ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", {
35736
+ children: isEditMode ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", {
35696
35737
  children: [
35697
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35738
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35698
35739
  className: "c-rte-link-editor-input-group",
35699
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(InputWithLabel, {
35740
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(InputWithLabel, {
35700
35741
  label: tr("linkEditorLink"),
35701
35742
  type: "text",
35702
35743
  value: linkUrl,
35703
35744
  onChange: (e) => setLinkUrl(e.target.value)
35704
35745
  })
35705
35746
  }),
35706
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35747
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35707
35748
  className: "c-rte-link-editor-input-group",
35708
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(InputWithLabel, {
35749
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(InputWithLabel, {
35709
35750
  label: tr("linkEditorRel"),
35710
35751
  type: "text",
35711
35752
  value: rel ?? "",
35712
35753
  onChange: (e) => setRel(e.target.value)
35713
35754
  })
35714
35755
  }),
35715
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35756
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35716
35757
  className: "c-rte-link-editor-input-group",
35717
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(InputWithLabel, {
35758
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(InputWithLabel, {
35718
35759
  label: tr("linkEditorTarget"),
35719
35760
  type: "text",
35720
35761
  value: target ?? "",
35721
35762
  onChange: (e) => setTarget(e.target.value)
35722
35763
  })
35723
35764
  }),
35724
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35765
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35725
35766
  className: "c-rte-link-editor-button-wrap",
35726
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Button, {
35767
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Button, {
35727
35768
  onClick: () => {
35728
35769
  if (lastSelection !== null) {
35729
35770
  if (linkUrl !== "") {
@@ -35740,28 +35781,28 @@ function FloatingLinkEditor({
35740
35781
  })
35741
35782
  })
35742
35783
  ]
35743
- }) : /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_jsx_runtime119.Fragment, {
35784
+ }) : /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, {
35744
35785
  children: [
35745
- /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", {
35786
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", {
35746
35787
  className: "c-rte-link-editor-link-input",
35747
35788
  children: [
35748
- /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", {
35789
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", {
35749
35790
  className: "c-rte-link-editor-link-preview",
35750
35791
  children: [
35751
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("a", {
35792
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("a", {
35752
35793
  href: linkUrl,
35753
35794
  target: "_blank",
35754
35795
  rel: "noopener noreferrer",
35755
35796
  children: linkUrl
35756
35797
  }),
35757
- rel || target ? /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", {
35798
+ rel || target ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", {
35758
35799
  className: "c-rte-link-editor-preview-attrs",
35759
35800
  children: [
35760
- rel && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35801
+ rel && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35761
35802
  className: "c-rte-link-editor-preview-attr",
35762
35803
  children: rel
35763
35804
  }),
35764
- target && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35805
+ target && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35765
35806
  className: "c-rte-link-editor-preview-attr",
35766
35807
  children: target
35767
35808
  })
@@ -35769,20 +35810,20 @@ function FloatingLinkEditor({
35769
35810
  }) : null
35770
35811
  ]
35771
35812
  }),
35772
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35773
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(IconButton, {
35813
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35814
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
35774
35815
  size: "sm",
35775
35816
  tabIndex: 0,
35776
35817
  onMouseDown: (event) => event.preventDefault(),
35777
35818
  onClick: () => setEditMode(true),
35778
35819
  "aria-label": tr("linkEditorEdit"),
35779
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Icon.Edit, {})
35820
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Icon.Edit, {})
35780
35821
  })
35781
35822
  })
35782
35823
  ]
35783
35824
  }),
35784
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", {
35785
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(LinkPreview, {
35825
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", {
35826
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(LinkPreview, {
35786
35827
  url: linkUrl
35787
35828
  })
35788
35829
  })
@@ -35818,7 +35859,7 @@ function useFloatingLinkEditorToolbar(editor, anchorElem) {
35818
35859
  );
35819
35860
  }, [editor, updateToolbar]);
35820
35861
  return isLink ? (0, import_react_dom3.createPortal)(
35821
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(FloatingLinkEditor, {
35862
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(FloatingLinkEditor, {
35822
35863
  editor: activeEditor,
35823
35864
  isLink,
35824
35865
  anchorElem,
@@ -35877,7 +35918,7 @@ function getDOMRangeRect(nativeSelection, rootElement) {
35877
35918
  }
35878
35919
 
35879
35920
  // src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx
35880
- var import_jsx_runtime120 = require("react/jsx-runtime");
35921
+ var import_jsx_runtime121 = require("react/jsx-runtime");
35881
35922
  function TextFormatFloatingToolbar({
35882
35923
  editor,
35883
35924
  anchorElem,
@@ -35951,93 +35992,93 @@ function TextFormatFloatingToolbar({
35951
35992
  );
35952
35993
  }, [editor, updateTextFormatFloatingToolbar]);
35953
35994
  if (!editor.isEditable()) {
35954
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", {});
35995
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", {});
35955
35996
  }
35956
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", {
35997
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", {
35957
35998
  ref: popupCharStylesEditorRef,
35958
35999
  className: "c-rte-floating-text-format-tb-plugin",
35959
36000
  children: [
35960
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36001
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
35961
36002
  onClick: () => {
35962
36003
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "bold");
35963
36004
  },
35964
36005
  style: { padding: 0, overflow: "hidden" },
35965
36006
  title: tr(IS_APPLE ? "actionFormatAsStrongTitleApple" : "actionFormatAsStrongTitle"),
35966
36007
  "aria-label": tr("actionFormatAsStrongLabel"),
35967
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36008
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
35968
36009
  className: `c-rte-icon-bold c-rte-floating-text-format-tb-plugin__format-icon ${isBold ? "selected" : ""}`
35969
36010
  })
35970
36011
  }),
35971
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36012
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
35972
36013
  style: { padding: 0, overflow: "hidden" },
35973
36014
  onClick: () => {
35974
36015
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "italic");
35975
36016
  },
35976
36017
  title: tr("actionFormatAsEmphasizedTitle"),
35977
36018
  "aria-label": tr("actionFormatAsEmphasizedLabel"),
35978
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36019
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
35979
36020
  className: `c-rte-icon-italic c-rte-floating-text-format-tb-plugin__format-icon ${isItalic ? "selected" : ""}`
35980
36021
  })
35981
36022
  }),
35982
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36023
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
35983
36024
  style: { padding: 0, overflow: "hidden" },
35984
36025
  onClick: () => {
35985
36026
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "underline");
35986
36027
  },
35987
36028
  title: tr("actionFormatAsUnderlinedTitle"),
35988
36029
  "aria-label": tr("actionFormatAsUnderlinedLabel"),
35989
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36030
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
35990
36031
  className: `c-rte-icon-underline c-rte-floating-text-format-tb-plugin__format-icon ${isUnderline ? "selected" : ""}`
35991
36032
  })
35992
36033
  }),
35993
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36034
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
35994
36035
  style: { padding: 0, overflow: "hidden" },
35995
36036
  onClick: () => {
35996
36037
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "strikethrough");
35997
36038
  },
35998
36039
  title: tr("actionFormatWithStrikethroughTitle"),
35999
36040
  "aria-label": tr("actionFormatWithStrikethroughLabel"),
36000
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36041
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
36001
36042
  className: `c-rte-icon-strikethrough c-rte-floating-text-format-tb-plugin__format-icon ${isStrikethrough ? "selected" : ""}`
36002
36043
  })
36003
36044
  }),
36004
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36045
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
36005
36046
  style: { padding: 0, overflow: "hidden" },
36006
36047
  onClick: () => {
36007
36048
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "subscript");
36008
36049
  },
36009
36050
  title: tr("actionFormatWithSubscriptTitle"),
36010
36051
  "aria-label": tr("actionFormatWithSubscriptLabel"),
36011
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36052
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
36012
36053
  className: `c-rte-icon-subscript c-rte-floating-text-format-tb-plugin__format-icon ${isSubscript ? "selected" : ""}`
36013
36054
  })
36014
36055
  }),
36015
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36056
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
36016
36057
  style: { padding: 0, overflow: "hidden" },
36017
36058
  onClick: () => {
36018
36059
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "superscript");
36019
36060
  },
36020
36061
  title: tr("actionFormatWithSuperscriptTitle"),
36021
36062
  "aria-label": tr("actionFormatWithSuperscriptLabel"),
36022
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36063
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
36023
36064
  className: `c-rte-icon-superscript c-rte-floating-text-format-tb-plugin__format-icon ${isSuperscript ? "selected" : ""}`
36024
36065
  })
36025
36066
  }),
36026
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36067
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
36027
36068
  style: { padding: 0, overflow: "hidden" },
36028
36069
  onClick: () => {
36029
36070
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "code");
36030
36071
  },
36031
36072
  "aria-label": tr("actionInsertCodeBlock"),
36032
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36073
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
36033
36074
  className: `c-rte-icon-code c-rte-floating-text-format-tb-plugin__format-icon ${isCode ? "selected" : ""}`
36034
36075
  })
36035
36076
  }),
36036
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(IconButton, {
36077
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(IconButton, {
36037
36078
  style: { padding: 0, overflow: "hidden" },
36038
36079
  onClick: insertLink,
36039
36080
  "aria-label": tr("actionInsertlink"),
36040
- children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("i", {
36081
+ children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("i", {
36041
36082
  className: `c-rte-icon-link c-rte-floating-text-format-tb-plugin__format-icon ${isLink ? "selected" : ""}`
36042
36083
  })
36043
36084
  })
@@ -36112,7 +36153,7 @@ function useFloatingTextFormatToolbar(editor, anchorElem) {
36112
36153
  return null;
36113
36154
  }
36114
36155
  return (0, import_react_dom4.createPortal)(
36115
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(TextFormatFloatingToolbar, {
36156
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TextFormatFloatingToolbar, {
36116
36157
  editor,
36117
36158
  anchorElem,
36118
36159
  isLink,
@@ -36137,9 +36178,9 @@ function FloatingTextFormatToolbarPlugin({
36137
36178
  // src/rich-text-editor/plugins/LinkPlugin/index.tsx
36138
36179
  var React6 = require("react");
36139
36180
  var import_LexicalLinkPlugin = require("@lexical/react/LexicalLinkPlugin");
36140
- var import_jsx_runtime121 = require("react/jsx-runtime");
36181
+ var import_jsx_runtime122 = require("react/jsx-runtime");
36141
36182
  function LinkPlugin() {
36142
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_LexicalLinkPlugin.LinkPlugin, {
36183
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_LexicalLinkPlugin.LinkPlugin, {
36143
36184
  validateUrl
36144
36185
  });
36145
36186
  }
@@ -36310,7 +36351,7 @@ var import_react_dom5 = require("react-dom");
36310
36351
  var import_LexicalComposerContext9 = require("@lexical/react/LexicalComposerContext");
36311
36352
  var import_useLexicalEditable = __toESM(require("@lexical/react/useLexicalEditable"));
36312
36353
  var import_table4 = require("@lexical/table");
36313
- var import_jsx_runtime122 = require("react/jsx-runtime");
36354
+ var import_jsx_runtime123 = require("react/jsx-runtime");
36314
36355
  function TableActionMenu({ tableCellNode: _tableCellNode, tableStats }) {
36315
36356
  const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
36316
36357
  const [tableCellNode, updateTableCellNode] = (0, import_react110.useState)(_tableCellNode);
@@ -36465,46 +36506,46 @@ function TableActionMenu({ tableCellNode: _tableCellNode, tableStats }) {
36465
36506
  clearTableSelection();
36466
36507
  });
36467
36508
  }, [editor, tableCellNode, clearTableSelection]);
36468
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, {
36509
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, {
36469
36510
  children: [
36470
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36511
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36471
36512
  onSelect: () => insertTableRowAtSelection(false),
36472
36513
  children: tr("actionTableInsertRowsAbove", selectionCounts.rows)
36473
36514
  }),
36474
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36515
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36475
36516
  onSelect: () => insertTableRowAtSelection(true),
36476
36517
  children: tr("actionTableInsertRowsBelow", selectionCounts.rows)
36477
36518
  }),
36478
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36519
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36479
36520
  onSelect: () => insertTableColumnAtSelection(false),
36480
36521
  children: tr("actionTableInsertColumnsBefore", selectionCounts.columns)
36481
36522
  }),
36482
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36523
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36483
36524
  onSelect: () => insertTableColumnAtSelection(true),
36484
36525
  children: tr("actionTableInsertColumnsAfter", selectionCounts.columns)
36485
36526
  }),
36486
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36527
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36487
36528
  onSelect: () => toggleTableRowIsHeader(),
36488
36529
  children: tr(
36489
36530
  (tableCellNode.__headerState & import_table4.TableCellHeaderStates.ROW) === import_table4.TableCellHeaderStates.ROW ? "actionTableRemoveRowHeader" : "actionTableAddRowHeader"
36490
36531
  )
36491
36532
  }),
36492
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36533
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36493
36534
  onSelect: () => toggleTableColumnIsHeader(),
36494
36535
  children: tr(
36495
36536
  (tableCellNode.__headerState & import_table4.TableCellHeaderStates.COLUMN) === import_table4.TableCellHeaderStates.COLUMN ? "actionTableRemoveColumnHeader" : "actionTableAddColumnHeader"
36496
36537
  )
36497
36538
  }),
36498
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Separator, {}),
36499
- tableStats.columns > 1 && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36539
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Separator, {}),
36540
+ tableStats.columns > 1 && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36500
36541
  onSelect: () => deleteTableColumnAtSelection(),
36501
36542
  children: tr("actionTableDeleteColumn")
36502
36543
  }),
36503
- tableStats.rows > 1 && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36544
+ tableStats.rows > 1 && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36504
36545
  onSelect: () => deleteTableRowAtSelection(),
36505
36546
  children: tr("actionTableDeleteRow")
36506
36547
  }),
36507
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Item, {
36548
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Item, {
36508
36549
  onSelect: () => deleteTableAtSelection(),
36509
36550
  children: tr("actionTableDeleteTable")
36510
36551
  })
@@ -36586,19 +36627,19 @@ function TableCellActionMenuContainer({ anchorElem }) {
36586
36627
  }
36587
36628
  }
36588
36629
  }, [menuButtonRef, tableCellNode, editor, anchorElem]);
36589
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", {
36630
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", {
36590
36631
  className: "c-rte-table-cell-action-button-container",
36591
36632
  ref: menuButtonRef,
36592
- children: tableCellNode != null && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(DropdownMenu.Root, {
36633
+ children: tableCellNode != null && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DropdownMenu.Root, {
36593
36634
  onOpenChange: (isOpen) => setIsMenuOpen(isOpen),
36594
- content: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(TableActionMenu, {
36635
+ content: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(TableActionMenu, {
36595
36636
  tableCellNode,
36596
36637
  tableStats
36597
36638
  }),
36598
- children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(IconButton, {
36639
+ children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(IconButton, {
36599
36640
  size: "xs",
36600
36641
  "aria-label": tr("actionTableOpenOptions"),
36601
- children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon.Arrow, {})
36642
+ children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon.Arrow, {})
36602
36643
  })
36603
36644
  })
36604
36645
  });
@@ -36607,7 +36648,7 @@ function TableActionMenuPlugin({
36607
36648
  anchorElem = document.body
36608
36649
  }) {
36609
36650
  const isEditable = (0, import_useLexicalEditable.default)();
36610
- return (0, import_react_dom5.createPortal)(isEditable ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(TableCellActionMenuContainer, {
36651
+ return (0, import_react_dom5.createPortal)(isEditable ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(TableCellActionMenuContainer, {
36611
36652
  anchorElem
36612
36653
  }) : null, anchorElem);
36613
36654
  }
@@ -36629,7 +36670,7 @@ var import_utils4 = require("@lexical/utils");
36629
36670
  var import_react111 = require("react");
36630
36671
  var import_lexical14 = require("lexical");
36631
36672
  var import_LexicalComposerContext10 = require("@lexical/react/LexicalComposerContext");
36632
- var import_jsx_runtime123 = require("react/jsx-runtime");
36673
+ var import_jsx_runtime124 = require("react/jsx-runtime");
36633
36674
  async function copyJson(editor) {
36634
36675
  const json = lexicalToCrystallizeRichText({ editor, editorState: editor.getEditorState() });
36635
36676
  try {
@@ -36645,22 +36686,22 @@ function ActionsPlugin({
36645
36686
  const [editor] = (0, import_LexicalComposerContext10.useLexicalComposerContext)();
36646
36687
  const tr = useTr();
36647
36688
  const actionMenuAnchorRef = (0, import_react111.useRef)(null);
36648
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", {
36689
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", {
36649
36690
  ref: actionMenuAnchorRef,
36650
36691
  className: "c-rte-actions-plugin",
36651
- children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(ActionMenu, {
36692
+ children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(ActionMenu, {
36652
36693
  container: actionMenuAnchorRef.current,
36653
36694
  children: [
36654
- !prepend ? null : prepend.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ActionMenu.Item, {
36695
+ !prepend ? null : prepend.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ActionMenu.Item, {
36655
36696
  onSelect: actionItem.action,
36656
36697
  className: actionItem.type === "danger" ? "danger" : "",
36657
36698
  children: actionItem.title
36658
36699
  }, actionItem.title)),
36659
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ActionMenu.Item, {
36700
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ActionMenu.Item, {
36660
36701
  onSelect: () => copyJson(editor),
36661
36702
  children: tr("actionCopyJSON")
36662
36703
  }),
36663
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ActionMenu.Item, {
36704
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ActionMenu.Item, {
36664
36705
  className: "danger",
36665
36706
  onSelect: () => {
36666
36707
  editor.dispatchCommand(import_lexical14.CLEAR_EDITOR_COMMAND, void 0);
@@ -36668,7 +36709,7 @@ function ActionsPlugin({
36668
36709
  },
36669
36710
  children: tr("actionClear")
36670
36711
  }),
36671
- !append ? null : append.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ActionMenu.Item, {
36712
+ !append ? null : append.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ActionMenu.Item, {
36672
36713
  onSelect: actionItem.action,
36673
36714
  className: actionItem.type === "danger" ? "danger" : "",
36674
36715
  children: actionItem.title
@@ -36681,7 +36722,7 @@ function ActionsPlugin({
36681
36722
  // src/rich-text-editor/plugins/ToolbarPlugin/insert-table.tsx
36682
36723
  var import_react112 = require("react");
36683
36724
  var import_table5 = require("@lexical/table");
36684
- var import_jsx_runtime124 = require("react/jsx-runtime");
36725
+ var import_jsx_runtime125 = require("react/jsx-runtime");
36685
36726
  function InsertTableDialog({ activeEditor }) {
36686
36727
  const [rows, setRows] = (0, import_react112.useState)("5");
36687
36728
  const [columns, setColumns] = (0, import_react112.useState)("5");
@@ -36699,13 +36740,13 @@ function InsertTableDialog({ activeEditor }) {
36699
36740
  }
36700
36741
  });
36701
36742
  };
36702
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", {
36743
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", {
36703
36744
  className: "c-rte-insert-table",
36704
36745
  children: [
36705
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", {
36746
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", {
36706
36747
  className: "c-rte-insert-table__dimensions",
36707
36748
  children: [
36708
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(InputWithLabel, {
36749
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(InputWithLabel, {
36709
36750
  label: tr("insertTableRows"),
36710
36751
  value: rows,
36711
36752
  placeholder: "0",
@@ -36713,10 +36754,10 @@ function InsertTableDialog({ activeEditor }) {
36713
36754
  inputMode: "numeric",
36714
36755
  onChange: (e) => setRows(e.target.value)
36715
36756
  }),
36716
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", {
36757
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
36717
36758
  className: "c-rte-insert-table__dimensions__separator"
36718
36759
  }),
36719
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(InputWithLabel, {
36760
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(InputWithLabel, {
36720
36761
  type: "text",
36721
36762
  label: tr("insertTableColumns"),
36722
36763
  placeholder: "0",
@@ -36726,9 +36767,9 @@ function InsertTableDialog({ activeEditor }) {
36726
36767
  })
36727
36768
  ]
36728
36769
  }),
36729
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", {
36770
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", {
36730
36771
  className: "c-rte-insert-table__actions",
36731
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Button, {
36772
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, {
36732
36773
  as: Dialog.Close,
36733
36774
  size: "sm",
36734
36775
  intent: "action",
@@ -36742,7 +36783,7 @@ function InsertTableDialog({ activeEditor }) {
36742
36783
  }
36743
36784
 
36744
36785
  // src/rich-text-editor/plugins/ToolbarPlugin/index.tsx
36745
- var import_jsx_runtime125 = require("react/jsx-runtime");
36786
+ var import_jsx_runtime126 = require("react/jsx-runtime");
36746
36787
  var headingTypeToBlockName = {
36747
36788
  h1: "Heading 1",
36748
36789
  h2: "Heading 2",
@@ -36846,80 +36887,80 @@ function BlockFormatDropDown({
36846
36887
  });
36847
36888
  }
36848
36889
  };
36849
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(DropdownMenu.Root, {
36890
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DropdownMenu.Root, {
36850
36891
  disabled,
36851
36892
  style: { zIndex: 1 },
36852
- content: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, {
36893
+ content: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, {
36853
36894
  children: [
36854
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
36895
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
36855
36896
  onClick: formatParagraph,
36856
36897
  children: [
36857
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
36898
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
36858
36899
  className: `c-rte-icon-paragraph c-rte-toolbar__block-format__icon ${blockType === "paragraph" ? "selected" : ""}`
36859
36900
  }),
36860
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
36901
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
36861
36902
  className: `c-rte-toolbar__block-format__text ${blockType === "paragraph" ? "selected" : ""}`,
36862
36903
  children: "Normal"
36863
36904
  })
36864
36905
  ]
36865
36906
  }),
36866
- headings.map((headingSize) => /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
36907
+ headings.map((headingSize) => /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
36867
36908
  onClick: () => formatHeading(headingSize),
36868
36909
  children: [
36869
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
36910
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
36870
36911
  className: `c-rte-icon-${headingSize} c-rte-toolbar__block-format__icon ${blockType === headingSize ? "selected" : ""}`
36871
36912
  }),
36872
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
36913
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
36873
36914
  className: `c-rte-toolbar__block-format__text ${blockType === headingSize ? "selected" : ""}`,
36874
36915
  children: headingTypeToBlockName[headingSize]
36875
36916
  })
36876
36917
  ]
36877
36918
  }, headingSize)),
36878
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
36919
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
36879
36920
  onClick: formatBulletList,
36880
36921
  children: [
36881
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
36922
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
36882
36923
  className: `c-rte-icon-bullet-list c-rte-toolbar__block-format__icon ${blockType === "bullet" ? "selected" : ""}`
36883
36924
  }),
36884
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
36925
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
36885
36926
  className: `c-rte-toolbar__block-format__text ${blockType === "bullet" ? "selected" : ""}`,
36886
36927
  children: "Bullet List"
36887
36928
  })
36888
36929
  ]
36889
36930
  }),
36890
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
36931
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
36891
36932
  onClick: formatNumberedList,
36892
36933
  children: [
36893
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
36934
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
36894
36935
  className: `c-rte-icon-numbered-list c-rte-toolbar__block-format__icon ${blockType === "number" ? "selected" : ""}`
36895
36936
  }),
36896
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
36937
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
36897
36938
  className: `c-rte-toolbar__block-format__text ${blockType === "number" ? "selected" : ""}`,
36898
36939
  children: "Numbered List"
36899
36940
  })
36900
36941
  ]
36901
36942
  }),
36902
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
36943
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
36903
36944
  onClick: formatQuote,
36904
36945
  "data-testid": "toggle-block-format-quote",
36905
36946
  children: [
36906
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
36947
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
36907
36948
  className: `c-rte-icon-quote c-rte-toolbar__block-format__icon ${blockType === "quote" ? "selected" : ""}`
36908
36949
  }),
36909
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
36950
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
36910
36951
  className: `c-rte-toolbar__block-format__text ${blockType === "quote" ? "selected" : ""}`,
36911
36952
  children: "Quote"
36912
36953
  })
36913
36954
  ]
36914
36955
  }),
36915
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
36956
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
36916
36957
  onClick: formatCode,
36917
36958
  "data-testid": "toggle-block-format-code",
36918
36959
  children: [
36919
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
36960
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
36920
36961
  className: `icon c-rte-icon-code border w-6 h-6 rounded-md bg-no-repeat bg-center bg-[length:18px_18px] ${blockType === "code" ? "selected" : ""}`
36921
36962
  }),
36922
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
36963
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
36923
36964
  className: `c-rte-toolbar__block-format__text ${blockType === "code" ? "selected" : ""}`,
36924
36965
  children: "Code block"
36925
36966
  })
@@ -36927,21 +36968,21 @@ function BlockFormatDropDown({
36927
36968
  })
36928
36969
  ]
36929
36970
  }),
36930
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Button, {
36971
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Button, {
36931
36972
  style: { backgroundColor: "transparent", padding: "0 8px" },
36932
36973
  "aria-label": "Formatting options for text style",
36933
36974
  "data-testid": "toggle-block-format",
36934
36975
  children: [
36935
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
36976
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
36936
36977
  className: `c-rte-toolbar__toggle-icon c-rte-icon-${blockType}`
36937
36978
  }),
36938
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Icon.Arrow, {})
36979
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon.Arrow, {})
36939
36980
  ]
36940
36981
  })
36941
36982
  });
36942
36983
  }
36943
36984
  function Divider() {
36944
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", {
36985
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", {
36945
36986
  className: "c-rte-toolbar__divider"
36946
36987
  });
36947
36988
  }
@@ -37090,13 +37131,13 @@ function ToolbarPlugin({
37090
37131
  },
37091
37132
  [activeEditor, selectedElementKey]
37092
37133
  );
37093
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", {
37134
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", {
37094
37135
  className: "c-rte-toolbar",
37095
37136
  children: [
37096
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", {
37137
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", {
37097
37138
  className: "c-rte-toolbar__inner",
37098
37139
  children: [
37099
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37140
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37100
37141
  disabled: !canUndo || !isEditable,
37101
37142
  onClick: () => {
37102
37143
  activeEditor.dispatchCommand(import_lexical15.UNDO_COMMAND, void 0);
@@ -37104,12 +37145,12 @@ function ToolbarPlugin({
37104
37145
  type: "button",
37105
37146
  title: tr(IS_APPLE ? "actionUndoTitleApple" : "actionUndoTitle"),
37106
37147
  "aria-label": tr("actionUndoLabel"),
37107
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37148
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37108
37149
  className: `c-rte-icon-undo c-rte-toolbar__icon ${!canUndo ? "disabled" : ""}
37109
37150
  `
37110
37151
  })
37111
37152
  }),
37112
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37153
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37113
37154
  disabled: !canRedo || !isEditable,
37114
37155
  onClick: () => {
37115
37156
  activeEditor.dispatchCommand(import_lexical15.REDO_COMMAND, void 0);
@@ -37117,51 +37158,51 @@ function ToolbarPlugin({
37117
37158
  type: "button",
37118
37159
  title: tr(IS_APPLE ? "actionRedoTitleApple" : "actionRedoTitle"),
37119
37160
  "aria-label": tr("actionRedoLabel"),
37120
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37161
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37121
37162
  className: `c-rte-icon-redo c-rte-toolbar__icon ${!canRedo ? "disabled" : ""}`
37122
37163
  })
37123
37164
  }),
37124
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Divider, {}),
37125
- blockType in blockTypeToBlockName && activeEditor === editor && /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, {
37165
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Divider, {}),
37166
+ blockType in blockTypeToBlockName && activeEditor === editor && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, {
37126
37167
  children: [
37127
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(BlockFormatDropDown, {
37168
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(BlockFormatDropDown, {
37128
37169
  disabled: !isEditable,
37129
37170
  blockType,
37130
37171
  editor
37131
37172
  }),
37132
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Divider, {})
37173
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Divider, {})
37133
37174
  ]
37134
37175
  }),
37135
- blockType === "code" ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, {
37136
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(DropdownMenu.Root, {
37176
+ blockType === "code" ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_jsx_runtime126.Fragment, {
37177
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DropdownMenu.Root, {
37137
37178
  disabled: !isEditable,
37138
37179
  style: { zIndex: 1 },
37139
- content: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, {
37180
+ content: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_jsx_runtime126.Fragment, {
37140
37181
  children: CODE_LANGUAGE_OPTIONS.map(([value, name]) => {
37141
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(DropdownMenu.Item, {
37182
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DropdownMenu.Item, {
37142
37183
  className: `item ${dropDownActiveClass(value === codeLanguage)}`,
37143
37184
  onClick: () => onCodeLanguageSelect(value),
37144
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37185
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37145
37186
  className: `c-rte-toolbar__code-lang__sel-item ${dropDownActiveClass(value === codeLanguage) ? "selected" : ""}`,
37146
37187
  children: name
37147
37188
  })
37148
37189
  }, value);
37149
37190
  })
37150
37191
  }),
37151
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, {
37192
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Button, {
37152
37193
  "aria-label": tr("codeSelectLanguage"),
37153
- append: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Icon.Arrow, {}),
37154
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37194
+ append: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon.Arrow, {}),
37195
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37155
37196
  className: "c-rte-toolbar__code-lang__button-text",
37156
37197
  children: (0, import_code9.getLanguageFriendlyName)(codeLanguage)
37157
37198
  })
37158
37199
  })
37159
37200
  })
37160
- }) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Dialog, {
37161
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", {
37201
+ }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog, {
37202
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", {
37162
37203
  className: "c-rte-toolbar__actions-rest",
37163
37204
  children: [
37164
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37205
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37165
37206
  disabled: !isEditable,
37166
37207
  className: `c-rte-toolbar__icon-btn ${isBold ? "selected" : ""}`,
37167
37208
  type: "button",
@@ -37171,11 +37212,11 @@ function ToolbarPlugin({
37171
37212
  onClick: () => {
37172
37213
  activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "bold");
37173
37214
  },
37174
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37215
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37175
37216
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-bold`
37176
37217
  })
37177
37218
  }),
37178
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37219
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37179
37220
  className: `c-rte-toolbar__icon-btn ${isItalic ? "selected" : ""}`,
37180
37221
  disabled: !isEditable,
37181
37222
  onClick: () => {
@@ -37185,11 +37226,11 @@ function ToolbarPlugin({
37185
37226
  title: tr(IS_APPLE ? "actionFormatAsEmphasizedTitleApple" : "actionFormatAsEmphasizedTitle"),
37186
37227
  "aria-label": tr("actionFormatAsEmphasizedLabel"),
37187
37228
  "data-testid": "toggle-format-emphasized",
37188
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37229
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37189
37230
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-italic`
37190
37231
  })
37191
37232
  }),
37192
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37233
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37193
37234
  className: `c-rte-toolbar__icon-btn ${isUnderline ? "selected" : ""}`,
37194
37235
  disabled: !isEditable,
37195
37236
  onClick: () => {
@@ -37199,11 +37240,11 @@ function ToolbarPlugin({
37199
37240
  title: tr(IS_APPLE ? "actionFormatAsUnderlinedTitleApple" : "actionFormatAsUnderlinedTitle"),
37200
37241
  "aria-label": tr("actionFormatAsUnderlinedLabel"),
37201
37242
  "data-testid": "toggle-format-underlined",
37202
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37243
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37203
37244
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-underline`
37204
37245
  })
37205
37246
  }),
37206
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37247
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37207
37248
  className: `c-rte-toolbar__icon-btn ${isCode ? "selected" : ""}`,
37208
37249
  disabled: !isEditable,
37209
37250
  onClick: () => {
@@ -37212,84 +37253,84 @@ function ToolbarPlugin({
37212
37253
  type: "button",
37213
37254
  title: tr("actionInsertCodeBlock"),
37214
37255
  "aria-label": tr("actionInsertCodeBlock"),
37215
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37256
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37216
37257
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-code`
37217
37258
  })
37218
37259
  }),
37219
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37260
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37220
37261
  className: `c-rte-toolbar__icon-btn ${isLink ? "selected" : ""}`,
37221
37262
  disabled: !isEditable,
37222
37263
  onClick: insertLink,
37223
37264
  type: "button",
37224
37265
  "aria-label": tr("actionInsertlink"),
37225
37266
  title: tr("actionInsertlink"),
37226
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37267
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37227
37268
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-link`
37228
37269
  })
37229
37270
  }),
37230
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(DropdownMenu.Root, {
37271
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DropdownMenu.Root, {
37231
37272
  disabled: !isEditable,
37232
37273
  style: { zIndex: 1 },
37233
- content: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, {
37274
+ content: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, {
37234
37275
  children: [
37235
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
37276
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
37236
37277
  onClick: () => {
37237
37278
  activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "strikethrough");
37238
37279
  },
37239
37280
  title: tr("actionFormatWithStrikethroughTitle"),
37240
37281
  "aria-label": tr("actionFormatWithStrikethroughLabel"),
37241
37282
  children: [
37242
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37283
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37243
37284
  className: `c-rte-icon-strikethrough c-rte-toolbar__dd-item__icon ${isStrikethrough ? "selected" : ""}`
37244
37285
  }),
37245
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37286
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37246
37287
  className: `c-rte-toolbar__dd-item__text ${isStrikethrough ? "selected" : ""}`,
37247
37288
  children: tr("actionFormatAsStrongTitle")
37248
37289
  })
37249
37290
  ]
37250
37291
  }),
37251
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
37292
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
37252
37293
  onClick: () => {
37253
37294
  activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "subscript");
37254
37295
  },
37255
37296
  title: tr("actionFormatWithSubscriptTitle"),
37256
37297
  "aria-label": tr("actionFormatWithSubscriptLabel"),
37257
37298
  children: [
37258
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37299
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37259
37300
  className: `c-rte-icon-subscript c-rte-toolbar__dd-item__icon ${isSubscript ? "selected" : ""}`
37260
37301
  }),
37261
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37302
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37262
37303
  className: `c-rte-toolbar__dd-item__text ${isSubscript ? "selected" : ""}`,
37263
37304
  children: tr("actionFormatWithSubscriptTitle")
37264
37305
  })
37265
37306
  ]
37266
37307
  }),
37267
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
37308
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
37268
37309
  onClick: () => {
37269
37310
  activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "superscript");
37270
37311
  },
37271
37312
  title: tr("actionFormatWithSuperscriptTitle"),
37272
37313
  "aria-label": tr("actionFormatWithSuperscriptLabel"),
37273
37314
  children: [
37274
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37315
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37275
37316
  className: `c-rte-icon-superscript c-rte-toolbar__dd-item__icon ${isSuperscript ? "selected" : ""}`
37276
37317
  }),
37277
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37318
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37278
37319
  className: `c-rte-toolbar__dd-item__text ${isSuperscript ? "selected" : ""}`,
37279
37320
  children: tr("actionFormatWithSuperscriptTitle")
37280
37321
  })
37281
37322
  ]
37282
37323
  }),
37283
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
37324
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
37284
37325
  onClick: clearFormatting,
37285
37326
  className: "item",
37286
37327
  title: tr("actionClearTextFormatting"),
37287
37328
  "aria-label": tr("actionClearTextFormatting"),
37288
37329
  children: [
37289
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37330
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37290
37331
  className: "c-rte-icon-clear c-rte-toolbar__dd-item__icon"
37291
37332
  }),
37292
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37333
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37293
37334
  className: "c-rte-toolbar__dd-item__text--clear",
37294
37335
  children: "Clear Formatting"
37295
37336
  })
@@ -37297,47 +37338,47 @@ function ToolbarPlugin({
37297
37338
  })
37298
37339
  ]
37299
37340
  }),
37300
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Button, {
37341
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Button, {
37301
37342
  style: { backgroundColor: "transparent", padding: "0 8px" },
37302
37343
  "aria-label": tr("actionTextFormattingOptions"),
37303
37344
  children: [
37304
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37345
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37305
37346
  className: `c-rte-icon-dropdown-more c-rte-toolbar__toggle-icon`
37306
37347
  }),
37307
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Icon.Arrow, {})
37348
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Icon.Arrow, {})
37308
37349
  ]
37309
37350
  })
37310
37351
  }),
37311
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Divider, {}),
37312
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(DropdownMenu.Root, {
37352
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Divider, {}),
37353
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DropdownMenu.Root, {
37313
37354
  style: { zIndex: 1 },
37314
37355
  disabled: !isEditable,
37315
- content: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(import_jsx_runtime125.Fragment, {
37356
+ content: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, {
37316
37357
  children: [
37317
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(DropdownMenu.Item, {
37358
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(DropdownMenu.Item, {
37318
37359
  onClick: () => {
37319
37360
  activeEditor.dispatchCommand(import_LexicalHorizontalRuleNode4.INSERT_HORIZONTAL_RULE_COMMAND, void 0);
37320
37361
  },
37321
37362
  children: [
37322
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37363
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37323
37364
  className: "c-rte-toolbar__dd-item__icon c-rte-icon-horizontal-rule"
37324
37365
  }),
37325
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37366
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37326
37367
  className: "c-rte-toolbar__dd-item__text",
37327
37368
  children: tr("horizontalRule")
37328
37369
  })
37329
37370
  ]
37330
37371
  }),
37331
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(DropdownMenu.Item, {
37332
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Dialog.Trigger, {
37372
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DropdownMenu.Item, {
37373
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog.Trigger, {
37333
37374
  asChild: true,
37334
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", {
37375
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", {
37335
37376
  className: "c-rte-toolbar__dd-item--table",
37336
37377
  children: [
37337
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37378
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37338
37379
  className: "c-rte-toolbar__dd-item__icon c-rte-icon-table"
37339
37380
  }),
37340
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("span", {
37381
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", {
37341
37382
  className: "c-rte-toolbar__dd-item__text",
37342
37383
  children: tr("table")
37343
37384
  })
@@ -37347,21 +37388,21 @@ function ToolbarPlugin({
37347
37388
  })
37348
37389
  ]
37349
37390
  }),
37350
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(IconButton, {
37351
- children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("i", {
37391
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(IconButton, {
37392
+ children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("i", {
37352
37393
  className: "c-rte-icon-plus c-rte-toolbar__plus"
37353
37394
  })
37354
37395
  })
37355
37396
  }),
37356
- /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Dialog.Content, {
37397
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(Dialog.Content, {
37357
37398
  children: [
37358
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Dialog.Title, {
37399
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog.Title, {
37359
37400
  children: tr("insertTableTitle")
37360
37401
  }),
37361
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Dialog.Description, {
37402
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Dialog.Description, {
37362
37403
  children: tr("insertTableDescription")
37363
37404
  }),
37364
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(InsertTableDialog, {
37405
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(InsertTableDialog, {
37365
37406
  activeEditor
37366
37407
  })
37367
37408
  ]
@@ -37371,7 +37412,7 @@ function ToolbarPlugin({
37371
37412
  })
37372
37413
  ]
37373
37414
  }),
37374
- /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ActionsPlugin, {
37415
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ActionsPlugin, {
37375
37416
  prepend: actionsMenuPrepend,
37376
37417
  append: actionsMenuAppend
37377
37418
  })
@@ -37482,14 +37523,14 @@ var theme = {
37482
37523
  var CrystallizeRTEditorTheme_default = theme;
37483
37524
 
37484
37525
  // src/rich-text-editor/rich-text-editor.tsx
37485
- var import_jsx_runtime126 = require("react/jsx-runtime");
37526
+ var import_jsx_runtime127 = require("react/jsx-runtime");
37486
37527
  function RichTextEditor({
37487
37528
  initialData,
37488
37529
  language = "en",
37489
37530
  labelTranslations,
37490
37531
  ...rest
37491
37532
  }) {
37492
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalComposer.LexicalComposer, {
37533
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalComposer.LexicalComposer, {
37493
37534
  initialConfig: {
37494
37535
  editable: !rest.disabled,
37495
37536
  namespace: "crystallize-rich-text-editor",
@@ -37502,13 +37543,13 @@ function RichTextEditor({
37502
37543
  richText: initialData
37503
37544
  }) : void 0
37504
37545
  },
37505
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(I18nProvider, {
37546
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(I18nProvider, {
37506
37547
  language,
37507
37548
  labelTranslations,
37508
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(SharedHistoryContext, {
37509
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", {
37549
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(SharedHistoryContext, {
37550
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", {
37510
37551
  className: "c-rich-text-editor",
37511
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(RichTextEditorWithoutContext, {
37552
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RichTextEditorWithoutContext, {
37512
37553
  ...rest
37513
37554
  })
37514
37555
  })
@@ -37530,7 +37571,7 @@ function RichTextEditorWithoutContext({
37530
37571
  }) {
37531
37572
  const editable = !disabled;
37532
37573
  const { historyState } = useSharedHistoryContext();
37533
- const placeholder = /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", {
37574
+ const placeholder = /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", {
37534
37575
  className: "c-rte-placeholder",
37535
37576
  children: placeholderText ?? ""
37536
37577
  });
@@ -37554,39 +37595,39 @@ function RichTextEditorWithoutContext({
37554
37595
  }
37555
37596
  firstOnChangeTriggeredRef.current = true;
37556
37597
  }
37557
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, {
37598
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, {
37558
37599
  children: [
37559
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalOnChangePlugin.OnChangePlugin, {
37600
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalOnChangePlugin.OnChangePlugin, {
37560
37601
  onChange: onLocalChange,
37561
37602
  ignoreSelectionChange: true
37562
37603
  }),
37563
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(DimensionDetectorPlugin, {
37604
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(DimensionDetectorPlugin, {
37564
37605
  onChange: (d) => setIsSmallWidthViewport(d.isSmallWidth)
37565
37606
  }),
37566
- isSmallWidthViewport ? null : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ToolbarPlugin, {
37607
+ isSmallWidthViewport ? null : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ToolbarPlugin, {
37567
37608
  actionsMenuPrepend,
37568
37609
  actionsMenuAppend
37569
37610
  }),
37570
37611
  slotPreContent,
37571
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", {
37612
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", {
37572
37613
  className: `c-rte-editor-container ${disabled ? "disabled" : ""}`,
37573
37614
  children: [
37574
- maxLength != null ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(MaxLengthPlugin, {
37615
+ maxLength != null ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(MaxLengthPlugin, {
37575
37616
  maxLength
37576
37617
  }) : null,
37577
- !autoFocus ? null : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalAutoFocusPlugin.AutoFocusPlugin, {}),
37578
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalClearEditorPlugin.ClearEditorPlugin, {}),
37579
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(LexicalAutoLinkPlugin, {}),
37580
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalHistoryPlugin2.HistoryPlugin, {
37618
+ !autoFocus ? null : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalAutoFocusPlugin.AutoFocusPlugin, {}),
37619
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalClearEditorPlugin.ClearEditorPlugin, {}),
37620
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(LexicalAutoLinkPlugin, {}),
37621
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalHistoryPlugin2.HistoryPlugin, {
37581
37622
  externalHistoryState: historyState
37582
37623
  }),
37583
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalRichTextPlugin.RichTextPlugin, {
37584
- contentEditable: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", {
37624
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalRichTextPlugin.RichTextPlugin, {
37625
+ contentEditable: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", {
37585
37626
  className: "c-rte-editor-scroller",
37586
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", {
37627
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", {
37587
37628
  className: "c-rte-editor",
37588
37629
  ref: onRef,
37589
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalContentEditable.ContentEditable, {
37630
+ children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalContentEditable.ContentEditable, {
37590
37631
  className: "c-rte-contenteditable-root",
37591
37632
  id
37592
37633
  })
@@ -37595,28 +37636,28 @@ function RichTextEditorWithoutContext({
37595
37636
  placeholder,
37596
37637
  ErrorBoundary: import_LexicalErrorBoundary.default
37597
37638
  }),
37598
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(CodeHighlightPlugin, {}),
37599
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalListPlugin.ListPlugin, {}),
37600
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ListMaxIndentLevelPlugin, {
37639
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(CodeHighlightPlugin, {}),
37640
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalListPlugin.ListPlugin, {}),
37641
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ListMaxIndentLevelPlugin, {
37601
37642
  maxDepth: 7
37602
37643
  }),
37603
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalTablePlugin.TablePlugin, {}),
37604
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(LinkPlugin, {}),
37605
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalHorizontalRulePlugin.HorizontalRulePlugin, {}),
37606
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TabFocusPlugin, {}),
37607
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {}),
37608
- floatingAnchorElem && !isSmallWidthViewport && /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(import_jsx_runtime126.Fragment, {
37644
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalTablePlugin.TablePlugin, {}),
37645
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(LinkPlugin, {}),
37646
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalHorizontalRulePlugin.HorizontalRulePlugin, {}),
37647
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(TabFocusPlugin, {}),
37648
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {}),
37649
+ floatingAnchorElem && !isSmallWidthViewport && /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, {
37609
37650
  children: [
37610
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(CodeActionMenuPlugin, {
37651
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(CodeActionMenuPlugin, {
37611
37652
  anchorElem: floatingAnchorElem
37612
37653
  }),
37613
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(FloatingLinkEditorPlugin, {
37654
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(FloatingLinkEditorPlugin, {
37614
37655
  anchorElem: floatingAnchorElem
37615
37656
  }),
37616
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(TableActionMenuPlugin, {
37657
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(TableActionMenuPlugin, {
37617
37658
  anchorElem: floatingAnchorElem
37618
37659
  }),
37619
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(FloatingTextFormatToolbarPlugin, {
37660
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(FloatingTextFormatToolbarPlugin, {
37620
37661
  anchorElem: floatingAnchorElem
37621
37662
  })
37622
37663
  ]
@@ -37627,45 +37668,6 @@ function RichTextEditorWithoutContext({
37627
37668
  });
37628
37669
  }
37629
37670
 
37630
- // src/tooltip/tooltip.tsx
37631
- var RadixTooltip = __toESM(require("@radix-ui/react-tooltip"));
37632
- var import_jsx_runtime127 = require("react/jsx-runtime");
37633
- function Tooltip({
37634
- children,
37635
- content,
37636
- side,
37637
- align = "center",
37638
- defaultOpen = false,
37639
- delayDuration = 800
37640
- }) {
37641
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RadixTooltip.Provider, {
37642
- delayDuration,
37643
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(RadixTooltip.Root, {
37644
- defaultOpen,
37645
- children: [
37646
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RadixTooltip.Trigger, {
37647
- asChild: true,
37648
- children
37649
- }),
37650
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RadixTooltip.Portal, {
37651
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(RadixTooltip.Content, {
37652
- align,
37653
- className: "c-tooltip-content data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade",
37654
- sideOffset: 5,
37655
- side,
37656
- children: [
37657
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(RadixTooltip.Arrow, {
37658
- className: "c-tooltip-arrow"
37659
- }),
37660
- content
37661
- ]
37662
- })
37663
- })
37664
- ]
37665
- })
37666
- });
37667
- }
37668
-
37669
37671
  // src/switch/switch.tsx
37670
37672
  var RadixSwitch = __toESM(require("@radix-ui/react-switch"));
37671
37673
  var import_jsx_runtime128 = require("react/jsx-runtime");