@adobe/data 0.8.5 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blob/download-handle.d.ts +4 -0
- package/dist/blob/download-handle.js +2 -0
- package/dist/blob/download-handle.js.map +1 -0
- package/dist/blob/upload-handle.d.ts +4 -0
- package/dist/blob/upload-handle.js +2 -0
- package/dist/blob/upload-handle.js.map +1 -0
- package/dist/ecs/database/calculate-system-order.d.ts +18 -0
- package/dist/ecs/database/calculate-system-order.js +113 -0
- package/dist/ecs/database/calculate-system-order.js.map +1 -0
- package/dist/ecs/database/calculate-system-order.test.d.ts +1 -0
- package/dist/ecs/database/calculate-system-order.test.js +168 -0
- package/dist/ecs/database/calculate-system-order.test.js.map +1 -0
- package/dist/ecs/database/create-database.d.ts +6 -6
- package/dist/ecs/database/create-database.js +38 -10
- package/dist/ecs/database/create-database.js.map +1 -1
- package/dist/ecs/database/create-database.test.js +55 -11
- package/dist/ecs/database/create-database.test.js.map +1 -1
- package/dist/ecs/database/create-plugin.d.ts +67 -0
- package/dist/ecs/database/create-plugin.js +47 -0
- package/dist/ecs/database/create-plugin.js.map +1 -0
- package/dist/ecs/database/create-plugin.test.d.ts +1 -0
- package/dist/ecs/database/create-plugin.test.js +435 -0
- package/dist/ecs/database/create-plugin.test.js.map +1 -0
- package/dist/ecs/database/database-schema/create-database-schema.d.ts +3 -3
- package/dist/ecs/database/database-schema/create-database-schema.js +7 -3
- package/dist/ecs/database/database-schema/create-database-schema.js.map +1 -1
- package/dist/ecs/database/database-schema/database-schema.d.ts +4 -3
- package/dist/ecs/database/database.d.ts +60 -18
- package/dist/ecs/database/database.js +47 -1
- package/dist/ecs/database/database.js.map +1 -1
- package/dist/ecs/database/database.test.d.ts +1 -0
- package/dist/ecs/database/database.test.js +200 -0
- package/dist/ecs/database/database.test.js.map +1 -0
- package/dist/ecs/database/index.d.ts +1 -1
- package/dist/ecs/database/index.js +1 -1
- package/dist/ecs/database/index.js.map +1 -1
- package/dist/ecs/database/observe-dependent-value.test.js +8 -16
- package/dist/ecs/database/observe-dependent-value.test.js.map +1 -1
- package/dist/ecs/database/observe-select-entities.performance.test.js +21 -17
- package/dist/ecs/database/observe-select-entities.performance.test.js.map +1 -1
- package/dist/ecs/database/observe-select-entities.test.js +24 -20
- package/dist/ecs/database/observe-select-entities.test.js.map +1 -1
- package/dist/ecs/database/observed/create-observed-database.js +6 -1
- package/dist/ecs/database/observed/create-observed-database.js.map +1 -1
- package/dist/ecs/database/observed/create-observed-database.test.js +119 -59
- package/dist/ecs/database/observed/create-observed-database.test.js.map +1 -1
- package/dist/ecs/database/observed/observed-database.d.ts +3 -0
- package/dist/ecs/database/public/create-database-from-schema.test.d.ts +1 -0
- package/dist/ecs/database/public/create-database-from-schema.test.js +153 -0
- package/dist/ecs/database/public/create-database-from-schema.test.js.map +1 -0
- package/dist/ecs/database/public/create-database.d.ts +22 -0
- package/dist/ecs/database/public/create-database.js +336 -0
- package/dist/ecs/database/public/create-database.js.map +1 -0
- package/dist/ecs/database/public/create-database.test.d.ts +1 -0
- package/dist/ecs/database/public/create-database.test.js +993 -0
- package/dist/ecs/database/public/create-database.test.js.map +1 -0
- package/dist/ecs/database/public/index.d.ts +1 -0
- package/dist/ecs/database/public/index.js +22 -0
- package/dist/ecs/database/public/index.js.map +1 -0
- package/dist/ecs/database/reconciling/create-reconciling-database.d.ts +2 -9
- package/dist/ecs/database/reconciling/create-reconciling-database.js +87 -118
- package/dist/ecs/database/reconciling/create-reconciling-database.js.map +1 -1
- package/dist/ecs/database/reconciling/create-reconciling-database.test.js +94 -167
- package/dist/ecs/database/reconciling/create-reconciling-database.test.js.map +1 -1
- package/dist/ecs/database/reconciling/reconciling-database.d.ts +5 -2
- package/dist/ecs/database/reconciling/reconciling-entry.d.ts +0 -11
- package/dist/ecs/database/reconciling/reconciling-entry.js +0 -34
- package/dist/ecs/database/reconciling/reconciling-entry.js.map +1 -1
- package/dist/ecs/database/transactional-store/coalesce-actions.d.ts +16 -0
- package/dist/ecs/database/transactional-store/coalesce-actions.js +140 -0
- package/dist/ecs/database/transactional-store/coalesce-actions.js.map +1 -0
- package/dist/ecs/database/transactional-store/coalesce-actions.test.d.ts +1 -0
- package/dist/ecs/database/transactional-store/coalesce-actions.test.js +433 -0
- package/dist/ecs/database/transactional-store/coalesce-actions.test.js.map +1 -0
- package/dist/ecs/database/transactional-store/create-transactional-store.js +18 -2
- package/dist/ecs/database/transactional-store/create-transactional-store.js.map +1 -1
- package/dist/ecs/database/transactional-store/create-transactional-store.test.js +98 -22
- package/dist/ecs/database/transactional-store/create-transactional-store.test.js.map +1 -1
- package/dist/ecs/database/transactional-store/entity-id-preservation.test.d.ts +1 -0
- package/dist/ecs/database/transactional-store/entity-id-preservation.test.js +106 -0
- package/dist/ecs/database/transactional-store/entity-id-preservation.test.js.map +1 -0
- package/dist/ecs/database/transactional-store/transactional-store.d.ts +2 -0
- package/dist/ecs/database/type-inference-example.d.ts +1 -0
- package/dist/ecs/database/type-inference-example.js +2 -0
- package/dist/ecs/database/type-inference-example.js.map +1 -0
- package/dist/ecs/entity/entity.d.ts +8 -0
- package/dist/ecs/entity/entity.js +3 -0
- package/dist/ecs/entity/entity.js.map +1 -0
- package/dist/ecs/entity/u32.d.ts +8 -0
- package/dist/ecs/entity/u32.js +24 -0
- package/dist/ecs/entity/u32.js.map +1 -0
- package/dist/ecs/plugins/index.d.ts +1 -0
- package/dist/ecs/plugins/index.js +23 -0
- package/dist/ecs/plugins/index.js.map +1 -0
- package/dist/ecs/plugins/scheduler/index.d.ts +1 -0
- package/dist/ecs/plugins/scheduler/index.js +23 -0
- package/dist/ecs/plugins/scheduler/index.js.map +1 -0
- package/dist/ecs/plugins/scheduler/scheduler.d.ts +8 -0
- package/dist/ecs/plugins/scheduler/scheduler.js +52 -0
- package/dist/ecs/plugins/scheduler/scheduler.js.map +1 -0
- package/dist/ecs/store/action-functions.d.ts +21 -0
- package/dist/ecs/store/action-functions.js +2 -0
- package/dist/ecs/store/action-functions.js.map +1 -0
- package/dist/ecs/store/constants/functions.d.ts +14 -0
- package/dist/ecs/store/constants/functions.js +31 -0
- package/dist/ecs/store/constants/functions.js.map +1 -0
- package/dist/ecs/store/constants/index.d.ts +2 -0
- package/dist/ecs/store/constants/index.js +24 -0
- package/dist/ecs/store/constants/index.js.map +1 -0
- package/dist/ecs/store/constants/types.d.ts +18 -0
- package/dist/ecs/store/constants/types.js +23 -0
- package/dist/ecs/store/constants/types.js.map +1 -0
- package/dist/ecs/store/create-store-schema-test.js +70 -8
- package/dist/ecs/store/create-store-schema-test.js.map +1 -1
- package/dist/ecs/store/create-store.d.ts +1 -1
- package/dist/ecs/store/create-store.js +74 -24
- package/dist/ecs/store/create-store.js.map +1 -1
- package/dist/ecs/store/create-store.test.js +171 -171
- package/dist/ecs/store/create-store.test.js.map +1 -1
- package/dist/ecs/store/index.d.ts +0 -1
- package/dist/ecs/store/index.js +0 -1
- package/dist/ecs/store/index.js.map +1 -1
- package/dist/ecs/store/public/create-from-schema.d.ts +6 -0
- package/dist/ecs/store/public/create-from-schema.js +26 -0
- package/dist/ecs/store/public/create-from-schema.js.map +1 -0
- package/dist/ecs/store/public/create-store.d.ts +8 -0
- package/dist/ecs/store/public/create-store.js +127 -0
- package/dist/ecs/store/public/create-store.js.map +1 -0
- package/dist/ecs/store/public/create-store.test.d.ts +1 -0
- package/dist/ecs/store/public/create-store.test.js +730 -0
- package/dist/ecs/store/public/create-store.test.js.map +1 -0
- package/dist/ecs/store/public/index.d.ts +3 -0
- package/dist/ecs/store/public/index.js +25 -0
- package/dist/ecs/store/public/index.js.map +1 -0
- package/dist/ecs/store/public/readonly.d.ts +19 -0
- package/dist/ecs/store/public/readonly.js +2 -0
- package/dist/ecs/store/public/readonly.js.map +1 -0
- package/dist/ecs/store/public/schema/create-from-schema.d.ts +6 -0
- package/dist/ecs/store/public/schema/create-from-schema.js +26 -0
- package/dist/ecs/store/public/schema/create-from-schema.js.map +1 -0
- package/dist/ecs/store/public/schema/create.d.ts +10 -0
- package/dist/ecs/store/public/schema/create.js +25 -0
- package/dist/ecs/store/public/schema/create.js.map +1 -0
- package/dist/ecs/store/public/schema/createFromSchema.d.ts +6 -0
- package/dist/ecs/store/public/schema/createFromSchema.js +5 -0
- package/dist/ecs/store/public/schema/createFromSchema.js.map +1 -0
- package/dist/ecs/store/public/schema/public.d.ts +1 -0
- package/dist/ecs/store/public/schema/public.js +23 -0
- package/dist/ecs/store/public/schema/public.js.map +1 -0
- package/dist/ecs/store/public/schema/schema.d.ts +11 -0
- package/dist/ecs/store/public/schema/schema.js +23 -0
- package/dist/ecs/store/public/schema/schema.js.map +1 -0
- package/dist/ecs/store/public/types.d.ts +11 -0
- package/dist/ecs/store/public/types.js +23 -0
- package/dist/ecs/store/public/types.js.map +1 -0
- package/dist/ecs/store/store-schema/create-store-schema-test.d.ts +1 -0
- package/dist/ecs/store/store-schema/create-store-schema-test.js +33 -0
- package/dist/ecs/store/store-schema/create-store-schema-test.js.map +1 -0
- package/dist/ecs/store/store-schema/create-store-schema.d.ts +1 -0
- package/dist/ecs/store/store-schema/create-store-schema.js +45 -0
- package/dist/ecs/store/store-schema/create-store-schema.js.map +1 -0
- package/dist/ecs/store/store-schema/index.d.ts +1 -0
- package/dist/ecs/store/store-schema/index.js +21 -0
- package/dist/ecs/store/store-schema/index.js.map +1 -0
- package/dist/ecs/store/store-schema/store-schema.d.ts +1 -0
- package/dist/ecs/store/store-schema/store-schema.js +57 -0
- package/dist/ecs/store/store-schema/store-schema.js.map +1 -0
- package/dist/ecs/store/store.d.ts +48 -13
- package/dist/ecs/store/store.js +37 -8
- package/dist/ecs/store/store.js.map +1 -1
- package/dist/ecs/store/store.test.d.ts +1 -0
- package/dist/ecs/store/store.test.js +211 -0
- package/dist/ecs/store/store.test.js.map +1 -0
- package/dist/ecs/undo-redo-service/create-undo-redo-service.js +1 -1
- package/dist/ecs/undo-redo-service/create-undo-redo-service.js.map +1 -1
- package/dist/ecs/undo-redo-service/create-undo-redo-service.test.js +10 -6
- package/dist/ecs/undo-redo-service/create-undo-redo-service.test.js.map +1 -1
- package/dist/ecs/world/create-world.d.ts +7 -0
- package/dist/ecs/world/create-world.js +113 -0
- package/dist/ecs/world/create-world.js.map +1 -0
- package/dist/ecs/world/create-world.test.d.ts +1 -0
- package/dist/ecs/world/create-world.test.js +499 -0
- package/dist/ecs/world/create-world.test.js.map +1 -0
- package/dist/ecs/world/index.d.ts +5 -0
- package/dist/ecs/world/index.js +27 -0
- package/dist/ecs/world/index.js.map +1 -0
- package/dist/ecs/world/system-phase.d.ts +5 -0
- package/dist/ecs/world/system-phase.js +14 -0
- package/dist/ecs/world/system-phase.js.map +1 -0
- package/dist/ecs/world/system.d.ts +25 -0
- package/dist/ecs/world/system.js +2 -0
- package/dist/ecs/world/system.js.map +1 -0
- package/dist/ecs/world/world-schema/create-world-schema-test.d.ts +1 -0
- package/dist/ecs/world/world-schema/create-world-schema-test.js +55 -0
- package/dist/ecs/world/world-schema/create-world-schema-test.js.map +1 -0
- package/dist/ecs/world/world-schema/create-world-schema.d.ts +19 -0
- package/dist/ecs/world/world-schema/create-world-schema.js +33 -0
- package/dist/ecs/world/world-schema/create-world-schema.js.map +1 -0
- package/dist/ecs/world/world-schema/index.d.ts +2 -0
- package/dist/ecs/world/world-schema/index.js +24 -0
- package/dist/ecs/world/world-schema/index.js.map +1 -0
- package/dist/ecs/world/world-schema/world-schema.d.ts +18 -0
- package/dist/ecs/world/world-schema/world-schema.js +23 -0
- package/dist/ecs/world/world-schema/world-schema.js.map +1 -0
- package/dist/ecs/world/world.d.ts +11 -0
- package/dist/ecs/world/world.js +2 -0
- package/dist/ecs/world/world.js.map +1 -0
- package/dist/graphics/camera/camera.d.ts +62 -0
- package/dist/graphics/camera/camera.js +17 -0
- package/dist/graphics/camera/camera.js.map +1 -0
- package/dist/graphics/camera/index.d.ts +4 -0
- package/dist/graphics/camera/index.js +5 -0
- package/dist/graphics/camera/index.js.map +1 -0
- package/dist/graphics/camera/screen-to-world-ray.d.ts +12 -0
- package/dist/graphics/camera/screen-to-world-ray.js +49 -0
- package/dist/graphics/camera/screen-to-world-ray.js.map +1 -0
- package/dist/graphics/camera/screen-to-world-ray.test.d.ts +1 -0
- package/dist/graphics/camera/screen-to-world-ray.test.js +171 -0
- package/dist/graphics/camera/screen-to-world-ray.test.js.map +1 -0
- package/dist/graphics/camera/to-view-projection.d.ts +3 -0
- package/dist/graphics/camera/to-view-projection.js +8 -0
- package/dist/graphics/camera/to-view-projection.js.map +1 -0
- package/dist/graphics/camera/world-to-screen.d.ts +12 -0
- package/dist/graphics/camera/world-to-screen.js +38 -0
- package/dist/graphics/camera/world-to-screen.js.map +1 -0
- package/dist/graphics/camera/world-to-screen.test.d.ts +1 -0
- package/dist/graphics/camera/world-to-screen.test.js +124 -0
- package/dist/graphics/camera/world-to-screen.test.js.map +1 -0
- package/dist/graphics/create-struct-gpu-buffer.d.ts +7 -0
- package/dist/graphics/create-struct-gpu-buffer.js +17 -0
- package/dist/graphics/create-struct-gpu-buffer.js.map +1 -0
- package/dist/graphics/extract-wgsl-bindings.d.ts +5 -0
- package/dist/graphics/extract-wgsl-bindings.js +10 -0
- package/dist/graphics/extract-wgsl-bindings.js.map +1 -0
- package/dist/graphics/frame.d.ts +1 -0
- package/dist/graphics/frame.js +15 -0
- package/dist/graphics/frame.js.map +1 -0
- package/dist/graphics/get-web-gpu-device-and-context.d.ts +1 -0
- package/dist/graphics/get-web-gpu-device-and-context.js +24 -0
- package/dist/graphics/get-web-gpu-device-and-context.js.map +1 -0
- package/dist/graphics/graphics-context.d.ts +1 -0
- package/dist/graphics/graphics-context.js +7 -0
- package/dist/graphics/graphics-context.js.map +1 -0
- package/dist/graphics/index.d.ts +5 -0
- package/dist/graphics/index.js +5 -0
- package/dist/graphics/index.js.map +1 -0
- package/dist/graphics/to-gpu-buffer.d.ts +2 -0
- package/dist/graphics/to-gpu-buffer.js +14 -0
- package/dist/graphics/to-gpu-buffer.js.map +1 -0
- package/dist/internal/array-buffer-like/grow.d.ts +1 -0
- package/dist/internal/array-buffer-like/grow.js +9 -0
- package/dist/internal/array-buffer-like/grow.js.map +1 -0
- package/dist/lit/hooks/use-drag-transaction.d.ts +1 -1
- package/dist/math/aabb/aabb.d.ts +3 -52
- package/dist/math/aabb/aabb.js +2 -97
- package/dist/math/aabb/aabb.js.map +1 -1
- package/dist/math/aabb/constants/functions.d.ts +15 -0
- package/dist/math/aabb/constants/functions.js +76 -0
- package/dist/math/aabb/constants/functions.js.map +1 -0
- package/dist/math/aabb/constants/index.d.ts +3 -0
- package/dist/math/aabb/constants/index.js +25 -0
- package/dist/math/aabb/constants/index.js.map +1 -0
- package/dist/math/aabb/constants/layout.d.ts +1 -0
- package/dist/math/aabb/constants/layout.js +25 -0
- package/dist/math/aabb/constants/layout.js.map +1 -0
- package/dist/math/aabb/constants/schema.d.ts +33 -0
- package/dist/math/aabb/constants/schema.js +37 -0
- package/dist/math/aabb/constants/schema.js.map +1 -0
- package/dist/math/aabb/functions.d.ts +1 -0
- package/dist/math/aabb/functions.js +23 -0
- package/dist/math/aabb/functions.js.map +1 -0
- package/dist/math/aabb/lineIntersection.d.ts +10 -0
- package/dist/math/aabb/lineIntersection.js +42 -0
- package/dist/math/aabb/lineIntersection.js.map +1 -0
- package/dist/math/aabb-face/aabb-face.d.ts +3 -53
- package/dist/math/aabb-face/aabb-face.js +1 -135
- package/dist/math/aabb-face/aabb-face.js.map +1 -1
- package/dist/math/aabb-face/aabb-face.test.js +1 -1
- package/dist/math/aabb-face/aabb-face.test.js.map +1 -1
- package/dist/math/aabb-face/constants/functions.d.ts +47 -0
- package/dist/math/aabb-face/constants/functions.js +148 -0
- package/dist/math/aabb-face/constants/functions.js.map +1 -0
- package/dist/math/aabb-face/constants/index.d.ts +2 -0
- package/dist/math/aabb-face/constants/index.js +24 -0
- package/dist/math/aabb-face/constants/index.js.map +1 -0
- package/dist/math/aabb-face/constants/schema.d.ts +5 -0
- package/dist/math/aabb-face/constants/schema.js +27 -0
- package/dist/math/aabb-face/constants/schema.js.map +1 -0
- package/dist/math/aabb-face/face.d.ts +51 -0
- package/dist/math/aabb-face/face.js +110 -0
- package/dist/math/aabb-face/face.js.map +1 -0
- package/dist/math/aabb-face/face.test.d.ts +1 -0
- package/dist/math/aabb-face/face.test.js +94 -0
- package/dist/math/aabb-face/face.test.js.map +1 -0
- package/dist/math/aabb-face/functions.d.ts +47 -0
- package/dist/math/aabb-face/functions.js +148 -0
- package/dist/math/aabb-face/functions.js.map +1 -0
- package/dist/math/aabb-face/index.d.ts +4 -0
- package/dist/math/aabb-face/index.js +23 -0
- package/dist/math/aabb-face/index.js.map +1 -0
- package/dist/math/aabb-face/public.d.ts +2 -0
- package/dist/math/aabb-face/public.js +24 -0
- package/dist/math/aabb-face/public.js.map +1 -0
- package/dist/math/aabb-face/schema.d.ts +5 -0
- package/dist/math/aabb-face/schema.js +27 -0
- package/dist/math/aabb-face/schema.js.map +1 -0
- package/dist/math/box/box.d.ts +50 -0
- package/dist/math/box/box.js +23 -0
- package/dist/math/box/box.js.map +1 -0
- package/dist/math/f32/constants/index.d.ts +1 -0
- package/dist/math/f32/constants/index.js +23 -0
- package/dist/math/f32/constants/index.js.map +1 -0
- package/dist/math/f32/constants/schema.d.ts +5 -0
- package/dist/math/f32/constants/schema.js +24 -0
- package/dist/math/f32/constants/schema.js.map +1 -0
- package/dist/math/f32/f32.d.ts +3 -8
- package/dist/math/f32/f32.js +1 -6
- package/dist/math/f32/f32.js.map +1 -1
- package/dist/math/face/face.d.ts +51 -0
- package/dist/math/face/face.js +110 -0
- package/dist/math/face/face.js.map +1 -0
- package/dist/math/face/face.test.d.ts +1 -0
- package/dist/math/face/face.test.js +94 -0
- package/dist/math/face/face.test.js.map +1 -0
- package/dist/math/i32/constants/index.d.ts +1 -0
- package/dist/math/i32/constants/index.js +23 -0
- package/dist/math/i32/constants/index.js.map +1 -0
- package/dist/math/i32/constants/schema.d.ts +6 -0
- package/dist/math/i32/constants/schema.js +24 -0
- package/dist/math/i32/constants/schema.js.map +1 -0
- package/dist/math/i32/i32.d.ts +3 -9
- package/dist/math/i32/i32.js +1 -6
- package/dist/math/i32/i32.js.map +1 -1
- package/dist/math/line2/constants/functions.d.ts +5 -0
- package/dist/math/line2/constants/functions.js +61 -0
- package/dist/math/line2/constants/functions.js.map +1 -0
- package/dist/math/line2/constants/index.d.ts +3 -0
- package/dist/math/line2/constants/index.js +25 -0
- package/dist/math/line2/constants/index.js.map +1 -0
- package/dist/math/line2/constants/layout.d.ts +1 -0
- package/dist/math/line2/constants/layout.js +25 -0
- package/dist/math/line2/constants/layout.js.map +1 -0
- package/dist/math/line2/constants/schema.d.ts +33 -0
- package/dist/math/line2/constants/schema.js +37 -0
- package/dist/math/line2/constants/schema.js.map +1 -0
- package/dist/math/line2/line2.d.ts +3 -41
- package/dist/math/line2/line2.js +1 -60
- package/dist/math/line2/line2.js.map +1 -1
- package/dist/math/line3/constants/functions.d.ts +17 -0
- package/dist/math/line3/constants/functions.js +70 -0
- package/dist/math/line3/constants/functions.js.map +1 -0
- package/dist/math/line3/constants/index.d.ts +3 -0
- package/dist/math/line3/constants/index.js +25 -0
- package/dist/math/line3/constants/index.js.map +1 -0
- package/dist/math/line3/constants/layout.d.ts +1 -0
- package/dist/math/line3/constants/layout.js +25 -0
- package/dist/math/line3/constants/layout.js.map +1 -0
- package/dist/math/line3/constants/schema.d.ts +33 -0
- package/dist/math/line3/constants/schema.js +37 -0
- package/dist/math/line3/constants/schema.js.map +1 -0
- package/dist/math/line3/line3.d.ts +3 -53
- package/dist/math/line3/line3.js +1 -68
- package/dist/math/line3/line3.js.map +1 -1
- package/dist/math/mat4x4/constants/functions.d.ts +23 -0
- package/dist/math/mat4x4/constants/functions.js +236 -0
- package/dist/math/mat4x4/constants/functions.js.map +1 -0
- package/dist/math/mat4x4/constants/index.d.ts +3 -0
- package/dist/math/mat4x4/constants/index.js +25 -0
- package/dist/math/mat4x4/constants/index.js.map +1 -0
- package/dist/math/mat4x4/constants/layout.d.ts +1 -0
- package/dist/math/mat4x4/constants/layout.js +25 -0
- package/dist/math/mat4x4/constants/layout.js.map +1 -0
- package/dist/math/mat4x4/constants/schema.d.ts +11 -0
- package/dist/math/mat4x4/constants/schema.js +30 -0
- package/dist/math/mat4x4/constants/schema.js.map +1 -0
- package/dist/math/mat4x4/mat4x4.d.ts +3 -36
- package/dist/math/mat4x4/mat4x4.js +1 -228
- package/dist/math/mat4x4/mat4x4.js.map +1 -1
- package/dist/math/picking/face.d.ts +1 -0
- package/dist/math/picking/face.js +2 -0
- package/dist/math/picking/face.js.map +1 -0
- package/dist/math/picking/get-closest-entity-to-line.d.ts +4 -0
- package/dist/math/picking/get-closest-entity-to-line.js +30 -0
- package/dist/math/picking/get-closest-entity-to-line.js.map +1 -0
- package/dist/math/picking/get-closest-entity-to-point.d.ts +4 -0
- package/dist/math/picking/get-closest-entity-to-point.js +27 -0
- package/dist/math/picking/get-closest-entity-to-point.js.map +1 -0
- package/dist/math/picking/get-intersecting-entities.d.ts +12 -0
- package/dist/math/picking/get-intersecting-entities.js +15 -0
- package/dist/math/picking/get-intersecting-entities.js.map +1 -0
- package/dist/math/picking/getClosestEntityToLine.d.ts +4 -0
- package/dist/math/picking/getClosestEntityToLine.js +29 -0
- package/dist/math/picking/getClosestEntityToLine.js.map +1 -0
- package/dist/math/picking/getClosestEntityToPoint.d.ts +4 -0
- package/dist/math/picking/getClosestEntityToPoint.js +27 -0
- package/dist/math/picking/getClosestEntityToPoint.js.map +1 -0
- package/dist/math/picking/getIntersectingEntities.d.ts +12 -0
- package/dist/math/picking/getIntersectingEntities.js +15 -0
- package/dist/math/picking/getIntersectingEntities.js.map +1 -0
- package/dist/math/picking/index.d.ts +5 -0
- package/dist/math/picking/index.js +27 -0
- package/dist/math/picking/index.js.map +1 -0
- package/dist/math/picking/pick-from-tables.d.ts +19 -0
- package/dist/math/picking/pick-from-tables.js +63 -0
- package/dist/math/picking/pick-from-tables.js.map +1 -0
- package/dist/math/picking/pick-result.d.ts +12 -0
- package/dist/math/picking/pick-result.js +23 -0
- package/dist/math/picking/pick-result.js.map +1 -0
- package/dist/math/plane/constants/functions.d.ts +16 -0
- package/dist/math/plane/constants/functions.js +54 -0
- package/dist/math/plane/constants/functions.js.map +1 -0
- package/dist/math/plane/constants/index.d.ts +3 -0
- package/dist/math/plane/constants/index.js +25 -0
- package/dist/math/plane/constants/index.js.map +1 -0
- package/dist/math/plane/constants/layout.d.ts +1 -0
- package/dist/math/plane/constants/layout.js +25 -0
- package/dist/math/plane/constants/layout.js.map +1 -0
- package/dist/math/plane/constants/schema.d.ts +24 -0
- package/dist/{schema/type.js → math/plane/constants/schema.js} +7 -7
- package/dist/math/plane/constants/schema.js.map +1 -0
- package/dist/math/plane/plane.d.ts +3 -42
- package/dist/math/plane/plane.js +1 -49
- package/dist/math/plane/plane.js.map +1 -1
- package/dist/math/quat/constants/index.d.ts +3 -0
- package/dist/math/quat/constants/index.js +25 -0
- package/dist/math/quat/constants/index.js.map +1 -0
- package/dist/math/quat/constants/layout.d.ts +1 -0
- package/dist/math/quat/constants/layout.js +25 -0
- package/dist/math/quat/constants/layout.js.map +1 -0
- package/dist/math/quat/constants/schema.d.ts +11 -0
- package/dist/math/quat/constants/schema.js +30 -0
- package/dist/math/quat/constants/schema.js.map +1 -0
- package/dist/math/quat/quat.d.ts +3 -56
- package/dist/math/quat/quat.js +1 -250
- package/dist/math/quat/quat.js.map +1 -1
- package/dist/math/transform/debug-inverse.d.ts +1 -0
- package/dist/math/transform/debug-inverse.js +28 -0
- package/dist/math/transform/debug-inverse.js.map +1 -0
- package/dist/math/transform/debug-quat.d.ts +1 -0
- package/dist/math/transform/debug-quat.js +23 -0
- package/dist/math/transform/debug-quat.js.map +1 -0
- package/dist/math/transform/debug-test.d.ts +1 -0
- package/dist/math/transform/debug-test.js +34 -0
- package/dist/math/transform/debug-test.js.map +1 -0
- package/dist/math/transform/transform.d.ts +58 -0
- package/dist/math/transform/transform.js +101 -0
- package/dist/math/transform/transform.js.map +1 -0
- package/dist/math/transform/transform.test.d.ts +1 -0
- package/dist/math/transform/transform.test.js +309 -0
- package/dist/math/transform/transform.test.js.map +1 -0
- package/dist/math/u32/constants/index.d.ts +1 -0
- package/dist/math/u32/constants/index.js +23 -0
- package/dist/math/u32/constants/index.js.map +1 -0
- package/dist/math/u32/constants/schema.d.ts +6 -0
- package/dist/math/u32/constants/schema.js +24 -0
- package/dist/math/u32/constants/schema.js.map +1 -0
- package/dist/math/u32/u32.d.ts +3 -9
- package/dist/math/u32/u32.js +1 -6
- package/dist/math/u32/u32.js.map +1 -1
- package/dist/math/vec2/constants/functions.d.ts +48 -0
- package/dist/math/vec2/constants/functions.js +104 -0
- package/dist/math/vec2/constants/functions.js.map +1 -0
- package/dist/math/vec2/constants/index.d.ts +3 -0
- package/dist/math/vec2/constants/index.js +25 -0
- package/dist/math/vec2/constants/index.js.map +1 -0
- package/dist/math/vec2/constants/layout.d.ts +1 -0
- package/dist/math/vec2/constants/layout.js +25 -0
- package/dist/math/vec2/constants/layout.js.map +1 -0
- package/dist/math/vec2/constants/schema.d.ts +11 -0
- package/dist/math/vec2/constants/schema.js +30 -0
- package/dist/math/vec2/constants/schema.js.map +1 -0
- package/dist/math/vec2/functions/abs.d.ts +2 -0
- package/dist/math/vec2/functions/abs.js +23 -0
- package/dist/math/vec2/functions/abs.js.map +1 -0
- package/dist/math/vec2/functions/acos.d.ts +2 -0
- package/dist/math/vec2/functions/acos.js +23 -0
- package/dist/math/vec2/functions/acos.js.map +1 -0
- package/dist/math/vec2/functions/acosh.d.ts +2 -0
- package/dist/math/vec2/functions/acosh.js +23 -0
- package/dist/math/vec2/functions/acosh.js.map +1 -0
- package/dist/math/vec2/functions/add.d.ts +2 -0
- package/dist/math/vec2/functions/add.js +23 -0
- package/dist/math/vec2/functions/add.js.map +1 -0
- package/dist/math/vec2/functions/asin.d.ts +2 -0
- package/dist/math/vec2/functions/asin.js +23 -0
- package/dist/math/vec2/functions/asin.js.map +1 -0
- package/dist/math/vec2/functions/asinh.d.ts +2 -0
- package/dist/math/vec2/functions/asinh.js +23 -0
- package/dist/math/vec2/functions/asinh.js.map +1 -0
- package/dist/math/vec2/functions/atan.d.ts +2 -0
- package/dist/math/vec2/functions/atan.js +23 -0
- package/dist/math/vec2/functions/atan.js.map +1 -0
- package/dist/math/vec2/functions/atanh.d.ts +2 -0
- package/dist/math/vec2/functions/atanh.js +23 -0
- package/dist/math/vec2/functions/atanh.js.map +1 -0
- package/dist/math/vec2/functions/ceil.d.ts +2 -0
- package/dist/math/vec2/functions/ceil.js +23 -0
- package/dist/math/vec2/functions/ceil.js.map +1 -0
- package/dist/math/vec2/functions/clamp.d.ts +2 -0
- package/dist/math/vec2/functions/clamp.js +25 -0
- package/dist/math/vec2/functions/clamp.js.map +1 -0
- package/dist/math/vec2/functions/cos.d.ts +2 -0
- package/dist/math/vec2/functions/cos.js +23 -0
- package/dist/math/vec2/functions/cos.js.map +1 -0
- package/dist/math/vec2/functions/cosh.d.ts +2 -0
- package/dist/math/vec2/functions/cosh.js +23 -0
- package/dist/math/vec2/functions/cosh.js.map +1 -0
- package/dist/math/vec2/functions/distance.d.ts +2 -0
- package/dist/math/vec2/functions/distance.js +25 -0
- package/dist/math/vec2/functions/distance.js.map +1 -0
- package/dist/math/vec2/functions/dot.d.ts +2 -0
- package/dist/math/vec2/functions/dot.js +23 -0
- package/dist/math/vec2/functions/dot.js.map +1 -0
- package/dist/math/vec2/functions/exp-2.d.ts +2 -0
- package/dist/math/vec2/functions/exp-2.js +23 -0
- package/dist/math/vec2/functions/exp-2.js.map +1 -0
- package/dist/math/vec2/functions/exp.d.ts +2 -0
- package/dist/math/vec2/functions/exp.js +23 -0
- package/dist/math/vec2/functions/exp.js.map +1 -0
- package/dist/math/vec2/functions/face-forward.d.ts +2 -0
- package/dist/math/vec2/functions/face-forward.js +25 -0
- package/dist/math/vec2/functions/face-forward.js.map +1 -0
- package/dist/math/vec2/functions/floor.d.ts +2 -0
- package/dist/math/vec2/functions/floor.js +23 -0
- package/dist/math/vec2/functions/floor.js.map +1 -0
- package/dist/math/vec2/functions/fract.d.ts +2 -0
- package/dist/math/vec2/functions/fract.js +23 -0
- package/dist/math/vec2/functions/fract.js.map +1 -0
- package/dist/math/vec2/functions/functions.d.ts +48 -0
- package/dist/math/vec2/functions/functions.js +104 -0
- package/dist/math/vec2/functions/functions.js.map +1 -0
- package/dist/math/vec2/functions/index.d.ts +3 -0
- package/dist/math/vec2/functions/index.js +25 -0
- package/dist/math/vec2/functions/index.js.map +1 -0
- package/dist/math/vec2/functions/layout.d.ts +1 -0
- package/dist/math/vec2/functions/layout.js +25 -0
- package/dist/math/vec2/functions/layout.js.map +1 -0
- package/dist/math/vec2/functions/length.d.ts +2 -0
- package/dist/math/vec2/functions/length.js +23 -0
- package/dist/math/vec2/functions/length.js.map +1 -0
- package/dist/math/vec2/functions/log-2.d.ts +2 -0
- package/dist/math/vec2/functions/log-2.js +23 -0
- package/dist/math/vec2/functions/log-2.js.map +1 -0
- package/dist/math/vec2/functions/log.d.ts +2 -0
- package/dist/math/vec2/functions/log.js +23 -0
- package/dist/math/vec2/functions/log.js.map +1 -0
- package/dist/math/vec2/functions/max.d.ts +2 -0
- package/dist/math/vec2/functions/max.js +23 -0
- package/dist/math/vec2/functions/max.js.map +1 -0
- package/dist/math/vec2/functions/min.d.ts +2 -0
- package/dist/math/vec2/functions/min.js +23 -0
- package/dist/math/vec2/functions/min.js.map +1 -0
- package/dist/math/vec2/functions/mix.d.ts +2 -0
- package/dist/math/vec2/functions/mix.js +26 -0
- package/dist/math/vec2/functions/mix.js.map +1 -0
- package/dist/math/vec2/functions/mod.d.ts +2 -0
- package/dist/math/vec2/functions/mod.js +26 -0
- package/dist/math/vec2/functions/mod.js.map +1 -0
- package/dist/math/vec2/functions/modf.d.ts +5 -0
- package/dist/math/vec2/functions/modf.js +26 -0
- package/dist/math/vec2/functions/modf.js.map +1 -0
- package/dist/math/vec2/functions/negate.d.ts +2 -0
- package/dist/math/vec2/functions/negate.js +23 -0
- package/dist/math/vec2/functions/negate.js.map +1 -0
- package/dist/math/vec2/functions/normalize.d.ts +2 -0
- package/dist/math/vec2/functions/normalize.js +28 -0
- package/dist/math/vec2/functions/normalize.js.map +1 -0
- package/dist/math/vec2/functions/pow.d.ts +2 -0
- package/dist/math/vec2/functions/pow.js +26 -0
- package/dist/math/vec2/functions/pow.js.map +1 -0
- package/dist/math/vec2/functions/reflect.d.ts +2 -0
- package/dist/math/vec2/functions/reflect.js +29 -0
- package/dist/math/vec2/functions/reflect.js.map +1 -0
- package/dist/math/vec2/functions/refract.d.ts +2 -0
- package/dist/math/vec2/functions/refract.js +34 -0
- package/dist/math/vec2/functions/refract.js.map +1 -0
- package/dist/math/vec2/functions/round.d.ts +2 -0
- package/dist/math/vec2/functions/round.js +23 -0
- package/dist/math/vec2/functions/round.js.map +1 -0
- package/dist/math/vec2/functions/scale.d.ts +2 -0
- package/dist/math/vec2/functions/scale.js +23 -0
- package/dist/math/vec2/functions/scale.js.map +1 -0
- package/dist/math/vec2/functions/schema.d.ts +11 -0
- package/dist/math/vec2/functions/schema.js +30 -0
- package/dist/math/vec2/functions/schema.js.map +1 -0
- package/dist/math/vec2/functions/sign.d.ts +2 -0
- package/dist/math/vec2/functions/sign.js +23 -0
- package/dist/math/vec2/functions/sign.js.map +1 -0
- package/dist/math/vec2/functions/sin.d.ts +2 -0
- package/dist/math/vec2/functions/sin.js +23 -0
- package/dist/math/vec2/functions/sin.js.map +1 -0
- package/dist/math/vec2/functions/sinh.d.ts +2 -0
- package/dist/math/vec2/functions/sinh.js +23 -0
- package/dist/math/vec2/functions/sinh.js.map +1 -0
- package/dist/math/vec2/functions/smooth-step.d.ts +2 -0
- package/dist/math/vec2/functions/smooth-step.js +27 -0
- package/dist/math/vec2/functions/smooth-step.js.map +1 -0
- package/dist/math/vec2/functions/sqrt.d.ts +2 -0
- package/dist/math/vec2/functions/sqrt.js +23 -0
- package/dist/math/vec2/functions/sqrt.js.map +1 -0
- package/dist/math/vec2/functions/step.d.ts +2 -0
- package/dist/math/vec2/functions/step.js +26 -0
- package/dist/math/vec2/functions/step.js.map +1 -0
- package/dist/math/vec2/functions/subtract.d.ts +2 -0
- package/dist/math/vec2/functions/subtract.js +23 -0
- package/dist/math/vec2/functions/subtract.js.map +1 -0
- package/dist/math/vec2/functions/tan.d.ts +2 -0
- package/dist/math/vec2/functions/tan.js +23 -0
- package/dist/math/vec2/functions/tan.js.map +1 -0
- package/dist/math/vec2/functions/tanh.d.ts +2 -0
- package/dist/math/vec2/functions/tanh.js +23 -0
- package/dist/math/vec2/functions/tanh.js.map +1 -0
- package/dist/math/vec2/functions/trunc.d.ts +2 -0
- package/dist/math/vec2/functions/trunc.js +23 -0
- package/dist/math/vec2/functions/trunc.js.map +1 -0
- package/dist/math/vec2/vec2.d.ts +3 -62
- package/dist/math/vec2/vec2.js +1 -96
- package/dist/math/vec2/vec2.js.map +1 -1
- package/dist/math/vec3/constants/functions.d.ts +59 -0
- package/dist/math/vec3/constants/functions.js +159 -0
- package/dist/math/vec3/constants/functions.js.map +1 -0
- package/dist/math/vec3/constants/index.d.ts +3 -0
- package/dist/math/vec3/constants/index.js +25 -0
- package/dist/math/vec3/constants/index.js.map +1 -0
- package/dist/math/vec3/constants/layout.d.ts +1 -0
- package/dist/math/vec3/constants/layout.js +25 -0
- package/dist/math/vec3/constants/layout.js.map +1 -0
- package/dist/math/vec3/constants/schema.d.ts +11 -0
- package/dist/math/vec3/constants/schema.js +30 -0
- package/dist/math/vec3/constants/schema.js.map +1 -0
- package/dist/math/vec3/functions/abs.d.ts +2 -0
- package/dist/math/vec3/functions/abs.js +23 -0
- package/dist/math/vec3/functions/abs.js.map +1 -0
- package/dist/math/vec3/functions/acos.d.ts +2 -0
- package/dist/math/vec3/functions/acos.js +23 -0
- package/dist/math/vec3/functions/acos.js.map +1 -0
- package/dist/math/vec3/functions/acosh.d.ts +2 -0
- package/dist/math/vec3/functions/acosh.js +23 -0
- package/dist/math/vec3/functions/acosh.js.map +1 -0
- package/dist/math/vec3/functions/add.d.ts +2 -0
- package/dist/math/vec3/functions/add.js +27 -0
- package/dist/math/vec3/functions/add.js.map +1 -0
- package/dist/math/vec3/functions/asin.d.ts +2 -0
- package/dist/math/vec3/functions/asin.js +23 -0
- package/dist/math/vec3/functions/asin.js.map +1 -0
- package/dist/math/vec3/functions/asinh.d.ts +2 -0
- package/dist/math/vec3/functions/asinh.js +23 -0
- package/dist/math/vec3/functions/asinh.js.map +1 -0
- package/dist/math/vec3/functions/atan.d.ts +2 -0
- package/dist/math/vec3/functions/atan.js +23 -0
- package/dist/math/vec3/functions/atan.js.map +1 -0
- package/dist/math/vec3/functions/atanh.d.ts +2 -0
- package/dist/math/vec3/functions/atanh.js +23 -0
- package/dist/math/vec3/functions/atanh.js.map +1 -0
- package/dist/math/vec3/functions/ceil.d.ts +2 -0
- package/dist/math/vec3/functions/ceil.js +23 -0
- package/dist/math/vec3/functions/ceil.js.map +1 -0
- package/dist/math/vec3/functions/clamp.d.ts +2 -0
- package/dist/math/vec3/functions/clamp.js +25 -0
- package/dist/math/vec3/functions/clamp.js.map +1 -0
- package/dist/math/vec3/functions/cos.d.ts +2 -0
- package/dist/math/vec3/functions/cos.js +23 -0
- package/dist/math/vec3/functions/cos.js.map +1 -0
- package/dist/math/vec3/functions/cosh.d.ts +2 -0
- package/dist/math/vec3/functions/cosh.js +23 -0
- package/dist/math/vec3/functions/cosh.js.map +1 -0
- package/dist/math/vec3/functions/cross.d.ts +2 -0
- package/dist/math/vec3/functions/cross.js +27 -0
- package/dist/math/vec3/functions/cross.js.map +1 -0
- package/dist/math/vec3/functions/distance-squared.d.ts +2 -0
- package/dist/math/vec3/functions/distance-squared.js +28 -0
- package/dist/math/vec3/functions/distance-squared.js.map +1 -0
- package/dist/math/vec3/functions/distance.d.ts +2 -0
- package/dist/math/vec3/functions/distance.js +25 -0
- package/dist/math/vec3/functions/distance.js.map +1 -0
- package/dist/math/vec3/functions/dot.d.ts +2 -0
- package/dist/math/vec3/functions/dot.js +23 -0
- package/dist/math/vec3/functions/dot.js.map +1 -0
- package/dist/math/vec3/functions/equals.d.ts +2 -0
- package/dist/math/vec3/functions/equals.js +23 -0
- package/dist/math/vec3/functions/equals.js.map +1 -0
- package/dist/math/vec3/functions/exp-2.d.ts +2 -0
- package/dist/math/vec3/functions/exp-2.js +23 -0
- package/dist/math/vec3/functions/exp-2.js.map +1 -0
- package/dist/math/vec3/functions/exp.d.ts +2 -0
- package/dist/math/vec3/functions/exp.js +23 -0
- package/dist/math/vec3/functions/exp.js.map +1 -0
- package/dist/math/vec3/functions/face-forward.d.ts +2 -0
- package/dist/math/vec3/functions/face-forward.js +25 -0
- package/dist/math/vec3/functions/face-forward.js.map +1 -0
- package/dist/math/vec3/functions/floor.d.ts +2 -0
- package/dist/math/vec3/functions/floor.js +23 -0
- package/dist/math/vec3/functions/floor.js.map +1 -0
- package/dist/math/vec3/functions/fract.d.ts +2 -0
- package/dist/math/vec3/functions/fract.js +27 -0
- package/dist/math/vec3/functions/fract.js.map +1 -0
- package/dist/math/vec3/functions/index.d.ts +54 -0
- package/dist/math/vec3/functions/index.js +76 -0
- package/dist/math/vec3/functions/index.js.map +1 -0
- package/dist/math/vec3/functions/layout.d.ts +1 -0
- package/dist/math/vec3/functions/layout.js +25 -0
- package/dist/math/vec3/functions/layout.js.map +1 -0
- package/dist/math/vec3/functions/length-squared.d.ts +2 -0
- package/dist/math/vec3/functions/length-squared.js +23 -0
- package/dist/math/vec3/functions/length-squared.js.map +1 -0
- package/dist/math/vec3/functions/length.d.ts +2 -0
- package/dist/math/vec3/functions/length.js +23 -0
- package/dist/math/vec3/functions/length.js.map +1 -0
- package/dist/math/vec3/functions/log-2.d.ts +2 -0
- package/dist/math/vec3/functions/log-2.js +23 -0
- package/dist/math/vec3/functions/log-2.js.map +1 -0
- package/dist/math/vec3/functions/log.d.ts +2 -0
- package/dist/math/vec3/functions/log.js +23 -0
- package/dist/math/vec3/functions/log.js.map +1 -0
- package/dist/math/vec3/functions/max.d.ts +2 -0
- package/dist/math/vec3/functions/max.js +27 -0
- package/dist/math/vec3/functions/max.js.map +1 -0
- package/dist/math/vec3/functions/min.d.ts +2 -0
- package/dist/math/vec3/functions/min.js +27 -0
- package/dist/math/vec3/functions/min.js.map +1 -0
- package/dist/math/vec3/functions/mix.d.ts +2 -0
- package/dist/math/vec3/functions/mix.js +27 -0
- package/dist/math/vec3/functions/mix.js.map +1 -0
- package/dist/math/vec3/functions/mod.d.ts +2 -0
- package/dist/math/vec3/functions/mod.js +27 -0
- package/dist/math/vec3/functions/mod.js.map +1 -0
- package/dist/math/vec3/functions/modf.d.ts +5 -0
- package/dist/math/vec3/functions/modf.js +26 -0
- package/dist/math/vec3/functions/modf.js.map +1 -0
- package/dist/math/vec3/functions/multiply.d.ts +5 -0
- package/dist/math/vec3/functions/multiply.js +30 -0
- package/dist/math/vec3/functions/multiply.js.map +1 -0
- package/dist/math/vec3/functions/negate.d.ts +2 -0
- package/dist/math/vec3/functions/negate.js +23 -0
- package/dist/math/vec3/functions/negate.js.map +1 -0
- package/dist/math/vec3/functions/normalize.d.ts +2 -0
- package/dist/math/vec3/functions/normalize.js +28 -0
- package/dist/math/vec3/functions/normalize.js.map +1 -0
- package/dist/math/vec3/functions/one.d.ts +2 -0
- package/dist/math/vec3/functions/one.js +23 -0
- package/dist/math/vec3/functions/one.js.map +1 -0
- package/dist/math/vec3/functions/pow.d.ts +2 -0
- package/dist/math/vec3/functions/pow.js +27 -0
- package/dist/math/vec3/functions/pow.js.map +1 -0
- package/dist/math/vec3/functions/random.d.ts +2 -0
- package/dist/math/vec3/functions/random.js +25 -0
- package/dist/math/vec3/functions/random.js.map +1 -0
- package/dist/math/vec3/functions/reflect.d.ts +2 -0
- package/dist/math/vec3/functions/reflect.js +29 -0
- package/dist/math/vec3/functions/reflect.js.map +1 -0
- package/dist/math/vec3/functions/refract.d.ts +2 -0
- package/dist/math/vec3/functions/refract.js +34 -0
- package/dist/math/vec3/functions/refract.js.map +1 -0
- package/dist/math/vec3/functions/round.d.ts +2 -0
- package/dist/math/vec3/functions/round.js +23 -0
- package/dist/math/vec3/functions/round.js.map +1 -0
- package/dist/math/vec3/functions/scale.d.ts +2 -0
- package/dist/math/vec3/functions/scale.js +23 -0
- package/dist/math/vec3/functions/scale.js.map +1 -0
- package/dist/math/vec3/functions/schema.d.ts +11 -0
- package/dist/math/vec3/functions/schema.js +30 -0
- package/dist/math/vec3/functions/schema.js.map +1 -0
- package/dist/math/vec3/functions/sign.d.ts +2 -0
- package/dist/math/vec3/functions/sign.js +23 -0
- package/dist/math/vec3/functions/sign.js.map +1 -0
- package/dist/math/vec3/functions/sin.d.ts +2 -0
- package/dist/math/vec3/functions/sin.js +23 -0
- package/dist/math/vec3/functions/sin.js.map +1 -0
- package/dist/math/vec3/functions/sinh.d.ts +2 -0
- package/dist/math/vec3/functions/sinh.js +23 -0
- package/dist/math/vec3/functions/sinh.js.map +1 -0
- package/dist/math/vec3/functions/smooth-step.d.ts +2 -0
- package/dist/math/vec3/functions/smooth-step.js +32 -0
- package/dist/math/vec3/functions/smooth-step.js.map +1 -0
- package/dist/math/vec3/functions/sqrt.d.ts +2 -0
- package/dist/math/vec3/functions/sqrt.js +23 -0
- package/dist/math/vec3/functions/sqrt.js.map +1 -0
- package/dist/math/vec3/functions/step.d.ts +2 -0
- package/dist/math/vec3/functions/step.js +27 -0
- package/dist/math/vec3/functions/step.js.map +1 -0
- package/dist/math/vec3/functions/subtract.d.ts +2 -0
- package/dist/math/vec3/functions/subtract.js +27 -0
- package/dist/math/vec3/functions/subtract.js.map +1 -0
- package/dist/math/vec3/functions/tan.d.ts +2 -0
- package/dist/math/vec3/functions/tan.js +23 -0
- package/dist/math/vec3/functions/tan.js.map +1 -0
- package/dist/math/vec3/functions/tanh.d.ts +2 -0
- package/dist/math/vec3/functions/tanh.js +23 -0
- package/dist/math/vec3/functions/tanh.js.map +1 -0
- package/dist/math/vec3/functions/trunc.d.ts +2 -0
- package/dist/math/vec3/functions/trunc.js +23 -0
- package/dist/math/vec3/functions/trunc.js.map +1 -0
- package/dist/math/vec3/functions/zero.d.ts +2 -0
- package/dist/math/vec3/functions/zero.js +23 -0
- package/dist/math/vec3/functions/zero.js.map +1 -0
- package/dist/math/vec3/vec3.d.ts +3 -73
- package/dist/math/vec3/vec3.js +1 -151
- package/dist/math/vec3/vec3.js.map +1 -1
- package/dist/math/vec4/constants/functions.d.ts +49 -0
- package/dist/math/vec4/constants/functions.js +150 -0
- package/dist/math/vec4/constants/functions.js.map +1 -0
- package/dist/math/vec4/constants/index.d.ts +3 -0
- package/dist/math/vec4/constants/index.js +25 -0
- package/dist/math/vec4/constants/index.js.map +1 -0
- package/dist/math/vec4/constants/layout.d.ts +1 -0
- package/dist/math/vec4/constants/layout.js +25 -0
- package/dist/math/vec4/constants/layout.js.map +1 -0
- package/dist/math/vec4/constants/schema.d.ts +11 -0
- package/dist/math/vec4/constants/schema.js +30 -0
- package/dist/math/vec4/constants/schema.js.map +1 -0
- package/dist/math/vec4/functions/abs.d.ts +2 -0
- package/dist/math/vec4/functions/abs.js +23 -0
- package/dist/math/vec4/functions/abs.js.map +1 -0
- package/dist/math/vec4/functions/ceil.d.ts +2 -0
- package/dist/math/vec4/functions/ceil.js +23 -0
- package/dist/math/vec4/functions/ceil.js.map +1 -0
- package/dist/math/vec4/functions/clamp.d.ts +2 -0
- package/dist/math/vec4/functions/clamp.js +25 -0
- package/dist/math/vec4/functions/clamp.js.map +1 -0
- package/dist/math/vec4/functions/floor.d.ts +2 -0
- package/dist/math/vec4/functions/floor.js +23 -0
- package/dist/math/vec4/functions/floor.js.map +1 -0
- package/dist/math/vec4/functions/layout.d.ts +1 -0
- package/dist/math/vec4/functions/layout.js +25 -0
- package/dist/math/vec4/functions/layout.js.map +1 -0
- package/dist/math/vec4/functions/max.d.ts +2 -0
- package/dist/math/vec4/functions/max.js +28 -0
- package/dist/math/vec4/functions/max.js.map +1 -0
- package/dist/math/vec4/functions/min.d.ts +2 -0
- package/dist/math/vec4/functions/min.js +28 -0
- package/dist/math/vec4/functions/min.js.map +1 -0
- package/dist/math/vec4/functions/round.d.ts +2 -0
- package/dist/math/vec4/functions/round.js +23 -0
- package/dist/math/vec4/functions/round.js.map +1 -0
- package/dist/math/vec4/functions/schema.d.ts +11 -0
- package/dist/math/vec4/functions/schema.js +30 -0
- package/dist/math/vec4/functions/schema.js.map +1 -0
- package/dist/math/vec4/functions/trunc.d.ts +2 -0
- package/dist/math/vec4/functions/trunc.js +23 -0
- package/dist/math/vec4/functions/trunc.js.map +1 -0
- package/dist/math/vec4/vec4.d.ts +3 -63
- package/dist/math/vec4/vec4.js +1 -142
- package/dist/math/vec4/vec4.js.map +1 -1
- package/dist/observe/create-observable-event.d.ts +1 -1
- package/dist/observe/create-observable-event.js +1 -1
- package/dist/observe/create-observable-event.js.map +1 -1
- package/dist/observe/create-observable-state.d.ts +1 -1
- package/dist/observe/create-observable-state.js +1 -1
- package/dist/observe/create-observable-state.js.map +1 -1
- package/dist/old-ecs/ecs/ecs.test.js +0 -1
- package/dist/old-ecs/ecs/ecs.test.js.map +1 -1
- package/dist/old-ecs/privacy/helper-functions.d.ts +43 -0
- package/dist/old-ecs/privacy/helper-functions.js +76 -0
- package/dist/old-ecs/privacy/helper-functions.js.map +1 -0
- package/dist/old-ecs/privacy/helper-functions.test.d.ts +1 -0
- package/dist/old-ecs/privacy/helper-functions.test.js +173 -0
- package/dist/old-ecs/privacy/helper-functions.test.js.map +1 -0
- package/dist/samples/todo/services/main-service/todo-main-service.d.ts +1 -1
- package/dist/samples/todo/services/state-service/create-todo-database.d.ts +5 -4
- package/dist/samples/todo/services/state-service/create-todo-database.js +3 -3
- package/dist/samples/todo/services/state-service/create-todo-database.js.map +1 -1
- package/dist/samples/todo/services/state-service/create-todo-store.d.ts +3 -2
- package/dist/samples/todo/services/state-service/create-todo-store.js +15 -17
- package/dist/samples/todo/services/state-service/create-todo-store.js.map +1 -1
- package/dist/samples/todo/services/state-service/transactions/toggle-complete.js +1 -1
- package/dist/samples/todo/services/state-service/transactions/toggle-complete.js.map +1 -1
- package/dist/schema/f32.d.ts +1 -1
- package/dist/schema/f32.js +1 -1
- package/dist/schema/f32.js.map +1 -1
- package/dist/schema/i32.d.ts +1 -1
- package/dist/schema/i32.js +1 -1
- package/dist/schema/i32.js.map +1 -1
- package/dist/schema/schema/index.d.ts +2 -0
- package/dist/schema/schema/index.js +23 -0
- package/dist/schema/schema/index.js.map +1 -0
- package/dist/schema/schema/nullable.d.ts +6 -0
- package/dist/schema/schema/nullable.js +6 -0
- package/dist/schema/schema/nullable.js.map +1 -0
- package/dist/schema/schema/public.d.ts +3 -0
- package/dist/schema/schema/public.js +25 -0
- package/dist/schema/schema/public.js.map +1 -0
- package/dist/schema/schema/to-vertex-buffer-layout.d.ts +56 -0
- package/dist/schema/schema/to-vertex-buffer-layout.js +143 -0
- package/dist/schema/schema/to-vertex-buffer-layout.js.map +1 -0
- package/dist/schema/{schema copy.d.ts → schema/types.d.ts} +7 -4
- package/dist/schema/{schema copy.js → schema/types.js} +1 -1
- package/dist/schema/schema/types.js.map +1 -0
- package/dist/schema/u32.d.ts +1 -1
- package/dist/schema/u32.js +1 -1
- package/dist/schema/u32.js.map +1 -1
- package/dist/table/constants/functions.d.ts +3 -0
- package/dist/table/constants/functions.js +34 -0
- package/dist/table/constants/functions.js.map +1 -0
- package/dist/table/constants/index.d.ts +1 -0
- package/dist/table/constants/index.js +23 -0
- package/dist/table/constants/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types.d.ts +2 -0
- package/dist/types/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/schema/FromSchemas.d.ts +0 -4
- package/dist/schema/FromSchemas.js +0 -2
- package/dist/schema/FromSchemas.js.map +0 -1
- package/dist/schema/schema copy.js.map +0 -1
- package/dist/schema/type.d.ts +0 -76
- package/dist/schema/type.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Schema } from "../../schema/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Privacy options used in Schema
|
|
4
|
+
*/
|
|
5
|
+
export type PrivacyOptions = {
|
|
6
|
+
[K in NonNullable<Schema["privacy"]>]?: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Checks if a component should be included for serialization
|
|
10
|
+
* @param schema
|
|
11
|
+
* @param privacyOptions
|
|
12
|
+
* @returns Whether the component should be included
|
|
13
|
+
*/
|
|
14
|
+
export declare const shouldIncludeComponentForSerialization: (schema: Schema, privacyOptions?: PrivacyOptions) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Filters a column for privacy by replacing its data with default values if it contains any data.
|
|
17
|
+
* @param schema - The schema of the component
|
|
18
|
+
* @param rows - The number of rows in the table
|
|
19
|
+
* @param data - The data of the column
|
|
20
|
+
* @returns The filtered column containing default values
|
|
21
|
+
*/
|
|
22
|
+
export declare const filterColumnForPrivacy: (schema: Schema, rows: any, data: any) => any;
|
|
23
|
+
/**
|
|
24
|
+
* Gets a filtered column based on privacy options
|
|
25
|
+
* @param name - The name of the component
|
|
26
|
+
* @param privacyOptions
|
|
27
|
+
* @param data - The data of the column
|
|
28
|
+
* @param componentSchemas
|
|
29
|
+
* @param rows - The number of rows in the table
|
|
30
|
+
* @returns A tuple containing the name of the component and the filtered column data
|
|
31
|
+
*/
|
|
32
|
+
export declare const getFilteredColumn: (name: string, privacyOptions: PrivacyOptions | undefined, data: any, componentSchemas: Record<string, Schema>, rows: number) => any[];
|
|
33
|
+
/**
|
|
34
|
+
* Filters a table for privacy based on the filtered components.
|
|
35
|
+
* @param filteredComponents - The components to filter
|
|
36
|
+
* @param table - The table to filter
|
|
37
|
+
* @param options - The privacy options to use
|
|
38
|
+
* @returns The filtered table
|
|
39
|
+
*/
|
|
40
|
+
export declare const filterTableForPrivacy: (filteredComponents: Record<string, Schema>, table: any, options: any) => {
|
|
41
|
+
rows: any;
|
|
42
|
+
columns: any;
|
|
43
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a component should be included for serialization
|
|
3
|
+
* @param schema
|
|
4
|
+
* @param privacyOptions
|
|
5
|
+
* @returns Whether the component should be included
|
|
6
|
+
*/
|
|
7
|
+
export const shouldIncludeComponentForSerialization = (schema, privacyOptions) => {
|
|
8
|
+
// const schema = componentSchemas[component as keyof C];
|
|
9
|
+
// if the component has no privacy attribute, it is considered as necessary.
|
|
10
|
+
// this is to maintain backwards compatibility with existing schemas
|
|
11
|
+
if (!schema?.privacy) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
// Check the privacy attribute
|
|
15
|
+
return !schema.privacy || (privacyOptions?.[schema.privacy] ?? (schema.privacy === 'strictlyNecessary'));
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Filters a column for privacy by replacing its data with default values if it contains any data.
|
|
19
|
+
* @param schema - The schema of the component
|
|
20
|
+
* @param rows - The number of rows in the table
|
|
21
|
+
* @param data - The data of the column
|
|
22
|
+
* @returns The filtered column containing default values
|
|
23
|
+
*/
|
|
24
|
+
export const filterColumnForPrivacy = (schema, rows, data) => {
|
|
25
|
+
let value = data;
|
|
26
|
+
// If the column has no data and the filtered component has a default, use the default
|
|
27
|
+
if (value !== undefined && value !== null && (Array.isArray(value) && value.length !== 0)) {
|
|
28
|
+
// Create array filled with default values for the number of rows
|
|
29
|
+
if (rows > 0) {
|
|
30
|
+
value = new Array(rows).fill(schema.default);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
value = [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
console.warn(`Updated column for schema ${JSON.stringify(schema)} with rows: ${rows}, original data: ${JSON.stringify(data)}, resulting value: ${JSON.stringify(value)} for privacy filter`);
|
|
37
|
+
return value;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Gets a filtered column based on privacy options
|
|
41
|
+
* @param name - The name of the component
|
|
42
|
+
* @param privacyOptions
|
|
43
|
+
* @param data - The data of the column
|
|
44
|
+
* @param componentSchemas
|
|
45
|
+
* @param rows - The number of rows in the table
|
|
46
|
+
* @returns A tuple containing the name of the component and the filtered column data
|
|
47
|
+
*/
|
|
48
|
+
export const getFilteredColumn = (name, privacyOptions, data, componentSchemas, rows) => {
|
|
49
|
+
const schema = componentSchemas[name];
|
|
50
|
+
if (shouldIncludeComponentForSerialization(schema, privacyOptions)) {
|
|
51
|
+
return [name, data];
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return [name, filterColumnForPrivacy(componentSchemas[name], rows, data)];
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Filters a table for privacy based on the filtered components.
|
|
59
|
+
* @param filteredComponents - The components to filter
|
|
60
|
+
* @param table - The table to filter
|
|
61
|
+
* @param options - The privacy options to use
|
|
62
|
+
* @returns The filtered table
|
|
63
|
+
*/
|
|
64
|
+
export const filterTableForPrivacy = (filteredComponents, table, options) => {
|
|
65
|
+
// filter the tables for privacy based on the filtered components.
|
|
66
|
+
const { rows, columns } = table;
|
|
67
|
+
const filteredColumns = Object.fromEntries(Object.entries(columns)
|
|
68
|
+
.map(([name, data]) => {
|
|
69
|
+
return getFilteredColumn(name, options, data, filteredComponents, rows);
|
|
70
|
+
}));
|
|
71
|
+
return {
|
|
72
|
+
rows,
|
|
73
|
+
columns: filteredColumns,
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=helper-functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper-functions.js","sourceRoot":"","sources":["../../../src/old-ecs/privacy/helper-functions.ts"],"names":[],"mappings":"AA8BA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,MAAc,EAAE,cAA+B,EAAW,EAAE;IAC/G,yDAAyD;IACzD,4EAA4E;IAC5E,oEAAoE;IACpE,IAAI,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AAI,sCAAsC,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE,CAAC;QACjE,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACxB,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,IAAI,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9E,CAAC;AACL,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,kBAA0C,EAAE,KAAU,EAAE,OAAY,EAAE,EAAE;IAC1G,kEAAkE;IAClE,MAAM,EAAC,IAAI,EAAE,OAAO,EAAC,GAAG,KAAK,CAAC;IAC9B,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,CACtC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;SAClB,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;QAClB,OAAO,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IAC5E,CAAC,CAAC,CACT,CAAC;IAEF,OAAO;QACH,IAAI;QACJ,OAAO,EAAE,eAAe;KAC3B,CAAC;AACN,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
import { shouldIncludeComponentForSerialization, filterColumnForPrivacy, getFilteredColumn, filterTableForPrivacy } from "./helper-functions.js";
|
|
23
|
+
import { describe, expect, test } from "vitest";
|
|
24
|
+
describe("Privacy Helper Functions", () => {
|
|
25
|
+
test("shouldIncludeComponentForSerialization works correctly", () => {
|
|
26
|
+
const testCases = [
|
|
27
|
+
{
|
|
28
|
+
schema: { type: "string", privacy: "strictlyNecessary" },
|
|
29
|
+
options: { strictlyNecessary: true },
|
|
30
|
+
expected: true,
|
|
31
|
+
description: "strictlyNecessary with permission"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
schema: { type: "string", privacy: "strictlyNecessary" },
|
|
35
|
+
options: undefined,
|
|
36
|
+
expected: true,
|
|
37
|
+
description: "strictlyNecessary without options (default)"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
schema: { type: "string", privacy: "functional" },
|
|
41
|
+
options: { functional: true },
|
|
42
|
+
expected: true,
|
|
43
|
+
description: "functional with permission"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
schema: { type: "string", privacy: "functional" },
|
|
47
|
+
options: { functional: false },
|
|
48
|
+
expected: false,
|
|
49
|
+
description: "functional without permission"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
schema: { type: "string", privacy: "performance" },
|
|
53
|
+
options: { performance: true },
|
|
54
|
+
expected: true,
|
|
55
|
+
description: "performance with permission"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
schema: { type: "string", privacy: "performance" },
|
|
59
|
+
options: { performance: false },
|
|
60
|
+
expected: false,
|
|
61
|
+
description: "performance without permission"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
schema: { type: "string", privacy: "advertising" },
|
|
65
|
+
options: { advertising: true },
|
|
66
|
+
expected: true,
|
|
67
|
+
description: "advertising with permission"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
schema: { type: "string", privacy: "advertising" },
|
|
71
|
+
options: { advertising: false },
|
|
72
|
+
expected: false,
|
|
73
|
+
description: "advertising without permission"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
schema: { type: "string" },
|
|
77
|
+
options: {},
|
|
78
|
+
expected: true,
|
|
79
|
+
description: "no privacy classification (always included)"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
schema: { type: "string" },
|
|
83
|
+
options: { strictlyNecessary: false, functional: false, performance: false, advertising: false },
|
|
84
|
+
expected: true,
|
|
85
|
+
description: "no privacy classification with all permissions false"
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
for (const testCase of testCases) {
|
|
89
|
+
const result = shouldIncludeComponentForSerialization(testCase.schema, testCase.options);
|
|
90
|
+
expect(result).toBe(testCase.expected);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
test("filterColumnForPrivacy replaces data with default values", () => {
|
|
94
|
+
const schema = { type: "string", default: "defaultValue" };
|
|
95
|
+
const rows = 3;
|
|
96
|
+
const originalData = ["value1", "value2", "value3"];
|
|
97
|
+
const result = filterColumnForPrivacy(schema, rows, originalData);
|
|
98
|
+
expect(result).toEqual(["defaultValue", "defaultValue", "defaultValue"]);
|
|
99
|
+
});
|
|
100
|
+
test("filterColumnForPrivacy handles empty data", () => {
|
|
101
|
+
const schema = { type: "string", default: "defaultValue" };
|
|
102
|
+
const rows = 0;
|
|
103
|
+
const originalData = [];
|
|
104
|
+
const result = filterColumnForPrivacy(schema, rows, originalData);
|
|
105
|
+
expect(result).toEqual([]);
|
|
106
|
+
});
|
|
107
|
+
test("filterColumnForPrivacy handles null/undefined data", () => {
|
|
108
|
+
const schema = { type: "string", default: "defaultValue" };
|
|
109
|
+
const rows = 2;
|
|
110
|
+
expect(filterColumnForPrivacy(schema, rows, null)).toBe(null);
|
|
111
|
+
expect(filterColumnForPrivacy(schema, rows, undefined)).toBe(undefined);
|
|
112
|
+
});
|
|
113
|
+
test("getFilteredColumn returns original data when component should be included", () => {
|
|
114
|
+
const componentSchemas = {
|
|
115
|
+
allowedComponent: { type: "string", privacy: "strictlyNecessary" }
|
|
116
|
+
};
|
|
117
|
+
const privacyOptions = { strictlyNecessary: true };
|
|
118
|
+
const originalData = ["value1", "value2"];
|
|
119
|
+
const rows = 2;
|
|
120
|
+
const [name, data] = getFilteredColumn("allowedComponent", privacyOptions, originalData, componentSchemas, rows);
|
|
121
|
+
expect(name).toBe("allowedComponent");
|
|
122
|
+
expect(data).toBe(originalData);
|
|
123
|
+
});
|
|
124
|
+
test("getFilteredColumn returns filtered data when component should be excluded", () => {
|
|
125
|
+
const componentSchemas = {
|
|
126
|
+
blockedComponent: { type: "string", privacy: "advertising", default: "blocked" }
|
|
127
|
+
};
|
|
128
|
+
const privacyOptions = { strictlyNecessary: true };
|
|
129
|
+
const originalData = ["value1", "value2"];
|
|
130
|
+
const rows = 2;
|
|
131
|
+
const [name, data] = getFilteredColumn("blockedComponent", privacyOptions, originalData, componentSchemas, rows);
|
|
132
|
+
expect(name).toBe("blockedComponent");
|
|
133
|
+
expect(data).toEqual(["blocked", "blocked"]);
|
|
134
|
+
});
|
|
135
|
+
test("filterTableForPrivacy filters table columns based on privacy", () => {
|
|
136
|
+
const componentSchemas = {
|
|
137
|
+
allowedComponent: { type: "string", privacy: "strictlyNecessary" },
|
|
138
|
+
blockedComponent: { type: "string", privacy: "advertising", default: "filtered" }
|
|
139
|
+
};
|
|
140
|
+
const privacyOptions = { strictlyNecessary: true };
|
|
141
|
+
const table = {
|
|
142
|
+
rows: 2,
|
|
143
|
+
columns: {
|
|
144
|
+
allowedComponent: ["allowed1", "allowed2"],
|
|
145
|
+
blockedComponent: ["blocked1", "blocked2"]
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const result = filterTableForPrivacy(componentSchemas, table, privacyOptions);
|
|
149
|
+
expect(result.rows).toBe(2);
|
|
150
|
+
expect(result.columns.allowedComponent).toEqual(["allowed1", "allowed2"]);
|
|
151
|
+
expect(result.columns.blockedComponent).toEqual(["filtered", "filtered"]);
|
|
152
|
+
});
|
|
153
|
+
test("filterTableForPrivacy preserves table structure", () => {
|
|
154
|
+
const componentSchemas = {
|
|
155
|
+
comp1: { type: "string", privacy: "functional", default: "default1" },
|
|
156
|
+
comp2: { type: "number", privacy: "performance", default: 0 }
|
|
157
|
+
};
|
|
158
|
+
const privacyOptions = { functional: true };
|
|
159
|
+
const table = {
|
|
160
|
+
rows: 3,
|
|
161
|
+
columns: {
|
|
162
|
+
comp1: ["a", "b", "c"],
|
|
163
|
+
comp2: [1, 2, 3]
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
const result = filterTableForPrivacy(componentSchemas, table, privacyOptions);
|
|
167
|
+
expect(result.rows).toBe(3);
|
|
168
|
+
expect(Object.keys(result.columns)).toEqual(["comp1", "comp2"]);
|
|
169
|
+
expect(result.columns.comp1).toEqual(["a", "b", "c"]);
|
|
170
|
+
expect(result.columns.comp2).toEqual([0, 0, 0]);
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
//# sourceMappingURL=helper-functions.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper-functions.test.js","source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,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,EAAE;SAChE,CAAC;QACF,MAAM,cAAc,GAAmB,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;QAE5D,MAAM,KAAK,GAAG;YACV,IAAI,EAAE,CAAC;YACP,OAAO,EAAE;gBACL,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;gBACtB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACnB;SACJ,CAAC;QAEF,MAAM,MAAM,GAAG,qBAAqB,CAAC,gBAA0C,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;QAExG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QAChE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -11,7 +11,7 @@ export interface TodoMainService extends Service {
|
|
|
11
11
|
}
|
|
12
12
|
export type TodoCoreService = Omit<TodoMainService, 'dependentState'>;
|
|
13
13
|
/**
|
|
14
|
-
* The main service as used by the UI. We only allow access to the observe and
|
|
14
|
+
* The main service as used by the UI. We only allow access to the observe and actions properties.
|
|
15
15
|
*/
|
|
16
16
|
export type TodoUIMainService = Omit<TodoMainService, 'state'> & {
|
|
17
17
|
state: Omit<TodoStateService, 'resources'>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { Database } from '../../../../ecs/index.js';
|
|
2
|
+
import * as actions from './transactions/index.js';
|
|
3
|
+
export declare const createTodoDatabase: () => Database<import("../../../../schema/from-schemas.js").FromSchemas<{
|
|
3
4
|
todo: {
|
|
4
5
|
readonly type: "boolean";
|
|
5
6
|
readonly const: true;
|
|
@@ -31,6 +32,6 @@ export declare const createTodoDatabase: () => import("../../../../ecs/index.js"
|
|
|
31
32
|
default: boolean;
|
|
32
33
|
};
|
|
33
34
|
}>, {
|
|
34
|
-
Todo: ("
|
|
35
|
-
}, import("../../../../ecs/
|
|
35
|
+
Todo: ("order" | "name" | "todo" | "complete" | "dragPosition")[];
|
|
36
|
+
}, import("../../../../ecs/store/action-functions.js").ToActionFunctions<typeof actions>, never>;
|
|
36
37
|
export type TodoDatabase = ReturnType<typeof createTodoDatabase>;
|
|
@@ -20,11 +20,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.*/
|
|
22
22
|
import { createTodoStore } from './create-todo-store.js';
|
|
23
|
-
import {
|
|
24
|
-
import * as
|
|
23
|
+
import { Database } from '../../../../ecs/index.js';
|
|
24
|
+
import * as actions from './transactions/index.js';
|
|
25
25
|
export const createTodoDatabase = () => {
|
|
26
26
|
const store = createTodoStore();
|
|
27
|
-
const database =
|
|
27
|
+
const database = Database.create(store, actions);
|
|
28
28
|
return database;
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=create-todo-database.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-todo-database.js","sourceRoot":"","sources":["../../../../../src/samples/todo/services/state-service/create-todo-database.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-todo-database.js","sourceRoot":"","sources":["../../../../../src/samples/todo/services/state-service/create-todo-database.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACjD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Store } from '../../../../ecs/store/index.js';
|
|
1
2
|
export declare const todoStoreSchemaVersion = 1;
|
|
2
|
-
export declare const createTodoStore: () =>
|
|
3
|
+
export declare const createTodoStore: () => Store<import("../../../../schema/from-schemas.js").FromSchemas<{
|
|
3
4
|
todo: {
|
|
4
5
|
readonly type: "boolean";
|
|
5
6
|
readonly const: true;
|
|
@@ -31,6 +32,6 @@ export declare const createTodoStore: () => import("../../../../ecs/index.js").S
|
|
|
31
32
|
default: boolean;
|
|
32
33
|
};
|
|
33
34
|
}>, {
|
|
34
|
-
Todo: ("
|
|
35
|
+
Todo: ("order" | "name" | "todo" | "complete" | "dragPosition")[];
|
|
35
36
|
}>;
|
|
36
37
|
export type TodoStore = ReturnType<typeof createTodoStore>;
|
|
@@ -19,28 +19,26 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.*/
|
|
22
|
-
import {
|
|
22
|
+
import { Store } from '../../../../ecs/store/index.js';
|
|
23
23
|
import { F32, True } from '../../../../schema/index.js';
|
|
24
24
|
import { Schema } from '../../../../schema/index.js';
|
|
25
25
|
// Increment this value if you change the schema in a non-backwards compatible way
|
|
26
26
|
export const todoStoreSchemaVersion = 1;
|
|
27
27
|
export const createTodoStore = () => {
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
Todo: ['todo', 'complete', 'name', 'order', 'dragPosition'],
|
|
28
|
+
return Store.create({
|
|
29
|
+
components: {
|
|
30
|
+
todo: True.schema, // a tag that indicates an entity is a todo item.
|
|
31
|
+
complete: { type: 'boolean' },
|
|
32
|
+
name: { type: 'string' },
|
|
33
|
+
order: F32.schema,
|
|
34
|
+
dragPosition: Schema.Nullable(F32.schema), // null = not being dragged
|
|
35
|
+
},
|
|
36
|
+
resources: {
|
|
37
|
+
displayCompleted: { type: 'boolean', default: false },
|
|
38
|
+
},
|
|
39
|
+
archetypes: {
|
|
40
|
+
Todo: ['todo', 'complete', 'name', 'order', 'dragPosition'],
|
|
41
|
+
}
|
|
44
42
|
});
|
|
45
43
|
};
|
|
46
44
|
//# sourceMappingURL=create-todo-store.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-todo-store.js","sourceRoot":"","sources":["../../../../../src/samples/todo/services/state-service/create-todo-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"create-todo-store.js","sourceRoot":"","sources":["../../../../../src/samples/todo/services/state-service/create-todo-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,kFAAkF;AAClF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,OAAO,KAAK,CAAC,MAAM,CAAC;QAClB,UAAU,EAAE;YACV,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,iDAAiD;YACpE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,KAAK,EAAE,GAAG,CAAC,MAAM;YACjB,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,2BAA2B;SACvE;QACD,SAAS,EAAE;YACT,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;SACtD;QACD,UAAU,EAAE;YACV,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC;SAC5D;KACF,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const toggleComplete = (t, id) => {
|
|
2
2
|
t.undoable = { coalesce: false };
|
|
3
3
|
const todo = t.read(id);
|
|
4
|
-
//
|
|
4
|
+
// actions must never throw errors.
|
|
5
5
|
// if state is invalid they must no op.
|
|
6
6
|
// this is important for resolving concurrency conflicts.
|
|
7
7
|
if (todo) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-complete.js","sourceRoot":"","sources":["../../../../../../src/samples/todo/services/state-service/transactions/toggle-complete.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAY,EAAE,EAAU,EAAE,EAAE;IACzD,CAAC,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACjC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,
|
|
1
|
+
{"version":3,"file":"toggle-complete.js","sourceRoot":"","sources":["../../../../../../src/samples/todo/services/state-service/transactions/toggle-complete.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAY,EAAE,EAAU,EAAE,EAAE;IACzD,CAAC,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACjC,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,mCAAmC;IACnC,uCAAuC;IACvC,yDAAyD;IACzD,IAAI,IAAI,EAAE,CAAC;QACT,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC,CAAC"}
|
package/dist/schema/f32.d.ts
CHANGED
package/dist/schema/f32.js
CHANGED
package/dist/schema/f32.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"f32.js","sourceRoot":"","sources":["../../src/schema/f32.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"f32.js","sourceRoot":"","sources":["../../src/schema/f32.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,GAAG,EAAC,MAAM,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,CAAC;IACZ,OAAO,EAAE,CAAW;CACG,CAAC"}
|
package/dist/schema/i32.d.ts
CHANGED
package/dist/schema/i32.js
CHANGED
package/dist/schema/i32.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i32.js","sourceRoot":"","sources":["../../src/schema/i32.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"i32.js","sourceRoot":"","sources":["../../src/schema/i32.ts"],"names":[],"mappings":"AAuBA,MAAM,CAAC,MAAM,GAAG,EAAC,MAAM,GAAG;IACtB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,CAAC,UAAU;IACpB,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,CAAW;CACG,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
export * as Schema from "./public.js";
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema/schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAIX,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullable.js","sourceRoot":"","sources":["../../../src/schema/schema/nullable.ts"],"names":[],"mappings":"AAuBA,MAAM,UAAU,QAAQ,CACtB,MAAS;IAET,OAAO;QACL,KAAK,EAAE,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;KAClC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*MIT License
|
|
2
|
+
|
|
3
|
+
© Copyright 2025 Adobe. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.*/
|
|
22
|
+
export * from "./types.js";
|
|
23
|
+
export * from "./to-vertex-buffer-layout.js";
|
|
24
|
+
export * from "./nullable.js";
|
|
25
|
+
//# sourceMappingURL=public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/schema/schema/public.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,YAAY,CAAC;AAC3B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC"}
|