@crystallize/design-system 1.24.12 → 1.24.14

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
@@ -7566,17 +7566,17 @@ var init_12 = __esm({
7566
7566
  });
7567
7567
 
7568
7568
  // src/rich-text-editor/context/SharedHistoryContext.tsx
7569
- var import_react117, import_LexicalHistoryPlugin, import_jsx_runtime134, Context, SharedHistoryContext, useSharedHistoryContext;
7569
+ var import_react117, import_LexicalHistoryPlugin, import_jsx_runtime136, Context, SharedHistoryContext, useSharedHistoryContext;
7570
7570
  var init_SharedHistoryContext = __esm({
7571
7571
  "src/rich-text-editor/context/SharedHistoryContext.tsx"() {
7572
7572
  "use strict";
7573
7573
  import_react117 = require("react");
7574
7574
  import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
7575
- import_jsx_runtime134 = require("react/jsx-runtime");
7575
+ import_jsx_runtime136 = require("react/jsx-runtime");
7576
7576
  Context = (0, import_react117.createContext)({});
7577
7577
  SharedHistoryContext = ({ children }) => {
7578
7578
  const historyContext = (0, import_react117.useMemo)(() => ({ historyState: (0, import_LexicalHistoryPlugin.createEmptyHistoryState)() }), []);
7579
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Context.Provider, {
7579
+ return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Context.Provider, {
7580
7580
  value: historyContext,
7581
7581
  children
7582
7582
  });
@@ -7664,7 +7664,7 @@ function I18nProvider({
7664
7664
  children
7665
7665
  }) {
7666
7666
  const translations2 = labelTranslations || en_default;
7667
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(I18nContext.Provider, {
7667
+ return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(I18nContext.Provider, {
7668
7668
  value: translations2,
7669
7669
  children
7670
7670
  });
@@ -7687,14 +7687,14 @@ function useTr() {
7687
7687
  return "";
7688
7688
  };
7689
7689
  }
7690
- var import_react118, import_jsx_runtime135, I18nContext;
7690
+ var import_react118, import_jsx_runtime137, I18nContext;
7691
7691
  var init_i18n = __esm({
7692
7692
  "src/rich-text-editor/i18n/index.tsx"() {
7693
7693
  "use strict";
7694
7694
  import_react118 = require("react");
7695
7695
  init_en();
7696
7696
  init_en();
7697
- import_jsx_runtime135 = require("react/jsx-runtime");
7697
+ import_jsx_runtime137 = require("react/jsx-runtime");
7698
7698
  I18nContext = (0, import_react118.createContext)(null);
7699
7699
  }
7700
7700
  });
@@ -7702,7 +7702,10 @@ var init_i18n = __esm({
7702
7702
  // src/rich-text-editor/model/parse-initial-state.ts
7703
7703
  function parseInitialState({ richText }) {
7704
7704
  let richTextArray = Array.isArray(richText) ? richText : [richText];
7705
- richTextArray = richTextArray.map((rootNode) => {
7705
+ const ensureRootBlockElements = (richTextArray2) => richTextArray2.flatMap((rootNode) => {
7706
+ if (Array.isArray(rootNode)) {
7707
+ return ensureRootBlockElements(rootNode);
7708
+ }
7706
7709
  if (!rootNode?.kind || rootNode.kind === "inline") {
7707
7710
  return {
7708
7711
  type: "paragraph",
@@ -7712,6 +7715,7 @@ function parseInitialState({ richText }) {
7712
7715
  }
7713
7716
  return rootNode;
7714
7717
  });
7718
+ richTextArray = ensureRootBlockElements(richTextArray);
7715
7719
  return richTextArray;
7716
7720
  }
7717
7721
  var init_parse_initial_state = __esm({
@@ -8138,17 +8142,17 @@ var init_BaseNodes = __esm({
8138
8142
 
8139
8143
  // src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx
8140
8144
  function LexicalAutoLinkPlugin() {
8141
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_LexicalAutoLinkPlugin.AutoLinkPlugin, {
8145
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(import_LexicalAutoLinkPlugin.AutoLinkPlugin, {
8142
8146
  matchers: MATCHERS
8143
8147
  });
8144
8148
  }
8145
- var React2, import_LexicalAutoLinkPlugin, import_jsx_runtime136, URL_MATCHER, EMAIL_MATCHER, MATCHERS;
8149
+ var React2, import_LexicalAutoLinkPlugin, import_jsx_runtime138, URL_MATCHER, EMAIL_MATCHER, MATCHERS;
8146
8150
  var init_AutoLinkPlugin = __esm({
8147
8151
  "src/rich-text-editor/plugins/AutoLinkPlugin/index.tsx"() {
8148
8152
  "use strict";
8149
8153
  React2 = require("react");
8150
8154
  import_LexicalAutoLinkPlugin = require("@lexical/react/LexicalAutoLinkPlugin");
8151
- import_jsx_runtime136 = require("react/jsx-runtime");
8155
+ import_jsx_runtime138 = require("react/jsx-runtime");
8152
8156
  URL_MATCHER = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
8153
8157
  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,}))/;
8154
8158
  MATCHERS = [
@@ -8207,18 +8211,18 @@ function CopyButton({ editor, getCodeDOMNode }) {
8207
8211
  console.error("Failed to copy: ", err);
8208
8212
  }
8209
8213
  }
8210
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("button", {
8214
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("button", {
8211
8215
  className: "c-rte-code-button",
8212
8216
  onClick: handleClick,
8213
8217
  "aria-label": tr("actionCopyCode"),
8214
- children: isCopyCompleted ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("i", {
8218
+ children: isCopyCompleted ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("i", {
8215
8219
  className: "c-rte-code-button__icon c-rte-icon-success"
8216
- }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("i", {
8220
+ }) : /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("i", {
8217
8221
  className: "c-rte-code-button__icon c-rte-icon-copy"
8218
8222
  })
8219
8223
  });
8220
8224
  }
8221
- var React3, import_react119, import_lexical4, import_use_debounce, import_code4, import_jsx_runtime137;
8225
+ var React3, import_react119, import_lexical4, import_use_debounce, import_code4, import_jsx_runtime139;
8222
8226
  var init_CopyButton = __esm({
8223
8227
  "src/rich-text-editor/plugins/CodeActionMenuPlugin/components/CopyButton/index.tsx"() {
8224
8228
  "use strict";
@@ -8228,7 +8232,7 @@ var init_CopyButton = __esm({
8228
8232
  import_use_debounce = require("use-debounce");
8229
8233
  import_code4 = require("@lexical/code");
8230
8234
  init_i18n();
8231
- import_jsx_runtime137 = require("react/jsx-runtime");
8235
+ import_jsx_runtime139 = require("react/jsx-runtime");
8232
8236
  }
8233
8237
  });
8234
8238
 
@@ -37122,29 +37126,29 @@ function PrettierButton({ lang, editor, getCodeDOMNode }) {
37122
37126
  setTipsVisible(false);
37123
37127
  }
37124
37128
  }
37125
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", {
37129
+ return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", {
37126
37130
  className: "c-rte-prettier-wrapper",
37127
37131
  children: [
37128
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("button", {
37132
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("button", {
37129
37133
  className: "c-rte-code-button",
37130
37134
  onClick: handleClick,
37131
37135
  onMouseEnter: handleMouseEnter,
37132
37136
  onMouseLeave: handleMouseLeave,
37133
37137
  "aria-label": tr("actionFormatCode"),
37134
- children: syntaxError ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("i", {
37138
+ children: syntaxError ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("i", {
37135
37139
  className: "c-rte-code-button__icon c-rte-icon-prettier-error"
37136
- }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("i", {
37140
+ }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("i", {
37137
37141
  className: "c-rte-code-button__icon c-rte-icon-prettier"
37138
37142
  })
37139
37143
  }),
37140
- tipsVisible ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("pre", {
37144
+ tipsVisible ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("pre", {
37141
37145
  className: "c-rte-code-error-tips",
37142
37146
  children: syntaxError
37143
37147
  }) : null
37144
37148
  ]
37145
37149
  });
37146
37150
  }
37147
- var React4, import_react120, import_lexical5, import_code5, import_jsx_runtime138, PRETTIER_PARSER_MODULES, PRETTIER_OPTIONS_BY_LANG, LANG_CAN_BE_PRETTIER;
37151
+ var React4, import_react120, import_lexical5, import_code5, import_jsx_runtime140, PRETTIER_PARSER_MODULES, PRETTIER_OPTIONS_BY_LANG, LANG_CAN_BE_PRETTIER;
37148
37152
  var init_PrettierButton = __esm({
37149
37153
  "src/rich-text-editor/plugins/CodeActionMenuPlugin/components/PrettierButton/index.tsx"() {
37150
37154
  "use strict";
@@ -37153,7 +37157,7 @@ var init_PrettierButton = __esm({
37153
37157
  import_lexical5 = require("lexical");
37154
37158
  import_code5 = require("@lexical/code");
37155
37159
  init_i18n();
37156
- import_jsx_runtime138 = require("react/jsx-runtime");
37160
+ import_jsx_runtime140 = require("react/jsx-runtime");
37157
37161
  PRETTIER_PARSER_MODULES = {
37158
37162
  css: () => Promise.resolve().then(() => __toESM(require_parser_postcss())),
37159
37163
  html: () => Promise.resolve().then(() => __toESM(require_parser_html())),
@@ -37253,20 +37257,20 @@ function CodeActionMenuContainer({ anchorElem }) {
37253
37257
  });
37254
37258
  const normalizedLang = (0, import_code6.normalizeCodeLang)(lang);
37255
37259
  const codeFriendlyName = (0, import_code6.getLanguageFriendlyName)(lang);
37256
- return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(import_jsx_runtime139.Fragment, {
37257
- children: isShown ? /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", {
37260
+ return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_jsx_runtime141.Fragment, {
37261
+ children: isShown ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", {
37258
37262
  className: "c-rte-code-action-menu-container",
37259
37263
  style: { ...position },
37260
37264
  children: [
37261
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", {
37265
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37262
37266
  className: "c-rte-code-highlight-language",
37263
37267
  children: codeFriendlyName
37264
37268
  }),
37265
- /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(CopyButton, {
37269
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CopyButton, {
37266
37270
  editor,
37267
37271
  getCodeDOMNode
37268
37272
  }),
37269
- canBePrettier(normalizedLang) ? /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(PrettierButton, {
37273
+ canBePrettier(normalizedLang) ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(PrettierButton, {
37270
37274
  editor,
37271
37275
  getCodeDOMNode,
37272
37276
  lang: normalizedLang
@@ -37288,11 +37292,11 @@ function getMouseInfo(event) {
37288
37292
  function CodeActionMenuPlugin({
37289
37293
  anchorElem = document.body
37290
37294
  }) {
37291
- return (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(CodeActionMenuContainer, {
37295
+ return (0, import_react_dom2.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(CodeActionMenuContainer, {
37292
37296
  anchorElem
37293
37297
  }), anchorElem);
37294
37298
  }
37295
- var import_react121, import_lexical6, import_react_dom2, import_use_debounce2, import_code6, import_LexicalComposerContext, import_jsx_runtime139, CODE_PADDING;
37299
+ var import_react121, import_lexical6, import_react_dom2, import_use_debounce2, import_code6, import_LexicalComposerContext, import_jsx_runtime141, CODE_PADDING;
37296
37300
  var init_CodeActionMenuPlugin = __esm({
37297
37301
  "src/rich-text-editor/plugins/CodeActionMenuPlugin/index.tsx"() {
37298
37302
  "use strict";
@@ -37304,7 +37308,7 @@ var init_CodeActionMenuPlugin = __esm({
37304
37308
  import_LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
37305
37309
  init_CopyButton();
37306
37310
  init_PrettierButton();
37307
- import_jsx_runtime139 = require("react/jsx-runtime");
37311
+ import_jsx_runtime141 = require("react/jsx-runtime");
37308
37312
  CODE_PADDING = 0;
37309
37313
  }
37310
37314
  });
@@ -37382,26 +37386,26 @@ function LinkPreviewContent({
37382
37386
  if (!hasPreview) {
37383
37387
  return null;
37384
37388
  }
37385
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", {
37389
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", {
37386
37390
  className: "c-rte-link-preview",
37387
37391
  children: [
37388
- preview.google.image && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
37392
+ preview.google.image && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
37389
37393
  className: "c-rte-link-preview-image-wrapper",
37390
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("img", {
37394
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("img", {
37391
37395
  src: preview.google.image,
37392
37396
  alt: preview.google.title,
37393
37397
  className: "c-rte-link-preview-image"
37394
37398
  })
37395
37399
  }),
37396
- preview.google.title && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
37400
+ preview.google.title && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
37397
37401
  className: "c-rte-link-preview-title",
37398
37402
  children: preview.google.title
37399
37403
  }),
37400
- preview.google.description && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
37404
+ preview.google.description && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
37401
37405
  className: "c-rte-link-preview-description",
37402
37406
  children: preview.google.description
37403
37407
  }),
37404
- textContent && textContent !== preview.google.title ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Button, {
37408
+ textContent && textContent !== preview.google.title ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Button, {
37405
37409
  className: "c-rte-link-preview__replace-text-btn",
37406
37410
  onClick: useTitleForText,
37407
37411
  children: tr("linkPreviewReplaceTextWithTitle")
@@ -37410,7 +37414,7 @@ function LinkPreviewContent({
37410
37414
  });
37411
37415
  }
37412
37416
  function Glimmer(props) {
37413
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", {
37417
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", {
37414
37418
  className: "c-rte-link-preview-glimmer",
37415
37419
  ...props,
37416
37420
  style: {
@@ -37422,29 +37426,29 @@ function Glimmer(props) {
37422
37426
  function LinkPreview({
37423
37427
  url
37424
37428
  }) {
37425
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_react123.Suspense, {
37426
- fallback: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, {
37429
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react123.Suspense, {
37430
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, {
37427
37431
  children: [
37428
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Glimmer, {
37432
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Glimmer, {
37429
37433
  style: { height: "80px" },
37430
37434
  index: 0
37431
37435
  }),
37432
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Glimmer, {
37436
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Glimmer, {
37433
37437
  style: { width: "60%" },
37434
37438
  index: 1
37435
37439
  }),
37436
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Glimmer, {
37440
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Glimmer, {
37437
37441
  style: { width: "80%" },
37438
37442
  index: 2
37439
37443
  })
37440
37444
  ]
37441
37445
  }),
37442
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(LinkPreviewContent, {
37446
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(LinkPreviewContent, {
37443
37447
  url
37444
37448
  })
37445
37449
  });
37446
37450
  }
37447
- var import_react123, import_lexical7, import_LexicalComposerContext3, import_jsx_runtime140, PREVIEW_CACHE, URL_MATCHER2;
37451
+ var import_react123, import_lexical7, import_LexicalComposerContext3, import_jsx_runtime142, PREVIEW_CACHE, URL_MATCHER2;
37448
37452
  var init_LinkPreview = __esm({
37449
37453
  "src/rich-text-editor/ui/LinkPreview.tsx"() {
37450
37454
  "use strict";
@@ -37453,7 +37457,7 @@ var init_LinkPreview = __esm({
37453
37457
  import_LexicalComposerContext3 = require("@lexical/react/LexicalComposerContext");
37454
37458
  init_button2();
37455
37459
  init_i18n();
37456
- import_jsx_runtime140 = require("react/jsx-runtime");
37460
+ import_jsx_runtime142 = require("react/jsx-runtime");
37457
37461
  PREVIEW_CACHE = {};
37458
37462
  URL_MATCHER2 = /((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;
37459
37463
  }
@@ -37659,42 +37663,42 @@ function FloatingLinkEditor({
37659
37663
  inputRef.current.focus();
37660
37664
  }
37661
37665
  }, [isEditMode]);
37662
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37666
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37663
37667
  ref: editorRef,
37664
37668
  className: "c-rte-link-editor",
37665
37669
  "data-testid": "rich-text-link-editor",
37666
- children: isEditMode ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", {
37670
+ children: isEditMode ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", {
37667
37671
  children: [
37668
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37672
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37669
37673
  className: "c-rte-link-editor-input-group",
37670
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(InputWithLabel, {
37674
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(InputWithLabel, {
37671
37675
  label: tr("linkEditorLink"),
37672
37676
  type: "text",
37673
37677
  value: linkUrl,
37674
37678
  onChange: (e) => setLinkUrl(e.target.value)
37675
37679
  })
37676
37680
  }),
37677
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37681
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37678
37682
  className: "c-rte-link-editor-input-group",
37679
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(InputWithLabel, {
37683
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(InputWithLabel, {
37680
37684
  label: tr("linkEditorRel"),
37681
37685
  type: "text",
37682
37686
  value: rel ?? "",
37683
37687
  onChange: (e) => setRel(e.target.value)
37684
37688
  })
37685
37689
  }),
37686
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37690
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37687
37691
  className: "c-rte-link-editor-input-group",
37688
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(InputWithLabel, {
37692
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(InputWithLabel, {
37689
37693
  label: tr("linkEditorTarget"),
37690
37694
  type: "text",
37691
37695
  value: target ?? "",
37692
37696
  onChange: (e) => setTarget(e.target.value)
37693
37697
  })
37694
37698
  }),
37695
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37699
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37696
37700
  className: "c-rte-link-editor-button-wrap",
37697
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Button, {
37701
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Button, {
37698
37702
  "data-testid": "link-editor-save-button",
37699
37703
  onClick: () => {
37700
37704
  if (lastSelection !== null) {
@@ -37712,28 +37716,28 @@ function FloatingLinkEditor({
37712
37716
  })
37713
37717
  })
37714
37718
  ]
37715
- }) : /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(import_jsx_runtime141.Fragment, {
37719
+ }) : /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, {
37716
37720
  children: [
37717
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", {
37721
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", {
37718
37722
  className: "c-rte-link-editor-link-input",
37719
37723
  children: [
37720
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", {
37724
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", {
37721
37725
  className: "c-rte-link-editor-link-preview",
37722
37726
  children: [
37723
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("a", {
37727
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("a", {
37724
37728
  href: linkUrl,
37725
37729
  target: "_blank",
37726
37730
  rel: "noopener noreferrer",
37727
37731
  children: linkUrl
37728
37732
  }),
37729
- rel || target ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", {
37733
+ rel || target ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", {
37730
37734
  className: "c-rte-link-editor-preview-attrs",
37731
37735
  children: [
37732
- rel && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37736
+ rel && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37733
37737
  className: "c-rte-link-editor-preview-attr",
37734
37738
  children: rel
37735
37739
  }),
37736
- target && /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37740
+ target && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37737
37741
  className: "c-rte-link-editor-preview-attr",
37738
37742
  children: target
37739
37743
  })
@@ -37741,21 +37745,21 @@ function FloatingLinkEditor({
37741
37745
  }) : null
37742
37746
  ]
37743
37747
  }),
37744
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37745
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(IconButton, {
37748
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37749
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(IconButton, {
37746
37750
  size: "sm",
37747
37751
  tabIndex: 0,
37748
37752
  onMouseDown: (event) => event.preventDefault(),
37749
37753
  onClick: () => setEditMode(true),
37750
37754
  "aria-label": tr("linkEditorEdit"),
37751
37755
  "data-testid": "link-editor-edit",
37752
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Icon.Edit, {})
37756
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Icon.Edit, {})
37753
37757
  })
37754
37758
  })
37755
37759
  ]
37756
37760
  }),
37757
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("div", {
37758
- children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(LinkPreview, {
37761
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", {
37762
+ children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(LinkPreview, {
37759
37763
  url: linkUrl
37760
37764
  })
37761
37765
  })
@@ -37791,7 +37795,7 @@ function useFloatingLinkEditorToolbar(editor, anchorElem) {
37791
37795
  );
37792
37796
  }, [editor, updateToolbar]);
37793
37797
  return isLink ? (0, import_react_dom3.createPortal)(
37794
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(FloatingLinkEditor, {
37798
+ /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(FloatingLinkEditor, {
37795
37799
  editor: activeEditor,
37796
37800
  isLink,
37797
37801
  anchorElem,
@@ -37806,7 +37810,7 @@ function FloatingLinkEditorPlugin({
37806
37810
  const [editor] = (0, import_LexicalComposerContext4.useLexicalComposerContext)();
37807
37811
  return useFloatingLinkEditorToolbar(editor, anchorElem);
37808
37812
  }
37809
- var import_react124, React5, import_lexical8, import_react_dom3, import_link4, import_LexicalComposerContext4, import_utils, import_jsx_runtime141;
37813
+ var import_react124, React5, import_lexical8, import_react_dom3, import_link4, import_LexicalComposerContext4, import_utils, import_jsx_runtime143;
37810
37814
  var init_FloatingLinkEditorPlugin = __esm({
37811
37815
  "src/rich-text-editor/plugins/FloatingLinkEditorPlugin/index.tsx"() {
37812
37816
  "use strict";
@@ -37826,7 +37830,7 @@ var init_FloatingLinkEditorPlugin = __esm({
37826
37830
  init_getSelectedNode();
37827
37831
  init_setFloatingElemPosition();
37828
37832
  init_url();
37829
- import_jsx_runtime141 = require("react/jsx-runtime");
37833
+ import_jsx_runtime143 = require("react/jsx-runtime");
37830
37834
  }
37831
37835
  });
37832
37836
 
@@ -37953,93 +37957,93 @@ function TextFormatFloatingToolbar({
37953
37957
  );
37954
37958
  }, [editor, updateTextFormatFloatingToolbar]);
37955
37959
  if (!editor.isEditable()) {
37956
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", {});
37960
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", {});
37957
37961
  }
37958
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", {
37962
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", {
37959
37963
  ref: popupCharStylesEditorRef,
37960
37964
  className: "c-rte-floating-text-format-tb-plugin",
37961
37965
  children: [
37962
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
37966
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
37963
37967
  onClick: () => {
37964
37968
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "bold");
37965
37969
  },
37966
37970
  style: { padding: 0, overflow: "hidden" },
37967
37971
  title: tr(IS_APPLE ? "actionFormatAsStrongTitleApple" : "actionFormatAsStrongTitle"),
37968
37972
  "aria-label": tr("actionFormatAsStrongLabel"),
37969
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
37973
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
37970
37974
  className: `c-rte-icon-bold c-rte-floating-text-format-tb-plugin__format-icon ${isBold ? "selected" : ""}`
37971
37975
  })
37972
37976
  }),
37973
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
37977
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
37974
37978
  style: { padding: 0, overflow: "hidden" },
37975
37979
  onClick: () => {
37976
37980
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "italic");
37977
37981
  },
37978
37982
  title: tr("actionFormatAsEmphasizedTitle"),
37979
37983
  "aria-label": tr("actionFormatAsEmphasizedLabel"),
37980
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
37984
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
37981
37985
  className: `c-rte-icon-italic c-rte-floating-text-format-tb-plugin__format-icon ${isItalic ? "selected" : ""}`
37982
37986
  })
37983
37987
  }),
37984
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
37988
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
37985
37989
  style: { padding: 0, overflow: "hidden" },
37986
37990
  onClick: () => {
37987
37991
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "underline");
37988
37992
  },
37989
37993
  title: tr("actionFormatAsUnderlinedTitle"),
37990
37994
  "aria-label": tr("actionFormatAsUnderlinedLabel"),
37991
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
37995
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
37992
37996
  className: `c-rte-icon-underline c-rte-floating-text-format-tb-plugin__format-icon ${isUnderline ? "selected" : ""}`
37993
37997
  })
37994
37998
  }),
37995
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
37999
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
37996
38000
  style: { padding: 0, overflow: "hidden" },
37997
38001
  onClick: () => {
37998
38002
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "code");
37999
38003
  },
38000
38004
  "aria-label": tr("actionInsertCodeBlock"),
38001
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
38005
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
38002
38006
  className: `c-rte-icon-code c-rte-floating-text-format-tb-plugin__format-icon ${isCode ? "selected" : ""}`
38003
38007
  })
38004
38008
  }),
38005
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
38009
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
38006
38010
  style: { padding: 0, overflow: "hidden" },
38007
38011
  onClick: insertLink,
38008
38012
  "aria-label": tr("actionInsertlink"),
38009
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
38013
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
38010
38014
  className: `c-rte-icon-link c-rte-floating-text-format-tb-plugin__format-icon ${isLink ? "selected" : ""}`
38011
38015
  })
38012
38016
  }),
38013
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
38017
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
38014
38018
  style: { padding: 0, overflow: "hidden" },
38015
38019
  onClick: () => {
38016
38020
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "strikethrough");
38017
38021
  },
38018
38022
  title: tr("actionFormatWithStrikethroughTitle"),
38019
38023
  "aria-label": tr("actionFormatWithStrikethroughLabel"),
38020
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
38024
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
38021
38025
  className: `c-rte-icon-strikethrough c-rte-floating-text-format-tb-plugin__format-icon ${isStrikethrough ? "selected" : ""}`
38022
38026
  })
38023
38027
  }),
38024
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
38028
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
38025
38029
  style: { padding: 0, overflow: "hidden" },
38026
38030
  onClick: () => {
38027
38031
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "subscript");
38028
38032
  },
38029
38033
  title: tr("actionFormatWithSubscriptTitle"),
38030
38034
  "aria-label": tr("actionFormatWithSubscriptLabel"),
38031
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
38035
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
38032
38036
  className: `c-rte-icon-subscript c-rte-floating-text-format-tb-plugin__format-icon ${isSubscript ? "selected" : ""}`
38033
38037
  })
38034
38038
  }),
38035
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(IconButton, {
38039
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
38036
38040
  style: { padding: 0, overflow: "hidden" },
38037
38041
  onClick: () => {
38038
38042
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, "superscript");
38039
38043
  },
38040
38044
  title: tr("actionFormatWithSuperscriptTitle"),
38041
38045
  "aria-label": tr("actionFormatWithSuperscriptLabel"),
38042
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("i", {
38046
+ children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("i", {
38043
38047
  className: `c-rte-icon-superscript c-rte-floating-text-format-tb-plugin__format-icon ${isSuperscript ? "selected" : ""}`
38044
38048
  })
38045
38049
  })
@@ -38114,7 +38118,7 @@ function useFloatingTextFormatToolbar(editor, anchorElem) {
38114
38118
  return null;
38115
38119
  }
38116
38120
  return (0, import_react_dom4.createPortal)(
38117
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(TextFormatFloatingToolbar, {
38121
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(TextFormatFloatingToolbar, {
38118
38122
  editor,
38119
38123
  anchorElem,
38120
38124
  isLink,
@@ -38135,7 +38139,7 @@ function FloatingTextFormatToolbarPlugin({
38135
38139
  const [editor] = (0, import_LexicalComposerContext5.useLexicalComposerContext)();
38136
38140
  return useFloatingTextFormatToolbar(editor, anchorElem);
38137
38141
  }
38138
- var import_react125, React6, import_lexical9, import_react_dom4, import_code8, import_link5, import_LexicalComposerContext5, import_utils2, import_jsx_runtime142;
38142
+ var import_react125, React6, import_lexical9, import_react_dom4, import_code8, import_link5, import_LexicalComposerContext5, import_utils2, import_jsx_runtime144;
38139
38143
  var init_FloatingTextFormatToolbarPlugin = __esm({
38140
38144
  "src/rich-text-editor/plugins/FloatingTextFormatToolbarPlugin/index.tsx"() {
38141
38145
  "use strict";
@@ -38154,24 +38158,24 @@ var init_FloatingTextFormatToolbarPlugin = __esm({
38154
38158
  init_getDOMRangeRect();
38155
38159
  init_getSelectedNode();
38156
38160
  init_setFloatingElemPosition();
38157
- import_jsx_runtime142 = require("react/jsx-runtime");
38161
+ import_jsx_runtime144 = require("react/jsx-runtime");
38158
38162
  }
38159
38163
  });
38160
38164
 
38161
38165
  // src/rich-text-editor/plugins/LinkPlugin/index.tsx
38162
38166
  function LinkPlugin() {
38163
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(import_LexicalLinkPlugin.LinkPlugin, {
38167
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_LexicalLinkPlugin.LinkPlugin, {
38164
38168
  validateUrl
38165
38169
  });
38166
38170
  }
38167
- var React7, import_LexicalLinkPlugin, import_jsx_runtime143;
38171
+ var React7, import_LexicalLinkPlugin, import_jsx_runtime145;
38168
38172
  var init_LinkPlugin = __esm({
38169
38173
  "src/rich-text-editor/plugins/LinkPlugin/index.tsx"() {
38170
38174
  "use strict";
38171
38175
  React7 = require("react");
38172
38176
  import_LexicalLinkPlugin = require("@lexical/react/LexicalLinkPlugin");
38173
38177
  init_url();
38174
- import_jsx_runtime143 = require("react/jsx-runtime");
38178
+ import_jsx_runtime145 = require("react/jsx-runtime");
38175
38179
  }
38176
38180
  });
38177
38181
 
@@ -38512,46 +38516,46 @@ function TableActionMenu({ tableCellNode: _tableCellNode, tableStats }) {
38512
38516
  clearTableSelection();
38513
38517
  });
38514
38518
  }, [editor, tableCellNode, clearTableSelection]);
38515
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, {
38519
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, {
38516
38520
  children: [
38517
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38521
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38518
38522
  onSelect: () => insertTableRowAtSelection(false),
38519
38523
  children: tr("actionTableInsertRowsAbove", selectionCounts.rows)
38520
38524
  }),
38521
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38525
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38522
38526
  onSelect: () => insertTableRowAtSelection(true),
38523
38527
  children: tr("actionTableInsertRowsBelow", selectionCounts.rows)
38524
38528
  }),
38525
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38529
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38526
38530
  onSelect: () => insertTableColumnAtSelection(false),
38527
38531
  children: tr("actionTableInsertColumnsBefore", selectionCounts.columns)
38528
38532
  }),
38529
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38533
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38530
38534
  onSelect: () => insertTableColumnAtSelection(true),
38531
38535
  children: tr("actionTableInsertColumnsAfter", selectionCounts.columns)
38532
38536
  }),
38533
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38537
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38534
38538
  onSelect: () => toggleTableRowIsHeader(),
38535
38539
  children: tr(
38536
38540
  (tableCellNode.__headerState & import_table4.TableCellHeaderStates.ROW) === import_table4.TableCellHeaderStates.ROW ? "actionTableRemoveRowHeader" : "actionTableAddRowHeader"
38537
38541
  )
38538
38542
  }),
38539
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38543
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38540
38544
  onSelect: () => toggleTableColumnIsHeader(),
38541
38545
  children: tr(
38542
38546
  (tableCellNode.__headerState & import_table4.TableCellHeaderStates.COLUMN) === import_table4.TableCellHeaderStates.COLUMN ? "actionTableRemoveColumnHeader" : "actionTableAddColumnHeader"
38543
38547
  )
38544
38548
  }),
38545
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Separator, {}),
38546
- tableStats.columns > 1 && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38549
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Separator, {}),
38550
+ tableStats.columns > 1 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38547
38551
  onSelect: () => deleteTableColumnAtSelection(),
38548
38552
  children: tr("actionTableDeleteColumn")
38549
38553
  }),
38550
- tableStats.rows > 1 && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38554
+ tableStats.rows > 1 && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38551
38555
  onSelect: () => deleteTableRowAtSelection(),
38552
38556
  children: tr("actionTableDeleteRow")
38553
38557
  }),
38554
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Item, {
38558
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Item, {
38555
38559
  onSelect: () => deleteTableAtSelection(),
38556
38560
  children: tr("actionTableDeleteTable")
38557
38561
  })
@@ -38633,19 +38637,19 @@ function TableCellActionMenuContainer({ anchorElem }) {
38633
38637
  }
38634
38638
  }
38635
38639
  }, [menuButtonRef, tableCellNode, editor, anchorElem]);
38636
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", {
38640
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", {
38637
38641
  className: "c-rte-table-cell-action-button-container",
38638
38642
  ref: menuButtonRef,
38639
- children: tableCellNode != null && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenu.Root, {
38643
+ children: tableCellNode != null && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(DropdownMenu.Root, {
38640
38644
  onOpenChange: (isOpen) => setIsMenuOpen(isOpen),
38641
- content: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(TableActionMenu, {
38645
+ content: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TableActionMenu, {
38642
38646
  tableCellNode,
38643
38647
  tableStats
38644
38648
  }),
38645
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(IconButton, {
38649
+ children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(IconButton, {
38646
38650
  size: "xs",
38647
38651
  "aria-label": tr("actionTableOpenOptions"),
38648
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Icon.Arrow, {})
38652
+ children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Icon.Arrow, {})
38649
38653
  })
38650
38654
  })
38651
38655
  });
@@ -38654,11 +38658,11 @@ function TableActionMenuPlugin({
38654
38658
  anchorElem = document.body
38655
38659
  }) {
38656
38660
  const isEditable = (0, import_useLexicalEditable.default)();
38657
- return (0, import_react_dom5.createPortal)(isEditable ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(TableCellActionMenuContainer, {
38661
+ return (0, import_react_dom5.createPortal)(isEditable ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(TableCellActionMenuContainer, {
38658
38662
  anchorElem
38659
38663
  }) : null, anchorElem);
38660
38664
  }
38661
- var import_react129, import_lexical13, import_react_dom5, import_LexicalComposerContext9, import_useLexicalEditable, import_table4, import_jsx_runtime144;
38665
+ var import_react129, import_lexical13, import_react_dom5, import_LexicalComposerContext9, import_useLexicalEditable, import_table4, import_jsx_runtime146;
38662
38666
  var init_TableActionMenuPlugin = __esm({
38663
38667
  "src/rich-text-editor/plugins/TableActionMenuPlugin/index.tsx"() {
38664
38668
  "use strict";
@@ -38672,7 +38676,7 @@ var init_TableActionMenuPlugin = __esm({
38672
38676
  init_icon_button2();
38673
38677
  init_iconography();
38674
38678
  init_i18n();
38675
- import_jsx_runtime144 = require("react/jsx-runtime");
38679
+ import_jsx_runtime146 = require("react/jsx-runtime");
38676
38680
  }
38677
38681
  });
38678
38682
 
@@ -38688,19 +38692,19 @@ async function copyJson(editor) {
38688
38692
  function ActionsPlugin({ append, prepend, disabled }) {
38689
38693
  const [editor] = (0, import_LexicalComposerContext10.useLexicalComposerContext)();
38690
38694
  const tr = useTr();
38691
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(ActionMenu, {
38695
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(ActionMenu, {
38692
38696
  children: [
38693
- !prepend ? null : prepend.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ActionMenu.Item, {
38697
+ !prepend ? null : prepend.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ActionMenu.Item, {
38694
38698
  onSelect: actionItem.action,
38695
38699
  className: actionItem.type === "danger" ? "danger" : "",
38696
38700
  disabled: actionItem.disabled,
38697
38701
  children: actionItem.title
38698
38702
  }, actionItem.title)),
38699
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ActionMenu.Item, {
38703
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ActionMenu.Item, {
38700
38704
  onSelect: () => copyJson(editor),
38701
38705
  children: tr("actionCopyJSON")
38702
38706
  }),
38703
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ActionMenu.Item, {
38707
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ActionMenu.Item, {
38704
38708
  disabled,
38705
38709
  className: "danger",
38706
38710
  onSelect: () => {
@@ -38709,7 +38713,7 @@ function ActionsPlugin({ append, prepend, disabled }) {
38709
38713
  },
38710
38714
  children: tr("actionClear")
38711
38715
  }),
38712
- !append ? null : append.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(ActionMenu.Item, {
38716
+ !append ? null : append.map((actionItem) => /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ActionMenu.Item, {
38713
38717
  onSelect: actionItem.action,
38714
38718
  className: actionItem.type === "danger" ? "danger" : "",
38715
38719
  disabled: actionItem.disabled,
@@ -38718,7 +38722,7 @@ function ActionsPlugin({ append, prepend, disabled }) {
38718
38722
  ]
38719
38723
  });
38720
38724
  }
38721
- var import_lexical14, import_LexicalComposerContext10, import_jsx_runtime145;
38725
+ var import_lexical14, import_LexicalComposerContext10, import_jsx_runtime147;
38722
38726
  var init_ActionsPlugin = __esm({
38723
38727
  "src/rich-text-editor/plugins/ActionsPlugin/index.tsx"() {
38724
38728
  "use strict";
@@ -38727,7 +38731,7 @@ var init_ActionsPlugin = __esm({
38727
38731
  init_action_menu2();
38728
38732
  init_i18n();
38729
38733
  init_lexical_to_crystallize();
38730
- import_jsx_runtime145 = require("react/jsx-runtime");
38734
+ import_jsx_runtime147 = require("react/jsx-runtime");
38731
38735
  }
38732
38736
  });
38733
38737
 
@@ -38749,13 +38753,13 @@ function InsertTableDialog({ activeEditor }) {
38749
38753
  }
38750
38754
  });
38751
38755
  };
38752
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", {
38756
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", {
38753
38757
  className: "c-rte-insert-table",
38754
38758
  children: [
38755
- /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", {
38759
+ /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", {
38756
38760
  className: "c-rte-insert-table__dimensions",
38757
38761
  children: [
38758
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(InputWithLabel, {
38762
+ /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(InputWithLabel, {
38759
38763
  label: tr("insertTableRows"),
38760
38764
  value: rows,
38761
38765
  placeholder: "0",
@@ -38763,10 +38767,10 @@ function InsertTableDialog({ activeEditor }) {
38763
38767
  inputMode: "numeric",
38764
38768
  onChange: (e) => setRows(e.target.value)
38765
38769
  }),
38766
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", {
38770
+ /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", {
38767
38771
  className: "c-rte-insert-table__dimensions__separator"
38768
38772
  }),
38769
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(InputWithLabel, {
38773
+ /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(InputWithLabel, {
38770
38774
  type: "text",
38771
38775
  label: tr("insertTableColumns"),
38772
38776
  placeholder: "0",
@@ -38776,9 +38780,9 @@ function InsertTableDialog({ activeEditor }) {
38776
38780
  })
38777
38781
  ]
38778
38782
  }),
38779
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", {
38783
+ /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", {
38780
38784
  className: "c-rte-insert-table__actions",
38781
- children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(Button, {
38785
+ children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(Button, {
38782
38786
  as: Dialog.Close,
38783
38787
  size: "sm",
38784
38788
  intent: "action",
@@ -38790,7 +38794,7 @@ function InsertTableDialog({ activeEditor }) {
38790
38794
  ]
38791
38795
  });
38792
38796
  }
38793
- var import_react130, import_table5, import_jsx_runtime146;
38797
+ var import_react130, import_table5, import_jsx_runtime148;
38794
38798
  var init_insert_table = __esm({
38795
38799
  "src/rich-text-editor/plugins/ToolbarPlugin/insert-table.tsx"() {
38796
38800
  "use strict";
@@ -38800,7 +38804,7 @@ var init_insert_table = __esm({
38800
38804
  init_dialog2();
38801
38805
  init_input_with_label2();
38802
38806
  init_i18n();
38803
- import_jsx_runtime146 = require("react/jsx-runtime");
38807
+ import_jsx_runtime148 = require("react/jsx-runtime");
38804
38808
  }
38805
38809
  });
38806
38810
 
@@ -38889,80 +38893,80 @@ function BlockFormatDropDown({
38889
38893
  });
38890
38894
  }
38891
38895
  };
38892
- return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DropdownMenu.Root, {
38896
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DropdownMenu.Root, {
38893
38897
  disabled,
38894
38898
  style: { zIndex: 1 },
38895
- content: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, {
38899
+ content: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_jsx_runtime149.Fragment, {
38896
38900
  children: [
38897
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
38901
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
38898
38902
  onClick: formatParagraph,
38899
38903
  children: [
38900
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
38904
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
38901
38905
  className: `c-rte-icon-paragraph c-rte-toolbar__block-format__icon ${blockType === "paragraph" ? "selected" : ""}`
38902
38906
  }),
38903
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
38907
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
38904
38908
  className: `c-rte-toolbar__block-format__text ${blockType === "paragraph" ? "selected" : ""}`,
38905
38909
  children: "Normal"
38906
38910
  })
38907
38911
  ]
38908
38912
  }),
38909
- headings.map((headingSize) => /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
38913
+ headings.map((headingSize) => /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
38910
38914
  onClick: () => formatHeading(headingSize),
38911
38915
  children: [
38912
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
38916
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
38913
38917
  className: `c-rte-icon-${headingSize} c-rte-toolbar__block-format__icon ${blockType === headingSize ? "selected" : ""}`
38914
38918
  }),
38915
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
38919
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
38916
38920
  className: `c-rte-toolbar__block-format__text ${blockType === headingSize ? "selected" : ""}`,
38917
38921
  children: headingTypeToBlockName[headingSize]
38918
38922
  })
38919
38923
  ]
38920
38924
  }, headingSize)),
38921
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
38925
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
38922
38926
  onClick: formatBulletList,
38923
38927
  children: [
38924
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
38928
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
38925
38929
  className: `c-rte-icon-bullet-list c-rte-toolbar__block-format__icon ${blockType === "bullet" ? "selected" : ""}`
38926
38930
  }),
38927
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
38931
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
38928
38932
  className: `c-rte-toolbar__block-format__text ${blockType === "bullet" ? "selected" : ""}`,
38929
38933
  children: "Bullet List"
38930
38934
  })
38931
38935
  ]
38932
38936
  }),
38933
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
38937
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
38934
38938
  onClick: formatNumberedList,
38935
38939
  children: [
38936
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
38940
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
38937
38941
  className: `c-rte-icon-numbered-list c-rte-toolbar__block-format__icon ${blockType === "number" ? "selected" : ""}`
38938
38942
  }),
38939
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
38943
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
38940
38944
  className: `c-rte-toolbar__block-format__text ${blockType === "number" ? "selected" : ""}`,
38941
38945
  children: "Numbered List"
38942
38946
  })
38943
38947
  ]
38944
38948
  }),
38945
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
38949
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
38946
38950
  onClick: formatQuote,
38947
38951
  "data-testid": "toggle-block-format-quote",
38948
38952
  children: [
38949
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
38953
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
38950
38954
  className: `c-rte-icon-quote c-rte-toolbar__block-format__icon ${blockType === "quote" ? "selected" : ""}`
38951
38955
  }),
38952
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
38956
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
38953
38957
  className: `c-rte-toolbar__block-format__text ${blockType === "quote" ? "selected" : ""}`,
38954
38958
  children: "Quote"
38955
38959
  })
38956
38960
  ]
38957
38961
  }),
38958
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
38962
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
38959
38963
  onClick: formatCode,
38960
38964
  "data-testid": "toggle-block-format-code",
38961
38965
  children: [
38962
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
38966
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
38963
38967
  className: `icon c-rte-icon-code c-rte-toolbar__block-format__icon ${blockType === "code" ? "selected" : ""}`
38964
38968
  }),
38965
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
38969
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
38966
38970
  className: `c-rte-toolbar__block-format__text ${blockType === "code" ? "selected" : ""}`,
38967
38971
  children: "Code block"
38968
38972
  })
@@ -38970,21 +38974,21 @@ function BlockFormatDropDown({
38970
38974
  })
38971
38975
  ]
38972
38976
  }),
38973
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(Button, {
38977
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(Button, {
38974
38978
  style: { backgroundColor: "transparent", padding: "0 8px" },
38975
38979
  "aria-label": "Formatting options for text style",
38976
38980
  "data-testid": "toggle-block-format",
38977
38981
  children: [
38978
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
38982
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
38979
38983
  className: `c-rte-toolbar__toggle-icon c-rte-icon-${blockType}`
38980
38984
  }),
38981
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Icon.Arrow, {})
38985
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Icon.Arrow, {})
38982
38986
  ]
38983
38987
  })
38984
38988
  });
38985
38989
  }
38986
38990
  function Divider() {
38987
- return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", {
38991
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("div", {
38988
38992
  className: "c-rte-toolbar__divider"
38989
38993
  });
38990
38994
  }
@@ -39134,13 +39138,13 @@ function ToolbarPlugin({
39134
39138
  },
39135
39139
  [activeEditor, selectedElementKey]
39136
39140
  );
39137
- return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", {
39141
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", {
39138
39142
  className: "c-rte-toolbar",
39139
39143
  children: [
39140
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", {
39144
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", {
39141
39145
  className: "c-rte-toolbar__inner",
39142
39146
  children: [
39143
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39147
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39144
39148
  disabled: !canUndo || !isEditable,
39145
39149
  onClick: () => {
39146
39150
  activeEditor.dispatchCommand(import_lexical15.UNDO_COMMAND, void 0);
@@ -39149,12 +39153,12 @@ function ToolbarPlugin({
39149
39153
  title: tr(IS_APPLE ? "actionUndoTitleApple" : "actionUndoTitle"),
39150
39154
  "aria-label": tr("actionUndoLabel"),
39151
39155
  "data-testid": "rich-text-undo-button",
39152
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39156
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39153
39157
  className: `c-rte-icon-undo c-rte-toolbar__icon ${!canUndo ? "disabled" : ""}
39154
39158
  `
39155
39159
  })
39156
39160
  }),
39157
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39161
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39158
39162
  disabled: !canRedo || !isEditable,
39159
39163
  onClick: () => {
39160
39164
  activeEditor.dispatchCommand(import_lexical15.REDO_COMMAND, void 0);
@@ -39162,51 +39166,51 @@ function ToolbarPlugin({
39162
39166
  type: "button",
39163
39167
  title: tr(IS_APPLE ? "actionRedoTitleApple" : "actionRedoTitle"),
39164
39168
  "aria-label": tr("actionRedoLabel"),
39165
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39169
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39166
39170
  className: `c-rte-icon-redo c-rte-toolbar__icon ${!canRedo ? "disabled" : ""}`
39167
39171
  })
39168
39172
  }),
39169
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Divider, {}),
39170
- blockType in blockTypeToBlockName && activeEditor === editor && /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, {
39173
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Divider, {}),
39174
+ blockType in blockTypeToBlockName && activeEditor === editor && /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_jsx_runtime149.Fragment, {
39171
39175
  children: [
39172
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(BlockFormatDropDown, {
39176
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(BlockFormatDropDown, {
39173
39177
  disabled: !isEditable,
39174
39178
  blockType,
39175
39179
  editor
39176
39180
  }),
39177
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Divider, {})
39181
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Divider, {})
39178
39182
  ]
39179
39183
  }),
39180
- blockType === "code" ? /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {
39181
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DropdownMenu.Root, {
39184
+ blockType === "code" ? /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_jsx_runtime149.Fragment, {
39185
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DropdownMenu.Root, {
39182
39186
  disabled: !isEditable,
39183
39187
  style: { zIndex: 1 },
39184
- content: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(import_jsx_runtime147.Fragment, {
39188
+ content: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_jsx_runtime149.Fragment, {
39185
39189
  children: CODE_LANGUAGE_OPTIONS.map(([value, name]) => {
39186
- return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DropdownMenu.Item, {
39190
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DropdownMenu.Item, {
39187
39191
  className: `item ${dropDownActiveClass(value === codeLanguage)}`,
39188
39192
  onClick: () => onCodeLanguageSelect(value),
39189
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39193
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39190
39194
  className: `c-rte-toolbar__code-lang__sel-item ${dropDownActiveClass(value === codeLanguage) ? "selected" : ""}`,
39191
39195
  children: name
39192
39196
  })
39193
39197
  }, value);
39194
39198
  })
39195
39199
  }),
39196
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Button, {
39200
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Button, {
39197
39201
  "aria-label": tr("codeSelectLanguage"),
39198
- append: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Icon.Arrow, {}),
39199
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39202
+ append: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Icon.Arrow, {}),
39203
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39200
39204
  className: "c-rte-toolbar__code-lang__button-text",
39201
39205
  children: (0, import_code9.getLanguageFriendlyName)(codeLanguage)
39202
39206
  })
39203
39207
  })
39204
39208
  })
39205
- }) : /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Dialog, {
39206
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", {
39209
+ }) : /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Dialog, {
39210
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", {
39207
39211
  className: "c-rte-toolbar__actions-rest",
39208
39212
  children: [
39209
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39213
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39210
39214
  disabled: !isEditable,
39211
39215
  className: `c-rte-toolbar__icon-btn ${isBold ? "selected" : ""}`,
39212
39216
  type: "button",
@@ -39216,11 +39220,11 @@ function ToolbarPlugin({
39216
39220
  onClick: () => {
39217
39221
  activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "bold");
39218
39222
  },
39219
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39223
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39220
39224
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-bold`
39221
39225
  })
39222
39226
  }),
39223
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39227
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39224
39228
  className: `c-rte-toolbar__icon-btn ${isItalic ? "selected" : ""}`,
39225
39229
  disabled: !isEditable,
39226
39230
  onClick: () => {
@@ -39230,11 +39234,11 @@ function ToolbarPlugin({
39230
39234
  title: tr(IS_APPLE ? "actionFormatAsEmphasizedTitleApple" : "actionFormatAsEmphasizedTitle"),
39231
39235
  "aria-label": tr("actionFormatAsEmphasizedLabel"),
39232
39236
  "data-testid": "toggle-format-emphasized",
39233
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39237
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39234
39238
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-italic`
39235
39239
  })
39236
39240
  }),
39237
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39241
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39238
39242
  className: `c-rte-toolbar__icon-btn ${isUnderline ? "selected" : ""}`,
39239
39243
  disabled: !isEditable,
39240
39244
  onClick: () => {
@@ -39244,11 +39248,11 @@ function ToolbarPlugin({
39244
39248
  title: tr(IS_APPLE ? "actionFormatAsUnderlinedTitleApple" : "actionFormatAsUnderlinedTitle"),
39245
39249
  "aria-label": tr("actionFormatAsUnderlinedLabel"),
39246
39250
  "data-testid": "toggle-format-underlined",
39247
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39251
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39248
39252
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-underline`
39249
39253
  })
39250
39254
  }),
39251
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39255
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39252
39256
  className: `c-rte-toolbar__icon-btn ${isCode ? "selected" : ""}`,
39253
39257
  disabled: !isEditable,
39254
39258
  onClick: () => {
@@ -39258,82 +39262,82 @@ function ToolbarPlugin({
39258
39262
  title: tr("actionInsertCodeBlock"),
39259
39263
  "aria-label": tr("actionInsertCodeBlock"),
39260
39264
  "data-testid": "toggle-format-code",
39261
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39265
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39262
39266
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-code`
39263
39267
  })
39264
39268
  }),
39265
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39269
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39266
39270
  className: `c-rte-toolbar__icon-btn ${isLink ? "selected" : ""}`,
39267
39271
  disabled: !isEditable,
39268
39272
  onClick: insertLink,
39269
39273
  type: "button",
39270
39274
  "aria-label": tr("actionInsertlink"),
39271
39275
  title: tr("actionInsertlink"),
39272
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39276
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39273
39277
  className: `c-rte-toolbar__icon-btn__icon c-rte-icon-link`
39274
39278
  })
39275
39279
  }),
39276
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DropdownMenu.Root, {
39280
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DropdownMenu.Root, {
39277
39281
  disabled: !isEditable,
39278
39282
  style: { zIndex: 1 },
39279
- content: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, {
39283
+ content: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_jsx_runtime149.Fragment, {
39280
39284
  children: [
39281
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
39285
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
39282
39286
  disabled: !isEditable,
39283
39287
  onClick: () => activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "strikethrough"),
39284
39288
  title: tr("actionFormatWithStrikethroughTitle"),
39285
39289
  "aria-label": tr("actionFormatWithStrikethroughLabel"),
39286
39290
  children: [
39287
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39291
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39288
39292
  className: `c-rte-icon-strikethrough c-rte-toolbar__dd-item__icon ${isStrikethrough ? "selected" : ""}`
39289
39293
  }),
39290
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39294
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39291
39295
  className: `c-rte-toolbar__dd-item__text ${isStrikethrough ? "selected" : ""}`,
39292
39296
  children: tr("actionFormatWithStrikethroughTitle")
39293
39297
  })
39294
39298
  ]
39295
39299
  }),
39296
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
39300
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
39297
39301
  disabled: !isEditable,
39298
39302
  onClick: () => activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "subscript"),
39299
39303
  title: tr("actionFormatWithSubscriptTitle"),
39300
39304
  "aria-label": tr("actionFormatWithSubscriptLabel"),
39301
39305
  children: [
39302
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39306
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39303
39307
  className: `c-rte-icon-subscript c-rte-toolbar__dd-item__icon ${isSubscript ? "selected" : ""}`
39304
39308
  }),
39305
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39309
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39306
39310
  className: `c-rte-toolbar__dd-item__text ${isSubscript ? "selected" : ""}`,
39307
39311
  children: tr("actionFormatWithSubscriptTitle")
39308
39312
  })
39309
39313
  ]
39310
39314
  }),
39311
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
39315
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
39312
39316
  disabled: !isEditable,
39313
39317
  onClick: () => activeEditor.dispatchCommand(import_lexical15.FORMAT_TEXT_COMMAND, "superscript"),
39314
39318
  title: tr("actionFormatWithSuperscriptTitle"),
39315
39319
  "aria-label": tr("actionFormatWithSuperscriptLabel"),
39316
39320
  children: [
39317
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39321
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39318
39322
  className: `c-rte-icon-superscript c-rte-toolbar__dd-item__icon ${isSuperscript ? "selected" : ""}`
39319
39323
  }),
39320
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39324
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39321
39325
  className: `c-rte-toolbar__dd-item__text ${isSuperscript ? "selected" : ""}`,
39322
39326
  children: tr("actionFormatWithSuperscriptTitle")
39323
39327
  })
39324
39328
  ]
39325
39329
  }),
39326
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
39330
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
39327
39331
  disabled: !isEditable,
39328
39332
  onClick: clearFormatting,
39329
39333
  className: "item",
39330
39334
  title: tr("actionClearTextFormatting"),
39331
39335
  "aria-label": tr("actionClearTextFormatting"),
39332
39336
  children: [
39333
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39337
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39334
39338
  className: "c-rte-icon-clear c-rte-toolbar__dd-item__icon"
39335
39339
  }),
39336
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39340
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39337
39341
  className: "c-rte-toolbar__dd-item__text--clear",
39338
39342
  children: tr("actionFormatClear")
39339
39343
  })
@@ -39341,47 +39345,47 @@ function ToolbarPlugin({
39341
39345
  })
39342
39346
  ]
39343
39347
  }),
39344
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(Button, {
39348
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(Button, {
39345
39349
  style: { backgroundColor: "transparent", padding: "0 8px" },
39346
39350
  "aria-label": tr("actionTextFormattingOptions"),
39347
39351
  children: [
39348
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39352
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39349
39353
  className: `c-rte-icon-dropdown-more c-rte-toolbar__toggle-icon`
39350
39354
  }),
39351
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Icon.Arrow, {})
39355
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Icon.Arrow, {})
39352
39356
  ]
39353
39357
  })
39354
39358
  }),
39355
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Divider, {}),
39356
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DropdownMenu.Root, {
39359
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Divider, {}),
39360
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DropdownMenu.Root, {
39357
39361
  style: { zIndex: 1 },
39358
39362
  disabled: !isEditable,
39359
- content: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(import_jsx_runtime147.Fragment, {
39363
+ content: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(import_jsx_runtime149.Fragment, {
39360
39364
  children: [
39361
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(DropdownMenu.Item, {
39365
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(DropdownMenu.Item, {
39362
39366
  onClick: () => {
39363
39367
  activeEditor.dispatchCommand(import_LexicalHorizontalRuleNode4.INSERT_HORIZONTAL_RULE_COMMAND, void 0);
39364
39368
  },
39365
39369
  children: [
39366
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39370
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39367
39371
  className: "c-rte-toolbar__dd-item__icon c-rte-icon-horizontal-rule"
39368
39372
  }),
39369
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39373
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39370
39374
  className: "c-rte-toolbar__dd-item__text",
39371
39375
  children: tr("horizontalRule")
39372
39376
  })
39373
39377
  ]
39374
39378
  }),
39375
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DropdownMenu.Item, {
39376
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Dialog.Trigger, {
39379
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DropdownMenu.Item, {
39380
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Dialog.Trigger, {
39377
39381
  asChild: true,
39378
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", {
39382
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("div", {
39379
39383
  className: "c-rte-toolbar__dd-item--table",
39380
39384
  children: [
39381
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39385
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39382
39386
  className: "c-rte-toolbar__dd-item__icon c-rte-icon-table"
39383
39387
  }),
39384
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", {
39388
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", {
39385
39389
  className: "c-rte-toolbar__dd-item__text",
39386
39390
  children: tr("table")
39387
39391
  })
@@ -39391,21 +39395,21 @@ function ToolbarPlugin({
39391
39395
  })
39392
39396
  ]
39393
39397
  }),
39394
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(IconButton, {
39395
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("i", {
39398
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(IconButton, {
39399
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("i", {
39396
39400
  className: "c-rte-icon-plus c-rte-toolbar__plus"
39397
39401
  })
39398
39402
  })
39399
39403
  }),
39400
- /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(Dialog.Content, {
39404
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(Dialog.Content, {
39401
39405
  children: [
39402
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Dialog.Title, {
39406
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Dialog.Title, {
39403
39407
  children: tr("insertTableTitle")
39404
39408
  }),
39405
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(Dialog.Description, {
39409
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(Dialog.Description, {
39406
39410
  children: tr("insertTableDescription")
39407
39411
  }),
39408
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(InsertTableDialog, {
39412
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(InsertTableDialog, {
39409
39413
  activeEditor
39410
39414
  })
39411
39415
  ]
@@ -39415,7 +39419,7 @@ function ToolbarPlugin({
39415
39419
  })
39416
39420
  ]
39417
39421
  }),
39418
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(ActionsPlugin, {
39422
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(ActionsPlugin, {
39419
39423
  disabled,
39420
39424
  prepend: actionsMenuPrepend,
39421
39425
  append: actionsMenuAppend
@@ -39423,7 +39427,7 @@ function ToolbarPlugin({
39423
39427
  ]
39424
39428
  });
39425
39429
  }
39426
- var import_react131, import_lexical15, import_code9, import_link6, import_list5, import_LexicalComposerContext11, import_LexicalDecoratorBlockNode, import_LexicalHorizontalRuleNode4, import_rich_text5, import_selection4, import_utils4, import_jsx_runtime147, headingTypeToBlockName, headings, blockTypeToBlockName, CODE_LANGUAGE_OPTIONS;
39430
+ var import_react131, import_lexical15, import_code9, import_link6, import_list5, import_LexicalComposerContext11, import_LexicalDecoratorBlockNode, import_LexicalHorizontalRuleNode4, import_rich_text5, import_selection4, import_utils4, import_jsx_runtime149, headingTypeToBlockName, headings, blockTypeToBlockName, CODE_LANGUAGE_OPTIONS;
39427
39431
  var init_ToolbarPlugin = __esm({
39428
39432
  "src/rich-text-editor/plugins/ToolbarPlugin/index.tsx"() {
39429
39433
  "use strict";
@@ -39449,7 +39453,7 @@ var init_ToolbarPlugin = __esm({
39449
39453
  init_url();
39450
39454
  init_ActionsPlugin();
39451
39455
  init_insert_table();
39452
- import_jsx_runtime147 = require("react/jsx-runtime");
39456
+ import_jsx_runtime149 = require("react/jsx-runtime");
39453
39457
  headingTypeToBlockName = {
39454
39458
  h1: "Heading 1",
39455
39459
  h2: "Heading 2",
@@ -39599,7 +39603,7 @@ function RichTextEditor({
39599
39603
  labelTranslations,
39600
39604
  ...rest
39601
39605
  }) {
39602
- return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalComposer.LexicalComposer, {
39606
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalComposer.LexicalComposer, {
39603
39607
  initialConfig: {
39604
39608
  editable: !rest.disabled,
39605
39609
  namespace: "crystallize-rich-text-editor",
@@ -39610,13 +39614,13 @@ function RichTextEditor({
39610
39614
  throw error;
39611
39615
  }
39612
39616
  },
39613
- children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(I18nProvider, {
39617
+ children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(I18nProvider, {
39614
39618
  language,
39615
39619
  labelTranslations,
39616
- children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(SharedHistoryContext, {
39617
- children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", {
39620
+ children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(SharedHistoryContext, {
39621
+ children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
39618
39622
  className: "c-rich-text-editor",
39619
- children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(RichTextEditorWithoutContext, {
39623
+ children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(RichTextEditorWithoutContext, {
39620
39624
  ...rest
39621
39625
  })
39622
39626
  })
@@ -39638,7 +39642,7 @@ function RichTextEditorWithoutContext({
39638
39642
  }) {
39639
39643
  const editable = !disabled;
39640
39644
  const { historyState } = useSharedHistoryContext();
39641
- const placeholder = /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", {
39645
+ const placeholder = /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
39642
39646
  className: "c-rte-placeholder",
39643
39647
  children: placeholderText ?? ""
39644
39648
  });
@@ -39661,38 +39665,38 @@ function RichTextEditorWithoutContext({
39661
39665
  }
39662
39666
  firstOnChangeTriggeredRef.current = true;
39663
39667
  }
39664
- return /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(import_jsx_runtime148.Fragment, {
39668
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_jsx_runtime150.Fragment, {
39665
39669
  children: [
39666
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalOnChangePlugin.OnChangePlugin, {
39670
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalOnChangePlugin.OnChangePlugin, {
39667
39671
  onChange: onLocalChange,
39668
39672
  ignoreSelectionChange: true
39669
39673
  }),
39670
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ToolbarPlugin, {
39674
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(ToolbarPlugin, {
39671
39675
  disabled,
39672
39676
  actionsMenuPrepend,
39673
39677
  actionsMenuAppend
39674
39678
  }),
39675
39679
  slotPreContent,
39676
- /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", {
39680
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", {
39677
39681
  className: `c-rte-editor-container ${disabled ? "disabled" : ""}`,
39678
39682
  "data-testid": "rich-text-editor",
39679
39683
  children: [
39680
- maxLength != null ? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(MaxLengthPlugin, {
39684
+ maxLength != null ? /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(MaxLengthPlugin, {
39681
39685
  maxLength
39682
39686
  }) : null,
39683
- !autoFocus ? null : /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalAutoFocusPlugin.AutoFocusPlugin, {}),
39684
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalClearEditorPlugin.ClearEditorPlugin, {}),
39685
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(LexicalAutoLinkPlugin, {}),
39686
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalHistoryPlugin2.HistoryPlugin, {
39687
+ !autoFocus ? null : /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalAutoFocusPlugin.AutoFocusPlugin, {}),
39688
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalClearEditorPlugin.ClearEditorPlugin, {}),
39689
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(LexicalAutoLinkPlugin, {}),
39690
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalHistoryPlugin2.HistoryPlugin, {
39687
39691
  externalHistoryState: historyState
39688
39692
  }),
39689
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalRichTextPlugin.RichTextPlugin, {
39690
- contentEditable: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", {
39693
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalRichTextPlugin.RichTextPlugin, {
39694
+ contentEditable: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
39691
39695
  className: "c-rte-editor-scroller",
39692
- children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", {
39696
+ children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
39693
39697
  className: "c-rte-editor",
39694
39698
  ref: onRef,
39695
- children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalContentEditable.ContentEditable, {
39699
+ children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalContentEditable.ContentEditable, {
39696
39700
  className: "c-rte-contenteditable-root",
39697
39701
  id
39698
39702
  })
@@ -39701,28 +39705,28 @@ function RichTextEditorWithoutContext({
39701
39705
  placeholder,
39702
39706
  ErrorBoundary: import_LexicalErrorBoundary.default
39703
39707
  }),
39704
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(CodeHighlightPlugin, {}),
39705
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalListPlugin.ListPlugin, {}),
39706
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(ListMaxIndentLevelPlugin, {
39708
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(CodeHighlightPlugin, {}),
39709
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalListPlugin.ListPlugin, {}),
39710
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(ListMaxIndentLevelPlugin, {
39707
39711
  maxDepth: 7
39708
39712
  }),
39709
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalTablePlugin.TablePlugin, {}),
39710
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(LinkPlugin, {}),
39711
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalHorizontalRulePlugin.HorizontalRulePlugin, {}),
39712
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(TabFocusPlugin, {}),
39713
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {}),
39714
- floatingAnchorElem && /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(import_jsx_runtime148.Fragment, {
39713
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalTablePlugin.TablePlugin, {}),
39714
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(LinkPlugin, {}),
39715
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalHorizontalRulePlugin.HorizontalRulePlugin, {}),
39716
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(TabFocusPlugin, {}),
39717
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {}),
39718
+ floatingAnchorElem && /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_jsx_runtime150.Fragment, {
39715
39719
  children: [
39716
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(CodeActionMenuPlugin, {
39720
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(CodeActionMenuPlugin, {
39717
39721
  anchorElem: floatingAnchorElem
39718
39722
  }),
39719
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(FloatingLinkEditorPlugin, {
39723
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(FloatingLinkEditorPlugin, {
39720
39724
  anchorElem: floatingAnchorElem
39721
39725
  }),
39722
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(TableActionMenuPlugin, {
39726
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(TableActionMenuPlugin, {
39723
39727
  anchorElem: floatingAnchorElem
39724
39728
  }),
39725
- /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(FloatingTextFormatToolbarPlugin, {
39729
+ /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(FloatingTextFormatToolbarPlugin, {
39726
39730
  anchorElem: floatingAnchorElem
39727
39731
  })
39728
39732
  ]
@@ -39732,7 +39736,7 @@ function RichTextEditorWithoutContext({
39732
39736
  ]
39733
39737
  });
39734
39738
  }
39735
- var import_react132, import_LexicalAutoFocusPlugin, import_LexicalClearEditorPlugin, import_LexicalComposer, import_LexicalErrorBoundary, import_LexicalHistoryPlugin2, import_LexicalHorizontalRulePlugin, import_LexicalListPlugin, import_LexicalOnChangePlugin, import_LexicalRichTextPlugin, import_LexicalTabIndentationPlugin, import_LexicalTablePlugin, import_LexicalComposerContext12, import_LexicalContentEditable, import_jsx_runtime148, rich_text_editor_default;
39739
+ var import_react132, import_LexicalAutoFocusPlugin, import_LexicalClearEditorPlugin, import_LexicalComposer, import_LexicalErrorBoundary, import_LexicalHistoryPlugin2, import_LexicalHorizontalRulePlugin, import_LexicalListPlugin, import_LexicalOnChangePlugin, import_LexicalRichTextPlugin, import_LexicalTabIndentationPlugin, import_LexicalTablePlugin, import_LexicalComposerContext12, import_LexicalContentEditable, import_jsx_runtime150, rich_text_editor_default;
39736
39740
  var init_rich_text_editor = __esm({
39737
39741
  "src/rich-text-editor/rich-text-editor.tsx"() {
39738
39742
  "use strict";
@@ -39769,7 +39773,7 @@ var init_rich_text_editor = __esm({
39769
39773
  init_TableActionMenuPlugin();
39770
39774
  init_ToolbarPlugin();
39771
39775
  init_CrystallizeRTEditorTheme();
39772
- import_jsx_runtime148 = require("react/jsx-runtime");
39776
+ import_jsx_runtime150 = require("react/jsx-runtime");
39773
39777
  rich_text_editor_default = RichTextEditor;
39774
39778
  }
39775
39779
  });
@@ -39792,6 +39796,7 @@ __export(src_exports, {
39792
39796
  Input: () => Input,
39793
39797
  InputWithLabel: () => InputWithLabel,
39794
39798
  Label: () => Label2,
39799
+ Popover: () => Popover,
39795
39800
  Progress: () => Progress,
39796
39801
  Radio: () => Radio,
39797
39802
  RichTextEditor: () => RichTextEditor2,
@@ -40005,15 +40010,80 @@ init_input_with_label2();
40005
40010
  init_input2();
40006
40011
  init_label2();
40007
40012
 
40008
- // src/progress/progress.tsx
40013
+ // src/popover/popover.tsx
40009
40014
  var import_class_variance_authority17 = require("class-variance-authority");
40010
- var ProgressPrimitives = __toESM(require("@radix-ui/react-progress"));
40015
+ var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
40016
+
40017
+ // src/popover/popover-close.tsx
40018
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
40019
+ init_iconography();
40011
40020
  var import_jsx_runtime127 = require("react/jsx-runtime");
40021
+ function PopoverClose(props) {
40022
+ const { asChild, children } = props;
40023
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(PopoverPrimitive.Close, {
40024
+ asChild,
40025
+ className: "c-popover-close",
40026
+ children: children ?? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon.Cancel, {
40027
+ width: 16,
40028
+ height: 16
40029
+ })
40030
+ });
40031
+ }
40032
+
40033
+ // src/popover/popover.tsx
40034
+ var import_jsx_runtime128 = require("react/jsx-runtime");
40035
+ function Popover({
40036
+ children,
40037
+ closeButton,
40038
+ content,
40039
+ side,
40040
+ open,
40041
+ onOpenChange,
40042
+ className,
40043
+ container,
40044
+ hasArrow = true,
40045
+ ...delegatedContent
40046
+ }) {
40047
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(PopoverPrimitive2.Root, {
40048
+ open,
40049
+ onOpenChange,
40050
+ children: [
40051
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(PopoverPrimitive2.Trigger, {
40052
+ asChild: true,
40053
+ children
40054
+ }),
40055
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(PopoverPrimitive2.Portal, {
40056
+ container,
40057
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(PopoverPrimitive2.Content, {
40058
+ ...delegatedContent,
40059
+ side,
40060
+ className: (0, import_class_variance_authority17.cx)("c-popover-content", className),
40061
+ children: [
40062
+ !closeButton ? null : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(PopoverClose, {
40063
+ asChild: typeof closeButton !== "boolean",
40064
+ children: typeof closeButton !== "boolean" ? closeButton : null
40065
+ }),
40066
+ hasArrow && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(PopoverPrimitive2.Arrow, {
40067
+ className: "c-popover-arrow",
40068
+ offset: 5
40069
+ }),
40070
+ content
40071
+ ]
40072
+ })
40073
+ })
40074
+ ]
40075
+ });
40076
+ }
40077
+
40078
+ // src/progress/progress.tsx
40079
+ var import_class_variance_authority18 = require("class-variance-authority");
40080
+ var ProgressPrimitives = __toESM(require("@radix-ui/react-progress"));
40081
+ var import_jsx_runtime129 = require("react/jsx-runtime");
40012
40082
  function Progress({ className, value }) {
40013
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ProgressPrimitives.Root, {
40014
- className: (0, import_class_variance_authority17.cx)(className, "c-progress-root"),
40083
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ProgressPrimitives.Root, {
40084
+ className: (0, import_class_variance_authority18.cx)(className, "c-progress-root"),
40015
40085
  value,
40016
- children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ProgressPrimitives.Indicator, {
40086
+ children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ProgressPrimitives.Indicator, {
40017
40087
  className: "c-progress-indicator",
40018
40088
  style: { transform: `translateX(-${100 - (value ?? 0)}%)` }
40019
40089
  })
@@ -40022,12 +40092,12 @@ function Progress({ className, value }) {
40022
40092
 
40023
40093
  // src/radio/radio.tsx
40024
40094
  var RadioGroupPrimitive2 = __toESM(require("@radix-ui/react-radio-group"));
40025
- var import_jsx_runtime128 = require("react/jsx-runtime");
40095
+ var import_jsx_runtime130 = require("react/jsx-runtime");
40026
40096
  function RadioGroupItem(props) {
40027
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(RadioGroupPrimitive2.Item, {
40097
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RadioGroupPrimitive2.Item, {
40028
40098
  ...props,
40029
40099
  className: "c-radio-item",
40030
- children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(RadioGroupPrimitive2.Indicator, {
40100
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RadioGroupPrimitive2.Indicator, {
40031
40101
  className: "c-radio-indicator"
40032
40102
  })
40033
40103
  });
@@ -40039,20 +40109,20 @@ var Radio = {
40039
40109
 
40040
40110
  // src/select/select-item.tsx
40041
40111
  var import_react114 = require("react");
40042
- var import_class_variance_authority18 = require("class-variance-authority");
40112
+ var import_class_variance_authority19 = require("class-variance-authority");
40043
40113
  var SelectPrimitives = __toESM(require("@radix-ui/react-select"));
40044
- var import_jsx_runtime129 = require("react/jsx-runtime");
40114
+ var import_jsx_runtime131 = require("react/jsx-runtime");
40045
40115
  var SelectItem = (0, import_react114.forwardRef)((props, ref) => {
40046
40116
  const { children, className, ...delegated } = props;
40047
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(SelectPrimitives.Item, {
40048
- className: (0, import_class_variance_authority18.cx)("c-select-item", className),
40117
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(SelectPrimitives.Item, {
40118
+ className: (0, import_class_variance_authority19.cx)("c-select-item", className),
40049
40119
  ref,
40050
40120
  ...delegated,
40051
40121
  children: [
40052
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SelectPrimitives.ItemText, {
40122
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SelectPrimitives.ItemText, {
40053
40123
  children
40054
40124
  }),
40055
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(SelectPrimitives.ItemIndicator, {})
40125
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SelectPrimitives.ItemIndicator, {})
40056
40126
  ]
40057
40127
  });
40058
40128
  });
@@ -40060,11 +40130,11 @@ SelectItem.displayName = "SelectItem";
40060
40130
 
40061
40131
  // src/select/select-root.tsx
40062
40132
  var import_react115 = require("react");
40063
- var import_class_variance_authority19 = require("class-variance-authority");
40133
+ var import_class_variance_authority20 = require("class-variance-authority");
40064
40134
  var SelectPrimitives2 = __toESM(require("@radix-ui/react-select"));
40065
40135
  init_iconography();
40066
- var import_jsx_runtime130 = require("react/jsx-runtime");
40067
- var selectTriggerStyles = (0, import_class_variance_authority19.cva)("c-select-trigger", {
40136
+ var import_jsx_runtime132 = require("react/jsx-runtime");
40137
+ var selectTriggerStyles = (0, import_class_variance_authority20.cva)("c-select-trigger", {
40068
40138
  variants: {
40069
40139
  size: {
40070
40140
  xs: "c-select-trigger-xs",
@@ -40079,34 +40149,34 @@ var selectTriggerStyles = (0, import_class_variance_authority19.cva)("c-select-t
40079
40149
  });
40080
40150
  var SelectContainer = (0, import_react115.forwardRef)(
40081
40151
  ({ children, id, placeholder, disabled, size, triggerClassName, ...delegated }, ref) => {
40082
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(SelectPrimitives2.Root, {
40152
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(SelectPrimitives2.Root, {
40083
40153
  ...delegated,
40084
40154
  children: [
40085
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(SelectPrimitives2.Trigger, {
40155
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(SelectPrimitives2.Trigger, {
40086
40156
  ref,
40087
40157
  className: selectTriggerStyles({ size, className: triggerClassName }),
40088
40158
  disabled,
40089
40159
  id,
40090
40160
  children: [
40091
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SelectPrimitives2.Value, {
40092
- placeholder: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", {
40161
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SelectPrimitives2.Value, {
40162
+ placeholder: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", {
40093
40163
  className: "c-select-value",
40094
40164
  children: placeholder ?? "Select..."
40095
40165
  })
40096
40166
  }),
40097
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon.Arrow, {})
40167
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon.Arrow, {})
40098
40168
  ]
40099
40169
  }),
40100
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SelectPrimitives2.Portal, {
40101
- children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(SelectPrimitives2.Content, {
40170
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SelectPrimitives2.Portal, {
40171
+ children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(SelectPrimitives2.Content, {
40102
40172
  className: "c-select-content",
40103
40173
  children: [
40104
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SelectPrimitives2.ScrollUpButton, {}),
40105
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SelectPrimitives2.Viewport, {
40174
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SelectPrimitives2.ScrollUpButton, {}),
40175
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SelectPrimitives2.Viewport, {
40106
40176
  className: "c-select-viewport",
40107
40177
  children
40108
40178
  }),
40109
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(SelectPrimitives2.ScrollDownButton, {})
40179
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SelectPrimitives2.ScrollDownButton, {})
40110
40180
  ]
40111
40181
  })
40112
40182
  })
@@ -40124,22 +40194,22 @@ var Select = {
40124
40194
 
40125
40195
  // src/slider/slider.tsx
40126
40196
  var import_react116 = require("react");
40127
- var import_class_variance_authority20 = require("class-variance-authority");
40197
+ var import_class_variance_authority21 = require("class-variance-authority");
40128
40198
  var SliderPrimitive = __toESM(require("@radix-ui/react-slider"));
40129
- var import_jsx_runtime131 = require("react/jsx-runtime");
40199
+ var import_jsx_runtime133 = require("react/jsx-runtime");
40130
40200
  var Slider = (0, import_react116.forwardRef)(({ className, transparentRange, ...delegated }, ref) => {
40131
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(SliderPrimitive.Root, {
40132
- className: (0, import_class_variance_authority20.cx)("c-slider-root", className),
40201
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(SliderPrimitive.Root, {
40202
+ className: (0, import_class_variance_authority21.cx)("c-slider-root", className),
40133
40203
  ref,
40134
40204
  ...delegated,
40135
40205
  children: [
40136
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SliderPrimitive.Track, {
40206
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SliderPrimitive.Track, {
40137
40207
  className: "c-slider-track",
40138
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SliderPrimitive.Range, {
40208
+ children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SliderPrimitive.Range, {
40139
40209
  className: `c-slider-range ${transparentRange ? "c-slider-range-transparent" : ""}`
40140
40210
  })
40141
40211
  }),
40142
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SliderPrimitive.Thumb, {
40212
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SliderPrimitive.Thumb, {
40143
40213
  className: "c-slider-thumb"
40144
40214
  })
40145
40215
  ]
@@ -40151,15 +40221,15 @@ init_spinner();
40151
40221
 
40152
40222
  // src/stack-icon/stack-icon.tsx
40153
40223
  init_iconography();
40154
- var import_jsx_runtime132 = require("react/jsx-runtime");
40224
+ var import_jsx_runtime134 = require("react/jsx-runtime");
40155
40225
  function StackIcon({ type, children, size = 18 }) {
40156
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("span", {
40226
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("span", {
40157
40227
  className: "c-stack-icon",
40158
40228
  children: [
40159
- type === "create" && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", {
40229
+ type === "create" && /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", {
40160
40230
  style: { width: size, height: size },
40161
40231
  className: "c-stack-icon__icon",
40162
- children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon.Add, {
40232
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Icon.Add, {
40163
40233
  width: size - 4,
40164
40234
  height: size - 4
40165
40235
  })
@@ -40170,10 +40240,10 @@ function StackIcon({ type, children, size = 18 }) {
40170
40240
  }
40171
40241
 
40172
40242
  // src/tag/tag.tsx
40173
- var import_class_variance_authority21 = require("class-variance-authority");
40243
+ var import_class_variance_authority22 = require("class-variance-authority");
40174
40244
  init_iconography();
40175
- var import_jsx_runtime133 = require("react/jsx-runtime");
40176
- var tagStyles = (0, import_class_variance_authority21.cva)("c-tag", {
40245
+ var import_jsx_runtime135 = require("react/jsx-runtime");
40246
+ var tagStyles = (0, import_class_variance_authority22.cva)("c-tag", {
40177
40247
  variants: {
40178
40248
  variant: {
40179
40249
  default: "c-tag-default",
@@ -40202,28 +40272,28 @@ function Tag({
40202
40272
  showRemoveOnHover,
40203
40273
  ...delegated
40204
40274
  }) {
40205
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", {
40275
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", {
40206
40276
  className: tagStyles({ className, variant, size }),
40207
40277
  ...delegated,
40208
40278
  children: [
40209
- !prepend ? null : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", {
40279
+ !prepend ? null : /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", {
40210
40280
  className: "c-tag__prepend",
40211
40281
  children: prepend
40212
40282
  }),
40213
40283
  children,
40214
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("button", {
40284
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("button", {
40215
40285
  type: "button",
40216
- className: (0, import_class_variance_authority21.cx)("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
40286
+ className: (0, import_class_variance_authority22.cx)("c-tag__remove-button", showRemoveOnHover ? "c-tag__remove-button--hover" : ""),
40217
40287
  onClick: (e) => {
40218
40288
  e.stopPropagation();
40219
40289
  onRemove();
40220
40290
  },
40221
40291
  children: [
40222
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon.Cancel, {
40292
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon.Cancel, {
40223
40293
  width: 12,
40224
40294
  height: 12
40225
40295
  }),
40226
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", {
40296
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", {
40227
40297
  className: "c-tag__remove-button-text",
40228
40298
  children: "Remove"
40229
40299
  })
@@ -40235,12 +40305,12 @@ function Tag({
40235
40305
 
40236
40306
  // src/rich-text-editor/index.tsx
40237
40307
  var import_react133 = require("react");
40238
- var import_jsx_runtime149 = require("react/jsx-runtime");
40308
+ var import_jsx_runtime151 = require("react/jsx-runtime");
40239
40309
  var LazyRichTextEditor = (0, import_react133.lazy)(() => Promise.resolve().then(() => (init_rich_text_editor(), rich_text_editor_exports)));
40240
40310
  var RichTextEditor2 = (props) => {
40241
- return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(import_react133.Suspense, {
40311
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_react133.Suspense, {
40242
40312
  fallback: null,
40243
- children: /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(LazyRichTextEditor, {
40313
+ children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(LazyRichTextEditor, {
40244
40314
  ...props
40245
40315
  })
40246
40316
  });
@@ -40250,12 +40320,12 @@ var RichTextEditor2 = (props) => {
40250
40320
  var import_sonner2 = require("sonner");
40251
40321
 
40252
40322
  // src/toast/toast.tsx
40253
- var import_class_variance_authority22 = require("class-variance-authority");
40323
+ var import_class_variance_authority23 = require("class-variance-authority");
40254
40324
  var import_sonner = require("sonner");
40255
40325
  init_icon_button2();
40256
40326
  init_iconography();
40257
- var import_jsx_runtime150 = require("react/jsx-runtime");
40258
- var toastStyles = (0, import_class_variance_authority22.cva)("c-toast", {
40327
+ var import_jsx_runtime152 = require("react/jsx-runtime");
40328
+ var toastStyles = (0, import_class_variance_authority23.cva)("c-toast", {
40259
40329
  variants: {
40260
40330
  type: {
40261
40331
  info: "c-toast-info",
@@ -40279,34 +40349,34 @@ var toast = ({ title, message, type = "success", timeout = 6e3 }) => {
40279
40349
  const withMessage = !!message;
40280
40350
  const toastId = Date.now().toString();
40281
40351
  import_sonner.toast.custom(
40282
- (id) => /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", {
40352
+ (id) => /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", {
40283
40353
  "data-testid": `toast-${type}`,
40284
- className: (0, import_class_variance_authority22.cx)(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
40354
+ className: (0, import_class_variance_authority23.cx)(toastStyles({ type }), withMessage ? "c-toast-with-message" : "c-toast-title-only"),
40285
40355
  children: [
40286
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
40287
- children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(ToastIcon, {
40356
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", {
40357
+ children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(ToastIcon, {
40288
40358
  width: 26,
40289
40359
  height: 26
40290
40360
  })
40291
40361
  }),
40292
- /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)("div", {
40362
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("div", {
40293
40363
  children: [
40294
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
40364
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", {
40295
40365
  className: "c-toast-title",
40296
40366
  children: title
40297
40367
  }),
40298
- !!message && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
40368
+ !!message && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", {
40299
40369
  className: "c-toast-message",
40300
40370
  children: message
40301
40371
  })
40302
40372
  ]
40303
40373
  }),
40304
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", {
40374
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", {
40305
40375
  className: "c-toast-close",
40306
- children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(IconButton, {
40376
+ children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(IconButton, {
40307
40377
  onClick: () => import_sonner.toast.dismiss(id),
40308
40378
  size: "xs",
40309
- children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Icon.Cancel, {
40379
+ children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(Icon.Cancel, {
40310
40380
  width: 12,
40311
40381
  height: 12
40312
40382
  })
@@ -40328,10 +40398,10 @@ toast.dismiss = import_sonner.toast.dismiss;
40328
40398
  init_tooltip2();
40329
40399
 
40330
40400
  // src/switch/switch.tsx
40331
- var import_class_variance_authority23 = require("class-variance-authority");
40401
+ var import_class_variance_authority24 = require("class-variance-authority");
40332
40402
  var RadixSwitch = __toESM(require("@radix-ui/react-switch"));
40333
- var import_jsx_runtime151 = require("react/jsx-runtime");
40334
- var switchStyles = (0, import_class_variance_authority23.cva)(["c-switch-root"], {
40403
+ var import_jsx_runtime153 = require("react/jsx-runtime");
40404
+ var switchStyles = (0, import_class_variance_authority24.cva)(["c-switch-root"], {
40335
40405
  variants: {
40336
40406
  size: {
40337
40407
  xs: "c-switch-root-xs",
@@ -40343,12 +40413,12 @@ var switchStyles = (0, import_class_variance_authority23.cva)(["c-switch-root"],
40343
40413
  }
40344
40414
  });
40345
40415
  function Switch2({ size, checked, ...props }) {
40346
- return /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(RadixSwitch.Root, {
40416
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(RadixSwitch.Root, {
40347
40417
  ...props,
40348
40418
  checked,
40349
40419
  className: switchStyles({ size }),
40350
- children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(RadixSwitch.Thumb, {
40351
- className: (0, import_class_variance_authority23.cx)("c-switch-thumb", checked === null ? "middle-position" : "")
40420
+ children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(RadixSwitch.Thumb, {
40421
+ className: (0, import_class_variance_authority24.cx)("c-switch-thumb", checked === null ? "middle-position" : "")
40352
40422
  })
40353
40423
  });
40354
40424
  }
@@ -40376,6 +40446,7 @@ var tokens = {
40376
40446
  Input,
40377
40447
  InputWithLabel,
40378
40448
  Label,
40449
+ Popover,
40379
40450
  Progress,
40380
40451
  Radio,
40381
40452
  RichTextEditor,