@vizel/vue 0.0.1-alpha.1 → 0.0.1-alpha.4

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 (55) hide show
  1. package/dist/index.d.ts +7 -7
  2. package/dist/index.js +69 -61
  3. package/dist/index10.js +80 -127
  4. package/dist/index11.js +55 -24
  5. package/dist/index12.js +28 -8
  6. package/dist/index13.js +60 -75
  7. package/dist/index14.js +98 -124
  8. package/dist/index15.js +9 -31
  9. package/dist/index16.js +184 -14
  10. package/dist/index17.js +14 -77
  11. package/dist/index18.js +28 -113
  12. package/dist/index19.js +128 -14
  13. package/dist/index2.js +73 -82
  14. package/dist/index20.js +24 -46
  15. package/dist/index21.js +10 -41
  16. package/dist/index22.js +12 -10
  17. package/dist/index23.js +89 -14
  18. package/dist/index24.js +130 -33
  19. package/dist/index25.js +34 -45
  20. package/dist/index26.js +19 -22
  21. package/dist/index27.js +77 -8
  22. package/dist/index28.js +118 -44
  23. package/dist/index29.js +18 -20
  24. package/dist/index3.js +49 -56
  25. package/dist/index30.js +50 -13
  26. package/dist/index31.js +41 -2
  27. package/dist/index32.js +36 -2
  28. package/dist/index33.js +46 -2
  29. package/dist/index34.js +22 -2
  30. package/dist/index35.js +8 -2
  31. package/dist/index36.js +44 -2
  32. package/dist/index37.js +21 -2
  33. package/dist/index38.js +13 -2
  34. package/dist/index39.js +15 -2
  35. package/dist/index4.js +236 -30
  36. package/dist/index47.js +1 -1
  37. package/dist/index48.js +1 -1
  38. package/dist/index49.js +1 -1
  39. package/dist/index5.js +78 -70
  40. package/dist/index50.js +1 -1
  41. package/dist/index51.js +1 -1
  42. package/dist/index52.js +4 -0
  43. package/dist/index53.js +4 -0
  44. package/dist/index54.js +4 -0
  45. package/dist/index55.js +4 -0
  46. package/dist/index56.js +4 -0
  47. package/dist/index57.js +4 -0
  48. package/dist/index58.js +4 -0
  49. package/dist/index59.js +4 -0
  50. package/dist/index6.js +72 -103
  51. package/dist/index60.js +4 -0
  52. package/dist/index7.js +62 -11
  53. package/dist/index8.js +57 -186
  54. package/dist/index9.js +2 -35
  55. package/package.json +25 -32
package/dist/index21.js CHANGED
@@ -1,43 +1,12 @@
1
- import { defineComponent as i, ref as n, computed as T, provide as h, onMounted as d, watch as c, onBeforeUnmount as f, renderSlot as p } from "vue";
2
- import { VIZEL_DEFAULT_THEME_STORAGE_KEY as E, VIZEL_DEFAULT_THEME as g, getStoredVizelTheme as _, getVizelSystemTheme as v, resolveVizelTheme as S, applyVizelTheme as s, createVizelSystemThemeListener as V, storeVizelTheme as y } from "@vizel/core";
3
- import { VIZEL_THEME_CONTEXT_KEY as z } from "./index31.js";
4
- const b = /* @__PURE__ */ i({
5
- __name: "VizelThemeProvider",
6
- props: {
7
- defaultTheme: { default: g },
8
- storageKey: { default: E },
9
- targetSelector: {},
10
- disableTransitionOnChange: { type: Boolean, default: !1 }
11
- },
12
- setup(m) {
13
- const t = m, r = n(_(t.storageKey) ?? t.defaultTheme), o = n(v()), a = T(() => S(r.value, o.value));
14
- function u(e) {
15
- r.value = e, y(t.storageKey, e);
16
- }
17
- h(z, {
18
- get theme() {
19
- return r.value;
20
- },
21
- get resolvedTheme() {
22
- return a.value;
23
- },
24
- get systemTheme() {
25
- return o.value;
26
- },
27
- setTheme: u
28
- });
29
- let l = null;
30
- return d(() => {
31
- s(a.value, t.targetSelector, t.disableTransitionOnChange), l = V((e) => {
32
- o.value = e;
33
- });
34
- }), c(a, (e) => {
35
- s(e, t.targetSelector, t.disableTransitionOnChange);
36
- }), f(() => {
37
- l && l();
38
- }), (e, C) => p(e.$slots, "default");
39
- }
40
- });
1
+ import { provide as e, inject as t } from "vue";
2
+ const o = /* @__PURE__ */ Symbol("vizel-icon-context");
3
+ function c(n) {
4
+ e(o, { customIcons: n });
5
+ }
6
+ function r() {
7
+ return t(o, {});
8
+ }
41
9
  export {
42
- b as default
10
+ c as provideVizelIcons,
11
+ r as useVizelIconContext
43
12
  };
package/dist/index22.js CHANGED
@@ -1,12 +1,14 @@
1
- import { provide as e, inject as t } from "vue";
2
- const o = /* @__PURE__ */ Symbol("vizel-icon-context");
3
- function c(n) {
4
- e(o, { customIcons: n });
5
- }
6
- function r() {
7
- return t(o, {});
8
- }
1
+ import { defineComponent as r, renderSlot as n } from "vue";
2
+ import { provideVizelIcons as s } from "./index21.js";
3
+ const m = /* @__PURE__ */ r({
4
+ __name: "VizelIconProvider",
5
+ props: {
6
+ icons: {}
7
+ },
8
+ setup(o) {
9
+ return s(o.icons), (e, p) => n(e.$slots, "default");
10
+ }
11
+ });
9
12
  export {
10
- c as provideVizelIcons,
11
- r as useVizelIconContext
13
+ m as default
12
14
  };
package/dist/index23.js CHANGED
@@ -1,16 +1,91 @@
1
- import { inject as t, computed as i } from "vue";
2
- const o = /* @__PURE__ */ Symbol("vizel-editor");
3
- function r() {
4
- const e = t(o);
5
- if (!e)
6
- throw new Error("useVizelContext must be used within a VizelProvider");
7
- return i(() => e());
8
- }
9
- function u() {
10
- return t(o, null);
11
- }
1
+ import { defineComponent as R, ref as r, computed as d, onMounted as V, onUnmounted as C, createElementBlock as m, openBlock as c, normalizeClass as M, createElementVNode as i, createCommentVNode as E, withDirectives as h, vModelText as U, createVNode as y, vModelCheckbox as D } from "vue";
2
+ import { detectVizelEmbedProvider as B } from "@vizel/core";
3
+ import g from "./index20.js";
4
+ const N = { class: "vizel-link-editor-row" }, P = {
5
+ type: "submit",
6
+ class: "vizel-link-button",
7
+ title: "Apply"
8
+ }, A = {
9
+ key: 0,
10
+ class: "vizel-link-editor-embed-toggle"
11
+ }, H = /* @__PURE__ */ R({
12
+ __name: "VizelLinkEditor",
13
+ props: {
14
+ editor: {},
15
+ class: {},
16
+ enableEmbed: { type: Boolean, default: !1 }
17
+ },
18
+ emits: ["close"],
19
+ setup(z, { emit: L }) {
20
+ const n = z, o = L, s = r(null), f = r(null), v = d(() => n.editor.getAttributes("link").href || ""), l = r(v.value), u = r(!1), p = d(() => n.enableEmbed ? n.editor.extensionManager.extensions.some((e) => e.name === "embed") : !1), x = d(() => l.value.trim() ? B(l.value.trim()) !== null : !1);
21
+ function k(t) {
22
+ s.value && !s.value.contains(t.target) && o("close");
23
+ }
24
+ function b(t) {
25
+ t.key === "Escape" && (t.preventDefault(), t.stopImmediatePropagation(), o("close"));
26
+ }
27
+ V(() => {
28
+ f.value?.focus(), setTimeout(() => {
29
+ document.addEventListener("mousedown", k);
30
+ }, 0), document.addEventListener("keydown", b, !0);
31
+ }), C(() => {
32
+ document.removeEventListener("mousedown", k), document.removeEventListener("keydown", b, !0);
33
+ });
34
+ function _(t) {
35
+ t.preventDefault();
36
+ const e = l.value.trim();
37
+ if (!e) {
38
+ n.editor.chain().focus().unsetLink().run(), o("close");
39
+ return;
40
+ }
41
+ u.value && p.value ? n.editor.chain().focus().unsetLink().setEmbed({ url: e }).run() : n.editor.chain().focus().setLink({ href: e }).run(), o("close");
42
+ }
43
+ function w() {
44
+ n.editor.chain().focus().unsetLink().run(), o("close");
45
+ }
46
+ return (t, e) => (c(), m("form", {
47
+ ref_key: "formRef",
48
+ ref: s,
49
+ class: M(["vizel-link-editor", t.$props.class]),
50
+ onSubmit: _
51
+ }, [
52
+ i("div", N, [
53
+ h(i("input", {
54
+ ref_key: "inputRef",
55
+ ref: f,
56
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => l.value = a),
57
+ type: "url",
58
+ placeholder: "Enter URL...",
59
+ class: "vizel-link-input"
60
+ }, null, 512), [
61
+ [U, l.value]
62
+ ]),
63
+ i("button", P, [
64
+ y(g, { name: "check" })
65
+ ]),
66
+ v.value ? (c(), m("button", {
67
+ key: 0,
68
+ type: "button",
69
+ class: "vizel-link-button vizel-link-remove",
70
+ title: "Remove link",
71
+ onClick: w
72
+ }, [
73
+ y(g, { name: "x" })
74
+ ])) : E("", !0)
75
+ ]),
76
+ p.value && x.value ? (c(), m("div", A, [
77
+ h(i("input", {
78
+ id: "vizel-embed-toggle",
79
+ "onUpdate:modelValue": e[1] || (e[1] = (a) => u.value = a),
80
+ type: "checkbox"
81
+ }, null, 512), [
82
+ [D, u.value]
83
+ ]),
84
+ e[2] || (e[2] = i("label", { for: "vizel-embed-toggle" }, "Embed as rich content", -1))
85
+ ])) : E("", !0)
86
+ ], 34));
87
+ }
88
+ });
12
89
  export {
13
- o as VIZEL_CONTEXT_KEY,
14
- r as useVizelContext,
15
- u as useVizelContextSafe
90
+ H as default
16
91
  };
package/dist/index24.js CHANGED
@@ -1,37 +1,134 @@
1
- import { handleVizelSuggestionEscape as m, createVizelSuggestionContainer as c } from "@vizel/core";
2
- import { ref as o, createApp as s, h as d } from "vue";
3
- import f from "./index18.js";
4
- function R(u = {}) {
5
- return {
6
- render: () => {
7
- let t = null, n = null;
8
- const r = o(null), a = o([]), l = o(null);
9
- return {
10
- onStart: (e) => {
11
- a.value = e.items, l.value = e.command, n = c(), t = s({
12
- setup() {
13
- return () => d(f, {
14
- items: a.value,
15
- ...u.className !== void 0 && { class: u.className },
16
- ref: r,
17
- onCommand: (i) => {
18
- l.value?.(i);
19
- }
20
- });
21
- }
22
- }), t.mount(n.menuContainer), n.updatePosition(e.clientRect);
23
- },
24
- onUpdate: (e) => {
25
- a.value = e.items, l.value = e.command, n?.updatePosition(e.clientRect);
26
- },
27
- onKeyDown: (e) => m(e.event) ? !0 : r.value?.onKeyDown(e.event) ?? !1,
28
- onExit: () => {
29
- t?.unmount(), n?.destroy(), t = null, n = null;
1
+ import { defineComponent as E, ref as i, computed as m, onMounted as V, onUnmounted as A, watch as $, nextTick as S, createElementBlock as r, openBlock as c, normalizeClass as D, createElementVNode as l, createCommentVNode as g, createVNode as d, toDisplayString as N, Fragment as L, renderList as R } from "vue";
2
+ import { vizelDefaultNodeTypes as B, getVizelActiveNodeType as K } from "@vizel/core";
3
+ import { useVizelState as M } from "./index37.js";
4
+ import u from "./index20.js";
5
+ const I = ["aria-expanded", "aria-label"], O = { class: "vizel-node-selector-icon" }, U = { class: "vizel-node-selector-label" }, F = {
6
+ class: "vizel-node-selector-chevron",
7
+ "aria-hidden": "true"
8
+ }, H = ["aria-selected", "tabindex", "onClick", "onMouseenter"], j = { class: "vizel-node-selector-option-icon" }, q = { class: "vizel-node-selector-option-label" }, G = {
9
+ key: 0,
10
+ class: "vizel-node-selector-check",
11
+ "aria-hidden": "true"
12
+ }, X = /* @__PURE__ */ E({
13
+ __name: "VizelNodeSelector",
14
+ props: {
15
+ editor: {},
16
+ nodeTypes: { default: () => B },
17
+ class: {}
18
+ },
19
+ setup(T) {
20
+ const o = T, k = M(() => o.editor), n = i(!1), t = i(0), p = i(null), y = i(null), h = m(() => (k.value, K(o.editor, o.nodeTypes))), b = m(() => h.value?.label ?? "Text"), C = m(() => h.value?.icon ?? "paragraph");
21
+ function _(e) {
22
+ p.value && !p.value.contains(e.target) && (n.value = !1);
23
+ }
24
+ V(() => {
25
+ document.addEventListener("mousedown", _);
26
+ }), A(() => {
27
+ document.removeEventListener("mousedown", _);
28
+ }), $(n, (e) => {
29
+ e && S(() => {
30
+ y.value?.focus();
31
+ });
32
+ });
33
+ function w(e) {
34
+ if (!n.value) {
35
+ (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), n.value = !0, t.value = 0);
36
+ return;
37
+ }
38
+ switch (e.key) {
39
+ case "Escape":
40
+ e.preventDefault(), n.value = !1;
41
+ break;
42
+ case "ArrowDown":
43
+ e.preventDefault(), t.value = (t.value + 1) % o.nodeTypes.length;
44
+ break;
45
+ case "ArrowUp":
46
+ e.preventDefault(), t.value = (t.value - 1 + o.nodeTypes.length) % o.nodeTypes.length;
47
+ break;
48
+ case "Enter":
49
+ case " ": {
50
+ e.preventDefault();
51
+ const s = o.nodeTypes[t.value];
52
+ s && z(s);
53
+ break;
30
54
  }
31
- };
55
+ case "Home":
56
+ e.preventDefault(), t.value = 0;
57
+ break;
58
+ case "End":
59
+ e.preventDefault(), t.value = o.nodeTypes.length - 1;
60
+ break;
61
+ }
62
+ }
63
+ function z(e) {
64
+ e.command(o.editor), n.value = !1;
65
+ }
66
+ function v(e) {
67
+ return k.value, e.isActive(o.editor);
32
68
  }
33
- };
34
- }
69
+ return (e, s) => (c(), r("div", {
70
+ ref_key: "containerRef",
71
+ ref: p,
72
+ class: D(["vizel-node-selector", e.$props.class]),
73
+ "data-vizel-node-selector": ""
74
+ }, [
75
+ l("button", {
76
+ type: "button",
77
+ class: "vizel-node-selector-trigger",
78
+ "aria-haspopup": !0,
79
+ "aria-expanded": n.value,
80
+ "aria-label": `Current block type: ${b.value}`,
81
+ title: "Change block type",
82
+ onClick: s[0] || (s[0] = (a) => n.value = !n.value),
83
+ onKeydown: w
84
+ }, [
85
+ l("span", O, [
86
+ d(u, { name: C.value }, null, 8, ["name"])
87
+ ]),
88
+ l("span", U, N(b.value), 1),
89
+ l("span", F, [
90
+ d(u, { name: "chevronDown" })
91
+ ])
92
+ ], 40, I),
93
+ n.value ? (c(), r("div", {
94
+ key: 0,
95
+ ref_key: "dropdownRef",
96
+ ref: y,
97
+ class: "vizel-node-selector-dropdown",
98
+ role: "listbox",
99
+ "aria-label": "Block types",
100
+ "data-vizel-node-selector-dropdown": "",
101
+ tabindex: "-1",
102
+ onKeydown: w
103
+ }, [
104
+ (c(!0), r(L, null, R(o.nodeTypes, (a, f) => (c(), r("button", {
105
+ key: a.name,
106
+ type: "button",
107
+ role: "option",
108
+ "aria-selected": v(a),
109
+ class: D([
110
+ "vizel-node-selector-option",
111
+ { "is-active": v(a) },
112
+ { "is-focused": f === t.value }
113
+ ]),
114
+ tabindex: f === t.value ? 0 : -1,
115
+ onClick: (x) => z(a),
116
+ onMouseenter: (x) => t.value = f
117
+ }, [
118
+ l("span", j, [
119
+ d(u, {
120
+ name: a.icon
121
+ }, null, 8, ["name"])
122
+ ]),
123
+ l("span", q, N(a.label), 1),
124
+ v(a) ? (c(), r("span", G, [
125
+ d(u, { name: "check" })
126
+ ])) : g("", !0)
127
+ ], 42, H))), 128))
128
+ ], 544)) : g("", !0)
129
+ ], 2));
130
+ }
131
+ });
35
132
  export {
36
- R as createVizelSlashMenuRenderer
133
+ X as default
37
134
  };
package/dist/index25.js CHANGED
@@ -1,48 +1,37 @@
1
- import { VIZEL_DEFAULT_AUTO_SAVE_OPTIONS as h, createVizelAutoSaveHandlers as f } from "@vizel/core";
2
- import { reactive as i, onMounted as U, watch as S, onBeforeUnmount as C, computed as t } from "vue";
3
- function A(o, u = {}) {
4
- const r = { ...h, ...u }, a = i({
5
- status: "saved",
6
- hasUnsavedChanges: !1,
7
- lastSaved: null,
8
- error: null
9
- });
10
- let n = null, e = null;
11
- const l = (s) => {
12
- s.status !== void 0 && (a.status = s.status), s.hasUnsavedChanges !== void 0 && (a.hasUnsavedChanges = s.hasUnsavedChanges), s.lastSaved !== void 0 && (a.lastSaved = s.lastSaved), s.error !== void 0 && (a.error = s.error);
13
- }, d = () => {
14
- const s = o();
15
- if (n && e && (n.off("update", e.handleUpdate), e.cancel()), n = s ?? null, !(n && r.enabled)) {
16
- e = null;
17
- return;
18
- }
19
- e = f(() => n, r, l), n.on("update", e.handleUpdate);
20
- };
21
- U(() => {
22
- d();
23
- }), S(
24
- () => o(),
25
- () => {
26
- d();
27
- }
28
- ), C(() => {
29
- n && e && (n.off("update", e.handleUpdate), e.cancel());
30
- });
31
- async function v() {
32
- await e?.saveNow();
1
+ import { defineComponent as d, ref as p, onMounted as i, computed as o, createBlock as u, renderSlot as a, openBlock as c, Teleport as f, createElementVNode as m, normalizeStyle as y, normalizeClass as v } from "vue";
2
+ import { getVizelPortalContainer as z, VIZEL_PORTAL_ID as _, VIZEL_PORTAL_Z_INDEX as I } from "@vizel/core";
3
+ const V = ["data-vizel-portal-layer"], P = /* @__PURE__ */ d({
4
+ __name: "VizelPortal",
5
+ props: {
6
+ layer: { default: "dropdown" },
7
+ class: {},
8
+ disabled: { type: Boolean, default: !1 }
9
+ },
10
+ setup(e) {
11
+ const r = e, l = p(!1);
12
+ i(() => {
13
+ z(), l.value = !0;
14
+ });
15
+ const s = o(() => `#${_}`), n = o(() => ({
16
+ position: "absolute",
17
+ top: 0,
18
+ left: 0,
19
+ zIndex: I[r.layer]
20
+ }));
21
+ return (t, k) => l.value && !e.disabled ? (c(), u(f, {
22
+ key: 0,
23
+ to: s.value
24
+ }, [
25
+ m("div", {
26
+ "data-vizel-portal-layer": e.layer,
27
+ class: v(t.$props.class),
28
+ style: y(n.value)
29
+ }, [
30
+ a(t.$slots, "default")
31
+ ], 14, V)
32
+ ], 8, ["to"])) : a(t.$slots, "default", { key: 1 });
33
33
  }
34
- async function c() {
35
- return await e?.restore() ?? null;
36
- }
37
- return {
38
- status: t(() => a.status),
39
- hasUnsavedChanges: t(() => a.hasUnsavedChanges),
40
- lastSaved: t(() => a.lastSaved),
41
- error: t(() => a.error),
42
- save: v,
43
- restore: c
44
- };
45
- }
34
+ });
46
35
  export {
47
- A as useVizelAutoSave
36
+ P as default
48
37
  };
package/dist/index26.js CHANGED
@@ -1,24 +1,21 @@
1
- import { createVizelEditorInstance as l, registerVizelUploadEventHandler as d } from "@vizel/core";
2
- import { shallowRef as u, onMounted as c, onBeforeUnmount as m } from "vue";
3
- import { createVizelSlashMenuRenderer as p } from "./index24.js";
4
- function E(o = {}) {
5
- const { features: e, extensions: r = [], ...i } = o, a = typeof e?.image == "object" ? e.image : {}, t = u(null);
6
- let n = null;
7
- return c(() => {
8
- const { editor: s } = l({
9
- ...i,
10
- ...e !== void 0 && { features: e },
11
- extensions: r,
12
- createSlashMenuRenderer: p
13
- });
14
- t.value = s, n = d({
15
- getEditor: () => t.value,
16
- getImageOptions: () => a
17
- });
18
- }), m(() => {
19
- n?.(), t.value?.destroy();
20
- }), t;
21
- }
1
+ import { defineComponent as s, provide as t, createElementBlock as a, openBlock as l, normalizeClass as n, renderSlot as p } from "vue";
2
+ import { VIZEL_CONTEXT_KEY as i } from "./index17.js";
3
+ const f = /* @__PURE__ */ s({
4
+ __name: "VizelProvider",
5
+ props: {
6
+ editor: {},
7
+ class: {}
8
+ },
9
+ setup(o) {
10
+ const r = o;
11
+ return t(i, () => r.editor), (e, c) => (l(), a("div", {
12
+ class: n(e.$props.class),
13
+ "data-vizel-root": ""
14
+ }, [
15
+ p(e.$slots, "default")
16
+ ], 2));
17
+ }
18
+ });
22
19
  export {
23
- E as useVizelEditor
20
+ f as default
24
21
  };
package/dist/index27.js CHANGED
@@ -1,10 +1,79 @@
1
- import { getVizelEditorState as o } from "@vizel/core";
2
- import { computed as r } from "vue";
3
- import { useVizelState as i } from "./index29.js";
4
- function p(t) {
5
- const e = i(t);
6
- return r(() => (e.value, o(t())));
7
- }
1
+ import { defineComponent as _, ref as h, onMounted as z, watch as S, onBeforeUnmount as k, computed as l, createElementBlock as i, openBlock as a, normalizeClass as y, createElementVNode as c, createCommentVNode as v, createBlock as o, createVNode as T, toDisplayString as d } from "vue";
2
+ import { formatVizelRelativeTime as g } from "@vizel/core";
3
+ import s from "./index20.js";
4
+ const w = {
5
+ class: "vizel-save-indicator-icon",
6
+ "aria-hidden": "true"
7
+ }, B = {
8
+ key: 1,
9
+ class: "vizel-save-indicator-spinner",
10
+ "aria-hidden": "true"
11
+ }, V = { class: "vizel-save-indicator-text" }, I = {
12
+ key: 0,
13
+ class: "vizel-save-indicator-timestamp"
14
+ }, $ = /* @__PURE__ */ _({
15
+ __name: "VizelSaveIndicator",
16
+ props: {
17
+ status: {},
18
+ lastSaved: {},
19
+ showTimestamp: { type: Boolean, default: !0 },
20
+ class: {}
21
+ },
22
+ setup(u) {
23
+ const e = u, t = h("");
24
+ let n = null;
25
+ function r() {
26
+ e.lastSaved ? t.value = g(e.lastSaved) : t.value = "";
27
+ }
28
+ z(() => {
29
+ r(), n = setInterval(r, 1e4);
30
+ }), S(
31
+ () => e.lastSaved,
32
+ () => {
33
+ r();
34
+ }
35
+ ), k(() => {
36
+ n && clearInterval(n);
37
+ });
38
+ const m = l(() => {
39
+ switch (e.status) {
40
+ case "saved":
41
+ return "Saved";
42
+ case "saving":
43
+ return "Saving...";
44
+ case "unsaved":
45
+ return "Unsaved";
46
+ case "error":
47
+ return "Error saving";
48
+ default:
49
+ return "";
50
+ }
51
+ }), p = l(() => e.showTimestamp && e.lastSaved && t.value && e.status === "saved");
52
+ return (f, x) => (a(), i("div", {
53
+ class: y(["vizel-save-indicator", `vizel-save-indicator--${e.status}`, f.$props.class]),
54
+ role: "status",
55
+ "aria-live": "polite",
56
+ "data-vizel-save-indicator": ""
57
+ }, [
58
+ c("span", w, [
59
+ e.status === "saved" ? (a(), o(s, {
60
+ key: 0,
61
+ name: "check"
62
+ })) : e.status === "saving" ? (a(), i("span", B, [
63
+ T(s, { name: "loader" })
64
+ ])) : e.status === "unsaved" ? (a(), o(s, {
65
+ key: 2,
66
+ name: "circle"
67
+ })) : e.status === "error" ? (a(), o(s, {
68
+ key: 3,
69
+ name: "warning"
70
+ })) : v("", !0)
71
+ ]),
72
+ c("span", V, d(m.value), 1),
73
+ p.value ? (a(), i("span", I, d(t.value), 1)) : v("", !0)
74
+ ], 2));
75
+ }
76
+ });
8
77
  export {
9
- p as useVizelEditorState
78
+ $ as default
10
79
  };