@pie-qti/web-component-loaders 0.1.14 → 0.1.16
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/README.md +13 -5
- package/dist/default-runtime.css +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -5
- package/dist/qti-shared-vocabulary.css +320 -0
- package/dist/theme-bridge.css +26 -0
- package/package.json +9 -22
package/README.md
CHANGED
|
@@ -8,10 +8,14 @@ This package provides small helper functions that:
|
|
|
8
8
|
- **Dedupe** loads across multiple calls (the underlying dynamic `import()` runs once per page)
|
|
9
9
|
- Optionally **wait until custom elements are defined** before continuing
|
|
10
10
|
|
|
11
|
-
## Install
|
|
11
|
+
## Install
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
The loader installs its complete browser runtime through `@pie-qti/player-elements`; applications
|
|
14
|
+
do not install or import Svelte or `@pie-qti/default-components` themselves:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @pie-qti/web-component-loaders
|
|
18
|
+
```
|
|
15
19
|
|
|
16
20
|
## CSS
|
|
17
21
|
|
|
@@ -21,7 +25,8 @@ Import the default browser runtime stylesheet once from your host app:
|
|
|
21
25
|
import '@pie-qti/web-component-loaders/default-runtime.css';
|
|
22
26
|
```
|
|
23
27
|
|
|
24
|
-
This composes the QTI DaisyUI theme bridge and QTI shared vocabulary
|
|
28
|
+
This self-contained export composes the QTI DaisyUI theme bridge and QTI shared vocabulary
|
|
29
|
+
stylesheet; no CSS peer package is required.
|
|
25
30
|
|
|
26
31
|
## Usage
|
|
27
32
|
|
|
@@ -37,7 +42,8 @@ await loadPieQtiPlayerElements();
|
|
|
37
42
|
// - <pie-qti-assessment-player>
|
|
38
43
|
// - <pie-qti-section-player-splitpane>
|
|
39
44
|
// - <pie-qti-section-player-vertical>
|
|
40
|
-
// - the bundled default QTI interaction elements
|
|
45
|
+
// - the bundled default QTI interaction elements, including
|
|
46
|
+
// <pie-qti-portable-custom> for QTI Portable Custom Interactions
|
|
41
47
|
```
|
|
42
48
|
|
|
43
49
|
### Using in React (example)
|
|
@@ -60,3 +66,5 @@ export function QtiPlayerBoot() {
|
|
|
60
66
|
|
|
61
67
|
- **SSR**: `loadPieQtiPlayerElements()` returns immediately when `window` is not available.
|
|
62
68
|
- **Idempotency**: load promises are stored on `globalThis.__pieQtiWebComponentLoaders__` to prevent duplicate imports.
|
|
69
|
+
- **Runtime ownership**: `@pie-qti/player-elements/register` owns both player and default interaction
|
|
70
|
+
registration; the loader does not import implementation packages separately.
|
package/dist/default-runtime.css
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
var __pieQtiWebComponentLoaders__: undefined | Record<string, Promise<void>>;
|
|
3
3
|
}
|
|
4
|
+
export declare const DEFAULT_INTERACTION_TAGS: readonly ["pie-qti-choice", "pie-qti-slider", "pie-qti-order", "pie-qti-match", "pie-qti-associate", "pie-qti-gap-match", "pie-qti-hotspot", "pie-qti-hottext", "pie-qti-media", "pie-qti-custom", "pie-qti-portable-custom", "pie-qti-end-attempt", "pie-qti-position-object", "pie-qti-graphic-gap-match", "pie-qti-graphic-order", "pie-qti-graphic-associate", "pie-qti-select-point", "pie-qti-extended-text", "pie-qti-upload", "pie-qti-drawing", "pie-qti-catalog-popup"];
|
|
4
5
|
/**
|
|
5
6
|
* Idempotently loads the PIE QTI player and default interaction web components.
|
|
6
7
|
* Safe to call multiple times; the underlying import will only happen once.
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const DEFAULT_INTERACTION_TAGS = [
|
|
1
|
+
export const DEFAULT_INTERACTION_TAGS = [
|
|
2
2
|
'pie-qti-choice',
|
|
3
3
|
'pie-qti-slider',
|
|
4
4
|
'pie-qti-order',
|
|
@@ -9,6 +9,7 @@ const DEFAULT_INTERACTION_TAGS = [
|
|
|
9
9
|
'pie-qti-hottext',
|
|
10
10
|
'pie-qti-media',
|
|
11
11
|
'pie-qti-custom',
|
|
12
|
+
'pie-qti-portable-custom',
|
|
12
13
|
'pie-qti-end-attempt',
|
|
13
14
|
'pie-qti-position-object',
|
|
14
15
|
'pie-qti-graphic-gap-match',
|
|
@@ -34,10 +35,7 @@ export async function loadPieQtiPlayerElements() {
|
|
|
34
35
|
if (typeof globalThis.window === 'undefined')
|
|
35
36
|
return;
|
|
36
37
|
const store = getStore();
|
|
37
|
-
store.pieQtiPlayerElements ??=
|
|
38
|
-
import('@pie-qti/player-elements/register'),
|
|
39
|
-
import('@pie-qti/default-components/plugins'),
|
|
40
|
-
]).then(async () => {
|
|
38
|
+
store.pieQtiPlayerElements ??= import('@pie-qti/player-elements/register').then(async () => {
|
|
41
39
|
const win = globalThis.window;
|
|
42
40
|
if (!win || typeof win.customElements === 'undefined')
|
|
43
41
|
return;
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QTI 3.0 Shared Vocabulary CSS Classes
|
|
3
|
+
*
|
|
4
|
+
* Implementation of the 1EdTech QTI 3.0 Standardized Shared Vocabulary and CSS Classes.
|
|
5
|
+
* Reference: https://www.imsglobal.org/spec/qti/v3p0/vocab
|
|
6
|
+
*
|
|
7
|
+
* These classes are applied by item authors to elements within qti-item-body.
|
|
8
|
+
* The sanitizer passes class attributes through unchanged, so no code changes
|
|
9
|
+
* are needed — this stylesheet alone provides the required visual behavior.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/* =============================================================================
|
|
13
|
+
Text Formatting
|
|
14
|
+
============================================================================= */
|
|
15
|
+
|
|
16
|
+
.qti-underline {
|
|
17
|
+
text-decoration: underline;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.qti-italic {
|
|
21
|
+
font-style: italic;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.qti-bordered {
|
|
25
|
+
border: 1px solid currentColor;
|
|
26
|
+
padding: 0.25em 0.5em;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* =============================================================================
|
|
30
|
+
Text Alignment
|
|
31
|
+
============================================================================= */
|
|
32
|
+
|
|
33
|
+
.qti-align-left {
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.qti-align-center {
|
|
38
|
+
text-align: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.qti-align-right {
|
|
42
|
+
text-align: right;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* =============================================================================
|
|
46
|
+
Vertical Alignment
|
|
47
|
+
============================================================================= */
|
|
48
|
+
|
|
49
|
+
.qti-valign-top {
|
|
50
|
+
vertical-align: top;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.qti-valign-middle {
|
|
54
|
+
vertical-align: middle;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.qti-valign-baseline {
|
|
58
|
+
vertical-align: baseline;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.qti-valign-bottom {
|
|
62
|
+
vertical-align: bottom;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* =============================================================================
|
|
66
|
+
Well (boxed content)
|
|
67
|
+
============================================================================= */
|
|
68
|
+
|
|
69
|
+
.qti-well {
|
|
70
|
+
padding: 1em;
|
|
71
|
+
border: 1px solid #ccc;
|
|
72
|
+
border-radius: 4px;
|
|
73
|
+
background-color: #f9f9f9;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* =============================================================================
|
|
77
|
+
Layout Grid (12-column flex grid)
|
|
78
|
+
============================================================================= */
|
|
79
|
+
|
|
80
|
+
.qti-layout-row {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-wrap: wrap;
|
|
83
|
+
margin-left: -0.5rem;
|
|
84
|
+
margin-right: -0.5rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.qti-layout-row > * {
|
|
88
|
+
padding-left: 0.5rem;
|
|
89
|
+
padding-right: 0.5rem;
|
|
90
|
+
box-sizing: border-box;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.qti-layout-col1 { width: 8.3333%; }
|
|
94
|
+
.qti-layout-col2 { width: 16.6667%; }
|
|
95
|
+
.qti-layout-col3 { width: 25%; }
|
|
96
|
+
.qti-layout-col4 { width: 33.3333%; }
|
|
97
|
+
.qti-layout-col5 { width: 41.6667%; }
|
|
98
|
+
.qti-layout-col6 { width: 50%; }
|
|
99
|
+
.qti-layout-col7 { width: 58.3333%; }
|
|
100
|
+
.qti-layout-col8 { width: 66.6667%; }
|
|
101
|
+
.qti-layout-col9 { width: 75%; }
|
|
102
|
+
.qti-layout-col10 { width: 83.3333%; }
|
|
103
|
+
.qti-layout-col11 { width: 91.6667%; }
|
|
104
|
+
.qti-layout-col12 { width: 100%; }
|
|
105
|
+
|
|
106
|
+
.qti-layout-offset1 { margin-left: 8.3333%; }
|
|
107
|
+
.qti-layout-offset2 { margin-left: 16.6667%; }
|
|
108
|
+
.qti-layout-offset3 { margin-left: 25%; }
|
|
109
|
+
.qti-layout-offset4 { margin-left: 33.3333%; }
|
|
110
|
+
.qti-layout-offset5 { margin-left: 41.6667%; }
|
|
111
|
+
.qti-layout-offset6 { margin-left: 50%; }
|
|
112
|
+
.qti-layout-offset7 { margin-left: 58.3333%; }
|
|
113
|
+
.qti-layout-offset8 { margin-left: 66.6667%; }
|
|
114
|
+
.qti-layout-offset9 { margin-left: 75%; }
|
|
115
|
+
.qti-layout-offset10 { margin-left: 83.3333%; }
|
|
116
|
+
.qti-layout-offset11 { margin-left: 91.6667%; }
|
|
117
|
+
|
|
118
|
+
/* =============================================================================
|
|
119
|
+
Padding (0–5 scale; ~4px per unit)
|
|
120
|
+
============================================================================= */
|
|
121
|
+
|
|
122
|
+
.qti-padding-0 { padding: 0; }
|
|
123
|
+
.qti-padding-1 { padding: 0.25rem; }
|
|
124
|
+
.qti-padding-2 { padding: 0.5rem; }
|
|
125
|
+
.qti-padding-3 { padding: 0.75rem; }
|
|
126
|
+
.qti-padding-4 { padding: 1rem; }
|
|
127
|
+
.qti-padding-5 { padding: 1.25rem; }
|
|
128
|
+
|
|
129
|
+
.qti-padding-x-0 { padding-left: 0; padding-right: 0; }
|
|
130
|
+
.qti-padding-x-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
|
|
131
|
+
.qti-padding-x-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
|
|
132
|
+
.qti-padding-x-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
|
|
133
|
+
.qti-padding-x-4 { padding-left: 1rem; padding-right: 1rem; }
|
|
134
|
+
.qti-padding-x-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
|
|
135
|
+
|
|
136
|
+
.qti-padding-y-0 { padding-top: 0; padding-bottom: 0; }
|
|
137
|
+
.qti-padding-y-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
|
|
138
|
+
.qti-padding-y-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
|
|
139
|
+
.qti-padding-y-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
|
|
140
|
+
.qti-padding-y-4 { padding-top: 1rem; padding-bottom: 1rem; }
|
|
141
|
+
.qti-padding-y-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
|
|
142
|
+
|
|
143
|
+
.qti-padding-t-0 { padding-top: 0; }
|
|
144
|
+
.qti-padding-t-1 { padding-top: 0.25rem; }
|
|
145
|
+
.qti-padding-t-2 { padding-top: 0.5rem; }
|
|
146
|
+
.qti-padding-t-3 { padding-top: 0.75rem; }
|
|
147
|
+
.qti-padding-t-4 { padding-top: 1rem; }
|
|
148
|
+
.qti-padding-t-5 { padding-top: 1.25rem; }
|
|
149
|
+
|
|
150
|
+
.qti-padding-b-0 { padding-bottom: 0; }
|
|
151
|
+
.qti-padding-b-1 { padding-bottom: 0.25rem; }
|
|
152
|
+
.qti-padding-b-2 { padding-bottom: 0.5rem; }
|
|
153
|
+
.qti-padding-b-3 { padding-bottom: 0.75rem; }
|
|
154
|
+
.qti-padding-b-4 { padding-bottom: 1rem; }
|
|
155
|
+
.qti-padding-b-5 { padding-bottom: 1.25rem; }
|
|
156
|
+
|
|
157
|
+
/* qti-padding-s/e = logical inline-start/end (LTR = left/right) */
|
|
158
|
+
.qti-padding-s-0 { padding-inline-start: 0; }
|
|
159
|
+
.qti-padding-s-1 { padding-inline-start: 0.25rem; }
|
|
160
|
+
.qti-padding-s-2 { padding-inline-start: 0.5rem; }
|
|
161
|
+
.qti-padding-s-3 { padding-inline-start: 0.75rem; }
|
|
162
|
+
.qti-padding-s-4 { padding-inline-start: 1rem; }
|
|
163
|
+
.qti-padding-s-5 { padding-inline-start: 1.25rem; }
|
|
164
|
+
|
|
165
|
+
.qti-padding-e-0 { padding-inline-end: 0; }
|
|
166
|
+
.qti-padding-e-1 { padding-inline-end: 0.25rem; }
|
|
167
|
+
.qti-padding-e-2 { padding-inline-end: 0.5rem; }
|
|
168
|
+
.qti-padding-e-3 { padding-inline-end: 0.75rem; }
|
|
169
|
+
.qti-padding-e-4 { padding-inline-end: 1rem; }
|
|
170
|
+
.qti-padding-e-5 { padding-inline-end: 1.25rem; }
|
|
171
|
+
|
|
172
|
+
/* =============================================================================
|
|
173
|
+
Margin (0–5 scale + auto)
|
|
174
|
+
============================================================================= */
|
|
175
|
+
|
|
176
|
+
.qti-margin-0 { margin: 0; }
|
|
177
|
+
.qti-margin-1 { margin: 0.25rem; }
|
|
178
|
+
.qti-margin-2 { margin: 0.5rem; }
|
|
179
|
+
.qti-margin-3 { margin: 0.75rem; }
|
|
180
|
+
.qti-margin-4 { margin: 1rem; }
|
|
181
|
+
.qti-margin-5 { margin: 1.25rem; }
|
|
182
|
+
.qti-margin-auto { margin: auto; }
|
|
183
|
+
|
|
184
|
+
.qti-margin-x-0 { margin-left: 0; margin-right: 0; }
|
|
185
|
+
.qti-margin-x-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
|
|
186
|
+
.qti-margin-x-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
|
|
187
|
+
.qti-margin-x-3 { margin-left: 0.75rem; margin-right: 0.75rem; }
|
|
188
|
+
.qti-margin-x-4 { margin-left: 1rem; margin-right: 1rem; }
|
|
189
|
+
.qti-margin-x-5 { margin-left: 1.25rem; margin-right: 1.25rem; }
|
|
190
|
+
.qti-margin-x-auto { margin-left: auto; margin-right: auto; }
|
|
191
|
+
|
|
192
|
+
.qti-margin-y-0 { margin-top: 0; margin-bottom: 0; }
|
|
193
|
+
.qti-margin-y-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
|
|
194
|
+
.qti-margin-y-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
|
|
195
|
+
.qti-margin-y-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
|
|
196
|
+
.qti-margin-y-4 { margin-top: 1rem; margin-bottom: 1rem; }
|
|
197
|
+
.qti-margin-y-5 { margin-top: 1.25rem; margin-bottom: 1.25rem; }
|
|
198
|
+
.qti-margin-y-auto { margin-top: auto; margin-bottom: auto; }
|
|
199
|
+
|
|
200
|
+
.qti-margin-t-0 { margin-top: 0; }
|
|
201
|
+
.qti-margin-t-1 { margin-top: 0.25rem; }
|
|
202
|
+
.qti-margin-t-2 { margin-top: 0.5rem; }
|
|
203
|
+
.qti-margin-t-3 { margin-top: 0.75rem; }
|
|
204
|
+
.qti-margin-t-4 { margin-top: 1rem; }
|
|
205
|
+
.qti-margin-t-5 { margin-top: 1.25rem; }
|
|
206
|
+
.qti-margin-t-auto { margin-top: auto; }
|
|
207
|
+
|
|
208
|
+
.qti-margin-b-0 { margin-bottom: 0; }
|
|
209
|
+
.qti-margin-b-1 { margin-bottom: 0.25rem; }
|
|
210
|
+
.qti-margin-b-2 { margin-bottom: 0.5rem; }
|
|
211
|
+
.qti-margin-b-3 { margin-bottom: 0.75rem; }
|
|
212
|
+
.qti-margin-b-4 { margin-bottom: 1rem; }
|
|
213
|
+
.qti-margin-b-5 { margin-bottom: 1.25rem; }
|
|
214
|
+
.qti-margin-b-auto { margin-bottom: auto; }
|
|
215
|
+
|
|
216
|
+
.qti-margin-s-0 { margin-inline-start: 0; }
|
|
217
|
+
.qti-margin-s-1 { margin-inline-start: 0.25rem; }
|
|
218
|
+
.qti-margin-s-2 { margin-inline-start: 0.5rem; }
|
|
219
|
+
.qti-margin-s-3 { margin-inline-start: 0.75rem; }
|
|
220
|
+
.qti-margin-s-4 { margin-inline-start: 1rem; }
|
|
221
|
+
.qti-margin-s-5 { margin-inline-start: 1.25rem; }
|
|
222
|
+
.qti-margin-s-auto { margin-inline-start: auto; }
|
|
223
|
+
|
|
224
|
+
.qti-margin-e-0 { margin-inline-end: 0; }
|
|
225
|
+
.qti-margin-e-1 { margin-inline-end: 0.25rem; }
|
|
226
|
+
.qti-margin-e-2 { margin-inline-end: 0.5rem; }
|
|
227
|
+
.qti-margin-e-3 { margin-inline-end: 0.75rem; }
|
|
228
|
+
.qti-margin-e-4 { margin-inline-end: 1rem; }
|
|
229
|
+
.qti-margin-e-5 { margin-inline-end: 1.25rem; }
|
|
230
|
+
.qti-margin-e-auto { margin-inline-end: auto; }
|
|
231
|
+
|
|
232
|
+
/* =============================================================================
|
|
233
|
+
Display
|
|
234
|
+
============================================================================= */
|
|
235
|
+
|
|
236
|
+
.qti-display-block { display: block; }
|
|
237
|
+
.qti-display-inherit { display: inherit; }
|
|
238
|
+
.qti-display-inline { display: inline; }
|
|
239
|
+
.qti-display-inline-block { display: inline-block; }
|
|
240
|
+
.qti-display-none { display: none; }
|
|
241
|
+
.qti-hidden { display: none; }
|
|
242
|
+
.qti-display-flex { display: flex; }
|
|
243
|
+
.qti-display-inline-flex { display: inline-flex; }
|
|
244
|
+
.qti-display-grid { display: grid; }
|
|
245
|
+
.qti-display-inline-grid { display: inline-grid; }
|
|
246
|
+
.qti-display-table { display: table; }
|
|
247
|
+
.qti-display-table-row { display: table-row; }
|
|
248
|
+
.qti-display-list-item { display: list-item; }
|
|
249
|
+
|
|
250
|
+
/* Visually hidden but available to screen readers */
|
|
251
|
+
.qti-visually-hidden {
|
|
252
|
+
position: absolute;
|
|
253
|
+
width: 1px;
|
|
254
|
+
height: 1px;
|
|
255
|
+
padding: 0;
|
|
256
|
+
margin: -1px;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
clip: rect(0, 0, 0, 0);
|
|
259
|
+
white-space: nowrap;
|
|
260
|
+
border: 0;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* =============================================================================
|
|
264
|
+
Width (Tailwind-like numeric scale — rem-based)
|
|
265
|
+
============================================================================= */
|
|
266
|
+
|
|
267
|
+
.qti-width-0 { width: 0; }
|
|
268
|
+
.qti-width-px { width: 1px; }
|
|
269
|
+
.qti-width-0p5 { width: 0.125rem; }
|
|
270
|
+
.qti-width-1 { width: 0.25rem; }
|
|
271
|
+
.qti-width-1p5 { width: 0.375rem; }
|
|
272
|
+
.qti-width-2 { width: 0.5rem; }
|
|
273
|
+
.qti-width-2p5 { width: 0.625rem; }
|
|
274
|
+
.qti-width-3 { width: 0.75rem; }
|
|
275
|
+
.qti-width-3p5 { width: 0.875rem; }
|
|
276
|
+
.qti-width-4 { width: 1rem; }
|
|
277
|
+
.qti-width-5 { width: 1.25rem; }
|
|
278
|
+
.qti-width-6 { width: 1.5rem; }
|
|
279
|
+
.qti-width-7 { width: 1.75rem; }
|
|
280
|
+
.qti-width-8 { width: 2rem; }
|
|
281
|
+
.qti-width-9 { width: 2.25rem; }
|
|
282
|
+
.qti-width-10 { width: 2.5rem; }
|
|
283
|
+
.qti-width-11 { width: 2.75rem; }
|
|
284
|
+
.qti-width-12 { width: 3rem; }
|
|
285
|
+
.qti-width-14 { width: 3.5rem; }
|
|
286
|
+
.qti-width-16 { width: 4rem; }
|
|
287
|
+
.qti-width-20 { width: 5rem; }
|
|
288
|
+
.qti-width-24 { width: 6rem; }
|
|
289
|
+
.qti-width-28 { width: 7rem; }
|
|
290
|
+
.qti-width-32 { width: 8rem; }
|
|
291
|
+
.qti-width-36 { width: 9rem; }
|
|
292
|
+
.qti-width-40 { width: 10rem; }
|
|
293
|
+
.qti-width-44 { width: 11rem; }
|
|
294
|
+
.qti-width-48 { width: 12rem; }
|
|
295
|
+
.qti-width-52 { width: 13rem; }
|
|
296
|
+
.qti-width-56 { width: 14rem; }
|
|
297
|
+
.qti-width-60 { width: 15rem; }
|
|
298
|
+
.qti-width-64 { width: 16rem; }
|
|
299
|
+
.qti-width-72 { width: 18rem; }
|
|
300
|
+
.qti-width-80 { width: 20rem; }
|
|
301
|
+
.qti-width-96 { width: 24rem; }
|
|
302
|
+
|
|
303
|
+
/* Fractional widths */
|
|
304
|
+
.qti-width-1-2 { width: 50%; }
|
|
305
|
+
.qti-width-1-3 { width: 33.3333%; }
|
|
306
|
+
.qti-width-2-3 { width: 66.6667%; }
|
|
307
|
+
.qti-width-1-4 { width: 25%; }
|
|
308
|
+
.qti-width-2-4 { width: 50%; }
|
|
309
|
+
.qti-width-3-4 { width: 75%; }
|
|
310
|
+
.qti-width-1-5 { width: 20%; }
|
|
311
|
+
.qti-width-2-5 { width: 40%; }
|
|
312
|
+
.qti-width-3-5 { width: 60%; }
|
|
313
|
+
.qti-width-4-5 { width: 80%; }
|
|
314
|
+
.qti-width-1-6 { width: 16.6667%; }
|
|
315
|
+
.qti-width-2-6 { width: 33.3333%; }
|
|
316
|
+
.qti-width-3-6 { width: 50%; }
|
|
317
|
+
.qti-width-4-6 { width: 66.6667%; }
|
|
318
|
+
.qti-width-5-6 { width: 83.3333%; }
|
|
319
|
+
.qti-width-full { width: 100%; }
|
|
320
|
+
.qti-width-auto { width: auto; }
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* Maps DaisyUI v5 CSS variables to PIE QTI theme variables. */
|
|
2
|
+
|
|
3
|
+
:root,
|
|
4
|
+
[data-theme] {
|
|
5
|
+
--pie-qti-primary: var(--color-primary);
|
|
6
|
+
--pie-qti-primary-content: var(--color-primary-content);
|
|
7
|
+
--pie-qti-secondary: var(--color-secondary);
|
|
8
|
+
--pie-qti-secondary-content: var(--color-secondary-content);
|
|
9
|
+
--pie-qti-accent: var(--color-accent);
|
|
10
|
+
--pie-qti-accent-content: var(--color-accent-content);
|
|
11
|
+
--pie-qti-neutral: var(--color-neutral);
|
|
12
|
+
--pie-qti-neutral-content: var(--color-neutral-content);
|
|
13
|
+
--pie-qti-base-100: var(--color-base-100);
|
|
14
|
+
--pie-qti-base-200: var(--color-base-200);
|
|
15
|
+
--pie-qti-base-300: var(--color-base-300);
|
|
16
|
+
--pie-qti-base-content: var(--color-base-content);
|
|
17
|
+
--pie-qti-info: var(--color-info);
|
|
18
|
+
--pie-qti-info-content: var(--color-info-content);
|
|
19
|
+
--pie-qti-success: var(--color-success);
|
|
20
|
+
--pie-qti-success-content: var(--color-success-content);
|
|
21
|
+
--pie-qti-warning: var(--color-warning);
|
|
22
|
+
--pie-qti-warning-content: var(--color-warning-content);
|
|
23
|
+
--pie-qti-error: var(--color-error);
|
|
24
|
+
--pie-qti-error-content: var(--color-error-content);
|
|
25
|
+
--pie-qti-focus: var(--color-primary);
|
|
26
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-qti/web-component-loaders",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@pie-qti/player-elements": "0.1.16"
|
|
7
|
+
},
|
|
5
8
|
"devDependencies": {
|
|
6
|
-
"@pie-qti/default-components": "0.1.
|
|
7
|
-
"@pie-qti/
|
|
8
|
-
"@pie-qti/theme-daisyui": "0.1.14",
|
|
9
|
+
"@pie-qti/default-components": "0.1.16",
|
|
10
|
+
"@pie-qti/theme-daisyui": "0.1.16",
|
|
9
11
|
"typescript": "^5.9.3"
|
|
10
12
|
},
|
|
11
|
-
"peerDependencies": {
|
|
12
|
-
"@pie-qti/default-components": "0.1.14",
|
|
13
|
-
"@pie-qti/player-elements": "0.1.14",
|
|
14
|
-
"@pie-qti/theme-daisyui": "0.1.14"
|
|
15
|
-
},
|
|
16
13
|
"exports": {
|
|
17
14
|
".": {
|
|
18
15
|
"types": "./dist/index.d.ts",
|
|
@@ -25,25 +22,15 @@
|
|
|
25
22
|
},
|
|
26
23
|
"description": "Shared, idempotent client-side loaders for QTI-related web components used across apps",
|
|
27
24
|
"license": "MIT",
|
|
28
|
-
"peerDependenciesMeta": {
|
|
29
|
-
"@pie-qti/default-components": {
|
|
30
|
-
"optional": true
|
|
31
|
-
},
|
|
32
|
-
"@pie-qti/player-elements": {
|
|
33
|
-
"optional": true
|
|
34
|
-
},
|
|
35
|
-
"@pie-qti/theme-daisyui": {
|
|
36
|
-
"optional": true
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
25
|
"scripts": {
|
|
40
|
-
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc -p ./tsconfig.json && cp src/*.css dist/"
|
|
26
|
+
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc -p ./tsconfig.json && cp src/*.css dist/ && cp ../theme-daisyui/src/bridge.css dist/theme-bridge.css && cp ../default-components/src/shared/styles/qti-shared-vocabulary.css dist/qti-shared-vocabulary.css",
|
|
27
|
+
"test": "bun test"
|
|
41
28
|
},
|
|
42
29
|
"type": "module",
|
|
43
30
|
"types": "./dist/index.d.ts",
|
|
44
31
|
"repository": {
|
|
45
32
|
"type": "git",
|
|
46
|
-
"url": "https://github.com/pie-framework/pie-qti.git",
|
|
33
|
+
"url": "git+https://github.com/pie-framework/pie-qti.git",
|
|
47
34
|
"directory": "packages/web-component-loaders"
|
|
48
35
|
},
|
|
49
36
|
"homepage": "https://github.com/pie-framework/pie-qti/tree/master/packages/web-component-loaders",
|