@pptx-editor.dev/vue 0.3.0-canary.20261109032918.sha-39dc46e → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +14 -8
- package/dist/index.js +106 -81
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -5581,8 +5581,9 @@ declare const pptxEditorRootProps: {
|
|
|
5581
5581
|
readonly default: undefined;
|
|
5582
5582
|
};
|
|
5583
5583
|
/**
|
|
5584
|
-
* AutoCorrect while typing (default `true`):
|
|
5585
|
-
*
|
|
5584
|
+
* AutoCorrect while typing (default `true`): symbols, ellipses, fractions, and lists started
|
|
5585
|
+
* by typing `1.`, `1)`, `*`, or `-` and a space. Capitals, curly quotes, dashes, and
|
|
5586
|
+
* spelling are never automatic here: keyboards and systems that offer them apply them. Read
|
|
5586
5587
|
* once, when the editor is created.
|
|
5587
5588
|
*/
|
|
5588
5589
|
readonly autoCorrect: {
|
|
@@ -5698,8 +5699,9 @@ declare const PptxEditorRoot: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
5698
5699
|
readonly default: undefined;
|
|
5699
5700
|
};
|
|
5700
5701
|
/**
|
|
5701
|
-
* AutoCorrect while typing (default `true`):
|
|
5702
|
-
*
|
|
5702
|
+
* AutoCorrect while typing (default `true`): symbols, ellipses, fractions, and lists started
|
|
5703
|
+
* by typing `1.`, `1)`, `*`, or `-` and a space. Capitals, curly quotes, dashes, and
|
|
5704
|
+
* spelling are never automatic here: keyboards and systems that offer them apply them. Read
|
|
5703
5705
|
* once, when the editor is created.
|
|
5704
5706
|
*/
|
|
5705
5707
|
readonly autoCorrect: {
|
|
@@ -5786,8 +5788,9 @@ declare const PptxEditorRoot: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
5786
5788
|
readonly default: undefined;
|
|
5787
5789
|
};
|
|
5788
5790
|
/**
|
|
5789
|
-
* AutoCorrect while typing (default `true`):
|
|
5790
|
-
*
|
|
5791
|
+
* AutoCorrect while typing (default `true`): symbols, ellipses, fractions, and lists started
|
|
5792
|
+
* by typing `1.`, `1)`, `*`, or `-` and a space. Capitals, curly quotes, dashes, and
|
|
5793
|
+
* spelling are never automatic here: keyboards and systems that offer them apply them. Read
|
|
5791
5794
|
* once, when the editor is created.
|
|
5792
5795
|
*/
|
|
5793
5796
|
readonly autoCorrect: {
|
|
@@ -9030,7 +9033,7 @@ declare const lineGlyphProps: {
|
|
|
9030
9033
|
};
|
|
9031
9034
|
/** The props of `LineGlyph`, the twin of React's `LineGlyphProps`. @public */
|
|
9032
9035
|
type LineGlyphProps = ExtractPublicPropTypes<typeof lineGlyphProps>;
|
|
9033
|
-
/** Glyphs for line kinds
|
|
9036
|
+
/** Glyphs for line kinds, line ends, and preset dashes, drawn in a 48×24 box. @public */
|
|
9034
9037
|
declare const LineGlyph: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
9035
9038
|
readonly value: {
|
|
9036
9039
|
readonly type: StringConstructor;
|
|
@@ -9054,7 +9057,10 @@ declare const LineGlyph: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
9054
9057
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
9055
9058
|
/** The props of `LineMenuControl`, the twin of React's `LineMenuControlProps`. @public */
|
|
9056
9059
|
type LineMenuControlProps = ExtractPublicPropTypes<typeof slotPartProps$1>;
|
|
9057
|
-
/**
|
|
9060
|
+
/**
|
|
9061
|
+
* The line tool, the line start and end menus, and the dash menus, with each option drawn.
|
|
9062
|
+
* @public
|
|
9063
|
+
*/
|
|
9058
9064
|
declare const LineMenuControl: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
9059
9065
|
readonly slot: {
|
|
9060
9066
|
readonly type: PropType<ChromeSlotId>;
|
package/dist/index.js
CHANGED
|
@@ -330,7 +330,7 @@ import {
|
|
|
330
330
|
computed as computed13,
|
|
331
331
|
defineComponent as defineComponent17,
|
|
332
332
|
h as h11,
|
|
333
|
-
inject as
|
|
333
|
+
inject as inject6,
|
|
334
334
|
provide as provide4,
|
|
335
335
|
shallowRef as shallowRef11,
|
|
336
336
|
watch as watch12
|
|
@@ -2934,6 +2934,7 @@ var PatternDialog = defineComponent9({
|
|
|
2934
2934
|
import {
|
|
2935
2935
|
computed as computed11,
|
|
2936
2936
|
defineComponent as defineComponent10,
|
|
2937
|
+
inject as inject5,
|
|
2937
2938
|
onMounted as onMounted8,
|
|
2938
2939
|
ref as ref6,
|
|
2939
2940
|
shallowRef as shallowRef8,
|
|
@@ -2959,8 +2960,10 @@ import {
|
|
|
2959
2960
|
lineGlyphParts,
|
|
2960
2961
|
lineGlyphTransform,
|
|
2961
2962
|
lineSlotEnd,
|
|
2963
|
+
lineSlotShown,
|
|
2962
2964
|
presetGradient,
|
|
2963
2965
|
shapePreview,
|
|
2966
|
+
toolbarDropdownRow,
|
|
2964
2967
|
translateKeyOrText as translateKeyOrText5,
|
|
2965
2968
|
pickPictureFill
|
|
2966
2969
|
} from "@pptx-editor.dev/core/editor";
|
|
@@ -3517,7 +3520,8 @@ var LineGlyph = defineComponent10({
|
|
|
3517
3520
|
{
|
|
3518
3521
|
d: p.d,
|
|
3519
3522
|
...stroke,
|
|
3520
|
-
...p.join ? { "stroke-linejoin": "round" } : {}
|
|
3523
|
+
...p.join ? { "stroke-linejoin": "round" } : {},
|
|
3524
|
+
...p.dash ? { "stroke-dasharray": p.dash } : {}
|
|
3521
3525
|
},
|
|
3522
3526
|
i
|
|
3523
3527
|
)
|
|
@@ -3534,6 +3538,7 @@ var LineMenuControl = defineComponent10({
|
|
|
3534
3538
|
);
|
|
3535
3539
|
const off = useAriaDisabled(() => !cmd.isEnabled.value, reason);
|
|
3536
3540
|
const editor = usePptxEditor();
|
|
3541
|
+
const host = inject5(chromeActionHostKey, null);
|
|
3537
3542
|
const { t } = useTranslation();
|
|
3538
3543
|
const anchor = ref6(null);
|
|
3539
3544
|
const open = ref6(false);
|
|
@@ -3545,7 +3550,7 @@ var LineMenuControl = defineComponent10({
|
|
|
3545
3550
|
);
|
|
3546
3551
|
return () => {
|
|
3547
3552
|
const start = lineSlotEnd(props.slot);
|
|
3548
|
-
const shown =
|
|
3553
|
+
const shown = lineSlotShown(props.slot, cmd.value.value);
|
|
3549
3554
|
if (start !== void 0 && !isLine.value) return null;
|
|
3550
3555
|
const end = start !== void 0 ? { start } : {};
|
|
3551
3556
|
return [
|
|
@@ -3571,24 +3576,38 @@ var LineMenuControl = defineComponent10({
|
|
|
3571
3576
|
),
|
|
3572
3577
|
off.note(),
|
|
3573
3578
|
open.value ? /* @__PURE__ */ jsx5(Popover, { anchor: anchor.value, onClose: () => open.value = false, children: {
|
|
3574
|
-
default: () => /* @__PURE__ */ jsx5(Fragment7, { children: props.control.options?.map((o) =>
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3579
|
+
default: () => /* @__PURE__ */ jsx5(Fragment7, { children: props.control.options?.map((o) => {
|
|
3580
|
+
const row = toolbarDropdownRow(
|
|
3581
|
+
editor.value,
|
|
3582
|
+
host,
|
|
3583
|
+
props.slot,
|
|
3584
|
+
props.control,
|
|
3585
|
+
o,
|
|
3586
|
+
cmd.value.value
|
|
3587
|
+
);
|
|
3588
|
+
return /* @__PURE__ */ jsx5(
|
|
3589
|
+
MenuItem,
|
|
3590
|
+
{
|
|
3591
|
+
...row.checked !== void 0 ? { checked: row.checked } : {},
|
|
3592
|
+
...row.refused ? {
|
|
3593
|
+
disabled: true,
|
|
3594
|
+
...row.reason ? { reason: translateKeyOrText5(t, row.reason) } : {}
|
|
3595
|
+
} : {},
|
|
3596
|
+
onSelect: () => {
|
|
3597
|
+
cmd.execute(o.value);
|
|
3598
|
+
focusText(editor.value, anchor.value);
|
|
3599
|
+
open.value = false;
|
|
3600
|
+
},
|
|
3601
|
+
children: {
|
|
3602
|
+
default: () => /* @__PURE__ */ jsxs5(Fragment7, { children: [
|
|
3603
|
+
/* @__PURE__ */ jsx5(LineGlyph, { value: o.value, ...end }),
|
|
3604
|
+
t(o.labelKey)
|
|
3605
|
+
] })
|
|
3606
|
+
}
|
|
3582
3607
|
},
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
t(o.labelKey)
|
|
3587
|
-
] })
|
|
3588
|
-
}
|
|
3589
|
-
},
|
|
3590
|
-
o.value
|
|
3591
|
-
)) })
|
|
3608
|
+
o.value
|
|
3609
|
+
);
|
|
3610
|
+
}) })
|
|
3592
3611
|
} }) : null
|
|
3593
3612
|
];
|
|
3594
3613
|
};
|
|
@@ -5271,7 +5290,7 @@ var ActiveDialog = defineComponent17({
|
|
|
5271
5290
|
}
|
|
5272
5291
|
});
|
|
5273
5292
|
function useEditorDialog(key) {
|
|
5274
|
-
const host =
|
|
5293
|
+
const host = inject6(dialogHostKey, null);
|
|
5275
5294
|
return {
|
|
5276
5295
|
open: (returnFocusTo) => host?.open(key, returnFocusTo),
|
|
5277
5296
|
close: () => host?.close(),
|
|
@@ -5280,24 +5299,24 @@ function useEditorDialog(key) {
|
|
|
5280
5299
|
};
|
|
5281
5300
|
}
|
|
5282
5301
|
function usePopupEntry(key) {
|
|
5283
|
-
const host =
|
|
5302
|
+
const host = inject6(dialogHostKey, null);
|
|
5284
5303
|
return () => host?.popups()?.[key];
|
|
5285
5304
|
}
|
|
5286
5305
|
function useCanvasMenuEntry() {
|
|
5287
|
-
const host =
|
|
5306
|
+
const host = inject6(dialogHostKey, null);
|
|
5288
5307
|
return () => {
|
|
5289
5308
|
const explicit = host?.popups()?.contextMenu;
|
|
5290
5309
|
return explicit !== void 0 ? explicit : host?.canvasMenus.get();
|
|
5291
5310
|
};
|
|
5292
5311
|
}
|
|
5293
5312
|
function useCanvasMenuRegistry() {
|
|
5294
|
-
return
|
|
5313
|
+
return inject6(dialogHostKey, null)?.canvasMenus ?? null;
|
|
5295
5314
|
}
|
|
5296
5315
|
|
|
5297
5316
|
// src/pane-state.ts
|
|
5298
5317
|
import {
|
|
5299
5318
|
computed as computed14,
|
|
5300
|
-
inject as
|
|
5319
|
+
inject as inject7,
|
|
5301
5320
|
provide as provide5,
|
|
5302
5321
|
shallowRef as shallowRef12
|
|
5303
5322
|
} from "vue";
|
|
@@ -5316,7 +5335,7 @@ function providePaneState() {
|
|
|
5316
5335
|
return state;
|
|
5317
5336
|
}
|
|
5318
5337
|
function usePaneState() {
|
|
5319
|
-
return
|
|
5338
|
+
return inject7(paneStateKey, null);
|
|
5320
5339
|
}
|
|
5321
5340
|
function useNotesPane() {
|
|
5322
5341
|
const state = usePaneState();
|
|
@@ -5335,7 +5354,7 @@ function useNotesPane() {
|
|
|
5335
5354
|
import {
|
|
5336
5355
|
computed as computed15,
|
|
5337
5356
|
defineComponent as defineComponent18,
|
|
5338
|
-
inject as
|
|
5357
|
+
inject as inject8,
|
|
5339
5358
|
onBeforeUnmount as onBeforeUnmount2,
|
|
5340
5359
|
onMounted as onMounted9,
|
|
5341
5360
|
onUnmounted as onUnmounted2,
|
|
@@ -5381,7 +5400,7 @@ function provideSlideshow(editorRef) {
|
|
|
5381
5400
|
return handle;
|
|
5382
5401
|
}
|
|
5383
5402
|
function useSlideshow() {
|
|
5384
|
-
return
|
|
5403
|
+
return inject8(pptxSlideshowKey, noShow);
|
|
5385
5404
|
}
|
|
5386
5405
|
var showKeys = /* @__PURE__ */ new WeakMap();
|
|
5387
5406
|
var nextShowKey = 0;
|
|
@@ -5629,7 +5648,7 @@ var PptxEditorSlideshow = defineComponent18({
|
|
|
5629
5648
|
// src/FindBar.tsx
|
|
5630
5649
|
import {
|
|
5631
5650
|
defineComponent as defineComponent19,
|
|
5632
|
-
inject as
|
|
5651
|
+
inject as inject10,
|
|
5633
5652
|
onScopeDispose as onScopeDispose5,
|
|
5634
5653
|
provide as provide8,
|
|
5635
5654
|
ref as ref12,
|
|
@@ -5654,7 +5673,7 @@ import {
|
|
|
5654
5673
|
import {
|
|
5655
5674
|
computed as computed16,
|
|
5656
5675
|
getCurrentScope as getCurrentScope3,
|
|
5657
|
-
inject as
|
|
5676
|
+
inject as inject9,
|
|
5658
5677
|
onScopeDispose as onScopeDispose4,
|
|
5659
5678
|
provide as provide7,
|
|
5660
5679
|
shallowRef as shallowRef14,
|
|
@@ -5673,7 +5692,7 @@ function useChromeTranslate(overrides) {
|
|
|
5673
5692
|
var noHostTranslate = shallowRef14(void 0);
|
|
5674
5693
|
var toolbarContextKey = /* @__PURE__ */ Symbol("pptxToolbarContext");
|
|
5675
5694
|
function useToolbarContext() {
|
|
5676
|
-
return { t:
|
|
5695
|
+
return { t: inject9(toolbarContextKey, noHostTranslate) };
|
|
5677
5696
|
}
|
|
5678
5697
|
function useToolbarLabelFor(t) {
|
|
5679
5698
|
const { t: catalog } = useTranslation();
|
|
@@ -5692,13 +5711,13 @@ var chromeTranslateProp = {
|
|
|
5692
5711
|
t: { type: Function, default: void 0 }
|
|
5693
5712
|
};
|
|
5694
5713
|
function useChromeTranslateScope(host) {
|
|
5695
|
-
const parent =
|
|
5714
|
+
const parent = inject9(pptxTranslationKey, null);
|
|
5696
5715
|
const { t: inherited } = useTranslation();
|
|
5697
5716
|
const scoped = computed16(
|
|
5698
5717
|
() => host() ?? parent?.value ?? inherited
|
|
5699
5718
|
);
|
|
5700
5719
|
provide7(pptxTranslationKey, scoped);
|
|
5701
|
-
const parentHost =
|
|
5720
|
+
const parentHost = inject9(toolbarContextKey, noHostTranslate);
|
|
5702
5721
|
provide7(
|
|
5703
5722
|
toolbarContextKey,
|
|
5704
5723
|
computed16(() => host() ?? parentHost.value)
|
|
@@ -5809,7 +5828,7 @@ function provideFindBars() {
|
|
|
5809
5828
|
return count;
|
|
5810
5829
|
}
|
|
5811
5830
|
function useRegisterFindBar() {
|
|
5812
|
-
const count =
|
|
5831
|
+
const count = inject10(findBarsKey, null);
|
|
5813
5832
|
if (!count) return;
|
|
5814
5833
|
count.value += 1;
|
|
5815
5834
|
onScopeDispose5(() => {
|
|
@@ -6087,7 +6106,7 @@ var PptxEditorFindBar = defineComponent19({
|
|
|
6087
6106
|
// src/HyperlinkPopup.tsx
|
|
6088
6107
|
import {
|
|
6089
6108
|
defineComponent as defineComponent21,
|
|
6090
|
-
inject as
|
|
6109
|
+
inject as inject13,
|
|
6091
6110
|
onUnmounted as onUnmounted3,
|
|
6092
6111
|
provide as provide10,
|
|
6093
6112
|
shallowRef as shallowRef18,
|
|
@@ -6110,7 +6129,7 @@ import {
|
|
|
6110
6129
|
cloneVNode as cloneVNode3,
|
|
6111
6130
|
defineComponent as defineComponent20,
|
|
6112
6131
|
Fragment as Fragment12,
|
|
6113
|
-
inject as
|
|
6132
|
+
inject as inject12,
|
|
6114
6133
|
isVNode as isVNode2,
|
|
6115
6134
|
onMounted as onMounted10,
|
|
6116
6135
|
ref as ref14,
|
|
@@ -6138,7 +6157,7 @@ import {
|
|
|
6138
6157
|
import {
|
|
6139
6158
|
computed as computed17,
|
|
6140
6159
|
getCurrentScope as getCurrentScope4,
|
|
6141
|
-
inject as
|
|
6160
|
+
inject as inject11,
|
|
6142
6161
|
onScopeDispose as onScopeDispose6,
|
|
6143
6162
|
provide as provide9,
|
|
6144
6163
|
ref as ref13,
|
|
@@ -6155,7 +6174,7 @@ import {
|
|
|
6155
6174
|
var hyperlinkPopupStoreKey = /* @__PURE__ */ Symbol("pptxHyperlinkPopupStore");
|
|
6156
6175
|
var hyperlinkPopupKey = /* @__PURE__ */ Symbol("pptxHyperlinkPopup");
|
|
6157
6176
|
function injectHyperlinkPopupStore() {
|
|
6158
|
-
return
|
|
6177
|
+
return inject11(hyperlinkPopupStoreKey, null);
|
|
6159
6178
|
}
|
|
6160
6179
|
var hyperlinkPopupViewsKey = /* @__PURE__ */ Symbol("pptxHyperlinkPopupViews");
|
|
6161
6180
|
function useHyperlinkPopupBinding(store, active) {
|
|
@@ -6218,11 +6237,11 @@ function provideHyperlinkPopup() {
|
|
|
6218
6237
|
return { store, views };
|
|
6219
6238
|
}
|
|
6220
6239
|
function useHyperlinkPopup() {
|
|
6221
|
-
const provided =
|
|
6222
|
-
const attach =
|
|
6240
|
+
const provided = inject11(hyperlinkPopupStoreKey, null);
|
|
6241
|
+
const attach = inject11(hyperlinkPopupViewsKey, null);
|
|
6223
6242
|
if (provided && attach && getCurrentScope4()) onScopeDispose6(attach());
|
|
6224
6243
|
if (provided) return storeResult(provided);
|
|
6225
|
-
const own =
|
|
6244
|
+
const own = inject11(hyperlinkPopupKey, null);
|
|
6226
6245
|
if (own) {
|
|
6227
6246
|
const editorRef = usePptxEditor();
|
|
6228
6247
|
const c = own.controller;
|
|
@@ -6408,7 +6427,7 @@ var HyperLinkFields = part(
|
|
|
6408
6427
|
name: "PptxEditorHyperLinkFields",
|
|
6409
6428
|
props: partProps2,
|
|
6410
6429
|
setup(props) {
|
|
6411
|
-
const provision =
|
|
6430
|
+
const provision = inject12(hyperlinkPopupKey, null);
|
|
6412
6431
|
const { state, setUrl, commitEdit } = useHyperlinkPopup();
|
|
6413
6432
|
const { t } = useTranslation();
|
|
6414
6433
|
const editorRef = usePptxEditor();
|
|
@@ -6573,7 +6592,7 @@ var HyperLinkError = part(
|
|
|
6573
6592
|
name: "PptxEditorHyperLinkError",
|
|
6574
6593
|
props: partProps2,
|
|
6575
6594
|
setup(props) {
|
|
6576
|
-
const provision =
|
|
6595
|
+
const provision = inject12(hyperlinkPopupKey, null);
|
|
6577
6596
|
const { t } = useTranslation();
|
|
6578
6597
|
return () => {
|
|
6579
6598
|
const error = provision?.state.value.error;
|
|
@@ -6661,7 +6680,7 @@ var HyperLinkRoot = defineComponent20({
|
|
|
6661
6680
|
inheritAttrs: false,
|
|
6662
6681
|
props: rootProps,
|
|
6663
6682
|
setup(props, { slots, attrs }) {
|
|
6664
|
-
const provision =
|
|
6683
|
+
const provision = inject12(hyperlinkPopupKey, null);
|
|
6665
6684
|
const { t } = useTranslation();
|
|
6666
6685
|
const editorRef = usePptxEditor();
|
|
6667
6686
|
const selectionRect = shallowRef17(null);
|
|
@@ -6749,7 +6768,7 @@ var HyperlinkPopup = defineComponent21({
|
|
|
6749
6768
|
inheritAttrs: false,
|
|
6750
6769
|
props: hyperlinkPopupProps,
|
|
6751
6770
|
setup(props, { attrs }) {
|
|
6752
|
-
if (!
|
|
6771
|
+
if (!inject13(hyperlinkPopupKey, null)) {
|
|
6753
6772
|
const editorRef = usePptxEditor();
|
|
6754
6773
|
const own = hyperlinkPopupFromRequest(editorRef.value, {
|
|
6755
6774
|
anchor: props.anchor,
|
|
@@ -6846,7 +6865,7 @@ import {
|
|
|
6846
6865
|
import {
|
|
6847
6866
|
defineComponent as defineComponent28,
|
|
6848
6867
|
h as h12,
|
|
6849
|
-
inject as
|
|
6868
|
+
inject as inject18,
|
|
6850
6869
|
onBeforeUnmount as onBeforeUnmount6,
|
|
6851
6870
|
onMounted as onMounted13,
|
|
6852
6871
|
provide as provide13,
|
|
@@ -6995,7 +7014,7 @@ var ContextMenu = defineComponent22({
|
|
|
6995
7014
|
import {
|
|
6996
7015
|
Teleport as Teleport3,
|
|
6997
7016
|
defineComponent as defineComponent23,
|
|
6998
|
-
inject as
|
|
7017
|
+
inject as inject14,
|
|
6999
7018
|
nextTick,
|
|
7000
7019
|
normalizeClass as normalizeClass2,
|
|
7001
7020
|
onBeforeUnmount as onBeforeUnmount4,
|
|
@@ -7059,7 +7078,7 @@ var menuRow = defineComponent23({
|
|
|
7059
7078
|
props: menuRowProps,
|
|
7060
7079
|
emits: { select: () => true },
|
|
7061
7080
|
setup(props, { emit }) {
|
|
7062
|
-
const close =
|
|
7081
|
+
const close = inject14(menuCloseKey, null);
|
|
7063
7082
|
return () => {
|
|
7064
7083
|
const { href } = props;
|
|
7065
7084
|
const link = href === void 0 ? null : sanitizeHref(href);
|
|
@@ -7233,7 +7252,7 @@ var MenuSubmenu = menuSubmenu;
|
|
|
7233
7252
|
// src/menu-rows.tsx
|
|
7234
7253
|
import {
|
|
7235
7254
|
defineComponent as defineComponent26,
|
|
7236
|
-
inject as
|
|
7255
|
+
inject as inject16,
|
|
7237
7256
|
provide as provide11
|
|
7238
7257
|
} from "vue";
|
|
7239
7258
|
import {
|
|
@@ -7246,6 +7265,7 @@ import {
|
|
|
7246
7265
|
resolveChromeMenuRow,
|
|
7247
7266
|
runChromeRow,
|
|
7248
7267
|
sameChromeCommandState as sameChromeCommandState2,
|
|
7268
|
+
SHAPE_GRID_MENU_SLOTS,
|
|
7249
7269
|
surfaceInputIn,
|
|
7250
7270
|
tidySeparators,
|
|
7251
7271
|
translateKeyOrText as translateKeyOrText10,
|
|
@@ -7535,7 +7555,7 @@ var SectionRenameControl = sectionControl("PptxSectionRenameControl");
|
|
|
7535
7555
|
// src/TableControls.tsx
|
|
7536
7556
|
import {
|
|
7537
7557
|
defineComponent as defineComponent25,
|
|
7538
|
-
inject as
|
|
7558
|
+
inject as inject15,
|
|
7539
7559
|
nextTick as nextTick2,
|
|
7540
7560
|
onBeforeUnmount as onBeforeUnmount5,
|
|
7541
7561
|
onMounted as onMounted12,
|
|
@@ -7579,7 +7599,7 @@ var MenuTableGrid = defineComponent25({
|
|
|
7579
7599
|
const size = ref18({ rows: 0, cols: 0 });
|
|
7580
7600
|
const cursor = ref18({ rows: 1, cols: 1 });
|
|
7581
7601
|
const grid = ref18(null);
|
|
7582
|
-
const closeMenu =
|
|
7602
|
+
const closeMenu = inject15(menuCloseKey, null);
|
|
7583
7603
|
let frame = 0;
|
|
7584
7604
|
onMounted12(() => {
|
|
7585
7605
|
if (!props.autoFocus) return;
|
|
@@ -7783,7 +7803,7 @@ var TableStyleControl = defineComponent25({
|
|
|
7783
7803
|
import { jsx as jsx20 } from "vue/jsx-runtime";
|
|
7784
7804
|
var VUE_MENU_PARTS = { bar: "PptxEditorMenu", root: "PptxEditorRoot" };
|
|
7785
7805
|
function useMenuClose() {
|
|
7786
|
-
return
|
|
7806
|
+
return inject16(menuCloseKey, null) ?? noop;
|
|
7787
7807
|
}
|
|
7788
7808
|
function noop() {
|
|
7789
7809
|
}
|
|
@@ -7800,7 +7820,7 @@ var SlotMenuRow = defineComponent26({
|
|
|
7800
7820
|
setup(props) {
|
|
7801
7821
|
const { t } = useTranslation();
|
|
7802
7822
|
const editor = usePptxEditor();
|
|
7803
|
-
const host =
|
|
7823
|
+
const host = inject16(chromeActionHostKey, null);
|
|
7804
7824
|
const close = useMenuClose();
|
|
7805
7825
|
const offeredControl = useOfferedControl(
|
|
7806
7826
|
() => props.entry.slot,
|
|
@@ -7834,7 +7854,8 @@ var SlotMenuRow = defineComponent26({
|
|
|
7834
7854
|
if (entry.value === void 0 && control.state.kind === "value" && !entry.direct) {
|
|
7835
7855
|
if (entry.slot === "slide.add" || entry.slot === "slide.layout")
|
|
7836
7856
|
return /* @__PURE__ */ jsx20(LayoutSubmenu, { slot: entry.slot, ...common });
|
|
7837
|
-
if (
|
|
7857
|
+
if (SHAPE_GRID_MENU_SLOTS.has(entry.slot))
|
|
7858
|
+
return /* @__PURE__ */ jsx20(GallerySubmenu, { slot: entry.slot, ...common });
|
|
7838
7859
|
if (control.shape === "tableGrid")
|
|
7839
7860
|
return /* @__PURE__ */ jsx20(MenuSubmenu, { ...common, children: {
|
|
7840
7861
|
default: () => /* @__PURE__ */ jsx20(MenuTableGrid, { slot: entry.slot, label, autoFocus: true, onInserted: close })
|
|
@@ -7910,7 +7931,7 @@ var GallerySubmenu = defineComponent26({
|
|
|
7910
7931
|
setup(props) {
|
|
7911
7932
|
const { t } = useTranslation();
|
|
7912
7933
|
const editor = usePptxEditor();
|
|
7913
|
-
const host =
|
|
7934
|
+
const host = inject16(chromeActionHostKey, null);
|
|
7914
7935
|
const close = useMenuClose();
|
|
7915
7936
|
return () => /* @__PURE__ */ jsx20(
|
|
7916
7937
|
MenuSubmenu,
|
|
@@ -7955,7 +7976,7 @@ var LayoutSubmenu = defineComponent26({
|
|
|
7955
7976
|
},
|
|
7956
7977
|
setup(props) {
|
|
7957
7978
|
const editor = usePptxEditor();
|
|
7958
|
-
const host =
|
|
7979
|
+
const host = inject16(chromeActionHostKey, null);
|
|
7959
7980
|
const close = useMenuClose();
|
|
7960
7981
|
const current = useEditorState(
|
|
7961
7982
|
(s) => props.slot === "slide.layout" ? s.slides[s.currentSlide]?.layoutId ?? "" : ""
|
|
@@ -8033,7 +8054,7 @@ import {
|
|
|
8033
8054
|
Fragment as Fragment16,
|
|
8034
8055
|
Text,
|
|
8035
8056
|
defineComponent as defineComponent27,
|
|
8036
|
-
inject as
|
|
8057
|
+
inject as inject17,
|
|
8037
8058
|
isVNode as isVNode3,
|
|
8038
8059
|
normalizeClass as normalizeClass3,
|
|
8039
8060
|
provide as provide12,
|
|
@@ -8121,7 +8142,7 @@ var MenuSlotItem = defineComponent27({
|
|
|
8121
8142
|
inheritAttrs: false,
|
|
8122
8143
|
props: menuSlotItemProps,
|
|
8123
8144
|
setup(props, { attrs }) {
|
|
8124
|
-
const replaced =
|
|
8145
|
+
const replaced = inject17(rowDefaultsKey, null);
|
|
8125
8146
|
return () => {
|
|
8126
8147
|
if (props.hidden) return null;
|
|
8127
8148
|
const labelKey = props.labelKey ?? replaced?.labelKey;
|
|
@@ -8527,10 +8548,10 @@ var ContextMenuTargetProvider = defineComponent28({
|
|
|
8527
8548
|
}
|
|
8528
8549
|
});
|
|
8529
8550
|
function useContextMenuRequest() {
|
|
8530
|
-
return
|
|
8551
|
+
return inject18(requestKey, null);
|
|
8531
8552
|
}
|
|
8532
8553
|
function useContextMenuTarget() {
|
|
8533
|
-
return
|
|
8554
|
+
return inject18(requestKey, null)?.owner ?? null;
|
|
8534
8555
|
}
|
|
8535
8556
|
var pptxEditorContextMenuProps = {
|
|
8536
8557
|
...chromeTranslateProp,
|
|
@@ -8714,7 +8735,7 @@ import {
|
|
|
8714
8735
|
watch as watch35
|
|
8715
8736
|
} from "vue";
|
|
8716
8737
|
import {
|
|
8717
|
-
|
|
8738
|
+
STATUS_BAR_VIEW_OPTIONS,
|
|
8718
8739
|
focusSorterOnShow,
|
|
8719
8740
|
tooltipAttributes as tooltipAttributes7,
|
|
8720
8741
|
groupSlideSections as groupSlideSections3,
|
|
@@ -9288,7 +9309,7 @@ var SectionContextMenu = defineComponent30({
|
|
|
9288
9309
|
import {
|
|
9289
9310
|
Comment as Comment2,
|
|
9290
9311
|
defineComponent as defineComponent31,
|
|
9291
|
-
inject as
|
|
9312
|
+
inject as inject19,
|
|
9292
9313
|
isVNode as isVNode4,
|
|
9293
9314
|
normalizeClass as normalizeClass4,
|
|
9294
9315
|
provide as provide14,
|
|
@@ -9317,8 +9338,8 @@ function definePart(name, button, shows = () => true) {
|
|
|
9317
9338
|
inheritAttrs: false,
|
|
9318
9339
|
props: partProps3,
|
|
9319
9340
|
setup(props, { attrs, slots }) {
|
|
9320
|
-
const rail =
|
|
9321
|
-
const inMenu =
|
|
9341
|
+
const rail = inject19(railActionsKey, null);
|
|
9342
|
+
const inMenu = inject19(railOverflowKey, false);
|
|
9322
9343
|
return () => {
|
|
9323
9344
|
if (!rail || props.hidden || !shows(rail)) return null;
|
|
9324
9345
|
const { base, icon, ...rest } = button(rail);
|
|
@@ -9434,7 +9455,7 @@ function overflowButtonOf(listId) {
|
|
|
9434
9455
|
var SlideRailOverflow = defineComponent31({
|
|
9435
9456
|
name: "PptxSlideRailOverflow",
|
|
9436
9457
|
setup(_props, { slots }) {
|
|
9437
|
-
const rail =
|
|
9458
|
+
const rail = inject19(railActionsKey, null);
|
|
9438
9459
|
const menu = shallowRef22(
|
|
9439
9460
|
null
|
|
9440
9461
|
);
|
|
@@ -9545,7 +9566,7 @@ import {
|
|
|
9545
9566
|
// src/FontFamilyControl.tsx
|
|
9546
9567
|
import {
|
|
9547
9568
|
defineComponent as defineComponent32,
|
|
9548
|
-
inject as
|
|
9569
|
+
inject as inject20,
|
|
9549
9570
|
nextTick as nextTick3,
|
|
9550
9571
|
normalizeClass as normalizeClass5,
|
|
9551
9572
|
provide as provide15,
|
|
@@ -9566,7 +9587,7 @@ import {
|
|
|
9566
9587
|
import { jsx as jsx26, jsxs as jsxs21 } from "vue/jsx-runtime";
|
|
9567
9588
|
var fontFamilyKey = /* @__PURE__ */ Symbol("pptxFontFamily");
|
|
9568
9589
|
function useFontFamilyState(part2) {
|
|
9569
|
-
const state =
|
|
9590
|
+
const state = inject20(fontFamilyKey, null);
|
|
9570
9591
|
if (!state)
|
|
9571
9592
|
warnPartOutsideCompound(`PptxEditorToolbar.FontFamily.${part2}`, "PptxEditorToolbar.FontFamily");
|
|
9572
9593
|
return state;
|
|
@@ -9631,7 +9652,7 @@ var FontRow = defineComponent32({
|
|
|
9631
9652
|
},
|
|
9632
9653
|
setup(props, { slots }) {
|
|
9633
9654
|
const { t } = useTranslation();
|
|
9634
|
-
const state =
|
|
9655
|
+
const state = inject20(fontFamilyKey, null);
|
|
9635
9656
|
return () => {
|
|
9636
9657
|
if (!state) return null;
|
|
9637
9658
|
const row = props.row;
|
|
@@ -9865,7 +9886,7 @@ import {
|
|
|
9865
9886
|
Fragment as Fragment20,
|
|
9866
9887
|
defineComponent as defineComponent38,
|
|
9867
9888
|
h as h14,
|
|
9868
|
-
inject as
|
|
9889
|
+
inject as inject22,
|
|
9869
9890
|
ref as ref27
|
|
9870
9891
|
} from "vue";
|
|
9871
9892
|
import {
|
|
@@ -9876,7 +9897,7 @@ import {
|
|
|
9876
9897
|
runChromeRow as runChromeRow2,
|
|
9877
9898
|
surfaceInputIn as surfaceInputIn2,
|
|
9878
9899
|
toolbarColorResetKey,
|
|
9879
|
-
toolbarDropdownRow,
|
|
9900
|
+
toolbarDropdownRow as toolbarDropdownRow2,
|
|
9880
9901
|
toolbarPartKind,
|
|
9881
9902
|
toolbarRowSection,
|
|
9882
9903
|
toolbarSplitDefaultColor,
|
|
@@ -10006,7 +10027,7 @@ var SizeControl = defineComponent33({
|
|
|
10006
10027
|
});
|
|
10007
10028
|
|
|
10008
10029
|
// src/toolbar-file-controls.tsx
|
|
10009
|
-
import { defineComponent as defineComponent34, inject as
|
|
10030
|
+
import { defineComponent as defineComponent34, inject as inject21, ref as ref23 } from "vue";
|
|
10010
10031
|
import {
|
|
10011
10032
|
imageFileTypes,
|
|
10012
10033
|
insertImageFile,
|
|
@@ -10028,7 +10049,7 @@ var LinkControl = defineComponent34({
|
|
|
10028
10049
|
);
|
|
10029
10050
|
const editor = usePptxEditor();
|
|
10030
10051
|
const { t } = useTranslation();
|
|
10031
|
-
const host =
|
|
10052
|
+
const host = inject21(chromeActionHostKey, null);
|
|
10032
10053
|
const anchor = ref23(null);
|
|
10033
10054
|
return () => {
|
|
10034
10055
|
const enabled = cmd.isEnabled.value;
|
|
@@ -10715,7 +10736,7 @@ var DropdownControl = defineComponent38({
|
|
|
10715
10736
|
const off = useAriaDisabled(() => !cmd.isEnabled.value, reason);
|
|
10716
10737
|
const { t } = useTranslation();
|
|
10717
10738
|
const editor = usePptxEditor();
|
|
10718
|
-
const host =
|
|
10739
|
+
const host = inject22(chromeActionHostKey, null);
|
|
10719
10740
|
const anchor = ref27(null);
|
|
10720
10741
|
const open = ref27(false);
|
|
10721
10742
|
const offered = useOfferedControl(
|
|
@@ -10765,7 +10786,7 @@ var DropdownControl = defineComponent38({
|
|
|
10765
10786
|
off.note(),
|
|
10766
10787
|
open.value ? /* @__PURE__ */ jsx32(Popover, { anchor: anchor.value, onClose: () => open.value = false, children: {
|
|
10767
10788
|
default: () => options.map((o) => {
|
|
10768
|
-
const row =
|
|
10789
|
+
const row = toolbarDropdownRow2(
|
|
10769
10790
|
editor.value,
|
|
10770
10791
|
host,
|
|
10771
10792
|
props.slot,
|
|
@@ -10894,7 +10915,7 @@ var PanelControl = defineComponent38({
|
|
|
10894
10915
|
);
|
|
10895
10916
|
const editor = usePptxEditor();
|
|
10896
10917
|
const { t } = useTranslation();
|
|
10897
|
-
const host =
|
|
10918
|
+
const host = inject22(chromeActionHostKey, null);
|
|
10898
10919
|
return () => {
|
|
10899
10920
|
const enabled = cmd.isEnabled.value;
|
|
10900
10921
|
const why = reason.value;
|
|
@@ -10923,7 +10944,7 @@ var ActionControl = defineComponent38({
|
|
|
10923
10944
|
);
|
|
10924
10945
|
const editor = usePptxEditor();
|
|
10925
10946
|
const { t } = useTranslation();
|
|
10926
|
-
const host =
|
|
10947
|
+
const host = inject22(chromeActionHostKey, null);
|
|
10927
10948
|
const wrap = ref27(null);
|
|
10928
10949
|
const run = () => {
|
|
10929
10950
|
if (!host) return void cmd.execute();
|
|
@@ -10968,6 +10989,8 @@ var SHAPED_PARTS = {
|
|
|
10968
10989
|
"shape.fill": FillControl,
|
|
10969
10990
|
"shape.lineStart": LineMenuControl,
|
|
10970
10991
|
"shape.lineEnd": LineMenuControl,
|
|
10992
|
+
"shape.lineDash": LineMenuControl,
|
|
10993
|
+
"table.borderStyle": LineMenuControl,
|
|
10971
10994
|
"shape.styles": ShapeStyleGalleryControl,
|
|
10972
10995
|
"shape.effects": EffectMenuControl,
|
|
10973
10996
|
"shape.textEffects": TextEffectsMenuControl,
|
|
@@ -14929,7 +14952,7 @@ var ViewSwitch = defineComponent50({
|
|
|
14929
14952
|
setup() {
|
|
14930
14953
|
const { t } = useTranslation();
|
|
14931
14954
|
const cmd = useEditorCommand("view.presentationView");
|
|
14932
|
-
const options =
|
|
14955
|
+
const options = STATUS_BAR_VIEW_OPTIONS;
|
|
14933
14956
|
const off = computed24(() => !cmd.isEnabled.value);
|
|
14934
14957
|
const reason = computed24(
|
|
14935
14958
|
() => cmd.disabledReason.value ? translateKeyOrText16(t, cmd.disabledReason.value) : null
|
|
@@ -14960,8 +14983,9 @@ var ViewSwitch = defineComponent50({
|
|
|
14960
14983
|
"aria-label": t("toolbar.presentationView"),
|
|
14961
14984
|
onMousedown: keepFocus,
|
|
14962
14985
|
children: [
|
|
14963
|
-
options.map((o) => {
|
|
14986
|
+
options.map((o, i) => {
|
|
14964
14987
|
const on = cmd.value.value === o.value;
|
|
14988
|
+
const tabStop = on || i === 0 && !options.some((x) => x.value === cmd.value.value);
|
|
14965
14989
|
const label = t(o.labelKey);
|
|
14966
14990
|
return /* @__PURE__ */ jsx42(
|
|
14967
14991
|
"button",
|
|
@@ -14972,7 +14996,7 @@ var ViewSwitch = defineComponent50({
|
|
|
14972
14996
|
"aria-label": label,
|
|
14973
14997
|
...offAttrs.attrs.value,
|
|
14974
14998
|
...tooltipAttributes7(label, off.value, reason.value),
|
|
14975
|
-
tabindex:
|
|
14999
|
+
tabindex: tabStop ? 0 : -1,
|
|
14976
15000
|
class: "pptx-toolbar__button pptx-view-switch__option",
|
|
14977
15001
|
"data-active": on ? "" : void 0,
|
|
14978
15002
|
"data-disabled": off.value ? "" : void 0,
|
|
@@ -15121,8 +15145,9 @@ var pptxEditorRootProps = {
|
|
|
15121
15145
|
*/
|
|
15122
15146
|
modules: { type: Array, default: void 0 },
|
|
15123
15147
|
/**
|
|
15124
|
-
* AutoCorrect while typing (default `true`):
|
|
15125
|
-
*
|
|
15148
|
+
* AutoCorrect while typing (default `true`): symbols, ellipses, fractions, and lists started
|
|
15149
|
+
* by typing `1.`, `1)`, `*`, or `-` and a space. Capitals, curly quotes, dashes, and
|
|
15150
|
+
* spelling are never automatic here: keyboards and systems that offer them apply them. Read
|
|
15126
15151
|
* once, when the editor is created.
|
|
15127
15152
|
*/
|
|
15128
15153
|
autoCorrect: { type: Boolean, default: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pptx-editor.dev/vue",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Vue 3 adapter for PPTX Editor: a provider, composables, and chrome components over the @pptx-editor.dev/core editor contract.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"api:check": "node ../../scripts/api-extractor.mjs --package @pptx-editor.dev/vue"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pptx-editor.dev/i18n": "0.3.
|
|
31
|
+
"@pptx-editor.dev/i18n": "^0.3.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@pptx-editor.dev/core": "0.3.0
|
|
34
|
+
"@pptx-editor.dev/core": "~0.3.0",
|
|
35
35
|
"vue": "^3.5.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|