@fgv/ts-res 5.1.0-4 → 5.1.0-40
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/dist/index.browser.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/packlets/bundle/bundleBuilder.js.map +1 -0
- package/dist/packlets/bundle/bundleLoader.js.map +1 -0
- package/dist/packlets/bundle/bundleNormalizer.js.map +1 -0
- package/dist/packlets/bundle/bundleUtils.js.map +1 -0
- package/dist/packlets/bundle/convert.js.map +1 -0
- package/dist/packlets/bundle/index.js.map +1 -0
- package/dist/packlets/bundle/model.js.map +1 -0
- package/dist/packlets/common/conditions.js.map +1 -0
- package/dist/packlets/common/convert.js.map +1 -0
- package/dist/packlets/common/helpers/conditions.js.map +1 -0
- package/dist/packlets/common/helpers/context.js.map +1 -0
- package/dist/packlets/common/helpers/index.js.map +1 -0
- package/dist/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
- package/dist/packlets/common/helpers/resources.js +2 -4
- package/dist/packlets/common/helpers/resources.js.map +1 -0
- package/dist/packlets/common/index.js.map +1 -0
- package/dist/packlets/common/resources.js.map +1 -0
- package/dist/packlets/common/validate/conditions.js +4 -4
- package/dist/packlets/common/validate/conditions.js.map +1 -0
- package/dist/packlets/common/validate/index.js.map +1 -0
- package/dist/packlets/common/validate/regularExpressions.js +2 -2
- package/dist/packlets/common/validate/regularExpressions.js.map +1 -0
- package/dist/packlets/common/validate/resources.js +1 -1
- package/dist/packlets/common/validate/resources.js.map +1 -0
- package/dist/packlets/conditions/condition.js +3 -7
- package/dist/packlets/conditions/condition.js.map +1 -0
- package/dist/packlets/conditions/conditionCollector.js.map +1 -0
- package/dist/packlets/conditions/conditionDecls.js.map +1 -0
- package/dist/packlets/conditions/conditionSet.js +14 -5
- package/dist/packlets/conditions/conditionSet.js.map +1 -0
- package/dist/packlets/conditions/conditionSetCollector.js.map +1 -0
- package/dist/packlets/conditions/conditionSetDecls.js.map +1 -0
- package/dist/packlets/conditions/conditionToken.js.map +1 -0
- package/dist/packlets/conditions/convert/conditionSetDecls.js +50 -6
- package/dist/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
- package/dist/packlets/conditions/convert/decls.js +61 -5
- package/dist/packlets/conditions/convert/decls.js.map +1 -0
- package/dist/packlets/conditions/convert/index.js.map +1 -0
- package/dist/packlets/conditions/index.js.map +1 -0
- package/dist/packlets/config/common.js.map +1 -0
- package/dist/packlets/config/configInitFactory.js.map +1 -0
- package/dist/packlets/config/convert.js.map +1 -0
- package/dist/packlets/config/index.browser.js.map +1 -0
- package/dist/packlets/config/index.js.map +1 -0
- package/dist/packlets/config/json.js.map +1 -0
- package/dist/packlets/config/predefined/default.js.map +1 -0
- package/dist/packlets/config/predefined/extended.js.map +1 -0
- package/dist/packlets/config/predefined/index.js.map +1 -0
- package/dist/packlets/config/systemConfiguration.js.map +1 -0
- package/dist/packlets/context/contextDecls.js.map +1 -0
- package/dist/packlets/context/contextToken.js.map +1 -0
- package/dist/packlets/context/convert/decls.js.map +1 -0
- package/dist/packlets/context/convert/index.js.map +1 -0
- package/dist/packlets/context/index.js.map +1 -0
- package/dist/packlets/decisions/abstractDecision.js.map +1 -0
- package/dist/packlets/decisions/abstractDecisionCollector.js.map +1 -0
- package/dist/packlets/decisions/candidate.js.map +1 -0
- package/dist/packlets/decisions/common.js.map +1 -0
- package/dist/packlets/decisions/concreteDecision.js.map +1 -0
- package/dist/packlets/decisions/decision.js +1 -1
- package/dist/packlets/decisions/decision.js.map +1 -0
- package/dist/packlets/decisions/index.js.map +1 -0
- package/dist/packlets/import/fsItem.js +1 -4
- package/dist/packlets/import/fsItem.js.map +1 -0
- package/dist/packlets/import/importContext.js +3 -3
- package/dist/packlets/import/importContext.js.map +1 -0
- package/dist/packlets/import/importManager.js +7 -3
- package/dist/packlets/import/importManager.js.map +1 -0
- package/dist/packlets/import/importable.js.map +1 -0
- package/dist/packlets/import/importers/collectionImporter.js +2 -2
- package/dist/packlets/import/importers/collectionImporter.js.map +1 -0
- package/dist/packlets/import/importers/fsItemImporter.js +30 -14
- package/dist/packlets/import/importers/fsItemImporter.js.map +1 -0
- package/dist/packlets/import/importers/importer.js.map +1 -0
- package/dist/packlets/import/importers/index.browser.js.map +1 -0
- package/dist/packlets/import/importers/index.js.map +1 -0
- package/dist/packlets/import/importers/jsonImporter.js +2 -2
- package/dist/packlets/import/importers/jsonImporter.js.map +1 -0
- package/dist/packlets/import/importers/pathImporter.js +1 -1
- package/dist/packlets/import/importers/pathImporter.js.map +1 -0
- package/dist/packlets/import/index.browser.js.map +1 -0
- package/dist/packlets/import/index.js.map +1 -0
- package/dist/packlets/qualifier-types/config/convert.js.map +1 -0
- package/dist/packlets/qualifier-types/config/index.js.map +1 -0
- package/dist/packlets/qualifier-types/config/json.js.map +1 -0
- package/dist/packlets/qualifier-types/convert.js.map +1 -0
- package/dist/packlets/qualifier-types/helpers.js.map +1 -0
- package/dist/packlets/qualifier-types/index.js.map +1 -0
- package/dist/packlets/qualifier-types/languageQualifierType.js +6 -7
- package/dist/packlets/qualifier-types/languageQualifierType.js.map +1 -0
- package/dist/packlets/qualifier-types/literalQualifierType.js +7 -10
- package/dist/packlets/qualifier-types/literalQualifierType.js.map +1 -0
- package/dist/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
- package/dist/packlets/qualifier-types/qualifierType.js +12 -13
- package/dist/packlets/qualifier-types/qualifierType.js.map +1 -0
- package/dist/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -0
- package/dist/packlets/qualifier-types/territoryQualifierType.js +5 -5
- package/dist/packlets/qualifier-types/territoryQualifierType.js.map +1 -0
- package/dist/packlets/qualifiers/convert/decls.js.map +1 -0
- package/dist/packlets/qualifiers/convert/index.js.map +1 -0
- package/dist/packlets/qualifiers/convert/qualifier.js.map +1 -0
- package/dist/packlets/qualifiers/index.js.map +1 -0
- package/dist/packlets/qualifiers/qualifier.js +6 -7
- package/dist/packlets/qualifiers/qualifier.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierCollector.js +153 -9
- package/dist/packlets/qualifiers/qualifierCollector.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierDecl.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
- package/dist/packlets/resource-json/compiled/common.js.map +1 -0
- package/dist/packlets/resource-json/compiled/convert.js.map +1 -0
- package/dist/packlets/resource-json/compiled/index.js.map +1 -0
- package/dist/packlets/resource-json/compiled/json.js.map +1 -0
- package/dist/packlets/resource-json/convert.js +225 -0
- package/dist/packlets/resource-json/convert.js.map +1 -0
- package/dist/packlets/resource-json/helpers.js.map +1 -0
- package/dist/packlets/resource-json/index.js.map +1 -0
- package/dist/packlets/resource-json/json.js +2 -2
- package/dist/packlets/resource-json/json.js.map +1 -0
- package/dist/packlets/resource-json/normalized.js.map +1 -0
- package/dist/packlets/resource-json/resourceDeclCollection.js +1 -1
- package/dist/packlets/resource-json/resourceDeclCollection.js.map +1 -0
- package/dist/packlets/resource-json/resourceDeclContainer.js.map +1 -0
- package/dist/packlets/resource-json/resourceDeclTree.js +1 -1
- package/dist/packlets/resource-json/resourceDeclTree.js.map +1 -0
- package/dist/packlets/resource-types/config/convert.js.map +1 -0
- package/dist/packlets/resource-types/config/index.js.map +1 -0
- package/dist/packlets/resource-types/config/json.js.map +1 -0
- package/dist/packlets/resource-types/helpers.js.map +1 -0
- package/dist/packlets/resource-types/index.js.map +1 -0
- package/dist/packlets/resource-types/jsonResourceType.js +2 -2
- package/dist/packlets/resource-types/jsonResourceType.js.map +1 -0
- package/dist/packlets/resource-types/resourceType.js +2 -2
- package/dist/packlets/resource-types/resourceType.js.map +1 -0
- package/dist/packlets/resource-types/resourceTypeCollector.js.map +1 -0
- package/dist/packlets/resources/candidateReducer.js.map +1 -0
- package/dist/packlets/resources/candidateValue.js.map +1 -0
- package/dist/packlets/resources/candidateValueCollector.js.map +1 -0
- package/dist/packlets/resources/common.js.map +1 -0
- package/dist/packlets/resources/deltaGenerator.js.map +1 -0
- package/dist/packlets/resources/index.js.map +1 -0
- package/dist/packlets/resources/resource.js.map +1 -0
- package/dist/packlets/resources/resourceBuilder.js +2 -2
- package/dist/packlets/resources/resourceBuilder.js.map +1 -0
- package/dist/packlets/resources/resourceCandidate.js.map +1 -0
- package/dist/packlets/resources/resourceManagerBuilder.js +5 -5
- package/dist/packlets/resources/resourceManagerBuilder.js.map +1 -0
- package/dist/packlets/runtime/cacheListener.js.map +1 -0
- package/dist/packlets/runtime/cacheMetrics.js.map +1 -0
- package/dist/packlets/runtime/compiledResourceCollection.js +5 -5
- package/dist/packlets/runtime/compiledResourceCollection.js.map +1 -0
- package/dist/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
- package/dist/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
- package/dist/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
- package/dist/packlets/runtime/context/index.js.map +1 -0
- package/dist/packlets/runtime/context/simpleContextQualifierProvider.js +3 -0
- package/dist/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
- package/dist/packlets/runtime/context/validatingSimpleContextQualifierProvider.js +3 -5
- package/dist/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
- package/dist/packlets/runtime/iResourceManager.js.map +1 -0
- package/dist/packlets/runtime/index.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/common.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/index.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
- package/dist/packlets/runtime/resourceResolver.js.map +1 -0
- package/dist/packlets/runtime/resourceTreeResolver.js.map +1 -0
- package/dist/packlets/runtime/validate.js.map +1 -0
- package/dist/packlets/zip-archive/convert.js.map +1 -0
- package/dist/packlets/zip-archive/index.browser.js.map +1 -0
- package/dist/packlets/zip-archive/index.js.map +1 -0
- package/dist/packlets/zip-archive/json.js.map +1 -0
- package/dist/packlets/zip-archive/types.js.map +1 -0
- package/dist/packlets/zip-archive/zipArchiveCreator.js.map +1 -0
- package/dist/packlets/zip-archive/zipArchiveFormat.js.map +1 -0
- package/dist/packlets/zip-archive/zipArchiveLoader.js.map +1 -0
- package/dist/ts-res.d.ts +576 -164
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/index.browser.d.ts.map +1 -0
- package/lib/index.browser.js.map +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/packlets/bundle/bundleBuilder.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleBuilder.js.map +1 -0
- package/lib/packlets/bundle/bundleLoader.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleLoader.js.map +1 -0
- package/lib/packlets/bundle/bundleNormalizer.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleNormalizer.js.map +1 -0
- package/lib/packlets/bundle/bundleUtils.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleUtils.js.map +1 -0
- package/lib/packlets/bundle/convert.d.ts.map +1 -0
- package/lib/packlets/bundle/convert.js.map +1 -0
- package/lib/packlets/bundle/index.d.ts.map +1 -0
- package/lib/packlets/bundle/index.js.map +1 -0
- package/lib/packlets/bundle/model.d.ts.map +1 -0
- package/lib/packlets/bundle/model.js.map +1 -0
- package/lib/packlets/common/conditions.d.ts.map +1 -0
- package/lib/packlets/common/conditions.js.map +1 -0
- package/lib/packlets/common/convert.d.ts.map +1 -0
- package/lib/packlets/common/convert.js.map +1 -0
- package/lib/packlets/common/helpers/conditions.d.ts.map +1 -0
- package/lib/packlets/common/helpers/conditions.js.map +1 -0
- package/lib/packlets/common/helpers/context.d.ts.map +1 -0
- package/lib/packlets/common/helpers/context.js.map +1 -0
- package/lib/packlets/common/helpers/index.d.ts.map +1 -0
- package/lib/packlets/common/helpers/index.js.map +1 -0
- package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts.map +1 -0
- package/lib/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
- package/lib/packlets/common/helpers/resources.d.ts +2 -4
- package/lib/packlets/common/helpers/resources.d.ts.map +1 -0
- package/lib/packlets/common/helpers/resources.js +2 -4
- package/lib/packlets/common/helpers/resources.js.map +1 -0
- package/lib/packlets/common/index.d.ts.map +1 -0
- package/lib/packlets/common/index.js.map +1 -0
- package/lib/packlets/common/resources.d.ts.map +1 -0
- package/lib/packlets/common/resources.js.map +1 -0
- package/lib/packlets/common/validate/conditions.d.ts +4 -4
- package/lib/packlets/common/validate/conditions.d.ts.map +1 -0
- package/lib/packlets/common/validate/conditions.js +4 -4
- package/lib/packlets/common/validate/conditions.js.map +1 -0
- package/lib/packlets/common/validate/index.d.ts.map +1 -0
- package/lib/packlets/common/validate/index.js.map +1 -0
- package/lib/packlets/common/validate/regularExpressions.d.ts +2 -2
- package/lib/packlets/common/validate/regularExpressions.d.ts.map +1 -0
- package/lib/packlets/common/validate/regularExpressions.js +2 -2
- package/lib/packlets/common/validate/regularExpressions.js.map +1 -0
- package/lib/packlets/common/validate/resources.d.ts +1 -1
- package/lib/packlets/common/validate/resources.d.ts.map +1 -0
- package/lib/packlets/common/validate/resources.js +1 -1
- package/lib/packlets/common/validate/resources.js.map +1 -0
- package/lib/packlets/conditions/condition.d.ts +3 -7
- package/lib/packlets/conditions/condition.d.ts.map +1 -0
- package/lib/packlets/conditions/condition.js +3 -7
- package/lib/packlets/conditions/condition.js.map +1 -0
- package/lib/packlets/conditions/conditionCollector.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionCollector.js.map +1 -0
- package/lib/packlets/conditions/conditionDecls.d.ts +6 -1
- package/lib/packlets/conditions/conditionDecls.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionDecls.js.map +1 -0
- package/lib/packlets/conditions/conditionSet.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionSet.js +14 -5
- package/lib/packlets/conditions/conditionSet.js.map +1 -0
- package/lib/packlets/conditions/conditionSetCollector.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionSetCollector.js.map +1 -0
- package/lib/packlets/conditions/conditionSetDecls.d.ts +7 -2
- package/lib/packlets/conditions/conditionSetDecls.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionSetDecls.js.map +1 -0
- package/lib/packlets/conditions/conditionToken.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionToken.js.map +1 -0
- package/lib/packlets/conditions/convert/conditionSetDecls.d.ts +30 -2
- package/lib/packlets/conditions/convert/conditionSetDecls.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/conditionSetDecls.js +51 -5
- package/lib/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
- package/lib/packlets/conditions/convert/decls.d.ts +39 -3
- package/lib/packlets/conditions/convert/decls.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/decls.js +63 -5
- package/lib/packlets/conditions/convert/decls.js.map +1 -0
- package/lib/packlets/conditions/convert/index.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/index.js.map +1 -0
- package/lib/packlets/conditions/index.d.ts.map +1 -0
- package/lib/packlets/conditions/index.js.map +1 -0
- package/lib/packlets/config/common.d.ts.map +1 -0
- package/lib/packlets/config/common.js.map +1 -0
- package/lib/packlets/config/configInitFactory.d.ts.map +1 -0
- package/lib/packlets/config/configInitFactory.js.map +1 -0
- package/lib/packlets/config/convert.d.ts.map +1 -0
- package/lib/packlets/config/convert.js.map +1 -0
- package/lib/packlets/config/index.browser.d.ts.map +1 -0
- package/lib/packlets/config/index.browser.js.map +1 -0
- package/lib/packlets/config/index.d.ts.map +1 -0
- package/lib/packlets/config/index.js.map +1 -0
- package/lib/packlets/config/json.d.ts.map +1 -0
- package/lib/packlets/config/json.js.map +1 -0
- package/lib/packlets/config/predefined/default.d.ts.map +1 -0
- package/lib/packlets/config/predefined/default.js.map +1 -0
- package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
- package/lib/packlets/config/predefined/extended.js.map +1 -0
- package/lib/packlets/config/predefined/index.d.ts.map +1 -0
- package/lib/packlets/config/predefined/index.js.map +1 -0
- package/lib/packlets/config/systemConfiguration.d.ts.map +1 -0
- package/lib/packlets/config/systemConfiguration.js.map +1 -0
- package/lib/packlets/context/contextDecls.d.ts.map +1 -0
- package/lib/packlets/context/contextDecls.js.map +1 -0
- package/lib/packlets/context/contextToken.d.ts.map +1 -0
- package/lib/packlets/context/contextToken.js.map +1 -0
- package/lib/packlets/context/convert/decls.d.ts.map +1 -0
- package/lib/packlets/context/convert/decls.js.map +1 -0
- package/lib/packlets/context/convert/index.d.ts.map +1 -0
- package/lib/packlets/context/convert/index.js.map +1 -0
- package/lib/packlets/context/index.d.ts.map +1 -0
- package/lib/packlets/context/index.js.map +1 -0
- package/lib/packlets/decisions/abstractDecision.d.ts.map +1 -0
- package/lib/packlets/decisions/abstractDecision.js.map +1 -0
- package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +1 -0
- package/lib/packlets/decisions/abstractDecisionCollector.js.map +1 -0
- package/lib/packlets/decisions/candidate.d.ts.map +1 -0
- package/lib/packlets/decisions/candidate.js.map +1 -0
- package/lib/packlets/decisions/common.d.ts.map +1 -0
- package/lib/packlets/decisions/common.js.map +1 -0
- package/lib/packlets/decisions/concreteDecision.d.ts.map +1 -0
- package/lib/packlets/decisions/concreteDecision.js.map +1 -0
- package/lib/packlets/decisions/decision.d.ts +1 -1
- package/lib/packlets/decisions/decision.d.ts.map +1 -0
- package/lib/packlets/decisions/decision.js +1 -1
- package/lib/packlets/decisions/decision.js.map +1 -0
- package/lib/packlets/decisions/index.d.ts.map +1 -0
- package/lib/packlets/decisions/index.js.map +1 -0
- package/lib/packlets/import/fsItem.d.ts +1 -4
- package/lib/packlets/import/fsItem.d.ts.map +1 -0
- package/lib/packlets/import/fsItem.js +1 -4
- package/lib/packlets/import/fsItem.js.map +1 -0
- package/lib/packlets/import/importContext.d.ts +5 -5
- package/lib/packlets/import/importContext.d.ts.map +1 -0
- package/lib/packlets/import/importContext.js +3 -3
- package/lib/packlets/import/importContext.js.map +1 -0
- package/lib/packlets/import/importManager.d.ts +15 -1
- package/lib/packlets/import/importManager.d.ts.map +1 -0
- package/lib/packlets/import/importManager.js +7 -3
- package/lib/packlets/import/importManager.js.map +1 -0
- package/lib/packlets/import/importable.d.ts.map +1 -0
- package/lib/packlets/import/importable.js.map +1 -0
- package/lib/packlets/import/importers/collectionImporter.d.ts +2 -2
- package/lib/packlets/import/importers/collectionImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/collectionImporter.js +2 -2
- package/lib/packlets/import/importers/collectionImporter.js.map +1 -0
- package/lib/packlets/import/importers/fsItemImporter.d.ts +16 -2
- package/lib/packlets/import/importers/fsItemImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/fsItemImporter.js +29 -13
- package/lib/packlets/import/importers/fsItemImporter.js.map +1 -0
- package/lib/packlets/import/importers/importer.d.ts.map +1 -0
- package/lib/packlets/import/importers/importer.js.map +1 -0
- package/lib/packlets/import/importers/index.browser.d.ts.map +1 -0
- package/lib/packlets/import/importers/index.browser.js.map +1 -0
- package/lib/packlets/import/importers/index.d.ts.map +1 -0
- package/lib/packlets/import/importers/index.js.map +1 -0
- package/lib/packlets/import/importers/jsonImporter.d.ts +2 -2
- package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/jsonImporter.js +2 -2
- package/lib/packlets/import/importers/jsonImporter.js.map +1 -0
- package/lib/packlets/import/importers/pathImporter.d.ts +1 -1
- package/lib/packlets/import/importers/pathImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/pathImporter.js +1 -1
- package/lib/packlets/import/importers/pathImporter.js.map +1 -0
- package/lib/packlets/import/index.browser.d.ts.map +1 -0
- package/lib/packlets/import/index.browser.js.map +1 -0
- package/lib/packlets/import/index.d.ts.map +1 -0
- package/lib/packlets/import/index.js.map +1 -0
- package/lib/packlets/qualifier-types/config/convert.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
- package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/index.js.map +1 -0
- package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/json.js.map +1 -0
- package/lib/packlets/qualifier-types/convert.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/convert.js.map +1 -0
- package/lib/packlets/qualifier-types/helpers.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/helpers.js.map +1 -0
- package/lib/packlets/qualifier-types/index.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/index.js.map +1 -0
- package/lib/packlets/qualifier-types/languageQualifierType.d.ts +6 -7
- package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/languageQualifierType.js +6 -7
- package/lib/packlets/qualifier-types/languageQualifierType.js.map +1 -0
- package/lib/packlets/qualifier-types/literalQualifierType.d.ts +7 -10
- package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/literalQualifierType.js +7 -10
- package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
- package/lib/packlets/qualifier-types/qualifierType.d.ts +17 -18
- package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/qualifierType.js +12 -13
- package/lib/packlets/qualifier-types/qualifierType.js.map +1 -0
- package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -0
- package/lib/packlets/qualifier-types/territoryQualifierType.d.ts +8 -8
- package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/territoryQualifierType.js +5 -5
- package/lib/packlets/qualifier-types/territoryQualifierType.js.map +1 -0
- package/lib/packlets/qualifiers/convert/decls.d.ts.map +1 -0
- package/lib/packlets/qualifiers/convert/decls.js.map +1 -0
- package/lib/packlets/qualifiers/convert/index.d.ts.map +1 -0
- package/lib/packlets/qualifiers/convert/index.js.map +1 -0
- package/lib/packlets/qualifiers/convert/qualifier.d.ts.map +1 -0
- package/lib/packlets/qualifiers/convert/qualifier.js.map +1 -0
- package/lib/packlets/qualifiers/index.d.ts.map +1 -0
- package/lib/packlets/qualifiers/index.js.map +1 -0
- package/lib/packlets/qualifiers/qualifier.d.ts +6 -7
- package/lib/packlets/qualifiers/qualifier.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifier.js +6 -7
- package/lib/packlets/qualifiers/qualifier.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierCollector.d.ts +107 -9
- package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierCollector.js +152 -8
- package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDecl.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
- package/lib/packlets/resource-json/compiled/common.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/common.js.map +1 -0
- package/lib/packlets/resource-json/compiled/convert.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/convert.js.map +1 -0
- package/lib/packlets/resource-json/compiled/index.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/index.js.map +1 -0
- package/lib/packlets/resource-json/compiled/json.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/json.js.map +1 -0
- package/lib/packlets/resource-json/convert.d.ts +85 -0
- package/lib/packlets/resource-json/convert.d.ts.map +1 -0
- package/lib/packlets/resource-json/convert.js +237 -0
- package/lib/packlets/resource-json/convert.js.map +1 -0
- package/lib/packlets/resource-json/helpers.d.ts.map +1 -0
- package/lib/packlets/resource-json/helpers.js.map +1 -0
- package/lib/packlets/resource-json/index.d.ts.map +1 -0
- package/lib/packlets/resource-json/index.js.map +1 -0
- package/lib/packlets/resource-json/json.d.ts +128 -39
- package/lib/packlets/resource-json/json.d.ts.map +1 -0
- package/lib/packlets/resource-json/json.js +2 -2
- package/lib/packlets/resource-json/json.js.map +1 -0
- package/lib/packlets/resource-json/normalized.d.ts.map +1 -0
- package/lib/packlets/resource-json/normalized.js.map +1 -0
- package/lib/packlets/resource-json/resourceDeclCollection.d.ts +1 -1
- package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +1 -0
- package/lib/packlets/resource-json/resourceDeclCollection.js +1 -1
- package/lib/packlets/resource-json/resourceDeclCollection.js.map +1 -0
- package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +1 -0
- package/lib/packlets/resource-json/resourceDeclContainer.js.map +1 -0
- package/lib/packlets/resource-json/resourceDeclTree.d.ts +1 -1
- package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +1 -0
- package/lib/packlets/resource-json/resourceDeclTree.js +1 -1
- package/lib/packlets/resource-json/resourceDeclTree.js.map +1 -0
- package/lib/packlets/resource-types/config/convert.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/convert.js.map +1 -0
- package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/index.js.map +1 -0
- package/lib/packlets/resource-types/config/json.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/json.js.map +1 -0
- package/lib/packlets/resource-types/helpers.d.ts.map +1 -0
- package/lib/packlets/resource-types/helpers.js.map +1 -0
- package/lib/packlets/resource-types/index.d.ts.map +1 -0
- package/lib/packlets/resource-types/index.js.map +1 -0
- package/lib/packlets/resource-types/jsonResourceType.d.ts +17 -5
- package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -0
- package/lib/packlets/resource-types/jsonResourceType.js +2 -2
- package/lib/packlets/resource-types/jsonResourceType.js.map +1 -0
- package/lib/packlets/resource-types/resourceType.d.ts +5 -5
- package/lib/packlets/resource-types/resourceType.d.ts.map +1 -0
- package/lib/packlets/resource-types/resourceType.js +2 -2
- package/lib/packlets/resource-types/resourceType.js.map +1 -0
- package/lib/packlets/resource-types/resourceTypeCollector.d.ts.map +1 -0
- package/lib/packlets/resource-types/resourceTypeCollector.js.map +1 -0
- package/lib/packlets/resources/candidateReducer.d.ts.map +1 -0
- package/lib/packlets/resources/candidateReducer.js.map +1 -0
- package/lib/packlets/resources/candidateValue.d.ts.map +1 -0
- package/lib/packlets/resources/candidateValue.js.map +1 -0
- package/lib/packlets/resources/candidateValueCollector.d.ts.map +1 -0
- package/lib/packlets/resources/candidateValueCollector.js.map +1 -0
- package/lib/packlets/resources/common.d.ts.map +1 -0
- package/lib/packlets/resources/common.js.map +1 -0
- package/lib/packlets/resources/deltaGenerator.d.ts.map +1 -0
- package/lib/packlets/resources/deltaGenerator.js.map +1 -0
- package/lib/packlets/resources/index.d.ts.map +1 -0
- package/lib/packlets/resources/index.js.map +1 -0
- package/lib/packlets/resources/resource.d.ts.map +1 -0
- package/lib/packlets/resources/resource.js.map +1 -0
- package/lib/packlets/resources/resourceBuilder.d.ts +2 -2
- package/lib/packlets/resources/resourceBuilder.d.ts.map +1 -0
- package/lib/packlets/resources/resourceBuilder.js +2 -2
- package/lib/packlets/resources/resourceBuilder.js.map +1 -0
- package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -0
- package/lib/packlets/resources/resourceCandidate.js.map +1 -0
- package/lib/packlets/resources/resourceManagerBuilder.d.ts +5 -5
- package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +1 -0
- package/lib/packlets/resources/resourceManagerBuilder.js +5 -5
- package/lib/packlets/resources/resourceManagerBuilder.js.map +1 -0
- package/lib/packlets/runtime/cacheListener.d.ts.map +1 -0
- package/lib/packlets/runtime/cacheListener.js.map +1 -0
- package/lib/packlets/runtime/cacheMetrics.d.ts.map +1 -0
- package/lib/packlets/runtime/cacheMetrics.js.map +1 -0
- package/lib/packlets/runtime/compiledResourceCollection.d.ts +5 -5
- package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +1 -0
- package/lib/packlets/runtime/compiledResourceCollection.js +5 -5
- package/lib/packlets/runtime/compiledResourceCollection.js.map +1 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.d.ts.map +1 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
- package/lib/packlets/runtime/context/index.d.ts.map +1 -0
- package/lib/packlets/runtime/context/index.js.map +1 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts +9 -2
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.js +3 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts +8 -1
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js +3 -5
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/iResourceManager.d.ts.map +1 -0
- package/lib/packlets/runtime/iResourceManager.js.map +1 -0
- package/lib/packlets/runtime/index.d.ts.map +1 -0
- package/lib/packlets/runtime/index.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/common.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/common.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/index.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/index.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
- package/lib/packlets/runtime/resourceResolver.d.ts.map +1 -0
- package/lib/packlets/runtime/resourceResolver.js.map +1 -0
- package/lib/packlets/runtime/resourceTreeResolver.d.ts.map +1 -0
- package/lib/packlets/runtime/resourceTreeResolver.js.map +1 -0
- package/lib/packlets/runtime/validate.d.ts.map +1 -0
- package/lib/packlets/runtime/validate.js.map +1 -0
- package/lib/packlets/zip-archive/convert.d.ts.map +1 -0
- package/lib/packlets/zip-archive/convert.js.map +1 -0
- package/lib/packlets/zip-archive/index.browser.d.ts.map +1 -0
- package/lib/packlets/zip-archive/index.browser.js.map +1 -0
- package/lib/packlets/zip-archive/index.d.ts.map +1 -0
- package/lib/packlets/zip-archive/index.js.map +1 -0
- package/lib/packlets/zip-archive/json.d.ts.map +1 -0
- package/lib/packlets/zip-archive/json.js.map +1 -0
- package/lib/packlets/zip-archive/types.d.ts.map +1 -0
- package/lib/packlets/zip-archive/types.js.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveCreator.d.ts.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveCreator.js.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveFormat.d.ts.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveFormat.js.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveLoader.d.ts.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveLoader.js.map +1 -0
- package/package.json +9 -9
- package/dist/test/data/sample.json +0 -32
- package/dist/test/unit/qualifier-types/testQualifierType.js +0 -76
- package/dist/test/unit/resource-types/testDerivedResourceType.js +0 -109
- package/dist/test/unit/resources/deltaGenerator.helpers.js +0 -282
package/dist/ts-res.d.ts
CHANGED
|
@@ -799,7 +799,7 @@ declare const childResourceDecl: Converter<Normalized.IChildResourceDecl>;
|
|
|
799
799
|
*/
|
|
800
800
|
declare class CollectionImporter implements IImporter {
|
|
801
801
|
/**
|
|
802
|
-
* {@
|
|
802
|
+
* {@inheritDoc Import.Importers.IImporter.types}
|
|
803
803
|
*/
|
|
804
804
|
readonly types: string[];
|
|
805
805
|
/**
|
|
@@ -813,7 +813,7 @@ declare class CollectionImporter implements IImporter {
|
|
|
813
813
|
*/
|
|
814
814
|
static create(): Result<CollectionImporter>;
|
|
815
815
|
/**
|
|
816
|
-
* {@
|
|
816
|
+
* {@inheritDoc Import.Importers.IImporter.import}
|
|
817
817
|
*/
|
|
818
818
|
import(item: IImportable, manager: ResourceManagerBuilder): DetailedResult<IImportable[], ImporterResultDetail>;
|
|
819
819
|
/**
|
|
@@ -1010,16 +1010,16 @@ declare class CompiledResourceCollection implements IResourceManager<IResource>
|
|
|
1010
1010
|
*/
|
|
1011
1011
|
get candidateValues(): ReadonlyArray<JsonValue>;
|
|
1012
1012
|
/**
|
|
1013
|
-
* {@
|
|
1013
|
+
* {@inheritDoc Runtime.IResourceManager.builtResources}
|
|
1014
1014
|
*/
|
|
1015
1015
|
get builtResources(): Collections.IReadOnlyValidatingResultMap<ResourceId, IResource>;
|
|
1016
1016
|
/**
|
|
1017
|
-
* {@
|
|
1017
|
+
* {@inheritDoc Runtime.IResourceManager.numResources}
|
|
1018
1018
|
*/
|
|
1019
1019
|
get numResources(): number;
|
|
1020
1020
|
protected _numCandidates?: number;
|
|
1021
1021
|
/**
|
|
1022
|
-
* {@
|
|
1022
|
+
* {@inheritDoc Runtime.IResourceManager.numCandidates}
|
|
1023
1023
|
*/
|
|
1024
1024
|
get numCandidates(): number;
|
|
1025
1025
|
/**
|
|
@@ -1037,11 +1037,11 @@ declare class CompiledResourceCollection implements IResourceManager<IResource>
|
|
|
1037
1037
|
*/
|
|
1038
1038
|
static create(params: ICompiledResourceCollectionCreateParams): Result<CompiledResourceCollection>;
|
|
1039
1039
|
/**
|
|
1040
|
-
* {@
|
|
1040
|
+
* {@inheritDoc Runtime.IResourceManager.getBuiltResource}
|
|
1041
1041
|
*/
|
|
1042
1042
|
getBuiltResource(id: string): Result<IResource>;
|
|
1043
1043
|
/**
|
|
1044
|
-
* {@
|
|
1044
|
+
* {@inheritDoc Runtime.IResourceManager.validateContext}
|
|
1045
1045
|
*/
|
|
1046
1046
|
validateContext(context: Context.IContextDecl): Result<Context.IValidatedContextDecl>;
|
|
1047
1047
|
/**
|
|
@@ -1209,12 +1209,8 @@ export declare class Condition implements IValidatedConditionDecl {
|
|
|
1209
1209
|
protected _collectible: Collections.Collectible<ConditionKey, ConditionIndex>;
|
|
1210
1210
|
/**
|
|
1211
1211
|
* Constructs a new {@link Conditions.Condition | Condition} object.
|
|
1212
|
-
* @param
|
|
1213
|
-
*
|
|
1214
|
-
* @param operator - The {@link ConditionOperator | operator} used when matching context value to condition value.
|
|
1215
|
-
* @param priority - The {@link ConditionPriority | relative priority} of this condition.
|
|
1216
|
-
* @param scoreAsDefault - The {@link QualifierMatchScore | score} to be used when this condition is the default.
|
|
1217
|
-
* @param index - The index of this condition.
|
|
1212
|
+
* @param params - The {@link Conditions.IValidatedConditionDecl | validated condition declaration}
|
|
1213
|
+
* used to construct this condition.
|
|
1218
1214
|
* @public
|
|
1219
1215
|
*/
|
|
1220
1216
|
protected constructor({ qualifier, value, operator, priority, scoreAsDefault, index }: IValidatedConditionDecl);
|
|
@@ -1238,7 +1234,7 @@ export declare class Condition implements IValidatedConditionDecl {
|
|
|
1238
1234
|
* @returns A {@link QualifierMatchScore | match score} indicating match quality if the condition is present
|
|
1239
1235
|
* in the context to be matched, `undefined` otherwise.
|
|
1240
1236
|
* @remarks
|
|
1241
|
-
* If {@link Context.IContextMatchOptions.partialContextMatch | `options.partialContextMatch
|
|
1237
|
+
* If {@link Context.IContextMatchOptions.partialContextMatch | `options.partialContextMatch`} is `true`, then
|
|
1242
1238
|
* the method will return `undefined` if the corresponding qualifier is not present in the context.
|
|
1243
1239
|
*/
|
|
1244
1240
|
getContextMatch(context: Context.IValidatedContextDecl, options?: Context.IContextMatchOptions): QualifierMatchScore | undefined;
|
|
@@ -1361,9 +1357,14 @@ declare class ConditionCollector extends ValidatingCollector<Condition> {
|
|
|
1361
1357
|
|
|
1362
1358
|
/**
|
|
1363
1359
|
* Converter for a {@link Conditions.IConditionDecl | condition declaration}.
|
|
1360
|
+
*
|
|
1361
|
+
* @remarks
|
|
1362
|
+
* Accepts any string as the `qualifierName`. Use `typedConditionDecl` to narrow the
|
|
1363
|
+
* accepted set of qualifier names to a literal-string union.
|
|
1364
|
+
*
|
|
1364
1365
|
* @public
|
|
1365
1366
|
*/
|
|
1366
|
-
declare const conditionDecl: ObjectConverter<
|
|
1367
|
+
declare const conditionDecl: ObjectConverter<IConditionDecl, unknown>;
|
|
1367
1368
|
|
|
1368
1369
|
/**
|
|
1369
1370
|
* Branded number representing a validated condition index.
|
|
@@ -1394,8 +1395,8 @@ declare const conditionKey: Converter<ConditionKey, unknown>;
|
|
|
1394
1395
|
|
|
1395
1396
|
/**
|
|
1396
1397
|
* The format of a {@link ConditionKey | condition key} is:
|
|
1397
|
-
*
|
|
1398
|
-
*
|
|
1398
|
+
* \<qualifierName\>-\[<value>\]\[\@<priority>\]\(\<scoreAsDefault\>\) where operator is `matches`, or
|
|
1399
|
+
* \<qualifierName\>-\<operator\>-\[<value>\]\[\@<priority>\]\(\<scoreAsDefault\>\)
|
|
1399
1400
|
* @internal
|
|
1400
1401
|
*/
|
|
1401
1402
|
declare const conditionKey_2: RegExp;
|
|
@@ -1622,10 +1623,18 @@ declare class ConditionSetCollector extends ValidatingCollector<ConditionSet> {
|
|
|
1622
1623
|
}
|
|
1623
1624
|
|
|
1624
1625
|
/**
|
|
1625
|
-
* Non-validated declaration of a {@link Conditions.
|
|
1626
|
+
* Non-validated declaration of a {@link Conditions.ConditionSet | condition set}.
|
|
1627
|
+
*
|
|
1628
|
+
* @remarks
|
|
1629
|
+
* Parameterized on `TQualifierNames`; defaults to `string`. Both the
|
|
1630
|
+
* array form (`ConditionSetDeclAsArray`) and the record form
|
|
1631
|
+
* (`ConditionSetDeclAsRecord`) inherit the parameter, so a
|
|
1632
|
+
* consumer threading a narrow `TQualifierNames` gets compile-time
|
|
1633
|
+
* rejection of typo'd axis names in either form.
|
|
1634
|
+
*
|
|
1626
1635
|
* @public
|
|
1627
1636
|
*/
|
|
1628
|
-
declare type ConditionSetDecl = ConditionSetDeclAsArray | ConditionSetDeclAsRecord
|
|
1637
|
+
declare type ConditionSetDecl<TQualifierNames extends string = string> = ConditionSetDeclAsArray<TQualifierNames> | ConditionSetDeclAsRecord<TQualifierNames>;
|
|
1629
1638
|
|
|
1630
1639
|
/**
|
|
1631
1640
|
* `Converter` for a normalized {@link ResourceJson.Normalized.ConditionSetDecl | condition set declaration}.
|
|
@@ -1641,21 +1650,38 @@ declare type ConditionSetDecl_2 = ReadonlyArray<ILooseConditionDecl>;
|
|
|
1641
1650
|
|
|
1642
1651
|
/**
|
|
1643
1652
|
* Converter which converts to a {@link Conditions.IConditionSetDecl | condition set declaration}.
|
|
1653
|
+
*
|
|
1654
|
+
* @remarks
|
|
1655
|
+
* Accepts any string as the qualifier name of each contained condition. Use
|
|
1656
|
+
* `typedConditionSetDecl` to narrow the accepted set of qualifier names to a literal-string union.
|
|
1657
|
+
*
|
|
1644
1658
|
* @public
|
|
1645
1659
|
*/
|
|
1646
|
-
declare const conditionSetDecl_2: ObjectConverter<IConditionSetDecl
|
|
1660
|
+
declare const conditionSetDecl_2: ObjectConverter<IConditionSetDecl<string>, unknown>;
|
|
1647
1661
|
|
|
1648
1662
|
/**
|
|
1649
|
-
* Non-validated declaration of a {@link Conditions.
|
|
1663
|
+
* Non-validated array-form declaration of a {@link Conditions.ConditionSet | condition set}.
|
|
1664
|
+
*
|
|
1665
|
+
* @remarks
|
|
1666
|
+
* Parameterized on `TQualifierNames` via `ILooseConditionDecl`;
|
|
1667
|
+
* defaults to `string` for back-compat with existing untyped callers.
|
|
1668
|
+
*
|
|
1650
1669
|
* @public
|
|
1651
1670
|
*/
|
|
1652
|
-
declare type ConditionSetDeclAsArray = ReadonlyArray<ILooseConditionDecl
|
|
1671
|
+
declare type ConditionSetDeclAsArray<TQualifierNames extends string = string> = ReadonlyArray<ILooseConditionDecl<TQualifierNames>>;
|
|
1653
1672
|
|
|
1654
1673
|
/**
|
|
1655
|
-
* Non-validated declaration of a {@link Conditions.
|
|
1674
|
+
* Non-validated record-form declaration of a {@link Conditions.ConditionSet | condition set}.
|
|
1675
|
+
*
|
|
1676
|
+
* @remarks
|
|
1677
|
+
* Parameterized on `TQualifierNames`; defaults to `string` for back-compat with
|
|
1678
|
+
* existing untyped callers. Uses `Readonly<Partial<Record<...>>>` to align with
|
|
1679
|
+
* runtime reality (missing keys produce `undefined`; the `Partial` makes TypeScript
|
|
1680
|
+
* aware of this, which is a strict type-system tightening).
|
|
1681
|
+
*
|
|
1656
1682
|
* @public
|
|
1657
1683
|
*/
|
|
1658
|
-
declare type ConditionSetDeclAsRecord = Record<
|
|
1684
|
+
declare type ConditionSetDeclAsRecord<TQualifierNames extends string = string> = Readonly<Partial<Record<TQualifierNames, string | IChildConditionDecl>>>;
|
|
1659
1685
|
|
|
1660
1686
|
/**
|
|
1661
1687
|
* Branded string representing a hash value for a condition set. The hash value
|
|
@@ -2214,9 +2240,13 @@ declare namespace Convert_10 {
|
|
|
2214
2240
|
|
|
2215
2241
|
declare namespace Convert_11 {
|
|
2216
2242
|
export {
|
|
2243
|
+
typedConditionDecl,
|
|
2244
|
+
typedValidatedConditionDecl,
|
|
2217
2245
|
conditionDecl,
|
|
2218
2246
|
IConditionDeclConvertContext,
|
|
2219
2247
|
validatedConditionDecl,
|
|
2248
|
+
typedConditionSetDecl_2 as typedConditionSetDecl,
|
|
2249
|
+
typedValidatedConditionSetDecl,
|
|
2220
2250
|
conditionSetDecl_2 as conditionSetDecl,
|
|
2221
2251
|
IConditionSetDeclConvertContext,
|
|
2222
2252
|
validatedConditionSetDecl
|
|
@@ -2295,6 +2325,18 @@ declare namespace Convert_6 {
|
|
|
2295
2325
|
|
|
2296
2326
|
declare namespace Convert_7 {
|
|
2297
2327
|
export {
|
|
2328
|
+
typedLooseConditionDecl,
|
|
2329
|
+
typedConditionSetDecl,
|
|
2330
|
+
typedLooseResourceCandidateDecl,
|
|
2331
|
+
typedImporterResourceCandidateDecl,
|
|
2332
|
+
typedChildResourceCandidateDecl,
|
|
2333
|
+
typedLooseResourceDecl,
|
|
2334
|
+
typedChildResourceDecl,
|
|
2335
|
+
typedContainerContextDecl,
|
|
2336
|
+
typedResourceTreeChildNodeDecl,
|
|
2337
|
+
typedResourceTreeRootDecl,
|
|
2338
|
+
typedResourceCollectionDecl,
|
|
2339
|
+
typedImporterResourceCollectionDecl,
|
|
2298
2340
|
looseConditionDecl,
|
|
2299
2341
|
childConditionDecl,
|
|
2300
2342
|
conditionSetDecl,
|
|
@@ -2450,7 +2492,7 @@ export declare class Decision<TVALUE extends JsonValue = JsonValue> implements I
|
|
|
2450
2492
|
static getAbstractKey(conditionSets: ReadonlyArray<ConditionSet>): DecisionKey;
|
|
2451
2493
|
/**
|
|
2452
2494
|
* Helper function to return a stable key for a set of condition sets.
|
|
2453
|
-
* @param
|
|
2495
|
+
* @param candidates - The candidates whose condition sets are used to create the key.
|
|
2454
2496
|
* @returns A key derived from the condition set hashes.
|
|
2455
2497
|
* @public
|
|
2456
2498
|
*/
|
|
@@ -2771,9 +2813,6 @@ declare class FsItem implements IFsItemProps {
|
|
|
2771
2813
|
* @param props - The {@link Import.IFsItemProps | file system item properties} to use for this item.
|
|
2772
2814
|
* @param qualifiers - The {@link Qualifiers.IReadOnlyQualifierCollector | qualifiers} used to parse
|
|
2773
2815
|
* embedded condition set tokens.
|
|
2774
|
-
* @param tree - file tree implementation to use for this item.
|
|
2775
|
-
* @returns `Success` containing the new {@link Import.FsItem | FsItem} if successful, or a `Failure`
|
|
2776
|
-
* containing an error message if not.
|
|
2777
2816
|
*/
|
|
2778
2817
|
protected constructor(props: IFsItemProps, qualifiers: IReadOnlyQualifierCollector);
|
|
2779
2818
|
/**
|
|
@@ -2791,7 +2830,7 @@ declare class FsItem implements IFsItemProps {
|
|
|
2791
2830
|
* @param importPath - The path to the file system item to import.
|
|
2792
2831
|
* @param qualifiers - The {@link Qualifiers.IReadOnlyQualifierCollector | qualifiers} used to parse
|
|
2793
2832
|
* embedded condition set tokens.
|
|
2794
|
-
* @param
|
|
2833
|
+
* @param tree - An optional {@link FileTree.FileTree | file tree} to use for this item.
|
|
2795
2834
|
* @returns `Success` containing the new {@link Import.FsItem | FsItem} if an item is created
|
|
2796
2835
|
* successfully, or a `Failure` containing an error message if it is not. Note that the result detail
|
|
2797
2836
|
* `skipped` indicates that the item was not created because it is not relevant - this is a soft error
|
|
@@ -2824,6 +2863,14 @@ declare class FsItemImporter implements IImporter {
|
|
|
2824
2863
|
* The {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use for this importer.
|
|
2825
2864
|
*/
|
|
2826
2865
|
readonly qualifiers: IReadOnlyQualifierCollector;
|
|
2866
|
+
/**
|
|
2867
|
+
* Optional converter used to parse raw file contents before they are exposed as JSON importables.
|
|
2868
|
+
*/
|
|
2869
|
+
readonly fileContentConverter?: Converter<JsonValue>;
|
|
2870
|
+
/**
|
|
2871
|
+
* Optional list of file extensions which should be parsed using the file content converter.
|
|
2872
|
+
*/
|
|
2873
|
+
readonly fileContentExtensions?: ReadonlyArray<string>;
|
|
2827
2874
|
/**
|
|
2828
2875
|
* The types of {@link Import.IImportable | importables} that this importer can handle.
|
|
2829
2876
|
*/
|
|
@@ -2840,9 +2887,12 @@ declare class FsItemImporter implements IImporter {
|
|
|
2840
2887
|
*/
|
|
2841
2888
|
static create(params: IFsItemImporterCreateParams): Result<FsItemImporter>;
|
|
2842
2889
|
/**
|
|
2843
|
-
* {@
|
|
2890
|
+
* {@inheritDoc Import.Importers.IImporter.import}
|
|
2844
2891
|
*/
|
|
2845
2892
|
import(item: IImportable, __manager: ResourceManagerBuilder): DetailedResult<IImportable[], ImporterResultDetail>;
|
|
2893
|
+
private _isSupportedFileExtension;
|
|
2894
|
+
private _getJsonContents;
|
|
2895
|
+
private _canConvertFileExtension;
|
|
2846
2896
|
/**
|
|
2847
2897
|
* Gets an {@link Import.FsItem | FsItem} from an {@link Import.IImportable | importable}.
|
|
2848
2898
|
* @param item - The importable to convert.
|
|
@@ -3255,9 +3305,15 @@ declare interface IChildConditionDecl {
|
|
|
3255
3305
|
|
|
3256
3306
|
/**
|
|
3257
3307
|
* Non-validated child declaration of a {@link Resources.ResourceCandidate | resource candidate}.
|
|
3308
|
+
*
|
|
3309
|
+
* @remarks
|
|
3310
|
+
* Parameterized on `TQualifierNames` so the `conditions` field can carry a
|
|
3311
|
+
* narrowed axis-name set. Defaults to `string` so existing untyped callers
|
|
3312
|
+
* compile unchanged.
|
|
3313
|
+
*
|
|
3258
3314
|
* @public
|
|
3259
3315
|
*/
|
|
3260
|
-
declare interface IChildResourceCandidateDecl {
|
|
3316
|
+
declare interface IChildResourceCandidateDecl<TQualifierNames extends string = string> {
|
|
3261
3317
|
/**
|
|
3262
3318
|
* The JSON value of the resource.
|
|
3263
3319
|
*/
|
|
@@ -3265,7 +3321,7 @@ declare interface IChildResourceCandidateDecl {
|
|
|
3265
3321
|
/**
|
|
3266
3322
|
* The conditions that must be met for the resource to be selected.
|
|
3267
3323
|
*/
|
|
3268
|
-
readonly conditions?: ConditionSetDecl
|
|
3324
|
+
readonly conditions?: ConditionSetDecl<TQualifierNames>;
|
|
3269
3325
|
/**
|
|
3270
3326
|
* If true, the resource is only a partial representation of the full resource.
|
|
3271
3327
|
*/
|
|
@@ -3303,9 +3359,15 @@ declare interface IChildResourceCandidateDecl_2 {
|
|
|
3303
3359
|
|
|
3304
3360
|
/**
|
|
3305
3361
|
* Non-validated child declaration of a {@link Resources.Resource | resource}.
|
|
3362
|
+
*
|
|
3363
|
+
* @remarks
|
|
3364
|
+
* Parameterized on `TQualifierNames` so the `candidates` field threads the
|
|
3365
|
+
* narrowed axis-name set down to each candidate. Defaults to `string` for
|
|
3366
|
+
* back-compat.
|
|
3367
|
+
*
|
|
3306
3368
|
* @public
|
|
3307
3369
|
*/
|
|
3308
|
-
declare interface IChildResourceDecl {
|
|
3370
|
+
declare interface IChildResourceDecl<TQualifierNames extends string = string> {
|
|
3309
3371
|
/**
|
|
3310
3372
|
* The name of the type of this resource.
|
|
3311
3373
|
*/
|
|
@@ -3313,7 +3375,7 @@ declare interface IChildResourceDecl {
|
|
|
3313
3375
|
/**
|
|
3314
3376
|
* Possible candidates for this value.
|
|
3315
3377
|
*/
|
|
3316
|
-
readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl
|
|
3378
|
+
readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl<TQualifierNames>>;
|
|
3317
3379
|
}
|
|
3318
3380
|
|
|
3319
3381
|
/**
|
|
@@ -3639,9 +3701,14 @@ declare interface IConditionCollectorCreateParams {
|
|
|
3639
3701
|
|
|
3640
3702
|
/**
|
|
3641
3703
|
* Non-validated declaration of a {@link Conditions.Condition | condition}.
|
|
3704
|
+
*
|
|
3705
|
+
* @remarks
|
|
3706
|
+
* Parameterized on `TQualifierNames` (defaulting to `string`) so consumers
|
|
3707
|
+
* authoring conditions in code can opt into compile-time axis-name discipline.
|
|
3708
|
+
*
|
|
3642
3709
|
* @public
|
|
3643
3710
|
*/
|
|
3644
|
-
declare type IConditionDecl = ResourceJson.Json.ILooseConditionDecl
|
|
3711
|
+
declare type IConditionDecl<TQualifierNames extends string = string> = ResourceJson.Json.ILooseConditionDecl<TQualifierNames>;
|
|
3645
3712
|
|
|
3646
3713
|
/**
|
|
3647
3714
|
* Conversion context to uses when converting
|
|
@@ -3682,10 +3749,15 @@ declare interface IConditionSetCollectorCreateParams {
|
|
|
3682
3749
|
|
|
3683
3750
|
/**
|
|
3684
3751
|
* Non-validated declaration of a {@link Conditions.ConditionSet | set of conditions}.
|
|
3752
|
+
*
|
|
3753
|
+
* @remarks
|
|
3754
|
+
* Parameterized on `TQualifierNames` (defaulting to `string`) so consumers can
|
|
3755
|
+
* opt into compile-time axis-name discipline by supplying a literal-string union.
|
|
3756
|
+
*
|
|
3685
3757
|
* @public
|
|
3686
3758
|
*/
|
|
3687
|
-
declare interface IConditionSetDecl {
|
|
3688
|
-
conditions: IConditionDecl[];
|
|
3759
|
+
declare interface IConditionSetDecl<TQualifierNames extends string = string> {
|
|
3760
|
+
conditions: IConditionDecl<TQualifierNames>[];
|
|
3689
3761
|
}
|
|
3690
3762
|
|
|
3691
3763
|
/**
|
|
@@ -3737,11 +3809,17 @@ declare interface IConfigInitFactory<TConfig, T> {
|
|
|
3737
3809
|
|
|
3738
3810
|
/**
|
|
3739
3811
|
* Declared context for a resource container.
|
|
3812
|
+
*
|
|
3813
|
+
* @remarks
|
|
3814
|
+
* Parameterized on `TQualifierNames` so the `conditions` field threads the
|
|
3815
|
+
* narrowed axis-name set to the container context. Defaults to `string` for
|
|
3816
|
+
* back-compat.
|
|
3817
|
+
*
|
|
3740
3818
|
* @public
|
|
3741
3819
|
*/
|
|
3742
|
-
declare interface IContainerContextDecl {
|
|
3820
|
+
declare interface IContainerContextDecl<TQualifierNames extends string = string> {
|
|
3743
3821
|
readonly baseId?: string;
|
|
3744
|
-
readonly conditions?: ConditionSetDecl
|
|
3822
|
+
readonly conditions?: ConditionSetDecl<TQualifierNames>;
|
|
3745
3823
|
readonly mergeMethod?: ResourceValueMergeMethod;
|
|
3746
3824
|
}
|
|
3747
3825
|
|
|
@@ -4021,6 +4099,8 @@ declare const identifierList: RegExp;
|
|
|
4021
4099
|
*/
|
|
4022
4100
|
declare interface IFsItemImporterCreateParams {
|
|
4023
4101
|
qualifiers: IReadOnlyQualifierCollector;
|
|
4102
|
+
fileContentConverter?: Converter<JsonValue>;
|
|
4103
|
+
fileContentExtensions?: ReadonlyArray<string>;
|
|
4024
4104
|
}
|
|
4025
4105
|
|
|
4026
4106
|
/**
|
|
@@ -4204,14 +4284,27 @@ declare interface IImporterCreateParams {
|
|
|
4204
4284
|
* An optional list of {@link Import.Importers.IImporter | importers} to use for the import.
|
|
4205
4285
|
*/
|
|
4206
4286
|
importers?: IImporter[];
|
|
4287
|
+
/**
|
|
4288
|
+
* An optional converter used to pre-process file contents before JSON import validation.
|
|
4289
|
+
*/
|
|
4290
|
+
fileContentConverter?: Converter<JsonValue>;
|
|
4291
|
+
/**
|
|
4292
|
+
* Optional file extensions which should be parsed using the supplied file content converter.
|
|
4293
|
+
*/
|
|
4294
|
+
fileContentExtensions?: ReadonlyArray<string>;
|
|
4207
4295
|
}
|
|
4208
4296
|
|
|
4209
4297
|
/**
|
|
4210
4298
|
* Non-validated declaration of a resource candidate for import,
|
|
4211
4299
|
* which can be either a loose or child resource candidate.
|
|
4300
|
+
*
|
|
4301
|
+
* @remarks
|
|
4302
|
+
* Parameterized on `TQualifierNames`; inherits via `IChildResourceCandidateDecl`.
|
|
4303
|
+
* Defaults to `string` for back-compat.
|
|
4304
|
+
*
|
|
4212
4305
|
* @public
|
|
4213
4306
|
*/
|
|
4214
|
-
declare interface IImporterResourceCandidateDecl extends IChildResourceCandidateDecl {
|
|
4307
|
+
declare interface IImporterResourceCandidateDecl<TQualifierNames extends string = string> extends IChildResourceCandidateDecl<TQualifierNames> {
|
|
4215
4308
|
/**
|
|
4216
4309
|
* The {@link ResourceId | id} of the resource.
|
|
4217
4310
|
*/
|
|
@@ -4240,13 +4333,19 @@ declare interface IImporterResourceCandidateDecl_2 extends IChildResourceCandida
|
|
|
4240
4333
|
|
|
4241
4334
|
/**
|
|
4242
4335
|
* Non-validated declaration of a collection of resources for an importer.
|
|
4336
|
+
*
|
|
4337
|
+
* @remarks
|
|
4338
|
+
* Parameterized on `TQualifierNames` so the `context`, `candidates`, and
|
|
4339
|
+
* `resources` fields thread the narrowed axis-name set throughout the
|
|
4340
|
+
* importer collection. Defaults to `string` for back-compat.
|
|
4341
|
+
*
|
|
4243
4342
|
* @public
|
|
4244
4343
|
*/
|
|
4245
|
-
declare interface IImporterResourceCollectionDecl {
|
|
4246
|
-
readonly context?: IContainerContextDecl
|
|
4247
|
-
readonly candidates?: ReadonlyArray<IImporterResourceCandidateDecl
|
|
4248
|
-
readonly resources?: ReadonlyArray<IImporterResourceDecl
|
|
4249
|
-
readonly collections?: ReadonlyArray<IImporterResourceCollectionDecl
|
|
4344
|
+
declare interface IImporterResourceCollectionDecl<TQualifierNames extends string = string> {
|
|
4345
|
+
readonly context?: IContainerContextDecl<TQualifierNames>;
|
|
4346
|
+
readonly candidates?: ReadonlyArray<IImporterResourceCandidateDecl<TQualifierNames>>;
|
|
4347
|
+
readonly resources?: ReadonlyArray<IImporterResourceDecl<TQualifierNames>>;
|
|
4348
|
+
readonly collections?: ReadonlyArray<IImporterResourceCollectionDecl<TQualifierNames>>;
|
|
4250
4349
|
readonly metadata?: JsonObject;
|
|
4251
4350
|
}
|
|
4252
4351
|
|
|
@@ -4266,9 +4365,13 @@ declare interface IImporterResourceCollectionDecl_2 {
|
|
|
4266
4365
|
/**
|
|
4267
4366
|
* Non-validated declaration of a resource for import,
|
|
4268
4367
|
* which can be either a loose or child resource.
|
|
4368
|
+
*
|
|
4369
|
+
* @remarks
|
|
4370
|
+
* Parameterized on `TQualifierNames`; defaults to `string` for back-compat.
|
|
4371
|
+
*
|
|
4269
4372
|
* @public
|
|
4270
4373
|
*/
|
|
4271
|
-
declare type IImporterResourceDecl = ILooseResourceDecl | IChildResourceDecl
|
|
4374
|
+
declare type IImporterResourceDecl<TQualifierNames extends string = string> = ILooseResourceDecl<TQualifierNames> | IChildResourceDecl<TQualifierNames>;
|
|
4272
4375
|
|
|
4273
4376
|
/**
|
|
4274
4377
|
* Normalized non-validated declaration of a resource for import,
|
|
@@ -4393,13 +4496,21 @@ declare interface ILiteralValueHierarchyCreateParams<T extends string = string>
|
|
|
4393
4496
|
|
|
4394
4497
|
/**
|
|
4395
4498
|
* Non-validated loose declaration of a {@link Conditions.Condition | condition}.
|
|
4499
|
+
*
|
|
4500
|
+
* @remarks
|
|
4501
|
+
* Parameterized on `TQualifierNames` so consumers authoring conditions
|
|
4502
|
+
* in code can opt into compile-time axis-name discipline (e.g. via a
|
|
4503
|
+
* literal-string union derived from a `qualifiers: ['tone'] as const`
|
|
4504
|
+
* decl-array). Defaults to `string`, so existing untyped callers
|
|
4505
|
+
* compile unchanged.
|
|
4506
|
+
*
|
|
4396
4507
|
* @public
|
|
4397
4508
|
*/
|
|
4398
|
-
declare interface ILooseConditionDecl {
|
|
4509
|
+
declare interface ILooseConditionDecl<TQualifierNames extends string = string> {
|
|
4399
4510
|
/**
|
|
4400
4511
|
* The name of the {@link Qualifiers.Qualifier | qualifier} to be compared.
|
|
4401
4512
|
*/
|
|
4402
|
-
qualifierName:
|
|
4513
|
+
qualifierName: TQualifierNames;
|
|
4403
4514
|
/**
|
|
4404
4515
|
* The value to be compared.
|
|
4405
4516
|
*/
|
|
@@ -4421,9 +4532,14 @@ declare interface ILooseConditionDecl {
|
|
|
4421
4532
|
|
|
4422
4533
|
/**
|
|
4423
4534
|
* Non-validated loose declaration of a {@link Resources.ResourceCandidate | resource candidate}.
|
|
4535
|
+
*
|
|
4536
|
+
* @remarks
|
|
4537
|
+
* Parameterized on `TQualifierNames`; inherits via `IChildResourceCandidateDecl`.
|
|
4538
|
+
* Defaults to `string` for back-compat.
|
|
4539
|
+
*
|
|
4424
4540
|
* @public
|
|
4425
4541
|
*/
|
|
4426
|
-
declare interface ILooseResourceCandidateDecl extends IChildResourceCandidateDecl {
|
|
4542
|
+
declare interface ILooseResourceCandidateDecl<TQualifierNames extends string = string> extends IChildResourceCandidateDecl<TQualifierNames> {
|
|
4427
4543
|
/**
|
|
4428
4544
|
* The {@link ResourceId | id} of the resource.
|
|
4429
4545
|
*/
|
|
@@ -4435,7 +4551,7 @@ declare interface ILooseResourceCandidateDecl extends IChildResourceCandidateDec
|
|
|
4435
4551
|
/**
|
|
4436
4552
|
* The conditions that must be met for the resource to be selected.
|
|
4437
4553
|
*/
|
|
4438
|
-
readonly conditions?: ConditionSetDecl
|
|
4554
|
+
readonly conditions?: ConditionSetDecl<TQualifierNames>;
|
|
4439
4555
|
/**
|
|
4440
4556
|
* If true, the resource is only a partial representation of the full resource.
|
|
4441
4557
|
*/
|
|
@@ -4485,9 +4601,14 @@ declare interface ILooseResourceCandidateDecl_2 extends IChildResourceCandidateD
|
|
|
4485
4601
|
|
|
4486
4602
|
/**
|
|
4487
4603
|
* Non-validated loose declaration of a {@link Resources.Resource | resource}.
|
|
4604
|
+
*
|
|
4605
|
+
* @remarks
|
|
4606
|
+
* Parameterized on `TQualifierNames`; inherits via `IChildResourceDecl`.
|
|
4607
|
+
* Defaults to `string` for back-compat.
|
|
4608
|
+
*
|
|
4488
4609
|
* @public
|
|
4489
4610
|
*/
|
|
4490
|
-
declare interface ILooseResourceDecl extends IChildResourceDecl {
|
|
4611
|
+
declare interface ILooseResourceDecl<TQualifierNames extends string = string> extends IChildResourceDecl<TQualifierNames> {
|
|
4491
4612
|
/**
|
|
4492
4613
|
* The id of the resource.
|
|
4493
4614
|
*/
|
|
@@ -4499,7 +4620,7 @@ declare interface ILooseResourceDecl extends IChildResourceDecl {
|
|
|
4499
4620
|
/**
|
|
4500
4621
|
* Possible candidates for this value.
|
|
4501
4622
|
*/
|
|
4502
|
-
readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl
|
|
4623
|
+
readonly candidates?: ReadonlyArray<IChildResourceCandidateDecl<TQualifierNames>>;
|
|
4503
4624
|
}
|
|
4504
4625
|
|
|
4505
4626
|
/**
|
|
@@ -4556,18 +4677,18 @@ declare type Importable = IImportablePath | IImportableFsItem | IImportableJson
|
|
|
4556
4677
|
*/
|
|
4557
4678
|
declare class ImportContext implements IValidatedImportContext {
|
|
4558
4679
|
/**
|
|
4559
|
-
* {@
|
|
4680
|
+
* {@inheritDoc Import.IImportContext.baseId}
|
|
4560
4681
|
*/
|
|
4561
4682
|
readonly baseId: ResourceId | undefined;
|
|
4562
4683
|
/**
|
|
4563
|
-
* {@
|
|
4684
|
+
* {@inheritDoc Import.IImportContext.conditions}
|
|
4564
4685
|
*/
|
|
4565
4686
|
readonly conditions: ReadonlyArray<IConditionDecl>;
|
|
4566
4687
|
/**
|
|
4567
4688
|
* Protected {@link Import.ImportContext | import context} for derived classes.
|
|
4568
4689
|
* Public consumers use {@link Import.ImportContext.create | create} to create new instances.
|
|
4569
|
-
* @param
|
|
4570
|
-
*
|
|
4690
|
+
* @param params - The {@link Import.IImportContext | import context} parameters including
|
|
4691
|
+
* the base ID and conditions to be applied to resources imported in this context.
|
|
4571
4692
|
*/
|
|
4572
4693
|
protected constructor({ baseId, conditions }: IImportContext);
|
|
4573
4694
|
/**
|
|
@@ -4587,7 +4708,7 @@ declare class ImportContext implements IValidatedImportContext {
|
|
|
4587
4708
|
withConditions(conditions: IConditionDecl[]): Result<ImportContext>;
|
|
4588
4709
|
/**
|
|
4589
4710
|
* Appends names to the base ID of the import context.
|
|
4590
|
-
* @param
|
|
4711
|
+
* @param names - The name segments to append to the base ID.
|
|
4591
4712
|
* @returns `Success` with a new {@link Import.ImportContext | import context} containing the new base ID
|
|
4592
4713
|
* if successful, or `Failure` with an error message if the operation fails.
|
|
4593
4714
|
*/
|
|
@@ -4717,9 +4838,13 @@ declare class ImportManager {
|
|
|
4717
4838
|
* and optional `FileTree`.
|
|
4718
4839
|
* @param qualifiers - The {@link Qualifiers.IReadOnlyQualifierCollector | qualifiers} to use for the import.
|
|
4719
4840
|
* @param tree - An optional `FileTree` for importing path items.
|
|
4841
|
+
* @param fileContentConverter - An optional converter used to pre-process raw file contents before JSON import
|
|
4842
|
+
* validation.
|
|
4843
|
+
* @param fileContentExtensions - Optional file extensions which should be parsed using the supplied file
|
|
4844
|
+
* content converter.
|
|
4720
4845
|
* @returns A read-only array of {@link Import.Importers.IImporter | importers}.
|
|
4721
4846
|
*/
|
|
4722
|
-
static getDefaultImporters(qualifiers: IReadOnlyQualifierCollector, tree?: FileTree.FileTree): ReadonlyArray<IImporter>;
|
|
4847
|
+
static getDefaultImporters(qualifiers: IReadOnlyQualifierCollector, tree?: FileTree.FileTree, fileContentConverter?: Converter<JsonValue>, fileContentExtensions?: ReadonlyArray<string>): ReadonlyArray<IImporter>;
|
|
4723
4848
|
/**
|
|
4724
4849
|
* Imports any items on the import stack.
|
|
4725
4850
|
* @returns `Success` with the {@link Import.ImportManager | ImportManager} if successful,
|
|
@@ -4809,18 +4934,49 @@ declare interface IPathImporterCreateParams {
|
|
|
4809
4934
|
/**
|
|
4810
4935
|
* Parameters for creating a new {@link Qualifiers.QualifierCollector}.
|
|
4811
4936
|
* @public
|
|
4937
|
+
*
|
|
4938
|
+
* @remarks
|
|
4939
|
+
* `qualifiers` accepts a mixed array of bare axis-name strings and full
|
|
4940
|
+
* {@link Qualifiers.IQualifierDecl | declarations}. A string element is
|
|
4941
|
+
* sugar for "literal qualifier with this name"; the library synthesizes a
|
|
4942
|
+
* {@link QualifierTypes.LiteralQualifierType | LiteralQualifierType} and a
|
|
4943
|
+
* declaration `{ name, typeName: name, defaultPriority: <descending> }`.
|
|
4944
|
+
*
|
|
4945
|
+
* Synthesized priorities are distributed across the
|
|
4946
|
+
* `[MinConditionPriority..MaxConditionPriority]` range adaptively to the
|
|
4947
|
+
* array length: `step = max(1, floor((Max - Min) / length))`,
|
|
4948
|
+
* `priority = max(Min, Max - index * step)`. Earlier elements get higher
|
|
4949
|
+
* priority. The formula never overflows the `ConditionPriority` range
|
|
4950
|
+
* regardless of input length; for inputs whose length exceeds the range
|
|
4951
|
+
* cardinality (\>1000 axes), trailing priorities collapse at
|
|
4952
|
+
* `MinConditionPriority` — supply explicit priorities in that regime
|
|
4953
|
+
* if uniqueness matters.
|
|
4954
|
+
*
|
|
4955
|
+
* `qualifierTypes` may be omitted only when every element of `qualifiers`
|
|
4956
|
+
* is a string. If any element is an {@link Qualifiers.IQualifierDecl},
|
|
4957
|
+
* `qualifierTypes` must be supplied and must contain the referenced
|
|
4958
|
+
* {@link Qualifiers.IQualifierDecl.typeName | typeNames}.
|
|
4812
4959
|
*/
|
|
4813
4960
|
declare interface IQualifierCollectorCreateParams {
|
|
4814
4961
|
/**
|
|
4815
4962
|
* The {@link QualifierTypes.QualifierTypeCollector | qualifier types} used to
|
|
4816
4963
|
* create {@link Qualifiers.Qualifier | qualifiers} from {@link Qualifiers.IQualifierDecl | declarations}.
|
|
4964
|
+
*
|
|
4965
|
+
* Optional only when every entry in `qualifiers` is a bare axis-name string
|
|
4966
|
+
* (in which case the library synthesizes a literal qualifier type per name).
|
|
4817
4967
|
*/
|
|
4818
|
-
qualifierTypes
|
|
4968
|
+
qualifierTypes?: ReadOnlyQualifierTypeCollector;
|
|
4819
4969
|
/**
|
|
4820
|
-
* Optional list of {@link Qualifiers.IQualifierDecl | declarations}
|
|
4821
|
-
*
|
|
4970
|
+
* Optional list of {@link Qualifiers.IQualifierDecl | declarations} or bare
|
|
4971
|
+
* axis-name strings for the qualifiers to add to the collection on creation.
|
|
4972
|
+
*
|
|
4973
|
+
* @remarks
|
|
4974
|
+
* A string element `'foo'` is sugar for a literal qualifier:
|
|
4975
|
+
* `{ name: 'foo', typeName: 'foo', defaultPriority: <descending> }` backed by
|
|
4976
|
+
* a synthesized {@link QualifierTypes.LiteralQualifierType | LiteralQualifierType}
|
|
4977
|
+
* named `'foo'`.
|
|
4822
4978
|
*/
|
|
4823
|
-
qualifiers?: IQualifierDecl
|
|
4979
|
+
qualifiers?: ReadonlyArray<string | IQualifierDecl>;
|
|
4824
4980
|
}
|
|
4825
4981
|
|
|
4826
4982
|
/**
|
|
@@ -5059,7 +5215,7 @@ declare interface IReadOnlyContextQualifierProviderValidatorCreateParams<T exten
|
|
|
5059
5215
|
*/
|
|
5060
5216
|
declare interface IReadOnlyQualifierCollector extends Collections.IReadOnlyValidatingCollector<Qualifier> {
|
|
5061
5217
|
/**
|
|
5062
|
-
* {@
|
|
5218
|
+
* {@inheritDoc Qualifiers.QualifierCollector.qualifierTypes}
|
|
5063
5219
|
*/
|
|
5064
5220
|
readonly qualifierTypes: ReadOnlyQualifierTypeCollector;
|
|
5065
5221
|
/**
|
|
@@ -5273,7 +5429,7 @@ declare interface IResourceCandidateCreateParams {
|
|
|
5273
5429
|
*/
|
|
5274
5430
|
declare interface IResourceCandidateValidationProperties {
|
|
5275
5431
|
/**
|
|
5276
|
-
* {@
|
|
5432
|
+
* {@inheritDoc ResourceJson.Json.ILooseResourceCandidateDecl.id}
|
|
5277
5433
|
* @public
|
|
5278
5434
|
*/
|
|
5279
5435
|
id: ResourceId;
|
|
@@ -5283,12 +5439,12 @@ declare interface IResourceCandidateValidationProperties {
|
|
|
5283
5439
|
*/
|
|
5284
5440
|
completeness: CandidateCompleteness;
|
|
5285
5441
|
/**
|
|
5286
|
-
* {@
|
|
5442
|
+
* {@inheritDoc ResourceJson.Json.ILooseResourceCandidateDecl.json}
|
|
5287
5443
|
* @public
|
|
5288
5444
|
*/
|
|
5289
5445
|
json: JsonValue;
|
|
5290
5446
|
/**
|
|
5291
|
-
* {@
|
|
5447
|
+
* {@inheritDoc ResourceJson.Json.ILooseResourceCandidateDecl.mergeMethod}
|
|
5292
5448
|
* @public
|
|
5293
5449
|
*/
|
|
5294
5450
|
mergeMethod: ResourceValueMergeMethod;
|
|
@@ -5296,13 +5452,19 @@ declare interface IResourceCandidateValidationProperties {
|
|
|
5296
5452
|
|
|
5297
5453
|
/**
|
|
5298
5454
|
* Non-validated declaration of a collection of resources.
|
|
5455
|
+
*
|
|
5456
|
+
* @remarks
|
|
5457
|
+
* Parameterized on `TQualifierNames` so the `context`, `candidates`, and
|
|
5458
|
+
* `resources` fields thread the narrowed axis-name set throughout the
|
|
5459
|
+
* collection. Defaults to `string` for back-compat.
|
|
5460
|
+
*
|
|
5299
5461
|
* @public
|
|
5300
5462
|
*/
|
|
5301
|
-
declare interface IResourceCollectionDecl {
|
|
5302
|
-
readonly context?: IContainerContextDecl
|
|
5303
|
-
readonly candidates?: ReadonlyArray<ILooseResourceCandidateDecl
|
|
5304
|
-
readonly resources?: ReadonlyArray<ILooseResourceDecl
|
|
5305
|
-
readonly collections?: ReadonlyArray<IResourceCollectionDecl
|
|
5463
|
+
declare interface IResourceCollectionDecl<TQualifierNames extends string = string> {
|
|
5464
|
+
readonly context?: IContainerContextDecl<TQualifierNames>;
|
|
5465
|
+
readonly candidates?: ReadonlyArray<ILooseResourceCandidateDecl<TQualifierNames>>;
|
|
5466
|
+
readonly resources?: ReadonlyArray<ILooseResourceDecl<TQualifierNames>>;
|
|
5467
|
+
readonly collections?: ReadonlyArray<IResourceCollectionDecl<TQualifierNames>>;
|
|
5306
5468
|
readonly metadata?: JsonObject;
|
|
5307
5469
|
}
|
|
5308
5470
|
|
|
@@ -5626,11 +5788,17 @@ declare interface IResourceTreeBranchInit<T> {
|
|
|
5626
5788
|
|
|
5627
5789
|
/**
|
|
5628
5790
|
* Normalized non-validated declaration of a {@link Resources.Resource | resource} tree node.
|
|
5791
|
+
*
|
|
5792
|
+
* @remarks
|
|
5793
|
+
* Parameterized on `TQualifierNames` so the `resources` and `children` fields
|
|
5794
|
+
* thread the narrowed axis-name set throughout the tree. Defaults to `string` for
|
|
5795
|
+
* back-compat.
|
|
5796
|
+
*
|
|
5629
5797
|
* @public
|
|
5630
5798
|
*/
|
|
5631
|
-
declare interface IResourceTreeChildNodeDecl {
|
|
5632
|
-
readonly resources?: Record<string, IChildResourceDecl
|
|
5633
|
-
readonly children?: Record<string, IResourceTreeChildNodeDecl
|
|
5799
|
+
declare interface IResourceTreeChildNodeDecl<TQualifierNames extends string = string> {
|
|
5800
|
+
readonly resources?: Record<string, IChildResourceDecl<TQualifierNames>>;
|
|
5801
|
+
readonly children?: Record<string, IResourceTreeChildNodeDecl<TQualifierNames>>;
|
|
5634
5802
|
}
|
|
5635
5803
|
|
|
5636
5804
|
/**
|
|
@@ -5652,12 +5820,18 @@ declare interface IResourceTreeLeafInit<T> {
|
|
|
5652
5820
|
|
|
5653
5821
|
/**
|
|
5654
5822
|
* Normalized non-validated declaration of a {@link Resources.Resource | resource} tree root.
|
|
5823
|
+
*
|
|
5824
|
+
* @remarks
|
|
5825
|
+
* Parameterized on `TQualifierNames` so the `context` field threads the
|
|
5826
|
+
* narrowed axis-name set to the tree root context. Defaults to `string` for
|
|
5827
|
+
* back-compat.
|
|
5828
|
+
*
|
|
5655
5829
|
* @public
|
|
5656
5830
|
*/
|
|
5657
|
-
declare interface IResourceTreeRootDecl extends IResourceTreeChildNodeDecl {
|
|
5658
|
-
readonly context?: IContainerContextDecl
|
|
5659
|
-
readonly resources?: Record<string, IChildResourceDecl
|
|
5660
|
-
readonly children?: Record<string, IResourceTreeChildNodeDecl
|
|
5831
|
+
declare interface IResourceTreeRootDecl<TQualifierNames extends string = string> extends IResourceTreeChildNodeDecl<TQualifierNames> {
|
|
5832
|
+
readonly context?: IContainerContextDecl<TQualifierNames>;
|
|
5833
|
+
readonly resources?: Record<string, IChildResourceDecl<TQualifierNames>>;
|
|
5834
|
+
readonly children?: Record<string, IResourceTreeChildNodeDecl<TQualifierNames>>;
|
|
5661
5835
|
readonly metadata?: JsonObject;
|
|
5662
5836
|
}
|
|
5663
5837
|
|
|
@@ -5769,8 +5943,15 @@ declare interface ISimpleContextQualifierProviderCreateParams {
|
|
|
5769
5943
|
qualifiers: IReadOnlyQualifierCollector;
|
|
5770
5944
|
/**
|
|
5771
5945
|
* Optional record of initial qualifier name-value pairs to populate the provider.
|
|
5946
|
+
*
|
|
5947
|
+
* @remarks
|
|
5948
|
+
* Typed as `Readonly<Partial<Record<string, QualifierContextValue>>>` so a
|
|
5949
|
+
* caller can naturally express conditional context construction, e.g.
|
|
5950
|
+
* `tone === 'formal' ? { tone: 'formal' } : {}`. Entries whose value is
|
|
5951
|
+
* `undefined` are skipped on load - semantically equivalent to omitting
|
|
5952
|
+
* the key, which is how the candidate selector treats a missing key.
|
|
5772
5953
|
*/
|
|
5773
|
-
qualifierValues?: Record<string, QualifierContextValue
|
|
5954
|
+
qualifierValues?: Readonly<Partial<Record<string, QualifierContextValue>>>;
|
|
5774
5955
|
}
|
|
5775
5956
|
|
|
5776
5957
|
/**
|
|
@@ -5786,13 +5967,13 @@ declare function isImportable(i: IImportable): i is Importable;
|
|
|
5786
5967
|
* Type guard function to check if a resource candidate declaration is a loose resource candidate declaration.
|
|
5787
5968
|
* @public
|
|
5788
5969
|
*/
|
|
5789
|
-
declare function isLooseResourceCandidateDecl(decl: IImporterResourceCandidateDecl): decl is ILooseResourceCandidateDecl
|
|
5970
|
+
declare function isLooseResourceCandidateDecl<TQualifierNames extends string = string>(decl: IImporterResourceCandidateDecl<TQualifierNames>): decl is ILooseResourceCandidateDecl<TQualifierNames>;
|
|
5790
5971
|
|
|
5791
5972
|
/**
|
|
5792
5973
|
* Type guard function to check if a resource declaration is a loose resource declaration.
|
|
5793
5974
|
* @public
|
|
5794
5975
|
*/
|
|
5795
|
-
declare function isLooseResourceDecl(decl: IImporterResourceDecl): decl is ILooseResourceDecl
|
|
5976
|
+
declare function isLooseResourceDecl<TQualifierNames extends string = string>(decl: IImporterResourceDecl<TQualifierNames>): decl is ILooseResourceDecl<TQualifierNames>;
|
|
5796
5977
|
|
|
5797
5978
|
/**
|
|
5798
5979
|
* Type guard to determine if an init object represents a leaf node with a resource.
|
|
@@ -6155,15 +6336,15 @@ declare interface ITerritoryQualifierTypeConfig {
|
|
|
6155
6336
|
*/
|
|
6156
6337
|
declare interface ITerritoryQualifierTypeCreateParams {
|
|
6157
6338
|
/**
|
|
6158
|
-
* {@
|
|
6339
|
+
* {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.name}
|
|
6159
6340
|
*/
|
|
6160
6341
|
name?: string;
|
|
6161
6342
|
/**
|
|
6162
|
-
* {@
|
|
6343
|
+
* {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.allowContextList}
|
|
6163
6344
|
*/
|
|
6164
6345
|
allowContextList?: boolean;
|
|
6165
6346
|
/**
|
|
6166
|
-
* {@
|
|
6347
|
+
* {@inheritDoc QualifierTypes.IQualifierTypeCreateParams.index}
|
|
6167
6348
|
*/
|
|
6168
6349
|
index?: number;
|
|
6169
6350
|
/**
|
|
@@ -6303,8 +6484,15 @@ declare interface IValidatingSimpleContextQualifierProviderCreateParams {
|
|
|
6303
6484
|
/**
|
|
6304
6485
|
* Optional record of initial qualifier name-value pairs to populate the provider.
|
|
6305
6486
|
* Accepts string keys and values which will be converted to strongly-typed values.
|
|
6487
|
+
*
|
|
6488
|
+
* @remarks
|
|
6489
|
+
* Typed as `Readonly<Partial<Record<string, string>>>` so callers can
|
|
6490
|
+
* naturally express conditional context construction, e.g.
|
|
6491
|
+
* `tone === 'formal' ? { tone: 'formal' } : {}`. Entries whose value is
|
|
6492
|
+
* `undefined` are skipped on load - semantically equivalent to omitting
|
|
6493
|
+
* the key.
|
|
6306
6494
|
*/
|
|
6307
|
-
qualifierValues?: Record<string, string
|
|
6495
|
+
qualifierValues?: Readonly<Partial<Record<string, string>>>;
|
|
6308
6496
|
}
|
|
6309
6497
|
|
|
6310
6498
|
/**
|
|
@@ -6416,8 +6604,7 @@ declare interface IZipArchiveResult {
|
|
|
6416
6604
|
* Joins a list of {@link ResourceId | resource ID} or {@link ResourceName | resource name} with
|
|
6417
6605
|
* to create a new {@link ResourceId | resource ID}. Returns `undefined` if no names are defined.
|
|
6418
6606
|
*
|
|
6419
|
-
* @param
|
|
6420
|
-
* @param names - Additional names to join.
|
|
6607
|
+
* @param ids - The names or IDs to join.
|
|
6421
6608
|
* @returns `Success` with the new ID if the base and names are valid, `Success` with `undefined`
|
|
6422
6609
|
* if names were present, or `Failure` with an error message if the resulting id is invalid.
|
|
6423
6610
|
* @public
|
|
@@ -6428,8 +6615,7 @@ declare function joinOptionalResourceIds(...ids: (string | undefined)[]): Result
|
|
|
6428
6615
|
* Joins a list of {@link ResourceId | resource ID} or {@link ResourceName | resource name} with
|
|
6429
6616
|
* to create a new {@link ResourceId | resource ID}. Fails if resulting ID is invalid or empty.
|
|
6430
6617
|
*
|
|
6431
|
-
* @param
|
|
6432
|
-
* @param names - Additional names to join.
|
|
6618
|
+
* @param ids - The names or IDs to join.
|
|
6433
6619
|
* @returns `Success` with the new ID if the base and names are valid, or `Failure` with an error message
|
|
6434
6620
|
* if not.
|
|
6435
6621
|
* @public
|
|
@@ -6475,7 +6661,7 @@ declare namespace Json_2 {
|
|
|
6475
6661
|
*/
|
|
6476
6662
|
declare class JsonImporter implements IImporter {
|
|
6477
6663
|
/**
|
|
6478
|
-
* {@
|
|
6664
|
+
* {@inheritDoc Import.Importers.IImporter.types}
|
|
6479
6665
|
*/
|
|
6480
6666
|
readonly types: ReadonlyArray<string>;
|
|
6481
6667
|
/**
|
|
@@ -6489,7 +6675,7 @@ declare class JsonImporter implements IImporter {
|
|
|
6489
6675
|
*/
|
|
6490
6676
|
static create(): Result<JsonImporter>;
|
|
6491
6677
|
/**
|
|
6492
|
-
* {@
|
|
6678
|
+
* {@inheritDoc Import.Importers.IImporter.import}
|
|
6493
6679
|
*/
|
|
6494
6680
|
import(item: IImportable, manager: ResourceManagerBuilder): DetailedResult<IImportable[], ImporterResultDetail>;
|
|
6495
6681
|
private _tryImportResourceCollection;
|
|
@@ -6509,7 +6695,7 @@ declare const jsonQualifierTypeConfig: Converter<Model_2.IQualifierTypeConfig<Js
|
|
|
6509
6695
|
*/
|
|
6510
6696
|
declare class JsonResourceType extends ResourceType<JsonObject> {
|
|
6511
6697
|
/**
|
|
6512
|
-
* {@
|
|
6698
|
+
* {@inheritDoc ResourceTypes.ResourceType.systemTypeName}
|
|
6513
6699
|
*/
|
|
6514
6700
|
readonly systemTypeName: ResourceTypeName;
|
|
6515
6701
|
/**
|
|
@@ -6527,19 +6713,31 @@ declare class JsonResourceType extends ResourceType<JsonObject> {
|
|
|
6527
6713
|
*/
|
|
6528
6714
|
static create(params?: IJsonResourceTypeCreateParams): Result<JsonResourceType>;
|
|
6529
6715
|
/**
|
|
6530
|
-
* {@
|
|
6716
|
+
* {@inheritDoc ResourceTypes.ResourceType.validateDeclaration}
|
|
6531
6717
|
*/
|
|
6532
6718
|
validateDeclaration(props: IResourceCandidateValidationProperties): Result<JsonObject>;
|
|
6533
6719
|
/**
|
|
6534
|
-
*
|
|
6720
|
+
* Validates a JSON value for use as a resource instance value.
|
|
6721
|
+
* @param json - The JSON value to validate.
|
|
6722
|
+
* @param completeness - Describes {@link CandidateCompleteness | how complete} the candidate value is.
|
|
6723
|
+
* @returns `Success` with the strongly-typed resource value if the JSON is valid,
|
|
6724
|
+
* `Failure` with an error message otherwise.
|
|
6535
6725
|
*/
|
|
6536
6726
|
validate(json: JsonObject, completeness: CandidateCompleteness): Result<JsonObject>;
|
|
6537
6727
|
/**
|
|
6538
|
-
*
|
|
6728
|
+
* Validates a JSON value for use as a complete resource instance value.
|
|
6729
|
+
* @param json - The JSON value to validate.
|
|
6730
|
+
* @param completeness - Must be `'full'` to indicate a complete value.
|
|
6731
|
+
* @returns `Success` with the strongly-typed resource value if the JSON is valid,
|
|
6732
|
+
* `Failure` with an error message otherwise.
|
|
6539
6733
|
*/
|
|
6540
6734
|
validate(json: JsonObject, completeness: 'full'): Result<JsonObject>;
|
|
6541
6735
|
/**
|
|
6542
|
-
*
|
|
6736
|
+
* Validates a JSON value for use as a partial resource instance value.
|
|
6737
|
+
* @param json - The JSON value to validate.
|
|
6738
|
+
* @param completeness - Must be `'partial'` to indicate a partial value.
|
|
6739
|
+
* @returns `Success` with the strongly-typed partial resource value if the JSON is valid,
|
|
6740
|
+
* `Failure` with an error message otherwise.
|
|
6543
6741
|
*/
|
|
6544
6742
|
validate(json: JsonObject, completeness: 'partial'): Result<JsonObject>;
|
|
6545
6743
|
}
|
|
@@ -6570,14 +6768,13 @@ declare const LanguagePrioritySystemConfiguration: ISystemConfiguration;
|
|
|
6570
6768
|
*/
|
|
6571
6769
|
declare class LanguageQualifierType extends QualifierType<JsonCompatibleType<Config_2.ILanguageQualifierTypeConfig>> {
|
|
6572
6770
|
/**
|
|
6573
|
-
* {@
|
|
6771
|
+
* {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}
|
|
6574
6772
|
*/
|
|
6575
6773
|
readonly systemTypeName: QualifierTypeName;
|
|
6576
6774
|
/**
|
|
6577
6775
|
* Creates a new instance of a {@link QualifierTypes.LanguageQualifierType | language qualifier type}.
|
|
6578
|
-
* @param
|
|
6579
|
-
*
|
|
6580
|
-
* list of values. Defaults to `true`.
|
|
6776
|
+
* @param params - The {@link QualifierTypes.ILanguageQualifierTypeCreateParams | create parameters}
|
|
6777
|
+
* for this qualifier type.
|
|
6581
6778
|
* @public
|
|
6582
6779
|
*/
|
|
6583
6780
|
protected constructor({ name, allowContextList, index }: ILanguageQualifierTypeCreateParams);
|
|
@@ -6599,7 +6796,7 @@ declare class LanguageQualifierType extends QualifierType<JsonCompatibleType<Con
|
|
|
6599
6796
|
*/
|
|
6600
6797
|
static createFromConfig(config: Config_2.IQualifierTypeConfig<Config_2.ILanguageQualifierTypeConfig>): Result<LanguageQualifierType>;
|
|
6601
6798
|
/**
|
|
6602
|
-
* {@
|
|
6799
|
+
* {@inheritDoc QualifierTypes.IQualifierType.isValidConditionValue}
|
|
6603
6800
|
*/
|
|
6604
6801
|
isValidConditionValue(value: string): value is QualifierConditionValue;
|
|
6605
6802
|
/**
|
|
@@ -6609,11 +6806,11 @@ declare class LanguageQualifierType extends QualifierType<JsonCompatibleType<Con
|
|
|
6609
6806
|
*/
|
|
6610
6807
|
getConfiguration(): Result<Config_2.ISystemLanguageQualifierTypeConfig>;
|
|
6611
6808
|
/**
|
|
6612
|
-
* {@
|
|
6809
|
+
* {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}
|
|
6613
6810
|
*/
|
|
6614
6811
|
getConfigurationJson(): Result<JsonCompatibleType<Config_2.ISystemLanguageQualifierTypeConfig>>;
|
|
6615
6812
|
/**
|
|
6616
|
-
* {@
|
|
6813
|
+
* {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}
|
|
6617
6814
|
*/
|
|
6618
6815
|
validateConfigurationJson(from: unknown): Result<JsonCompatibleType<Config_2.ISystemLanguageQualifierTypeConfig>>;
|
|
6619
6816
|
/**
|
|
@@ -6648,7 +6845,7 @@ declare const languageQualifierTypeConfig: ObjectConverter<Model_2.ILanguageQual
|
|
|
6648
6845
|
*/
|
|
6649
6846
|
declare class LiteralQualifierType extends QualifierType<JsonCompatibleType<Config_2.ILiteralQualifierTypeConfig>> {
|
|
6650
6847
|
/**
|
|
6651
|
-
* {@
|
|
6848
|
+
* {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}
|
|
6652
6849
|
*/
|
|
6653
6850
|
readonly systemTypeName: QualifierTypeName;
|
|
6654
6851
|
/**
|
|
@@ -6666,11 +6863,8 @@ declare class LiteralQualifierType extends QualifierType<JsonCompatibleType<Conf
|
|
|
6666
6863
|
readonly hierarchy?: LiteralValueHierarchy<string>;
|
|
6667
6864
|
/**
|
|
6668
6865
|
* Constructs a new {@link QualifierTypes.LiteralQualifierType | LiteralQualifierType}.
|
|
6669
|
-
* @param
|
|
6670
|
-
*
|
|
6671
|
-
* case-sensitive. Defaults to `false`.
|
|
6672
|
-
* @param allowContextList - Optional flag indicating whether the context can be a
|
|
6673
|
-
* list of values. Defaults to `false`.
|
|
6866
|
+
* @param params - The {@link QualifierTypes.ILiteralQualifierTypeCreateParams | create parameters}
|
|
6867
|
+
* for this qualifier type.
|
|
6674
6868
|
* @public
|
|
6675
6869
|
*/
|
|
6676
6870
|
protected constructor({ name, caseSensitive, allowContextList, enumeratedValues, hierarchy, index }: ILiteralQualifierTypeCreateParams);
|
|
@@ -6683,7 +6877,7 @@ declare class LiteralQualifierType extends QualifierType<JsonCompatibleType<Conf
|
|
|
6683
6877
|
*/
|
|
6684
6878
|
isValidConditionValue(value: string): value is QualifierConditionValue;
|
|
6685
6879
|
/**
|
|
6686
|
-
* {@
|
|
6880
|
+
* {@inheritDoc QualifierTypes.IQualifierType.isPotentialMatch}
|
|
6687
6881
|
*/
|
|
6688
6882
|
isPotentialMatch(conditionValue: string, contextValue: string): boolean;
|
|
6689
6883
|
/**
|
|
@@ -6693,11 +6887,11 @@ declare class LiteralQualifierType extends QualifierType<JsonCompatibleType<Conf
|
|
|
6693
6887
|
*/
|
|
6694
6888
|
getConfiguration(): Result<Config_2.ISystemLiteralQualifierTypeConfig>;
|
|
6695
6889
|
/**
|
|
6696
|
-
* {@
|
|
6890
|
+
* {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}
|
|
6697
6891
|
*/
|
|
6698
6892
|
getConfigurationJson(): Result<JsonCompatibleType<Config_2.ISystemLiteralQualifierTypeConfig>>;
|
|
6699
6893
|
/**
|
|
6700
|
-
* {@
|
|
6894
|
+
* {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}
|
|
6701
6895
|
*/
|
|
6702
6896
|
validateConfigurationJson(from: unknown): Result<JsonCompatibleType<Config_2.ISystemLiteralQualifierTypeConfig>>;
|
|
6703
6897
|
/**
|
|
@@ -6708,7 +6902,7 @@ declare class LiteralQualifierType extends QualifierType<JsonCompatibleType<Conf
|
|
|
6708
6902
|
*/
|
|
6709
6903
|
validateConfiguration(from: unknown): Result<Config_2.ISystemLiteralQualifierTypeConfig>;
|
|
6710
6904
|
/**
|
|
6711
|
-
* {@
|
|
6905
|
+
* {@inheritDoc QualifierTypes.QualifierType._matchOne}
|
|
6712
6906
|
*/
|
|
6713
6907
|
protected _matchOne(condition: QualifierConditionValue, context: QualifierContextValue, __operator: ConditionOperator): QualifierMatchScore;
|
|
6714
6908
|
/**
|
|
@@ -7259,7 +7453,7 @@ declare class PathImporter implements IImporter {
|
|
|
7259
7453
|
*/
|
|
7260
7454
|
static create(params: IPathImporterCreateParams): Result<PathImporter>;
|
|
7261
7455
|
/**
|
|
7262
|
-
* {@
|
|
7456
|
+
* {@inheritDoc Import.Importers.IImporter.import}
|
|
7263
7457
|
*/
|
|
7264
7458
|
import(item: IImportable, __manager: ResourceManagerBuilder): DetailedResult<IImportable[], ImporterResultDetail>;
|
|
7265
7459
|
/**
|
|
@@ -7333,9 +7527,8 @@ export declare class Qualifier implements IValidatedQualifierDecl, ICollectible<
|
|
|
7333
7527
|
/**
|
|
7334
7528
|
* Constructs a new instance of a {@link Qualifiers.Qualifier | Qualifier} from the
|
|
7335
7529
|
* supplied {@link Qualifiers.IValidatedQualifierDecl | validated declaration}.
|
|
7336
|
-
* @param
|
|
7337
|
-
*
|
|
7338
|
-
* @param defaultPriority - The default {@link ConditionPriority | priority} of conditions
|
|
7530
|
+
* @param decl - The {@link Qualifiers.IValidatedQualifierDecl | validated declaration}
|
|
7531
|
+
* describing the qualifier to construct.
|
|
7339
7532
|
* @public
|
|
7340
7533
|
*/
|
|
7341
7534
|
protected constructor({ name, token, type, defaultPriority, tokenIsOptional, defaultValue, index }: IValidatedQualifierDecl);
|
|
@@ -7356,19 +7549,19 @@ export declare class Qualifier implements IValidatedQualifierDecl, ICollectible<
|
|
|
7356
7549
|
*/
|
|
7357
7550
|
setIndex(index: QualifierIndex): Result<QualifierIndex>;
|
|
7358
7551
|
/**
|
|
7359
|
-
* {@
|
|
7552
|
+
* {@inheritDoc QualifierTypes.QualifierType.isValidContextValue}
|
|
7360
7553
|
*/
|
|
7361
7554
|
isValidContextValue(value: string): value is QualifierContextValue;
|
|
7362
7555
|
/**
|
|
7363
|
-
* {@
|
|
7556
|
+
* {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}
|
|
7364
7557
|
*/
|
|
7365
7558
|
isValidConditionValue(value: string): value is QualifierConditionValue;
|
|
7366
7559
|
/**
|
|
7367
|
-
* {@
|
|
7560
|
+
* {@inheritDoc QualifierTypes.QualifierType.validateCondition}
|
|
7368
7561
|
*/
|
|
7369
7562
|
validateCondition(value: string, operator?: ConditionOperator): Result<QualifierConditionValue>;
|
|
7370
7563
|
/**
|
|
7371
|
-
* {@
|
|
7564
|
+
* {@inheritDoc QualifierTypes.QualifierType.validateContextValue}
|
|
7372
7565
|
*/
|
|
7373
7566
|
validateContextValue(value: string): Result<QualifierContextValue>;
|
|
7374
7567
|
}
|
|
@@ -7393,22 +7586,89 @@ declare class QualifierCollector extends ValidatingConvertingCollector<Qualifier
|
|
|
7393
7586
|
qualifierTypes: ReadOnlyQualifierTypeCollector;
|
|
7394
7587
|
/**
|
|
7395
7588
|
* Constructor for a {@link Qualifiers.QualifierCollector | QualifierCollector} object.
|
|
7396
|
-
* @param
|
|
7589
|
+
* @param qualifierTypes - The {@link QualifierTypes.ReadOnlyQualifierTypeCollector | qualifier types}
|
|
7590
|
+
* used to validate declarations.
|
|
7591
|
+
* @param qualifiers - Optional list of fully-resolved {@link Qualifiers.IQualifierDecl | declarations}.
|
|
7397
7592
|
* @public
|
|
7398
7593
|
*/
|
|
7399
|
-
protected constructor(
|
|
7594
|
+
protected constructor(qualifierTypes: ReadOnlyQualifierTypeCollector, qualifiers?: ReadonlyArray<IQualifierDecl>);
|
|
7400
7595
|
/**
|
|
7401
7596
|
* Creates a new {@link Qualifiers.QualifierCollector | QualifierCollector} object.
|
|
7402
7597
|
* @param params - {@link Qualifiers.IQualifierCollectorCreateParams | Parameters} for creating a new {@link Qualifiers.QualifierCollector | QualifierCollector}.
|
|
7403
7598
|
* @returns `Success` with the new collector if successful, or `Failure` if not.
|
|
7599
|
+
*
|
|
7600
|
+
* @remarks
|
|
7601
|
+
* Accepts a mixed array of bare axis-name strings and full
|
|
7602
|
+
* {@link Qualifiers.IQualifierDecl | declarations}. String elements are sugar
|
|
7603
|
+
* for a literal qualifier: the library synthesizes a
|
|
7604
|
+
* {@link QualifierTypes.LiteralQualifierType | LiteralQualifierType} named
|
|
7605
|
+
* after the string and a declaration `{ name, typeName: name, defaultPriority }`.
|
|
7606
|
+
* Synthesized priorities are distributed across the
|
|
7607
|
+
* `[MinConditionPriority..MaxConditionPriority]` range adaptively to the
|
|
7608
|
+
* input length (`step = max(1, floor((Max - Min) / length))`,
|
|
7609
|
+
* `priority = max(Min, Max - index * step)`). Earlier elements get higher
|
|
7610
|
+
* priority — matching the "earlier qualifier wins when multiple match"
|
|
7611
|
+
* mental model — and the formula never overflows the `ConditionPriority`
|
|
7612
|
+
* range regardless of input length.
|
|
7613
|
+
*
|
|
7614
|
+
* `qualifierTypes` may be omitted only when every element of `qualifiers`
|
|
7615
|
+
* is a string. If any element is a declaration, `qualifierTypes` is
|
|
7616
|
+
* required (and must include the referenced typeNames); the error message
|
|
7617
|
+
* names the offending typeName when it is missing.
|
|
7404
7618
|
*/
|
|
7405
7619
|
static create(params: IQualifierCollectorCreateParams): Result<QualifierCollector>;
|
|
7406
7620
|
/**
|
|
7407
|
-
* {@
|
|
7621
|
+
* Resolves the public {@link Qualifiers.IQualifierCollectorCreateParams | create params}
|
|
7622
|
+
* into the concrete `(qualifierTypes, qualifiers)` pair the constructor expects.
|
|
7623
|
+
*
|
|
7624
|
+
* @remarks
|
|
7625
|
+
* Validates the mixed-shape `qualifiers` input through
|
|
7626
|
+
* {@link Converters.oneOf} (string vs {@link Qualifiers.IQualifierDecl})
|
|
7627
|
+
* at the public-API boundary, then partitions into bare-string and decl
|
|
7628
|
+
* buckets to drive type synthesis. If any decl is present and
|
|
7629
|
+
* `qualifierTypes` is omitted, fails with an error that names the
|
|
7630
|
+
* offending typeNames.
|
|
7631
|
+
*
|
|
7632
|
+
* @internal
|
|
7633
|
+
*/
|
|
7634
|
+
private static _resolveCreateParams;
|
|
7635
|
+
/**
|
|
7636
|
+
* Returns the provided {@link QualifierTypes.ReadOnlyQualifierTypeCollector | qualifier-type collector}
|
|
7637
|
+
* (or synthesizes a new one) augmented with synthesized literal qualifier types for the supplied
|
|
7638
|
+
* string names that are not already present.
|
|
7639
|
+
*
|
|
7640
|
+
* @internal
|
|
7641
|
+
*/
|
|
7642
|
+
private static _resolveQualifierTypes;
|
|
7643
|
+
/**
|
|
7644
|
+
* Normalizes a mixed `(string | IQualifierDecl)[]` into a fully-resolved
|
|
7645
|
+
* `IQualifierDecl[]`, assigning descending default priorities to synthesized
|
|
7646
|
+
* decls within the `[MinConditionPriority..MaxConditionPriority]` range.
|
|
7647
|
+
*
|
|
7648
|
+
* @remarks
|
|
7649
|
+
* Step size is adaptive to input length:
|
|
7650
|
+
* `step = max(1, floor((Max - Min) / length))`. Each synthesized priority
|
|
7651
|
+
* is `max(Min, Max - index * step)` — clamped at the bottom so length
|
|
7652
|
+
* extremes (\>1000 axes) degrade gracefully into a tail of equal-`Min`
|
|
7653
|
+
* priorities rather than overflowing the `ConditionPriority` range.
|
|
7654
|
+
*
|
|
7655
|
+
* @internal
|
|
7656
|
+
*/
|
|
7657
|
+
private static _normalizeQualifierDecls;
|
|
7658
|
+
/**
|
|
7659
|
+
* Returns an empty {@link QualifierTypes.ReadOnlyQualifierTypeCollector | qualifier-type collector}
|
|
7660
|
+
* used as a placeholder when no qualifiers are supplied and the caller omits
|
|
7661
|
+
* `qualifierTypes`.
|
|
7662
|
+
*
|
|
7663
|
+
* @internal
|
|
7664
|
+
*/
|
|
7665
|
+
private static _emptyQualifierTypes;
|
|
7666
|
+
/**
|
|
7667
|
+
* {@inheritDoc Qualifiers.IReadOnlyQualifierCollector.getByNameOrToken}
|
|
7408
7668
|
*/
|
|
7409
7669
|
getByNameOrToken(nameOrToken: string): Result<Qualifier>;
|
|
7410
7670
|
/**
|
|
7411
|
-
* {@
|
|
7671
|
+
* {@inheritDoc Qualifiers.IReadOnlyQualifierCollector.hasNameOrToken}
|
|
7412
7672
|
*/
|
|
7413
7673
|
hasNameOrToken(nameOrToken: string): boolean;
|
|
7414
7674
|
/**
|
|
@@ -7662,19 +7922,19 @@ export { Qualifiers }
|
|
|
7662
7922
|
*/
|
|
7663
7923
|
export declare abstract class QualifierType<TCFGJSON extends JsonObject = JsonObject> implements IQualifierType<TCFGJSON> {
|
|
7664
7924
|
/**
|
|
7665
|
-
* {@
|
|
7925
|
+
* {@inheritDoc QualifierTypes.IQualifierType.name}
|
|
7666
7926
|
*/
|
|
7667
7927
|
readonly name: QualifierTypeName;
|
|
7668
7928
|
/**
|
|
7669
|
-
* {@
|
|
7929
|
+
* {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}
|
|
7670
7930
|
*/
|
|
7671
7931
|
abstract readonly systemTypeName: QualifierTypeName;
|
|
7672
7932
|
/**
|
|
7673
|
-
* {@
|
|
7933
|
+
* {@inheritDoc QualifierTypes.IQualifierType.key}
|
|
7674
7934
|
*/
|
|
7675
7935
|
get key(): QualifierTypeName;
|
|
7676
7936
|
/**
|
|
7677
|
-
* {@
|
|
7937
|
+
* {@inheritDoc QualifierTypes.IQualifierType.index}
|
|
7678
7938
|
*/
|
|
7679
7939
|
get index(): QualifierTypeIndex | undefined;
|
|
7680
7940
|
protected readonly _collectible: Collections.Collectible<QualifierTypeName, QualifierTypeIndex>;
|
|
@@ -7685,53 +7945,52 @@ export declare abstract class QualifierType<TCFGJSON extends JsonObject = JsonOb
|
|
|
7685
7945
|
readonly allowContextList: boolean;
|
|
7686
7946
|
/**
|
|
7687
7947
|
* Constructor for use by derived classes.
|
|
7688
|
-
* @param
|
|
7689
|
-
*
|
|
7690
|
-
* comma-separated list of runtime values in the context. Defaults to `false`.
|
|
7948
|
+
* @param params - The {@link QualifierTypes.IQualifierTypeCreateParams | create parameters}
|
|
7949
|
+
* for this qualifier type.
|
|
7691
7950
|
*/
|
|
7692
7951
|
protected constructor({ name, index, allowContextList }: IQualifierTypeCreateParams);
|
|
7693
7952
|
/**
|
|
7694
|
-
* {@
|
|
7953
|
+
* {@inheritDoc QualifierTypes.IQualifierType.isValidConditionValue}
|
|
7695
7954
|
*/
|
|
7696
7955
|
abstract isValidConditionValue(value: string): value is QualifierConditionValue;
|
|
7697
7956
|
/**
|
|
7698
|
-
* {@
|
|
7957
|
+
* {@inheritDoc QualifierTypes.IQualifierType.isValidContextValue}
|
|
7699
7958
|
*/
|
|
7700
7959
|
isValidContextValue(value: string): value is QualifierContextValue;
|
|
7701
7960
|
/**
|
|
7702
|
-
* {@
|
|
7961
|
+
* {@inheritDoc QualifierTypes.IQualifierType.isPotentialMatch}
|
|
7703
7962
|
*/
|
|
7704
7963
|
isPotentialMatch(conditionValue: string, contextValue: string): boolean;
|
|
7705
7964
|
/**
|
|
7706
|
-
* {@
|
|
7965
|
+
* {@inheritDoc QualifierTypes.IQualifierType.validateCondition}
|
|
7707
7966
|
*/
|
|
7708
7967
|
validateCondition(value: string, operator?: ConditionOperator): Result<QualifierConditionValue>;
|
|
7709
7968
|
/**
|
|
7710
|
-
* {@
|
|
7969
|
+
* {@inheritDoc QualifierTypes.IQualifierType.validateContextValue}
|
|
7711
7970
|
*/
|
|
7712
7971
|
validateContextValue(value: string): Result<QualifierContextValue>;
|
|
7713
7972
|
/**
|
|
7714
|
-
* {@
|
|
7973
|
+
* {@inheritDoc QualifierTypes.IQualifierType.matches}
|
|
7715
7974
|
*/
|
|
7716
7975
|
matches(condition: QualifierConditionValue, context: QualifierContextValue, operator: ConditionOperator): QualifierMatchScore;
|
|
7717
7976
|
/**
|
|
7718
|
-
* {@
|
|
7977
|
+
* {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}
|
|
7719
7978
|
*/
|
|
7720
7979
|
abstract getConfigurationJson(): Result<JsonCompatibleType<Config_2.IQualifierTypeConfig<TCFGJSON>>>;
|
|
7721
7980
|
/**
|
|
7722
|
-
* {@
|
|
7981
|
+
* {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}
|
|
7723
7982
|
*/
|
|
7724
7983
|
abstract validateConfigurationJson(from: unknown): Result<JsonCompatibleType<Config_2.IQualifierTypeConfig<TCFGJSON>>>;
|
|
7725
7984
|
/**
|
|
7726
|
-
* {@
|
|
7985
|
+
* {@inheritDoc QualifierTypes.IQualifierType.setIndex}
|
|
7727
7986
|
*/
|
|
7728
7987
|
setIndex(index: number): Result<QualifierTypeIndex>;
|
|
7729
7988
|
/**
|
|
7730
|
-
* {@
|
|
7989
|
+
* {@inheritDoc Validate.isValidQualifierTypeName}
|
|
7731
7990
|
*/
|
|
7732
7991
|
static isValidName(name: string): name is QualifierTypeName;
|
|
7733
7992
|
/**
|
|
7734
|
-
* {@
|
|
7993
|
+
* {@inheritDoc Validate.isValidQualifierTypeIndex}
|
|
7735
7994
|
*/
|
|
7736
7995
|
static isValidIndex(index: number): index is QualifierTypeIndex;
|
|
7737
7996
|
/**
|
|
@@ -8284,7 +8543,7 @@ declare class ResourceBuilder {
|
|
|
8284
8543
|
/**
|
|
8285
8544
|
* Given a {@link ResourceJson.Json.IChildResourceCandidateDecl | child resource candidate declaration}, creates and adds a
|
|
8286
8545
|
* {@link Resources.ResourceCandidate | candidate} to the resource being built.
|
|
8287
|
-
* @param
|
|
8546
|
+
* @param childDecl - The {@link ResourceJson.Json.IChildResourceCandidateDecl | IChildResourceCandidateDecl} to add to the
|
|
8288
8547
|
* resource being built.
|
|
8289
8548
|
* @returns `Success` with the added {@link Resources.ResourceCandidate | candidate} if successful,
|
|
8290
8549
|
* or `Failure` with an error message if not.
|
|
@@ -8293,7 +8552,7 @@ declare class ResourceBuilder {
|
|
|
8293
8552
|
/**
|
|
8294
8553
|
* Given a {@link ResourceJson.Json.ILooseResourceCandidateDecl | resource candidate declaration}, creates and adds a
|
|
8295
8554
|
* {@link Resources.ResourceCandidate | candidate} to the resource being built.
|
|
8296
|
-
* @param
|
|
8555
|
+
* @param decl - The {@link ResourceJson.Json.ILooseResourceCandidateDecl | IResourceCandidateDecl} to add to the
|
|
8297
8556
|
* resource being built.
|
|
8298
8557
|
* @returns `Success` with the added {@link Resources.ResourceCandidate | candidate} if successful,
|
|
8299
8558
|
* or `Failure` with an error message if not. Fails with error detail 'type-mismatch' if the candidate
|
|
@@ -8473,7 +8732,7 @@ declare class ResourceDeclCollection implements IResourceDeclContainer {
|
|
|
8473
8732
|
*/
|
|
8474
8733
|
readonly collection: Normalized.IImporterResourceCollectionDecl;
|
|
8475
8734
|
/**
|
|
8476
|
-
* {@
|
|
8735
|
+
* {@inheritDoc ResourceJson.IResourceDeclContainer.context}
|
|
8477
8736
|
*/
|
|
8478
8737
|
get context(): Normalized.IContainerContextDecl | undefined;
|
|
8479
8738
|
protected _resources: Normalized.IImporterResourceDecl[];
|
|
@@ -8513,7 +8772,7 @@ declare class ResourceDeclTree implements IResourceDeclContainer {
|
|
|
8513
8772
|
*/
|
|
8514
8773
|
readonly tree: Normalized.IResourceTreeRootDecl;
|
|
8515
8774
|
/**
|
|
8516
|
-
* {@
|
|
8775
|
+
* {@inheritDoc ResourceJson.IResourceDeclContainer.context}
|
|
8517
8776
|
*/
|
|
8518
8777
|
get context(): Normalized.IContainerContextDecl | undefined;
|
|
8519
8778
|
protected _resources: Normalized.ILooseResourceDecl[];
|
|
@@ -8682,7 +8941,7 @@ export declare class ResourceManagerBuilder implements IResourceManager<Resource
|
|
|
8682
8941
|
*/
|
|
8683
8942
|
get size(): number;
|
|
8684
8943
|
/**
|
|
8685
|
-
* {@
|
|
8944
|
+
* {@inheritDoc Runtime.IResourceManager.numResources}
|
|
8686
8945
|
*/
|
|
8687
8946
|
get numResources(): number;
|
|
8688
8947
|
/**
|
|
@@ -8690,11 +8949,11 @@ export declare class ResourceManagerBuilder implements IResourceManager<Resource
|
|
|
8690
8949
|
*/
|
|
8691
8950
|
protected _numCandidates?: number;
|
|
8692
8951
|
/**
|
|
8693
|
-
* {@
|
|
8952
|
+
* {@inheritDoc Runtime.IResourceManager.numCandidates}
|
|
8694
8953
|
*/
|
|
8695
8954
|
get numCandidates(): number;
|
|
8696
8955
|
/**
|
|
8697
|
-
* {@
|
|
8956
|
+
* {@inheritDoc Runtime.IResourceManager.builtResources}
|
|
8698
8957
|
*/
|
|
8699
8958
|
get builtResources(): Collections.IReadOnlyValidatingResultMap<ResourceId, Resource>;
|
|
8700
8959
|
/**
|
|
@@ -8734,7 +8993,7 @@ export declare class ResourceManagerBuilder implements IResourceManager<Resource
|
|
|
8734
8993
|
/**
|
|
8735
8994
|
* Given a {@link ResourceJson.Json.ILooseResourceCandidateDecl | resource candidate declaration}, builds and adds
|
|
8736
8995
|
* a {@link Resources.ResourceCandidate | candidate} to the manager.
|
|
8737
|
-
* @param
|
|
8996
|
+
* @param decl - The {@link ResourceJson.Json.ILooseResourceCandidateDecl | loose resource candidate declaration} to add.
|
|
8738
8997
|
* @returns `Success` with the candidate if successful, or `Failure` with an error message if not.
|
|
8739
8998
|
* @public
|
|
8740
8999
|
*/
|
|
@@ -8749,7 +9008,7 @@ export declare class ResourceManagerBuilder implements IResourceManager<Resource
|
|
|
8749
9008
|
addCondition(decl: ResourceJson.Json.ILooseConditionDecl): Result<Condition>;
|
|
8750
9009
|
/**
|
|
8751
9010
|
* Adds a condition set to the manager.
|
|
8752
|
-
* @param
|
|
9011
|
+
* @param conditions - The {@link ResourceJson.Normalized.ConditionSetDecl | condition set declaration} to add.
|
|
8753
9012
|
* @returns `Success` with the condition set if successful, or `Failure` with an error message if not.
|
|
8754
9013
|
* @public
|
|
8755
9014
|
*/
|
|
@@ -9513,7 +9772,7 @@ export declare abstract class ResourceType<T = unknown> implements IResourceType
|
|
|
9513
9772
|
private _collectible;
|
|
9514
9773
|
private _template;
|
|
9515
9774
|
/**
|
|
9516
|
-
* {@
|
|
9775
|
+
* {@inheritDoc ResourceTypes.IResourceType.key}
|
|
9517
9776
|
*/
|
|
9518
9777
|
get key(): ResourceTypeName;
|
|
9519
9778
|
/**
|
|
@@ -9521,7 +9780,7 @@ export declare abstract class ResourceType<T = unknown> implements IResourceType
|
|
|
9521
9780
|
*/
|
|
9522
9781
|
abstract readonly systemTypeName: ResourceTypeName;
|
|
9523
9782
|
/**
|
|
9524
|
-
* {@
|
|
9783
|
+
* {@inheritDoc ResourceTypes.IResourceType.index}
|
|
9525
9784
|
*/
|
|
9526
9785
|
get index(): ResourceTypeIndex | undefined;
|
|
9527
9786
|
protected constructor(key: ResourceTypeName, index?: number, template?: JsonObject);
|
|
@@ -10012,7 +10271,7 @@ declare const TerritoryPrioritySystemConfiguration: ISystemConfiguration;
|
|
|
10012
10271
|
*/
|
|
10013
10272
|
declare class TerritoryQualifierType extends QualifierType<JsonCompatibleType<Config_2.ITerritoryQualifierTypeConfig>> {
|
|
10014
10273
|
/**
|
|
10015
|
-
* {@
|
|
10274
|
+
* {@inheritDoc QualifierTypes.IQualifierType.systemTypeName}
|
|
10016
10275
|
*/
|
|
10017
10276
|
readonly systemTypeName: QualifierTypeName;
|
|
10018
10277
|
/**
|
|
@@ -10035,7 +10294,7 @@ declare class TerritoryQualifierType extends QualifierType<JsonCompatibleType<Co
|
|
|
10035
10294
|
*/
|
|
10036
10295
|
protected constructor({ acceptLowercase, allowedTerritories, allowContextList, name, index, hierarchy }: ITerritoryQualifierTypeCreateParams);
|
|
10037
10296
|
/**
|
|
10038
|
-
* {@
|
|
10297
|
+
* {@inheritDoc QualifierTypes.QualifierType.isValidConditionValue}
|
|
10039
10298
|
*/
|
|
10040
10299
|
isValidConditionValue(value: string): value is QualifierConditionValue;
|
|
10041
10300
|
/**
|
|
@@ -10063,11 +10322,11 @@ declare class TerritoryQualifierType extends QualifierType<JsonCompatibleType<Co
|
|
|
10063
10322
|
*/
|
|
10064
10323
|
getConfiguration(): Result<Config_2.ISystemTerritoryQualifierTypeConfig>;
|
|
10065
10324
|
/**
|
|
10066
|
-
* {@
|
|
10325
|
+
* {@inheritDoc QualifierTypes.IQualifierType.getConfigurationJson}
|
|
10067
10326
|
*/
|
|
10068
10327
|
getConfigurationJson(): Result<JsonCompatibleType<Config_2.ISystemTerritoryQualifierTypeConfig>>;
|
|
10069
10328
|
/**
|
|
10070
|
-
* {@
|
|
10329
|
+
* {@inheritDoc QualifierTypes.IQualifierType.validateConfigurationJson}
|
|
10071
10330
|
*/
|
|
10072
10331
|
validateConfigurationJson(from: unknown): Result<JsonCompatibleType<Config_2.ISystemTerritoryQualifierTypeConfig>>;
|
|
10073
10332
|
/**
|
|
@@ -10078,7 +10337,7 @@ declare class TerritoryQualifierType extends QualifierType<JsonCompatibleType<Co
|
|
|
10078
10337
|
*/
|
|
10079
10338
|
validateConfiguration(from: unknown): Result<Config_2.ISystemTerritoryQualifierTypeConfig>;
|
|
10080
10339
|
/**
|
|
10081
|
-
* {@
|
|
10340
|
+
* {@inheritDoc QualifierTypes.QualifierType._matchOne}
|
|
10082
10341
|
*/
|
|
10083
10342
|
protected _matchOne(condition: QualifierConditionValue, context: QualifierContextValue, __operator?: ConditionOperator): QualifierMatchScore;
|
|
10084
10343
|
/**
|
|
@@ -10167,7 +10426,7 @@ declare function toConditionPriority(priority: number): Result<ConditionPriority
|
|
|
10167
10426
|
|
|
10168
10427
|
/**
|
|
10169
10428
|
* Converts a string to a {@link ConditionSetHash} if it is a valid condition set hash.
|
|
10170
|
-
* @param
|
|
10429
|
+
* @param hash - the string to convert
|
|
10171
10430
|
* @returns `Success` with the converted {@link ConditionSetHash} if successful, or `Failure` with an
|
|
10172
10431
|
* error message if not.
|
|
10173
10432
|
* @public
|
|
@@ -10238,9 +10497,9 @@ declare function toContextToken(token: string): Result<ContextToken>;
|
|
|
10238
10497
|
declare function toDecisionIndex(index: number): Result<DecisionIndex>;
|
|
10239
10498
|
|
|
10240
10499
|
/**
|
|
10241
|
-
* Converts a
|
|
10242
|
-
* @param
|
|
10243
|
-
* @returns `Success` with the converted {@link
|
|
10500
|
+
* Converts a string to a {@link DecisionKey} if it is a valid decision key.
|
|
10501
|
+
* @param key - the string to convert
|
|
10502
|
+
* @returns `Success` with the converted {@link DecisionKey} if successful, or `Failure` with an
|
|
10244
10503
|
* error message if not.
|
|
10245
10504
|
* @public
|
|
10246
10505
|
*/
|
|
@@ -10351,7 +10610,7 @@ declare function toResourceIndex(index: number): Result<ResourceIndex>;
|
|
|
10351
10610
|
/**
|
|
10352
10611
|
* Converts a string to a {@link ResourceName | resource name}.
|
|
10353
10612
|
*
|
|
10354
|
-
* @param
|
|
10613
|
+
* @param name - The string to convert.
|
|
10355
10614
|
* @returns `Success` with the converted name if valid, or `Failure` with an error message
|
|
10356
10615
|
* if not.
|
|
10357
10616
|
* @public
|
|
@@ -10378,6 +10637,148 @@ declare function toResourceTypeIndex(index: number): Result<ResourceTypeIndex>;
|
|
|
10378
10637
|
*/
|
|
10379
10638
|
declare function toResourceTypeName(name: string): Result<ResourceTypeName>;
|
|
10380
10639
|
|
|
10640
|
+
/**
|
|
10641
|
+
* Returns a `Converter` for a `Json.IChildResourceCandidateDecl<TQualifierNames>`
|
|
10642
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10643
|
+
*
|
|
10644
|
+
* @public
|
|
10645
|
+
*/
|
|
10646
|
+
declare function typedChildResourceCandidateDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IChildResourceCandidateDecl<TQualifierNames>>;
|
|
10647
|
+
|
|
10648
|
+
/**
|
|
10649
|
+
* Returns a `Converter` for a `Json.IChildResourceDecl<TQualifierNames>`
|
|
10650
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10651
|
+
*
|
|
10652
|
+
* @public
|
|
10653
|
+
*/
|
|
10654
|
+
declare function typedChildResourceDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IChildResourceDecl<TQualifierNames>>;
|
|
10655
|
+
|
|
10656
|
+
/**
|
|
10657
|
+
* Returns a `Converter` for an `IConditionDecl<TQualifierNames>` narrowed on a supplied
|
|
10658
|
+
* `qualifierName` converter.
|
|
10659
|
+
*
|
|
10660
|
+
* @remarks
|
|
10661
|
+
* Pass e.g. `Converters.enumeratedValue(['tone', 'language'] as const)` to reject
|
|
10662
|
+
* typo'd qualifier names at convert time and to narrow the resulting
|
|
10663
|
+
* `IConditionDecl<T>` type to the same literal-string union. The default
|
|
10664
|
+
* `conditionDecl` is the `Converters.string` instantiation of this shape.
|
|
10665
|
+
*
|
|
10666
|
+
* @public
|
|
10667
|
+
*/
|
|
10668
|
+
declare function typedConditionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<IConditionDecl<TQualifierNames>>;
|
|
10669
|
+
|
|
10670
|
+
/**
|
|
10671
|
+
* Returns a `Converter` for a `Json.ConditionSetDecl<TQualifierNames>`
|
|
10672
|
+
* (either array form or record form) narrowed on a supplied `qualifierName`
|
|
10673
|
+
* converter.
|
|
10674
|
+
*
|
|
10675
|
+
* @public
|
|
10676
|
+
*/
|
|
10677
|
+
declare function typedConditionSetDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ConditionSetDecl<TQualifierNames>>;
|
|
10678
|
+
|
|
10679
|
+
/**
|
|
10680
|
+
* Returns a `Converter` for an `IConditionSetDecl<TQualifierNames>` narrowed on a supplied
|
|
10681
|
+
* `qualifierName` converter.
|
|
10682
|
+
*
|
|
10683
|
+
* @remarks
|
|
10684
|
+
* Each contained condition is converted via `typedConditionDecl(qualifierNameConverter)`.
|
|
10685
|
+
*
|
|
10686
|
+
* @public
|
|
10687
|
+
*/
|
|
10688
|
+
declare function typedConditionSetDecl_2<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<IConditionSetDecl<TQualifierNames>>;
|
|
10689
|
+
|
|
10690
|
+
/**
|
|
10691
|
+
* Returns a `Converter` for a `Json.IContainerContextDecl<TQualifierNames>`
|
|
10692
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10693
|
+
*
|
|
10694
|
+
* @public
|
|
10695
|
+
*/
|
|
10696
|
+
declare function typedContainerContextDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IContainerContextDecl<TQualifierNames>>;
|
|
10697
|
+
|
|
10698
|
+
/**
|
|
10699
|
+
* Returns a `Converter` for a `Json.IImporterResourceCandidateDecl<TQualifierNames>`
|
|
10700
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10701
|
+
*
|
|
10702
|
+
* @public
|
|
10703
|
+
*/
|
|
10704
|
+
declare function typedImporterResourceCandidateDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IImporterResourceCandidateDecl<TQualifierNames>>;
|
|
10705
|
+
|
|
10706
|
+
/**
|
|
10707
|
+
* Returns a `Converter` for a `Json.IImporterResourceCollectionDecl<TQualifierNames>`
|
|
10708
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10709
|
+
*
|
|
10710
|
+
* @public
|
|
10711
|
+
*/
|
|
10712
|
+
declare function typedImporterResourceCollectionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IImporterResourceCollectionDecl<TQualifierNames>>;
|
|
10713
|
+
|
|
10714
|
+
/**
|
|
10715
|
+
* Returns a `Converter` for a `Json.ILooseConditionDecl<TQualifierNames>`
|
|
10716
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10717
|
+
*
|
|
10718
|
+
* @public
|
|
10719
|
+
*/
|
|
10720
|
+
declare function typedLooseConditionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ILooseConditionDecl<TQualifierNames>>;
|
|
10721
|
+
|
|
10722
|
+
/**
|
|
10723
|
+
* Returns a `Converter` for a `Json.ILooseResourceCandidateDecl<TQualifierNames>`
|
|
10724
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10725
|
+
*
|
|
10726
|
+
* @public
|
|
10727
|
+
*/
|
|
10728
|
+
declare function typedLooseResourceCandidateDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ILooseResourceCandidateDecl<TQualifierNames>>;
|
|
10729
|
+
|
|
10730
|
+
/**
|
|
10731
|
+
* Returns a `Converter` for a `Json.ILooseResourceDecl<TQualifierNames>`
|
|
10732
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10733
|
+
*
|
|
10734
|
+
* @public
|
|
10735
|
+
*/
|
|
10736
|
+
declare function typedLooseResourceDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ILooseResourceDecl<TQualifierNames>>;
|
|
10737
|
+
|
|
10738
|
+
/**
|
|
10739
|
+
* Returns a `Converter` for a `Json.IResourceCollectionDecl<TQualifierNames>`
|
|
10740
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10741
|
+
*
|
|
10742
|
+
* @public
|
|
10743
|
+
*/
|
|
10744
|
+
declare function typedResourceCollectionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IResourceCollectionDecl<TQualifierNames>>;
|
|
10745
|
+
|
|
10746
|
+
/**
|
|
10747
|
+
* Returns a `Converter` for a `Json.IResourceTreeChildNodeDecl<TQualifierNames>`
|
|
10748
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10749
|
+
*
|
|
10750
|
+
* @public
|
|
10751
|
+
*/
|
|
10752
|
+
declare function typedResourceTreeChildNodeDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IResourceTreeChildNodeDecl<TQualifierNames>>;
|
|
10753
|
+
|
|
10754
|
+
/**
|
|
10755
|
+
* Returns a `Converter` for a `Json.IResourceTreeRootDecl<TQualifierNames>`
|
|
10756
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
10757
|
+
*
|
|
10758
|
+
* @public
|
|
10759
|
+
*/
|
|
10760
|
+
declare function typedResourceTreeRootDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IResourceTreeRootDecl<TQualifierNames>>;
|
|
10761
|
+
|
|
10762
|
+
/**
|
|
10763
|
+
* Returns a `Converter` for an `IValidatedConditionDecl` narrowed on a supplied
|
|
10764
|
+
* `qualifierName` converter.
|
|
10765
|
+
*
|
|
10766
|
+
* @remarks
|
|
10767
|
+
* The typed sibling layers literal-string narrowing on top of the existing
|
|
10768
|
+
* collector-membership check performed by `validatedConditionDecl`.
|
|
10769
|
+
*
|
|
10770
|
+
* @public
|
|
10771
|
+
*/
|
|
10772
|
+
declare function typedValidatedConditionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<IValidatedConditionDecl, IConditionDeclConvertContext>;
|
|
10773
|
+
|
|
10774
|
+
/**
|
|
10775
|
+
* Returns a `Converter` for an `IValidatedConditionSetDecl` narrowed on a supplied
|
|
10776
|
+
* `qualifierName` converter.
|
|
10777
|
+
*
|
|
10778
|
+
* @public
|
|
10779
|
+
*/
|
|
10780
|
+
declare function typedValidatedConditionSetDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<IValidatedConditionSetDecl, IConditionSetDeclConvertContext>;
|
|
10781
|
+
|
|
10381
10782
|
/**
|
|
10382
10783
|
* Creates a copy of the provided {@link Config.Model.ISystemConfiguration | system configuration}
|
|
10383
10784
|
* with updated qualifier default values.
|
|
@@ -10457,6 +10858,12 @@ export { Validate }
|
|
|
10457
10858
|
* Converter which constructs a {@link Conditions.IValidatedConditionDecl | validated condition declaration}
|
|
10458
10859
|
* from a {@link Conditions.IConditionDecl | condition declaration}, instantiating qualifiers by name
|
|
10459
10860
|
* from a supplied {@link Conditions.Convert.IConditionDeclConvertContext | conversion context}.
|
|
10861
|
+
*
|
|
10862
|
+
* @remarks
|
|
10863
|
+
* Accepts any string as the `qualifierName`; the collector membership check still rejects unknown
|
|
10864
|
+
* names. Use `typedValidatedConditionDecl` to layer literal-string narrowing on top of the
|
|
10865
|
+
* collector check.
|
|
10866
|
+
*
|
|
10460
10867
|
* @public
|
|
10461
10868
|
*/
|
|
10462
10869
|
declare const validatedConditionDecl: Converter<IValidatedConditionDecl, IConditionDeclConvertContext>;
|
|
@@ -10465,6 +10872,11 @@ declare const validatedConditionDecl: Converter<IValidatedConditionDecl, ICondit
|
|
|
10465
10872
|
* Converter which constructs a {@link Conditions.IValidatedConditionSetDecl | validated condition set declaration}
|
|
10466
10873
|
* from a {@link Conditions.IConditionSetDecl | condition set declaration}, instantiating qualifiers by name
|
|
10467
10874
|
* from a supplied {@link Conditions.Convert.IConditionSetDeclConvertContext | conversion context}.
|
|
10875
|
+
*
|
|
10876
|
+
* @remarks
|
|
10877
|
+
* Accepts any string as the qualifier name. Use `typedValidatedConditionSetDecl` to layer
|
|
10878
|
+
* literal-string narrowing on top of the collector-membership check.
|
|
10879
|
+
*
|
|
10468
10880
|
* @public
|
|
10469
10881
|
*/
|
|
10470
10882
|
declare const validatedConditionSetDecl: Converter<IValidatedConditionSetDecl, IConditionSetDeclConvertContext>;
|