@matter/model 0.16.0-alpha.0-20251018-dd1ea6a8a → 0.16.0-alpha.0-20251020-3f6e46245
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/cjs/common/Metatype.d.ts +1 -1
- package/dist/cjs/decoration/decorators/attribute.d.ts +11 -0
- package/dist/cjs/decoration/decorators/attribute.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/attribute.js +32 -0
- package/dist/cjs/decoration/decorators/attribute.js.map +6 -0
- package/dist/cjs/decoration/decorators/cluster.d.ts +11 -0
- package/dist/cjs/decoration/decorators/cluster.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/cluster.js +32 -0
- package/dist/cjs/decoration/decorators/cluster.js.map +6 -0
- package/dist/cjs/decoration/decorators/command.d.ts +12 -0
- package/dist/cjs/decoration/decorators/command.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/command.js +34 -0
- package/dist/cjs/decoration/decorators/command.js.map +6 -0
- package/dist/cjs/decoration/decorators/datatype.d.ts +11 -0
- package/dist/cjs/decoration/decorators/datatype.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/datatype.js +32 -0
- package/dist/cjs/decoration/decorators/datatype.js.map +6 -0
- package/dist/cjs/decoration/decorators/element.d.ts +40 -0
- package/dist/cjs/decoration/decorators/element.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/element.js +101 -0
- package/dist/cjs/decoration/decorators/element.js.map +6 -0
- package/dist/cjs/decoration/decorators/event.d.ts +14 -0
- package/dist/cjs/decoration/decorators/event.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/event.js +32 -0
- package/dist/cjs/decoration/decorators/event.js.map +6 -0
- package/dist/cjs/decoration/decorators/field.d.ts +14 -0
- package/dist/cjs/decoration/decorators/field.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/field.js +32 -0
- package/dist/cjs/decoration/decorators/field.js.map +6 -0
- package/dist/cjs/decoration/decorators/index.d.ts +16 -0
- package/dist/cjs/decoration/decorators/index.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/index.js +33 -0
- package/dist/cjs/decoration/decorators/index.js.map +6 -0
- package/dist/cjs/decoration/decorators/listOf.d.ts +12 -0
- package/dist/cjs/decoration/decorators/listOf.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/listOf.js +47 -0
- package/dist/cjs/decoration/decorators/listOf.js.map +6 -0
- package/dist/cjs/decoration/decorators/mandatory.d.ts +11 -0
- package/dist/cjs/decoration/decorators/mandatory.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/mandatory.js +41 -0
- package/dist/cjs/decoration/decorators/mandatory.js.map +6 -0
- package/dist/cjs/decoration/decorators/nonvolatile.d.ts +11 -0
- package/dist/cjs/decoration/decorators/nonvolatile.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/nonvolatile.js +41 -0
- package/dist/cjs/decoration/decorators/nonvolatile.js.map +6 -0
- package/dist/cjs/decoration/decorators/nullable.d.ts +11 -0
- package/dist/cjs/decoration/decorators/nullable.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/nullable.js +41 -0
- package/dist/cjs/decoration/decorators/nullable.js.map +6 -0
- package/dist/cjs/decoration/decorators/response.d.ts +12 -0
- package/dist/cjs/decoration/decorators/response.d.ts.map +1 -0
- package/dist/cjs/decoration/decorators/response.js +49 -0
- package/dist/cjs/decoration/decorators/response.js.map +6 -0
- package/dist/cjs/decoration/errors.d.ts +29 -0
- package/dist/cjs/decoration/errors.d.ts.map +1 -0
- package/dist/cjs/decoration/errors.js +44 -0
- package/dist/cjs/decoration/errors.js.map +6 -0
- package/dist/cjs/decoration/index.d.ts +9 -0
- package/dist/cjs/decoration/index.d.ts.map +1 -0
- package/dist/cjs/decoration/index.js +26 -0
- package/dist/cjs/decoration/index.js.map +6 -0
- package/dist/cjs/decoration/semantics/ClassSemantics.d.ts +84 -0
- package/dist/cjs/decoration/semantics/ClassSemantics.d.ts.map +1 -0
- package/dist/cjs/decoration/semantics/ClassSemantics.js +266 -0
- package/dist/cjs/decoration/semantics/ClassSemantics.js.map +6 -0
- package/dist/cjs/decoration/semantics/FieldSemantics.d.ts +21 -0
- package/dist/cjs/decoration/semantics/FieldSemantics.d.ts.map +1 -0
- package/dist/cjs/decoration/semantics/FieldSemantics.js +57 -0
- package/dist/cjs/decoration/semantics/FieldSemantics.js.map +6 -0
- package/dist/cjs/decoration/semantics/Semantics.d.ts +68 -0
- package/dist/cjs/decoration/semantics/Semantics.d.ts.map +1 -0
- package/dist/cjs/decoration/semantics/Semantics.js +156 -0
- package/dist/cjs/decoration/semantics/Semantics.js.map +6 -0
- package/dist/cjs/decoration/semantics/index.d.ts +9 -0
- package/dist/cjs/decoration/semantics/index.d.ts.map +1 -0
- package/dist/cjs/decoration/semantics/index.js +26 -0
- package/dist/cjs/decoration/semantics/index.js.map +6 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/models/AttributeModel.d.ts +1 -0
- package/dist/cjs/models/AttributeModel.d.ts.map +1 -1
- package/dist/cjs/models/AttributeModel.js +1 -0
- package/dist/cjs/models/AttributeModel.js.map +1 -1
- package/dist/cjs/models/Children.js +3 -3
- package/dist/cjs/models/Children.js.map +1 -1
- package/dist/cjs/models/CommandModel.d.ts +1 -0
- package/dist/cjs/models/CommandModel.d.ts.map +1 -1
- package/dist/cjs/models/CommandModel.js +1 -0
- package/dist/cjs/models/CommandModel.js.map +1 -1
- package/dist/cjs/models/EventModel.d.ts +1 -0
- package/dist/cjs/models/EventModel.d.ts.map +1 -1
- package/dist/cjs/models/EventModel.js +1 -0
- package/dist/cjs/models/EventModel.js.map +1 -1
- package/dist/cjs/models/Globals.d.ts +1 -1
- package/dist/cjs/models/Model.d.ts +12 -3
- package/dist/cjs/models/Model.d.ts.map +1 -1
- package/dist/cjs/models/Model.js +16 -10
- package/dist/cjs/models/Model.js.map +1 -1
- package/dist/cjs/models/Schema.d.ts +14 -0
- package/dist/cjs/models/Schema.d.ts.map +1 -1
- package/dist/cjs/models/Schema.js +29 -1
- package/dist/cjs/models/Schema.js.map +1 -1
- package/dist/cjs/models/ScopeModel.d.ts +1 -1
- package/dist/cjs/models/ScopeModel.d.ts.map +1 -1
- package/dist/cjs/models/ScopeModel.js +2 -2
- package/dist/cjs/models/ScopeModel.js.map +1 -1
- package/dist/cjs/standard/elements/definitions.d.ts +1 -1
- package/dist/cjs/standard/elements/definitions.js +1 -1
- package/dist/cjs/standard/elements/{interval.element.d.ts → duration.element.d.ts} +1 -1
- package/dist/cjs/standard/elements/duration.element.d.ts.map +1 -0
- package/dist/cjs/standard/elements/{interval.element.js → duration.element.js} +4 -4
- package/dist/cjs/standard/elements/{interval.element.js.map → duration.element.js.map} +1 -1
- package/dist/cjs/standard/elements/models.d.ts +1 -1
- package/dist/cjs/standard/elements/models.js +2 -2
- package/dist/esm/common/Metatype.d.ts +1 -1
- package/dist/esm/decoration/decorators/attribute.d.ts +11 -0
- package/dist/esm/decoration/decorators/attribute.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/attribute.js +12 -0
- package/dist/esm/decoration/decorators/attribute.js.map +6 -0
- package/dist/esm/decoration/decorators/cluster.d.ts +11 -0
- package/dist/esm/decoration/decorators/cluster.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/cluster.js +12 -0
- package/dist/esm/decoration/decorators/cluster.js.map +6 -0
- package/dist/esm/decoration/decorators/command.d.ts +12 -0
- package/dist/esm/decoration/decorators/command.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/command.js +14 -0
- package/dist/esm/decoration/decorators/command.js.map +6 -0
- package/dist/esm/decoration/decorators/datatype.d.ts +11 -0
- package/dist/esm/decoration/decorators/datatype.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/datatype.js +12 -0
- package/dist/esm/decoration/decorators/datatype.js.map +6 -0
- package/dist/esm/decoration/decorators/element.d.ts +40 -0
- package/dist/esm/decoration/decorators/element.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/element.js +81 -0
- package/dist/esm/decoration/decorators/element.js.map +6 -0
- package/dist/esm/decoration/decorators/event.d.ts +14 -0
- package/dist/esm/decoration/decorators/event.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/event.js +12 -0
- package/dist/esm/decoration/decorators/event.js.map +6 -0
- package/dist/esm/decoration/decorators/field.d.ts +14 -0
- package/dist/esm/decoration/decorators/field.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/field.js +12 -0
- package/dist/esm/decoration/decorators/field.js.map +6 -0
- package/dist/esm/decoration/decorators/index.d.ts +16 -0
- package/dist/esm/decoration/decorators/index.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/index.js +16 -0
- package/dist/esm/decoration/decorators/index.js.map +6 -0
- package/dist/esm/decoration/decorators/listOf.d.ts +12 -0
- package/dist/esm/decoration/decorators/listOf.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/listOf.js +27 -0
- package/dist/esm/decoration/decorators/listOf.js.map +6 -0
- package/dist/esm/decoration/decorators/mandatory.d.ts +11 -0
- package/dist/esm/decoration/decorators/mandatory.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/mandatory.js +21 -0
- package/dist/esm/decoration/decorators/mandatory.js.map +6 -0
- package/dist/esm/decoration/decorators/nonvolatile.d.ts +11 -0
- package/dist/esm/decoration/decorators/nonvolatile.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/nonvolatile.js +21 -0
- package/dist/esm/decoration/decorators/nonvolatile.js.map +6 -0
- package/dist/esm/decoration/decorators/nullable.d.ts +11 -0
- package/dist/esm/decoration/decorators/nullable.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/nullable.js +21 -0
- package/dist/esm/decoration/decorators/nullable.js.map +6 -0
- package/dist/esm/decoration/decorators/response.d.ts +12 -0
- package/dist/esm/decoration/decorators/response.d.ts.map +1 -0
- package/dist/esm/decoration/decorators/response.js +29 -0
- package/dist/esm/decoration/decorators/response.js.map +6 -0
- package/dist/esm/decoration/errors.d.ts +29 -0
- package/dist/esm/decoration/errors.d.ts.map +1 -0
- package/dist/esm/decoration/errors.js +24 -0
- package/dist/esm/decoration/errors.js.map +6 -0
- package/dist/esm/decoration/index.d.ts +9 -0
- package/dist/esm/decoration/index.d.ts.map +1 -0
- package/dist/esm/decoration/index.js +9 -0
- package/dist/esm/decoration/index.js.map +6 -0
- package/dist/esm/decoration/semantics/ClassSemantics.d.ts +84 -0
- package/dist/esm/decoration/semantics/ClassSemantics.d.ts.map +1 -0
- package/dist/esm/decoration/semantics/ClassSemantics.js +246 -0
- package/dist/esm/decoration/semantics/ClassSemantics.js.map +6 -0
- package/dist/esm/decoration/semantics/FieldSemantics.d.ts +21 -0
- package/dist/esm/decoration/semantics/FieldSemantics.d.ts.map +1 -0
- package/dist/esm/decoration/semantics/FieldSemantics.js +37 -0
- package/dist/esm/decoration/semantics/FieldSemantics.js.map +6 -0
- package/dist/esm/decoration/semantics/Semantics.d.ts +68 -0
- package/dist/esm/decoration/semantics/Semantics.d.ts.map +1 -0
- package/dist/esm/decoration/semantics/Semantics.js +126 -0
- package/dist/esm/decoration/semantics/Semantics.js.map +6 -0
- package/dist/esm/decoration/semantics/index.d.ts +9 -0
- package/dist/esm/decoration/semantics/index.d.ts.map +1 -0
- package/dist/esm/decoration/semantics/index.js +9 -0
- package/dist/esm/decoration/semantics/index.js.map +6 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/AttributeModel.d.ts +1 -0
- package/dist/esm/models/AttributeModel.d.ts.map +1 -1
- package/dist/esm/models/AttributeModel.js +1 -0
- package/dist/esm/models/AttributeModel.js.map +1 -1
- package/dist/esm/models/Children.js +3 -3
- package/dist/esm/models/Children.js.map +1 -1
- package/dist/esm/models/CommandModel.d.ts +1 -0
- package/dist/esm/models/CommandModel.d.ts.map +1 -1
- package/dist/esm/models/CommandModel.js +1 -0
- package/dist/esm/models/CommandModel.js.map +1 -1
- package/dist/esm/models/EventModel.d.ts +1 -0
- package/dist/esm/models/EventModel.d.ts.map +1 -1
- package/dist/esm/models/EventModel.js +1 -0
- package/dist/esm/models/EventModel.js.map +1 -1
- package/dist/esm/models/Globals.d.ts +1 -1
- package/dist/esm/models/Model.d.ts +12 -3
- package/dist/esm/models/Model.d.ts.map +1 -1
- package/dist/esm/models/Model.js +16 -10
- package/dist/esm/models/Model.js.map +1 -1
- package/dist/esm/models/Schema.d.ts +14 -0
- package/dist/esm/models/Schema.d.ts.map +1 -1
- package/dist/esm/models/Schema.js +29 -1
- package/dist/esm/models/Schema.js.map +1 -1
- package/dist/esm/models/ScopeModel.d.ts +1 -1
- package/dist/esm/models/ScopeModel.d.ts.map +1 -1
- package/dist/esm/models/ScopeModel.js +2 -2
- package/dist/esm/models/ScopeModel.js.map +1 -1
- package/dist/esm/standard/elements/definitions.d.ts +1 -1
- package/dist/esm/standard/elements/definitions.js +1 -1
- package/dist/esm/standard/elements/{interval.element.d.ts → duration.element.d.ts} +1 -1
- package/dist/esm/standard/elements/duration.element.d.ts.map +1 -0
- package/dist/esm/standard/elements/{interval.element.js → duration.element.js} +1 -1
- package/dist/esm/standard/elements/{interval.element.js.map → duration.element.js.map} +1 -1
- package/dist/esm/standard/elements/models.d.ts +1 -1
- package/dist/esm/standard/elements/models.js +2 -2
- package/package.json +4 -4
- package/src/decoration/decorators/attribute.ts +13 -0
- package/src/decoration/decorators/cluster.ts +13 -0
- package/src/decoration/decorators/command.ts +16 -0
- package/src/decoration/decorators/datatype.ts +13 -0
- package/src/decoration/decorators/element.ts +128 -0
- package/src/decoration/decorators/event.ts +16 -0
- package/src/decoration/decorators/field.ts +16 -0
- package/src/decoration/decorators/index.ts +16 -0
- package/src/decoration/decorators/listOf.ts +30 -0
- package/src/decoration/decorators/mandatory.ts +22 -0
- package/src/decoration/decorators/nonvolatile.ts +22 -0
- package/src/decoration/decorators/nullable.ts +22 -0
- package/src/decoration/decorators/response.ts +34 -0
- package/src/decoration/errors.ts +29 -0
- package/src/decoration/index.ts +9 -0
- package/src/decoration/semantics/ClassSemantics.ts +374 -0
- package/src/decoration/semantics/FieldSemantics.ts +49 -0
- package/src/decoration/semantics/Semantics.ts +170 -0
- package/src/decoration/semantics/index.ts +9 -0
- package/src/index.ts +1 -0
- package/src/models/AttributeModel.ts +1 -0
- package/src/models/Children.ts +3 -3
- package/src/models/CommandModel.ts +1 -0
- package/src/models/EventModel.ts +1 -0
- package/src/models/Model.ts +34 -12
- package/src/models/Schema.ts +51 -0
- package/src/models/ScopeModel.ts +2 -2
- package/src/standard/elements/definitions.ts +1 -1
- package/src/standard/elements/models.ts +1 -1
- package/dist/cjs/standard/elements/interval.element.d.ts.map +0 -1
- package/dist/esm/standard/elements/interval.element.d.ts.map +0 -1
- /package/src/standard/elements/{interval.element.ts → duration.element.ts} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var listOf_exports = {};
|
|
20
|
+
__export(listOf_exports, {
|
|
21
|
+
listOf: () => listOf
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(listOf_exports);
|
|
24
|
+
var import_Semantics = require("#decoration/semantics/Semantics.js");
|
|
25
|
+
var import_general = require("#general");
|
|
26
|
+
var import_FieldModel = require("#models/FieldModel.js");
|
|
27
|
+
var import_Schema = require("#models/Schema.js");
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
31
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
function listOf(entry) {
|
|
34
|
+
return (0, import_general.Decorator)((_target, context) => {
|
|
35
|
+
import_Semantics.Semantics.of(context).mutableModel.operationalBase = new import_FieldModel.FieldModel(
|
|
36
|
+
{
|
|
37
|
+
name: context.name.toString(),
|
|
38
|
+
type: "list"
|
|
39
|
+
},
|
|
40
|
+
new import_FieldModel.FieldModel({
|
|
41
|
+
name: "entry",
|
|
42
|
+
operationalBase: (0, import_Schema.Schema)(entry)
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=listOf.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/decoration/decorators/listOf.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,uBAA0B;AAC1B,qBAA0B;AAC1B,wBAA2B;AAE3B,oBAAuB;AAVvB;AAAA;AAAA;AAAA;AAAA;AAeO,SAAS,OAAO,OAAkD;AACrE,aAAO,0BAAU,CAAC,SAAS,YAAY;AACnC,+BAAU,GAAG,OAAO,EAAE,aAAa,kBAAkB,IAAI;AAAA,MACrD;AAAA,QACI,MAAM,QAAQ,KAAK,SAAS;AAAA,QAC5B,MAAM;AAAA,MACV;AAAA,MAEA,IAAI,6BAAW;AAAA,QACX,MAAM;AAAA,QACN,qBAAiB,sBAAO,KAAK;AAAA,MACjC,CAAC;AAAA,IACL;AAAA,EACJ,CAAC;AACL;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Decorator } from "#general";
|
|
7
|
+
/**
|
|
8
|
+
* Mark a field as mandatory.
|
|
9
|
+
*/
|
|
10
|
+
export declare const mandatory: Decorator.PropertyCollector;
|
|
11
|
+
//# sourceMappingURL=mandatory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mandatory.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/mandatory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,SAAS,6BAQpB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var mandatory_exports = {};
|
|
20
|
+
__export(mandatory_exports, {
|
|
21
|
+
mandatory: () => mandatory
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(mandatory_exports);
|
|
24
|
+
var import_errors = require("#decoration/errors.js");
|
|
25
|
+
var import_FieldSemantics = require("#decoration/semantics/FieldSemantics.js");
|
|
26
|
+
var import_general = require("#general");
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
30
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
31
|
+
*/
|
|
32
|
+
const mandatory = (0, import_general.Decorator)((_target, context) => {
|
|
33
|
+
const model = import_FieldSemantics.FieldSemantics.of(context).mutableModel;
|
|
34
|
+
if (!("conformance" in model)) {
|
|
35
|
+
throw new import_errors.InvalidMetadataError(
|
|
36
|
+
`Cannot set ${model.path} to mandatory because ${model.tag} elements do not support conformance`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
model.conformance = "M";
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=mandatory.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/decoration/decorators/mandatory.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,oBAAqC;AACrC,4BAA+B;AAC/B,qBAA0B;AAR1B;AAAA;AAAA;AAAA;AAAA;AAaO,MAAM,gBAAY,0BAAuC,CAAC,SAAS,YAAY;AAClF,QAAM,QAAQ,qCAAe,GAAG,OAAO,EAAE;AACzC,MAAI,EAAE,iBAAiB,QAAQ;AAC3B,UAAM,IAAI;AAAA,MACN,cAAc,MAAM,IAAI,yBAAyB,MAAM,GAAG;AAAA,IAC9D;AAAA,EACJ;AACA,QAAM,cAAc;AACxB,CAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Decorator } from "#general";
|
|
7
|
+
/**
|
|
8
|
+
* Mark a field as nonvolatile (persistent).
|
|
9
|
+
*/
|
|
10
|
+
export declare const nonvolatile: Decorator.PropertyCollector;
|
|
11
|
+
//# sourceMappingURL=nonvolatile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nonvolatile.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/nonvolatile.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC;;GAEG;AACH,eAAO,MAAM,WAAW,6BAMtB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var nonvolatile_exports = {};
|
|
20
|
+
__export(nonvolatile_exports, {
|
|
21
|
+
nonvolatile: () => nonvolatile
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(nonvolatile_exports);
|
|
24
|
+
var import_Quality = require("#aspects/Quality.js");
|
|
25
|
+
var import_errors = require("#decoration/errors.js");
|
|
26
|
+
var import_FieldSemantics = require("#decoration/semantics/FieldSemantics.js");
|
|
27
|
+
var import_general = require("#general");
|
|
28
|
+
var import_ValueModel = require("#models/ValueModel.js");
|
|
29
|
+
/**
|
|
30
|
+
* @license
|
|
31
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
32
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
33
|
+
*/
|
|
34
|
+
const nonvolatile = (0, import_general.Decorator)((_target, context) => {
|
|
35
|
+
const model = import_FieldSemantics.FieldSemantics.of(context).mutableModel;
|
|
36
|
+
if (!(model instanceof import_ValueModel.ValueModel)) {
|
|
37
|
+
throw new import_errors.InvalidMetadataError("Only a value models may be nonvolatile");
|
|
38
|
+
}
|
|
39
|
+
model.quality = new import_Quality.Quality({ ...model.quality, nonvolatile: true });
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=nonvolatile.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/decoration/decorators/nonvolatile.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,qBAAwB;AACxB,oBAAqC;AACrC,4BAA+B;AAC/B,qBAA0B;AAC1B,wBAA2B;AAV3B;AAAA;AAAA;AAAA;AAAA;AAeO,MAAM,kBAAc,0BAAuC,CAAC,SAAS,YAAY;AACpF,QAAM,QAAQ,qCAAe,GAAG,OAAO,EAAE;AACzC,MAAI,EAAE,iBAAiB,+BAAa;AAChC,UAAM,IAAI,mCAAqB,wCAAwC;AAAA,EAC3E;AACA,QAAM,UAAU,IAAI,uBAAQ,EAAE,GAAG,MAAM,SAAS,aAAa,KAAK,CAAC;AACvE,CAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Decorator } from "#general";
|
|
7
|
+
/**
|
|
8
|
+
* Mark a field as nullable.
|
|
9
|
+
*/
|
|
10
|
+
export declare const nullable: Decorator.PropertyCollector;
|
|
11
|
+
//# sourceMappingURL=nullable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullable.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/nullable.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC;;GAEG;AACH,eAAO,MAAM,QAAQ,6BAMnB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var nullable_exports = {};
|
|
20
|
+
__export(nullable_exports, {
|
|
21
|
+
nullable: () => nullable
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(nullable_exports);
|
|
24
|
+
var import_Quality = require("#aspects/Quality.js");
|
|
25
|
+
var import_errors = require("#decoration/errors.js");
|
|
26
|
+
var import_FieldSemantics = require("#decoration/semantics/FieldSemantics.js");
|
|
27
|
+
var import_general = require("#general");
|
|
28
|
+
var import_ValueModel = require("#models/ValueModel.js");
|
|
29
|
+
/**
|
|
30
|
+
* @license
|
|
31
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
32
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
33
|
+
*/
|
|
34
|
+
const nullable = (0, import_general.Decorator)((_target, context) => {
|
|
35
|
+
const model = import_FieldSemantics.FieldSemantics.of(context).mutableModel;
|
|
36
|
+
if (!(model instanceof import_ValueModel.ValueModel)) {
|
|
37
|
+
throw new import_errors.InvalidMetadataError("Only value models may be nullable");
|
|
38
|
+
}
|
|
39
|
+
model.quality = new import_Quality.Quality({ ...model.quality, nullable: true });
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=nullable.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/decoration/decorators/nullable.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,qBAAwB;AACxB,oBAAqC;AACrC,4BAA+B;AAC/B,qBAA0B;AAC1B,wBAA2B;AAV3B;AAAA;AAAA;AAAA;AAAA;AAeO,MAAM,eAAW,0BAAuC,CAAC,SAAS,YAAY;AACjF,QAAM,QAAQ,qCAAe,GAAG,OAAO,EAAE;AACzC,MAAI,EAAE,iBAAiB,+BAAa;AAChC,UAAM,IAAI,mCAAqB,mCAAmC;AAAA,EACtE;AACA,QAAM,UAAU,IAAI,uBAAQ,EAAE,GAAG,MAAM,SAAS,UAAU,KAAK,CAAC;AACpE,CAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Decorator } from "#general";
|
|
7
|
+
import { DatatypeModel } from "#models/DatatypeModel.js";
|
|
8
|
+
/**
|
|
9
|
+
* Specify the response type for a command.
|
|
10
|
+
*/
|
|
11
|
+
export declare function response(type: DatatypeModel): Decorator.ClassMethod;
|
|
12
|
+
//# sourceMappingURL=response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/response.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC,WAAW,CAkBnE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var response_exports = {};
|
|
20
|
+
__export(response_exports, {
|
|
21
|
+
response: () => response
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(response_exports);
|
|
24
|
+
var import_FieldSemantics = require("#decoration/semantics/FieldSemantics.js");
|
|
25
|
+
var import_CommandElement = require("#elements/CommandElement.js");
|
|
26
|
+
var import_general = require("#general");
|
|
27
|
+
var import_CommandModel = require("#models/CommandModel.js");
|
|
28
|
+
/**
|
|
29
|
+
* @license
|
|
30
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
31
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
32
|
+
*/
|
|
33
|
+
function response(type) {
|
|
34
|
+
return (0, import_general.Decorator)((_target, context) => {
|
|
35
|
+
const requestSemantics = import_FieldSemantics.FieldSemantics.of(context);
|
|
36
|
+
requestSemantics.modelType = import_CommandModel.CommandModel;
|
|
37
|
+
const request = requestSemantics.mutableModel;
|
|
38
|
+
const name = `${request.name}Response`;
|
|
39
|
+
new import_CommandModel.CommandModel({
|
|
40
|
+
name,
|
|
41
|
+
id: request.id,
|
|
42
|
+
parent: request.parent,
|
|
43
|
+
direction: import_CommandElement.CommandElement.Direction.Response,
|
|
44
|
+
operationalBase: type
|
|
45
|
+
});
|
|
46
|
+
request.response = name;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=response.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/decoration/decorators/response.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,4BAA+B;AAC/B,4BAA+B;AAC/B,qBAA0B;AAC1B,0BAA6B;AAT7B;AAAA;AAAA;AAAA;AAAA;AAeO,SAAS,SAAS,MAA4C;AACjE,aAAO,0BAAU,CAAC,SAAS,YAAY;AACnC,UAAM,mBAAmB,qCAAe,GAAG,OAAO;AAElD,qBAAiB,YAAY;AAC7B,UAAM,UAAU,iBAAiB;AAEjC,UAAM,OAAO,GAAG,QAAQ,IAAI;AAC5B,QAAI,iCAAa;AAAA,MACb;AAAA,MACA,IAAI,QAAQ;AAAA,MACZ,QAAQ,QAAQ;AAAA,MAChB,WAAW,qCAAe,UAAU;AAAA,MACpC,iBAAiB;AAAA,IACrB,CAAC;AAED,YAAQ,WAAW;AAAA,EACvB,CAAC;AACL;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ImplementationError } from "#general";
|
|
7
|
+
export declare class MetadataError extends ImplementationError {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Thrown when a type is assigned to a class or property that is already typed.
|
|
11
|
+
*/
|
|
12
|
+
export declare class MetadataConflictError extends MetadataError {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Thrown when metadata is inappropriate for the decorated language element.
|
|
16
|
+
*/
|
|
17
|
+
export declare class InvalidMetadataError extends MetadataError {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Thrown when an error occurs instantiating a dummy instance of a class for introspection purposes.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ClassIntrospectionError extends MetadataError {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Thrown when required metadata is missing.
|
|
26
|
+
*/
|
|
27
|
+
export declare class MissingMetadataError extends MetadataError {
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/decoration/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,qBAAa,aAAc,SAAQ,mBAAmB;CAAG;AAEzD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;CAAG;AAE3D;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;CAAG;AAE1D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,aAAa;CAAG;AAE7D;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;CAAG"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var errors_exports = {};
|
|
20
|
+
__export(errors_exports, {
|
|
21
|
+
ClassIntrospectionError: () => ClassIntrospectionError,
|
|
22
|
+
InvalidMetadataError: () => InvalidMetadataError,
|
|
23
|
+
MetadataConflictError: () => MetadataConflictError,
|
|
24
|
+
MetadataError: () => MetadataError,
|
|
25
|
+
MissingMetadataError: () => MissingMetadataError
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(errors_exports);
|
|
28
|
+
var import_general = require("#general");
|
|
29
|
+
/**
|
|
30
|
+
* @license
|
|
31
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
32
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
33
|
+
*/
|
|
34
|
+
class MetadataError extends import_general.ImplementationError {
|
|
35
|
+
}
|
|
36
|
+
class MetadataConflictError extends MetadataError {
|
|
37
|
+
}
|
|
38
|
+
class InvalidMetadataError extends MetadataError {
|
|
39
|
+
}
|
|
40
|
+
class ClassIntrospectionError extends MetadataError {
|
|
41
|
+
}
|
|
42
|
+
class MissingMetadataError extends MetadataError {
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/decoration/errors.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,qBAAoC;AANpC;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,sBAAsB,mCAAoB;AAAC;AAKjD,MAAM,8BAA8B,cAAc;AAAC;AAKnD,MAAM,6BAA6B,cAAc;AAAC;AAKlD,MAAM,gCAAgC,cAAc;AAAC;AAKrD,MAAM,6BAA6B,cAAc;AAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decoration/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var decoration_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(decoration_exports);
|
|
18
|
+
__reExport(decoration_exports, require("./decorators/index.js"), module.exports);
|
|
19
|
+
__reExport(decoration_exports, require("./errors.js"), module.exports);
|
|
20
|
+
__reExport(decoration_exports, require("./semantics/index.js"), module.exports);
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
24
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
25
|
+
*/
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { Model } from "#models/index.js";
|
|
7
|
+
import { FieldSemantics } from "./FieldSemantics.js";
|
|
8
|
+
import { Semantics } from "./Semantics.js";
|
|
9
|
+
/**
|
|
10
|
+
* Matter semantic metadata attached to a class via decorators.
|
|
11
|
+
*
|
|
12
|
+
* We use decorators to allow for definition of model elements in the context of a specific type.
|
|
13
|
+
*
|
|
14
|
+
* Currently there are JavaScript/TypeScript limitations to be aware of when decorating type definitions:
|
|
15
|
+
*
|
|
16
|
+
* * Decorators may only be applied to JavaScript classes. So if you want to define an interface without
|
|
17
|
+
* implementation, you must implement as a class and use as an interface. That's why this is "class" metadata.
|
|
18
|
+
*
|
|
19
|
+
* * Decorators may not affect the TypeScript type of an object. This means that you must define both the Matter type
|
|
20
|
+
* (e.g. {@link uint32}) and TypeScript type (e.g. `number`).
|
|
21
|
+
*/
|
|
22
|
+
export declare class ClassSemantics extends Semantics {
|
|
23
|
+
#private;
|
|
24
|
+
/**
|
|
25
|
+
* The model that represents the semantics for this class.
|
|
26
|
+
*
|
|
27
|
+
* This may be {@link localModel} or {@link prototypeBaseModel}
|
|
28
|
+
*/
|
|
29
|
+
get semanticModel(): Model<import("../../index.js").BaseElement, Model<import("../../index.js").BaseElement, any>> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Get the class constructor
|
|
32
|
+
*/
|
|
33
|
+
get new(): ClassSemantics.Constructor | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Assign the constructor for the class.
|
|
36
|
+
*/
|
|
37
|
+
set new(fn: ClassSemantics.Constructor);
|
|
38
|
+
/**
|
|
39
|
+
* The class {@link Model} inherited from {@link new}'s prototype chain, if any.
|
|
40
|
+
*/
|
|
41
|
+
get prototypeBaseModel(): Model | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Obtain a {@link FieldSemantics} for the named field.
|
|
44
|
+
*/
|
|
45
|
+
fieldFor(name: string | symbol): FieldSemantics;
|
|
46
|
+
/**
|
|
47
|
+
* Add logical fields for unrecognized members of an object.
|
|
48
|
+
*
|
|
49
|
+
* This extends the model with untyped fields for properties that are not otherwise typed.
|
|
50
|
+
*/
|
|
51
|
+
defineUnknownMembers(instance: unknown): void;
|
|
52
|
+
/**
|
|
53
|
+
* Obtain the {@link ClassSemantics} for {@link source}.
|
|
54
|
+
*/
|
|
55
|
+
static of(source: ClassSemantics.Source): ClassSemantics;
|
|
56
|
+
/**
|
|
57
|
+
* Determine {@link new} has semantic decoration.
|
|
58
|
+
*/
|
|
59
|
+
static hasOwnSemantics(source: ClassSemantics.Constructor): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Access the {@link ClassSemantics} of {@link new} if it is defined.
|
|
62
|
+
*/
|
|
63
|
+
static maybeOf(source: ClassSemantics.Constructor): ClassSemantics | undefined;
|
|
64
|
+
finalize(): void;
|
|
65
|
+
protected integrateModel(model: Model): Model<import("../../index.js").BaseElement, Model<import("../../index.js").BaseElement, any>>;
|
|
66
|
+
protected createModel(type?: Model.ConcreteType): Model<import("../../index.js").BaseElement, Model<import("../../index.js").BaseElement, any>>;
|
|
67
|
+
}
|
|
68
|
+
export declare namespace ClassSemantics {
|
|
69
|
+
/**
|
|
70
|
+
* A standard constructor with an optional decoration extension point.
|
|
71
|
+
*/
|
|
72
|
+
interface Constructor extends NewableFunction {
|
|
73
|
+
/**
|
|
74
|
+
* If present, invoked for custom decoration after installing constructor.
|
|
75
|
+
*/
|
|
76
|
+
[extend]?: (semantics: ClassSemantics) => void;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* An object for which you may obtain {@link ClassSemantics}.
|
|
80
|
+
*/
|
|
81
|
+
type Source = Constructor | DecoratorContext | ClassSemantics;
|
|
82
|
+
const extend: unique symbol;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=ClassSemantics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClassSemantics.d.ts","sourceRoot":"","sources":["../../../../src/decoration/semantics/ClassSemantics.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAA6B,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAMpE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAmB3C;;;;;;;;;;;;GAYG;AACH,qBAAa,cAAe,SAAQ,SAAS;;IAIzC;;;;OAIG;IACH,IAAI,aAAa,8GAahB;IAED;;OAEG;IACH,IAAI,GAAG,IAAI,cAAc,CAAC,WAAW,GAAG,SAAS,CAEhD;IAED;;OAEG;IACH,IAAI,GAAG,CAAC,EAAE,EAAE,cAAc,CAAC,WAAW,EA6BrC;IAED;;OAEG;IACH,IAAI,kBAAkB,IAAI,KAAK,GAAG,SAAS,CAsB1C;IAED;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAmB9B;;;;OAIG;IACH,oBAAoB,CAAC,QAAQ,EAAE,OAAO;IAuDtC;;OAEG;WACa,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,MAAM;IAuChD;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW;IAIzD;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,WAAW;IAUxC,QAAQ;cA6CE,cAAc,CAAC,KAAK,EAAE,KAAK;cAoB3B,WAAW,CAAC,IAAI,GAAE,KAAK,CAAC,YAA4B;CAO1E;AAED,yBAAiB,cAAc,CAAC;IAC5B;;OAEG;IACH,UAAiB,WAAY,SAAQ,eAAe;QAChD;;WAEG;QACH,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;KAClD;IAED;;OAEG;IACH,KAAY,MAAM,GAAG,WAAW,GAAG,gBAAgB,GAAG,cAAc,CAAC;IAE9D,MAAM,MAAM,eAAmB,CAAC;CAC1C"}
|