Skip to content

Commit 8fbd43b

Browse files
refactor: remove redundant import facades
Prefer direct workspace package imports over local pass-through wrappers so pre-1.0 module boundaries stay simple. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2b488ec commit 8fbd43b

32 files changed

Lines changed: 29 additions & 92 deletions

File tree

apps/demo/src/lib/utils/assignProps.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/demo/src/routes/wc-assessment/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { onMount } from 'svelte';
33
import { READING_COMPREHENSION_ASSESSMENT } from '$lib/sample-assessments';
44
import { getSecurityConfig } from '$lib/player-config';
5-
import { assignProps } from '$lib/utils/assignProps';
5+
import { assignProps } from '@pie-qti/qti-common';
66
77
let status = $state<'booting' | 'registering' | 'registered' | 'rendered' | 'error'>('booting');
88
let message = $state<string>('Starting…');

apps/demo/src/routes/wc-item/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { onMount } from 'svelte';
33
import { SAMPLE_ITEMS } from '$lib/sample-items';
44
import { getSecurityConfig } from '$lib/player-config';
5-
import { assignProps } from '$lib/utils/assignProps';
5+
import { assignProps } from '@pie-qti/qti-common';
66
77
let status = $state<'booting' | 'registering' | 'registered' | 'rendered' | 'error'>('booting');
88
let message = $state<string>('Starting…');

apps/transform/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@pie-qti/default-components": "workspace:*",
2323
"@pie-qti/demo-vendor-extensions": "workspace:*",
2424
"@pie-qti/i18n": "workspace:*",
25+
"@pie-qti/ims-cp-node": "workspace:*",
2526
"@pie-qti/item-player": "workspace:*",
2627
"@pie-qti/player-elements": "workspace:*",
2728
"@pie-qti/qti-common": "workspace:*",

apps/transform/src/lib/components/QtiAssessmentPlayer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { onMount } from 'svelte';
3-
import { assignProps } from '../utils/assignProps';
3+
import { assignProps } from '@pie-qti/qti-common';
44
55
const {
66
assessmentTestXml,

apps/transform/src/lib/components/QtiItemPlayer.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { onMount } from 'svelte';
3-
import { assignProps } from '../utils/assignProps';
3+
import { assignProps } from '@pie-qti/qti-common';
44
55
const {
66
itemXml,

apps/transform/src/lib/server/analyzer/QtiAnalyzer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { existsSync } from 'node:fs';
77
import { readdir, readFile, } from 'node:fs/promises';
88
import { join } from 'node:path';
9-
import { loadResolvedManifest, type ResolvedManifest, toAbsolutePath } from '@pie-qti/to-pie/ims-cp';
9+
import { loadResolvedManifest, type ResolvedManifest, toAbsolutePath } from '@pie-qti/ims-cp-node';
1010
import { parse } from 'node-html-parser';
1111

1212
export interface AnalysisProgress {

apps/transform/src/lib/utils/assignProps.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

bun.lock

Lines changed: 2 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/prds/architecture/web-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ The component is included via `<ShadowBaseStyles />` at the top of each interact
111111

112112
- **Accessibility:** All interaction components must meet WCAG 2.2 Level AA. Keyboard navigation must follow ARIA patterns for the interaction type (radio group for single-choice, checkbox group for multiple-choice, etc.). Focus management must survive Svelte reactivity updates without losing focus. Touch targets must be at minimum 44×44 CSS pixels.
113113
- **Performance:** Components must not block the main thread during render. Math typesetting is deferred to `requestAnimationFrame` via `typesetAction`. Shadow DOM construction is handled by the browser natively. Components should not import large dependencies beyond what Vite tree-shakes.
114-
- **Cross-platform:** Must work on desktop (mouse + keyboard) and mobile (touch). `touchDragHelper` provides mobile-compatible drag support for drag-and-drop interactions.
114+
- **Cross-platform:** Must work on desktop (mouse + keyboard) and mobile (touch). The `touchDrag` action from `@pie-qti/qti-common` provides mobile-compatible drag support for drag-and-drop interactions.
115115
- **Security:** HTML content from QTI item bodies (prompts, choice text) is rendered via `{@html ...}`. The item player's sanitiser is responsible for cleaning this content before it reaches the component; components do not re-sanitise.
116116
- **i18n:** Component UI strings are sourced from the `I18nProvider` prop. All user-visible labels must go through `i18n.t(key)` with a hardcoded English fallback string.
117117

0 commit comments

Comments
 (0)