@uns-kit/core 1.0.14 → 1.0.15

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.
@@ -1 +1 @@
1
- {"version":3,"file":"uns-attributes.d.ts","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAkC,MAAM,+BAA+B,CAAC;AAEpG,eAAO,MAAM,kBAAkB,k6BAAqC,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAGjG,MAAM,MAAM,YAAY,GAAG,EAAE,GAAG,qBAAqB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtE,eAAO,MAAM,qBAAqB,86BAAiC,CAAC;AAEpE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExE"}
1
+ {"version":3,"file":"uns-attributes.d.ts","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAkC,MAAM,+BAA+B,CAAC;AAGpG,eAAO,MAAM,kBAAkB,k6BAAqC,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAGjG,MAAM,MAAM,YAAY,GAAG,EAAE,GAAG,qBAAqB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtE,eAAO,MAAM,qBAAqB,86BAAiC,CAAC;AAEpE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKxE"}
@@ -1,8 +1,10 @@
1
1
  // Slimmed: use generated dictionary as the source of attributes.
2
2
  import { GeneratedAttributes, GeneratedAttributeDescriptions } from "./uns-dictionary.generated.js";
3
+ import { resolveAttributeDescription } from "./uns-dictionary-registry.js";
3
4
  export const knownUnsAttributes = Object.values(GeneratedAttributes);
4
5
  export const AttributeDescriptions = GeneratedAttributeDescriptions;
5
6
  export function getAttributeDescription(name) {
6
- return AttributeDescriptions[name];
7
+ return (resolveAttributeDescription(name) ??
8
+ AttributeDescriptions[name]);
7
9
  }
8
10
  //# sourceMappingURL=uns-attributes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uns-attributes.js","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAEpG,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAOrE,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAEpE,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,qBAAqB,CAAC,IAA0C,CAAuB,CAAC;AACjG,CAAC","sourcesContent":["// Slimmed: use generated dictionary as the source of attributes.\nimport { GeneratedAttributes, GeneratedAttributeDescriptions } from \"./uns-dictionary.generated.js\";\n\nexport const knownUnsAttributes = Object.values(GeneratedAttributes);\n\nexport type KnownUnsAttributeName = typeof GeneratedAttributes[keyof typeof GeneratedAttributes];\n\n// Allow known attribute names while still allowing arbitrary strings.\nexport type UnsAttribute = \"\" | KnownUnsAttributeName | (string & {});\n\nexport const AttributeDescriptions = GeneratedAttributeDescriptions;\n\nexport function getAttributeDescription(name: string): string | undefined {\n return AttributeDescriptions[name as keyof typeof AttributeDescriptions] as string | undefined;\n}\n"]}
1
+ {"version":3,"file":"uns-attributes.js","sourceRoot":"","sources":["../../src/uns/uns-attributes.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAE3E,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAOrE,MAAM,CAAC,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAEpE,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,OAAO,CACL,2BAA2B,CAAC,IAAI,CAAC;QAChC,qBAA4D,CAAC,IAAI,CAAC,CACpE,CAAC;AACJ,CAAC","sourcesContent":["// Slimmed: use generated dictionary as the source of attributes.\nimport { GeneratedAttributes, GeneratedAttributeDescriptions } from \"./uns-dictionary.generated.js\";\nimport { resolveAttributeDescription } from \"./uns-dictionary-registry.js\";\n\nexport const knownUnsAttributes = Object.values(GeneratedAttributes);\n\nexport type KnownUnsAttributeName = typeof GeneratedAttributes[keyof typeof GeneratedAttributes];\n\n// Allow known attribute names while still allowing arbitrary strings.\nexport type UnsAttribute = \"\" | KnownUnsAttributeName | (string & {});\n\nexport const AttributeDescriptions = GeneratedAttributeDescriptions;\n\nexport function getAttributeDescription(name: string): string | undefined {\n return (\n resolveAttributeDescription(name) ??\n (AttributeDescriptions as Record<string, string | undefined>)[name]\n );\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export declare function registerObjectTypeDescriptions(map: Record<string, string>): void;
2
+ export declare function registerAttributeDescriptions(map: Record<string, string>): void;
3
+ export declare function resolveObjectTypeDescription(name: string | undefined): string | undefined;
4
+ export declare function resolveAttributeDescription(name: string | undefined): string | undefined;
5
+ //# sourceMappingURL=uns-dictionary-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uns-dictionary-registry.d.ts","sourceRoot":"","sources":["../../src/uns/uns-dictionary-registry.ts"],"names":[],"mappings":"AAMA,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAEhF;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAE/E;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGzF;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGxF"}
@@ -0,0 +1,21 @@
1
+ // Simple registry to allow projects to provide additional descriptions at runtime
2
+ // without coupling core to project-generated files.
3
+ let objectTypeDescriptions = {};
4
+ let attributeDescriptions = {};
5
+ export function registerObjectTypeDescriptions(map) {
6
+ objectTypeDescriptions = { ...objectTypeDescriptions, ...map };
7
+ }
8
+ export function registerAttributeDescriptions(map) {
9
+ attributeDescriptions = { ...attributeDescriptions, ...map };
10
+ }
11
+ export function resolveObjectTypeDescription(name) {
12
+ if (!name)
13
+ return undefined;
14
+ return objectTypeDescriptions[name];
15
+ }
16
+ export function resolveAttributeDescription(name) {
17
+ if (!name)
18
+ return undefined;
19
+ return attributeDescriptions[name];
20
+ }
21
+ //# sourceMappingURL=uns-dictionary-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uns-dictionary-registry.js","sourceRoot":"","sources":["../../src/uns/uns-dictionary-registry.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,oDAAoD;AAEpD,IAAI,sBAAsB,GAA2B,EAAE,CAAC;AACxD,IAAI,qBAAqB,GAA2B,EAAE,CAAC;AAEvD,MAAM,UAAU,8BAA8B,CAAC,GAA2B;IACxE,sBAAsB,GAAG,EAAE,GAAG,sBAAsB,EAAE,GAAG,GAAG,EAAE,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,GAA2B;IACvE,qBAAqB,GAAG,EAAE,GAAG,qBAAqB,EAAE,GAAG,GAAG,EAAE,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,IAAwB;IACnE,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,IAAwB;IAClE,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC","sourcesContent":["// Simple registry to allow projects to provide additional descriptions at runtime\n// without coupling core to project-generated files.\n\nlet objectTypeDescriptions: Record<string, string> = {};\nlet attributeDescriptions: Record<string, string> = {};\n\nexport function registerObjectTypeDescriptions(map: Record<string, string>): void {\n objectTypeDescriptions = { ...objectTypeDescriptions, ...map };\n}\n\nexport function registerAttributeDescriptions(map: Record<string, string>): void {\n attributeDescriptions = { ...attributeDescriptions, ...map };\n}\n\nexport function resolveObjectTypeDescription(name: string | undefined): string | undefined {\n if (!name) return undefined;\n return objectTypeDescriptions[name];\n}\n\nexport function resolveAttributeDescription(name: string | undefined): string | undefined {\n if (!name) return undefined;\n return attributeDescriptions[name];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"uns-object.d.ts","sourceRoot":"","sources":["../../src/uns/uns-object.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAmC,MAAM,+BAA+B,CAAC;AAEtG,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAAuB,CAAC;AAEhD,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAEvE,MAAM,MAAM,aAAa,GAAG,EAAE,GAAG,sBAAsB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAGxE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtD,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAEtF"}
1
+ {"version":3,"file":"uns-object.d.ts","sourceRoot":"","sources":["../../src/uns/uns-object.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAmC,MAAM,+BAA+B,CAAC;AAGtG,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAAuB,CAAC;AAEhD,MAAM,MAAM,sBAAsB,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAEvE,MAAM,MAAM,aAAa,GAAG,EAAE,GAAG,sBAAsB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAGxE,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtD,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAKtF"}
@@ -1,8 +1,10 @@
1
1
  // Slimmed: use generated dictionary as the source of object types.
2
2
  // Ensure generate-uns-dictionary is run (or provide your own generated file).
3
3
  import { GeneratedObjectTypes, GeneratedObjectTypeDescriptions } from "./uns-dictionary.generated.js";
4
+ import { resolveObjectTypeDescription } from "./uns-dictionary-registry.js";
4
5
  export const ObjectTypes = GeneratedObjectTypes;
5
6
  export function getObjectTypeDescription(objectType) {
6
- return GeneratedObjectTypeDescriptions[objectType];
7
+ return (resolveObjectTypeDescription(objectType) ??
8
+ GeneratedObjectTypeDescriptions[objectType]);
7
9
  }
8
10
  //# sourceMappingURL=uns-object.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"uns-object.js","sourceRoot":"","sources":["../../src/uns/uns-object.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,8EAA8E;AAC9E,OAAO,EAAE,oBAAoB,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAEtG,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAShD,MAAM,UAAU,wBAAwB,CAAC,UAAyB;IAChE,OAAQ,+BAAsE,CAAC,UAAU,CAAC,CAAC;AAC7F,CAAC","sourcesContent":["// Slimmed: use generated dictionary as the source of object types.\n// Ensure generate-uns-dictionary is run (or provide your own generated file).\nimport { GeneratedObjectTypes, GeneratedObjectTypeDescriptions } from \"./uns-dictionary.generated.js\";\n\nexport const ObjectTypes = GeneratedObjectTypes;\n\nexport type KnownUnsObjectTypeName = keyof typeof GeneratedObjectTypes;\n\nexport type UnsObjectType = \"\" | KnownUnsObjectTypeName | (string & {});\n\n// Default object id is \"main\" when none is provided.\nexport type UnsObjectId = \"main\" | \"\" | (string & {});\n\nexport function getObjectTypeDescription(objectType: UnsObjectType): string | undefined {\n return (GeneratedObjectTypeDescriptions as Record<string, string | undefined>)[objectType];\n}\n"]}
1
+ {"version":3,"file":"uns-object.js","sourceRoot":"","sources":["../../src/uns/uns-object.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,8EAA8E;AAC9E,OAAO,EAAE,oBAAoB,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAE5E,MAAM,CAAC,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAShD,MAAM,UAAU,wBAAwB,CAAC,UAAyB;IAChE,OAAO,CACL,4BAA4B,CAAC,UAAU,CAAC;QACvC,+BAAsE,CAAC,UAAU,CAAC,CACpF,CAAC;AACJ,CAAC","sourcesContent":["// Slimmed: use generated dictionary as the source of object types.\n// Ensure generate-uns-dictionary is run (or provide your own generated file).\nimport { GeneratedObjectTypes, GeneratedObjectTypeDescriptions } from \"./uns-dictionary.generated.js\";\nimport { resolveObjectTypeDescription } from \"./uns-dictionary-registry.js\";\n\nexport const ObjectTypes = GeneratedObjectTypes;\n\nexport type KnownUnsObjectTypeName = keyof typeof GeneratedObjectTypes;\n\nexport type UnsObjectType = \"\" | KnownUnsObjectTypeName | (string & {});\n\n// Default object id is \"main\" when none is provided.\nexport type UnsObjectId = \"main\" | \"\" | (string & {});\n\nexport function getObjectTypeDescription(objectType: UnsObjectType): string | undefined {\n return (\n resolveObjectTypeDescription(objectType) ??\n (GeneratedObjectTypeDescriptions as Record<string, string | undefined>)[objectType]\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uns-kit/core",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Core utilities and runtime building blocks for UNS-based realtime transformers.",
5
5
  "type": "module",
6
6
  "license": "MIT",