@citolab/tspci 2.5.30-beta.7 → 2.5.30-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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.5.30-beta.9](/compare/v2.5.30-beta.8...v2.5.30-beta.9) (2025-02-04)
7
+
8
+ **Note:** Version bump only for package @citolab/tspci
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.5.30-beta.8](/compare/v2.5.30-beta.7...v2.5.30-beta.8) (2025-02-04)
15
+
16
+ **Note:** Version bump only for package @citolab/tspci
17
+
18
+
19
+
20
+
21
+
6
22
  ## [2.5.30-beta.7](/compare/v2.5.30-beta.6...v2.5.30-beta.7) (2025-02-04)
7
23
 
8
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci",
3
- "version": "2.5.30-beta.7",
3
+ "version": "2.5.30-beta.9",
4
4
  "description": "an opiniated typescript ims-pci builder with tao integration",
5
5
  "author": "patrick <patrick.deklein@cito.nl>",
6
6
  "repository": "@citolab/tspci",
@@ -51,5 +51,5 @@
51
51
  "resolutions": {
52
52
  "chokidar": "^4.0.0"
53
53
  },
54
- "gitHead": "dee27b54f3790bef797b70f8a1058ffc3ca385ba"
54
+ "gitHead": "faee45dd64a32b879dfbe94906a4e921102e03a9"
55
55
  }
@@ -4,7 +4,7 @@ import { IStore } from "@citolab/preact-store";
4
4
  import * as ctx from "qtiCustomInteractionContext";
5
5
  import Interaction from "./interaction";
6
6
  import style from "./styles.css";
7
- import { Configuration, IMSpci, QtiInteractionChangedDetail, QtiVariableJSON } from "@citolab/tspci";
7
+ import { ConfigProperties, IMSpci, QtiInteractionChangedDetail, QtiVariableJSON } from "@citolab/tspci";
8
8
  import configProps from "./config.json";
9
9
  import { StateModel, initStore } from "./store";
10
10
 
@@ -12,7 +12,7 @@ type PropTypes = typeof configProps;
12
12
 
13
13
  class App implements IMSpci<PropTypes> {
14
14
  typeIdentifier = "###___PCI_NAME___###"; // typeIdentifier is mandatory for all PCI's
15
- config: Configuration<PropTypes>; // reference to the interface of the config object which you get when getInstance is called by the player
15
+ config: ConfigProperties<PropTypes>; // reference to the interface of the config object which you get when getInstance is called by the player
16
16
  state: string; // keep a reference to the state
17
17
  shadowdom: ShadowRoot; // Not mandatory, but its wise to create a shadowroot
18
18
  store: IStore<StateModel>;
@@ -25,7 +25,7 @@ class App implements IMSpci<PropTypes> {
25
25
  }
26
26
  }
27
27
 
28
- getInstance = (dom: HTMLElement, config: Configuration<PropTypes>, stateString: string) => {
28
+ getInstance = (dom: HTMLElement, config: ConfigProperties<PropTypes>, stateString: string) => {
29
29
  config.properties = { ...configProps, ...config.properties }; // merge current props with incoming
30
30
  this.config = config;
31
31
  if (!dom) {
@@ -1,7 +1,10 @@
1
- @tailwind components;
2
- @tailwind utilities;
3
- @tailwind base;
4
-
5
- .pci-container { @apply container flex flex-col justify-center items-center; }
6
- h1 { @apply text-2xl text-red-500 m-4; }
7
- input { @apply border border-gray-400 rounded p-2 m-1; }
1
+ @import "tailwindcss";
2
+ .pci-container {
3
+ @apply container flex flex-col justify-center items-center;
4
+ }
5
+ h1 {
6
+ @apply text-2xl text-red-500 m-4;
7
+ }
8
+ input {
9
+ @apply border border-gray-400 rounded p-2 m-1;
10
+ }
@@ -1,4 +1,4 @@
1
- import { Configuration, IMSpci, QtiInteractionChangedDetail, QtiVariableJSON } from "@citolab/tspci";
1
+ import { ConfigProperties, IMSpci, QtiInteractionChangedDetail, QtiVariableJSON } from "@citolab/tspci";
2
2
  import * as ctx from "qtiCustomInteractionContext";
3
3
  import configProps from "./config.json";
4
4
  import Interaction from "./interaction"; // import and bundle this interaction file
@@ -10,7 +10,7 @@ type PropTypes = typeof configProps;
10
10
 
11
11
  class Pci implements IMSpci<PropTypes> {
12
12
  typeIdentifier = "###___PCI_NAME___###"; // typeIdentifier is mandatory for all PCI's
13
- config: Configuration<PropTypes>; // reference to the interface of the config object which you get when getInstance is called by the player
13
+ config: ConfigProperties<PropTypes>; // reference to the interface of the config object which you get when getInstance is called by the player
14
14
  state: string; // keep a reference to the state
15
15
  shadowdom: ShadowRoot | Element; // Not mandatory, but its wise to create a shadowroot
16
16
  dom: HTMLElement;
@@ -23,7 +23,7 @@ class Pci implements IMSpci<PropTypes> {
23
23
 
24
24
  // First in the lifecycle of a PCI, this method is called with the domElement ( usually qti-interaction-markup ) where we can add our dom tree.
25
25
  // config is the configuration object which has an onready
26
- getInstance = (dom: HTMLElement, config: Configuration<PropTypes>, state: string) => {
26
+ getInstance = (dom: HTMLElement, config: ConfigProperties<PropTypes>, state: string) => {
27
27
  config.properties = { ...configProps, ...config.properties }; // merge current props with incoming
28
28
  this.config = config;
29
29
  this.state = state ? state : "";
package/readme.md CHANGED
@@ -97,7 +97,7 @@ Add the following PCI in the src folder `index.ts`
97
97
 
98
98
  ```ts
99
99
  // src/index.ts
100
- import { Configuration, IMSpci } from "@citolab/tspci";
100
+ import { ConfigProperties, IMSpci } from "@citolab/tspci";
101
101
  import * as ctx from "qtiCustomInteractionContext";
102
102
 
103
103
  class Pci implements IMSpci<{}> {
@@ -108,7 +108,7 @@ class Pci implements IMSpci<{}> {
108
108
  ctx && ctx.register(this);
109
109
  }
110
110
 
111
- getInstance = (dom: HTMLElement, config: Configuration<any>, state: string) => {
111
+ getInstance = (dom: HTMLElement, config: ConfigProperties<any>, state: string) => {
112
112
  this.shadowdom = dom.attachShadow({ mode: "closed" });
113
113
  this.render();
114
114
  config.onready(this);
@@ -337,9 +337,9 @@ Also used in the TAO export for configuring PCIs in TAO
337
337
  + type PropTypes = typeof configProps;
338
338
 
339
339
  // add to types
340
- + private config: Configuration<PropTypes>;
340
+ + private config: ConfigProperties<PropTypes>;
341
341
 
342
- getInstance = (dom: HTMLElement, config: Configuration<PropTypes>, stateString: string) => {
342
+ getInstance = (dom: HTMLElement, config: ConfigProperties<PropTypes>, stateString: string) => {
343
343
  + config.properties = { ...configProps, ...config.properties }; // merge our props with players
344
344
  + this.config = config;
345
345