@adobe/data 0.9.75 → 0.9.77
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/dist/ecs/database/create-plugin.type-test.js +5 -5
- package/dist/ecs/database/create-plugin.type-test.js.map +1 -1
- package/dist/ecs/database/database.reset.test.js +2 -2
- package/dist/ecs/database/database.reset.test.js.map +1 -1
- package/dist/ecs/database/observed/create-observed-database.js +1 -1
- package/dist/ecs/database/observed/create-observed-database.js.map +1 -1
- package/dist/ecs/database/transactional-store/apply-operations.d.ts +8 -0
- package/dist/ecs/database/transactional-store/apply-operations.js +23 -3
- package/dist/ecs/database/transactional-store/apply-operations.js.map +1 -1
- package/dist/ecs/database/transactional-store/create-transactional-store.js +12 -29
- package/dist/ecs/database/transactional-store/create-transactional-store.js.map +1 -1
- package/dist/ecs/database/transactional-store/create-transactional-store.test.js +65 -0
- package/dist/ecs/database/transactional-store/create-transactional-store.test.js.map +1 -1
- package/dist/ecs/entity/is-non-persistent.d.ts +3 -0
- package/dist/ecs/entity/is-non-persistent.js +3 -0
- package/dist/ecs/entity/is-non-persistent.js.map +1 -0
- package/dist/ecs/entity/is-non-persistent.test.d.ts +1 -0
- package/dist/ecs/entity/is-non-persistent.test.js +26 -0
- package/dist/ecs/entity/is-non-persistent.test.js.map +1 -0
- package/dist/ecs/entity/public.d.ts +1 -1
- package/dist/ecs/entity/public.js +1 -1
- package/dist/ecs/entity/public.js.map +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.d.ts +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.js +2 -2
- package/dist/ecs/entity-location-table/create-entity-location-table.js.map +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.test.js +1 -1
- package/dist/ecs/entity-location-table/create-entity-location-table.test.js.map +1 -1
- package/dist/ecs/optional-components.d.ts +0 -2
- package/dist/ecs/store/core/create-core.d.ts +11 -0
- package/dist/ecs/store/core/create-core.js +35 -10
- package/dist/ecs/store/core/create-core.js.map +1 -1
- package/dist/ecs/store/core/create-core.test.js +21 -21
- package/dist/ecs/store/core/create-core.test.js.map +1 -1
- package/dist/ecs/store/index.d.ts +1 -0
- package/dist/ecs/store/index.js +1 -0
- package/dist/ecs/store/index.js.map +1 -1
- package/dist/ecs/store/public/create-store.js +1 -1
- package/dist/ecs/store/public/create-store.js.map +1 -1
- package/dist/ecs/store/public/create-store.test.js +107 -1
- package/dist/ecs/store/public/create-store.test.js.map +1 -1
- package/dist/ecs/undo-redo-service/create-undo-redo-service.test.js +21 -0
- package/dist/ecs/undo-redo-service/create-undo-redo-service.test.js.map +1 -1
- package/dist/functions/serialization/codec.js +4 -0
- package/dist/functions/serialization/codec.js.map +1 -1
- package/dist/functions/serialization/serialization.test.js +16 -6
- package/dist/functions/serialization/serialization.test.js.map +1 -1
- package/dist/math/i32/public.d.ts +2 -1
- package/dist/math/i32/public.js +2 -1
- package/dist/math/i32/public.js.map +1 -1
- package/dist/math/i32/shift-right.d.ts +2 -0
- package/dist/math/i32/shift-right.js +3 -0
- package/dist/math/i32/shift-right.js.map +1 -0
- package/dist/math/u32/count-leading-zeros.d.ts +2 -0
- package/dist/math/u32/count-leading-zeros.js +3 -0
- package/dist/math/u32/count-leading-zeros.js.map +1 -0
- package/dist/math/u32/count-one-bits.d.ts +2 -0
- package/dist/math/u32/count-one-bits.js +11 -0
- package/dist/math/u32/count-one-bits.js.map +1 -0
- package/dist/math/u32/count-trailing-zeros.d.ts +2 -0
- package/dist/math/u32/count-trailing-zeros.js +14 -0
- package/dist/math/u32/count-trailing-zeros.js.map +1 -0
- package/dist/math/u32/public.d.ts +6 -1
- package/dist/math/u32/public.js +6 -1
- package/dist/math/u32/public.js.map +1 -1
- package/dist/math/u32/reverse-bits.d.ts +2 -0
- package/dist/math/u32/reverse-bits.js +11 -0
- package/dist/math/u32/reverse-bits.js.map +1 -0
- package/dist/math/u32/shift-right.d.ts +2 -0
- package/dist/math/u32/shift-right.js +3 -0
- package/dist/math/u32/shift-right.js.map +1 -0
- package/dist/math/vec2/f32/f32.d.ts +4 -0
- package/dist/math/vec2/f32/f32.js +3 -0
- package/dist/math/vec2/f32/f32.js.map +1 -0
- package/dist/math/vec2/f32/functions.d.ts +50 -0
- package/dist/math/vec2/f32/functions.js +87 -0
- package/dist/math/vec2/f32/functions.js.map +1 -0
- package/dist/math/vec2/f32/layout.d.ts +1 -0
- package/dist/math/vec2/f32/layout.js +5 -0
- package/dist/math/vec2/f32/layout.js.map +1 -0
- package/dist/math/vec2/f32/public.d.ts +3 -0
- package/dist/math/vec2/f32/public.js +5 -0
- package/dist/math/vec2/f32/public.js.map +1 -0
- package/dist/math/vec2/f32/schema.d.ts +11 -0
- package/dist/math/vec2/f32/schema.js +10 -0
- package/dist/math/vec2/f32/schema.js.map +1 -0
- package/dist/math/vec2/i32/functions.d.ts +21 -0
- package/dist/math/vec2/i32/functions.js +39 -0
- package/dist/math/vec2/i32/functions.js.map +1 -0
- package/dist/math/vec2/i32/i32.d.ts +4 -0
- package/dist/math/vec2/i32/i32.js +3 -0
- package/dist/math/vec2/i32/i32.js.map +1 -0
- package/dist/math/vec2/i32/layout.d.ts +1 -0
- package/dist/math/vec2/i32/layout.js +5 -0
- package/dist/math/vec2/i32/layout.js.map +1 -0
- package/dist/math/vec2/i32/public.d.ts +3 -0
- package/dist/math/vec2/i32/public.js +5 -0
- package/dist/math/vec2/i32/public.js.map +1 -0
- package/dist/math/vec2/i32/schema.d.ts +12 -0
- package/dist/math/vec2/i32/schema.js +10 -0
- package/dist/math/vec2/i32/schema.js.map +1 -0
- package/dist/math/vec2/index.d.ts +61 -4
- package/dist/math/vec2/index.js +56 -1
- package/dist/math/vec2/index.js.map +1 -1
- package/dist/math/vec2/public.d.ts +5 -3
- package/dist/math/vec2/public.js +6 -3
- package/dist/math/vec2/public.js.map +1 -1
- package/dist/math/vec2/u32/functions.d.ts +20 -0
- package/dist/math/vec2/u32/functions.js +58 -0
- package/dist/math/vec2/u32/functions.js.map +1 -0
- package/dist/math/vec2/u32/layout.d.ts +1 -0
- package/dist/math/vec2/u32/layout.js +5 -0
- package/dist/math/vec2/u32/layout.js.map +1 -0
- package/dist/math/vec2/u32/public.d.ts +3 -0
- package/dist/math/vec2/u32/public.js +5 -0
- package/dist/math/vec2/u32/public.js.map +1 -0
- package/dist/math/vec2/u32/schema.d.ts +12 -0
- package/dist/math/vec2/u32/schema.js +10 -0
- package/dist/math/vec2/u32/schema.js.map +1 -0
- package/dist/math/vec2/u32/u32.d.ts +4 -0
- package/dist/math/vec2/u32/u32.js +3 -0
- package/dist/math/vec2/u32/u32.js.map +1 -0
- package/dist/math/vec3/f32/f32.d.ts +4 -0
- package/dist/math/vec3/f32/f32.js +3 -0
- package/dist/math/vec3/f32/f32.js.map +1 -0
- package/dist/math/vec3/f32/functions.d.ts +59 -0
- package/dist/math/vec3/f32/functions.js +139 -0
- package/dist/math/vec3/f32/functions.js.map +1 -0
- package/dist/math/vec3/f32/layout.d.ts +1 -0
- package/dist/math/vec3/f32/layout.js +5 -0
- package/dist/math/vec3/f32/layout.js.map +1 -0
- package/dist/math/vec3/f32/public.d.ts +3 -0
- package/dist/math/vec3/f32/public.js +5 -0
- package/dist/math/vec3/f32/public.js.map +1 -0
- package/dist/math/vec3/f32/schema.d.ts +11 -0
- package/dist/math/vec3/f32/schema.js +10 -0
- package/dist/math/vec3/f32/schema.js.map +1 -0
- package/dist/math/vec3/i32/functions.d.ts +23 -0
- package/dist/math/vec3/i32/functions.js +78 -0
- package/dist/math/vec3/i32/functions.js.map +1 -0
- package/dist/math/vec3/i32/i32.d.ts +4 -0
- package/dist/math/vec3/i32/i32.js +3 -0
- package/dist/math/vec3/i32/i32.js.map +1 -0
- package/dist/math/vec3/i32/layout.d.ts +1 -0
- package/dist/math/vec3/i32/layout.js +5 -0
- package/dist/math/vec3/i32/layout.js.map +1 -0
- package/dist/math/vec3/i32/public.d.ts +3 -0
- package/dist/math/vec3/i32/public.js +5 -0
- package/dist/math/vec3/i32/public.js.map +1 -0
- package/dist/math/vec3/i32/schema.d.ts +12 -0
- package/dist/math/vec3/i32/schema.js +10 -0
- package/dist/math/vec3/i32/schema.js.map +1 -0
- package/dist/math/vec3/index.d.ts +67 -4
- package/dist/math/vec3/index.js +62 -1
- package/dist/math/vec3/index.js.map +1 -1
- package/dist/math/vec3/public.d.ts +5 -3
- package/dist/math/vec3/public.js +6 -3
- package/dist/math/vec3/public.js.map +1 -1
- package/dist/math/vec3/u32/functions.d.ts +23 -0
- package/dist/math/vec3/u32/functions.js +85 -0
- package/dist/math/vec3/u32/functions.js.map +1 -0
- package/dist/math/vec3/u32/layout.d.ts +1 -0
- package/dist/math/vec3/u32/layout.js +5 -0
- package/dist/math/vec3/u32/layout.js.map +1 -0
- package/dist/math/vec3/u32/public.d.ts +3 -0
- package/dist/math/vec3/u32/public.js +5 -0
- package/dist/math/vec3/u32/public.js.map +1 -0
- package/dist/math/vec3/u32/schema.d.ts +12 -0
- package/dist/math/vec3/u32/schema.js +10 -0
- package/dist/math/vec3/u32/schema.js.map +1 -0
- package/dist/math/vec3/u32/u32.d.ts +4 -0
- package/dist/math/vec3/u32/u32.js +3 -0
- package/dist/math/vec3/u32/u32.js.map +1 -0
- package/dist/math/vec4/f32/f32.d.ts +4 -0
- package/dist/math/vec4/f32/f32.js +3 -0
- package/dist/math/vec4/f32/f32.js.map +1 -0
- package/dist/math/vec4/f32/functions.d.ts +49 -0
- package/dist/math/vec4/f32/functions.js +130 -0
- package/dist/math/vec4/f32/functions.js.map +1 -0
- package/dist/math/vec4/f32/layout.d.ts +1 -0
- package/dist/math/vec4/f32/layout.js +5 -0
- package/dist/math/vec4/f32/layout.js.map +1 -0
- package/dist/math/vec4/f32/public.d.ts +3 -0
- package/dist/math/vec4/f32/public.js +5 -0
- package/dist/math/vec4/f32/public.js.map +1 -0
- package/dist/math/vec4/f32/schema.d.ts +11 -0
- package/dist/math/vec4/f32/schema.js +10 -0
- package/dist/math/vec4/f32/schema.js.map +1 -0
- package/dist/math/vec4/i32/functions.d.ts +23 -0
- package/dist/math/vec4/i32/functions.js +91 -0
- package/dist/math/vec4/i32/functions.js.map +1 -0
- package/dist/math/vec4/i32/i32.d.ts +4 -0
- package/dist/math/vec4/i32/i32.js +3 -0
- package/dist/math/vec4/i32/i32.js.map +1 -0
- package/dist/math/vec4/i32/layout.d.ts +1 -0
- package/dist/math/vec4/i32/layout.js +5 -0
- package/dist/math/vec4/i32/layout.js.map +1 -0
- package/dist/math/vec4/i32/public.d.ts +3 -0
- package/dist/math/vec4/i32/public.js +5 -0
- package/dist/math/vec4/i32/public.js.map +1 -0
- package/dist/math/vec4/i32/schema.d.ts +12 -0
- package/dist/math/vec4/i32/schema.js +10 -0
- package/dist/math/vec4/i32/schema.js.map +1 -0
- package/dist/math/vec4/index.d.ts +60 -4
- package/dist/math/vec4/index.js +55 -1
- package/dist/math/vec4/index.js.map +1 -1
- package/dist/math/vec4/public.d.ts +5 -3
- package/dist/math/vec4/public.js +6 -3
- package/dist/math/vec4/public.js.map +1 -1
- package/dist/math/vec4/u32/functions.d.ts +22 -0
- package/dist/math/vec4/u32/functions.js +99 -0
- package/dist/math/vec4/u32/functions.js.map +1 -0
- package/dist/math/vec4/u32/layout.d.ts +1 -0
- package/dist/math/vec4/u32/layout.js +5 -0
- package/dist/math/vec4/u32/layout.js.map +1 -0
- package/dist/math/vec4/u32/public.d.ts +3 -0
- package/dist/math/vec4/u32/public.js +5 -0
- package/dist/math/vec4/u32/public.js.map +1 -0
- package/dist/math/vec4/u32/schema.d.ts +12 -0
- package/dist/math/vec4/u32/schema.js +10 -0
- package/dist/math/vec4/u32/schema.js.map +1 -0
- package/dist/math/vec4/u32/u32.d.ts +4 -0
- package/dist/math/vec4/u32/u32.js +3 -0
- package/dist/math/vec4/u32/u32.js.map +1 -0
- package/dist/schema/boolean/schema.d.ts +1 -0
- package/dist/schema/boolean/schema.js +2 -1
- package/dist/schema/boolean/schema.js.map +1 -1
- package/dist/schema/dynamic/enumerate-patches.test.d.ts +4 -4
- package/dist/schema/dynamic/enumerate-patches.test.js +8 -8
- package/dist/schema/dynamic/enumerate-patches.test.js.map +1 -1
- package/dist/schema/dynamic/get-dynamic-schema.test.js +4 -4
- package/dist/schema/dynamic/get-dynamic-schema.test.js.map +1 -1
- package/dist/schema/from-archetype.d.ts +14 -0
- package/dist/schema/from-archetype.js +9 -0
- package/dist/schema/from-archetype.js.map +1 -0
- package/dist/schema/from-components.d.ts +14 -0
- package/dist/schema/from-components.js +9 -0
- package/dist/schema/from-components.js.map +1 -0
- package/dist/schema/from-components.test.d.ts +1 -0
- package/dist/schema/from-components.test.js +49 -0
- package/dist/schema/from-components.test.js.map +1 -0
- package/dist/schema/from-components.type-test.d.ts +1 -0
- package/dist/schema/from-components.type-test.js +40 -0
- package/dist/schema/from-components.type-test.js.map +1 -0
- package/dist/schema/public.d.ts +2 -0
- package/dist/schema/public.js +2 -0
- package/dist/schema/public.js.map +1 -1
- package/dist/schema/schema.d.ts +0 -2
- package/dist/schema/to-type.d.ts +2 -0
- package/dist/schema/to-type.js.map +1 -1
- package/dist/table/copy-column-to-gpu-buffer.js +10 -2
- package/dist/table/copy-column-to-gpu-buffer.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typed-buffer/create-boolean-buffer.d.ts +6 -0
- package/dist/typed-buffer/create-boolean-buffer.js +83 -0
- package/dist/typed-buffer/create-boolean-buffer.js.map +1 -0
- package/dist/typed-buffer/create-boolean-buffer.test.d.ts +1 -0
- package/dist/typed-buffer/create-boolean-buffer.test.js +159 -0
- package/dist/typed-buffer/create-boolean-buffer.test.js.map +1 -0
- package/dist/typed-buffer/create-typed-buffer.js +4 -0
- package/dist/typed-buffer/create-typed-buffer.js.map +1 -1
- package/dist/typed-buffer/index.d.ts +1 -0
- package/dist/typed-buffer/index.js +1 -0
- package/dist/typed-buffer/index.js.map +1 -1
- package/dist/typed-buffer/register-typed-buffer-codecs.js +24 -6
- package/dist/typed-buffer/register-typed-buffer-codecs.js.map +1 -1
- package/dist/typed-buffer/typed-buffer.d.ts +4 -1
- package/dist/typed-buffer/typed-buffer.js +1 -0
- package/dist/typed-buffer/typed-buffer.js.map +1 -1
- package/dist/types/volume/axis-line-callback.d.ts +14 -0
- package/dist/types/volume/axis-line-callback.js +3 -0
- package/dist/types/volume/axis-line-callback.js.map +1 -0
- package/dist/types/volume/block-callback.d.ts +9 -0
- package/dist/types/volume/block-callback.js +3 -0
- package/dist/types/volume/block-callback.js.map +1 -0
- package/dist/types/volume/block-span.d.ts +9 -0
- package/dist/types/volume/block-span.js +3 -0
- package/dist/types/volume/block-span.js.map +1 -0
- package/dist/types/volume/create-dense/create-dense.d.ts +6 -0
- package/dist/types/volume/create-dense/create-dense.js +9 -0
- package/dist/types/volume/create-dense/create-dense.js.map +1 -0
- package/dist/types/volume/create-dense/create-dense.test.d.ts +1 -0
- package/dist/types/volume/create-dense/create-dense.test.js +121 -0
- package/dist/types/volume/create-dense/create-dense.test.js.map +1 -0
- package/dist/types/volume/create-dense/dense-volume.d.ts +17 -0
- package/dist/types/volume/create-dense/dense-volume.js +51 -0
- package/dist/types/volume/create-dense/dense-volume.js.map +1 -0
- package/dist/types/volume/create-dense/is-dense-volume.d.ts +2 -0
- package/dist/types/volume/create-dense/is-dense-volume.js +4 -0
- package/dist/types/volume/create-dense/is-dense-volume.js.map +1 -0
- package/dist/types/volume/create-dense/register-dense-volume-codecs.d.ts +1 -0
- package/dist/types/volume/create-dense/register-dense-volume-codecs.js +33 -0
- package/dist/types/volume/create-dense/register-dense-volume-codecs.js.map +1 -0
- package/dist/types/volume/create-sparse-block/block-dims.d.ts +35 -0
- package/dist/types/volume/create-sparse-block/block-dims.js +93 -0
- package/dist/types/volume/create-sparse-block/block-dims.js.map +1 -0
- package/dist/types/volume/create-sparse-block/block-key.d.ts +9 -0
- package/dist/types/volume/create-sparse-block/block-key.js +23 -0
- package/dist/types/volume/create-sparse-block/block-key.js.map +1 -0
- package/dist/types/volume/create-sparse-block/create-sparse-block.d.ts +6 -0
- package/dist/types/volume/create-sparse-block/create-sparse-block.js +9 -0
- package/dist/types/volume/create-sparse-block/create-sparse-block.js.map +1 -0
- package/dist/types/volume/create-sparse-block/create-sparse-block.test.d.ts +1 -0
- package/dist/types/volume/create-sparse-block/create-sparse-block.test.js +287 -0
- package/dist/types/volume/create-sparse-block/create-sparse-block.test.js.map +1 -0
- package/dist/types/volume/create-sparse-block/is-sparse-block-volume.d.ts +2 -0
- package/dist/types/volume/create-sparse-block/is-sparse-block-volume.js +4 -0
- package/dist/types/volume/create-sparse-block/is-sparse-block-volume.js.map +1 -0
- package/dist/types/volume/create-sparse-block/iterate-sparse-block-axis.d.ts +19 -0
- package/dist/types/volume/create-sparse-block/iterate-sparse-block-axis.js +160 -0
- package/dist/types/volume/create-sparse-block/iterate-sparse-block-axis.js.map +1 -0
- package/dist/types/volume/create-sparse-block/pack-block-key.d.ts +1 -0
- package/dist/types/volume/create-sparse-block/pack-block-key.js +3 -0
- package/dist/types/volume/create-sparse-block/pack-block-key.js.map +1 -0
- package/dist/types/volume/create-sparse-block/register-sparse-block-volume-codecs.d.ts +1 -0
- package/dist/types/volume/create-sparse-block/register-sparse-block-volume-codecs.js +37 -0
- package/dist/types/volume/create-sparse-block/register-sparse-block-volume-codecs.js.map +1 -0
- package/dist/types/volume/create-sparse-block/sparse-block-volume.d.ts +29 -0
- package/dist/types/volume/create-sparse-block/sparse-block-volume.js +133 -0
- package/dist/types/volume/create-sparse-block/sparse-block-volume.js.map +1 -0
- package/dist/types/volume/create-sparse-block/unpack-block-key.d.ts +5 -0
- package/dist/types/volume/create-sparse-block/unpack-block-key.js +7 -0
- package/dist/types/volume/create-sparse-block/unpack-block-key.js.map +1 -0
- package/dist/types/volume/get-dense-index.d.ts +2 -0
- package/dist/types/volume/get-dense-index.js +6 -0
- package/dist/types/volume/get-dense-index.js.map +1 -0
- package/dist/types/volume/get-dense-index.test.d.ts +1 -0
- package/dist/types/volume/get-dense-index.test.js +17 -0
- package/dist/types/volume/get-dense-index.test.js.map +1 -0
- package/dist/types/volume/is-in-bounds.d.ts +2 -0
- package/dist/types/volume/is-in-bounds.js +6 -0
- package/dist/types/volume/is-in-bounds.js.map +1 -0
- package/dist/types/volume/is-in-bounds.test.d.ts +1 -0
- package/dist/types/volume/is-in-bounds.test.js +12 -0
- package/dist/types/volume/is-in-bounds.test.js.map +1 -0
- package/dist/types/volume/iterate-axis.d.ts +7 -0
- package/dist/types/volume/iterate-axis.js +58 -0
- package/dist/types/volume/iterate-axis.js.map +1 -0
- package/dist/types/volume/iterate-sparse-block-axis.test.d.ts +1 -0
- package/dist/types/volume/iterate-sparse-block-axis.test.js +11 -0
- package/dist/types/volume/iterate-sparse-block-axis.test.js.map +1 -0
- package/dist/types/volume/iterate-sparse-block.benchmark.test.d.ts +1 -0
- package/dist/types/volume/iterate-sparse-block.benchmark.test.js +80 -0
- package/dist/types/volume/iterate-sparse-block.benchmark.test.js.map +1 -0
- package/dist/types/volume/iterate-test-helpers.d.ts +14 -0
- package/dist/types/volume/iterate-test-helpers.js +41 -0
- package/dist/types/volume/iterate-test-helpers.js.map +1 -0
- package/dist/types/volume/public.d.ts +7 -0
- package/dist/types/volume/public.js +6 -0
- package/dist/types/volume/public.js.map +1 -0
- package/dist/types/volume/sparse-block-iterate-benchmark.d.ts +49 -0
- package/dist/types/volume/sparse-block-iterate-benchmark.js +131 -0
- package/dist/types/volume/sparse-block-iterate-benchmark.js.map +1 -0
- package/dist/types/volume/volume.d.ts +13 -0
- package/dist/types/volume/volume.js +3 -0
- package/dist/types/volume/volume.js.map +1 -0
- package/package.json +1 -1
- package/references/data-lit/package.json +1 -1
- package/references/data-lit-tictactoe/package.json +1 -1
- package/references/data-react/package.json +1 -1
- package/references/data-react-hello/package.json +1 -1
- package/references/data-react-pixie/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Schema } from "./schema.js";
|
|
2
|
+
export type FromComponents<P extends {
|
|
3
|
+
readonly [K in string]: Schema;
|
|
4
|
+
}, R extends readonly (keyof P & string)[]> = {
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly properties: P;
|
|
7
|
+
readonly required: R;
|
|
8
|
+
};
|
|
9
|
+
export declare function FromComponents<const P extends {
|
|
10
|
+
readonly [K in string]: Schema;
|
|
11
|
+
}, const R extends readonly (keyof P & string)[]>(components: P, required: R): FromComponents<P, R>;
|
|
12
|
+
export declare function FromComponents<const P extends {
|
|
13
|
+
readonly [K in string]: Schema;
|
|
14
|
+
}>(components: P): FromComponents<P, readonly (keyof P & string)[]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
export function FromComponents(components, required) {
|
|
3
|
+
return {
|
|
4
|
+
type: "object",
|
|
5
|
+
properties: components,
|
|
6
|
+
required: required ?? Object.keys(components),
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=from-components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-components.js","sourceRoot":"","sources":["../../src/schema/from-components.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAsBvD,MAAM,UAAU,cAAc,CAG5B,UAAa,EAAE,QAAY;IAC3B,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,UAAU;QACtB,QAAQ,EAAE,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;KACpB,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { Schema } from "./index.js";
|
|
4
|
+
describe("Schema.FromComponents", () => {
|
|
5
|
+
const componentSchemas = {
|
|
6
|
+
foo: { type: "string" },
|
|
7
|
+
bar: { type: "number" },
|
|
8
|
+
};
|
|
9
|
+
it("builds an object schema with explicit required order", () => {
|
|
10
|
+
expect(Schema.FromComponents(componentSchemas, ["foo", "bar"])).toEqual({
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: componentSchemas,
|
|
13
|
+
required: ["foo", "bar"],
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
it("defaults required to component keys when omitted", () => {
|
|
17
|
+
const schema = Schema.FromComponents(componentSchemas);
|
|
18
|
+
expect(schema).toEqual({
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: componentSchemas,
|
|
21
|
+
required: ["foo", "bar"],
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe("Schema.FromArchetype", () => {
|
|
26
|
+
const components = {
|
|
27
|
+
foo: { type: "string" },
|
|
28
|
+
bar: { type: "number" },
|
|
29
|
+
baz: { type: "boolean" },
|
|
30
|
+
};
|
|
31
|
+
it("picks only archetype components and preserves order", () => {
|
|
32
|
+
expect(Schema.FromArchetype(components, ["baz", "foo"])).toEqual({
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
baz: { type: "boolean" },
|
|
36
|
+
foo: { type: "string" },
|
|
37
|
+
},
|
|
38
|
+
required: ["baz", "foo"],
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
it("does not include components outside the archetype", () => {
|
|
42
|
+
const schema = Schema.FromArchetype(components, ["bar"]);
|
|
43
|
+
expect(schema.properties).toEqual({ bar: { type: "number" } });
|
|
44
|
+
expect(schema.required).toEqual(["bar"]);
|
|
45
|
+
expect(schema.properties).not.toHaveProperty("foo");
|
|
46
|
+
expect(schema.properties).not.toHaveProperty("baz");
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=from-components.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-components.test.js","sourceRoot":"","sources":["../../src/schema/from-components.test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,QAA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C,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YAC/D,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gBACxB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACxB;YACD,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;SACzB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;QAEzD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC/D,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
//
|
|
3
|
+
// Compile-time type checks for Schema.FromComponents and Schema.FromArchetype.
|
|
4
|
+
// Compiled by tsc (not vitest). Each check is isolated in its own function so
|
|
5
|
+
// a failure in one does not degrade inference for the others.
|
|
6
|
+
import { U32, Vec3 } from "../math/index.js";
|
|
7
|
+
import { Schema } from "./index.js";
|
|
8
|
+
const components = {
|
|
9
|
+
foo: { type: "string" },
|
|
10
|
+
bar: { type: "number" },
|
|
11
|
+
baz: { type: "boolean" },
|
|
12
|
+
};
|
|
13
|
+
function fromComponentsWithRequiredTuple() {
|
|
14
|
+
const schema = Schema.FromComponents({ a: Vec3.schema, b: U32.schema }, ["a", "b"]);
|
|
15
|
+
}
|
|
16
|
+
function fromComponentsWithoutRequired() {
|
|
17
|
+
const schema = Schema.FromComponents({ a: Vec3.schema, b: U32.schema });
|
|
18
|
+
}
|
|
19
|
+
function fromArchetypePicksComponents() {
|
|
20
|
+
const schema = Schema.FromArchetype(components, ["foo", "baz"]);
|
|
21
|
+
}
|
|
22
|
+
function fromArchetypeTypeAliasMatchesReturnType() {
|
|
23
|
+
const schema = Schema.FromArchetype(components, ["bar", "foo"]);
|
|
24
|
+
}
|
|
25
|
+
function fromArchetypeToTypeHasOnlyArchetypeKeys() {
|
|
26
|
+
const schema = Schema.FromArchetype(components, ["foo", "bar"]);
|
|
27
|
+
}
|
|
28
|
+
function fromArchetypeToTypeExcludesUnpickedComponents() {
|
|
29
|
+
const schema = Schema.FromArchetype(components, ["foo", "baz"]);
|
|
30
|
+
}
|
|
31
|
+
function fromComponentsToTypeMatchesExactComponentMap() {
|
|
32
|
+
const schema = Schema.FromComponents({ foo: components.foo, bar: components.bar }, ["foo", "bar"]);
|
|
33
|
+
}
|
|
34
|
+
function fromComponentsExtraPropertiesBecomeOptionalInToType() {
|
|
35
|
+
const schema = Schema.FromComponents(components, ["foo", "bar"]);
|
|
36
|
+
}
|
|
37
|
+
function fromArchetypePreservesArchetypeOrder() {
|
|
38
|
+
const schema = Schema.FromArchetype(components, ["baz", "foo"]);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=from-components.type-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-components.type-test.js","sourceRoot":"","sources":["../../src/schema/from-components.type-test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;A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,CAAC,CAAC;AAWlE,CAAC;AAED,SAAS,4CAA4C;IACnD,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAClC,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,EAC5C,CAAC,KAAK,EAAE,KAAK,CAAC,CACf,CAAC;AAYJ,CAAC;AAED,SAAS,mDAAmD;IAC1D,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAYnE,CAAC;AAED,SAAS,oCAAoC;IAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AASlE,CAAC"}
|
package/dist/schema/public.d.ts
CHANGED
package/dist/schema/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/schema/public.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/schema/public.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,cAAc,aAAa,CAAC;AAC5B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
|
package/dist/schema/schema.d.ts
CHANGED
package/dist/schema/to-type.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ type FromSchemaInternal<T, Depth extends number = 5> = T extends {
|
|
|
24
24
|
type: 'typed-buffer';
|
|
25
25
|
items: infer Items;
|
|
26
26
|
} ? TypedBuffer<FromSchemaInternal<Items>> : T extends {
|
|
27
|
+
type: 'typed-buffer';
|
|
28
|
+
} ? TypedBuffer<unknown> : T extends {
|
|
27
29
|
type: 'array';
|
|
28
30
|
} | {
|
|
29
31
|
items: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-type.js","sourceRoot":"","sources":["../../src/schema/to-type.ts"],"names":[],"mappings":"AAAA,uDAAuD;
|
|
1
|
+
{"version":3,"file":"to-type.js","sourceRoot":"","sources":["../../src/schema/to-type.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAiKvD,MAAM,QAAQ,GAAG;IACf,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACrB,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACrB,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;KACvB;IACD,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,KAAK;CACF,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { booleanStorageByteLength } from "../typed-buffer/create-boolean-buffer.js";
|
|
3
|
+
const columnByteLength = (table, columnName) => {
|
|
4
|
+
const column = table.columns[columnName];
|
|
5
|
+
if (column.type === "boolean") {
|
|
6
|
+
return booleanStorageByteLength(table.rowCount);
|
|
7
|
+
}
|
|
8
|
+
return table.rowCount * column.typedArrayElementSizeInBytes;
|
|
9
|
+
};
|
|
2
10
|
/**
|
|
3
11
|
* Copies a column from an array of tables to a GPU buffer.
|
|
4
12
|
*/
|
|
@@ -6,7 +14,7 @@ export const copyColumnToGPUBuffer = (tables, columnName, device, gpuBuffer) =>
|
|
|
6
14
|
// get total byte length
|
|
7
15
|
let totalByteLength = 0;
|
|
8
16
|
for (const table of tables) {
|
|
9
|
-
totalByteLength += table
|
|
17
|
+
totalByteLength += columnByteLength(table, columnName);
|
|
10
18
|
}
|
|
11
19
|
// ensure the gpu buffer is large enough
|
|
12
20
|
if (gpuBuffer.size < totalByteLength) {
|
|
@@ -17,7 +25,7 @@ export const copyColumnToGPUBuffer = (tables, columnName, device, gpuBuffer) =>
|
|
|
17
25
|
let offset = 0;
|
|
18
26
|
for (const table of tables) {
|
|
19
27
|
const column = table.columns[columnName];
|
|
20
|
-
const writeByteLength = table
|
|
28
|
+
const writeByteLength = columnByteLength(table, columnName);
|
|
21
29
|
const array = column.getTypedArray();
|
|
22
30
|
device.queue.writeBuffer(gpuBuffer, offset, array.buffer, 0, writeByteLength);
|
|
23
31
|
offset += writeByteLength;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-column-to-gpu-buffer.js","sourceRoot":"","sources":["../../src/table/copy-column-to-gpu-buffer.ts"],"names":[],"mappings":"AAAA,uDAAuD;
|
|
1
|
+
{"version":3,"file":"copy-column-to-gpu-buffer.js","sourceRoot":"","sources":["../../src/table/copy-column-to-gpu-buffer.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AAGpF,MAAM,gBAAgB,GAAG,CAAuB,KAAQ,EAAE,UAA8B,EAAU,EAAE;IAChG,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,wBAAwB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAChE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACjC,MAAoB,EACpB,UAAa,EACb,MAAiB,EACjB,SAAoB,EACX,EAAE;IACX,wBAAwB;IACxB,IAAI,eAAe,G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