alizarin 0.2.1-alpha.83

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 (57) hide show
  1. package/LICENSE.txt +661 -0
  2. package/README.md +160 -0
  3. package/dist/_wasm.d.ts +23 -0
  4. package/dist/alizarin.full.js +799 -0
  5. package/dist/alizarin.full.js.map +1 -0
  6. package/dist/alizarin.inline-full.js +4 -0
  7. package/dist/alizarin.inline.js +4 -0
  8. package/dist/alizarin.js +47 -0
  9. package/dist/alizarin.js.map +1 -0
  10. package/dist/alizarin_bg.wasm +0 -0
  11. package/dist/backend.d.ts +74 -0
  12. package/dist/cards.d.ts +21 -0
  13. package/dist/client.d.ts +86 -0
  14. package/dist/collectionMutator.d.ts +155 -0
  15. package/dist/csvModelLoader.d.ts +59 -0
  16. package/dist/full.d.ts +3 -0
  17. package/dist/graphManager.d.ts +259 -0
  18. package/dist/interfaces.d.ts +145 -0
  19. package/dist/main-r-MmUiQf.js +12355 -0
  20. package/dist/main-r-MmUiQf.js.map +1 -0
  21. package/dist/main.d.ts +28 -0
  22. package/dist/nodeConfig.d.ts +61 -0
  23. package/dist/pseudos.d.ts +118 -0
  24. package/dist/rdm.d.ts +68 -0
  25. package/dist/renderers.d.ts +65 -0
  26. package/dist/semantic.d.ts +35 -0
  27. package/dist/static-types.d.ts +172 -0
  28. package/dist/staticStore.d.ts +60 -0
  29. package/dist/tracing/index.d.ts +172 -0
  30. package/dist/utils.d.ts +43 -0
  31. package/dist/validation/index.d.ts +734 -0
  32. package/dist/validation/index.js +1194 -0
  33. package/dist/validation/index.js.map +1 -0
  34. package/dist/validation/validators/graphLoading.d.ts +69 -0
  35. package/dist/validation/validators/index.d.ts +1 -0
  36. package/dist/viewModels/BooleanViewModel.d.ts +17 -0
  37. package/dist/viewModels/ConceptListViewModel.d.ts +15 -0
  38. package/dist/viewModels/ConceptValueViewModel.d.ts +28 -0
  39. package/dist/viewModels/DateViewModel.d.ts +16 -0
  40. package/dist/viewModels/DomainValueListViewModel.d.ts +15 -0
  41. package/dist/viewModels/DomainValueViewModel.d.ts +17 -0
  42. package/dist/viewModels/EDTFViewModel.d.ts +13 -0
  43. package/dist/viewModels/GeoJSONViewModel.d.ts +26 -0
  44. package/dist/viewModels/NodeViewModel.d.ts +15 -0
  45. package/dist/viewModels/NonLocalizedStringViewModel.d.ts +13 -0
  46. package/dist/viewModels/NumberViewModel.d.ts +14 -0
  47. package/dist/viewModels/ResourceInstanceListViewModel.d.ts +25 -0
  48. package/dist/viewModels/ResourceInstanceViewModel.d.ts +62 -0
  49. package/dist/viewModels/StringViewModel.d.ts +17 -0
  50. package/dist/viewModels/UrlViewModel.d.ts +22 -0
  51. package/dist/viewModels/cacheEntries.d.ts +73 -0
  52. package/dist/viewModels/getViewModel.d.ts +4 -0
  53. package/dist/viewModels/index.d.ts +20 -0
  54. package/dist/viewModels/types.d.ts +15 -0
  55. package/dist/viewModels.d.ts +1 -0
  56. package/dist/wasmTiming.d.ts +11 -0
  57. package/package.json +93 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../js/validation/validators/graphLoading.ts","../../js/validation/index.ts"],"sourcesContent":["import Ajv, { type ErrorObject } from 'ajv';\nimport addFormats from 'ajv-formats';\nimport { readFileSync, readdirSync, existsSync } from 'fs';\nimport { join } from 'path';\nimport graphModelSchema from '../schemas/graphModel.json';\nimport businessDataSchema from '../schemas/businessData.json';\nimport graphsRegistrySchema from '../schemas/graphsRegistry.json';\n\nexport interface ValidationResult {\n passed: number;\n failed: number;\n errors: Array<{ file: string; error: string }>;\n}\n\nexport interface ValidationResults {\n graphModels: ValidationResult;\n businessData: ValidationResult;\n graphsRegistry: ValidationResult;\n alizarinCompatibility: ValidationResult;\n graphLoadingTests: ValidationResult;\n}\n\nexport interface ValidationSummary {\n results: ValidationResults;\n totalPassed: number;\n totalFailed: number;\n success: boolean;\n}\n\nexport class GraphLoadingValidator {\n private ajv: Ajv;\n private validateGraphModel: any;\n private validateBusinessData: any;\n private validateGraphsRegistry: any;\n private results: ValidationResults;\n private basePath: string;\n\n constructor(basePath: string = '.') {\n this.basePath = basePath;\n\n // Initialize AJV with format support (strict mode off for cleaner output)\n this.ajv = new Ajv({\n allErrors: true,\n verbose: true,\n strict: false\n });\n addFormats(this.ajv);\n\n // Compile validators\n this.validateGraphModel = this.ajv.compile(graphModelSchema);\n this.validateBusinessData = this.ajv.compile(businessDataSchema);\n this.validateGraphsRegistry = this.ajv.compile(graphsRegistrySchema);\n\n // Initialize results\n this.results = {\n graphModels: { passed: 0, failed: 0, errors: [] },\n businessData: { passed: 0, failed: 0, errors: [] },\n graphsRegistry: { passed: 0, failed: 0, errors: [] },\n alizarinCompatibility: { passed: 0, failed: 0, errors: [] },\n graphLoadingTests: { passed: 0, failed: 0, errors: [] }\n };\n }\n\n private reportError(category: keyof ValidationResults, file: string, error: string): void {\n this.results[category].failed++;\n this.results[category].errors.push({ file, error });\n }\n\n private reportSuccess(category: keyof ValidationResults, _file: string): void {\n this.results[category].passed++;\n }\n\n private formatErrors(errors: ErrorObject[] | null | undefined): string {\n if (!errors) return 'Unknown error';\n return errors\n .map(e => `${e.instancePath || 'root'}: ${e.message}`)\n .join('; ');\n }\n\n /**\n * Validate graph model files\n */\n public validateGraphModels(): void {\n const modelFiles = readdirSync(this.basePath).filter(f =>\n f.startsWith('arches-') && f.endsWith('-model.json')\n );\n\n modelFiles.forEach(file => {\n try {\n const content = JSON.parse(readFileSync(join(this.basePath, file), 'utf8'));\n\n if (this.validateGraphModel(content)) {\n this.reportSuccess('graphModels', file);\n } else {\n const error = this.formatErrors(this.validateGraphModel.errors);\n this.reportError('graphModels', file, error);\n }\n } catch (error) {\n this.reportError('graphModels', file, `Parse error: ${(error as Error).message}`);\n }\n });\n }\n\n /**\n * Validate business data files\n */\n public validateBusinessDataFiles(): void {\n const businessDataFiles = readdirSync(this.basePath).filter(f =>\n f.startsWith('arches-business-data-') &&\n f.endsWith('.json') &&\n f !== 'arches-business-data-schema.json'\n );\n\n businessDataFiles.forEach(file => {\n try {\n const content = JSON.parse(readFileSync(join(this.basePath, file), 'utf8'));\n\n if (this.validateBusinessData(content)) {\n this.reportSuccess('businessData', file);\n } else {\n const error = this.formatErrors(this.validateBusinessData.errors);\n this.reportError('businessData', file, error);\n }\n } catch (error) {\n this.reportError('businessData', file, `Parse error: ${(error as Error).message}`);\n }\n });\n }\n\n /**\n * Validate graphs registry file\n */\n public validateGraphsRegistryFile(): void {\n const registryPath = join(this.basePath, 'graphs.json');\n\n if (existsSync(registryPath)) {\n try {\n const content = JSON.parse(readFileSync(registryPath, 'utf8'));\n\n if (this.validateGraphsRegistry(content)) {\n this.reportSuccess('graphsRegistry', 'graphs.json');\n } else {\n const error = this.formatErrors(this.validateGraphsRegistry.errors);\n this.reportError('graphsRegistry', 'graphs.json', error);\n }\n } catch (error) {\n this.reportError('graphsRegistry', 'graphs.json', `Parse error: ${(error as Error).message}`);\n }\n } else {\n this.reportError('graphsRegistry', 'graphs.json', 'File does not exist');\n }\n }\n\n /**\n * Check Alizarin compatibility requirements\n */\n public checkAlizarinCompatibility(): void {\n const registryPath = join(this.basePath, 'graphs.json');\n\n if (!existsSync(registryPath)) {\n return;\n }\n\n const graphs = JSON.parse(readFileSync(registryPath, 'utf8'));\n const availableGraphIds = new Set(Object.keys(graphs.models || {}));\n\n const businessDataFiles = readdirSync(this.basePath).filter(f =>\n f.startsWith('arches-business-data-') &&\n f.endsWith('.json') &&\n f !== 'arches-business-data-schema.json'\n );\n\n businessDataFiles.forEach(file => {\n try {\n const content = JSON.parse(readFileSync(join(this.basePath, file), 'utf8'));\n const resources = content.business_data?.resources || [];\n\n resources.forEach((resource: any, index: number) => {\n const graphId = resource.graph_id;\n\n // Check graph ID exists\n if (!availableGraphIds.has(graphId)) {\n this.reportError('alizarinCompatibility', file,\n `Resource ${index}: graph_id ${graphId} not found in graphs.json`);\n return;\n }\n\n // Check resourceinstance structure for Alizarin\n const ri = resource.resourceinstance;\n if (!ri) {\n this.reportError('alizarinCompatibility', file,\n `Resource ${index}: Missing resourceinstance - required for Alizarin`);\n return;\n }\n\n // Check required Alizarin fields\n const requiredFields = ['resourceinstanceid', 'graph_id', 'legacyid', 'name', 'displayname', 'descriptors'];\n for (const field of requiredFields) {\n if (!ri[field]) {\n this.reportError('alizarinCompatibility', file,\n `Resource ${index}: Missing resourceinstance.${field} - required for Alizarin`);\n return;\n }\n }\n\n // Check descriptors structure\n const descriptors = ri.descriptors;\n const requiredDescriptors = ['name', 'description', 'map_popup', 'displayname'];\n for (const field of requiredDescriptors) {\n if (!descriptors[field]) {\n this.reportError('alizarinCompatibility', file,\n `Resource ${index}: Missing descriptors.${field} - required for Alizarin`);\n return;\n }\n }\n });\n\n if (resources.length > 0) {\n this.reportSuccess('alizarinCompatibility', file);\n }\n\n } catch (error) {\n this.reportError('alizarinCompatibility', file, `Parse error: ${(error as Error).message}`);\n }\n });\n }\n\n /**\n * Simulate graph loading process (as Alizarin would do it)\n */\n public simulateGraphLoading(): void {\n const registryPath = join(this.basePath, 'graphs.json');\n\n if (!existsSync(registryPath)) {\n this.reportError('graphLoadingTests', 'graphs.json', 'Registry file does not exist');\n return;\n }\n\n try {\n const graphsRegistry = JSON.parse(readFileSync(registryPath, 'utf8'));\n\n for (const [graphId, model] of Object.entries(graphsRegistry.models) as [string, any][]) {\n const modelFile = `arches-${model.slug}-model.json`;\n const modelPath = join(this.basePath, modelFile);\n\n // Check model file exists\n if (!existsSync(modelPath)) {\n this.reportError('graphLoadingTests', graphId, `Model file ${modelFile} not found`);\n continue;\n }\n\n // Check model file loads\n try {\n const modelContent = JSON.parse(readFileSync(modelPath, 'utf8'));\n\n // Check graph ID matches\n if (modelContent.graph[0].graphid !== graphId) {\n this.reportError('graphLoadingTests', graphId,\n `Graph ID mismatch: registry has ${graphId}, model has ${modelContent.graph[0].graphid}`);\n continue;\n }\n\n // Check business data files exist for this graph\n const businessDataFiles = readdirSync(this.basePath).filter(f =>\n f.startsWith('arches-business-data-') && f.endsWith('.json')\n );\n\n // Verify business data can be loaded (optional - don't fail if missing)\n for (const file of businessDataFiles) {\n try {\n const content = JSON.parse(readFileSync(join(this.basePath, file), 'utf8'));\n const resources = content.business_data?.resources || [];\n\n if (resources.some((r: any) => r.graph_id === graphId)) {\n break;\n }\n } catch (error) {\n // Skip invalid files\n this.reportError('graphLoadingTests', graphId, `Business data file parse error: ${(error as Error).message}`);\n }\n }\n\n this.reportSuccess('graphLoadingTests', graphId);\n\n } catch (error) {\n this.reportError('graphLoadingTests', graphId, `Model file parse error: ${(error as Error).message}`);\n }\n }\n\n } catch (error) {\n this.reportError('graphLoadingTests', 'graphs.json', `Registry parse error: ${(error as Error).message}`);\n }\n }\n\n /**\n * Run all validation checks\n */\n public validate(): ValidationSummary {\n this.validateGraphModels();\n this.validateBusinessDataFiles();\n this.validateGraphsRegistryFile();\n this.checkAlizarinCompatibility();\n this.simulateGraphLoading();\n\n const totalPassed = Object.values(this.results)\n .reduce((sum, result) => sum + result.passed, 0);\n const totalFailed = Object.values(this.results)\n .reduce((sum, result) => sum + result.failed, 0);\n\n return {\n results: this.results,\n totalPassed,\n totalFailed,\n success: totalFailed === 0\n };\n }\n\n /**\n * Get validation results\n */\n public getResults(): ValidationResults {\n return this.results;\n }\n\n /**\n * Print validation summary to console\n */\n public printSummary(summary: ValidationSummary): void {\n console.log('\\nšŸ“Š VALIDATION SUMMARY');\n console.log('====================\\n');\n\n const categories = [\n { name: 'Graph Models', key: 'graphModels' as const },\n { name: 'Business Data', key: 'businessData' as const },\n { name: 'Graphs Registry', key: 'graphsRegistry' as const },\n { name: 'Alizarin Compatibility', key: 'alizarinCompatibility' as const },\n { name: 'Graph Loading Tests', key: 'graphLoadingTests' as const }\n ];\n\n categories.forEach(category => {\n const result = summary.results[category.key];\n const total = result.passed + result.failed;\n const percentage = total > 0 ? Math.round((result.passed / total) * 100) : 0;\n\n console.log(`${category.name}: ${result.passed}/${total} passed (${percentage}%)`);\n\n if (result.failed > 0) {\n console.log(` āŒ ${result.failed} failures:`);\n result.errors.slice(0, 3).forEach(error => {\n console.log(` • ${error.file}: ${error.error}`);\n });\n if (result.errors.length > 3) {\n console.log(` • ... and ${result.errors.length - 3} more errors`);\n }\n }\n });\n\n console.log('');\n console.log(`šŸŽÆ OVERALL RESULT: ${summary.totalPassed}/${summary.totalPassed + summary.totalFailed} checks passed`);\n\n if (summary.success) {\n console.log('šŸŽ‰ ALL VALIDATION CHECKS PASSED!');\n console.log('āœ… Graph structure is valid');\n console.log('āœ… Business data has proper Alizarin metadata');\n console.log('āœ… All files can be loaded by Alizarin');\n console.log('āœ… No compatibility issues detected');\n } else {\n console.log(`āš ļø ${summary.totalFailed} validation issues found`);\n console.log('šŸ’” Review the errors above and fix the issues');\n console.log('šŸ’” Re-run this validator after making corrections');\n }\n }\n}\n\n/**\n * Convenience function to run validation from command line or scripts\n */\nexport function validateGraphLoading(basePath: string = '.'): ValidationSummary {\n const validator = new GraphLoadingValidator(basePath);\n const summary = validator.validate();\n validator.printSummary(summary);\n return summary;\n}\n","/**\n * Alizarin Validation Module\n *\n * Provides validation utilities for Arches graph models and business data files.\n * Ensures compatibility with Alizarin's loading requirements.\n *\n * @module validation\n */\n\n// Export validators\nexport {\n GraphLoadingValidator,\n validateGraphLoading,\n type ValidationResult,\n type ValidationResults,\n type ValidationSummary\n} from './validators/index.js';\n\n// Export schemas\nimport graphModelSchema from './schemas/graphModel.json';\nimport businessDataSchema from './schemas/businessData.json';\nimport graphsRegistrySchema from './schemas/graphsRegistry.json';\n\nexport const schemas = {\n graphModel: graphModelSchema,\n businessData: businessDataSchema,\n graphsRegistry: graphsRegistrySchema\n};\n\n/**\n * Quick validation function for common use cases\n *\n * @example\n * ```typescript\n * import { quickValidate } from 'alizarin/validation';\n *\n * const result = quickValidate('./data');\n * if (result.success) {\n * console.log('All files are valid!');\n * }\n * ```\n */\nexport { validateGraphLoading as quickValidate } from './validators/index.js';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;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,CAAQ,IAAI,oCAAoC,CAAA;AAAA,IAClD,CAAA,MAAO;AACL,MAAA,OAAA,CAAQ,GAAA,CAAI,CAAA,IAAA,EAAO,OAAA,CAAQ,WAAW,CAAA,wBAAA,CAA0B,CAAA;AAChE,MAAA,OAAA,CAAQ,IAAI,+CAA+C,CAAA;AAC3D,MAAA,OAAA,CAAQ,IAAI,mDAAmD,CAAA;AAAA,IACjE;AAAA,EACF;AACF;AAKO,SAAS,oBAAA,CAAqB,WAAmB,GAAA,EAAwB;AAC9E,EAAA,MAAM,SAAA,GAAY,IAAI,qBAAA,CAAsB,QAAQ,CAAA;AACpD,EAAA,MAAM,OAAA,GAAU,UAAU,QAAA,EAAS;AACnC,EAAA,SAAA,CAAU,aAAa,OAAO,CAAA;AAC9B,EAAA,OAAO,OAAA;AACT;;ACvWO,MAAM,OAAA,GAAU;AAAA,EACrB,UAAA,EAAY,gBAAA;AAAA,EACZ,YAAA,EAAc,kBAAA;AAAA,EACd,cAAA,EAAgB;AAClB;;;;"}
@@ -0,0 +1,69 @@
1
+ export interface ValidationResult {
2
+ passed: number;
3
+ failed: number;
4
+ errors: Array<{
5
+ file: string;
6
+ error: string;
7
+ }>;
8
+ }
9
+ export interface ValidationResults {
10
+ graphModels: ValidationResult;
11
+ businessData: ValidationResult;
12
+ graphsRegistry: ValidationResult;
13
+ alizarinCompatibility: ValidationResult;
14
+ graphLoadingTests: ValidationResult;
15
+ }
16
+ export interface ValidationSummary {
17
+ results: ValidationResults;
18
+ totalPassed: number;
19
+ totalFailed: number;
20
+ success: boolean;
21
+ }
22
+ export declare class GraphLoadingValidator {
23
+ private ajv;
24
+ private validateGraphModel;
25
+ private validateBusinessData;
26
+ private validateGraphsRegistry;
27
+ private results;
28
+ private basePath;
29
+ constructor(basePath?: string);
30
+ private reportError;
31
+ private reportSuccess;
32
+ private formatErrors;
33
+ /**
34
+ * Validate graph model files
35
+ */
36
+ validateGraphModels(): void;
37
+ /**
38
+ * Validate business data files
39
+ */
40
+ validateBusinessDataFiles(): void;
41
+ /**
42
+ * Validate graphs registry file
43
+ */
44
+ validateGraphsRegistryFile(): void;
45
+ /**
46
+ * Check Alizarin compatibility requirements
47
+ */
48
+ checkAlizarinCompatibility(): void;
49
+ /**
50
+ * Simulate graph loading process (as Alizarin would do it)
51
+ */
52
+ simulateGraphLoading(): void;
53
+ /**
54
+ * Run all validation checks
55
+ */
56
+ validate(): ValidationSummary;
57
+ /**
58
+ * Get validation results
59
+ */
60
+ getResults(): ValidationResults;
61
+ /**
62
+ * Print validation summary to console
63
+ */
64
+ printSummary(summary: ValidationSummary): void;
65
+ }
66
+ /**
67
+ * Convenience function to run validation from command line or scripts
68
+ */
69
+ export declare function validateGraphLoading(basePath?: string): ValidationSummary;
@@ -0,0 +1 @@
1
+ export { GraphLoadingValidator, validateGraphLoading, type ValidationResult, type ValidationResults, type ValidationSummary } from './graphLoading.js';
@@ -0,0 +1,17 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ import { StaticNodeConfigBoolean } from '../nodeConfig';
5
+ export declare class BooleanViewModel extends Boolean implements IViewModel {
6
+ _: IViewModel | Promise<IViewModel> | undefined;
7
+ __parentPseudo: PseudoValue<any> | undefined;
8
+ __config: StaticNodeConfigBoolean;
9
+ describeField: () => string;
10
+ describeFieldGroup: () => string;
11
+ constructor(value: boolean, config: StaticNodeConfigBoolean);
12
+ toString(lang?: string | undefined): string;
13
+ __forJsonCache(): null;
14
+ forJson(): boolean;
15
+ static __create(tile: StaticTile, node: StaticNode, value: any): BooleanViewModel | Promise<BooleanViewModel | null> | null;
16
+ __asTileData(): boolean;
17
+ }
@@ -0,0 +1,15 @@
1
+ import { IViewModel, IPseudo, GetMeta } from "../interfaces";
2
+ import { StaticTile, StaticNode } from "../static-types";
3
+ import { ConceptListCacheEntry } from "./cacheEntries";
4
+ import { ConceptValueViewModel } from "./ConceptValueViewModel";
5
+ export declare class ConceptListViewModel extends Array implements IViewModel {
6
+ _: IViewModel | Promise<IViewModel> | undefined;
7
+ __parentPseudo: IPseudo | undefined;
8
+ describeField: () => string;
9
+ describeFieldGroup: () => string;
10
+ _value: Promise<(ConceptValueViewModel | null)[]> | null;
11
+ forJson(): Promise<Promise<import("../static-types").StaticValue>[]>;
12
+ __forJsonCache(getMeta: GetMeta): Promise<ConceptListCacheEntry>;
13
+ static __create(tile: StaticTile, node: StaticNode, value: any, cacheEntry?: ConceptListCacheEntry | null): Promise<ConceptListViewModel>;
14
+ __asTileData(): Promise<ConceptValueViewModel[]>;
15
+ }
@@ -0,0 +1,28 @@
1
+ import { IViewModel, IPseudo, GetMeta } from "../interfaces";
2
+ import { StaticTile, StaticNode, StaticValue } from "../static-types";
3
+ import { ConceptValueCacheEntry } from "./cacheEntries";
4
+ export declare class ConceptValueViewModel extends String implements IViewModel {
5
+ _: IViewModel | Promise<IViewModel> | undefined;
6
+ __parentPseudo: IPseudo | undefined;
7
+ describeField: () => string;
8
+ describeFieldGroup: () => string;
9
+ _value: StaticValue | Promise<StaticValue>;
10
+ _collectionId: string | null;
11
+ constructor(value: StaticValue, collectionId?: string);
12
+ /**
13
+ * Get the parent concept value, if this concept has a parent in the hierarchy.
14
+ * @returns A new ConceptValueViewModel for the parent, or null if no parent
15
+ * @throws Error if the collection doesn't support hierarchy lookups
16
+ */
17
+ parent(): Promise<ConceptValueViewModel | null>;
18
+ /**
19
+ * Get all ancestor concept values, from immediate parent to root.
20
+ * @returns Array of ConceptValueViewModels for ancestors
21
+ */
22
+ ancestors(): Promise<ConceptValueViewModel[]>;
23
+ forJson(): Promise<StaticValue>;
24
+ __forJsonCache(getMeta: GetMeta): Promise<ConceptValueCacheEntry>;
25
+ getValue(): StaticValue | Promise<StaticValue>;
26
+ static __create(tile: StaticTile, node: StaticNode, value: any, cacheEntry: ConceptValueCacheEntry | null): Promise<ConceptValueViewModel | null>;
27
+ __asTileData(): Promise<string>;
28
+ }
@@ -0,0 +1,16 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ export declare class DateViewModel extends Date implements IViewModel {
5
+ _: IViewModel | Promise<IViewModel> | undefined;
6
+ __parentPseudo: PseudoValue<any> | undefined;
7
+ __original: string;
8
+ then: undefined;
9
+ describeField: () => string;
10
+ describeFieldGroup: () => string;
11
+ __forJsonCache(): null;
12
+ constructor(val: string);
13
+ static __create(tile: StaticTile, node: StaticNode, value: any): DateViewModel | Promise<DateViewModel | null> | null;
14
+ forJson(): Promise<string>;
15
+ __asTileData(): string;
16
+ }
@@ -0,0 +1,15 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ import { DomainValueViewModel } from "./DomainValueViewModel";
5
+ export declare class DomainValueListViewModel extends Array implements IViewModel {
6
+ _: IViewModel | Promise<IViewModel> | undefined;
7
+ __parentPseudo: PseudoValue<any> | undefined;
8
+ describeField: () => string;
9
+ describeFieldGroup: () => string;
10
+ _value: Promise<(DomainValueViewModel | null)[]> | null;
11
+ forJson(): Promise<Promise<import("../static-types").StaticDomainValue>[]>;
12
+ __forJsonCache(): null;
13
+ static __create(tile: StaticTile, node: StaticNode, value: any): Promise<DomainValueListViewModel>;
14
+ __asTileData(): Promise<DomainValueViewModel[]>;
15
+ }
@@ -0,0 +1,17 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode, StaticDomainValue } from "../static-types";
4
+ export declare class DomainValueViewModel extends String implements IViewModel {
5
+ _: IViewModel | Promise<IViewModel> | undefined;
6
+ __parentPseudo: PseudoValue<any> | undefined;
7
+ describeField: () => string;
8
+ describeFieldGroup: () => string;
9
+ _value: StaticDomainValue | Promise<StaticDomainValue>;
10
+ constructor(value: StaticDomainValue);
11
+ forJson(): Promise<StaticDomainValue>;
12
+ __forJsonCache(): null;
13
+ getValue(): StaticDomainValue | Promise<StaticDomainValue>;
14
+ lang(lang: string): Promise<string | undefined>;
15
+ static __create(tile: StaticTile, node: StaticNode, value: any): Promise<DomainValueViewModel | null>;
16
+ __asTileData(): Promise<string>;
17
+ }
@@ -0,0 +1,13 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ export declare class EDTFViewModel extends String implements IViewModel {
5
+ _: IViewModel | Promise<IViewModel> | undefined;
6
+ __parentPseudo: PseudoValue<any> | undefined;
7
+ describeField: () => string;
8
+ describeFieldGroup: () => string;
9
+ __forJsonCache(): null;
10
+ forJson(): string;
11
+ static __create(tile: StaticTile, node: StaticNode, value: any): EDTFViewModel | Promise<EDTFViewModel | null> | null;
12
+ __asTileData(): string;
13
+ }
@@ -0,0 +1,26 @@
1
+ import { IStringKeyedObject, IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ export declare class GeoJSONViewModel implements IViewModel, IStringKeyedObject {
5
+ [key: string | symbol]: any;
6
+ _: IViewModel | Promise<IViewModel> | undefined;
7
+ __parentPseudo: PseudoValue<any> | undefined;
8
+ then: undefined;
9
+ [Symbol.toPrimitive]: undefined;
10
+ describeField: () => string;
11
+ describeFieldGroup: () => string;
12
+ _value: {
13
+ [key: string]: any;
14
+ };
15
+ __forJsonCache(): null;
16
+ constructor(jsonData: {
17
+ [key: string]: any;
18
+ });
19
+ static __create(tile: StaticTile, node: StaticNode, value: any): GeoJSONViewModel | Promise<GeoJSONViewModel | null> | null;
20
+ forJson(): Promise<{
21
+ [key: string]: any;
22
+ }>;
23
+ __asTileData(): {
24
+ [key: string]: any;
25
+ };
26
+ }
@@ -0,0 +1,15 @@
1
+ import { IStringKeyedObject, IViewModel } from "../interfaces";
2
+ import { PseudoNode } from "../pseudos";
3
+ export declare class NodeViewModel implements IStringKeyedObject, IViewModel {
4
+ [key: string | symbol]: any;
5
+ then: undefined;
6
+ [Symbol.toPrimitive]: undefined;
7
+ __parentPseudo: PseudoNode;
8
+ __parentWkrm: any | null;
9
+ __forJsonCache(): null;
10
+ constructor(parentPseudo: PseudoNode, parentWkrm: any | null);
11
+ toString(): Promise<string>;
12
+ __getEdgeTo(key: string): Promise<any>;
13
+ __get(key: string): Promise<NodeViewModel>;
14
+ static __create(pseudo: PseudoNode, parent: any | null): Promise<NodeViewModel>;
15
+ }
@@ -0,0 +1,13 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ export declare class NonLocalizedStringViewModel extends String implements IViewModel {
5
+ _: IViewModel | Promise<IViewModel> | undefined;
6
+ __parentPseudo: PseudoValue<any> | undefined;
7
+ describeField: () => string;
8
+ describeFieldGroup: () => string;
9
+ __forJsonCache(): null;
10
+ forJson(): string;
11
+ static __create(tile: StaticTile, node: StaticNode, value: any): NonLocalizedStringViewModel | Promise<NonLocalizedStringViewModel | null> | null;
12
+ __asTileData(): string;
13
+ }
@@ -0,0 +1,14 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ export declare class NumberViewModel extends Number implements IViewModel {
5
+ _: IViewModel | Promise<IViewModel> | undefined;
6
+ __parentPseudo: PseudoValue<any> | undefined;
7
+ describeField: () => string;
8
+ describeFieldGroup: () => string;
9
+ toString(): string;
10
+ __forJsonCache(): null;
11
+ forJson(): number;
12
+ static __create(tile: StaticTile, node: StaticNode, value: any): NumberViewModel | Promise<NumberViewModel | null> | null;
13
+ __asTileData(): number;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { IViewModel, IPseudo, GetMeta } from "../interfaces";
2
+ import { StaticTile, StaticNode } from "../static-types";
3
+ import { ResourceInstanceListCacheEntry } from "./cacheEntries";
4
+ import { ResourceInstanceViewModel } from "./ResourceInstanceViewModel";
5
+ export declare class ResourceInstanceListViewModel extends Array implements IViewModel {
6
+ _: IViewModel | Promise<IViewModel> | undefined;
7
+ __parentPseudo: IPseudo | undefined;
8
+ describeField: () => string;
9
+ describeFieldGroup: () => string;
10
+ _value: Promise<(ResourceInstanceViewModel<any> | null)[]> | null;
11
+ forJson(): Promise<Promise<{
12
+ type: string;
13
+ graphId: string;
14
+ id: string;
15
+ title: string;
16
+ descriptors: import("./cacheEntries").ResourceDescriptors;
17
+ meta: {
18
+ [key: string]: any;
19
+ };
20
+ root: any;
21
+ }>[]>;
22
+ __forJsonCache(getMeta: GetMeta): Promise<ResourceInstanceListCacheEntry>;
23
+ static __create(tile: StaticTile, node: StaticNode, value: any, cacheEntry?: ResourceInstanceListCacheEntry | null): Promise<ResourceInstanceListViewModel | null>;
24
+ __asTileData(): Promise<ResourceInstanceViewModel<any>[]>;
25
+ }
@@ -0,0 +1,62 @@
1
+ import { IStringKeyedObject, IInstanceWrapper, IModelWrapper, IViewModel, IPseudo, IRIVM, GetMeta } from "../interfaces";
2
+ import { StaticTile, StaticNode } from "../static-types";
3
+ import { viewContext } from "./types";
4
+ import { ResourceInstanceCacheEntry, ResourceDescriptors } from "./cacheEntries";
5
+ export declare class ResourceInstanceViewModel<RIVM extends IRIVM<RIVM>> implements IStringKeyedObject {
6
+ [key: string | symbol]: any;
7
+ _: IViewModel | Promise<IViewModel> | undefined;
8
+ $: IInstanceWrapper<RIVM> | null;
9
+ __: IModelWrapper<RIVM> | null;
10
+ __parentPseudo: IPseudo | undefined;
11
+ __cacheEntry: ResourceInstanceCacheEntry | null;
12
+ id: string;
13
+ then: undefined;
14
+ [Symbol.toPrimitive]: undefined;
15
+ gm: typeof viewContext.graphManager;
16
+ toString(): string;
17
+ getName(retrieveIfNeeded?: boolean): Promise<string>;
18
+ getSlug(retrieveIfNeeded?: boolean): Promise<string>;
19
+ getDescription(retrieveIfNeeded?: boolean): Promise<string>;
20
+ getMapPopup(retrieveIfNeeded?: boolean): Promise<string>;
21
+ getDescriptors(retrieveIfNeeded?: boolean): Promise<ResourceDescriptors | undefined>;
22
+ __has(key: string): Promise<boolean | undefined>;
23
+ __asTileData(): Promise<IStringKeyedObject>;
24
+ __forJsonCache(getMeta: GetMeta): Promise<ResourceInstanceCacheEntry>;
25
+ forJson(cascade?: boolean): Promise<{
26
+ type: string;
27
+ graphId: string;
28
+ id: string;
29
+ title: string;
30
+ descriptors: ResourceDescriptors;
31
+ meta: {
32
+ [key: string]: any;
33
+ };
34
+ root: any;
35
+ }>;
36
+ /**
37
+ * Get JSON representation with display-friendly values.
38
+ *
39
+ * Unlike forJson() which returns tile data format (language maps, StaticReference objects),
40
+ * this returns human-readable strings using registered display serializers.
41
+ *
42
+ * Use this for ETL/export/indexing where you want display strings instead of structured data.
43
+ *
44
+ * @param cascade - If true, ensures the resource is fully populated before serializing
45
+ * @param language - Language code for display strings (defaults to current language)
46
+ * @returns JSON with display-friendly values
47
+ */
48
+ forDisplayJson(cascade?: boolean, language?: string): Promise<{
49
+ type: string;
50
+ graphId: string;
51
+ id: string;
52
+ title: string;
53
+ descriptors: ResourceDescriptors;
54
+ meta: {
55
+ [key: string]: any;
56
+ };
57
+ root: any;
58
+ }>;
59
+ retrieve(): Promise<[IInstanceWrapper<RIVM>, IModelWrapper<RIVM>]>;
60
+ constructor(id: string, modelWrapper: IModelWrapper<RIVM> | null, instanceWrapperFactory: ((rivm: RIVM) => IInstanceWrapper<RIVM>) | null, cacheEntry: object | null);
61
+ static __create(tile: StaticTile, node: StaticNode, value: any, cacheEntry: ResourceInstanceCacheEntry | null): Promise<ResourceInstanceViewModel<any> | null>;
62
+ }
@@ -0,0 +1,17 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ import { StringTranslatedLanguage } from "./types";
5
+ export declare class StringViewModel extends String implements IViewModel {
6
+ _: IViewModel | Promise<IViewModel> | undefined;
7
+ __parentPseudo: PseudoValue<any> | undefined;
8
+ describeField: () => string;
9
+ describeFieldGroup: () => string;
10
+ _value: Map<string, StringTranslatedLanguage>;
11
+ __forJsonCache(): null;
12
+ constructor(value: Map<string, StringTranslatedLanguage>, language?: string | null);
13
+ forJson(): string;
14
+ lang(language: string): string;
15
+ static __create(tile: StaticTile, node: StaticNode, value: any): StringViewModel | Promise<StringViewModel | null> | null;
16
+ __asTileData(): Map<string, StringTranslatedLanguage>;
17
+ }
@@ -0,0 +1,22 @@
1
+ import { IViewModel } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ import { Url } from "./types";
5
+ export declare class UrlViewModel extends String implements IViewModel {
6
+ _: IViewModel | Promise<IViewModel> | undefined;
7
+ __parentPseudo: PseudoValue<any> | undefined;
8
+ describeField: () => string;
9
+ describeFieldGroup: () => string;
10
+ _value: Url;
11
+ __forJsonCache(): null;
12
+ constructor(value: Url);
13
+ forJson(): {
14
+ [key: string]: string;
15
+ };
16
+ label(): string;
17
+ href(): string;
18
+ static __create(tile: StaticTile, node: StaticNode, value: any): UrlViewModel | Promise<UrlViewModel | null> | null;
19
+ __asTileData(): {
20
+ [key: string]: string;
21
+ };
22
+ }
@@ -0,0 +1,73 @@
1
+ import { IStringKeyedObject } from "../interfaces";
2
+ export declare class ConceptListCacheEntry implements IStringKeyedObject {
3
+ [key: string]: any;
4
+ datatype: string;
5
+ _: ConceptValueCacheEntry[];
6
+ meta: {
7
+ [key: string]: any;
8
+ };
9
+ constructor({ meta, _ }: {
10
+ meta: IStringKeyedObject | undefined;
11
+ _: ConceptValueCacheEntry[];
12
+ });
13
+ }
14
+ export declare class ConceptValueCacheEntry implements IStringKeyedObject {
15
+ [key: string]: any;
16
+ datatype: string;
17
+ id: string;
18
+ value: string;
19
+ conceptId: string | null;
20
+ meta: {
21
+ [key: string]: any;
22
+ };
23
+ constructor({ meta, id, value, conceptId }: {
24
+ meta: IStringKeyedObject | undefined;
25
+ id: string;
26
+ value: string;
27
+ conceptId: string | null;
28
+ });
29
+ }
30
+ export declare class ResourceInstanceListCacheEntry implements IStringKeyedObject {
31
+ [key: string]: any;
32
+ datatype: string;
33
+ _: ResourceInstanceCacheEntry[];
34
+ meta: {
35
+ [key: string]: any;
36
+ };
37
+ constructor(input: {
38
+ meta?: IStringKeyedObject;
39
+ _?: ResourceInstanceCacheEntry[];
40
+ } | {
41
+ id: string;
42
+ type: string;
43
+ graphId: string;
44
+ title?: string | null;
45
+ meta?: IStringKeyedObject;
46
+ });
47
+ }
48
+ export interface ResourceDescriptors {
49
+ name?: string | null;
50
+ description?: string | null;
51
+ map_popup?: string | null;
52
+ slug?: string | null;
53
+ }
54
+ export declare class ResourceInstanceCacheEntry implements IStringKeyedObject {
55
+ [key: string]: any;
56
+ datatype: string;
57
+ id: string;
58
+ type: string;
59
+ graphId: string;
60
+ title: string | null;
61
+ descriptors: ResourceDescriptors | null;
62
+ meta: {
63
+ [key: string]: any;
64
+ };
65
+ constructor({ meta, id, type, graphId, title, descriptors }: {
66
+ meta: IStringKeyedObject | undefined;
67
+ id: string;
68
+ type: string;
69
+ graphId: string;
70
+ title: string | null;
71
+ descriptors?: ResourceDescriptors | null;
72
+ });
73
+ }
@@ -0,0 +1,4 @@
1
+ import { IViewModel, IRIVM } from "../interfaces";
2
+ import { PseudoValue } from "../pseudos";
3
+ import { StaticTile, StaticNode } from "../static-types";
4
+ export declare function getViewModel<RIVM extends IRIVM<RIVM>>(parentPseudo: PseudoValue<any>, tile: StaticTile, node: StaticNode, data: any, parent: IRIVM<RIVM> | null, isInner?: boolean): Promise<IViewModel | null>;
@@ -0,0 +1,20 @@
1
+ export { DEFAULT_LANGUAGE, ViewContext, viewContext, CUSTOM_DATATYPES, StringTranslatedLanguage, Url } from "./types";
2
+ export { ConceptListCacheEntry, ConceptValueCacheEntry, ResourceInstanceListCacheEntry, ResourceInstanceCacheEntry, } from "./cacheEntries";
3
+ export type { ResourceDescriptors } from "./cacheEntries";
4
+ export { ResourceInstanceViewModel } from "./ResourceInstanceViewModel";
5
+ export { ResourceInstanceListViewModel } from "./ResourceInstanceListViewModel";
6
+ export { StringViewModel } from "./StringViewModel";
7
+ export { DateViewModel } from "./DateViewModel";
8
+ export { GeoJSONViewModel } from "./GeoJSONViewModel";
9
+ export { EDTFViewModel } from "./EDTFViewModel";
10
+ export { NonLocalizedStringViewModel } from "./NonLocalizedStringViewModel";
11
+ export { NumberViewModel } from "./NumberViewModel";
12
+ export { BooleanViewModel } from "./BooleanViewModel";
13
+ export { UrlViewModel } from "./UrlViewModel";
14
+ export { DomainValueViewModel } from "./DomainValueViewModel";
15
+ export { DomainValueListViewModel } from "./DomainValueListViewModel";
16
+ export { ConceptValueViewModel } from "./ConceptValueViewModel";
17
+ export { ConceptListViewModel } from "./ConceptListViewModel";
18
+ export { NodeViewModel } from "./NodeViewModel";
19
+ export { getViewModel } from "./getViewModel";
20
+ export { SemanticViewModel } from "../semantic";
@@ -0,0 +1,15 @@
1
+ import { IGraphManager, IViewModel } from "../interfaces";
2
+ export declare const DEFAULT_LANGUAGE = "en";
3
+ export declare class ViewContext {
4
+ graphManager: IGraphManager | undefined;
5
+ }
6
+ export declare const viewContext: ViewContext;
7
+ export declare const CUSTOM_DATATYPES: Map<string, string | IViewModel>;
8
+ export declare class StringTranslatedLanguage {
9
+ value: string;
10
+ }
11
+ export declare class Url {
12
+ url: string;
13
+ url_label?: string;
14
+ constructor(url: string, url_label?: string);
15
+ }
@@ -0,0 +1 @@
1
+ export { DEFAULT_LANGUAGE, ViewContext, viewContext, CUSTOM_DATATYPES, StringTranslatedLanguage, Url, ConceptListCacheEntry, ConceptValueCacheEntry, ResourceInstanceListCacheEntry, ResourceInstanceCacheEntry, ResourceInstanceViewModel, ResourceInstanceListViewModel, StringViewModel, DateViewModel, GeoJSONViewModel, EDTFViewModel, NonLocalizedStringViewModel, NumberViewModel, BooleanViewModel, UrlViewModel, DomainValueViewModel, DomainValueListViewModel, ConceptValueViewModel, ConceptListViewModel, NodeViewModel, getViewModel, SemanticViewModel, } from "./viewModels/index";
@@ -0,0 +1,11 @@
1
+ interface TimingStats {
2
+ count: number;
3
+ totalMs: number;
4
+ minMs: number;
5
+ maxMs: number;
6
+ }
7
+ export declare function recordWasmTiming(label: string, ms: number): void;
8
+ export declare function printWasmTimings(): void;
9
+ export declare function clearWasmTimings(): void;
10
+ export declare function getWasmTimings(): Map<string, TimingStats>;
11
+ export {};