@oasys/oecs 0.5.4 → 0.6.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/CHANGELOG.md +1223 -266
- package/README.md +217 -112
- package/dist/core/ecs/access_check.d.cts +29 -29
- package/dist/core/ecs/access_check.d.ts +29 -29
- package/dist/core/ecs/access_check.d.ts.map +1 -1
- package/dist/core/ecs/archetype.d.cts +217 -209
- package/dist/core/ecs/archetype.d.ts +217 -209
- package/dist/core/ecs/archetype.d.ts.map +1 -1
- package/dist/core/ecs/archetype_closure.d.cts +23 -0
- package/dist/core/ecs/archetype_closure.d.ts +23 -0
- package/dist/core/ecs/archetype_closure.d.ts.map +1 -0
- package/dist/core/ecs/archetype_graph.d.cts +33 -33
- package/dist/core/ecs/archetype_graph.d.ts +33 -33
- package/dist/core/ecs/archetype_graph.d.ts.map +1 -1
- package/dist/core/ecs/archetype_types.d.cts +55 -0
- package/dist/core/ecs/archetype_types.d.ts +55 -0
- package/dist/core/ecs/archetype_types.d.ts.map +1 -0
- package/dist/core/ecs/change_feed.d.cts +53 -0
- package/dist/core/ecs/change_feed.d.ts +53 -0
- package/dist/core/ecs/change_feed.d.ts.map +1 -0
- package/dist/core/ecs/changed_query.d.cts +36 -0
- package/dist/core/ecs/changed_query.d.ts +36 -0
- package/dist/core/ecs/changed_query.d.ts.map +1 -0
- package/dist/core/ecs/chunk_columns.d.cts +49 -0
- package/dist/core/ecs/chunk_columns.d.ts +49 -0
- package/dist/core/ecs/chunk_columns.d.ts.map +1 -0
- package/dist/core/ecs/command_log.d.cts +26 -26
- package/dist/core/ecs/command_log.d.ts +26 -26
- package/dist/core/ecs/command_log.d.ts.map +1 -1
- package/dist/core/ecs/component.d.cts +43 -42
- package/dist/core/ecs/component.d.ts +43 -42
- package/dist/core/ecs/component.d.ts.map +1 -1
- package/dist/core/ecs/component_registry.d.cts +53 -0
- package/dist/core/ecs/component_registry.d.ts +53 -0
- package/dist/core/ecs/component_registry.d.ts.map +1 -0
- package/dist/core/ecs/compute_backend.d.cts +18 -7
- package/dist/core/ecs/compute_backend.d.ts +18 -7
- package/dist/core/ecs/compute_backend.d.ts.map +1 -1
- package/dist/core/ecs/deferred_commands.d.cts +15 -14
- package/dist/core/ecs/deferred_commands.d.ts +15 -14
- package/dist/core/ecs/deferred_commands.d.ts.map +1 -1
- package/dist/core/ecs/dispatch_trace.d.cts +32 -31
- package/dist/core/ecs/dispatch_trace.d.ts +32 -31
- package/dist/core/ecs/dispatch_trace.d.ts.map +1 -1
- package/dist/core/ecs/ecs.d.cts +289 -270
- package/dist/core/ecs/ecs.d.ts +289 -270
- package/dist/core/ecs/ecs.d.ts.map +1 -1
- package/dist/core/ecs/ecs_memory.d.cts +134 -136
- package/dist/core/ecs/ecs_memory.d.ts +134 -136
- package/dist/core/ecs/ecs_memory.d.ts.map +1 -1
- package/dist/core/ecs/ecs_options.d.cts +89 -0
- package/dist/core/ecs/ecs_options.d.ts +89 -0
- package/dist/core/ecs/ecs_options.d.ts.map +1 -0
- package/dist/core/ecs/entity.d.cts +4 -4
- package/dist/core/ecs/entity.d.ts +4 -4
- package/dist/core/ecs/entity_allocator.d.cts +20 -18
- package/dist/core/ecs/entity_allocator.d.ts +20 -18
- package/dist/core/ecs/entity_allocator.d.ts.map +1 -1
- package/dist/core/ecs/event.d.cts +36 -22
- package/dist/core/ecs/event.d.ts +36 -22
- package/dist/core/ecs/event.d.ts.map +1 -1
- package/dist/core/ecs/facades.d.cts +12 -126
- package/dist/core/ecs/facades.d.ts +12 -126
- package/dist/core/ecs/facades.d.ts.map +1 -1
- package/dist/core/ecs/frame_stepper.d.cts +12 -12
- package/dist/core/ecs/frame_stepper.d.ts +12 -12
- package/dist/core/ecs/frame_stepper.d.ts.map +1 -1
- package/dist/core/ecs/frame_trace.d.cts +32 -32
- package/dist/core/ecs/frame_trace.d.ts +32 -32
- package/dist/core/ecs/frame_trace.d.ts.map +1 -1
- package/dist/core/ecs/host_commands.d.cts +103 -85
- package/dist/core/ecs/host_commands.d.ts +103 -85
- package/dist/core/ecs/host_commands.d.ts.map +1 -1
- package/dist/core/ecs/index.d.cts +21 -11
- package/dist/core/ecs/index.d.ts +21 -11
- package/dist/core/ecs/index.d.ts.map +1 -1
- package/dist/core/ecs/observer.d.cts +39 -120
- package/dist/core/ecs/observer.d.ts +39 -120
- package/dist/core/ecs/observer.d.ts.map +1 -1
- package/dist/core/ecs/phase.d.cts +79 -0
- package/dist/core/ecs/phase.d.ts +79 -0
- package/dist/core/ecs/phase.d.ts.map +1 -0
- package/dist/core/ecs/plugin.d.cts +125 -0
- package/dist/core/ecs/plugin.d.ts +125 -0
- package/dist/core/ecs/plugin.d.ts.map +1 -0
- package/dist/core/ecs/plugin_slots.d.cts +26 -0
- package/dist/core/ecs/plugin_slots.d.ts +26 -0
- package/dist/core/ecs/plugin_slots.d.ts.map +1 -0
- package/dist/core/ecs/query.d.cts +208 -578
- package/dist/core/ecs/query.d.ts +208 -578
- package/dist/core/ecs/query.d.ts.map +1 -1
- package/dist/core/ecs/query_cache.d.cts +130 -0
- package/dist/core/ecs/query_cache.d.ts +130 -0
- package/dist/core/ecs/query_cache.d.ts.map +1 -0
- package/dist/core/ecs/query_registry.d.cts +47 -0
- package/dist/core/ecs/query_registry.d.ts +47 -0
- package/dist/core/ecs/query_registry.d.ts.map +1 -0
- package/dist/core/ecs/query_terms.d.cts +126 -0
- package/dist/core/ecs/query_terms.d.ts +126 -0
- package/dist/core/ecs/query_terms.d.ts.map +1 -0
- package/dist/core/ecs/ref.d.cts +100 -39
- package/dist/core/ecs/ref.d.ts +100 -39
- package/dist/core/ecs/ref.d.ts.map +1 -1
- package/dist/core/ecs/relation.d.cts +101 -182
- package/dist/core/ecs/relation.d.ts +101 -182
- package/dist/core/ecs/relation.d.ts.map +1 -1
- package/dist/core/ecs/resource.d.cts +13 -13
- package/dist/core/ecs/resource.d.ts +13 -13
- package/dist/core/ecs/resource_registry.d.cts +5 -5
- package/dist/core/ecs/resource_registry.d.ts +5 -5
- package/dist/core/ecs/resource_registry.d.ts.map +1 -1
- package/dist/core/ecs/row_kinds.d.cts +24 -0
- package/dist/core/ecs/row_kinds.d.ts +24 -0
- package/dist/core/ecs/row_kinds.d.ts.map +1 -0
- package/dist/core/ecs/run_condition.d.cts +23 -23
- package/dist/core/ecs/run_condition.d.ts +23 -23
- package/dist/core/ecs/run_condition.d.ts.map +1 -1
- package/dist/core/ecs/schedule.d.cts +91 -120
- package/dist/core/ecs/schedule.d.ts +91 -120
- package/dist/core/ecs/schedule.d.ts.map +1 -1
- package/dist/core/ecs/schedule_plan.d.cts +33 -0
- package/dist/core/ecs/schedule_plan.d.ts +33 -0
- package/dist/core/ecs/schedule_plan.d.ts.map +1 -0
- package/dist/core/ecs/snapshot.d.cts +77 -0
- package/dist/core/ecs/snapshot.d.ts +77 -0
- package/dist/core/ecs/snapshot.d.ts.map +1 -0
- package/dist/core/ecs/snapshot_mount.d.cts +42 -0
- package/dist/core/ecs/snapshot_mount.d.ts +42 -0
- package/dist/core/ecs/snapshot_mount.d.ts.map +1 -0
- package/dist/core/ecs/sparse_store.d.cts +108 -51
- package/dist/core/ecs/sparse_store.d.ts +108 -51
- package/dist/core/ecs/sparse_store.d.ts.map +1 -1
- package/dist/core/ecs/store.d.cts +527 -473
- package/dist/core/ecs/store.d.ts +527 -473
- package/dist/core/ecs/store.d.ts.map +1 -1
- package/dist/core/ecs/store_layout_listener.d.cts +6 -6
- package/dist/core/ecs/store_layout_listener.d.ts +6 -6
- package/dist/core/ecs/store_types.d.cts +122 -0
- package/dist/core/ecs/store_types.d.ts +122 -0
- package/dist/core/ecs/store_types.d.ts.map +1 -0
- package/dist/core/ecs/system.d.cts +146 -61
- package/dist/core/ecs/system.d.ts +146 -61
- package/dist/core/ecs/system.d.ts.map +1 -1
- package/dist/core/ecs/system_context.d.cts +296 -0
- package/dist/core/ecs/system_context.d.ts +296 -0
- package/dist/core/ecs/system_context.d.ts.map +1 -0
- package/dist/core/ecs/system_set.d.cts +48 -0
- package/dist/core/ecs/system_set.d.ts +48 -0
- package/dist/core/ecs/system_set.d.ts.map +1 -0
- package/dist/core/ecs/utils/arrays.d.cts +15 -1
- package/dist/core/ecs/utils/arrays.d.ts +15 -1
- package/dist/core/ecs/utils/arrays.d.ts.map +1 -1
- package/dist/core/ecs/utils/error.d.cts +82 -6
- package/dist/core/ecs/utils/error.d.ts +82 -6
- package/dist/core/ecs/utils/error.d.ts.map +1 -1
- package/dist/core/ecs/utils/plugin_error.d.cts +10 -0
- package/dist/core/ecs/utils/plugin_error.d.ts +10 -0
- package/dist/core/ecs/utils/plugin_error.d.ts.map +1 -0
- package/dist/core/restore_errors.d.cts +30 -0
- package/dist/core/restore_errors.d.ts +30 -0
- package/dist/core/restore_errors.d.ts.map +1 -0
- package/dist/core/store/action_ring.d.cts +44 -44
- package/dist/core/store/action_ring.d.ts +44 -44
- package/dist/core/store/action_ring.d.ts.map +1 -1
- package/dist/core/store/allocator.d.cts +149 -95
- package/dist/core/store/allocator.d.ts +149 -95
- package/dist/core/store/allocator.d.ts.map +1 -1
- package/dist/core/store/buffer_backed_column.d.cts +17 -17
- package/dist/core/store/buffer_backed_column.d.ts +17 -17
- package/dist/core/store/buffer_backed_column.d.ts.map +1 -1
- package/dist/core/store/column_store.d.cts +124 -86
- package/dist/core/store/column_store.d.ts +124 -86
- package/dist/core/store/column_store.d.ts.map +1 -1
- package/dist/core/store/command_dispatch.d.cts +14 -15
- package/dist/core/store/command_dispatch.d.ts +14 -15
- package/dist/core/store/command_dispatch.d.ts.map +1 -1
- package/dist/core/store/command_ring.d.cts +36 -39
- package/dist/core/store/command_ring.d.ts +36 -39
- package/dist/core/store/command_ring.d.ts.map +1 -1
- package/dist/core/store/descriptor.d.cts +34 -17
- package/dist/core/store/descriptor.d.ts +34 -17
- package/dist/core/store/descriptor.d.ts.map +1 -1
- package/dist/core/store/entity_index.d.cts +34 -35
- package/dist/core/store/entity_index.d.ts +34 -35
- package/dist/core/store/entity_index.d.ts.map +1 -1
- package/dist/core/store/event_ring.d.cts +36 -38
- package/dist/core/store/event_ring.d.ts +36 -38
- package/dist/core/store/event_ring.d.ts.map +1 -1
- package/dist/core/store/extend.d.cts +13 -7
- package/dist/core/store/extend.d.ts +13 -7
- package/dist/core/store/extend.d.ts.map +1 -1
- package/dist/core/store/grow.d.cts +2 -2
- package/dist/core/store/grow.d.ts +2 -2
- package/dist/core/store/grow.d.ts.map +1 -1
- package/dist/core/store/header.d.cts +31 -27
- package/dist/core/store/header.d.ts +31 -27
- package/dist/core/store/header.d.ts.map +1 -1
- package/dist/core/store/index.d.cts +10 -10
- package/dist/core/store/index.d.ts +10 -10
- package/dist/core/store/index.d.ts.map +1 -1
- package/dist/core/store/layout_ops.d.cts +71 -62
- package/dist/core/store/layout_ops.d.ts +71 -62
- package/dist/core/store/layout_ops.d.ts.map +1 -1
- package/dist/core/store/region_table.d.cts +28 -21
- package/dist/core/store/region_table.d.ts +28 -21
- package/dist/core/store/region_table.d.ts.map +1 -1
- package/dist/core/store/snapshot.d.cts +31 -16
- package/dist/core/store/snapshot.d.ts +31 -16
- package/dist/core/store/snapshot.d.ts.map +1 -1
- package/dist/core/store/state_hash.d.cts +12 -12
- package/dist/core/store/state_hash.d.ts +12 -12
- package/dist/core/store/state_hash.d.ts.map +1 -1
- package/dist/core/store/store_regions.d.cts +10 -10
- package/dist/core/store/store_regions.d.ts +10 -10
- package/dist/core/store/store_regions.d.ts.map +1 -1
- package/dist/core/store/vendored_abi/abi.d.cts +27 -2
- package/dist/core/store/vendored_abi/abi.d.ts +27 -2
- package/dist/core/store/vendored_abi/abi.d.ts.map +1 -1
- package/dist/host_commands-B2KMx8O2.cjs +1 -0
- package/dist/host_commands-ClVPvhSa.cjs +2 -0
- package/dist/host_commands-CwxVQS1z.js +1524 -0
- package/dist/host_commands-nJvTy88E.js +1667 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15 -10
- package/dist/index.d.ts +15 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.development.cjs +1 -1
- package/dist/index.development.js +5804 -5203
- package/dist/index.js +5323 -4764
- package/dist/internal.cjs +2 -2
- package/dist/internal.d.cts +5 -2
- package/dist/internal.d.ts +5 -2
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.development.cjs +1 -1
- package/dist/internal.development.js +70 -20
- package/dist/internal.js +138 -83
- package/dist/plugins/abi-D3V-QUSf.cjs +1 -0
- package/dist/plugins/abi-NP8pNxpd.js +42 -0
- package/dist/plugins/arrays-Dr_1hCjL.js +28 -0
- package/dist/plugins/arrays-Dt-Joc4i.cjs +1 -0
- package/dist/plugins/assertions-gtDVfbnQ.js +6 -0
- package/dist/plugins/assertions-z5GQd_bB.cjs +1 -0
- package/dist/{extensions → plugins}/editor/editor.d.cts +54 -54
- package/dist/{extensions → plugins}/editor/editor.d.ts +54 -54
- package/dist/plugins/editor/editor.d.ts.map +1 -0
- package/dist/{extensions → plugins}/editor/field_handle.d.cts +12 -12
- package/dist/{extensions → plugins}/editor/field_handle.d.ts +12 -12
- package/dist/plugins/editor/field_handle.d.ts.map +1 -0
- package/dist/plugins/editor/index.d.cts +22 -0
- package/dist/plugins/editor/index.d.ts +22 -0
- package/dist/plugins/editor/index.d.ts.map +1 -0
- package/dist/plugins/editor.cjs +1 -0
- package/dist/plugins/editor.d.cts +1 -0
- package/dist/plugins/editor.d.ts +1 -0
- package/dist/plugins/editor.development.cjs +1 -0
- package/dist/{extensions/editor/index.development.js → plugins/editor.development.js} +81 -64
- package/dist/{extensions/editor/index.js → plugins/editor.js} +81 -64
- package/dist/plugins/events/event_channel.d.cts +13 -0
- package/dist/plugins/events/event_channel.d.ts +13 -0
- package/dist/plugins/events/event_channel.d.ts.map +1 -0
- package/dist/plugins/events/event_registry.d.cts +22 -0
- package/dist/plugins/events/event_registry.d.ts +22 -0
- package/dist/plugins/events/event_registry.d.ts.map +1 -0
- package/dist/plugins/events/facade.d.cts +26 -0
- package/dist/plugins/events/facade.d.ts +26 -0
- package/dist/plugins/events/facade.d.ts.map +1 -0
- package/dist/plugins/events/index.d.cts +10 -0
- package/dist/plugins/events/index.d.ts +10 -0
- package/dist/plugins/events/index.d.ts.map +1 -0
- package/dist/plugins/events.cjs +1 -0
- package/dist/plugins/events.d.cts +1 -0
- package/dist/plugins/events.d.ts +1 -0
- package/dist/plugins/events.development.cjs +1 -0
- package/dist/plugins/events.development.js +174 -0
- package/dist/plugins/events.js +159 -0
- package/dist/plugins/observers/index.d.cts +23 -0
- package/dist/plugins/observers/index.d.ts +23 -0
- package/dist/plugins/observers/index.d.ts.map +1 -0
- package/dist/plugins/observers/observer_registry.d.cts +101 -0
- package/dist/plugins/observers/observer_registry.d.ts +101 -0
- package/dist/plugins/observers/observer_registry.d.ts.map +1 -0
- package/dist/plugins/observers.cjs +1 -0
- package/dist/plugins/observers.d.cts +1 -0
- package/dist/plugins/observers.d.ts +1 -0
- package/dist/plugins/observers.development.cjs +1 -0
- package/dist/plugins/observers.development.js +431 -0
- package/dist/plugins/observers.js +403 -0
- package/dist/plugins/relation_store-BsoegrZh.js +313 -0
- package/dist/plugins/relation_store-DQKSnxsm.cjs +1 -0
- package/dist/plugins/relation_store-RBhpcE28.cjs +1 -0
- package/dist/plugins/relation_store-RqW5Snx6.js +328 -0
- package/dist/plugins/relations/builtin_relations.d.cts +48 -0
- package/dist/plugins/relations/builtin_relations.d.ts +48 -0
- package/dist/plugins/relations/builtin_relations.d.ts.map +1 -0
- package/dist/plugins/relations/facade.d.cts +73 -0
- package/dist/plugins/relations/facade.d.ts +73 -0
- package/dist/plugins/relations/facade.d.ts.map +1 -0
- package/dist/plugins/relations/index.d.cts +11 -0
- package/dist/plugins/relations/index.d.ts +11 -0
- package/dist/plugins/relations/index.d.ts.map +1 -0
- package/dist/{core/ecs → plugins/relations}/relation_service.d.cts +85 -97
- package/dist/{core/ecs → plugins/relations}/relation_service.d.ts +85 -97
- package/dist/plugins/relations/relation_service.d.ts.map +1 -0
- package/dist/plugins/relations/relation_store.d.cts +177 -0
- package/dist/plugins/relations/relation_store.d.ts +177 -0
- package/dist/plugins/relations/relation_store.d.ts.map +1 -0
- package/dist/plugins/relations.cjs +1 -0
- package/dist/plugins/relations.d.cts +1 -0
- package/dist/plugins/relations.d.ts +1 -0
- package/dist/plugins/relations.development.cjs +1 -0
- package/dist/plugins/relations.development.js +603 -0
- package/dist/plugins/relations.js +553 -0
- package/dist/plugins/snapshots/index.d.cts +33 -0
- package/dist/plugins/snapshots/index.d.ts +33 -0
- package/dist/plugins/snapshots/index.d.ts.map +1 -0
- package/dist/plugins/snapshots/resume.d.cts +57 -0
- package/dist/plugins/snapshots/resume.d.ts +57 -0
- package/dist/plugins/snapshots/resume.d.ts.map +1 -0
- package/dist/plugins/snapshots/snapshot_service.d.cts +59 -0
- package/dist/plugins/snapshots/snapshot_service.d.ts +59 -0
- package/dist/plugins/snapshots/snapshot_service.d.ts.map +1 -0
- package/dist/plugins/snapshots.cjs +1 -0
- package/dist/plugins/snapshots.d.cts +1 -0
- package/dist/plugins/snapshots.d.ts +1 -0
- package/dist/plugins/snapshots.development.cjs +1 -0
- package/dist/plugins/snapshots.development.js +737 -0
- package/dist/plugins/snapshots.js +737 -0
- package/dist/plugins/solid/index.d.cts +8 -0
- package/dist/plugins/solid/index.d.ts +8 -0
- package/dist/plugins/solid/index.d.ts.map +1 -0
- package/dist/plugins/solid/solid.d.cts +97 -0
- package/dist/plugins/solid/solid.d.ts +97 -0
- package/dist/plugins/solid/solid.d.ts.map +1 -0
- package/dist/plugins/solid.cjs +1 -0
- package/dist/plugins/solid.d.cts +1 -0
- package/dist/plugins/solid.d.ts +1 -0
- package/dist/plugins/solid.development.cjs +1 -0
- package/dist/plugins/solid.development.js +319 -0
- package/dist/plugins/solid.js +319 -0
- package/dist/plugins/workers/index.d.cts +75 -0
- package/dist/plugins/workers/index.d.ts +75 -0
- package/dist/plugins/workers/index.d.ts.map +1 -0
- package/dist/plugins/workers/node_threads.d.cts +25 -0
- package/dist/plugins/workers/node_threads.d.ts +25 -0
- package/dist/plugins/workers/node_threads.d.ts.map +1 -0
- package/dist/plugins/workers/plan.d.cts +61 -0
- package/dist/plugins/workers/plan.d.ts +61 -0
- package/dist/plugins/workers/plan.d.ts.map +1 -0
- package/dist/plugins/workers/pool.d.cts +144 -0
- package/dist/plugins/workers/pool.d.ts +144 -0
- package/dist/plugins/workers/pool.d.ts.map +1 -0
- package/dist/plugins/workers/protocol.d.cts +112 -0
- package/dist/plugins/workers/protocol.d.ts +112 -0
- package/dist/plugins/workers/protocol.d.ts.map +1 -0
- package/dist/plugins/workers/worker_bind.d.cts +64 -0
- package/dist/plugins/workers/worker_bind.d.ts +64 -0
- package/dist/plugins/workers/worker_bind.d.ts.map +1 -0
- package/dist/plugins/workers/worker_loop.d.cts +14 -0
- package/dist/plugins/workers/worker_loop.d.ts +14 -0
- package/dist/plugins/workers/worker_loop.d.ts.map +1 -0
- package/dist/plugins/workers.cjs +1 -0
- package/dist/plugins/workers.d.cts +1 -0
- package/dist/plugins/workers.d.ts +1 -0
- package/dist/plugins/workers.development.cjs +1 -0
- package/dist/plugins/workers.development.js +596 -0
- package/dist/plugins/workers.js +474 -0
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.d.cts +4 -4
- package/dist/primitives.d.ts +4 -4
- package/dist/primitives.development.cjs +1 -1
- package/dist/primitives.development.js +66 -22
- package/dist/primitives.js +66 -22
- package/dist/shared-BKl12xF1.js +132 -0
- package/dist/shared-Dk-pACZT.cjs +1 -0
- package/dist/shared.cjs +1 -1
- package/dist/shared.d.cts +7 -7
- package/dist/shared.d.ts +7 -7
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.development.cjs +1 -1
- package/dist/shared.development.js +4 -3
- package/dist/shared.js +4 -3
- package/dist/topological_sort-Cc_yXqPT.js +346 -0
- package/dist/topological_sort-vp1imU6D.cjs +1 -0
- package/dist/type_primitives/assertions.d.cts +12 -16
- package/dist/type_primitives/assertions.d.ts +12 -16
- package/dist/type_primitives/assertions.d.ts.map +1 -1
- package/dist/type_primitives/binary_heap/binary_heap.d.cts +2 -6
- package/dist/type_primitives/binary_heap/binary_heap.d.ts +2 -6
- package/dist/type_primitives/binary_heap/binary_heap.d.ts.map +1 -1
- package/dist/type_primitives/bitset/bitset.d.cts +7 -11
- package/dist/type_primitives/bitset/bitset.d.ts +7 -11
- package/dist/type_primitives/bitset/bitset.d.ts.map +1 -1
- package/dist/type_primitives/brand.d.cts +2 -7
- package/dist/type_primitives/brand.d.ts +2 -7
- package/dist/type_primitives/brand.d.ts.map +1 -1
- package/dist/type_primitives/error.d.cts +1 -2
- package/dist/type_primitives/error.d.ts +1 -2
- package/dist/type_primitives/error.d.ts.map +1 -1
- package/dist/type_primitives/index.d.cts +1 -1
- package/dist/type_primitives/index.d.ts +1 -1
- package/dist/type_primitives/sparse_map/sparse_map.d.cts +3 -7
- package/dist/type_primitives/sparse_map/sparse_map.d.ts +3 -7
- package/dist/type_primitives/sparse_map/sparse_map.d.ts.map +1 -1
- package/dist/type_primitives/sparse_set/sparse_set.d.cts +2 -6
- package/dist/type_primitives/sparse_set/sparse_set.d.ts +2 -6
- package/dist/type_primitives/sparse_set/sparse_set.d.ts.map +1 -1
- package/dist/type_primitives/topological_sort/topological_sort.d.cts +1 -5
- package/dist/type_primitives/topological_sort/topological_sort.d.ts +1 -5
- package/dist/type_primitives/topological_sort/topological_sort.d.ts.map +1 -1
- package/dist/type_primitives/typed_arrays/typed_arrays.d.cts +16 -15
- package/dist/type_primitives/typed_arrays/typed_arrays.d.ts +16 -15
- package/dist/type_primitives/typed_arrays/typed_arrays.d.ts.map +1 -1
- package/dist/utils/error.d.ts.map +1 -1
- package/dist/version.d.cts +3 -3
- package/dist/version.d.ts +3 -3
- package/dist/worker.cjs +1 -0
- package/dist/worker.d.cts +17 -0
- package/dist/worker.d.ts +17 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.development.cjs +1 -0
- package/dist/worker.development.js +253 -0
- package/dist/worker.js +253 -0
- package/package.json +363 -191
- package/dist/core/ecs/builtin_relations.d.cts +0 -43
- package/dist/core/ecs/builtin_relations.d.ts +0 -43
- package/dist/core/ecs/builtin_relations.d.ts.map +0 -1
- package/dist/core/ecs/event_registry.d.cts +0 -22
- package/dist/core/ecs/event_registry.d.ts +0 -22
- package/dist/core/ecs/event_registry.d.ts.map +0 -1
- package/dist/core/ecs/relation_service.d.ts.map +0 -1
- package/dist/core/ecs/resume.d.cts +0 -85
- package/dist/core/ecs/resume.d.ts +0 -85
- package/dist/core/ecs/resume.d.ts.map +0 -1
- package/dist/core/ecs/snapshot_service.d.cts +0 -94
- package/dist/core/ecs/snapshot_service.d.ts +0 -94
- package/dist/core/ecs/snapshot_service.d.ts.map +0 -1
- package/dist/extensions/editor/editor.d.ts.map +0 -1
- package/dist/extensions/editor/field_handle.d.ts.map +0 -1
- package/dist/extensions/editor/index.cjs +0 -1
- package/dist/extensions/editor/index.d.cts +0 -21
- package/dist/extensions/editor/index.d.ts +0 -21
- package/dist/extensions/editor/index.d.ts.map +0 -1
- package/dist/extensions/editor/index.development.cjs +0 -1
- package/dist/extensions/reactive/ecs_sync.d.cts +0 -214
- package/dist/extensions/reactive/ecs_sync.d.ts +0 -214
- package/dist/extensions/reactive/ecs_sync.d.ts.map +0 -1
- package/dist/extensions/reactive/index.cjs +0 -1
- package/dist/extensions/reactive/index.d.cts +0 -23
- package/dist/extensions/reactive/index.d.ts +0 -23
- package/dist/extensions/reactive/index.d.ts.map +0 -1
- package/dist/extensions/reactive/index.development.cjs +0 -1
- package/dist/extensions/reactive/index.development.js +0 -215
- package/dist/extensions/reactive/index.js +0 -215
- package/dist/extensions/solid/index.cjs +0 -1
- package/dist/extensions/solid/index.d.cts +0 -6
- package/dist/extensions/solid/index.d.ts +0 -6
- package/dist/extensions/solid/index.d.ts.map +0 -1
- package/dist/extensions/solid/index.development.cjs +0 -1
- package/dist/extensions/solid/index.development.js +0 -40
- package/dist/extensions/solid/index.js +0 -36
- package/dist/extensions/solid/kernel_solid.d.cts +0 -45
- package/dist/extensions/solid/kernel_solid.d.ts +0 -45
- package/dist/extensions/solid/kernel_solid.d.ts.map +0 -1
- package/dist/host_commands-BlR3oZ3x.js +0 -2406
- package/dist/host_commands-C2cpU3yC.cjs +0 -1
- package/dist/internal-BoxWl4dG.js +0 -2565
- package/dist/internal-CGBEwfeB.cjs +0 -2
- package/dist/interop-CT-REx0W.cjs +0 -1
- package/dist/interop-CcY6ASQc.js +0 -18
- package/dist/interop-DqxleBo7.js +0 -18
- package/dist/interop-T1HZ-Dpa.cjs +0 -1
- package/dist/kernel-Cz2Kxlwl.js +0 -240
- package/dist/kernel-DgyrLFjW.js +0 -227
- package/dist/kernel-sw7ScKWu.cjs +0 -1
- package/dist/kernel-yWV3XnAb.cjs +0 -1
- package/dist/reactive/array.d.cts +0 -24
- package/dist/reactive/array.d.ts +0 -24
- package/dist/reactive/array.d.ts.map +0 -1
- package/dist/reactive/index.cjs +0 -1
- package/dist/reactive/index.d.cts +0 -11
- package/dist/reactive/index.d.ts +0 -11
- package/dist/reactive/index.d.ts.map +0 -1
- package/dist/reactive/index.development.cjs +0 -1
- package/dist/reactive/index.development.js +0 -18
- package/dist/reactive/index.js +0 -18
- package/dist/reactive/interop.d.cts +0 -19
- package/dist/reactive/interop.d.ts +0 -19
- package/dist/reactive/interop.d.ts.map +0 -1
- package/dist/reactive/kernel.d.cts +0 -73
- package/dist/reactive/kernel.d.ts +0 -73
- package/dist/reactive/kernel.d.ts.map +0 -1
- package/dist/reactive/map.d.cts +0 -16
- package/dist/reactive/map.d.ts +0 -16
- package/dist/reactive/map.d.ts.map +0 -1
- package/dist/reactive/shallow.d.cts +0 -11
- package/dist/reactive/shallow.d.ts +0 -11
- package/dist/reactive/shallow.d.ts.map +0 -1
- package/dist/reactive/struct.d.cts +0 -10
- package/dist/reactive/struct.d.ts +0 -10
- package/dist/reactive/struct.d.ts.map +0 -1
- package/dist/shallow-Bs39EPh1.js +0 -150
- package/dist/shallow-C5YmTbtb.cjs +0 -1
- package/dist/shallow-CiFC70Dz.js +0 -159
- package/dist/shallow-DQ8aG51_.cjs +0 -1
- package/dist/shared-B4v0L1cw.js +0 -109
- package/dist/shared-DU78k0pU.cjs +0 -1
- package/dist/topological_sort-BDvEyb9W.cjs +0 -1
- package/dist/topological_sort-DK6EjpWa.js +0 -135
- package/dist/typed_arrays-D3NmwtCG.cjs +0 -1
- package/dist/typed_arrays-DIVwVy5_.js +0 -258
package/dist/shallow-CiFC70Dz.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { s as y, b as w, u as O } from "./kernel-Cz2Kxlwl.js";
|
|
2
|
-
function j(p = Object.is) {
|
|
3
|
-
const i = /* @__PURE__ */ new Map(), [t, h] = y(0);
|
|
4
|
-
let l = 0;
|
|
5
|
-
const a = (s, n) => s !== void 0 && n !== void 0 ? p(s, n) : s === n;
|
|
6
|
-
return {
|
|
7
|
-
get(s) {
|
|
8
|
-
const n = i.get(s);
|
|
9
|
-
if (n !== void 0) return n[0]();
|
|
10
|
-
t();
|
|
11
|
-
},
|
|
12
|
-
set(s, n) {
|
|
13
|
-
n === void 0 && console.warn(
|
|
14
|
-
"reactiveMap.set(key, undefined): undefined is the absent sentinel — get(key) cannot distinguish it from an unset key; use delete(key) to remove."
|
|
15
|
-
);
|
|
16
|
-
const o = i.get(s);
|
|
17
|
-
o !== void 0 ? o[1](n) : (i.set(s, y(n, a)), h(++l));
|
|
18
|
-
},
|
|
19
|
-
delete(s) {
|
|
20
|
-
const n = i.get(s);
|
|
21
|
-
return n === void 0 ? !1 : (i.delete(s), w(() => {
|
|
22
|
-
n[1](void 0), h(++l);
|
|
23
|
-
}), !0);
|
|
24
|
-
},
|
|
25
|
-
has(s) {
|
|
26
|
-
return t(), i.has(s);
|
|
27
|
-
},
|
|
28
|
-
size() {
|
|
29
|
-
return t(), i.size;
|
|
30
|
-
},
|
|
31
|
-
keys() {
|
|
32
|
-
return t(), [...i.keys()];
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function x(p, i = {}) {
|
|
37
|
-
const t = {}, h = {}, l = Object.keys(p), a = new Set(l);
|
|
38
|
-
for (const n of l) {
|
|
39
|
-
const [o, m] = y(
|
|
40
|
-
p[n],
|
|
41
|
-
i[n]
|
|
42
|
-
);
|
|
43
|
-
t[n] = o, h[n] = m;
|
|
44
|
-
}
|
|
45
|
-
return [new Proxy({}, {
|
|
46
|
-
// A field read subscribes; a NON-field key must not throw. `JSON.stringify`
|
|
47
|
-
// (`toJSON`), `await proxy` (`then`), `String(proxy)` (`Symbol.toPrimitive`)
|
|
48
|
-
// and `for..of` (`Symbol.iterator`) all probe keys that aren't fields — fall
|
|
49
|
-
// through to the (empty) target so they see the ordinary undefined/inherited
|
|
50
|
-
// value instead of calling `undefined()`. `fieldSet` (not `k in reads`) so
|
|
51
|
-
// inherited `toString`/`constructor` aren't mistaken for fields.
|
|
52
|
-
get: (n, o) => a.has(o) ? t[o]() : Reflect.get(n, o),
|
|
53
|
-
has: (n, o) => a.has(o),
|
|
54
|
-
// Enumerable without subscribing: enumeration calls `ownKeys` +
|
|
55
|
-
// `getOwnPropertyDescriptor`, never `get`, so `Object.keys(proxy)` returns
|
|
56
|
-
// the field set and tracks nothing. The descriptor is an ACCESSOR whose `get`
|
|
57
|
-
// reads the live signal, so `{...proxy}` / `Object.values(proxy)` /
|
|
58
|
-
// `Object.getOwnPropertyDescriptor(proxy, f).value` see the current value
|
|
59
|
-
// (a value-less descriptor would normalize to `value: undefined`). Non-field
|
|
60
|
-
// keys report no own descriptor. The target is the empty (extensible) object,
|
|
61
|
-
// so these configurable own keys satisfy the Proxy invariants.
|
|
62
|
-
ownKeys: () => l,
|
|
63
|
-
getOwnPropertyDescriptor: (n, o) => a.has(o) ? { get: () => t[o](), enumerable: !0, configurable: !0 } : void 0,
|
|
64
|
-
// Writes go through `set.field(v)` — the proxy is a READ surface, and its
|
|
65
|
-
// public type says so (`Readonly<T>`). The trap backs the
|
|
66
|
-
// type for JS callers / policed casts: without it, a field assignment threw
|
|
67
|
-
// an opaque "Cannot redefine property" (the accessor descriptor above has no
|
|
68
|
-
// setter) and a TYPO'D field silently stuck on the hidden target as a
|
|
69
|
-
// non-reactive value.
|
|
70
|
-
set: (n, o) => {
|
|
71
|
-
throw new TypeError(
|
|
72
|
-
`reactiveStruct proxy is read-only: use set.${String(o)}(value) — the setters tuple returned alongside the proxy`
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
}), h];
|
|
76
|
-
}
|
|
77
|
-
const v = Symbol("reactiveArray.absent");
|
|
78
|
-
function M(p = [], i = Object.is) {
|
|
79
|
-
const t = [], [h, l] = y(0);
|
|
80
|
-
let a = 0;
|
|
81
|
-
const s = (e, r) => e !== v && r !== v ? i(e, r) : e === r, n = (e) => y(e, s), o = (e) => O(t[e][0]);
|
|
82
|
-
for (const e of p) t.push(n(e));
|
|
83
|
-
function m(e) {
|
|
84
|
-
w(() => {
|
|
85
|
-
const r = t.length, f = e.length, g = f < r ? f : r;
|
|
86
|
-
for (let c = 0; c < g; c++) t[c][1](e[c]);
|
|
87
|
-
if (f > r) {
|
|
88
|
-
for (let c = r; c < f; c++) t.push(n(e[c]));
|
|
89
|
-
l(++a);
|
|
90
|
-
} else if (f < r) {
|
|
91
|
-
const c = t.splice(f);
|
|
92
|
-
for (let d = 0; d < c.length; d++) c[d][1](v);
|
|
93
|
-
l(++a);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return {
|
|
98
|
-
get(e) {
|
|
99
|
-
if (e >= 0 && e < t.length) {
|
|
100
|
-
const r = t[e][0]();
|
|
101
|
-
if (r !== v) return r;
|
|
102
|
-
}
|
|
103
|
-
h();
|
|
104
|
-
},
|
|
105
|
-
length() {
|
|
106
|
-
return h(), t.length;
|
|
107
|
-
},
|
|
108
|
-
snapshot() {
|
|
109
|
-
h();
|
|
110
|
-
const e = new Array(t.length);
|
|
111
|
-
for (let r = 0; r < t.length; r++) e[r] = t[r][0]();
|
|
112
|
-
return e;
|
|
113
|
-
},
|
|
114
|
-
set(e, r) {
|
|
115
|
-
e >= 0 && e < t.length ? t[e][1](r) : console.warn(
|
|
116
|
-
`reactiveArray.set(${e}): index out of range [0, ${t.length}); ignored. Use push / splice / reconcile to change length.`
|
|
117
|
-
);
|
|
118
|
-
},
|
|
119
|
-
push(e) {
|
|
120
|
-
t.push(n(e)), l(++a);
|
|
121
|
-
},
|
|
122
|
-
pop() {
|
|
123
|
-
const e = t.length;
|
|
124
|
-
if (e === 0) return;
|
|
125
|
-
const r = o(e - 1), [f] = t.splice(e - 1);
|
|
126
|
-
return w(() => {
|
|
127
|
-
f[1](v), l(++a);
|
|
128
|
-
}), r;
|
|
129
|
-
},
|
|
130
|
-
splice(e, r, ...f) {
|
|
131
|
-
const g = t.length, c = e < 0 ? Math.max(g + e, 0) : Math.min(e, g), d = r === void 0 ? g - c : Math.max(0, Math.min(r, g - c)), k = [];
|
|
132
|
-
for (let u = 0; u < d; u++) k.push(o(c + u));
|
|
133
|
-
const b = [];
|
|
134
|
-
for (let u = 0; u < c; u++) b.push(o(u));
|
|
135
|
-
for (let u = 0; u < f.length; u++) b.push(f[u]);
|
|
136
|
-
for (let u = c + d; u < g; u++) b.push(o(u));
|
|
137
|
-
return m(b), k;
|
|
138
|
-
},
|
|
139
|
-
reconcile(e) {
|
|
140
|
-
m(e);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function A(p, i) {
|
|
145
|
-
if (Object.is(p, i)) return !0;
|
|
146
|
-
const t = p, h = i, l = Object.keys(t);
|
|
147
|
-
if (l.length !== Object.keys(h).length) return !1;
|
|
148
|
-
for (let a = 0; a < l.length; a++) {
|
|
149
|
-
const s = l[a];
|
|
150
|
-
if (!Object.prototype.hasOwnProperty.call(h, s) || !Object.is(t[s], h[s])) return !1;
|
|
151
|
-
}
|
|
152
|
-
return !0;
|
|
153
|
-
}
|
|
154
|
-
export {
|
|
155
|
-
x as a,
|
|
156
|
-
M as b,
|
|
157
|
-
j as r,
|
|
158
|
-
A as s
|
|
159
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const p=require("./kernel-yWV3XnAb.cjs");function O(g=Object.is){const l=new Map,[t,h]=p.signal(0);let i=0;const a=(s,r)=>s!==void 0&&r!==void 0?g(s,r):s===r;return{get(s){const r=l.get(s);if(r!==void 0)return r[0]();t()},set(s,r){const o=l.get(s);o!==void 0?o[1](r):(l.set(s,p.signal(r,a)),h(++i))},delete(s){const r=l.get(s);return r===void 0?!1:(l.delete(s),p.batch(()=>{r[1](void 0),h(++i)}),!0)},has(s){return t(),l.has(s)},size(){return t(),l.size},keys(){return t(),[...l.keys()]}}}function k(g,l={}){const t={},h={},i=Object.keys(g),a=new Set(i);for(const r of i){const[o,b]=p.signal(g[r],l[r]);t[r]=o,h[r]=b}return[new Proxy({},{get:(r,o)=>a.has(o)?t[o]():Reflect.get(r,o),has:(r,o)=>a.has(o),ownKeys:()=>i,getOwnPropertyDescriptor:(r,o)=>a.has(o)?{get:()=>t[o](),enumerable:!0,configurable:!0}:void 0,set:(r,o)=>!1}),h]}const y=Symbol("reactiveArray.absent");function j(g=[],l=Object.is){const t=[],[h,i]=p.signal(0);let a=0;const s=(e,n)=>e!==y&&n!==y?l(e,n):e===n,r=e=>p.signal(e,s),o=e=>p.untrack(t[e][0]);for(const e of g)t.push(r(e));function b(e){p.batch(()=>{const n=t.length,f=e.length,v=f<n?f:n;for(let c=0;c<v;c++)t[c][1](e[c]);if(f>n){for(let c=n;c<f;c++)t.push(r(e[c]));i(++a)}else if(f<n){const c=t.splice(f);for(let d=0;d<c.length;d++)c[d][1](y);i(++a)}})}return{get(e){if(e>=0&&e<t.length){const n=t[e][0]();if(n!==y)return n}h()},length(){return h(),t.length},snapshot(){h();const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=t[n][0]();return e},set(e,n){e>=0&&e<t.length&&t[e][1](n)},push(e){t.push(r(e)),i(++a)},pop(){const e=t.length;if(e===0)return;const n=o(e-1),[f]=t.splice(e-1);return p.batch(()=>{f[1](y),i(++a)}),n},splice(e,n,...f){const v=t.length,c=e<0?Math.max(v+e,0):Math.min(e,v),d=n===void 0?v-c:Math.max(0,Math.min(n,v-c)),w=[];for(let u=0;u<d;u++)w.push(o(c+u));const m=[];for(let u=0;u<c;u++)m.push(o(u));for(let u=0;u<f.length;u++)m.push(f[u]);for(let u=c+d;u<v;u++)m.push(o(u));return b(m),w},reconcile(e){b(e)}}}function S(g,l){if(Object.is(g,l))return!0;const t=g,h=l,i=Object.keys(t);if(i.length!==Object.keys(h).length)return!1;for(let a=0;a<i.length;a++){const s=i[a];if(!Object.prototype.hasOwnProperty.call(h,s)||!Object.is(t[s],h[s]))return!1}return!0}exports.reactiveArray=j;exports.reactiveMap=O;exports.reactiveStruct=k;exports.shallow=S;
|
package/dist/shared-B4v0L1cw.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
class u extends Error {
|
|
2
|
-
constructor(t, e, a, n) {
|
|
3
|
-
super(t, n), this.requestedBytes = e, this.capBytes = a, this.name = "StoreCapExceededError";
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
class c extends Error {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(
|
|
9
|
-
"SharedArrayBuffer is not available in this runtime. The chosen world backing is SAB-based and cannot start without it. In browsers this requires cross-origin isolation: serve the page with `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp` (or `credentialless`). Alternatively choose the pure-TS heap profile (`memory: { heap: {} }`), which is backed by a plain ArrayBuffer and needs no SAB / no COOP+COEP. In Bun/Node SAB is available unconditionally — if you see this there, the runtime is older than expected or the global was shadowed."
|
|
10
|
-
), this.name = "SabUnavailableError";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
const d = (r) => {
|
|
14
|
-
if (typeof SharedArrayBuffer > "u") throw new c();
|
|
15
|
-
return new SharedArrayBuffer(r);
|
|
16
|
-
}, h = 64 * 1024;
|
|
17
|
-
function f(r, t, e) {
|
|
18
|
-
if (e <= 0 || !Number.isInteger(e))
|
|
19
|
-
throw new Error(`${r}: maxBytes must be a positive integer (got ${e})`);
|
|
20
|
-
let a = null;
|
|
21
|
-
const n = (o) => {
|
|
22
|
-
if (o > e)
|
|
23
|
-
throw new u(
|
|
24
|
-
`${r}: requested ${o} bytes exceeds the by-design maxBytes cap of ${e}. This is a hard ceiling with no grow-beyond-cap fallback; a real workload stays ~16 MiB. Reaching it signals runaway entity/column growth upstream — diagnose that rather than raising the cap blindly.`,
|
|
25
|
-
o,
|
|
26
|
-
e
|
|
27
|
-
);
|
|
28
|
-
return a === null ? (a = t.create(o, e), a) : (o > a.byteLength && t.growTo(a, o), a);
|
|
29
|
-
};
|
|
30
|
-
return Object.defineProperty(n, "isInPlace", { value: !0, enumerable: !0 }), n;
|
|
31
|
-
}
|
|
32
|
-
function w(r = 256 * 1024 * 1024) {
|
|
33
|
-
if (typeof SharedArrayBuffer > "u") throw new c();
|
|
34
|
-
return f(
|
|
35
|
-
"growableSabAllocator",
|
|
36
|
-
{
|
|
37
|
-
create: (t, e) => {
|
|
38
|
-
const a = SharedArrayBuffer;
|
|
39
|
-
return new a(t, { maxByteLength: e });
|
|
40
|
-
},
|
|
41
|
-
// boundary: SharedArrayBuffer.grow is in the spec but not in all
|
|
42
|
-
// lib types; widen here so the rest of the layer doesn't need to.
|
|
43
|
-
growTo: (t, e) => t.grow(e)
|
|
44
|
-
},
|
|
45
|
-
r
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
function b(r = 256 * 1024 * 1024) {
|
|
49
|
-
return f(
|
|
50
|
-
"heapArraybufferAllocator",
|
|
51
|
-
{
|
|
52
|
-
// Reserve the whole cap as ONE fixed buffer. `byteLength` (the current
|
|
53
|
-
// need) is ignored: the buffer never resizes, so it must be born at the
|
|
54
|
-
// ceiling. Lazy page-faulting keeps RSS proportional to real use.
|
|
55
|
-
create: (t, e) => new ArrayBuffer(e),
|
|
56
|
-
// Unreachable: the buffer is created at `maxByteLength`, so
|
|
57
|
-
// `makeGrowableAllocator`'s `bytes > buffer.byteLength` guard never fires
|
|
58
|
-
// (a byte count past the cap throws first). A fixed `ArrayBuffer` has no
|
|
59
|
-
// `.resize()`; assert loudly rather than attempt one, in case the guard
|
|
60
|
-
// logic ever changes.
|
|
61
|
-
growTo: () => {
|
|
62
|
-
throw new Error(
|
|
63
|
-
"heap_arraybuffer_allocator: the heap buffer is fixed at maxBytes and must never grow — growth relocates columns within the buffer, not the buffer itself"
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
r
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
function g(r) {
|
|
71
|
-
if (!(r.buffer instanceof SharedArrayBuffer))
|
|
72
|
-
throw new Error(
|
|
73
|
-
"wasmMemoryAllocator: WebAssembly.Memory must be constructed with `shared: true` so its buffer is a SharedArrayBuffer"
|
|
74
|
-
);
|
|
75
|
-
const t = () => r.buffer, e = (a) => {
|
|
76
|
-
const n = r.buffer.byteLength;
|
|
77
|
-
if (a <= n)
|
|
78
|
-
return t();
|
|
79
|
-
const o = Math.ceil((a - n) / h), s = (i) => (
|
|
80
|
-
// The JS API doesn't expose the Memory's `maximum`, so the cap is
|
|
81
|
-
// reported as unknowable (`null`) — the caller declared it at
|
|
82
|
-
// `new WebAssembly.Memory({ maximum })` time.
|
|
83
|
-
new u(
|
|
84
|
-
`wasm_memory_allocator: memory.grow(${o}) failed (current=${n} bytes, requested=${a} bytes, maximum may be reached)`,
|
|
85
|
-
a,
|
|
86
|
-
null,
|
|
87
|
-
{ cause: i }
|
|
88
|
-
)
|
|
89
|
-
);
|
|
90
|
-
let l;
|
|
91
|
-
try {
|
|
92
|
-
l = r.grow(o);
|
|
93
|
-
} catch (i) {
|
|
94
|
-
throw s(i);
|
|
95
|
-
}
|
|
96
|
-
if (l === -1)
|
|
97
|
-
throw s();
|
|
98
|
-
return t();
|
|
99
|
-
};
|
|
100
|
-
return Object.defineProperty(e, "isInPlace", { value: !0, enumerable: !0 }), e;
|
|
101
|
-
}
|
|
102
|
-
export {
|
|
103
|
-
d as D,
|
|
104
|
-
u as S,
|
|
105
|
-
c as a,
|
|
106
|
-
w as g,
|
|
107
|
-
b as h,
|
|
108
|
-
g as w
|
|
109
|
-
};
|
package/dist/shared-DU78k0pU.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";class l extends Error{constructor(t,e,a,n){super(t,n),this.requestedBytes=e,this.capBytes=a,this.name="StoreCapExceededError"}}class s extends Error{constructor(){super("SharedArrayBuffer is not available in this runtime. The chosen world backing is SAB-based and cannot start without it. In browsers this requires cross-origin isolation: serve the page with `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp` (or `credentialless`). Alternatively choose the pure-TS heap profile (`memory: { heap: {} }`), which is backed by a plain ArrayBuffer and needs no SAB / no COOP+COEP. In Bun/Node SAB is available unconditionally — if you see this there, the runtime is older than expected or the global was shadowed."),this.name="SabUnavailableError"}}const h=r=>{if(typeof SharedArrayBuffer>"u")throw new s;return new SharedArrayBuffer(r)},d=64*1024;function f(r,t,e){if(e<=0||!Number.isInteger(e))throw new Error(`${r}: maxBytes must be a positive integer (got ${e})`);let a=null;const n=o=>{if(o>e)throw new l(`${r}: requested ${o} bytes exceeds the by-design maxBytes cap of ${e}. This is a hard ceiling with no grow-beyond-cap fallback; a real workload stays ~16 MiB. Reaching it signals runaway entity/column growth upstream — diagnose that rather than raising the cap blindly.`,o,e);return a===null?(a=t.create(o,e),a):(o>a.byteLength&&t.growTo(a,o),a)};return Object.defineProperty(n,"isInPlace",{value:!0,enumerable:!0}),n}function w(r=256*1024*1024){if(typeof SharedArrayBuffer>"u")throw new s;return f("growableSabAllocator",{create:(t,e)=>{const a=SharedArrayBuffer;return new a(t,{maxByteLength:e})},growTo:(t,e)=>t.grow(e)},r)}function b(r=256*1024*1024){return f("heapArraybufferAllocator",{create:(t,e)=>new ArrayBuffer(e),growTo:()=>{throw new Error("heap_arraybuffer_allocator: the heap buffer is fixed at maxBytes and must never grow — growth relocates columns within the buffer, not the buffer itself")}},r)}function A(r){if(!(r.buffer instanceof SharedArrayBuffer))throw new Error("wasmMemoryAllocator: WebAssembly.Memory must be constructed with `shared: true` so its buffer is a SharedArrayBuffer");const t=()=>r.buffer,e=a=>{const n=r.buffer.byteLength;if(a<=n)return t();const o=Math.ceil((a-n)/d),u=i=>new l(`wasm_memory_allocator: memory.grow(${o}) failed (current=${n} bytes, requested=${a} bytes, maximum may be reached)`,a,null,{cause:i});let c;try{c=r.grow(o)}catch(i){throw u(i)}if(c===-1)throw u();return t()};return Object.defineProperty(e,"isInPlace",{value:!0,enumerable:!0}),e}exports.DEFAULT_SAB_ALLOCATOR=h;exports.SabUnavailableError=s;exports.StoreCapExceededError=l;exports.growableSabAllocator=w;exports.heapArraybufferAllocator=b;exports.wasmMemoryAllocator=A;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";class d{_denseKeys=[];_denseVals=[];_sparse=[];get size(){return this._denseKeys.length}get keys(){return this._denseKeys}has(s){return this._denseKeys[this._sparse[s]]===s}get(s){return this.has(s)?this._denseVals[this._sparse[s]]:void 0}set(s,t){if(this.has(s)){this._denseVals[this._sparse[s]]=t;return}this._sparse[s]=this._denseKeys.length,this._denseKeys.push(s),this._denseVals.push(t)}delete(s){if(!this.has(s))return!1;const t=this._sparse[s],i=this._denseKeys[this._denseKeys.length-1];return this._denseKeys[t]=i,this._denseVals[t]=this._denseVals[this._denseVals.length-1],this._sparse[i]=t,this._denseKeys.pop(),this._denseVals.pop(),!0}clear(){this._denseKeys.length=0,this._denseVals.length=0,this._sparse.length=0}forEach(s){for(let t=0;t<this._denseKeys.length;t++)s(this._denseKeys[t],this._denseVals[t])}[Symbol.iterator](){let s=0;const t=this._denseKeys,i=this._denseVals;return{next(){return s<t.length?{value:[t[s],i[s++]],done:!1}:{value:void 0,done:!0}}}}}class g{_compare;_data=[];constructor(s){this._compare=s}get size(){return this._data.length}peek(){return this._data[0]}push(s){this._data.push(s),this._siftUp(this._data.length-1)}pop(){const s=this._data;if(s.length===0)return;const i=s[0],h=s.pop();return s.length>0&&(s[0]=h,this._siftDown(0)),i}clear(){this._data.length=0}_siftUp(s){const t=this._data,i=this._compare,h=t[s];for(;s>0;){const n=s-1>>1;if(i(h,t[n])>=0)break;t[s]=t[n],s=n}t[s]=h}_siftDown(s){const t=this._data,i=this._compare,h=t.length,n=h>>1,c=t[s];for(;s<n;){let a=(s<<1)+1;const e=a+1;if(e<h&&i(t[e],t[a])<0&&(a=e),i(t[a],c)>=0)break;t[s]=t[a],s=a}t[s]=c}}function u(l,s,t,i){const h=i??(e=>String(e)),n=new Map;for(let e=0;e<l.length;e++)n.set(l[e],0);for(const[,e]of s)for(let r=0;r<e.length;r++){const o=e[r];n.has(o)&&n.set(o,n.get(o)+1)}const c=new g(t);for(let e=0;e<l.length;e++)n.get(l[e])===0&&c.push(l[e]);const a=[];for(;c.size>0;){const e=c.pop();a.push(e);const r=s.get(e);if(r!==void 0)for(let o=0;o<r.length;o++){const _=r[o];if(!n.has(_))continue;const p=n.get(_)-1;n.set(_,p),p===0&&c.push(_)}}if(a.length!==l.length){const e=[];for(const[r,o]of n)o>0&&e.push(h(r));throw new TypeError(`Cycle detected in topological sort. Nodes still pending: ${e.join(", ")}`)}return a}exports.BinaryHeap=g;exports.SparseMap=d;exports.topologicalSort=u;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
class g {
|
|
2
|
-
_denseKeys = [];
|
|
3
|
-
_denseVals = [];
|
|
4
|
-
_sparse = [];
|
|
5
|
-
get size() {
|
|
6
|
-
return this._denseKeys.length;
|
|
7
|
-
}
|
|
8
|
-
get keys() {
|
|
9
|
-
return this._denseKeys;
|
|
10
|
-
}
|
|
11
|
-
has(s) {
|
|
12
|
-
return this._denseKeys[this._sparse[s]] === s;
|
|
13
|
-
}
|
|
14
|
-
get(s) {
|
|
15
|
-
return this.has(s) ? this._denseVals[this._sparse[s]] : void 0;
|
|
16
|
-
}
|
|
17
|
-
set(s, t) {
|
|
18
|
-
if (this.has(s)) {
|
|
19
|
-
this._denseVals[this._sparse[s]] = t;
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
this._sparse[s] = this._denseKeys.length, this._denseKeys.push(s), this._denseVals.push(t);
|
|
23
|
-
}
|
|
24
|
-
delete(s) {
|
|
25
|
-
if (!this.has(s)) return !1;
|
|
26
|
-
const t = this._sparse[s], h = this._denseKeys[this._denseKeys.length - 1];
|
|
27
|
-
return this._denseKeys[t] = h, this._denseVals[t] = this._denseVals[this._denseVals.length - 1], this._sparse[h] = t, this._denseKeys.pop(), this._denseVals.pop(), !0;
|
|
28
|
-
}
|
|
29
|
-
clear() {
|
|
30
|
-
this._denseKeys.length = 0, this._denseVals.length = 0, this._sparse.length = 0;
|
|
31
|
-
}
|
|
32
|
-
forEach(s) {
|
|
33
|
-
for (let t = 0; t < this._denseKeys.length; t++)
|
|
34
|
-
s(this._denseKeys[t], this._denseVals[t]);
|
|
35
|
-
}
|
|
36
|
-
[Symbol.iterator]() {
|
|
37
|
-
let s = 0;
|
|
38
|
-
const t = this._denseKeys, h = this._denseVals;
|
|
39
|
-
return {
|
|
40
|
-
next() {
|
|
41
|
-
return s < t.length ? { value: [t[s], h[s++]], done: !1 } : { value: void 0, done: !0 };
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
class d {
|
|
47
|
-
_compare;
|
|
48
|
-
_data = [];
|
|
49
|
-
constructor(s) {
|
|
50
|
-
this._compare = s;
|
|
51
|
-
}
|
|
52
|
-
get size() {
|
|
53
|
-
return this._data.length;
|
|
54
|
-
}
|
|
55
|
-
/** Returns the highest-priority element without removing it, or undefined if empty. */
|
|
56
|
-
peek() {
|
|
57
|
-
return this._data[0];
|
|
58
|
-
}
|
|
59
|
-
/** Inserts a value and restores heap order by sifting up. O(log n). */
|
|
60
|
-
push(s) {
|
|
61
|
-
this._data.push(s), this._siftUp(this._data.length - 1);
|
|
62
|
-
}
|
|
63
|
-
/** Removes and returns the highest-priority element, or undefined if empty. O(log n). */
|
|
64
|
-
pop() {
|
|
65
|
-
const s = this._data;
|
|
66
|
-
if (s.length === 0) return;
|
|
67
|
-
const h = s[0], i = s.pop();
|
|
68
|
-
return s.length > 0 && (s[0] = i, this._siftDown(0)), h;
|
|
69
|
-
}
|
|
70
|
-
/** Removes all elements. O(1). */
|
|
71
|
-
clear() {
|
|
72
|
-
this._data.length = 0;
|
|
73
|
-
}
|
|
74
|
-
/** Moves a node up toward the root until heap order is restored. */
|
|
75
|
-
_siftUp(s) {
|
|
76
|
-
const t = this._data, h = this._compare, i = t[s];
|
|
77
|
-
for (; s > 0; ) {
|
|
78
|
-
const n = s - 1 >> 1;
|
|
79
|
-
if (h(i, t[n]) >= 0) break;
|
|
80
|
-
t[s] = t[n], s = n;
|
|
81
|
-
}
|
|
82
|
-
t[s] = i;
|
|
83
|
-
}
|
|
84
|
-
/** Moves a node down away from the root until heap order is restored. */
|
|
85
|
-
_siftDown(s) {
|
|
86
|
-
const t = this._data, h = this._compare, i = t.length, n = i >> 1, c = t[s];
|
|
87
|
-
for (; s < n; ) {
|
|
88
|
-
let a = (s << 1) + 1;
|
|
89
|
-
const e = a + 1;
|
|
90
|
-
if (e < i && h(t[e], t[a]) < 0 && (a = e), h(t[a], c) >= 0) break;
|
|
91
|
-
t[s] = t[a], s = a;
|
|
92
|
-
}
|
|
93
|
-
t[s] = c;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function u(l, s, t, h) {
|
|
97
|
-
const i = h ?? ((e) => String(e)), n = /* @__PURE__ */ new Map();
|
|
98
|
-
for (let e = 0; e < l.length; e++)
|
|
99
|
-
n.set(l[e], 0);
|
|
100
|
-
for (const [, e] of s)
|
|
101
|
-
for (let r = 0; r < e.length; r++) {
|
|
102
|
-
const o = e[r];
|
|
103
|
-
n.has(o) && n.set(o, n.get(o) + 1);
|
|
104
|
-
}
|
|
105
|
-
const c = new d(t);
|
|
106
|
-
for (let e = 0; e < l.length; e++)
|
|
107
|
-
n.get(l[e]) === 0 && c.push(l[e]);
|
|
108
|
-
const a = [];
|
|
109
|
-
for (; c.size > 0; ) {
|
|
110
|
-
const e = c.pop();
|
|
111
|
-
a.push(e);
|
|
112
|
-
const r = s.get(e);
|
|
113
|
-
if (r !== void 0)
|
|
114
|
-
for (let o = 0; o < r.length; o++) {
|
|
115
|
-
const _ = r[o];
|
|
116
|
-
if (!n.has(_)) continue;
|
|
117
|
-
const p = n.get(_) - 1;
|
|
118
|
-
n.set(_, p), p === 0 && c.push(_);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
if (a.length !== l.length) {
|
|
122
|
-
const e = [];
|
|
123
|
-
for (const [r, o] of n)
|
|
124
|
-
o > 0 && e.push(i(r));
|
|
125
|
-
throw new TypeError(
|
|
126
|
-
`Cycle detected in topological sort. Nodes still pending: ${e.join(", ")}`
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
return a;
|
|
130
|
-
}
|
|
131
|
-
export {
|
|
132
|
-
d as B,
|
|
133
|
-
g as S,
|
|
134
|
-
u as t
|
|
135
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";class a{_words;constructor(t){this._words=t??new Array(4).fill(0)}has(t){const r=t>>>5;return r>=this._words.length?!1:(this._words[r]&1<<(t&31))!==0}set(t){const r=t>>>5;r>=this._words.length&&this.grow(r+1),this._words[r]|=1<<(t&31)}clear(t){const r=t>>>5;r>=this._words.length||(this._words[r]&=~(1<<(t&31)))}isEmpty(){const t=this._words;for(let r=0;r<t.length;r++)if(t[r]!==0)return!1;return!0}overlaps(t){const r=this._words,s=t._words,e=r.length<s.length?r.length:s.length;for(let n=0;n<e;n++)if((r[n]&s[n])!==0)return!0;return!1}contains(t){const r=t._words,s=this._words,e=s.length;for(let n=0;n<r.length;n++){const o=r[n];if(o!==0&&(n>=e||(s[n]&o)!==o))return!1}return!0}equals(t){const r=this._words,s=t._words,e=r.length>s.length?r.length:s.length;for(let n=0;n<e;n++){const o=n<r.length?r[n]:0,h=n<s.length?s[n]:0;if(o!==h)return!1}return!0}copy(){return new a(this._words.slice())}copyInto(t){const r=this._words,s=t._words,e=r.length,n=s.length;if(n>=e){for(let o=0;o<e;o++)s[o]=r[o];for(let o=e;o<n;o++)s[o]=0}else{let o=n>0?n:1;for(;o<e;)o*=2;const h=new Array(o).fill(0);for(let c=0;c<e;c++)h[c]=r[c];t._words=h}return t}copyWithSet(t){const r=t>>>5,s=r+1,e=this._words.length>s?this._words.length:s,n=new Array(e).fill(0);for(let o=0;o<this._words.length;o++)n[o]=this._words[o];return n[r]|=1<<(t&31),new a(n)}copyWithClear(t){const r=this._words.slice(),s=t>>>5;return s<r.length&&(r[s]&=~(1<<(t&31))),new a(r)}hash(){let t=2166136261;const r=this._words;let s=r.length-1;for(;s>=0&&r[s]===0;)s--;for(let e=0;e<=s;e++)t^=r[e],t=Math.imul(t,16777619);return t}forEach(t){const r=this._words;for(let s=0;s<r.length;s++){let e=r[s];if(e===0)continue;const n=s<<5;for(;e!==0;){const o=e&-e>>>0,h=31-Math.clz32(o);t(n+h),e^=o}}}grow(t){let r=this._words.length;for(;r<t;)r*=2;const s=new Array(r).fill(0);for(let e=0;e<this._words.length;e++)s[e]=this._words[e];this._words=s}}const i=16,u=2;class l{constructor(t,r=16){this._ctor=t,this._buf=new t(r)}_buf;_len=0;get length(){return this._len}push(t){this._len>=this._buf.length&&this._grow(),this._buf[this._len++]=t}pop(){return this._buf[--this._len]}get(t){return this._buf[t]}setAt(t,r){this._buf[t]=r}swapRemove(t){const r=this._buf[t];return this._buf[t]=this._buf[--this._len],r}clear(){this._len=0}setLength(t){this.ensureCapacity(t),this._len=t}get buf(){return this._buf}view(){return this._buf.subarray(0,this._len)}[Symbol.iterator](){let t=0;const r=this._buf,s=this._len;return{next(){return t<s?{value:r[t++],done:!1}:{value:0,done:!0}}}}ensureCapacity(t){if(t<=this._buf.length)return;let r=this._buf.length||1;for(;r<t;)r*=u;const s=new this._ctor(r);s.set(this._buf.subarray(0,this._len)),this._buf=s}bulkAppend(t,r,s){this.ensureCapacity(this._len+s),this._buf.set(t.subarray(r,r+s),this._len),this._len+=s}bulkAppendZeroes(t){this.ensureCapacity(this._len+t),this._buf.fill(0,this._len,this._len+t),this._len+=t}bulkAppendValue(t,r){this.ensureCapacity(this._len+r),this._buf.fill(t,this._len,this._len+r),this._len+=r}_grow(){const t=new this._ctor(this._buf.length*u);t.set(this._buf),this._buf=t}}class w extends l{constructor(t=i){super(Float32Array,t)}}class d extends l{constructor(t=i){super(Float64Array,t)}}class f extends l{constructor(t=i){super(Int8Array,t)}}class I extends l{constructor(t=i){super(Int16Array,t)}}class A extends l{constructor(t=i){super(Int32Array,t)}}class b extends l{constructor(t=i){super(Uint8Array,t)}}class y extends l{constructor(t=i){super(Uint16Array,t)}}class R extends l{constructor(t=i){super(Uint32Array,t)}}exports.BITS_PER_WORD_MASK=31;exports.BITS_PER_WORD_SHIFT=5;exports.BitSet=a;exports.GrowableFloat32Array=w;exports.GrowableFloat64Array=d;exports.GrowableInt16Array=I;exports.GrowableInt32Array=A;exports.GrowableInt8Array=f;exports.GrowableTypedArray=l;exports.GrowableUint16Array=y;exports.GrowableUint32Array=R;exports.GrowableUint8Array=b;
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
const w = 5, d = 31;
|
|
2
|
-
class c {
|
|
3
|
-
_words;
|
|
4
|
-
constructor(t) {
|
|
5
|
-
this._words = t ?? new Array(4).fill(0);
|
|
6
|
-
}
|
|
7
|
-
has(t) {
|
|
8
|
-
const s = t >>> 5;
|
|
9
|
-
return s >= this._words.length ? !1 : (this._words[s] & 1 << (t & 31)) !== 0;
|
|
10
|
-
}
|
|
11
|
-
set(t) {
|
|
12
|
-
const s = t >>> 5;
|
|
13
|
-
s >= this._words.length && this.grow(s + 1), this._words[s] |= 1 << (t & 31);
|
|
14
|
-
}
|
|
15
|
-
clear(t) {
|
|
16
|
-
const s = t >>> 5;
|
|
17
|
-
s >= this._words.length || (this._words[s] &= ~(1 << (t & 31)));
|
|
18
|
-
}
|
|
19
|
-
/** True if no bit is set. */
|
|
20
|
-
isEmpty() {
|
|
21
|
-
const t = this._words;
|
|
22
|
-
for (let s = 0; s < t.length; s++)
|
|
23
|
-
if (t[s] !== 0) return !1;
|
|
24
|
-
return !0;
|
|
25
|
-
}
|
|
26
|
-
/** True if any bit is set in both this and other (non-empty intersection). */
|
|
27
|
-
overlaps(t) {
|
|
28
|
-
const s = this._words, e = t._words, r = s.length < e.length ? s.length : e.length;
|
|
29
|
-
for (let n = 0; n < r; n++)
|
|
30
|
-
if ((s[n] & e[n]) !== 0) return !0;
|
|
31
|
-
return !1;
|
|
32
|
-
}
|
|
33
|
-
/** True if this is a superset of other (all bits in other are set in this). */
|
|
34
|
-
contains(t) {
|
|
35
|
-
const s = t._words, e = this._words, r = e.length;
|
|
36
|
-
for (let n = 0; n < s.length; n++) {
|
|
37
|
-
const o = s[n];
|
|
38
|
-
if (o !== 0 && (n >= r || (e[n] & o) !== o))
|
|
39
|
-
return !1;
|
|
40
|
-
}
|
|
41
|
-
return !0;
|
|
42
|
-
}
|
|
43
|
-
equals(t) {
|
|
44
|
-
const s = this._words, e = t._words, r = s.length > e.length ? s.length : e.length;
|
|
45
|
-
for (let n = 0; n < r; n++) {
|
|
46
|
-
const o = n < s.length ? s[n] : 0, h = n < e.length ? e[n] : 0;
|
|
47
|
-
if (o !== h) return !1;
|
|
48
|
-
}
|
|
49
|
-
return !0;
|
|
50
|
-
}
|
|
51
|
-
copy() {
|
|
52
|
-
return new c(this._words.slice());
|
|
53
|
-
}
|
|
54
|
-
/** Mutate `target` so it has the same set bits as `this`. Reuses
|
|
55
|
-
* `target._words` storage when capacity allows (no allocation) and
|
|
56
|
-
* grows it only when `this` is wider. Designed for hot-path scratch
|
|
57
|
-
* BitSets where callers want `.copy()` semantics without the
|
|
58
|
-
* per-call allocation. Returns `target` for chaining. */
|
|
59
|
-
copyInto(t) {
|
|
60
|
-
const s = this._words, e = t._words, r = s.length, n = e.length;
|
|
61
|
-
if (n >= r) {
|
|
62
|
-
for (let o = 0; o < r; o++) e[o] = s[o];
|
|
63
|
-
for (let o = r; o < n; o++) e[o] = 0;
|
|
64
|
-
} else {
|
|
65
|
-
let o = n > 0 ? n : 1;
|
|
66
|
-
for (; o < r; ) o *= 2;
|
|
67
|
-
const h = new Array(o).fill(0);
|
|
68
|
-
for (let a = 0; a < r; a++) h[a] = s[a];
|
|
69
|
-
t._words = h;
|
|
70
|
-
}
|
|
71
|
-
return t;
|
|
72
|
-
}
|
|
73
|
-
copyWithSet(t) {
|
|
74
|
-
const s = t >>> 5, e = s + 1, r = this._words.length > e ? this._words.length : e, n = new Array(r).fill(0);
|
|
75
|
-
for (let o = 0; o < this._words.length; o++) n[o] = this._words[o];
|
|
76
|
-
return n[s] |= 1 << (t & 31), new c(n);
|
|
77
|
-
}
|
|
78
|
-
copyWithClear(t) {
|
|
79
|
-
const s = this._words.slice(), e = t >>> 5;
|
|
80
|
-
return e < s.length && (s[e] &= ~(1 << (t & 31))), new c(s);
|
|
81
|
-
}
|
|
82
|
-
/** FNV-1a hash. Skips trailing zero words so differently-sized arrays with the same bits hash equally. */
|
|
83
|
-
hash() {
|
|
84
|
-
let t = 2166136261;
|
|
85
|
-
const s = this._words;
|
|
86
|
-
let e = s.length - 1;
|
|
87
|
-
for (; e >= 0 && s[e] === 0; ) e--;
|
|
88
|
-
for (let r = 0; r <= e; r++)
|
|
89
|
-
t ^= s[r], t = Math.imul(t, 16777619);
|
|
90
|
-
return t;
|
|
91
|
-
}
|
|
92
|
-
/** Iterate all set bits via lowest-set-bit extraction. */
|
|
93
|
-
forEach(t) {
|
|
94
|
-
const s = this._words;
|
|
95
|
-
for (let e = 0; e < s.length; e++) {
|
|
96
|
-
let r = s[e];
|
|
97
|
-
if (r === 0) continue;
|
|
98
|
-
const n = e << 5;
|
|
99
|
-
for (; r !== 0; ) {
|
|
100
|
-
const o = r & -r >>> 0, h = 31 - Math.clz32(o);
|
|
101
|
-
t(n + h), r ^= o;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
grow(t) {
|
|
106
|
-
let s = this._words.length;
|
|
107
|
-
for (; s < t; ) s *= 2;
|
|
108
|
-
const e = new Array(s).fill(0);
|
|
109
|
-
for (let r = 0; r < this._words.length; r++) e[r] = this._words[r];
|
|
110
|
-
this._words = e;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
const i = 16, u = 2;
|
|
114
|
-
class _ {
|
|
115
|
-
constructor(t, s = 16) {
|
|
116
|
-
this._ctor = t, this._buf = new t(s);
|
|
117
|
-
}
|
|
118
|
-
_buf;
|
|
119
|
-
_len = 0;
|
|
120
|
-
get length() {
|
|
121
|
-
return this._len;
|
|
122
|
-
}
|
|
123
|
-
push(t) {
|
|
124
|
-
this._len >= this._buf.length && this._grow(), this._buf[this._len++] = t;
|
|
125
|
-
}
|
|
126
|
-
pop() {
|
|
127
|
-
return this._buf[--this._len];
|
|
128
|
-
}
|
|
129
|
-
get(t) {
|
|
130
|
-
return this._buf[t];
|
|
131
|
-
}
|
|
132
|
-
setAt(t, s) {
|
|
133
|
-
this._buf[t] = s;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Move the last element into slot i, decrement length.
|
|
137
|
-
* Returns the value that was removed from slot i.
|
|
138
|
-
*/
|
|
139
|
-
swapRemove(t) {
|
|
140
|
-
const s = this._buf[t];
|
|
141
|
-
return this._buf[t] = this._buf[--this._len], s;
|
|
142
|
-
}
|
|
143
|
-
clear() {
|
|
144
|
-
this._len = 0;
|
|
145
|
-
}
|
|
146
|
-
/** Set the logical length directly (snapshot-mount reconstruction). The
|
|
147
|
-
* caller guarantees `[0, len)` already holds valid data. Grows the backing if
|
|
148
|
-
* needed so the length is always representable. */
|
|
149
|
-
setLength(t) {
|
|
150
|
-
this.ensureCapacity(t), this._len = t;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Raw backing buffer. Valid data: indices 0..length-1.
|
|
154
|
-
* This reference is stable until the next push() that triggers a grow —
|
|
155
|
-
* do not cache across entity additions.
|
|
156
|
-
*/
|
|
157
|
-
get buf() {
|
|
158
|
-
return this._buf;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Zero-copy subarray view of valid data (0..length-1).
|
|
162
|
-
* Shares the backing buffer — invalidated if a subsequent push() grows.
|
|
163
|
-
*/
|
|
164
|
-
view() {
|
|
165
|
-
return this._buf.subarray(0, this._len);
|
|
166
|
-
}
|
|
167
|
-
[Symbol.iterator]() {
|
|
168
|
-
let t = 0;
|
|
169
|
-
const s = this._buf, e = this._len;
|
|
170
|
-
return {
|
|
171
|
-
next() {
|
|
172
|
-
return t < e ? { value: s[t++], done: !1 } : { value: 0, done: !0 };
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
/** Ensure the backing buffer can hold at least `capacity` elements without growing. */
|
|
177
|
-
ensureCapacity(t) {
|
|
178
|
-
if (t <= this._buf.length) return;
|
|
179
|
-
let s = this._buf.length || 1;
|
|
180
|
-
for (; s < t; ) s *= u;
|
|
181
|
-
const e = new this._ctor(s);
|
|
182
|
-
e.set(this._buf.subarray(0, this._len)), this._buf = e;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Append `count` elements from `src` starting at `srcOffset`.
|
|
186
|
-
* Grows if needed. Equivalent to push() in a loop but uses TypedArray.set().
|
|
187
|
-
*/
|
|
188
|
-
bulkAppend(t, s, e) {
|
|
189
|
-
this.ensureCapacity(this._len + e), this._buf.set(t.subarray(s, s + e), this._len), this._len += e;
|
|
190
|
-
}
|
|
191
|
-
/** Append `count` zeroes. Grows if needed. */
|
|
192
|
-
bulkAppendZeroes(t) {
|
|
193
|
-
this.ensureCapacity(this._len + t), this._buf.fill(0, this._len, this._len + t), this._len += t;
|
|
194
|
-
}
|
|
195
|
-
/** Append `count` copies of `value`. Grows if needed. Single-pass
|
|
196
|
-
* analogue of `bulkAppendZeroes` for a non-zero default. */
|
|
197
|
-
bulkAppendValue(t, s) {
|
|
198
|
-
this.ensureCapacity(this._len + s), this._buf.fill(t, this._len, this._len + s), this._len += s;
|
|
199
|
-
}
|
|
200
|
-
_grow() {
|
|
201
|
-
const t = new this._ctor(this._buf.length * u);
|
|
202
|
-
t.set(this._buf), this._buf = t;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
class f extends _ {
|
|
206
|
-
constructor(t = i) {
|
|
207
|
-
super(Float32Array, t);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
class I extends _ {
|
|
211
|
-
constructor(t = i) {
|
|
212
|
-
super(Float64Array, t);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
class b extends _ {
|
|
216
|
-
constructor(t = i) {
|
|
217
|
-
super(Int8Array, t);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
class A extends _ {
|
|
221
|
-
constructor(t = i) {
|
|
222
|
-
super(Int16Array, t);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
class g extends _ {
|
|
226
|
-
constructor(t = i) {
|
|
227
|
-
super(Int32Array, t);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
class y extends _ {
|
|
231
|
-
constructor(t = i) {
|
|
232
|
-
super(Uint8Array, t);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
class R extends _ {
|
|
236
|
-
constructor(t = i) {
|
|
237
|
-
super(Uint16Array, t);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
class S extends _ {
|
|
241
|
-
constructor(t = i) {
|
|
242
|
-
super(Uint32Array, t);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
export {
|
|
246
|
-
c as B,
|
|
247
|
-
_ as G,
|
|
248
|
-
f as a,
|
|
249
|
-
I as b,
|
|
250
|
-
b as c,
|
|
251
|
-
A as d,
|
|
252
|
-
g as e,
|
|
253
|
-
y as f,
|
|
254
|
-
R as g,
|
|
255
|
-
S as h,
|
|
256
|
-
d as i,
|
|
257
|
-
w as j
|
|
258
|
-
};
|