@harbour-enterprises/superdoc 1.0.0-next.2 → 1.0.0-next.3

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 (40) hide show
  1. package/dist/chunks/{PdfViewer-eykNsWyi.es.js → PdfViewer-PUn0q_lG.es.js} +2 -2
  2. package/dist/chunks/{PdfViewer-B-xTd4XY.cjs → PdfViewer-cVGt7Ne7.cjs} +1 -1
  3. package/dist/chunks/{eventemitter3-CcXAdeql.es.js → eventemitter3-44XulWQe.es.js} +1 -1
  4. package/dist/chunks/{index-BDVXUeCy-Di6ozaOM.cjs → index-DLO-SgUP-BNtYQDPq.cjs} +1 -1
  5. package/dist/chunks/{index-BDVXUeCy-7mwhYeJ7.es.js → index-DLO-SgUP-c73otQJ5.es.js} +1 -1
  6. package/dist/chunks/{index-rF5HExWB.cjs → index-Djmhr-R6.cjs} +465 -228
  7. package/dist/chunks/{index-DpQ8ZYM0.es.js → index-mHanL4xN.es.js} +468 -231
  8. package/dist/chunks/{jszip-5vvIqAEE.es.js → jszip-VP334ufO.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-CcKbh84I.cjs → super-editor.es-Cve8WKfM.cjs} +619 -379
  10. package/dist/chunks/{super-editor.es-CxajnL9u.es.js → super-editor.es-S9Kp_7dy.es.js} +620 -380
  11. package/dist/chunks/{vue-Dysv_7z5.es.js → vue-BuPTonTJ.es.js} +27 -27
  12. package/dist/chunks/xml-js-LkEmUa9-.es.js +2 -0
  13. package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts +42 -0
  14. package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts.map +1 -0
  15. package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
  16. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  17. package/dist/packages/superdoc/src/core/types/index.d.ts +4 -167
  18. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  19. package/dist/style.css +88 -86
  20. package/dist/super-editor/ai-writer.es.js +3 -3
  21. package/dist/super-editor/chunks/{converter-DN_dhslo.js → converter-ByybZRFp.js} +1 -1
  22. package/dist/super-editor/chunks/{docx-zipper-Bhl_yBjL.js → docx-zipper-CFQANTLI.js} +1 -1
  23. package/dist/super-editor/chunks/{editor-3klx7hyV.js → editor-Cu4hD14N.js} +16 -16
  24. package/dist/super-editor/chunks/{index-BDVXUeCy.js → index-DLO-SgUP.js} +1 -1
  25. package/dist/super-editor/chunks/{toolbar-8YA9ltNC.js → toolbar-5MMla0sj.js} +804 -568
  26. package/dist/super-editor/converter.es.js +1 -1
  27. package/dist/super-editor/docx-zipper.es.js +2 -2
  28. package/dist/super-editor/editor.es.js +3 -3
  29. package/dist/super-editor/file-zipper.es.js +1 -1
  30. package/dist/super-editor/style.css +22 -21
  31. package/dist/super-editor/super-editor.es.js +10 -6
  32. package/dist/super-editor/toolbar.es.js +2 -2
  33. package/dist/super-editor.cjs +1 -1
  34. package/dist/super-editor.es.js +2 -2
  35. package/dist/superdoc.cjs +2 -2
  36. package/dist/superdoc.es.js +2 -2
  37. package/dist/superdoc.umd.js +1082 -605
  38. package/dist/superdoc.umd.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/chunks/xml-js-ClO_jHnq.es.js +0 -2
@@ -1,6 +1,6 @@
1
- import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, readonly, watch, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-DN_dhslo.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-3klx7hyV.js";
1
+ import { ref, readonly, watch, computed, getCurrentInstance, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, withDirectives, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, markRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, withKeys, unref, withModifiers, createBlock, toDisplayString, vModelText, createVNode, renderList, withCtx } from "vue";
2
+ import { p as process$1 } from "./converter-ByybZRFp.js";
3
+ import { g as global$1, _ as _export_sfc, u as useHighContrastMode } from "./editor-Cu4hD14N.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -155,378 +155,68 @@ const toolbarIcons = {
155
155
  paste: pasteIconSvg,
156
156
  strikethrough: strikethroughSvg
157
157
  };
158
- const _hoisted_1$4 = { class: "toolbar-icon" };
159
- const _hoisted_2$3 = ["innerHTML"];
160
- const _sfc_main$5 = {
161
- __name: "ToolbarButtonIcon",
162
- props: {
163
- name: {
164
- type: String,
165
- required: true
166
- },
167
- color: {
168
- type: String,
169
- default: null
170
- },
171
- icon: {
172
- type: String,
173
- default: null
158
+ function plugin$1(options) {
159
+ let _bPrefix = ".";
160
+ let _ePrefix = "__";
161
+ let _mPrefix = "--";
162
+ let c2;
163
+ if (options) {
164
+ let t = options.blockPrefix;
165
+ if (t) {
166
+ _bPrefix = t;
167
+ }
168
+ t = options.elementPrefix;
169
+ if (t) {
170
+ _ePrefix = t;
171
+ }
172
+ t = options.modifierPrefix;
173
+ if (t) {
174
+ _mPrefix = t;
174
175
  }
175
- },
176
- setup(__props) {
177
- const props = __props;
178
- const getBarColor = computed(() => {
179
- if (props.name === "color") return { backgroundColor: props.color || "#111111" };
180
- if (props.name === "highlight") return { backgroundColor: props.color || "#D6D6D6" };
181
- });
182
- const hasColorBar = computed(() => {
183
- return ["color", "highlight"].includes(props.name);
184
- });
185
- return (_ctx, _cache) => {
186
- return openBlock(), createElementBlock("div", _hoisted_1$4, [
187
- createElementVNode("div", {
188
- class: normalizeClass(["toolbar-icon__icon", [`toolbar-icon__icon--${props.name}`]]),
189
- innerHTML: __props.icon
190
- }, null, 10, _hoisted_2$3),
191
- hasColorBar.value ? (openBlock(), createElementBlock("div", {
192
- key: 0,
193
- class: "color-bar",
194
- style: normalizeStyle(getBarColor.value)
195
- }, null, 4)) : createCommentVNode("", true)
196
- ]);
197
- };
198
176
  }
199
- };
200
- const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-6d7523ab"]]);
201
- const _hoisted_1$3 = ["role", "aria-label", "onKeydown"];
202
- const _hoisted_2$2 = ["data-item"];
203
- const _hoisted_3$2 = {
204
- key: 1,
205
- class: "button-label"
206
- };
207
- const _hoisted_4$1 = { key: 2 };
208
- const _hoisted_5 = ["onKeydown", "id"];
209
- const _hoisted_6 = ["placeholder", "onKeydown", "id"];
210
- const _hoisted_7 = ["innerHTML"];
211
- const _hoisted_8 = {
212
- "aria-live": "polite",
213
- class: "visually-hidden"
214
- };
215
- const _sfc_main$4 = {
216
- __name: "ToolbarButton",
217
- props: {
218
- iconColor: {
219
- type: String,
220
- default: null
221
- },
222
- active: {
223
- type: Boolean,
224
- default: false
225
- },
226
- isNarrow: {
227
- type: Boolean,
228
- default: false
229
- },
230
- isWide: {
231
- type: Boolean,
232
- default: false
233
- },
234
- toolbarItem: {
235
- type: Object,
236
- required: true
237
- },
238
- defaultLabel: {
239
- type: String,
240
- default: null
241
- },
242
- isOverflowItem: {
243
- type: Boolean,
244
- default: false
177
+ const _plugin = {
178
+ install(instance) {
179
+ c2 = instance.c;
180
+ const ctx2 = instance.context;
181
+ ctx2.bem = {};
182
+ ctx2.bem.b = null;
183
+ ctx2.bem.els = null;
245
184
  }
246
- },
247
- emits: ["buttonClick", "textSubmit"],
248
- setup(__props, { emit: __emit }) {
249
- const emit = __emit;
250
- const props = __props;
251
- const {
252
- name,
253
- active,
254
- icon,
255
- label,
256
- hideLabel,
257
- iconColor,
258
- hasCaret,
259
- disabled,
260
- inlineTextInputVisible,
261
- hasInlineTextInput,
262
- minWidth,
263
- style: style2,
264
- attributes
265
- } = props.toolbarItem;
266
- const inlineTextInput = ref(label);
267
- const inlineInput = ref(null);
268
- const { isHighContrastMode } = useHighContrastMode();
269
- const handleClick = () => {
270
- if (hasInlineTextInput) {
271
- nextTick(() => {
272
- inlineInput.value?.focus();
273
- inlineInput.value?.select();
274
- });
185
+ };
186
+ function b(arg) {
187
+ let memorizedB;
188
+ let memorizedE;
189
+ return {
190
+ before(ctx2) {
191
+ memorizedB = ctx2.bem.b;
192
+ memorizedE = ctx2.bem.els;
193
+ ctx2.bem.els = null;
194
+ },
195
+ after(ctx2) {
196
+ ctx2.bem.b = memorizedB;
197
+ ctx2.bem.els = memorizedE;
198
+ },
199
+ $({ context, props }) {
200
+ arg = typeof arg === "string" ? arg : arg({ context, props });
201
+ context.bem.b = arg;
202
+ return `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}`;
275
203
  }
276
- emit("buttonClick");
277
- };
278
- const handleInputSubmit = () => {
279
- const value = inlineTextInput.value;
280
- const cleanValue = value.match(/^\d+(\.5)?$/) ? value : Math.floor(parseFloat(value)).toString();
281
- emit("textSubmit", cleanValue);
282
- inlineTextInput.value = cleanValue;
283
204
  };
284
- const getStyle = computed(() => {
285
- if (style2.value) return style2.value;
286
- return {
287
- minWidth: props.minWidth
288
- };
289
- });
290
- const caretIcon = computed(() => {
291
- return active.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
292
- });
293
- return (_ctx, _cache) => {
294
- return openBlock(), createElementBlock("div", {
295
- class: normalizeClass(["toolbar-item", unref(attributes).className]),
296
- style: normalizeStyle(getStyle.value),
297
- role: __props.isOverflowItem ? "menuitem" : "button",
298
- "aria-label": unref(attributes).ariaLabel,
299
- onClick: handleClick,
300
- onKeydown: withKeys(withModifiers(handleClick, ["stop"]), ["enter"]),
301
- tabindex: "0"
302
- }, [
303
- createElementVNode("div", {
304
- class: normalizeClass(["toolbar-button", {
305
- active: unref(active),
306
- disabled: unref(disabled),
307
- narrow: __props.isNarrow,
308
- wide: __props.isWide,
309
- "has-inline-text-input": unref(hasInlineTextInput),
310
- "high-contrast": unref(isHighContrastMode)
311
- }]),
312
- "data-item": `btn-${unref(name) || ""}`
313
- }, [
314
- unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon, {
315
- key: 0,
316
- color: unref(iconColor),
317
- class: "toolbar-icon",
318
- icon: unref(icon),
319
- name: unref(name)
320
- }, null, 8, ["color", "icon", "name"])) : createCommentVNode("", true),
321
- unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
322
- unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
323
- unref(name) === "fontSize" ? withDirectives((openBlock(), createElementBlock("input", {
324
- key: 0,
325
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
326
- onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
327
- type: "text",
328
- class: normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": unref(isHighContrastMode) }]),
329
- id: "inlineTextInput-" + unref(name),
330
- autocomplete: "off",
331
- ref_key: "inlineInput",
332
- ref: inlineInput
333
- }, null, 42, _hoisted_5)), [
334
- [vModelText, inlineTextInput.value]
335
- ]) : withDirectives((openBlock(), createElementBlock("input", {
336
- key: 1,
337
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inlineTextInput.value = $event),
338
- placeholder: unref(label),
339
- onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
340
- type: "text",
341
- class: "button-text-input",
342
- id: "inlineTextInput-" + unref(name),
343
- autocomplete: "off",
344
- ref_key: "inlineInput",
345
- ref: inlineInput
346
- }, null, 40, _hoisted_6)), [
347
- [vModelText, inlineTextInput.value]
348
- ])
349
- ])) : createCommentVNode("", true),
350
- unref(hasCaret) ? (openBlock(), createElementBlock("div", {
351
- key: 3,
352
- class: "dropdown-caret",
353
- innerHTML: caretIcon.value,
354
- style: normalizeStyle({ opacity: unref(disabled) ? 0.6 : 1 })
355
- }, null, 12, _hoisted_7)) : createCommentVNode("", true),
356
- createElementVNode("div", _hoisted_8, toDisplayString(`${unref(attributes).ariaLabel} ${unref(active) ? "selected" : "unset"}`), 1)
357
- ], 10, _hoisted_2$2)
358
- ], 46, _hoisted_1$3);
359
- };
360
- }
361
- };
362
- const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ea93b080"]]);
363
- const _hoisted_1$2 = {
364
- class: "toolbar-separator",
365
- role: "separator",
366
- "aria-label": "Toolbar separator"
367
- };
368
- const _sfc_main$3 = {
369
- __name: "ToolbarSeparator",
370
- props: {
371
- active: {
372
- type: Boolean,
373
- default: false
374
- }
375
- },
376
- emits: ["command"],
377
- setup(__props, { emit: __emit }) {
378
- const { isHighContrastMode } = useHighContrastMode();
379
- const getSeparatorColor = () => {
380
- if (isHighContrastMode.value) {
381
- return "#000";
382
- }
383
- return "#dbdbdb";
384
- };
385
- return (_ctx, _cache) => {
386
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
387
- createElementVNode("div", {
388
- class: "separator-inner",
389
- style: normalizeStyle({ backgroundColor: getSeparatorColor() })
390
- }, null, 4)
391
- ]);
392
- };
393
- }
394
- };
395
- const ToolbarSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4ef9aa18"]]);
396
- const _hoisted_1$1 = { class: "overflow-menu" };
397
- const _hoisted_2$1 = { class: "overflow-menu-trigger" };
398
- const _hoisted_3$1 = {
399
- key: 0,
400
- class: "overflow-menu_items",
401
- role: "group"
402
- };
403
- const _sfc_main$2 = {
404
- __name: "OverflowMenu",
405
- props: {
406
- toolbarItem: {
407
- type: Object,
408
- required: true
409
- },
410
- overflowItems: {
411
- type: Array,
412
- required: true
413
- }
414
- },
415
- emits: ["buttonClick", "close"],
416
- setup(__props, { emit: __emit }) {
417
- const { proxy } = getCurrentInstance();
418
- const emit = __emit;
419
- const props = __props;
420
- const isOverflowMenuOpened = computed(() => props.toolbarItem.expand.value);
421
- const hasOpenDropdown = ref(false);
422
- const overflowToolbarItem = computed(() => ({
423
- ...props.toolbarItem,
424
- active: isOverflowMenuOpened.value
425
- }));
426
- const toggleOverflowMenu = () => {
427
- emit("buttonClick", props.toolbarItem);
428
- };
429
- const handleCommand = ({ item, argument }) => {
430
- proxy.$toolbar.emitCommand({ item, argument });
431
- };
432
- const handleKeyDown = (e) => {
433
- if (e.key === "Escape") {
434
- if (isOverflowMenuOpened.value && !hasOpenDropdown.value) {
435
- e.preventDefault();
436
- emit("close");
437
- }
438
- }
439
- };
440
- onMounted(() => {
441
- document.addEventListener("keydown", handleKeyDown, true);
442
- });
443
- onBeforeUnmount(() => {
444
- document.removeEventListener("keydown", handleKeyDown, true);
445
- });
446
- return (_ctx, _cache) => {
447
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
448
- createElementVNode("div", _hoisted_2$1, [
449
- createVNode(ToolbarButton, {
450
- "toolbar-item": overflowToolbarItem.value,
451
- onButtonClick: toggleOverflowMenu
452
- }, null, 8, ["toolbar-item"])
453
- ]),
454
- isOverflowMenuOpened.value ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
455
- createVNode(ButtonGroup, {
456
- class: "superdoc-toolbar-overflow",
457
- "toolbar-items": __props.overflowItems,
458
- "from-overflow": "",
459
- onCommand: handleCommand,
460
- onDropdownUpdateShow: _cache[0] || (_cache[0] = ($event) => hasOpenDropdown.value = $event)
461
- }, null, 8, ["toolbar-items"])
462
- ])) : createCommentVNode("", true)
463
- ]);
464
- };
465
- }
466
- };
467
- const OverflowMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ef28da92"]]);
468
- function plugin$1(options) {
469
- let _bPrefix = ".";
470
- let _ePrefix = "__";
471
- let _mPrefix = "--";
472
- let c2;
473
- if (options) {
474
- let t = options.blockPrefix;
475
- if (t) {
476
- _bPrefix = t;
477
- }
478
- t = options.elementPrefix;
479
- if (t) {
480
- _ePrefix = t;
481
- }
482
- t = options.modifierPrefix;
483
- if (t) {
484
- _mPrefix = t;
485
- }
486
- }
487
- const _plugin = {
488
- install(instance) {
489
- c2 = instance.c;
490
- const ctx2 = instance.context;
491
- ctx2.bem = {};
492
- ctx2.bem.b = null;
493
- ctx2.bem.els = null;
494
- }
495
- };
496
- function b(arg) {
497
- let memorizedB;
498
- let memorizedE;
499
- return {
500
- before(ctx2) {
501
- memorizedB = ctx2.bem.b;
502
- memorizedE = ctx2.bem.els;
503
- ctx2.bem.els = null;
504
- },
505
- after(ctx2) {
506
- ctx2.bem.b = memorizedB;
507
- ctx2.bem.els = memorizedE;
508
- },
509
- $({ context, props }) {
510
- arg = typeof arg === "string" ? arg : arg({ context, props });
511
- context.bem.b = arg;
512
- return `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}`;
513
- }
514
- };
515
- }
516
- function e(arg) {
517
- let memorizedE;
518
- return {
519
- before(ctx2) {
520
- memorizedE = ctx2.bem.els;
521
- },
522
- after(ctx2) {
523
- ctx2.bem.els = memorizedE;
524
- },
525
- $({ context, props }) {
526
- arg = typeof arg === "string" ? arg : arg({ context, props });
527
- context.bem.els = arg.split(",").map((v) => v.trim());
528
- return context.bem.els.map((el) => `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${_ePrefix}${el}`).join(", ");
529
- }
205
+ }
206
+ function e(arg) {
207
+ let memorizedE;
208
+ return {
209
+ before(ctx2) {
210
+ memorizedE = ctx2.bem.els;
211
+ },
212
+ after(ctx2) {
213
+ ctx2.bem.els = memorizedE;
214
+ },
215
+ $({ context, props }) {
216
+ arg = typeof arg === "string" ? arg : arg({ context, props });
217
+ context.bem.els = arg.split(",").map((v) => v.trim());
218
+ return context.bem.els.map((el) => `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${_ePrefix}${el}`).join(", ");
219
+ }
530
220
  };
531
221
  }
532
222
  function m(arg) {
@@ -4075,30 +3765,30 @@ const defaultClsPrefix = "n";
4075
3765
  function useConfig(props = {}, options = {
4076
3766
  defaultBordered: true
4077
3767
  }) {
4078
- const NConfigProvider = inject(configProviderInjectionKey, null);
3768
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
4079
3769
  return {
4080
3770
  // NConfigProvider,
4081
- inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,
4082
- mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,
4083
- mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,
4084
- mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,
3771
+ inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
3772
+ mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
3773
+ mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
3774
+ mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
4085
3775
  mergedBorderedRef: computed(() => {
4086
3776
  var _a, _b;
4087
3777
  const {
4088
3778
  bordered
4089
3779
  } = props;
4090
3780
  if (bordered !== void 0) return bordered;
4091
- return (_b = (_a = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;
3781
+ return (_b = (_a = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;
4092
3782
  }),
4093
- mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix),
4094
- namespaceRef: computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value)
3783
+ mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : shallowRef(defaultClsPrefix),
3784
+ namespaceRef: computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
4095
3785
  };
4096
3786
  }
4097
3787
  function useThemeClass(componentName, hashRef, cssVarsRef, props) {
4098
3788
  if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
4099
- const NConfigProvider = inject(configProviderInjectionKey, null);
4100
- const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef;
4101
- const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget;
3789
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
3790
+ const mergedThemeHashRef = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeHashRef;
3791
+ const styleMountTarget = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget;
4102
3792
  const themeClassRef = ref("");
4103
3793
  const ssrAdapter2 = useSsrAdapter();
4104
3794
  let renderCallback;
@@ -5443,7 +5133,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
5443
5133
  }
5444
5134
  return componentRtlState;
5445
5135
  });
5446
- const NConfigProvider = inject(configProviderInjectionKey, null);
5136
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
5447
5137
  const mountStyle = () => {
5448
5138
  watchEffect(() => {
5449
5139
  const {
@@ -5463,7 +5153,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
5463
5153
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
5464
5154
  },
5465
5155
  ssr: ssrAdapter2,
5466
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
5156
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
5467
5157
  });
5468
5158
  });
5469
5159
  };
@@ -5521,7 +5211,7 @@ function createTheme(theme) {
5521
5211
  }
5522
5212
  function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
5523
5213
  const ssrAdapter2 = useSsrAdapter();
5524
- const NConfigProvider = inject(configProviderInjectionKey, null);
5214
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
5525
5215
  if (style2) {
5526
5216
  const mountStyle = () => {
5527
5217
  const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
@@ -5533,15 +5223,15 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
5533
5223
  },
5534
5224
  anchorMetaName: cssrAnchorMetaName,
5535
5225
  ssr: ssrAdapter2,
5536
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
5226
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
5537
5227
  });
5538
- if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
5228
+ if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
5539
5229
  globalStyle.mount({
5540
5230
  id: "n-global",
5541
5231
  head: true,
5542
5232
  anchorMetaName: cssrAnchorMetaName,
5543
5233
  ssr: ssrAdapter2,
5544
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
5234
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
5545
5235
  });
5546
5236
  }
5547
5237
  };
@@ -5573,11 +5263,11 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
5573
5263
  self: globalSelf = void 0,
5574
5264
  peers: globalPeers = {}
5575
5265
  } = {}
5576
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {};
5266
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
5577
5267
  const {
5578
5268
  common: globalCommonOverrides = void 0,
5579
5269
  [resolveId]: globalSelfOverrides = {}
5580
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {};
5270
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
5581
5271
  const {
5582
5272
  common: globalSelfCommonOverrides,
5583
5273
  peers: globalPeersOverrides = {}
@@ -8335,6 +8025,209 @@ const NPopover = defineComponent({
8335
8025
  });
8336
8026
  }
8337
8027
  });
8028
+ const configProviderProps = {
8029
+ abstract: Boolean,
8030
+ bordered: {
8031
+ type: Boolean,
8032
+ default: void 0
8033
+ },
8034
+ clsPrefix: String,
8035
+ locale: Object,
8036
+ dateLocale: Object,
8037
+ namespace: String,
8038
+ rtl: Array,
8039
+ tag: {
8040
+ type: String,
8041
+ default: "div"
8042
+ },
8043
+ hljs: Object,
8044
+ katex: Object,
8045
+ theme: Object,
8046
+ themeOverrides: Object,
8047
+ componentOptions: Object,
8048
+ icons: Object,
8049
+ breakpoints: Object,
8050
+ preflightStyleDisabled: Boolean,
8051
+ styleMountTarget: Object,
8052
+ inlineThemeDisabled: {
8053
+ type: Boolean,
8054
+ default: void 0
8055
+ },
8056
+ // deprecated
8057
+ as: {
8058
+ type: String,
8059
+ validator: () => {
8060
+ warn("config-provider", "`as` is deprecated, please use `tag` instead.");
8061
+ return true;
8062
+ },
8063
+ default: void 0
8064
+ }
8065
+ };
8066
+ const NConfigProvider = defineComponent({
8067
+ name: "ConfigProvider",
8068
+ alias: ["App"],
8069
+ props: configProviderProps,
8070
+ setup(props) {
8071
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
8072
+ const mergedThemeRef = computed(() => {
8073
+ const {
8074
+ theme
8075
+ } = props;
8076
+ if (theme === null) return void 0;
8077
+ const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
8078
+ return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
8079
+ });
8080
+ const mergedThemeOverridesRef = computed(() => {
8081
+ const {
8082
+ themeOverrides
8083
+ } = props;
8084
+ if (themeOverrides === null) return void 0;
8085
+ if (themeOverrides === void 0) {
8086
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
8087
+ } else {
8088
+ const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
8089
+ if (inheritedThemeOverrides === void 0) {
8090
+ return themeOverrides;
8091
+ } else {
8092
+ return merge$1({}, inheritedThemeOverrides, themeOverrides);
8093
+ }
8094
+ }
8095
+ });
8096
+ const mergedNamespaceRef = useMemo(() => {
8097
+ const {
8098
+ namespace: namespace2
8099
+ } = props;
8100
+ return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
8101
+ });
8102
+ const mergedBorderedRef = useMemo(() => {
8103
+ const {
8104
+ bordered
8105
+ } = props;
8106
+ return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
8107
+ });
8108
+ const mergedIconsRef = computed(() => {
8109
+ const {
8110
+ icons
8111
+ } = props;
8112
+ return icons === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons;
8113
+ });
8114
+ const mergedComponentPropsRef = computed(() => {
8115
+ const {
8116
+ componentOptions
8117
+ } = props;
8118
+ if (componentOptions !== void 0) return componentOptions;
8119
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
8120
+ });
8121
+ const mergedClsPrefixRef = computed(() => {
8122
+ const {
8123
+ clsPrefix
8124
+ } = props;
8125
+ if (clsPrefix !== void 0) return clsPrefix;
8126
+ if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
8127
+ return defaultClsPrefix;
8128
+ });
8129
+ const mergedRtlRef = computed(() => {
8130
+ var _a;
8131
+ const {
8132
+ rtl
8133
+ } = props;
8134
+ if (rtl === void 0) {
8135
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
8136
+ }
8137
+ const rtlEnabledState = {};
8138
+ for (const rtlInfo of rtl) {
8139
+ rtlEnabledState[rtlInfo.name] = markRaw(rtlInfo);
8140
+ (_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach((peerRtlInfo) => {
8141
+ if (!(peerRtlInfo.name in rtlEnabledState)) {
8142
+ rtlEnabledState[peerRtlInfo.name] = markRaw(peerRtlInfo);
8143
+ }
8144
+ });
8145
+ }
8146
+ return rtlEnabledState;
8147
+ });
8148
+ const mergedBreakpointsRef = computed(() => {
8149
+ return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
8150
+ });
8151
+ const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
8152
+ const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
8153
+ const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
8154
+ const mergedThemeHashRef = computed(() => {
8155
+ const {
8156
+ value: theme
8157
+ } = mergedThemeRef;
8158
+ const {
8159
+ value: mergedThemeOverrides
8160
+ } = mergedThemeOverridesRef;
8161
+ const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
8162
+ const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
8163
+ if (themeName) {
8164
+ if (hasThemeOverrides) {
8165
+ return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
8166
+ }
8167
+ return themeName;
8168
+ } else {
8169
+ if (hasThemeOverrides) {
8170
+ return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
8171
+ }
8172
+ return "";
8173
+ }
8174
+ });
8175
+ provide(configProviderInjectionKey, {
8176
+ mergedThemeHashRef,
8177
+ mergedBreakpointsRef,
8178
+ mergedRtlRef,
8179
+ mergedIconsRef,
8180
+ mergedComponentPropsRef,
8181
+ mergedBorderedRef,
8182
+ mergedNamespaceRef,
8183
+ mergedClsPrefixRef,
8184
+ mergedLocaleRef: computed(() => {
8185
+ const {
8186
+ locale
8187
+ } = props;
8188
+ if (locale === null) return void 0;
8189
+ return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
8190
+ }),
8191
+ mergedDateLocaleRef: computed(() => {
8192
+ const {
8193
+ dateLocale
8194
+ } = props;
8195
+ if (dateLocale === null) return void 0;
8196
+ return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
8197
+ }),
8198
+ mergedHljsRef: computed(() => {
8199
+ const {
8200
+ hljs
8201
+ } = props;
8202
+ return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
8203
+ }),
8204
+ mergedKatexRef: computed(() => {
8205
+ const {
8206
+ katex
8207
+ } = props;
8208
+ return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
8209
+ }),
8210
+ mergedThemeRef,
8211
+ mergedThemeOverridesRef,
8212
+ inlineThemeDisabled: inlineThemeDisabled || false,
8213
+ preflightStyleDisabled: preflightStyleDisabled || false,
8214
+ styleMountTarget
8215
+ });
8216
+ return {
8217
+ mergedClsPrefix: mergedClsPrefixRef,
8218
+ mergedBordered: mergedBorderedRef,
8219
+ mergedNamespace: mergedNamespaceRef,
8220
+ mergedTheme: mergedThemeRef,
8221
+ mergedThemeOverrides: mergedThemeOverridesRef
8222
+ };
8223
+ },
8224
+ render() {
8225
+ var _a, _b, _c, _d;
8226
+ return !this.abstract ? h(this.as || this.tag, {
8227
+ class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
8228
+ }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);
8229
+ }
8230
+ });
8338
8231
  const commonVariables = {
8339
8232
  padding: "4px 0",
8340
8233
  optionIconSizeSmall: "14px",
@@ -9660,158 +9553,468 @@ const NDropdown = defineComponent({
9660
9553
  onUpdateShow: this.doUpdateShow,
9661
9554
  "onUpdate:show": void 0
9662
9555
  };
9663
- return h(NPopover, Object.assign({}, keep(this.$props, popoverPropKeys), popoverProps2), {
9664
- trigger: () => {
9665
- var _a, _b;
9666
- return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);
9667
- }
9668
- });
9556
+ return h(NPopover, Object.assign({}, keep(this.$props, popoverPropKeys), popoverProps2), {
9557
+ trigger: () => {
9558
+ var _a, _b;
9559
+ return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a);
9560
+ }
9561
+ });
9562
+ }
9563
+ });
9564
+ const messageApiInjectionKey = createInjectionKey("n-message-api");
9565
+ function useMessage() {
9566
+ const api = inject(messageApiInjectionKey, null);
9567
+ if (api === null) {
9568
+ throwError("use-message", "No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A.");
9569
+ }
9570
+ return api;
9571
+ }
9572
+ function self$1(vars) {
9573
+ const {
9574
+ heightSmall,
9575
+ heightMedium,
9576
+ heightLarge,
9577
+ borderRadius
9578
+ } = vars;
9579
+ return {
9580
+ color: "#eee",
9581
+ colorEnd: "#ddd",
9582
+ borderRadius,
9583
+ heightSmall,
9584
+ heightMedium,
9585
+ heightLarge
9586
+ };
9587
+ }
9588
+ const skeletonLight = {
9589
+ common: derived,
9590
+ self: self$1
9591
+ };
9592
+ const style = c$1([cB("skeleton", `
9593
+ height: 1em;
9594
+ width: 100%;
9595
+ transition:
9596
+ --n-color-start .3s var(--n-bezier),
9597
+ --n-color-end .3s var(--n-bezier),
9598
+ background-color .3s var(--n-bezier);
9599
+ animation: 2s skeleton-loading infinite cubic-bezier(0.36, 0, 0.64, 1);
9600
+ background-color: var(--n-color-start);
9601
+ `), c$1("@keyframes skeleton-loading", `
9602
+ 0% {
9603
+ background: var(--n-color-start);
9604
+ }
9605
+ 40% {
9606
+ background: var(--n-color-end);
9607
+ }
9608
+ 80% {
9609
+ background: var(--n-color-start);
9610
+ }
9611
+ 100% {
9612
+ background: var(--n-color-start);
9613
+ }
9614
+ `)]);
9615
+ const skeletonProps = Object.assign(Object.assign({}, useTheme.props), {
9616
+ text: Boolean,
9617
+ round: Boolean,
9618
+ circle: Boolean,
9619
+ height: [String, Number],
9620
+ width: [String, Number],
9621
+ size: String,
9622
+ repeat: {
9623
+ type: Number,
9624
+ default: 1
9625
+ },
9626
+ animated: {
9627
+ type: Boolean,
9628
+ default: true
9629
+ },
9630
+ sharp: {
9631
+ type: Boolean,
9632
+ default: true
9633
+ }
9634
+ });
9635
+ const NSkeleton = defineComponent({
9636
+ name: "Skeleton",
9637
+ inheritAttrs: false,
9638
+ props: skeletonProps,
9639
+ setup(props) {
9640
+ useHoudini();
9641
+ const {
9642
+ mergedClsPrefixRef
9643
+ } = useConfig(props);
9644
+ const themeRef = useTheme("Skeleton", "-skeleton", style, skeletonLight, props, mergedClsPrefixRef);
9645
+ return {
9646
+ mergedClsPrefix: mergedClsPrefixRef,
9647
+ style: computed(() => {
9648
+ var _a, _b;
9649
+ const theme = themeRef.value;
9650
+ const {
9651
+ common: {
9652
+ cubicBezierEaseInOut: cubicBezierEaseInOut2
9653
+ }
9654
+ } = theme;
9655
+ const selfThemeVars = theme.self;
9656
+ const {
9657
+ color,
9658
+ colorEnd,
9659
+ borderRadius
9660
+ } = selfThemeVars;
9661
+ let sizeHeight;
9662
+ const {
9663
+ circle,
9664
+ sharp,
9665
+ round,
9666
+ width,
9667
+ height,
9668
+ size: size2,
9669
+ text,
9670
+ animated
9671
+ } = props;
9672
+ if (size2 !== void 0) {
9673
+ sizeHeight = selfThemeVars[createKey("height", size2)];
9674
+ }
9675
+ const mergedWidth = circle ? (_a = width !== null && width !== void 0 ? width : height) !== null && _a !== void 0 ? _a : sizeHeight : width;
9676
+ const mergedHeight = (_b = circle ? width !== null && width !== void 0 ? width : height : height) !== null && _b !== void 0 ? _b : sizeHeight;
9677
+ return {
9678
+ display: text ? "inline-block" : "",
9679
+ verticalAlign: text ? "-0.125em" : "",
9680
+ borderRadius: circle ? "50%" : round ? "4096px" : sharp ? "" : borderRadius,
9681
+ width: typeof mergedWidth === "number" ? pxfy(mergedWidth) : mergedWidth,
9682
+ height: typeof mergedHeight === "number" ? pxfy(mergedHeight) : mergedHeight,
9683
+ animation: !animated ? "none" : "",
9684
+ "--n-bezier": cubicBezierEaseInOut2,
9685
+ "--n-color-start": color,
9686
+ "--n-color-end": colorEnd
9687
+ };
9688
+ })
9689
+ };
9690
+ },
9691
+ render() {
9692
+ const {
9693
+ repeat: repeatProp,
9694
+ style: style2,
9695
+ mergedClsPrefix,
9696
+ $attrs
9697
+ } = this;
9698
+ const child = h("div", mergeProps({
9699
+ class: `${mergedClsPrefix}-skeleton`,
9700
+ style: style2
9701
+ }, $attrs));
9702
+ if (repeatProp > 1) {
9703
+ return h(Fragment, null, repeat(repeatProp, null).map((_) => [child, "\n"]));
9704
+ }
9705
+ return child;
9706
+ }
9707
+ });
9708
+ const _hoisted_1$4 = { class: "toolbar-icon" };
9709
+ const _hoisted_2$3 = ["innerHTML"];
9710
+ const _sfc_main$5 = {
9711
+ __name: "ToolbarButtonIcon",
9712
+ props: {
9713
+ name: {
9714
+ type: String,
9715
+ required: true
9716
+ },
9717
+ color: {
9718
+ type: String,
9719
+ default: null
9720
+ },
9721
+ icon: {
9722
+ type: String,
9723
+ default: null
9724
+ }
9725
+ },
9726
+ setup(__props) {
9727
+ const props = __props;
9728
+ const getBarColor = computed(() => {
9729
+ if (props.name === "color") return { backgroundColor: props.color || "#111111" };
9730
+ if (props.name === "highlight") return { backgroundColor: props.color || "#D6D6D6" };
9731
+ });
9732
+ const hasColorBar = computed(() => {
9733
+ return ["color", "highlight"].includes(props.name);
9734
+ });
9735
+ return (_ctx, _cache) => {
9736
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [
9737
+ createElementVNode("div", {
9738
+ class: normalizeClass(["toolbar-icon__icon", [`toolbar-icon__icon--${props.name}`]]),
9739
+ innerHTML: __props.icon
9740
+ }, null, 10, _hoisted_2$3),
9741
+ hasColorBar.value ? (openBlock(), createElementBlock("div", {
9742
+ key: 0,
9743
+ class: "color-bar",
9744
+ style: normalizeStyle(getBarColor.value)
9745
+ }, null, 4)) : createCommentVNode("", true)
9746
+ ]);
9747
+ };
9748
+ }
9749
+ };
9750
+ const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-6d7523ab"]]);
9751
+ const _hoisted_1$3 = ["role", "aria-label", "onKeydown"];
9752
+ const _hoisted_2$2 = ["data-item"];
9753
+ const _hoisted_3$2 = {
9754
+ key: 1,
9755
+ class: "button-label"
9756
+ };
9757
+ const _hoisted_4$1 = { key: 2 };
9758
+ const _hoisted_5 = ["onKeydown", "id"];
9759
+ const _hoisted_6 = ["placeholder", "onKeydown", "id"];
9760
+ const _hoisted_7 = ["innerHTML"];
9761
+ const _hoisted_8 = {
9762
+ "aria-live": "polite",
9763
+ class: "visually-hidden"
9764
+ };
9765
+ const _sfc_main$4 = {
9766
+ __name: "ToolbarButton",
9767
+ props: {
9768
+ iconColor: {
9769
+ type: String,
9770
+ default: null
9771
+ },
9772
+ active: {
9773
+ type: Boolean,
9774
+ default: false
9775
+ },
9776
+ isNarrow: {
9777
+ type: Boolean,
9778
+ default: false
9779
+ },
9780
+ isWide: {
9781
+ type: Boolean,
9782
+ default: false
9783
+ },
9784
+ toolbarItem: {
9785
+ type: Object,
9786
+ required: true
9787
+ },
9788
+ defaultLabel: {
9789
+ type: String,
9790
+ default: null
9791
+ },
9792
+ isOverflowItem: {
9793
+ type: Boolean,
9794
+ default: false
9795
+ }
9796
+ },
9797
+ emits: ["buttonClick", "textSubmit"],
9798
+ setup(__props, { emit: __emit }) {
9799
+ const emit = __emit;
9800
+ const props = __props;
9801
+ const {
9802
+ name,
9803
+ active,
9804
+ icon,
9805
+ label,
9806
+ hideLabel,
9807
+ iconColor,
9808
+ hasCaret,
9809
+ disabled,
9810
+ inlineTextInputVisible,
9811
+ hasInlineTextInput,
9812
+ minWidth,
9813
+ style: style2,
9814
+ attributes
9815
+ } = props.toolbarItem;
9816
+ const inlineTextInput = ref(label);
9817
+ const inlineInput = ref(null);
9818
+ const { isHighContrastMode } = useHighContrastMode();
9819
+ const handleClick = () => {
9820
+ if (hasInlineTextInput) {
9821
+ nextTick(() => {
9822
+ inlineInput.value?.focus();
9823
+ inlineInput.value?.select();
9824
+ });
9825
+ }
9826
+ emit("buttonClick");
9827
+ };
9828
+ const handleInputSubmit = () => {
9829
+ const value = inlineTextInput.value;
9830
+ const cleanValue = value.match(/^\d+(\.5)?$/) ? value : Math.floor(parseFloat(value)).toString();
9831
+ emit("textSubmit", cleanValue);
9832
+ inlineTextInput.value = cleanValue;
9833
+ };
9834
+ const getStyle = computed(() => {
9835
+ if (style2.value) return style2.value;
9836
+ return {
9837
+ minWidth: props.minWidth
9838
+ };
9839
+ });
9840
+ const caretIcon = computed(() => {
9841
+ return active.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
9842
+ });
9843
+ return (_ctx, _cache) => {
9844
+ return openBlock(), createElementBlock("div", {
9845
+ class: normalizeClass(["toolbar-item", unref(attributes).className]),
9846
+ style: normalizeStyle(getStyle.value),
9847
+ role: __props.isOverflowItem ? "menuitem" : "button",
9848
+ "aria-label": unref(attributes).ariaLabel,
9849
+ onClick: handleClick,
9850
+ onKeydown: withKeys(withModifiers(handleClick, ["stop"]), ["enter"]),
9851
+ tabindex: "0"
9852
+ }, [
9853
+ createElementVNode("div", {
9854
+ class: normalizeClass(["toolbar-button", {
9855
+ active: unref(active),
9856
+ disabled: unref(disabled),
9857
+ narrow: __props.isNarrow,
9858
+ wide: __props.isWide,
9859
+ "has-inline-text-input": unref(hasInlineTextInput),
9860
+ "high-contrast": unref(isHighContrastMode)
9861
+ }]),
9862
+ "data-item": `btn-${unref(name) || ""}`
9863
+ }, [
9864
+ unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon, {
9865
+ key: 0,
9866
+ color: unref(iconColor),
9867
+ class: "toolbar-icon",
9868
+ icon: unref(icon),
9869
+ name: unref(name)
9870
+ }, null, 8, ["color", "icon", "name"])) : createCommentVNode("", true),
9871
+ unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
9872
+ unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
9873
+ unref(name) === "fontSize" ? withDirectives((openBlock(), createElementBlock("input", {
9874
+ key: 0,
9875
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
9876
+ onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
9877
+ type: "text",
9878
+ class: normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": unref(isHighContrastMode) }]),
9879
+ id: "inlineTextInput-" + unref(name),
9880
+ autocomplete: "off",
9881
+ ref_key: "inlineInput",
9882
+ ref: inlineInput
9883
+ }, null, 42, _hoisted_5)), [
9884
+ [vModelText, inlineTextInput.value]
9885
+ ]) : withDirectives((openBlock(), createElementBlock("input", {
9886
+ key: 1,
9887
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inlineTextInput.value = $event),
9888
+ placeholder: unref(label),
9889
+ onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
9890
+ type: "text",
9891
+ class: "button-text-input",
9892
+ id: "inlineTextInput-" + unref(name),
9893
+ autocomplete: "off",
9894
+ ref_key: "inlineInput",
9895
+ ref: inlineInput
9896
+ }, null, 40, _hoisted_6)), [
9897
+ [vModelText, inlineTextInput.value]
9898
+ ])
9899
+ ])) : createCommentVNode("", true),
9900
+ unref(hasCaret) ? (openBlock(), createElementBlock("div", {
9901
+ key: 3,
9902
+ class: "dropdown-caret",
9903
+ innerHTML: caretIcon.value,
9904
+ style: normalizeStyle({ opacity: unref(disabled) ? 0.6 : 1 })
9905
+ }, null, 12, _hoisted_7)) : createCommentVNode("", true),
9906
+ createElementVNode("div", _hoisted_8, toDisplayString(`${unref(attributes).ariaLabel} ${unref(active) ? "selected" : "unset"}`), 1)
9907
+ ], 10, _hoisted_2$2)
9908
+ ], 46, _hoisted_1$3);
9909
+ };
9669
9910
  }
9670
- });
9671
- const messageApiInjectionKey = createInjectionKey("n-message-api");
9672
- function useMessage() {
9673
- const api = inject(messageApiInjectionKey, null);
9674
- if (api === null) {
9675
- throwError("use-message", "No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A.");
9676
- }
9677
- return api;
9678
- }
9679
- function self$1(vars) {
9680
- const {
9681
- heightSmall,
9682
- heightMedium,
9683
- heightLarge,
9684
- borderRadius
9685
- } = vars;
9686
- return {
9687
- color: "#eee",
9688
- colorEnd: "#ddd",
9689
- borderRadius,
9690
- heightSmall,
9691
- heightMedium,
9692
- heightLarge
9693
- };
9694
- }
9695
- const skeletonLight = {
9696
- common: derived,
9697
- self: self$1
9698
9911
  };
9699
- const style = c$1([cB("skeleton", `
9700
- height: 1em;
9701
- width: 100%;
9702
- transition:
9703
- --n-color-start .3s var(--n-bezier),
9704
- --n-color-end .3s var(--n-bezier),
9705
- background-color .3s var(--n-bezier);
9706
- animation: 2s skeleton-loading infinite cubic-bezier(0.36, 0, 0.64, 1);
9707
- background-color: var(--n-color-start);
9708
- `), c$1("@keyframes skeleton-loading", `
9709
- 0% {
9710
- background: var(--n-color-start);
9711
- }
9712
- 40% {
9713
- background: var(--n-color-end);
9714
- }
9715
- 80% {
9716
- background: var(--n-color-start);
9717
- }
9718
- 100% {
9719
- background: var(--n-color-start);
9720
- }
9721
- `)]);
9722
- const skeletonProps = Object.assign(Object.assign({}, useTheme.props), {
9723
- text: Boolean,
9724
- round: Boolean,
9725
- circle: Boolean,
9726
- height: [String, Number],
9727
- width: [String, Number],
9728
- size: String,
9729
- repeat: {
9730
- type: Number,
9731
- default: 1
9732
- },
9733
- animated: {
9734
- type: Boolean,
9735
- default: true
9912
+ const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ea93b080"]]);
9913
+ const _hoisted_1$2 = {
9914
+ class: "toolbar-separator",
9915
+ role: "separator",
9916
+ "aria-label": "Toolbar separator"
9917
+ };
9918
+ const _sfc_main$3 = {
9919
+ __name: "ToolbarSeparator",
9920
+ props: {
9921
+ active: {
9922
+ type: Boolean,
9923
+ default: false
9924
+ }
9736
9925
  },
9737
- sharp: {
9738
- type: Boolean,
9739
- default: true
9926
+ emits: ["command"],
9927
+ setup(__props, { emit: __emit }) {
9928
+ const { isHighContrastMode } = useHighContrastMode();
9929
+ const getSeparatorColor = () => {
9930
+ if (isHighContrastMode.value) {
9931
+ return "#000";
9932
+ }
9933
+ return "#dbdbdb";
9934
+ };
9935
+ return (_ctx, _cache) => {
9936
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
9937
+ createElementVNode("div", {
9938
+ class: "separator-inner",
9939
+ style: normalizeStyle({ backgroundColor: getSeparatorColor() })
9940
+ }, null, 4)
9941
+ ]);
9942
+ };
9740
9943
  }
9741
- });
9742
- const NSkeleton = defineComponent({
9743
- name: "Skeleton",
9744
- inheritAttrs: false,
9745
- props: skeletonProps,
9746
- setup(props) {
9747
- useHoudini();
9748
- const {
9749
- mergedClsPrefixRef
9750
- } = useConfig(props);
9751
- const themeRef = useTheme("Skeleton", "-skeleton", style, skeletonLight, props, mergedClsPrefixRef);
9752
- return {
9753
- mergedClsPrefix: mergedClsPrefixRef,
9754
- style: computed(() => {
9755
- var _a, _b;
9756
- const theme = themeRef.value;
9757
- const {
9758
- common: {
9759
- cubicBezierEaseInOut: cubicBezierEaseInOut2
9760
- }
9761
- } = theme;
9762
- const selfThemeVars = theme.self;
9763
- const {
9764
- color,
9765
- colorEnd,
9766
- borderRadius
9767
- } = selfThemeVars;
9768
- let sizeHeight;
9769
- const {
9770
- circle,
9771
- sharp,
9772
- round,
9773
- width,
9774
- height,
9775
- size: size2,
9776
- text,
9777
- animated
9778
- } = props;
9779
- if (size2 !== void 0) {
9780
- sizeHeight = selfThemeVars[createKey("height", size2)];
9944
+ };
9945
+ const ToolbarSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-4ef9aa18"]]);
9946
+ const _hoisted_1$1 = { class: "overflow-menu" };
9947
+ const _hoisted_2$1 = { class: "overflow-menu-trigger" };
9948
+ const _hoisted_3$1 = {
9949
+ key: 0,
9950
+ class: "overflow-menu_items",
9951
+ role: "group"
9952
+ };
9953
+ const _sfc_main$2 = {
9954
+ __name: "OverflowMenu",
9955
+ props: {
9956
+ toolbarItem: {
9957
+ type: Object,
9958
+ required: true
9959
+ },
9960
+ overflowItems: {
9961
+ type: Array,
9962
+ required: true
9963
+ }
9964
+ },
9965
+ emits: ["buttonClick", "close"],
9966
+ setup(__props, { emit: __emit }) {
9967
+ const { proxy } = getCurrentInstance();
9968
+ const emit = __emit;
9969
+ const props = __props;
9970
+ const isOverflowMenuOpened = computed(() => props.toolbarItem.expand.value);
9971
+ const hasOpenDropdown = ref(false);
9972
+ const overflowToolbarItem = computed(() => ({
9973
+ ...props.toolbarItem,
9974
+ active: isOverflowMenuOpened.value
9975
+ }));
9976
+ const toggleOverflowMenu = () => {
9977
+ emit("buttonClick", props.toolbarItem);
9978
+ };
9979
+ const handleCommand = ({ item, argument }) => {
9980
+ proxy.$toolbar.emitCommand({ item, argument });
9981
+ };
9982
+ const handleKeyDown = (e) => {
9983
+ if (e.key === "Escape") {
9984
+ if (isOverflowMenuOpened.value && !hasOpenDropdown.value) {
9985
+ e.preventDefault();
9986
+ emit("close");
9781
9987
  }
9782
- const mergedWidth = circle ? (_a = width !== null && width !== void 0 ? width : height) !== null && _a !== void 0 ? _a : sizeHeight : width;
9783
- const mergedHeight = (_b = circle ? width !== null && width !== void 0 ? width : height : height) !== null && _b !== void 0 ? _b : sizeHeight;
9784
- return {
9785
- display: text ? "inline-block" : "",
9786
- verticalAlign: text ? "-0.125em" : "",
9787
- borderRadius: circle ? "50%" : round ? "4096px" : sharp ? "" : borderRadius,
9788
- width: typeof mergedWidth === "number" ? pxfy(mergedWidth) : mergedWidth,
9789
- height: typeof mergedHeight === "number" ? pxfy(mergedHeight) : mergedHeight,
9790
- animation: !animated ? "none" : "",
9791
- "--n-bezier": cubicBezierEaseInOut2,
9792
- "--n-color-start": color,
9793
- "--n-color-end": colorEnd
9794
- };
9795
- })
9988
+ }
9989
+ };
9990
+ onMounted(() => {
9991
+ document.addEventListener("keydown", handleKeyDown, true);
9992
+ });
9993
+ onBeforeUnmount(() => {
9994
+ document.removeEventListener("keydown", handleKeyDown, true);
9995
+ });
9996
+ return (_ctx, _cache) => {
9997
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
9998
+ createElementVNode("div", _hoisted_2$1, [
9999
+ createVNode(ToolbarButton, {
10000
+ "toolbar-item": overflowToolbarItem.value,
10001
+ onButtonClick: toggleOverflowMenu
10002
+ }, null, 8, ["toolbar-item"])
10003
+ ]),
10004
+ isOverflowMenuOpened.value ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
10005
+ createVNode(ButtonGroup, {
10006
+ class: "superdoc-toolbar-overflow",
10007
+ "toolbar-items": __props.overflowItems,
10008
+ "from-overflow": "",
10009
+ onCommand: handleCommand,
10010
+ onDropdownUpdateShow: _cache[0] || (_cache[0] = ($event) => hasOpenDropdown.value = $event)
10011
+ }, null, 8, ["toolbar-items"])
10012
+ ])) : createCommentVNode("", true)
10013
+ ]);
9796
10014
  };
9797
- },
9798
- render() {
9799
- const {
9800
- repeat: repeatProp,
9801
- style: style2,
9802
- mergedClsPrefix,
9803
- $attrs
9804
- } = this;
9805
- const child = h("div", mergeProps({
9806
- class: `${mergedClsPrefix}-skeleton`,
9807
- style: style2
9808
- }, $attrs));
9809
- if (repeatProp > 1) {
9810
- return h(Fragment, null, repeat(repeatProp, null).map((_) => [child, "\n"]));
9811
- }
9812
- return child;
9813
10015
  }
9814
- });
10016
+ };
10017
+ const OverflowMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ef28da92"]]);
9815
10018
  const _hoisted_1 = ["onKeydown", "tabindex", "data-item-id"];
9816
10019
  const _hoisted_2 = { key: 0 };
9817
10020
  const _hoisted_3 = { key: 0 };
@@ -9827,6 +10030,16 @@ const _sfc_main$1 = {
9827
10030
  type: Array,
9828
10031
  default: () => []
9829
10032
  },
10033
+ /**
10034
+ * The font-family to use for UI elements like dropdowns and tooltips.
10035
+ * This ensures consistent typography across toolbar UI components.
10036
+ * @type {string}
10037
+ * @default 'Arial, Helvetica, sans-serif'
10038
+ */
10039
+ uiFontFamily: {
10040
+ type: String,
10041
+ default: "Arial, Helvetica, sans-serif"
10042
+ },
9830
10043
  position: {
9831
10044
  type: String,
9832
10045
  default: "left"
@@ -10019,6 +10232,7 @@ const _sfc_main$1 = {
10019
10232
  options: dropdownOptions(item),
10020
10233
  trigger: item.disabled.value ? null : "click",
10021
10234
  show: item.expand.value,
10235
+ "content-style": { fontFamily: props.uiFontFamily },
10022
10236
  size: "medium",
10023
10237
  placement: "bottom-start",
10024
10238
  class: normalizeClass(["toolbar-button toolbar-dropdown sd-editor-toolbar-dropdown", { "high-contrast": unref(isHighContrastMode) }]),
@@ -10026,14 +10240,16 @@ const _sfc_main$1 = {
10026
10240
  onUpdateShow: handleDropdownUpdateShow,
10027
10241
  style: normalizeStyle(item.dropdownStyles.value),
10028
10242
  "menu-props": () => ({
10029
- role: "menu"
10243
+ role: "menu",
10244
+ style: { fontFamily: props.uiFontFamily }
10030
10245
  }),
10031
10246
  "node-props": (option) => getDropdownAttributes(option, item)
10032
10247
  }, {
10033
10248
  default: withCtx(() => [
10034
10249
  createVNode(unref(NTooltip), {
10035
10250
  trigger: "hover",
10036
- disabled: !item.tooltip?.value
10251
+ disabled: !item.tooltip?.value,
10252
+ "content-style": { fontFamily: props.uiFontFamily }
10037
10253
  }, {
10038
10254
  trigger: withCtx(() => [
10039
10255
  createVNode(ToolbarButton, {
@@ -10050,13 +10266,14 @@ const _sfc_main$1 = {
10050
10266
  ])
10051
10267
  ]),
10052
10268
  _: 2
10053
- }, 1032, ["disabled"])
10269
+ }, 1032, ["disabled", "content-style"])
10054
10270
  ]),
10055
10271
  _: 2
10056
- }, 1032, ["options", "trigger", "show", "class", "onSelect", "style", "node-props"])) : isButton(item) ? (openBlock(), createBlock(unref(NTooltip), {
10272
+ }, 1032, ["options", "trigger", "show", "content-style", "class", "onSelect", "style", "menu-props", "node-props"])) : isButton(item) ? (openBlock(), createBlock(unref(NTooltip), {
10057
10273
  key: 2,
10058
10274
  trigger: "hover",
10059
- class: "sd-editor-toolbar-tooltip"
10275
+ class: "sd-editor-toolbar-tooltip",
10276
+ "content-style": { fontFamily: props.uiFontFamily }
10060
10277
  }, {
10061
10278
  trigger: withCtx(() => [
10062
10279
  createVNode(ToolbarButton, {
@@ -10073,7 +10290,7 @@ const _sfc_main$1 = {
10073
10290
  ])) : createCommentVNode("", true)
10074
10291
  ]),
10075
10292
  _: 2
10076
- }, 1024)) : createCommentVNode("", true),
10293
+ }, 1032, ["content-style"])) : createCommentVNode("", true),
10077
10294
  isOverflow(item) && __props.overflowItems.length ? (openBlock(), createBlock(OverflowMenu, {
10078
10295
  key: 3,
10079
10296
  "toolbar-item": item,
@@ -10087,13 +10304,21 @@ const _sfc_main$1 = {
10087
10304
  };
10088
10305
  }
10089
10306
  };
10090
- const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c80a1e51"]]);
10307
+ const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f732136c"]]);
10308
+ const DEFAULT_UI_FONT_FAMILY = "Arial, Helvetica, sans-serif";
10091
10309
  const _sfc_main = {
10092
10310
  __name: "Toolbar",
10093
10311
  emits: ["command", "toggle", "select"],
10094
10312
  setup(__props, { emit: __emit }) {
10095
10313
  const { proxy } = getCurrentInstance();
10096
10314
  let toolbarKey = ref(1);
10315
+ const uiFontFamily = computed(() => {
10316
+ const configured = proxy?.$toolbar?.config?.uiDisplayFallbackFont;
10317
+ if (typeof configured === "string" && configured.trim()) {
10318
+ return configured.trim();
10319
+ }
10320
+ return DEFAULT_UI_FONT_FAMILY;
10321
+ });
10097
10322
  const showLeftSide = proxy.$toolbar.config?.toolbarGroups?.includes("left");
10098
10323
  const showRightSide = proxy.$toolbar.config?.toolbarGroups?.includes("right");
10099
10324
  const excludeButtonsList = proxy.$toolbar.config?.toolbarButtonsExclude || [];
@@ -10140,37 +10365,48 @@ const _sfc_main = {
10140
10365
  "aria-label": "Toolbar",
10141
10366
  "data-editor-ui-surface": ""
10142
10367
  }, [
10143
- unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
10144
- key: 0,
10145
- tabindex: "0",
10146
- "toolbar-items": getFilteredItems("left"),
10147
- position: "left",
10148
- onCommand: handleCommand,
10149
- onItemClicked: restoreSelection,
10150
- class: "superdoc-toolbar-group-side"
10151
- }, null, 8, ["toolbar-items"])) : createCommentVNode("", true),
10152
- createVNode(ButtonGroup, {
10153
- tabindex: "0",
10154
- "toolbar-items": getFilteredItems("center"),
10155
- "overflow-items": unref(proxy).$toolbar.overflowItems,
10156
- position: "center",
10157
- onCommand: handleCommand,
10158
- onItemClicked: restoreSelection
10159
- }, null, 8, ["toolbar-items", "overflow-items"]),
10160
- unref(showRightSide) ? (openBlock(), createBlock(ButtonGroup, {
10161
- key: 1,
10162
- tabindex: "0",
10163
- "toolbar-items": getFilteredItems("right"),
10164
- position: "right",
10165
- onCommand: handleCommand,
10166
- onItemClicked: restoreSelection,
10167
- class: "superdoc-toolbar-group-side"
10168
- }, null, 8, ["toolbar-items"])) : createCommentVNode("", true)
10368
+ createVNode(unref(NConfigProvider), {
10369
+ abstract: "",
10370
+ "preflight-style-disabled": ""
10371
+ }, {
10372
+ default: withCtx(() => [
10373
+ unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
10374
+ key: 0,
10375
+ tabindex: "0",
10376
+ "toolbar-items": getFilteredItems("left"),
10377
+ "ui-font-family": uiFontFamily.value,
10378
+ position: "left",
10379
+ onCommand: handleCommand,
10380
+ onItemClicked: restoreSelection,
10381
+ class: "superdoc-toolbar-group-side"
10382
+ }, null, 8, ["toolbar-items", "ui-font-family"])) : createCommentVNode("", true),
10383
+ createVNode(ButtonGroup, {
10384
+ tabindex: "0",
10385
+ "toolbar-items": getFilteredItems("center"),
10386
+ "overflow-items": unref(proxy).$toolbar.overflowItems,
10387
+ "ui-font-family": uiFontFamily.value,
10388
+ position: "center",
10389
+ onCommand: handleCommand,
10390
+ onItemClicked: restoreSelection
10391
+ }, null, 8, ["toolbar-items", "overflow-items", "ui-font-family"]),
10392
+ unref(showRightSide) ? (openBlock(), createBlock(ButtonGroup, {
10393
+ key: 1,
10394
+ tabindex: "0",
10395
+ "toolbar-items": getFilteredItems("right"),
10396
+ "ui-font-family": uiFontFamily.value,
10397
+ position: "right",
10398
+ onCommand: handleCommand,
10399
+ onItemClicked: restoreSelection,
10400
+ class: "superdoc-toolbar-group-side"
10401
+ }, null, 8, ["toolbar-items", "ui-font-family"])) : createCommentVNode("", true)
10402
+ ]),
10403
+ _: 1
10404
+ })
10169
10405
  ]);
10170
10406
  };
10171
10407
  }
10172
10408
  };
10173
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3f5ec271"]]);
10409
+ const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c7a72aa9"]]);
10174
10410
  export {
10175
10411
  NSkeleton as N,
10176
10412
  Toolbar as T,