@dxos/echo 0.8.4-main.ef1bc66f44 → 0.8.4-main.effb148878
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 +9 -9
- package/dist/lib/neutral/Annotation.mjs +7 -3
- package/dist/lib/neutral/Database.mjs +8 -4
- package/dist/lib/neutral/Entity.mjs +35 -18
- package/dist/lib/neutral/Err.mjs +3 -1
- package/dist/lib/neutral/Extension.mjs +18 -0
- package/dist/lib/neutral/Extension.mjs.map +7 -0
- package/dist/lib/neutral/Feed.mjs +54 -0
- package/dist/lib/neutral/Feed.mjs.map +7 -0
- package/dist/lib/neutral/Filter.mjs +25 -12
- package/dist/lib/neutral/Format.mjs +23 -3
- package/dist/lib/neutral/JsonSchema.mjs +9 -9
- package/dist/lib/neutral/Key.mjs +7 -3
- package/dist/lib/neutral/Migration.mjs +18 -0
- package/dist/lib/neutral/Migration.mjs.map +7 -0
- package/dist/lib/neutral/Obj.mjs +41 -23
- package/dist/lib/neutral/Order.mjs +1 -1
- package/dist/lib/neutral/Query.mjs +21 -9
- package/dist/lib/neutral/QueryResult.mjs +1 -1
- package/dist/lib/neutral/Ref.mjs +13 -9
- package/dist/lib/neutral/Relation.mjs +34 -23
- package/dist/lib/neutral/SchemaRegistry.mjs +1 -1
- package/dist/lib/neutral/Tag.mjs +14 -10
- package/dist/lib/neutral/Type.mjs +52 -36
- package/dist/lib/neutral/{chunk-K5K3Z62A.mjs → chunk-4SYHDOQA.mjs} +14 -6
- package/dist/lib/neutral/chunk-4SYHDOQA.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-XAJMXQ4H.mjs → chunk-4U7OD55H.mjs} +6 -2
- package/dist/lib/neutral/chunk-4U7OD55H.mjs.map +7 -0
- package/dist/lib/neutral/chunk-52NG2XEE.mjs +34 -0
- package/dist/lib/neutral/chunk-52NG2XEE.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-KB7RIVLK.mjs → chunk-A5HDDVKS.mjs} +33 -6
- package/dist/lib/neutral/chunk-A5HDDVKS.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-DLPC7DHQ.mjs → chunk-EZ4XJFHJ.mjs} +9 -11
- package/dist/lib/neutral/chunk-EZ4XJFHJ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ZAHWXGK4.mjs → chunk-F625JEZB.mjs} +97 -19
- package/dist/lib/neutral/chunk-F625JEZB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FFCN66OF.mjs +420 -0
- package/dist/lib/neutral/chunk-FFCN66OF.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-RPB6V4BE.mjs → chunk-GOHDOJE3.mjs} +16 -3
- package/dist/lib/neutral/chunk-GOHDOJE3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GWFFC34K.mjs +50 -0
- package/dist/lib/neutral/chunk-GWFFC34K.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J7QWJQQV.mjs +318 -0
- package/dist/lib/neutral/chunk-J7QWJQQV.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-QARLJVDB.mjs → chunk-JTHNDGAR.mjs} +8 -4
- package/dist/lib/neutral/chunk-JTHNDGAR.mjs.map +7 -0
- package/dist/lib/neutral/chunk-K5RH2PBH.mjs +361 -0
- package/dist/lib/neutral/chunk-K5RH2PBH.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-RIMHNJ3E.mjs → chunk-KHRAQDYX.mjs} +138 -91
- package/dist/lib/neutral/chunk-KHRAQDYX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-L65CW5EI.mjs +156 -0
- package/dist/lib/neutral/chunk-L65CW5EI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-LNZIPZX6.mjs +2186 -0
- package/dist/lib/neutral/chunk-LNZIPZX6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MPXUNTME.mjs +41 -0
- package/dist/lib/neutral/chunk-MPXUNTME.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-7WE7SBA2.mjs → chunk-O2EOH7XQ.mjs} +152 -134
- package/dist/lib/neutral/chunk-O2EOH7XQ.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-MTEHHY62.mjs → chunk-Q7ID37KF.mjs} +121 -94
- package/dist/lib/neutral/chunk-Q7ID37KF.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QLYEQ5VA.mjs +205 -0
- package/dist/lib/neutral/chunk-QLYEQ5VA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SSDGRJ3A.mjs +747 -0
- package/dist/lib/neutral/chunk-SSDGRJ3A.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ROKO4RKJ.mjs → chunk-TTCSATUD.mjs} +2 -2
- package/dist/lib/neutral/chunk-TTCSATUD.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-ANHVGJI4.mjs → chunk-UEFRFUYC.mjs} +8 -4
- package/dist/lib/neutral/chunk-UEFRFUYC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UN7K472Q.mjs +132 -0
- package/dist/lib/neutral/chunk-UN7K472Q.mjs.map +7 -0
- package/dist/lib/neutral/chunk-UQAMAXDU.mjs +243 -0
- package/dist/lib/neutral/chunk-UQAMAXDU.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-4L6DOFXP.mjs → chunk-V5NE2X7Y.mjs} +1 -1
- package/dist/lib/neutral/chunk-V5NE2X7Y.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-OMUPQMLR.mjs → chunk-V72DY6LU.mjs} +1 -1
- package/dist/lib/neutral/chunk-ZII2BGPM.mjs +269 -0
- package/dist/lib/neutral/chunk-ZII2BGPM.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-N2QNHMT5.mjs → chunk-ZM7VFIS2.mjs} +22 -2
- package/dist/lib/neutral/chunk-ZM7VFIS2.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +56 -29
- package/dist/lib/neutral/internal/index.mjs +128 -77
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/testing/index.mjs +226 -174
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/types/src/Annotation.d.ts +3 -3
- package/dist/types/src/Annotation.d.ts.map +1 -1
- package/dist/types/src/Collection.d.ts +15 -0
- package/dist/types/src/Collection.d.ts.map +1 -0
- package/dist/types/src/Database.d.ts +27 -42
- package/dist/types/src/Database.d.ts.map +1 -1
- package/dist/types/src/Dataset.d.ts +29 -0
- package/dist/types/src/Dataset.d.ts.map +1 -0
- package/dist/types/src/Entity.d.ts +123 -29
- package/dist/types/src/Entity.d.ts.map +1 -1
- package/dist/types/src/Err.d.ts +56 -13
- package/dist/types/src/Err.d.ts.map +1 -1
- package/dist/types/src/Extension.d.ts +80 -0
- package/dist/types/src/Extension.d.ts.map +1 -0
- package/dist/types/src/Extension.test.d.ts +2 -0
- package/dist/types/src/Extension.test.d.ts.map +1 -0
- package/dist/types/src/Feed.d.ts +229 -0
- package/dist/types/src/Feed.d.ts.map +1 -0
- package/dist/types/src/Filter.d.ts +74 -11
- package/dist/types/src/Filter.d.ts.map +1 -1
- package/dist/types/src/Filter.test.d.ts +2 -0
- package/dist/types/src/Filter.test.d.ts.map +1 -0
- package/dist/types/src/Format.d.ts +3 -3
- package/dist/types/src/Format.d.ts.map +1 -1
- package/dist/types/src/Hypergraph.d.ts +15 -10
- 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 +11 -4
- 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 +72 -0
- package/dist/types/src/Migration.d.ts.map +1 -0
- package/dist/types/src/Obj.d.ts +201 -77
- package/dist/types/src/Obj.d.ts.map +1 -1
- package/dist/types/src/Order.d.ts.map +1 -1
- package/dist/types/src/Query.d.ts +117 -17
- package/dist/types/src/Query.d.ts.map +1 -1
- package/dist/types/src/Ref.d.ts +66 -10
- package/dist/types/src/Ref.d.ts.map +1 -1
- package/dist/types/src/Relation.d.ts +127 -54
- package/dist/types/src/Relation.d.ts.map +1 -1
- package/dist/types/src/SchemaRegistry.d.ts +12 -13
- package/dist/types/src/SchemaRegistry.d.ts.map +1 -1
- package/dist/types/src/Tag.d.ts +4 -3
- package/dist/types/src/Tag.d.ts.map +1 -1
- package/dist/types/src/Type.d.ts +337 -218
- package/dist/types/src/Type.d.ts.map +1 -1
- package/dist/types/src/View.d.ts +65 -0
- package/dist/types/src/View.d.ts.map +1 -0
- 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 +8 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/internal/{annotations → Annotation}/annotations.d.ts +98 -24
- package/dist/types/src/internal/Annotation/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/annotations.test.d.ts.map +1 -0
- package/dist/types/src/internal/Annotation/index.d.ts +4 -0
- package/dist/types/src/internal/Annotation/index.d.ts.map +1 -0
- package/dist/types/src/internal/{api → Annotation}/sorting.d.ts +1 -1
- package/dist/types/src/internal/Annotation/sorting.d.ts.map +1 -0
- package/dist/types/src/internal/{annotations → Annotation}/util.d.ts +15 -6
- package/dist/types/src/internal/Annotation/util.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/api.d.ts +13 -0
- package/dist/types/src/internal/Entity/api.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/entity.d.ts +67 -0
- package/dist/types/src/internal/Entity/entity.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/index.d.ts +10 -0
- package/dist/types/src/internal/Entity/index.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/model.d.ts +57 -0
- package/dist/types/src/internal/Entity/model.d.ts.map +1 -0
- package/dist/types/src/internal/{entities → Entity}/object.d.ts +3 -3
- package/dist/types/src/internal/Entity/object.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/relation.d.ts +51 -0
- package/dist/types/src/internal/Entity/relation.d.ts.map +1 -0
- 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 +25 -0
- package/dist/types/src/internal/Entity/type-uri.d.ts.map +1 -0
- package/dist/types/src/internal/Entity/util.d.ts.map +1 -0
- package/dist/types/src/internal/{api → Entity}/version.d.ts +1 -1
- package/dist/types/src/internal/Entity/version.d.ts.map +1 -0
- package/dist/types/src/internal/Format/date.d.ts.map +1 -0
- package/dist/types/src/internal/Format/date.test.d.ts.map +1 -0
- package/dist/types/src/internal/{formats → Format}/format.d.ts +2 -1
- package/dist/types/src/internal/Format/format.d.ts.map +1 -0
- package/dist/types/src/internal/Format/format.test.d.ts.map +1 -0
- package/dist/types/src/internal/{formats → Format}/index.d.ts +2 -2
- package/dist/types/src/internal/Format/index.d.ts.map +1 -0
- package/dist/types/src/internal/Format/number.d.ts.map +1 -0
- package/dist/types/src/internal/Format/object.d.ts.map +1 -0
- package/dist/types/src/internal/Format/select.d.ts.map +1 -0
- package/dist/types/src/internal/Format/string.d.ts.map +1 -0
- package/dist/types/src/internal/{formats → Format}/types.d.ts +1 -1
- package/dist/types/src/internal/Format/types.d.ts.map +1 -0
- package/dist/types/src/internal/{json-schema → JsonSchema}/annotations.d.ts +1 -1
- package/dist/types/src/internal/JsonSchema/annotations.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/effect-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/index.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema-normalize.d.ts.map +1 -0
- package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema-type.d.ts +37 -37
- package/dist/types/src/internal/JsonSchema/json-schema-type.d.ts.map +1 -0
- package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema.d.ts +3 -2
- package/dist/types/src/internal/JsonSchema/json-schema.d.ts.map +1 -0
- package/dist/types/src/internal/JsonSchema/json-schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/clone.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/common.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/create-object.d.ts +10 -12
- package/dist/types/src/internal/Obj/create-object.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/create-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/deleted.d.ts +1 -1
- package/dist/types/src/internal/Obj/deleted.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/index.d.ts +0 -1
- package/dist/types/src/internal/Obj/index.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/inspect.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/json-serializer.d.ts +16 -8
- package/dist/types/src/internal/Obj/json-serializer.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/json-serializer.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/schema-validator.d.ts +2 -0
- package/dist/types/src/internal/Obj/schema-validator.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/schema-validator.test.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/set-value.d.ts +2 -2
- package/dist/types/src/internal/Obj/set-value.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/set-value.test.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/snapshot.d.ts.map +1 -0
- package/dist/types/src/internal/{object → Obj}/typed-object.d.ts +5 -5
- package/dist/types/src/internal/Obj/typed-object.d.ts.map +1 -0
- package/dist/types/src/internal/Obj/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/Query.d.ts +10 -0
- package/dist/types/src/internal/Query.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/index.d.ts.map +1 -0
- package/dist/types/src/internal/{ref → Ref}/ref-array.d.ts +1 -1
- package/dist/types/src/internal/Ref/ref-array.d.ts.map +1 -0
- package/dist/types/src/internal/{ref → Ref}/ref.d.ts +42 -19
- package/dist/types/src/internal/Ref/ref.d.ts.map +1 -0
- package/dist/types/src/internal/Ref/ref.test.d.ts.map +1 -0
- package/dist/types/src/internal/{schema → Type}/compose.d.ts +1 -1
- package/dist/types/src/internal/Type/compose.d.ts.map +1 -0
- package/dist/types/src/internal/Type/compose.test.d.ts.map +1 -0
- package/dist/types/src/internal/Type/index.d.ts +3 -0
- package/dist/types/src/internal/Type/index.d.ts.map +1 -0
- package/dist/types/src/internal/{schema → Type}/manipulation.d.ts +0 -1
- package/dist/types/src/internal/Type/manipulation.d.ts.map +1 -0
- 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/{api → common/api}/index.d.ts +0 -4
- package/dist/types/src/internal/common/api/index.d.ts.map +1 -0
- package/dist/types/src/internal/{api → common/api}/meta.d.ts +3 -3
- package/dist/types/src/internal/common/api/meta.d.ts.map +1 -0
- package/dist/types/src/internal/common/index.d.ts +4 -0
- package/dist/types/src/internal/common/index.d.ts.map +1 -0
- package/dist/types/src/internal/{proxy → common/proxy}/change-context.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/change-context.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/change.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/define-hidden-property.d.ts.map +1 -0
- package/dist/types/src/internal/{proxy → common/proxy}/errors.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/errors.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/event-batch.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/index.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/json-serializer.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/make-object.d.ts +19 -0
- package/dist/types/src/internal/common/proxy/make-object.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/ownership.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/proxy-types.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/proxy-utils.d.ts.map +1 -0
- package/dist/types/src/internal/{proxy → common/proxy}/reactive-array.d.ts +1 -1
- package/dist/types/src/internal/common/proxy/reactive-array.d.ts.map +1 -0
- package/dist/types/src/internal/{proxy → common/proxy}/reactive.d.ts +2 -2
- package/dist/types/src/internal/{proxy → 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 -0
- package/dist/types/src/internal/common/proxy/schema.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/symbols.d.ts.map +1 -0
- package/dist/types/src/internal/{proxy → common/proxy}/typed-handler.d.ts +18 -2
- package/dist/types/src/internal/common/proxy/typed-handler.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-handler.test.d.ts.map +1 -0
- package/dist/types/src/internal/common/proxy/typed-object.test.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/base.d.ts +1 -0
- package/dist/types/src/internal/common/types/base.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/entity.d.ts +94 -0
- package/dist/types/src/internal/common/types/entity.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/index.d.ts +1 -0
- package/dist/types/src/internal/common/types/index.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/meta.d.ts +12 -1
- package/dist/types/src/internal/common/types/meta.d.ts.map +1 -0
- package/dist/types/src/internal/common/types/model-symbols.d.ts +58 -0
- package/dist/types/src/internal/common/types/model-symbols.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/typename.d.ts +7 -0
- package/dist/types/src/internal/common/types/typename.d.ts.map +1 -0
- package/dist/types/src/internal/{types → common/types}/version.d.ts +2 -2
- package/dist/types/src/internal/common/types/version.d.ts.map +1 -0
- package/dist/types/src/internal/index.d.ts +9 -10
- package/dist/types/src/internal/index.d.ts.map +1 -1
- 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 +77 -82
- 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 +30 -15
- package/src/Annotation.ts +7 -3
- package/src/Collection.ts +36 -0
- package/src/Database.ts +80 -77
- package/src/Dataset.ts +34 -0
- package/src/Entity.test.ts +116 -6
- package/src/Entity.ts +181 -66
- package/src/Err.ts +25 -3
- package/src/Extension.test.ts +235 -0
- package/src/Extension.ts +122 -0
- package/src/Feed.ts +356 -0
- package/src/Filter.test.ts +90 -0
- package/src/Filter.ts +152 -21
- package/src/Format.ts +3 -3
- package/src/Hypergraph.ts +16 -11
- package/src/Json.test.ts +175 -0
- package/src/Json.ts +103 -0
- package/src/JsonSchema.ts +14 -4
- package/src/Key.ts +1 -1
- package/src/Migration.ts +114 -0
- package/src/Obj.test.ts +158 -20
- package/src/Obj.ts +451 -183
- package/src/Order.ts +3 -1
- package/src/Query.test.ts +446 -89
- package/src/Query.ts +300 -35
- package/src/Ref.ts +83 -12
- package/src/Relation.test.ts +16 -10
- package/src/Relation.ts +236 -165
- package/src/SchemaRegistry.ts +13 -17
- package/src/Tag.ts +9 -9
- package/src/Type.test.ts +169 -24
- package/src/Type.ts +561 -354
- package/src/View.ts +101 -0
- package/src/exemplars.test.ts +21 -0
- package/src/index.ts +9 -2
- package/src/internal/Annotation/annotations.test.ts +165 -0
- package/src/internal/{annotations → Annotation}/annotations.ts +181 -101
- package/src/internal/{annotations → Annotation}/index.ts +1 -0
- package/src/internal/{api → Annotation}/sorting.ts +2 -4
- package/src/internal/{annotations → Annotation}/util.ts +17 -9
- package/src/internal/{api/entity.ts → Entity/api.ts} +9 -8
- package/src/internal/Entity/entity.ts +246 -0
- package/src/internal/{entities → Entity}/index.ts +4 -0
- package/src/internal/{entities → Entity}/model.ts +42 -60
- package/src/internal/{entities → Entity}/object.ts +13 -6
- package/src/internal/Entity/relation.ts +179 -0
- package/src/internal/Entity/type-kind.ts +67 -0
- package/src/internal/Entity/type-uri.ts +87 -0
- package/src/internal/Entity/util.ts +34 -0
- package/src/internal/{api → Entity}/version.ts +2 -2
- package/src/internal/{formats → Format}/date.test.ts +1 -2
- package/src/internal/{formats → Format}/date.ts +0 -4
- package/src/internal/{formats → Format}/format.test.ts +1 -2
- package/src/internal/{formats → Format}/index.ts +2 -3
- package/src/internal/{formats → Format}/types.ts +2 -2
- package/src/internal/{json-schema → JsonSchema}/annotations.ts +3 -3
- package/src/internal/{json-schema → JsonSchema}/json-schema-type.ts +4 -4
- package/src/internal/{json-schema → JsonSchema}/json-schema.test.ts +64 -151
- package/src/internal/{json-schema → JsonSchema}/json-schema.ts +47 -28
- package/src/internal/{object → Obj}/clone.ts +10 -6
- package/src/internal/{object → Obj}/common.ts +2 -2
- package/src/internal/{object → Obj}/create-object.test.ts +13 -14
- package/src/internal/Obj/create-object.ts +135 -0
- package/src/internal/{object → Obj}/deleted.ts +2 -2
- package/src/internal/{object → Obj}/index.ts +0 -1
- package/src/internal/{object → Obj}/inspect.ts +3 -3
- package/src/internal/Obj/json-serializer.test.ts +185 -0
- package/src/internal/{object → Obj}/json-serializer.ts +108 -45
- package/src/internal/{object → Obj}/schema-validator.ts +1 -1
- package/src/internal/{object → Obj}/set-value.test.ts +31 -54
- package/src/internal/{object → Obj}/set-value.ts +3 -3
- package/src/internal/{object → Obj}/snapshot.ts +41 -23
- package/src/internal/Obj/typed-object.test.ts +32 -0
- package/src/internal/{object → Obj}/typed-object.ts +5 -5
- package/src/internal/Query.ts +156 -0
- package/src/internal/{ref → Ref}/ref-array.ts +1 -2
- package/src/internal/{ref → Ref}/ref.test.ts +16 -26
- package/src/internal/{ref → Ref}/ref.ts +117 -57
- package/src/internal/{schema → Type}/compose.test.ts +6 -5
- package/src/internal/{schema → Type}/compose.ts +1 -1
- package/src/internal/Type/index.ts +6 -0
- package/src/internal/{schema → Type}/manipulation.ts +0 -25
- package/src/internal/Type/type-schema.ts +60 -0
- package/src/internal/{README.md → common/README.md} +2 -2
- package/src/internal/{api → common/api}/index.ts +0 -4
- package/src/internal/{api → common/api}/meta.ts +3 -3
- package/src/internal/common/index.ts +7 -0
- package/src/internal/{proxy → common/proxy}/change-context.ts +1 -1
- package/src/internal/{proxy → common/proxy}/change.test.ts +97 -97
- package/src/internal/{proxy → common/proxy}/errors.ts +2 -2
- package/src/internal/{proxy → common/proxy}/handler.test.ts +2 -4
- package/src/internal/{proxy → common/proxy}/json-serializer.ts +20 -14
- package/src/internal/{proxy → common/proxy}/make-object.ts +37 -15
- package/src/internal/{proxy → common/proxy}/ownership.ts +0 -1
- package/src/internal/{proxy → common/proxy}/reactive-array.ts +1 -1
- package/src/internal/common/proxy/reactive.test.ts +54 -0
- package/src/internal/{proxy → common/proxy}/reactive.ts +12 -4
- package/src/internal/common/proxy/schema.test.ts +107 -0
- package/src/internal/{proxy → common/proxy}/typed-handler.test.ts +15 -15
- package/src/internal/{proxy → common/proxy}/typed-handler.ts +75 -18
- package/src/internal/{proxy → common/proxy}/typed-object.test.ts +17 -30
- package/src/internal/{types → common/types}/base.ts +1 -1
- package/src/internal/common/types/entity.ts +133 -0
- package/src/internal/{types → common/types}/index.ts +1 -0
- package/src/internal/{types → common/types}/meta.ts +15 -1
- package/src/internal/common/types/model-symbols.ts +74 -0
- package/src/internal/common/types/typename.ts +91 -0
- package/src/internal/{types → common/types}/version.ts +2 -3
- package/src/internal/index.ts +9 -31
- package/src/testing/api.test.ts +15 -12
- package/src/testing/test-data.ts +158 -99
- package/src/testing/test-schema.ts +33 -67
- package/src/testing/util.ts +14 -11
- package/dist/lib/neutral/chunk-2AF5GMG6.mjs +0 -171
- package/dist/lib/neutral/chunk-2AF5GMG6.mjs.map +0 -7
- package/dist/lib/neutral/chunk-4L6DOFXP.mjs.map +0 -7
- package/dist/lib/neutral/chunk-7WE7SBA2.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ANHVGJI4.mjs.map +0 -7
- package/dist/lib/neutral/chunk-DLPC7DHQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-EBUAT5ID.mjs +0 -229
- package/dist/lib/neutral/chunk-EBUAT5ID.mjs.map +0 -7
- package/dist/lib/neutral/chunk-K5K3Z62A.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KB7RIVLK.mjs.map +0 -7
- package/dist/lib/neutral/chunk-LKFNEFHF.mjs +0 -130
- package/dist/lib/neutral/chunk-LKFNEFHF.mjs.map +0 -7
- package/dist/lib/neutral/chunk-MTEHHY62.mjs.map +0 -7
- package/dist/lib/neutral/chunk-N2QNHMT5.mjs.map +0 -7
- package/dist/lib/neutral/chunk-QARLJVDB.mjs.map +0 -7
- package/dist/lib/neutral/chunk-RIMHNJ3E.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ROKO4RKJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-RPB6V4BE.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TLGNKUUG.mjs +0 -3905
- package/dist/lib/neutral/chunk-TLGNKUUG.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TQT6WTIJ.mjs +0 -142
- package/dist/lib/neutral/chunk-TQT6WTIJ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-VUQGRDRI.mjs +0 -97
- package/dist/lib/neutral/chunk-VUQGRDRI.mjs.map +0 -7
- package/dist/lib/neutral/chunk-X2MPMYYN.mjs +0 -13
- package/dist/lib/neutral/chunk-X2MPMYYN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-XAJMXQ4H.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZAHWXGK4.mjs.map +0 -7
- package/dist/types/src/internal/annotations/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/annotations/annotations.test.d.ts.map +0 -1
- package/dist/types/src/internal/annotations/index.d.ts +0 -3
- package/dist/types/src/internal/annotations/index.d.ts.map +0 -1
- package/dist/types/src/internal/annotations/util.d.ts.map +0 -1
- package/dist/types/src/internal/api/annotations.d.ts +0 -23
- package/dist/types/src/internal/api/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/api/entity.d.ts +0 -13
- package/dist/types/src/internal/api/entity.d.ts.map +0 -1
- package/dist/types/src/internal/api/index.d.ts.map +0 -1
- package/dist/types/src/internal/api/meta.d.ts.map +0 -1
- package/dist/types/src/internal/api/sorting.d.ts.map +0 -1
- package/dist/types/src/internal/api/version.d.ts.map +0 -1
- package/dist/types/src/internal/entities/entity.d.ts +0 -20
- package/dist/types/src/internal/entities/entity.d.ts.map +0 -1
- package/dist/types/src/internal/entities/index.d.ts +0 -6
- package/dist/types/src/internal/entities/index.d.ts.map +0 -1
- package/dist/types/src/internal/entities/model.d.ts +0 -79
- package/dist/types/src/internal/entities/model.d.ts.map +0 -1
- package/dist/types/src/internal/entities/object.d.ts.map +0 -1
- package/dist/types/src/internal/entities/relation.d.ts +0 -62
- package/dist/types/src/internal/entities/relation.d.ts.map +0 -1
- package/dist/types/src/internal/entities/util.d.ts.map +0 -1
- package/dist/types/src/internal/formats/date.d.ts.map +0 -1
- package/dist/types/src/internal/formats/date.test.d.ts.map +0 -1
- package/dist/types/src/internal/formats/format.d.ts.map +0 -1
- package/dist/types/src/internal/formats/format.test.d.ts.map +0 -1
- package/dist/types/src/internal/formats/index.d.ts.map +0 -1
- package/dist/types/src/internal/formats/number.d.ts.map +0 -1
- package/dist/types/src/internal/formats/object.d.ts.map +0 -1
- package/dist/types/src/internal/formats/select.d.ts.map +0 -1
- package/dist/types/src/internal/formats/string.d.ts.map +0 -1
- package/dist/types/src/internal/formats/types.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/annotations.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/effect-schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/index.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema-normalize.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema-type.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema.d.ts.map +0 -1
- package/dist/types/src/internal/json-schema/json-schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/clone.d.ts.map +0 -1
- package/dist/types/src/internal/object/common.d.ts.map +0 -1
- package/dist/types/src/internal/object/create-object.d.ts.map +0 -1
- package/dist/types/src/internal/object/create-object.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/deleted.d.ts.map +0 -1
- package/dist/types/src/internal/object/ids.d.ts +0 -6
- package/dist/types/src/internal/object/ids.d.ts.map +0 -1
- package/dist/types/src/internal/object/index.d.ts.map +0 -1
- package/dist/types/src/internal/object/inspect.d.ts.map +0 -1
- package/dist/types/src/internal/object/json-serializer.d.ts.map +0 -1
- package/dist/types/src/internal/object/json-serializer.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/schema-validator.d.ts +0 -2
- package/dist/types/src/internal/object/schema-validator.d.ts.map +0 -1
- package/dist/types/src/internal/object/schema-validator.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/set-value.d.ts.map +0 -1
- package/dist/types/src/internal/object/set-value.test.d.ts.map +0 -1
- package/dist/types/src/internal/object/snapshot.d.ts.map +0 -1
- package/dist/types/src/internal/object/typed-object.d.ts.map +0 -1
- package/dist/types/src/internal/object/typed-object.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/change-context.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/change.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/define-hidden-property.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/errors.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/event-batch.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/handler.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/index.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/json-serializer.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/make-object.d.ts +0 -14
- package/dist/types/src/internal/proxy/make-object.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/ownership.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/proxy-types.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/proxy-utils.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/reactive-array.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/schema-validator.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/schema.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/symbols.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/typed-handler.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/typed-handler.test.d.ts.map +0 -1
- package/dist/types/src/internal/proxy/typed-object.test.d.ts.map +0 -1
- package/dist/types/src/internal/ref/index.d.ts.map +0 -1
- package/dist/types/src/internal/ref/ref-array.d.ts.map +0 -1
- package/dist/types/src/internal/ref/ref.d.ts.map +0 -1
- package/dist/types/src/internal/ref/ref.test.d.ts.map +0 -1
- package/dist/types/src/internal/schema/compose.d.ts.map +0 -1
- package/dist/types/src/internal/schema/compose.test.d.ts.map +0 -1
- package/dist/types/src/internal/schema/echo-schema.d.ts +0 -181
- package/dist/types/src/internal/schema/echo-schema.d.ts.map +0 -1
- package/dist/types/src/internal/schema/index.d.ts +0 -4
- package/dist/types/src/internal/schema/index.d.ts.map +0 -1
- package/dist/types/src/internal/schema/manipulation.d.ts.map +0 -1
- package/dist/types/src/internal/schema/persistent-schema.d.ts +0 -20
- package/dist/types/src/internal/schema/persistent-schema.d.ts.map +0 -1
- package/dist/types/src/internal/types/base.d.ts.map +0 -1
- package/dist/types/src/internal/types/entity.d.ts +0 -37
- package/dist/types/src/internal/types/entity.d.ts.map +0 -1
- package/dist/types/src/internal/types/index.d.ts.map +0 -1
- package/dist/types/src/internal/types/meta.d.ts.map +0 -1
- package/dist/types/src/internal/types/typename.d.ts.map +0 -1
- package/dist/types/src/internal/types/version.d.ts.map +0 -1
- package/src/internal/annotations/annotations.test.ts +0 -96
- package/src/internal/api/annotations.ts +0 -60
- package/src/internal/entities/entity.ts +0 -126
- package/src/internal/entities/relation.ts +0 -171
- package/src/internal/entities/util.ts +0 -33
- package/src/internal/object/create-object.ts +0 -95
- package/src/internal/object/ids.ts +0 -12
- package/src/internal/object/json-serializer.test.ts +0 -98
- package/src/internal/object/typed-object.test.ts +0 -34
- package/src/internal/proxy/schema.test.ts +0 -145
- package/src/internal/schema/echo-schema.ts +0 -424
- package/src/internal/schema/index.ts +0 -7
- package/src/internal/schema/persistent-schema.ts +0 -28
- package/src/internal/types/entity.ts +0 -54
- package/src/internal/types/typename.ts +0 -55
- /package/dist/lib/neutral/{chunk-OMUPQMLR.mjs.map → chunk-V72DY6LU.mjs.map} +0 -0
- /package/dist/types/src/internal/{annotations → Annotation}/annotations.test.d.ts +0 -0
- /package/dist/types/src/internal/{entities → Entity}/util.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/date.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/date.test.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/format.test.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/number.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/object.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/select.d.ts +0 -0
- /package/dist/types/src/internal/{formats → Format}/string.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/effect-schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/index.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema-normalize.d.ts +0 -0
- /package/dist/types/src/internal/{json-schema → JsonSchema}/json-schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/clone.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/common.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/create-object.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/inspect.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/json-serializer.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/schema-validator.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/set-value.test.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/snapshot.d.ts +0 -0
- /package/dist/types/src/internal/{object → Obj}/typed-object.test.d.ts +0 -0
- /package/dist/types/src/internal/{ref → Ref}/index.d.ts +0 -0
- /package/dist/types/src/internal/{ref → Ref}/ref.test.d.ts +0 -0
- /package/dist/types/src/internal/{schema → Type}/compose.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/change.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/define-hidden-property.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/event-batch.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/handler.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/index.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/json-serializer.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/ownership.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/proxy-types.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/proxy-utils.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/schema-validator.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/schema.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/symbols.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/typed-handler.test.d.ts +0 -0
- /package/dist/types/src/internal/{proxy → common/proxy}/typed-object.test.d.ts +0 -0
- /package/src/internal/{formats → Format}/format.ts +0 -0
- /package/src/internal/{formats → Format}/number.ts +0 -0
- /package/src/internal/{formats → Format}/object.ts +0 -0
- /package/src/internal/{formats → Format}/select.ts +0 -0
- /package/src/internal/{formats → Format}/string.ts +0 -0
- /package/src/internal/{json-schema → JsonSchema}/effect-schema.test.ts +0 -0
- /package/src/internal/{json-schema → JsonSchema}/index.ts +0 -0
- /package/src/internal/{json-schema → JsonSchema}/json-schema-normalize.ts +0 -0
- /package/src/internal/{object → Obj}/schema-validator.test.ts +0 -0
- /package/src/internal/{ref → Ref}/index.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/define-hidden-property.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/event-batch.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/index.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/proxy-types.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/proxy-utils.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/schema-validator.ts +0 -0
- /package/src/internal/{proxy → common/proxy}/symbols.ts +0 -0
package/dist/lib/neutral/Obj.mjs
CHANGED
|
@@ -2,82 +2,97 @@ import {
|
|
|
2
2
|
ID,
|
|
3
3
|
Meta,
|
|
4
4
|
Parent,
|
|
5
|
+
Unknown,
|
|
6
|
+
VersionTypeId,
|
|
5
7
|
addTag,
|
|
6
|
-
change,
|
|
7
8
|
clone,
|
|
9
|
+
compareVersions,
|
|
10
|
+
decodeVersion,
|
|
8
11
|
deleteKeys,
|
|
12
|
+
encodeVersion,
|
|
9
13
|
fromJSON,
|
|
10
|
-
getDXN,
|
|
11
14
|
getDatabase,
|
|
12
15
|
getDescription,
|
|
13
16
|
getKeys,
|
|
14
17
|
getLabel,
|
|
15
18
|
getMeta,
|
|
16
19
|
getParent,
|
|
17
|
-
|
|
20
|
+
getReactive,
|
|
21
|
+
getReactiveOption,
|
|
22
|
+
getReactiveOrThrow,
|
|
18
23
|
getSnapshot,
|
|
19
|
-
|
|
24
|
+
getType,
|
|
25
|
+
getTypeURI,
|
|
20
26
|
getTypename,
|
|
27
|
+
getURI,
|
|
21
28
|
getValue,
|
|
22
29
|
instanceOf,
|
|
23
30
|
isDeleted,
|
|
24
31
|
isObject,
|
|
32
|
+
isSnapshot,
|
|
33
|
+
isVersion,
|
|
25
34
|
make,
|
|
26
35
|
removeTag,
|
|
27
36
|
setDescription,
|
|
28
37
|
setLabel,
|
|
29
38
|
setParent,
|
|
30
39
|
setValue,
|
|
40
|
+
snapshotOf,
|
|
31
41
|
sort,
|
|
32
42
|
sortByLabel,
|
|
33
43
|
sortByTypename,
|
|
34
44
|
subscribe,
|
|
35
45
|
toJSON,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
import {
|
|
40
|
-
VersionTypeId,
|
|
41
|
-
compareVersions,
|
|
42
|
-
decodeVersion,
|
|
43
|
-
encodeVersion,
|
|
44
|
-
isVersion,
|
|
46
|
+
update,
|
|
47
|
+
updateFrom,
|
|
48
|
+
version,
|
|
45
49
|
versionValid
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
50
|
+
} from "./chunk-FFCN66OF.mjs";
|
|
51
|
+
import "./chunk-4SYHDOQA.mjs";
|
|
52
|
+
import "./chunk-L65CW5EI.mjs";
|
|
53
|
+
import "./chunk-UQAMAXDU.mjs";
|
|
54
|
+
import "./chunk-LNZIPZX6.mjs";
|
|
55
|
+
import "./chunk-52NG2XEE.mjs";
|
|
56
|
+
import "./chunk-SSDGRJ3A.mjs";
|
|
57
|
+
import "./chunk-O2EOH7XQ.mjs";
|
|
58
|
+
import "./chunk-K5RH2PBH.mjs";
|
|
59
|
+
import "./chunk-ZII2BGPM.mjs";
|
|
60
|
+
import "./chunk-KHRAQDYX.mjs";
|
|
61
|
+
import "./chunk-A5HDDVKS.mjs";
|
|
62
|
+
import "./chunk-GOHDOJE3.mjs";
|
|
52
63
|
import "./chunk-J5LGTIGS.mjs";
|
|
53
64
|
export {
|
|
54
65
|
ID,
|
|
55
66
|
Meta,
|
|
56
67
|
Parent,
|
|
68
|
+
Unknown,
|
|
57
69
|
VersionTypeId,
|
|
58
70
|
addTag,
|
|
59
|
-
change,
|
|
60
71
|
clone,
|
|
61
72
|
compareVersions,
|
|
62
73
|
decodeVersion,
|
|
63
74
|
deleteKeys,
|
|
64
75
|
encodeVersion,
|
|
65
76
|
fromJSON,
|
|
66
|
-
getDXN,
|
|
67
77
|
getDatabase,
|
|
68
78
|
getDescription,
|
|
69
79
|
getKeys,
|
|
70
80
|
getLabel,
|
|
71
81
|
getMeta,
|
|
72
82
|
getParent,
|
|
73
|
-
|
|
83
|
+
getReactive,
|
|
84
|
+
getReactiveOption,
|
|
85
|
+
getReactiveOrThrow,
|
|
74
86
|
getSnapshot,
|
|
75
|
-
|
|
87
|
+
getType,
|
|
88
|
+
getTypeURI,
|
|
76
89
|
getTypename,
|
|
90
|
+
getURI,
|
|
77
91
|
getValue,
|
|
78
92
|
instanceOf,
|
|
79
93
|
isDeleted,
|
|
80
94
|
isObject,
|
|
95
|
+
isSnapshot,
|
|
81
96
|
isVersion,
|
|
82
97
|
make,
|
|
83
98
|
removeTag,
|
|
@@ -85,11 +100,14 @@ export {
|
|
|
85
100
|
setLabel,
|
|
86
101
|
setParent,
|
|
87
102
|
setValue,
|
|
103
|
+
snapshotOf,
|
|
88
104
|
sort,
|
|
89
105
|
sortByLabel,
|
|
90
106
|
sortByTypename,
|
|
91
107
|
subscribe,
|
|
92
108
|
toJSON,
|
|
109
|
+
update,
|
|
110
|
+
updateFrom,
|
|
93
111
|
version,
|
|
94
112
|
versionValid
|
|
95
113
|
};
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
all,
|
|
3
|
+
from,
|
|
3
4
|
fromAst,
|
|
4
5
|
is,
|
|
6
|
+
pretty,
|
|
5
7
|
select,
|
|
6
8
|
type,
|
|
7
9
|
without
|
|
8
|
-
} from "./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-
|
|
10
|
+
} from "./chunk-J7QWJQQV.mjs";
|
|
11
|
+
import "./chunk-UN7K472Q.mjs";
|
|
12
|
+
import "./chunk-F625JEZB.mjs";
|
|
13
|
+
import "./chunk-FFCN66OF.mjs";
|
|
14
|
+
import "./chunk-4SYHDOQA.mjs";
|
|
15
|
+
import "./chunk-L65CW5EI.mjs";
|
|
16
|
+
import "./chunk-UQAMAXDU.mjs";
|
|
17
|
+
import "./chunk-LNZIPZX6.mjs";
|
|
18
|
+
import "./chunk-52NG2XEE.mjs";
|
|
19
|
+
import "./chunk-SSDGRJ3A.mjs";
|
|
20
|
+
import "./chunk-O2EOH7XQ.mjs";
|
|
21
|
+
import "./chunk-K5RH2PBH.mjs";
|
|
22
|
+
import "./chunk-4U7OD55H.mjs";
|
|
23
|
+
import "./chunk-ZII2BGPM.mjs";
|
|
24
|
+
import "./chunk-KHRAQDYX.mjs";
|
|
25
|
+
import "./chunk-A5HDDVKS.mjs";
|
|
26
|
+
import "./chunk-GOHDOJE3.mjs";
|
|
17
27
|
import "./chunk-J5LGTIGS.mjs";
|
|
18
28
|
export {
|
|
19
29
|
all,
|
|
30
|
+
from,
|
|
20
31
|
fromAst,
|
|
21
32
|
is,
|
|
33
|
+
pretty,
|
|
22
34
|
select,
|
|
23
35
|
type,
|
|
24
36
|
without
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-V72DY6LU.mjs";
|
|
2
2
|
//# sourceMappingURL=QueryResult.mjs.map
|
package/dist/lib/neutral/Ref.mjs
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Array,
|
|
3
|
-
|
|
3
|
+
Ref,
|
|
4
|
+
fromURI,
|
|
5
|
+
hasObjectId,
|
|
4
6
|
isRef,
|
|
5
7
|
isRefType,
|
|
6
8
|
make
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-4SYHDOQA.mjs";
|
|
10
|
+
import "./chunk-52NG2XEE.mjs";
|
|
11
|
+
import "./chunk-K5RH2PBH.mjs";
|
|
12
|
+
import "./chunk-ZII2BGPM.mjs";
|
|
13
|
+
import "./chunk-KHRAQDYX.mjs";
|
|
14
|
+
import "./chunk-A5HDDVKS.mjs";
|
|
15
|
+
import "./chunk-GOHDOJE3.mjs";
|
|
14
16
|
import "./chunk-J5LGTIGS.mjs";
|
|
15
17
|
export {
|
|
16
18
|
Array,
|
|
17
|
-
|
|
19
|
+
Ref,
|
|
20
|
+
fromURI,
|
|
21
|
+
hasObjectId,
|
|
18
22
|
isRef,
|
|
19
23
|
isRefType,
|
|
20
24
|
make
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Meta,
|
|
2
3
|
Source,
|
|
3
4
|
Target,
|
|
5
|
+
Unknown,
|
|
6
|
+
VersionTypeId,
|
|
4
7
|
addTag,
|
|
5
|
-
change,
|
|
6
8
|
deleteKeys,
|
|
7
|
-
getDXN,
|
|
8
9
|
getDatabase,
|
|
9
10
|
getDescription,
|
|
10
11
|
getKeys,
|
|
11
12
|
getLabel,
|
|
12
13
|
getMeta,
|
|
13
|
-
getSchema,
|
|
14
14
|
getSnapshot,
|
|
15
15
|
getSource,
|
|
16
|
-
|
|
16
|
+
getSourceURI,
|
|
17
17
|
getTarget,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
getTargetURI,
|
|
19
|
+
getType,
|
|
20
|
+
getTypeURI,
|
|
20
21
|
getTypename,
|
|
22
|
+
getURI,
|
|
21
23
|
getValue,
|
|
24
|
+
instanceOf,
|
|
22
25
|
isDeleted,
|
|
23
26
|
isRelation,
|
|
27
|
+
isSnapshot,
|
|
28
|
+
isVersion,
|
|
24
29
|
make,
|
|
25
30
|
removeTag,
|
|
26
31
|
setDescription,
|
|
@@ -31,43 +36,48 @@ import {
|
|
|
31
36
|
sortByTypename,
|
|
32
37
|
subscribe,
|
|
33
38
|
toJSON,
|
|
39
|
+
update,
|
|
34
40
|
version
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-Q7ID37KF.mjs";
|
|
42
|
+
import "./chunk-L65CW5EI.mjs";
|
|
43
|
+
import "./chunk-UQAMAXDU.mjs";
|
|
44
|
+
import "./chunk-LNZIPZX6.mjs";
|
|
45
|
+
import "./chunk-52NG2XEE.mjs";
|
|
46
|
+
import "./chunk-SSDGRJ3A.mjs";
|
|
47
|
+
import "./chunk-O2EOH7XQ.mjs";
|
|
48
|
+
import "./chunk-K5RH2PBH.mjs";
|
|
49
|
+
import "./chunk-ZII2BGPM.mjs";
|
|
50
|
+
import "./chunk-KHRAQDYX.mjs";
|
|
51
|
+
import "./chunk-A5HDDVKS.mjs";
|
|
52
|
+
import "./chunk-GOHDOJE3.mjs";
|
|
46
53
|
import "./chunk-J5LGTIGS.mjs";
|
|
47
54
|
export {
|
|
55
|
+
Meta,
|
|
48
56
|
Source,
|
|
49
57
|
Target,
|
|
58
|
+
Unknown,
|
|
50
59
|
VersionTypeId,
|
|
51
60
|
addTag,
|
|
52
|
-
change,
|
|
53
61
|
deleteKeys,
|
|
54
|
-
getDXN,
|
|
55
62
|
getDatabase,
|
|
56
63
|
getDescription,
|
|
57
64
|
getKeys,
|
|
58
65
|
getLabel,
|
|
59
66
|
getMeta,
|
|
60
|
-
getSchema,
|
|
61
67
|
getSnapshot,
|
|
62
68
|
getSource,
|
|
63
|
-
|
|
69
|
+
getSourceURI,
|
|
64
70
|
getTarget,
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
getTargetURI,
|
|
72
|
+
getType,
|
|
73
|
+
getTypeURI,
|
|
67
74
|
getTypename,
|
|
75
|
+
getURI,
|
|
68
76
|
getValue,
|
|
77
|
+
instanceOf,
|
|
69
78
|
isDeleted,
|
|
70
79
|
isRelation,
|
|
80
|
+
isSnapshot,
|
|
71
81
|
isVersion,
|
|
72
82
|
make,
|
|
73
83
|
removeTag,
|
|
@@ -79,6 +89,7 @@ export {
|
|
|
79
89
|
sortByTypename,
|
|
80
90
|
subscribe,
|
|
81
91
|
toJSON,
|
|
92
|
+
update,
|
|
82
93
|
version
|
|
83
94
|
};
|
|
84
95
|
//# sourceMappingURL=Relation.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-V5NE2X7Y.mjs";
|
|
2
2
|
//# sourceMappingURL=SchemaRegistry.mjs.map
|
package/dist/lib/neutral/Tag.mjs
CHANGED
|
@@ -4,16 +4,20 @@ import {
|
|
|
4
4
|
findTagByLabel,
|
|
5
5
|
make,
|
|
6
6
|
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-
|
|
7
|
+
} from "./chunk-EZ4XJFHJ.mjs";
|
|
8
|
+
import "./chunk-FFCN66OF.mjs";
|
|
9
|
+
import "./chunk-4SYHDOQA.mjs";
|
|
10
|
+
import "./chunk-L65CW5EI.mjs";
|
|
11
|
+
import "./chunk-UQAMAXDU.mjs";
|
|
12
|
+
import "./chunk-LNZIPZX6.mjs";
|
|
13
|
+
import "./chunk-52NG2XEE.mjs";
|
|
14
|
+
import "./chunk-SSDGRJ3A.mjs";
|
|
15
|
+
import "./chunk-O2EOH7XQ.mjs";
|
|
16
|
+
import "./chunk-K5RH2PBH.mjs";
|
|
17
|
+
import "./chunk-ZII2BGPM.mjs";
|
|
18
|
+
import "./chunk-KHRAQDYX.mjs";
|
|
19
|
+
import "./chunk-A5HDDVKS.mjs";
|
|
20
|
+
import "./chunk-GOHDOJE3.mjs";
|
|
17
21
|
import "./chunk-J5LGTIGS.mjs";
|
|
18
22
|
export {
|
|
19
23
|
Tag,
|
|
@@ -1,47 +1,63 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
InstancePhantomId,
|
|
3
|
+
Type,
|
|
4
|
+
addFields,
|
|
5
|
+
assertObject,
|
|
6
|
+
expectRelation,
|
|
7
|
+
expectTypeKind,
|
|
8
|
+
getDatabase,
|
|
8
9
|
getMeta,
|
|
10
|
+
getSchema,
|
|
9
11
|
getTypename,
|
|
12
|
+
getURI,
|
|
10
13
|
getVersion,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
14
|
+
isObject,
|
|
15
|
+
isRelation,
|
|
16
|
+
isType,
|
|
17
|
+
isTypeKindSchema,
|
|
18
|
+
makeObject,
|
|
19
|
+
makeObjectFromJsonSchema,
|
|
20
|
+
makeRelation,
|
|
21
|
+
makeRelationFromJsonSchema,
|
|
22
|
+
removeFields,
|
|
23
|
+
update,
|
|
24
|
+
updateFieldPropertyName,
|
|
25
|
+
updateFields
|
|
26
|
+
} from "./chunk-UQAMAXDU.mjs";
|
|
27
|
+
import "./chunk-LNZIPZX6.mjs";
|
|
28
|
+
import "./chunk-52NG2XEE.mjs";
|
|
29
|
+
import "./chunk-SSDGRJ3A.mjs";
|
|
30
|
+
import "./chunk-O2EOH7XQ.mjs";
|
|
31
|
+
import "./chunk-K5RH2PBH.mjs";
|
|
32
|
+
import "./chunk-ZII2BGPM.mjs";
|
|
33
|
+
import "./chunk-KHRAQDYX.mjs";
|
|
34
|
+
import "./chunk-A5HDDVKS.mjs";
|
|
35
|
+
import "./chunk-GOHDOJE3.mjs";
|
|
27
36
|
import "./chunk-J5LGTIGS.mjs";
|
|
28
37
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
InstancePhantomId,
|
|
39
|
+
Type,
|
|
40
|
+
addFields,
|
|
41
|
+
assertObject,
|
|
42
|
+
expectRelation,
|
|
43
|
+
expectTypeKind,
|
|
44
|
+
getDatabase,
|
|
36
45
|
getMeta,
|
|
46
|
+
getSchema,
|
|
37
47
|
getTypename,
|
|
48
|
+
getURI,
|
|
38
49
|
getVersion,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
isObject,
|
|
51
|
+
isRelation,
|
|
52
|
+
isType,
|
|
53
|
+
isTypeKindSchema,
|
|
54
|
+
makeObject,
|
|
55
|
+
makeObjectFromJsonSchema,
|
|
56
|
+
makeRelation,
|
|
57
|
+
makeRelationFromJsonSchema,
|
|
58
|
+
removeFields,
|
|
59
|
+
update,
|
|
60
|
+
updateFieldPropertyName,
|
|
61
|
+
updateFields
|
|
46
62
|
};
|
|
47
63
|
//# sourceMappingURL=Type.mjs.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RefArray
|
|
3
|
+
} from "./chunk-52NG2XEE.mjs";
|
|
1
4
|
import {
|
|
2
5
|
Ref,
|
|
3
|
-
RefArray,
|
|
4
6
|
getSchemaReference
|
|
5
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K5RH2PBH.mjs";
|
|
6
8
|
import {
|
|
7
9
|
__export
|
|
8
10
|
} from "./chunk-J5LGTIGS.mjs";
|
|
@@ -11,17 +13,21 @@ import {
|
|
|
11
13
|
var Ref_exports = {};
|
|
12
14
|
__export(Ref_exports, {
|
|
13
15
|
Array: () => Array,
|
|
14
|
-
|
|
16
|
+
Ref: () => Ref2,
|
|
17
|
+
fromURI: () => fromURI,
|
|
18
|
+
hasObjectId: () => hasObjectId,
|
|
15
19
|
isRef: () => isRef,
|
|
16
20
|
isRefType: () => isRefType,
|
|
17
21
|
make: () => make
|
|
18
22
|
});
|
|
19
23
|
import * as Option from "effect/Option";
|
|
20
24
|
import * as SchemaAST from "effect/SchemaAST";
|
|
25
|
+
var Ref2 = Ref;
|
|
21
26
|
var Array = RefArray;
|
|
22
27
|
var isRef = Ref.isRef;
|
|
23
28
|
var make = Ref.make;
|
|
24
|
-
var
|
|
29
|
+
var fromURI = (uri) => Ref.fromURI(uri);
|
|
30
|
+
var hasObjectId = Ref.hasObjectId;
|
|
25
31
|
var isRefType = (ast) => {
|
|
26
32
|
return SchemaAST.getAnnotation(ast, SchemaAST.JSONSchemaAnnotationId).pipe(Option.flatMap((jsonSchema) => "$id" in jsonSchema ? Option.some(jsonSchema) : Option.none()), Option.flatMap((jsonSchema) => {
|
|
27
33
|
const { typename } = getSchemaReference(jsonSchema) ?? {};
|
|
@@ -30,11 +36,13 @@ var isRefType = (ast) => {
|
|
|
30
36
|
};
|
|
31
37
|
|
|
32
38
|
export {
|
|
39
|
+
Ref2 as Ref,
|
|
33
40
|
Array,
|
|
34
41
|
isRef,
|
|
35
42
|
make,
|
|
36
|
-
|
|
43
|
+
fromURI,
|
|
44
|
+
hasObjectId,
|
|
37
45
|
isRefType,
|
|
38
46
|
Ref_exports
|
|
39
47
|
};
|
|
40
|
-
//# sourceMappingURL=chunk-
|
|
48
|
+
//# sourceMappingURL=chunk-4SYHDOQA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/Ref.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Option from 'effect/Option';\nimport type * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport { type URI } from '@dxos/keys';\n\nimport type * as Entity from './Entity';\nimport type * as internal from './internal';\nimport * as refInternal from './internal/Ref';\nimport type * as JsonSchema from './JsonSchema';\nimport type * as Obj from './Obj';\n// eslint-disable-next-line @dxos/rules/import-as-namespace\nimport type * as TypeNs from './Type';\n\n/**\n * Instance type for a reference.\n *\n * Reference can point to any object or relation.\n * References are lazy loaded.\n *\n * `ref.dxn` is the DXN of the referenced object.\n *\n * @example\n * ```ts\n * const taskRef: Ref<Task> = Ref.make(task);\n *\n * await taskRef.load(); // Returns Promise<Task>\n * yield* Database.load(taskRef); // Effectful version.\n *\n * database.makeRef(dxn); // Create a ref from a DXN.\n * ```\n */\nexport type Ref<T> = refInternal.Ref<T>;\nexport type Unknown = refInternal.Ref<Obj.Unknown>;\n\n/**\n * Factory function to create a Ref schema for the given target schema.\n * Use this in schema definitions to declare reference fields.\n *\n * @example\n * ```ts\n * const Task = Schema.Struct({\n * assignee: Ref.Ref(Person), // Creates a Ref schema\n * }).pipe(Type.makeObject(DXN.make('com.example.type.task', '0.1.0')));\n * ```\n */\nexport const Ref: {\n <S extends TypeNs.AnyObj | TypeNs.AnyRelation>(type: S): RefSchema<TypeNs.InstanceType<S> & Obj.Unknown>;\n\n // `Type.Type` entities (the meta-schema kind) can be referenced too — e.g. a\n // trigger that points to a stored function/workflow definition.\n <T extends TypeNs.Type<any>>(type: T): RefSchema<TypeNs.InstanceType<T>>;\n\n // Schema-side overload for the well-known \"any object\" / \"any relation\" schemas.\n // Other raw `Schema.Schema` values are intentionally rejected — callers should\n // pass a `Type.Type` entity instead.\n <S extends internal.UnknownTypeSchema<any, any>>(schema: S): RefSchema<Schema.Schema.Type<S> & Obj.Unknown>;\n} = refInternal.Ref as any;\n\nexport const Array = refInternal.RefArray;\n\n/**\n * TypeScript type for a Ref schema.\n * This is the type of the SCHEMA itself, not the runtime ref instance.\n * For the instance type, use `Ref.Ref<T>` from the Ref module.\n *\n * @example\n * ```ts\n * // Schema type annotation (rarely needed, usually inferred):\n * const refSchema: Ref.RefSchema<typeof Task> = Ref.Ref(Task);\n *\n * // Instance type annotation (use Ref.Ref instead):\n * const refInstance: Ref.Ref<Task> = Ref.make(task);\n * ```\n */\n// TODO(dmaretskyi): Investigate if we can remove this type.\n// Post DX-836 it will become just `Schema.Schema<Ref.Ref<T>>`.\n// NOTE: This could be Type.Ref<T> instead, but since it going to be removed, it's better to keep it here, self-contained.\nexport interface RefSchema<T extends Entity.Unknown> extends refInternal.RefSchema<T> {}\n\n/**\n * Extract reference target.\n */\nexport type Target<R extends Unknown> = R extends refInternal.Ref<infer T> ? T : never;\n\n/**\n * Reference resolver.\n */\nexport type Resolver = refInternal.RefResolver;\n\nexport const isRef: (value: unknown) => value is Unknown = refInternal.Ref.isRef;\n\nexport const make = refInternal.Ref.make;\n\n// TODO(dmaretskyi): Consider just allowing `make` to accept URI.\nexport const fromURI = (uri: URI.URI): refInternal.Ref<any> => refInternal.Ref.fromURI(uri);\n\nexport const hasObjectId = refInternal.Ref.hasObjectId;\n\n// TODO(wittjosiah): Factor out?\nexport const isRefType = (ast: SchemaAST.AST): boolean => {\n return SchemaAST.getAnnotation<JsonSchema.JsonSchema>(ast, SchemaAST.JSONSchemaAnnotationId).pipe(\n Option.flatMap((jsonSchema) => ('$id' in jsonSchema ? Option.some(jsonSchema) : Option.none())),\n Option.flatMap((jsonSchema) => {\n const { typename } = refInternal.getSchemaReference(jsonSchema) ?? {};\n return typename ? Option.some(true) : Option.some(false);\n }),\n Option.getOrElse(() => false),\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAAA;;;aAAAA;EAAA;;;;;;AAMA,YAAYC,YAAY;AAExB,YAAYC,eAAe;AA4CpB,IAAMC,OAWGA;AAET,IAAMC,QAAoBC;AA+B1B,IAAMC,QAA0DH,IAAIG;AAEpE,IAAMC,OAAmBJ,IAAII;AAG7B,IAAMC,UAAU,CAACC,QAAmDN,IAAIK,QAAQC,GAAAA;AAEhF,IAAMC,cAA0BP,IAAIO;AAGpC,IAAMC,YAAY,CAACC,QAAAA;AACxB,SAAiBC,wBAAqCD,KAAeE,gCAAsB,EAAEC,KACpFC,eAAQ,CAACC,eAAgB,SAASA,aAAoBC,YAAKD,UAAAA,IAAqBE,YAAI,CAAA,GACpFH,eAAQ,CAACC,eAAAA;AACd,UAAM,EAAEG,SAAQ,IAAiBC,mBAAmBJ,UAAAA,KAAe,CAAC;AACpE,WAAOG,WAAkBF,YAAK,IAAA,IAAeA,YAAK,KAAA;EACpD,CAAA,GACOI,iBAAU,MAAM,KAAA,CAAA;AAE3B;",
|
|
6
|
+
"names": ["Ref", "Option", "SchemaAST", "Ref", "Array", "RefArray", "isRef", "make", "fromURI", "uri", "hasObjectId", "isRefType", "ast", "getAnnotation", "JSONSchemaAnnotationId", "pipe", "flatMap", "jsonSchema", "some", "none", "typename", "getSchemaReference", "getOrElse"]
|
|
7
|
+
}
|
|
@@ -2,6 +2,8 @@ import {
|
|
|
2
2
|
DescriptionAnnotation,
|
|
3
3
|
FormInputAnnotation,
|
|
4
4
|
GeneratorAnnotation,
|
|
5
|
+
IconAnnotation,
|
|
6
|
+
IconFromRefAnnotation,
|
|
5
7
|
LabelAnnotation,
|
|
6
8
|
ReferenceAnnotation,
|
|
7
9
|
SystemTypeAnnotation,
|
|
@@ -12,7 +14,7 @@ import {
|
|
|
12
14
|
makeUserAnnotation,
|
|
13
15
|
setDescriptionWithSchema,
|
|
14
16
|
setLabelWithSchema
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KHRAQDYX.mjs";
|
|
16
18
|
import {
|
|
17
19
|
__export
|
|
18
20
|
} from "./chunk-J5LGTIGS.mjs";
|
|
@@ -23,6 +25,8 @@ __export(Annotation_exports, {
|
|
|
23
25
|
DescriptionAnnotation: () => DescriptionAnnotation,
|
|
24
26
|
FormInputAnnotation: () => FormInputAnnotation,
|
|
25
27
|
GeneratorAnnotation: () => GeneratorAnnotation,
|
|
28
|
+
IconAnnotation: () => IconAnnotation,
|
|
29
|
+
IconFromRefAnnotation: () => IconFromRefAnnotation,
|
|
26
30
|
LabelAnnotation: () => LabelAnnotation,
|
|
27
31
|
ReferenceAnnotation: () => ReferenceAnnotation,
|
|
28
32
|
SystemTypeAnnotation: () => SystemTypeAnnotation,
|
|
@@ -40,4 +44,4 @@ export {
|
|
|
40
44
|
make,
|
|
41
45
|
Annotation_exports
|
|
42
46
|
};
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
47
|
+
//# sourceMappingURL=chunk-4U7OD55H.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 FormInputAnnotation,\n GeneratorAnnotation,\n LabelAnnotation,\n ReferenceAnnotation,\n SystemTypeAnnotation,\n TypeAnnotation,\n getDescriptionWithSchema,\n getLabelWithSchema,\n getTypeAnnotation,\n setDescriptionWithSchema,\n setLabelWithSchema,\n IconAnnotation,\n IconFromRefAnnotation,\n} from './internal/Annotation';\n\nimport type * as Schema from 'effect/Schema';\n\nimport * as internalAnnotations from './internal/Annotation';\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>) => internalAnnotations.AnnotationHelper<T> =\n internalAnnotations.makeUserAnnotation;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;AA+CO,IAAMA,OACSC;",
|
|
6
|
+
"names": ["make", "makeUserAnnotation"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Ref
|
|
3
|
+
} from "./chunk-K5RH2PBH.mjs";
|
|
4
|
+
|
|
5
|
+
// src/internal/Ref/ref-array.ts
|
|
6
|
+
import { isNonNullable } from "@dxos/util";
|
|
7
|
+
var RefArray = Object.freeze({
|
|
8
|
+
/**
|
|
9
|
+
* @returns all resolved targets.
|
|
10
|
+
*/
|
|
11
|
+
targets: (refs) => {
|
|
12
|
+
return refs.map((ref) => ref.target).filter(isNonNullable);
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* Load all referenced objects.
|
|
16
|
+
*/
|
|
17
|
+
loadAll: (refs) => {
|
|
18
|
+
return Promise.all(refs.map((ref) => ref.load()));
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* Removes the ref with the given id.
|
|
22
|
+
*/
|
|
23
|
+
removeById: (refs, id) => {
|
|
24
|
+
const index = refs.findIndex(Ref.hasObjectId(id));
|
|
25
|
+
if (index >= 0) {
|
|
26
|
+
refs.splice(index, 1);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
RefArray
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chunk-52NG2XEE.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/internal/Ref/ref-array.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type ObjectId } from '@dxos/keys';\nimport { isNonNullable } from '@dxos/util';\n\nimport { type AnyEntity } from '../common/types';\nimport { Ref } from './ref';\n\n/**\n * Helper functions for working with arrays of refs.\n */\nexport const RefArray = Object.freeze({\n /**\n * @returns all resolved targets.\n */\n targets: <T extends AnyEntity>(refs: readonly Ref<T>[]): T[] => {\n return refs.map((ref) => ref.target).filter(isNonNullable);\n },\n\n /**\n * Load all referenced objects.\n */\n loadAll: <T extends AnyEntity>(refs: readonly Ref<T>[]): Promise<T[]> => {\n return Promise.all(refs.map((ref) => ref.load()));\n },\n\n /**\n * Removes the ref with the given id.\n */\n removeById: (refs: Ref<AnyEntity>[], id: ObjectId) => {\n const index = refs.findIndex(Ref.hasObjectId(id));\n if (index >= 0) {\n refs.splice(index, 1);\n }\n },\n});\n"],
|
|
5
|
+
"mappings": ";;;;;AAKA,SAASA,qBAAqB;AAQvB,IAAMC,WAAWC,OAAOC,OAAO;;;;EAIpCC,SAAS,CAAsBC,SAAAA;AAC7B,WAAOA,KAAKC,IAAI,CAACC,QAAQA,IAAIC,MAAM,EAAEC,OAAOC,aAAAA;EAC9C;;;;EAKAC,SAAS,CAAsBN,SAAAA;AAC7B,WAAOO,QAAQC,IAAIR,KAAKC,IAAI,CAACC,QAAQA,IAAIO,KAAI,CAAA,CAAA;EAC/C;;;;EAKAC,YAAY,CAACV,MAAwBW,OAAAA;AACnC,UAAMC,QAAQZ,KAAKa,UAAUC,IAAIC,YAAYJ,EAAAA,CAAAA;AAC7C,QAAIC,SAAS,GAAG;AACdZ,WAAKgB,OAAOJ,OAAO,CAAA;IACrB;EACF;AACF,CAAA;",
|
|
6
|
+
"names": ["isNonNullable", "RefArray", "Object", "freeze", "targets", "refs", "map", "ref", "target", "filter", "isNonNullable", "loadAll", "Promise", "all", "load", "removeById", "id", "index", "findIndex", "Ref", "hasObjectId", "splice"]
|
|
7
|
+
}
|