@matter/model 0.16.0-alpha.0-20251016-b56cf5683 → 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.
Files changed (265) hide show
  1. package/dist/cjs/common/Metatype.d.ts +1 -1
  2. package/dist/cjs/decoration/decorators/attribute.d.ts +11 -0
  3. package/dist/cjs/decoration/decorators/attribute.d.ts.map +1 -0
  4. package/dist/cjs/decoration/decorators/attribute.js +32 -0
  5. package/dist/cjs/decoration/decorators/attribute.js.map +6 -0
  6. package/dist/cjs/decoration/decorators/cluster.d.ts +11 -0
  7. package/dist/cjs/decoration/decorators/cluster.d.ts.map +1 -0
  8. package/dist/cjs/decoration/decorators/cluster.js +32 -0
  9. package/dist/cjs/decoration/decorators/cluster.js.map +6 -0
  10. package/dist/cjs/decoration/decorators/command.d.ts +12 -0
  11. package/dist/cjs/decoration/decorators/command.d.ts.map +1 -0
  12. package/dist/cjs/decoration/decorators/command.js +34 -0
  13. package/dist/cjs/decoration/decorators/command.js.map +6 -0
  14. package/dist/cjs/decoration/decorators/datatype.d.ts +11 -0
  15. package/dist/cjs/decoration/decorators/datatype.d.ts.map +1 -0
  16. package/dist/cjs/decoration/decorators/datatype.js +32 -0
  17. package/dist/cjs/decoration/decorators/datatype.js.map +6 -0
  18. package/dist/cjs/decoration/decorators/element.d.ts +40 -0
  19. package/dist/cjs/decoration/decorators/element.d.ts.map +1 -0
  20. package/dist/cjs/decoration/decorators/element.js +101 -0
  21. package/dist/cjs/decoration/decorators/element.js.map +6 -0
  22. package/dist/cjs/decoration/decorators/event.d.ts +14 -0
  23. package/dist/cjs/decoration/decorators/event.d.ts.map +1 -0
  24. package/dist/cjs/decoration/decorators/event.js +32 -0
  25. package/dist/cjs/decoration/decorators/event.js.map +6 -0
  26. package/dist/cjs/decoration/decorators/field.d.ts +14 -0
  27. package/dist/cjs/decoration/decorators/field.d.ts.map +1 -0
  28. package/dist/cjs/decoration/decorators/field.js +32 -0
  29. package/dist/cjs/decoration/decorators/field.js.map +6 -0
  30. package/dist/cjs/decoration/decorators/index.d.ts +16 -0
  31. package/dist/cjs/decoration/decorators/index.d.ts.map +1 -0
  32. package/dist/cjs/decoration/decorators/index.js +33 -0
  33. package/dist/cjs/decoration/decorators/index.js.map +6 -0
  34. package/dist/cjs/decoration/decorators/listOf.d.ts +12 -0
  35. package/dist/cjs/decoration/decorators/listOf.d.ts.map +1 -0
  36. package/dist/cjs/decoration/decorators/listOf.js +47 -0
  37. package/dist/cjs/decoration/decorators/listOf.js.map +6 -0
  38. package/dist/cjs/decoration/decorators/mandatory.d.ts +11 -0
  39. package/dist/cjs/decoration/decorators/mandatory.d.ts.map +1 -0
  40. package/dist/cjs/decoration/decorators/mandatory.js +41 -0
  41. package/dist/cjs/decoration/decorators/mandatory.js.map +6 -0
  42. package/dist/cjs/decoration/decorators/nonvolatile.d.ts +11 -0
  43. package/dist/cjs/decoration/decorators/nonvolatile.d.ts.map +1 -0
  44. package/dist/cjs/decoration/decorators/nonvolatile.js +41 -0
  45. package/dist/cjs/decoration/decorators/nonvolatile.js.map +6 -0
  46. package/dist/cjs/decoration/decorators/nullable.d.ts +11 -0
  47. package/dist/cjs/decoration/decorators/nullable.d.ts.map +1 -0
  48. package/dist/cjs/decoration/decorators/nullable.js +41 -0
  49. package/dist/cjs/decoration/decorators/nullable.js.map +6 -0
  50. package/dist/cjs/decoration/decorators/response.d.ts +12 -0
  51. package/dist/cjs/decoration/decorators/response.d.ts.map +1 -0
  52. package/dist/cjs/decoration/decorators/response.js +49 -0
  53. package/dist/cjs/decoration/decorators/response.js.map +6 -0
  54. package/dist/cjs/decoration/errors.d.ts +29 -0
  55. package/dist/cjs/decoration/errors.d.ts.map +1 -0
  56. package/dist/cjs/decoration/errors.js +44 -0
  57. package/dist/cjs/decoration/errors.js.map +6 -0
  58. package/dist/cjs/decoration/index.d.ts +9 -0
  59. package/dist/cjs/decoration/index.d.ts.map +1 -0
  60. package/dist/cjs/decoration/index.js +26 -0
  61. package/dist/cjs/decoration/index.js.map +6 -0
  62. package/dist/cjs/decoration/semantics/ClassSemantics.d.ts +84 -0
  63. package/dist/cjs/decoration/semantics/ClassSemantics.d.ts.map +1 -0
  64. package/dist/cjs/decoration/semantics/ClassSemantics.js +266 -0
  65. package/dist/cjs/decoration/semantics/ClassSemantics.js.map +6 -0
  66. package/dist/cjs/decoration/semantics/FieldSemantics.d.ts +21 -0
  67. package/dist/cjs/decoration/semantics/FieldSemantics.d.ts.map +1 -0
  68. package/dist/cjs/decoration/semantics/FieldSemantics.js +57 -0
  69. package/dist/cjs/decoration/semantics/FieldSemantics.js.map +6 -0
  70. package/dist/cjs/decoration/semantics/Semantics.d.ts +68 -0
  71. package/dist/cjs/decoration/semantics/Semantics.d.ts.map +1 -0
  72. package/dist/cjs/decoration/semantics/Semantics.js +156 -0
  73. package/dist/cjs/decoration/semantics/Semantics.js.map +6 -0
  74. package/dist/cjs/decoration/semantics/index.d.ts +9 -0
  75. package/dist/cjs/decoration/semantics/index.d.ts.map +1 -0
  76. package/dist/cjs/decoration/semantics/index.js +26 -0
  77. package/dist/cjs/decoration/semantics/index.js.map +6 -0
  78. package/dist/cjs/index.d.ts +1 -0
  79. package/dist/cjs/index.d.ts.map +1 -1
  80. package/dist/cjs/index.js +1 -0
  81. package/dist/cjs/index.js.map +1 -1
  82. package/dist/cjs/models/AttributeModel.d.ts +1 -0
  83. package/dist/cjs/models/AttributeModel.d.ts.map +1 -1
  84. package/dist/cjs/models/AttributeModel.js +1 -0
  85. package/dist/cjs/models/AttributeModel.js.map +1 -1
  86. package/dist/cjs/models/Children.js +3 -3
  87. package/dist/cjs/models/Children.js.map +1 -1
  88. package/dist/cjs/models/CommandModel.d.ts +1 -0
  89. package/dist/cjs/models/CommandModel.d.ts.map +1 -1
  90. package/dist/cjs/models/CommandModel.js +1 -0
  91. package/dist/cjs/models/CommandModel.js.map +1 -1
  92. package/dist/cjs/models/EventModel.d.ts +1 -0
  93. package/dist/cjs/models/EventModel.d.ts.map +1 -1
  94. package/dist/cjs/models/EventModel.js +1 -0
  95. package/dist/cjs/models/EventModel.js.map +1 -1
  96. package/dist/cjs/models/Globals.d.ts +1 -1
  97. package/dist/cjs/models/Model.d.ts +12 -3
  98. package/dist/cjs/models/Model.d.ts.map +1 -1
  99. package/dist/cjs/models/Model.js +16 -10
  100. package/dist/cjs/models/Model.js.map +1 -1
  101. package/dist/cjs/models/Schema.d.ts +14 -0
  102. package/dist/cjs/models/Schema.d.ts.map +1 -1
  103. package/dist/cjs/models/Schema.js +29 -1
  104. package/dist/cjs/models/Schema.js.map +1 -1
  105. package/dist/cjs/models/ScopeModel.d.ts +1 -1
  106. package/dist/cjs/models/ScopeModel.d.ts.map +1 -1
  107. package/dist/cjs/models/ScopeModel.js +2 -2
  108. package/dist/cjs/models/ScopeModel.js.map +1 -1
  109. package/dist/cjs/standard/elements/definitions.d.ts +1 -1
  110. package/dist/cjs/standard/elements/definitions.js +1 -1
  111. package/dist/cjs/standard/elements/{interval.element.d.ts → duration.element.d.ts} +1 -1
  112. package/dist/cjs/standard/elements/duration.element.d.ts.map +1 -0
  113. package/dist/cjs/standard/elements/{interval.element.js → duration.element.js} +4 -4
  114. package/dist/cjs/standard/elements/{interval.element.js.map → duration.element.js.map} +1 -1
  115. package/dist/cjs/standard/elements/models.d.ts +1 -1
  116. package/dist/cjs/standard/elements/models.js +2 -2
  117. package/dist/esm/common/Metatype.d.ts +1 -1
  118. package/dist/esm/decoration/decorators/attribute.d.ts +11 -0
  119. package/dist/esm/decoration/decorators/attribute.d.ts.map +1 -0
  120. package/dist/esm/decoration/decorators/attribute.js +12 -0
  121. package/dist/esm/decoration/decorators/attribute.js.map +6 -0
  122. package/dist/esm/decoration/decorators/cluster.d.ts +11 -0
  123. package/dist/esm/decoration/decorators/cluster.d.ts.map +1 -0
  124. package/dist/esm/decoration/decorators/cluster.js +12 -0
  125. package/dist/esm/decoration/decorators/cluster.js.map +6 -0
  126. package/dist/esm/decoration/decorators/command.d.ts +12 -0
  127. package/dist/esm/decoration/decorators/command.d.ts.map +1 -0
  128. package/dist/esm/decoration/decorators/command.js +14 -0
  129. package/dist/esm/decoration/decorators/command.js.map +6 -0
  130. package/dist/esm/decoration/decorators/datatype.d.ts +11 -0
  131. package/dist/esm/decoration/decorators/datatype.d.ts.map +1 -0
  132. package/dist/esm/decoration/decorators/datatype.js +12 -0
  133. package/dist/esm/decoration/decorators/datatype.js.map +6 -0
  134. package/dist/esm/decoration/decorators/element.d.ts +40 -0
  135. package/dist/esm/decoration/decorators/element.d.ts.map +1 -0
  136. package/dist/esm/decoration/decorators/element.js +81 -0
  137. package/dist/esm/decoration/decorators/element.js.map +6 -0
  138. package/dist/esm/decoration/decorators/event.d.ts +14 -0
  139. package/dist/esm/decoration/decorators/event.d.ts.map +1 -0
  140. package/dist/esm/decoration/decorators/event.js +12 -0
  141. package/dist/esm/decoration/decorators/event.js.map +6 -0
  142. package/dist/esm/decoration/decorators/field.d.ts +14 -0
  143. package/dist/esm/decoration/decorators/field.d.ts.map +1 -0
  144. package/dist/esm/decoration/decorators/field.js +12 -0
  145. package/dist/esm/decoration/decorators/field.js.map +6 -0
  146. package/dist/esm/decoration/decorators/index.d.ts +16 -0
  147. package/dist/esm/decoration/decorators/index.d.ts.map +1 -0
  148. package/dist/esm/decoration/decorators/index.js +16 -0
  149. package/dist/esm/decoration/decorators/index.js.map +6 -0
  150. package/dist/esm/decoration/decorators/listOf.d.ts +12 -0
  151. package/dist/esm/decoration/decorators/listOf.d.ts.map +1 -0
  152. package/dist/esm/decoration/decorators/listOf.js +27 -0
  153. package/dist/esm/decoration/decorators/listOf.js.map +6 -0
  154. package/dist/esm/decoration/decorators/mandatory.d.ts +11 -0
  155. package/dist/esm/decoration/decorators/mandatory.d.ts.map +1 -0
  156. package/dist/esm/decoration/decorators/mandatory.js +21 -0
  157. package/dist/esm/decoration/decorators/mandatory.js.map +6 -0
  158. package/dist/esm/decoration/decorators/nonvolatile.d.ts +11 -0
  159. package/dist/esm/decoration/decorators/nonvolatile.d.ts.map +1 -0
  160. package/dist/esm/decoration/decorators/nonvolatile.js +21 -0
  161. package/dist/esm/decoration/decorators/nonvolatile.js.map +6 -0
  162. package/dist/esm/decoration/decorators/nullable.d.ts +11 -0
  163. package/dist/esm/decoration/decorators/nullable.d.ts.map +1 -0
  164. package/dist/esm/decoration/decorators/nullable.js +21 -0
  165. package/dist/esm/decoration/decorators/nullable.js.map +6 -0
  166. package/dist/esm/decoration/decorators/response.d.ts +12 -0
  167. package/dist/esm/decoration/decorators/response.d.ts.map +1 -0
  168. package/dist/esm/decoration/decorators/response.js +29 -0
  169. package/dist/esm/decoration/decorators/response.js.map +6 -0
  170. package/dist/esm/decoration/errors.d.ts +29 -0
  171. package/dist/esm/decoration/errors.d.ts.map +1 -0
  172. package/dist/esm/decoration/errors.js +24 -0
  173. package/dist/esm/decoration/errors.js.map +6 -0
  174. package/dist/esm/decoration/index.d.ts +9 -0
  175. package/dist/esm/decoration/index.d.ts.map +1 -0
  176. package/dist/esm/decoration/index.js +9 -0
  177. package/dist/esm/decoration/index.js.map +6 -0
  178. package/dist/esm/decoration/semantics/ClassSemantics.d.ts +84 -0
  179. package/dist/esm/decoration/semantics/ClassSemantics.d.ts.map +1 -0
  180. package/dist/esm/decoration/semantics/ClassSemantics.js +246 -0
  181. package/dist/esm/decoration/semantics/ClassSemantics.js.map +6 -0
  182. package/dist/esm/decoration/semantics/FieldSemantics.d.ts +21 -0
  183. package/dist/esm/decoration/semantics/FieldSemantics.d.ts.map +1 -0
  184. package/dist/esm/decoration/semantics/FieldSemantics.js +37 -0
  185. package/dist/esm/decoration/semantics/FieldSemantics.js.map +6 -0
  186. package/dist/esm/decoration/semantics/Semantics.d.ts +68 -0
  187. package/dist/esm/decoration/semantics/Semantics.d.ts.map +1 -0
  188. package/dist/esm/decoration/semantics/Semantics.js +126 -0
  189. package/dist/esm/decoration/semantics/Semantics.js.map +6 -0
  190. package/dist/esm/decoration/semantics/index.d.ts +9 -0
  191. package/dist/esm/decoration/semantics/index.d.ts.map +1 -0
  192. package/dist/esm/decoration/semantics/index.js +9 -0
  193. package/dist/esm/decoration/semantics/index.js.map +6 -0
  194. package/dist/esm/index.d.ts +1 -0
  195. package/dist/esm/index.d.ts.map +1 -1
  196. package/dist/esm/index.js +1 -0
  197. package/dist/esm/index.js.map +1 -1
  198. package/dist/esm/models/AttributeModel.d.ts +1 -0
  199. package/dist/esm/models/AttributeModel.d.ts.map +1 -1
  200. package/dist/esm/models/AttributeModel.js +1 -0
  201. package/dist/esm/models/AttributeModel.js.map +1 -1
  202. package/dist/esm/models/Children.js +3 -3
  203. package/dist/esm/models/Children.js.map +1 -1
  204. package/dist/esm/models/CommandModel.d.ts +1 -0
  205. package/dist/esm/models/CommandModel.d.ts.map +1 -1
  206. package/dist/esm/models/CommandModel.js +1 -0
  207. package/dist/esm/models/CommandModel.js.map +1 -1
  208. package/dist/esm/models/EventModel.d.ts +1 -0
  209. package/dist/esm/models/EventModel.d.ts.map +1 -1
  210. package/dist/esm/models/EventModel.js +1 -0
  211. package/dist/esm/models/EventModel.js.map +1 -1
  212. package/dist/esm/models/Globals.d.ts +1 -1
  213. package/dist/esm/models/Model.d.ts +12 -3
  214. package/dist/esm/models/Model.d.ts.map +1 -1
  215. package/dist/esm/models/Model.js +16 -10
  216. package/dist/esm/models/Model.js.map +1 -1
  217. package/dist/esm/models/Schema.d.ts +14 -0
  218. package/dist/esm/models/Schema.d.ts.map +1 -1
  219. package/dist/esm/models/Schema.js +29 -1
  220. package/dist/esm/models/Schema.js.map +1 -1
  221. package/dist/esm/models/ScopeModel.d.ts +1 -1
  222. package/dist/esm/models/ScopeModel.d.ts.map +1 -1
  223. package/dist/esm/models/ScopeModel.js +2 -2
  224. package/dist/esm/models/ScopeModel.js.map +1 -1
  225. package/dist/esm/standard/elements/definitions.d.ts +1 -1
  226. package/dist/esm/standard/elements/definitions.js +1 -1
  227. package/dist/esm/standard/elements/{interval.element.d.ts → duration.element.d.ts} +1 -1
  228. package/dist/esm/standard/elements/duration.element.d.ts.map +1 -0
  229. package/dist/esm/standard/elements/{interval.element.js → duration.element.js} +1 -1
  230. package/dist/esm/standard/elements/{interval.element.js.map → duration.element.js.map} +1 -1
  231. package/dist/esm/standard/elements/models.d.ts +1 -1
  232. package/dist/esm/standard/elements/models.js +2 -2
  233. package/package.json +4 -4
  234. package/src/decoration/decorators/attribute.ts +13 -0
  235. package/src/decoration/decorators/cluster.ts +13 -0
  236. package/src/decoration/decorators/command.ts +16 -0
  237. package/src/decoration/decorators/datatype.ts +13 -0
  238. package/src/decoration/decorators/element.ts +128 -0
  239. package/src/decoration/decorators/event.ts +16 -0
  240. package/src/decoration/decorators/field.ts +16 -0
  241. package/src/decoration/decorators/index.ts +16 -0
  242. package/src/decoration/decorators/listOf.ts +30 -0
  243. package/src/decoration/decorators/mandatory.ts +22 -0
  244. package/src/decoration/decorators/nonvolatile.ts +22 -0
  245. package/src/decoration/decorators/nullable.ts +22 -0
  246. package/src/decoration/decorators/response.ts +34 -0
  247. package/src/decoration/errors.ts +29 -0
  248. package/src/decoration/index.ts +9 -0
  249. package/src/decoration/semantics/ClassSemantics.ts +374 -0
  250. package/src/decoration/semantics/FieldSemantics.ts +49 -0
  251. package/src/decoration/semantics/Semantics.ts +170 -0
  252. package/src/decoration/semantics/index.ts +9 -0
  253. package/src/index.ts +1 -0
  254. package/src/models/AttributeModel.ts +1 -0
  255. package/src/models/Children.ts +3 -3
  256. package/src/models/CommandModel.ts +1 -0
  257. package/src/models/EventModel.ts +1 -0
  258. package/src/models/Model.ts +34 -12
  259. package/src/models/Schema.ts +51 -0
  260. package/src/models/ScopeModel.ts +2 -2
  261. package/src/standard/elements/definitions.ts +1 -1
  262. package/src/standard/elements/models.ts +1 -1
  263. package/dist/cjs/standard/elements/interval.element.d.ts.map +0 -1
  264. package/dist/esm/standard/elements/interval.element.d.ts.map +0 -1
  265. /package/src/standard/elements/{interval.element.ts → duration.element.ts} +0 -0
@@ -214,7 +214,7 @@ export declare const locationdesc: DatatypeModel;
214
214
  export declare const WildcardPathFlagsBitmap: DatatypeModel;
215
215
  export declare const SoftwareVersionCertificationStatusEnum: DatatypeModel;
216
216
  export declare const any: DatatypeModel;
217
- export declare const interval: DatatypeModel;
217
+ export declare const duration: DatatypeModel;
218
218
  export declare const subjectId: DatatypeModel;
219
219
  export declare const ClusterRevision: AttributeModel;
220
220
  export declare const FeatureMap: AttributeModel;
@@ -266,6 +266,7 @@ __export(models_exports, {
266
266
  date: () => date,
267
267
  devtypeId: () => devtypeId,
268
268
  double: () => double,
269
+ duration: () => duration,
269
270
  elapsedS: () => elapsedS,
270
271
  endpointNo: () => endpointNo,
271
272
  energyMWh: () => energyMWh,
@@ -289,7 +290,6 @@ __export(models_exports, {
289
290
  int56: () => int56,
290
291
  int64: () => int64,
291
292
  int8: () => int8,
292
- interval: () => interval,
293
293
  ipadr: () => ipadr,
294
294
  ipv4Adr: () => ipv4Adr,
295
295
  ipv6Adr: () => ipv6Adr,
@@ -560,7 +560,7 @@ const SoftwareVersionCertificationStatusEnum = new import_DatatypeModel.Datatype
560
560
  definitions.SoftwareVersionCertificationStatusEnum
561
561
  );
562
562
  const any = new import_DatatypeModel.DatatypeModel(definitions.any);
563
- const interval = new import_DatatypeModel.DatatypeModel(definitions.duration);
563
+ const duration = new import_DatatypeModel.DatatypeModel(definitions.duration);
564
564
  const subjectId = new import_DatatypeModel.DatatypeModel(definitions.subjectId);
565
565
  const ClusterRevision = new import_AttributeModel.AttributeModel(definitions.ClusterRevision);
566
566
  const FeatureMap = new import_AttributeModel.AttributeModel(definitions.FeatureMap);
@@ -31,7 +31,7 @@ export declare namespace Metatype {
31
31
  /**
32
32
  * Determine the JS type for a metatype.
33
33
  */
34
- function native(type: Metatype | undefined): ObjectConstructor | ArrayConstructor | BooleanConstructor | BigIntConstructor | NumberConstructor | Uint8ArrayConstructor | StringConstructor | DateConstructor | typeof Duration | undefined;
34
+ function native(type: Metatype | undefined): ObjectConstructor | ArrayConstructor | StringConstructor | BooleanConstructor | BigIntConstructor | NumberConstructor | Uint8ArrayConstructor | DateConstructor | typeof Duration | undefined;
35
35
  /**
36
36
  * Map metatype value to JS type.
37
37
  */
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { element } from "./element.js";
7
+ /**
8
+ * Decorates a property as a Matter attribute.
9
+ */
10
+ export declare const attribute: (...modifiers: element.Modifier<import("@matter/general").Decorator.PropertyCollector>[]) => import("@matter/general").Decorator.PropertyCollector;
11
+ //# sourceMappingURL=attribute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/attribute.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,SAAS,oJAAmC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { AttributeModel } from "#models/AttributeModel.js";
7
+ import { element } from "./element.js";
8
+ const attribute = element.property(AttributeModel);
9
+ export {
10
+ attribute
11
+ };
12
+ //# sourceMappingURL=attribute.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/attribute.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,sBAAsB;AAC/B,SAAS,eAAe;AAKjB,MAAM,YAAY,QAAQ,SAAS,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 { element } from "./element.js";
7
+ /**
8
+ * Generates a decorator that marks a class as a Matter cluster.
9
+ */
10
+ export declare const cluster: (...modifiers: element.Modifier<import("@matter/general").Decorator.ClassCollector>[]) => import("@matter/general").Decorator.ClassCollector;
11
+ //# sourceMappingURL=cluster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cluster.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/cluster.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,OAAO,8IAA8B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ClusterModel } from "#models/ClusterModel.js";
7
+ import { element } from "./element.js";
8
+ const cluster = element.klass(ClusterModel);
9
+ export {
10
+ cluster
11
+ };
12
+ //# sourceMappingURL=cluster.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/cluster.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AAKjB,MAAM,UAAU,QAAQ,MAAM,YAAY;",
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 { element } from "./element.js";
8
+ /**
9
+ * Decorates a method as a Matter command.
10
+ */
11
+ export declare function command(...modifiers: element.Modifier<Decorator.MethodCollector>[]): Decorator.MethodCollector;
12
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/command.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,6BAElF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CommandModel } from "#models/CommandModel.js";
7
+ import { element } from "./element.js";
8
+ function command(...modifiers) {
9
+ return element(CommandModel, ...modifiers);
10
+ }
11
+ export {
12
+ command
13
+ };
14
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/command.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AAKjB,SAAS,WAAW,WAA0D;AACjF,SAAO,QAAQ,cAAc,GAAG,SAAS;AAC7C;",
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 { element } from "./element.js";
7
+ /**
8
+ * Decorates a class as a datatype.
9
+ */
10
+ export declare const datatype: (...modifiers: element.Modifier<import("@matter/general").Decorator.ClassCollector>[]) => import("@matter/general").Decorator.ClassCollector;
11
+ //# sourceMappingURL=datatype.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datatype.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/datatype.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,QAAQ,8IAA+B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { DatatypeModel } from "#models/DatatypeModel.js";
7
+ import { element } from "./element.js";
8
+ const datatype = element.klass(DatatypeModel);
9
+ export {
10
+ datatype
11
+ };
12
+ //# sourceMappingURL=datatype.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/datatype.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AAKjB,MAAM,WAAW,QAAQ,MAAM,aAAa;",
5
+ "names": []
6
+ }
@@ -0,0 +1,40 @@
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 { Model } from "#models/Model.js";
8
+ /**
9
+ * Decorate a class or field as a specific Matter element type.
10
+ */
11
+ export declare function element<T extends Decorator.Collector | Decorator.ClassCollector | Decorator.PropertyCollector | Decorator.MethodCollector>(kind: Model.ConcreteType, ...modifiers: element.Modifier<T>[]): T;
12
+ export declare namespace element {
13
+ /**
14
+ * Create a property decorator for a specific element type.
15
+ */
16
+ function property(kind: Model.ConcreteType): (...modifiers: Modifier<Decorator.PropertyCollector>[]) => Decorator.PropertyCollector;
17
+ /**
18
+ * Create a decorator factory for a specific type of class.
19
+ */
20
+ function klass(kind: Model.ConcreteType): (...modifiers: Modifier<Decorator.ClassCollector>[]) => Decorator.ClassCollector;
21
+ /**
22
+ * A value that modifies the decoration of an element.
23
+ *
24
+ * Modifiers affect decoration as follows:
25
+ *
26
+ * * A model type forces {@link Semantics#localModel} to that type
27
+ *
28
+ * * A model instance sets the {@link Model#operationalBase} of {@link Semantics#localModel}
29
+ *
30
+ * * A constructor instance also sets the {@link Model#operationalBase} of {@link Semantics#localModel}
31
+ *
32
+ * * A decorator is invoked to decorate the element
33
+ *
34
+ * * A number sets the {@link Model#id} of {@link Semantics#localModel}
35
+ *
36
+ * * A string sets the {@link Model#name} of {@link Semantics#localModel}
37
+ */
38
+ type Modifier<T extends Decorator.Collector | Decorator.ClassCollector | Decorator.PropertyCollector | Decorator.MethodCollector> = Model.ConcreteType | Model | NewableFunction | number | string | T;
39
+ }
40
+ //# sourceMappingURL=element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/element.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGzC;;GAEG;AACH,wBAAgB,OAAO,CACnB,CAAC,SAAS,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,iBAAiB,GAAG,SAAS,CAAC,eAAe,EACpH,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,GAAG,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GA+DrD,CAAC,CACV;AAED,yBAAiB,OAAO,CAAC;IACrB;;OAEG;IACH,SAAgB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,IACrC,GAAG,WAAW,QAAQ,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,iCAGhE;IAED;;OAEG;IACH,SAAgB,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,IAClC,GAAG,WAAW,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,8BAG7D;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAY,QAAQ,CAChB,CAAC,SACK,SAAS,CAAC,SAAS,GACnB,SAAS,CAAC,cAAc,GACxB,SAAS,CAAC,iBAAiB,GAC3B,SAAS,CAAC,eAAe,IAC/B,KAAK,CAAC,YAAY,GAAG,KAAK,GAAG,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC;CAC1E"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { InvalidMetadataError, MetadataConflictError } from "#decoration/errors.js";
7
+ import { Semantics } from "#decoration/semantics/Semantics.js";
8
+ import { Decorator } from "#general";
9
+ import { Model } from "#models/Model.js";
10
+ import { Schema } from "#models/Schema.js";
11
+ function element(kind, ...modifiers) {
12
+ const forceType = !(modifiers[0] instanceof kind);
13
+ return Decorator((target, context) => {
14
+ const semantics = Semantics.of(context);
15
+ if (forceType) {
16
+ semantics.modelType = kind;
17
+ }
18
+ if (context.kind === "class") {
19
+ semantics.new = target;
20
+ }
21
+ let result = void 0;
22
+ for (const modifier of modifiers) {
23
+ switch (typeof modifier) {
24
+ case "number":
25
+ semantics.mutableModel.id = modifier;
26
+ continue;
27
+ case "string":
28
+ semantics.mutableModel.name = modifier;
29
+ continue;
30
+ case "function":
31
+ if ("Tag" in modifier) {
32
+ semantics.modelType = modifier;
33
+ } else if (Decorator.is(modifier)) {
34
+ const subresult = modifier(target, context);
35
+ if (subresult) {
36
+ if (result) {
37
+ throw new MetadataConflictError(`Multiple modifiers returned a value`);
38
+ }
39
+ result = subresult;
40
+ }
41
+ } else {
42
+ const model = Schema(modifier);
43
+ if (model === void 0) {
44
+ throw new InvalidMetadataError(
45
+ `Cannot use undecorated class ${modifier.name || "(anonymous)"} as type for ${String(context.name || "(anonymous)")}`
46
+ );
47
+ }
48
+ model.finalize();
49
+ semantics.mutableModel = model;
50
+ }
51
+ continue;
52
+ case "object":
53
+ if (modifier instanceof Model) {
54
+ semantics.mutableModel = modifier;
55
+ continue;
56
+ }
57
+ break;
58
+ }
59
+ throw new InvalidMetadataError(`Unsupported modifier ${modifier}`);
60
+ }
61
+ return result;
62
+ });
63
+ }
64
+ ((element2) => {
65
+ function property(kind) {
66
+ return (...modifiers) => {
67
+ return element2(kind, ...modifiers);
68
+ };
69
+ }
70
+ element2.property = property;
71
+ function klass(kind) {
72
+ return (...modifiers) => {
73
+ return element2(kind, ...modifiers);
74
+ };
75
+ }
76
+ element2.klass = klass;
77
+ })(element || (element = {}));
78
+ export {
79
+ element
80
+ };
81
+ //# sourceMappingURL=element.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/element.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,sBAAsB,6BAA6B;AAE5D,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,aAAa;AACtB,SAAS,cAAc;AAKhB,SAAS,QAEd,SAA6B,WAAkC;AAG7D,QAAM,YAAY,EAAE,UAAU,CAAC,aAAa;AAE5C,SAAO,UAAU,CAAC,QAAa,YAA8B;AACzD,UAAM,YAAY,UAAU,GAAG,OAAO;AACtC,QAAI,WAAW;AACX,gBAAU,YAAY;AAAA,IAC1B;AAEA,QAAI,QAAQ,SAAS,SAAS;AAC1B,MAAC,UAA6B,MAAM;AAAA,IACxC;AAEA,QAAI,SAA0B;AAC9B,eAAW,YAAY,WAAW;AAC9B,cAAQ,OAAO,UAAU;AAAA,QACrB,KAAK;AACD,oBAAU,aAAa,KAAK;AAC5B;AAAA,QAEJ,KAAK;AACD,oBAAU,aAAa,OAAO;AAC9B;AAAA,QAEJ,KAAK;AACD,cAAI,SAAS,UAAU;AACnB,sBAAU,YAAY;AAAA,UAC1B,WAAW,UAAU,GAAG,QAAQ,GAAG;AAC/B,kBAAM,YAAa,SAAiB,QAAQ,OAAO;AACnD,gBAAI,WAAW;AACX,kBAAI,QAAQ;AACR,sBAAM,IAAI,sBAAsB,qCAAqC;AAAA,cACzE;AACA,uBAAS;AAAA,YACb;AAAA,UACJ,OAAO;AACH,kBAAM,QAAQ,OAAO,QAA2B;AAChD,gBAAI,UAAU,QAAW;AACrB,oBAAM,IAAI;AAAA,gBACN,gCAAgC,SAAS,QAAQ,aAAa,gBAAgB,OAAO,QAAQ,QAAQ,aAAa,CAAC;AAAA,cACvH;AAAA,YACJ;AAEA,kBAAM,SAAS;AAEf,sBAAU,eAAe;AAAA,UAC7B;AACA;AAAA,QAEJ,KAAK;AACD,cAAI,oBAAoB,OAAO;AAC3B,sBAAU,eAAe;AACzB;AAAA,UACJ;AACA;AAAA,MACR;AAEA,YAAM,IAAI,qBAAqB,wBAAwB,QAAQ,EAAE;AAAA,IACrE;AAEA,WAAO;AAAA,EACX,CAAC;AACL;AAAA,CAEO,CAAUA,aAAV;AAII,WAAS,SAAS,MAA0B;AAC/C,WAAO,IAAI,cAAuD;AAC9D,aAAOA,SAAQ,MAAM,GAAG,SAAS;AAAA,IACrC;AAAA,EACJ;AAJO,EAAAA,SAAS;AAST,WAAS,MAAM,MAA0B;AAC5C,WAAO,IAAI,cAAoD;AAC3D,aAAOA,SAAQ,MAAM,GAAG,SAAS;AAAA,IACrC;AAAA,EACJ;AAJO,EAAAA,SAAS;AAAA,GAbH;",
5
+ "names": ["element"]
6
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { element } from "./element.js";
7
+ /**
8
+ * Decorates a property as a Matter event.
9
+ *
10
+ * If you don't assign an event ID using this decorator, matter.js treats properties as internal and they are not
11
+ * accessible via the Matter protocol.
12
+ */
13
+ export declare const event: (...modifiers: element.Modifier<import("@matter/general").Decorator.PropertyCollector>[]) => import("@matter/general").Decorator.PropertyCollector;
14
+ //# sourceMappingURL=event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,oJAA+B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { EventModel } from "#models/EventModel.js";
7
+ import { element } from "./element.js";
8
+ const event = element.property(EventModel);
9
+ export {
10
+ event
11
+ };
12
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/event.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAQjB,MAAM,QAAQ,QAAQ,SAAS,UAAU;",
5
+ "names": []
6
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { element } from "./element.js";
7
+ /**
8
+ * Decorates a property as a Matter field.
9
+ *
10
+ * If you don't assign a field ID using this decorator, matter.js treats the field as internal and it is not
11
+ * accessible via the Matter protocol.
12
+ */
13
+ export declare const field: (...modifiers: element.Modifier<import("@matter/general").Decorator.PropertyCollector>[]) => import("@matter/general").Decorator.PropertyCollector;
14
+ //# sourceMappingURL=field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/field.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,KAAK,oJAA+B,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { FieldModel } from "#models/FieldModel.js";
7
+ import { element } from "./element.js";
8
+ const field = element.property(FieldModel);
9
+ export {
10
+ field
11
+ };
12
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/field.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAQjB,MAAM,QAAQ,QAAQ,SAAS,UAAU;",
5
+ "names": []
6
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export * from "./attribute.js";
7
+ export * from "./cluster.js";
8
+ export * from "./datatype.js";
9
+ export * from "./element.js";
10
+ export * from "./field.js";
11
+ export * from "./listOf.js";
12
+ export * from "./mandatory.js";
13
+ export * from "./nonvolatile.js";
14
+ export * from "./nullable.js";
15
+ export * from "./response.js";
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export * from "./attribute.js";
7
+ export * from "./cluster.js";
8
+ export * from "./datatype.js";
9
+ export * from "./element.js";
10
+ export * from "./field.js";
11
+ export * from "./listOf.js";
12
+ export * from "./mandatory.js";
13
+ export * from "./nonvolatile.js";
14
+ export * from "./nullable.js";
15
+ export * from "./response.js";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/decoration/decorators/index.ts"],
4
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,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 type { Model } from "#models/Model.js";
8
+ /**
9
+ * Decorate a property as an array.
10
+ */
11
+ export declare function listOf(entry: Model.Source): Decorator.PropertyCollector;
12
+ //# sourceMappingURL=listOf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listOf.d.ts","sourceRoot":"","sources":["../../../../src/decoration/decorators/listOf.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAG9C;;GAEG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAcvE"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Semantics } from "#decoration/semantics/Semantics.js";
7
+ import { Decorator } from "#general";
8
+ import { FieldModel } from "#models/FieldModel.js";
9
+ import { Schema } from "#models/Schema.js";
10
+ function listOf(entry) {
11
+ return Decorator((_target, context) => {
12
+ Semantics.of(context).mutableModel.operationalBase = new FieldModel(
13
+ {
14
+ name: context.name.toString(),
15
+ type: "list"
16
+ },
17
+ new FieldModel({
18
+ name: "entry",
19
+ operationalBase: Schema(entry)
20
+ })
21
+ );
22
+ });
23
+ }
24
+ export {
25
+ listOf
26
+ };
27
+ //# 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,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAE3B,SAAS,cAAc;AAKhB,SAAS,OAAO,OAAkD;AACrE,SAAO,UAAU,CAAC,SAAS,YAAY;AACnC,cAAU,GAAG,OAAO,EAAE,aAAa,kBAAkB,IAAI;AAAA,MACrD;AAAA,QACI,MAAM,QAAQ,KAAK,SAAS;AAAA,QAC5B,MAAM;AAAA,MACV;AAAA,MAEA,IAAI,WAAW;AAAA,QACX,MAAM;AAAA,QACN,iBAAiB,OAAO,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,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { InvalidMetadataError } from "#decoration/errors.js";
7
+ import { FieldSemantics } from "#decoration/semantics/FieldSemantics.js";
8
+ import { Decorator } from "#general";
9
+ const mandatory = Decorator((_target, context) => {
10
+ const model = FieldSemantics.of(context).mutableModel;
11
+ if (!("conformance" in model)) {
12
+ throw new InvalidMetadataError(
13
+ `Cannot set ${model.path} to mandatory because ${model.tag} elements do not support conformance`
14
+ );
15
+ }
16
+ model.conformance = "M";
17
+ });
18
+ export {
19
+ mandatory
20
+ };
21
+ //# 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,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAKnB,MAAM,YAAY,UAAuC,CAAC,SAAS,YAAY;AAClF,QAAM,QAAQ,eAAe,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,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022-2025 Matter.js Authors
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Quality } from "#aspects/Quality.js";
7
+ import { InvalidMetadataError } from "#decoration/errors.js";
8
+ import { FieldSemantics } from "#decoration/semantics/FieldSemantics.js";
9
+ import { Decorator } from "#general";
10
+ import { ValueModel } from "#models/ValueModel.js";
11
+ const nonvolatile = Decorator((_target, context) => {
12
+ const model = FieldSemantics.of(context).mutableModel;
13
+ if (!(model instanceof ValueModel)) {
14
+ throw new InvalidMetadataError("Only a value models may be nonvolatile");
15
+ }
16
+ model.quality = new Quality({ ...model.quality, nonvolatile: true });
17
+ });
18
+ export {
19
+ nonvolatile
20
+ };
21
+ //# 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,SAAS,eAAe;AACxB,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAKpB,MAAM,cAAc,UAAuC,CAAC,SAAS,YAAY;AACpF,QAAM,QAAQ,eAAe,GAAG,OAAO,EAAE;AACzC,MAAI,EAAE,iBAAiB,aAAa;AAChC,UAAM,IAAI,qBAAqB,wCAAwC;AAAA,EAC3E;AACA,QAAM,UAAU,IAAI,QAAQ,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"}