@pie-element/simple-cloze 0.1.4-next.5 → 0.1.4-next.7
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/author.js +2 -0
- package/dist/author/index.d.ts +6 -0
- package/dist/author/index.js +12147 -21505
- package/dist/author/index.js.map +1 -1
- package/dist/browser/author/index.js +9202 -16240
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{client-Dt8SOe5Z.js → client-BSTc3boO.js} +650 -755
- package/dist/browser/client-BSTc3boO.js.map +1 -0
- package/dist/browser/controller/index.js +42 -32
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +129 -136
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/dist-CYpSKy-4.js +80 -0
- package/dist/browser/dist-CYpSKy-4.js.map +1 -0
- package/dist/browser/i18n-DJMxdTMU.js +1612 -0
- package/dist/browser/i18n-DJMxdTMU.js.map +1 -0
- package/dist/browser/plain-text-iaQZhkGe.js +53 -0
- package/dist/browser/plain-text-iaQZhkGe.js.map +1 -0
- package/dist/browser/print/index.js +64 -21
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +1 -0
- package/dist/controller/index.d.ts +51 -8
- package/dist/controller/index.js +121 -29
- package/dist/controller/index.js.map +1 -1
- package/dist/controller/plain-text.d.ts +11 -0
- package/dist/delivery/index.d.ts +9 -4
- package/dist/delivery/index.js +2826 -267
- package/dist/delivery/index.js.map +1 -1
- package/dist/i18n.d.ts +7 -0
- package/dist/index.iife.js +9 -3
- package/dist/index.js +2826 -267
- package/dist/index.js.map +1 -1
- package/dist/print/index.d.ts +7 -0
- package/dist/print/index.js +2775 -28
- package/dist/print/index.js.map +1 -1
- package/module/print.js +2383 -600
- package/module/print.js.map +1 -1
- package/package.json +2 -1
- package/dist/browser/client-Dt8SOe5Z.js.map +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//#region ../../shared/player-events/dist/index.js
|
|
2
|
+
var e = class e extends CustomEvent {
|
|
3
|
+
static {
|
|
4
|
+
this.TYPE = "model-set";
|
|
5
|
+
}
|
|
6
|
+
constructor(t, n, r) {
|
|
7
|
+
super(e.TYPE, {
|
|
8
|
+
bubbles: !0,
|
|
9
|
+
composed: !0,
|
|
10
|
+
detail: {
|
|
11
|
+
complete: n,
|
|
12
|
+
component: t,
|
|
13
|
+
hasModel: r
|
|
14
|
+
}
|
|
15
|
+
}), this.component = t, this.complete = n;
|
|
16
|
+
}
|
|
17
|
+
}, t = class e extends CustomEvent {
|
|
18
|
+
static {
|
|
19
|
+
this.TYPE = "session-changed";
|
|
20
|
+
}
|
|
21
|
+
constructor(t, n) {
|
|
22
|
+
super(e.TYPE, {
|
|
23
|
+
bubbles: !0,
|
|
24
|
+
composed: !0,
|
|
25
|
+
detail: {
|
|
26
|
+
complete: n,
|
|
27
|
+
component: t
|
|
28
|
+
}
|
|
29
|
+
}), this.component = t, this.complete = n;
|
|
30
|
+
}
|
|
31
|
+
}, n = (e) => {
|
|
32
|
+
let t = e;
|
|
33
|
+
return t ? typeof t.onSessionChange == "function" || typeof t.onAudioStarted == "function" || typeof t.onAudioEnded == "function" : !1;
|
|
34
|
+
};
|
|
35
|
+
function r(e) {
|
|
36
|
+
if (e.parentElement) return e.parentElement;
|
|
37
|
+
let t = e.getRootNode();
|
|
38
|
+
return t instanceof ShadowRoot ? t.host : null;
|
|
39
|
+
}
|
|
40
|
+
function i(e, t = {}) {
|
|
41
|
+
let i = t.hostPredicate ?? n, a = e;
|
|
42
|
+
for (; a;) {
|
|
43
|
+
if (i(a)) return a;
|
|
44
|
+
a = r(a);
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
function a(e) {
|
|
49
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
50
|
+
}
|
|
51
|
+
function o(e, t) {
|
|
52
|
+
if (e === t) return e;
|
|
53
|
+
if (!a(e) || !a(t) || Object.isFrozen(e) || !Object.isExtensible(e)) return t;
|
|
54
|
+
try {
|
|
55
|
+
for (let n of Object.keys(e)) n in t || delete e[n];
|
|
56
|
+
Object.assign(e, t);
|
|
57
|
+
} catch {
|
|
58
|
+
return t;
|
|
59
|
+
}
|
|
60
|
+
return e;
|
|
61
|
+
}
|
|
62
|
+
var s = {}, c = /* @__PURE__ */ new WeakSet();
|
|
63
|
+
function l(e) {
|
|
64
|
+
let t = e ?? s;
|
|
65
|
+
if (c.has(t)) return;
|
|
66
|
+
c.add(t);
|
|
67
|
+
let n = e ? `above <${e.tagName.toLowerCase()}>` : "for an update with no source element";
|
|
68
|
+
console.warn(`[session-bridge] no delivery host ${n}; the session change was not forwarded to the player`);
|
|
69
|
+
}
|
|
70
|
+
function u({ sourceEl: e, complete: n, session: r }) {
|
|
71
|
+
let a = i(e);
|
|
72
|
+
if (!a) return l(e), null;
|
|
73
|
+
if (typeof a.onSessionChange == "function") return a.onSessionChange(r), a;
|
|
74
|
+
let s = o(a.session, r);
|
|
75
|
+
return s !== a.session && (a.session = s), a.dispatchEvent(new t(a.tagName.toLowerCase(), n)), a;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { e as a, t as i, u as n, i as r, o as t };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=dist-CYpSKy-4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-CYpSKy-4.js","names":["s","c","e"],"sources":["../../../../shared/player-events/dist/index.js","../../../../lib-svelte/delivery-events/dist/index2.js"],"sourcesContent":["//#region src/session-notifier.ts\nvar e = \"commitPendingSession\", t = /* @__PURE__ */ new WeakMap();\nfunction n(e, n) {\n\tlet r = t.get(e);\n\tr || (r = /* @__PURE__ */ new Set(), t.set(e, r)), r.add(n);\n}\nfunction r(t) {\n\treturn Object.getOwnPropertyDescriptor(t, e) !== void 0;\n}\nfunction i(t) {\n\tif (r(t)) return;\n\tlet n = t[e];\n\tObject.defineProperty(t, e, {\n\t\tvalue: () => {\n\t\t\tif (typeof n == \"function\") try {\n\t\t\t\tn.call(t);\n\t\t\t} catch {}\n\t\t\to(t);\n\t\t},\n\t\tconfigurable: !0,\n\t\tenumerable: !1,\n\t\twritable: !0\n\t});\n}\nfunction a(e, t, r = {}) {\n\tlet a = r.delayMs, o = typeof a == \"function\" ? a : () => a ?? 0, s = r.maxWaitMs, c = null, l = null, u = !1, d = () => {\n\t\tc !== null && (clearTimeout(c), c = null), l !== null && (clearTimeout(l), l = null);\n\t}, f = () => {\n\t\td(), u && (u = !1, t());\n\t}, p = {\n\t\tnotify() {\n\t\t\tu = !0, c !== null && clearTimeout(c), c = setTimeout(f, Math.max(0, o())), s !== void 0 && l === null && (l = setTimeout(f, Math.max(0, s)));\n\t\t},\n\t\tflush() {\n\t\t\tif (!u) {\n\t\t\t\td();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tf();\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(\"[session-notifier] a committed session-changed dispatch threw\", e);\n\t\t\t}\n\t\t}\n\t};\n\treturn n(e, p), i(e), p;\n}\nfunction o(e) {\n\tlet n = t.get(e);\n\tif (n) for (let e of [...n]) e.flush();\n}\n//#endregion\n//#region src/index.ts\nvar s = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, c = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { s as ModelSetEvent, e as SESSION_COMMIT_METHOD, c as SessionChangedEvent, a as createSessionNotifier, o as flushSessionNotifiers };\n","import { SessionChangedEvent as e } from \"@pie-element/shared-player-events\";\n//#region src/session-bridge.ts\nvar t = (e) => {\n\tlet t = e;\n\treturn t ? typeof t.onSessionChange == \"function\" || typeof t.onAudioStarted == \"function\" || typeof t.onAudioEnded == \"function\" : !1;\n};\nfunction n(e) {\n\tif (e.parentElement) return e.parentElement;\n\tlet t = e.getRootNode();\n\treturn t instanceof ShadowRoot ? t.host : null;\n}\nfunction r(e, r = {}) {\n\tlet i = r.hostPredicate ?? t, a = e;\n\tfor (; a;) {\n\t\tif (i(a)) return a;\n\t\ta = n(a);\n\t}\n\treturn null;\n}\nfunction i(e) {\n\treturn !!e && typeof e == \"object\" && !Array.isArray(e);\n}\nfunction a(e, t) {\n\tif (e === t) return e;\n\tif (!i(e) || !i(t) || Object.isFrozen(e) || !Object.isExtensible(e)) return t;\n\ttry {\n\t\tfor (let n of Object.keys(e)) n in t || delete e[n];\n\t\tObject.assign(e, t);\n\t} catch {\n\t\treturn t;\n\t}\n\treturn e;\n}\nvar o = {}, s = /* @__PURE__ */ new WeakSet();\nfunction c(e) {\n\tlet t = e ?? o;\n\tif (s.has(t)) return;\n\ts.add(t);\n\tlet n = e ? `above <${e.tagName.toLowerCase()}>` : \"for an update with no source element\";\n\tconsole.warn(`[session-bridge] no delivery host ${n}; the session change was not forwarded to the player`);\n}\nfunction l({ sourceEl: t, complete: n, session: i }) {\n\tlet o = r(t);\n\tif (!o) return c(t), null;\n\tif (typeof o.onSessionChange == \"function\") return o.onSessionChange(i), o;\n\tlet s = a(o.session, i);\n\treturn s !== o.session && (o.session = s), o.dispatchEvent(new e(o.tagName.toLowerCase(), n)), o;\n}\n//#endregion\nexport { l as forwardSessionChange, r as resolveDeliveryHost, a as writeSessionInPlace };\n"],"mappings":";AAqDA,IAAIA,IA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