@templatical/editor 0.0.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.
@@ -0,0 +1,89 @@
1
+ import { defineComponent as g, computed as n, openBlock as t, createElementBlock as r, createElementVNode as C, unref as s, normalizeStyle as f, createBlock as u, Fragment as z, renderList as M, toDisplayString as h, createCommentVNode as m } from "vue";
2
+ import { c as k, u as w } from "./index-D-iD-7lO.js";
3
+ import "@templatical/types";
4
+ /**
5
+ * @license lucide-vue-next v0.475.0 - ISC
6
+ *
7
+ * This source code is licensed under the ISC license.
8
+ * See the LICENSE file in the root directory of this source tree.
9
+ */
10
+ const _ = k("WifiOffIcon", [
11
+ ["path", { d: "M12 20h.01", key: "zekei9" }],
12
+ ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }],
13
+ ["path", { d: "M5 12.859a10 10 0 0 1 5.17-2.69", key: "1dl1wf" }],
14
+ ["path", { d: "M19 12.859a10 10 0 0 0-2.007-1.523", key: "4k23kn" }],
15
+ ["path", { d: "M2 8.82a15 15 0 0 1 4.177-2.643", key: "1grhjp" }],
16
+ ["path", { d: "M22 8.82a15 15 0 0 0-11.288-3.764", key: "z3jwby" }],
17
+ ["path", { d: "m2 2 20 20", key: "1ooewy" }]
18
+ ]);
19
+ /**
20
+ * @license lucide-vue-next v0.475.0 - ISC
21
+ *
22
+ * This source code is licensed under the ISC license.
23
+ * See the LICENSE file in the root directory of this source tree.
24
+ */
25
+ const j = k("WifiIcon", [
26
+ ["path", { d: "M12 20h.01", key: "zekei9" }],
27
+ ["path", { d: "M2 8.82a15 15 0 0 1 20 0", key: "dnpr2z" }],
28
+ ["path", { d: "M5 12.859a10 10 0 0 1 14 0", key: "1x1e6c" }],
29
+ ["path", { d: "M8.5 16.429a5 5 0 0 1 7 0", key: "1bycff" }]
30
+ ]), B = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, I = ["title"], W = {
31
+ key: 0,
32
+ class: "tpl:flex tpl:items-center tpl:-space-x-1.5"
33
+ }, A = ["title"], N = ["title"], y = 3, O = /* @__PURE__ */ g({
34
+ __name: "CollaboratorBar",
35
+ props: {
36
+ collaborators: {},
37
+ isConnected: { type: Boolean }
38
+ },
39
+ setup(e) {
40
+ const c = e, { t: i } = w(), v = n(
41
+ () => c.collaborators.slice(0, y)
42
+ ), p = n(
43
+ () => c.collaborators.slice(y)
44
+ ), d = n(() => p.value.length), b = n(
45
+ () => p.value.map((l) => l.name).join(`
46
+ `)
47
+ );
48
+ function x(l) {
49
+ const o = l.trim().split(/\s+/);
50
+ return o.length >= 2 ? (o[0].charAt(0) + o[o.length - 1].charAt(0)).toUpperCase() : l.charAt(0).toUpperCase();
51
+ }
52
+ return (l, o) => (t(), r("div", B, [
53
+ C("div", {
54
+ class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]",
55
+ style: f({
56
+ color: e.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)"
57
+ }),
58
+ title: e.isConnected ? s(i).collaboration.connected : s(i).collaboration.disconnected
59
+ }, [
60
+ e.isConnected ? (t(), u(s(j), {
61
+ key: 0,
62
+ size: 12,
63
+ "stroke-width": 2
64
+ })) : (t(), u(s(_), {
65
+ key: 1,
66
+ size: 12,
67
+ "stroke-width": 2
68
+ }))
69
+ ], 12, I),
70
+ e.collaborators.length > 0 ? (t(), r("div", W, [
71
+ (t(!0), r(z, null, M(v.value, (a) => (t(), r("div", {
72
+ key: a.id,
73
+ class: "tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:text-white tpl:transition-transform tpl:duration-150 tpl:hover:z-10 tpl:hover:scale-110",
74
+ style: f([{ "border-color": "var(--tpl-bg)" }, { backgroundColor: a.color }]),
75
+ title: a.name
76
+ }, h(x(a.name)), 13, A))), 128)),
77
+ d.value > 0 ? (t(), r("div", {
78
+ key: 0,
79
+ class: "tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold",
80
+ style: { "border-color": "var(--tpl-bg)", "background-color": "var(--tpl-bg-hover)", color: "var(--tpl-text-muted)" },
81
+ title: b.value
82
+ }, " +" + h(d.value), 9, N)) : m("", !0)
83
+ ])) : m("", !0)
84
+ ]));
85
+ }
86
+ });
87
+ export {
88
+ O as default
89
+ };