@dxos/echo 0.8.4-staging.ac66bdf99f → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/README.md +7 -7
- package/dist/lib/neutral/Annotation.mjs +37 -6
- package/dist/lib/neutral/Database.mjs +6 -17
- package/dist/lib/neutral/Entity.mjs +31 -20
- package/dist/lib/neutral/Err.mjs +3 -3
- package/dist/lib/neutral/Feed.mjs +23 -19
- package/dist/lib/neutral/Filter.mjs +13 -15
- package/dist/lib/neutral/Format.mjs +23 -3
- package/dist/lib/neutral/JsonSchema.mjs +7 -8
- package/dist/lib/neutral/Key.mjs +9 -5
- package/dist/lib/neutral/Migration.mjs +11 -10
- package/dist/lib/neutral/Obj.mjs +29 -20
- package/dist/lib/neutral/Order.mjs +7 -3
- package/dist/lib/neutral/Query.mjs +17 -17
- package/dist/lib/neutral/QueryResult.mjs +1 -1
- package/dist/lib/neutral/Ref.mjs +10 -9
- package/dist/lib/neutral/Registry.mjs +14 -0
- package/dist/lib/neutral/Relation.mjs +28 -25
- package/dist/lib/neutral/Scope.mjs +12 -0
- package/dist/lib/neutral/Tag.mjs +17 -14
- package/dist/lib/neutral/Type.mjs +54 -26
- package/dist/lib/neutral/{chunk-OMUPQMLR.mjs → chunk-35INCYOE.mjs} +1 -1
- package/dist/lib/neutral/chunk-35INCYOE.mjs.map +7 -0
- package/dist/lib/neutral/chunk-3PBP4V4O.mjs +101 -0
- package/dist/lib/neutral/chunk-3PBP4V4O.mjs.map +7 -0
- package/dist/lib/neutral/chunk-4ZUHOTCG.mjs +184 -0
- package/dist/lib/neutral/chunk-4ZUHOTCG.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5SMDBFVB.mjs +108 -0
- package/dist/lib/neutral/chunk-5SMDBFVB.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-OS35K56T.mjs → chunk-5SUJPHAE.mjs} +3 -3
- package/dist/lib/neutral/{chunk-OS35K56T.mjs.map → chunk-5SUJPHAE.mjs.map} +2 -2
- package/dist/lib/neutral/{chunk-GZQTCRJB.mjs → chunk-6M2Z6WBH.mjs} +22 -2
- package/dist/lib/neutral/chunk-6M2Z6WBH.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-V36VO5SS.mjs → chunk-6YDI3J37.mjs} +32 -40
- package/dist/lib/neutral/chunk-6YDI3J37.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-MOR5ERFM.mjs → chunk-7FPIAJIV.mjs} +701 -1256
- package/dist/lib/neutral/chunk-7FPIAJIV.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ANHVGJI4.mjs → chunk-7LOUAPYZ.mjs} +9 -5
- package/dist/lib/neutral/chunk-7LOUAPYZ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-JUXPFOEI.mjs → chunk-7PI7C4EF.mjs} +48 -88
- package/dist/lib/neutral/chunk-7PI7C4EF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-UBEZSGXY.mjs → chunk-BBFJWWAV.mjs} +6 -6
- package/dist/lib/neutral/chunk-BBFJWWAV.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-UI6MWK5W.mjs → chunk-EVK6XBXO.mjs} +16 -2
- package/dist/lib/neutral/chunk-EVK6XBXO.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-7RO7CPBZ.mjs → chunk-IGK6FN65.mjs} +2 -2
- package/dist/lib/neutral/{chunk-HBUZJNZO.mjs → chunk-LWXVKPPW.mjs} +94 -99
- package/dist/lib/neutral/chunk-LWXVKPPW.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-BVOFLCVF.mjs → chunk-MZ7K3MLL.mjs} +9 -6
- package/dist/lib/neutral/chunk-MZ7K3MLL.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-TBKX6JQO.mjs → chunk-O6BH7EPN.mjs} +30 -3
- package/dist/lib/neutral/chunk-O6BH7EPN.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-EAMSSLZC.mjs → chunk-QQIYS74I.mjs} +83 -46
- package/dist/lib/neutral/chunk-QQIYS74I.mjs.map +7 -0
- package/dist/lib/neutral/chunk-R5W6DXR4.mjs +678 -0
- package/dist/lib/neutral/chunk-R5W6DXR4.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-WAK4DMFV.mjs → chunk-RIVWNMSF.mjs} +12 -7
- package/dist/lib/neutral/chunk-RIVWNMSF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-T6W2LEZU.mjs → chunk-SBVFRTST.mjs} +73 -38
- package/dist/lib/neutral/chunk-SBVFRTST.mjs.map +7 -0
- package/dist/lib/neutral/chunk-T6E37YIP.mjs +251 -0
- package/dist/lib/neutral/chunk-T6E37YIP.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-DQYLD2RB.mjs → chunk-TFEWTY5A.mjs} +155 -129
- package/dist/lib/neutral/chunk-TFEWTY5A.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-B4BASU6W.mjs → chunk-TYGKCRMK.mjs} +85 -76
- package/dist/lib/neutral/chunk-TYGKCRMK.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-4OIBYSXE.mjs → chunk-UUP46KUQ.mjs} +78 -32
- package/dist/lib/neutral/chunk-UUP46KUQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WISOH2XH.mjs +36 -0
- package/dist/lib/neutral/chunk-WISOH2XH.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-G3IQMKF7.mjs → chunk-WTQJHC75.mjs} +111 -112
- package/dist/lib/neutral/chunk-WTQJHC75.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WU3GIANS.mjs +31 -0
- package/dist/lib/neutral/chunk-WU3GIANS.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-TU3GW67D.mjs → chunk-ZGNNFYHS.mjs} +40 -40
- package/dist/lib/neutral/chunk-ZGNNFYHS.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +47 -41
- package/dist/lib/neutral/internal/index.mjs +137 -72
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/testing/index.mjs +261 -178
- package/dist/lib/neutral/testing/index.mjs.map +4 -4
- package/dist/types/src/Annotation.d.ts +108 -4
- package/dist/types/src/Annotation.d.ts.map +1 -1
- package/dist/types/src/Annotation.test.d.ts +2 -0
- package/dist/types/src/Annotation.test.d.ts.map +1 -0
- package/dist/types/src/Collection.d.ts +2 -3
- package/dist/types/src/Collection.d.ts.map +1 -1
- package/dist/types/src/Database.d.ts +56 -49
- package/dist/types/src/Database.d.ts.map +1 -1
- package/dist/types/src/Dataset.d.ts +16 -6
- package/dist/types/src/Dataset.d.ts.map +1 -1
- package/dist/types/src/Entity.d.ts +101 -28
- package/dist/types/src/Entity.d.ts.map +1 -1
- package/dist/types/src/Err.d.ts +27 -27
- package/dist/types/src/Err.d.ts.map +1 -1
- package/dist/types/src/Feed.d.ts +66 -19
- package/dist/types/src/Feed.d.ts.map +1 -1
- package/dist/types/src/Filter.d.ts +38 -12
- package/dist/types/src/Filter.d.ts.map +1 -1
- package/dist/types/src/Format.d.ts +0 -2
- package/dist/types/src/Format.d.ts.map +1 -1
- package/dist/types/src/Hypergraph.d.ts +14 -9
- package/dist/types/src/Hypergraph.d.ts.map +1 -1
- package/dist/types/src/Json.d.ts +33 -0
- package/dist/types/src/Json.d.ts.map +1 -0
- package/dist/types/src/Json.test.d.ts +2 -0
- package/dist/types/src/Json.test.d.ts.map +1 -0
- package/dist/types/src/JsonSchema.d.ts +2 -2
- package/dist/types/src/JsonSchema.d.ts.map +1 -1
- package/dist/types/src/Key.d.ts +1 -1
- package/dist/types/src/Key.d.ts.map +1 -1
- package/dist/types/src/Migration.d.ts +26 -11
- package/dist/types/src/Migration.d.ts.map +1 -1
- package/dist/types/src/Obj.d.ts +104 -61
- package/dist/types/src/Obj.d.ts.map +1 -1
- package/dist/types/src/Order.d.ts +10 -0
- package/dist/types/src/Order.d.ts.map +1 -1
- package/dist/types/src/Query.d.ts +34 -12
- package/dist/types/src/Query.d.ts.map +1 -1
- package/dist/types/src/QueryResult.d.ts +21 -0
- package/dist/types/src/QueryResult.d.ts.map +1 -1
- package/dist/types/src/Ref.d.ts +15 -7
- package/dist/types/src/Ref.d.ts.map +1 -1
- package/dist/types/src/Registry.d.ts +131 -0
- package/dist/types/src/Registry.d.ts.map +1 -0
- package/dist/types/src/Relation.d.ts +73 -41
- package/dist/types/src/Relation.d.ts.map +1 -1
- package/dist/types/src/Scope.d.ts +35 -0
- package/dist/types/src/Scope.d.ts.map +1 -0
- package/dist/types/src/Tag.d.ts +21 -5
- package/dist/types/src/Tag.d.ts.map +1 -1
- package/dist/types/src/Type.d.ts +362 -95
- package/dist/types/src/Type.d.ts.map +1 -1
- package/dist/types/src/View.d.ts +9 -12
- package/dist/types/src/View.d.ts.map +1 -1
- package/dist/types/src/exemplars.test.d.ts +2 -0
- package/dist/types/src/exemplars.test.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/internal/Annotation/annotations.d.ts +79 -38
- package/dist/types/src/internal/Annotation/annotations.d.ts.map +1 -1
- package/dist/types/src/internal/Annotation/dictionary.d.ts +24 -0
- package/dist/types/src/internal/Annotation/dictionary.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/entity-dictionary.d.ts +14 -0
- package/dist/types/src/internal/Annotation/entity-dictionary.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/index.d.ts +4 -2
- package/dist/types/src/internal/Annotation/index.d.ts.map +1 -1
- package/dist/types/src/internal/Annotation/sorting.d.ts.map +1 -1
- package/dist/types/src/internal/Annotation/util.d.ts +14 -5
- package/dist/types/src/internal/Annotation/util.d.ts.map +1 -1
- package/dist/types/src/internal/Entity/api.d.ts +17 -3
- package/dist/types/src/internal/Entity/api.d.ts.map +1 -1
- package/dist/types/src/internal/Entity/entity.d.ts +72 -8
- package/dist/types/src/internal/Entity/entity.d.ts.map +1 -1
- package/dist/types/src/internal/Entity/guard.d.ts +10 -0
- package/dist/types/src/internal/Entity/guard.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/index.d.ts +2 -0
- package/dist/types/src/internal/Entity/index.d.ts.map +1 -1
- package/dist/types/src/internal/Entity/model.d.ts +21 -17
- package/dist/types/src/internal/Entity/model.d.ts.map +1 -1
- package/dist/types/src/internal/Entity/object.d.ts +3 -3
- package/dist/types/src/internal/Entity/object.d.ts.map +1 -1
- package/dist/types/src/internal/Entity/relation.d.ts +30 -7
- package/dist/types/src/internal/Entity/relation.d.ts.map +1 -1
- package/dist/types/src/internal/Entity/type-kind.d.ts +24 -0
- package/dist/types/src/internal/Entity/type-kind.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/type-uri.d.ts +24 -0
- package/dist/types/src/internal/Entity/type-uri.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/version.d.ts.map +1 -1
- package/dist/types/src/internal/Format/date.d.ts.map +1 -1
- package/dist/types/src/internal/Format/format.d.ts +3 -2
- package/dist/types/src/internal/Format/format.d.ts.map +1 -1
- package/dist/types/src/internal/Format/index.d.ts +2 -2
- package/dist/types/src/internal/Format/index.d.ts.map +1 -1
- package/dist/types/src/internal/Format/number.d.ts.map +1 -1
- package/dist/types/src/internal/Format/object.d.ts +3 -1
- package/dist/types/src/internal/Format/object.d.ts.map +1 -1
- package/dist/types/src/internal/Format/types.d.ts.map +1 -1
- package/dist/types/src/internal/JsonSchema/json-schema-normalize.d.ts.map +1 -1
- package/dist/types/src/internal/JsonSchema/json-schema-type.d.ts +34 -34
- package/dist/types/src/internal/JsonSchema/json-schema-type.d.ts.map +1 -1
- package/dist/types/src/internal/JsonSchema/json-schema.d.ts +3 -2
- package/dist/types/src/internal/JsonSchema/json-schema.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/atoms.d.ts +38 -0
- package/dist/types/src/internal/Obj/atoms.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/clone.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/common.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/create-object.d.ts +12 -12
- package/dist/types/src/internal/Obj/create-object.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/deleted.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/index.d.ts +1 -1
- package/dist/types/src/internal/Obj/index.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/json-serializer.d.ts +8 -8
- package/dist/types/src/internal/Obj/json-serializer.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/set-value.d.ts +1 -1
- package/dist/types/src/internal/Obj/set-value.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/snapshot.d.ts.map +1 -1
- package/dist/types/src/internal/Obj/typed-object.d.ts +1 -1
- package/dist/types/src/internal/Query/index.d.ts +2 -0
- package/dist/types/src/internal/Query/index.d.ts.map +1 -0
- package/dist/types/src/internal/{Query.d.ts → Query/pretty.d.ts} +1 -1
- package/dist/types/src/internal/Query/pretty.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/atoms.d.ts +10 -0
- package/dist/types/src/internal/Ref/atoms.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/ref-array.d.ts +2 -2
- package/dist/types/src/internal/Ref/ref.d.ts +50 -19
- package/dist/types/src/internal/Ref/ref.d.ts.map +1 -1
- package/dist/types/src/internal/Ref/utils.d.ts +8 -0
- package/dist/types/src/internal/Ref/utils.d.ts.map +1 -0
- package/dist/types/src/internal/Type/compose.d.ts.map +1 -1
- package/dist/types/src/internal/Type/index.d.ts +1 -2
- package/dist/types/src/internal/Type/index.d.ts.map +1 -1
- package/dist/types/src/internal/Type/manipulation.d.ts +0 -1
- package/dist/types/src/internal/Type/manipulation.d.ts.map +1 -1
- package/dist/types/src/internal/Type/type-schema.d.ts +52 -0
- package/dist/types/src/internal/Type/type-schema.d.ts.map +1 -0
- package/dist/types/src/internal/common/api/meta.d.ts +14 -11
- package/dist/types/src/internal/common/api/meta.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/change-context.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/change-context.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/define-hidden-property.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/errors.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/errors.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/event-batch.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/json-serializer.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/make-object.d.ts +11 -5
- package/dist/types/src/internal/common/proxy/make-object.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/ownership.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/proxy-utils.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/reactive-array.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/reactive.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/reactive.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/reactive.test.d.ts +2 -0
- package/dist/types/src/internal/common/proxy/reactive.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/schema-validator.d.ts.map +1 -1
- package/dist/types/src/internal/common/proxy/typed-handler.d.ts +18 -2
- package/dist/types/src/internal/common/proxy/typed-handler.d.ts.map +1 -1
- package/dist/types/src/internal/common/types/base.d.ts +4 -4
- package/dist/types/src/internal/common/types/base.d.ts.map +1 -1
- package/dist/types/src/internal/common/types/entity.d.ts +62 -5
- package/dist/types/src/internal/common/types/entity.d.ts.map +1 -1
- package/dist/types/src/internal/common/types/index.d.ts +1 -1
- package/dist/types/src/internal/common/types/index.d.ts.map +1 -1
- package/dist/types/src/internal/common/types/meta.d.ts +33 -12
- package/dist/types/src/internal/common/types/meta.d.ts.map +1 -1
- package/dist/types/src/internal/common/types/model-symbols.d.ts +15 -4
- package/dist/types/src/internal/common/types/model-symbols.d.ts.map +1 -1
- package/dist/types/src/internal/common/types/typename.d.ts +7 -0
- package/dist/types/src/internal/common/types/typename.d.ts.map +1 -1
- package/dist/types/src/internal/common/types/version.d.ts +1 -1
- package/dist/types/src/internal/common/types/well-known-types.d.ts +11 -0
- package/dist/types/src/internal/common/types/well-known-types.d.ts.map +1 -0
- package/dist/types/src/internal/index.d.ts +2 -2
- package/dist/types/src/internal/index.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/registry.d.ts +9 -0
- package/dist/types/src/testing/registry.d.ts.map +1 -0
- package/dist/types/src/testing/test-data.d.ts +8 -8
- package/dist/types/src/testing/test-data.d.ts.map +1 -1
- package/dist/types/src/testing/test-schema.d.ts +83 -89
- package/dist/types/src/testing/test-schema.d.ts.map +1 -1
- package/dist/types/src/testing/util.d.ts +5 -3
- package/dist/types/src/testing/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -24
- package/src/Annotation.test.ts +439 -0
- package/src/Annotation.ts +158 -4
- package/src/Collection.ts +5 -9
- package/src/Database.ts +93 -100
- package/src/Dataset.ts +10 -2
- package/src/Entity.test.ts +116 -6
- package/src/Entity.ts +134 -32
- package/src/Err.ts +4 -4
- package/src/Feed.ts +92 -44
- package/src/Filter.ts +70 -40
- package/src/Format.ts +0 -4
- package/src/Hypergraph.ts +14 -9
- package/src/Json.test.ts +175 -0
- package/src/Json.ts +103 -0
- package/src/Key.ts +1 -1
- package/src/Migration.ts +39 -19
- package/src/Obj.test.ts +122 -20
- package/src/Obj.ts +168 -91
- package/src/Order.ts +22 -0
- package/src/Query.test.ts +183 -154
- package/src/Query.ts +172 -85
- package/src/QueryResult.ts +26 -0
- package/src/Ref.ts +22 -4
- package/src/Registry.ts +155 -0
- package/src/Relation.test.ts +10 -10
- package/src/Relation.ts +116 -69
- package/src/Scope.ts +50 -0
- package/src/Tag.md +88 -0
- package/src/Tag.ts +49 -6
- package/src/Type.test.ts +223 -18
- package/src/Type.ts +609 -131
- package/src/View.ts +14 -23
- package/src/exemplars.test.ts +21 -0
- package/src/index.ts +4 -4
- package/src/internal/Annotation/annotations.test.ts +31 -11
- package/src/internal/Annotation/annotations.ts +143 -111
- package/src/internal/Annotation/dictionary.ts +47 -0
- package/src/internal/Annotation/entity-dictionary.ts +74 -0
- package/src/internal/Annotation/index.ts +4 -2
- package/src/internal/Annotation/util.ts +17 -8
- package/src/internal/Entity/api.ts +54 -7
- package/src/internal/Entity/entity.ts +196 -47
- package/src/internal/Entity/guard.ts +26 -0
- package/src/internal/Entity/index.ts +2 -0
- package/src/internal/Entity/model.ts +38 -28
- package/src/internal/Entity/object.ts +21 -5
- package/src/internal/Entity/relation.ts +68 -34
- package/src/internal/Entity/type-kind.ts +75 -0
- package/src/internal/Entity/type-uri.ts +92 -0
- package/src/internal/Entity/util.ts +9 -9
- package/src/internal/Format/date.ts +0 -4
- package/src/internal/Format/format.test.ts +21 -0
- package/src/internal/Format/index.ts +2 -3
- package/src/internal/Format/object.ts +21 -4
- package/src/internal/Format/types.ts +1 -1
- package/src/internal/JsonSchema/annotations.ts +1 -1
- package/src/internal/JsonSchema/json-schema-type.ts +4 -4
- package/src/internal/JsonSchema/json-schema.test.ts +71 -145
- package/src/internal/JsonSchema/json-schema.ts +49 -35
- package/src/internal/Obj/atoms.ts +244 -0
- package/src/internal/Obj/clone.ts +9 -4
- package/src/internal/Obj/create-object.test.ts +12 -10
- package/src/internal/Obj/create-object.ts +68 -22
- package/src/internal/Obj/index.ts +1 -1
- package/src/internal/Obj/inspect.ts +5 -3
- package/src/internal/Obj/json-serializer.test.ts +101 -22
- package/src/internal/Obj/json-serializer.ts +89 -33
- package/src/internal/Obj/set-value.test.ts +22 -45
- package/src/internal/Obj/set-value.ts +12 -19
- package/src/internal/Obj/snapshot.ts +13 -4
- package/src/internal/Obj/typed-object.test.ts +9 -11
- package/src/internal/Obj/typed-object.ts +1 -1
- package/src/internal/Query/index.ts +5 -0
- package/src/internal/{Query.ts → Query/pretty.ts} +40 -12
- package/src/internal/Ref/atoms.ts +20 -0
- package/src/internal/Ref/ref-array.ts +3 -3
- package/src/internal/Ref/ref.test.ts +18 -27
- package/src/internal/Ref/ref.ts +137 -59
- package/src/internal/Ref/utils.ts +45 -0
- package/src/internal/Type/compose.test.ts +3 -1
- package/src/internal/Type/index.ts +1 -2
- package/src/internal/Type/manipulation.ts +0 -25
- package/src/internal/Type/type-schema.ts +60 -0
- package/src/internal/common/README.md +2 -2
- package/src/internal/common/api/meta.ts +19 -17
- package/src/internal/common/proxy/change-context.ts +1 -1
- package/src/internal/common/proxy/change.test.ts +91 -83
- package/src/internal/common/proxy/errors.ts +2 -2
- package/src/internal/common/proxy/handler.test.ts +1 -1
- package/src/internal/common/proxy/json-serializer.ts +27 -16
- package/src/internal/common/proxy/make-object.ts +44 -20
- package/src/internal/common/proxy/ownership.ts +2 -2
- package/src/internal/common/proxy/reactive-array.ts +1 -1
- package/src/internal/common/proxy/reactive.test.ts +54 -0
- package/src/internal/common/proxy/reactive.ts +11 -2
- package/src/internal/common/proxy/schema.test.ts +48 -86
- package/src/internal/common/proxy/typed-handler.test.ts +12 -11
- package/src/internal/common/proxy/typed-handler.ts +78 -16
- package/src/internal/common/proxy/typed-object.test.ts +16 -28
- package/src/internal/common/types/base.ts +4 -4
- package/src/internal/common/types/entity.ts +80 -1
- package/src/internal/common/types/index.ts +6 -1
- package/src/internal/common/types/meta.ts +62 -20
- package/src/internal/common/types/model-symbols.ts +24 -4
- package/src/internal/common/types/typename.ts +39 -3
- package/src/internal/common/types/well-known-types.ts +15 -0
- package/src/internal/index.ts +6 -4
- package/src/testing/api.test.ts +15 -9
- package/src/testing/index.ts +1 -0
- package/src/testing/registry.ts +44 -0
- package/src/testing/test-data.ts +159 -99
- package/src/testing/test-schema.ts +22 -58
- package/src/testing/util.ts +14 -11
- package/dist/lib/neutral/Extension.mjs +0 -18
- package/dist/lib/neutral/SchemaRegistry.mjs +0 -2
- package/dist/lib/neutral/chunk-2KHZ36F5.mjs +0 -361
- package/dist/lib/neutral/chunk-2KHZ36F5.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4OIBYSXE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4P3IXBLT.mjs +0 -45
- package/dist/lib/neutral/chunk-4P3IXBLT.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ANHVGJI4.mjs.map +0 -7
- package/dist/lib/neutral/chunk-B4BASU6W.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BNCCGLJN.mjs +0 -7
- package/dist/lib/neutral/chunk-BNCCGLJN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-BVOFLCVF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DQYLD2RB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EAMSSLZC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-G3IQMKF7.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GZQTCRJB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-HBUZJNZO.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JUXPFOEI.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MOR5ERFM.mjs.map +0 -7
- package/dist/lib/neutral/chunk-OMUPQMLR.mjs.map +0 -7
- package/dist/lib/neutral/chunk-PHU22NLC.mjs +0 -136
- package/dist/lib/neutral/chunk-PHU22NLC.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ROG4RXXL.mjs +0 -97
- package/dist/lib/neutral/chunk-ROG4RXXL.mjs.map +0 -7
- package/dist/lib/neutral/chunk-T6W2LEZU.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TBKX6JQO.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TU3GW67D.mjs.map +0 -7
- package/dist/lib/neutral/chunk-UBEZSGXY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-UI6MWK5W.mjs.map +0 -7
- package/dist/lib/neutral/chunk-V36VO5SS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-WAK4DMFV.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YAHXAYOW.mjs +0 -56
- package/dist/lib/neutral/chunk-YAHXAYOW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-YS6Q3XAD.mjs +0 -50
- package/dist/lib/neutral/chunk-YS6Q3XAD.mjs.map +0 -7
- package/dist/types/src/Extension.d.ts +0 -80
- package/dist/types/src/Extension.d.ts.map +0 -1
- package/dist/types/src/Extension.test.d.ts +0 -2
- package/dist/types/src/Extension.test.d.ts.map +0 -1
- package/dist/types/src/SchemaRegistry.d.ts +0 -84
- package/dist/types/src/SchemaRegistry.d.ts.map +0 -1
- package/dist/types/src/internal/Obj/ids.d.ts +0 -6
- package/dist/types/src/internal/Obj/ids.d.ts.map +0 -1
- package/dist/types/src/internal/Query.d.ts.map +0 -1
- package/dist/types/src/internal/Type/echo-schema.d.ts +0 -181
- package/dist/types/src/internal/Type/echo-schema.d.ts.map +0 -1
- package/dist/types/src/internal/Type/persistent-schema.d.ts +0 -20
- package/dist/types/src/internal/Type/persistent-schema.d.ts.map +0 -1
- package/src/Extension.test.ts +0 -235
- package/src/Extension.ts +0 -122
- package/src/SchemaRegistry.ts +0 -106
- package/src/internal/Obj/ids.ts +0 -12
- package/src/internal/Type/echo-schema.ts +0 -423
- package/src/internal/Type/persistent-schema.ts +0 -33
- /package/dist/lib/neutral/{Extension.mjs.map → Registry.mjs.map} +0 -0
- /package/dist/lib/neutral/{SchemaRegistry.mjs.map → Scope.mjs.map} +0 -0
- /package/dist/lib/neutral/{chunk-7RO7CPBZ.mjs.map → chunk-IGK6FN65.mjs.map} +0 -0
package/dist/lib/neutral/Obj.mjs
CHANGED
|
@@ -5,16 +5,18 @@ import {
|
|
|
5
5
|
Unknown,
|
|
6
6
|
VersionTypeId,
|
|
7
7
|
addTag,
|
|
8
|
-
|
|
8
|
+
atom,
|
|
9
|
+
atomProperty,
|
|
10
|
+
atomReactive,
|
|
9
11
|
clone,
|
|
10
12
|
compareVersions,
|
|
11
13
|
decodeVersion,
|
|
12
14
|
deleteKeys,
|
|
13
15
|
encodeVersion,
|
|
14
16
|
fromJSON,
|
|
15
|
-
getDXN,
|
|
16
17
|
getDatabase,
|
|
17
18
|
getDescription,
|
|
19
|
+
getIcon,
|
|
18
20
|
getKeys,
|
|
19
21
|
getLabel,
|
|
20
22
|
getMeta,
|
|
@@ -22,10 +24,11 @@ import {
|
|
|
22
24
|
getReactive,
|
|
23
25
|
getReactiveOption,
|
|
24
26
|
getReactiveOrThrow,
|
|
25
|
-
getSchema,
|
|
26
27
|
getSnapshot,
|
|
27
|
-
|
|
28
|
+
getType,
|
|
29
|
+
getTypeURI,
|
|
28
30
|
getTypename,
|
|
31
|
+
getURI,
|
|
29
32
|
getValue,
|
|
30
33
|
instanceOf,
|
|
31
34
|
isDeleted,
|
|
@@ -44,21 +47,23 @@ import {
|
|
|
44
47
|
sortByTypename,
|
|
45
48
|
subscribe,
|
|
46
49
|
toJSON,
|
|
50
|
+
update,
|
|
47
51
|
updateFrom,
|
|
48
52
|
version,
|
|
49
53
|
versionValid
|
|
50
|
-
} from "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
54
|
+
} from "./chunk-TYGKCRMK.mjs";
|
|
55
|
+
import "./chunk-MZ7K3MLL.mjs";
|
|
56
|
+
import "./chunk-SBVFRTST.mjs";
|
|
57
|
+
import "./chunk-T6E37YIP.mjs";
|
|
58
|
+
import "./chunk-7FPIAJIV.mjs";
|
|
59
|
+
import "./chunk-5SUJPHAE.mjs";
|
|
60
|
+
import "./chunk-7PI7C4EF.mjs";
|
|
61
|
+
import "./chunk-TFEWTY5A.mjs";
|
|
62
|
+
import "./chunk-4ZUHOTCG.mjs";
|
|
63
|
+
import "./chunk-WTQJHC75.mjs";
|
|
64
|
+
import "./chunk-R5W6DXR4.mjs";
|
|
65
|
+
import "./chunk-O6BH7EPN.mjs";
|
|
66
|
+
import "./chunk-BBFJWWAV.mjs";
|
|
62
67
|
import "./chunk-J5LGTIGS.mjs";
|
|
63
68
|
export {
|
|
64
69
|
ID,
|
|
@@ -67,16 +72,18 @@ export {
|
|
|
67
72
|
Unknown,
|
|
68
73
|
VersionTypeId,
|
|
69
74
|
addTag,
|
|
70
|
-
|
|
75
|
+
atom,
|
|
76
|
+
atomProperty,
|
|
77
|
+
atomReactive,
|
|
71
78
|
clone,
|
|
72
79
|
compareVersions,
|
|
73
80
|
decodeVersion,
|
|
74
81
|
deleteKeys,
|
|
75
82
|
encodeVersion,
|
|
76
83
|
fromJSON,
|
|
77
|
-
getDXN,
|
|
78
84
|
getDatabase,
|
|
79
85
|
getDescription,
|
|
86
|
+
getIcon,
|
|
80
87
|
getKeys,
|
|
81
88
|
getLabel,
|
|
82
89
|
getMeta,
|
|
@@ -84,10 +91,11 @@ export {
|
|
|
84
91
|
getReactive,
|
|
85
92
|
getReactiveOption,
|
|
86
93
|
getReactiveOrThrow,
|
|
87
|
-
getSchema,
|
|
88
94
|
getSnapshot,
|
|
89
|
-
|
|
95
|
+
getType,
|
|
96
|
+
getTypeURI,
|
|
90
97
|
getTypename,
|
|
98
|
+
getURI,
|
|
91
99
|
getValue,
|
|
92
100
|
instanceOf,
|
|
93
101
|
isDeleted,
|
|
@@ -106,6 +114,7 @@ export {
|
|
|
106
114
|
sortByTypename,
|
|
107
115
|
subscribe,
|
|
108
116
|
toJSON,
|
|
117
|
+
update,
|
|
109
118
|
updateFrom,
|
|
110
119
|
version,
|
|
111
120
|
versionValid
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
+
created,
|
|
2
3
|
natural,
|
|
3
4
|
property,
|
|
4
|
-
rank
|
|
5
|
-
|
|
5
|
+
rank,
|
|
6
|
+
updated
|
|
7
|
+
} from "./chunk-EVK6XBXO.mjs";
|
|
6
8
|
import "./chunk-J5LGTIGS.mjs";
|
|
7
9
|
export {
|
|
10
|
+
created,
|
|
8
11
|
natural,
|
|
9
12
|
property,
|
|
10
|
-
rank
|
|
13
|
+
rank,
|
|
14
|
+
updated
|
|
11
15
|
};
|
|
12
16
|
//# sourceMappingURL=Order.mjs.map
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
select,
|
|
8
8
|
type,
|
|
9
9
|
without
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-QQIYS74I.mjs";
|
|
11
|
+
import "./chunk-ZGNNFYHS.mjs";
|
|
12
|
+
import "./chunk-6YDI3J37.mjs";
|
|
13
|
+
import "./chunk-TYGKCRMK.mjs";
|
|
14
|
+
import "./chunk-MZ7K3MLL.mjs";
|
|
15
|
+
import "./chunk-SBVFRTST.mjs";
|
|
16
|
+
import "./chunk-T6E37YIP.mjs";
|
|
17
|
+
import "./chunk-7FPIAJIV.mjs";
|
|
18
|
+
import "./chunk-5SUJPHAE.mjs";
|
|
19
|
+
import "./chunk-7PI7C4EF.mjs";
|
|
20
|
+
import "./chunk-TFEWTY5A.mjs";
|
|
21
|
+
import "./chunk-3PBP4V4O.mjs";
|
|
22
|
+
import "./chunk-4ZUHOTCG.mjs";
|
|
23
|
+
import "./chunk-WTQJHC75.mjs";
|
|
24
|
+
import "./chunk-R5W6DXR4.mjs";
|
|
25
|
+
import "./chunk-O6BH7EPN.mjs";
|
|
26
|
+
import "./chunk-BBFJWWAV.mjs";
|
|
27
27
|
import "./chunk-J5LGTIGS.mjs";
|
|
28
28
|
export {
|
|
29
29
|
all,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-35INCYOE.mjs";
|
|
2
2
|
//# sourceMappingURL=QueryResult.mjs.map
|
package/dist/lib/neutral/Ref.mjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Array,
|
|
3
3
|
Ref,
|
|
4
|
-
|
|
4
|
+
fromURI,
|
|
5
|
+
hasEntityId,
|
|
5
6
|
isRef,
|
|
6
7
|
isRefType,
|
|
7
8
|
make
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-UBEZSGXY.mjs";
|
|
9
|
+
} from "./chunk-MZ7K3MLL.mjs";
|
|
10
|
+
import "./chunk-5SUJPHAE.mjs";
|
|
11
|
+
import "./chunk-WTQJHC75.mjs";
|
|
12
|
+
import "./chunk-R5W6DXR4.mjs";
|
|
13
|
+
import "./chunk-O6BH7EPN.mjs";
|
|
14
|
+
import "./chunk-BBFJWWAV.mjs";
|
|
15
15
|
import "./chunk-J5LGTIGS.mjs";
|
|
16
16
|
export {
|
|
17
17
|
Array,
|
|
18
18
|
Ref,
|
|
19
|
-
|
|
19
|
+
fromURI,
|
|
20
|
+
hasEntityId,
|
|
20
21
|
isRef,
|
|
21
22
|
isRefType,
|
|
22
23
|
make
|
|
@@ -5,23 +5,24 @@ import {
|
|
|
5
5
|
Unknown,
|
|
6
6
|
VersionTypeId,
|
|
7
7
|
addTag,
|
|
8
|
-
|
|
8
|
+
atom,
|
|
9
9
|
deleteKeys,
|
|
10
|
-
getDXN,
|
|
11
10
|
getDatabase,
|
|
12
11
|
getDescription,
|
|
13
12
|
getKeys,
|
|
14
13
|
getLabel,
|
|
15
14
|
getMeta,
|
|
16
|
-
getSchema,
|
|
17
15
|
getSnapshot,
|
|
18
16
|
getSource,
|
|
19
|
-
|
|
17
|
+
getSourceURI,
|
|
20
18
|
getTarget,
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
getTargetURI,
|
|
20
|
+
getType,
|
|
21
|
+
getTypeURI,
|
|
23
22
|
getTypename,
|
|
23
|
+
getURI,
|
|
24
24
|
getValue,
|
|
25
|
+
instanceOf,
|
|
25
26
|
isDeleted,
|
|
26
27
|
isRelation,
|
|
27
28
|
isSnapshot,
|
|
@@ -36,20 +37,20 @@ import {
|
|
|
36
37
|
sortByTypename,
|
|
37
38
|
subscribe,
|
|
38
39
|
toJSON,
|
|
40
|
+
update,
|
|
39
41
|
version
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-UBEZSGXY.mjs";
|
|
42
|
+
} from "./chunk-LWXVKPPW.mjs";
|
|
43
|
+
import "./chunk-SBVFRTST.mjs";
|
|
44
|
+
import "./chunk-T6E37YIP.mjs";
|
|
45
|
+
import "./chunk-7FPIAJIV.mjs";
|
|
46
|
+
import "./chunk-5SUJPHAE.mjs";
|
|
47
|
+
import "./chunk-7PI7C4EF.mjs";
|
|
48
|
+
import "./chunk-TFEWTY5A.mjs";
|
|
49
|
+
import "./chunk-4ZUHOTCG.mjs";
|
|
50
|
+
import "./chunk-WTQJHC75.mjs";
|
|
51
|
+
import "./chunk-R5W6DXR4.mjs";
|
|
52
|
+
import "./chunk-O6BH7EPN.mjs";
|
|
53
|
+
import "./chunk-BBFJWWAV.mjs";
|
|
53
54
|
import "./chunk-J5LGTIGS.mjs";
|
|
54
55
|
export {
|
|
55
56
|
Meta,
|
|
@@ -58,23 +59,24 @@ export {
|
|
|
58
59
|
Unknown,
|
|
59
60
|
VersionTypeId,
|
|
60
61
|
addTag,
|
|
61
|
-
|
|
62
|
+
atom,
|
|
62
63
|
deleteKeys,
|
|
63
|
-
getDXN,
|
|
64
64
|
getDatabase,
|
|
65
65
|
getDescription,
|
|
66
66
|
getKeys,
|
|
67
67
|
getLabel,
|
|
68
68
|
getMeta,
|
|
69
|
-
getSchema,
|
|
70
69
|
getSnapshot,
|
|
71
70
|
getSource,
|
|
72
|
-
|
|
71
|
+
getSourceURI,
|
|
73
72
|
getTarget,
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
getTargetURI,
|
|
74
|
+
getType,
|
|
75
|
+
getTypeURI,
|
|
76
76
|
getTypename,
|
|
77
|
+
getURI,
|
|
77
78
|
getValue,
|
|
79
|
+
instanceOf,
|
|
78
80
|
isDeleted,
|
|
79
81
|
isRelation,
|
|
80
82
|
isSnapshot,
|
|
@@ -89,6 +91,7 @@ export {
|
|
|
89
91
|
sortByTypename,
|
|
90
92
|
subscribe,
|
|
91
93
|
toJSON,
|
|
94
|
+
update,
|
|
92
95
|
version
|
|
93
96
|
};
|
|
94
97
|
//# sourceMappingURL=Relation.mjs.map
|
package/dist/lib/neutral/Tag.mjs
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Tag,
|
|
3
3
|
createTagList,
|
|
4
|
+
findOrCreate,
|
|
4
5
|
findTagByLabel,
|
|
5
6
|
make,
|
|
6
7
|
sortTags
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-5SMDBFVB.mjs";
|
|
9
|
+
import "./chunk-6YDI3J37.mjs";
|
|
10
|
+
import "./chunk-TYGKCRMK.mjs";
|
|
11
|
+
import "./chunk-MZ7K3MLL.mjs";
|
|
12
|
+
import "./chunk-SBVFRTST.mjs";
|
|
13
|
+
import "./chunk-T6E37YIP.mjs";
|
|
14
|
+
import "./chunk-7FPIAJIV.mjs";
|
|
15
|
+
import "./chunk-5SUJPHAE.mjs";
|
|
16
|
+
import "./chunk-7PI7C4EF.mjs";
|
|
17
|
+
import "./chunk-TFEWTY5A.mjs";
|
|
18
|
+
import "./chunk-4ZUHOTCG.mjs";
|
|
19
|
+
import "./chunk-WTQJHC75.mjs";
|
|
20
|
+
import "./chunk-R5W6DXR4.mjs";
|
|
21
|
+
import "./chunk-O6BH7EPN.mjs";
|
|
22
|
+
import "./chunk-BBFJWWAV.mjs";
|
|
21
23
|
import "./chunk-J5LGTIGS.mjs";
|
|
22
24
|
export {
|
|
23
25
|
Tag,
|
|
24
26
|
createTagList,
|
|
27
|
+
findOrCreate,
|
|
25
28
|
findTagByLabel,
|
|
26
29
|
make,
|
|
27
30
|
sortTags
|
|
@@ -1,37 +1,65 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
InstancePhantomId,
|
|
3
|
+
Type,
|
|
4
|
+
addFields,
|
|
5
|
+
assertObject,
|
|
6
|
+
expectRelation,
|
|
7
|
+
expectTypeKind,
|
|
8
|
+
getDatabase,
|
|
9
|
+
getLabel,
|
|
5
10
|
getMeta,
|
|
11
|
+
getSchema,
|
|
6
12
|
getTypename,
|
|
13
|
+
getURI,
|
|
7
14
|
getVersion,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
15
|
+
isObject,
|
|
16
|
+
isRelation,
|
|
17
|
+
isType,
|
|
18
|
+
isTypeKind,
|
|
19
|
+
makeObject,
|
|
20
|
+
makeObjectFromJsonSchema,
|
|
21
|
+
makeRelation,
|
|
22
|
+
makeRelationFromJsonSchema,
|
|
23
|
+
removeFields,
|
|
24
|
+
update,
|
|
25
|
+
updateFieldPropertyName,
|
|
26
|
+
updateFields
|
|
27
|
+
} from "./chunk-T6E37YIP.mjs";
|
|
28
|
+
import "./chunk-7FPIAJIV.mjs";
|
|
29
|
+
import "./chunk-5SUJPHAE.mjs";
|
|
30
|
+
import "./chunk-7PI7C4EF.mjs";
|
|
31
|
+
import "./chunk-TFEWTY5A.mjs";
|
|
32
|
+
import "./chunk-4ZUHOTCG.mjs";
|
|
33
|
+
import "./chunk-WTQJHC75.mjs";
|
|
34
|
+
import "./chunk-R5W6DXR4.mjs";
|
|
35
|
+
import "./chunk-O6BH7EPN.mjs";
|
|
36
|
+
import "./chunk-BBFJWWAV.mjs";
|
|
23
37
|
import "./chunk-J5LGTIGS.mjs";
|
|
24
38
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
39
|
+
InstancePhantomId,
|
|
40
|
+
Type,
|
|
41
|
+
addFields,
|
|
42
|
+
assertObject,
|
|
43
|
+
expectRelation,
|
|
44
|
+
expectTypeKind,
|
|
45
|
+
getDatabase,
|
|
46
|
+
getLabel,
|
|
28
47
|
getMeta,
|
|
48
|
+
getSchema,
|
|
29
49
|
getTypename,
|
|
50
|
+
getURI,
|
|
30
51
|
getVersion,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
52
|
+
isObject,
|
|
53
|
+
isRelation,
|
|
54
|
+
isType,
|
|
55
|
+
isTypeKind,
|
|
56
|
+
makeObject,
|
|
57
|
+
makeObjectFromJsonSchema,
|
|
58
|
+
makeRelation,
|
|
59
|
+
makeRelationFromJsonSchema,
|
|
60
|
+
removeFields,
|
|
61
|
+
update,
|
|
62
|
+
updateFieldPropertyName,
|
|
63
|
+
updateFields
|
|
36
64
|
};
|
|
37
65
|
//# sourceMappingURL=Type.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/QueryResult.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport type * as Atom from '@effect-atom/atom/Atom';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { type CleanupFn } from '@dxos/async';\n\nimport type * as Entity from './Entity';\n\n/**\n * Individual query result entry.\n */\nexport type Entry<T> = {\n id: string;\n\n /**\n * May not be present for remote results.\n */\n result?: T;\n\n match?: {\n // TODO(dmaretskyi): text positional info.\n\n /**\n * Higher means better match.\n */\n rank: number;\n };\n\n /**\n * Query resolution metadata.\n */\n // TODO(dmaretskyi): Rename to meta?\n resolution?: {\n // TODO(dmaretskyi): Make this more generic.\n source: 'remote' | 'local' | 'index';\n\n /**\n * Query resolution time in milliseconds.\n */\n time: number;\n };\n};\n\n/**\n * Invidual query result entry for a database Entity.\n */\nexport type EntityEntry<T extends Entity.Unknown = Entity.Unknown> = Entry<T>;\n\nexport type RunOptions = {\n timeout?: number;\n};\n\nexport type SubscriptionOptions = {\n /**\n * Fire the callback immediately.\n */\n fire?: boolean;\n};\n\n// TODO(burdon): Should T be constrained to Entity.Any?\nexport interface QueryResult<T> {\n /**\n * Currently available results along with their match metadata.\n */\n readonly entries: Entry<T>[];\n\n /**\n * Currently available results.\n */\n readonly results: T[];\n\n /**\n * Returns all known results.\n */\n run(opts?: RunOptions): Promise<T[]>;\n\n /**\n * Returns all known results along with their match metadata.\n */\n runEntries(opts?: RunOptions): Promise<Entry<T>[]>;\n\n /**\n * Returns currently available results synchronously.\n */\n runSync(): T[];\n\n /**\n * Returns currently available results synchronously along with their match metadata.\n */\n runSyncEntries(): Entry<T>[];\n\n /**\n * Returns first result.\n */\n first(opts?: RunOptions): Promise<T>;\n\n /**\n * Returns first result if there is one.\n */\n firstOrUndefined(opts?: RunOptions): Promise<T | undefined>;\n\n /**\n * Subscribes to changes in query results.\n */\n subscribe(callback?: (query: QueryResult<T>) => void, opts?: SubscriptionOptions): CleanupFn;\n\n /**\n * Self-updating atom. Updates automatically when query results change.\n *\n * Memoized per QueryResult instance — repeated accesses on the same instance return the same\n * Atom. Safe only when the QueryResult is itself held stable across re-renders (e.g. behind a\n * `useMemo`). It must NOT be used in graph-builder connectors/actions or other atom computes,\n * where `db.query(...)` is called fresh on each re-evaluation: every run constructs a new\n * QueryResult and so a new atom + subscription, leaking the previous ones. Use the memoized\n * {@link atom} family there instead.\n */\n readonly atom: Atom.Atom<T[]>;\n}\n\n/**\n * Effect that returns a QueryResult when evaluated, but also has shorthand methods for running the query or getting the first result.\n */\nexport interface QueryResultEffect<T, E, R> extends Effect.Effect<QueryResult<T>, E, R> {\n run: Effect.Effect<T[], E, R>;\n first: Effect.Effect<Option.Option<T>, E, R>;\n\n // TODO(dmaretskyi): Considering adding `atom`, but since `Database.query` is used in imperative code only, I dont think it will be useful.\n}\n"],
|
|
5
|
+
"mappings": ";AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {
|
|
2
|
+
get,
|
|
3
|
+
set
|
|
4
|
+
} from "./chunk-4ZUHOTCG.mjs";
|
|
5
|
+
import {
|
|
6
|
+
DescriptionAnnotation,
|
|
7
|
+
Dictionary,
|
|
8
|
+
FieldLookupAnnotationId,
|
|
9
|
+
FormInlineAnnotation,
|
|
10
|
+
FormInputAnnotation,
|
|
11
|
+
GeneratorAnnotation,
|
|
12
|
+
GeneratorAnnotationId,
|
|
13
|
+
HiddenAnnotation,
|
|
14
|
+
IconAnnotation,
|
|
15
|
+
IconFromRefAnnotation,
|
|
16
|
+
Key,
|
|
17
|
+
LabelAnnotation,
|
|
18
|
+
ReferenceAnnotation,
|
|
19
|
+
ReferenceAnnotationId,
|
|
20
|
+
TypeAnnotation,
|
|
21
|
+
getDescriptionWithSchema,
|
|
22
|
+
getDictionary,
|
|
23
|
+
getFromAst,
|
|
24
|
+
getLabelWithSchema,
|
|
25
|
+
getTypeAnnotation,
|
|
26
|
+
getTypeIdentifierAnnotation,
|
|
27
|
+
makeUserAnnotation,
|
|
28
|
+
setDescriptionWithSchema,
|
|
29
|
+
setDictionary,
|
|
30
|
+
setLabelWithSchema
|
|
31
|
+
} from "./chunk-R5W6DXR4.mjs";
|
|
32
|
+
import {
|
|
33
|
+
__export
|
|
34
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
35
|
+
|
|
36
|
+
// src/Annotation.ts
|
|
37
|
+
var Annotation_exports = {};
|
|
38
|
+
__export(Annotation_exports, {
|
|
39
|
+
DescriptionAnnotation: () => DescriptionAnnotation,
|
|
40
|
+
Dictionary: () => Dictionary2,
|
|
41
|
+
FieldLookupAnnotationId: () => FieldLookupAnnotationId,
|
|
42
|
+
FormInlineAnnotation: () => FormInlineAnnotation,
|
|
43
|
+
FormInputAnnotation: () => FormInputAnnotation,
|
|
44
|
+
GeneratorAnnotation: () => GeneratorAnnotation,
|
|
45
|
+
GeneratorAnnotationId: () => GeneratorAnnotationId,
|
|
46
|
+
HiddenAnnotation: () => HiddenAnnotation,
|
|
47
|
+
IconAnnotation: () => IconAnnotation,
|
|
48
|
+
IconFromRefAnnotation: () => IconFromRefAnnotation,
|
|
49
|
+
Key: () => Key2,
|
|
50
|
+
LabelAnnotation: () => LabelAnnotation,
|
|
51
|
+
ReferenceAnnotation: () => ReferenceAnnotation,
|
|
52
|
+
ReferenceAnnotationId: () => ReferenceAnnotationId,
|
|
53
|
+
TypeAnnotation: () => TypeAnnotation,
|
|
54
|
+
TypeId: () => TypeId,
|
|
55
|
+
get: () => get2,
|
|
56
|
+
getDescriptionWithSchema: () => getDescriptionWithSchema,
|
|
57
|
+
getDictionary: () => getDictionary2,
|
|
58
|
+
getFromAst: () => getFromAst2,
|
|
59
|
+
getLabelWithSchema: () => getLabelWithSchema,
|
|
60
|
+
getTypeAnnotation: () => getTypeAnnotation,
|
|
61
|
+
getTypeIdentifierAnnotation: () => getTypeIdentifierAnnotation,
|
|
62
|
+
make: () => make,
|
|
63
|
+
set: () => set2,
|
|
64
|
+
setDescriptionWithSchema: () => setDescriptionWithSchema,
|
|
65
|
+
setDictionary: () => setDictionary2,
|
|
66
|
+
setLabelWithSchema: () => setLabelWithSchema
|
|
67
|
+
});
|
|
68
|
+
import * as Function from "effect/Function";
|
|
69
|
+
var TypeId = "~@dxos/echo/Annotation";
|
|
70
|
+
var Key2 = Key;
|
|
71
|
+
var make = makeUserAnnotation;
|
|
72
|
+
var get2 = Function.dual(2, (target, annotation) => {
|
|
73
|
+
return get(target, annotation);
|
|
74
|
+
});
|
|
75
|
+
var set2 = Function.dual(3, (target, annotation, value) => {
|
|
76
|
+
return set(target, annotation, value);
|
|
77
|
+
});
|
|
78
|
+
var getFromAst2 = Function.dual(2, (ast, annotation) => {
|
|
79
|
+
return getFromAst(ast, annotation);
|
|
80
|
+
});
|
|
81
|
+
var Dictionary2 = Dictionary;
|
|
82
|
+
var getDictionary2 = Function.dual(2, (values, annotation) => {
|
|
83
|
+
return getDictionary(values, annotation);
|
|
84
|
+
});
|
|
85
|
+
var setDictionary2 = Function.dual(3, (values, annotation, value) => {
|
|
86
|
+
return setDictionary(values, annotation, value);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
TypeId,
|
|
91
|
+
Key2 as Key,
|
|
92
|
+
make,
|
|
93
|
+
get2 as get,
|
|
94
|
+
set2 as set,
|
|
95
|
+
getFromAst2 as getFromAst,
|
|
96
|
+
Dictionary2 as Dictionary,
|
|
97
|
+
getDictionary2 as getDictionary,
|
|
98
|
+
setDictionary2 as setDictionary,
|
|
99
|
+
Annotation_exports
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=chunk-3PBP4V4O.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/Annotation.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nexport {\n DescriptionAnnotation,\n FieldLookupAnnotationId,\n FormInputAnnotation,\n FormInlineAnnotation,\n GeneratorAnnotation,\n GeneratorAnnotationId,\n type GeneratorAnnotationValue,\n LabelAnnotation,\n ReferenceAnnotation,\n ReferenceAnnotationId,\n type ReferenceAnnotationValue,\n HiddenAnnotation,\n TypeAnnotation,\n getDescriptionWithSchema,\n getLabelWithSchema,\n getTypeAnnotation,\n getTypeIdentifierAnnotation,\n setDescriptionWithSchema,\n setLabelWithSchema,\n IconAnnotation,\n IconFromRefAnnotation,\n} from './internal/Annotation';\n\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\nimport * as Types from 'effect/Types';\n\nimport * as Entity from './Entity';\nimport * as internalAnnotations from './internal/Annotation';\n\nexport const TypeId = '~@dxos/echo/Annotation' as const;\nexport type TypeId = typeof TypeId;\n\n// TODO(dmaretskyi): Reconcile different get/set styles: mutate in-place, return.\n// TODO(dmaretskyi): Reconcile Annotation methods vs static functions.\n// TODO(dmaretskyi): Reconcile Annotation.Key vs DXN -- work-out approach to versioning.\n\n/**\n * Annotation is a typed property that can be assigned to a schema or an entity instance.\n */\nexport interface Annotation<T> {\n [TypeId]: {\n _Type: T;\n };\n\n // TODO(dmaretskyi): Make this a DXN?\n /**\n * Unique fully-qualified identifier for the annotation.\n * @example \"org.dxos.annotation.color\"\n */\n readonly key: Key;\n\n /**\n * Schema of the annotation value.\n */\n readonly schema: Schema.Schema<T, unknown, never>;\n\n /**\n * Get the annotation value from an Effect schema.\n *\n * Only accepts `Schema.Schema.Any` — to read an annotation off a `Type.Type`\n * entity, unwrap it first with `Type.getSchema(entity)`. This keeps the\n * annotation pipeline single-shaped and forces annotations to live on the\n * source schema, not on the post-construction Type entity.\n */\n get: (schema: Schema.Schema.Any) => Option.Option<T>;\n /**\n * Get the annotation value from the AST.\n */\n getFromAst: (ast: SchemaAST.AST) => Option.Option<T>;\n /**\n * Set the annotation on an Effect schema.\n *\n * Only accepts `Schema.Schema.Any` — annotations must be applied to the\n * source schema BEFORE wrapping it with `Type.makeObject` / `Type.makeRelation`.\n * In a pipe, place every `Annotation.X.set(...)` before the `Type.make...` step.\n */\n set: (value: T) => <S extends Schema.Schema.Any>(schema: S) => S;\n}\n\nexport const Key = internalAnnotations.Key;\nexport type Key = Schema.Schema.Type<typeof Key>;\n\ninterface MakeProps<T> {\n id: string;\n schema: Schema.Schema<T, any, never>;\n}\n\n/**\n * Create a new schema annotation.\n * Annotation can be assigned both to fields and to the schema itself.\n * Annotation is serialized with the schema.\n *\n * @example\n * ```ts\n * const ColorAnnotation = Annotation.make({\n * id: 'org.dxos.annotation.color',\n * schema: Schema.String,\n * });\n *\n * const schema = Schema.String.annotations(ColorAnnotation.set('red'));\n * ```\n */\nexport const make: <T>(props: MakeProps<T>) => Annotation<T> = internalAnnotations.makeUserAnnotation;\n\n/**\n * Get the value of an annotation from an entity instance or snapshot.\n * For schema-level reads use the annotation instance method (e.g. `ColorAnnotation.get(schema)`).\n * For getting an annotation value from a dictionary, use `getDictionary`.\n */\nexport const get: {\n <T>(annotation: Annotation<T>): (target: Entity.Unknown | Entity.Snapshot) => Option.Option<T>;\n <T>(target: Entity.Unknown | Entity.Snapshot, annotation: Annotation<T>): Option.Option<T>;\n} = Function.dual<\n <T>(annotation: Annotation<T>) => (target: Entity.Unknown | Entity.Snapshot) => Option.Option<T>,\n <T>(target: Entity.Unknown | Entity.Snapshot, annotation: Annotation<T>) => Option.Option<T>\n>(2, (target, annotation) => {\n return internalAnnotations.get(target, annotation);\n});\n\n/**\n * Set the value of an annotation on an entity instance.\n * For schema-level writes use the annotation instance method (e.g. `ColorAnnotation.set('red')`).\n * For setting an annotation value on a dictionary, use `setDictionary`.\n */\nexport const set: {\n <T>(annotation: Annotation<T>, value: T): (target: Entity.Mutable<Entity.Unknown>) => void;\n <T>(target: Entity.Mutable<Entity.Unknown>, annotation: Annotation<T>, value: T): void;\n} = Function.dual<\n <T>(annotation: Annotation<T>, value: T) => (target: Entity.Mutable<Entity.Unknown>) => void,\n <T>(target: Entity.Mutable<Entity.Unknown>, annotation: Annotation<T>, value: T) => void\n>(3, (target, annotation, value) => {\n return internalAnnotations.set(target, annotation, value);\n});\n\nexport const getFromAst: {\n <T>(annotation: Annotation<T>): (ast: SchemaAST.AST) => Option.Option<T>;\n <T>(ast: SchemaAST.AST, annotation: Annotation<T>): Option.Option<T>;\n} = Function.dual<\n <T>(annotation: Annotation<T>) => (ast: SchemaAST.AST) => Option.Option<T>,\n <T>(ast: SchemaAST.AST, annotation: Annotation<T>) => Option.Option<T>\n>(2, (ast, annotation) => {\n return internalAnnotations.getFromAst(ast, annotation);\n});\n\n/**\n * Set of annotation values.\n *\n * Can be used inside an object/relation schema:\n *\n * ```ts\n * const Person = Schema.Struct({\n * name: Schema.String,\n * extensions: Annotation.Dictionary,\n * });\n * ```\n */\nexport const Dictionary = internalAnnotations.Dictionary;\nexport interface Dictionary extends Schema.Schema.Type<typeof Dictionary> {}\n\n/**\n * Get the value of an annotation from a Dictionary.\n */\nexport const getDictionary: {\n <T>(annotation: Annotation<T>): (values: Dictionary) => Option.Option<T>;\n <T>(values: Dictionary, annotation: Annotation<T>): Option.Option<T>;\n} = Function.dual<\n <T>(annotation: Annotation<T>) => (values: Dictionary) => Option.Option<T>,\n <T>(values: Dictionary, annotation: Annotation<T>) => Option.Option<T>\n>(2, (values, annotation) => {\n return internalAnnotations.getDictionary(values, annotation);\n});\n\n/**\n * Set the value of an annotation in a Dictionary.\n *\n * Can also be used within Obj.update callback:\n *\n * ```ts\n * Obj.update(obj, (obj) => {\n * Annotation.setDictionary(obj.annotations, ColorAnnotation, 'red');\n * });\n * ```\n */\nexport const setDictionary: {\n <T>(annotation: Annotation<T>, value: T): (values: Dictionary) => void;\n <T>(values: Types.Mutable<Dictionary>, annotation: Annotation<T>, value: T): void;\n} = Function.dual<\n <T>(annotation: Annotation<T>, value: T) => (values: Dictionary) => void,\n <T>(values: Types.Mutable<Dictionary>, annotation: Annotation<T>, value: T) => void\n>(3, (values, annotation, value) => {\n return internalAnnotations.setDictionary(values, annotation, value);\n});\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;oBAAAA;EAAA;;;;;;;;aAAAC;EAAA;;;;;aAAAC;EAAA;uBAAAC;EAAA,kBAAAC;EAAA;;;;aAAAC;EAAA;uBAAAC;EAAA;;AA8BA,YAAYC,cAAc;AASnB,IAAMC,SAAS;AAkDf,IAAMC,OAA0BA;AAuBhC,IAAMC,OAAsEC;AAO5E,IAAMC,OAGAC,cAGX,GAAG,CAACC,QAAQC,eAAAA;AACZ,SAA2BH,IAAIE,QAAQC,UAAAA;AACzC,CAAA;AAOO,IAAMC,OAGAH,cAGX,GAAG,CAACC,QAAQC,YAAYE,UAAAA;AACxB,SAA2BD,IAAIF,QAAQC,YAAYE,KAAAA;AACrD,CAAA;AAEO,IAAMC,cAGAL,cAGX,GAAG,CAACM,KAAKJ,eAAAA;AACT,SAA2BG,WAAWC,KAAKJ,UAAAA;AAC7C,CAAA;AAcO,IAAMK,cAAiCA;AAMvC,IAAMC,iBAGAR,cAGX,GAAG,CAACS,QAAQP,eAAAA;AACZ,SAA2BM,cAAcC,QAAQP,UAAAA;AACnD,CAAA;AAaO,IAAMQ,iBAGAV,cAGX,GAAG,CAACS,QAAQP,YAAYE,UAAAA;AACxB,SAA2BM,cAAcD,QAAQP,YAAYE,KAAAA;AAC/D,CAAA;",
|
|
6
|
+
"names": ["Dictionary", "Key", "get", "getDictionary", "getFromAst", "set", "setDictionary", "Function", "TypeId", "Key", "make", "makeUserAnnotation", "get", "dual", "target", "annotation", "set", "value", "getFromAst", "ast", "Dictionary", "getDictionary", "values", "setDictionary"]
|
|
7
|
+
}
|