@pie-players/pie-players-shared 1.0.0-beta.7 → 1.0.0-beta.9

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 (44) hide show
  1. package/README.md +16 -14
  2. package/dist/i18n/catalogs.d.ts +20 -13
  3. package/dist/i18n/catalogs.js +22 -23
  4. package/dist/i18n/language-tags.d.ts +23 -6
  5. package/dist/i18n/language-tags.js +74 -9
  6. package/dist/i18n/messages/en-US.d.ts +21 -4
  7. package/dist/i18n/messages/en-US.js +23 -4
  8. package/dist/i18n/types.d.ts +7 -2
  9. package/dist/index.d.ts +1 -1
  10. package/dist/item-session-control/index.d.ts +16 -0
  11. package/dist/item-session-control/index.js +5 -0
  12. package/dist/{formative → item-session-control}/mastery.d.ts +5 -5
  13. package/dist/{formative → item-session-control}/mastery.js +3 -3
  14. package/dist/{formative → item-session-control}/outcome.d.ts +3 -3
  15. package/dist/{formative → item-session-control}/outcome.js +2 -2
  16. package/dist/{formative → item-session-control}/policy.d.ts +11 -11
  17. package/dist/{formative → item-session-control}/policy.js +12 -12
  18. package/dist/item-session-control/session.d.ts +19 -0
  19. package/dist/{formative → item-session-control}/session.js +12 -12
  20. package/dist/{formative → item-session-control}/state.d.ts +26 -26
  21. package/dist/{formative → item-session-control}/state.js +13 -13
  22. package/dist/{formative → item-session-control}/types.d.ts +38 -40
  23. package/dist/{formative → item-session-control}/types.js +2 -2
  24. package/dist/security/private-hosts.d.ts +27 -0
  25. package/dist/security/private-hosts.js +85 -0
  26. package/dist/timed-media/index.d.ts +1 -1
  27. package/dist/timed-media/index.js +1 -1
  28. package/dist/timed-media/policy.d.ts +2 -2
  29. package/dist/timed-media/policy.js +2 -2
  30. package/dist/timed-media/session.d.ts +1 -1
  31. package/dist/timed-media/session.js +1 -1
  32. package/dist/timed-media/types.d.ts +11 -11
  33. package/dist/tools/term-lookup.d.ts +15 -0
  34. package/dist/tools/term-lookup.js +16 -0
  35. package/dist/types/index.d.ts +32 -18
  36. package/dist/types/interchange.d.ts +66 -4
  37. package/dist/ui/fontawesome.d.ts +51 -0
  38. package/dist/ui/fontawesome.js +122 -0
  39. package/package.json +15 -6
  40. package/dist/formative/index.d.ts +0 -16
  41. package/dist/formative/index.js +0 -5
  42. package/dist/formative/session.d.ts +0 -19
  43. package/dist/i18n/messages/nl-NL.d.ts +0 -639
  44. package/dist/i18n/messages/nl-NL.js +0 -639
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-players-shared",
3
- "version": "1.0.0-beta.7",
3
+ "version": "1.0.0-beta.9",
4
4
  "type": "module",
5
5
  "description": "Shared runtime + UI utilities for PIE players",
6
6
  "license": "MIT",
@@ -29,6 +29,10 @@
29
29
  "types": "./dist/security/index.d.ts",
30
30
  "import": "./dist/security/index.js"
31
31
  },
32
+ "./security/private-hosts": {
33
+ "types": "./dist/security/private-hosts.d.ts",
34
+ "import": "./dist/security/private-hosts.js"
35
+ },
32
36
  "./object": {
33
37
  "types": "./dist/object/index.d.ts",
34
38
  "import": "./dist/object/index.js"
@@ -41,9 +45,9 @@
41
45
  "types": "./dist/types/index.d.ts",
42
46
  "import": "./dist/types/index.js"
43
47
  },
44
- "./formative": {
45
- "types": "./dist/formative/index.d.ts",
46
- "import": "./dist/formative/index.js"
48
+ "./item-session-control": {
49
+ "types": "./dist/item-session-control/index.d.ts",
50
+ "import": "./dist/item-session-control/index.js"
47
51
  },
48
52
  "./timed-media": {
49
53
  "types": "./dist/timed-media/index.d.ts",
@@ -97,6 +101,10 @@
97
101
  "types": "./dist/ui/content-styles.d.ts",
98
102
  "import": "./dist/ui/content-styles.js"
99
103
  },
104
+ "./ui/fontawesome": {
105
+ "types": "./dist/ui/fontawesome.d.ts",
106
+ "import": "./dist/ui/fontawesome.js"
107
+ },
100
108
  "./tools/term-lookup": {
101
109
  "types": "./dist/tools/term-lookup.d.ts",
102
110
  "import": "./dist/tools/term-lookup.js"
@@ -109,6 +117,7 @@
109
117
  "@pie-element/shared-utils": "0.1.6",
110
118
  "@pie-lib/math-rendering-module": "6.0.0",
111
119
  "dompurify": "^3.4.17",
120
+ "ipaddr.js": "^2.5.0",
112
121
  "semver": "^7.8.5"
113
122
  },
114
123
  "scripts": {
@@ -122,7 +131,7 @@
122
131
  "scan-hardcoded": "bun run src/i18n/scripts/scan-hardcoded.ts"
123
132
  },
124
133
  "devDependencies": {
125
- "@biomejs/biome": "^2.6.2",
134
+ "@biomejs/biome": "^2.6.4",
126
135
  "@happy-dom/global-registrator": "^21.0.4",
127
136
  "@pie-element/shared-math-rendering-mathjax": "0.1.8",
128
137
  "@playwright/test": "^1.64.1",
@@ -130,7 +139,7 @@
130
139
  "es-module-shims": "^2.8.4",
131
140
  "esbuild": "^0.28.2",
132
141
  "glob": "^13.0.0",
133
- "svelte": "^5.57.2",
142
+ "svelte": "^5.57.3",
134
143
  "svelte-check": "^4.7.6",
135
144
  "typescript": "^5.9.3"
136
145
  },
@@ -1,16 +0,0 @@
1
- /**
2
- * Formative delivery: Try state, feedback reveal, and section mastery.
3
- *
4
- * Pure and Node-safe by design — no DOM, no timers, no element registry — so
5
- * the contract is testable without a browser and an adapter can import it
6
- * without pulling in a player. Everything that touches the DOM stays in
7
- * `@pie-players/pie-section-player`.
8
- *
9
- * Contract: `docs/prds/formative-delivery-contract.md`.
10
- */
11
- export type { FormativeAction, FormativeCorrectness, FormativeDeliveryPolicy, FormativeEnvOverride, FormativeFeedbackReveal, FormativeItemPolicy, FormativeItemState, FormativeItemView, FormativeMasteryRollup, FormativeRevealTiming, FormativeScoredOutcome, FormativeSectionProjection, FormativeSectionSlice, FormativeTryLimit, FormativeTryOutcome, ResolvedFormativePolicy, } from "./types.js";
12
- export { FORMATIVE_POLICY_DEFAULTS, isFormativeSectionEnabled, resolveFormativePolicies, resolveFormativePolicy, } from "./policy.js";
13
- export { aggregateFormativeOutcome } from "./outcome.js";
14
- export { FORMATIVE_ITEM_STATE_VERSION, createFormativeItemState, hideFormativeItem, recordFormativeTry, resolveFormativeItemView, retryFormativeItem, revealFormativeItem, } from "./state.js";
15
- export { FORMATIVE_MASTERY_VERSION, rollupFormativeMastery } from "./mastery.js";
16
- export { FORMATIVE_SLICE_VERSION, normalizeFormativeSectionSlice, toFormativeSectionSlice, } from "./session.js";
@@ -1,5 +0,0 @@
1
- export { FORMATIVE_POLICY_DEFAULTS, isFormativeSectionEnabled, resolveFormativePolicies, resolveFormativePolicy, } from "./policy.js";
2
- export { aggregateFormativeOutcome } from "./outcome.js";
3
- export { FORMATIVE_ITEM_STATE_VERSION, createFormativeItemState, hideFormativeItem, recordFormativeTry, resolveFormativeItemView, retryFormativeItem, revealFormativeItem, } from "./state.js";
4
- export { FORMATIVE_MASTERY_VERSION, rollupFormativeMastery } from "./mastery.js";
5
- export { FORMATIVE_SLICE_VERSION, normalizeFormativeSectionSlice, toFormativeSectionSlice, } from "./session.js";
@@ -1,19 +0,0 @@
1
- import type { FormativeItemState, FormativeSectionSlice } from "./types.js";
2
- export declare const FORMATIVE_SLICE_VERSION: 1;
3
- export declare function toFormativeSectionSlice(states: Record<string, FormativeItemState>): FormativeSectionSlice;
4
- /**
5
- * Validate a persisted slice against the section it is being restored into.
6
- *
7
- * Returns `null` for a slice this build cannot read, which the caller treats as
8
- * "start formative state clean". Rejection is deliberately narrow: it discards
9
- * formative progress and nothing else, so a version bump here never costs a
10
- * learner their responses — item sessions travel in the same snapshot and are
11
- * normalized separately.
12
- *
13
- * An absent slice is `null` too, and indistinguishable from a pre-formative
14
- * save, which is what keeps existing snapshots valid.
15
- */
16
- export declare function normalizeFormativeSectionSlice(args: {
17
- slice: unknown;
18
- allowedItemIdentifiers: readonly string[];
19
- }): Record<string, FormativeItemState> | null;