@pie-qti/player-elements 0.1.1 → 0.1.4

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 (42) hide show
  1. package/dist/define-DBqFBy2X.js +29494 -0
  2. package/dist/define-DBqFBy2X.js.map +1 -0
  3. package/dist/elements/QtiItemPlayerElement.d.ts +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +2 -13
  7. package/dist/plugins-BZ6Fu4_E.js +0 -0
  8. package/dist/qti/parseAssessmentTest.d.ts.map +1 -1
  9. package/dist/qti/resolveItems.d.ts.map +1 -1
  10. package/dist/qti/types.d.ts +4 -4
  11. package/dist/qti/types.d.ts.map +1 -1
  12. package/dist/register.js +6 -5
  13. package/dist/register.js.map +1 -1
  14. package/package.json +56 -37
  15. package/.turbo/turbo-build.log +0 -14
  16. package/CHANGELOG.md +0 -10
  17. package/bunfig.toml +0 -2
  18. package/dist/index-B1sHDWWn.js +0 -30415
  19. package/dist/index-B1sHDWWn.js.map +0 -1
  20. package/dist/index-C_WHHKJ8.js +0 -34157
  21. package/dist/index-C_WHHKJ8.js.map +0 -1
  22. package/dist/index.js.map +0 -1
  23. package/dist/mathlive.min-B8mv5Blc.js +0 -15374
  24. package/dist/mathlive.min-B8mv5Blc.js.map +0 -1
  25. package/dist/player-elements.css +0 -1
  26. package/src/constants.ts +0 -4
  27. package/src/define.ts +0 -9
  28. package/src/elements/BaseSvelteMountElement.ts +0 -63
  29. package/src/elements/QtiAssessmentPlayerElement.ts +0 -384
  30. package/src/elements/QtiItemPlayerElement.ts +0 -197
  31. package/src/index.ts +0 -26
  32. package/src/qti/parseAssessmentTest.ts +0 -174
  33. package/src/qti/resolveItems.ts +0 -94
  34. package/src/qti/types.ts +0 -33
  35. package/src/register.ts +0 -7
  36. package/src/utils/json.ts +0 -10
  37. package/svelte.config.js +0 -14
  38. package/tests/qti-assessment-test-parsing.test.ts +0 -125
  39. package/tests/setup.ts +0 -29
  40. package/tsconfig.build.json +0 -15
  41. package/tsconfig.json +0 -18
  42. package/vite.config.ts +0 -25
@@ -1,174 +0,0 @@
1
- import type { QTIRole, RubricBlock } from '@pie-qti/assessment-player';
2
- import { DOMParser as LinkedomDOMParser } from 'linkedom';
3
- import type { ParsedAssessmentSection, ParsedAssessmentTest, ParsedQuestionRef, ParsedTestPart } from './types.js';
4
-
5
- // Use native DOMParser in browser, linkedom in Node/Bun
6
- const DOMParserImpl = typeof DOMParser !== 'undefined' ? DOMParser : LinkedomDOMParser;
7
-
8
- function firstByLocalName(parent: ParentNode, localName: string): Element | null {
9
- const all = (parent as any).getElementsByTagNameNS
10
- ? (parent as any).getElementsByTagNameNS('*', localName)
11
- : (parent as any).getElementsByTagName?.(localName);
12
- return all?.[0] ?? null;
13
- }
14
-
15
- function childrenByLocalName(parent: ParentNode, localName: string): Element[] {
16
- const all = (parent as any).getElementsByTagNameNS
17
- ? (parent as any).getElementsByTagNameNS('*', localName)
18
- : (parent as any).getElementsByTagName?.(localName);
19
- return all ? Array.from(all) : [];
20
- }
21
-
22
- function serializeInnerXml(el: Element): string {
23
- // In linkedom, use innerHTML; in browser, use XMLSerializer
24
- if (typeof XMLSerializer !== 'undefined') {
25
- const s = new XMLSerializer();
26
- let out = '';
27
- for (const node of Array.from(el.childNodes)) {
28
- out += s.serializeToString(node);
29
- }
30
- return out.trim();
31
- } else {
32
- // linkedom: use innerHTML which works for both HTML and XML
33
- return el.innerHTML.trim();
34
- }
35
- }
36
-
37
- function getAttr(el: Element, name: string): string | undefined {
38
- const v = el.getAttribute(name);
39
- return v === null ? undefined : v;
40
- }
41
-
42
- function parseQtiRoleList(viewAttr: string | undefined): QTIRole[] {
43
- if (!viewAttr) return ['candidate'];
44
- const roles = viewAttr
45
- .split(/\s+/g)
46
- .map((r) => r.trim())
47
- .filter(Boolean) as QTIRole[];
48
- return roles.length ? roles : ['candidate'];
49
- }
50
-
51
- function parseRubricBlocks(sectionEl: Element): RubricBlock[] | undefined {
52
- const blocks = childrenByLocalName(sectionEl, 'rubricBlock');
53
- if (blocks.length === 0) return undefined;
54
-
55
- return blocks.map((b, idx) => ({
56
- identifier: getAttr(b, 'identifier') ?? `${getAttr(sectionEl, 'identifier') ?? 'section'}-rubric-${idx + 1}`,
57
- view: parseQtiRoleList(getAttr(b, 'view')),
58
- use: getAttr(b, 'use'),
59
- content: serializeInnerXml(b),
60
- }));
61
- }
62
-
63
- function parseItemRefs(sectionEl: Element): ParsedQuestionRef[] | undefined {
64
- const itemRefs = Array.from(sectionEl.childNodes)
65
- .filter((n): n is Element => n.nodeType === 1)
66
- .filter((el) => (el as Element).localName === 'assessmentItemRef');
67
-
68
- if (itemRefs.length === 0) return undefined;
69
-
70
- return itemRefs.map((el) => {
71
- const identifier = getAttr(el, 'identifier') ?? 'item';
72
- const href = getAttr(el, 'href');
73
- const requiredRaw = getAttr(el, 'required');
74
- const required = requiredRaw === undefined ? undefined : requiredRaw !== 'false';
75
- return {
76
- identifier,
77
- href,
78
- title: getAttr(el, 'title'),
79
- required,
80
- };
81
- });
82
- }
83
-
84
- function parseSection(sectionEl: Element): ParsedAssessmentSection {
85
- const identifier = getAttr(sectionEl, 'identifier') ?? 'section';
86
- const title = getAttr(sectionEl, 'title') ?? undefined;
87
- const visibleRaw = getAttr(sectionEl, 'visible');
88
- const visible = visibleRaw === undefined ? undefined : visibleRaw !== 'false';
89
-
90
- const rubricBlocks = parseRubricBlocks(sectionEl);
91
- const questionRefs = parseItemRefs(sectionEl);
92
-
93
- // Only parse direct child sections (not deep descendants)
94
- const childSections = Array.from(sectionEl.childNodes)
95
- .filter((n): n is Element => n.nodeType === 1)
96
- .filter((el) => (el as Element).localName === 'assessmentSection')
97
- .map(parseSection);
98
-
99
- return {
100
- identifier,
101
- title,
102
- visible,
103
- rubricBlocks,
104
- questionRefs,
105
- sections: childSections.length ? childSections : undefined,
106
- };
107
- }
108
-
109
- function parseTestPart(testPartEl: Element): ParsedTestPart {
110
- const identifier = getAttr(testPartEl, 'identifier') ?? 'part-1';
111
- const navigationMode = (getAttr(testPartEl, 'navigationMode') ?? 'nonlinear') as ParsedTestPart['navigationMode'];
112
- const submissionMode = (getAttr(testPartEl, 'submissionMode') ?? 'simultaneous') as ParsedTestPart['submissionMode'];
113
-
114
- // Only direct child sections
115
- const sections = Array.from(testPartEl.childNodes)
116
- .filter((n): n is Element => n.nodeType === 1)
117
- .filter((el) => (el as Element).localName === 'assessmentSection')
118
- .map(parseSection);
119
-
120
- return {
121
- identifier,
122
- navigationMode,
123
- submissionMode,
124
- sections,
125
- };
126
- }
127
-
128
- export function parseAssessmentTestXml(xml: string): ParsedAssessmentTest {
129
- const doc = new DOMParserImpl().parseFromString(xml, 'application/xml' as any);
130
- const parserError = firstByLocalName(doc as ParentNode, 'parsererror');
131
- if (parserError) {
132
- throw new Error('Failed to parse assessmentTest XML');
133
- }
134
-
135
- const assessmentTestEl = firstByLocalName(doc as ParentNode, 'assessmentTest') ?? doc.documentElement;
136
- if (!assessmentTestEl || assessmentTestEl.localName !== 'assessmentTest') {
137
- throw new Error('No <assessmentTest> root element found');
138
- }
139
-
140
- const identifier = getAttr(assessmentTestEl as Element, 'identifier');
141
- const title = getAttr(assessmentTestEl as Element, 'title');
142
-
143
- // Prefer explicit testPart(s); if missing, synthesize one from top-level sections
144
- const testPartsEls = Array.from(assessmentTestEl.childNodes)
145
- .filter((n): n is Element => (n as any).nodeType === 1)
146
- .filter((el) => (el as Element).localName === 'testPart');
147
-
148
- let testParts: ParsedTestPart[] | undefined;
149
- if (testPartsEls.length > 0) {
150
- testParts = testPartsEls.map(parseTestPart);
151
- } else {
152
- const topSections = Array.from(assessmentTestEl.childNodes)
153
- .filter((n): n is Element => (n as any).nodeType === 1)
154
- .filter((el) => (el as Element).localName === 'assessmentSection')
155
- .map(parseSection);
156
-
157
- testParts = [
158
- {
159
- identifier: 'part-1',
160
- navigationMode: 'nonlinear',
161
- submissionMode: 'simultaneous',
162
- sections: topSections,
163
- },
164
- ];
165
- }
166
-
167
- return {
168
- identifier,
169
- title,
170
- testParts,
171
- };
172
- }
173
-
174
-
@@ -1,94 +0,0 @@
1
- import type { ParsedAssessmentSection, ParsedAssessmentTest, ParsedQuestionRef, ParsedTestPart } from './types.js';
2
-
3
- export type QtiItemMap = Record<string, string>;
4
-
5
- function collectQuestionRefsFromSections(sections: ParsedAssessmentSection[] | undefined): ParsedQuestionRef[] {
6
- if (!sections) return [];
7
- const out: ParsedQuestionRef[] = [];
8
- for (const s of sections) {
9
- if (s.questionRefs) out.push(...s.questionRefs);
10
- if (s.sections) out.push(...collectQuestionRefsFromSections(s.sections));
11
- }
12
- return out;
13
- }
14
-
15
- function collectQuestionRefs(assessment: ParsedAssessmentTest): ParsedQuestionRef[] {
16
- const parts = assessment.testParts ?? [];
17
- const out: ParsedQuestionRef[] = [];
18
- for (const p of parts) {
19
- out.push(...collectQuestionRefsFromSections(p.sections));
20
- }
21
- return out;
22
- }
23
-
24
- function setQuestionRefItemXmlInPlace(
25
- assessment: ParsedAssessmentTest,
26
- identifier: string,
27
- href: string | undefined,
28
- itemXml: string,
29
- ) {
30
- const parts = assessment.testParts ?? [];
31
- for (const p of parts) {
32
- const stack: ParsedAssessmentSection[] = [...(p.sections ?? [])];
33
- while (stack.length) {
34
- const s = stack.pop()!;
35
- if (s.questionRefs) {
36
- for (const q of s.questionRefs) {
37
- if (q.identifier === identifier || (href && q.href === href)) {
38
- q.itemXml = itemXml;
39
- }
40
- }
41
- }
42
- if (s.sections) stack.push(...s.sections);
43
- }
44
- }
45
- }
46
-
47
- function normalizeBaseUrl(baseUrl: string) {
48
- try {
49
- return new URL(baseUrl, window.location.href).toString();
50
- } catch {
51
- return baseUrl;
52
- }
53
- }
54
-
55
- export async function resolveItemsForAssessment(options: {
56
- assessment: ParsedAssessmentTest;
57
- itemBaseUrl?: string;
58
- items?: QtiItemMap;
59
- }): Promise<ParsedAssessmentTest> {
60
- const { assessment, itemBaseUrl, items } = options;
61
- const baseUrl = itemBaseUrl ? normalizeBaseUrl(itemBaseUrl) : undefined;
62
-
63
- // Mutate in-place (questionRefs are nested); return same reference.
64
- const refs = collectQuestionRefs(assessment);
65
-
66
- const tasks = refs.map(async (q) => {
67
- if (q.itemXml) return;
68
-
69
- // A) fallback convenience: host provides item XML map by href or identifier
70
- if (items) {
71
- const fromHref = q.href ? items[q.href] : undefined;
72
- const fromId = items[q.identifier];
73
- const xml = fromHref ?? fromId;
74
- if (xml) {
75
- q.itemXml = xml;
76
- return;
77
- }
78
- }
79
-
80
- // B) standard: fetch item XML using href relative to a base URL
81
- if (baseUrl && q.href) {
82
- const url = new URL(q.href, baseUrl).toString();
83
- const res = await fetch(url);
84
- if (!res.ok) throw new Error(`Failed to fetch QTI item: ${url} (${res.status})`);
85
- const xml = await res.text();
86
- setQuestionRefItemXmlInPlace(assessment, q.identifier, q.href, xml);
87
- }
88
- });
89
-
90
- await Promise.all(tasks);
91
- return assessment;
92
- }
93
-
94
-
package/src/qti/types.ts DELETED
@@ -1,33 +0,0 @@
1
- import type { RubricBlock } from '@pie-qti/assessment-player';
2
-
3
- export interface ParsedQuestionRef {
4
- identifier: string;
5
- title?: string;
6
- href?: string;
7
- required?: boolean;
8
- itemXml?: string;
9
- }
10
-
11
- export interface ParsedAssessmentSection {
12
- identifier: string;
13
- title?: string;
14
- visible?: boolean;
15
- rubricBlocks?: RubricBlock[];
16
- questionRefs?: ParsedQuestionRef[];
17
- sections?: ParsedAssessmentSection[];
18
- }
19
-
20
- export interface ParsedTestPart {
21
- identifier: string;
22
- navigationMode: 'linear' | 'nonlinear';
23
- submissionMode: 'individual' | 'simultaneous';
24
- sections: ParsedAssessmentSection[];
25
- }
26
-
27
- export interface ParsedAssessmentTest {
28
- identifier?: string;
29
- title?: string;
30
- testParts: ParsedTestPart[];
31
- }
32
-
33
-
package/src/register.ts DELETED
@@ -1,7 +0,0 @@
1
- import { defineQtiPlayerElements } from './define.js';
2
-
3
- defineQtiPlayerElements();
4
-
5
- export { defineQtiPlayerElements } from './define.js';
6
-
7
-
package/src/utils/json.ts DELETED
@@ -1,10 +0,0 @@
1
- export function safeJsonParse<T>(value: string | null | undefined): T | undefined {
2
- if (!value) return undefined;
3
- try {
4
- return JSON.parse(value) as T;
5
- } catch {
6
- return undefined;
7
- }
8
- }
9
-
10
-
package/svelte.config.js DELETED
@@ -1,14 +0,0 @@
1
- /** @type {import('@sveltejs/vite-plugin-svelte').SvelteConfig} */
2
- const config = {
3
- compilerOptions: {
4
- // Required to compile components that declare `<svelte:options customElement="...">`.
5
- customElement: true,
6
- },
7
- vitePlugin: {
8
- include: ['**/*.svelte'],
9
- },
10
- };
11
-
12
- export default config;
13
-
14
-
@@ -1,125 +0,0 @@
1
- import { describe, expect, test } from 'bun:test';
2
- import { parseAssessmentTestXml } from '../src/qti/parseAssessmentTest.js';
3
- import { resolveItemsForAssessment } from '../src/qti/resolveItems.js';
4
-
5
- const ITEM_1_XML = `<?xml version="1.0" encoding="UTF-8"?>
6
- <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="ITEM-1" title="Item 1">
7
- <itemBody>
8
- <p>Hello</p>
9
- </itemBody>
10
- </assessmentItem>`;
11
-
12
- describe('parseAssessmentTestXml', () => {
13
- test('parses a basic QTI assessmentTest with testPart/section/itemRef/rubricBlock', () => {
14
- const xml = `<?xml version="1.0" encoding="UTF-8"?>
15
- <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="TEST-1" title="Sample Test">
16
- <testPart identifier="P1" navigationMode="nonlinear" submissionMode="simultaneous">
17
- <assessmentSection identifier="S1" title="Section 1">
18
- <rubricBlock view="candidate" use="passage">
19
- <p>Passage <strong>content</strong></p>
20
- </rubricBlock>
21
- <assessmentItemRef identifier="ITEM-1" href="items/item1.xml" title="Item 1" />
22
- </assessmentSection>
23
- </testPart>
24
- </assessmentTest>`;
25
-
26
- const parsed = parseAssessmentTestXml(xml);
27
- expect(parsed.identifier).toBe('TEST-1');
28
- expect(parsed.title).toBe('Sample Test');
29
- expect(parsed.testParts?.length).toBe(1);
30
-
31
- const part = parsed.testParts?.[0];
32
- expect(part?.identifier).toBe('P1');
33
- expect(part?.navigationMode).toBe('nonlinear');
34
- expect(part?.submissionMode).toBe('simultaneous');
35
- expect(part?.sections.length).toBe(1);
36
-
37
- const section = part?.sections[0];
38
- expect(section?.identifier).toBe('S1');
39
- expect(section?.title).toBe('Section 1');
40
- expect(section?.rubricBlocks?.length).toBe(1);
41
- expect(section?.rubricBlocks?.[0]?.use).toBe('passage');
42
- expect(section?.rubricBlocks?.[0]?.view).toEqual(['candidate']);
43
- expect(section?.rubricBlocks?.[0]?.content).toContain('<p>Passage');
44
-
45
- expect(section?.questionRefs?.length).toBe(1);
46
- expect(section?.questionRefs?.[0]?.identifier).toBe('ITEM-1');
47
- expect(section?.questionRefs?.[0]?.href).toBe('items/item1.xml');
48
- expect(section?.questionRefs?.[0]?.title).toBe('Item 1');
49
- });
50
-
51
- test('synthesizes a default testPart when assessmentTest has top-level sections only', () => {
52
- const xml = `<?xml version="1.0" encoding="UTF-8"?>
53
- <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="TEST-2" title="No Parts">
54
- <assessmentSection identifier="S1" title="Section 1">
55
- <assessmentItemRef identifier="ITEM-1" href="items/item1.xml" />
56
- </assessmentSection>
57
- </assessmentTest>`;
58
-
59
- const parsed = parseAssessmentTestXml(xml);
60
- expect(parsed.testParts?.length).toBe(1);
61
- expect(parsed.testParts?.[0]?.identifier).toBe('part-1');
62
- expect(parsed.testParts?.[0]?.sections.length).toBe(1);
63
- });
64
- });
65
-
66
- describe('resolveItemsForAssessment', () => {
67
- test('A) resolves assessmentItemRef via in-memory items map (by href)', async () => {
68
- const xml = `<?xml version="1.0" encoding="UTF-8"?>
69
- <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="TEST-3" title="Map">
70
- <testPart identifier="P1" navigationMode="nonlinear" submissionMode="simultaneous">
71
- <assessmentSection identifier="S1">
72
- <assessmentItemRef identifier="ITEM-1" href="items/item1.xml" />
73
- </assessmentSection>
74
- </testPart>
75
- </assessmentTest>`;
76
-
77
- const assessment = parseAssessmentTestXml(xml);
78
- await resolveItemsForAssessment({
79
- assessment,
80
- items: {
81
- 'items/item1.xml': ITEM_1_XML,
82
- },
83
- });
84
-
85
- const q = assessment.testParts?.[0]?.sections?.[0]?.questionRefs?.[0];
86
- expect(q?.itemXml).toContain('assessmentItem');
87
- expect(q?.itemXml).toContain('identifier="ITEM-1"');
88
- });
89
-
90
- test('B) resolves assessmentItemRef by fetching href relative to base URL', async () => {
91
- const xml = `<?xml version="1.0" encoding="UTF-8"?>
92
- <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="TEST-4" title="Fetch">
93
- <testPart identifier="P1" navigationMode="nonlinear" submissionMode="simultaneous">
94
- <assessmentSection identifier="S1">
95
- <assessmentItemRef identifier="ITEM-1" href="items/item1.xml" />
96
- </assessmentSection>
97
- </testPart>
98
- </assessmentTest>`;
99
-
100
- const assessment = parseAssessmentTestXml(xml);
101
-
102
- const origFetch = globalThis.fetch;
103
- const calls: string[] = [];
104
- (globalThis as any).fetch = async (url: string) => {
105
- calls.push(url);
106
- return new Response(ITEM_1_XML, { status: 200 });
107
- };
108
-
109
- try {
110
- await resolveItemsForAssessment({
111
- assessment,
112
- itemBaseUrl: 'https://example.test/qti/',
113
- });
114
- } finally {
115
- (globalThis as any).fetch = origFetch;
116
- }
117
-
118
- expect(calls.length).toBe(1);
119
- expect(calls[0]).toBe('https://example.test/qti/items/item1.xml');
120
- const q = assessment.testParts?.[0]?.sections?.[0]?.questionRefs?.[0];
121
- expect(q?.itemXml).toContain('assessmentItem');
122
- });
123
- });
124
-
125
-
package/tests/setup.ts DELETED
@@ -1,29 +0,0 @@
1
- // Bun test setup: provide browser globals that tests need
2
-
3
- import { parseHTML } from 'linkedom';
4
-
5
- // Create a minimal DOM environment
6
- const dom = parseHTML('<!DOCTYPE html><html><body></body></html>');
7
-
8
- // Make DOMParser and other DOM APIs globally available in tests
9
- (globalThis as any).DOMParser = dom.DOMParser;
10
- (globalThis as any).Document = dom.Document;
11
- (globalThis as any).Element = dom.Element;
12
- (globalThis as any).Node = dom.Node;
13
-
14
- // Polyfill XMLSerializer since linkedom doesn't provide it
15
- // Use the innerHTML/outerHTML properties instead
16
- (globalThis as any).XMLSerializer = class XMLSerializer {
17
- serializeToString(node: any): string {
18
- if (node.outerHTML) {
19
- return node.outerHTML;
20
- }
21
- if (node.innerHTML !== undefined) {
22
- return node.innerHTML;
23
- }
24
- if (node.textContent !== undefined) {
25
- return node.textContent;
26
- }
27
- return String(node);
28
- }
29
- };
@@ -1,15 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "declarationMap": true,
6
- "emitDeclarationOnly": true,
7
- "outDir": "./dist",
8
- "rootDir": "./src",
9
- "noEmit": false
10
- },
11
- "include": ["src/**/*"],
12
- "exclude": ["node_modules", "dist"]
13
- }
14
-
15
-
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "lib": ["ES2020", "DOM"],
6
- "strict": true,
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- "forceConsistentCasingInFileNames": true,
10
- "moduleResolution": "bundler",
11
- "resolveJsonModule": true,
12
- "allowSyntheticDefaultImports": true,
13
- "noEmit": true
14
- },
15
- "include": ["src/**/*"]
16
- }
17
-
18
-
package/vite.config.ts DELETED
@@ -1,25 +0,0 @@
1
- import { svelte } from '@sveltejs/vite-plugin-svelte';
2
- import { defineConfig } from 'vite';
3
-
4
- export default defineConfig({
5
- plugins: [
6
- svelte({
7
- // Use `svelte.config.js` for Svelte compiler warning filtering.
8
- // Keep this config minimal and Vite-specific.
9
- }),
10
- ],
11
- build: {
12
- lib: {
13
- entry: {
14
- index: './src/index.ts',
15
- register: './src/register.ts',
16
- },
17
- formats: ['es'],
18
- },
19
- outDir: 'dist',
20
- sourcemap: true,
21
- emptyOutDir: true,
22
- },
23
- });
24
-
25
-