@asyra/core 0.2.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +52 -0
- package/dist/apis/create-apis.d.ts +8 -0
- package/dist/apis/create-apis.d.ts.map +1 -0
- package/dist/apis/create-apis.js +272 -0
- package/dist/apis/create-apis.js.map +1 -0
- package/dist/apis/element-properties.d.ts +10 -0
- package/dist/apis/element-properties.d.ts.map +1 -0
- package/dist/apis/element-properties.js +33 -0
- package/dist/apis/element-properties.js.map +1 -0
- package/dist/apis/element-selection.d.ts +4 -2
- package/dist/apis/element-selection.d.ts.map +1 -1
- package/dist/apis/element-selection.js +155 -6
- package/dist/apis/element-selection.js.map +1 -1
- package/dist/apis/feature-system.d.ts +11 -0
- package/dist/apis/feature-system.d.ts.map +1 -0
- package/dist/apis/feature-system.js +9 -0
- package/dist/apis/feature-system.js.map +1 -0
- package/dist/apis/index.d.ts +1 -2
- package/dist/apis/index.d.ts.map +1 -1
- package/dist/apis/index.js +1 -24
- package/dist/apis/index.js.map +1 -1
- package/dist/apis/input-system.d.ts +1 -1
- package/dist/apis/input-system.d.ts.map +1 -1
- package/dist/apis/props.d.ts +18 -2
- package/dist/apis/props.d.ts.map +1 -1
- package/dist/apis/props.js +28 -9
- package/dist/apis/props.js.map +1 -1
- package/dist/apis/render.d.ts +39 -2
- package/dist/apis/render.d.ts.map +1 -1
- package/dist/apis/render.js +35 -2
- package/dist/apis/render.js.map +1 -1
- package/dist/apis/scene-bounds.d.ts +4 -0
- package/dist/apis/scene-bounds.d.ts.map +1 -0
- package/dist/apis/scene-bounds.js +112 -0
- package/dist/apis/scene-bounds.js.map +1 -0
- package/dist/apis/scene-tree.d.ts +24 -2
- package/dist/apis/scene-tree.d.ts.map +1 -1
- package/dist/apis/scene-tree.js +116 -25
- package/dist/apis/scene-tree.js.map +1 -1
- package/dist/apis/system-properties.d.ts +18 -0
- package/dist/apis/system-properties.d.ts.map +1 -0
- package/dist/apis/system-properties.js +21 -0
- package/dist/apis/system-properties.js.map +1 -0
- package/dist/apis/ui-context.d.ts +10 -0
- package/dist/apis/ui-context.d.ts.map +1 -0
- package/dist/apis/ui-context.js +22 -0
- package/dist/apis/ui-context.js.map +1 -0
- package/dist/canvas-pipeline-debugger/debugger.d.ts +29 -0
- package/dist/canvas-pipeline-debugger/debugger.d.ts.map +1 -0
- package/dist/canvas-pipeline-debugger/debugger.js +251 -0
- package/dist/canvas-pipeline-debugger/debugger.js.map +1 -0
- package/dist/canvas-pipeline-debugger/index.d.ts +2 -0
- package/dist/canvas-pipeline-debugger/index.d.ts.map +1 -0
- package/dist/canvas-pipeline-debugger/index.js +2 -0
- package/dist/canvas-pipeline-debugger/index.js.map +1 -0
- package/dist/core.d.ts +196 -40
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +1055 -38
- package/dist/core.js.map +1 -1
- package/dist/data-channel-observer.d.ts +35 -0
- package/dist/data-channel-observer.d.ts.map +1 -0
- package/dist/data-channel-observer.js +77 -0
- package/dist/data-channel-observer.js.map +1 -0
- package/dist/define-component.d.ts +102 -0
- package/dist/define-component.d.ts.map +1 -0
- package/dist/define-component.js +429 -0
- package/dist/define-component.js.map +1 -0
- package/dist/define-property-component.d.ts +29 -0
- package/dist/define-property-component.d.ts.map +1 -0
- package/dist/define-property-component.js +140 -0
- package/dist/define-property-component.js.map +1 -0
- package/dist/feature-integration.d.ts +16 -0
- package/dist/feature-integration.d.ts.map +1 -0
- package/dist/feature-integration.js +19 -0
- package/dist/feature-integration.js.map +1 -0
- package/dist/index.d.ts +43 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/types/canonical-changes.d.ts +39 -0
- package/dist/types/canonical-changes.d.ts.map +1 -0
- package/dist/types/canonical-changes.js +2 -0
- package/dist/types/canonical-changes.js.map +1 -0
- package/dist/types/deps.d.ts +0 -2
- package/dist/types/deps.d.ts.map +1 -1
- package/dist/types/element-properties.d.ts +24 -0
- package/dist/types/element-properties.d.ts.map +1 -0
- package/dist/types/element-properties.js +2 -0
- package/dist/types/element-properties.js.map +1 -0
- package/dist/types/element-selection.d.ts +5 -1
- package/dist/types/element-selection.d.ts.map +1 -1
- package/dist/types/feature-system.d.ts +5 -0
- package/dist/types/feature-system.d.ts.map +1 -0
- package/dist/types/feature-system.js +2 -0
- package/dist/types/feature-system.js.map +1 -0
- package/dist/types/index.d.ts +18 -14
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/load-migration.d.ts +12 -0
- package/dist/types/load-migration.d.ts.map +1 -0
- package/dist/types/load-migration.js +16 -0
- package/dist/types/load-migration.js.map +1 -0
- package/dist/types/load-validation.d.ts +12 -0
- package/dist/types/load-validation.d.ts.map +1 -0
- package/dist/types/load-validation.js +2 -0
- package/dist/types/load-validation.js.map +1 -0
- package/dist/types/props.d.ts +8 -1
- package/dist/types/props.d.ts.map +1 -1
- package/dist/types/render.d.ts +20 -1
- package/dist/types/render.d.ts.map +1 -1
- package/dist/types/scene-tree.d.ts +21 -9
- package/dist/types/scene-tree.d.ts.map +1 -1
- package/dist/types/system-properties.d.ts +19 -0
- package/dist/types/system-properties.d.ts.map +1 -0
- package/dist/types/system-properties.js +2 -0
- package/dist/types/system-properties.js.map +1 -0
- package/dist/types/ui-context.d.ts +11 -0
- package/dist/types/ui-context.d.ts.map +1 -0
- package/dist/types/ui-context.js +2 -0
- package/dist/types/ui-context.js.map +1 -0
- package/dist/types/vector.d.ts +131 -0
- package/dist/types/vector.d.ts.map +1 -0
- package/dist/types/vector.js +83 -0
- package/dist/types/vector.js.map +1 -0
- package/package.json +39 -12
- package/.turbo/turbo-test$colon$ci.log +0 -132
- package/.turbo/turbo-test$colon$local.log +0 -21
- package/.turbo/turbo-test.log +0 -0
- package/CHANGELOG.md +0 -86
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/clover.xml +0 -991
- package/coverage/coverage-final.json +0 -14952
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -236
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/src/apis/element-selection.ts.html +0 -133
- package/coverage/src/apis/index.html +0 -266
- package/coverage/src/apis/index.ts.html +0 -175
- package/coverage/src/apis/input-system.ts.html +0 -121
- package/coverage/src/apis/interaction-core.ts.html +0 -190
- package/coverage/src/apis/props.ts.html +0 -124
- package/coverage/src/apis/render.ts.html +0 -130
- package/coverage/src/apis/scene-tree.ts.html +0 -292
- package/coverage/src/apis/system-context.ts.html +0 -154
- package/coverage/src/apis/transaction.ts.html +0 -124
- package/coverage/src/apis/undo.ts.html +0 -124
- package/coverage/src/apis/viewport.ts.html +0 -193
- package/coverage/src/combinations.ts.html +0 -223
- package/coverage/src/core.ts.html +0 -559
- package/coverage/src/index.html +0 -146
- package/coverage/src/index.ts.html +0 -97
- package/coverage/src/requests/factory.ts.html +0 -127
- package/coverage/src/requests/index.html +0 -206
- package/coverage/src/requests/index.ts.html +0 -154
- package/coverage/src/requests/props.ts.html +0 -133
- package/coverage/src/requests/render.ts.html +0 -187
- package/coverage/src/requests/scene-tree.ts.html +0 -163
- package/coverage/src/requests/selection.ts.html +0 -127
- package/coverage/src/requests/system-context.ts.html +0 -130
- package/coverage/src/subscribes/index.html +0 -116
- package/coverage/src/subscribes/index.ts.html +0 -109
- package/coverage/src/subscribes/input-system/index.html +0 -176
- package/coverage/src/subscribes/input-system/index.ts.html +0 -226
- package/coverage/src/subscribes/input-system/primary-tool.ts.html +0 -160
- package/coverage/src/subscribes/input-system/render.ts.html +0 -484
- package/coverage/src/subscribes/input-system/undo.ts.html +0 -172
- package/coverage/src/subscribes/input-system/viewport.ts.html +0 -259
- package/coverage/src/subscribes/interaction-core/create-element.ts.html +0 -151
- package/coverage/src/subscribes/interaction-core/index.html +0 -236
- package/coverage/src/subscribes/interaction-core/index.ts.html +0 -289
- package/coverage/src/subscribes/interaction-core/primary-tool.ts.html +0 -109
- package/coverage/src/subscribes/interaction-core/reset-element-size.ts.html +0 -127
- package/coverage/src/subscribes/interaction-core/resize-element.ts.html +0 -181
- package/coverage/src/subscribes/interaction-core/select-elements.ts.html +0 -109
- package/coverage/src/subscribes/interaction-core/transaction.ts.html +0 -130
- package/coverage/src/subscribes/interaction-core/undoredo.ts.html +0 -133
- package/coverage/src/subscribes/interaction-core/viewport.ts.html +0 -193
- package/coverage/src/types/deps.ts.html +0 -118
- package/coverage/src/types/element-selection.ts.html +0 -100
- package/coverage/src/types/index.html +0 -266
- package/coverage/src/types/index.ts.html +0 -385
- package/coverage/src/types/input-system.ts.html +0 -100
- package/coverage/src/types/interaction-core.ts.html +0 -127
- package/coverage/src/types/props.ts.html +0 -109
- package/coverage/src/types/render.ts.html +0 -106
- package/coverage/src/types/requests/factory.ts.html +0 -127
- package/coverage/src/types/requests/index.html +0 -206
- package/coverage/src/types/requests/index.ts.html +0 -214
- package/coverage/src/types/requests/props.ts.html +0 -133
- package/coverage/src/types/requests/render.ts.html +0 -139
- package/coverage/src/types/requests/scene-tree.ts.html +0 -133
- package/coverage/src/types/requests/selection.ts.html +0 -127
- package/coverage/src/types/requests/system-context.ts.html +0 -142
- package/coverage/src/types/scene-tree.ts.html +0 -178
- package/coverage/src/types/system-context/index.html +0 -161
- package/coverage/src/types/system-context/index.ts.html +0 -112
- package/coverage/src/types/system-context/key-state.ts.html +0 -106
- package/coverage/src/types/system-context/mouse-state.ts.html +0 -106
- package/coverage/src/types/system-context/primary-tool.ts.html +0 -112
- package/coverage/src/types/transaction.ts.html +0 -103
- package/coverage/src/types/undo.ts.html +0 -103
- package/coverage/src/types/viewport.ts.html +0 -127
- package/dist/__tests__/core.test.d.ts +0 -2
- package/dist/__tests__/core.test.d.ts.map +0 -1
- package/dist/__tests__/core.test.js +0 -122
- package/dist/__tests__/core.test.js.map +0 -1
- package/dist/apis/interaction-core.d.ts +0 -3
- package/dist/apis/interaction-core.d.ts.map +0 -1
- package/dist/apis/interaction-core.js +0 -22
- package/dist/apis/interaction-core.js.map +0 -1
- package/dist/apis/system-context.d.ts +0 -3
- package/dist/apis/system-context.d.ts.map +0 -1
- package/dist/apis/system-context.js +0 -16
- package/dist/apis/system-context.js.map +0 -1
- package/dist/apis/transaction.d.ts +0 -3
- package/dist/apis/transaction.d.ts.map +0 -1
- package/dist/apis/transaction.js +0 -12
- package/dist/apis/transaction.js.map +0 -1
- package/dist/apis/undo.d.ts +0 -3
- package/dist/apis/undo.d.ts.map +0 -1
- package/dist/apis/undo.js +0 -12
- package/dist/apis/undo.js.map +0 -1
- package/dist/apis/viewport.d.ts +0 -4
- package/dist/apis/viewport.d.ts.map +0 -1
- package/dist/apis/viewport.js +0 -27
- package/dist/apis/viewport.js.map +0 -1
- package/dist/combinations.d.ts +0 -4
- package/dist/combinations.d.ts.map +0 -1
- package/dist/combinations.js +0 -42
- package/dist/combinations.js.map +0 -1
- package/dist/requests/factory copy.d.ts +0 -7
- package/dist/requests/factory copy.d.ts.map +0 -1
- package/dist/requests/factory copy.js +0 -10
- package/dist/requests/factory copy.js.map +0 -1
- package/dist/requests/factory.d.ts +0 -7
- package/dist/requests/factory.d.ts.map +0 -1
- package/dist/requests/factory.js +0 -10
- package/dist/requests/factory.js.map +0 -1
- package/dist/requests/index.d.ts +0 -3
- package/dist/requests/index.d.ts.map +0 -1
- package/dist/requests/index.js +0 -21
- package/dist/requests/index.js.map +0 -1
- package/dist/requests/primary-tool.d.ts +0 -7
- package/dist/requests/primary-tool.d.ts.map +0 -1
- package/dist/requests/primary-tool.js +0 -13
- package/dist/requests/primary-tool.js.map +0 -1
- package/dist/requests/props copy.d.ts +0 -7
- package/dist/requests/props copy.d.ts.map +0 -1
- package/dist/requests/props copy.js +0 -13
- package/dist/requests/props copy.js.map +0 -1
- package/dist/requests/props.d.ts +0 -7
- package/dist/requests/props.d.ts.map +0 -1
- package/dist/requests/props.js +0 -13
- package/dist/requests/props.js.map +0 -1
- package/dist/requests/render.d.ts +0 -3
- package/dist/requests/render.d.ts.map +0 -1
- package/dist/requests/render.js +0 -22
- package/dist/requests/render.js.map +0 -1
- package/dist/requests/scene-tree.d.ts +0 -7
- package/dist/requests/scene-tree.d.ts.map +0 -1
- package/dist/requests/scene-tree.js +0 -17
- package/dist/requests/scene-tree.js.map +0 -1
- package/dist/requests/selection.d.ts +0 -7
- package/dist/requests/selection.d.ts.map +0 -1
- package/dist/requests/selection.js +0 -10
- package/dist/requests/selection.js.map +0 -1
- package/dist/requests/system-context copy.d.ts +0 -7
- package/dist/requests/system-context copy.d.ts.map +0 -1
- package/dist/requests/system-context copy.js +0 -19
- package/dist/requests/system-context copy.js.map +0 -1
- package/dist/requests/system-context.d.ts +0 -7
- package/dist/requests/system-context.d.ts.map +0 -1
- package/dist/requests/system-context.js +0 -10
- package/dist/requests/system-context.js.map +0 -1
- package/dist/requests/types.d.ts +0 -7
- package/dist/requests/types.d.ts.map +0 -1
- package/dist/requests/types.js +0 -4
- package/dist/requests/types.js.map +0 -1
- package/dist/requests/viewport.d.ts +0 -19
- package/dist/requests/viewport.d.ts.map +0 -1
- package/dist/requests/viewport.js +0 -6
- package/dist/requests/viewport.js.map +0 -1
- package/dist/subscribes/index.d.ts +0 -3
- package/dist/subscribes/index.d.ts.map +0 -1
- package/dist/subscribes/index.js +0 -7
- package/dist/subscribes/index.js.map +0 -1
- package/dist/subscribes/input-system/index.d.ts +0 -3
- package/dist/subscribes/input-system/index.d.ts.map +0 -1
- package/dist/subscribes/input-system/index.js +0 -26
- package/dist/subscribes/input-system/index.js.map +0 -1
- package/dist/subscribes/input-system/primary-tool.d.ts +0 -10
- package/dist/subscribes/input-system/primary-tool.d.ts.map +0 -1
- package/dist/subscribes/input-system/primary-tool.js +0 -15
- package/dist/subscribes/input-system/primary-tool.js.map +0 -1
- package/dist/subscribes/input-system/render.d.ts +0 -16
- package/dist/subscribes/input-system/render.d.ts.map +0 -1
- package/dist/subscribes/input-system/render.js +0 -97
- package/dist/subscribes/input-system/render.js.map +0 -1
- package/dist/subscribes/input-system/undo.d.ts +0 -10
- package/dist/subscribes/input-system/undo.d.ts.map +0 -1
- package/dist/subscribes/input-system/undo.js +0 -18
- package/dist/subscribes/input-system/undo.js.map +0 -1
- package/dist/subscribes/input-system/viewport.d.ts +0 -11
- package/dist/subscribes/input-system/viewport.d.ts.map +0 -1
- package/dist/subscribes/input-system/viewport.js +0 -36
- package/dist/subscribes/input-system/viewport.js.map +0 -1
- package/dist/subscribes/interaction-core/create-and-resize.d.ts +0 -5
- package/dist/subscribes/interaction-core/create-and-resize.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/create-and-resize.js +0 -86
- package/dist/subscribes/interaction-core/create-and-resize.js.map +0 -1
- package/dist/subscribes/interaction-core/create-element copy.d.ts +0 -3
- package/dist/subscribes/interaction-core/create-element copy.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/create-element copy.js +0 -17
- package/dist/subscribes/interaction-core/create-element copy.js.map +0 -1
- package/dist/subscribes/interaction-core/create-element.d.ts +0 -3
- package/dist/subscribes/interaction-core/create-element.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/create-element.js +0 -17
- package/dist/subscribes/interaction-core/create-element.js.map +0 -1
- package/dist/subscribes/interaction-core/index.d.ts +0 -3
- package/dist/subscribes/interaction-core/index.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/index.js +0 -42
- package/dist/subscribes/interaction-core/index.js.map +0 -1
- package/dist/subscribes/interaction-core/input-to-decision.d.ts +0 -5
- package/dist/subscribes/interaction-core/input-to-decision.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/input-to-decision.js +0 -48
- package/dist/subscribes/interaction-core/input-to-decision.js.map +0 -1
- package/dist/subscribes/interaction-core/primary-tool.d.ts +0 -3
- package/dist/subscribes/interaction-core/primary-tool.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/primary-tool.js +0 -7
- package/dist/subscribes/interaction-core/primary-tool.js.map +0 -1
- package/dist/subscribes/interaction-core/reset-element-size.d.ts +0 -5
- package/dist/subscribes/interaction-core/reset-element-size.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/reset-element-size.js +0 -9
- package/dist/subscribes/interaction-core/reset-element-size.js.map +0 -1
- package/dist/subscribes/interaction-core/resize-element.d.ts +0 -3
- package/dist/subscribes/interaction-core/resize-element.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/resize-element.js +0 -24
- package/dist/subscribes/interaction-core/resize-element.js.map +0 -1
- package/dist/subscribes/interaction-core/select-elements.d.ts +0 -3
- package/dist/subscribes/interaction-core/select-elements.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/select-elements.js +0 -7
- package/dist/subscribes/interaction-core/select-elements.js.map +0 -1
- package/dist/subscribes/interaction-core/transaction.d.ts +0 -3
- package/dist/subscribes/interaction-core/transaction.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/transaction.js +0 -10
- package/dist/subscribes/interaction-core/transaction.js.map +0 -1
- package/dist/subscribes/interaction-core/undoredo.d.ts +0 -3
- package/dist/subscribes/interaction-core/undoredo.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/undoredo.js +0 -15
- package/dist/subscribes/interaction-core/undoredo.js.map +0 -1
- package/dist/subscribes/interaction-core/viewport.d.ts +0 -3
- package/dist/subscribes/interaction-core/viewport.d.ts.map +0 -1
- package/dist/subscribes/interaction-core/viewport.js +0 -29
- package/dist/subscribes/interaction-core/viewport.js.map +0 -1
- package/dist/subscribes/render.d.ts +0 -6
- package/dist/subscribes/render.d.ts.map +0 -1
- package/dist/subscribes/render.js +0 -28
- package/dist/subscribes/render.js.map +0 -1
- package/dist/types/interaction-core.d.ts +0 -11
- package/dist/types/interaction-core.d.ts.map +0 -1
- package/dist/types/interaction-core.js +0 -2
- package/dist/types/interaction-core.js.map +0 -1
- package/dist/types/requests/factory copy.d.ts +0 -12
- package/dist/types/requests/factory copy.d.ts.map +0 -1
- package/dist/types/requests/factory copy.js +0 -2
- package/dist/types/requests/factory copy.js.map +0 -1
- package/dist/types/requests/factory.d.ts +0 -12
- package/dist/types/requests/factory.d.ts.map +0 -1
- package/dist/types/requests/factory.js +0 -2
- package/dist/types/requests/factory.js.map +0 -1
- package/dist/types/requests/index.d.ts +0 -17
- package/dist/types/requests/index.d.ts.map +0 -1
- package/dist/types/requests/index.js +0 -4
- package/dist/types/requests/index.js.map +0 -1
- package/dist/types/requests/primary-tool.d.ts +0 -13
- package/dist/types/requests/primary-tool.d.ts.map +0 -1
- package/dist/types/requests/primary-tool.js +0 -2
- package/dist/types/requests/primary-tool.js.map +0 -1
- package/dist/types/requests/props copy.d.ts +0 -14
- package/dist/types/requests/props copy.d.ts.map +0 -1
- package/dist/types/requests/props copy.js +0 -2
- package/dist/types/requests/props copy.js.map +0 -1
- package/dist/types/requests/props.d.ts +0 -14
- package/dist/types/requests/props.d.ts.map +0 -1
- package/dist/types/requests/props.js +0 -2
- package/dist/types/requests/props.js.map +0 -1
- package/dist/types/requests/render.d.ts +0 -15
- package/dist/types/requests/render.d.ts.map +0 -1
- package/dist/types/requests/render.js +0 -2
- package/dist/types/requests/render.js.map +0 -1
- package/dist/types/requests/scene-tree.d.ts +0 -14
- package/dist/types/requests/scene-tree.d.ts.map +0 -1
- package/dist/types/requests/scene-tree.js +0 -2
- package/dist/types/requests/scene-tree.js.map +0 -1
- package/dist/types/requests/selection.d.ts +0 -12
- package/dist/types/requests/selection.d.ts.map +0 -1
- package/dist/types/requests/selection.js +0 -2
- package/dist/types/requests/selection.js.map +0 -1
- package/dist/types/requests/system-context.d.ts +0 -17
- package/dist/types/requests/system-context.d.ts.map +0 -1
- package/dist/types/requests/system-context.js +0 -2
- package/dist/types/requests/system-context.js.map +0 -1
- package/dist/types/requests/system.d.ts +0 -13
- package/dist/types/requests/system.d.ts.map +0 -1
- package/dist/types/requests/system.js +0 -2
- package/dist/types/requests/system.js.map +0 -1
- package/dist/types/requests/viewport.d.ts +0 -20
- package/dist/types/requests/viewport.d.ts.map +0 -1
- package/dist/types/requests/viewport.js +0 -6
- package/dist/types/requests/viewport.js.map +0 -1
- package/dist/types/requests.d.ts +0 -8
- package/dist/types/requests.d.ts.map +0 -1
- package/dist/types/requests.js +0 -2
- package/dist/types/requests.js.map +0 -1
- package/dist/types/system-context/index.d.ts +0 -8
- package/dist/types/system-context/index.d.ts.map +0 -1
- package/dist/types/system-context/index.js +0 -4
- package/dist/types/system-context/index.js.map +0 -1
- package/dist/types/system-context/key-state.d.ts +0 -6
- package/dist/types/system-context/key-state.d.ts.map +0 -1
- package/dist/types/system-context/key-state.js +0 -2
- package/dist/types/system-context/key-state.js.map +0 -1
- package/dist/types/system-context/mouse-state.d.ts +0 -6
- package/dist/types/system-context/mouse-state.d.ts.map +0 -1
- package/dist/types/system-context/mouse-state.js +0 -2
- package/dist/types/system-context/mouse-state.js.map +0 -1
- package/dist/types/system-context/primary-tool.d.ts +0 -8
- package/dist/types/system-context/primary-tool.d.ts.map +0 -1
- package/dist/types/system-context/primary-tool.js +0 -2
- package/dist/types/system-context/primary-tool.js.map +0 -1
- package/dist/types/transaction.d.ts +0 -6
- package/dist/types/transaction.d.ts.map +0 -1
- package/dist/types/transaction.js +0 -2
- package/dist/types/transaction.js.map +0 -1
- package/dist/types/undo.d.ts +0 -6
- package/dist/types/undo.d.ts.map +0 -1
- package/dist/types/undo.js +0 -2
- package/dist/types/undo.js.map +0 -1
- package/dist/types/viewport.d.ts +0 -12
- package/dist/types/viewport.d.ts.map +0 -1
- package/dist/types/viewport.js +0 -2
- package/dist/types/viewport.js.map +0 -1
- package/src/__tests__/core.test.ts +0 -153
- package/src/apis/element-selection.ts +0 -16
- package/src/apis/index.ts +0 -30
- package/src/apis/input-system.ts +0 -12
- package/src/apis/interaction-core.ts +0 -35
- package/src/apis/props.ts +0 -13
- package/src/apis/render.ts +0 -15
- package/src/apis/scene-tree.ts +0 -69
- package/src/apis/system-context.ts +0 -23
- package/src/apis/transaction.ts +0 -13
- package/src/apis/undo.ts +0 -13
- package/src/apis/viewport.ts +0 -36
- package/src/combinations.ts +0 -46
- package/src/core.ts +0 -158
- package/src/index.ts +0 -4
- package/src/requests/factory.ts +0 -14
- package/src/requests/index.ts +0 -23
- package/src/requests/props.ts +0 -16
- package/src/requests/render.ts +0 -34
- package/src/requests/scene-tree.ts +0 -26
- package/src/requests/selection.ts +0 -14
- package/src/requests/system-context.ts +0 -15
- package/src/subscribes/index.ts +0 -8
- package/src/subscribes/input-system/index.ts +0 -47
- package/src/subscribes/input-system/primary-tool.ts +0 -25
- package/src/subscribes/input-system/render.ts +0 -133
- package/src/subscribes/input-system/undo.ts +0 -29
- package/src/subscribes/input-system/viewport.ts +0 -58
- package/src/subscribes/interaction-core/create-element.ts +0 -22
- package/src/subscribes/interaction-core/index.ts +0 -68
- package/src/subscribes/interaction-core/primary-tool.ts +0 -8
- package/src/subscribes/interaction-core/reset-element-size.ts +0 -12
- package/src/subscribes/interaction-core/resize-element.ts +0 -31
- package/src/subscribes/interaction-core/select-elements.ts +0 -8
- package/src/subscribes/interaction-core/transaction.ts +0 -15
- package/src/subscribes/interaction-core/undoredo.ts +0 -16
- package/src/subscribes/interaction-core/viewport.ts +0 -35
- package/src/types/deps.ts +0 -11
- package/src/types/element-selection.ts +0 -5
- package/src/types/index.ts +0 -100
- package/src/types/input-system.ts +0 -5
- package/src/types/interaction-core.ts +0 -14
- package/src/types/props.ts +0 -8
- package/src/types/render.ts +0 -7
- package/src/types/requests/factory.ts +0 -14
- package/src/types/requests/index.ts +0 -43
- package/src/types/requests/props.ts +0 -16
- package/src/types/requests/render.ts +0 -18
- package/src/types/requests/scene-tree.ts +0 -16
- package/src/types/requests/selection.ts +0 -14
- package/src/types/requests/system-context.ts +0 -19
- package/src/types/scene-tree.ts +0 -31
- package/src/types/system-context/index.ts +0 -9
- package/src/types/system-context/key-state.ts +0 -7
- package/src/types/system-context/mouse-state.ts +0 -7
- package/src/types/system-context/primary-tool.ts +0 -9
- package/src/types/transaction.ts +0 -6
- package/src/types/undo.ts +0 -6
- package/src/types/viewport.ts +0 -14
- package/test-setup.ts +0 -6
- package/tsconfig.json +0 -22
- package/vitest.config.ts +0 -8
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Render } from '@asyra/render';
|
|
2
|
-
import { PositionData } from '@asyra/utils';
|
|
3
|
-
/**
|
|
4
|
-
* Request API for Render data
|
|
5
|
-
* Provides synchronous access to render state
|
|
6
|
-
*/
|
|
7
|
-
export interface RenderRequests {
|
|
8
|
-
initRender: (width: number, height: number, color: number) => Promise<any>;
|
|
9
|
-
getViewportPosition: () => PositionData;
|
|
10
|
-
getViewportScale: () => number;
|
|
11
|
-
}
|
|
12
|
-
export interface RenderRequestDeps {
|
|
13
|
-
render: Render;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=render.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/types/requests/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAE7B,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1E,mBAAmB,EAAE,MAAM,YAAY,CAAA;IACvC,gBAAgB,EAAE,MAAM,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/types/requests/render.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SceneTree } from '@asyra/scene-tree';
|
|
2
|
-
import { CreateElementData, SceneTreeRawData } from '@asyra/utils';
|
|
3
|
-
/**
|
|
4
|
-
* Request API for SceneTree data
|
|
5
|
-
* Provides synchronous access to scene tree state
|
|
6
|
-
*/
|
|
7
|
-
export interface SceneTreeRequests {
|
|
8
|
-
sceneTreeSaveData: () => SceneTreeRawData;
|
|
9
|
-
addRectangle: (data: CreateElementData, inUndoRedo: boolean) => string;
|
|
10
|
-
}
|
|
11
|
-
export interface SceneTreeRequestDeps {
|
|
12
|
-
sceneTree: SceneTree;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=scene-tree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scene-tree.d.ts","sourceRoot":"","sources":["../../../src/types/requests/scene-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAElE;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;IACzC,YAAY,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,KAAK,MAAM,CAAA;CACvE;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,SAAS,CAAA;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scene-tree.js","sourceRoot":"","sources":["../../../src/types/requests/scene-tree.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SelectionManager } from '@asyra/selection';
|
|
2
|
-
/**
|
|
3
|
-
* Request API for Selection data
|
|
4
|
-
* Provides synchronous access to selection state
|
|
5
|
-
*/
|
|
6
|
-
export interface SelectionRequests {
|
|
7
|
-
getElementSelectionIds: () => string[];
|
|
8
|
-
}
|
|
9
|
-
export interface SelectionRequestDeps {
|
|
10
|
-
selection: SelectionManager;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=selection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/types/requests/selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,sBAAsB,EAAE,MAAM,MAAM,EAAE,CAAA;CACvC;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,gBAAgB,CAAA;CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"selection.js","sourceRoot":"","sources":["../../../src/types/requests/selection.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SystemContext } from '@asyra/system-context';
|
|
2
|
-
import { SystemContextSnapshot } from '@asyra/utils';
|
|
3
|
-
/**
|
|
4
|
-
* Dependencies for System Context Request APIs
|
|
5
|
-
* System context dependencies injected from outside
|
|
6
|
-
*/
|
|
7
|
-
export interface SystemContextRequestsDeps {
|
|
8
|
-
systemContext: SystemContext;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Request API types for System Context
|
|
12
|
-
* Type definitions for synchronous system context data access
|
|
13
|
-
*/
|
|
14
|
-
export interface SystemContextRequests {
|
|
15
|
-
getSystemContextSnapshot: () => SystemContextSnapshot;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=system-context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system-context.d.ts","sourceRoot":"","sources":["../../../src/types/requests/system-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED;;;GAGG;AAEH,MAAM,WAAW,qBAAqB;IACpC,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;CACtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system-context.js","sourceRoot":"","sources":["../../../src/types/requests/system-context.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PrimaryToolManager } from '@asyra/primary-tool-manager';
|
|
2
|
-
import { PrimaryToolType } from '@asyra/utils';
|
|
3
|
-
/**
|
|
4
|
-
* Request API for PrimaryTool data
|
|
5
|
-
* Provides synchronous access to primary tool manager state
|
|
6
|
-
*/
|
|
7
|
-
export interface PrimaryToolRequests {
|
|
8
|
-
switchPrimaryTool: (toolType: PrimaryToolType) => void;
|
|
9
|
-
}
|
|
10
|
-
export interface PrimaryToolRequestDeps {
|
|
11
|
-
primaryTool: PrimaryToolManager;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=system.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../src/types/requests/system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C;;;GAGG;AAEH,MAAM,WAAW,mBAAmB;IAClC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAA;CACvD;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,kBAAkB,CAAA;CAChC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/types/requests/system.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SystemContext } from '@asyra/system-context';
|
|
2
|
-
/**
|
|
3
|
-
* Dependencies for System Context Request APIs
|
|
4
|
-
* System context dependencies injected from outside
|
|
5
|
-
*/
|
|
6
|
-
export interface ViewportRequestsDeps {
|
|
7
|
-
systemContext: SystemContext;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Request API types for Viewport
|
|
11
|
-
* Type definitions for synchronous viewport data access
|
|
12
|
-
*/
|
|
13
|
-
export interface ViewportRequests {
|
|
14
|
-
getViewportPosition: () => {
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
};
|
|
18
|
-
getViewportScale: () => number;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=viewport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../../src/types/requests/viewport.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAGpD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,mBAAmB,EAAE,MAAM;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACnD,gBAAgB,EAAE,MAAM,MAAM,CAAA;CAC/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../src/types/requests/viewport.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,6BAA6B;AAC7B,yBAAyB;AACzB,iCAAiC"}
|
package/dist/types/requests.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SystemContextSnapshot, PrimaryToolType, MouseSnapshot, KeySnapshot } from '@asyra/utils';
|
|
2
|
-
export interface SystemContextRequest {
|
|
3
|
-
getSystemContextSnapshot: () => SystemContextSnapshot;
|
|
4
|
-
getCurrentPrimaryTool: () => PrimaryToolType;
|
|
5
|
-
getMouseState: () => MouseSnapshot;
|
|
6
|
-
getKeyState: () => KeySnapshot;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=requests.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../src/types/requests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,WAAW,EACZ,MAAM,aAAa,CAAA;AAKpB,MAAM,WAAW,oBAAoB;IACnC,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;IACrD,qBAAqB,EAAE,MAAM,eAAe,CAAA;IAC5C,aAAa,EAAE,MAAM,aAAa,CAAA;IAClC,WAAW,EAAE,MAAM,WAAW,CAAA;CAC/B"}
|
package/dist/types/requests.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"requests.js","sourceRoot":"","sources":["../../src/types/requests.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PrimaryToolAPIs } from './primary-tool';
|
|
2
|
-
import { MouseStateAPIs } from './mouse-state';
|
|
3
|
-
import { KeyStateAPIs } from './key-state';
|
|
4
|
-
export * from './primary-tool';
|
|
5
|
-
export * from './mouse-state';
|
|
6
|
-
export * from './key-state';
|
|
7
|
-
export type SystemContextAPIs = PrimaryToolAPIs & MouseStateAPIs & KeyStateAPIs;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/system-context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAE3B,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,cAAc,GAAG,YAAY,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/system-context/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-state.d.ts","sourceRoot":"","sources":["../../../src/types/system-context/key-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAA;CACnD;AAED,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-state.js","sourceRoot":"","sources":["../../../src/types/system-context/key-state.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mouse-state.d.ts","sourceRoot":"","sources":["../../../src/types/system-context/mouse-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,IAAI,CAAA;CACzD;AAED,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mouse-state.js","sourceRoot":"","sources":["../../../src/types/system-context/mouse-state.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PrimaryToolType } from '@asyra/utils';
|
|
2
|
-
export interface PrimaryToolRawAPIs {
|
|
3
|
-
}
|
|
4
|
-
export interface PrimaryToolActionAPIs {
|
|
5
|
-
switchPrimaryTool: (tool: PrimaryToolType) => void;
|
|
6
|
-
}
|
|
7
|
-
export type PrimaryToolAPIs = PrimaryToolRawAPIs & PrimaryToolActionAPIs;
|
|
8
|
-
//# sourceMappingURL=primary-tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primary-tool.d.ts","sourceRoot":"","sources":["../../../src/types/system-context/primary-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C,MAAM,WAAW,kBAAkB;CAAG;AAEtC,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAA;CACnD;AAED,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"primary-tool.js","sourceRoot":"","sources":["../../../src/types/system-context/primary-tool.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/types/transaction.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,cAAc,EAAE,MAAM,IAAI,CAAA;CAC3B;AAED,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../src/types/transaction.ts"],"names":[],"mappings":""}
|
package/dist/types/undo.d.ts
DELETED
package/dist/types/undo.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"undo.d.ts","sourceRoot":"","sources":["../../src/types/undo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB;AAED,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAA"}
|
package/dist/types/undo.js
DELETED
package/dist/types/undo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"undo.js","sourceRoot":"","sources":["../../src/types/undo.ts"],"names":[],"mappings":""}
|
package/dist/types/viewport.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PositionData } from '@asyra/utils';
|
|
2
|
-
export interface ViewportRawAPIs {
|
|
3
|
-
getViewportPosition: () => PositionData;
|
|
4
|
-
getViewportScale: () => number;
|
|
5
|
-
}
|
|
6
|
-
export interface ViewportActionAPIs {
|
|
7
|
-
zoomFit: () => void;
|
|
8
|
-
panTo: (x: number, y: number) => void;
|
|
9
|
-
zoomToCenter: (scale: number, centerX: number, centerY: number) => void;
|
|
10
|
-
}
|
|
11
|
-
export type ViewportAPIs = ViewportRawAPIs & ViewportActionAPIs;
|
|
12
|
-
//# sourceMappingURL=viewport.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../src/types/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,MAAM,WAAW,eAAe;IAC9B,mBAAmB,EAAE,MAAM,YAAY,CAAA;IACvC,gBAAgB,EAAE,MAAM,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACxE;AAED,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,kBAAkB,CAAA"}
|
package/dist/types/viewport.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../src/types/viewport.ts"],"names":[],"mappings":""}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach } from 'vitest'
|
|
2
|
-
import factory from '@asyra/factory'
|
|
3
|
-
import inputSystem from '@asyra/input-system'
|
|
4
|
-
import sceneTree from '@asyra/scene-tree'
|
|
5
|
-
import render from '@asyra/render'
|
|
6
|
-
import props from '@asyra/props-manager'
|
|
7
|
-
import selection from '@asyra/selection'
|
|
8
|
-
import systemContext from '@asyra/system-context'
|
|
9
|
-
import interactionCore from '@asyra/interaction-core'
|
|
10
|
-
import {
|
|
11
|
-
PrimaryToolType,
|
|
12
|
-
InputSystemEvents,
|
|
13
|
-
PropsComponentRawData,
|
|
14
|
-
Unit
|
|
15
|
-
} from '@asyra/utils'
|
|
16
|
-
|
|
17
|
-
import { Core } from '../core'
|
|
18
|
-
|
|
19
|
-
describe('Core', () => {
|
|
20
|
-
let core: Core
|
|
21
|
-
|
|
22
|
-
beforeEach(() => {
|
|
23
|
-
vi.clearAllMocks()
|
|
24
|
-
|
|
25
|
-
core = new Core({
|
|
26
|
-
inputSystem,
|
|
27
|
-
factory,
|
|
28
|
-
props,
|
|
29
|
-
render,
|
|
30
|
-
sceneTree,
|
|
31
|
-
selection,
|
|
32
|
-
systemContext,
|
|
33
|
-
interactionCore
|
|
34
|
-
})
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// Test load method
|
|
38
|
-
it('should load data correctly and call appropriate methods', () => {
|
|
39
|
-
const mockSceneTreeData = {
|
|
40
|
-
elements: {},
|
|
41
|
-
workspace: 'ws-1',
|
|
42
|
-
workspaceList: ['ws-1']
|
|
43
|
-
}
|
|
44
|
-
const mockPropsData = {
|
|
45
|
-
'pp-1': {
|
|
46
|
-
id: 'pp-1',
|
|
47
|
-
x: 100,
|
|
48
|
-
y: 100,
|
|
49
|
-
xUnit: Unit.PX,
|
|
50
|
-
yUnit: Unit.PX
|
|
51
|
-
},
|
|
52
|
-
'pp-2': {
|
|
53
|
-
id: 'pp-2',
|
|
54
|
-
width: 100,
|
|
55
|
-
height: 100,
|
|
56
|
-
widthUnit: Unit.PX,
|
|
57
|
-
heightUnit: Unit.PX
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
const dataToLoad = {
|
|
61
|
-
version: '1.0.0',
|
|
62
|
-
sceneTree: mockSceneTreeData,
|
|
63
|
-
props: mockPropsData as unknown as PropsComponentRawData
|
|
64
|
-
}
|
|
65
|
-
// Mock the methods that will be called during load
|
|
66
|
-
core.propsLoadData = vi.fn()
|
|
67
|
-
core.sceneTreeLoadData = vi.fn()
|
|
68
|
-
core.sceneTreeInit = vi.fn()
|
|
69
|
-
core.zoomFit = vi.fn()
|
|
70
|
-
|
|
71
|
-
core.load(dataToLoad)
|
|
72
|
-
|
|
73
|
-
expect(core.version).toBe('1.0.0')
|
|
74
|
-
expect(core.propsLoadData).toHaveBeenCalledWith(mockPropsData)
|
|
75
|
-
expect(core.sceneTreeLoadData).toHaveBeenCalledWith(mockSceneTreeData)
|
|
76
|
-
expect(core.sceneTreeInit).not.toHaveBeenCalled()
|
|
77
|
-
expect(core.zoomFit).toHaveBeenCalledTimes(1)
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
it('should call sceneTreeInit if no sceneTree data is provided', () => {
|
|
81
|
-
const dataToLoad = {
|
|
82
|
-
version: '1.0.0',
|
|
83
|
-
props: {}
|
|
84
|
-
}
|
|
85
|
-
core.sceneTreeInit = vi.fn()
|
|
86
|
-
core.sceneTreeLoadData = vi.fn()
|
|
87
|
-
|
|
88
|
-
core.load(dataToLoad as unknown as Parameters<typeof core.load>[0])
|
|
89
|
-
|
|
90
|
-
expect(core.sceneTreeInit).toHaveBeenCalledTimes(1)
|
|
91
|
-
expect(core.sceneTreeLoadData).not.toHaveBeenCalled()
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
// Test save method
|
|
95
|
-
it('should save data correctly and call appropriate methods', async () => {
|
|
96
|
-
const mockSceneTreeData = {
|
|
97
|
-
elements: {},
|
|
98
|
-
workspace: 'ws-1',
|
|
99
|
-
workspaceList: ['ws-1']
|
|
100
|
-
}
|
|
101
|
-
const mockPropsData = { someProp: 'value' }
|
|
102
|
-
core.propsSaveData = vi.fn().mockResolvedValue(mockPropsData)
|
|
103
|
-
core.sceneTreeSaveData = vi.fn().mockResolvedValue(mockSceneTreeData)
|
|
104
|
-
|
|
105
|
-
const savedData = await core.save()
|
|
106
|
-
|
|
107
|
-
expect(core.propsSaveData).toHaveBeenCalledTimes(1)
|
|
108
|
-
expect(core.sceneTreeSaveData).toHaveBeenCalledTimes(1)
|
|
109
|
-
expect(savedData).toEqual({
|
|
110
|
-
version: '1.0.0',
|
|
111
|
-
sceneTree: mockSceneTreeData,
|
|
112
|
-
props: mockPropsData
|
|
113
|
-
})
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
// Test delegation of various APIs
|
|
117
|
-
it('should delegate startTransaction to factory', () => {
|
|
118
|
-
core.startTransaction = vi.fn()
|
|
119
|
-
|
|
120
|
-
core.startTransaction()
|
|
121
|
-
|
|
122
|
-
expect(core.startTransaction).toHaveBeenCalledTimes(1)
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
it('should delegate switchPrimaryTool to systemContext', () => {
|
|
126
|
-
core.switchPrimaryTool = vi.fn()
|
|
127
|
-
|
|
128
|
-
core.switchPrimaryTool(PrimaryToolType.RECTANGLE)
|
|
129
|
-
|
|
130
|
-
expect(core.switchPrimaryTool).toHaveBeenCalledWith(
|
|
131
|
-
PrimaryToolType.RECTANGLE
|
|
132
|
-
)
|
|
133
|
-
})
|
|
134
|
-
|
|
135
|
-
it('should delegate addRectangle to sceneTree', () => {
|
|
136
|
-
const position = { x: 10, y: 20 }
|
|
137
|
-
core.addRectangle = vi.fn()
|
|
138
|
-
|
|
139
|
-
core.addRectangle(position)
|
|
140
|
-
|
|
141
|
-
expect(core.addRectangle).toHaveBeenCalledWith(position)
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
it('should call executeAction without error', async () => {
|
|
145
|
-
const eventName: InputSystemEvents = InputSystemEvents.INPUT_MOUSE_MOVE
|
|
146
|
-
const detail = { some: 'detail' }
|
|
147
|
-
core.executeAction = vi.fn()
|
|
148
|
-
|
|
149
|
-
await core.executeAction(eventName, detail)
|
|
150
|
-
|
|
151
|
-
expect(core.executeAction).toHaveBeenCalledWith(eventName, detail)
|
|
152
|
-
})
|
|
153
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
endTransaction,
|
|
3
|
-
selectElements,
|
|
4
|
-
startTransaction
|
|
5
|
-
} from '@asyra/reactive-events'
|
|
6
|
-
import { ElementSelectionActionAPIs } from '../types'
|
|
7
|
-
|
|
8
|
-
export const createElementSelectionAPIs = (): ElementSelectionActionAPIs => {
|
|
9
|
-
return {
|
|
10
|
-
selectElements(elementIds: string[]) {
|
|
11
|
-
startTransaction()
|
|
12
|
-
selectElements(elementIds)
|
|
13
|
-
endTransaction()
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
package/src/apis/index.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createTransactionAPIs } from './transaction'
|
|
2
|
-
import { createViewportAPIs } from './viewport'
|
|
3
|
-
import { createUndoAPIs } from './undo'
|
|
4
|
-
import { createRenderAPIs } from './render'
|
|
5
|
-
import { createSceneTreeAPIs } from './scene-tree'
|
|
6
|
-
import { createElementSelectionAPIs } from './element-selection'
|
|
7
|
-
import { createInputSystemAPIs } from './input-system'
|
|
8
|
-
import { createPropsAPIs } from './props'
|
|
9
|
-
import { createSystemContextAPIs } from './system-context'
|
|
10
|
-
import { createInteractionCoreAPIs } from './interaction-core'
|
|
11
|
-
import { CoreAPIs, Requests } from '../types'
|
|
12
|
-
|
|
13
|
-
export const createAPIs = (requests: Requests): CoreAPIs => {
|
|
14
|
-
return {
|
|
15
|
-
...createTransactionAPIs(),
|
|
16
|
-
...createInputSystemAPIs(),
|
|
17
|
-
...createViewportAPIs(requests.renderRequests),
|
|
18
|
-
...createUndoAPIs(),
|
|
19
|
-
...createRenderAPIs(requests.renderRequests),
|
|
20
|
-
...createSceneTreeAPIs(
|
|
21
|
-
requests.sceneTreeRequests,
|
|
22
|
-
requests.factoryRequests,
|
|
23
|
-
requests.selectionRequests
|
|
24
|
-
),
|
|
25
|
-
...createPropsAPIs(requests.propsRequests),
|
|
26
|
-
...createElementSelectionAPIs(),
|
|
27
|
-
...createSystemContextAPIs(),
|
|
28
|
-
...createInteractionCoreAPIs(requests.systemContextRequests)
|
|
29
|
-
}
|
|
30
|
-
}
|
package/src/apis/input-system.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { switchInputSystemWatchedElement } from '@asyra/reactive-events'
|
|
2
|
-
import { InputSystemRawAPIs } from '../types'
|
|
3
|
-
|
|
4
|
-
export const createInputSystemAPIs = (): InputSystemRawAPIs => {
|
|
5
|
-
return {
|
|
6
|
-
setupInputSystem(watchedElement?: HTMLElement) {
|
|
7
|
-
if (watchedElement) {
|
|
8
|
-
switchInputSystemWatchedElement(watchedElement)
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
endSession,
|
|
3
|
-
executeAction,
|
|
4
|
-
startSession,
|
|
5
|
-
updateSession
|
|
6
|
-
} from '@asyra/reactive-events'
|
|
7
|
-
import { InputSystemEvents, DetailType } from '@asyra/utils'
|
|
8
|
-
import { InteractionCoreAPIs, SystemContextRequests } from '../types'
|
|
9
|
-
|
|
10
|
-
export const createInteractionCoreAPIs = (
|
|
11
|
-
systemContextRequests: SystemContextRequests
|
|
12
|
-
): InteractionCoreAPIs => {
|
|
13
|
-
return {
|
|
14
|
-
executeAction(eventName: InputSystemEvents, detail?: DetailType) {
|
|
15
|
-
const systemContextSnapshot =
|
|
16
|
-
systemContextRequests.getSystemContextSnapshot()
|
|
17
|
-
executeAction(eventName, systemContextSnapshot, detail)
|
|
18
|
-
},
|
|
19
|
-
startSession(eventName: InputSystemEvents, detail?: DetailType) {
|
|
20
|
-
const systemContextSnapshot =
|
|
21
|
-
systemContextRequests.getSystemContextSnapshot()
|
|
22
|
-
startSession(eventName, systemContextSnapshot, detail)
|
|
23
|
-
},
|
|
24
|
-
updateSession(eventName: InputSystemEvents, detail?: DetailType) {
|
|
25
|
-
const systemContextSnapshot =
|
|
26
|
-
systemContextRequests.getSystemContextSnapshot()
|
|
27
|
-
updateSession(eventName, systemContextSnapshot, detail)
|
|
28
|
-
},
|
|
29
|
-
endSession(eventName: InputSystemEvents, detail?: DetailType) {
|
|
30
|
-
const systemContextSnapshot =
|
|
31
|
-
systemContextRequests.getSystemContextSnapshot()
|
|
32
|
-
endSession(eventName, systemContextSnapshot, detail)
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
package/src/apis/props.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PropsComponentRawData } from '@asyra/utils'
|
|
2
|
-
import { PropsRawAPIs, PropsRequests } from '../types'
|
|
3
|
-
|
|
4
|
-
export const createPropsAPIs = (propsRequests: PropsRequests): PropsRawAPIs => {
|
|
5
|
-
return {
|
|
6
|
-
propsLoadData(data: PropsComponentRawData) {
|
|
7
|
-
propsRequests.propsLoadData(data)
|
|
8
|
-
},
|
|
9
|
-
propsSaveData() {
|
|
10
|
-
return propsRequests.propsSaveData()
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
package/src/apis/render.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { renderIsReady } from '@asyra/reactive-events'
|
|
2
|
-
import { RenderRawAPIs, RenderRequests } from '../types'
|
|
3
|
-
|
|
4
|
-
export const createRenderAPIs = (
|
|
5
|
-
renderRequests: RenderRequests
|
|
6
|
-
): RenderRawAPIs => {
|
|
7
|
-
return {
|
|
8
|
-
renderIsReady() {
|
|
9
|
-
renderIsReady()
|
|
10
|
-
},
|
|
11
|
-
async initRender(width: number, height: number, color: number) {
|
|
12
|
-
return await renderRequests.initRender(width, height, color)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|