@pie-qti/ims-cp-core 0.1.27 → 1.0.0-beta.0

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 (37) hide show
  1. package/package.json +2 -2
  2. package/dist/index.d.ts +0 -14
  3. package/dist/index.js +0 -15
  4. package/dist/index.js.map +0 -1
  5. package/dist/localized-resources.d.ts +0 -308
  6. package/dist/localized-resources.js +0 -410
  7. package/dist/localized-resources.js.map +0 -1
  8. package/dist/manifest-parser.d.ts +0 -82
  9. package/dist/manifest-parser.js +0 -213
  10. package/dist/manifest-parser.js.map +0 -1
  11. package/dist/package-file-resolver.d.ts +0 -48
  12. package/dist/package-file-resolver.js +0 -312
  13. package/dist/package-file-resolver.js.map +0 -1
  14. package/dist/package-graph.d.ts +0 -134
  15. package/dist/package-graph.js +0 -791
  16. package/dist/package-graph.js.map +0 -1
  17. package/dist/package-path.d.ts +0 -11
  18. package/dist/package-path.js +0 -89
  19. package/dist/package-path.js.map +0 -1
  20. package/dist/passage-reusability.d.ts +0 -99
  21. package/dist/passage-reusability.js +0 -170
  22. package/dist/passage-reusability.js.map +0 -1
  23. package/dist/qti-heuristics.d.ts +0 -119
  24. package/dist/qti-heuristics.js +0 -150
  25. package/dist/qti-heuristics.js.map +0 -1
  26. package/dist/qti3-shared-content.d.ts +0 -82
  27. package/dist/qti3-shared-content.js +0 -383
  28. package/dist/qti3-shared-content.js.map +0 -1
  29. package/dist/security-parsing.d.ts +0 -9
  30. package/dist/security-parsing.js +0 -74
  31. package/dist/security-parsing.js.map +0 -1
  32. package/dist/utils/hash.d.ts +0 -20
  33. package/dist/utils/hash.js +0 -33
  34. package/dist/utils/hash.js.map +0 -1
  35. package/dist/utils/qti-xml.d.ts +0 -103
  36. package/dist/utils/qti-xml.js +0 -214
  37. package/dist/utils/qti-xml.js.map +0 -1
@@ -1,134 +0,0 @@
1
- import { type ManifestResource, type ParsedManifest } from './manifest-parser.js';
2
- import { type PackageReferenceResolutionStrategy } from './package-file-resolver.js';
3
- import type { QtiHeuristicsConfig } from './qti-heuristics.js';
4
- export type PackageDiagnosticSeverity = 'info' | 'warning' | 'error';
5
- export interface PackageDiagnostic {
6
- severity: PackageDiagnosticSeverity;
7
- code: string;
8
- message: string;
9
- resourceId?: string;
10
- sourcePath?: string;
11
- reference?: string;
12
- }
13
- export type QtiPackageVersion = '2.1' | '2.2' | '3.0' | 'unknown' | 'conflicting';
14
- export type QtiVersionConfidence = 'high' | 'medium' | 'low' | 'none' | 'conflicting';
15
- export interface QtiVersionSignal {
16
- source: 'manifest' | 'qti_xml' | 'schema_location' | 'package_metadata';
17
- version: Exclude<QtiPackageVersion, 'unknown' | 'conflicting'>;
18
- confidence: Exclude<QtiVersionConfidence, 'none' | 'conflicting'>;
19
- evidence: string;
20
- resourceId?: string;
21
- sourcePath?: string;
22
- }
23
- export interface QtiPackageVersionDiagnostic {
24
- version: QtiPackageVersion;
25
- confidence: QtiVersionConfidence;
26
- signals: QtiVersionSignal[];
27
- diagnostics: PackageDiagnostic[];
28
- }
29
- export interface PackageFileAccess {
30
- readText(path: string): Promise<string | null | undefined> | string | null | undefined;
31
- readBuffer?(path: string): Promise<Uint8Array | null | undefined> | Uint8Array | null | undefined;
32
- exists?(path: string): Promise<boolean> | boolean;
33
- listFiles?(): Promise<string[]> | string[];
34
- resolvePreviewUrl?(path: string): Promise<string | null | undefined> | string | null | undefined;
35
- }
36
- export type PackageResourceKind = 'item' | 'test' | 'passage' | 'asset' | 'webcontent' | 'other';
37
- export interface PackageResourceNode {
38
- identifier: string;
39
- type: string;
40
- kind: PackageResourceKind;
41
- href?: string;
42
- resolvedHref?: string;
43
- xmlBase?: string;
44
- files: string[];
45
- resolvedFiles: string[];
46
- dependencies: string[];
47
- metadata?: ManifestResource['metadata'];
48
- }
49
- export interface PackageReference {
50
- kind: 'manifest-dependency' | 'assessment-item-ref' | 'asset' | 'stylesheet' | 'object' | 'catalog' | 'stimulus';
51
- rawHref: string;
52
- resolvedPath?: string;
53
- sourcePath?: string;
54
- sourceElement?: string;
55
- sourceAttribute?: string;
56
- targetResourceId?: string;
57
- resolutionStrategy?: PackageReferenceResolutionStrategy;
58
- heuristic?: boolean;
59
- renderHref?: string;
60
- }
61
- export interface PackageAssetRef {
62
- rawHref: string;
63
- resolvedPath: string;
64
- usage: 'image' | 'stylesheet' | 'audio' | 'video' | 'html' | 'catalog' | 'source-qti' | 'other';
65
- ownerResourceId?: string;
66
- ownerResourceIds?: string[];
67
- sourcePath?: string;
68
- sourcePaths?: string[];
69
- sourceElement?: string;
70
- sourceAttribute?: string;
71
- resolutionStrategy?: PackageReferenceResolutionStrategy;
72
- heuristic?: boolean;
73
- renderHref?: string;
74
- }
75
- export interface PackageResourceClosure {
76
- resourceId: string;
77
- resourceIds: string[];
78
- filePaths: string[];
79
- assetPaths: string[];
80
- diagnostics: PackageDiagnostic[];
81
- }
82
- export interface PackageEntrypoint {
83
- resourceId: string;
84
- kind: 'item' | 'test' | 'passage';
85
- href?: string;
86
- }
87
- export type PackageRelationshipKind = 'manifest-dependency' | 'assessment-item-ref' | 'assessment-stimulus-ref' | 'shared-asset';
88
- export interface PackageRelationshipHint {
89
- kind: PackageRelationshipKind;
90
- sourceResourceId?: string;
91
- sourceResourceIds?: string[];
92
- targetResourceId?: string;
93
- targetPath?: string;
94
- rawHref?: string;
95
- sourcePath?: string;
96
- sourceElement?: string;
97
- sourceAttribute?: string;
98
- }
99
- export interface AnalyzedContentPackage {
100
- packageId: string;
101
- manifest: ParsedManifest;
102
- resources: Map<string, PackageResourceNode>;
103
- entrypoints: PackageEntrypoint[];
104
- references: Map<string, PackageReference[]>;
105
- closures: Map<string, PackageResourceClosure>;
106
- assets: Map<string, PackageAssetRef>;
107
- qtiVersion: QtiPackageVersionDiagnostic;
108
- diagnostics: PackageDiagnostic[];
109
- files: string[];
110
- }
111
- export interface SerializedContentPackageEvidence {
112
- packageId: string;
113
- manifestIdentifier?: string;
114
- entrypoints: PackageEntrypoint[];
115
- resources: PackageResourceNode[];
116
- references: Array<PackageReference & {
117
- resourceId: string;
118
- }>;
119
- closures: PackageResourceClosure[];
120
- assets: PackageAssetRef[];
121
- relationshipHints: PackageRelationshipHint[];
122
- qtiVersion: QtiPackageVersionDiagnostic;
123
- diagnostics: PackageDiagnostic[];
124
- files: string[];
125
- }
126
- export interface AnalyzeContentPackageInput {
127
- packageId?: string;
128
- manifestXml: string;
129
- basePath?: string;
130
- fileAccess?: PackageFileAccess;
131
- heuristicsConfig?: QtiHeuristicsConfig;
132
- }
133
- export declare function analyzeContentPackage({ packageId, manifestXml, basePath, fileAccess, heuristicsConfig, }: AnalyzeContentPackageInput): Promise<AnalyzedContentPackage>;
134
- export declare function serializeContentPackageEvidence(packageGraph: AnalyzedContentPackage): SerializedContentPackageEvidence;