@devalok/shilp-sutra 0.27.2 → 0.29.0

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.
Files changed (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -9678,7 +9678,7 @@ function Ha(n) {
9678
9678
  ...s,
9679
9679
  ...d
9680
9680
  };
9681
- typeof (f == null ? void 0 : f.default) == "function" && (f.default = f.default()), f != null && f.isRequired && (f == null ? void 0 : f.default) === void 0 && delete f.default, e.push({
9681
+ typeof f?.default == "function" && (f.default = f.default()), f?.isRequired && f?.default === void 0 && delete f.default, e.push({
9682
9682
  type: o.name,
9683
9683
  name: u,
9684
9684
  attribute: f
@@ -9790,7 +9790,7 @@ function Rf(n, e) {
9790
9790
  isolating: L(O(c, "isolating", d)),
9791
9791
  attrs: Object.fromEntries(u.map((y) => {
9792
9792
  var C;
9793
- return [y.name, { default: (C = y == null ? void 0 : y.attribute) === null || C === void 0 ? void 0 : C.default }];
9793
+ return [y.name, { default: (C = y?.attribute) === null || C === void 0 ? void 0 : C.default }];
9794
9794
  }))
9795
9795
  }), p = L(O(c, "parseHTML", d));
9796
9796
  p && (h.parseDOM = p.map((y) => Io(y, u)));
@@ -9822,7 +9822,7 @@ function Rf(n, e) {
9822
9822
  code: L(O(c, "code", d)),
9823
9823
  attrs: Object.fromEntries(u.map((g) => {
9824
9824
  var y;
9825
- return [g.name, { default: (y = g == null ? void 0 : g.attribute) === null || y === void 0 ? void 0 : y.default }];
9825
+ return [g.name, { default: (y = g?.attribute) === null || y === void 0 ? void 0 : y.default }];
9826
9826
  }))
9827
9827
  }), p = L(O(c, "parseHTML", d));
9828
9828
  p && (h.parseDOM = p.map((g) => Io(g, u)));
@@ -9934,7 +9934,7 @@ function Pf(n) {
9934
9934
  if (l)
9935
9935
  return l;
9936
9936
  const a = i.getMeta("applyInputRules");
9937
- return !!a && setTimeout(() => {
9937
+ return a && setTimeout(() => {
9938
9938
  let { text: u } = a;
9939
9939
  typeof u == "string" ? u = u : u = ms(b.from(u), o.schema);
9940
9940
  const { from: d } = a, f = d + u.length;
@@ -10045,9 +10045,9 @@ class we {
10045
10045
  const { tr: r } = e.state, i = e.state.selection.$from;
10046
10046
  if (i.pos === i.end()) {
10047
10047
  const o = i.marks();
10048
- if (!!!o.find((c) => (c == null ? void 0 : c.type.name) === t.name))
10048
+ if (!!!o.find((c) => c?.type.name === t.name))
10049
10049
  return !1;
10050
- const a = o.find((c) => (c == null ? void 0 : c.type.name) === t.name);
10050
+ const a = o.find((c) => c?.type.name === t.name);
10051
10051
  return a && r.removeStoredMark(a), r.insertText(" ", i.pos), e.view.dispatch(r), !0;
10052
10052
  }
10053
10053
  return !1;
@@ -10157,7 +10157,7 @@ function _f(n) {
10157
10157
  drop: (d, f) => {
10158
10158
  if (s = r === d.dom.parentElement, l = f, !s) {
10159
10159
  const h = On;
10160
- h != null && h.isEditable && setTimeout(() => {
10160
+ h?.isEditable && setTimeout(() => {
10161
10161
  const p = h.state.selection;
10162
10162
  p && h.commands.deleteRange({ from: p.from, to: p.to });
10163
10163
  }, 10);
@@ -10167,7 +10167,7 @@ function _f(n) {
10167
10167
  paste: (d, f) => {
10168
10168
  var h;
10169
10169
  const p = (h = f.clipboardData) === null || h === void 0 ? void 0 : h.getData("text/html");
10170
- return o = f, i = !!(p != null && p.includes("data-pm-slice")), !1;
10170
+ return o = f, i = !!p?.includes("data-pm-slice"), !1;
10171
10171
  }
10172
10172
  }
10173
10173
  },
@@ -10410,7 +10410,7 @@ function Va(n, e, t) {
10410
10410
  return n.nodesBetween(r, i, (a, c, u, d) => {
10411
10411
  var f;
10412
10412
  a.isBlock && c > r && (l += s);
10413
- const h = o == null ? void 0 : o[a.type.name];
10413
+ const h = o?.[a.type.name];
10414
10414
  if (h)
10415
10415
  return u && (l += h({
10416
10416
  node: a,
@@ -10419,7 +10419,7 @@ function Va(n, e, t) {
10419
10419
  index: d,
10420
10420
  range: e
10421
10421
  })), !1;
10422
- a.isText && (l += (f = a == null ? void 0 : a.text) === null || f === void 0 ? void 0 : f.slice(Math.max(r, c) - c, i - c));
10422
+ a.isText && (l += (f = a?.text) === null || f === void 0 ? void 0 : f.slice(Math.max(r, c) - c, i - c));
10423
10423
  }), l;
10424
10424
  }
10425
10425
  function _a(n) {
@@ -10450,7 +10450,7 @@ const Wf = ne.create({
10450
10450
  }
10451
10451
  }), Kf = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
10452
10452
  var t;
10453
- n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) === null || t === void 0 || t.removeAllRanges());
10453
+ n.isDestroyed || (e.dom.blur(), (t = window?.getSelection()) === null || t === void 0 || t.removeAllRanges());
10454
10454
  }), !0), Uf = (n = !1) => ({ commands: e }) => e.setContent("", n), qf = () => ({ state: n, tr: e, dispatch: t }) => {
10455
10455
  const { selection: r } = e, { ranges: i } = r;
10456
10456
  return t && i.forEach(({ $from: s, $to: o }) => {
@@ -10796,7 +10796,7 @@ const xh = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
10796
10796
  }), a = e.captureTransaction(() => {
10797
10797
  t.someProp("handleKeyDown", (c) => c(t, l));
10798
10798
  });
10799
- return a == null || a.steps.forEach((c) => {
10799
+ return a?.steps.forEach((c) => {
10800
10800
  const u = c.map(r.mapping);
10801
10801
  u && i && r.maybeStep(u);
10802
10802
  }), !0;
@@ -10984,7 +10984,7 @@ function ks(n, e, t) {
10984
10984
  ...o
10985
10985
  });
10986
10986
  }) : t.nodesBetween(n, e, (i, s) => {
10987
- !i || (i == null ? void 0 : i.nodeSize) === void 0 || r.push(...i.marks.map((o) => ({
10987
+ !i || i?.nodeSize === void 0 || r.push(...i.marks.map((o) => ({
10988
10988
  from: s,
10989
10989
  to: s + i.nodeSize,
10990
10990
  mark: o
@@ -11130,7 +11130,7 @@ const qh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11130
11130
  function Ho(n, e) {
11131
11131
  const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
11132
11132
  if (t) {
11133
- const r = t.filter((i) => e == null ? void 0 : e.includes(i.type.name));
11133
+ const r = t.filter((i) => e?.includes(i.type.name));
11134
11134
  n.tr.ensureMarks(r);
11135
11135
  }
11136
11136
  }
@@ -11223,7 +11223,7 @@ const Zh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11223
11223
  if (r === void 0)
11224
11224
  return !0;
11225
11225
  const i = n.doc.nodeAt(r);
11226
- return t.node.type === (i == null ? void 0 : i.type) && it(n.doc, t.pos) && n.join(t.pos), !0;
11226
+ return t.node.type === i?.type && it(n.doc, t.pos) && n.join(t.pos), !0;
11227
11227
  }, oi = (n, e) => {
11228
11228
  const t = bs((o) => o.type === e)(n.selection);
11229
11229
  if (!t)
@@ -11232,7 +11232,7 @@ const Zh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11232
11232
  if (r === void 0)
11233
11233
  return !0;
11234
11234
  const i = n.doc.nodeAt(r);
11235
- return t.node.type === (i == null ? void 0 : i.type) && it(n.doc, r) && n.join(r), !0;
11235
+ return t.node.type === i?.type && it(n.doc, r) && n.join(r), !0;
11236
11236
  }, tp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
11237
11237
  const { extensions: d, splittableMarks: f } = i.extensionManager, h = G(n, o.schema), p = G(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: C } = m, k = y.blockRange(C), x = g || m.$to.parentOffset && m.$from.marks();
11238
11238
  if (!k)
@@ -11917,7 +11917,7 @@ class Cp extends Af {
11917
11917
  kp,
11918
11918
  hp,
11919
11919
  bp
11920
- ].filter((s) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[s.name] !== !1 : !0) : [], ...this.options.extensions].filter((s) => ["extension", "node", "mark"].includes(s == null ? void 0 : s.type));
11920
+ ].filter((s) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[s.name] !== !1 : !0) : [], ...this.options.extensions].filter((s) => ["extension", "node", "mark"].includes(s?.type));
11921
11921
  this.extensionManager = new Rt(i, this);
11922
11922
  }
11923
11923
  /**
@@ -12366,15 +12366,6 @@ function Tp(n) {
12366
12366
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
12367
12367
  }
12368
12368
  var Hi = { exports: {} }, li = {};
12369
- /**
12370
- * @license React
12371
- * use-sync-external-store-shim.production.min.js
12372
- *
12373
- * Copyright (c) Facebook, Inc. and its affiliates.
12374
- *
12375
- * This source code is licensed under the MIT license found in the
12376
- * LICENSE file in the root directory of this source tree.
12377
- */
12378
12369
  var $o;
12379
12370
  function Op() {
12380
12371
  if ($o) return li;
@@ -12411,18 +12402,9 @@ function Op() {
12411
12402
  return li.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, li;
12412
12403
  }
12413
12404
  var ai = {};
12414
- /**
12415
- * @license React
12416
- * use-sync-external-store-shim.development.js
12417
- *
12418
- * Copyright (c) Facebook, Inc. and its affiliates.
12419
- *
12420
- * This source code is licensed under the MIT license found in the
12421
- * LICENSE file in the root directory of this source tree.
12422
- */
12423
12405
  var Vo;
12424
12406
  function vp() {
12425
- return Vo || (Vo = 1, process.env.NODE_ENV !== "production" && function() {
12407
+ return Vo || (Vo = 1, process.env.NODE_ENV !== "production" && (function() {
12426
12408
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
12427
12409
  var n = W, e = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
12428
12410
  function t(k) {
@@ -12489,7 +12471,7 @@ function vp() {
12489
12471
  }
12490
12472
  var m = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", g = !m, y = g ? p : f, C = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : y;
12491
12473
  ai.useSyncExternalStore = C, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
12492
- }()), ai;
12474
+ })()), ai;
12493
12475
  }
12494
12476
  process.env.NODE_ENV === "production" ? Hi.exports = Op() : Hi.exports = vp();
12495
12477
  var Hr = Hi.exports;
@@ -12582,7 +12564,7 @@ class Rp extends W.Component {
12582
12564
  W.Fragment,
12583
12565
  null,
12584
12566
  W.createElement("div", { ref: Ap(t, this.editorContentRef), ...r }),
12585
- (e == null ? void 0 : e.contentComponent) && W.createElement(Np, { contentComponent: e.contentComponent })
12567
+ e?.contentComponent && W.createElement(Np, { contentComponent: e.contentComponent })
12586
12568
  );
12587
12569
  }
12588
12570
  }
@@ -12640,15 +12622,6 @@ var Lp = function n(e, t) {
12640
12622
  }
12641
12623
  return e !== e && t !== t;
12642
12624
  }, Pp = /* @__PURE__ */ Tp(Lp), $i = { exports: {} }, ci = {};
12643
- /**
12644
- * @license React
12645
- * use-sync-external-store-shim/with-selector.production.min.js
12646
- *
12647
- * Copyright (c) Facebook, Inc. and its affiliates.
12648
- *
12649
- * This source code is licensed under the MIT license found in the
12650
- * LICENSE file in the root directory of this source tree.
12651
- */
12652
12625
  var _o;
12653
12626
  function Bp() {
12654
12627
  if (_o) return ci;
@@ -12691,18 +12664,9 @@ function Bp() {
12691
12664
  }, ci;
12692
12665
  }
12693
12666
  var ui = {};
12694
- /**
12695
- * @license React
12696
- * use-sync-external-store-shim/with-selector.development.js
12697
- *
12698
- * Copyright (c) Facebook, Inc. and its affiliates.
12699
- *
12700
- * This source code is licensed under the MIT license found in the
12701
- * LICENSE file in the root directory of this source tree.
12702
- */
12703
12667
  var jo;
12704
12668
  function zp() {
12705
- return jo || (jo = 1, process.env.NODE_ENV !== "production" && function() {
12669
+ return jo || (jo = 1, process.env.NODE_ENV !== "production" && (function() {
12706
12670
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
12707
12671
  var n = W, e = Hr;
12708
12672
  function t(u, d) {
@@ -12744,7 +12708,7 @@ function zp() {
12744
12708
  }, [x]), a(x), x;
12745
12709
  }
12746
12710
  ui.useSyncExternalStoreWithSelector = c, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
12747
- }()), ui;
12711
+ })()), ui;
12748
12712
  }
12749
12713
  process.env.NODE_ENV === "production" ? $i.exports = Bp() : $i.exports = zp();
12750
12714
  var Fp = $i.exports;
@@ -13001,7 +12965,7 @@ class Jp {
13001
12965
  const t = this.component, r = this.props, i = this.editor, s = qp(), o = Up(t), l = { ...r };
13002
12966
  l.ref && !(s || o) && delete l.ref, !l.ref && (s || o) && (l.ref = (a) => {
13003
12967
  this.ref = a;
13004
- }), this.reactElement = W.createElement(t, { ...l }), (e = i == null ? void 0 : i.contentComponent) === null || e === void 0 || e.setRenderer(this.id, this);
12968
+ }), this.reactElement = W.createElement(t, { ...l }), (e = i?.contentComponent) === null || e === void 0 || e.setRenderer(this.id, this);
13005
12969
  }
13006
12970
  /**
13007
12971
  * Re-renders the React component with new props.
@@ -13018,7 +12982,7 @@ class Jp {
13018
12982
  destroy() {
13019
12983
  var e;
13020
12984
  const t = this.editor;
13021
- (e = t == null ? void 0 : t.contentComponent) === null || e === void 0 || e.removeRenderer(this.id);
12985
+ (e = t?.contentComponent) === null || e === void 0 || e.removeRenderer(this.id);
13022
12986
  }
13023
12987
  /**
13024
12988
  * Update the attributes of the element that holds the React component.
@@ -13491,7 +13455,7 @@ const Yp = /^\s*>\s$/, Xp = Y.create({
13491
13455
  handlePaste: (n, e) => {
13492
13456
  if (!e.clipboardData || this.editor.isActive(this.type.name))
13493
13457
  return !1;
13494
- const t = e.clipboardData.getData("text/plain"), r = e.clipboardData.getData("vscode-editor-data"), i = r ? JSON.parse(r) : void 0, s = i == null ? void 0 : i.mode;
13458
+ const t = e.clipboardData.getData("text/plain"), r = e.clipboardData.getData("vscode-editor-data"), i = r ? JSON.parse(r) : void 0, s = i?.mode;
13495
13459
  if (!t || !s)
13496
13460
  return !1;
13497
13461
  const { tr: o, schema: l } = n.state, a = l.text(t.replace(/\r\n?/g, `
@@ -13948,7 +13912,7 @@ J.prototype.map = function(e, t, r) {
13948
13912
  J.from = function(e) {
13949
13913
  return e instanceof J ? e : e && e.length ? new Za(e) : J.empty;
13950
13914
  };
13951
- var Za = /* @__PURE__ */ function(n) {
13915
+ var Za = /* @__PURE__ */ (function(n) {
13952
13916
  function e(r) {
13953
13917
  n.call(this), this.values = r;
13954
13918
  }
@@ -13979,9 +13943,9 @@ var Za = /* @__PURE__ */ function(n) {
13979
13943
  }, t.depth.get = function() {
13980
13944
  return 0;
13981
13945
  }, Object.defineProperties(e.prototype, t), e;
13982
- }(J);
13946
+ })(J);
13983
13947
  J.empty = new Za([]);
13984
- var wm = /* @__PURE__ */ function(n) {
13948
+ var wm = /* @__PURE__ */ (function(n) {
13985
13949
  function e(t, r) {
13986
13950
  n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
13987
13951
  }
@@ -14013,7 +13977,7 @@ var wm = /* @__PURE__ */ function(n) {
14013
13977
  }, e.prototype.appendInner = function(r) {
14014
13978
  return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
14015
13979
  }, e;
14016
- }(J);
13980
+ })(J);
14017
13981
  const Tm = 500;
14018
13982
  class Me {
14019
13983
  constructor(e, t) {
@@ -14842,7 +14806,7 @@ const tc = ec(!1, !0), nc = ec(!0, !0), Lm = ne.create({
14842
14806
  return !1;
14843
14807
  const p = f.doc.nodeAt(h);
14844
14808
  return f.setNodeMarkup(h, void 0, {
14845
- ...p == null ? void 0 : p.attrs,
14809
+ ...p?.attrs,
14846
14810
  checked: d
14847
14811
  }), !0;
14848
14812
  }).run(), !r.isEditable && this.options.onReadOnlyChecked && (this.options.onReadOnlyChecked(n, d) || (l.checked = !l.checked));
@@ -15666,7 +15630,7 @@ function Sg(n) {
15666
15630
  l.push(o), o = o.parentNode;
15667
15631
  if (!l.find((f) => f.nodeName === "A"))
15668
15632
  return !1;
15669
- const a = Ga(e.state, n.type.name), c = r.target, u = (i = c == null ? void 0 : c.href) !== null && i !== void 0 ? i : a.href, d = (s = c == null ? void 0 : c.target) !== null && s !== void 0 ? s : a.target;
15633
+ const a = Ga(e.state, n.type.name), c = r.target, u = (i = c?.href) !== null && i !== void 0 ? i : a.href, d = (s = c?.target) !== null && s !== void 0 ? s : a.target;
15670
15634
  return c && u ? (window.open(u, d), !0) : !1;
15671
15635
  }
15672
15636
  }
@@ -15935,7 +15899,7 @@ function Eg(n) {
15935
15899
  const m = l.pos - p.length, g = Array.from(p.matchAll(h)).pop();
15936
15900
  if (!g || g.input === void 0 || g.index === void 0)
15937
15901
  return null;
15938
- const y = g.input.slice(Math.max(0, g.index - 1), g.index), C = new RegExp(`^[${s == null ? void 0 : s.join("")}\0]?$`).test(y);
15902
+ const y = g.input.slice(Math.max(0, g.index - 1), g.index), C = new RegExp(`^[${s?.join("")}\0]?$`).test(y);
15939
15903
  if (s !== null && !C)
15940
15904
  return null;
15941
15905
  const k = m + g.index;
@@ -15952,7 +15916,7 @@ function Eg(n) {
15952
15916
  const Mg = new oe("suggestion");
15953
15917
  function wg({ pluginKey: n = Mg, editor: e, char: t = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: s = [" "], startOfLine: o = !1, decorationTag: l = "span", decorationClass: a = "suggestion", decorationContent: c = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], render: h = () => ({}), allow: p = () => !0, findSuggestionMatch: m = Eg }) {
15954
15918
  let g;
15955
- const y = h == null ? void 0 : h(), C = new K({
15919
+ const y = h?.(), C = new K({
15956
15920
  key: n,
15957
15921
  view() {
15958
15922
  return {
@@ -15979,16 +15943,16 @@ function wg({ pluginKey: n = Mg, editor: e, char: t = "@", allowSpaces: r = !1,
15979
15943
  clientRect: Ds ? () => {
15980
15944
  var _t;
15981
15945
  const { decorationId: hc } = (_t = this.key) === null || _t === void 0 ? void 0 : _t.getState(e.state), _r = k.dom.querySelector(`[data-decoration-id="${hc}"]`);
15982
- return (_r == null ? void 0 : _r.getBoundingClientRect()) || null;
15946
+ return _r?.getBoundingClientRect() || null;
15983
15947
  } : null
15984
- }, Vt && ((E = y == null ? void 0 : y.onBeforeStart) === null || E === void 0 || E.call(y, g)), xn && ((A = y == null ? void 0 : y.onBeforeUpdate) === null || A === void 0 || A.call(y, g)), (xn || Vt) && (g.items = await f({
15948
+ }, Vt && ((E = y?.onBeforeStart) === null || E === void 0 || E.call(y, g)), xn && ((A = y?.onBeforeUpdate) === null || A === void 0 || A.call(y, g)), (xn || Vt) && (g.items = await f({
15985
15949
  editor: e,
15986
15950
  query: wt.query
15987
- })), Vr && ((D = y == null ? void 0 : y.onExit) === null || D === void 0 || D.call(y, g)), xn && ((X = y == null ? void 0 : y.onUpdate) === null || X === void 0 || X.call(y, g)), Vt && ((fe = y == null ? void 0 : y.onStart) === null || fe === void 0 || fe.call(y, g));
15951
+ })), Vr && ((D = y?.onExit) === null || D === void 0 || D.call(y, g)), xn && ((X = y?.onUpdate) === null || X === void 0 || X.call(y, g)), Vt && ((fe = y?.onStart) === null || fe === void 0 || fe.call(y, g));
15988
15952
  },
15989
15953
  destroy: () => {
15990
15954
  var k;
15991
- g && ((k = y == null ? void 0 : y.onExit) === null || k === void 0 || k.call(y, g));
15955
+ g && ((k = y?.onExit) === null || k === void 0 || k.call(y, g));
15992
15956
  }
15993
15957
  };
15994
15958
  },
@@ -16035,14 +15999,14 @@ function wg({ pluginKey: n = Mg, editor: e, char: t = "@", allowSpaces: r = !1,
16035
15999
  handleKeyDown(k, x) {
16036
16000
  var M;
16037
16001
  const { active: T, range: E } = C.getState(k.state);
16038
- return T && ((M = y == null ? void 0 : y.onKeyDown) === null || M === void 0 ? void 0 : M.call(y, { view: k, event: x, range: E })) || !1;
16002
+ return T && ((M = y?.onKeyDown) === null || M === void 0 ? void 0 : M.call(y, { view: k, event: x, range: E })) || !1;
16039
16003
  },
16040
16004
  // Setup decorator on the currently active suggestion.
16041
16005
  decorations(k) {
16042
16006
  const { active: x, range: M, decorationId: T, query: E } = C.getState(k);
16043
16007
  if (!x)
16044
16008
  return null;
16045
- const A = !(E != null && E.length), D = [a];
16009
+ const A = !E?.length, D = [a];
16046
16010
  return A && D.push(u), V.create(k.doc, [
16047
16011
  ue.inline(M.from, M.to, {
16048
16012
  nodeName: l,
@@ -16065,7 +16029,7 @@ function Tg({ editor: n, overrideSuggestionOptions: e, extensionName: t, char: r
16065
16029
  command: ({ editor: s, range: o, props: l }) => {
16066
16030
  var a, c, u;
16067
16031
  const d = s.view.state.selection.$to.nodeAfter;
16068
- ((a = d == null ? void 0 : d.text) === null || a === void 0 ? void 0 : a.startsWith(" ")) && (o.to += 1), s.chain().focus().insertContentAt(o, [
16032
+ !((a = d?.text) === null || a === void 0) && a.startsWith(" ") && (o.to += 1), s.chain().focus().insertContentAt(o, [
16069
16033
  {
16070
16034
  type: t,
16071
16035
  attrs: { ...l, mentionSuggestionChar: r }
@@ -16104,7 +16068,7 @@ const _g = Y.create({
16104
16068
  HTMLAttributes: {},
16105
16069
  renderText({ node: n, suggestion: e }) {
16106
16070
  var t, r;
16107
- return `${(t = e == null ? void 0 : e.char) !== null && t !== void 0 ? t : "@"}${(r = n.attrs.label) !== null && r !== void 0 ? r : n.attrs.id}`;
16071
+ return `${(t = e?.char) !== null && t !== void 0 ? t : "@"}${(r = n.attrs.label) !== null && r !== void 0 ? r : n.attrs.id}`;
16108
16072
  },
16109
16073
  deleteTriggerWithBackspace: !1,
16110
16074
  renderHTML({ options: n, node: e, suggestion: t }) {
@@ -16112,7 +16076,7 @@ const _g = Y.create({
16112
16076
  return [
16113
16077
  "span",
16114
16078
  z(this.HTMLAttributes, n.HTMLAttributes),
16115
- `${(r = t == null ? void 0 : t.char) !== null && r !== void 0 ? r : "@"}${(i = e.attrs.label) !== null && i !== void 0 ? i : e.attrs.id}`
16079
+ `${(r = t?.char) !== null && r !== void 0 ? r : "@"}${(i = e.attrs.label) !== null && i !== void 0 ? i : e.attrs.id}`
16116
16080
  ];
16117
16081
  },
16118
16082
  suggestions: [],