@dxos/echo 0.9.0 → 0.9.1-staging.ee54ba693a

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 (289) hide show
  1. package/dist/lib/neutral/Annotation.mjs +30 -8
  2. package/dist/lib/neutral/Database.mjs +7 -3
  3. package/dist/lib/neutral/Entity.mjs +15 -11
  4. package/dist/lib/neutral/Err.mjs +7 -3
  5. package/dist/lib/neutral/Feed.mjs +15 -19
  6. package/dist/lib/neutral/Filter.mjs +13 -11
  7. package/dist/lib/neutral/Format.mjs +3 -7
  8. package/dist/lib/neutral/JsonSchema.mjs +7 -7
  9. package/dist/lib/neutral/Migration.mjs +11 -11
  10. package/dist/lib/neutral/Obj.mjs +19 -13
  11. package/dist/lib/neutral/Order.mjs +1 -1
  12. package/dist/lib/neutral/Query.mjs +17 -17
  13. package/dist/lib/neutral/QueryResult.mjs +1 -1
  14. package/dist/lib/neutral/Ref.mjs +6 -6
  15. package/dist/lib/neutral/Registry.mjs +1 -1
  16. package/dist/lib/neutral/Relation.mjs +12 -12
  17. package/dist/lib/neutral/Tag.mjs +15 -15
  18. package/dist/lib/neutral/Text.mjs +25 -0
  19. package/dist/lib/neutral/Text.mjs.map +7 -0
  20. package/dist/lib/neutral/Type.mjs +10 -10
  21. package/dist/lib/neutral/chunk-2HKGAQM4.mjs +1394 -0
  22. package/dist/lib/neutral/chunk-2HKGAQM4.mjs.map +7 -0
  23. package/dist/lib/neutral/{chunk-O6BH7EPN.mjs → chunk-2ZHECXUR.mjs} +5 -4
  24. package/dist/lib/neutral/chunk-2ZHECXUR.mjs.map +7 -0
  25. package/dist/lib/neutral/{chunk-QQIYS74I.mjs → chunk-3KTE2Y7Q.mjs} +20 -20
  26. package/dist/lib/neutral/chunk-3KTE2Y7Q.mjs.map +7 -0
  27. package/dist/lib/neutral/{chunk-R5W6DXR4.mjs → chunk-3TN2VMI4.mjs} +72 -36
  28. package/dist/lib/neutral/chunk-3TN2VMI4.mjs.map +7 -0
  29. package/dist/lib/neutral/{chunk-5SMDBFVB.mjs → chunk-42L4HJ3Z.mjs} +11 -15
  30. package/dist/lib/neutral/chunk-42L4HJ3Z.mjs.map +7 -0
  31. package/dist/lib/neutral/{chunk-7PI7C4EF.mjs → chunk-4A2NWKRJ.mjs} +5 -5
  32. package/dist/lib/neutral/chunk-ACFAOTKJ.mjs +1531 -0
  33. package/dist/lib/neutral/chunk-ACFAOTKJ.mjs.map +7 -0
  34. package/dist/lib/neutral/{chunk-SBVFRTST.mjs → chunk-BEFR7LEA.mjs} +20 -10
  35. package/dist/lib/neutral/chunk-BEFR7LEA.mjs.map +7 -0
  36. package/dist/lib/neutral/{chunk-6M2Z6WBH.mjs → chunk-BXIKXT7Q.mjs} +2 -6
  37. package/dist/lib/neutral/{chunk-6M2Z6WBH.mjs.map → chunk-BXIKXT7Q.mjs.map} +1 -1
  38. package/dist/lib/neutral/{chunk-UUP46KUQ.mjs → chunk-C57XMMBY.mjs} +21 -20
  39. package/dist/lib/neutral/chunk-C57XMMBY.mjs.map +7 -0
  40. package/dist/lib/neutral/chunk-C62JYFAD.mjs +183 -0
  41. package/dist/lib/neutral/chunk-C62JYFAD.mjs.map +7 -0
  42. package/dist/lib/neutral/{chunk-MZ7K3MLL.mjs → chunk-FSGX2R62.mjs} +3 -3
  43. package/dist/lib/neutral/chunk-FSGX2R62.mjs.map +7 -0
  44. package/dist/lib/neutral/{chunk-TYGKCRMK.mjs → chunk-HBXT3GSB.mjs} +37 -15
  45. package/dist/lib/neutral/chunk-HBXT3GSB.mjs.map +7 -0
  46. package/dist/lib/neutral/{chunk-WU3GIANS.mjs → chunk-IQR45HAD.mjs} +1 -1
  47. package/dist/lib/neutral/chunk-IQR45HAD.mjs.map +7 -0
  48. package/dist/lib/neutral/{chunk-TFEWTY5A.mjs → chunk-KCBW4BR6.mjs} +4 -8
  49. package/dist/lib/neutral/chunk-KCBW4BR6.mjs.map +7 -0
  50. package/dist/lib/neutral/{chunk-WTQJHC75.mjs → chunk-L3E5IXAE.mjs} +225 -45
  51. package/dist/lib/neutral/chunk-L3E5IXAE.mjs.map +7 -0
  52. package/dist/lib/neutral/{chunk-EVK6XBXO.mjs → chunk-PRC4FEKJ.mjs} +2 -2
  53. package/dist/lib/neutral/chunk-PRC4FEKJ.mjs.map +7 -0
  54. package/dist/lib/neutral/{chunk-6YDI3J37.mjs → chunk-SCT6FFCR.mjs} +9 -4
  55. package/dist/lib/neutral/chunk-SCT6FFCR.mjs.map +7 -0
  56. package/dist/lib/neutral/{chunk-BBFJWWAV.mjs → chunk-TOCVVFK2.mjs} +26 -2
  57. package/dist/lib/neutral/chunk-TOCVVFK2.mjs.map +7 -0
  58. package/dist/lib/neutral/{chunk-RIVWNMSF.mjs → chunk-U53LSQQA.mjs} +3 -3
  59. package/dist/lib/neutral/{chunk-RIVWNMSF.mjs.map → chunk-U53LSQQA.mjs.map} +1 -1
  60. package/dist/lib/neutral/{chunk-IGK6FN65.mjs → chunk-UGFFV2FR.mjs} +2 -2
  61. package/dist/lib/neutral/{chunk-35INCYOE.mjs → chunk-UWLP4RFM.mjs} +1 -1
  62. package/dist/lib/neutral/chunk-UWLP4RFM.mjs.map +7 -0
  63. package/dist/lib/neutral/{chunk-LWXVKPPW.mjs → chunk-UZHCQ6NI.mjs} +13 -11
  64. package/dist/lib/neutral/{chunk-LWXVKPPW.mjs.map → chunk-UZHCQ6NI.mjs.map} +3 -3
  65. package/dist/lib/neutral/{chunk-5SUJPHAE.mjs → chunk-WKIT2YY5.mjs} +2 -2
  66. package/dist/lib/neutral/{chunk-T6E37YIP.mjs → chunk-XB6ISRAO.mjs} +38 -18
  67. package/dist/lib/neutral/chunk-XB6ISRAO.mjs.map +7 -0
  68. package/dist/lib/neutral/chunk-XXL42WCB.mjs +84 -0
  69. package/dist/lib/neutral/chunk-XXL42WCB.mjs.map +7 -0
  70. package/dist/lib/neutral/{chunk-ZGNNFYHS.mjs → chunk-XXWK4J53.mjs} +27 -42
  71. package/dist/lib/neutral/chunk-XXWK4J53.mjs.map +7 -0
  72. package/dist/lib/neutral/index.mjs +30 -26
  73. package/dist/lib/neutral/internal/index.mjs +111 -69
  74. package/dist/lib/neutral/meta.json +1 -1
  75. package/dist/lib/neutral/testing/index.mjs +79 -60
  76. package/dist/lib/neutral/testing/index.mjs.map +3 -3
  77. package/dist/types/src/Annotation.d.ts +35 -1
  78. package/dist/types/src/Annotation.d.ts.map +1 -1
  79. package/dist/types/src/Collection.d.ts +9 -8
  80. package/dist/types/src/Collection.d.ts.map +1 -1
  81. package/dist/types/src/Database.d.ts +38 -0
  82. package/dist/types/src/Database.d.ts.map +1 -1
  83. package/dist/types/src/Dataset.d.ts +1 -16
  84. package/dist/types/src/Dataset.d.ts.map +1 -1
  85. package/dist/types/src/Entity.d.ts +2 -0
  86. package/dist/types/src/Entity.d.ts.map +1 -1
  87. package/dist/types/src/Err.d.ts +67 -0
  88. package/dist/types/src/Err.d.ts.map +1 -1
  89. package/dist/types/src/Feed.d.ts +59 -80
  90. package/dist/types/src/Feed.d.ts.map +1 -1
  91. package/dist/types/src/Filter.d.ts +9 -1
  92. package/dist/types/src/Filter.d.ts.map +1 -1
  93. package/dist/types/src/Hypergraph.d.ts +2 -9
  94. package/dist/types/src/Hypergraph.d.ts.map +1 -1
  95. package/dist/types/src/Migration.d.ts +1 -1
  96. package/dist/types/src/Migration.d.ts.map +1 -1
  97. package/dist/types/src/Obj.d.ts +33 -6
  98. package/dist/types/src/Obj.d.ts.map +1 -1
  99. package/dist/types/src/Order.d.ts +1 -1
  100. package/dist/types/src/Order.d.ts.map +1 -1
  101. package/dist/types/src/Query.d.ts +1 -1
  102. package/dist/types/src/Query.d.ts.map +1 -1
  103. package/dist/types/src/QueryResult.d.ts +2 -2
  104. package/dist/types/src/QueryResult.d.ts.map +1 -1
  105. package/dist/types/src/Ref.d.ts +10 -6
  106. package/dist/types/src/Ref.d.ts.map +1 -1
  107. package/dist/types/src/Registry.d.ts +1 -1
  108. package/dist/types/src/Relation.d.ts.map +1 -1
  109. package/dist/types/src/Tag.d.ts +11 -13
  110. package/dist/types/src/Tag.d.ts.map +1 -1
  111. package/dist/types/src/Text.d.ts +41 -0
  112. package/dist/types/src/Text.d.ts.map +1 -0
  113. package/dist/types/src/Text.test.d.ts +2 -0
  114. package/dist/types/src/Text.test.d.ts.map +1 -0
  115. package/dist/types/src/Type.d.ts +38 -21
  116. package/dist/types/src/Type.d.ts.map +1 -1
  117. package/dist/types/src/View.d.ts +8 -9
  118. package/dist/types/src/View.d.ts.map +1 -1
  119. package/dist/types/src/index.d.ts +1 -0
  120. package/dist/types/src/index.d.ts.map +1 -1
  121. package/dist/types/src/internal/Annotation/annotations.d.ts +50 -0
  122. package/dist/types/src/internal/Annotation/annotations.d.ts.map +1 -1
  123. package/dist/types/src/internal/Annotation/atoms.d.ts +14 -0
  124. package/dist/types/src/internal/Annotation/atoms.d.ts.map +1 -0
  125. package/dist/types/src/internal/Annotation/entity-dictionary.d.ts +13 -0
  126. package/dist/types/src/internal/Annotation/entity-dictionary.d.ts.map +1 -1
  127. package/dist/types/src/internal/Entity/api.d.ts.map +1 -1
  128. package/dist/types/src/internal/Entity/guard.d.ts.map +1 -1
  129. package/dist/types/src/internal/Entity/model.d.ts +1 -1
  130. package/dist/types/src/internal/Entity/model.d.ts.map +1 -1
  131. package/dist/types/src/internal/Entity/object.d.ts +5 -1
  132. package/dist/types/src/internal/Entity/object.d.ts.map +1 -1
  133. package/dist/types/src/internal/Entity/relation.d.ts +7 -0
  134. package/dist/types/src/internal/Entity/relation.d.ts.map +1 -1
  135. package/dist/types/src/internal/Entity/type-uri.d.ts.map +1 -1
  136. package/dist/types/src/internal/Filter/index.d.ts +2 -0
  137. package/dist/types/src/internal/Filter/index.d.ts.map +1 -0
  138. package/dist/types/src/internal/Filter/match.d.ts +22 -0
  139. package/dist/types/src/internal/Filter/match.d.ts.map +1 -0
  140. package/dist/types/src/internal/Format/format.d.ts +0 -2
  141. package/dist/types/src/internal/Format/format.d.ts.map +1 -1
  142. package/dist/types/src/internal/Format/index.d.ts +2 -2
  143. package/dist/types/src/internal/Format/index.d.ts.map +1 -1
  144. package/dist/types/src/internal/Format/string.d.ts +0 -8
  145. package/dist/types/src/internal/Format/string.d.ts.map +1 -1
  146. package/dist/types/src/internal/Format/types.d.ts +2 -1
  147. package/dist/types/src/internal/Format/types.d.ts.map +1 -1
  148. package/dist/types/src/internal/Obj/atoms.d.ts +12 -3
  149. package/dist/types/src/internal/Obj/atoms.d.ts.map +1 -1
  150. package/dist/types/src/internal/Obj/clone.d.ts +2 -1
  151. package/dist/types/src/internal/Obj/clone.d.ts.map +1 -1
  152. package/dist/types/src/internal/Obj/create-object.d.ts +3 -4
  153. package/dist/types/src/internal/Obj/create-object.d.ts.map +1 -1
  154. package/dist/types/src/internal/Obj/json-serializer.d.ts.map +1 -1
  155. package/dist/types/src/internal/Query/index.d.ts +1 -0
  156. package/dist/types/src/internal/Query/index.d.ts.map +1 -1
  157. package/dist/types/src/internal/Query/query-result-effect.d.ts +9 -0
  158. package/dist/types/src/internal/Query/query-result-effect.d.ts.map +1 -0
  159. package/dist/types/src/internal/Ref/atoms.d.ts +1 -2
  160. package/dist/types/src/internal/Ref/atoms.d.ts.map +1 -1
  161. package/dist/types/src/internal/Ref/index.d.ts +1 -0
  162. package/dist/types/src/internal/Ref/index.d.ts.map +1 -1
  163. package/dist/types/src/internal/Ref/ref.d.ts +79 -8
  164. package/dist/types/src/internal/Ref/ref.d.ts.map +1 -1
  165. package/dist/types/src/internal/Ref/strong-deps.d.ts +35 -0
  166. package/dist/types/src/internal/Ref/strong-deps.d.ts.map +1 -0
  167. package/dist/types/src/internal/common/atom-snapshot.d.ts +8 -0
  168. package/dist/types/src/internal/common/atom-snapshot.d.ts.map +1 -0
  169. package/dist/types/src/internal/common/proxy/make-object.d.ts.map +1 -1
  170. package/dist/types/src/internal/common/proxy/proxy-types.d.ts +12 -0
  171. package/dist/types/src/internal/common/proxy/proxy-types.d.ts.map +1 -1
  172. package/dist/types/src/internal/common/proxy/proxy-utils.d.ts +25 -0
  173. package/dist/types/src/internal/common/proxy/proxy-utils.d.ts.map +1 -1
  174. package/dist/types/src/internal/common/proxy/schema-validator.d.ts +5 -0
  175. package/dist/types/src/internal/common/proxy/schema-validator.d.ts.map +1 -1
  176. package/dist/types/src/internal/common/proxy/typed-handler.d.ts +17 -0
  177. package/dist/types/src/internal/common/proxy/typed-handler.d.ts.map +1 -1
  178. package/dist/types/src/internal/common/types/entity.d.ts +4 -4
  179. package/dist/types/src/internal/common/types/entity.d.ts.map +1 -1
  180. package/dist/types/src/internal/common/types/meta.d.ts +2 -4
  181. package/dist/types/src/internal/common/types/meta.d.ts.map +1 -1
  182. package/dist/types/src/internal/index.d.ts +1 -0
  183. package/dist/types/src/internal/index.d.ts.map +1 -1
  184. package/dist/types/src/testing/test-schema.d.ts +42 -171
  185. package/dist/types/src/testing/test-schema.d.ts.map +1 -1
  186. package/dist/types/tsconfig.tsbuildinfo +1 -1
  187. package/package.json +20 -13
  188. package/src/Annotation.test.ts +257 -10
  189. package/src/Annotation.ts +58 -4
  190. package/src/Collection.ts +10 -12
  191. package/src/Database.ts +55 -21
  192. package/src/Entity.ts +3 -1
  193. package/src/Err.ts +22 -0
  194. package/src/Feed.ts +117 -141
  195. package/src/Filter.test.ts +38 -0
  196. package/src/Filter.ts +17 -3
  197. package/src/Hypergraph.ts +2 -11
  198. package/src/Migration.ts +1 -1
  199. package/src/Obj.test.ts +92 -12
  200. package/src/Obj.ts +38 -5
  201. package/src/Order.ts +3 -3
  202. package/src/Query.test.ts +2 -2
  203. package/src/Query.ts +16 -16
  204. package/src/QueryResult.ts +2 -2
  205. package/src/Ref.ts +14 -6
  206. package/src/Registry.ts +1 -1
  207. package/src/Relation.ts +1 -1
  208. package/src/Tag.ts +13 -16
  209. package/src/Text.test.ts +186 -0
  210. package/src/Text.ts +116 -0
  211. package/src/Type.test.ts +52 -24
  212. package/src/Type.ts +85 -33
  213. package/src/View.ts +22 -30
  214. package/src/index.ts +1 -1
  215. package/src/internal/Annotation/annotations.ts +71 -2
  216. package/src/internal/Annotation/atoms.ts +107 -0
  217. package/src/internal/Annotation/entity-dictionary.ts +40 -37
  218. package/src/internal/Entity/api.ts +1 -1
  219. package/src/internal/Entity/guard.ts +2 -1
  220. package/src/internal/Entity/model.ts +2 -2
  221. package/src/internal/Entity/object.ts +14 -1
  222. package/src/internal/Entity/relation.ts +19 -0
  223. package/src/internal/Entity/type-uri.ts +3 -1
  224. package/src/internal/Filter/index.ts +5 -0
  225. package/src/internal/Filter/match.ts +284 -0
  226. package/src/internal/Format/format.ts +0 -2
  227. package/src/internal/Format/index.ts +2 -2
  228. package/src/internal/Format/string.ts +0 -12
  229. package/src/internal/Format/types.ts +4 -2
  230. package/src/internal/JsonSchema/json-schema.test.ts +82 -54
  231. package/src/internal/Obj/atoms.ts +62 -18
  232. package/src/internal/Obj/clone.ts +61 -20
  233. package/src/internal/Obj/create-object.test.ts +3 -3
  234. package/src/internal/Obj/create-object.ts +3 -4
  235. package/src/internal/Obj/inspect.ts +1 -1
  236. package/src/internal/Obj/json-serializer.test.ts +7 -5
  237. package/src/internal/Obj/json-serializer.ts +4 -4
  238. package/src/internal/Obj/schema-validator.test.ts +53 -0
  239. package/src/internal/Obj/set-value.test.ts +29 -19
  240. package/src/internal/Query/index.ts +1 -0
  241. package/src/internal/Query/query-result-effect.ts +35 -0
  242. package/src/internal/Ref/atoms.ts +23 -3
  243. package/src/internal/Ref/index.ts +1 -0
  244. package/src/internal/Ref/ref.test.ts +8 -8
  245. package/src/internal/Ref/ref.ts +122 -39
  246. package/src/internal/Ref/strong-deps.ts +107 -0
  247. package/src/internal/common/atom-snapshot.ts +19 -0
  248. package/src/internal/common/proxy/make-object.ts +1 -1
  249. package/src/internal/common/proxy/proxy-types.ts +20 -0
  250. package/src/internal/common/proxy/proxy-utils.ts +37 -1
  251. package/src/internal/common/proxy/reactive-array.ts +3 -3
  252. package/src/internal/common/proxy/reactive.test.ts +1 -1
  253. package/src/internal/common/proxy/schema-validator.ts +181 -8
  254. package/src/internal/common/proxy/typed-handler.ts +254 -76
  255. package/src/internal/common/types/entity.ts +15 -7
  256. package/src/internal/index.ts +1 -0
  257. package/src/testing/test-schema.ts +75 -90
  258. package/dist/lib/neutral/chunk-35INCYOE.mjs.map +0 -7
  259. package/dist/lib/neutral/chunk-3PBP4V4O.mjs +0 -101
  260. package/dist/lib/neutral/chunk-3PBP4V4O.mjs.map +0 -7
  261. package/dist/lib/neutral/chunk-4ZUHOTCG.mjs +0 -184
  262. package/dist/lib/neutral/chunk-4ZUHOTCG.mjs.map +0 -7
  263. package/dist/lib/neutral/chunk-5SMDBFVB.mjs.map +0 -7
  264. package/dist/lib/neutral/chunk-6YDI3J37.mjs.map +0 -7
  265. package/dist/lib/neutral/chunk-7FPIAJIV.mjs +0 -2279
  266. package/dist/lib/neutral/chunk-7FPIAJIV.mjs.map +0 -7
  267. package/dist/lib/neutral/chunk-BBFJWWAV.mjs.map +0 -7
  268. package/dist/lib/neutral/chunk-EVK6XBXO.mjs.map +0 -7
  269. package/dist/lib/neutral/chunk-MZ7K3MLL.mjs.map +0 -7
  270. package/dist/lib/neutral/chunk-O6BH7EPN.mjs.map +0 -7
  271. package/dist/lib/neutral/chunk-QQIYS74I.mjs.map +0 -7
  272. package/dist/lib/neutral/chunk-R5W6DXR4.mjs.map +0 -7
  273. package/dist/lib/neutral/chunk-SBVFRTST.mjs.map +0 -7
  274. package/dist/lib/neutral/chunk-T6E37YIP.mjs.map +0 -7
  275. package/dist/lib/neutral/chunk-TFEWTY5A.mjs.map +0 -7
  276. package/dist/lib/neutral/chunk-TYGKCRMK.mjs.map +0 -7
  277. package/dist/lib/neutral/chunk-UUP46KUQ.mjs.map +0 -7
  278. package/dist/lib/neutral/chunk-WTQJHC75.mjs.map +0 -7
  279. package/dist/lib/neutral/chunk-WU3GIANS.mjs.map +0 -7
  280. package/dist/lib/neutral/chunk-ZGNNFYHS.mjs.map +0 -7
  281. package/dist/types/src/exemplars.test.d.ts +0 -2
  282. package/dist/types/src/exemplars.test.d.ts.map +0 -1
  283. package/dist/types/src/hierarchy.test.d.ts +0 -2
  284. package/dist/types/src/hierarchy.test.d.ts.map +0 -1
  285. package/src/exemplars.test.ts +0 -21
  286. package/src/hierarchy.test.ts +0 -33
  287. /package/dist/lib/neutral/{chunk-7PI7C4EF.mjs.map → chunk-4A2NWKRJ.mjs.map} +0 -0
  288. /package/dist/lib/neutral/{chunk-IGK6FN65.mjs.map → chunk-UGFFV2FR.mjs.map} +0 -0
  289. /package/dist/lib/neutral/{chunk-5SUJPHAE.mjs.map → chunk-WKIT2YY5.mjs.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/Obj.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Effect from 'effect/Effect';\nimport * as Equal from 'effect/Equal';\nimport * as Exit from 'effect/Exit';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\nimport * as Utils from 'effect/Utils';\n\nimport type { ForeignKey } from '@dxos/echo-protocol';\nimport { SchemaEx } from '@dxos/effect';\nimport { assertArgument, invariant } from '@dxos/invariant';\nimport { EntityId, type URI } from '@dxos/keys';\nimport { assumeType, deepMapValues } from '@dxos/util';\n\nimport type * as Database from './Database';\nimport * as Entity from './Entity';\nimport * as Err from './Err';\nimport * as internal from './internal';\nimport { getProxyTarget, isProxy } from './internal/common/proxy/proxy-utils';\nimport * as objInternal from './internal/Obj';\nimport * as Ref from './Ref';\nimport type * as Tag from './Tag';\nimport * as Type from './Type';\n\n/**\n * Base type for all ECHO objects.\n */\ninterface BaseObj extends internal.AnyEntity, Entity.OfKind<typeof Entity.Kind.Object> {}\n\n/**\n * Object type with specific properties.\n */\nexport type OfShape<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 * Runtime Effect schema for any ECHO object.\n * Use for validation, parsing, or as a reference target for collections.\n *\n * NOTE: `Schema.is(Type.Obj)` does STRUCTURAL validation only (checks for `id` field).\n * Use `Obj.isObject()` for proper ECHO instance type guards that check the KindId brand.\n *\n * @example\n * ```ts\n * // Structural type guard (accepts any object with id field)\n * if (Schema.is(Type.Obj)(unknownValue)) { ... }\n *\n * // ECHO instance type guard (checks KindId brand)\n * if (Obj.isObject(unknownValue)) { ... }\n *\n * // Reference to any object type\n * class Collection extends Type.makeObject<Collection>(DXN.make('com.example.type.collection', '0.1.0'))(\n * Schema.Struct({ objects: Schema.Array(Ref.Ref(Obj.Unknown)) }),\n * ) {}\n * ```\n */\n// TODO(wittjosiah): Investigate if Schema.filter can validate KindId on ECHO instances.\n// Effect Schema normalizes proxy objects to plain objects before calling filter predicates.\n// Possible approaches: custom Schema.declare, AST manipulation, or upstream contribution.\nexport const Unknown: internal.UnknownTypeSchema<Unknown, typeof Entity.Kind.Object> = Schema.Struct({\n id: Schema.String,\n}).pipe(\n Schema.extend(Schema.Record({ key: Schema.String, value: Schema.Unknown })),\n Schema.annotations({\n [internal.TypeAnnotationId]: {\n kind: Entity.Kind.Object,\n typename: internal.ANY_OBJECT_TYPENAME,\n version: internal.ANY_OBJECT_VERSION,\n },\n }),\n) as unknown as internal.UnknownTypeSchema<Unknown, typeof Entity.Kind.Object>;\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, internal.AnyProperties {}\n\n/**\n * Base type for snapshot objects (has SnapshotKindId instead of KindId).\n */\ninterface BaseSnapshot extends internal.AnyEntity {\n readonly [Entity.SnapshotKindId]: typeof Entity.Kind.Object;\n readonly id: EntityId;\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, Entity.KindId> & BaseSnapshot;\n\n/**\n * JSON-encoded properties for objects.\n */\nexport interface BaseObjJson {\n id: string;\n}\n\n// Factory (not a shared const): each object must get its own `keys`/`tags`/`annotations` containers,\n// otherwise mutating one object's meta would leak into every other object via the shared references.\nconst defaultMeta = (): internal.EntityMeta => ({\n keys: [],\n tags: [],\n annotations: {},\n});\n\n// TODO(burdon): Should we allow the caller to set the id?\n/**\n * Props type for object creation with a given type. Accepts a `Type.AnyObj`\n * entity and derives the instance shape via `Type.InstanceType`. Relation-kind\n * entities are rejected at the type level — use `Relation.MakeProps` for those.\n *\n * When the schema is the unconstrained `Type.AnyObj` (`Obj<unknown>` — e.g. a\n * dynamic type from `schemaRegistry.register`), the instance shape is not\n * statically known, so data props widen to `Record<string, unknown>` and the\n * caller can pass arbitrary fields without a cast.\n */\nexport type MakeProps<S extends Type.AnyObj> = {\n id?: EntityId;\n [Meta]?: Partial<internal.EntityMeta>;\n [Parent]?: Unknown;\n // When the resolved instance has no known data keys, widen to a permissive\n // record (the `Obj<unknown>` case); otherwise use the precise property shape.\n // `[keyof …] extends [never]` is wrapped in tuples so the check is\n // non-distributive — a `never` instance type (e.g. when narrowing collapses\n // the schema) stays a single branch instead of distributing to `never`.\n} & ([keyof Entity.Properties<Type.InstanceType<S>>] extends [never]\n ? Record<string, unknown>\n : Entity.Properties<Type.InstanceType<S>>);\n\n/**\n * Creates a new echo object of the given schema or `Type.Type`.\n *\n * @param typeOrSchema - A static object schema (`Type.makeObject(...)`) or a\n * `Type.Type` entity (e.g. one returned by `db.addType(schemaEntity)`).\n * @param props - Object properties.\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 / object-kind types, not relation schemas.\n * Use `Relation.make` for relations.\n */\nexport function make<T extends Type.AnyObj>(type: T, props: NoInfer<MakeProps<T>>): OfShape<Type.InstanceType<T>>;\nexport function make(input: Type.AnyObj, props: any): OfShape<any> {\n // `Type.Type` entities aren't `Schema.Schema` themselves; derive the Effect\n // Schema via `Type.getSchema(...)`. Pass the entity through to `makeObject`\n // so subsequent schema mutations (`Type.addFields`, etc.) propagate.\n const schema = Type.getSchema(input);\n assertArgument(\n internal.getTypeAnnotation(schema)?.kind === Entity.Kind.Object,\n 'schema',\n 'Expected an object schema',\n );\n\n let meta: internal.EntityMeta | undefined = undefined;\n\n // Set default fields on meta on creation.\n if (props[internal.MetaId] != null) {\n meta = { ...defaultMeta(), ...props[internal.MetaId] };\n delete props[internal.MetaId];\n }\n\n // Filter undefined values (Object.entries only returns string-keyed properties).\n const filterUndefined: any = Object.fromEntries(Object.entries(props).filter(([_, v]) => v !== undefined));\n\n // Copy symbol properties (like ParentId) that Object.entries doesn't include.\n for (const sym of Object.getOwnPropertySymbols(props)) {\n const value = (props as any)[sym];\n if (value !== undefined) {\n filterUndefined[sym] = value;\n }\n }\n\n return internal.makeObject(\n schema,\n filterUndefined,\n {\n ...defaultMeta(),\n ...meta,\n },\n input,\n );\n}\n\n/**\n * Determine if object is an ECHO object.\n */\nexport const isObject = (obj: unknown): obj is Unknown => {\n assumeType<internal.InternalObjectProps>(obj);\n return typeof obj === 'object' && obj !== null && obj[Entity.KindId] === Entity.Kind.Object;\n};\n\nexport const isSnapshot = (obj: unknown): obj is Snapshot => {\n assumeType<internal.InternalObjectProps>(obj);\n return typeof obj === 'object' && obj !== null && (obj as any)[Entity.SnapshotKindId] === 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 internal.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> = objInternal.getSnapshot as any;\n\n/**\n * Returns the reactive version of an object from the database, given its snapshot.\n * Inverse of `Obj.getSnapshot`.\n *\n * Uses `Obj.getDatabase` internally to get the database from the snapshot,\n * then resolves the reactive object by ID.\n *\n * @param snapshot - A snapshot of the object (from `Obj.getSnapshot`).\n * @returns Effect that succeeds with the reactive object, or fails with `GetReactiveError`.\n * @example\n * ```ts\n * const snapshot = Obj.getSnapshot(obj);\n * const reactive = Obj.getReactive(snapshot).pipe(\n * Effect.runSync\n * );\n * ```\n */\nexport const getReactive = <T extends Unknown>(snapshot: Snapshot<T>): Effect.Effect<T, Err.GetReactiveError> =>\n Effect.gen(function* () {\n const db = internal.getDatabase(snapshot);\n if (!db) {\n return yield* Effect.fail(new Err.GetReactiveError({ reason: 'no-database', snapshotId: snapshot.id }));\n }\n const obj = db.getObjectById(snapshot.id);\n if (!obj) {\n return yield* Effect.fail(new Err.GetReactiveError({ reason: 'object-not-found', snapshotId: snapshot.id }));\n }\n return obj as T;\n });\n\n/**\n * Like `Obj.getReactive` but returns `Option.none()` instead of failing when the object\n * cannot be resolved (no database, object not found).\n *\n * @param snapshot - A snapshot of the object (from `Obj.getSnapshot`).\n * @returns Effect that succeeds with `Option.some(reactive)` or `Option.none()`.\n */\nexport const getReactiveOption = <T extends Unknown>(snapshot: Snapshot<T>): Effect.Effect<Option.Option<T>, never> =>\n getReactive(snapshot).pipe(\n Effect.map(Option.some),\n Effect.catchAll(() => Effect.succeed(Option.none())),\n );\n\n/**\n * Synchronous version of `Obj.getReactive`. Returns the reactive object or throws\n * `GetReactiveError` when the object cannot be resolved (no database, object not found).\n *\n * @param snapshot - A snapshot of the object (from `Obj.getSnapshot`).\n * @returns The reactive object.\n * @throws {Err.GetReactiveError} When the object cannot be resolved.\n */\nexport const getReactiveOrThrow = <T extends Unknown>(snapshot: Snapshot<T>): T =>\n Effect.runSync(getReactive(snapshot));\n\n/**\n * Synchronous version of `Obj.getReactive` that returns `undefined` instead of throwing.\n * Accepts `undefined` input so callers can pass the result of `useObject` directly.\n *\n * @param snapshot - A snapshot of the object (from `Obj.getSnapshot` or `useObject`), or `undefined`.\n * @returns The reactive object, or `undefined` if the snapshot is `undefined` or unresolvable.\n */\nexport const getReactiveOrUndefined = <T extends Unknown>(snapshot: Snapshot<T> | undefined): T | undefined => {\n if (snapshot === undefined) {\n return undefined;\n }\n return Effect.runSyncExit(getReactive(snapshot)).pipe(\n Exit.match({ onSuccess: (value) => value, onFailure: () => undefined }),\n );\n};\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 * - `'parent'`: clone only refs whose target is transitively parented under the clone root (children\n * that cascade-delete with it); shared refs (registry operations, context objects, …) are copied as-is.\n * - `'all'`: clone every referenced object recursively.\n * Omit for a shallow clone (refs copied as-is).\n */\n deep?: 'parent' | 'all';\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 = objInternal.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.update`.\n */\nexport type Mutable<T> = internal.Mutable<T>;\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.update` 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.update` 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.update\n * Obj.update(person, (obj) => {\n * obj.name = 'Jane';\n * obj.age = 30;\n * });\n * // ONE notification fires here\n *\n * // Direct mutation throws\n * person.name = 'Bob'; // Error: Cannot modify outside Obj.update()\n * ```\n *\n * Note: Only accepts objects. Use `Relation.update` for relations.\n */\nexport const update = <T extends Unknown>(obj: T, callback: internal.ChangeCallback<T>): void => {\n internal.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 SchemaEx.getValue(obj, SchemaEx.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.update` 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.update(person, (obj) => {\n * Obj.setValue(obj, ['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 objInternal.setValue as any;\n\n//\n// Type\n//\n\nexport const ID = EntityId;\nexport type ID = EntityId;\n\n/**\n * Test if an object is an instance of a given object type.\n *\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 *\n * Only accepts `Type.AnyObj` — use `Relation.instanceOf` for relations and\n * `Type.isType(value)` to test for `Type.Type` meta-schema entities.\n */\nexport const instanceOf: {\n // Reject `Type.Type` at the type level — those are meta-schema entities, not\n // object instances. Use `Type.isType(value)` instead.\n <T extends Type.Type>(\n type: T,\n _hint?: never,\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n ..._error: ['ERROR: Obj.instanceOf does not accept Type.Type; use Type.isType(value) instead']\n ): never;\n // Reject relation types — use `Relation.instanceOf` instead.\n <R extends Type.AnyRelation>(\n type: R,\n _hint?: never,\n // eslint-disable-next-line @typescript-eslint/unified-signatures\n ..._error: ['ERROR: Obj.instanceOf does not accept relation types; use Relation.instanceOf instead']\n ): never;\n <S extends Type.AnyObj>(schema: S): (value: unknown) => value is Type.InstanceType<S>;\n <S extends Type.AnyObj>(schema: S, value: unknown): value is Type.InstanceType<S>;\n} = ((...args: [schema: Type.AnyEntity, value?: unknown]) => {\n if (args.length === 1) {\n return (entity: unknown) => internal.isInstanceOf(args[0], entity);\n }\n\n return internal.isInstanceOf(args[0], args[1]);\n}) as any;\n\n/**\n * Test if a snapshot is an instance of a schema.\n * Mirrors `instanceOf` but only accepts values branded with SnapshotKindId.\n * Use when the value is known to be a snapshot (e.g. from `getSnapshot` or `useObject`).\n *\n * @example\n * ```ts\n * const snapshot = Obj.getSnapshot(person);\n * if (Obj.snapshotOf(Person, snapshot)) {\n * // snapshot is Obj.Snapshot<Person>\n * }\n * ```\n */\nexport const snapshotOf: {\n <S extends Type.AnyObj>(schema: S): (value: unknown) => value is Snapshot<Type.InstanceType<S>>;\n <S extends Type.AnyObj>(schema: S, value: unknown): value is Snapshot<Type.InstanceType<S>>;\n} = ((...args: [schema: Type.AnyObj, value: unknown] | [schema: Type.AnyObj]) => {\n const check = (entity: unknown) =>\n entity != null &&\n typeof entity === 'object' &&\n Entity.SnapshotKindId in entity &&\n internal.isInstanceOf(args[0], entity);\n\n if (args.length === 1) {\n return (entity: unknown) => check(entity);\n }\n\n return check(args[1]);\n}) as any;\n\nexport type { GetURIOptions } from './internal';\n\n// TODO(dmaretskyi): Allow returning undefined.\n/**\n * Get the URI of the object.\n * Accepts both reactive objects and snapshots.\n *\n * @param options.prefer - Controls the URI form (see {@link GetURIOptions}).\n */\nexport const getURI = (entity: Unknown | Snapshot, options?: internal.GetURIOptions): URI.URI => {\n assertArgument(!Schema.isSchema(entity), 'obj', 'Object should not be a schema.');\n return internal.getUri(entity, options);\n};\n\n/**\n * @returns The DXN of the object's type.\n * @example dxn:com.example.type.person:1.0.0\n * @throws If the object is missing its type (corrupted object).\n */\nexport const getTypeURI = (obj: Unknown | Snapshot): URI.URI => {\n const type = internal.getTypeURI(obj);\n invariant(type != null, 'Corrupted object: missing type.');\n return type;\n};\n\n/**\n * Get the type entity (`Type.AnyObj`) the object was created from.\n *\n * Returns `undefined` when the object's type isn't registered in this runtime\n * (e.g. a freshly deserialized snapshot whose type entity hasn't been wired\n * up yet, or an object loaded from storage before its schema is known). To\n * get the Effect Schema from the returned entity, use `Type.getSchema(...)`.\n */\nexport const getType = (obj: Unknown | Snapshot): Type.AnyObj | undefined =>\n internal.getType(obj) as Type.AnyObj | undefined;\n\n/**\n * @returns The typename of the object's type.\n * Accepts both reactive objects and snapshots.\n * @example `com.example.type.person`\n */\nexport const getTypename = (entity: Unknown | Snapshot): string | undefined => internal.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 *\n * @idiom org.dxos.echo.objGetDatabase\n * applies: Reaching an object's database — to query, add, or remove — when the surrounding Space is not otherwise needed\n * instead-of: `getSpace(obj)?.db` (resolving the whole Space just to read its `.db`)\n * uses: {@link getDatabase}\n */\nexport const getDatabase = (entity: Entity.Unknown | Entity.Snapshot): Database.Database | undefined =>\n internal.getDatabase(entity);\n\n//\n// Meta\n//\n\n/**\n * Property that accesses metadata for an entity.\n *\n * Alias for `Entity.Meta`.\n */\nexport const Meta = internal.MetaId;\n\n/**\n * Deeply read-only version of EntityMeta.\n * Prevents mutation at all nesting levels (e.g., `meta.keys.push()` is a TypeScript error).\n */\nexport type ReadonlyMeta = internal.ReadonlyMeta;\n\n/**\n * Mutable meta type returned by `Obj.getMeta` inside an `Obj.update` callback.\n */\nexport type Meta = internal.Meta;\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.update` 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.update(person, (obj) => {\n * const meta = Obj.getMeta(obj); // EntityMeta (mutable)\n * meta.tags.push(Ref.make(tag)); // tags are refs to Tag objects\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 internal.getMetaChecked(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[] => internal.getKeys(entity, source!));\n\n/**\n * Delete all keys from the object for the specified source.\n * Must be called within an `Obj.update` 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 => internal.deleteKeys(entity, source);\n\n/**\n * Add a tag to the object.\n * Must be called within an `Obj.update` 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: Ref.Ref<Tag.Tag>): void => internal.addTag(entity, tag);\n\n/**\n * Remove a tag from the object.\n * Must be called within an `Obj.update` 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: Ref.Ref<Tag.Tag>): void => internal.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 => objInternal.isDeleted(entity);\n\n//\n// Annotations\n//\n\n/**\n * Get the label of the object.\n * Accepts both reactive objects and snapshots.\n *\n * @param options.fallback `'typename'` returns the object's typename when no\n * label is set (e.g. `org.dxos.type.table`).\n */\nexport const getLabel = (entity: Unknown | Snapshot, options?: internal.GetLabelOptions): string | undefined =>\n internal.getLabel(entity, options);\n\n/**\n * Set the label of the object.\n * Must be called within an `Obj.update` 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 => internal.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 => internal.getDescription(entity);\n\n/**\n * Get the icon annotation for the object (or any entity), resolved via its type-level\n * `IconAnnotation`. Accepts both reactive entities and snapshots, and either Objects or\n * Relations — the underlying schema-based lookup works for both.\n *\n * Returns the full `{ icon, hue }` annotation; callers wanting just the icon name typically\n * write `Obj.getIcon(obj)?.icon ?? 'ph--cube--regular'`.\n */\nexport const getIcon = (entity: Entity.Unknown | Entity.Snapshot): internal.IconAnnotation | undefined =>\n internal.getIcon(entity);\n\n/**\n * Set the description of the object.\n * Must be called within an `Obj.update` 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 internal.setDescription(entity, description);\n\n/**\n * Symbol to set parent when creating objects with `Obj.make`.\n * @example\n * ```ts\n * Obj.make(TestSchema.Person, {\n * [Obj.Parent]: parentObject,\n * name: 'John',\n * })\n * ```\n */\nexport const Parent: unique symbol = internal.ParentId as any;\n\n/**\n * Get the parent of an object.\n * The parent is always loaded together with the object.\n * Only objects are allowed to have a parent\n * @returns The parent object, or undefined if the object has no parent.\n */\nexport const getParent = (entity: Unknown | Snapshot): Unknown | undefined => {\n assertArgument(isObject(entity) || isSnapshot(entity), 'Expected an object');\n assumeType<internal.InternalObjectProps>(entity);\n return entity[internal.ParentId] as Unknown | undefined;\n};\n\n/**\n * Sets the parent of an object.\n * If a parent (or any transitive parent) is deleted, the object will be deleted.\n * Only objects are allowed to have a parent.\n */\nexport const setParent = (entity: Unknown, parent: Any | undefined) => {\n assertArgument(isObject(entity), 'Expected an object');\n assertArgument(parent === undefined || isObject(parent), 'Expected an object');\n assumeType<internal.InternalObjectProps>(entity);\n assumeType<internal.InternalObjectProps | undefined>(parent);\n entity[internal.ParentId] = parent;\n return entity;\n};\n\ninterface UpdateFromOptions<T> {\n exclude?: (keyof T)[];\n include?: (keyof T)[];\n}\n\nconst valuesEqual = (left: unknown, right: unknown): boolean => {\n if (left === right) {\n return true;\n }\n if (left === null || right === null) {\n return left === right;\n }\n if (typeof left !== 'object' || typeof right !== 'object') {\n return Utils.structuralRegion(() => Equal.equals(left, right));\n }\n if (Ref.isRef(left) && Ref.isRef(right)) {\n return left.uri === right.uri;\n }\n if (Ref.isRef(left) || Ref.isRef(right)) {\n return false;\n }\n if (Array.isArray(left) && Array.isArray(right)) {\n if (left.length !== right.length) {\n return false;\n }\n for (let index = 0; index < left.length; index++) {\n if (!valuesEqual(left[index], right[index])) {\n return false;\n }\n }\n return true;\n }\n if (Array.isArray(left) || Array.isArray(right)) {\n return false;\n }\n const leftRecord = left as Record<string, unknown>;\n const rightRecord = right as Record<string, unknown>;\n const keys = new Set([\n ...Object.keys(leftRecord).filter((key) => key !== 'id'),\n ...Object.keys(rightRecord).filter((key) => key !== 'id'),\n ]);\n for (const key of keys) {\n const leftHas = Object.hasOwn(leftRecord, key);\n const rightHas = Object.hasOwn(rightRecord, key);\n const leftValue = leftHas ? leftRecord[key] : undefined;\n const rightValue = rightHas ? rightRecord[key] : undefined;\n if (!valuesEqual(leftValue, rightValue)) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Breaks reactive proxies on assigned values so echo-db assignment accepts nested structs (same idea as link assignment).\n */\nconst prepareAssignValue = (value: unknown): unknown =>\n deepMapValues(value, (nested, recurse) => {\n if (nested === null || typeof nested !== 'object') {\n return nested;\n }\n if (Ref.isRef(nested)) {\n return nested;\n }\n if (Array.isArray(nested)) {\n return recurse(nested);\n }\n if (isProxy(nested)) {\n return recurse({ ...getProxyTarget(nested) });\n }\n return recurse(nested);\n });\n\n/**\n * For each key present on `source` (except `id`), assigns `target[key]` when the current value differs.\n * References are compared by target DXN; other values use Effect `Equal.equals` inside a structural region,\n * with recursive comparison for arrays and plain object-shaped property bags (excluding `id`).\n *\n * Must be called within an `Obj.update` callback.\n *\n * @returns Whether any property was updated.\n */\nexport const updateFrom = <T extends Unknown>(\n target: Mutable<T>,\n source: T,\n options?: UpdateFromOptions<T>,\n): boolean => {\n assertArgument(isObject(target), 'Expected an echo object target.');\n assertArgument(isObject(source), 'Expected an echo object source.');\n let keys = Object.keys(source as Record<string, unknown>).filter((key) => key !== 'id');\n if (options?.include !== undefined) {\n const include = new Set(options.include.map((key) => String(key)));\n keys = keys.filter((key) => include.has(key));\n }\n if (options?.exclude !== undefined) {\n const exclude = new Set(options.exclude.map((key) => String(key)));\n keys = keys.filter((key) => !exclude.has(key));\n }\n let updated = false;\n const sourceRecord = source as Record<string, unknown>;\n const targetRecord = target as Record<string, unknown>;\n for (const key of keys) {\n if (!Object.hasOwn(sourceRecord, key)) {\n continue;\n }\n const nextValue = sourceRecord[key];\n const prevValue = Object.hasOwn(targetRecord, key) ? targetRecord[key] : undefined;\n if (valuesEqual(prevValue, nextValue)) {\n continue;\n }\n targetRecord[key] = prepareAssignValue(nextValue) as never;\n updated = true;\n }\n return updated;\n};\n\n//\n// JSON\n//\n\n/**\n * JSON representation of an object.\n */\nexport type JSON = internal.ObjectJSON;\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 => objInternal.objectToJSON(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.uri - Override object URI. Changes the result of `Obj.getURI`.\n * @param options.database - Database to associate with the object.\n */\nexport const fromJSON: (\n json: unknown,\n options?: { refResolver?: Ref.Resolver; uri?: URI.URI; database?: Database.Database; parent?: Unknown },\n) => Promise<Unknown> = objInternal.objectFromJSON as any;\n\n/**\n * Comparator function type for sorting objects.\n * Accepts both reactive objects and snapshots.\n */\nexport type Comparator = internal.Comparator<Unknown | Snapshot>;\n\nexport const sortByLabel: Comparator = internal.sortByLabel as Comparator;\nexport const sortByTypename: Comparator = internal.sortByTypename as Comparator;\nexport const sort = (...comparators: Comparator[]): Comparator => internal.sort(...comparators) as Comparator;\n\n//\n// Version\n//\n\nexport const VersionTypeId = internal.VersionTypeId;\nexport type VersionCompareResult = internal.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 = internal.EntityVersion;\n\nexport const isVersion = internal.isVersion;\nexport const versionValid = internal.versionValid;\nexport const compareVersions = internal.compareVersions;\nexport const encodeVersion = internal.encodeVersion;\nexport const decodeVersion = internal.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 => internal.version(entity);\n\n//\n// Atoms\n//\n\n/**\n * Create a reactive snapshot atom for an ECHO object or ref.\n * Use inside atom computations (e.g. `Atom.make((get) => get(Obj.atom(ref)))`) to subscribe\n * to a ref's target — the atom re-fires when the target loads or changes.\n *\n * @idiom org.dxos.echo.objAtomReactive\n * applies: Subscribing to a ref's target inside an atom computation or a non-React reactive context\n * instead-of: `ref.target` — synchronous and not reactive; returns `undefined` when the target isn't loaded yet and never notifies when it becomes available\n * uses: {@link atom}\n * related: org.dxos.echo-react.useObjectReactive\n */\nexport const atom = objInternal.makeAtom;\nexport const atomReactive = objInternal.makeWithReactive;\nexport const atomProperty = objInternal.makeProperty;\nexport const labelAtom = objInternal.makeLabelAtom;\nexport const labelProperty = internal.getLabelProperty;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;iBAAAA;EAAA,qBAAAC;EAAA,cAAAC;EAAA;;;eAAAC;EAAA,uBAAAC;EAAA,qBAAAC;EAAA,kBAAAC;E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QAAA,YAAA,WAAA,SAAA,GAAA;AACAH;IACAD;AACF,iBAAA,GAAA,IAAA,mBAAA,SAAA;AACA,cAAOA;EACP;AAWF,SAAA;;;AA8BO,IAAMK,WAAsCA;AAC5C,IAAMC,eAAWC;AAEtB,IAAAF,kBAAA;AACF,IAAUC,QAAA,IAAA,gBAAA,KAAA,GAAA,WAAA;AAcH,IAAME,iBAAwBA;AAC9B,IAAMC,aAAkB3E;AACxB,IAAM4E,gBAAgB5E;AACtB,IAAM6E,mBAAyBA;AAEtC,IAAAD,iBAAA;;AAOQ,IAAA7E,WAAA,CAAA,WAAA,QAAA,MAAA;AAgBD,IAAM+E,OAAeC;AACrB,IAAMC,eAAwBC;AAC9B,IAAMC,eAAyBC;;;",
6
+ "names": ["Unknown", "VersionTypeId", "addTag", "clone", "compareVersions", "decodeVersion", "deleteKeys", "encodeVersion", "getDatabase", "getDescription", "getIcon", "getKeys", "getLabel", "getSnapshot", "getType", "getTypeURI", "getTypename", "isDeleted", "isVersion", "removeTag", "setDescription", "setLabel", "setValue", "sort", "sortByLabel", "sortByTypename", "subscribe", "version", "versionValid", "Effect", "Equal", "Exit", "Function", "Option", "Schema", "Utils", "SchemaEx", "assertArgument", "invariant", "EntityId", "assumeType", "deepMapValues", "Schema", "Record", "key", "annotations", "TypeAnnotationId", "kind", "Kind", "typename", "ANY_OBJECT_TYPENAME", "version", "internal", "ANY_OBJECT_VERSION", "input", "meta", "undefined", "props", "defaultMeta", "MetaId", "Object", "getOwnPropertySymbols", "value", "filterUndefined", "sym", "isSnapshot", "obj", "subscribe", "Effect", "GetReactiveError", "reason", "snapshotId", "snapshot", "id", "onFailure", "setValue", "entity", "isInstanceOf", "args", "length", "check", "options", "invariant", "type", "getTypename", "getDatabase", "getMetaChecked", "isDeleted", "assumeType", "ParentId", "assertArgument", "parent", "isObject", "valuesEqual", "left", "Ref", "right", "isRef", "Array", "isArray", "index", "leftRecord", "keys", "Set", "rightRecord", "rightHas", "leftValue", "leftHas", "rightValue", "nested", "isProxy", "getProxyTarget", "source", "filter", "include", "map", "String", "exclude", "updated", "targetRecord", "hasOwn", "prevValue", "nextValue", "sortByTypename", "sort", "comparators", "versionValid", "compareVersions", "encodeVersion", "decodeVersion", "atomProperty", "objInternal", "labelAtom", "makeLabelAtom", "labelProperty", "getLabelProperty"]
7
+ }
@@ -28,4 +28,4 @@ export {
28
28
  runQuery,
29
29
  Registry_exports
30
30
  };
31
- //# sourceMappingURL=chunk-WU3GIANS.mjs.map
31
+ //# sourceMappingURL=chunk-IQR45HAD.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/Registry.ts"],
4
+ "sourcesContent": ["// Copyright 2026 DXOS.org\n\n// @import-as-namespace\n\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\n\nimport { type ReadOnlyEvent } from '@dxos/async';\n\nimport type * as Database from './Database';\nimport * as Entity from './Entity';\nimport type * as Filter from './Filter';\nimport type * as Query from './Query';\n\n/**\n * Identifier denoting an ECHO Registry.\n */\nexport const TypeId = Symbol.for('@dxos/echo/Registry');\nexport type TypeId = typeof TypeId;\n\n/**\n * Composable, in-memory registry of keyed ECHO entities.\n *\n * Entities are stored by id and queried via the standard ECHO Query API.\n * A registry may delegate to an optional upstream registry: results from the local\n * registry take precedence and upstream results fill in anything not found locally.\n *\n * Intended use cases include caches of schemas, operations, skills, routines, plugins,\n * etc., sourced from 3rd-party plugins, local code, or local space objects.\n *\n * Types (schema-definition entities produced by `Type.makeObject` / `Type.makeRelation`) are\n * stored the same way as any other entity — via `add()`. Use `list().filter(Type.isType)` to\n * retrieve them.\n *\n * Scope: a Registry is independent of any ECHO space or Hypergraph — it is a process-local,\n * in-memory cache. Wire one per space (e.g. as a Layer scoped to the space's Effect runtime)\n * or share a single instance across spaces depending on the use case.\n *\n * The concrete implementation (and the `makeRegistry` / `registryLayer` factories) lives in\n * `@dxos/echo-client`; this module declares only the interface so that the `@dxos/echo` API surface\n * stays free of query-matching dependencies.\n */\nexport interface Registry {\n readonly [TypeId]: TypeId;\n\n /**\n * Stable per-instance identifier. Used to key process-local resources (e.g. memoized\n * reactive atoms) to a specific registry instance, analogous to {@link Database.spaceId}.\n */\n readonly id: string;\n\n /**\n * Fires whenever local registry contents change (add, remove, or clear).\n */\n readonly changed: ReadOnlyEvent<void>;\n\n /**\n * All locally-stored entities.\n * Does not include upstream entities — use {@link list} for that.\n */\n readonly local: readonly Entity.Unknown[];\n\n /**\n * Add or replace one or more entities in the local registry.\n * Existing entries with the same id are replaced.\n * Also indexes type entities by DXN for fast lookup.\n */\n add(entities: readonly Entity.Unknown[]): void;\n\n /**\n * Remove an entity by id from the local registry.\n * @returns true if an entity was removed, false if it was not found.\n */\n remove(id: string): boolean;\n\n /**\n * Remove all locally-stored entities.\n * Does not affect the upstream registry.\n */\n clear(): void;\n\n /**\n * Get an entity by id.\n * Searches the local registry first, then falls back to the upstream registry.\n */\n get(id: string): Entity.Unknown | undefined;\n\n /**\n * Get an entity by one of its addressing URIs — a type entity by its typename DXN (or, when\n * persisted, its identifier EID), a keyed entity by its `dxn:<key>[:<version>]`. Accepts legacy\n * DXN forms (normalized internally). Searches the local registry first, then falls back to the\n * upstream registry. Narrow the result with `Type.isType` when a type entity is required.\n */\n getByURI(uri: string): Entity.Unknown | undefined;\n\n /**\n * List all entities.\n * Local entities take precedence over upstream entities with the same id.\n */\n list(): Entity.Unknown[];\n\n /**\n * Run an ECHO query against the registry's entities (implements {@link Database.Queryable}).\n *\n * Matching happens in-memory over {@link list}. Scope (`from`) clauses are unwrapped and\n * ignored — a direct registry query always targets the registry's own entities. The primary\n * way to query registry contents is still through the database (`db.query(...).from(Scope.registry())`),\n * which fans the database and registry together; this method is for querying a registry directly.\n *\n * Only locally-evaluable AST nodes are supported: `select`, `filter`, `limit`, `from`, `options`,\n * and boolean combinators. Server-side concerns (order, traversal, text/timestamp filters) throw.\n */\n query: Database.QueryFn;\n}\n\n/**\n * Type guard for {@link Registry}.\n */\nexport const isRegistry = (obj: unknown): obj is Registry =>\n obj != null && typeof obj === 'object' && TypeId in obj && (obj as { [TypeId]?: unknown })[TypeId] === TypeId;\n\n/**\n * Options for the registry factory (`makeRegistry` in `@dxos/echo-client`).\n */\nexport type Options = {\n /**\n * Optional upstream registry. Queries fall back to upstream when an entity\n * is not present in the local registry.\n */\n upstream?: Registry;\n\n /**\n * Initial set of entities to seed the local registry with.\n */\n initial?: readonly Entity.Unknown[];\n};\n\n/**\n * Effect Context tag for {@link Registry}.\n * Use this to inject a registry into Effect-based code.\n */\nexport class Service extends Context.Tag('@dxos/echo/Registry/Service')<Service, Registry>() {}\n\n/**\n * Executes a query against the registry and returns the results.\n * Analogous to {@link Database.query} `.run` for the in-process registry.\n */\nexport const runQuery: {\n <Q extends Query.Any>(query: Q): Effect.Effect<Query.Type<Q>[], never, Service>;\n <F extends Filter.Any>(filter: F): Effect.Effect<Filter.Type<F>[], never, Service>;\n} = (queryOrFilter: Query.Any | Filter.Any) =>\n Effect.gen(function* () {\n const registry = yield* Service;\n return (yield* Effect.promise(() => registry.query(queryOrFilter as any).run())) as any;\n });\n"],
5
+ "mappings": ";;;;;AAAA;;;;;;;AAIA,YAAYA,aAAa;AACzB,YAAYC,YAAY;AAYjB,IAAMC,SAASC,uBAAOC,IAAI,qBAAA;AAqG1B,IAAMC,aAAa,CAACC,QACzBA,OAAO,QAAQ,OAAOA,QAAQ,YAAYJ,UAAUI,OAAQA,IAA+BJ,MAAAA,MAAYA;AAsBlG,IAAMK,UAAN,cAA8BC,YAAI,6BAAA,EAAA,EAAA;AAAqD;AAMvF,IAAMC,WAGT,CAACC,kBACIC,WAAI,aAAA;AACT,QAAMC,WAAW,OAAOL;AACxB,SAAQ,OAAcM,eAAQ,MAAMD,SAASE,MAAMJ,aAAAA,EAAsBK,IAAG,CAAA;AAC9E,CAAA;",
6
+ "names": ["Context", "Effect", "TypeId", "Symbol", "for", "isRegistry", "obj", "Service", "Tag", "runQuery", "queryOrFilter", "gen", "registry", "promise", "query", "run"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAnnotationHelper
3
- } from "./chunk-O6BH7EPN.mjs";
3
+ } from "./chunk-2ZHECXUR.mjs";
4
4
 
5
5
  // src/internal/Format/types.ts
6
6
  import * as Function from "effect/Function";
@@ -47,6 +47,7 @@ var TypeFormat = /* @__PURE__ */ (function(TypeFormat2) {
47
47
  TypeFormat2["Hostname"] = "hostname";
48
48
  TypeFormat2["JSON"] = "json";
49
49
  TypeFormat2["Markdown"] = "markdown";
50
+ TypeFormat2["Password"] = "password";
50
51
  TypeFormat2["Regex"] = "regex";
51
52
  TypeFormat2["SingleSelect"] = "single-select";
52
53
  TypeFormat2["Text"] = "text";
@@ -87,6 +88,7 @@ var formatToType = {
87
88
  ["hostname"]: "string",
88
89
  ["json"]: "string",
89
90
  ["markdown"]: "string",
91
+ ["password"]: "string",
90
92
  ["regex"]: "string",
91
93
  ["url"]: "string",
92
94
  ["uuid"]: "string",
@@ -334,8 +336,6 @@ var Email = Schema4.String.pipe(Schema4.pattern(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-
334
336
  }));
335
337
  var Formula = Schema4.String.pipe(FormatAnnotation.set(TypeFormat.Formula));
336
338
  var Hostname = Schema4.String.pipe(FormatAnnotation.set(TypeFormat.Hostname));
337
- var JSON = Schema4.String.pipe(FormatAnnotation.set(TypeFormat.JSON));
338
- var Markdown = Schema4.String.pipe(FormatAnnotation.set(TypeFormat.Markdown));
339
339
  var Regex = Schema4.String.pipe(FormatAnnotation.set(TypeFormat.Regex));
340
340
  var Text = Schema4.String.pipe(FormatAnnotation.set(TypeFormat.Text));
341
341
  var URL = Schema4.String.pipe(Schema4.pattern(/^(\w+?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/i), FormatAnnotation.set(TypeFormat.URL), Schema4.annotations({
@@ -357,8 +357,6 @@ import * as Keys from "@dxos/keys";
357
357
  Format2.Email = Email;
358
358
  Format2.Formula = Formula;
359
359
  Format2.Hostname = Hostname;
360
- Format2.JSON = JSON;
361
- Format2.Markdown = Markdown;
362
360
  Format2.Regex = Regex;
363
361
  Format2.URL = URL;
364
362
  Format2.UUID = Schema5.UUID;
@@ -416,8 +414,6 @@ export {
416
414
  Email,
417
415
  Formula,
418
416
  Hostname,
419
- JSON,
420
- Markdown,
421
417
  Regex,
422
418
  Text,
423
419
  URL,
@@ -425,4 +421,4 @@ export {
425
421
  Format,
426
422
  SelectOption
427
423
  };
428
- //# sourceMappingURL=chunk-TFEWTY5A.mjs.map
424
+ //# sourceMappingURL=chunk-KCBW4BR6.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/internal/Format/types.ts", "../../../src/internal/Format/date.ts", "../../../src/internal/Format/number.ts", "../../../src/internal/Format/object.ts", "../../../src/internal/Format/string.ts", "../../../src/internal/Format/format.ts", "../../../src/internal/Format/select.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Function from 'effect/Function';\nimport type * as JSONSchema from 'effect/JSONSchema';\nimport * as Option from 'effect/Option';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport { createAnnotationHelper } from '../Annotation';\nimport { type JsonSchemaType } from '../JsonSchema';\n\n// TODO(burdon): Rename PropertyType.\nexport type ScalarType =\n | JSONSchema.JsonSchema7Object\n | JSONSchema.JsonSchema7String\n | JSONSchema.JsonSchema7Number\n | JSONSchema.JsonSchema7Boolean\n | JSONSchema.JsonSchema7Ref;\n\n// TODO(burdon): Rename ValueType and change to disciminated union.\n// export type ValueType = 'array' | 'object' | 'string' | 'number' | 'boolean' | 'ref';\nexport enum TypeEnum {\n Array = 'array', // TODO(burdon): Remove?\n Object = 'object',\n String = 'string',\n Number = 'number',\n Boolean = 'boolean',\n Ref = 'ref',\n}\n\n// TODO(burdon): Ref?\nexport const getTypeEnum = (property: JsonSchemaType): TypeEnum | undefined => {\n switch (property.type) {\n case 'array':\n return TypeEnum.Array;\n case 'object':\n return TypeEnum.Object;\n case 'string':\n return TypeEnum.String;\n case 'number':\n return TypeEnum.Number;\n case 'boolean':\n return TypeEnum.Boolean;\n default:\n return undefined;\n }\n};\n\n/**\n * https://json-schema.org/understanding-json-schema/reference/schema\n * https://json-schema.org/understanding-json-schema/reference/string#built-in-formats\n */\nexport const FormatAnnotationId = Symbol.for('@dxos/schema/annotation/Format');\n\nexport const FormatAnnotation = createAnnotationHelper<TypeFormat>(FormatAnnotationId);\n\n/** @deprecated */\nexport const getFormatAnnotation = (node: SchemaAST.AST): TypeFormat | undefined =>\n Function.pipe(SchemaAST.getAnnotation<TypeFormat>(FormatAnnotationId)(node), Option.getOrUndefined);\n\n// TODO(burdon): Rename Format; Change to discriminated union?\nexport enum TypeFormat {\n None = 'none',\n\n //\n // Scalar\n //\n\n String = 'string',\n Number = 'number',\n Boolean = 'boolean',\n Ref = 'ref',\n\n //\n // { type: 'string' }\n //\n\n DID = 'did', // Users, etc.\n DXN = 'dxn',\n Email = 'email',\n Formula = 'formula', // Spreadsheet (Excel, Google Sheets, etc.) formula.\n Hostname = 'hostname',\n JSON = 'json',\n Markdown = 'markdown',\n Password = 'password',\n Regex = 'regex',\n SingleSelect = 'single-select',\n Text = 'text',\n MultiSelect = 'multi-select',\n URL = 'url',\n UUID = 'uuid',\n\n //\n // { type: 'number' }\n //\n\n Currency = 'currency',\n Integer = 'integer',\n Percent = 'percent',\n Timestamp = 'timestamp',\n\n //\n // { type: 'date' }\n //\n\n DateTime = 'date-time',\n Date = 'date',\n Time = 'time',\n Duration = 'duration',\n\n //\n // { type: 'object' }\n //\n\n GeoPoint = 'lnglat',\n}\n\nexport const FormatEnums = Object.values(TypeFormat).sort();\n\nexport const PropertyKind = {\n type: TypeEnum,\n format: TypeFormat,\n};\n\n/**\n * Default formats\n */\nexport const typeToFormat: Partial<Record<TypeEnum, TypeFormat>> = {\n [TypeEnum.String]: TypeFormat.String,\n [TypeEnum.Number]: TypeFormat.Number,\n [TypeEnum.Boolean]: TypeFormat.Boolean,\n};\n\n/**\n * Map of format to type.\n */\nexport const formatToType: Record<TypeFormat, TypeEnum> = {\n [TypeFormat.None]: TypeEnum.String,\n [TypeFormat.String]: TypeEnum.String,\n [TypeFormat.Number]: TypeEnum.Number,\n [TypeFormat.Boolean]: TypeEnum.Boolean,\n [TypeFormat.Ref]: TypeEnum.Ref,\n\n // Strings\n [TypeFormat.DID]: TypeEnum.String,\n [TypeFormat.DXN]: TypeEnum.String,\n [TypeFormat.Email]: TypeEnum.String,\n [TypeFormat.Formula]: TypeEnum.String,\n [TypeFormat.Hostname]: TypeEnum.String,\n [TypeFormat.JSON]: TypeEnum.String,\n [TypeFormat.Markdown]: TypeEnum.String,\n [TypeFormat.Password]: TypeEnum.String,\n [TypeFormat.Regex]: TypeEnum.String,\n [TypeFormat.URL]: TypeEnum.String,\n [TypeFormat.UUID]: TypeEnum.String,\n [TypeFormat.SingleSelect]: TypeEnum.String,\n [TypeFormat.Text]: TypeEnum.String,\n [TypeFormat.MultiSelect]: TypeEnum.Object,\n\n // Dates\n [TypeFormat.Date]: TypeEnum.String,\n [TypeFormat.DateTime]: TypeEnum.String,\n [TypeFormat.Duration]: TypeEnum.String,\n [TypeFormat.Time]: TypeEnum.String,\n\n // Numbers\n [TypeFormat.Currency]: TypeEnum.Number,\n [TypeFormat.Integer]: TypeEnum.Number,\n [TypeFormat.Percent]: TypeEnum.Number,\n [TypeFormat.Timestamp]: TypeEnum.Number,\n\n // Objects\n [TypeFormat.GeoPoint]: TypeEnum.Array,\n};\n\n/**\n * Allowed value options for select.\n */\nexport const OptionsAnnotationId = Symbol.for('@dxos/schema/annotation/Options');\n\n// TODO(wittjosiah): Reconcile with `SelectOption`.\nexport type Options = string | number;\nexport const OptionsAnnotation = createAnnotationHelper<Options[]>(OptionsAnnotationId);\n\n/** @deprecated */\nexport const getOptionsAnnotation = (node: SchemaAST.AST): Options[] | undefined =>\n Function.pipe(SchemaAST.getAnnotation<Options[]>(OptionsAnnotationId)(node), Option.getOrUndefined);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport { FormatAnnotation, TypeFormat } from './types';\n\n/**\n * Datetime values should be stored as ISO strings or unix numbers (ms) in UTC.\n *\n * NOTE: HyperFormula uses Excel's time format (null date 1900/01/01)\n * It can be configured to use a different parser via `parseDateTime`.\n * https://hyperformula.handsontable.com/guide/date-and-time-handling.html#date-and-time-handling\n * https://github.com/handsontable/hyperformula/blob/master/src/DateTimeHelper.ts\n */\n\n// TODO(burdon): Annotations not present in JSON.\n// TODO(burdon): Timezone.\n// TODO(burdon): Format for timestamp (Unix UTC or ISO 8601)?\n// TODO(burdon): Refs\n// - https://www.npmjs.com/package/numfmt\n// - https://date-fns.org/docs/Getting-Started\n// - https://github.com/date-fns/tz\n\n/**\n * Simple date compatible with HF.\n */\nexport const SimpleDate = Schema.Struct({\n year: Schema.Number.pipe(Schema.between(1900, 9999)),\n month: Schema.Number.pipe(Schema.between(1, 12)),\n day: Schema.Number.pipe(Schema.between(1, 31)),\n});\n\nexport type SimpleDate = Schema.Schema.Type<typeof SimpleDate>;\n\nexport const toSimpleDate = (date: Date): SimpleDate => ({\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n});\n\n/**\n * Simple time compatible with HF.\n */\nexport const SimpleTime = Schema.Struct({\n hours: Schema.Number.pipe(Schema.between(0, 23)),\n minutes: Schema.Number.pipe(Schema.between(0, 59)),\n seconds: Schema.Number.pipe(Schema.between(0, 59)),\n});\n\nexport type SimpleTime = Schema.Schema.Type<typeof SimpleTime>;\n\nexport const toSimpleTime = (date: Date): SimpleTime => ({\n hours: date.getUTCHours(),\n minutes: date.getUTCSeconds(),\n seconds: date.getUTCSeconds(),\n});\n\n/**\n * Simple date-time compatible with HF.\n */\nexport const SimpleDateTime = Schema.extend(SimpleDate, SimpleTime);\n\nexport type SimpleDateTime = Schema.Schema.Type<typeof SimpleDateTime>;\n\nexport const toSimpleDateTime = (date: Date): SimpleDateTime => ({\n ...toSimpleDate(date),\n ...toSimpleTime(date),\n});\n\n/**\n * https://effect.website/docs/guides/schema/transformations#date-transformations\n */\n\n// TODO(burdon): Consider if transformations should be supported with Automerge.\n\n/**\n * Format: 2018-11-13\n */\nexport const DateOnly = /* Schema.transformOrFail(Schema.String, SimpleDate, {\n strict: true,\n decode: (str, _, ast) => {\n if (!isValidDateFormat(str)) {\n return ParseResult.fail(new ParseResult.Type(ast, str, 'Expected YYYY-MM-DD format'));\n }\n if (!isValidDate(str)) {\n return ParseResult.fail(new ParseResult.Type(ast, str, 'Invalid date'));\n }\n\n const [year, month, day] = str.split('-').map(Number);\n return ParseResult.succeed({ year, month, day });\n },\n encode: (date) => {\n return ParseResult.succeed(\n [\n date.year.toString().padStart(4, '0'),\n date.month.toString().padStart(2, '0'),\n date.day.toString().padStart(2, '0'),\n ].join('-'),\n );\n },\n}) */ Schema.String.pipe(\n FormatAnnotation.set(TypeFormat.Date),\n Schema.annotations({\n description: 'Valid date in ISO format',\n }),\n);\n\n/**\n * Format: 20:20:39+00:00\n */\nexport const TimeOnly = /* Schema.transformOrFail(Schema.String, SimpleTime, {\n strict: true,\n decode: (str, _, ast) => {\n if (!isValidTimeFormat(str)) {\n return ParseResult.fail(new ParseResult.Type(ast, str, 'Expected HH:mm:ss format'));\n }\n\n const [hours, minutes, seconds] = str.split(':').map(Number);\n return ParseResult.succeed({ hours, minutes, seconds });\n },\n encode: (time) => {\n return ParseResult.succeed(\n [\n time.hours.toString().padStart(2, '0'),\n time.minutes.toString().padStart(2, '0'),\n time.seconds.toString().padStart(2, '0'),\n ].join(':'),\n );\n },\n}) */ Schema.String.pipe(\n FormatAnnotation.set(TypeFormat.Time),\n Schema.annotations({\n description: 'Valid time in ISO format',\n }),\n);\n\n/**\n * Format: 2018-11-13T20:20:39+00:00\n */\nexport const DateTime = /* Schema.transformOrFail(Schema.String, SimpleDateTime, {\n strict: false,\n decode: (str, _, ast) => {\n const [date, time] = str.split('T');\n if (!isValidDateFormat(date)) {\n return ParseResult.fail(new ParseResult.Type(ast, date, 'Expected YYYY-MM-DD format'));\n }\n if (!isValidDate(date)) {\n return ParseResult.fail(new ParseResult.Type(ast, date, 'Invalid date'));\n }\n if (!isValidTimeFormat(time)) {\n return ParseResult.fail(new ParseResult.Type(ast, str, 'Expected HH:mm:ss format'));\n }\n\n const [year, month, day] = date.split('-').map(Number);\n const [hours, minutes, seconds] = time.split(':').map(Number);\n return ParseResult.succeed({ year, month, day, hours, minutes, seconds });\n },\n encode: (datetime) => {\n return ParseResult.succeed(\n [\n [\n datetime.year.toString().padStart(4, '0'),\n datetime.month.toString().padStart(2, '0'),\n datetime.day.toString().padStart(2, '0'),\n ].join('-'),\n [\n datetime.hours.toString().padStart(2, '0'),\n datetime.minutes.toString().padStart(2, '0'),\n datetime.seconds.toString().padStart(2, '0'),\n ].join(':'),\n ].join('T'),\n );\n },\n}) */ Schema.String.pipe(\n FormatAnnotation.set(TypeFormat.DateTime),\n Schema.annotations({\n description: 'Valid date and time in ISO format',\n }),\n);\n\n/**\n * https://datatracker.ietf.org/doc/html/rfc3339#appendix-A\n */\n// TODO(burdon): Define duration type.\nexport const Duration = Schema.String.pipe(\n FormatAnnotation.set(TypeFormat.Duration),\n Schema.annotations({\n description: 'Duration in ISO 8601 format',\n [SchemaAST.ExamplesAnnotationId]: ['1h', '3D'],\n }),\n);\n\n//\n// Utils\n//\n\n// YYYY-MM-DD\nconst DATE_REGEX = /^\\d{4}-\\d{2}-\\d{2}$/;\n\nconst _isValidDateFormat = (str: string) => DATE_REGEX.test(str);\n\nconst _isValidDate = (str: string) => {\n const date = new Date(str);\n return !isNaN(date.getTime()) && date.toISOString().startsWith(str);\n};\n\n// HH:mm:ss\nconst TIME_REGEX = /^([01]\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$/;\n\nconst _isValidTimeFormat = (str: string) => TIME_REGEX.test(str);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { FormatAnnotation, TypeFormat } from './types';\n\nconst encodeMultipleOf = (divisor: number) => 1 / Math.pow(10, divisor);\n\nconst encodeMultiple =\n <A extends number>(divisor?: number) =>\n <I, R>(self: Schema.Schema<A, I, R>) =>\n divisor === undefined || divisor === 0 ? self : self.pipe(Schema.multipleOf(encodeMultipleOf(divisor)));\n\n/**\n * Convert number of digits to multipleOf annotation.\n */\nexport const DecimalPrecision = Schema.transform(Schema.Number, Schema.Number, {\n strict: true,\n encode: (value) => encodeMultipleOf(value),\n decode: (value) => Math.log10(1 / value),\n}).annotations({\n title: 'Number of digits',\n});\n\nexport const CurrencyAnnotationId = Symbol.for('@dxos/schema/annotation/Currency');\n\nexport type CurrencyAnnotation = {\n decimals?: number;\n code?: string;\n};\n\n/**\n * ISO 4217 currency code.\n */\nexport const Currency = ({ decimals, code }: CurrencyAnnotation = { decimals: 2 }) =>\n Schema.Number.pipe(\n encodeMultiple(decimals),\n FormatAnnotation.set(TypeFormat.Currency),\n Schema.annotations({\n title: 'Currency',\n description: 'Currency value',\n ...(code ? { [CurrencyAnnotationId]: code.toUpperCase() } : {}),\n }),\n );\n\nexport type PercentAnnotation = {\n decimals?: number;\n};\n\n/**\n * Integer.\n */\nexport const Integer = () =>\n Schema.Number.pipe(\n Schema.int(),\n FormatAnnotation.set(TypeFormat.Integer),\n Schema.annotations({\n title: 'Integer',\n description: 'Integer value',\n }),\n );\n\n/**\n * Percent.\n */\n// TODO(burdon): Define min/max (e.g., 0, 1).\nexport const Percent = ({ decimals }: PercentAnnotation = { decimals: 2 }) =>\n Schema.Number.pipe(\n encodeMultiple(decimals),\n FormatAnnotation.set(TypeFormat.Percent),\n Schema.annotations({\n title: 'Percent',\n description: 'Percentage value',\n }),\n );\n\n/**\n * Unix timestamp.\n * https://en.wikipedia.org/wiki/Unix_time\n */\nexport const Timestamp = Schema.Number.pipe(\n FormatAnnotation.set(TypeFormat.Timestamp),\n Schema.annotations({\n title: 'Timestamp',\n description: 'Unix timestamp',\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { clamp } from '@dxos/util';\n\nimport { FormatAnnotation, TypeFormat } from './types';\n\n/**\n * GeoJSON Format\n * https://datatracker.ietf.org/doc/html/rfc7946\n * https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1\n * https://en.wikipedia.org/wiki/Geographic_coordinate_system\n * https://geojson.org\n * {\n * \"type\": \"Point\",\n * \"coordinates\": [0, 51.47] // [longitude, latitude]\n * }\n * Note: optional third element for altitude.\n */\n/** Decimal places retained for stored coordinates (~1.1cm at the equator). */\nexport const GEO_PRECISION = 7;\n\nconst roundCoordinate = (value: number): number => {\n const factor = 10 ** GEO_PRECISION;\n return Math.round(value * factor) / factor;\n};\n\n/** Longitude/latitude clamped to range and rounded to {@link GEO_PRECISION} decimal places. */\nconst Coordinate = (min: number, max: number, title: string) =>\n Schema.transform(Schema.Number.pipe(Schema.clamp(min, max)), Schema.Number, {\n strict: true,\n decode: roundCoordinate,\n encode: roundCoordinate,\n }).annotations({ title });\n\nexport const GeoPoint = Schema.Tuple(\n Coordinate(-180, 180, 'Longitude'),\n Coordinate(-90, 90, 'Latitude'),\n Schema.optionalElement(Schema.Number).annotations({\n title: 'Height ASL (m)',\n }),\n).pipe(\n FormatAnnotation.set(TypeFormat.GeoPoint),\n Schema.annotations({\n title: 'GeoPoint',\n description: 'GeoJSON Position',\n }),\n);\n\nexport type GeoPoint = Schema.Schema.Type<typeof GeoPoint>;\n\nexport type GeoLocation = {\n longitude: number;\n latitude: number;\n height?: number;\n};\n\n/**\n * Geolocation utilities for working with GeoPoint format.\n */\nexport namespace GeoLocation {\n /**\n * Convert latitude and longitude to GeoPoint (GeoJSON format [longitude, latitude, height?]).\n * Clamps values to valid ranges: latitude [-90, 90], longitude [-180, 180].\n */\n export const toGeoPoint = ({ longitude, latitude, height }: GeoLocation): GeoPoint => {\n // TODO(ZaymonFC): Use schema validation instead of doing this manually.\n // Clamp + round to match the `Format.GeoPoint` decode/encode path so both produce identical tuples.\n const clampedLongitude = roundCoordinate(clamp(longitude, -180, 180));\n const clampedLatitude = roundCoordinate(clamp(latitude, -90, 90));\n return height !== undefined ? [clampedLongitude, clampedLatitude, height] : [clampedLongitude, clampedLatitude];\n };\n\n /**\n * Extract latitude and longitude from GeoPoint (GeoJSON format [longitude, latitude, height?]).\n */\n export const fromGeoPoint = (geoPoint: GeoPoint | undefined): GeoLocation => {\n if (!geoPoint) {\n return { longitude: 0, latitude: 0 };\n }\n\n const result: GeoLocation = {\n longitude: geoPoint[0],\n latitude: geoPoint[1],\n };\n\n // Add height if defined.\n if (geoPoint[2] !== undefined) {\n result.height = geoPoint[2];\n }\n\n return result;\n };\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport { FormatAnnotation, TypeFormat } from './types';\n\n/**\n * Email address (RFC 5321)\n * https://datatracker.ietf.org/doc/html/rfc5321#section-4.1.2\n */\nexport const Email = Schema.String.pipe(\n Schema.pattern(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/),\n FormatAnnotation.set(TypeFormat.Email),\n Schema.annotations({\n title: 'Email',\n description: 'Email address',\n }),\n);\n\n/**\n *\n */\n// TODO(burdon): Implement.\nexport const Formula = Schema.String.pipe(FormatAnnotation.set(TypeFormat.Formula));\n\n/**\n *\n */\n// TODO(burdon): Implement.\nexport const Hostname = Schema.String.pipe(FormatAnnotation.set(TypeFormat.Hostname));\n\n/**\n * Regex\n * https://json-schema.org/understanding-json-schema/reference/regular_expressions\n * https://ecma-international.org/publications-and-standards/standards/ecma-262\n */\n// TODO(burdon): Implement.\nexport const Regex = Schema.String.pipe(FormatAnnotation.set(TypeFormat.Regex));\n\n/**\n * Multi-line text.\n */\nexport const Text = Schema.String.pipe(FormatAnnotation.set(TypeFormat.Text));\n\n/**\n * https://datatracker.ietf.org/doc/html/rfc3986#section-1.1.3\n */\nexport const URL = Schema.String.pipe(\n Schema.pattern(/^(\\w+?:\\/\\/)?([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w .-]*)*\\/?$/i),\n FormatAnnotation.set(TypeFormat.URL),\n Schema.annotations({\n title: 'URL',\n description: 'URL',\n }),\n);\n\n/**\n * UUID (RFC 4122)\n * https://datatracker.ietf.org/doc/html/rfc4122\n */\nexport const UUID = Schema.UUID.pipe(\n FormatAnnotation.set(TypeFormat.UUID),\n Schema.annotations({\n [SchemaAST.ExamplesAnnotationId]: ['3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a'],\n }),\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport * as Keys from '@dxos/keys';\n\nimport * as DateUtil from './date';\nimport * as NumberUtil from './number';\nimport * as ObjectUtil from './object';\nimport * as StringUtil from './string';\nimport { TypeFormat as TypeFormat$ } from './types';\n\n// TODO(burdon): Media encoding.\n// - https://json-schema.org/understanding-json-schema/reference/non_json_data\n\n/**\n * Formats.\n * https://json-schema.org/understanding-json-schema/reference/string#built-in-formats\n * NOTE: A JSON Schema validator will ignore any format type that it does not understand.\n */\n// TODO(burdon): Add fields for `examples`, `message`, etc.\nexport namespace Format {\n export import TypeFormat = TypeFormat$;\n\n // String\n export const DXN = Keys.DXN.Schema;\n export const Email = StringUtil.Email;\n export const Formula = StringUtil.Formula;\n export const Hostname = StringUtil.Hostname;\n export const Regex = StringUtil.Regex;\n export const URL = StringUtil.URL;\n export const UUID = Schema.UUID;\n\n // Numbers\n // TODO(burdon): BigInt.\n export const Currency = NumberUtil.Currency;\n export const Integer = NumberUtil.Integer;\n export const Percent = NumberUtil.Percent;\n export const Timestamp = NumberUtil.Timestamp;\n\n // Dates and times\n export const Date = DateUtil.DateOnly;\n export const DateTime = DateUtil.DateTime;\n export const Duration = DateUtil.Duration;\n export const Time = DateUtil.TimeOnly;\n\n // Objects\n export const GeoPoint = ObjectUtil.GeoPoint;\n export type GeoPoint = ObjectUtil.GeoPoint; // TODO(burdon): Export types.\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\n/**\n * Schema for a single select option. Used to define choices in a {single|multi}-select field.\n */\nexport const SelectOption = Schema.Struct({\n /** Stable identifier for the option. */\n id: Schema.NonEmptyString,\n title: Schema.String,\n /** Color palette used for visual styling. */\n color: Schema.String,\n});\n\nexport type SelectOption = Schema.Schema.Type<typeof SelectOption>;\n"],
5
+ "mappings": ";;;;;AAIA,YAAYA,cAAc;AAE1B,YAAYC,YAAY;AACxB,YAAYC,eAAe;AAepB,IAAKC,WAAAA,0BAAAA,WAAAA;;;;;;;SAAAA;;AAUL,IAAMC,cAAc,CAACC,aAAAA;AAC1B,UAAQA,SAASC,MAAI;IACnB,KAAK;AACH,aAAA;IACF,KAAK;AACH,aAAA;IACF,KAAK;AACH,aAAA;IACF,KAAK;AACH,aAAA;IACF,KAAK;AACH,aAAA;IACF;AACE,aAAOC;EACX;AACF;AAMO,IAAMC,qBAAqBC,uBAAOC,IAAI,gCAAA;AAEtC,IAAMC,mBAAmBC,uBAAmCJ,kBAAAA;AAG5D,IAAMK,sBAAsB,CAACC,SACzBC,cAAeC,wBAA0BR,kBAAAA,EAAoBM,IAAAA,GAAcG,qBAAc;AAG7F,IAAKC,aAAAA,0BAAAA,aAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAAA;;AAwDL,IAAMC,cAAcC,OAAOC,OAAOH,UAAAA,EAAYI,KAAI;AAElD,IAAMC,eAAe;EAC1BjB,MAAMH;EACNqB,QAAQN;AACV;AAKO,IAAMO,eAAsD;EACjE,CAAA,QAAA,GAAiB;EACjB,CAAA,QAAA,GAAiB;EACjB,CAAA,SAAA,GAAkB;AACpB;AAKO,IAAMC,eAA6C;EACxD,CAAA,MAAA,GAAiB;EACjB,CAAA,Q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,KAAK,GAC9BO,oBAAY;EACjBC,OAAO;EACPC,aAAa;AACf,CAAA,CAAA;AAOK,IAAMC,UAAiBT,eAAOC,KAAKE,iBAAiBC,IAAIC,WAAWI,OAAO,CAAA;AAM1E,IAAMC,WAAkBV,eAAOC,KAAKE,iBAAiBC,IAAIC,WAAWK,QAAQ,CAAA;AAQ5E,IAAMC,QAAeX,eAAOC,KAAKE,iBAAiBC,IAAIC,WAAWM,KAAK,CAAA;AAKtE,IAAMC,OAAcZ,eAAOC,KAAKE,iBAAiBC,IAAIC,WAAWO,IAAI,CAAA;AAKpE,IAAMC,MAAab,eAAOC,KACxBC,gBAAQ,2DAAA,GACfC,iBAAiBC,IAAIC,WAAWQ,GAAG,GAC5BP,oBAAY;EACjBC,OAAO;EACPC,aAAa;AACf,CAAA,CAAA;AAOK,IAAMM,QAAcA,aAAKb,KAC9BE,iBAAiBC,IAAIC,WAAWS,IAAI,GAC7BR,oBAAY;EACjB,CAAWS,+BAAoB,GAAG;IAAC;;AACrC,CAAA,CAAA;;;AC/DF,YAAYC,aAAY;AAExB,YAAYC,UAAU;UAiBLC,SAAAA;UACDC,aAAa;UAGdC,MAAWA,SAAIC;UACfC,QAAmBA;UACnBC,UAAqBA;UACrBC,WAAsBA;UACtBC,QAAmBA;UACnBC,MAAiBA;UACjBC,OAAcA;UAIdC,WAAsBA;UACtBC,UAAqBA;UACrBC,UAAqBA;UACrBC,YAAuBA;UAGvBC,OAAgBC;UAChBC,WAAoBA;UACpBC,WAAoBA;UACpBC,OAAgBC;UAGhBC,WAAsBA;AAErC,GA5BiBpB,WAAAA,SAAAA,CAAAA,EAAAA;;;;ACnBjB,YAAYqB,aAAY;AAKjB,IAAMC,eAAsBC,eAAO;;EAExCC,IAAWC;EACXC,OAAcC;;EAEdC,OAAcD;AAChB,CAAA;",
6
+ "names": ["Function", "Option", "SchemaAST", "TypeEnum", "getTypeEnum", "property", "type", "undefined", "FormatAnnotationId", "Symbol", "for", "FormatAnnotation", "createAnnotationHelper", "getFormatAnnotation", "node", "pipe", "getAnnotation", "getOrUndefined", "TypeFormat", "FormatEnums", "Object", "values", "sort", "PropertyKind", "format", "typeToFormat", "formatToType", "OptionsAnnotationId", "OptionsAnnotation", "getOptionsAnnotation", "Schema", "SchemaAST", "SimpleDate", "Struct", "year", "Number", "pipe", "between", "month", "day", "toSimpleDate", "date", "getUTCFullYear", "getUTCMonth", "getUTCDate", "SimpleTime", "hours", "minutes", "seconds", "toSimpleTime", "getUTCHours", "getUTCSeconds", "SimpleDateTime", "extend", "toSimpleDateTime", "DateOnly", "String", "FormatAnnotation", "set", "TypeFormat", "Date", "annotations", "description", "TimeOnly", "Time", "DateTime", "Duration", "ExamplesAnnotationId", "Schema", "encodeMultipleOf", "divisor", "Math", "pow", "encodeMultiple", "self", "undefined", "pipe", "multipleOf", "DecimalPrecision", "transform", "Number", "strict", "encode", "value", "decode", "log10", "annotations", "title", "CurrencyAnnotationId", "Symbol", "for", "Currency", "decimals", "code", "FormatAnnotation", "set", "TypeFormat", "description", "toUpperCase", "Integer", "int", "Percent", "Timestamp", "Schema", "clamp", "GEO_PRECISION", "roundCoordinate", "value", "factor", "Math", "round", "Coordinate", "min", "max", "title", "transform", "Number", "pipe", "clamp", "strict", "decode", "encode", "annotations", "GeoPoint", "Tuple", "optionalElement", "FormatAnnotation", "set", "TypeFormat", "description", "GeoLocation", "toGeoPoint", "longitude", "latitude", "height", "clampedLongitude", "clampedLatitude", "undefined", "fromGeoPoint", "geoPoint", "result", "Schema", "SchemaAST", "Email", "String", "pipe", "pattern", "FormatAnnotation", "set", "TypeFormat", "annotations", "title", "description", "Formula", "Hostname", "Regex", "Text", "URL", "UUID", "ExamplesAnnotationId", "Schema", "Keys", "Format", "TypeFormat", "DXN", "Schema", "Email", "Formula", "Hostname", "Regex", "URL", "UUID", "Currency", "Integer", "Percent", "Timestamp", "Date", "DateOnly", "DateTime", "Duration", "Time", "TimeOnly", "GeoPoint", "Schema", "SelectOption", "Struct", "id", "NonEmptyString", "title", "String", "color"]
7
+ }