@pie-element/simple-cloze 0.1.4-next.11 → 0.1.4-next.12
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/browser/editor-runtime/author/index.js +633 -0
- package/dist/browser/editor-runtime/author/index.js.map +1 -0
- package/dist/browser/editor-runtime/client-C4zbv8nl.js +2355 -0
- package/dist/browser/editor-runtime/client-C4zbv8nl.js.map +1 -0
- package/dist/browser/editor-runtime/controller/index.js +2 -0
- package/dist/browser/editor-runtime/controller-1IBOQFFL.js +69 -0
- package/dist/browser/editor-runtime/controller-1IBOQFFL.js.map +1 -0
- package/dist/browser/editor-runtime/delivery/index.js +243 -0
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
- package/dist/browser/editor-runtime/i18n-BDkxR45Z.js +1614 -0
- package/dist/browser/editor-runtime/i18n-BDkxR45Z.js.map +1 -0
- package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js +53 -0
- package/dist/browser/editor-runtime/plain-text-iaQZhkGe.js.map +1 -0
- package/dist/browser/editor-runtime/print/index.js +71 -0
- package/dist/browser/editor-runtime/print/index.js.map +1 -0
- package/package.json +13 -3
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, _ as m, a as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F, y as I, z as L } from "../client-C4zbv8nl.js";
|
|
2
|
+
import { l as R, n as ee } from "../controller-1IBOQFFL.js";
|
|
3
|
+
import { Editor as te } from "@tiptap/core";
|
|
4
|
+
import ne from "@tiptap/starter-kit";
|
|
5
|
+
import { TextStyle as re } from "@tiptap/extension-text-style";
|
|
6
|
+
import { CharacterCount as ie } from "@tiptap/extension-character-count";
|
|
7
|
+
import z from "@tiptap/extension-superscript";
|
|
8
|
+
import B from "@tiptap/extension-subscript";
|
|
9
|
+
import V from "@tiptap/extension-text-align";
|
|
10
|
+
import H from "@tiptap/extension-image";
|
|
11
|
+
import { Table as U } from "@tiptap/extension-table";
|
|
12
|
+
import { TableRow as W } from "@tiptap/extension-table-row";
|
|
13
|
+
import { TableCell as ae } from "@tiptap/extension-table-cell";
|
|
14
|
+
import { TableHeader as oe } from "@tiptap/extension-table-header";
|
|
15
|
+
import { Placeholder as se } from "@tiptap/extensions";
|
|
16
|
+
//#region ../../shared/configure-events/dist/index.js
|
|
17
|
+
var ce = class e extends CustomEvent {
|
|
18
|
+
static {
|
|
19
|
+
this.TYPE = "model.updated";
|
|
20
|
+
}
|
|
21
|
+
constructor(t, n = !1) {
|
|
22
|
+
super(e.TYPE, {
|
|
23
|
+
bubbles: !0,
|
|
24
|
+
detail: {
|
|
25
|
+
update: t,
|
|
26
|
+
reset: n
|
|
27
|
+
}
|
|
28
|
+
}), this.update = t, this.reset = n;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
(class e extends CustomEvent {
|
|
32
|
+
static {
|
|
33
|
+
this.TYPE = "delete.image";
|
|
34
|
+
}
|
|
35
|
+
constructor(t, n) {
|
|
36
|
+
super(e.TYPE, {
|
|
37
|
+
bubbles: !0,
|
|
38
|
+
detail: {
|
|
39
|
+
src: t,
|
|
40
|
+
done: n
|
|
41
|
+
}
|
|
42
|
+
}), this.src = t, this.done = n;
|
|
43
|
+
}
|
|
44
|
+
}), class e extends CustomEvent {
|
|
45
|
+
static {
|
|
46
|
+
this.TYPE = "insert.image";
|
|
47
|
+
}
|
|
48
|
+
constructor(t) {
|
|
49
|
+
super(e.TYPE, {
|
|
50
|
+
bubbles: !0,
|
|
51
|
+
detail: t
|
|
52
|
+
}), this.handler = t;
|
|
53
|
+
}
|
|
54
|
+
}, class e extends CustomEvent {
|
|
55
|
+
static {
|
|
56
|
+
this.TYPE = "delete.sound";
|
|
57
|
+
}
|
|
58
|
+
constructor(t, n) {
|
|
59
|
+
super(e.TYPE, {
|
|
60
|
+
bubbles: !0,
|
|
61
|
+
detail: {
|
|
62
|
+
src: t,
|
|
63
|
+
done: n
|
|
64
|
+
}
|
|
65
|
+
}), this.src = t, this.done = n;
|
|
66
|
+
}
|
|
67
|
+
}, class e extends CustomEvent {
|
|
68
|
+
static {
|
|
69
|
+
this.TYPE = "insert.sound";
|
|
70
|
+
}
|
|
71
|
+
constructor(t) {
|
|
72
|
+
super(e.TYPE, {
|
|
73
|
+
bubbles: !0,
|
|
74
|
+
detail: t
|
|
75
|
+
}), this.handler = t;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ../../lib-svelte/config-ui-svelte/dist/index.js
|
|
80
|
+
var le = I("<aside class=\"pie-config-layout-settings svelte-9dr0jr\" aria-label=\"Settings\"><!></aside>"), ue = I("<div class=\"pie-config-layout svelte-9dr0jr\"><div class=\"pie-config-layout-contents svelte-9dr0jr\"><div class=\"pie-config-layout-design svelte-9dr0jr\"><!></div> <!></div></div>"), de = {
|
|
81
|
+
hash: "svelte-9dr0jr",
|
|
82
|
+
code: ".pie-config-layout.svelte-9dr0jr {container-type:inline-size;}.pie-config-layout-contents.svelte-9dr0jr {display:flex;flex-direction:column;gap:16px;}.pie-config-layout-design.svelte-9dr0jr {flex:1 1 auto;min-width:0;}\n\n @container (min-width: 1135px) {.pie-config-layout-contents.svelte-9dr0jr {flex-direction:row;align-items:flex-start;}.pie-config-layout-settings.svelte-9dr0jr {flex:0 0 300px;position:sticky;top:0;}\n }"
|
|
83
|
+
};
|
|
84
|
+
function fe(e, t) {
|
|
85
|
+
w(e, de);
|
|
86
|
+
let n = E(t, "hideSettings", 3, !1);
|
|
87
|
+
var i = ue(), a = r(i), o = r(a);
|
|
88
|
+
b(r(o), () => t.children), d(o);
|
|
89
|
+
var s = C(o, 2), c = (e) => {
|
|
90
|
+
var n = le();
|
|
91
|
+
b(r(n), () => t.settings), d(n), m(e, n);
|
|
92
|
+
};
|
|
93
|
+
v(s, (e) => {
|
|
94
|
+
t.settings && !n() && e(c);
|
|
95
|
+
}), d(a), d(i), m(e, i);
|
|
96
|
+
}
|
|
97
|
+
var G = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
98
|
+
function pe(e, t) {
|
|
99
|
+
if (!G(t)) return e;
|
|
100
|
+
let n = { ...e };
|
|
101
|
+
for (let [r, i] of Object.entries(t)) {
|
|
102
|
+
let t = e[r];
|
|
103
|
+
n[r] = G(t) && G(i) ? {
|
|
104
|
+
...t,
|
|
105
|
+
...i
|
|
106
|
+
} : i;
|
|
107
|
+
}
|
|
108
|
+
return n;
|
|
109
|
+
}
|
|
110
|
+
function K(e) {
|
|
111
|
+
return G(e) ? Object.values(e).some((e) => G(e) && (e.settings === !0 || K(e))) : !1;
|
|
112
|
+
}
|
|
113
|
+
var q = (e, t = !1, n = !1) => ({
|
|
114
|
+
type: "toggle",
|
|
115
|
+
label: e,
|
|
116
|
+
isConfigProperty: t,
|
|
117
|
+
disabled: n
|
|
118
|
+
});
|
|
119
|
+
function me(e, t) {
|
|
120
|
+
let n = e;
|
|
121
|
+
for (let e of t.split(".")) {
|
|
122
|
+
if (!G(n)) return;
|
|
123
|
+
n = n[e];
|
|
124
|
+
}
|
|
125
|
+
return n;
|
|
126
|
+
}
|
|
127
|
+
function J(e, t, n) {
|
|
128
|
+
let [r, ...i] = t.split("."), a = e[r], o = i.length === 0 ? n : J(G(a) ? a : {}, i.join("."), n);
|
|
129
|
+
return {
|
|
130
|
+
...e,
|
|
131
|
+
[r]: o
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
var he = I("<label class=\"pie-settings-toggle svelte-1ang3sw\"><span> </span> <input type=\"checkbox\" role=\"switch\" class=\"svelte-1ang3sw\"/></label>"), ge = I("<label class=\"pie-settings-choice-row svelte-1ang3sw\"><input type=\"radio\" class=\"svelte-1ang3sw\"/> <span> </span></label>"), _e = I("<fieldset class=\"pie-settings-choice svelte-1ang3sw\"><legend class=\"svelte-1ang3sw\"> </legend> <!></fieldset>"), ve = I("<fieldset class=\"pie-settings-group svelte-1ang3sw\"><legend class=\"pie-settings-group-name svelte-1ang3sw\"> </legend> <!></fieldset>"), ye = I("<div class=\"pie-settings-panel svelte-1ang3sw\"></div>"), be = {
|
|
135
|
+
hash: "svelte-1ang3sw",
|
|
136
|
+
code: ".pie-settings-panel.svelte-1ang3sw {display:flex;flex-direction:column;gap:16px;padding:16px;border:1px solid var(--pie-border-light, #ccc);border-radius:4px;color:var(--pie-text, #212121);}fieldset.svelte-1ang3sw {margin:0;padding:0;border:0;min-width:0;}.pie-settings-group.svelte-1ang3sw {display:flex;flex-direction:column;gap:8px;}.pie-settings-group-name.svelte-1ang3sw {margin-bottom:8px;font-weight:600;}.pie-settings-toggle.svelte-1ang3sw {display:flex;align-items:center;justify-content:space-between;gap:12px;}.pie-settings-choice.svelte-1ang3sw legend:where(.svelte-1ang3sw) {margin-bottom:4px;}.pie-settings-choice-row.svelte-1ang3sw {display:flex;align-items:center;gap:8px;}input.svelte-1ang3sw {accent-color:var(--pie-primary, #3f51b5);}input.svelte-1ang3sw:focus-visible {outline:2px solid var(--pie-focus-outline, #1a73e8);outline-offset:2px;}"
|
|
137
|
+
};
|
|
138
|
+
function xe(e, o) {
|
|
139
|
+
a(o, !0), w(e, be);
|
|
140
|
+
let s = E(o, "configuration", 19, () => ({})), c = Math.random().toString(36).slice(2, 10), p = u(() => Object.entries(o.groups).map(([e, t]) => [e, Object.entries(t).filter((e) => !!e[1])]).filter(([, e]) => e.length > 0)), g = (e, t) => me(t.isConfigProperty ? s() : o.model, e);
|
|
141
|
+
function b(e, t, n) {
|
|
142
|
+
t.isConfigProperty ? o.onChangeConfiguration?.(J(s(), e, n), e) : o.onChangeModel(J(o.model, e, n), e);
|
|
143
|
+
}
|
|
144
|
+
var S = ye();
|
|
145
|
+
_(S, 21, () => t(p), ([e, t]) => e, (e, i) => {
|
|
146
|
+
var a = u(() => L(t(i), 2));
|
|
147
|
+
let o = () => t(a)[0], s = () => t(a)[1];
|
|
148
|
+
var p = ve(), S = r(p), w = l(S, !0);
|
|
149
|
+
_(C(S, 2), 17, s, ([e, t]) => e, (e, i) => {
|
|
150
|
+
var a = u(() => L(t(i), 2));
|
|
151
|
+
let o = () => t(a)[0], s = () => t(a)[1];
|
|
152
|
+
var p = N(), S = n(p), w = (e) => {
|
|
153
|
+
var t = he(), n = r(t), i = l(n, !0), a = C(n, 2);
|
|
154
|
+
x(a), d(t), P((e) => {
|
|
155
|
+
y(i, s().label), D(a, e), a.disabled = s().disabled;
|
|
156
|
+
}, [() => !!g(o(), s())]), f("change", a, (e) => b(o(), s(), e.currentTarget.checked)), m(e, t);
|
|
157
|
+
}, T = (e) => {
|
|
158
|
+
var n = _e(), i = r(n), a = l(i, !0);
|
|
159
|
+
_(C(i, 2), 17, () => s().choices, (e) => e.value, (e, n) => {
|
|
160
|
+
var i = ge(), a = r(i);
|
|
161
|
+
x(a);
|
|
162
|
+
var u = l(C(a, 2), !0);
|
|
163
|
+
d(i), P((e) => {
|
|
164
|
+
h(a, "name", `${c}-${o()}`), A(a, t(n).value), D(a, e), y(u, t(n).label);
|
|
165
|
+
}, [() => g(o(), s()) === t(n).value]), f("change", a, () => b(o(), s(), t(n).value)), m(e, i);
|
|
166
|
+
}), d(n), P(() => y(a, s().label)), m(e, n);
|
|
167
|
+
};
|
|
168
|
+
v(S, (e) => {
|
|
169
|
+
s().type === "toggle" ? e(w) : s().type === "radio" && e(T, 1);
|
|
170
|
+
}), m(e, p);
|
|
171
|
+
}), d(p), P(() => y(w, o())), m(e, p);
|
|
172
|
+
}), d(S), m(e, S), i();
|
|
173
|
+
}
|
|
174
|
+
F(["change"]);
|
|
175
|
+
var Y = fe, Se = xe, Ce = I("<button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Table\"></button>"), we = I("<button type=\"button\" title=\"Add Row\"></button> <button type=\"button\" title=\"Delete Row\"></button> <button type=\"button\" title=\"Add Column\"></button> <button type=\"button\" title=\"Delete Column\"></button> <button type=\"button\" title=\"Delete Table\"></button> <button type=\"button\" title=\"Toggle Table Border\"></button>", 1), Te = I("<div class=\"align-menu\"><button type=\"button\" class=\"align-menu-btn\" title=\"Align Left\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Center\"></button> <button type=\"button\" class=\"align-menu-btn\" title=\"Align Right\"></button></div>"), Ee = I("<button type=\"button\" title=\"Bold\"></button> <button type=\"button\" title=\"Italic\"></button> <button type=\"button\" title=\"Strikethrough\"></button> <button type=\"button\" title=\"Code\"></button> <button type=\"button\" title=\"Underline\"></button> <button type=\"button\" title=\"Subscript\"></button> <button type=\"button\" title=\"Superscript\"></button> <button type=\"button\" title=\"Heading\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Insert Image\"></button> <div class=\"align-dropdown\"><button type=\"button\" class=\"pie-toolbar-btn\" title=\"Text Alignment\"><!> <span class=\"dropdown-arrow\">▼</span></button> <!></div> <button type=\"button\" title=\"Bullet List\"></button> <button type=\"button\" title=\"Numbered List\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Undo\"></button> <button type=\"button\" class=\"pie-toolbar-btn\" title=\"Redo\"></button>", 1), De = I("<div role=\"toolbar\" tabindex=\"-1\"><div class=\"toolbar-content\"><div class=\"toolbar-buttons\"><!> <!> <!></div> <button type=\"button\" class=\"done-btn\" title=\"Done\"></button></div></div>"), Oe = I("<div class=\"pie-editable-html editor-container editable-html svelte-rx7so6\"><div><div class=\"editor-children\"><div class=\"editor\"></div></div></div> <!></div>"), ke = {
|
|
176
|
+
hash: "svelte-rx7so6",
|
|
177
|
+
code: ".pie-editable-html.svelte-rx7so6 {position:relative;padding:0px;border:1px solid #ccc;border-radius:4px;cursor:text;background-color:var(--pie-background, rgba(255, 255, 255, 0));width:100%;}.pie-editable-html.svelte-rx7so6 .editor-holder {position:relative;padding:0px;overflow-y:auto;color:var(--pie-text, black);background-color:var(--pie-background, rgba(255, 255, 255, 0));min-height:120px;}.pie-editable-html.svelte-rx7so6 .editor-holder.disabled {cursor:not-allowed;}.pie-editable-html.svelte-rx7so6 .editor-children {padding:10px 16px;}.pie-editable-html.svelte-rx7so6 .editor {padding:5px;min-height:100px;}\n\n /* Toolbar styles matching React version EXACTLY */.pie-editable-html.svelte-rx7so6 .toolbar {position:absolute;z-index:20;cursor:pointer;justify-content:space-between;background:var(--editable-html-toolbar-bg, #efefef);min-width:280px;margin:5px 0 0 0;padding:2px;box-shadow:0px 1px 5px 0px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 3px 1px -2px rgba(0, 0, 0, 0.12);box-sizing:border-box;display:flex;opacity:0;pointer-events:none;top:100%;left:0;}.pie-editable-html.svelte-rx7so6 .toolbar.focused {opacity:1;pointer-events:auto;}.pie-editable-html.svelte-rx7so6 .toolbar-content {display:flex;width:100%;justify-content:space-between;}.pie-editable-html.svelte-rx7so6 .toolbar-buttons {align-items:center;display:flex;width:100%;}.pie-editable-html.svelte-rx7so6 .toolbar button.pie-toolbar-btn {\n /* Reset all browser defaults */appearance:none;-webkit-appearance:none;-moz-appearance:none;\n\n /* Core button styling - matching React MenuBar exactly */color:grey !important;display:inline-flex !important;padding:2px !important;background:none !important;border:0 !important;border-width:0 !important;border-style:none !important;outline:none !important;box-shadow:none !important;cursor:pointer !important;align-items:center !important;justify-content:center !important;min-width:auto !important;width:auto !important;height:auto !important;margin:0 !important;font:inherit !important;text-align:inherit !important;text-transform:none !important;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:hover:not(:disabled) {color:black;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:focus {outline:2px solid #666;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:disabled {opacity:0.7;cursor:not-allowed;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn:disabled:hover {color:grey;}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn.active {background:var(--pie-primary, #3f51b5);color:var(--pie-white, #ffffff);}.pie-editable-html.svelte-rx7so6 .pie-toolbar-btn svg {width:24px;height:24px;}\n\n /* Done Button - matching React DoneButton component */.pie-editable-html.svelte-rx7so6 .done-btn {vertical-align:top;width:28px;height:28px;color:var(--editable-html-toolbar-check, #00bb00);padding:4px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;}.pie-editable-html.svelte-rx7so6 .done-btn:hover {background-color:rgba(0, 187, 0, 0.08);border-radius:4px;}.pie-editable-html.svelte-rx7so6 .done-btn svg {width:24px;height:24px;}\n\n /* Text alignment dropdown */.pie-editable-html.svelte-rx7so6 .align-dropdown {position:relative;}.pie-editable-html.svelte-rx7so6 .dropdown-arrow {margin-left:2px;font-size:8px;}.pie-editable-html.svelte-rx7so6 .align-menu {position:absolute;top:100%;left:0;background:var(--pie-white, #ffffff);display:flex;flex-direction:row;padding:2px;box-shadow:0px 1px 5px 0px rgba(0, 0, 0, 0.2),\n 0px 2px 2px 0px rgba(0, 0, 0, 0.14),\n 0px 3px 1px -2px rgba(0, 0, 0, 0.12);z-index:30;}.pie-editable-html.svelte-rx7so6 .align-menu-btn {color:var(--pie-disabled, grey);display:inline-flex;padding:4px;background:none;border:none;cursor:pointer;align-items:center;justify-content:center;min-width:32px;min-height:32px;}.pie-editable-html.svelte-rx7so6 .align-menu-btn:hover {color:var(--pie-black, #000000);background-color:rgba(0, 0, 0, 0.04);}\n\n /* ProseMirror editor styles */.pie-editable-html.svelte-rx7so6 .ProseMirror {outline:none !important;min-height:100px;font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;font-size:14px;line-height:1.6;color:var(--pie-text, black);}.pie-editable-html.svelte-rx7so6 .ProseMirror p {margin:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror ul,\n .pie-editable-html.svelte-rx7so6 .ProseMirror ol {padding:0 1rem;margin:1.25rem 1rem 1.25rem 0.4rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror ul li p,\n .pie-editable-html.svelte-rx7so6 .ProseMirror ol li p {margin-top:0.25em;margin-bottom:0.25em;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h2,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h3,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h4,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h5,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h6 {line-height:1.1;margin-top:2.5rem;text-wrap:pretty;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h2 {margin-top:3.5rem;margin-bottom:1.5rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h1 {font-size:1.4rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h2 {font-size:1.2rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h3 {font-size:1.1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror h4,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h5,\n .pie-editable-html.svelte-rx7so6 .ProseMirror h6 {font-size:1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror code {background-color:rgba(88, 5, 255, 0.05);border-radius:0.4rem;color:#2e2b29;font-size:0.85rem;padding:0.25em 0.3em;}.pie-editable-html.svelte-rx7so6 .ProseMirror pre {background:#2e2b29;border-radius:0.5rem;color:#fff;font-family:'JetBrainsMono', monospace;margin:1.5rem 0;padding:0.75rem 1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror pre code {background:none;color:inherit;font-size:0.8rem;padding:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror blockquote {border-left:3px solid rgba(61, 37, 20, 0.12);margin:1.5rem 0;padding-left:1rem;}.pie-editable-html.svelte-rx7so6 .ProseMirror hr {border:none;border-top:1px solid rgba(61, 37, 20, 0.08);margin:2rem 0;}.pie-editable-html.svelte-rx7so6 .ProseMirror img {max-width:100%;height:auto;}\n\n /* Table styles */.pie-editable-html.svelte-rx7so6 .ProseMirror table {table-layout:fixed;width:100%;border-collapse:collapse;color:var(--pie-text, black);background-color:var(--pie-background, rgba(255, 255, 255, 0));margin:1rem 0;}.pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) tr {border-top:1px solid #dfe2e5;}.pie-editable-html.svelte-rx7so6 .ProseMirror td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror th {padding:0.6em 1em;text-align:center;vertical-align:top;position:relative;}.pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror table:not([border=\"1\"]) th {border:1px solid #dfe2e5;}.pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] {border:2px solid var(--pie-black, #000000);}.pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] td,\n .pie-editable-html.svelte-rx7so6 .ProseMirror table[border=\"1\"] th {border:1px solid var(--pie-black, #000000);}.pie-editable-html.svelte-rx7so6 .ProseMirror .selectedCell {background-color:rgba(200, 200, 255, 0.4);}\n\n /* Placeholder */.pie-editable-html.svelte-rx7so6 .ProseMirror p.is-editor-empty:first-child::before {content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0;}.pie-editable-html.svelte-rx7so6 .ProseMirror:focus {outline:none;}"
|
|
178
|
+
};
|
|
179
|
+
function Ae(c, l) {
|
|
180
|
+
a(l, !0), w(c, ke);
|
|
181
|
+
let u = E(l, "markup", 3, ""), h = E(l, "placeholder", 3, "Enter text here..."), _ = E(l, "showToolbar", 3, !0), y = E(l, "disabled", 3, !1), b, x = s(null), D = s(!1), A = s(!1);
|
|
182
|
+
function j() {
|
|
183
|
+
return {
|
|
184
|
+
role: "textbox",
|
|
185
|
+
"aria-multiline": "true",
|
|
186
|
+
...l.ariaLabel ? { "aria-label": l.ariaLabel } : {}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
let F = s(e({
|
|
190
|
+
isBold: !1,
|
|
191
|
+
canBold: !1,
|
|
192
|
+
isItalic: !1,
|
|
193
|
+
canItalic: !1,
|
|
194
|
+
isStrike: !1,
|
|
195
|
+
canStrike: !1,
|
|
196
|
+
isCode: !1,
|
|
197
|
+
canCode: !1,
|
|
198
|
+
isUnderline: !1,
|
|
199
|
+
isSubScript: !1,
|
|
200
|
+
isSuperScript: !1,
|
|
201
|
+
isHeading3: !1,
|
|
202
|
+
isBulletList: !1,
|
|
203
|
+
isOrderedList: !1,
|
|
204
|
+
canUndo: !1,
|
|
205
|
+
canRedo: !1,
|
|
206
|
+
isTable: !1,
|
|
207
|
+
canTable: !1,
|
|
208
|
+
tableHasBorder: !1,
|
|
209
|
+
textAlign: "left"
|
|
210
|
+
}));
|
|
211
|
+
function I() {
|
|
212
|
+
t(x) && S(F, {
|
|
213
|
+
isBold: t(x).isActive("bold"),
|
|
214
|
+
canBold: t(x).can().chain().focus().toggleBold().run(),
|
|
215
|
+
isItalic: t(x).isActive("italic"),
|
|
216
|
+
canItalic: t(x).can().chain().focus().toggleItalic().run(),
|
|
217
|
+
isStrike: t(x).isActive("strike"),
|
|
218
|
+
canStrike: t(x).can().chain().focus().toggleStrike().run(),
|
|
219
|
+
isCode: t(x).isActive("code"),
|
|
220
|
+
canCode: t(x).can().chain().focus().toggleCode().run(),
|
|
221
|
+
isUnderline: t(x).isActive("underline"),
|
|
222
|
+
isSubScript: t(x).isActive("subscript"),
|
|
223
|
+
isSuperScript: t(x).isActive("superscript"),
|
|
224
|
+
isHeading3: t(x).isActive("heading", { level: 3 }),
|
|
225
|
+
isBulletList: t(x).isActive("bulletList"),
|
|
226
|
+
isOrderedList: t(x).isActive("orderedList"),
|
|
227
|
+
canUndo: t(x).can().chain().focus().undo().run(),
|
|
228
|
+
canRedo: t(x).can().chain().focus().redo().run(),
|
|
229
|
+
isTable: t(x).isActive("table"),
|
|
230
|
+
canTable: t(x).can().chain().focus().insertTable().run(),
|
|
231
|
+
tableHasBorder: t(x).getAttributes("table")?.border === "1",
|
|
232
|
+
textAlign: t(x).isActive({ textAlign: "right" }) ? "right" : t(x).isActive({ textAlign: "center" }) ? "center" : t(x).isActive({ textAlign: "justify" }) ? "justify" : "left"
|
|
233
|
+
}, !0);
|
|
234
|
+
}
|
|
235
|
+
T(() => {
|
|
236
|
+
S(x, new te({
|
|
237
|
+
element: b,
|
|
238
|
+
extensions: [
|
|
239
|
+
ne.configure({
|
|
240
|
+
heading: { levels: [
|
|
241
|
+
1,
|
|
242
|
+
2,
|
|
243
|
+
3,
|
|
244
|
+
4,
|
|
245
|
+
5,
|
|
246
|
+
6
|
|
247
|
+
] },
|
|
248
|
+
link: {
|
|
249
|
+
autolink: !1,
|
|
250
|
+
linkOnPaste: !1,
|
|
251
|
+
shouldAutoLink: () => !1
|
|
252
|
+
}
|
|
253
|
+
}),
|
|
254
|
+
re,
|
|
255
|
+
ie.configure({ limit: 1e6 }),
|
|
256
|
+
B,
|
|
257
|
+
z,
|
|
258
|
+
V.configure({
|
|
259
|
+
types: ["heading", "paragraph"],
|
|
260
|
+
alignments: [
|
|
261
|
+
"left",
|
|
262
|
+
"right",
|
|
263
|
+
"center"
|
|
264
|
+
]
|
|
265
|
+
}),
|
|
266
|
+
H,
|
|
267
|
+
U.configure({
|
|
268
|
+
resizable: !0,
|
|
269
|
+
HTMLAttributes: { border: "0" }
|
|
270
|
+
}),
|
|
271
|
+
W,
|
|
272
|
+
oe,
|
|
273
|
+
ae,
|
|
274
|
+
se.configure({ placeholder: () => h() })
|
|
275
|
+
],
|
|
276
|
+
content: u() || "",
|
|
277
|
+
editable: !y(),
|
|
278
|
+
autofocus: !1,
|
|
279
|
+
editorProps: { attributes: j() },
|
|
280
|
+
onUpdate: ({ editor: e }) => {
|
|
281
|
+
let t = e.getHTML();
|
|
282
|
+
l.onChange && l.onChange(t), I();
|
|
283
|
+
},
|
|
284
|
+
onSelectionUpdate: () => {
|
|
285
|
+
I();
|
|
286
|
+
},
|
|
287
|
+
onFocus: () => {
|
|
288
|
+
I();
|
|
289
|
+
}
|
|
290
|
+
}), !0), I();
|
|
291
|
+
}), O(() => {
|
|
292
|
+
t(x) && t(x).destroy();
|
|
293
|
+
}), p(() => {
|
|
294
|
+
t(x) && u() !== t(x).getHTML() && t(x).commands.setContent(u() || "", { emitUpdate: !1 });
|
|
295
|
+
}), p(() => {
|
|
296
|
+
let e = !y();
|
|
297
|
+
t(x) && t(x).isEditable !== e && t(x).setEditable(e, !1);
|
|
298
|
+
}), p(() => {
|
|
299
|
+
let e = j();
|
|
300
|
+
t(x) && t(x).view.dom.getAttribute("aria-label") !== (e["aria-label"] ?? null) && t(x).setOptions({ editorProps: { attributes: e } });
|
|
301
|
+
});
|
|
302
|
+
function L() {
|
|
303
|
+
S(D, !0);
|
|
304
|
+
}
|
|
305
|
+
function R(e) {
|
|
306
|
+
e.currentTarget.contains(e.relatedTarget) || (S(D, !1), S(A, !1));
|
|
307
|
+
}
|
|
308
|
+
function ee() {
|
|
309
|
+
t(x)?.chain().focus().toggleBold().run();
|
|
310
|
+
}
|
|
311
|
+
function ce() {
|
|
312
|
+
t(x)?.chain().focus().toggleItalic().run();
|
|
313
|
+
}
|
|
314
|
+
function le() {
|
|
315
|
+
t(x)?.chain().focus().toggleStrike().run();
|
|
316
|
+
}
|
|
317
|
+
function ue() {
|
|
318
|
+
t(x)?.chain().focus().toggleCode().run();
|
|
319
|
+
}
|
|
320
|
+
function de() {
|
|
321
|
+
t(x)?.chain().focus().toggleUnderline().run();
|
|
322
|
+
}
|
|
323
|
+
function fe() {
|
|
324
|
+
t(x)?.chain().focus().toggleSubscript().run();
|
|
325
|
+
}
|
|
326
|
+
function G() {
|
|
327
|
+
t(x)?.chain().focus().toggleSuperscript().run();
|
|
328
|
+
}
|
|
329
|
+
function pe() {
|
|
330
|
+
t(x)?.chain().focus().toggleHeading({ level: 3 }).run();
|
|
331
|
+
}
|
|
332
|
+
function K() {
|
|
333
|
+
t(x)?.chain().focus().toggleBulletList().run();
|
|
334
|
+
}
|
|
335
|
+
function q() {
|
|
336
|
+
t(x)?.chain().focus().toggleOrderedList().run();
|
|
337
|
+
}
|
|
338
|
+
function me() {
|
|
339
|
+
t(x)?.chain().focus().undo().run();
|
|
340
|
+
}
|
|
341
|
+
function J() {
|
|
342
|
+
t(x)?.chain().focus().redo().run();
|
|
343
|
+
}
|
|
344
|
+
function he() {
|
|
345
|
+
t(x)?.chain().focus().insertTable({
|
|
346
|
+
rows: 2,
|
|
347
|
+
cols: 2,
|
|
348
|
+
withHeaderRow: !1
|
|
349
|
+
}).run();
|
|
350
|
+
}
|
|
351
|
+
function ge() {
|
|
352
|
+
t(x)?.chain().focus().addRowAfter().run();
|
|
353
|
+
}
|
|
354
|
+
function _e() {
|
|
355
|
+
t(x)?.chain().focus().deleteRow().run();
|
|
356
|
+
}
|
|
357
|
+
function ve() {
|
|
358
|
+
t(x)?.chain().focus().addColumnAfter().run();
|
|
359
|
+
}
|
|
360
|
+
function ye() {
|
|
361
|
+
t(x)?.chain().focus().deleteColumn().run();
|
|
362
|
+
}
|
|
363
|
+
function be() {
|
|
364
|
+
t(x)?.chain().focus().deleteTable().run();
|
|
365
|
+
}
|
|
366
|
+
function xe() {
|
|
367
|
+
if (!t(x)) return;
|
|
368
|
+
let e = t(x).getAttributes("table"), n = {
|
|
369
|
+
...e,
|
|
370
|
+
border: e.border === "0" ? "1" : "0"
|
|
371
|
+
};
|
|
372
|
+
t(x).commands.updateAttributes("table", n);
|
|
373
|
+
}
|
|
374
|
+
function Y(e) {
|
|
375
|
+
t(x)?.chain().focus().setTextAlign(e).run(), S(A, !1);
|
|
376
|
+
}
|
|
377
|
+
function Se() {
|
|
378
|
+
let e = window.prompt("Enter image URL:");
|
|
379
|
+
e && t(x)?.chain().focus().setImage({ src: e }).run();
|
|
380
|
+
}
|
|
381
|
+
function Ae(e) {
|
|
382
|
+
e.preventDefault();
|
|
383
|
+
}
|
|
384
|
+
function X() {
|
|
385
|
+
if (t(x)) {
|
|
386
|
+
let e = t(x).getHTML();
|
|
387
|
+
e !== u() && l.onChange?.(e), t(x).commands.blur();
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
var Z = Oe(), Q = r(Z);
|
|
391
|
+
let je;
|
|
392
|
+
var Me = r(Q);
|
|
393
|
+
k(r(Me), (e) => b = e, () => b), d(Me), d(Q);
|
|
394
|
+
var $ = C(Q, 2), Ne = (e) => {
|
|
395
|
+
var i = De();
|
|
396
|
+
let a;
|
|
397
|
+
var s = r(i), c = r(s), l = r(c), u = (e) => {
|
|
398
|
+
var n = Ce();
|
|
399
|
+
M(n, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 10.02h5V21h-5zM17 21h3c1.1 0 2-.9 2-2v-9h-5v11zm3-18H5c-1.1 0-2 .9-2 2v3h19V5c0-1.1-.9-2-2-2zM3 19c0 1.1.9 2 2 2h3V10.02H3V19z\"/></svg>", !0), d(n), P(() => n.disabled = !t(F).canTable), f("click", n, he), m(e, n);
|
|
400
|
+
};
|
|
401
|
+
v(l, (e) => {
|
|
402
|
+
t(F).isTable || e(u);
|
|
403
|
+
});
|
|
404
|
+
var p = C(l, 2), h = (e) => {
|
|
405
|
+
var r = we(), i = n(r);
|
|
406
|
+
let a;
|
|
407
|
+
M(i, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z\"/></svg>", !0), d(i);
|
|
408
|
+
var o = C(i, 2);
|
|
409
|
+
let s;
|
|
410
|
+
M(o, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z\"/></svg>", !0), d(o);
|
|
411
|
+
var c = C(o, 2);
|
|
412
|
+
let l;
|
|
413
|
+
M(c, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z\"/></svg>", !0), d(c);
|
|
414
|
+
var u = C(c, 2);
|
|
415
|
+
let p;
|
|
416
|
+
M(u, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z\"/></svg>", !0), d(u);
|
|
417
|
+
var h = C(u, 2);
|
|
418
|
+
let _;
|
|
419
|
+
M(h, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z\"/></svg>", !0), d(h);
|
|
420
|
+
var v = C(h, 2);
|
|
421
|
+
let y;
|
|
422
|
+
M(v, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M3 3v18h18V3H3zm8 16H5v-6h6v6zm0-8H5V5h6v6zm8 8h-6v-6h6v6zm0-8h-6V5h6v6z\"/></svg>", !0), d(v), P(() => {
|
|
423
|
+
a = g(i, 1, "pie-toolbar-btn", null, a, { active: t(F).isTable }), i.disabled = !t(F).canTable, s = g(o, 1, "pie-toolbar-btn", null, s, { active: t(F).isTable }), o.disabled = !t(F).canTable, l = g(c, 1, "pie-toolbar-btn", null, l, { active: t(F).isTable }), c.disabled = !t(F).canTable, p = g(u, 1, "pie-toolbar-btn", null, p, { active: t(F).isTable }), u.disabled = !t(F).canTable, _ = g(h, 1, "pie-toolbar-btn", null, _, { active: t(F).isTable }), h.disabled = !t(F).canTable, y = g(v, 1, "pie-toolbar-btn", null, y, { active: t(F).tableHasBorder }), v.disabled = !t(F).canTable;
|
|
424
|
+
}), f("click", i, ge), f("click", o, _e), f("click", c, ve), f("click", u, ye), f("click", h, be), f("click", v, xe), m(e, r);
|
|
425
|
+
};
|
|
426
|
+
v(p, (e) => {
|
|
427
|
+
t(F).isTable && e(h);
|
|
428
|
+
});
|
|
429
|
+
var _ = C(p, 2), y = (e) => {
|
|
430
|
+
var i = Ee(), a = n(i);
|
|
431
|
+
let s;
|
|
432
|
+
M(a, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\"/></svg>", !0), d(a);
|
|
433
|
+
var c = C(a, 2);
|
|
434
|
+
let l;
|
|
435
|
+
M(c, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"/></svg>", !0), d(c);
|
|
436
|
+
var u = C(c, 2);
|
|
437
|
+
let p;
|
|
438
|
+
M(u, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z\"/></svg>", !0), d(u);
|
|
439
|
+
var h = C(u, 2);
|
|
440
|
+
let _;
|
|
441
|
+
M(h, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z\"/></svg>", !0), d(h);
|
|
442
|
+
var y = C(h, 2);
|
|
443
|
+
let b;
|
|
444
|
+
M(y, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"/></svg>", !0), d(y);
|
|
445
|
+
var x = C(y, 2);
|
|
446
|
+
let w;
|
|
447
|
+
M(x, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z\"/></svg>", !0), d(x);
|
|
448
|
+
var T = C(x, 2);
|
|
449
|
+
let E;
|
|
450
|
+
M(T, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z\"/></svg>", !0), d(T);
|
|
451
|
+
var D = C(T, 2);
|
|
452
|
+
let O;
|
|
453
|
+
M(D, () => "<svg width=\"20\" height=\"18\" viewBox=\"0 0 30 28\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z\"/></svg>", !0), d(D);
|
|
454
|
+
var k = C(D, 2);
|
|
455
|
+
M(k, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z\"/></svg>", !0), d(k);
|
|
456
|
+
var j = C(k, 2), I = r(j), L = r(I), R = (e) => {
|
|
457
|
+
var t = N();
|
|
458
|
+
M(n(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), m(e, t);
|
|
459
|
+
}, te = (e) => {
|
|
460
|
+
var t = N();
|
|
461
|
+
M(n(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>"), m(e, t);
|
|
462
|
+
}, ne = (e) => {
|
|
463
|
+
var t = N();
|
|
464
|
+
M(n(t), () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>"), m(e, t);
|
|
465
|
+
};
|
|
466
|
+
v(L, (e) => {
|
|
467
|
+
t(F).textAlign === "right" ? e(R) : t(F).textAlign === "center" ? e(te, 1) : e(ne, -1);
|
|
468
|
+
}), o(2), d(I);
|
|
469
|
+
var re = C(I, 2), ie = (e) => {
|
|
470
|
+
var t = Te(), n = r(t);
|
|
471
|
+
M(n, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), d(n);
|
|
472
|
+
var i = C(n, 2);
|
|
473
|
+
M(i, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z\"/></svg>", !0), d(i);
|
|
474
|
+
var a = C(i, 2);
|
|
475
|
+
M(a, () => "<svg width=\"20\" height=\"20\" viewBox=\"0 0 66 66\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z\"/></svg>", !0), d(a), d(t), f("click", n, () => Y("left")), f("click", i, () => Y("center")), f("click", a, () => Y("right")), m(e, t);
|
|
476
|
+
};
|
|
477
|
+
v(re, (e) => {
|
|
478
|
+
t(A) && e(ie);
|
|
479
|
+
}), d(j);
|
|
480
|
+
var z = C(j, 2);
|
|
481
|
+
let B;
|
|
482
|
+
M(z, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z\"/></svg>", !0), d(z);
|
|
483
|
+
var V = C(z, 2);
|
|
484
|
+
let H;
|
|
485
|
+
M(V, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"/></svg>", !0), d(V);
|
|
486
|
+
var U = C(V, 2);
|
|
487
|
+
M(U, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>", !0), d(U);
|
|
488
|
+
var W = C(U, 2);
|
|
489
|
+
M(W, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"/></svg>", !0), d(W), P(() => {
|
|
490
|
+
s = g(a, 1, "pie-toolbar-btn", null, s, { active: t(F).isBold }), a.disabled = !t(F).canBold, l = g(c, 1, "pie-toolbar-btn", null, l, { active: t(F).isItalic }), c.disabled = !t(F).canItalic, p = g(u, 1, "pie-toolbar-btn", null, p, { active: t(F).isStrike }), u.disabled = !t(F).canStrike, _ = g(h, 1, "pie-toolbar-btn", null, _, { active: t(F).isCode }), h.disabled = !t(F).canCode, b = g(y, 1, "pie-toolbar-btn", null, b, { active: t(F).isUnderline }), w = g(x, 1, "pie-toolbar-btn", null, w, { active: t(F).isSubScript }), E = g(T, 1, "pie-toolbar-btn", null, E, { active: t(F).isSuperScript }), O = g(D, 1, "pie-toolbar-btn", null, O, { active: t(F).isHeading3 }), B = g(z, 1, "pie-toolbar-btn", null, B, { active: t(F).isBulletList }), H = g(V, 1, "pie-toolbar-btn", null, H, { active: t(F).isOrderedList }), U.disabled = !t(F).canUndo, W.disabled = !t(F).canRedo;
|
|
491
|
+
}), f("click", a, ee), f("click", c, ce), f("click", u, le), f("click", h, ue), f("click", y, de), f("click", x, fe), f("click", T, G), f("click", D, pe), f("click", k, Se), f("click", I, () => S(A, !t(A))), f("click", z, K), f("click", V, q), f("click", U, me), f("click", W, J), m(e, i);
|
|
492
|
+
};
|
|
493
|
+
v(_, (e) => {
|
|
494
|
+
t(F).isTable || e(y);
|
|
495
|
+
}), d(c);
|
|
496
|
+
var b = C(c, 2);
|
|
497
|
+
M(b, () => "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" fill=\"currentColor\"><path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"/></svg>", !0), d(b), d(s), d(i), P(() => {
|
|
498
|
+
a = g(i, 1, "toolbar", null, a, { focused: t(D) }), i.inert = !t(D);
|
|
499
|
+
}), f("mousedown", i, Ae), f("click", b, X), m(e, i);
|
|
500
|
+
};
|
|
501
|
+
v($, (e) => {
|
|
502
|
+
_() && t(x) && e(Ne);
|
|
503
|
+
}), d(Z), P(() => je = g(Q, 1, "editor-holder", null, je, { disabled: y() })), f("focusin", Z, L), f("focusout", Z, R), m(c, Z), i();
|
|
504
|
+
}
|
|
505
|
+
F([
|
|
506
|
+
"focusin",
|
|
507
|
+
"focusout",
|
|
508
|
+
"mousedown",
|
|
509
|
+
"click"
|
|
510
|
+
]);
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region ../../lib-svelte/editable-html-tiptap-svelte/dist/index.js
|
|
513
|
+
var X = Ae, Z = I("<div class=\"input-container svelte-13ppn6m\"><span class=\"input-label svelte-13ppn6m\"> </span> <!></div>"), Q = I("<div class=\"design-fields svelte-13ppn6m\"><!> <!> <div class=\"answer-container svelte-13ppn6m\"><label class=\"answer-label svelte-13ppn6m\">Correct Answer</label> <input type=\"text\" class=\"answer-input svelte-13ppn6m\" placeholder=\"Enter the correct answer\"/></div></div>"), je = I("<div class=\"simple-cloze-author svelte-13ppn6m\"><!></div>"), Me = {
|
|
514
|
+
hash: "svelte-13ppn6m",
|
|
515
|
+
code: ".simple-cloze-author.svelte-13ppn6m {padding:24px;}.design-fields.svelte-13ppn6m {max-width:56rem;}.input-container.svelte-13ppn6m {position:relative;padding-top:16px;margin-bottom:24px;width:100%;}.input-label.svelte-13ppn6m {position:absolute;top:0;left:0;transform-origin:top left;transform:scale(0.75) translate(0, -0.75em);color:var(--pie-text, rgba(0, 0, 0, 0.6));pointer-events:none;}.answer-container.svelte-13ppn6m {margin-bottom:24px;}.answer-label.svelte-13ppn6m {display:block;margin-bottom:8px;font-size:0.875rem;color:var(--pie-text, rgba(0, 0, 0, 0.6));}.answer-input.svelte-13ppn6m {box-sizing:border-box;width:100%;height:2.5rem;padding:0 12px;border:1px solid var(--pie-border-light, #ccc);border-radius:4px;font:inherit;}.simple-cloze-author .editor-container {border-color:var(--pie-border-light, #ccc);border-radius:4px;}.simple-cloze-author .editor-holder {min-height:140px;}"
|
|
516
|
+
};
|
|
517
|
+
function $(e, n) {
|
|
518
|
+
a(n, !0), w(e, Me);
|
|
519
|
+
let o = E(n, "model", 7), s = E(n, "configuration", 7), p = `simple-cloze-correct-answer-${Math.random().toString(36).slice(2, 10)}`, g = u(() => ee(o() || void 0)), _ = u(() => pe(R.configuration, s()));
|
|
520
|
+
function b(e) {
|
|
521
|
+
let r = {
|
|
522
|
+
...t(g),
|
|
523
|
+
...e
|
|
524
|
+
};
|
|
525
|
+
n.$$host.model = r, n.$$host.dispatchEvent(new ce(r));
|
|
526
|
+
}
|
|
527
|
+
function S(e) {
|
|
528
|
+
b({ correctAnswer: e.target.value });
|
|
529
|
+
}
|
|
530
|
+
var T = {
|
|
531
|
+
get model() {
|
|
532
|
+
return o();
|
|
533
|
+
},
|
|
534
|
+
set model(e) {
|
|
535
|
+
o(e), c();
|
|
536
|
+
},
|
|
537
|
+
get configuration() {
|
|
538
|
+
return s();
|
|
539
|
+
},
|
|
540
|
+
set configuration(e) {
|
|
541
|
+
s(e), c();
|
|
542
|
+
}
|
|
543
|
+
}, D = je(), O = r(D);
|
|
544
|
+
{
|
|
545
|
+
let e = (e) => {
|
|
546
|
+
{
|
|
547
|
+
let n = u(() => ({
|
|
548
|
+
Settings: { promptEnabled: t(_).prompt?.settings && q(t(_).prompt.label) },
|
|
549
|
+
Properties: { teacherInstructionsEnabled: t(_).teacherInstructions?.settings && q(t(_).teacherInstructions.label) }
|
|
550
|
+
}));
|
|
551
|
+
Se(e, {
|
|
552
|
+
get model() {
|
|
553
|
+
return t(g);
|
|
554
|
+
},
|
|
555
|
+
get configuration() {
|
|
556
|
+
return t(_);
|
|
557
|
+
},
|
|
558
|
+
get groups() {
|
|
559
|
+
return t(n);
|
|
560
|
+
},
|
|
561
|
+
onChangeModel: (e) => b(e)
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
}, n = u(() => t(_).settingsPanelDisabled === !0 || !K(t(_)));
|
|
565
|
+
Y(O, {
|
|
566
|
+
get hideSettings() {
|
|
567
|
+
return t(n);
|
|
568
|
+
},
|
|
569
|
+
settings: e,
|
|
570
|
+
children: (e, n) => {
|
|
571
|
+
var i = Q(), a = r(i), o = (e) => {
|
|
572
|
+
var n = Z(), i = r(n), a = l(i, !0), o = C(i, 2);
|
|
573
|
+
{
|
|
574
|
+
let e = u(() => t(g).teacherInstructions || ""), n = u(() => t(_).teacherInstructions?.label);
|
|
575
|
+
X(o, {
|
|
576
|
+
get markup() {
|
|
577
|
+
return t(e);
|
|
578
|
+
},
|
|
579
|
+
onChange: (e) => b({ teacherInstructions: e }),
|
|
580
|
+
get ariaLabel() {
|
|
581
|
+
return t(n);
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
d(n), P(() => y(a, t(_).teacherInstructions?.label)), m(e, n);
|
|
586
|
+
};
|
|
587
|
+
v(a, (e) => {
|
|
588
|
+
t(g).teacherInstructionsEnabled && e(o);
|
|
589
|
+
});
|
|
590
|
+
var s = C(a, 2), c = (e) => {
|
|
591
|
+
var n = Z(), i = r(n), a = l(i, !0), o = C(i, 2);
|
|
592
|
+
{
|
|
593
|
+
let e = u(() => t(g).prompt || ""), n = u(() => t(_).prompt?.label);
|
|
594
|
+
X(o, {
|
|
595
|
+
get markup() {
|
|
596
|
+
return t(e);
|
|
597
|
+
},
|
|
598
|
+
onChange: (e) => b({ prompt: e }),
|
|
599
|
+
placeholder: "Enter your question here...",
|
|
600
|
+
get ariaLabel() {
|
|
601
|
+
return t(n);
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
d(n), P(() => y(a, t(_).prompt?.label)), m(e, n);
|
|
606
|
+
};
|
|
607
|
+
v(s, (e) => {
|
|
608
|
+
t(g).promptEnabled && e(c);
|
|
609
|
+
});
|
|
610
|
+
var w = C(s, 2), T = r(w), E = C(T, 2);
|
|
611
|
+
x(E), d(w), d(i), P(() => {
|
|
612
|
+
h(T, "for", p), h(E, "id", p), A(E, t(g).correctAnswer || "");
|
|
613
|
+
}), f("input", E, S), m(e, i);
|
|
614
|
+
},
|
|
615
|
+
$$slots: {
|
|
616
|
+
settings: !0,
|
|
617
|
+
default: !0
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
return d(D), m(e, D), i(T);
|
|
622
|
+
}
|
|
623
|
+
F(["input"]), j($, {
|
|
624
|
+
model: { type: "Object" },
|
|
625
|
+
configuration: { type: "Object" }
|
|
626
|
+
}, [], []);
|
|
627
|
+
//#endregion
|
|
628
|
+
//#region src/author/index.ts
|
|
629
|
+
var Ne = $.element;
|
|
630
|
+
//#endregion
|
|
631
|
+
export { Ne as default };
|
|
632
|
+
|
|
633
|
+
//# sourceMappingURL=index.js.map
|