@citolab/qti-components 6.1.0 → 6.3.2
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/dist/chunk-43RGQFGW.cjs +1 -0
- package/dist/chunk-BKBZWUX6.cjs +1 -0
- package/dist/chunk-DPSTDDQZ.js +1 -0
- package/dist/chunk-KESARAC5.js +1 -0
- package/dist/{chunk-TSUFNGZN.js → chunk-LNHTXQXY.js} +1 -1
- package/dist/{chunk-OI3PY5MR.cjs → chunk-LWL4UHCJ.cjs} +2 -2
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.js +1 -1
- package/dist/custom-elements.json +483 -433
- package/dist/index.cjs +172 -128
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +179 -135
- package/dist/qti-assessment-test-15ffab61.d.ts +34 -0
- package/dist/qti-assessment-test-a1f2cb91.d.ts +34 -0
- package/dist/qti-components/index.cjs +2 -2
- package/dist/qti-components/index.d.cts +1 -1
- package/dist/qti-components/index.d.ts +1 -1
- package/dist/qti-components/index.js +3 -3
- package/dist/qti-item/index.cjs +1 -1
- package/dist/qti-item/index.js +1 -1
- package/dist/qti-item-react/index.cjs +1 -1
- package/dist/qti-item-react/index.d.cts +3 -3
- package/dist/qti-item-react/index.d.ts +3 -3
- package/dist/qti-item-react/index.js +1 -1
- package/dist/qti-test/index.cjs +31 -31
- package/dist/qti-test/index.d.cts +8 -34
- package/dist/qti-test/index.d.ts +8 -34
- package/dist/qti-test/index.js +33 -33
- package/dist/qti-test-react/index.cjs +1 -0
- package/dist/qti-test-react/index.d.cts +29 -0
- package/dist/qti-test-react/index.d.ts +29 -0
- package/dist/qti-test-react/index.js +1 -0
- package/package.json +29 -21
- package/readme.md +3 -3
- package/dist/chunk-6YQCE7H6.cjs +0 -1
- package/dist/chunk-DKGW23YB.js +0 -1
package/dist/qti-test/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import"../chunk-MTPOYN4D.js";import{a as
|
|
1
|
+
import"../chunk-MTPOYN4D.js";import{a as w}from"../chunk-LNHTXQXY.js";import"../chunk-DPSTDDQZ.js";import"../chunk-AWSFYZS5.js";import{a as o,b as Ht}from"../chunk-KESARAC5.js";import{a as I,b as y,c as e}from"../chunk-343LZK3D.js";import{customElement as O,property as L}from"lit/decorators.js";var a=class extends w{connectedCallback(){super.connectedCallback();let t=new CustomEvent("register-item-ref",{bubbles:!0,composed:!0,detail:{identifier:this.identifier,href:this.href}});this.dispatchEvent(t)}};e([L({type:String})],a.prototype,"identifier",2),e([L({type:String})],a.prototype,"href",2),a=e([O("qti-assessment-item-ref")],a);import{html as N,LitElement as U}from"lit";import{customElement as X,property as j}from"lit/decorators.js";var d=class extends U{constructor(){super(...arguments);this._navigationMode="linear"}render(){return N`
|
|
2
2
|
<slot name="qti-item"></slot>
|
|
3
3
|
<slot> </slot>
|
|
4
|
-
`}};e([
|
|
4
|
+
`}};e([j({type:String,attribute:"navigation-mode"})],d.prototype,"_navigationMode",2),d=e([X("qti-test-part")],d);import{useRef as D}from"haunted";import{html as R,LitElement as H}from"lit";import{customElement as J,property as M}from"lit/decorators.js";var u=class extends H{constructor(){super(...arguments);this._navigationMode="linear";this.loadedItems=[];this.itemRefEls=D(new Map);this.controller=new AbortController}requestItem(t){let r=async()=>{for(let m of this.itemRefEls.current.values())m.xml="";let s=this.itemRefEls.current.get(t),i=new AbortController().signal;try{let l=await(await fetch(`${this.assessmentTestURI}/items/${s.href}`,{signal:i})).text();s.xml=l}catch(m){m.name==="AbortError"?console.log("Fetch aborted"):console.error(m)}};this.controller&&this.controller.abort(),r()}render(){return R`
|
|
5
5
|
<qti-assessment-test
|
|
6
6
|
@register-item-ref=${t=>{this.itemRefEls.current.set(t.target.identifier,t.target),t.target.itemLocation=`${this.assessmentTestURI}/items/${t.target.href}`}}
|
|
7
7
|
@on-test-set-item=${({detail:t})=>this.requestItem(t)}
|
|
@@ -9,7 +9,7 @@ import"../chunk-MTPOYN4D.js";import{a as L}from"../chunk-TSUFNGZN.js";import"../
|
|
|
9
9
|
<test-show-index></test-show-index>
|
|
10
10
|
<qti-test-part identifier="part1" navigation-mode="nonlinear" submission-mode="individual">
|
|
11
11
|
<qti-assessment-section identifier="section-1" title="Section 1" visible="true" required="true">
|
|
12
|
-
${this.loadedItems.map(t=>
|
|
12
|
+
${this.loadedItems.map(t=>R`<qti-assessment-item-ref identifier="${t.identifier}" href="${t.href}">
|
|
13
13
|
</qti-assessment-item-ref>`)}
|
|
14
14
|
</qti-assessment-section>
|
|
15
15
|
</qti-test-part>
|
|
@@ -23,57 +23,57 @@ import"../chunk-MTPOYN4D.js";import{a as L}from"../chunk-TSUFNGZN.js";import"../
|
|
|
23
23
|
<test-show-correct>correct</test-show-correct>
|
|
24
24
|
<test-print-variables></test-print-variables>
|
|
25
25
|
</qti-assessment-test>
|
|
26
|
-
`}};e([
|
|
27
|
-
<button part="button" @click=${
|
|
26
|
+
`}};e([M({type:String,attribute:"navigation-mode"})],u.prototype,"_navigationMode",2),e([M({type:String,attribute:"assessment-test-uri"})],u.prototype,"assessmentTestURI",2),u=e([J("qti-test")],u);import{html as z,LitElement as G}from"lit";import{customElement as K,state as W}from"lit/decorators.js";import{consume as Y}from"@lit/context";var f=class extends G{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:r}=this._testContext,s=Math.min(r+1,t.length-1);return z`
|
|
27
|
+
<button part="button" @click=${n=>this._requestItem(s)} id="${t[s].identifier}">
|
|
28
28
|
<slot></slot>
|
|
29
29
|
</button>
|
|
30
|
-
`}};e([
|
|
31
|
-
<button part="button" @click=${
|
|
30
|
+
`}};e([Y({context:o,subscribe:!0}),W()],f.prototype,"_testContext",2),f=e([K("test-next")],f);import{html as Z,LitElement as S}from"lit";import{customElement as V,state as B}from"lit/decorators.js";import{consume as P}from"@lit/context";var x=class extends S{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:r}=this._testContext,s=Math.max(r-1,0);return Z`
|
|
31
|
+
<button part="button" @click=${n=>this._requestItem(s)} id="${t[s].identifier}">
|
|
32
32
|
<slot></slot>
|
|
33
33
|
</button>
|
|
34
|
-
`}};e([
|
|
35
|
-
<progress part="progress" id="file" max=${t.length-1} value=${
|
|
36
|
-
${
|
|
34
|
+
`}};e([P({context:o,subscribe:!0}),B()],x.prototype,"_testContext",2),x=e([V("test-prev")],x);import{consume as T}from"@lit/context";import{LitElement as Q,html as tt}from"lit";import{customElement as et,state as rt}from"lit/decorators.js";var h=class extends Q{render(){let{items:t,itemIndex:r}=this._testProvider;return tt`
|
|
35
|
+
<progress part="progress" id="file" max=${t.length-1} value=${r}>
|
|
36
|
+
${r/(t.length-1)}%
|
|
37
37
|
</progress>
|
|
38
|
-
`}};e([
|
|
38
|
+
`}};e([T({context:o,subscribe:!0}),rt()],h.prototype,"_testProvider",2),h=e([et("test-progress")],h);import{consume as st}from"@lit/context";import{LitElement as ot,html as nt}from"lit";import{customElement as it,state as mt}from"lit/decorators.js";var b=class extends ot{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:r}=this._testProvider;return nt`
|
|
39
39
|
<input
|
|
40
40
|
part="input"
|
|
41
41
|
type="range"
|
|
42
|
-
value=${
|
|
42
|
+
value=${r}
|
|
43
43
|
class="absolute w-full appearance-none bg-transparent"
|
|
44
44
|
max=${t.length-1}
|
|
45
|
-
@input=${
|
|
45
|
+
@input=${s=>this._requestItem(+s.target.value)}
|
|
46
46
|
/>
|
|
47
|
-
`}};e([
|
|
48
|
-
${t.map((
|
|
47
|
+
`}};e([st({context:o,subscribe:!0}),mt()],b.prototype,"_testProvider",2),b=e([it("test-slider")],b);import{consume as pt}from"@lit/context";import{LitElement as ct,html as F}from"lit";import{customElement as lt,state as at}from"lit/decorators.js";var v=class extends ct{createRenderRoot(){return this}_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:r}=this._testProvider;return F`
|
|
48
|
+
${t.map((s,n)=>{var i;return F` <label>
|
|
49
49
|
<input
|
|
50
50
|
type="radio"
|
|
51
51
|
part="input"
|
|
52
52
|
name="item"
|
|
53
|
-
value="${
|
|
54
|
-
?checked=${
|
|
55
|
-
@change=${m=>this._requestItem(
|
|
56
|
-
data-completion-status=${(
|
|
57
|
-
id="${
|
|
53
|
+
value="${n}"
|
|
54
|
+
?checked=${n===r}
|
|
55
|
+
@change=${m=>this._requestItem(n)}
|
|
56
|
+
data-completion-status=${(i=s.variables.find(m=>m.identifier==="completionStatus"))==null?void 0:i.value}
|
|
57
|
+
id="${s.identifier}"
|
|
58
58
|
/>
|
|
59
|
-
${
|
|
59
|
+
${n+1}
|
|
60
60
|
</label>`})}
|
|
61
|
-
`}};e([
|
|
62
|
-
${t.map((
|
|
61
|
+
`}};e([pt({context:o,subscribe:!0}),at()],v.prototype,"_testProvider",2),v=e([lt("test-paging-radio")],v);import{consume as ut}from"@lit/context";import{LitElement as dt,html as k}from"lit";import{customElement as ft,state as xt}from"lit/decorators.js";var E=class extends dt{createRenderRoot(){return this}_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:r}=this._testProvider;return k`
|
|
62
|
+
${t.map((s,n)=>{var i;return k` <button
|
|
63
63
|
part="button"
|
|
64
|
-
data-completion-status=${(
|
|
65
|
-
data-active-item=${
|
|
66
|
-
@click=${m=>this._requestItem(
|
|
67
|
-
id="${
|
|
64
|
+
data-completion-status=${(i=s.variables.find(m=>m.identifier==="completionStatus"))==null?void 0:i.value}
|
|
65
|
+
data-active-item=${n===r}
|
|
66
|
+
@click=${m=>this._requestItem(n)}
|
|
67
|
+
id="${s.identifier}"
|
|
68
68
|
>
|
|
69
|
-
${
|
|
69
|
+
${n+1}
|
|
70
70
|
</button>`})}
|
|
71
|
-
`}};e([
|
|
72
|
-
<button part="button" @click=${
|
|
71
|
+
`}};e([ut({context:o,subscribe:!0}),xt()],E.prototype,"_testProvider",2),E=e([ft("test-paging-buttons")],E);import{consume as ht}from"@lit/context";import{LitElement as bt,html as A}from"lit";import{customElement as vt,state as Et}from"lit/decorators.js";var C=class extends bt{render(){var n,i,m;let{items:t,itemIndex:r}=this._testProvider;if(r==null)return A``;let s=(m=(i=this.closest("qti-assessment-test"))==null?void 0:i.itemRefEls.get((n=t[r])==null?void 0:n.identifier))==null?void 0:m.assessmentItem;return A`
|
|
72
|
+
<button part="button" @click=${l=>s.showCorrectResponse()}>
|
|
73
73
|
<slot></slot>
|
|
74
74
|
</button>
|
|
75
|
-
`}};e([
|
|
75
|
+
`}};e([ht({context:o,subscribe:!0}),Et()],C.prototype,"_testProvider",2),C=e([vt("test-show-correct")],C);import{ContextConsumer as Ct}from"@lit/context";import{html as _t,LitElement as $t}from"lit";import{customElement as qt,state as gt}from"lit/decorators.js";var _=class extends $t{constructor(){super(...arguments);this._printed=""}render(){return _t`${this._printed}<slot @slotchange=${this.handleSlotChange}></slot>`}handleSlotChange(t){var s,n;let r=Array.from((s=this.childNodes)!=null?s:[]).find(i=>i.nodeType===Node.COMMENT_NODE);try{this.operatorFunction=new Function("context","item",(n=r.textContent)!=null?n:"")}catch(i){console.error("custom-operator contains invalid javascript code",i)}this._context=new Ct(this,o,i=>{this._printed=this.operatorFunction(i,this.closest("qti-assessment-item"))},!0)}};e([gt()],_.prototype,"_printed",2),_=e([qt("test-script")],_);import{html as It,LitElement as yt}from"lit";import{customElement as wt,state as Lt}from"lit/decorators.js";import{consume as Rt}from"@lit/context";var $=class extends yt{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t,itemIndex:r}=this._testContext,s=t[r-1];return It` ${r+1}/${t.length} `}};e([Rt({context:o,subscribe:!0}),Lt()],$.prototype,"_testContext",2),$=e([wt("test-show-index")],$);import{consume as Mt}from"@lit/context";import{LitElement as Ft,html as kt}from"lit";import{customElement as At,state as Ot}from"lit/decorators.js";var q=class extends Ft{render(){return kt`
|
|
76
76
|
<pre>
|
|
77
|
-
${JSON.stringify(
|
|
77
|
+
${JSON.stringify(y(I({},this._testProvider),{items:this._testProvider.items.map(t=>y(I({},t),{itemEl:null}))}),null,2)}</pre
|
|
78
78
|
>
|
|
79
|
-
`}};e([
|
|
79
|
+
`}};e([Mt({context:o,subscribe:!0}),Ot()],q.prototype,"_testProvider",2),q=e([At("test-print-variables")],q);import{consume as Nt}from"@lit/context";import{LitElement as Ut,html as Xt}from"lit";import{customElement as jt,state as Dt}from"lit/decorators.js";var g=class extends Ut{_requestItem(t){this.dispatchEvent(new CustomEvent("on-test-request-item",{composed:!0,bubbles:!0,detail:t}))}render(){let{items:t}=this._testContext,r=t.reduce((n,i)=>{let m=i.variables.find(l=>l.identifier==="SCORE");return n+(m?+m.value:0)},0),s=t.reduce((n,i)=>{let m=i.variables.find(l=>l.identifier==="MAXSCORE");return n+(m?+m.value:0)},0);return Xt` ${r}/${s}`}};e([Nt({context:o,subscribe:!0}),Dt()],g.prototype,"_testContext",2),g=e([jt("test-print-score")],g);export{a as QtiAssessmentItemRef,Ht as QtiAssessmentTest,q as QtiPrintVariables,u as QtiTest,E as QtiTestPagingButtons,v as QtiTestPagingRadio,d as QtiTestPart,g as QtiTestPrintScore,h as QtiTestProgress,C as QtiTestShowCorrect,b as QtiTestSlider,f as TestNext,x as TestPrev,_ as TestScript,$ as TestShowIndex};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk43RGQFGWcjs = require('../chunk-43RGQFGW.cjs');require('../chunk-6G76D2MI.cjs');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _react3 = require('@lit/react');var d=_react3.createComponent.call(void 0, {tagName:"qti-item",react:_react2.default,elementClass:_chunk43RGQFGWcjs.b,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onItemConnected:"qti-item-connected",onRegisterItem:"register-item-ref",onTestRequestItem:"on-test-request-item"}});exports.QtiTest = d;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ReactNode, Ref } from 'react';
|
|
2
|
+
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-5902cb37.js';
|
|
3
|
+
import { T as TestContext, Q as QtiAssessmentTest } from '../qti-assessment-test-15ffab61.js';
|
|
4
|
+
import 'lit-html';
|
|
5
|
+
import 'lit';
|
|
6
|
+
import 'lit-html/directives/ref';
|
|
7
|
+
import '../qti-item/index.cjs';
|
|
8
|
+
import '../context/index.cjs';
|
|
9
|
+
|
|
10
|
+
interface OutcomeChangedDetailsExtended extends OutcomeChangedDetails {
|
|
11
|
+
identifier: string;
|
|
12
|
+
}
|
|
13
|
+
interface QtiAssessmentTestProps {
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
context: TestContext;
|
|
17
|
+
ref?: Ref<QtiAssessmentTest | undefined>;
|
|
18
|
+
onOutcomeChanged?: (e: CustomEvent<OutcomeChangedDetails>) => void;
|
|
19
|
+
onInteractionChanged?: (e: CustomEvent<InteractionChangedDetails>) => void;
|
|
20
|
+
onRegisterItem?: (e: CustomEvent<{
|
|
21
|
+
href: string;
|
|
22
|
+
identifier: string;
|
|
23
|
+
}>) => void;
|
|
24
|
+
onTestRequestItem?: (e: CustomEvent<number>) => void;
|
|
25
|
+
onItemConnected?: (e: CustomEvent<QtiAssessmentItem>) => void;
|
|
26
|
+
}
|
|
27
|
+
declare const QtiTest: React.ForwardRefExoticComponent<QtiAssessmentTestProps>;
|
|
28
|
+
|
|
29
|
+
export { OutcomeChangedDetailsExtended, QtiTest };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { ReactNode, Ref } from 'react';
|
|
2
|
+
import { O as OutcomeChangedDetails, I as InteractionChangedDetails, Q as QtiAssessmentItem } from '../qti-simple-choice-5902cb37.js';
|
|
3
|
+
import { T as TestContext, Q as QtiAssessmentTest } from '../qti-assessment-test-a1f2cb91.js';
|
|
4
|
+
import 'lit-html';
|
|
5
|
+
import 'lit';
|
|
6
|
+
import 'lit-html/directives/ref';
|
|
7
|
+
import '../qti-item/index.js';
|
|
8
|
+
import '../context/index.js';
|
|
9
|
+
|
|
10
|
+
interface OutcomeChangedDetailsExtended extends OutcomeChangedDetails {
|
|
11
|
+
identifier: string;
|
|
12
|
+
}
|
|
13
|
+
interface QtiAssessmentTestProps {
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
context: TestContext;
|
|
17
|
+
ref?: Ref<QtiAssessmentTest | undefined>;
|
|
18
|
+
onOutcomeChanged?: (e: CustomEvent<OutcomeChangedDetails>) => void;
|
|
19
|
+
onInteractionChanged?: (e: CustomEvent<InteractionChangedDetails>) => void;
|
|
20
|
+
onRegisterItem?: (e: CustomEvent<{
|
|
21
|
+
href: string;
|
|
22
|
+
identifier: string;
|
|
23
|
+
}>) => void;
|
|
24
|
+
onTestRequestItem?: (e: CustomEvent<number>) => void;
|
|
25
|
+
onItemConnected?: (e: CustomEvent<QtiAssessmentItem>) => void;
|
|
26
|
+
}
|
|
27
|
+
declare const QtiTest: React.ForwardRefExoticComponent<QtiAssessmentTestProps>;
|
|
28
|
+
|
|
29
|
+
export { OutcomeChangedDetailsExtended, QtiTest };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"../chunk-KESARAC5.js";import"../chunk-343LZK3D.js";import t from"react";import{createComponent as n}from"@lit/react";var d=n({tagName:"qti-item",react:t,elementClass:e,events:{onOutcomeChanged:"qti-outcome-changed",onInteractionChanged:"qti-interaction-changed",onItemConnected:"qti-item-connected",onRegisterItem:"register-item-ref",onTestRequestItem:"on-test-request-item"}});export{d as QtiTest};
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=16.0.0"
|
|
14
14
|
},
|
|
15
|
-
"version": "6.
|
|
15
|
+
"version": "6.3.2",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"main": "dist/index.js",
|
|
18
18
|
"exports": {
|
|
@@ -43,6 +43,10 @@
|
|
|
43
43
|
"import": "./dist/qti-item-react/index.js",
|
|
44
44
|
"require": "./dist/qti-item-react/index.cjs"
|
|
45
45
|
},
|
|
46
|
+
"./react/qti-test": {
|
|
47
|
+
"import": "./dist/qti-test-react/index.js",
|
|
48
|
+
"require": "./dist/qti-test-react/index.cjs"
|
|
49
|
+
},
|
|
46
50
|
"./qti-transform": {
|
|
47
51
|
"import": "./dist/qti-transform/index.js",
|
|
48
52
|
"require": "./dist/qti-transform/index.cjs"
|
|
@@ -76,6 +80,9 @@
|
|
|
76
80
|
"react/qti-item": [
|
|
77
81
|
"./dist/qti-item-react/index.d.ts"
|
|
78
82
|
],
|
|
83
|
+
"react/qti-test": [
|
|
84
|
+
"./dist/qti-item-react/index.d.ts"
|
|
85
|
+
],
|
|
79
86
|
"qti-transform": [
|
|
80
87
|
"./dist/qti-transform/index.d.ts"
|
|
81
88
|
]
|
|
@@ -104,45 +111,46 @@
|
|
|
104
111
|
"kill 6006": "sudo lsof -i :6006 | grep LISTEN | awk '{print $2}' | xargs kill",
|
|
105
112
|
"list-outdated-dependencies": "npx npm-check-updates --format repo --peer",
|
|
106
113
|
"update-dependencies": "npx npm-check-updates --peer -u && npm install",
|
|
107
|
-
"arethetypeswrong": "attw --pack",
|
|
114
|
+
"arethetypeswrong": "npm run build-lib && attw --pack",
|
|
108
115
|
"----hooks----": "",
|
|
109
116
|
"prepublishOnly": "echo 'calling prepublishOnly as npm lifecycle hook to build-lib!' && npm run build-lib",
|
|
110
117
|
"postpublish": "npm run deploy"
|
|
111
118
|
},
|
|
112
119
|
"dependencies": {
|
|
113
|
-
"@lit
|
|
114
|
-
"@lit
|
|
120
|
+
"@lit/context": "^1.0.0",
|
|
121
|
+
"@lit/react": "^1.0.0",
|
|
115
122
|
"@tailwindcss/nesting": "^0.0.0-insiders.565cd3e",
|
|
116
123
|
"cheerio": "^1.0.0-rc.12",
|
|
117
124
|
"haunted": "^5.0.0",
|
|
118
|
-
"lit": "^
|
|
125
|
+
"lit": "^3.0.0",
|
|
119
126
|
"lit-xml": "^0.6.0",
|
|
120
127
|
"remark-gfm": "^4.0.0"
|
|
121
128
|
},
|
|
122
129
|
"peerdependencies": {
|
|
123
|
-
"@lit
|
|
124
|
-
"@lit
|
|
130
|
+
"@lit/context": "> 0.3",
|
|
131
|
+
"@lit/react": "> 1.2",
|
|
125
132
|
"lit": ">= 3 < 4",
|
|
126
133
|
"react": "> 18"
|
|
127
134
|
},
|
|
128
135
|
"devDependencies": {
|
|
129
|
-
"@arethetypeswrong/cli": "^0.12.
|
|
130
|
-
"@custom-elements-manifest/analyzer": "^0.
|
|
136
|
+
"@arethetypeswrong/cli": "^0.12.2",
|
|
137
|
+
"@custom-elements-manifest/analyzer": "^0.9.0",
|
|
131
138
|
"@jest/globals": "^29.7.0",
|
|
132
|
-
"@storybook/addon-a11y": "^7.
|
|
133
|
-
"@storybook/addon-essentials": "^7.
|
|
134
|
-
"@storybook/addon-interactions": "^7.
|
|
135
|
-
"@storybook/addon-jest": "^7.
|
|
136
|
-
"@storybook/addon-links": "^7.
|
|
137
|
-
"@storybook/
|
|
139
|
+
"@storybook/addon-a11y": "^7.5.0",
|
|
140
|
+
"@storybook/addon-essentials": "^7.5.0",
|
|
141
|
+
"@storybook/addon-interactions": "^7.5.0",
|
|
142
|
+
"@storybook/addon-jest": "^7.5.0",
|
|
143
|
+
"@storybook/addon-links": "^7.5.0",
|
|
144
|
+
"@storybook/addon-mdx-gfm": "^7.5.0",
|
|
145
|
+
"@storybook/blocks": "^7.5.0",
|
|
138
146
|
"@storybook/jest": "^0.2.3",
|
|
139
147
|
"@storybook/test-runner": "^0.13.0",
|
|
140
148
|
"@storybook/testing-library": "^0.2.2",
|
|
141
|
-
"@storybook/web-components": "^7.
|
|
142
|
-
"@storybook/web-components-vite": "^7.
|
|
149
|
+
"@storybook/web-components": "^7.5.0",
|
|
150
|
+
"@storybook/web-components-vite": "^7.5.0",
|
|
143
151
|
"@tailwindcss/typography": "^0.5.10",
|
|
144
|
-
"@types/node": "^20.8.
|
|
145
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
152
|
+
"@types/node": "^20.8.7",
|
|
153
|
+
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
|
146
154
|
"autoprefixer": "^10.4.16",
|
|
147
155
|
"cem-plugin-vs-code-custom-data-generator": "^1.4.2",
|
|
148
156
|
"eslint": "^8.51.0",
|
|
@@ -164,13 +172,13 @@
|
|
|
164
172
|
"prettier-plugin-tailwindcss": "^0.5.6",
|
|
165
173
|
"react": "^18.2.0",
|
|
166
174
|
"react-dom": "^18.2.0",
|
|
167
|
-
"storybook": "^7.
|
|
175
|
+
"storybook": "^7.5.0",
|
|
168
176
|
"tailwindcss": "^3.3.2",
|
|
169
177
|
"ts-jest": "^29.1.1",
|
|
170
178
|
"ts-node": "^10.9.1",
|
|
171
179
|
"tsup": "^7.2.0",
|
|
172
180
|
"typescript": "^5.2.2",
|
|
173
|
-
"vite": "^4.
|
|
181
|
+
"vite": "^4.5.0"
|
|
174
182
|
},
|
|
175
183
|
"customElements": "custom-elements.json"
|
|
176
184
|
}
|
package/readme.md
CHANGED
|
@@ -66,13 +66,13 @@ For a bit more advanced example using React and the QTIItem React wrapper from t
|
|
|
66
66
|
<QtiItem
|
|
67
67
|
className="w-full h-[480px] bg-white shadow p-4"
|
|
68
68
|
responses={itemResponses.current.get(itemId!)}
|
|
69
|
-
|
|
69
|
+
onInteractionChanged={({ detail }: { detail: any }) => {
|
|
70
70
|
storeResponse(detail.item, detail.response, detail.responseIdentifier);
|
|
71
71
|
}}
|
|
72
|
-
|
|
72
|
+
onOutcomeChanged={(e: any) => {
|
|
73
73
|
itemOutcomes.current.set(items[itemIndex].identifier, e.detail.value);
|
|
74
74
|
}}
|
|
75
|
-
|
|
75
|
+
onItemConnected={(e: any) => {
|
|
76
76
|
qtiItem.current = e.target;
|
|
77
77
|
setItemId(e.detail.identifier);
|
|
78
78
|
}}
|
package/dist/chunk-6YQCE7H6.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _context = require('@lit-labs/context');var o=_context.createContext.call(void 0, "audience");exports.a = o;
|
package/dist/chunk-DKGW23YB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as t}from"@lit-labs/context";var o=t("audience");export{o as a};
|