@dxos/echo 0.8.4-main.937b3ca → 0.8.4-main.9735255

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 (225) hide show
  1. package/dist/lib/{browser → neutral}/Annotation.mjs +4 -5
  2. package/dist/lib/neutral/Database.mjs +17 -0
  3. package/dist/lib/{browser → neutral}/Entity.mjs +8 -9
  4. package/dist/lib/{browser → neutral}/Err.mjs +2 -3
  5. package/dist/lib/{browser → neutral}/Filter.mjs +9 -10
  6. package/dist/lib/{browser → neutral}/Format.mjs +4 -5
  7. package/dist/lib/neutral/JsonSchema.mjs +19 -0
  8. package/dist/lib/{browser → neutral}/Key.mjs +2 -3
  9. package/dist/lib/{browser → neutral}/Obj.mjs +9 -10
  10. package/dist/lib/{browser → neutral}/Order.mjs +2 -3
  11. package/dist/lib/neutral/Query.mjs +26 -0
  12. package/dist/lib/neutral/QueryResult.mjs +2 -0
  13. package/dist/lib/neutral/Ref.mjs +22 -0
  14. package/dist/lib/{browser → neutral}/Relation.mjs +9 -10
  15. package/dist/lib/neutral/SchemaRegistry.mjs +2 -0
  16. package/dist/lib/neutral/Tag.mjs +25 -0
  17. package/dist/lib/{browser → neutral}/Type.mjs +8 -9
  18. package/dist/lib/{browser/chunk-NOPVNWPT.mjs → neutral/chunk-2MTHJ5UW.mjs} +6 -7
  19. package/dist/lib/{node-esm/chunk-ILMLLM4R.mjs.map → neutral/chunk-2MTHJ5UW.mjs.map} +2 -2
  20. package/dist/lib/{browser/chunk-22JMFST2.mjs → neutral/chunk-3ZEAZF7T.mjs} +3 -4
  21. package/dist/lib/{browser/chunk-22JMFST2.mjs.map → neutral/chunk-3ZEAZF7T.mjs.map} +1 -1
  22. package/dist/lib/{browser/chunk-ZHXZGIXD.mjs → neutral/chunk-4L6DOFXP.mjs} +1 -3
  23. package/dist/lib/{browser/chunk-ZHXZGIXD.mjs.map → neutral/chunk-4L6DOFXP.mjs.map} +1 -1
  24. package/dist/lib/{browser/chunk-PQZW3S6L.mjs → neutral/chunk-4TT624YA.mjs} +3 -4
  25. package/dist/lib/{node-esm/chunk-Y75VU7LB.mjs.map → neutral/chunk-4TT624YA.mjs.map} +1 -1
  26. package/dist/lib/{browser/chunk-FRDT7RA4.mjs → neutral/chunk-62DWJ6CE.mjs} +3 -4
  27. package/dist/lib/{node-esm/chunk-W6QIEBTQ.mjs.map → neutral/chunk-62DWJ6CE.mjs.map} +3 -3
  28. package/dist/lib/{browser/chunk-W5D2GWAW.mjs → neutral/chunk-6QPSGMEF.mjs} +5 -6
  29. package/dist/lib/{browser/chunk-W5D2GWAW.mjs.map → neutral/chunk-6QPSGMEF.mjs.map} +1 -1
  30. package/dist/lib/{browser/chunk-INHXFXY5.mjs → neutral/chunk-ANHVGJI4.mjs} +2 -3
  31. package/dist/lib/{node-esm/chunk-AJEMYSIR.mjs.map → neutral/chunk-ANHVGJI4.mjs.map} +1 -1
  32. package/dist/lib/{browser/chunk-RK4Z4JUZ.mjs → neutral/chunk-CUDIBUM4.mjs} +2 -3
  33. package/dist/lib/{node-esm/chunk-YOLH5KS4.mjs.map → neutral/chunk-CUDIBUM4.mjs.map} +1 -1
  34. package/dist/lib/{browser/chunk-XDIUHAAX.mjs → neutral/chunk-HMOXCO27.mjs} +3 -4
  35. package/dist/lib/{node-esm/chunk-QLI2EIJ2.mjs.map → neutral/chunk-HMOXCO27.mjs.map} +1 -1
  36. package/dist/lib/{browser/chunk-U2J7TA7K.mjs → neutral/chunk-IP2GHXWA.mjs} +5 -6
  37. package/dist/lib/{node-esm/chunk-DMR7OAFK.mjs.map → neutral/chunk-IP2GHXWA.mjs.map} +1 -1
  38. package/dist/lib/{browser/chunk-CGS2ULMK.mjs → neutral/chunk-J5LGTIGS.mjs} +1 -2
  39. package/dist/lib/{browser/chunk-7STIBCP7.mjs → neutral/chunk-KRHDMXSU.mjs} +4 -5
  40. package/dist/lib/{browser/chunk-7STIBCP7.mjs.map → neutral/chunk-KRHDMXSU.mjs.map} +1 -1
  41. package/dist/lib/{browser/chunk-FPOISFQK.mjs → neutral/chunk-NWUO5FKZ.mjs} +3 -4
  42. package/dist/lib/{node-esm/chunk-NBWL7UCZ.mjs.map → neutral/chunk-NWUO5FKZ.mjs.map} +1 -1
  43. package/dist/lib/{browser/chunk-IXVWLTG7.mjs → neutral/chunk-OMUPQMLR.mjs} +1 -3
  44. package/dist/lib/{browser/chunk-IXVWLTG7.mjs.map → neutral/chunk-OMUPQMLR.mjs.map} +1 -1
  45. package/dist/lib/{browser/chunk-JMKVF2YQ.mjs → neutral/chunk-ROKO4RKJ.mjs} +2 -3
  46. package/dist/lib/{node-esm/chunk-K37NA7PO.mjs.map → neutral/chunk-ROKO4RKJ.mjs.map} +1 -1
  47. package/dist/lib/{browser/chunk-CJ5YELTO.mjs → neutral/chunk-RPB6V4BE.mjs} +2 -3
  48. package/dist/lib/{browser/chunk-CJ5YELTO.mjs.map → neutral/chunk-RPB6V4BE.mjs.map} +1 -1
  49. package/dist/lib/{browser/chunk-BJPE6CIC.mjs → neutral/chunk-SU2LVM7J.mjs} +47 -48
  50. package/dist/lib/neutral/chunk-SU2LVM7J.mjs.map +7 -0
  51. package/dist/lib/{browser/chunk-ZAGAOZVY.mjs → neutral/chunk-VB5HVDCA.mjs} +4 -5
  52. package/dist/lib/{node-esm/chunk-QYR67VBV.mjs.map → neutral/chunk-VB5HVDCA.mjs.map} +1 -1
  53. package/dist/lib/{browser/chunk-2SBB7OWV.mjs → neutral/chunk-VR4A4WGG.mjs} +5 -6
  54. package/dist/lib/{browser/chunk-2SBB7OWV.mjs.map → neutral/chunk-VR4A4WGG.mjs.map} +2 -2
  55. package/dist/lib/{browser/chunk-MYCCGG2T.mjs → neutral/chunk-X2MPMYYN.mjs} +1 -3
  56. package/dist/lib/{node-esm/chunk-MOWUEW5P.mjs.map → neutral/chunk-X2MPMYYN.mjs.map} +1 -1
  57. package/dist/lib/{browser/chunk-6L5HHUVU.mjs → neutral/chunk-XK5OUUBY.mjs} +4 -5
  58. package/dist/lib/{node-esm/chunk-5OBN7GZW.mjs.map → neutral/chunk-XK5OUUBY.mjs.map} +1 -1
  59. package/dist/lib/{browser/chunk-KQQGVHFN.mjs → neutral/chunk-XMIDBDE6.mjs} +5 -6
  60. package/dist/lib/{node-esm/chunk-NRN3ZW2T.mjs.map → neutral/chunk-XMIDBDE6.mjs.map} +1 -1
  61. package/dist/lib/{browser/chunk-YKTSSMDS.mjs → neutral/chunk-YQYMWZAD.mjs} +1 -3
  62. package/dist/lib/{node-esm/chunk-XHJRMQZD.mjs.map → neutral/chunk-YQYMWZAD.mjs.map} +1 -1
  63. package/dist/lib/{browser → neutral}/index.mjs +23 -24
  64. package/dist/lib/{browser → neutral}/internal/index.mjs +7 -8
  65. package/dist/lib/neutral/meta.json +1 -0
  66. package/dist/lib/{browser → neutral}/testing/index.mjs +23 -24
  67. package/dist/lib/{node-esm → neutral}/testing/index.mjs.map +1 -1
  68. package/dist/types/src/Obj.d.ts +2 -2
  69. package/dist/types/src/Obj.d.ts.map +1 -1
  70. package/dist/types/src/Relation.d.ts +1 -1
  71. package/dist/types/src/Relation.d.ts.map +1 -1
  72. package/dist/types/src/internal/api/meta.d.ts +2 -2
  73. package/dist/types/src/internal/api/meta.d.ts.map +1 -1
  74. package/dist/types/src/internal/entities/object.d.ts.map +1 -1
  75. package/dist/types/src/internal/entities/relation.d.ts.map +1 -1
  76. package/dist/types/src/internal/formats/select.d.ts +2 -2
  77. package/dist/types/src/internal/formats/select.d.ts.map +1 -1
  78. package/dist/types/src/internal/json-schema/json-schema-normalize.d.ts.map +1 -1
  79. package/dist/types/src/internal/json-schema/json-schema-type.d.ts +130 -29
  80. package/dist/types/src/internal/json-schema/json-schema-type.d.ts.map +1 -1
  81. package/dist/types/src/internal/json-schema/json-schema.d.ts +2 -1
  82. package/dist/types/src/internal/json-schema/json-schema.d.ts.map +1 -1
  83. package/dist/types/src/internal/ref/ref.d.ts +2 -1
  84. package/dist/types/src/internal/ref/ref.d.ts.map +1 -1
  85. package/dist/types/src/internal/schema/compose.d.ts +2 -1
  86. package/dist/types/src/internal/schema/compose.d.ts.map +1 -1
  87. package/dist/types/src/internal/types/meta.d.ts +5 -5
  88. package/dist/types/src/internal/types/meta.d.ts.map +1 -1
  89. package/dist/types/tsconfig.tsbuildinfo +1 -1
  90. package/package.json +33 -112
  91. package/src/Obj.ts +3 -3
  92. package/src/Relation.ts +2 -2
  93. package/src/internal/api/meta.ts +3 -3
  94. package/src/internal/entities/object.ts +1 -3
  95. package/src/internal/entities/relation.ts +1 -3
  96. package/src/internal/formats/format.test.ts +1 -1
  97. package/src/internal/formats/select.ts +1 -1
  98. package/src/internal/json-schema/json-schema-normalize.ts +4 -2
  99. package/src/internal/json-schema/json-schema-type.ts +30 -31
  100. package/src/internal/json-schema/json-schema.ts +10 -6
  101. package/src/internal/object/json-serializer.test.ts +3 -2
  102. package/src/internal/object/schema-validator.test.ts +3 -7
  103. package/src/internal/object/set-value.test.ts +9 -9
  104. package/src/internal/proxy/typed-handler.test.ts +8 -12
  105. package/src/internal/proxy/typed-object.test.ts +11 -11
  106. package/src/internal/ref/ref.test.ts +1 -1
  107. package/src/internal/ref/ref.ts +2 -1
  108. package/src/internal/schema/compose.ts +13 -8
  109. package/src/internal/types/meta.ts +12 -13
  110. package/dist/lib/browser/Database.mjs +0 -18
  111. package/dist/lib/browser/JsonSchema.mjs +0 -20
  112. package/dist/lib/browser/Query.mjs +0 -27
  113. package/dist/lib/browser/QueryResult.mjs +0 -3
  114. package/dist/lib/browser/Ref.mjs +0 -23
  115. package/dist/lib/browser/SchemaRegistry.mjs +0 -3
  116. package/dist/lib/browser/Tag.mjs +0 -26
  117. package/dist/lib/browser/chunk-6L5HHUVU.mjs.map +0 -7
  118. package/dist/lib/browser/chunk-BJPE6CIC.mjs.map +0 -7
  119. package/dist/lib/browser/chunk-FPOISFQK.mjs.map +0 -7
  120. package/dist/lib/browser/chunk-FRDT7RA4.mjs.map +0 -7
  121. package/dist/lib/browser/chunk-INHXFXY5.mjs.map +0 -7
  122. package/dist/lib/browser/chunk-JMKVF2YQ.mjs.map +0 -7
  123. package/dist/lib/browser/chunk-KQQGVHFN.mjs.map +0 -7
  124. package/dist/lib/browser/chunk-MYCCGG2T.mjs.map +0 -7
  125. package/dist/lib/browser/chunk-NOPVNWPT.mjs.map +0 -7
  126. package/dist/lib/browser/chunk-PQZW3S6L.mjs.map +0 -7
  127. package/dist/lib/browser/chunk-RK4Z4JUZ.mjs.map +0 -7
  128. package/dist/lib/browser/chunk-U2J7TA7K.mjs.map +0 -7
  129. package/dist/lib/browser/chunk-XDIUHAAX.mjs.map +0 -7
  130. package/dist/lib/browser/chunk-YKTSSMDS.mjs.map +0 -7
  131. package/dist/lib/browser/chunk-ZAGAOZVY.mjs.map +0 -7
  132. package/dist/lib/browser/meta.json +0 -1
  133. package/dist/lib/browser/testing/index.mjs.map +0 -7
  134. package/dist/lib/node-esm/Annotation.mjs +0 -33
  135. package/dist/lib/node-esm/Annotation.mjs.map +0 -7
  136. package/dist/lib/node-esm/Database.mjs +0 -18
  137. package/dist/lib/node-esm/Database.mjs.map +0 -7
  138. package/dist/lib/node-esm/Entity.mjs +0 -52
  139. package/dist/lib/node-esm/Entity.mjs.map +0 -7
  140. package/dist/lib/node-esm/Err.mjs +0 -11
  141. package/dist/lib/node-esm/Err.mjs.map +0 -7
  142. package/dist/lib/node-esm/Filter.mjs +0 -62
  143. package/dist/lib/node-esm/Filter.mjs.map +0 -7
  144. package/dist/lib/node-esm/Format.mjs +0 -67
  145. package/dist/lib/node-esm/Format.mjs.map +0 -7
  146. package/dist/lib/node-esm/JsonSchema.mjs +0 -20
  147. package/dist/lib/node-esm/JsonSchema.mjs.map +0 -7
  148. package/dist/lib/node-esm/Key.mjs +0 -13
  149. package/dist/lib/node-esm/Key.mjs.map +0 -7
  150. package/dist/lib/node-esm/Obj.mjs +0 -91
  151. package/dist/lib/node-esm/Obj.mjs.map +0 -7
  152. package/dist/lib/node-esm/Order.mjs +0 -13
  153. package/dist/lib/node-esm/Order.mjs.map +0 -7
  154. package/dist/lib/node-esm/Query.mjs +0 -27
  155. package/dist/lib/node-esm/Query.mjs.map +0 -7
  156. package/dist/lib/node-esm/QueryResult.mjs +0 -3
  157. package/dist/lib/node-esm/QueryResult.mjs.map +0 -7
  158. package/dist/lib/node-esm/Ref.mjs +0 -23
  159. package/dist/lib/node-esm/Ref.mjs.map +0 -7
  160. package/dist/lib/node-esm/Relation.mjs +0 -85
  161. package/dist/lib/node-esm/Relation.mjs.map +0 -7
  162. package/dist/lib/node-esm/SchemaRegistry.mjs +0 -3
  163. package/dist/lib/node-esm/SchemaRegistry.mjs.map +0 -7
  164. package/dist/lib/node-esm/Tag.mjs +0 -26
  165. package/dist/lib/node-esm/Tag.mjs.map +0 -7
  166. package/dist/lib/node-esm/Type.mjs +0 -48
  167. package/dist/lib/node-esm/Type.mjs.map +0 -7
  168. package/dist/lib/node-esm/chunk-4PNXQA64.mjs +0 -250
  169. package/dist/lib/node-esm/chunk-4PNXQA64.mjs.map +0 -7
  170. package/dist/lib/node-esm/chunk-5OBN7GZW.mjs +0 -158
  171. package/dist/lib/node-esm/chunk-AJEMYSIR.mjs +0 -22
  172. package/dist/lib/node-esm/chunk-ANLVLWME.mjs +0 -98
  173. package/dist/lib/node-esm/chunk-ANLVLWME.mjs.map +0 -7
  174. package/dist/lib/node-esm/chunk-DMR7OAFK.mjs +0 -57
  175. package/dist/lib/node-esm/chunk-FWTSPIFF.mjs +0 -133
  176. package/dist/lib/node-esm/chunk-FWTSPIFF.mjs.map +0 -7
  177. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  178. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +0 -7
  179. package/dist/lib/node-esm/chunk-ILMLLM4R.mjs +0 -204
  180. package/dist/lib/node-esm/chunk-K37NA7PO.mjs +0 -43
  181. package/dist/lib/node-esm/chunk-LT3H4JOX.mjs +0 -3847
  182. package/dist/lib/node-esm/chunk-LT3H4JOX.mjs.map +0 -7
  183. package/dist/lib/node-esm/chunk-MOLNWFNL.mjs +0 -9
  184. package/dist/lib/node-esm/chunk-MOLNWFNL.mjs.map +0 -7
  185. package/dist/lib/node-esm/chunk-MOWUEW5P.mjs +0 -15
  186. package/dist/lib/node-esm/chunk-NBWL7UCZ.mjs +0 -40
  187. package/dist/lib/node-esm/chunk-NRN3ZW2T.mjs +0 -143
  188. package/dist/lib/node-esm/chunk-QLI2EIJ2.mjs +0 -41
  189. package/dist/lib/node-esm/chunk-QYR67VBV.mjs +0 -288
  190. package/dist/lib/node-esm/chunk-UKGVOINP.mjs +0 -9
  191. package/dist/lib/node-esm/chunk-UKGVOINP.mjs.map +0 -7
  192. package/dist/lib/node-esm/chunk-W6QIEBTQ.mjs +0 -403
  193. package/dist/lib/node-esm/chunk-XHJRMQZD.mjs +0 -69
  194. package/dist/lib/node-esm/chunk-Y75VU7LB.mjs +0 -74
  195. package/dist/lib/node-esm/chunk-YOLH5KS4.mjs +0 -283
  196. package/dist/lib/node-esm/chunk-YQ2NWGL5.mjs +0 -39
  197. package/dist/lib/node-esm/chunk-YQ2NWGL5.mjs.map +0 -7
  198. package/dist/lib/node-esm/chunk-ZBB67AKD.mjs +0 -24
  199. package/dist/lib/node-esm/chunk-ZBB67AKD.mjs.map +0 -7
  200. package/dist/lib/node-esm/index.mjs +0 -85
  201. package/dist/lib/node-esm/index.mjs.map +0 -7
  202. package/dist/lib/node-esm/internal/index.mjs +0 -457
  203. package/dist/lib/node-esm/internal/index.mjs.map +0 -7
  204. package/dist/lib/node-esm/meta.json +0 -1
  205. package/dist/lib/node-esm/testing/index.mjs +0 -367
  206. /package/dist/lib/{browser → neutral}/Annotation.mjs.map +0 -0
  207. /package/dist/lib/{browser → neutral}/Database.mjs.map +0 -0
  208. /package/dist/lib/{browser → neutral}/Entity.mjs.map +0 -0
  209. /package/dist/lib/{browser → neutral}/Err.mjs.map +0 -0
  210. /package/dist/lib/{browser → neutral}/Filter.mjs.map +0 -0
  211. /package/dist/lib/{browser → neutral}/Format.mjs.map +0 -0
  212. /package/dist/lib/{browser → neutral}/JsonSchema.mjs.map +0 -0
  213. /package/dist/lib/{browser → neutral}/Key.mjs.map +0 -0
  214. /package/dist/lib/{browser → neutral}/Obj.mjs.map +0 -0
  215. /package/dist/lib/{browser → neutral}/Order.mjs.map +0 -0
  216. /package/dist/lib/{browser → neutral}/Query.mjs.map +0 -0
  217. /package/dist/lib/{browser → neutral}/QueryResult.mjs.map +0 -0
  218. /package/dist/lib/{browser → neutral}/Ref.mjs.map +0 -0
  219. /package/dist/lib/{browser → neutral}/Relation.mjs.map +0 -0
  220. /package/dist/lib/{browser → neutral}/SchemaRegistry.mjs.map +0 -0
  221. /package/dist/lib/{browser → neutral}/Tag.mjs.map +0 -0
  222. /package/dist/lib/{browser → neutral}/Type.mjs.map +0 -0
  223. /package/dist/lib/{browser/chunk-CGS2ULMK.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  224. /package/dist/lib/{browser → neutral}/index.mjs.map +0 -0
  225. /package/dist/lib/{browser → neutral}/internal/index.mjs.map +0 -0
@@ -1,5 +1,4 @@
1
- import "@dxos/node-std/globals";
2
- import "./chunk-FPOISFQK.mjs";
1
+ import "./chunk-NWUO5FKZ.mjs";
3
2
  import {
4
3
  DescriptionAnnotation,
5
4
  FormInputAnnotation,
@@ -13,9 +12,9 @@ import {
13
12
  getTypeAnnotation,
14
13
  setDescriptionWithSchema,
15
14
  setLabelWithSchema
16
- } from "./chunk-RK4Z4JUZ.mjs";
17
- import "./chunk-YKTSSMDS.mjs";
18
- import "./chunk-CGS2ULMK.mjs";
15
+ } from "./chunk-CUDIBUM4.mjs";
16
+ import "./chunk-YQYMWZAD.mjs";
17
+ import "./chunk-J5LGTIGS.mjs";
19
18
  export {
20
19
  DescriptionAnnotation,
21
20
  FormInputAnnotation,
@@ -0,0 +1,17 @@
1
+ import {
2
+ Database,
3
+ Service,
4
+ TypeId,
5
+ isDatabase
6
+ } from "./chunk-KRHDMXSU.mjs";
7
+ import "./chunk-CUDIBUM4.mjs";
8
+ import "./chunk-YQYMWZAD.mjs";
9
+ import "./chunk-RPB6V4BE.mjs";
10
+ import "./chunk-J5LGTIGS.mjs";
11
+ export {
12
+ Database,
13
+ Service,
14
+ TypeId,
15
+ isDatabase
16
+ };
17
+ //# sourceMappingURL=Database.mjs.map
@@ -1,4 +1,3 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  Kind,
4
3
  KindSchema,
@@ -17,17 +16,17 @@ import {
17
16
  removeTag,
18
17
  subscribe,
19
18
  toJSON
20
- } from "./chunk-W5D2GWAW.mjs";
21
- import "./chunk-BJPE6CIC.mjs";
22
- import "./chunk-FRDT7RA4.mjs";
23
- import "./chunk-7STIBCP7.mjs";
24
- import "./chunk-RK4Z4JUZ.mjs";
19
+ } from "./chunk-6QPSGMEF.mjs";
20
+ import "./chunk-SU2LVM7J.mjs";
21
+ import "./chunk-62DWJ6CE.mjs";
22
+ import "./chunk-KRHDMXSU.mjs";
23
+ import "./chunk-CUDIBUM4.mjs";
25
24
  import {
26
25
  KindId,
27
26
  SnapshotKindId
28
- } from "./chunk-YKTSSMDS.mjs";
29
- import "./chunk-CJ5YELTO.mjs";
30
- import "./chunk-CGS2ULMK.mjs";
27
+ } from "./chunk-YQYMWZAD.mjs";
28
+ import "./chunk-RPB6V4BE.mjs";
29
+ import "./chunk-J5LGTIGS.mjs";
31
30
  export {
32
31
  Kind,
33
32
  KindId,
@@ -1,9 +1,8 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  ObjectNotFoundError,
4
3
  SchemaNotFoundError
5
- } from "./chunk-CJ5YELTO.mjs";
6
- import "./chunk-CGS2ULMK.mjs";
4
+ } from "./chunk-RPB6V4BE.mjs";
5
+ import "./chunk-J5LGTIGS.mjs";
7
6
  export {
8
7
  ObjectNotFoundError,
9
8
  SchemaNotFoundError
@@ -1,4 +1,3 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  and,
4
3
  between,
@@ -24,15 +23,15 @@ import {
24
23
  type,
25
24
  typeDXN,
26
25
  typename
27
- } from "./chunk-ZAGAOZVY.mjs";
28
- import "./chunk-XDIUHAAX.mjs";
29
- import "./chunk-BJPE6CIC.mjs";
30
- import "./chunk-FRDT7RA4.mjs";
31
- import "./chunk-7STIBCP7.mjs";
32
- import "./chunk-RK4Z4JUZ.mjs";
33
- import "./chunk-YKTSSMDS.mjs";
34
- import "./chunk-CJ5YELTO.mjs";
35
- import "./chunk-CGS2ULMK.mjs";
26
+ } from "./chunk-VB5HVDCA.mjs";
27
+ import "./chunk-HMOXCO27.mjs";
28
+ import "./chunk-SU2LVM7J.mjs";
29
+ import "./chunk-62DWJ6CE.mjs";
30
+ import "./chunk-KRHDMXSU.mjs";
31
+ import "./chunk-CUDIBUM4.mjs";
32
+ import "./chunk-YQYMWZAD.mjs";
33
+ import "./chunk-RPB6V4BE.mjs";
34
+ import "./chunk-J5LGTIGS.mjs";
36
35
  export {
37
36
  and,
38
37
  between,
@@ -1,5 +1,4 @@
1
- import "@dxos/node-std/globals";
2
- import "./chunk-PQZW3S6L.mjs";
1
+ import "./chunk-4TT624YA.mjs";
3
2
  import {
4
3
  Currency,
5
4
  CurrencyAnnotationId,
@@ -30,9 +29,9 @@ import {
30
29
  getOptionsAnnotation,
31
30
  getTypeEnum,
32
31
  typeToFormat
33
- } from "./chunk-FRDT7RA4.mjs";
34
- import "./chunk-YKTSSMDS.mjs";
35
- import "./chunk-CGS2ULMK.mjs";
32
+ } from "./chunk-62DWJ6CE.mjs";
33
+ import "./chunk-YQYMWZAD.mjs";
34
+ import "./chunk-J5LGTIGS.mjs";
36
35
  export {
37
36
  Currency,
38
37
  CurrencyAnnotationId,
@@ -0,0 +1,19 @@
1
+ import {
2
+ JsonSchema
3
+ } from "./chunk-3ZEAZF7T.mjs";
4
+ import {
5
+ toEffectSchema,
6
+ toJsonSchema
7
+ } from "./chunk-SU2LVM7J.mjs";
8
+ import "./chunk-62DWJ6CE.mjs";
9
+ import "./chunk-KRHDMXSU.mjs";
10
+ import "./chunk-CUDIBUM4.mjs";
11
+ import "./chunk-YQYMWZAD.mjs";
12
+ import "./chunk-RPB6V4BE.mjs";
13
+ import "./chunk-J5LGTIGS.mjs";
14
+ export {
15
+ JsonSchema,
16
+ toEffectSchema,
17
+ toJsonSchema
18
+ };
19
+ //# sourceMappingURL=JsonSchema.mjs.map
@@ -1,10 +1,9 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  ForeignKey,
4
3
  ObjectId,
5
4
  SpaceId
6
- } from "./chunk-INHXFXY5.mjs";
7
- import "./chunk-CGS2ULMK.mjs";
5
+ } from "./chunk-ANHVGJI4.mjs";
6
+ import "./chunk-J5LGTIGS.mjs";
8
7
  export {
9
8
  ForeignKey,
10
9
  ObjectId,
@@ -1,4 +1,3 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  ID,
4
3
  Meta,
@@ -32,8 +31,8 @@ import {
32
31
  subscribe,
33
32
  toJSON,
34
33
  version
35
- } from "./chunk-NOPVNWPT.mjs";
36
- import "./chunk-W5D2GWAW.mjs";
34
+ } from "./chunk-2MTHJ5UW.mjs";
35
+ import "./chunk-6QPSGMEF.mjs";
37
36
  import {
38
37
  VersionTypeId,
39
38
  compareVersions,
@@ -41,13 +40,13 @@ import {
41
40
  encodeVersion,
42
41
  isVersion,
43
42
  versionValid
44
- } from "./chunk-BJPE6CIC.mjs";
45
- import "./chunk-FRDT7RA4.mjs";
46
- import "./chunk-7STIBCP7.mjs";
47
- import "./chunk-RK4Z4JUZ.mjs";
48
- import "./chunk-YKTSSMDS.mjs";
49
- import "./chunk-CJ5YELTO.mjs";
50
- import "./chunk-CGS2ULMK.mjs";
43
+ } from "./chunk-SU2LVM7J.mjs";
44
+ import "./chunk-62DWJ6CE.mjs";
45
+ import "./chunk-KRHDMXSU.mjs";
46
+ import "./chunk-CUDIBUM4.mjs";
47
+ import "./chunk-YQYMWZAD.mjs";
48
+ import "./chunk-RPB6V4BE.mjs";
49
+ import "./chunk-J5LGTIGS.mjs";
51
50
  export {
52
51
  ID,
53
52
  Meta,
@@ -1,10 +1,9 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  natural,
4
3
  property,
5
4
  rank
6
- } from "./chunk-JMKVF2YQ.mjs";
7
- import "./chunk-CGS2ULMK.mjs";
5
+ } from "./chunk-ROKO4RKJ.mjs";
6
+ import "./chunk-J5LGTIGS.mjs";
8
7
  export {
9
8
  natural,
10
9
  property,
@@ -0,0 +1,26 @@
1
+ import {
2
+ all,
3
+ fromAst,
4
+ is,
5
+ select,
6
+ type,
7
+ without
8
+ } from "./chunk-XK5OUUBY.mjs";
9
+ import "./chunk-VB5HVDCA.mjs";
10
+ import "./chunk-HMOXCO27.mjs";
11
+ import "./chunk-SU2LVM7J.mjs";
12
+ import "./chunk-62DWJ6CE.mjs";
13
+ import "./chunk-KRHDMXSU.mjs";
14
+ import "./chunk-CUDIBUM4.mjs";
15
+ import "./chunk-YQYMWZAD.mjs";
16
+ import "./chunk-RPB6V4BE.mjs";
17
+ import "./chunk-J5LGTIGS.mjs";
18
+ export {
19
+ all,
20
+ fromAst,
21
+ is,
22
+ select,
23
+ type,
24
+ without
25
+ };
26
+ //# sourceMappingURL=Query.mjs.map
@@ -0,0 +1,2 @@
1
+ import "./chunk-OMUPQMLR.mjs";
2
+ //# sourceMappingURL=QueryResult.mjs.map
@@ -0,0 +1,22 @@
1
+ import {
2
+ Array,
3
+ fromDXN,
4
+ isRef,
5
+ isRefType,
6
+ make
7
+ } from "./chunk-HMOXCO27.mjs";
8
+ import "./chunk-SU2LVM7J.mjs";
9
+ import "./chunk-62DWJ6CE.mjs";
10
+ import "./chunk-KRHDMXSU.mjs";
11
+ import "./chunk-CUDIBUM4.mjs";
12
+ import "./chunk-YQYMWZAD.mjs";
13
+ import "./chunk-RPB6V4BE.mjs";
14
+ import "./chunk-J5LGTIGS.mjs";
15
+ export {
16
+ Array,
17
+ fromDXN,
18
+ isRef,
19
+ isRefType,
20
+ make
21
+ };
22
+ //# sourceMappingURL=Ref.mjs.map
@@ -1,4 +1,3 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  Source,
4
3
  Target,
@@ -33,18 +32,18 @@ import {
33
32
  subscribe,
34
33
  toJSON,
35
34
  version
36
- } from "./chunk-2SBB7OWV.mjs";
37
- import "./chunk-W5D2GWAW.mjs";
35
+ } from "./chunk-VR4A4WGG.mjs";
36
+ import "./chunk-6QPSGMEF.mjs";
38
37
  import {
39
38
  VersionTypeId,
40
39
  isVersion
41
- } from "./chunk-BJPE6CIC.mjs";
42
- import "./chunk-FRDT7RA4.mjs";
43
- import "./chunk-7STIBCP7.mjs";
44
- import "./chunk-RK4Z4JUZ.mjs";
45
- import "./chunk-YKTSSMDS.mjs";
46
- import "./chunk-CJ5YELTO.mjs";
47
- import "./chunk-CGS2ULMK.mjs";
40
+ } from "./chunk-SU2LVM7J.mjs";
41
+ import "./chunk-62DWJ6CE.mjs";
42
+ import "./chunk-KRHDMXSU.mjs";
43
+ import "./chunk-CUDIBUM4.mjs";
44
+ import "./chunk-YQYMWZAD.mjs";
45
+ import "./chunk-RPB6V4BE.mjs";
46
+ import "./chunk-J5LGTIGS.mjs";
48
47
  export {
49
48
  Source,
50
49
  Target,
@@ -0,0 +1,2 @@
1
+ import "./chunk-4L6DOFXP.mjs";
2
+ //# sourceMappingURL=SchemaRegistry.mjs.map
@@ -0,0 +1,25 @@
1
+ import {
2
+ Tag,
3
+ createTagList,
4
+ findTagByLabel,
5
+ make,
6
+ sortTags
7
+ } from "./chunk-IP2GHXWA.mjs";
8
+ import "./chunk-XMIDBDE6.mjs";
9
+ import "./chunk-2MTHJ5UW.mjs";
10
+ import "./chunk-6QPSGMEF.mjs";
11
+ import "./chunk-SU2LVM7J.mjs";
12
+ import "./chunk-62DWJ6CE.mjs";
13
+ import "./chunk-KRHDMXSU.mjs";
14
+ import "./chunk-CUDIBUM4.mjs";
15
+ import "./chunk-YQYMWZAD.mjs";
16
+ import "./chunk-RPB6V4BE.mjs";
17
+ import "./chunk-J5LGTIGS.mjs";
18
+ export {
19
+ Tag,
20
+ createTagList,
21
+ findTagByLabel,
22
+ make,
23
+ sortTags
24
+ };
25
+ //# sourceMappingURL=Tag.mjs.map
@@ -1,4 +1,3 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  Entity,
4
3
  Obj,
@@ -14,18 +13,18 @@ import {
14
13
  isRelationSchema,
15
14
  object,
16
15
  relation
17
- } from "./chunk-KQQGVHFN.mjs";
16
+ } from "./chunk-XMIDBDE6.mjs";
18
17
  import {
19
18
  EchoSchema,
20
19
  toEffectSchema,
21
20
  toJsonSchema
22
- } from "./chunk-BJPE6CIC.mjs";
23
- import "./chunk-FRDT7RA4.mjs";
24
- import "./chunk-7STIBCP7.mjs";
25
- import "./chunk-RK4Z4JUZ.mjs";
26
- import "./chunk-YKTSSMDS.mjs";
27
- import "./chunk-CJ5YELTO.mjs";
28
- import "./chunk-CGS2ULMK.mjs";
21
+ } from "./chunk-SU2LVM7J.mjs";
22
+ import "./chunk-62DWJ6CE.mjs";
23
+ import "./chunk-KRHDMXSU.mjs";
24
+ import "./chunk-CUDIBUM4.mjs";
25
+ import "./chunk-YQYMWZAD.mjs";
26
+ import "./chunk-RPB6V4BE.mjs";
27
+ import "./chunk-J5LGTIGS.mjs";
29
28
  export {
30
29
  Entity,
31
30
  Obj,
@@ -1,7 +1,6 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  Kind
4
- } from "./chunk-W5D2GWAW.mjs";
3
+ } from "./chunk-6QPSGMEF.mjs";
5
4
  import {
6
5
  MetaId,
7
6
  VersionTypeId,
@@ -34,20 +33,20 @@ import {
34
33
  subscribe,
35
34
  version,
36
35
  versionValid
37
- } from "./chunk-BJPE6CIC.mjs";
36
+ } from "./chunk-SU2LVM7J.mjs";
38
37
  import {
39
38
  getSchema,
40
39
  getTypeAnnotation,
41
40
  getTypeDXN,
42
41
  getTypename,
43
42
  isInstanceOf
44
- } from "./chunk-RK4Z4JUZ.mjs";
43
+ } from "./chunk-CUDIBUM4.mjs";
45
44
  import {
46
45
  KindId
47
- } from "./chunk-YKTSSMDS.mjs";
46
+ } from "./chunk-YQYMWZAD.mjs";
48
47
  import {
49
48
  __export
50
- } from "./chunk-CGS2ULMK.mjs";
49
+ } from "./chunk-J5LGTIGS.mjs";
51
50
 
52
51
  // src/Obj.ts
53
52
  var Obj_exports = {};
@@ -201,4 +200,4 @@ export {
201
200
  version2 as version,
202
201
  Obj_exports
203
202
  };
204
- //# sourceMappingURL=chunk-NOPVNWPT.mjs.map
203
+ //# sourceMappingURL=chunk-2MTHJ5UW.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/Obj.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Function from 'effect/Function';\nimport * as Schema from 'effect/Schema';\n\nimport type { ForeignKey } from '@dxos/echo-protocol';\nimport { createJsonPath, getValue as getValue$ } from '@dxos/effect';\nimport { assertArgument } from '@dxos/invariant';\nimport { type DXN, ObjectId } from '@dxos/keys';\nimport { assumeType } from '@dxos/util';\n\nimport type * as Database from './Database';\nimport * as Entity from './Entity';\nimport {\n type ObjectJSON as APIJSON,\n type AnyEntity,\n type AnyProperties,\n type Comparator as ApiComparator,\n type Meta as ApiMeta,\n type ReadonlyMeta as ApiReadonlyMeta,\n type EntityVersion as ApiVersion,\n type ChangeCallback,\n type InternalObjectProps,\n type KindId,\n MetaId,\n type Mutable,\n type ObjectMeta,\n type SnapshotKindId,\n type VersionCompareResult,\n VersionTypeId,\n addTag as addTag$,\n change as change$,\n clone as clone$,\n compareVersions,\n decodeVersion,\n deleteKeys as deleteKeys$,\n encodeVersion,\n getDXN as getDXN$,\n getDatabase as getDatabase$,\n getDescription as getDescription$,\n getKeys as getKeys$,\n getLabel as getLabel$,\n getMetaChecked as getMeta$,\n getSchema as getSchema$,\n getSnapshot as getSnapshot$,\n getTypeAnnotation,\n getTypeDXN as getTypeDXN$,\n getTypename as getTypename$,\n isDeleted as isDeleted$,\n isInstanceOf,\n isVersion,\n makeObject,\n objectFromJSON,\n removeTag as removeTag$,\n setDescription as setDescription$,\n setLabel as setLabel$,\n setValue as setValue$,\n sort as sort$,\n sortByLabel as sortByLabel$,\n sortByTypename as sortByTypename$,\n subscribe as subscribe$,\n objectToJSON as toJSON$,\n version as version$,\n versionValid,\n} from './internal';\nimport type * as Ref from './Ref';\nimport type * as Type from './Type';\n\n/**\n * Base type for all ECHO objects.\n */\ninterface BaseObj extends AnyEntity, Entity.OfKind<typeof Entity.Kind.Object> {}\n\n/**\n * Object type with specific properties.\n */\nexport type Obj<Props> = BaseObj & Props;\n\n/**\n * Object with no known properties beyond id and kind.\n * Use this when the object's schema/properties are not known.\n * For objects with arbitrary properties, use `Obj.AnyProps`.\n *\n * NOTE: This is a TypeScript type only, not a schema.\n * To validate that a value is an ECHO object, use `Schema.is(Type.Obj)`.\n */\nexport interface Unknown extends BaseObj {}\n\n/**\n * Object with arbitrary properties.\n *\n * NOTE: Due to how TypeScript works, this type is not assignable to a specific schema type.\n * In that case, use `Obj.instanceOf` to check if an object is of a specific type.\n *\n * Prefer using `Obj.Unknown` when you don't need to access arbitrary properties.\n */\nexport interface Any extends BaseObj, AnyProperties {}\n\n/**\n * Base type for snapshot objects (has SnapshotKindId instead of KindId).\n */\ninterface BaseSnapshot extends AnyEntity {\n readonly [SnapshotKindId]: typeof Entity.Kind.Object;\n readonly id: ObjectId;\n}\n\n/**\n * Immutable snapshot of an ECHO object.\n * Branded with SnapshotKindId (not KindId).\n * Property values are frozen at the time the snapshot was created.\n * Returned by getSnapshot() and hooks like useObject().\n *\n * Snapshots are structurally identical to reactive objects but have a different brand,\n * making them distinguishable at the TypeScript level. Neither is assignable to the other.\n */\nexport type Snapshot<T extends Unknown = Unknown> = Omit<T, KindId> & BaseSnapshot;\n\nconst defaultMeta: ObjectMeta = {\n keys: [],\n};\n\ntype Props<T = any> = {\n id?: ObjectId;\n [Meta]?: Partial<ObjectMeta>;\n} & Type.Properties<T>;\n\n// TODO(burdon): Should we allow the caller to set the id?\n/**\n * Props type for object creation with a given schema.\n */\nexport type MakeProps<S extends Schema.Schema.AnyNoContext> = {\n id?: ObjectId;\n [Meta]?: Partial<ObjectMeta>;\n} & NoInfer<Props<Schema.Schema.Type<S>>>;\n\n/**\n * Creates a new echo object of the given schema.\n * @param schema - Object schema.\n * @param props - Object properties.\n * @param meta - Object metadata (deprecated) -- pass with Obj.Meta.\n *\n * Meta can be passed as a symbol in `props`.\n *\n * Example:\n * ```ts\n * const obj = Obj.make(Person, { [Obj.Meta]: { keys: [...] }, name: 'John' });\n * ```\n *\n * Note: Only accepts object schemas, not relation schemas. Use `Relation.make` for relations.\n */\nexport const make: {\n <S extends Type.Obj.Any>(schema: S, props: MakeProps<S>): Obj<Schema.Schema.Type<S>>;\n /**\n * @deprecated Pass meta as in the example: `Obj.make(Person, { [Obj.Meta]: { keys: [...] }, name: 'John' })`.\n */\n <S extends Type.Obj.Any>(schema: S, props: MakeProps<S>, meta: Partial<ObjectMeta>): Obj<Schema.Schema.Type<S>>;\n} = <S extends Type.Obj.Any>(\n schema: S,\n props: MakeProps<S>,\n meta?: Partial<ObjectMeta>,\n): Obj<Schema.Schema.Type<S>> => {\n assertArgument(getTypeAnnotation(schema)?.kind === Entity.Kind.Object, 'schema', 'Expected an object schema');\n\n // Set default fields on meta on creation.\n if (props[MetaId] != null) {\n meta = { ...structuredClone(defaultMeta), ...props[MetaId] };\n delete props[MetaId];\n }\n\n // Filter undefined values.\n const filterUndefined = Object.fromEntries(Object.entries(props).filter(([_, v]) => v !== undefined));\n\n return makeObject<Schema.Schema.Type<S>>(schema, filterUndefined as any, {\n ...defaultMeta,\n ...meta,\n });\n};\n\n/**\n * Determine if object is an ECHO object.\n */\nexport const isObject = (obj: unknown): obj is Unknown => {\n assumeType<InternalObjectProps>(obj);\n return typeof obj === 'object' && obj !== null && obj[Entity.KindId] === Entity.Kind.Object;\n};\n\n/**\n * Subscribe to object updates.\n * The callback is called synchronously when the object is modified.\n * Only accepts reactive objects (not snapshots).\n * @returns Unsubscribe function.\n */\nexport const subscribe = (obj: Unknown, callback: () => void): (() => void) => {\n return subscribe$(obj, callback);\n};\n\n//\n// Snapshot\n//\n\n/**\n * Returns an immutable snapshot of an object.\n * The snapshot is branded with SnapshotKindId instead of KindId,\n * making it distinguishable from the reactive object at the type level.\n */\nexport const getSnapshot: <T extends Unknown>(obj: T) => Snapshot<T> = getSnapshot$ as any;\n\nexport type CloneOptions = {\n /**\n * Retain the original object's ID.\n * @default false\n */\n retainId?: boolean;\n\n /**\n * Recursively clone referenced objects.\n * @default false\n */\n deep?: boolean;\n};\n\n/**\n * Clones an object or relation.\n * This does not clone referenced objects, only the properties in the object.\n * @returns A new object with the same schema and properties.\n */\nexport const clone: <T extends Unknown>(obj: T, opts?: CloneOptions) => T = clone$;\n\n//\n// Change\n//\n\n/**\n * Makes all properties mutable recursively.\n * Used to provide a mutable view of an object within `Obj.change`.\n */\nexport type { Mutable };\n\n/**\n * Perform mutations on an echo object within a controlled context.\n *\n * All mutations within the callback are batched and trigger a single notification\n * when the callback completes. Direct mutations outside of `Obj.change` will throw\n * an error for echo objects.\n *\n * This function also works with nested objects within echo objects (e.g., Template structs)\n * that are reactive at runtime.\n *\n * @param obj - The echo object to mutate. Use `Relation.change` for relations.\n * @param callback - The callback that performs mutations on the object.\n *\n * @example\n * ```ts\n * const person = Obj.make(Person, { name: 'John', age: 25 });\n *\n * // Mutate within Obj.change\n * Obj.change(person, (p) => {\n * p.name = 'Jane';\n * p.age = 30;\n * });\n * // ONE notification fires here\n *\n * // Direct mutation throws\n * person.name = 'Bob'; // Error: Cannot modify outside Obj.change()\n * ```\n *\n * Note: Only accepts objects. Use `Relation.change` for relations.\n */\nexport const change = <T extends Unknown>(obj: T, callback: ChangeCallback<T>): void => {\n change$(obj, callback);\n};\n\n/**\n * Get a deeply nested property from an object.\n *\n * Similar to lodash.get and getDeep from @dxos/util.\n * This is the complementary function to setValue.\n * Accepts both reactive objects and snapshots.\n *\n * @param obj - The ECHO object to get the property from.\n * @param path - Path to the property (array of keys).\n * @returns The value at the path, or undefined if not found.\n *\n * @example\n * ```ts\n * const person = Obj.make(Person, {\n * name: 'John',\n * addresses: [{ street: '123 Main St' }]\n * });\n *\n * Obj.getValue(person, ['addresses', 0, 'street']); // '123 Main St'\n * Obj.getValue(person, ['addresses', 1, 'street']); // undefined\n * ```\n */\nexport const getValue = (obj: Unknown | Snapshot, path: readonly (string | number)[]): any => {\n return getValue$(obj, createJsonPath(path));\n};\n\n/**\n * Set a deeply nested property on an object, using the object's schema to determine\n * whether to initialize nested data as an empty object or array.\n *\n * Similar to lodash.set and setDeep from @dxos/util, but schema-aware.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n *\n * @param obj - The mutable ECHO object to set the property on.\n * @param path - Path to the property (array of keys).\n * @param value - Value to set.\n * @returns The value that was set.\n *\n * @example\n * ```ts\n * const person = Obj.make(Person, { name: 'John' });\n * // Person schema has: addresses: Schema.mutable(Schema.Array(Address))\n * Obj.change(person, (p) => {\n * Obj.setValue(p, ['addresses', 0, 'street'], '123 Main St');\n * });\n * // Creates: person.addresses = [{ street: '123 Main St' }]\n * ```\n */\n// TODO(wittjosiah): Compute possible path values + type value based on generic object type.\nexport const setValue: (obj: Mutable<Unknown>, path: readonly (string | number)[], value: any) => void =\n setValue$ as any;\n\n//\n// Type\n//\n\n// TODO(burdon): To discuss: prefer over ObjectId or Key.ObjectId or Type.ID?\nexport const ID = ObjectId;\nexport type ID = ObjectId;\n\n/**\n * Test if object or relation is an instance of a schema.\n * @example\n * ```ts\n * const john = Obj.make(Person, { name: 'John' });\n * const isPerson = Obj.instanceOf(Person);\n * if (isPerson(john)) {\n * // john is Person\n * }\n * ```\n */\nexport const instanceOf: {\n <S extends Type.Entity.Any>(schema: S): (value: unknown) => value is Schema.Schema.Type<S>;\n <S extends Type.Entity.Any>(schema: S, value: unknown): value is Schema.Schema.Type<S>;\n} = ((...args: [schema: Type.Entity.Any, value: unknown] | [schema: Type.Entity.Any]) => {\n if (args.length === 1) {\n return (entity: unknown) => isInstanceOf(args[0], entity);\n }\n\n return isInstanceOf(args[0], args[1]);\n}) as any;\n\n// TODO(dmaretskyi): Allow returning undefined.\n/**\n * Get the DXN of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const getDXN = (entity: Unknown | Snapshot): DXN => {\n assertArgument(!Schema.isSchema(entity), 'obj', 'Object should not be a schema.');\n return getDXN$(entity);\n};\n\n/**\n * @returns The DXN of the object's type.\n * @example dxn:example.com/type/Person:1.0.0\n */\n// TODO(wittjosiah): Narrow types.\nexport const getTypeDXN: (obj: unknown | undefined) => DXN | undefined = getTypeDXN$ as any;\n\n/**\n * Get the schema of the object.\n * Returns the branded ECHO schema used to create the object.\n */\n// TODO(wittjosiah): Narrow types.\nexport const getSchema: (obj: unknown | undefined) => Type.Entity.Any | undefined = getSchema$ as any;\n\n/**\n * @returns The typename of the object's type.\n * Accepts both reactive objects and snapshots.\n * @example `example.com/type/Person`\n */\nexport const getTypename = (entity: Unknown | Snapshot): string | undefined => getTypename$(entity);\n\n//\n// Database\n//\n\n/**\n * Get the database the object belongs to.\n * Accepts both reactive objects and snapshots.\n */\nexport const getDatabase = (entity: Unknown | Snapshot): Database.Database | undefined => getDatabase$(entity);\n\n//\n// Meta\n//\n\nexport const Meta: unique symbol = MetaId as any;\n\n/**\n * Deeply read-only version of ObjectMeta.\n * Prevents mutation at all nesting levels (e.g., `meta.keys.push()` is a TypeScript error).\n */\nexport type ReadonlyMeta = ApiReadonlyMeta;\n\n/**\n * Mutable meta type returned by `Obj.getMeta` inside an `Obj.change` callback.\n */\nexport type Meta = ApiMeta;\n\n// TODO(burdon): Narrow type.\n// TODO(dmaretskyi): Allow returning undefined.\n/**\n * Get the metadata for an object.\n * Returns mutable meta when passed a mutable object (inside `Obj.change` callback).\n * Returns read-only meta when passed a regular object or snapshot.\n *\n * @example\n * ```ts\n * // Read-only access outside change callback\n * const meta = Obj.getMeta(person); // ReadonlyMeta\n *\n * // Mutable access inside change callback\n * Obj.change(person, (p) => {\n * const meta = Obj.getMeta(p); // ObjectMeta (mutable)\n * meta.tags ??= [];\n * meta.tags.push('important');\n * });\n * ```\n */\n// TODO(wittjosiah): When passed a Snapshot, should return a snapshot of meta, not the live meta proxy.\nexport function getMeta(entity: Mutable<Unknown>): ObjectMeta;\nexport function getMeta(entity: Unknown | Snapshot): ReadonlyMeta;\nexport function getMeta(entity: Unknown | Snapshot | Mutable<Unknown>): ObjectMeta | ReadonlyMeta {\n return getMeta$(entity);\n}\n\n/**\n * @returns Foreign keys for the object from the specified source.\n * Accepts both reactive objects and snapshots.\n */\nexport const getKeys: {\n (entity: Unknown | Snapshot, source: string): ForeignKey[];\n (source: string): (entity: Unknown | Snapshot) => ForeignKey[];\n} = Function.dual(2, (entity: Unknown | Snapshot, source?: string): ForeignKey[] => getKeys$(entity, source!));\n\n/**\n * Delete all keys from the object for the specified source.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const deleteKeys = (entity: Mutable<Unknown>, source: string): void => deleteKeys$(entity, source);\n\n/**\n * Add a tag to the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const addTag = (entity: Mutable<Unknown>, tag: string): void => addTag$(entity, tag);\n\n/**\n * Remove a tag from the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const removeTag = (entity: Mutable<Unknown>, tag: string): void => removeTag$(entity, tag);\n\n/**\n * Check if the object is deleted.\n * Accepts both reactive objects and snapshots.\n */\n// TODO(dmaretskyi): Default to `false`.\nexport const isDeleted = (entity: Unknown | Snapshot): boolean => isDeleted$(entity);\n\n//\n// Annotations\n//\n\n/**\n * Get the label of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const getLabel = (entity: Unknown | Snapshot): string | undefined => getLabel$(entity);\n\n/**\n * Set the label of the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const setLabel = (entity: Mutable<Unknown>, label: string): void => setLabel$(entity, label);\n\n/**\n * Get the description of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const getDescription = (entity: Unknown | Snapshot): string | undefined => getDescription$(entity);\n\n/**\n * Set the description of the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const setDescription = (entity: Mutable<Unknown>, description: string): void =>\n setDescription$(entity, description);\n\n//\n// JSON\n//\n\n/**\n * JSON representation of an object.\n */\nexport type JSON = APIJSON;\n\n/**\n * Converts object to its JSON representation.\n * Accepts both reactive objects and snapshots.\n *\n * The same algorithm is used when calling the standard `JSON.stringify(obj)` function.\n */\nexport const toJSON = (entity: Unknown | Snapshot): JSON => toJSON$(entity);\n\n/**\n * Creates an object from its json representation, performing schema validation.\n * References and schemas will be resolvable if the `refResolver` is provided.\n *\n * The function must be async to support resolving the schema as well as the relation endpoints.\n *\n * @param options.refResolver - Resolver for references. Produces hydrated references that can be resolved.\n * @param options.dxn - Override object DXN. Changes the result of `Obj.getDXN`.\n */\nexport const fromJSON: (json: unknown, options?: { refResolver?: Ref.Resolver; dxn?: DXN }) => Promise<Unknown> =\n objectFromJSON as any;\n\n//\n// Sorting\n//\n\n/**\n * Comparator function type for sorting objects.\n * Accepts both reactive objects and snapshots.\n */\nexport type Comparator = ApiComparator<Unknown | Snapshot>;\n\nexport const sortByLabel: Comparator = sortByLabel$ as Comparator;\nexport const sortByTypename: Comparator = sortByTypename$ as Comparator;\nexport const sort = (...comparators: Comparator[]): Comparator => sort$(...comparators) as Comparator;\n\n//\n// Version\n//\n\nexport { VersionTypeId };\nexport type { VersionCompareResult };\n\n/**\n * Represent object version.\n * May be backed by Automerge.\n * Objects with no history are not versioned.\n */\nexport type Version = ApiVersion;\n\nexport { isVersion, versionValid, compareVersions, encodeVersion, decodeVersion };\n\n/**\n * Returns the version of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const version = (entity: Unknown | Snapshot): Version => version$(entity);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;gBAAAA;EAAA,cAAAC;EAAA,aAAAC;EAAA;;oBAAAC;EAAA;;gBAAAC;EAAA,mBAAAC;EAAA,sBAAAC;EAAA,eAAAC;EAAA,gBAAAC;EAAA;mBAAAC;EAAA,mBAAAC;EAAA,kBAAAC;EAAA,mBAAAC;EAAA;;mBAAAC;EAAA;;;mBAAAC;EAAA,sBAAAC;EAAA,gBAAAC;EAAA,gBAAAC;EAAA,YAAAC;EAAA,mBAAAC;EAAA,sBAAAC;EAAA,iBAAAC;EAAA;iBAAAC;EAAA;;AAIA,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AAGxB,SAASC,gBAAgBC,YAAYC,iBAAiB;AACtD,SAASC,sBAAsB;AAC/B,SAAmBC,gBAAgB;AACnC,SAASC,kBAAkB;AA4G3B,IAAMC,cAA0B;EAC9BC,MAAM,CAAA;AACR;AA+BO,IAAMC,OAMT,CACFC,QACAC,OACAC,SAAAA;AAEAC,iBAAeC,kBAAkBJ,MAAAA,GAASK,SAAgBC,KAAKC,QAAQ,UAAU,2BAAA;AAGjF,MAAIN,MAAMO,MAAAA,KAAW,MAAM;AACzBN,WAAO;MAAE,GAAGO,gBAAgBZ,WAAAA;MAAc,GAAGI,MAAMO,MAAAA;IAAQ;AAC3D,WAAOP,MAAMO,MAAAA;EACf;AAGA,QAAME,kBAAkBH,OAAOI,YAAYJ,OAAOK,QAAQX,KAAAA,EAAOY,OAAO,CAAC,CAACC,GAAGC,CAAAA,MAAOA,MAAMC,MAAAA,CAAAA;AAE1F,SAAOC,WAAkCjB,QAAQU,iBAAwB;IACvE,GAAGb;IACH,GAAGK;EACL,CAAA;AACF;AAKO,IAAMgB,WAAW,CAACC,QAAAA;AACvBC,aAAgCD,GAAAA;AAChC,SAAO,OAAOA,QAAQ,YAAYA,QAAQ,QAAQA,IAAWE,MAAM,MAAaf,KAAKC;AACvF;AAQO,IAAMe,aAAY,CAACH,KAAcI,aAAAA;AACtC,SAAOC,UAAWL,KAAKI,QAAAA;AACzB;AAWO,IAAME,eAA0DC;AAqBhE,IAAMC,SAA+DC;AA0CrE,IAAMC,UAAS,CAAoBV,KAAQI,aAAAA;AAChDO,SAAQX,KAAKI,QAAAA;AACf;AAwBO,IAAMQ,WAAW,CAACZ,KAAyBa,SAAAA;AAChD,SAAOC,UAAUd,KAAKe,eAAeF,IAAAA,CAAAA;AACvC;AA4BO,IAAMG,YACXC;AAOK,IAAMC,KAAKC;AAcX,IAAMC,aAGR,IAAIC,SAAAA;AACP,MAAIA,KAAKC,WAAW,GAAG;AACrB,WAAO,CAACC,WAAoBC,aAAaH,KAAK,CAAA,GAAIE,MAAAA;EACpD;AAEA,SAAOC,aAAaH,KAAK,CAAA,GAAIA,KAAK,CAAA,CAAE;AACtC;AAOO,IAAMI,UAAS,CAACF,WAAAA;AACrBvC,iBAAe,CAAQ0C,gBAASH,MAAAA,GAAS,OAAO,gCAAA;AAChD,SAAOI,OAAQJ,MAAAA;AACjB;AAOO,IAAMK,cAA4DC;AAOlE,IAAMC,aAAuEC;AAO7E,IAAMC,eAAc,CAACT,WAAmDU,YAAaV,MAAAA;AAUrF,IAAMW,eAAc,CAACX,WAA8DY,YAAaZ,MAAAA;AAMhG,IAAMa,OAAsB/C;AAoC5B,SAASgD,QAAQd,QAA6C;AACnE,SAAOe,eAASf,MAAAA;AAClB;AAMO,IAAMgB,WAGAC,cAAK,GAAG,CAACjB,QAA4BkB,WAAkCC,QAASnB,QAAQkB,MAAAA,CAAAA;AAS9F,IAAME,cAAa,CAACpB,QAA0BkB,WAAyBG,WAAYrB,QAAQkB,MAAAA;AAS3F,IAAMI,UAAS,CAACtB,QAA0BuB,QAAsBC,OAAQxB,QAAQuB,GAAAA;AAShF,IAAME,aAAY,CAACzB,QAA0BuB,QAAsBG,UAAW1B,QAAQuB,GAAAA;AAOtF,IAAMI,aAAY,CAAC3B,WAAwC4B,UAAW5B,MAAAA;AAUtE,IAAM6B,YAAW,CAAC7B,WAAmD8B,SAAU9B,MAAAA;AAS/E,IAAM+B,YAAW,CAAC/B,QAA0BgC,UAAwBC,SAAUjC,QAAQgC,KAAAA;AAMtF,IAAME,kBAAiB,CAAClC,WAAmDmC,eAAgBnC,MAAAA;AAS3F,IAAMoC,kBAAiB,CAACpC,QAA0BqC,gBACvDC,eAAgBtC,QAAQqC,WAAAA;AAiBnB,IAAME,SAAS,CAACvC,WAAqCwC,aAAQxC,MAAAA;AAW7D,IAAMyC,WACXC;AAYK,IAAMC,eAA0BC;AAChC,IAAMC,kBAA6BC;AACnC,IAAMC,QAAO,IAAIC,gBAA0CC,KAAAA,GAASD,WAAAA;AAsBpE,IAAME,WAAU,CAACC,WAAwCC,QAASD,MAAAA;",
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Function from 'effect/Function';\nimport * as Schema from 'effect/Schema';\n\nimport type { ForeignKey } from '@dxos/echo-protocol';\nimport { createJsonPath, getValue as getValue$ } from '@dxos/effect';\nimport { assertArgument } from '@dxos/invariant';\nimport { type DXN, ObjectId } from '@dxos/keys';\nimport { assumeType } from '@dxos/util';\n\nimport type * as Database from './Database';\nimport * as Entity from './Entity';\nimport {\n type ObjectJSON as APIJSON,\n type AnyEntity,\n type AnyProperties,\n type Comparator as ApiComparator,\n type Meta as ApiMeta,\n type ReadonlyMeta as ApiReadonlyMeta,\n type EntityVersion as ApiVersion,\n type ChangeCallback,\n type InternalObjectProps,\n type KindId,\n MetaId,\n type Mutable,\n type ObjectMeta,\n type SnapshotKindId,\n type VersionCompareResult,\n VersionTypeId,\n addTag as addTag$,\n change as change$,\n clone as clone$,\n compareVersions,\n decodeVersion,\n deleteKeys as deleteKeys$,\n encodeVersion,\n getDXN as getDXN$,\n getDatabase as getDatabase$,\n getDescription as getDescription$,\n getKeys as getKeys$,\n getLabel as getLabel$,\n getMetaChecked as getMeta$,\n getSchema as getSchema$,\n getSnapshot as getSnapshot$,\n getTypeAnnotation,\n getTypeDXN as getTypeDXN$,\n getTypename as getTypename$,\n isDeleted as isDeleted$,\n isInstanceOf,\n isVersion,\n makeObject,\n objectFromJSON,\n removeTag as removeTag$,\n setDescription as setDescription$,\n setLabel as setLabel$,\n setValue as setValue$,\n sort as sort$,\n sortByLabel as sortByLabel$,\n sortByTypename as sortByTypename$,\n subscribe as subscribe$,\n objectToJSON as toJSON$,\n version as version$,\n versionValid,\n} from './internal';\nimport type * as Ref from './Ref';\nimport type * as Type from './Type';\n\n/**\n * Base type for all ECHO objects.\n */\ninterface BaseObj extends AnyEntity, Entity.OfKind<typeof Entity.Kind.Object> {}\n\n/**\n * Object type with specific properties.\n */\nexport type Obj<Props> = BaseObj & Props;\n\n/**\n * Object with no known properties beyond id and kind.\n * Use this when the object's schema/properties are not known.\n * For objects with arbitrary properties, use `Obj.AnyProps`.\n *\n * NOTE: This is a TypeScript type only, not a schema.\n * To validate that a value is an ECHO object, use `Schema.is(Type.Obj)`.\n */\nexport interface Unknown extends BaseObj {}\n\n/**\n * Object with arbitrary properties.\n *\n * NOTE: Due to how TypeScript works, this type is not assignable to a specific schema type.\n * In that case, use `Obj.instanceOf` to check if an object is of a specific type.\n *\n * Prefer using `Obj.Unknown` when you don't need to access arbitrary properties.\n */\nexport interface Any extends BaseObj, AnyProperties {}\n\n/**\n * Base type for snapshot objects (has SnapshotKindId instead of KindId).\n */\ninterface BaseSnapshot extends AnyEntity {\n readonly [SnapshotKindId]: typeof Entity.Kind.Object;\n readonly id: ObjectId;\n}\n\n/**\n * Immutable snapshot of an ECHO object.\n * Branded with SnapshotKindId (not KindId).\n * Property values are frozen at the time the snapshot was created.\n * Returned by getSnapshot() and hooks like useObject().\n *\n * Snapshots are structurally identical to reactive objects but have a different brand,\n * making them distinguishable at the TypeScript level. Neither is assignable to the other.\n */\nexport type Snapshot<T extends Unknown = Unknown> = Omit<T, KindId> & BaseSnapshot;\n\nconst defaultMeta: ObjectMeta = {\n keys: [],\n};\n\ntype Props<T = any> = {\n id?: ObjectId;\n [Meta]?: Partial<ObjectMeta>;\n} & Type.Properties<T>;\n\n// TODO(burdon): Should we allow the caller to set the id?\n/**\n * Props type for object creation with a given schema.\n */\nexport type MakeProps<S extends Schema.Schema.AnyNoContext> = {\n id?: ObjectId;\n [Meta]?: Partial<ObjectMeta>;\n} & NoInfer<Props<Schema.Schema.Type<S>>>;\n\n/**\n * Creates a new echo object of the given schema.\n * @param schema - Object schema.\n * @param props - Object properties.\n * @param meta - Object metadata (deprecated) -- pass with Obj.Meta.\n *\n * Meta can be passed as a symbol in `props`.\n *\n * Example:\n * ```ts\n * const obj = Obj.make(Person, { [Obj.Meta]: { keys: [...] }, name: 'John' });\n * ```\n *\n * Note: Only accepts object schemas, not relation schemas. Use `Relation.make` for relations.\n */\nexport const make: {\n <S extends Type.Obj.Any>(schema: S, props: MakeProps<S>): Obj<Schema.Schema.Type<S>>;\n /**\n * @deprecated Pass meta as in the example: `Obj.make(Person, { [Obj.Meta]: { keys: [...] }, name: 'John' })`.\n */\n <S extends Type.Obj.Any>(schema: S, props: MakeProps<S>, meta: Partial<ObjectMeta>): Obj<Schema.Schema.Type<S>>;\n} = <S extends Type.Obj.Any>(\n schema: S,\n props: MakeProps<S>,\n meta?: Partial<ObjectMeta>,\n): Obj<Schema.Schema.Type<S>> => {\n assertArgument(getTypeAnnotation(schema)?.kind === Entity.Kind.Object, 'schema', 'Expected an object schema');\n\n // Set default fields on meta on creation.\n if (props[MetaId] != null) {\n meta = { ...structuredClone(defaultMeta), ...props[MetaId] };\n delete props[MetaId];\n }\n\n // Filter undefined values.\n const filterUndefined = Object.fromEntries(Object.entries(props).filter(([_, v]) => v !== undefined));\n\n return makeObject<Schema.Schema.Type<S>>(schema, filterUndefined as any, {\n ...defaultMeta,\n ...meta,\n });\n};\n\n/**\n * Determine if object is an ECHO object.\n */\nexport const isObject = (obj: unknown): obj is Unknown => {\n assumeType<InternalObjectProps>(obj);\n return typeof obj === 'object' && obj !== null && obj[Entity.KindId] === Entity.Kind.Object;\n};\n\n/**\n * Subscribe to object updates.\n * The callback is called synchronously when the object is modified.\n * Only accepts reactive objects (not snapshots).\n * @returns Unsubscribe function.\n */\nexport const subscribe = (obj: Unknown, callback: () => void): (() => void) => {\n return subscribe$(obj, callback);\n};\n\n//\n// Snapshot\n//\n\n/**\n * Returns an immutable snapshot of an object.\n * The snapshot is branded with SnapshotKindId instead of KindId,\n * making it distinguishable from the reactive object at the type level.\n */\nexport const getSnapshot: <T extends Unknown>(obj: T) => Snapshot<T> = getSnapshot$ as any;\n\nexport type CloneOptions = {\n /**\n * Retain the original object's ID.\n * @default false\n */\n retainId?: boolean;\n\n /**\n * Recursively clone referenced objects.\n * @default false\n */\n deep?: boolean;\n};\n\n/**\n * Clones an object or relation.\n * This does not clone referenced objects, only the properties in the object.\n * @returns A new object with the same schema and properties.\n */\nexport const clone: <T extends Unknown>(obj: T, opts?: CloneOptions) => T = clone$;\n\n//\n// Change\n//\n\n/**\n * Makes all properties mutable recursively.\n * Used to provide a mutable view of an object within `Obj.change`.\n */\nexport type { Mutable };\n\n/**\n * Perform mutations on an echo object within a controlled context.\n *\n * All mutations within the callback are batched and trigger a single notification\n * when the callback completes. Direct mutations outside of `Obj.change` will throw\n * an error for echo objects.\n *\n * This function also works with nested objects within echo objects (e.g., Template structs)\n * that are reactive at runtime.\n *\n * @param obj - The echo object to mutate. Use `Relation.change` for relations.\n * @param callback - The callback that performs mutations on the object.\n *\n * @example\n * ```ts\n * const person = Obj.make(Person, { name: 'John', age: 25 });\n *\n * // Mutate within Obj.change\n * Obj.change(person, (p) => {\n * p.name = 'Jane';\n * p.age = 30;\n * });\n * // ONE notification fires here\n *\n * // Direct mutation throws\n * person.name = 'Bob'; // Error: Cannot modify outside Obj.change()\n * ```\n *\n * Note: Only accepts objects. Use `Relation.change` for relations.\n */\nexport const change = <T extends Unknown>(obj: T, callback: ChangeCallback<T>): void => {\n change$(obj, callback);\n};\n\n/**\n * Get a deeply nested property from an object.\n *\n * Similar to lodash.get and getDeep from @dxos/util.\n * This is the complementary function to setValue.\n * Accepts both reactive objects and snapshots.\n *\n * @param obj - The ECHO object to get the property from.\n * @param path - Path to the property (array of keys).\n * @returns The value at the path, or undefined if not found.\n *\n * @example\n * ```ts\n * const person = Obj.make(Person, {\n * name: 'John',\n * addresses: [{ street: '123 Main St' }]\n * });\n *\n * Obj.getValue(person, ['addresses', 0, 'street']); // '123 Main St'\n * Obj.getValue(person, ['addresses', 1, 'street']); // undefined\n * ```\n */\nexport const getValue = (obj: Unknown | Snapshot, path: readonly (string | number)[]): any => {\n return getValue$(obj, createJsonPath(path));\n};\n\n/**\n * Set a deeply nested property on an object, using the object's schema to determine\n * whether to initialize nested data as an empty object or array.\n *\n * Similar to lodash.set and setDeep from @dxos/util, but schema-aware.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n *\n * @param obj - The mutable ECHO object to set the property on.\n * @param path - Path to the property (array of keys).\n * @param value - Value to set.\n * @returns The value that was set.\n *\n * @example\n * ```ts\n * const person = Obj.make(Person, { name: 'John' });\n * // Person schema has: addresses: Schema.Array(Address)\n * Obj.change(person, (p) => {\n * Obj.setValue(p, ['addresses', 0, 'street'], '123 Main St');\n * });\n * // Creates: person.addresses = [{ street: '123 Main St' }]\n * ```\n */\n// TODO(wittjosiah): Compute possible path values + type value based on generic object type.\nexport const setValue: (obj: Mutable<Unknown>, path: readonly (string | number)[], value: any) => void =\n setValue$ as any;\n\n//\n// Type\n//\n\n// TODO(burdon): To discuss: prefer over ObjectId or Key.ObjectId or Type.ID?\nexport const ID = ObjectId;\nexport type ID = ObjectId;\n\n/**\n * Test if object or relation is an instance of a schema.\n * @example\n * ```ts\n * const john = Obj.make(Person, { name: 'John' });\n * const isPerson = Obj.instanceOf(Person);\n * if (isPerson(john)) {\n * // john is Person\n * }\n * ```\n */\nexport const instanceOf: {\n <S extends Type.Entity.Any>(schema: S): (value: unknown) => value is Schema.Schema.Type<S>;\n <S extends Type.Entity.Any>(schema: S, value: unknown): value is Schema.Schema.Type<S>;\n} = ((...args: [schema: Type.Entity.Any, value: unknown] | [schema: Type.Entity.Any]) => {\n if (args.length === 1) {\n return (entity: unknown) => isInstanceOf(args[0], entity);\n }\n\n return isInstanceOf(args[0], args[1]);\n}) as any;\n\n// TODO(dmaretskyi): Allow returning undefined.\n/**\n * Get the DXN of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const getDXN = (entity: Unknown | Snapshot): DXN => {\n assertArgument(!Schema.isSchema(entity), 'obj', 'Object should not be a schema.');\n return getDXN$(entity);\n};\n\n/**\n * @returns The DXN of the object's type.\n * @example dxn:example.com/type/Person:1.0.0\n */\n// TODO(wittjosiah): Narrow types.\nexport const getTypeDXN: (obj: unknown | undefined) => DXN | undefined = getTypeDXN$ as any;\n\n/**\n * Get the schema of the object.\n * Returns the branded ECHO schema used to create the object.\n */\n// TODO(wittjosiah): Narrow types.\nexport const getSchema: (obj: unknown | undefined) => Type.Entity.Any | undefined = getSchema$ as any;\n\n/**\n * @returns The typename of the object's type.\n * Accepts both reactive objects and snapshots.\n * @example `example.com/type/Person`\n */\nexport const getTypename = (entity: Unknown | Snapshot): string | undefined => getTypename$(entity);\n\n//\n// Database\n//\n\n/**\n * Get the database the object belongs to.\n * Accepts both reactive objects and snapshots.\n */\nexport const getDatabase = (entity: Unknown | Snapshot): Database.Database | undefined => getDatabase$(entity);\n\n//\n// Meta\n//\n\nexport const Meta: unique symbol = MetaId as any;\n\n/**\n * Deeply read-only version of ObjectMeta.\n * Prevents mutation at all nesting levels (e.g., `meta.keys.push()` is a TypeScript error).\n */\nexport type ReadonlyMeta = ApiReadonlyMeta;\n\n/**\n * Mutable meta type returned by `Obj.getMeta` inside an `Obj.change` callback.\n */\nexport type Meta = ApiMeta;\n\n// TODO(burdon): Narrow type.\n// TODO(dmaretskyi): Allow returning undefined.\n/**\n * Get the metadata for an object.\n * Returns mutable meta when passed a mutable object (inside `Obj.change` callback).\n * Returns read-only meta when passed a regular object or snapshot.\n *\n * @example\n * ```ts\n * // Read-only access outside change callback\n * const meta = Obj.getMeta(person); // ReadonlyMeta\n *\n * // Mutable access inside change callback\n * Obj.change(person, (p) => {\n * const meta = Obj.getMeta(p); // ObjectMeta (mutable)\n * meta.tags ??= [];\n * meta.tags.push('important');\n * });\n * ```\n */\n// TODO(wittjosiah): When passed a Snapshot, should return a snapshot of meta, not the live meta proxy.\nexport function getMeta(entity: Mutable<Unknown>): Meta;\nexport function getMeta(entity: Unknown | Snapshot): ReadonlyMeta;\nexport function getMeta(entity: Unknown | Snapshot | Mutable<Unknown>): Meta | ReadonlyMeta {\n return getMeta$(entity);\n}\n\n/**\n * @returns Foreign keys for the object from the specified source.\n * Accepts both reactive objects and snapshots.\n */\nexport const getKeys: {\n (entity: Unknown | Snapshot, source: string): ForeignKey[];\n (source: string): (entity: Unknown | Snapshot) => ForeignKey[];\n} = Function.dual(2, (entity: Unknown | Snapshot, source?: string): ForeignKey[] => getKeys$(entity, source!));\n\n/**\n * Delete all keys from the object for the specified source.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const deleteKeys = (entity: Mutable<Unknown>, source: string): void => deleteKeys$(entity, source);\n\n/**\n * Add a tag to the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const addTag = (entity: Mutable<Unknown>, tag: string): void => addTag$(entity, tag);\n\n/**\n * Remove a tag from the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const removeTag = (entity: Mutable<Unknown>, tag: string): void => removeTag$(entity, tag);\n\n/**\n * Check if the object is deleted.\n * Accepts both reactive objects and snapshots.\n */\n// TODO(dmaretskyi): Default to `false`.\nexport const isDeleted = (entity: Unknown | Snapshot): boolean => isDeleted$(entity);\n\n//\n// Annotations\n//\n\n/**\n * Get the label of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const getLabel = (entity: Unknown | Snapshot): string | undefined => getLabel$(entity);\n\n/**\n * Set the label of the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const setLabel = (entity: Mutable<Unknown>, label: string): void => setLabel$(entity, label);\n\n/**\n * Get the description of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const getDescription = (entity: Unknown | Snapshot): string | undefined => getDescription$(entity);\n\n/**\n * Set the description of the object.\n * Must be called within an `Obj.change` callback.\n *\n * NOTE: TypeScript's structural typing allows readonly objects to be passed to `Mutable<T>`\n * parameters, so there is no compile-time error. Enforcement is runtime-only.\n */\nexport const setDescription = (entity: Mutable<Unknown>, description: string): void =>\n setDescription$(entity, description);\n\n//\n// JSON\n//\n\n/**\n * JSON representation of an object.\n */\nexport type JSON = APIJSON;\n\n/**\n * Converts object to its JSON representation.\n * Accepts both reactive objects and snapshots.\n *\n * The same algorithm is used when calling the standard `JSON.stringify(obj)` function.\n */\nexport const toJSON = (entity: Unknown | Snapshot): JSON => toJSON$(entity);\n\n/**\n * Creates an object from its json representation, performing schema validation.\n * References and schemas will be resolvable if the `refResolver` is provided.\n *\n * The function must be async to support resolving the schema as well as the relation endpoints.\n *\n * @param options.refResolver - Resolver for references. Produces hydrated references that can be resolved.\n * @param options.dxn - Override object DXN. Changes the result of `Obj.getDXN`.\n */\nexport const fromJSON: (json: unknown, options?: { refResolver?: Ref.Resolver; dxn?: DXN }) => Promise<Unknown> =\n objectFromJSON as any;\n\n//\n// Sorting\n//\n\n/**\n * Comparator function type for sorting objects.\n * Accepts both reactive objects and snapshots.\n */\nexport type Comparator = ApiComparator<Unknown | Snapshot>;\n\nexport const sortByLabel: Comparator = sortByLabel$ as Comparator;\nexport const sortByTypename: Comparator = sortByTypename$ as Comparator;\nexport const sort = (...comparators: Comparator[]): Comparator => sort$(...comparators) as Comparator;\n\n//\n// Version\n//\n\nexport { VersionTypeId };\nexport type { VersionCompareResult };\n\n/**\n * Represent object version.\n * May be backed by Automerge.\n * Objects with no history are not versioned.\n */\nexport type Version = ApiVersion;\n\nexport { isVersion, versionValid, compareVersions, encodeVersion, decodeVersion };\n\n/**\n * Returns the version of the object.\n * Accepts both reactive objects and snapshots.\n */\nexport const version = (entity: Unknown | Snapshot): Version => version$(entity);\n"],
5
+ "mappings": "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",
6
6
  "names": ["addTag", "change", "clone", "deleteKeys", "getDXN", "getDatabase", "getDescription", "getKeys", "getLabel", "getSchema", "getSnapshot", "getTypeDXN", "getTypename", "isDeleted", "removeTag", "setDescription", "setLabel", "setValue", "sort", "sortByLabel", "sortByTypename", "subscribe", "version", "Function", "Schema", "createJsonPath", "getValue", "getValue$", "assertArgument", "ObjectId", "assumeType", "defaultMeta", "keys", "make", "schema", "props", "meta", "assertArgument", "getTypeAnnotation", "kind", "Kind", "Object", "MetaId", "structuredClone", "filterUndefined", "fromEntries", "entries", "filter", "_", "v", "undefined", "makeObject", "isObject", "obj", "assumeType", "KindId", "subscribe", "callback", "subscribe$", "getSnapshot", "getSnapshot$", "clone", "clone$", "change", "change$", "getValue", "path", "getValue$", "createJsonPath", "setValue", "setValue$", "ID", "ObjectId", "instanceOf", "args", "length", "entity", "isInstanceOf", "getDXN", "isSchema", "getDXN$", "getTypeDXN", "getTypeDXN$", "getSchema", "getSchema$", "getTypename", "getTypename$", "getDatabase", "getDatabase$", "Meta", "getMeta", "getMeta$", "getKeys", "dual", "source", "getKeys$", "deleteKeys", "deleteKeys$", "addTag", "tag", "addTag$", "removeTag", "removeTag$", "isDeleted", "isDeleted$", "getLabel", "getLabel$", "setLabel", "label", "setLabel$", "getDescription", "getDescription$", "setDescription", "description", "setDescription$", "toJSON", "toJSON$", "fromJSON", "objectFromJSON", "sortByLabel", "sortByLabel$", "sortByTypename", "sortByTypename$", "sort", "comparators", "sort$", "version", "entity", "version$"]
7
7
  }
@@ -1,12 +1,11 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  JsonSchemaType,
4
3
  toEffectSchema,
5
4
  toJsonSchema
6
- } from "./chunk-BJPE6CIC.mjs";
5
+ } from "./chunk-SU2LVM7J.mjs";
7
6
  import {
8
7
  __export
9
- } from "./chunk-CGS2ULMK.mjs";
8
+ } from "./chunk-J5LGTIGS.mjs";
10
9
 
11
10
  // src/JsonSchema.ts
12
11
  var JsonSchema_exports = {};
@@ -21,4 +20,4 @@ export {
21
20
  JsonSchema,
22
21
  JsonSchema_exports
23
22
  };
24
- //# sourceMappingURL=chunk-22JMFST2.mjs.map
23
+ //# sourceMappingURL=chunk-3ZEAZF7T.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/JsonSchema.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Schema from 'effect/Schema';\n\nimport { JsonSchemaType } from './internal';\n\nexport { toEffectSchema, toJsonSchema } from './internal';\n\n/**\n * Serializable JsonSchema type definition.\n */\nexport type JsonSchema = JsonSchemaType;\n\nexport const JsonSchema: Schema.Schema<JsonSchemaType> = JsonSchemaType;\n"],
5
- "mappings": ";;;;;;;;;;;AAAA;;;;;;AAeO,IAAMA,aAA4CC;",
5
+ "mappings": ";;;;;;;;;;AAAA;;;;;;AAeO,IAAMA,aAA4CC;",
6
6
  "names": ["JsonSchema", "JsonSchemaType"]
7
7
  }
@@ -1,9 +1,7 @@
1
- import "@dxos/node-std/globals";
2
-
3
1
  // src/SchemaRegistry.ts
4
2
  var SchemaRegistry_exports = {};
5
3
 
6
4
  export {
7
5
  SchemaRegistry_exports
8
6
  };
9
- //# sourceMappingURL=chunk-ZHXZGIXD.mjs.map
7
+ //# sourceMappingURL=chunk-4L6DOFXP.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/SchemaRegistry.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Types from 'effect/Types';\n\nimport type * as JsonSchema from './JsonSchema';\nimport type * as Key from './Key';\nimport type * as QueryResult from './QueryResult';\nimport type * as Type from './Type';\n\n// TODO(wittjosiah): Replace w/ Query.Query.\nexport type Query = {\n /**\n * Filter by schema ID.\n * Schema id is a DXN with `echo` or `type` kind.\n */\n id?: string | string[];\n\n /**\n * Id of the backing ECHO object.\n */\n backingObjectId?: Key.ObjectId | Key.ObjectId[];\n\n /**\n * One or more typenames to filter by.\n */\n typename?: string | string[];\n\n /**\n * [Semver Range](https://docs.npmjs.com/cli/v6/using-npm/semver#ranges) for the schema version.\n */\n version?: string;\n\n /**\n * Where to look for the schema.\n *\n * Database schema are stored in the database of the current space.\n * Runtime schema are registered in the runtime.\n *\n * @default ['database']\n */\n location?: ('database' | 'runtime')[];\n\n /**\n * Include system schemas.\n * @default false\n *\n * The system schema include but are not limited to:\n * - dxos.org/type/Schema\n */\n includeSystem?: boolean;\n};\n\n/**\n * Input for schema registration.\n * The typename, version and schema mutability metadata is read from the schema annotations.\n *\n * Accepts:\n * - Branded ECHO schemas created with Type.Obj() or Type.Relation()\n * - JSON schema with typename and version\n */\nexport type RegisterSchemaInput =\n | Type.Entity.Any\n | {\n typename: string;\n version: string;\n jsonSchema: JsonSchema.JsonSchema;\n /**\n * Display name of the schema.\n */\n name?: string;\n };\n\nexport type ExtractQueryResult<Query> = Query extends { location: ('database' | 'runtime')[] }\n ? Type.Entity.Any\n : Type.RuntimeType;\n\nexport interface SchemaRegistry {\n /**\n * Checks if the provided schema is registered.\n */\n // TODO(burdon): Type?\n hasSchema(schema: Type.Entity.Any): boolean;\n\n /**\n * Registers the provided schema.\n *\n * @returns Mutable runtime instances of schemas that were registered.\n *\n * The behavior of this method depends on the state of the database.\n * The general principle is that the schema will be upserted into the space.\n * If an equivalent schema with the same name and version already exists, the method does nothing.\n * If a different schema with the same name and version exists, the method throws an error.\n * If no schema with the same name and version exists, a new schema will be inserted based on semantic versioning rules.\n */\n register(input: RegisterSchemaInput[]): Promise<Type.RuntimeType[]>;\n\n /**\n *\n */\n query<Q extends Types.NoExcessProperties<Query, Q>>(\n query?: Q & Query,\n ): QueryResult.QueryResult<ExtractQueryResult<Q>>;\n}\n"],
5
- "mappings": ";;;AAAA;",
5
+ "mappings": ";AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,3 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  Currency,
4
3
  CurrencyAnnotationId,
@@ -29,10 +28,10 @@ import {
29
28
  getOptionsAnnotation,
30
29
  getTypeEnum,
31
30
  typeToFormat
32
- } from "./chunk-FRDT7RA4.mjs";
31
+ } from "./chunk-62DWJ6CE.mjs";
33
32
  import {
34
33
  __export
35
- } from "./chunk-CGS2ULMK.mjs";
34
+ } from "./chunk-J5LGTIGS.mjs";
36
35
 
37
36
  // src/Format.ts
38
37
  var Format_exports = {};
@@ -71,4 +70,4 @@ __export(Format_exports, {
71
70
  export {
72
71
  Format_exports
73
72
  };
74
- //# sourceMappingURL=chunk-PQZW3S6L.mjs.map
73
+ //# sourceMappingURL=chunk-4TT624YA.mjs.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/Format.ts"],
4
4
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type TypeFormat as Format } from './internal';\n\nexport * from './internal/formats';\n\nexport type { Format };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,6 @@
1
- import "@dxos/node-std/globals";
2
1
  import {
3
2
  createAnnotationHelper
4
- } from "./chunk-YKTSSMDS.mjs";
3
+ } from "./chunk-YQYMWZAD.mjs";
5
4
 
6
5
  // src/internal/formats/types.ts
7
6
  import * as Function from "effect/Function";
@@ -367,7 +366,7 @@ var SelectOption = Schema6.Struct({
367
366
  title: Schema6.String,
368
367
  /** Color palette used for visual styling. */
369
368
  color: Schema6.String
370
- }).pipe(Schema6.mutable);
369
+ });
371
370
 
372
371
  export {
373
372
  TypeEnum,
@@ -400,4 +399,4 @@ export {
400
399
  Format,
401
400
  SelectOption
402
401
  };
403
- //# sourceMappingURL=chunk-FRDT7RA4.mjs.map
402
+ //# sourceMappingURL=chunk-62DWJ6CE.mjs.map