@dxos/echo 0.8.4-main.c85a9c8dae → 0.8.4-main.d05673bc65

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 (499) hide show
  1. package/dist/lib/neutral/Annotation.mjs +3 -3
  2. package/dist/lib/neutral/Database.mjs +4 -4
  3. package/dist/lib/neutral/Entity.mjs +10 -7
  4. package/dist/lib/neutral/Err.mjs +1 -1
  5. package/dist/lib/neutral/Feed.mjs +13 -10
  6. package/dist/lib/neutral/Filter.mjs +11 -8
  7. package/dist/lib/neutral/Format.mjs +3 -3
  8. package/dist/lib/neutral/JsonSchema.mjs +8 -7
  9. package/dist/lib/neutral/Obj.mjs +11 -8
  10. package/dist/lib/neutral/Order.mjs +1 -1
  11. package/dist/lib/neutral/Query.mjs +16 -13
  12. package/dist/lib/neutral/Ref.mjs +7 -7
  13. package/dist/lib/neutral/Relation.mjs +12 -9
  14. package/dist/lib/neutral/SchemaRegistry.mjs +1 -1
  15. package/dist/lib/neutral/Tag.mjs +13 -10
  16. package/dist/lib/neutral/Type.mjs +10 -7
  17. package/dist/lib/neutral/chunk-43Y5DOS6.mjs +396 -0
  18. package/dist/lib/neutral/chunk-43Y5DOS6.mjs.map +7 -0
  19. package/dist/lib/neutral/{chunk-GAWKQ5DZ.mjs → chunk-724GQYEN.mjs} +5 -5
  20. package/dist/lib/neutral/chunk-724GQYEN.mjs.map +7 -0
  21. package/dist/lib/neutral/{chunk-M2KVTHZM.mjs → chunk-B5OXLWZL.mjs} +10 -10
  22. package/dist/lib/neutral/chunk-B5OXLWZL.mjs.map +7 -0
  23. package/dist/lib/neutral/{chunk-T6JEFNP6.mjs → chunk-BNCCGLJN.mjs} +1 -1
  24. package/dist/lib/neutral/{chunk-T6JEFNP6.mjs.map → chunk-BNCCGLJN.mjs.map} +1 -1
  25. package/dist/lib/neutral/chunk-BOZZPUXE.mjs +787 -0
  26. package/dist/lib/neutral/chunk-BOZZPUXE.mjs.map +7 -0
  27. package/dist/lib/neutral/{chunk-ZWKJ4LZJ.mjs → chunk-CIRHIEMW.mjs} +16 -16
  28. package/dist/lib/neutral/chunk-CIRHIEMW.mjs.map +7 -0
  29. package/dist/lib/neutral/{chunk-GFNCSK7F.mjs → chunk-DYDJBZEG.mjs} +10 -9
  30. package/dist/lib/neutral/chunk-DYDJBZEG.mjs.map +7 -0
  31. package/dist/lib/neutral/{chunk-QXF3LGN2.mjs → chunk-FXEG7EOK.mjs} +5 -3
  32. package/dist/lib/neutral/chunk-FXEG7EOK.mjs.map +7 -0
  33. package/dist/lib/neutral/{chunk-DZQSL6RW.mjs → chunk-FZO7LQO7.mjs} +2 -2
  34. package/dist/lib/neutral/{chunk-DZQSL6RW.mjs.map → chunk-FZO7LQO7.mjs.map} +1 -1
  35. package/dist/lib/neutral/{chunk-AQP4QKYP.mjs → chunk-KTAWP7GI.mjs} +8 -8
  36. package/dist/lib/neutral/chunk-KTAWP7GI.mjs.map +7 -0
  37. package/dist/lib/neutral/{chunk-5ELDDYWE.mjs → chunk-NEGC54NE.mjs} +4 -4
  38. package/dist/lib/neutral/chunk-NEGC54NE.mjs.map +7 -0
  39. package/dist/lib/neutral/{chunk-KGV3QIRX.mjs → chunk-NQRLRYJM.mjs} +11 -11
  40. package/dist/lib/neutral/chunk-NQRLRYJM.mjs.map +7 -0
  41. package/dist/lib/neutral/{chunk-ALOGSVBP.mjs → chunk-NXMFBIT5.mjs} +3 -3
  42. package/dist/lib/neutral/chunk-NXMFBIT5.mjs.map +7 -0
  43. package/dist/lib/neutral/{chunk-OVUBTQLT.mjs → chunk-OENWMTE6.mjs} +2 -2
  44. package/dist/lib/neutral/chunk-OENWMTE6.mjs.map +7 -0
  45. package/dist/lib/neutral/{chunk-T4MPQJ7X.mjs → chunk-RMLF7JOZ.mjs} +6 -6
  46. package/dist/lib/neutral/chunk-RMLF7JOZ.mjs.map +7 -0
  47. package/dist/lib/neutral/{chunk-F7KMHDPJ.mjs → chunk-SEMVAGBM.mjs} +41 -13
  48. package/dist/lib/neutral/chunk-SEMVAGBM.mjs.map +7 -0
  49. package/dist/lib/neutral/{chunk-PP4DNUZU.mjs → chunk-TQQZLKB7.mjs} +1541 -2748
  50. package/dist/lib/neutral/chunk-TQQZLKB7.mjs.map +7 -0
  51. package/dist/lib/neutral/{chunk-MXQJZCPY.mjs → chunk-UBEZSGXY.mjs} +1 -1
  52. package/dist/lib/neutral/chunk-UBEZSGXY.mjs.map +7 -0
  53. package/dist/lib/neutral/{chunk-W7OP5HGZ.mjs → chunk-UFDK26FO.mjs} +6 -6
  54. package/dist/lib/neutral/chunk-UFDK26FO.mjs.map +7 -0
  55. package/dist/lib/neutral/{chunk-ZTUBYOGB.mjs → chunk-UI6MWK5W.mjs} +1 -1
  56. package/dist/lib/neutral/chunk-UI6MWK5W.mjs.map +7 -0
  57. package/dist/lib/neutral/{chunk-O3TZFQCT.mjs → chunk-UTBRYVQC.mjs} +2 -2
  58. package/dist/lib/neutral/chunk-UTBRYVQC.mjs.map +7 -0
  59. package/dist/lib/neutral/{chunk-BRJSLACP.mjs → chunk-VA2F47ZC.mjs} +12 -12
  60. package/dist/lib/neutral/chunk-VA2F47ZC.mjs.map +7 -0
  61. package/dist/lib/neutral/{chunk-4KG6IGL4.mjs → chunk-WYOKA6AE.mjs} +4 -4
  62. package/dist/lib/neutral/{chunk-4KG6IGL4.mjs.map → chunk-WYOKA6AE.mjs.map} +2 -2
  63. package/dist/lib/neutral/chunk-YWXWXIE5.mjs +34 -0
  64. package/dist/lib/neutral/chunk-YWXWXIE5.mjs.map +7 -0
  65. package/dist/lib/neutral/index.mjs +24 -21
  66. package/dist/lib/neutral/internal/index.mjs +44 -38
  67. package/dist/lib/neutral/meta.json +1 -1
  68. package/dist/lib/neutral/testing/index.mjs +35 -31
  69. package/dist/lib/neutral/testing/index.mjs.map +2 -2
  70. package/dist/types/src/Annotation.d.ts +3 -3
  71. package/dist/types/src/Annotation.d.ts.map +1 -1
  72. package/dist/types/src/Collection.d.ts.map +1 -1
  73. package/dist/types/src/Database.d.ts +3 -3
  74. package/dist/types/src/Database.d.ts.map +1 -1
  75. package/dist/types/src/Dataset.d.ts.map +1 -1
  76. package/dist/types/src/Entity.d.ts.map +1 -1
  77. package/dist/types/src/Err.d.ts.map +1 -1
  78. package/dist/types/src/Feed.d.ts +4 -4
  79. package/dist/types/src/Feed.d.ts.map +1 -1
  80. package/dist/types/src/Filter.d.ts.map +1 -1
  81. package/dist/types/src/Format.d.ts +1 -1
  82. package/dist/types/src/Format.d.ts.map +1 -1
  83. package/dist/types/src/Hypergraph.d.ts +6 -1
  84. package/dist/types/src/Hypergraph.d.ts.map +1 -1
  85. package/dist/types/src/JsonSchema.d.ts +5 -5
  86. package/dist/types/src/JsonSchema.d.ts.map +1 -1
  87. package/dist/types/src/Obj.d.ts +4 -2
  88. package/dist/types/src/Obj.d.ts.map +1 -1
  89. package/dist/types/src/Order.d.ts.map +1 -1
  90. package/dist/types/src/Query.d.ts.map +1 -1
  91. package/dist/types/src/Ref.d.ts +11 -11
  92. package/dist/types/src/Ref.d.ts.map +1 -1
  93. package/dist/types/src/Relation.d.ts +2 -1
  94. package/dist/types/src/Relation.d.ts.map +1 -1
  95. package/dist/types/src/SchemaRegistry.d.ts +1 -1
  96. package/dist/types/src/Tag.d.ts.map +1 -1
  97. package/dist/types/src/Type.d.ts +12 -11
  98. package/dist/types/src/Type.d.ts.map +1 -1
  99. package/dist/types/src/View.d.ts.map +1 -1
  100. package/dist/types/src/internal/{annotations → Annotation}/annotations.d.ts +23 -2
  101. package/dist/types/src/internal/Annotation/annotations.d.ts.map +1 -0
  102. package/dist/types/src/internal/Annotation/annotations.test.d.ts.map +1 -0
  103. package/dist/types/src/internal/Annotation/index.d.ts +4 -0
  104. package/dist/types/src/internal/Annotation/index.d.ts.map +1 -0
  105. package/dist/types/src/internal/{api → Annotation}/sorting.d.ts +1 -1
  106. package/dist/types/src/internal/Annotation/sorting.d.ts.map +1 -0
  107. package/dist/types/src/internal/{annotations → Annotation}/util.d.ts +1 -1
  108. package/dist/types/src/internal/Annotation/util.d.ts.map +1 -0
  109. package/dist/types/src/internal/{api/entity.d.ts → Entity/api.d.ts} +2 -2
  110. package/dist/types/src/internal/Entity/api.d.ts.map +1 -0
  111. package/dist/types/src/internal/{entities → Entity}/entity.d.ts +2 -2
  112. package/dist/types/src/internal/Entity/entity.d.ts.map +1 -0
  113. package/dist/types/src/internal/{entities → Entity}/index.d.ts +2 -0
  114. package/dist/types/src/internal/Entity/index.d.ts.map +1 -0
  115. package/dist/types/src/internal/{entities → Entity}/model.d.ts +2 -26
  116. package/dist/types/src/internal/Entity/model.d.ts.map +1 -0
  117. package/dist/types/src/internal/{entities → Entity}/object.d.ts +2 -2
  118. package/dist/types/src/internal/Entity/object.d.ts.map +1 -0
  119. package/dist/types/src/internal/{entities → Entity}/relation.d.ts +3 -30
  120. package/dist/types/src/internal/Entity/relation.d.ts.map +1 -0
  121. package/dist/types/src/internal/Entity/util.d.ts.map +1 -0
  122. package/dist/types/src/internal/{api → Entity}/version.d.ts +1 -1
  123. package/dist/types/src/internal/Entity/version.d.ts.map +1 -0
  124. package/dist/types/src/internal/Format/date.d.ts.map +1 -0
  125. package/dist/types/src/internal/Format/date.test.d.ts.map +1 -0
  126. package/dist/types/src/internal/Format/format.d.ts.map +1 -0
  127. package/dist/types/src/internal/Format/format.test.d.ts.map +1 -0
  128. package/dist/types/src/internal/Format/index.d.ts.map +1 -0
  129. package/dist/types/src/internal/Format/number.d.ts.map +1 -0
  130. package/dist/types/src/internal/Format/object.d.ts.map +1 -0
  131. package/dist/types/src/internal/Format/select.d.ts.map +1 -0
  132. package/dist/types/src/internal/Format/string.d.ts.map +1 -0
  133. package/dist/types/src/internal/{formats → Format}/types.d.ts +1 -1
  134. package/dist/types/src/internal/Format/types.d.ts.map +1 -0
  135. package/dist/types/src/internal/{json-schema → JsonSchema}/annotations.d.ts +1 -1
  136. package/dist/types/src/internal/JsonSchema/annotations.d.ts.map +1 -0
  137. package/dist/types/src/internal/JsonSchema/effect-schema.test.d.ts.map +1 -0
  138. package/dist/types/src/internal/JsonSchema/index.d.ts.map +1 -0
  139. package/dist/types/src/internal/JsonSchema/json-schema-normalize.d.ts.map +1 -0
  140. package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema-type.d.ts +23 -23
  141. package/dist/types/src/internal/JsonSchema/json-schema-type.d.ts.map +1 -0
  142. package/dist/types/src/internal/JsonSchema/json-schema.d.ts.map +1 -0
  143. package/dist/types/src/internal/JsonSchema/json-schema.test.d.ts.map +1 -0
  144. package/dist/types/src/internal/Obj/clone.d.ts.map +1 -0
  145. package/dist/types/src/internal/Obj/common.d.ts.map +1 -0
  146. package/dist/types/src/internal/{object → Obj}/create-object.d.ts +2 -2
  147. package/dist/types/src/internal/Obj/create-object.d.ts.map +1 -0
  148. package/dist/types/src/internal/Obj/create-object.test.d.ts.map +1 -0
  149. package/dist/types/src/internal/{object → Obj}/deleted.d.ts +1 -1
  150. package/dist/types/src/internal/Obj/deleted.d.ts.map +1 -0
  151. package/dist/types/src/internal/Obj/ids.d.ts.map +1 -0
  152. package/dist/types/src/internal/Obj/index.d.ts.map +1 -0
  153. package/dist/types/src/internal/Obj/inspect.d.ts.map +1 -0
  154. package/dist/types/src/internal/{object → Obj}/json-serializer.d.ts +12 -5
  155. package/dist/types/src/internal/Obj/json-serializer.d.ts.map +1 -0
  156. package/dist/types/src/internal/Obj/json-serializer.test.d.ts.map +1 -0
  157. package/dist/types/src/internal/Obj/schema-validator.d.ts +2 -0
  158. package/dist/types/src/internal/Obj/schema-validator.d.ts.map +1 -0
  159. package/dist/types/src/internal/Obj/schema-validator.test.d.ts.map +1 -0
  160. package/dist/types/src/internal/{object → Obj}/set-value.d.ts +1 -1
  161. package/dist/types/src/internal/Obj/set-value.d.ts.map +1 -0
  162. package/dist/types/src/internal/Obj/set-value.test.d.ts.map +1 -0
  163. package/dist/types/src/internal/Obj/snapshot.d.ts.map +1 -0
  164. package/dist/types/src/internal/{object → Obj}/typed-object.d.ts +2 -2
  165. package/dist/types/src/internal/Obj/typed-object.d.ts.map +1 -0
  166. package/dist/types/src/internal/Obj/typed-object.test.d.ts.map +1 -0
  167. package/dist/types/src/internal/Ref/index.d.ts.map +1 -0
  168. package/dist/types/src/internal/{ref → Ref}/ref-array.d.ts +1 -1
  169. package/dist/types/src/internal/Ref/ref-array.d.ts.map +1 -0
  170. package/dist/types/src/internal/{ref → Ref}/ref.d.ts +2 -2
  171. package/dist/types/src/internal/{ref → Ref}/ref.d.ts.map +1 -1
  172. package/dist/types/src/internal/Ref/ref.test.d.ts.map +1 -0
  173. package/dist/types/src/internal/{schema → Type}/compose.d.ts +1 -1
  174. package/dist/types/src/internal/Type/compose.d.ts.map +1 -0
  175. package/dist/types/src/internal/Type/compose.test.d.ts.map +1 -0
  176. package/dist/types/src/internal/{schema → Type}/echo-schema.d.ts +5 -5
  177. package/dist/types/src/internal/Type/echo-schema.d.ts.map +1 -0
  178. package/dist/types/src/internal/Type/index.d.ts.map +1 -0
  179. package/dist/types/src/internal/Type/manipulation.d.ts.map +1 -0
  180. package/dist/types/src/internal/{schema → Type}/persistent-schema.d.ts +2 -2
  181. package/dist/types/src/internal/Type/persistent-schema.d.ts.map +1 -0
  182. package/dist/types/src/internal/{api → common/api}/index.d.ts +0 -4
  183. package/dist/types/src/internal/common/api/index.d.ts.map +1 -0
  184. package/dist/types/src/internal/common/api/meta.d.ts.map +1 -0
  185. package/dist/types/src/internal/common/index.d.ts +4 -0
  186. package/dist/types/src/internal/common/index.d.ts.map +1 -0
  187. package/dist/types/src/internal/common/proxy/change-context.d.ts.map +1 -0
  188. package/dist/types/src/internal/common/proxy/change.test.d.ts.map +1 -0
  189. package/dist/types/src/internal/common/proxy/define-hidden-property.d.ts.map +1 -0
  190. package/dist/types/src/internal/common/proxy/errors.d.ts.map +1 -0
  191. package/dist/types/src/internal/common/proxy/event-batch.d.ts.map +1 -0
  192. package/dist/types/src/internal/common/proxy/handler.test.d.ts.map +1 -0
  193. package/dist/types/src/internal/common/proxy/index.d.ts.map +1 -0
  194. package/dist/types/src/internal/common/proxy/json-serializer.d.ts.map +1 -0
  195. package/dist/types/src/internal/common/proxy/make-object.d.ts.map +1 -0
  196. package/dist/types/src/internal/common/proxy/ownership.d.ts.map +1 -0
  197. package/dist/types/src/internal/common/proxy/proxy-types.d.ts.map +1 -0
  198. package/dist/types/src/internal/common/proxy/proxy-utils.d.ts.map +1 -0
  199. package/dist/types/src/internal/common/proxy/reactive-array.d.ts.map +1 -0
  200. package/dist/types/src/internal/{proxy → common/proxy}/reactive.d.ts +1 -1
  201. package/dist/types/src/internal/common/proxy/reactive.d.ts.map +1 -0
  202. package/dist/types/src/internal/common/proxy/schema-validator.d.ts.map +1 -0
  203. package/dist/types/src/internal/common/proxy/schema.test.d.ts.map +1 -0
  204. package/dist/types/src/internal/common/proxy/symbols.d.ts.map +1 -0
  205. package/dist/types/src/internal/common/proxy/typed-handler.d.ts.map +1 -0
  206. package/dist/types/src/internal/common/proxy/typed-handler.test.d.ts.map +1 -0
  207. package/dist/types/src/internal/common/proxy/typed-object.test.d.ts.map +1 -0
  208. package/dist/types/src/internal/common/types/base.d.ts.map +1 -0
  209. package/dist/types/src/internal/{types → common/types}/entity.d.ts +1 -1
  210. package/dist/types/src/internal/common/types/entity.d.ts.map +1 -0
  211. package/dist/types/src/internal/{types → common/types}/index.d.ts +1 -0
  212. package/dist/types/src/internal/common/types/index.d.ts.map +1 -0
  213. package/dist/types/src/internal/{types → common/types}/meta.d.ts +3 -3
  214. package/dist/types/src/internal/common/types/meta.d.ts.map +1 -0
  215. package/dist/types/src/internal/common/types/model-symbols.d.ts +54 -0
  216. package/dist/types/src/internal/common/types/model-symbols.d.ts.map +1 -0
  217. package/dist/types/src/internal/common/types/typename.d.ts.map +1 -0
  218. package/dist/types/src/internal/common/types/version.d.ts.map +1 -0
  219. package/dist/types/src/internal/index.d.ts +8 -10
  220. package/dist/types/src/internal/index.d.ts.map +1 -1
  221. package/dist/types/src/testing/test-schema.d.ts +7 -7
  222. package/dist/types/tsconfig.tsbuildinfo +1 -1
  223. package/package.json +13 -13
  224. package/src/Annotation.ts +5 -3
  225. package/src/Collection.ts +3 -1
  226. package/src/Database.ts +6 -4
  227. package/src/Dataset.ts +2 -0
  228. package/src/Entity.ts +3 -0
  229. package/src/Err.ts +2 -0
  230. package/src/Feed.ts +8 -5
  231. package/src/Filter.ts +2 -0
  232. package/src/Format.ts +1 -1
  233. package/src/Hypergraph.ts +7 -2
  234. package/src/JsonSchema.ts +7 -5
  235. package/src/Obj.test.ts +2 -2
  236. package/src/Obj.ts +15 -9
  237. package/src/Order.ts +2 -0
  238. package/src/Query.test.ts +23 -23
  239. package/src/Query.ts +4 -2
  240. package/src/Ref.ts +14 -12
  241. package/src/Relation.test.ts +2 -2
  242. package/src/Relation.ts +6 -3
  243. package/src/SchemaRegistry.ts +1 -1
  244. package/src/Tag.ts +3 -1
  245. package/src/Type.ts +14 -11
  246. package/src/View.ts +4 -2
  247. package/src/internal/{annotations → Annotation}/annotations.test.ts +6 -6
  248. package/src/internal/{annotations → Annotation}/annotations.ts +56 -11
  249. package/src/internal/{annotations → Annotation}/index.ts +1 -0
  250. package/src/internal/{api → Annotation}/sorting.ts +2 -3
  251. package/src/internal/{annotations → Annotation}/util.ts +1 -1
  252. package/src/internal/{api/entity.ts → Entity/api.ts} +4 -2
  253. package/src/internal/{entities → Entity}/entity.ts +2 -2
  254. package/src/internal/{entities → Entity}/index.ts +2 -0
  255. package/src/internal/{entities → Entity}/model.ts +13 -42
  256. package/src/internal/{entities → Entity}/object.ts +2 -2
  257. package/src/internal/{entities → Entity}/relation.ts +19 -36
  258. package/src/internal/{api → Entity}/version.ts +3 -2
  259. package/src/internal/{formats → Format}/date.test.ts +1 -1
  260. package/src/internal/{formats → Format}/format.test.ts +1 -1
  261. package/src/internal/{formats → Format}/types.ts +2 -2
  262. package/src/internal/{json-schema → JsonSchema}/annotations.ts +3 -3
  263. package/src/internal/{json-schema → JsonSchema}/json-schema-type.ts +4 -4
  264. package/src/internal/{json-schema → JsonSchema}/json-schema.test.ts +48 -48
  265. package/src/internal/{json-schema → JsonSchema}/json-schema.ts +3 -3
  266. package/src/internal/{object → Obj}/clone.ts +3 -3
  267. package/src/internal/{object → Obj}/common.ts +2 -2
  268. package/src/internal/{object → Obj}/create-object.test.ts +4 -4
  269. package/src/internal/{object → Obj}/create-object.ts +5 -5
  270. package/src/internal/{object → Obj}/deleted.ts +2 -2
  271. package/src/internal/{object → Obj}/inspect.ts +2 -2
  272. package/src/internal/{object → Obj}/json-serializer.test.ts +6 -6
  273. package/src/internal/{object → Obj}/json-serializer.ts +17 -6
  274. package/src/internal/{object → Obj}/schema-validator.ts +1 -1
  275. package/src/internal/{object → Obj}/set-value.ts +2 -2
  276. package/src/internal/{object → Obj}/snapshot.ts +14 -5
  277. package/src/internal/{object → Obj}/typed-object.test.ts +3 -3
  278. package/src/internal/{object → Obj}/typed-object.ts +2 -2
  279. package/src/internal/{ref → Ref}/ref-array.ts +1 -1
  280. package/src/internal/{ref → Ref}/ref.test.ts +4 -4
  281. package/src/internal/{ref → Ref}/ref.ts +3 -3
  282. package/src/internal/{schema → Type}/compose.test.ts +5 -5
  283. package/src/internal/{schema → Type}/compose.ts +1 -1
  284. package/src/internal/{schema → Type}/echo-schema.ts +6 -6
  285. package/src/internal/{schema → Type}/manipulation.ts +1 -1
  286. package/src/internal/{schema → Type}/persistent-schema.ts +5 -5
  287. package/src/internal/{api → common/api}/index.ts +0 -4
  288. package/src/internal/common/index.ts +7 -0
  289. package/src/internal/{proxy → common/proxy}/change.test.ts +3 -3
  290. package/src/internal/{proxy → common/proxy}/handler.test.ts +2 -2
  291. package/src/internal/{proxy → common/proxy}/json-serializer.ts +6 -3
  292. package/src/internal/{proxy → common/proxy}/make-object.ts +1 -1
  293. package/src/internal/{proxy → common/proxy}/reactive.ts +1 -1
  294. package/src/internal/{proxy → common/proxy}/schema.test.ts +10 -10
  295. package/src/internal/{proxy → common/proxy}/typed-handler.test.ts +6 -6
  296. package/src/internal/{proxy → common/proxy}/typed-handler.ts +2 -3
  297. package/src/internal/{proxy → common/proxy}/typed-object.test.ts +4 -4
  298. package/src/internal/{types → common/types}/entity.ts +1 -1
  299. package/src/internal/{types → common/types}/index.ts +1 -0
  300. package/src/internal/{types → common/types}/meta.ts +1 -1
  301. package/src/internal/common/types/model-symbols.ts +69 -0
  302. package/src/internal/index.ts +8 -31
  303. package/src/testing/api.test.ts +2 -2
  304. package/src/testing/test-schema.ts +9 -9
  305. package/dist/lib/neutral/chunk-5ELDDYWE.mjs.map +0 -7
  306. package/dist/lib/neutral/chunk-ALOGSVBP.mjs.map +0 -7
  307. package/dist/lib/neutral/chunk-AQP4QKYP.mjs.map +0 -7
  308. package/dist/lib/neutral/chunk-BRJSLACP.mjs.map +0 -7
  309. package/dist/lib/neutral/chunk-F7KMHDPJ.mjs.map +0 -7
  310. package/dist/lib/neutral/chunk-GAWKQ5DZ.mjs.map +0 -7
  311. package/dist/lib/neutral/chunk-GFNCSK7F.mjs.map +0 -7
  312. package/dist/lib/neutral/chunk-KGV3QIRX.mjs.map +0 -7
  313. package/dist/lib/neutral/chunk-M2KVTHZM.mjs.map +0 -7
  314. package/dist/lib/neutral/chunk-MXQJZCPY.mjs.map +0 -7
  315. package/dist/lib/neutral/chunk-O3TZFQCT.mjs.map +0 -7
  316. package/dist/lib/neutral/chunk-OVUBTQLT.mjs.map +0 -7
  317. package/dist/lib/neutral/chunk-PP4DNUZU.mjs.map +0 -7
  318. package/dist/lib/neutral/chunk-QXF3LGN2.mjs.map +0 -7
  319. package/dist/lib/neutral/chunk-T4MPQJ7X.mjs.map +0 -7
  320. package/dist/lib/neutral/chunk-W7OP5HGZ.mjs.map +0 -7
  321. package/dist/lib/neutral/chunk-ZTUBYOGB.mjs.map +0 -7
  322. package/dist/lib/neutral/chunk-ZWKJ4LZJ.mjs.map +0 -7
  323. package/dist/types/src/internal/annotations/annotations.d.ts.map +0 -1
  324. package/dist/types/src/internal/annotations/annotations.test.d.ts.map +0 -1
  325. package/dist/types/src/internal/annotations/index.d.ts +0 -3
  326. package/dist/types/src/internal/annotations/index.d.ts.map +0 -1
  327. package/dist/types/src/internal/annotations/util.d.ts.map +0 -1
  328. package/dist/types/src/internal/api/annotations.d.ts +0 -23
  329. package/dist/types/src/internal/api/annotations.d.ts.map +0 -1
  330. package/dist/types/src/internal/api/entity.d.ts.map +0 -1
  331. package/dist/types/src/internal/api/index.d.ts.map +0 -1
  332. package/dist/types/src/internal/api/meta.d.ts.map +0 -1
  333. package/dist/types/src/internal/api/sorting.d.ts.map +0 -1
  334. package/dist/types/src/internal/api/version.d.ts.map +0 -1
  335. package/dist/types/src/internal/entities/entity.d.ts.map +0 -1
  336. package/dist/types/src/internal/entities/index.d.ts.map +0 -1
  337. package/dist/types/src/internal/entities/model.d.ts.map +0 -1
  338. package/dist/types/src/internal/entities/object.d.ts.map +0 -1
  339. package/dist/types/src/internal/entities/relation.d.ts.map +0 -1
  340. package/dist/types/src/internal/entities/util.d.ts.map +0 -1
  341. package/dist/types/src/internal/formats/date.d.ts.map +0 -1
  342. package/dist/types/src/internal/formats/date.test.d.ts.map +0 -1
  343. package/dist/types/src/internal/formats/format.d.ts.map +0 -1
  344. package/dist/types/src/internal/formats/format.test.d.ts.map +0 -1
  345. package/dist/types/src/internal/formats/index.d.ts.map +0 -1
  346. package/dist/types/src/internal/formats/number.d.ts.map +0 -1
  347. package/dist/types/src/internal/formats/object.d.ts.map +0 -1
  348. package/dist/types/src/internal/formats/select.d.ts.map +0 -1
  349. package/dist/types/src/internal/formats/string.d.ts.map +0 -1
  350. package/dist/types/src/internal/formats/types.d.ts.map +0 -1
  351. package/dist/types/src/internal/json-schema/annotations.d.ts.map +0 -1
  352. package/dist/types/src/internal/json-schema/effect-schema.test.d.ts.map +0 -1
  353. package/dist/types/src/internal/json-schema/index.d.ts.map +0 -1
  354. package/dist/types/src/internal/json-schema/json-schema-normalize.d.ts.map +0 -1
  355. package/dist/types/src/internal/json-schema/json-schema-type.d.ts.map +0 -1
  356. package/dist/types/src/internal/json-schema/json-schema.d.ts.map +0 -1
  357. package/dist/types/src/internal/json-schema/json-schema.test.d.ts.map +0 -1
  358. package/dist/types/src/internal/object/clone.d.ts.map +0 -1
  359. package/dist/types/src/internal/object/common.d.ts.map +0 -1
  360. package/dist/types/src/internal/object/create-object.d.ts.map +0 -1
  361. package/dist/types/src/internal/object/create-object.test.d.ts.map +0 -1
  362. package/dist/types/src/internal/object/deleted.d.ts.map +0 -1
  363. package/dist/types/src/internal/object/ids.d.ts.map +0 -1
  364. package/dist/types/src/internal/object/index.d.ts.map +0 -1
  365. package/dist/types/src/internal/object/inspect.d.ts.map +0 -1
  366. package/dist/types/src/internal/object/json-serializer.d.ts.map +0 -1
  367. package/dist/types/src/internal/object/json-serializer.test.d.ts.map +0 -1
  368. package/dist/types/src/internal/object/schema-validator.d.ts +0 -2
  369. package/dist/types/src/internal/object/schema-validator.d.ts.map +0 -1
  370. package/dist/types/src/internal/object/schema-validator.test.d.ts.map +0 -1
  371. package/dist/types/src/internal/object/set-value.d.ts.map +0 -1
  372. package/dist/types/src/internal/object/set-value.test.d.ts.map +0 -1
  373. package/dist/types/src/internal/object/snapshot.d.ts.map +0 -1
  374. package/dist/types/src/internal/object/typed-object.d.ts.map +0 -1
  375. package/dist/types/src/internal/object/typed-object.test.d.ts.map +0 -1
  376. package/dist/types/src/internal/proxy/change-context.d.ts.map +0 -1
  377. package/dist/types/src/internal/proxy/change.test.d.ts.map +0 -1
  378. package/dist/types/src/internal/proxy/define-hidden-property.d.ts.map +0 -1
  379. package/dist/types/src/internal/proxy/errors.d.ts.map +0 -1
  380. package/dist/types/src/internal/proxy/event-batch.d.ts.map +0 -1
  381. package/dist/types/src/internal/proxy/handler.test.d.ts.map +0 -1
  382. package/dist/types/src/internal/proxy/index.d.ts.map +0 -1
  383. package/dist/types/src/internal/proxy/json-serializer.d.ts.map +0 -1
  384. package/dist/types/src/internal/proxy/make-object.d.ts.map +0 -1
  385. package/dist/types/src/internal/proxy/ownership.d.ts.map +0 -1
  386. package/dist/types/src/internal/proxy/proxy-types.d.ts.map +0 -1
  387. package/dist/types/src/internal/proxy/proxy-utils.d.ts.map +0 -1
  388. package/dist/types/src/internal/proxy/reactive-array.d.ts.map +0 -1
  389. package/dist/types/src/internal/proxy/reactive.d.ts.map +0 -1
  390. package/dist/types/src/internal/proxy/schema-validator.d.ts.map +0 -1
  391. package/dist/types/src/internal/proxy/schema.test.d.ts.map +0 -1
  392. package/dist/types/src/internal/proxy/symbols.d.ts.map +0 -1
  393. package/dist/types/src/internal/proxy/typed-handler.d.ts.map +0 -1
  394. package/dist/types/src/internal/proxy/typed-handler.test.d.ts.map +0 -1
  395. package/dist/types/src/internal/proxy/typed-object.test.d.ts.map +0 -1
  396. package/dist/types/src/internal/ref/index.d.ts.map +0 -1
  397. package/dist/types/src/internal/ref/ref-array.d.ts.map +0 -1
  398. package/dist/types/src/internal/ref/ref.test.d.ts.map +0 -1
  399. package/dist/types/src/internal/schema/compose.d.ts.map +0 -1
  400. package/dist/types/src/internal/schema/compose.test.d.ts.map +0 -1
  401. package/dist/types/src/internal/schema/echo-schema.d.ts.map +0 -1
  402. package/dist/types/src/internal/schema/index.d.ts.map +0 -1
  403. package/dist/types/src/internal/schema/manipulation.d.ts.map +0 -1
  404. package/dist/types/src/internal/schema/persistent-schema.d.ts.map +0 -1
  405. package/dist/types/src/internal/types/base.d.ts.map +0 -1
  406. package/dist/types/src/internal/types/entity.d.ts.map +0 -1
  407. package/dist/types/src/internal/types/index.d.ts.map +0 -1
  408. package/dist/types/src/internal/types/meta.d.ts.map +0 -1
  409. package/dist/types/src/internal/types/typename.d.ts.map +0 -1
  410. package/dist/types/src/internal/types/version.d.ts.map +0 -1
  411. package/src/internal/api/annotations.ts +0 -60
  412. /package/dist/types/src/internal/{annotations → Annotation}/annotations.test.d.ts +0 -0
  413. /package/dist/types/src/internal/{entities → Entity}/util.d.ts +0 -0
  414. /package/dist/types/src/internal/{formats → Format}/date.d.ts +0 -0
  415. /package/dist/types/src/internal/{formats → Format}/date.test.d.ts +0 -0
  416. /package/dist/types/src/internal/{formats → Format}/format.d.ts +0 -0
  417. /package/dist/types/src/internal/{formats → Format}/format.test.d.ts +0 -0
  418. /package/dist/types/src/internal/{formats → Format}/index.d.ts +0 -0
  419. /package/dist/types/src/internal/{formats → Format}/number.d.ts +0 -0
  420. /package/dist/types/src/internal/{formats → Format}/object.d.ts +0 -0
  421. /package/dist/types/src/internal/{formats → Format}/select.d.ts +0 -0
  422. /package/dist/types/src/internal/{formats → Format}/string.d.ts +0 -0
  423. /package/dist/types/src/internal/{json-schema → JsonSchema}/effect-schema.test.d.ts +0 -0
  424. /package/dist/types/src/internal/{json-schema → JsonSchema}/index.d.ts +0 -0
  425. /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema-normalize.d.ts +0 -0
  426. /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema.d.ts +0 -0
  427. /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema.test.d.ts +0 -0
  428. /package/dist/types/src/internal/{object → Obj}/clone.d.ts +0 -0
  429. /package/dist/types/src/internal/{object → Obj}/common.d.ts +0 -0
  430. /package/dist/types/src/internal/{object → Obj}/create-object.test.d.ts +0 -0
  431. /package/dist/types/src/internal/{object → Obj}/ids.d.ts +0 -0
  432. /package/dist/types/src/internal/{object → Obj}/index.d.ts +0 -0
  433. /package/dist/types/src/internal/{object → Obj}/inspect.d.ts +0 -0
  434. /package/dist/types/src/internal/{object → Obj}/json-serializer.test.d.ts +0 -0
  435. /package/dist/types/src/internal/{object → Obj}/schema-validator.test.d.ts +0 -0
  436. /package/dist/types/src/internal/{object → Obj}/set-value.test.d.ts +0 -0
  437. /package/dist/types/src/internal/{object → Obj}/snapshot.d.ts +0 -0
  438. /package/dist/types/src/internal/{object → Obj}/typed-object.test.d.ts +0 -0
  439. /package/dist/types/src/internal/{ref → Ref}/index.d.ts +0 -0
  440. /package/dist/types/src/internal/{ref → Ref}/ref.test.d.ts +0 -0
  441. /package/dist/types/src/internal/{schema → Type}/compose.test.d.ts +0 -0
  442. /package/dist/types/src/internal/{schema → Type}/index.d.ts +0 -0
  443. /package/dist/types/src/internal/{schema → Type}/manipulation.d.ts +0 -0
  444. /package/dist/types/src/internal/{api → common/api}/meta.d.ts +0 -0
  445. /package/dist/types/src/internal/{proxy → common/proxy}/change-context.d.ts +0 -0
  446. /package/dist/types/src/internal/{proxy → common/proxy}/change.test.d.ts +0 -0
  447. /package/dist/types/src/internal/{proxy → common/proxy}/define-hidden-property.d.ts +0 -0
  448. /package/dist/types/src/internal/{proxy → common/proxy}/errors.d.ts +0 -0
  449. /package/dist/types/src/internal/{proxy → common/proxy}/event-batch.d.ts +0 -0
  450. /package/dist/types/src/internal/{proxy → common/proxy}/handler.test.d.ts +0 -0
  451. /package/dist/types/src/internal/{proxy → common/proxy}/index.d.ts +0 -0
  452. /package/dist/types/src/internal/{proxy → common/proxy}/json-serializer.d.ts +0 -0
  453. /package/dist/types/src/internal/{proxy → common/proxy}/make-object.d.ts +0 -0
  454. /package/dist/types/src/internal/{proxy → common/proxy}/ownership.d.ts +0 -0
  455. /package/dist/types/src/internal/{proxy → common/proxy}/proxy-types.d.ts +0 -0
  456. /package/dist/types/src/internal/{proxy → common/proxy}/proxy-utils.d.ts +0 -0
  457. /package/dist/types/src/internal/{proxy → common/proxy}/reactive-array.d.ts +0 -0
  458. /package/dist/types/src/internal/{proxy → common/proxy}/schema-validator.d.ts +0 -0
  459. /package/dist/types/src/internal/{proxy → common/proxy}/schema.test.d.ts +0 -0
  460. /package/dist/types/src/internal/{proxy → common/proxy}/symbols.d.ts +0 -0
  461. /package/dist/types/src/internal/{proxy → common/proxy}/typed-handler.d.ts +0 -0
  462. /package/dist/types/src/internal/{proxy → common/proxy}/typed-handler.test.d.ts +0 -0
  463. /package/dist/types/src/internal/{proxy → common/proxy}/typed-object.test.d.ts +0 -0
  464. /package/dist/types/src/internal/{types → common/types}/base.d.ts +0 -0
  465. /package/dist/types/src/internal/{types → common/types}/typename.d.ts +0 -0
  466. /package/dist/types/src/internal/{types → common/types}/version.d.ts +0 -0
  467. /package/src/internal/{entities → Entity}/util.ts +0 -0
  468. /package/src/internal/{formats → Format}/date.ts +0 -0
  469. /package/src/internal/{formats → Format}/format.ts +0 -0
  470. /package/src/internal/{formats → Format}/index.ts +0 -0
  471. /package/src/internal/{formats → Format}/number.ts +0 -0
  472. /package/src/internal/{formats → Format}/object.ts +0 -0
  473. /package/src/internal/{formats → Format}/select.ts +0 -0
  474. /package/src/internal/{formats → Format}/string.ts +0 -0
  475. /package/src/internal/{json-schema → JsonSchema}/effect-schema.test.ts +0 -0
  476. /package/src/internal/{json-schema → JsonSchema}/index.ts +0 -0
  477. /package/src/internal/{json-schema → JsonSchema}/json-schema-normalize.ts +0 -0
  478. /package/src/internal/{object → Obj}/ids.ts +0 -0
  479. /package/src/internal/{object → Obj}/index.ts +0 -0
  480. /package/src/internal/{object → Obj}/schema-validator.test.ts +0 -0
  481. /package/src/internal/{object → Obj}/set-value.test.ts +0 -0
  482. /package/src/internal/{ref → Ref}/index.ts +0 -0
  483. /package/src/internal/{schema → Type}/index.ts +0 -0
  484. /package/src/internal/{README.md → common/README.md} +0 -0
  485. /package/src/internal/{api → common/api}/meta.ts +0 -0
  486. /package/src/internal/{proxy → common/proxy}/change-context.ts +0 -0
  487. /package/src/internal/{proxy → common/proxy}/define-hidden-property.ts +0 -0
  488. /package/src/internal/{proxy → common/proxy}/errors.ts +0 -0
  489. /package/src/internal/{proxy → common/proxy}/event-batch.ts +0 -0
  490. /package/src/internal/{proxy → common/proxy}/index.ts +0 -0
  491. /package/src/internal/{proxy → common/proxy}/ownership.ts +0 -0
  492. /package/src/internal/{proxy → common/proxy}/proxy-types.ts +0 -0
  493. /package/src/internal/{proxy → common/proxy}/proxy-utils.ts +0 -0
  494. /package/src/internal/{proxy → common/proxy}/reactive-array.ts +0 -0
  495. /package/src/internal/{proxy → common/proxy}/schema-validator.ts +0 -0
  496. /package/src/internal/{proxy → common/proxy}/symbols.ts +0 -0
  497. /package/src/internal/{types → common/types}/base.ts +0 -0
  498. /package/src/internal/{types → common/types}/typename.ts +0 -0
  499. /package/src/internal/{types → common/types}/version.ts +0 -0
@@ -6,13 +6,13 @@ import * as Schema from 'effect/Schema';
6
6
  import * as SchemaAST from 'effect/SchemaAST';
7
7
  import { describe, expect, test } from 'vitest';
8
8
 
9
- import { EchoObjectSchema } from '../entities';
9
+ import { EchoObjectSchema } from '../Entity';
10
10
 
11
11
  const Organization = Schema.Struct({
12
12
  name: Schema.String,
13
13
  }).pipe(
14
14
  EchoObjectSchema({
15
- typename: 'example.com/type/Organization',
15
+ typename: 'com.example.type.organization',
16
16
  version: '0.1.0',
17
17
  }),
18
18
  );
@@ -25,7 +25,7 @@ describe('EchoObjectSchema DSL', () => {
25
25
  });
26
26
 
27
27
  test('static typename accessor', async () => {
28
- expect(Organization.typename).to.eq('example.com/type/Organization');
28
+ expect(Organization.typename).to.eq('com.example.type.organization');
29
29
  });
30
30
 
31
31
  test('expect schema', async () => {
@@ -4,8 +4,8 @@
4
4
 
5
5
  import type * as Schema from 'effect/Schema';
6
6
 
7
- import { type TypeMeta } from '../annotations';
8
- import { type AnyEntity } from '../types';
7
+ import { type TypeMeta } from '../Annotation';
8
+ import { type AnyEntity } from '../common/types';
9
9
 
10
10
  /**
11
11
  * Definition for an object type that can be stored in an ECHO database.
@@ -5,7 +5,7 @@
5
5
  import { type ObjectId } from '@dxos/keys';
6
6
  import { isNonNullable } from '@dxos/util';
7
7
 
8
- import { type AnyEntity } from '../types';
8
+ import { type AnyEntity } from '../common/types';
9
9
 
10
10
  import { Ref } from './ref';
11
11
 
@@ -7,8 +7,8 @@ import { describe, expect, test } from 'vitest';
7
7
 
8
8
  import { DXN, ObjectId } from '@dxos/keys';
9
9
 
10
- import { EchoObjectSchema, getObjectDXN } from '../entities';
11
- import { createObject } from '../object';
10
+ import { EchoObjectSchema, getObjectDXN } from '../Entity';
11
+ import { createObject } from '../Obj';
12
12
 
13
13
  import { Ref, getReferenceAst } from './ref';
14
14
 
@@ -16,7 +16,7 @@ const Task = Schema.Struct({
16
16
  title: Schema.optional(Schema.String),
17
17
  }).pipe(
18
18
  EchoObjectSchema({
19
- typename: 'example.com/type/Task',
19
+ typename: 'com.example.type.task',
20
20
  version: '0.1.0',
21
21
  }),
22
22
  );
@@ -29,7 +29,7 @@ const Contact = Schema.Struct({
29
29
  tasks: Schema.Array(Ref(Task)),
30
30
  }).pipe(
31
31
  EchoObjectSchema({
32
- typename: 'example.com/type/Person',
32
+ typename: 'com.example.type.person',
33
33
  version: '0.1.0',
34
34
  }),
35
35
  );
@@ -19,9 +19,9 @@ import { assertArgument, invariant } from '@dxos/invariant';
19
19
  import { DXN, ObjectId } from '@dxos/keys';
20
20
 
21
21
  import * as Database from '../../Database';
22
- import { ReferenceAnnotationId, getSchemaDXN, getTypeAnnotation, getTypeIdentifierAnnotation } from '../annotations';
23
- import { type JsonSchemaType } from '../json-schema';
24
- import type { AnyEntity, AnyProperties } from '../types';
22
+ import { ReferenceAnnotationId, getSchemaDXN, getTypeAnnotation, getTypeIdentifierAnnotation } from '../Annotation';
23
+ import { type JsonSchemaType } from '../JsonSchema';
24
+ import type { AnyEntity, AnyProperties } from '../common/types';
25
25
 
26
26
  /**
27
27
  * The `$id` and `$ref` fields for an ECHO reference schema.
@@ -5,10 +5,10 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import { describe, test } from 'vitest';
7
7
 
8
- import { FieldPath } from '../annotations';
9
- import { EchoObjectSchema } from '../entities';
10
- import { FormatAnnotation, TypeFormat } from '../formats';
11
- import { ECHO_ANNOTATIONS_NS_KEY, toJsonSchema } from '../json-schema';
8
+ import { FieldPath } from '../Annotation';
9
+ import { EchoObjectSchema } from '../Entity';
10
+ import { FormatAnnotation, TypeFormat } from '../Format';
11
+ import { ECHO_ANNOTATIONS_NS_KEY, toJsonSchema } from '../JsonSchema';
12
12
 
13
13
  import { composeSchema } from './compose';
14
14
 
@@ -17,7 +17,7 @@ describe('schema composition', () => {
17
17
  const BaseType = Schema.Struct({
18
18
  name: Schema.String,
19
19
  email: Schema.String,
20
- }).pipe(EchoObjectSchema({ typename: 'example.com/Person', version: '0.1.0' }));
20
+ }).pipe(EchoObjectSchema({ typename: 'com.example.person', version: '0.1.0' }));
21
21
 
22
22
  const OverlaySchema = Schema.Struct({
23
23
  email: Schema.String.pipe(FieldPath('$.email'), FormatAnnotation.set(TypeFormat.Email)),
@@ -6,7 +6,7 @@ import type * as Types from 'effect/Types';
6
6
 
7
7
  import { invariant } from '@dxos/invariant';
8
8
 
9
- import { type JsonSchemaType } from '../json-schema';
9
+ import { type JsonSchemaType } from '../JsonSchema';
10
10
 
11
11
  /**
12
12
  * Creates a composite schema from the source and projection schemas.
@@ -9,11 +9,11 @@ import { invariant } from '@dxos/invariant';
9
9
  import { type ObjectId } from '@dxos/keys';
10
10
 
11
11
  import type * as Type from '../../Type';
12
- import { type SchemaMeta, SchemaMetaSymbol, type TypeAnnotation, getTypeAnnotation } from '../annotations';
13
- import { type JsonSchemaType, toEffectSchema, toJsonSchema } from '../json-schema';
14
- import { type TypedObject, type TypedObjectPrototype, getSnapshot } from '../object';
15
- import { ChangeId } from '../proxy';
16
- import { EntityKind, SchemaKindId } from '../types';
12
+ import { type SchemaMeta, SchemaMetaSymbol, type TypeAnnotation, getTypeAnnotation } from '../Annotation';
13
+ import { type JsonSchemaType, toEffectSchema, toJsonSchema } from '../JsonSchema';
14
+ import { type TypedObject, type TypedObjectPrototype, getSnapshot } from '../Obj';
15
+ import { ChangeId } from '../common/proxy';
16
+ import { EntityKind, SchemaKindId } from '../common/types';
17
17
 
18
18
  import {
19
19
  addFieldsToSchema,
@@ -178,7 +178,7 @@ const schemaVariance = {
178
178
  *
179
179
  * @example
180
180
  * ```ts
181
- * export class TableType extends Schema.Struct({...}).pipe(Type.object({ typename: 'example.org/type/Table', version: '0.1.0' })){
181
+ * export class TableType extends Schema.Struct({...}).pipe(Type.object({ typename: 'com.example.type.table', version: '0.1.0' })){
182
182
  * title: Schema.String,
183
183
  * schema: Schema.optional(ref(EchoSchema)),
184
184
  * props: Schema.mutable(S.Array(TablePropSchema)),
@@ -8,7 +8,7 @@ import * as SchemaAST from 'effect/SchemaAST';
8
8
  import { invariant } from '@dxos/invariant';
9
9
  import { DXN } from '@dxos/keys';
10
10
 
11
- import { type TypeAnnotation, TypeAnnotationId, TypeIdentifierAnnotationId } from '../annotations';
11
+ import { type TypeAnnotation, TypeAnnotationId, TypeIdentifierAnnotationId } from '../Annotation';
12
12
 
13
13
  // TODO(ZaymonFC): Do this one at a time. This might be dangerous.
14
14
  export const addFieldsToSchema = (
@@ -4,10 +4,10 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { IconAnnotation } from '../annotations';
8
- import { LabelAnnotation, TypenameSchema, VersionSchema } from '../annotations';
9
- import { EchoObjectSchema } from '../entities';
10
- import { JsonSchemaType } from '../json-schema';
7
+ import { IconAnnotation } from '../Annotation';
8
+ import { LabelAnnotation, TypenameSchema, VersionSchema } from '../Annotation';
9
+ import { EchoObjectSchema } from '../Entity';
10
+ import { JsonSchemaType } from '../JsonSchema';
11
11
 
12
12
  /**
13
13
  * Persistent representation of a schema.
@@ -20,7 +20,7 @@ export const PersistentSchema = Schema.Struct({
20
20
  jsonSchema: JsonSchemaType,
21
21
  }).pipe(
22
22
  EchoObjectSchema({
23
- typename: 'dxos.org/type/Schema',
23
+ typename: 'org.dxos.type.schema',
24
24
  version: '0.1.0',
25
25
  }),
26
26
  LabelAnnotation.set(['name']),
@@ -12,8 +12,4 @@
12
12
  * and prevent external packages from using internals directly.
13
13
  */
14
14
 
15
- export * from './annotations';
16
- export * from './entity';
17
15
  export * from './meta';
18
- export * from './sorting';
19
- export * from './version';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export * from './api';
6
+ export * from './proxy';
7
+ export * from './types';
@@ -4,9 +4,9 @@
4
4
 
5
5
  import { describe, test } from 'vitest';
6
6
 
7
- import * as Obj from '../../Obj';
8
- import * as Relation from '../../Relation';
9
- import { TestSchema } from '../../testing';
7
+ import * as Obj from '../../../Obj';
8
+ import * as Relation from '../../../Relation';
9
+ import { TestSchema } from '../../../testing';
10
10
 
11
11
  /**
12
12
  * Tests for Obj.change context enforcement and mutator type safety.
@@ -8,8 +8,8 @@ import { describe, expect, test } from 'vitest';
8
8
 
9
9
  import { isNode } from '@dxos/util';
10
10
 
11
- import { TestSchema, updateCounter } from '../../testing';
12
- import { createObject } from '../object';
11
+ import { TestSchema, updateCounter } from '../../../testing';
12
+ import { createObject } from '../../Obj';
13
13
  import { ATTR_META } from '../types';
14
14
 
15
15
  import { makeObject } from './make-object';
@@ -7,16 +7,19 @@ import { invariant } from '@dxos/invariant';
7
7
  import { DXN } from '@dxos/keys';
8
8
  import { deepMapValues } from '@dxos/util';
9
9
 
10
+ import { Ref } from '../../Ref';
10
11
  import {
12
+ ATTR_META,
11
13
  ATTR_RELATION_SOURCE,
12
14
  ATTR_RELATION_TARGET,
13
15
  ATTR_SELF_DXN,
16
+ ATTR_TYPE,
17
+ MetaId,
14
18
  RelationSourceDXNId,
15
19
  RelationTargetDXNId,
16
20
  SelfDXNId,
17
- } from '../entities';
18
- import { Ref } from '../ref';
19
- import { ATTR_META, ATTR_TYPE, MetaId, TypeId } from '../types';
21
+ TypeId,
22
+ } from '../types';
20
23
 
21
24
  /**
22
25
  * Attaches a toJSON method to the object for typed serialization.
@@ -6,7 +6,7 @@ import type * as Schema from 'effect/Schema';
6
6
 
7
7
  import { ObjectId } from '@dxos/keys';
8
8
 
9
- import { getTypeAnnotation } from '../annotations';
9
+ import { getTypeAnnotation } from '../../Annotation';
10
10
  import { type AnyProperties, KindId, MetaId, type ObjectMeta, ObjectMetaSchema, ParentId } from '../types';
11
11
 
12
12
  import { defineHiddenProperty } from './define-hidden-property';
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type RefTypeId } from '../ref/ref';
5
+ import { type RefTypeId } from '../../Ref/ref';
6
6
 
7
7
  import { getProxyTarget } from './proxy-utils';
8
8
  import { ChangeId, EventId } from './symbols';
@@ -6,14 +6,14 @@ import * as Schema from 'effect/Schema';
6
6
  import * as SchemaAST from 'effect/SchemaAST';
7
7
  import { describe, expect, test } from 'vitest';
8
8
 
9
- import { createEchoSchema } from '../../testing';
10
- import { PropertyMeta, getPropertyMetaAnnotation, getTypeAnnotation } from '../annotations';
11
- import { EchoObjectSchema } from '../entities';
9
+ import { createEchoSchema } from '../../../testing';
10
+ import { PropertyMeta, getPropertyMetaAnnotation, getTypeAnnotation } from '../../Annotation';
11
+ import { EchoObjectSchema } from '../../Entity';
12
12
 
13
13
  // TODO(dmaretskyi): Comment.
14
14
  const EmptySchemaType = Schema.Struct({}).pipe(
15
15
  EchoObjectSchema({
16
- typename: 'example.com/type/Empty',
16
+ typename: 'com.example.type.empty',
17
17
  version: '0.1.0',
18
18
  }),
19
19
  );
@@ -27,7 +27,7 @@ describe('dynamic schema', () => {
27
27
  field2: Schema.Boolean,
28
28
  }).pipe(
29
29
  EchoObjectSchema({
30
- typename: 'example.com/type/Test',
30
+ typename: 'com.example.type.test',
31
31
  version: '0.1.0',
32
32
  }),
33
33
  );
@@ -44,7 +44,7 @@ describe('dynamic schema', () => {
44
44
  field1: Schema.String,
45
45
  }).pipe(
46
46
  EchoObjectSchema({
47
- typename: 'example.com/type/Test',
47
+ typename: 'com.example.type.test',
48
48
  version: '0.1.0',
49
49
  }),
50
50
  );
@@ -95,7 +95,7 @@ describe('dynamic schema', () => {
95
95
  registered.updateFields({ field3: Schema.Boolean });
96
96
  registered.removeFields(['field2']);
97
97
  expect(getTypeAnnotation(registered)).to.deep.contain({
98
- typename: 'example.com/type/Empty',
98
+ typename: 'com.example.type.empty',
99
99
  version: '0.1.0',
100
100
  });
101
101
  expect(getPropertyMetaAnnotation(registered.getProperties()[0], metaNamespace)).to.deep.eq(metaInfo);
@@ -111,7 +111,7 @@ describe('dynamic schema', () => {
111
111
  });
112
112
 
113
113
  // First update.
114
- const newTypename1 = 'example.com/type/Individual';
114
+ const newTypename1 = 'com.example.type.individual';
115
115
  registered.updateTypename(newTypename1);
116
116
 
117
117
  // Basic typename update checks.
@@ -132,13 +132,13 @@ describe('dynamic schema', () => {
132
132
  expect(nameMeta).toEqual({ maxLength: 10 });
133
133
 
134
134
  // Second update to ensure multiple updates work.
135
- const newTypename2 = 'example.com/type/Person';
135
+ const newTypename2 = 'com.example.type.person';
136
136
  registered.updateTypename(newTypename2);
137
137
  expect(registered.typename).toBe(newTypename2);
138
138
  expect(registered.jsonSchema.$id).toBe(`dxn:type:${newTypename2}`);
139
139
  expect(registered.jsonSchema.typename).toBe(newTypename2);
140
140
  expect(getTypeAnnotation(registered)).to.deep.contain({
141
- typename: 'example.com/type/Person',
141
+ typename: 'com.example.type.person',
142
142
  version: '0.1.0',
143
143
  });
144
144
  });
@@ -5,10 +5,10 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import { describe, expect, test } from 'vitest';
7
7
 
8
- import { TestSchema } from '../../testing';
9
- import { EchoObjectSchema } from '../entities';
10
- import { setValue } from '../object';
11
- import { Ref } from '../ref';
8
+ import { TestSchema } from '../../../testing';
9
+ import { EchoObjectSchema } from '../../Entity';
10
+ import { setValue } from '../../Obj';
11
+ import { Ref } from '../../Ref';
12
12
  import { foreignKey, getMeta } from '../types';
13
13
 
14
14
  import { makeObject } from './make-object';
@@ -40,10 +40,10 @@ describe('complex schema validations', () => {
40
40
 
41
41
  test('references', () => {
42
42
  const Foo = Schema.Struct({ field: Schema.String }).pipe(
43
- EchoObjectSchema({ typename: 'example.com/type/Foo', version: '0.1.0' }),
43
+ EchoObjectSchema({ typename: 'com.example.type.foo', version: '0.1.0' }),
44
44
  );
45
45
  const Bar = Schema.Struct({ fooRef: Ref(Foo) }).pipe(
46
- EchoObjectSchema({ typename: 'example.com/type/Bar', version: '0.1.0' }),
46
+ EchoObjectSchema({ typename: 'com.example.type.bar', version: '0.1.0' }),
47
47
  );
48
48
  const field = 'hello';
49
49
  expect(() => makeObject(Bar, { fooRef: { id: '1', field } as any })).to.throw();
@@ -11,9 +11,8 @@ import { Event } from '@dxos/async';
11
11
  import { inspectCustom } from '@dxos/debug';
12
12
  import { invariant } from '@dxos/invariant';
13
13
 
14
- import { getSchemaDXN } from '../annotations';
15
- import { ObjectDeletedId } from '../entities';
16
- import { ParentId, SchemaId, TypeId } from '../types';
14
+ import { getSchemaDXN } from '../../Annotation';
15
+ import { ObjectDeletedId, ParentId, SchemaId, TypeId } from '../types';
17
16
 
18
17
  import { executeChange, isInChangeContext, queueNotification } from './change-context';
19
18
  import { defineHiddenProperty } from './define-hidden-property';
@@ -6,7 +6,7 @@ import * as Schema from 'effect/Schema';
6
6
  import type * as Types from 'effect/Types';
7
7
  import { describe, expect, test } from 'vitest';
8
8
 
9
- import { EchoObjectSchema } from '../entities';
9
+ import { EchoObjectSchema } from '../../Entity';
10
10
  import { getSchema } from '../types';
11
11
 
12
12
  import { makeObject } from './make-object';
@@ -16,7 +16,7 @@ const Organization = Schema.Struct({
16
16
  name: Schema.String,
17
17
  }).pipe(
18
18
  EchoObjectSchema({
19
- typename: 'example.com/type/Organization',
19
+ typename: 'com.example.type.organization',
20
20
  version: '0.1.0',
21
21
  }),
22
22
  );
@@ -34,7 +34,7 @@ const Contact = Schema.Struct(
34
34
  ).pipe(
35
35
  Schema.partial,
36
36
  EchoObjectSchema({
37
- typename: 'example.com/type/Person',
37
+ typename: 'com.example.type.person',
38
38
  version: '0.1.0',
39
39
  }),
40
40
  );
@@ -101,7 +101,7 @@ describe('EchoObjectSchema class DSL', () => {
101
101
  meta: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
102
102
  }).pipe(
103
103
  EchoObjectSchema({
104
- typename: 'dxos.org/type/FunctionTrigger',
104
+ typename: 'org.dxos.type.function-trigger',
105
105
  version: '0.1.0',
106
106
  }),
107
107
  );
@@ -46,7 +46,7 @@ export const EntityKindSchema = Schema.Enums(EntityKind);
46
46
  * Typename for generic object references (Type.Obj / Ref.Ref(Obj.Unknown)).
47
47
  * Used when referencing any object without a specific schema.
48
48
  */
49
- export const ANY_OBJECT_TYPENAME = 'dxos.org/schema/AnyObject';
49
+ export const ANY_OBJECT_TYPENAME = 'org.dxos.schema.any-object';
50
50
 
51
51
  /**
52
52
  * Version for generic object references.
@@ -5,5 +5,6 @@
5
5
  export * from './base';
6
6
  export * from './entity';
7
7
  export * from './meta';
8
+ export * from './model-symbols';
8
9
  export * from './typename';
9
10
  export * from './version';
@@ -8,7 +8,7 @@ import { ForeignKey } from '@dxos/echo-protocol';
8
8
  import { invariant } from '@dxos/invariant';
9
9
  import { type Comparator, intersection } from '@dxos/util';
10
10
 
11
- import type * as Entity from '../../Entity';
11
+ import type * as Entity from '../../../Entity';
12
12
 
13
13
  import { type AnyProperties } from './base';
14
14
 
@@ -0,0 +1,69 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ /**
6
+ * Internal symbol/string constants for the echo object model.
7
+ * Defined in common/ so proxy/ can use them without importing from Entity/.
8
+ * Entity/ re-exports these for external consumers.
9
+ */
10
+
11
+ /**
12
+ * Property name for self DXN when object is serialized to JSON.
13
+ */
14
+ export const ATTR_SELF_DXN = '@dxn';
15
+
16
+ /**
17
+ * DXN to the object itself.
18
+ */
19
+ export const SelfDXNId = Symbol.for('@dxos/echo/DXN');
20
+
21
+ /**
22
+ * Property name for deleted when object is serialized to JSON.
23
+ */
24
+ export const ATTR_DELETED = '@deleted';
25
+
26
+ /**
27
+ * Deletion marker.
28
+ */
29
+ export const ObjectDeletedId = Symbol.for('@dxos/echo/Deleted');
30
+
31
+ /**
32
+ * Object version accessor symbol.
33
+ */
34
+ export const ObjectVersionId: unique symbol = Symbol.for('@dxos/echo/Version');
35
+
36
+ /**
37
+ * Object database accessor symbol.
38
+ */
39
+ export const ObjectDatabaseId = Symbol.for('@dxos/echo/Database');
40
+
41
+ /**
42
+ * Property name for relation source when object is serialized to JSON.
43
+ */
44
+ export const ATTR_RELATION_SOURCE = '@relationSource';
45
+
46
+ /**
47
+ * Used to access relation source ref on live ECHO objects.
48
+ */
49
+ export const RelationSourceId: unique symbol = Symbol.for('@dxos/echo/RelationSource');
50
+
51
+ /**
52
+ * Used to access relation source DXN on live ECHO objects.
53
+ */
54
+ export const RelationSourceDXNId: unique symbol = Symbol.for('@dxos/echo/RelationSourceDXN');
55
+
56
+ /**
57
+ * Property name for relation target when object is serialized to JSON.
58
+ */
59
+ export const ATTR_RELATION_TARGET = '@relationTarget';
60
+
61
+ /**
62
+ * Used to access relation target ref on live ECHO objects.
63
+ */
64
+ export const RelationTargetId: unique symbol = Symbol.for('@dxos/echo/RelationTarget');
65
+
66
+ /**
67
+ * Used to access relation target DXN on live ECHO objects.
68
+ */
69
+ export const RelationTargetDXNId: unique symbol = Symbol.for('@dxos/echo/RelationTargetDXN');
@@ -5,35 +5,12 @@
5
5
  // TODO(burdon): Import directly (not part of ECHO API).
6
6
  export { JsonPath, JsonProp, getValue, splitJsonPath } from '@dxos/effect';
7
7
 
8
- export * from './annotations';
9
- export * from './api';
10
- export * from './entities';
11
- export * from './formats';
12
- export * from './json-schema';
13
- export * from './ref';
14
- export * from './types';
15
-
8
+ export * from './Annotation';
9
+ export * from './common';
10
+ export * from './Entity';
11
+ export * from './Format';
12
+ export * from './JsonSchema';
16
13
  // TODO(wittjosiah): Required to ensure types are portable (need to export all types required for downstream inference).
17
- export * from './object';
18
- export * from './proxy';
19
- export * from './schema';
20
-
21
- // export {
22
- // createObject,
23
- // createQueueDXN,
24
- // isDeleted,
25
- // objectFromJSON,
26
- // objectToJSON,
27
- // setRefResolverOnData,
28
- // SchemaValidator,
29
- // TypedObject,
30
- // } from './object';
31
- // export { makeObject } from './proxy';
32
- // export {
33
- // type BaseSchema,
34
- // EchoSchema,
35
- // ImmutableSchema,
36
- // RuntimeSchemaRegistry,
37
- // PersistentSchema,
38
- // isMutable,
39
- // } from './schema';
14
+ export * from './Obj';
15
+ export * from './Ref';
16
+ export * from './Type';
@@ -17,11 +17,11 @@ describe('Experimental API review', () => {
17
17
  const schema = Obj.getSchema(contact) ?? raise(new Error('No schema found'));
18
18
 
19
19
  expect(Type.getDXN(schema)?.typename).to.eq(TestSchema.Person.typename);
20
- expect(Type.getTypename(schema)).to.eq('example.com/type/Person');
20
+ expect(Type.getTypename(schema)).to.eq('com.example.type.person');
21
21
  expect(Type.getVersion(schema)).to.eq('0.1.0');
22
22
  expect(Type.getMeta(schema)).to.deep.eq({
23
23
  kind: Entity.Kind.Object,
24
- typename: 'example.com/type/Person',
24
+ typename: 'com.example.type.person',
25
25
  version: '0.1.0',
26
26
  });
27
27
  });