@pie-qti/player-elements 0.1.22 → 0.1.23

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 (49) hide show
  1. package/dist/{define-Bkc2UFCK.js → define-CqE08oOW.js} +2832 -2424
  2. package/dist/define-CqE08oOW.js.map +1 -0
  3. package/dist/{dist-C0bIgnik.js → dist-B1Rc9Jhz.js} +4 -4
  4. package/dist/{dist-C0bIgnik.js.map → dist-B1Rc9Jhz.js.map} +1 -1
  5. package/dist/dist-CQEJemjs.js +5061 -0
  6. package/dist/dist-CQEJemjs.js.map +1 -0
  7. package/dist/{dist-_mWRIrTg.js → dist-CsEP48m1.js} +2353 -2660
  8. package/dist/dist-CsEP48m1.js.map +1 -0
  9. package/dist/{dist-CPyrAOfS.js → dist-DQ_jFQFX.js} +20 -11
  10. package/dist/dist-DQ_jFQFX.js.map +1 -0
  11. package/dist/{element-BrpUrZI4.js → element-DU-n15ch.js} +2 -2
  12. package/dist/{element-BrpUrZI4.js.map → element-DU-n15ch.js.map} +1 -1
  13. package/dist/{element-class-DWoLXp_r-ms67Krq-.js → element-class-DBV-1lkb-BeszDwN_.js} +524 -496
  14. package/dist/element-class-DBV-1lkb-BeszDwN_.js.map +1 -0
  15. package/dist/elements.js +3 -3
  16. package/dist/index.js +2 -2
  17. package/dist/item-toolbar-element-iE73NEkH.js +1922 -0
  18. package/dist/item-toolbar-element-iE73NEkH.js.map +1 -0
  19. package/dist/pie-assessment-toolkit-element-BGOTMhdG.js +8300 -0
  20. package/dist/pie-assessment-toolkit-element-BGOTMhdG.js.map +1 -0
  21. package/dist/{pie-tool-calculator-BGp3etqJ.js → pie-tool-calculator-CkQb5qxg.js} +969 -952
  22. package/dist/pie-tool-calculator-CkQb5qxg.js.map +1 -0
  23. package/dist/register-players.js +1 -1
  24. package/dist/register.js +4591 -6734
  25. package/dist/register.js.map +1 -1
  26. package/dist/{resolveItems-XtUnsftV.js → resolveItems-DhQQhD2k.js} +2 -2
  27. package/dist/{resolveItems-XtUnsftV.js.map → resolveItems-DhQQhD2k.js.map} +1 -1
  28. package/dist/{root-DBWhDxjY.js → root-Dqg3cyBt.js} +12 -12
  29. package/dist/root-Dqg3cyBt.js.map +1 -0
  30. package/dist/tool-tts-inline-CA3VjWU4.js +3670 -0
  31. package/dist/tool-tts-inline-CA3VjWU4.js.map +1 -0
  32. package/dist/{tag-names-DV56RHJk.js → types-BFOGFD4R.js} +4 -22
  33. package/dist/types-BFOGFD4R.js.map +1 -0
  34. package/package.json +7 -7
  35. package/dist/define-Bkc2UFCK.js.map +0 -1
  36. package/dist/dist-CPyrAOfS.js.map +0 -1
  37. package/dist/dist-DU1nH3y8.js +0 -1247
  38. package/dist/dist-DU1nH3y8.js.map +0 -1
  39. package/dist/dist-_mWRIrTg.js.map +0 -1
  40. package/dist/element-class-DWoLXp_r-ms67Krq-.js.map +0 -1
  41. package/dist/item-toolbar-element-DFppTi_H.js +0 -6015
  42. package/dist/item-toolbar-element-DFppTi_H.js.map +0 -1
  43. package/dist/pie-assessment-toolkit-element-DlSFT_I2.js +0 -28479
  44. package/dist/pie-assessment-toolkit-element-DlSFT_I2.js.map +0 -1
  45. package/dist/pie-tool-calculator-BGp3etqJ.js.map +0 -1
  46. package/dist/root-DBWhDxjY.js.map +0 -1
  47. package/dist/tag-names-DV56RHJk.js.map +0 -1
  48. package/dist/tool-tts-inline-DVUYjVnD.js +0 -2574
  49. package/dist/tool-tts-inline-DVUYjVnD.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { a as e, o as t } from "./tag-names-DV56RHJk.js";
2
- //#region ../../node_modules/.bun/@pie-players+pie-context@0.3.53/node_modules/@pie-players/pie-context/dist/provider.js
1
+ import { a as e, i as t } from "./types-BFOGFD4R.js";
2
+ //#region ../../node_modules/.bun/@pie-players+pie-context@0.3.67/node_modules/@pie-players/pie-context/dist/provider.js
3
3
  var n = class {
4
4
  host;
5
5
  context;
@@ -10,7 +10,7 @@ var n = class {
10
10
  this.host = e, this.context = t.context, this.currentValue = t.initialValue;
11
11
  }
12
12
  connect() {
13
- this.isConnected || (this.isConnected = !0, this.host.addEventListener("context-request", this.handleContextRequest), this.host.addEventListener("context-provider", this.handleContextProvider), this.host.dispatchEvent(new e(this.context, this.host)));
13
+ this.isConnected || (this.isConnected = !0, this.host.addEventListener("context-request", this.handleContextRequest), this.host.addEventListener("context-provider", this.handleContextProvider), this.host.dispatchEvent(new t(this.context, this.host)));
14
14
  }
15
15
  disconnect() {
16
16
  this.isConnected && (this.isConnected = !1, this.host.removeEventListener("context-request", this.handleContextRequest), this.host.removeEventListener("context-provider", this.handleContextProvider), this.subscriptions.clear());
@@ -42,11 +42,11 @@ var n = class {
42
42
  unsubscribe: n
43
43
  }), e.callback(this.currentValue, n);
44
44
  };
45
- handleContextProvider = (e) => {
46
- if (e.context !== this.context || this.getContextTarget(e, this.host) === this.host) return;
45
+ handleContextProvider = (t) => {
46
+ if (t.context !== this.context || this.getContextTarget(t, this.host) === this.host) return;
47
47
  let n = /* @__PURE__ */ new Set();
48
- for (let [e, { consumerHost: r }] of this.subscriptions) n.has(e) || (n.add(e), r.dispatchEvent(new t(this.context, r, e, !0)));
49
- e.stopPropagation();
48
+ for (let [t, { consumerHost: r }] of this.subscriptions) n.has(t) || (n.add(t), r.dispatchEvent(new e(this.context, r, t, !0)));
49
+ t.stopPropagation();
50
50
  };
51
51
  notifySubscribers() {
52
52
  for (let e of this.subscriptions.values()) e.callback(this.currentValue, e.unsubscribe);
@@ -81,13 +81,13 @@ var n = class {
81
81
  callbackRef: new WeakRef(i)
82
82
  }), t.requests = r(t.requests));
83
83
  };
84
- onContextProvider = (e) => {
85
- let n = this.pendingByContext.get(e.context);
84
+ onContextProvider = (t) => {
85
+ let n = this.pendingByContext.get(t.context);
86
86
  if (!(!n || n.requests.length === 0)) {
87
- this.pendingByContext.delete(e.context);
87
+ this.pendingByContext.delete(t.context);
88
88
  for (let r of n.requests) {
89
89
  let n = r.requestorRef.deref(), i = r.callbackRef.deref();
90
- !n || !i || n.dispatchEvent(new t(e.context, n, i, !0));
90
+ !n || !i || n.dispatchEvent(new e(t.context, n, i, !0));
91
91
  }
92
92
  }
93
93
  };
@@ -95,4 +95,4 @@ var n = class {
95
95
  //#endregion
96
96
  export { n, i as t };
97
97
 
98
- //# sourceMappingURL=root-DBWhDxjY.js.map
98
+ //# sourceMappingURL=root-Dqg3cyBt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-Dqg3cyBt.js","names":[],"sources":["../../../node_modules/.bun/@pie-players+pie-context@0.3.67/node_modules/@pie-players/pie-context/dist/provider.js","../../../node_modules/.bun/@pie-players+pie-context@0.3.67/node_modules/@pie-players/pie-context/dist/root.js"],"sourcesContent":["import { ContextProviderEvent, ContextRequestEvent } from \"./events.js\";\nexport class ContextProvider {\n host;\n context;\n currentValue;\n subscriptions = new Map();\n isConnected = false;\n constructor(host, options) {\n this.host = host;\n this.context = options.context;\n this.currentValue = options.initialValue;\n }\n connect() {\n if (this.isConnected)\n return;\n this.isConnected = true;\n this.host.addEventListener(\"context-request\", this.handleContextRequest);\n this.host.addEventListener(\"context-provider\", this.handleContextProvider);\n this.host.dispatchEvent(new ContextProviderEvent(this.context, this.host));\n }\n disconnect() {\n if (!this.isConnected)\n return;\n this.isConnected = false;\n this.host.removeEventListener(\"context-request\", this.handleContextRequest);\n this.host.removeEventListener(\"context-provider\", this.handleContextProvider);\n this.subscriptions.clear();\n }\n setValue(value, force = false) {\n if (!force && Object.is(this.currentValue, value))\n return;\n this.currentValue = value;\n this.notifySubscribers();\n }\n get value() {\n return this.currentValue;\n }\n getContextTarget(event, fallback) {\n if (\"contextTarget\" in event && event.contextTarget) {\n return event.contextTarget;\n }\n const path = typeof event.composedPath === \"function\" ? event.composedPath() : [];\n const firstPathTarget = path[0];\n return firstPathTarget ? firstPathTarget : fallback;\n }\n handleContextRequest = (event) => {\n if (event.context !== this.context)\n return;\n const consumerHost = this.getContextTarget(event, this.host);\n if (consumerHost === this.host)\n return;\n // Closest provider wins for this context key.\n event.stopPropagation();\n if (!event.subscribe) {\n event.callback(this.currentValue);\n return;\n }\n const existing = this.subscriptions.get(event.callback);\n existing?.unsubscribe();\n const unsubscribe = () => {\n this.subscriptions.delete(event.callback);\n };\n this.subscriptions.set(event.callback, {\n consumerHost,\n callback: event.callback,\n unsubscribe,\n });\n event.callback(this.currentValue, unsubscribe);\n };\n handleContextProvider = (event) => {\n if (event.context !== this.context)\n return;\n const providerHost = this.getContextTarget(event, this.host);\n if (providerHost === this.host)\n return;\n // A newly connected nested provider should take over matching consumers.\n const seen = new Set();\n for (const [callback, { consumerHost }] of this.subscriptions) {\n if (seen.has(callback))\n continue;\n seen.add(callback);\n consumerHost.dispatchEvent(new ContextRequestEvent(this.context, consumerHost, callback, true));\n }\n event.stopPropagation();\n };\n notifySubscribers() {\n for (const subscription of this.subscriptions.values()) {\n subscription.callback(this.currentValue, subscription.unsubscribe);\n }\n }\n}\nexport const provideContext = (host, options) => new ContextProvider(host, options);\n","import { ContextRequestEvent } from \"./events.js\";\nconst getLivePending = (pending) => {\n const requests = [];\n for (const entry of pending) {\n if (entry.requestorRef.deref() && entry.callbackRef.deref()) {\n requests.push(entry);\n }\n }\n return requests;\n};\nexport class ContextRoot {\n host;\n pendingByContext = new Map();\n attached = false;\n constructor(host) {\n this.host = host;\n }\n attach() {\n if (this.attached)\n return;\n this.attached = true;\n this.host.addEventListener(\"context-request\", this.onContextRequest);\n this.host.addEventListener(\"context-provider\", this.onContextProvider);\n }\n detach() {\n if (!this.attached)\n return;\n this.attached = false;\n this.host.removeEventListener(\"context-request\", this.onContextRequest);\n this.host.removeEventListener(\"context-provider\", this.onContextProvider);\n this.pendingByContext.clear();\n }\n onContextRequest = (event) => {\n if (!event.subscribe)\n return;\n let pending = this.pendingByContext.get(event.context);\n if (!pending) {\n pending = {\n callbacks: new WeakMap(),\n requests: [],\n };\n this.pendingByContext.set(event.context, pending);\n }\n const requestor = event.contextTarget;\n const callback = event.callback;\n let seenForRequestor = pending.callbacks.get(requestor);\n if (!seenForRequestor) {\n seenForRequestor = new WeakSet();\n pending.callbacks.set(requestor, seenForRequestor);\n }\n if (seenForRequestor.has(callback))\n return;\n seenForRequestor.add(callback);\n pending.requests.push({\n requestorRef: new WeakRef(requestor),\n callbackRef: new WeakRef(callback),\n });\n pending.requests = getLivePending(pending.requests);\n };\n onContextProvider = (event) => {\n const pending = this.pendingByContext.get(event.context);\n if (!pending || pending.requests.length === 0)\n return;\n this.pendingByContext.delete(event.context);\n for (const entry of pending.requests) {\n const requestor = entry.requestorRef.deref();\n const callback = entry.callbackRef.deref();\n if (!requestor || !callback)\n continue;\n requestor.dispatchEvent(new ContextRequestEvent(event.context, requestor, callback, true));\n }\n };\n}\n"],"x_google_ignoreList":[0,1],"mappings":";;AACA,IAAa,IAAb,MAA6B;CACzB;CACA;CACA;CACA,gCAAgB,IAAI,IAAI;CACxB,cAAc;CACd,YAAY,GAAM,GAAS;EAGvB,AAFA,KAAK,OAAO,GACZ,KAAK,UAAU,EAAQ,SACvB,KAAK,eAAe,EAAQ;CAChC;CACA,UAAU;EACF,KAAK,gBAET,KAAK,cAAc,IACnB,KAAK,KAAK,iBAAiB,mBAAmB,KAAK,oBAAoB,GACvE,KAAK,KAAK,iBAAiB,oBAAoB,KAAK,qBAAqB,GACzE,KAAK,KAAK,cAAc,IAAI,EAAqB,KAAK,SAAS,KAAK,IAAI,CAAC;CAC7E;CACA,aAAa;EACJ,KAAK,gBAEV,KAAK,cAAc,IACnB,KAAK,KAAK,oBAAoB,mBAAmB,KAAK,oBAAoB,GAC1E,KAAK,KAAK,oBAAoB,oBAAoB,KAAK,qBAAqB,GAC5E,KAAK,cAAc,MAAM;CAC7B;CACA,SAAS,GAAO,IAAQ,IAAO;EACvB,CAAC,KAAS,OAAO,GAAG,KAAK,cAAc,CAAK,MAEhD,KAAK,eAAe,GACpB,KAAK,kBAAkB;CAC3B;CACA,IAAI,QAAQ;EACR,OAAO,KAAK;CA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