@pie-qti/player-elements 0.1.19 → 0.1.20

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/README.md +122 -127
  2. package/dist/{define-B9h1kNmq.js → define-BwFVHv-A.js} +4160 -3090
  3. package/dist/define-BwFVHv-A.js.map +1 -0
  4. package/dist/dist-DswyTalX.js +6731 -0
  5. package/dist/dist-DswyTalX.js.map +1 -0
  6. package/dist/{dist-CHcxiby5.js → dist-oe9UH-A2.js} +628 -583
  7. package/dist/dist-oe9UH-A2.js.map +1 -0
  8. package/dist/{element-CSO0tq-A.js → element-BiInkn5Q.js} +2 -2
  9. package/dist/{element-CSO0tq-A.js.map → element-BiInkn5Q.js.map} +1 -1
  10. package/dist/{element-class-BEpwHdcP-BHKRGZoi.js → element-class-CILJ4Ls7-rJWb-Gwb.js} +12397 -11615
  11. package/dist/element-class-CILJ4Ls7-rJWb-Gwb.js.map +1 -0
  12. package/dist/elements.js +3 -3
  13. package/dist/index.js +3 -3
  14. package/dist/item-toolbar-element-t_zI1vE6.js +1892 -0
  15. package/dist/item-toolbar-element-t_zI1vE6.js.map +1 -0
  16. package/dist/{mathlive.min-DeR46YTX-DamfKay_.js → mathlive.min-DeR46YTX-D-KAmiue.js} +1 -1
  17. package/dist/{mathlive.min-DeR46YTX-DamfKay_.js.map → mathlive.min-DeR46YTX-D-KAmiue.js.map} +1 -1
  18. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js +7113 -0
  19. package/dist/pie-assessment-toolkit-element-RzBk8WVs.js.map +1 -0
  20. package/dist/pie-tool-calculator-GW-LhvB_.js +6905 -0
  21. package/dist/pie-tool-calculator-GW-LhvB_.js.map +1 -0
  22. package/dist/public/api.d.ts +25 -11
  23. package/dist/public/elements.d.ts +1 -1
  24. package/dist/public/index.d.ts +1 -1
  25. package/dist/register-players.js +1 -1
  26. package/dist/register.js +45855 -44815
  27. package/dist/register.js.map +1 -1
  28. package/dist/resolveItems-DHNyVysE.js +7627 -0
  29. package/dist/resolveItems-DHNyVysE.js.map +1 -0
  30. package/dist/{root--0fyaoNu.js → root-CYGgRw16.js} +3 -3
  31. package/dist/root-CYGgRw16.js.map +1 -0
  32. package/dist/sre-CgK32OcY.js +17228 -0
  33. package/dist/sre-CgK32OcY.js.map +1 -0
  34. package/dist/{tag-names-ClLtKtXt.js → tag-names-OgMDHLpx.js} +2 -2
  35. package/dist/tag-names-OgMDHLpx.js.map +1 -0
  36. package/dist/tool-tts-inline-drDEIti_.js +3724 -0
  37. package/dist/tool-tts-inline-drDEIti_.js.map +1 -0
  38. package/package.json +11 -9
  39. package/dist/define-B9h1kNmq.js.map +0 -1
  40. package/dist/dist-CHcxiby5.js.map +0 -1
  41. package/dist/dist-DjmdIRjq.js +0 -1241
  42. package/dist/dist-DjmdIRjq.js.map +0 -1
  43. package/dist/element-class-BEpwHdcP-BHKRGZoi.js.map +0 -1
  44. package/dist/item-toolbar-element-CjJkgFQ3.js +0 -6086
  45. package/dist/item-toolbar-element-CjJkgFQ3.js.map +0 -1
  46. package/dist/pie-assessment-toolkit-element-DMRNOwrK.js +0 -28516
  47. package/dist/pie-assessment-toolkit-element-DMRNOwrK.js.map +0 -1
  48. package/dist/pie-tool-calculator-DBfkllu3.js +0 -2309
  49. package/dist/pie-tool-calculator-DBfkllu3.js.map +0 -1
  50. package/dist/resolveItems-CLMM7L3B.js +0 -7045
  51. package/dist/resolveItems-CLMM7L3B.js.map +0 -1
  52. package/dist/root--0fyaoNu.js.map +0 -1
  53. package/dist/tag-names-ClLtKtXt.js.map +0 -1
  54. package/dist/tool-tts-inline-BNjR51Di.js +0 -2641
  55. package/dist/tool-tts-inline-BNjR51Di.js.map +0 -1
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.bun/@pie-players+pie-context@0.3.53/node_modules/@pie-players/pie-context/dist/events.js
1
+ //#region ../../node_modules/.bun/@pie-players+pie-context@0.3.63/node_modules/@pie-players/pie-context/dist/events.js
2
2
  var e = class extends Event {
3
3
  context;
4
4
  contextTarget;
@@ -72,4 +72,4 @@ var e = class extends Event {
72
72
  //#endregion
73
73
  export { t as a, r as i, i as n, e as o, n as r, s as t };
74
74
 
75
- //# sourceMappingURL=tag-names-ClLtKtXt.js.map
75
+ //# sourceMappingURL=tag-names-OgMDHLpx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-names-OgMDHLpx.js","names":[],"sources":["../../../node_modules/.bun/@pie-players+pie-context@0.3.63/node_modules/@pie-players/pie-context/dist/events.js","../../../node_modules/.bun/@pie-players+pie-context@0.3.63/node_modules/@pie-players/pie-context/dist/consumer.js","../../../node_modules/.bun/@pie-players+pie-context@0.3.63/node_modules/@pie-players/pie-context/dist/types.js","../../../node_modules/.bun/@pie-players+pie-players-shared@0.3.63/node_modules/@pie-players/pie-players-shared/dist/pie/tag-names.js"],"sourcesContent":["export class ContextRequestEvent extends Event {\n context;\n contextTarget;\n callback;\n subscribe;\n constructor(context, contextTarget, callback, subscribe) {\n super(\"context-request\", { bubbles: true, composed: true });\n this.context = context;\n this.contextTarget = contextTarget;\n this.callback = callback;\n this.subscribe = subscribe ?? false;\n }\n}\nexport class ContextProviderEvent extends Event {\n context;\n contextTarget;\n constructor(context, contextTarget) {\n super(\"context-provider\", { bubbles: true, composed: true });\n this.context = context;\n this.contextTarget = contextTarget;\n }\n}\n","import { ContextRequestEvent } from \"./events.js\";\nexport class ContextConsumer {\n host;\n context;\n subscribe;\n onValue;\n isConnected = false;\n unsubscribe;\n currentValue;\n constructor(host, options) {\n this.host = host;\n this.context = options.context;\n this.subscribe = options.subscribe ?? true;\n this.onValue = options.onValue;\n }\n connect() {\n if (this.isConnected)\n return;\n this.isConnected = true;\n this.requestValue();\n }\n disconnect() {\n if (!this.isConnected)\n return;\n this.isConnected = false;\n this.unsubscribe?.();\n this.unsubscribe = undefined;\n }\n get value() {\n return this.currentValue;\n }\n handleValue = (value, unsubscribe) => {\n if (unsubscribe !== this.unsubscribe) {\n this.unsubscribe?.();\n this.unsubscribe = unsubscribe;\n }\n if (!this.subscribe && this.unsubscribe) {\n this.unsubscribe();\n this.unsubscribe = undefined;\n }\n this.currentValue = value;\n this.onValue?.(value);\n };\n requestValue() {\n this.host.dispatchEvent(new ContextRequestEvent(this.context, this.host, this.handleValue, this.subscribe));\n }\n}\nexport const consumeContext = (host, options) => new ContextConsumer(host, options);\nexport const requestContext = (host, context) => {\n let value;\n host.dispatchEvent(new ContextRequestEvent(context, host, (nextValue) => {\n value = nextValue;\n }, false));\n return value;\n};\n","export const createContext = (key) => key;\n","/**\n * Custom element tag helpers for PIE runtime loaders/players.\n */\nconst RESERVED_TAG_NAMES = new Set([\n \"annotation-xml\",\n \"color-profile\",\n \"font-face\",\n \"font-face-src\",\n \"font-face-uri\",\n \"font-face-format\",\n \"font-face-name\",\n \"missing-glyph\",\n]);\nconst TAG_FORMAT = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/;\nexport const VIEW_TAG_SUFFIX = {\n delivery: \"\",\n author: \"-config\",\n print: \"-print\",\n};\n/**\n * Validate a custom element tag name according to platform constraints.\n */\nexport const validateCustomElementTag = (name, context = \"custom element tag\") => {\n if (!name || typeof name !== \"string\") {\n throw new Error(`Invalid ${context}: expected a non-empty string`);\n }\n const normalized = name.trim();\n if (!normalized) {\n throw new Error(`Invalid ${context}: tag is empty`);\n }\n if (normalized !== normalized.toLowerCase()) {\n throw new Error(`Invalid ${context} \"${normalized}\": custom element names must be lowercase`);\n }\n if (!normalized.includes(\"-\")) {\n throw new Error(`Invalid ${context} \"${normalized}\": custom element names must include a hyphen`);\n }\n if (RESERVED_TAG_NAMES.has(normalized)) {\n throw new Error(`Invalid ${context} \"${normalized}\": this name is reserved by the HTML spec`);\n }\n if (!TAG_FORMAT.test(normalized)) {\n throw new Error(`Invalid ${context} \"${normalized}\": allowed characters are lowercase letters, numbers, \".\", \"_\" and \"-\"`);\n }\n return normalized;\n};\n/**\n * Create a deterministic tag for a view-specific element class.\n */\nexport const toViewTag = (baseTag, view, customSuffix) => {\n const suffix = customSuffix ??\n (VIEW_TAG_SUFFIX[view] !== undefined\n ? VIEW_TAG_SUFFIX[view]\n : \"\");\n return `${baseTag}${suffix}`;\n};\n/**\n * Build a safe print tag by appending a deterministic, positive hash suffix.\n */\nexport const toPrintHashedTag = (baseTag, hashSource, hashFn) => {\n const hash = Math.abs(hashFn(hashSource));\n return `${baseTag}-print-${hash}`;\n};\n"],"x_google_ignoreList":[0,1,2,3],"mappings":";AAAA,IAAa,IAAb,cAAyC,MAAM;CAC3C;CACA;CACA;CACA;CACA,YAAY,GAAS,GAAe,GAAU,GAAW;AAKrD,EAJA,MAAM,mBAAmB;GAAE,SAAS;GAAM,UAAU;GAAM,CAAC,EAC3D,KAAK,UAAU,GACf,KAAK,gBAAgB,GACrB,KAAK,WAAW,GAChB,KAAK,YAAY,KAAa;;GAGzB,IAAb,cAA0C,MAAM;CAC5C;CACA;CACA,YAAY,GAAS,GAAe;AAGhC,EAFA,MAAM,oBAAoB;GAAE,SAAS;GAAM,UAAU;GAAM,CAAC,EAC5D,KAAK,UAAU,GACf,KAAK,gBAAgB;;GClBhB,IAAb,MAA6B;CACzB;CACA;CACA;CACA;CACA,cAAc;CACd;CACA;CACA,YAAY,GAAM,GAAS;AAIvB,EAHA,KAAK,OAAO,GACZ,KAAK,UAAU,EAAQ,SACvB,KAAK,YAAY,EAAQ,aAAa,IACtC,KAAK,UAAU,EAAQ;;CAE3B,UAAU;AACF,OAAK,gBAET,KAAK,cAAc,IACnB,KAAK,cAAc;;CAEvB,aAAa;AACJ,OAAK,gBAEV,KAAK,cAAc,IACnB,KAAK,eAAe,EACpB,KAAK,cAAc,KAAA;;CAEvB,IAAI,QAAQ;AACR,SAAO,KAAK;;CAEhB,eAAe,GAAO,MAAgB;AAUlC,EATI,MAAgB,KAAK,gBACrB,KAAK,eAAe,EACpB,KAAK,cAAc,IAEnB,CAAC,KAAK,aAAa,KAAK,gBACxB,KAAK,aAAa,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