@pie-players/pie-players-shared 0.3.60 → 0.3.62

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 (147) hide show
  1. package/dist/config/profile.js +0 -1
  2. package/dist/i18n/index.js +0 -1
  3. package/dist/i18n/loader.js +0 -1
  4. package/dist/i18n/simple-i18n.js +0 -1
  5. package/dist/i18n/types.js +0 -1
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +2 -1
  8. package/dist/instrumentation/debug-panel-stream.js +0 -1
  9. package/dist/instrumentation/index.js +0 -1
  10. package/dist/instrumentation/provider-guards.js +0 -1
  11. package/dist/instrumentation/providers/BaseInstrumentationProvider.js +0 -1
  12. package/dist/instrumentation/providers/CompositeInstrumentationProvider.js +0 -1
  13. package/dist/instrumentation/providers/ConsoleInstrumentationProvider.js +0 -1
  14. package/dist/instrumentation/providers/DebugPanelInstrumentationProvider.js +0 -1
  15. package/dist/instrumentation/providers/NewRelicInstrumentationProvider.js +0 -1
  16. package/dist/instrumentation/providers/index.js +0 -1
  17. package/dist/instrumentation/types.js +0 -1
  18. package/dist/loader-config.js +0 -1
  19. package/dist/loaders/ElementLoader.js +0 -1
  20. package/dist/loaders/element-loader-types.js +0 -1
  21. package/dist/loaders/element-loader.js +0 -1
  22. package/dist/loaders/element-package-policy.js +0 -1
  23. package/dist/loaders/esm-adapter.js +0 -1
  24. package/dist/loaders/iife-adapter.js +0 -1
  25. package/dist/loaders/index.js +0 -1
  26. package/dist/object/index.js +0 -1
  27. package/dist/pie/asset-handler.js +0 -1
  28. package/dist/pie/authoring-tag.js +0 -1
  29. package/dist/pie/authoring.js +0 -1
  30. package/dist/pie/component-context.js +0 -1
  31. package/dist/pie/config.js +0 -1
  32. package/dist/pie/configure-initialization.js +0 -1
  33. package/dist/pie/correct-response-env.js +0 -1
  34. package/dist/pie/custom-element-define.js +0 -1
  35. package/dist/pie/index.js +0 -1
  36. package/dist/pie/initialization.js +0 -1
  37. package/dist/pie/instrumentation-event-bridge.js +0 -1
  38. package/dist/pie/instrumentation-event-map.js +0 -1
  39. package/dist/pie/instrumentation-provider-resolution.js +0 -1
  40. package/dist/pie/item-controller-storage.js +0 -1
  41. package/dist/pie/item-controller.js +0 -1
  42. package/dist/pie/item-session-contract.js +0 -1
  43. package/dist/pie/logger.js +0 -1
  44. package/dist/pie/math-rendering.js +0 -1
  45. package/dist/pie/overrides.js +0 -1
  46. package/dist/pie/player-initializer.js +0 -1
  47. package/dist/pie/registry.js +0 -1
  48. package/dist/pie/resource-monitor.js +0 -1
  49. package/dist/pie/scoring.js +0 -1
  50. package/dist/pie/stage-tracker.js +0 -1
  51. package/dist/pie/stages.js +0 -1
  52. package/dist/pie/tag-names.js +0 -1
  53. package/dist/pie/types.js +0 -1
  54. package/dist/pie/updates.js +0 -1
  55. package/dist/pie/utils.js +0 -1
  56. package/dist/pie/versioned-tag.js +0 -1
  57. package/dist/player-strategy.js +0 -1
  58. package/dist/security/index.js +0 -1
  59. package/dist/security/sanitize-item-markup.d.ts +11 -0
  60. package/dist/security/sanitize-item-markup.js +5 -3
  61. package/dist/security/sanitize-svg-icon.js +0 -1
  62. package/dist/security/validate-style-url.js +0 -1
  63. package/dist/security/wrap-model-rich-content.js +0 -1
  64. package/dist/security/wrap-overwide-images.js +0 -1
  65. package/dist/security/wrap-overwide-tables.js +0 -1
  66. package/dist/server/npm-registry.js +0 -1
  67. package/dist/types/index.js +0 -1
  68. package/dist/ui/content-styles.d.ts +73 -0
  69. package/dist/ui/content-styles.js +204 -0
  70. package/dist/ui/debug-panel-persistence.js +0 -1
  71. package/dist/ui/first-focusable.js +0 -1
  72. package/dist/ui/focus-trap.js +0 -1
  73. package/dist/ui/safe-storage.js +0 -1
  74. package/dist/ui/scope-css.d.ts +56 -0
  75. package/dist/ui/scope-css.js +310 -0
  76. package/dist/ui/zoom-compensation.js +0 -1
  77. package/package.json +9 -5
  78. package/dist/config/profile.js.map +0 -1
  79. package/dist/i18n/index.js.map +0 -1
  80. package/dist/i18n/loader.js.map +0 -1
  81. package/dist/i18n/simple-i18n.js.map +0 -1
  82. package/dist/i18n/types.js.map +0 -1
  83. package/dist/index.js.map +0 -1
  84. package/dist/instrumentation/debug-panel-stream.js.map +0 -1
  85. package/dist/instrumentation/index.js.map +0 -1
  86. package/dist/instrumentation/provider-guards.js.map +0 -1
  87. package/dist/instrumentation/providers/BaseInstrumentationProvider.js.map +0 -1
  88. package/dist/instrumentation/providers/CompositeInstrumentationProvider.js.map +0 -1
  89. package/dist/instrumentation/providers/ConsoleInstrumentationProvider.js.map +0 -1
  90. package/dist/instrumentation/providers/DebugPanelInstrumentationProvider.js.map +0 -1
  91. package/dist/instrumentation/providers/NewRelicInstrumentationProvider.js.map +0 -1
  92. package/dist/instrumentation/providers/index.js.map +0 -1
  93. package/dist/instrumentation/types.js.map +0 -1
  94. package/dist/loader-config.js.map +0 -1
  95. package/dist/loaders/ElementLoader.js.map +0 -1
  96. package/dist/loaders/element-loader-types.js.map +0 -1
  97. package/dist/loaders/element-loader.js.map +0 -1
  98. package/dist/loaders/element-package-policy.js.map +0 -1
  99. package/dist/loaders/esm-adapter.js.map +0 -1
  100. package/dist/loaders/iife-adapter.js.map +0 -1
  101. package/dist/loaders/index.js.map +0 -1
  102. package/dist/object/index.js.map +0 -1
  103. package/dist/pie/asset-handler.js.map +0 -1
  104. package/dist/pie/authoring-tag.js.map +0 -1
  105. package/dist/pie/authoring.js.map +0 -1
  106. package/dist/pie/component-context.js.map +0 -1
  107. package/dist/pie/config.js.map +0 -1
  108. package/dist/pie/configure-initialization.js.map +0 -1
  109. package/dist/pie/correct-response-env.js.map +0 -1
  110. package/dist/pie/custom-element-define.js.map +0 -1
  111. package/dist/pie/index.js.map +0 -1
  112. package/dist/pie/initialization.js.map +0 -1
  113. package/dist/pie/instrumentation-event-bridge.js.map +0 -1
  114. package/dist/pie/instrumentation-event-map.js.map +0 -1
  115. package/dist/pie/instrumentation-provider-resolution.js.map +0 -1
  116. package/dist/pie/item-controller-storage.js.map +0 -1
  117. package/dist/pie/item-controller.js.map +0 -1
  118. package/dist/pie/item-session-contract.js.map +0 -1
  119. package/dist/pie/logger.js.map +0 -1
  120. package/dist/pie/math-rendering.js.map +0 -1
  121. package/dist/pie/overrides.js.map +0 -1
  122. package/dist/pie/player-initializer.js.map +0 -1
  123. package/dist/pie/registry.js.map +0 -1
  124. package/dist/pie/resource-monitor.js.map +0 -1
  125. package/dist/pie/scoring.js.map +0 -1
  126. package/dist/pie/stage-tracker.js.map +0 -1
  127. package/dist/pie/stages.js.map +0 -1
  128. package/dist/pie/tag-names.js.map +0 -1
  129. package/dist/pie/types.js.map +0 -1
  130. package/dist/pie/updates.js.map +0 -1
  131. package/dist/pie/utils.js.map +0 -1
  132. package/dist/pie/versioned-tag.js.map +0 -1
  133. package/dist/player-strategy.js.map +0 -1
  134. package/dist/security/index.js.map +0 -1
  135. package/dist/security/sanitize-item-markup.js.map +0 -1
  136. package/dist/security/sanitize-svg-icon.js.map +0 -1
  137. package/dist/security/validate-style-url.js.map +0 -1
  138. package/dist/security/wrap-model-rich-content.js.map +0 -1
  139. package/dist/security/wrap-overwide-images.js.map +0 -1
  140. package/dist/security/wrap-overwide-tables.js.map +0 -1
  141. package/dist/server/npm-registry.js.map +0 -1
  142. package/dist/types/index.js.map +0 -1
  143. package/dist/ui/debug-panel-persistence.js.map +0 -1
  144. package/dist/ui/first-focusable.js.map +0 -1
  145. package/dist/ui/focus-trap.js.map +0 -1
  146. package/dist/ui/safe-storage.js.map +0 -1
  147. package/dist/ui/zoom-compensation.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AA+CA,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,iCAAa,CAAA;IACb,mCAAe,CAAA;IACf,mCAAe,CAAA;IACf,iDAA6B,CAAA;AAC9B,CAAC,EALW,gBAAgB,KAAhB,gBA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Y,KAAZ,YAAY,QAKvB","sourcesContent":["/**\n * This contains copies of the data types we use in PIEOneer. These types, unlike\n * the ones in the datastore package, should not have any dependencies, and might in some\n * cases be more shallow than their originals. The main reason for these is that they should\n * be able to be used in front-end code (as well as the PIEOneer backend code).\n *\n * INCLUDING REFERENCES TO THE DATASTORE PACKAGE INSTEAD WILL MAKE PIEONEER THROW 500\n * EVERYWHERE WITHOUT ANY FURTHER EXPLANATION\n */\nexport interface BaseEntity {\n\tid?: string;\n\tcreatedAt?: Date;\n\tupdatedAt?: Date;\n}\n\nexport interface CollectionEntity extends BaseEntity {\n\tname: string;\n\torganization: string | OrganizationEntity;\n}\n\nexport interface OrganizationEntity extends BaseEntity {\n\tname: string;\n\tdefaultCollection?: string | CollectionEntity;\n}\n\nexport interface UserEntity extends BaseEntity {\n\temail: string;\n\tname?: string;\n}\n\nexport interface ClientEntity extends BaseEntity {\n\tname: string;\n\tsecret: string;\n\tuser: string | UserEntity;\n\torganization: string | OrganizationEntity;\n}\n\nexport interface AssignmentEntity extends BaseEntity {\n\torganization: string | OrganizationEntity;\n}\n\nexport interface SessionEntity extends BaseEntity {\n\titem: ItemEntity;\n\tassignment?: string | AssignmentEntity; // TODO: Remove after data is migrated\n\torganization?: string | OrganizationEntity;\n}\n\nexport enum SessionEventType {\n\tSAVE = \"save\",\n\tMODEL = \"model\",\n\tSCORE = \"score\",\n\tMANUAL_SCORE = \"manual-score\",\n}\n\nexport enum ScoreType {\n\tAUTO = \"auto\",\n\tMANUAL = \"manual\",\n}\n\nexport interface SessionScore {\n\tpoints?: number;\n\tmax?: number;\n\ttype?: ScoreType;\n\tpartialScoring?: boolean;\n\tmessage?: string;\n\terrors?: string[];\n}\n\nexport interface SessionAutoScore extends SessionScore {\n\telements?: any[];\n\textraProps?: any;\n}\n\nexport interface SessionManualScore extends SessionScore {}\n\nexport interface SessionEventEntity extends BaseEntity {\n\tsession: string | SessionEntity;\n\ttype?: SessionEventType;\n\tsaveEventId?: string;\n\tscore?: number;\n}\n\nexport enum ModeType {\n\tGATHER = \"gather\",\n\tVIEW = \"view\",\n\tEVALUATE = \"evaluate\",\n}\n\nexport interface FlatSession {\n\tid: string;\n\tassignment: AssignmentEntity;\n\titem: string;\n\tdata: any[];\n\tcreatedAt: Date;\n\tupdatedAt: Date;\n\tmode: ModeType;\n\tautoScore: SessionAutoScore;\n\tmanualScore: SessionManualScore;\n\tevents: SessionEventEntity[]; // raw events;\n}\n\nexport interface SemVerPrerelease {\n\ttag: string;\n\tversion: number;\n}\n\nexport interface SemVer {\n\tmajor: number;\n\tminor: number;\n\tpatch: number;\n\tprerelease?: SemVerPrerelease;\n}\n\nexport interface VersionEntity extends BaseEntity {\n\tbaseId: string;\n\tsignature?: string;\n\tversion: SemVer;\n}\n\nexport interface SearchMetaData {\n\t[key: string]: any;\n}\n\nexport interface SearchMetaDataEntity extends BaseEntity {\n\tsearchMetaData?: SearchMetaData;\n}\n\nexport interface ConfigElements {\n\t[key: string]: string;\n}\n\nexport interface PieModel {\n\tid: string;\n\telement: string;\n\t/**\n\t * QTI/APIP-style accessibility catalogs owned by this model's renderable fields\n\t * (prompt, choices, feedback, rationale, etc.).\n\t */\n\taccessibilityCatalogs?: AccessibilityCatalog[];\n\n\t[key: string]: any;\n}\n\nexport interface ConfigEntity {\n\tid?: string;\n\tmarkup: string;\n\telements: ConfigElements;\n\tmodels: PieModel[];\n\tconfiguration?: Record<string, any>; // NEW: Configure settings for authoring mode\n\n\t/**\n\t * QTI 3.0: Extracted accessibility catalogs from embedded SSML.\n\t * Automatically generated by SSMLExtractor when <speak> tags are found in content.\n\t */\n\textractedCatalogs?: AccessibilityCatalog[];\n\n\t[key: string]: any;\n}\n\nexport interface ConfigContainerEntity extends BaseEntity {\n\tconfig: ConfigEntity;\n}\n\nexport interface PassageEntity\n\textends VersionEntity,\n\t\tConfigContainerEntity,\n\t\tSearchMetaDataEntity {\n\tname: string;\n\t/** QTI/APIP-style accessibility catalogs owned by this passage content. */\n\taccessibilityCatalogs?: AccessibilityCatalog[];\n\tretired?: boolean;\n\tpublished?: boolean;\n\t// Search result highlights from OpenSearch (keyed by field name)\n\thighlights?: Record<string, string[]>;\n}\n\nexport interface ItemEntity\n\textends VersionEntity,\n\t\tConfigContainerEntity,\n\t\tSearchMetaDataEntity {\n\tname?: string;\n\tpassage?: string | PassageEntity;\n\t/** QTI/APIP-style accessibility catalogs owned by the item root. */\n\taccessibilityCatalogs?: AccessibilityCatalog[];\n\tretired?: boolean;\n\tpublished?: boolean;\n\tconfiguration?: any;\n\t// Search result highlights from OpenSearch (keyed by field name)\n\thighlights?: Record<string, string[]>;\n}\n\nexport interface AssignmentSessionData {\n\tassignment: AssignmentEntity;\n\tsessions: FlatSession[];\n\titems: ItemEntity[];\n\terror?: string;\n}\n\n/**\n * Metadata specifically for interpretation by clients, typically containing\n * options that are relevant for the user interface. This is not indexed for search.\n */\nexport interface SettingsMetaData {\n\t[key: string]: any;\n}\n\n/**\n * Objects that contain metadata in the settings property, which is NOT indexed for search\n * but typically only relevant for particular client cases.\n */\nexport interface SettingsMetaDataEntity {\n\tsettings?: SettingsMetaData;\n}\n\n/**\n * A reference to an item with optionally a title, settings and metadata.\n */\nexport interface QuestionEntity\n\textends SearchMetaDataEntity,\n\t\tSettingsMetaDataEntity {\n\tid?: string;\n\ttitle?: string;\n\titemVId: string;\n\titem?: ItemEntity;\n}\n\n// ============================================================================\n// QTI-aligned assessment model (QTI 2.x compatible shape)\n// ============================================================================\n\nexport type RubricBlockView =\n\t| \"author\"\n\t| \"candidate\"\n\t| \"proctor\"\n\t| \"scorer\"\n\t| \"testConstructor\"\n\t| \"tutor\";\n\nexport interface RubricBlock {\n\tidentifier?: string;\n\t/** QTI spec: space-separated list of roles; stored as an array */\n\tview: RubricBlockView[];\n\tclass?: \"stimulus\" | \"instructions\" | \"rubric\";\n\n\t/**\n\t * Versioned ID reference to the passage (when class=\"stimulus\").\n\t */\n\tpassageVId?: string;\n\n\t/**\n\t * Embedded passage entity (PIE-native approach).\n\t * The passage is rendered using the same ItemPlayer infrastructure as items.\n\t * Contains a PIE config with markup, elements, and models.\n\t */\n\tpassage?: PassageEntity;\n\n\t/**\n\t * Simple HTML content string (for basic use cases).\n\t * Alternative to the passage entity approach.\n\t */\n\tcontent?: string;\n}\n\n/**\n * QTI-aligned assessment item reference (maps to qti-assessment-item-ref).\n * References an item within a section. The item property contains the resolved\n * ItemEntity with its PIE config.\n */\nexport interface AssessmentItemRef extends SearchMetaDataEntity {\n\tid?: string;\n\tidentifier: string;\n\ttitle?: string;\n\trequired?: boolean;\n\n\t/**\n\t * Item virtual ID - stable identifier for the item across versions\n\t */\n\titemVId?: string;\n\n\t/**\n\t * Resolved item entity with PIE config.\n\t * This is populated by the client before passing to the player.\n\t */\n\titem?: ItemEntity;\n\n\t/** Item-level settings for tool requirements and customization */\n\tsettings?: ItemSettings;\n}\n\nexport interface AssessmentSection\n\textends SearchMetaDataEntity,\n\t\tSettingsMetaDataEntity {\n\tid?: string;\n\tidentifier: string;\n\ttitle?: string;\n\tvisible?: boolean;\n\trequired?: boolean;\n\t/**\n\t * QTI 3 pagination hint (`qti-assessment-section@keep-together`).\n\t *\n\t * Indicates that the delivery system SHOULD render this section's items\n\t * together rather than splitting them across pages. This is strictly a\n\t * rendering/layout hint — it does NOT disable item-level navigation,\n\t * current-item tracking, or `item-selected` events in the section player.\n\t * Paginated and keep-together sections both support Next/Back,\n\t * `getCurrentItem()`, and `item-selected` events.\n\t */\n\tkeepTogether?: boolean;\n\n\tsections?: AssessmentSection[];\n\n\t/**\n\t * QTI 3.0: Assessment item references (items in this section).\n\t * Maps to qti-assessment-item-ref in QTI 3.0 XML.\n\t */\n\tassessmentItemRefs?: AssessmentItemRef[];\n\n\t// Shared context (passages/instructions/rubrics) for this section\n\trubricBlocks?: RubricBlock[];\n\n\tsort?: string;\n}\n\nexport interface TestPart {\n\tid?: string;\n\tidentifier: string;\n\tnavigationMode: \"linear\" | \"nonlinear\";\n\tsubmissionMode: \"individual\" | \"simultaneous\";\n\tsections: AssessmentSection[];\n}\n\n// ============================================================================\n// QTI 3.0 Types\n// ============================================================================\n\nexport interface ContextDeclaration {\n\tidentifier: string;\n\tbaseType:\n\t\t| \"boolean\"\n\t\t| \"integer\"\n\t\t| \"float\"\n\t\t| \"string\"\n\t\t| \"identifier\"\n\t\t| \"point\"\n\t\t| \"pair\"\n\t\t| \"directedPair\"\n\t\t| \"duration\"\n\t\t| \"file\"\n\t\t| \"uri\";\n\tcardinality: \"single\" | \"multiple\" | \"ordered\" | \"record\";\n\tdefaultValue?: any;\n}\n\nexport interface CatalogCard {\n\tcatalog: string; // 'spoken', 'sign-language', 'braille', etc.\n\tlanguage?: string;\n\tcontent: string;\n}\n\nexport interface AccessibilityCatalog {\n\tidentifier: string;\n\tcards: CatalogCard[];\n}\n\nexport interface PersonalNeedsProfile {\n\tsupports: string[];\n\tprohibitedSupports?: string[];\n\tactivateAtInit?: string[];\n}\n\n/**\n * QTI 3.0: Reference to a shared stimulus (passage).\n * Maps to qti-assessment-stimulus-ref element.\n *\n * NOTE: Not currently used. We embed PassageEntity directly in RubricBlock instead.\n * Kept for potential future use if we need to support external stimulus references.\n */\n/*\nexport interface StimulusRef {\n\tidentifier: string;\n\thref: string;\n}\n*/\n\nexport interface AssessmentEntity extends BaseEntity, SearchMetaDataEntity {\n\tname?: string;\n\ttitle?: string;\n\tidentifier?: string;\n\tdescription?: string;\n\n\t/** Enhanced structured settings for assessment configuration */\n\tsettings?: AssessmentSettings;\n\n\t/** QTI version - '3.0' for QTI 3.0 format */\n\tqtiVersion?: \"3.0\";\n\n\t/** QTI 3.0: Context declarations (global shared variables) */\n\tcontextDeclarations?: ContextDeclaration[];\n\n\t/** QTI 3.0: Integrated APIP accessibility catalogs */\n\taccessibilityCatalogs?: AccessibilityCatalog[];\n\n\t/** QTI 3.0: Personal Needs Profile (PNP 3.0) */\n\tpersonalNeedsProfile?: PersonalNeedsProfile;\n\n\t/**\n\t * QTI 3.0: testParts structure (authoritative for QTI format).\n\t */\n\ttestParts?: TestPart[];\n\n\t/** QTI 3.0: Stimulus material references (Phase 3 - placeholder) */\n\tstimulusRefs?: any[];\n}\n\n/**\n * Enhanced settings structure for assessment configuration.\n * Provides structured fields for district policies, test administration,\n * tool configurations, and theme settings while remaining extensible.\n */\nexport interface AssessmentSettings {\n\t/** District/organization policies */\n\tdistrictPolicy?: {\n\t\tblockedTools?: string[]; // PNP support IDs that are blocked\n\t\trequiredTools?: string[]; // PNP support IDs that are required\n\t\tpolicies?: Record<string, any>;\n\t};\n\n\t/** Test administration configuration */\n\ttestAdministration?: {\n\t\tmode?: \"practice\" | \"test\" | \"benchmark\";\n\t\ttoolOverrides?: Record<string, boolean>; // Override specific PNP supports\n\t\tstartDate?: string;\n\t\tendDate?: string;\n\t};\n\n\t/** Tool-specific provider configurations */\n\ttoolConfigs?: {\n\t\t// Calculator-specific options are owned by the calculator tool package.\n\t\tcalculator?: AssessmentCalculatorConfig;\n\t\t/**\n\t\t * Text-to-speech configuration.\n\t\t *\n\t\t * Standard parameters (voice, rate, pitch) are portable across providers\n\t\t * and follow W3C Web Speech API specifications.\n\t\t *\n\t\t * Provider-specific extensions should be placed in providerOptions.\n\t\t *\n\t\t * @see https://w3c.github.io/speech-api/\n\t\t */\n\t\ttextToSpeech?: {\n\t\t\t/**\n\t\t\t * TTS provider\n\t\t\t *\n\t\t\t * @standard \"browser\" uses W3C Web Speech API\n\t\t\t * @extension \"polly\" and \"custom\" are provider-specific\n\t\t\t */\n\t\t\tprovider?: \"browser\" | \"polly\" | \"custom\";\n\n\t\t\t/**\n\t\t\t * Voice identifier (provider-specific names)\n\t\t\t *\n\t\t\t * @standard W3C Web Speech API (concept)\n\t\t\t * @example \"Joanna\" (Polly), \"en-US-Standard-A\" (Google), browser voices\n\t\t\t */\n\t\t\tvoice?: string;\n\n\t\t\t/**\n\t\t\t * Speech rate (speed multiplier)\n\t\t\t *\n\t\t\t * @standard W3C Web Speech API\n\t\t\t * @range 0.25 to 4.0\n\t\t\t * @default 1.0\n\t\t\t */\n\t\t\trate?: number;\n\n\t\t\t/**\n\t\t\t * Pitch adjustment\n\t\t\t *\n\t\t\t * @standard W3C Web Speech API\n\t\t\t * @range 0 to 2 (as multiplier)\n\t\t\t * @default 1.0\n\t\t\t */\n\t\t\tpitch?: number;\n\n\t\t\t/**\n\t\t\t * Speech Rule Engine options for generated MathML speech.\n\t\t\t *\n\t\t\t * `style` is passed to SRE directly; ClearSpeak combines multiple\n\t\t\t * preferences with \":\" (for example,\n\t\t\t * \"ImpliedTimes_MoreImpliedTimes:Paren_Silent\").\n\t\t\t *\n\t\t\t * Mirrors assessment-toolkit's SREMathSpeechOptions without importing\n\t\t\t * toolkit service types into the shared content contract package.\n\t\t\t */\n\t\t\tmathSpeech?: {\n\t\t\t\tdomain?: string;\n\t\t\t\tstyle?: string;\n\t\t\t\tengineOptions?: Record<string, unknown>;\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Provider-specific options (extensions)\n\t\t\t *\n\t\t\t * @extension Not portable across providers\n\t\t\t * @example For AWS Polly: { engine: \"neural\", region: \"us-east-1\" }\n\t\t\t * @example For Google Cloud: { audioEncoding: \"MP3\", effectsProfileId: [\"headphone-class-device\"] }\n\t\t\t */\n\t\t\tproviderOptions?: Record<string, any>;\n\t\t};\n\t\t[toolId: string]: any; // Other tool configs\n\t};\n\n\t/** Theme configuration (not in PNP) */\n\tthemeConfig?: {\n\t\tscheme?: \"default\" | \"high-contrast\" | \"dark\";\n\t\tfontSize?: number;\n\t\tfontFamily?: string;\n\t\tlineHeight?: number;\n\t\treducedMotion?: boolean;\n\t};\n\n\t/** Product-specific extensions */\n\t[key: string]: any;\n}\n\n/**\n * Calculator options exposed through assessment settings.\n * The engine is implicit (Desmos).\n */\nexport interface AssessmentCalculatorConfig {\n\ttype?: \"basic\" | \"scientific\" | \"graphing\";\n\t[key: string]: any;\n}\n\n/**\n * Item-level settings for tool requirements.\n * Used in AssessmentItemRef.settings to specify item-specific tool needs.\n */\nexport interface ItemSettings {\n\trequiredTools?: string[]; // PNP support IDs required for this item\n\trestrictedTools?: string[]; // PNP support IDs blocked for this item\n\ttoolParameters?: Record<string, any>; // Tool-specific config per item\n\n\t[key: string]: any; // Product extensions\n}\n\nexport interface SanctionedVersionEntity extends BaseEntity {\n\torganization?: string | OrganizationEntity; // if set, this is an organization specific matcher, otherwise, it's global\n\tmatch: string; // semver match expression, e.g. '1.*'\n\tpie: string; // e.g. @pie-element/calculator\n\tversion: string; // e.g. 2.14.24\n}\n\nexport enum SanctionedVersionChangeStatus {\n\tPENDING = \"pending\",\n\tIN_PROGRESS = \"in_progress\",\n\tCOMPLETED = \"completed\",\n\tFAILED = \"failed\",\n}\n\nexport interface SanctionedVersionChangeRequest {\n\tpie: string;\n\tmatch: string;\n\tversion: string;\n}\n\nexport interface SanctionedVersionChangeEntity extends BaseEntity {\n\torganization?: string | OrganizationEntity;\n\tcreatedBy: string | UserEntity;\n\tstatus: SanctionedVersionChangeStatus;\n\trequestedChanges: SanctionedVersionChangeRequest[];\n\tbeforeState: SanctionedVersionEntity[];\n\tsummary?: string;\n\tjobId: string;\n}\n\nexport type PlayerMode = \"gather\" | \"view\" | \"evaluate\" | \"author\";\n\nexport type PlayerRole = \"student\" | \"instructor\";\n\nexport interface Env {\n\tmode: PlayerMode;\n\trole: PlayerRole;\n\tpartialScoring?: boolean;\n}\n\nexport interface OutcomeResponse {\n\tid: string;\n\telement: string;\n\tscore?: number;\n\tempty?: boolean;\n\tcompleted?: boolean;\n\n\t[key: string]: any;\n}\n\nexport interface PieController {\n\tmodel(model: PieModel, sessionData: any[], env?: any): Promise<PieModel>;\n\n\toutcome(\n\t\tmodelOrSessionData: PieModel | any[],\n\t\tsessionOrEnv?: any,\n\t\tenv?: any,\n\t): Promise<OutcomeResponse>;\n\n\tscore: (config: object, session: object, env: object) => Promise<object>;\n\tcreateCorrectResponseSession: (\n\t\tconfig: object,\n\t\tenv: object,\n\t) => Promise<object>;\n\tvalidate: (model: object, config: object) => any;\n}\n\nexport interface PieItemElement {\n\t[elementName: string]: string;\n}\n\nexport type BundleInfo = {\n\turl: string;\n\thash: string;\n};\n\nexport type ItemSession = {\n\tid: string;\n\tdata: any[];\n};\n\nexport interface PieDefaultModel {\n\t// supports 'excess' properties as may be defined in pie models\n\t// https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#strict-object-literal-assignment-checking\n\t[x: string]: any;\n}\n\nexport interface PieContent {\n\tid: string;\n\t/**\n\t * Set of elements to include in the pie, provided in the format `{'element-name': 'mpm-package-name'}`\n\t */\n\telements: PieItemElement;\n\n\t/** Models for each PIE included in the item */\n\tmodels: PieModel[];\n\n\tmarkup: string;\n\n\tbundle?: BundleInfo;\n\n\tresources?: ConfigResource;\n\n\tdefaultExtraModels?: {\n\t\t[key: string]: PieDefaultModel;\n\t};\n}\n\nexport interface ConfigResource {\n\tstylesheets?: {\n\t\turl: string;\n\t}[];\n\tcontainerClass?: string;\n\tpassageContainerClass?: string;\n}\n\nexport interface AdvancedItemConfig {\n\tid: string;\n\tpie: PieContent;\n\tpassage?: PieContent;\n\tinstructorResources?: [PieContent];\n\tdefaultExtraModels?: {\n\t\t[key: string]: PieDefaultModel;\n\t};\n}\n\nexport type ItemConfig = PieContent | AdvancedItemConfig;\n\n/**\n * During the loading of elements from PIE bundles, we do a trick where we make\n * editor components available as web components by appending this to the element name.\n */\nexport const editorPostFix = \"-pie-editor--\";\n\nexport type ModelUpdatedDetail = {\n\tupdate: any;\n\treset: boolean;\n};\n\nexport class ModelUpdatedEvent extends CustomEvent<ModelUpdatedDetail> {\n\tstatic TYPE = \"model.updated\";\n\n\tconstructor(\n\t\treadonly update: any,\n\t\treadonly reset: boolean = false,\n\t) {\n\t\tsuper(ModelUpdatedEvent.TYPE, { bubbles: true, detail: { update, reset } });\n\t}\n}\n\nexport type DeleteDone = (e?: Error) => void;\n\nexport type DeleteImageDetail = {\n\tsrc: string;\n\tdone: DeleteDone;\n};\n\nexport class DeleteImageEvent extends CustomEvent<DeleteImageDetail> {\n\tstatic TYPE = \"delete.image\";\n\n\tconstructor(\n\t\treadonly src: string,\n\t\treadonly done: DeleteDone,\n\t) {\n\t\tsuper(DeleteImageEvent.TYPE, { bubbles: true, detail: { src, done } });\n\t}\n}\n\nexport interface ImageHandler {\n\tisPasted?: boolean;\n\tcancel: () => void;\n\tdone: (err?: Error, src?: string) => void;\n\tfileChosen: (file: File) => void;\n\tprogress: (percent: number, bytes: number, total: number) => void;\n}\n\nexport class InsertImageEvent extends CustomEvent<ImageHandler> {\n\tstatic TYPE = \"insert.image\";\n\n\tconstructor(readonly handler: ImageHandler) {\n\t\tsuper(InsertImageEvent.TYPE, { bubbles: true, detail: handler });\n\t}\n}\n\nexport type DeleteSoundDetail = {\n\tsrc: string;\n\tdone: DeleteDone;\n};\n\nexport class DeleteSoundEvent extends CustomEvent<DeleteSoundDetail> {\n\tstatic TYPE = \"delete.sound\";\n\n\tconstructor(\n\t\treadonly src: string,\n\t\treadonly done: DeleteDone,\n\t) {\n\t\tsuper(DeleteSoundEvent.TYPE, { bubbles: true, detail: { src, done } });\n\t}\n}\n\nexport interface SoundHandler {\n\tcancel: () => void;\n\tdone: (err?: Error, src?: string) => void;\n\tfileChosen: File;\n\tprogress: (percent: number, bytes: number, total: number) => void;\n}\n\nexport class InsertSoundEvent extends CustomEvent<SoundHandler> {\n\tstatic TYPE = \"insert.sound\";\n\n\tconstructor(readonly handler: SoundHandler) {\n\t\tsuper(InsertSoundEvent.TYPE, { bubbles: true, detail: handler });\n\t}\n}\n\nexport const isPassageEntity = (\n\tpassage: string | PassageEntity | undefined,\n): passage is PassageEntity => typeof passage === \"object\" && passage !== null;\n\nexport function isPrerelease(version: any): version is SemVer {\n\treturn (\n\t\ttypeof version === \"object\" &&\n\t\tversion !== null &&\n\t\ttypeof version.major === \"number\" &&\n\t\ttypeof version.minor === \"number\" &&\n\t\ttypeof version.patch === \"number\" &&\n\t\t!!version.prerelease && // Check if prerelease exists\n\t\ttypeof version.prerelease.tag === \"string\" &&\n\t\ttypeof version.prerelease.version === \"number\"\n\t);\n}\n\nexport function formatVersion(semVer: SemVer): string {\n\tif (!semVer) return \"\";\n\tconst base = [semVer.major, semVer.minor, semVer.patch].join(\".\");\n\tif (isPrerelease(semVer) && semVer.prerelease) {\n\t\tconst prerelease = [semVer.prerelease.tag, semVer.prerelease.version].join(\n\t\t\t\".\",\n\t\t);\n\t\treturn `${base}-${prerelease}`;\n\t}\n\treturn base;\n}\n\nexport interface PieElement extends HTMLElement {\n\tmodel: PieModel;\n\tconfiguration: any;\n\tsession: any[];\n}\n\nexport type SessionChangedDetail = {\n\tcomplete: boolean;\n\tcomponent: any;\n};\n\nexport class SessionChangedEvent extends CustomEvent<SessionChangedDetail> {\n\tstatic TYPE = \"session-changed\";\n\n\tconstructor(\n\t\treadonly component: string,\n\t\treadonly complete: boolean,\n\t) {\n\t\tsuper(SessionChangedEvent.TYPE, {\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t\tdetail: { complete, component },\n\t\t} as any);\n\t}\n}\n\ninterface ItemCfg extends ConfigEntity {}\n\ninterface ItemWPassageCfg {\n\tpie: ItemCfg;\n\tpassage: ConfigEntity;\n}\n\nexport interface LoadResponse {\n\tjs: {\n\t\tview: string[];\n\t};\n\titem: ItemCfg | ItemWPassageCfg;\n\tsession: {\n\t\tid: string;\n\t\tdata: any[];\n\t};\n}\n\nexport interface Tracker {\n\ttrack(message: string, ...args: any[]): void;\n\n\tstart(label: string): void;\n\n\tend(label: string, metadata?: { [key: string]: any }): void;\n}\n\n/**\n * Interface for storing tracker messages with timestamps\n */\n/**\n * Interface for storing tracker messages with timestamps\n */\nexport interface TrackerMessage {\n\ttimestamp: Date;\n\tmessage: string;\n\targs: any[];\n\tformattedMessage: string; // Added formatted message with interpolated args\n}\n\n/**\n * Enhanced tracker that stores messages with timestamps\n */\nexport interface EnhancedTracker extends Tracker {\n\t/**\n\t * Get all raw tracker messages ordered by timestamp (ascending)\n\t */\n\tgetMessages(): TrackerMessage[];\n\n\t/**\n\t * Get a formatted multi-line representation of all tracker messages\n\t */\n\tgetFormattedMessages(): string;\n}\n\nexport interface ScoreResponse {\n\tsession: FlatSession;\n\tscore: SessionScore;\n\tempty?: boolean;\n\n\t[key: string]: any;\n}\n\nexport interface VersionDiff {\n\tversion: SemVer;\n\tpreviousVersion: SemVer | null;\n\tcreatedAt: Date;\n\tchanges: {\n\t\tadded: Record<string, any>;\n\t\tremoved: Record<string, any>;\n\t\tmodified: Record<\n\t\t\tstring,\n\t\t\t{\n\t\t\t\tprevious: any;\n\t\t\t\tcurrent: any;\n\t\t\t}\n\t\t>;\n\t};\n\tchangeCount: number;\n}\n\nexport interface RoleToOrganizationsMapping {\n\tid?: string;\n\trole: string;\n\torganizations: OrganizationEntity[] | string[];\n\tcreatedAt?: Date;\n\tupdatedAt?: Date;\n}\n\n// CMS Types (copied from @pie-api-aws/datastore to avoid importing server-only package)\nexport enum StandardType {\n\tROOT = 0,\n\tSUBJECT = 1,\n\tLEVEL = 2,\n\tSTANDARD = 3,\n}\n\nexport interface HierarchyInfo {\n\troot?: {\n\t\tid: string;\n\t\tguid: string;\n\t\ttitle: string;\n\t};\n\tsubject?: {\n\t\tid: string;\n\t\tguid: string;\n\t\ttitle: string;\n\t};\n\tlevel?: {\n\t\tid: string;\n\t\tguid: string;\n\t\ttitle: string;\n\t\tgrades: number[];\n\t};\n}\n\nexport interface CmsLearningStandardEntity extends BaseEntity {\n\tguid: string;\n\tabbr?: string;\n\ttype: StandardType;\n\tparentId?: string;\n\tparentGuid?: string;\n\tpath?: string;\n\tdepth: number;\n\tancestors: string[];\n\thierarchy?: HierarchyInfo;\n\ttitle?: string;\n\tdescription?: string;\n\tsequence?: string;\n\torderIndex?: number;\n\tsubjectArea?: string;\n\tsubjectName?: string;\n\tcategory?: string;\n\tabType?: string;\n\tabLabel?: string;\n\tsetName?: string;\n\tpublication?: string;\n\tadopted?: string;\n\tgrades: number[];\n\tgradeNames?: string[];\n\tproperties: Record<string, string>;\n\tstatus?: \"active\" | \"retired\" | \"deprecated\";\n\tlastModifiedAt?: Date;\n\treplacesGuid?: string;\n\treplacedByGuid?: string;\n\tdescriptionHtml?: string;\n\tlastSyncedAt?: Date;\n}\n\nexport interface ItemBankConfig {\n\tcollectionId: string;\n\tsubject?: string;\n\tgradeLevels?: number[];\n\torderIndex: number;\n}\n\nexport interface DOKDistribution {\n\tdok1?: number;\n\tdok2?: number;\n\tdok3?: number;\n\tdok4?: number;\n}\n\nexport interface AssessmentGoal {\n\tdokDistribution?: DOKDistribution;\n\tconstructedResponseCount?: number;\n\tpassageGoals?: string;\n\ttotalItemCount?: {\n\t\ttarget?: number;\n\t\tmin?: number;\n\t\tmax?: number;\n\t};\n}\n\nexport interface StudioImportMetadata {\n\tstudioAssessmentProgramId?: string;\n\tstudioPublicId?: string;\n\timportedAt?: Date;\n}\n\nexport interface CmsBlueprintEntity extends BaseEntity {\n\tname: string;\n\tdescription?: string;\n\tsubject?: string;\n\tstandardSet?: string;\n\tgradeLevels: number[];\n\tstates?: string[];\n\titemBankConfigs: ItemBankConfig[];\n\tassessmentGoal?: AssessmentGoal;\n\tclaimFramework?: \"SBAC\" | \"PARCC\" | \"STATE\" | \"CUSTOM\";\n\tclaimTargets?: string[];\n\tuseSBACClusterTarget?: boolean;\n\tclusters?: string[];\n\tstudioImportMetadata?: StudioImportMetadata;\n\toriginalPrompt?: string;\n}\n\nexport interface CmsBlueprintItemEntity extends BaseEntity {\n\tblueprintId: string;\n\tstandardGuid: string;\n\tcount: number;\n\tdetails?: string;\n\tassessmentId?: string;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-panel-persistence.js","sourceRoot":"","sources":["../../src/ui/debug-panel-persistence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAQzD,MAAM,UAAU,0BAA0B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PREFIX = \"pie:debug-panels:v1\";\n\ntype DebugPanelStorageKeyArgs = {\n\tscope: string;\n\tpanelId: string;\n\taspect?: string;\n};\n\nexport function createDebugPanelStorageKey(\n\targs: DebugPanelStorageKeyArgs,\n): string {\n\tconst scope = String(args.scope || \"default\").trim() || \"default\";\n\tconst panelId = String(args.panelId || \"panel\").trim() || \"panel\";\n\tconst aspect = String(args.aspect || \"state\").trim() || \"state\";\n\treturn `${DEBUG_PANEL_STORAGE_PREFIX}:${scope}:${panelId}:${aspect}`;\n}\n\nexport function readDebugPanelState<T>(key: string): T | null {\n\tconst raw = safeLocalStorageGet(key);\n\tif (!raw) return null;\n\ttry {\n\t\treturn JSON.parse(raw) as T;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nexport function writeDebugPanelState<T>(key: string, value: T): void {\n\ttry {\n\t\tsafeLocalStorageSet(key, JSON.stringify(value));\n\t} catch {\n\t\t// ignore serialization/storage failures\n\t}\n}\n\nexport function clearDebugPanelState(key: string): void {\n\ttry {\n\t\tif (typeof localStorage === \"undefined\") return;\n\t\tlocalStorage.removeItem(key);\n\t} catch {\n\t\t// ignore\n\t}\n}\n\nexport type DebugPanelLayoutStateV1 = {\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n\tminimized: boolean;\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"first-focusable.js","sourceRoot":"","sources":["../../src/ui/first-focusable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,SAAS;IACT,wBAAwB;IACxB,4CAA4C;IAC5C,wBAAwB;IACxB,0BAA0B;IAC1B,kDAAkD;IAClD,iCAAiC;CACjC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,EAAe;IACxD,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC;QAAE,OAAO,KAAK,CAAC;IAClD,IAAI,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,IAAI,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,OAAO,EAAE,CAAC,YAAY,KAAK,IAAI,IAAI,EAAE,CAAC,cAAc,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AACnE,CAAC","sourcesContent":["/**\n * Selector for elements that are commonly keyboard-focusable in assessment UI.\n * Kept in sync with `focus-trap.ts` for consistent tab-order surfaces.\n */\nexport const FOCUSABLE_SELECTOR = [\n\t\"a[href]\",\n\t\"button:not([disabled])\",\n\t\"input:not([disabled]):not([type='hidden'])\",\n\t\"select:not([disabled])\",\n\t\"textarea:not([disabled])\",\n\t\"[contenteditable]:not([contenteditable='false'])\",\n\t\"[tabindex]:not([tabindex='-1'])\",\n].join(\",\");\n\n/**\n * Whether `el` is a reasonable programmatic focus target (matches selector,\n * not disabled, not inside `inert`, and has a layout box).\n */\nexport function isProgrammaticFocusTarget(el: HTMLElement): boolean {\n\tif (!el.matches(FOCUSABLE_SELECTOR)) return false;\n\tif (el.hasAttribute(\"disabled\")) return false;\n\tif (el.closest(\"[inert]\")) return false;\n\treturn el.offsetParent !== null || el.getClientRects().length > 0;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"focus-trap.js","sourceRoot":"","sources":["../../src/ui/focus-trap.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,yBAAyB,GACzB,MAAM,sBAAsB,CAAC;AAsB9B,SAAS,oBAAoB,CAAC,SAAsB;IACnD,OAAO,KAAK,CAAC,IAAI,CAChB,SAAS,CAAC,gBAAgB,CAAc,kBAAkB,CAAC,CAC3D,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAAC;AACjD,CAAC;AAED,SAAS,kBAAkB,CAC1B,SAAsB,EACtB,YAAiC;IAEj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ntype FocusTrapOptions = {\n\tinitialFocus?: HTMLElement | null;\n\tonEscape?: () => void;\n\t/**\n\t * When true (default), Tab from the last focusable wraps to the first and\n\t * Shift+Tab from the first wraps to the last — appropriate for modal dialogs\n\t * and popovers. When false, tab boundaries fall through to the browser's\n\t * natural tab order, so users can step out of the container in either\n\t * direction. Escape handling is unaffected.\n\t */\n\twrap?: boolean;\n\t/**\n\t * Fires when Tab attempts to leave the trap from a boundary. Only invoked\n\t * when `wrap` is false. The handler may call `event.preventDefault()` and\n\t * move focus to a custom destination; otherwise the browser's natural tab\n\t * order applies.\n\t */\n\tonTabExit?: (direction: \"forward\" | \"backward\", event: KeyboardEvent) => void;\n};\n\nfunction getFocusableElements(container: HTMLElement): HTMLElement[] {\n\treturn Array.from(\n\t\tcontainer.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR),\n\t).filter((el) => isProgrammaticFocusTarget(el));\n}\n\nfunction focusInitialTarget(\n\tcontainer: HTMLElement,\n\tinitialFocus?: HTMLElement | null,\n): void {\n\ttry {\n\t\tif (initialFocus && container.contains(initialFocus)) {\n\t\t\tinitialFocus.focus();\n\t\t\treturn;\n\t\t}\n\t\tconst focusable = getFocusableElements(container);\n\t\tif (focusable.length > 0) {\n\t\t\tfocusable[0].focus();\n\t\t\treturn;\n\t\t}\n\t\tcontainer.focus?.();\n\t} catch {\n\t\t// ignore\n\t}\n}\n\n/**\n * Focus trap helper for floating dialogs/panels.\n *\n * Keeps tab navigation contained, supports Escape callback,\n * and restores prior focus when the trap is removed.\n */\nexport function createFocusTrap(\n\tcontainer: HTMLElement,\n\toptions: FocusTrapOptions = {},\n): () => void {\n\tconst prev =\n\t\ttypeof document !== \"undefined\"\n\t\t\t? (document.activeElement as HTMLElement | null)\n\t\t\t: null;\n\tconst wrap = options.wrap ?? true;\n\tconst onKeydown = (event: KeyboardEvent) => {\n\t\tif (event.key === \"Escape\") {\n\t\t\toptions.onEscape?.();\n\t\t\treturn;\n\t\t}\n\t\tif (event.key !== \"Tab\") return;\n\n\t\tconst focusable = getFocusableElements(container);\n\t\tif (!focusable.length) {\n\t\t\tif (!wrap) return;\n\t\t\tevent.preventDefault();\n\t\t\tcontainer.focus?.();\n\t\t\treturn;\n\t\t}\n\n\t\tconst current = document.activeElement as HTMLElement | null;\n\t\tconst currentIndex = focusable.indexOf(current || focusable[0]);\n\t\tif (event.shiftKey) {\n\t\t\tif (currentIndex <= 0) {\n\t\t\t\tif (wrap) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tfocusable[focusable.length - 1].focus();\n\t\t\t\t} else {\n\t\t\t\t\toptions.onTabExit?.(\"backward\", event);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (currentIndex === focusable.length - 1) {\n\t\t\tif (wrap) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tfocusable[0].focus();\n\t\t\t} else {\n\t\t\t\toptions.onTabExit?.(\"forward\", event);\n\t\t\t}\n\t\t}\n\t};\n\n\tqueueMicrotask(() => focusInitialTarget(container, options.initialFocus));\n\tcontainer.addEventListener(\"keydown\", onKeydown);\n\n\treturn () => {\n\t\tcontainer.removeEventListener(\"keydown\", onKeydown);\n\t\ttry {\n\t\t\tprev?.focus?.();\n\t\t} catch {\n\t\t\t// ignore\n\t\t}\n\t};\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"safe-storage.js","sourceRoot":"","sources":["../../src/ui/safe-storage.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC9C,IAAI,CAAC;QACJ,IAAI,OAAO,YAAY,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC;QACrD,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,KAAa;IAC7D,IAAI,CAAC;QACJ,IAAI,OAAO,YAAY,KAAK,WAAW;YAAE,OAAO;QAChD,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACR,SAAS;IACV,CAAC;AACF,CAAC","sourcesContent":["export function safeLocalStorageGet(key: string): string | null {\n\ttry {\n\t\tif (typeof localStorage === \"undefined\") return null;\n\t\treturn localStorage.getItem(key);\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nexport function safeLocalStorageSet(key: string, value: string): void {\n\ttry {\n\t\tif (typeof localStorage === \"undefined\") return;\n\t\tlocalStorage.setItem(key, value);\n\t} catch {\n\t\t// ignore\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"zoom-compensation.js","sourceRoot":"","sources":["../../src/ui/zoom-compensation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA4B;IAChE,OAAO,EAAE,CAAC;IACV,eAAe,EAAE,IAAI;CACrB,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACxC,UAAkB,EAClB,UAAkB;IAElB,MAAM,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;IACtC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACtC,IAAY,EACZ,OAAe,EACf,eAAuB;IAEvB,OAAO,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["/**\n * Pure browser-zoom compensation math (framework-agnostic, no Svelte runes).\n *\n * Browser zoom is approximated as outerWidth / innerWidth: outerWidth is the\n * OS window size (zoom-independent) while innerWidth is in CSS pixels (shrinks\n * as zoom increases). Callers apply the returned factor via CSS `zoom` so an\n * element that would otherwise keep enlarging past `maxZoom` compounds back\n * down to the cap.\n *\n * This module is tsc-buildable and shipped in `dist`, so it can be consumed by\n * packages that resolve `@pie-players/pie-players-shared` from its published\n * build (e.g. the assessment-toolkit CE bundle) as well as by the reactive\n * Svelte wrapper in `./use-zoom-compensation.svelte.ts`, which packages built\n * with Vite alias to source.\n */\n\nexport type ZoomCompensationOptions = {\n\t/**\n\t * Zoom level (as a ratio, e.g. `2` for 200%) below which the factor is 1.\n\t * Above this level the factor shrinks as `maxZoom / zoom`.\n\t */\n\tmaxZoom: number;\n\t/** Lower bound on the returned factor. */\n\tminCompensation: number;\n};\n\n/**\n * Shared zoom-cap settings for the toolbar icon buttons (the TTS play button and\n * the calculator button) so both compensate identically and can't drift apart.\n * Grow normally up to 200%, then freeze; the 0.25 floor keeps the cap holding\n * past 500% browser zoom (see the minCompensation note in\n * section-player's SectionPlayerTabbedContent).\n */\nexport const ICON_BUTTON_ZOOM_OPTIONS: ZoomCompensationOptions = {\n\tmaxZoom: 2,\n\tminCompensation: 0.25,\n};\n\n/**\n * Approximate the browser zoom level from an outer/inner width pair. Falls\n * back to 1 (100%) if the ratio isn't finite or is non-positive (which happens\n * during SSR, in headless envs, and briefly during resize on some browsers).\n */\nexport function approximateZoomFromWidths(\n\touterWidth: number,\n\tinnerWidth: number,\n): number {\n\tconst ratio = outerWidth / innerWidth;\n\treturn Number.isFinite(ratio) && ratio > 0 ? ratio : 1;\n}\n\n/**\n * Pure zoom-compensation math: exactly 1 at zoom <= maxZoom, then shrinks as\n * `maxZoom / zoom`, floored at `minCompensation` to guard against inflated\n * ratios from window chrome / side panels making the element unusably small.\n */\nexport function computeZoomCompensation(\n\tzoom: number,\n\tmaxZoom: number,\n\tminCompensation: number,\n): number {\n\treturn Math.max(minCompensation, Math.min(1, maxZoom / zoom));\n}\n"]}