@oneclick.dev/cms-kit 0.0.55 → 0.0.57
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/cms-kit.cjs +2 -2
- package/dist/cms-kit.js +18 -28
- package/package.json +2 -2
package/dist/cms-kit.js
CHANGED
|
@@ -39191,7 +39191,7 @@ function domPosInText(node, x, y) {
|
|
|
39191
39191
|
let right = x >= (rect.left + rect.right) / 2, after = right;
|
|
39192
39192
|
if (browser$1.chrome || browser$1.gecko) {
|
|
39193
39193
|
let rectBefore = textRange(node, i).getBoundingClientRect();
|
|
39194
|
-
if (rectBefore.left
|
|
39194
|
+
if (Math.abs(rectBefore.left - rect.right) < 0.1)
|
|
39195
39195
|
after = !right;
|
|
39196
39196
|
}
|
|
39197
39197
|
if (dy <= 0)
|
|
@@ -39613,7 +39613,10 @@ class DOMChange {
|
|
|
39613
39613
|
anchor = view.state.doc.length;
|
|
39614
39614
|
}
|
|
39615
39615
|
}
|
|
39616
|
-
|
|
39616
|
+
if (view.inputState.composing > -1 && view.state.selection.ranges.length > 1)
|
|
39617
|
+
this.newSel = view.state.selection.replaceRange(EditorSelection.range(anchor, head));
|
|
39618
|
+
else
|
|
39619
|
+
this.newSel = EditorSelection.single(anchor, head);
|
|
39617
39620
|
}
|
|
39618
39621
|
}
|
|
39619
39622
|
}
|
|
@@ -39720,7 +39723,7 @@ function applyDefaultInsert(view, change, newSel) {
|
|
|
39720
39723
|
} else {
|
|
39721
39724
|
let changes = startState.changes(change);
|
|
39722
39725
|
let mainSel = newSel && newSel.main.to <= changes.newLength ? newSel.main : void 0;
|
|
39723
|
-
if (startState.selection.ranges.length > 1 && view.inputState.composing >= 0 && change.to <= sel.to + 10 && change.to >= sel.to - 10) {
|
|
39726
|
+
if (startState.selection.ranges.length > 1 && (view.inputState.composing >= 0 || view.inputState.compositionPendingChange) && change.to <= sel.to + 10 && change.to >= sel.to - 10) {
|
|
39724
39727
|
let replaced = view.state.sliceDoc(change.from, change.to);
|
|
39725
39728
|
let compositionRange, composition = newSel && findCompositionNode(view, newSel.main.head);
|
|
39726
39729
|
if (composition) {
|
|
@@ -39729,16 +39732,16 @@ function applyDefaultInsert(view, change, newSel) {
|
|
|
39729
39732
|
} else {
|
|
39730
39733
|
compositionRange = view.state.doc.lineAt(sel.head);
|
|
39731
39734
|
}
|
|
39732
|
-
let offset = sel.to - change.to
|
|
39735
|
+
let offset = sel.to - change.to;
|
|
39733
39736
|
tr2 = startState.changeByRange((range) => {
|
|
39734
39737
|
if (range.from == sel.from && range.to == sel.to)
|
|
39735
39738
|
return { changes, range: mainSel || range.map(changes) };
|
|
39736
39739
|
let to2 = range.to - offset, from = to2 - replaced.length;
|
|
39737
|
-
if (
|
|
39740
|
+
if (view.state.sliceDoc(from, to2) != replaced || // Unfortunately, there's no way to make multiple
|
|
39738
39741
|
// changes in the same node work without aborting
|
|
39739
39742
|
// composition, so cursors in the composition range are
|
|
39740
39743
|
// ignored.
|
|
39741
|
-
|
|
39744
|
+
to2 >= compositionRange.from && from <= compositionRange.to)
|
|
39742
39745
|
return { range };
|
|
39743
39746
|
let rangeChanges = startState.changes({ from, to: to2, insert: change.insert }), selOff = range.to - sel.to;
|
|
39744
39747
|
return {
|
|
@@ -69319,11 +69322,7 @@ const _hoisted_1$7$1 = [
|
|
|
69319
69322
|
"data-expanded",
|
|
69320
69323
|
"data-testid"
|
|
69321
69324
|
];
|
|
69322
|
-
const _hoisted_2$2$2 = [
|
|
69323
|
-
"aria-label",
|
|
69324
|
-
"data-disabled",
|
|
69325
|
-
"data-close-button-position"
|
|
69326
|
-
];
|
|
69325
|
+
const _hoisted_2$2$2 = ["aria-label", "data-disabled"];
|
|
69327
69326
|
var Toast_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
69328
69327
|
__name: "Toast",
|
|
69329
69328
|
props: {
|
|
@@ -69336,7 +69335,6 @@ var Toast_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
69336
69335
|
heights: {},
|
|
69337
69336
|
gap: {},
|
|
69338
69337
|
position: {},
|
|
69339
|
-
closeButtonPosition: {},
|
|
69340
69338
|
visibleToasts: {},
|
|
69341
69339
|
expandByDefault: { type: Boolean },
|
|
69342
69340
|
closeButton: { type: Boolean },
|
|
@@ -69608,13 +69606,9 @@ var Toast_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
69608
69606
|
"aria-label": _ctx.closeButtonAriaLabel || "Close toast",
|
|
69609
69607
|
"data-disabled": disabled.value,
|
|
69610
69608
|
"data-close-button": "true",
|
|
69611
|
-
"data-close-button-position": _ctx.closeButtonPosition,
|
|
69612
69609
|
class: normalizeClass(unref(cn$1)((_g = _ctx.classes) == null ? void 0 : _g.closeButton, (_i2 = (_h = _ctx.toast) == null ? void 0 : _h.classes) == null ? void 0 : _i2.closeButton)),
|
|
69613
69610
|
onClick: handleCloseToast
|
|
69614
|
-
}, [((_j = _ctx.icons) == null ? void 0 : _j.close) ? (openBlock(), createBlock(resolveDynamicComponent((_k = _ctx.icons) == null ? void 0 : _k.close), { key: 0 })) : renderSlot(_ctx.$slots, "close-icon", { key: 1 })], 10, _hoisted_2$2$2)) : createCommentVNode("v-if", true), _ctx.toast.component ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.toast.component), mergeProps({ key: 1 }, _ctx.toast.componentProps, {
|
|
69615
|
-
onCloseToast: handleCloseToast,
|
|
69616
|
-
isPaused: _ctx.$props.expanded || _ctx.$props.interacting || unref(isDocumentHidden)
|
|
69617
|
-
}), null, 16, ["isPaused"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
69611
|
+
}, [((_j = _ctx.icons) == null ? void 0 : _j.close) ? (openBlock(), createBlock(resolveDynamicComponent((_k = _ctx.icons) == null ? void 0 : _k.close), { key: 0 })) : renderSlot(_ctx.$slots, "close-icon", { key: 1 })], 10, _hoisted_2$2$2)) : createCommentVNode("v-if", true), _ctx.toast.component ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.toast.component), mergeProps({ key: 1 }, _ctx.toast.componentProps, { onCloseToast: handleCloseToast }), null, 16)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
69618
69612
|
toastType.value !== "default" || _ctx.toast.icon || _ctx.toast.promise ? (openBlock(), createElementBlock("div", {
|
|
69619
69613
|
key: 0,
|
|
69620
69614
|
"data-icon": "",
|
|
@@ -69809,7 +69803,6 @@ var Toaster_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
69809
69803
|
},
|
|
69810
69804
|
theme: { default: "light" },
|
|
69811
69805
|
position: { default: "bottom-right" },
|
|
69812
|
-
closeButtonPosition: { default: "top-left" },
|
|
69813
69806
|
hotkey: { default: () => ["altKey", "KeyT"] },
|
|
69814
69807
|
richColors: {
|
|
69815
69808
|
type: Boolean,
|
|
@@ -70063,7 +70056,7 @@ var Toaster_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
70063
70056
|
onPointerdown: onPointerDown,
|
|
70064
70057
|
onPointerup: handlePointerUp
|
|
70065
70058
|
}), [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredToasts(pos, index), (toast$1, idx) => {
|
|
70066
|
-
var _a3, _b, _c, _d, _e2, _f, _g, _h, _i2, _j
|
|
70059
|
+
var _a3, _b, _c, _d, _e2, _f, _g, _h, _i2, _j;
|
|
70067
70060
|
return openBlock(), createBlock(Toast_default, {
|
|
70068
70061
|
key: toast$1.id,
|
|
70069
70062
|
heights: heights.value,
|
|
@@ -70079,13 +70072,12 @@ var Toaster_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
70079
70072
|
closeButton: ((_d = _ctx.toastOptions) == null ? void 0 : _d.closeButton) ?? _ctx.closeButton,
|
|
70080
70073
|
interacting: interacting.value,
|
|
70081
70074
|
position: pos,
|
|
70082
|
-
|
|
70083
|
-
|
|
70084
|
-
|
|
70085
|
-
|
|
70086
|
-
|
|
70087
|
-
|
|
70088
|
-
"close-button-aria-label": (_k = _ctx.toastOptions) == null ? void 0 : _k.closeButtonAriaLabel,
|
|
70075
|
+
style: normalizeStyle((_e2 = _ctx.toastOptions) == null ? void 0 : _e2.style),
|
|
70076
|
+
unstyled: (_f = _ctx.toastOptions) == null ? void 0 : _f.unstyled,
|
|
70077
|
+
classes: (_g = _ctx.toastOptions) == null ? void 0 : _g.classes,
|
|
70078
|
+
cancelButtonStyle: (_h = _ctx.toastOptions) == null ? void 0 : _h.cancelButtonStyle,
|
|
70079
|
+
actionButtonStyle: (_i2 = _ctx.toastOptions) == null ? void 0 : _i2.actionButtonStyle,
|
|
70080
|
+
"close-button-aria-label": (_j = _ctx.toastOptions) == null ? void 0 : _j.closeButtonAriaLabel,
|
|
70089
70081
|
toasts: toastsByPosition.value[pos],
|
|
70090
70082
|
expandByDefault: _ctx.expand,
|
|
70091
70083
|
gap: _ctx.gap,
|
|
@@ -70116,7 +70108,6 @@ var Toaster_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ define
|
|
|
70116
70108
|
"closeButton",
|
|
70117
70109
|
"interacting",
|
|
70118
70110
|
"position",
|
|
70119
|
-
"closeButtonPosition",
|
|
70120
70111
|
"style",
|
|
70121
70112
|
"unstyled",
|
|
70122
70113
|
"classes",
|
|
@@ -133868,7 +133859,6 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
133868
133859
|
invert: { type: Boolean },
|
|
133869
133860
|
theme: {},
|
|
133870
133861
|
position: {},
|
|
133871
|
-
closeButtonPosition: {},
|
|
133872
133862
|
hotkey: {},
|
|
133873
133863
|
richColors: { type: Boolean },
|
|
133874
133864
|
expand: { type: Boolean },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneclick.dev/cms-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/cms-kit.cjs",
|
|
6
6
|
"module": "./dist/cms-kit.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"nuxt": "^3.17.0",
|
|
27
27
|
"vue": "^3.3.0",
|
|
28
|
-
"vue-sonner": "
|
|
28
|
+
"vue-sonner": "2.0.7"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "vite build",
|