vsn 0.1.148 → 1.0.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/README.md +7 -6
- package/dist/index.cjs +5011 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +630 -0
- package/dist/index.d.ts +630 -0
- package/dist/index.js +4942 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +9 -0
- package/dist/index.min.js.map +1 -0
- package/package.json +30 -48
- package/.gitattributes +0 -2
- package/.travis.yml +0 -28
- package/demo/demo.html +0 -237
- package/demo/examples/cascading-function-sheets.html +0 -39
- package/demo/examples/component-slots.html +0 -29
- package/demo/examples/events.html +0 -21
- package/demo/examples/item-filtering.html +0 -45
- package/demo/examples/loop.html +0 -21
- package/demo/examples/persist.html +0 -17
- package/demo/examples/replace-html.html +0 -19
- package/demo/markup-default.html +0 -2
- package/demo/markup.html +0 -2
- package/demo/memory-leak-test.html +0 -82
- package/demo/named-stack.html +0 -34
- package/demo/resources/xhr-animations.html +0 -24
- package/demo/resources/xhr-cfs.html +0 -1
- package/demo/resources/xhr-html.html +0 -1
- package/demo/resources/xhr-lazy.html +0 -60
- package/demo/resources/xhr-memory-leak-test.html +0 -14
- package/demo/resources/xhr-persist.html +0 -40
- package/demo/resources/xhr-test-component.html +0 -4
- package/demo/service.html +0 -22
- package/demo/silly-animations.html +0 -27
- package/demo/vsn.js +0 -3
- package/demo/xhr-response.html +0 -1
- package/demo/xhr-test.html +0 -32
- package/dist/AST/ArithmeticNode.d.ts +0 -15
- package/dist/AST/ArithmeticNode.js +0 -114
- package/dist/AST/ArithmeticNode.js.map +0 -1
- package/dist/AST/ArrayNode.d.ts +0 -14
- package/dist/AST/ArrayNode.js +0 -166
- package/dist/AST/ArrayNode.js.map +0 -1
- package/dist/AST/AsNode.d.ts +0 -13
- package/dist/AST/AsNode.js +0 -92
- package/dist/AST/AsNode.js.map +0 -1
- package/dist/AST/AssignmentNode.d.ts +0 -24
- package/dist/AST/AssignmentNode.js +0 -392
- package/dist/AST/AssignmentNode.js.map +0 -1
- package/dist/AST/BlockNode.d.ts +0 -11
- package/dist/AST/BlockNode.js +0 -114
- package/dist/AST/BlockNode.js.map +0 -1
- package/dist/AST/BooleanLiteralNode.d.ts +0 -5
- package/dist/AST/BooleanLiteralNode.js +0 -31
- package/dist/AST/BooleanLiteralNode.js.map +0 -1
- package/dist/AST/ClassNode.d.ts +0 -47
- package/dist/AST/ClassNode.js +0 -593
- package/dist/AST/ClassNode.js.map +0 -1
- package/dist/AST/ComparisonNode.d.ts +0 -15
- package/dist/AST/ComparisonNode.js +0 -120
- package/dist/AST/ComparisonNode.js.map +0 -1
- package/dist/AST/ConditionalNode.d.ts +0 -13
- package/dist/AST/ConditionalNode.js +0 -95
- package/dist/AST/ConditionalNode.js.map +0 -1
- package/dist/AST/DispatchEventNode.d.ts +0 -17
- package/dist/AST/DispatchEventNode.js +0 -152
- package/dist/AST/DispatchEventNode.js.map +0 -1
- package/dist/AST/ElementAttributeNode.d.ts +0 -20
- package/dist/AST/ElementAttributeNode.js +0 -242
- package/dist/AST/ElementAttributeNode.js.map +0 -1
- package/dist/AST/ElementQueryNode.d.ts +0 -17
- package/dist/AST/ElementQueryNode.js +0 -148
- package/dist/AST/ElementQueryNode.js.map +0 -1
- package/dist/AST/ElementStyleNode.d.ts +0 -20
- package/dist/AST/ElementStyleNode.js +0 -205
- package/dist/AST/ElementStyleNode.js.map +0 -1
- package/dist/AST/ForStatementNode.d.ts +0 -17
- package/dist/AST/ForStatementNode.js +0 -121
- package/dist/AST/ForStatementNode.js.map +0 -1
- package/dist/AST/FunctionArgumentNode.d.ts +0 -11
- package/dist/AST/FunctionArgumentNode.js +0 -142
- package/dist/AST/FunctionArgumentNode.js.map +0 -1
- package/dist/AST/FunctionCallNode.d.ts +0 -14
- package/dist/AST/FunctionCallNode.js +0 -241
- package/dist/AST/FunctionCallNode.js.map +0 -1
- package/dist/AST/FunctionNode.d.ts +0 -20
- package/dist/AST/FunctionNode.js +0 -220
- package/dist/AST/FunctionNode.js.map +0 -1
- package/dist/AST/IfStatementNode.d.ts +0 -14
- package/dist/AST/IfStatementNode.js +0 -168
- package/dist/AST/IfStatementNode.js.map +0 -1
- package/dist/AST/InNode.d.ts +0 -15
- package/dist/AST/InNode.js +0 -107
- package/dist/AST/InNode.js.map +0 -1
- package/dist/AST/IndexNode.d.ts +0 -16
- package/dist/AST/IndexNode.js +0 -152
- package/dist/AST/IndexNode.js.map +0 -1
- package/dist/AST/LiteralNode.d.ts +0 -10
- package/dist/AST/LiteralNode.js +0 -74
- package/dist/AST/LiteralNode.js.map +0 -1
- package/dist/AST/LoopNode.d.ts +0 -12
- package/dist/AST/LoopNode.js +0 -121
- package/dist/AST/LoopNode.js.map +0 -1
- package/dist/AST/ModifierNode.d.ts +0 -14
- package/dist/AST/ModifierNode.js +0 -90
- package/dist/AST/ModifierNode.js.map +0 -1
- package/dist/AST/NamedStackNode.d.ts +0 -28
- package/dist/AST/NamedStackNode.js +0 -142
- package/dist/AST/NamedStackNode.js.map +0 -1
- package/dist/AST/Node.d.ts +0 -28
- package/dist/AST/Node.js +0 -263
- package/dist/AST/Node.js.map +0 -1
- package/dist/AST/NotNode.d.ts +0 -12
- package/dist/AST/NotNode.js +0 -103
- package/dist/AST/NotNode.js.map +0 -1
- package/dist/AST/NumberLiteralNode.d.ts +0 -5
- package/dist/AST/NumberLiteralNode.js +0 -36
- package/dist/AST/NumberLiteralNode.js.map +0 -1
- package/dist/AST/ObjectNode.d.ts +0 -14
- package/dist/AST/ObjectNode.js +0 -147
- package/dist/AST/ObjectNode.js.map +0 -1
- package/dist/AST/OnNode.d.ts +0 -9
- package/dist/AST/OnNode.js +0 -129
- package/dist/AST/OnNode.js.map +0 -1
- package/dist/AST/RootScopeMemberNode.d.ts +0 -12
- package/dist/AST/RootScopeMemberNode.js +0 -90
- package/dist/AST/RootScopeMemberNode.js.map +0 -1
- package/dist/AST/ScopeMemberNode.d.ts +0 -13
- package/dist/AST/ScopeMemberNode.js +0 -165
- package/dist/AST/ScopeMemberNode.js.map +0 -1
- package/dist/AST/ScopeNodeAbstract.d.ts +0 -8
- package/dist/AST/ScopeNodeAbstract.js +0 -105
- package/dist/AST/ScopeNodeAbstract.js.map +0 -1
- package/dist/AST/StringFormatNode.d.ts +0 -18
- package/dist/AST/StringFormatNode.js +0 -151
- package/dist/AST/StringFormatNode.js.map +0 -1
- package/dist/AST/UnitLiteralNode.d.ts +0 -15
- package/dist/AST/UnitLiteralNode.js +0 -72
- package/dist/AST/UnitLiteralNode.js.map +0 -1
- package/dist/AST/WASM/Context.d.ts +0 -4
- package/dist/AST/WASM/Context.js +0 -18
- package/dist/AST/WASM/Context.js.map +0 -1
- package/dist/AST/WASM/Function.d.ts +0 -22
- package/dist/AST/WASM/Function.js +0 -126
- package/dist/AST/WASM/Function.js.map +0 -1
- package/dist/AST/WASM/Memory.d.ts +0 -12
- package/dist/AST/WASM/Memory.js +0 -22
- package/dist/AST/WASM/Memory.js.map +0 -1
- package/dist/AST/WASM/Section.d.ts +0 -5
- package/dist/AST/WASM/Section.js +0 -11
- package/dist/AST/WASM/Section.js.map +0 -1
- package/dist/AST/WASM.d.ts +0 -58
- package/dist/AST/WASM.js +0 -293
- package/dist/AST/WASM.js.map +0 -1
- package/dist/AST/WithNode.d.ts +0 -15
- package/dist/AST/WithNode.js +0 -197
- package/dist/AST/WithNode.js.map +0 -1
- package/dist/AST/XHRNode.d.ts +0 -15
- package/dist/AST/XHRNode.js +0 -151
- package/dist/AST/XHRNode.js.map +0 -1
- package/dist/AST.d.ts +0 -160
- package/dist/AST.js +0 -1156
- package/dist/AST.js.map +0 -1
- package/dist/Attribute.d.ts +0 -46
- package/dist/Attribute.js +0 -262
- package/dist/Attribute.js.map +0 -1
- package/dist/Bencmark.d.ts +0 -14
- package/dist/Bencmark.js +0 -236
- package/dist/Bencmark.js.map +0 -1
- package/dist/Component.d.ts +0 -7
- package/dist/Component.js +0 -179
- package/dist/Component.js.map +0 -1
- package/dist/Configuration.d.ts +0 -12
- package/dist/Configuration.js +0 -64
- package/dist/Configuration.js.map +0 -1
- package/dist/Controller.d.ts +0 -13
- package/dist/Controller.js +0 -60
- package/dist/Controller.js.map +0 -1
- package/dist/DOM/AbstractDOM.d.ts +0 -56
- package/dist/DOM/AbstractDOM.js +0 -1038
- package/dist/DOM/AbstractDOM.js.map +0 -1
- package/dist/DOM/DOMObject.d.ts +0 -33
- package/dist/DOM/DOMObject.js +0 -152
- package/dist/DOM/DOMObject.js.map +0 -1
- package/dist/DOM/ShadowDOM.d.ts +0 -5
- package/dist/DOM/ShadowDOM.js +0 -32
- package/dist/DOM/ShadowDOM.js.map +0 -1
- package/dist/DOM/WrappedDocument.d.ts +0 -5
- package/dist/DOM/WrappedDocument.js +0 -34
- package/dist/DOM/WrappedDocument.js.map +0 -1
- package/dist/DOM/WrappedWindow.d.ts +0 -6
- package/dist/DOM/WrappedWindow.js +0 -45
- package/dist/DOM/WrappedWindow.js.map +0 -1
- package/dist/DOM.d.ts +0 -5
- package/dist/DOM.js +0 -37
- package/dist/DOM.js.map +0 -1
- package/dist/EventDispatcher.d.ts +0 -36
- package/dist/EventDispatcher.js +0 -393
- package/dist/EventDispatcher.js.map +0 -1
- package/dist/Formats.d.ts +0 -5
- package/dist/Formats.js +0 -47
- package/dist/Formats.js.map +0 -1
- package/dist/MessageList.d.ts +0 -15
- package/dist/MessageList.js +0 -127
- package/dist/MessageList.js.map +0 -1
- package/dist/Model.d.ts +0 -12
- package/dist/Model.js +0 -92
- package/dist/Model.js.map +0 -1
- package/dist/Modifiers.d.ts +0 -17
- package/dist/Modifiers.js +0 -100
- package/dist/Modifiers.js.map +0 -1
- package/dist/Query.d.ts +0 -4
- package/dist/Query.js +0 -66
- package/dist/Query.js.map +0 -1
- package/dist/Registry.d.ts +0 -41
- package/dist/Registry.js +0 -165
- package/dist/Registry.js.map +0 -1
- package/dist/Scope/DynamicScopeData.d.ts +0 -6
- package/dist/Scope/DynamicScopeData.js +0 -83
- package/dist/Scope/DynamicScopeData.js.map +0 -1
- package/dist/Scope/ObjectAccessor.d.ts +0 -7
- package/dist/Scope/ObjectAccessor.js +0 -40
- package/dist/Scope/ObjectAccessor.js.map +0 -1
- package/dist/Scope/QueryReference.d.ts +0 -10
- package/dist/Scope/QueryReference.js +0 -103
- package/dist/Scope/QueryReference.js.map +0 -1
- package/dist/Scope/ScopeAbstract.d.ts +0 -9
- package/dist/Scope/ScopeAbstract.js +0 -28
- package/dist/Scope/ScopeAbstract.js.map +0 -1
- package/dist/Scope/ScopeData.d.ts +0 -4
- package/dist/Scope/ScopeData.js +0 -60
- package/dist/Scope/ScopeData.js.map +0 -1
- package/dist/Scope/ScopeDataAbstract.d.ts +0 -30
- package/dist/Scope/ScopeDataAbstract.js +0 -303
- package/dist/Scope/ScopeDataAbstract.js.map +0 -1
- package/dist/Scope/ScopeObject.d.ts +0 -3
- package/dist/Scope/ScopeObject.js +0 -28
- package/dist/Scope/ScopeObject.js.map +0 -1
- package/dist/Scope/ScopeReference.d.ts +0 -10
- package/dist/Scope/ScopeReference.js +0 -73
- package/dist/Scope/ScopeReference.js.map +0 -1
- package/dist/Scope/ScopedVariableType.d.ts +0 -6
- package/dist/Scope/ScopedVariableType.js +0 -14
- package/dist/Scope/ScopedVariableType.js.map +0 -1
- package/dist/Scope/WrappedArray.d.ts +0 -21
- package/dist/Scope/WrappedArray.js +0 -252
- package/dist/Scope/WrappedArray.js.map +0 -1
- package/dist/Scope/properties/ArrayProperty.d.ts +0 -12
- package/dist/Scope/properties/ArrayProperty.js +0 -88
- package/dist/Scope/properties/ArrayProperty.js.map +0 -1
- package/dist/Scope/properties/FloatProperty.d.ts +0 -4
- package/dist/Scope/properties/FloatProperty.js +0 -30
- package/dist/Scope/properties/FloatProperty.js.map +0 -1
- package/dist/Scope/properties/IntegerProperty.d.ts +0 -4
- package/dist/Scope/properties/IntegerProperty.js +0 -30
- package/dist/Scope/properties/IntegerProperty.js.map +0 -1
- package/dist/Scope/properties/Property.d.ts +0 -30
- package/dist/Scope/properties/Property.js +0 -205
- package/dist/Scope/properties/Property.js.map +0 -1
- package/dist/Scope/properties/_imports.d.ts +0 -4
- package/dist/Scope/properties/_imports.js +0 -13
- package/dist/Scope/properties/_imports.js.map +0 -1
- package/dist/Scope.d.ts +0 -39
- package/dist/Scope.js +0 -434
- package/dist/Scope.js.map +0 -1
- package/dist/Service.d.ts +0 -9
- package/dist/Service.js +0 -49
- package/dist/Service.js.map +0 -1
- package/dist/Tag/ShadowRootTag.d.ts +0 -3
- package/dist/Tag/ShadowRootTag.js +0 -28
- package/dist/Tag/ShadowRootTag.js.map +0 -1
- package/dist/Tag/SlotTag.d.ts +0 -3
- package/dist/Tag/SlotTag.js +0 -28
- package/dist/Tag/SlotTag.js.map +0 -1
- package/dist/Tag/SlottedTag.d.ts +0 -7
- package/dist/Tag/SlottedTag.js +0 -78
- package/dist/Tag/SlottedTag.js.map +0 -1
- package/dist/Tag/TagList.d.ts +0 -13
- package/dist/Tag/TagList.js +0 -104
- package/dist/Tag/TagList.js.map +0 -1
- package/dist/Tag.d.ts +0 -117
- package/dist/Tag.js +0 -1471
- package/dist/Tag.js.map +0 -1
- package/dist/Types.d.ts +0 -8
- package/dist/Types.js +0 -54
- package/dist/Types.js.map +0 -1
- package/dist/Validators.d.ts +0 -7
- package/dist/Validators.js +0 -54
- package/dist/Validators.js.map +0 -1
- package/dist/attributes/AddClassIf.d.ts +0 -4
- package/dist/attributes/AddClassIf.js +0 -93
- package/dist/attributes/AddClassIf.js.map +0 -1
- package/dist/attributes/Bind.d.ts +0 -24
- package/dist/attributes/Bind.js +0 -273
- package/dist/attributes/Bind.js.map +0 -1
- package/dist/attributes/ComponentAttribute.d.ts +0 -5
- package/dist/attributes/ComponentAttribute.js +0 -110
- package/dist/attributes/ComponentAttribute.js.map +0 -1
- package/dist/attributes/ControllerAttribute.d.ts +0 -11
- package/dist/attributes/ControllerAttribute.js +0 -127
- package/dist/attributes/ControllerAttribute.js.map +0 -1
- package/dist/attributes/DisableIf.d.ts +0 -5
- package/dist/attributes/DisableIf.js +0 -94
- package/dist/attributes/DisableIf.js.map +0 -1
- package/dist/attributes/Exec.d.ts +0 -10
- package/dist/attributes/Exec.js +0 -133
- package/dist/attributes/Exec.js.map +0 -1
- package/dist/attributes/Format.d.ts +0 -5
- package/dist/attributes/Format.js +0 -99
- package/dist/attributes/Format.js.map +0 -1
- package/dist/attributes/If.d.ts +0 -11
- package/dist/attributes/If.js +0 -159
- package/dist/attributes/If.js.map +0 -1
- package/dist/attributes/JSONAttribute.d.ts +0 -5
- package/dist/attributes/JSONAttribute.js +0 -119
- package/dist/attributes/JSONAttribute.js.map +0 -1
- package/dist/attributes/KeyAbstract.d.ts +0 -7
- package/dist/attributes/KeyAbstract.js +0 -117
- package/dist/attributes/KeyAbstract.js.map +0 -1
- package/dist/attributes/KeyDown.d.ts +0 -4
- package/dist/attributes/KeyDown.js +0 -88
- package/dist/attributes/KeyDown.js.map +0 -1
- package/dist/attributes/KeyUp.d.ts +0 -4
- package/dist/attributes/KeyUp.js +0 -88
- package/dist/attributes/KeyUp.js.map +0 -1
- package/dist/attributes/LazyAttribute.d.ts +0 -8
- package/dist/attributes/LazyAttribute.js +0 -122
- package/dist/attributes/LazyAttribute.js.map +0 -1
- package/dist/attributes/List.d.ts +0 -18
- package/dist/attributes/List.js +0 -396
- package/dist/attributes/List.js.map +0 -1
- package/dist/attributes/ListItem.d.ts +0 -12
- package/dist/attributes/ListItem.js +0 -119
- package/dist/attributes/ListItem.js.map +0 -1
- package/dist/attributes/ListItemModel.d.ts +0 -4
- package/dist/attributes/ListItemModel.js +0 -39
- package/dist/attributes/ListItemModel.js.map +0 -1
- package/dist/attributes/ModelAttribute.d.ts +0 -5
- package/dist/attributes/ModelAttribute.js +0 -41
- package/dist/attributes/ModelAttribute.js.map +0 -1
- package/dist/attributes/Name.d.ts +0 -6
- package/dist/attributes/Name.js +0 -88
- package/dist/attributes/Name.js.map +0 -1
- package/dist/attributes/On.d.ts +0 -9
- package/dist/attributes/On.js +0 -135
- package/dist/attributes/On.js.map +0 -1
- package/dist/attributes/PersistAttribute.d.ts +0 -15
- package/dist/attributes/PersistAttribute.js +0 -215
- package/dist/attributes/PersistAttribute.js.map +0 -1
- package/dist/attributes/Referenced.d.ts +0 -3
- package/dist/attributes/Referenced.js +0 -38
- package/dist/attributes/Referenced.js.map +0 -1
- package/dist/attributes/RootAttribute.d.ts +0 -7
- package/dist/attributes/RootAttribute.js +0 -141
- package/dist/attributes/RootAttribute.js.map +0 -1
- package/dist/attributes/ScopeAttribute.d.ts +0 -9
- package/dist/attributes/ScopeAttribute.js +0 -152
- package/dist/attributes/ScopeAttribute.js.map +0 -1
- package/dist/attributes/ScopeChange.d.ts +0 -10
- package/dist/attributes/ScopeChange.js +0 -153
- package/dist/attributes/ScopeChange.js.map +0 -1
- package/dist/attributes/ScriptAttribute.d.ts +0 -4
- package/dist/attributes/ScriptAttribute.js +0 -45
- package/dist/attributes/ScriptAttribute.js.map +0 -1
- package/dist/attributes/ServiceAttribute.d.ts +0 -7
- package/dist/attributes/ServiceAttribute.js +0 -45
- package/dist/attributes/ServiceAttribute.js.map +0 -1
- package/dist/attributes/SetAttribute.d.ts +0 -11
- package/dist/attributes/SetAttribute.js +0 -146
- package/dist/attributes/SetAttribute.js.map +0 -1
- package/dist/attributes/StandardAttribute.d.ts +0 -15
- package/dist/attributes/StandardAttribute.js +0 -170
- package/dist/attributes/StandardAttribute.js.map +0 -1
- package/dist/attributes/StyleAttribute.d.ts +0 -14
- package/dist/attributes/StyleAttribute.js +0 -218
- package/dist/attributes/StyleAttribute.js.map +0 -1
- package/dist/attributes/StyleVarAttribute.d.ts +0 -11
- package/dist/attributes/StyleVarAttribute.js +0 -124
- package/dist/attributes/StyleVarAttribute.js.map +0 -1
- package/dist/attributes/TemplateAttribute.d.ts +0 -5
- package/dist/attributes/TemplateAttribute.js +0 -89
- package/dist/attributes/TemplateAttribute.js.map +0 -1
- package/dist/attributes/TypeAttribute.d.ts +0 -5
- package/dist/attributes/TypeAttribute.js +0 -104
- package/dist/attributes/TypeAttribute.js.map +0 -1
- package/dist/attributes/XHRAttribute.d.ts +0 -14
- package/dist/attributes/XHRAttribute.js +0 -242
- package/dist/attributes/XHRAttribute.js.map +0 -1
- package/dist/attributes/_imports.d.ts +0 -32
- package/dist/attributes/_imports.js +0 -68
- package/dist/attributes/_imports.js.map +0 -1
- package/dist/contrib/XHR.d.ts +0 -21
- package/dist/contrib/XHR.js +0 -78
- package/dist/contrib/XHR.js.map +0 -1
- package/dist/contrib/_imports.d.ts +0 -1
- package/dist/contrib/_imports.js +0 -6
- package/dist/contrib/_imports.js.map +0 -1
- package/dist/custom-elements.d.ts +0 -9
- package/dist/custom-elements.js +0 -44
- package/dist/custom-elements.js.map +0 -1
- package/dist/demo/ServiceDemo.d.ts +0 -5
- package/dist/demo/ServiceDemo.js +0 -87
- package/dist/demo/ServiceDemo.js.map +0 -1
- package/dist/demo.d.ts +0 -2
- package/dist/demo.js +0 -17
- package/dist/demo.js.map +0 -1
- package/dist/helpers/DOMHelper.d.ts +0 -3
- package/dist/helpers/DOMHelper.js +0 -81
- package/dist/helpers/DOMHelper.js.map +0 -1
- package/dist/helpers/ElementHelper.d.ts +0 -4
- package/dist/helpers/ElementHelper.js +0 -53
- package/dist/helpers/ElementHelper.js.map +0 -1
- package/dist/helpers/VisionHelper.d.ts +0 -13
- package/dist/helpers/VisionHelper.js +0 -148
- package/dist/helpers/VisionHelper.js.map +0 -1
- package/dist/helpers/decorators.d.ts +0 -5
- package/dist/helpers/decorators.js +0 -59
- package/dist/helpers/decorators.js.map +0 -1
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -5
- package/dist/version.js.map +0 -1
- package/dist/vsn.d.ts +0 -36
- package/dist/vsn.js +0 -201
- package/dist/vsn.js.map +0 -1
- package/karma.conf.js +0 -34
- package/src/AST/ArithmeticNode.ts +0 -52
- package/src/AST/ArrayNode.ts +0 -39
- package/src/AST/AsNode.ts +0 -32
- package/src/AST/AssignmentNode.ts +0 -256
- package/src/AST/BlockNode.ts +0 -25
- package/src/AST/BooleanLiteralNode.ts +0 -10
- package/src/AST/ClassNode.ts +0 -267
- package/src/AST/ComparisonNode.ts +0 -57
- package/src/AST/ConditionalNode.ts +0 -36
- package/src/AST/DispatchEventNode.ts +0 -58
- package/src/AST/ElementAttributeNode.ts +0 -97
- package/src/AST/ElementQueryNode.ts +0 -48
- package/src/AST/ElementStyleNode.ts +0 -74
- package/src/AST/ForStatementNode.ts +0 -59
- package/src/AST/FunctionArgumentNode.ts +0 -27
- package/src/AST/FunctionCallNode.ts +0 -93
- package/src/AST/FunctionNode.ts +0 -82
- package/src/AST/IfStatementNode.ts +0 -67
- package/src/AST/InNode.ts +0 -46
- package/src/AST/IndexNode.ts +0 -64
- package/src/AST/LiteralNode.ts +0 -17
- package/src/AST/LoopNode.ts +0 -35
- package/src/AST/ModifierNode.ts +0 -32
- package/src/AST/NamedStackNode.ts +0 -83
- package/src/AST/Node.ts +0 -104
- package/src/AST/NotNode.ts +0 -41
- package/src/AST/NumberLiteralNode.ts +0 -14
- package/src/AST/ObjectNode.ts +0 -55
- package/src/AST/OnNode.ts +0 -23
- package/src/AST/RootScopeMemberNode.ts +0 -27
- package/src/AST/ScopeMemberNode.ts +0 -63
- package/src/AST/ScopeNodeAbstract.ts +0 -21
- package/src/AST/StringFormatNode.ts +0 -43
- package/src/AST/UnitLiteralNode.ts +0 -51
- package/src/AST/WASM/Context.ts +0 -12
- package/src/AST/WASM/Function.ts +0 -67
- package/src/AST/WASM/Memory.ts +0 -21
- package/src/AST/WASM/Section.ts +0 -6
- package/src/AST/WASM.ts +0 -244
- package/src/AST/WithNode.ts +0 -68
- package/src/AST/XHRNode.ts +0 -85
- package/src/AST.ts +0 -969
- package/src/Attribute.ts +0 -130
- package/src/Bencmark.ts +0 -184
- package/src/Component.ts +0 -63
- package/src/Configuration.ts +0 -47
- package/src/Controller.ts +0 -36
- package/src/DOM/AbstractDOM.ts +0 -462
- package/src/DOM/DOMObject.ts +0 -77
- package/src/DOM/ShadowDOM.ts +0 -15
- package/src/DOM/WrappedDocument.ts +0 -9
- package/src/DOM/WrappedWindow.ts +0 -21
- package/src/DOM.ts +0 -13
- package/src/EventDispatcher.ts +0 -234
- package/src/Formats.ts +0 -33
- package/src/MessageList.ts +0 -85
- package/src/Model.ts +0 -44
- package/src/Modifiers.ts +0 -54
- package/src/Query.ts +0 -17
- package/src/Registry.ts +0 -141
- package/src/Scope/DynamicScopeData.ts +0 -27
- package/src/Scope/ObjectAccessor.ts +0 -21
- package/src/Scope/QueryReference.ts +0 -29
- package/src/Scope/ScopeAbstract.ts +0 -11
- package/src/Scope/ScopeData.ts +0 -20
- package/src/Scope/ScopeDataAbstract.ts +0 -200
- package/src/Scope/ScopeObject.ts +0 -3
- package/src/Scope/ScopeReference.ts +0 -30
- package/src/Scope/ScopedVariableType.ts +0 -7
- package/src/Scope/WrappedArray.ts +0 -134
- package/src/Scope/properties/ArrayProperty.ts +0 -46
- package/src/Scope/properties/FloatProperty.ts +0 -5
- package/src/Scope/properties/IntegerProperty.ts +0 -5
- package/src/Scope/properties/Property.ts +0 -173
- package/src/Scope/properties/_imports.ts +0 -4
- package/src/Scope.ts +0 -333
- package/src/Service.ts +0 -24
- package/src/Tag/ShadowRootTag.ts +0 -5
- package/src/Tag/SlotTag.ts +0 -5
- package/src/Tag/SlottedTag.ts +0 -17
- package/src/Tag/TagList.ts +0 -52
- package/src/Tag.ts +0 -838
- package/src/Types.ts +0 -34
- package/src/Validators.ts +0 -45
- package/src/attributes/AddClassIf.ts +0 -14
- package/src/attributes/Bind.ts +0 -144
- package/src/attributes/ComponentAttribute.ts +0 -23
- package/src/attributes/ControllerAttribute.ts +0 -50
- package/src/attributes/DisableIf.ts +0 -16
- package/src/attributes/Exec.ts +0 -32
- package/src/attributes/Format.ts +0 -18
- package/src/attributes/If.ts +0 -40
- package/src/attributes/JSONAttribute.ts +0 -40
- package/src/attributes/KeyAbstract.ts +0 -28
- package/src/attributes/KeyDown.ts +0 -10
- package/src/attributes/KeyUp.ts +0 -10
- package/src/attributes/LazyAttribute.ts +0 -30
- package/src/attributes/List.ts +0 -210
- package/src/attributes/ListItem.ts +0 -30
- package/src/attributes/ListItemModel.ts +0 -7
- package/src/attributes/ModelAttribute.ts +0 -8
- package/src/attributes/Name.ts +0 -16
- package/src/attributes/On.ts +0 -39
- package/src/attributes/PersistAttribute.ts +0 -83
- package/src/attributes/Referenced.ts +0 -5
- package/src/attributes/RootAttribute.ts +0 -24
- package/src/attributes/ScopeAttribute.ts +0 -40
- package/src/attributes/ScopeChange.ts +0 -35
- package/src/attributes/ScriptAttribute.ts +0 -9
- package/src/attributes/ServiceAttribute.ts +0 -13
- package/src/attributes/SetAttribute.ts +0 -44
- package/src/attributes/StandardAttribute.ts +0 -72
- package/src/attributes/StyleAttribute.ts +0 -90
- package/src/attributes/StyleVarAttribute.ts +0 -40
- package/src/attributes/TemplateAttribute.ts +0 -12
- package/src/attributes/TypeAttribute.ts +0 -23
- package/src/attributes/XHRAttribute.ts +0 -109
- package/src/attributes/_imports.ts +0 -32
- package/src/contrib/XHR.ts +0 -46
- package/src/contrib/_imports.ts +0 -1
- package/src/custom-elements.ts +0 -46
- package/src/demo/ServiceDemo.ts +0 -12
- package/src/demo.ts +0 -2
- package/src/helpers/DOMHelper.ts +0 -17
- package/src/helpers/ElementHelper.ts +0 -26
- package/src/helpers/VisionHelper.ts +0 -88
- package/src/helpers/decorators.ts +0 -11
- package/src/version.ts +0 -2
- package/src/vsn.ts +0 -106
- package/test/AST/ArithmeticAssignmentNode.spec.ts +0 -45
- package/test/AST/ClassNode.spec.ts +0 -175
- package/test/AST/FunctionNode.spec.ts +0 -51
- package/test/AST/StringFormatNode.spec.ts +0 -12
- package/test/AST/WASM.spec.ts +0 -63
- package/test/AST/XHRNode.spec.ts +0 -10
- package/test/AST.spec.ts +0 -353
- package/test/Controller.spec.ts +0 -42
- package/test/DOM.spec.ts +0 -63
- package/test/EventDispatcher.spec.ts +0 -191
- package/test/MessageList.spec.ts +0 -101
- package/test/Model/DataModel.spec.ts +0 -0
- package/test/Scope/DynamicScopeData.spec.ts +0 -141
- package/test/Scope/ScopeData.spec.ts +0 -58
- package/test/Scope/WrappedArray.spec.ts +0 -11
- package/test/Scope/properties/ArrayProperty.spec.ts +0 -23
- package/test/Scope.spec.ts +0 -69
- package/test/Tag/TagList.spec.ts +0 -21
- package/test/Tag.spec.ts +0 -4
- package/test/attributes/Bind.spec.ts +0 -174
- package/test/attributes/JSONAttribute.spec.ts +0 -91
- package/test/attributes/ListItem.spec.ts +0 -118
- package/test/attributes/ScopeAttribute.spec.ts +0 -35
- package/test/attributes/ServiceAttribute.spec.ts +0 -41
- package/test/attributes/SetAttribute.spec.ts +0 -55
- package/test/attributes/Styles.spec.ts +0 -43
- package/test/globals.js +0 -2
- package/tsconfig.base.json +0 -17
- package/tsconfig.json +0 -6
- package/tsconfig.test.json +0 -7
- package/types/vsn-component.d.ts +0 -5
- package/webpack.config.js +0 -48
- package/webpack.development.js +0 -6
- package/webpack.production.js +0 -5
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
declare enum TokenType {
|
|
2
|
+
Whitespace = "Whitespace",
|
|
3
|
+
Identifier = "Identifier",
|
|
4
|
+
Number = "Number",
|
|
5
|
+
String = "String",
|
|
6
|
+
Template = "Template",
|
|
7
|
+
Boolean = "Boolean",
|
|
8
|
+
Null = "Null",
|
|
9
|
+
Behavior = "Behavior",
|
|
10
|
+
Use = "Use",
|
|
11
|
+
State = "State",
|
|
12
|
+
On = "On",
|
|
13
|
+
Construct = "Construct",
|
|
14
|
+
Destruct = "Destruct",
|
|
15
|
+
Return = "Return",
|
|
16
|
+
If = "If",
|
|
17
|
+
Else = "Else",
|
|
18
|
+
For = "For",
|
|
19
|
+
While = "While",
|
|
20
|
+
Try = "Try",
|
|
21
|
+
Catch = "Catch",
|
|
22
|
+
LBrace = "LBrace",
|
|
23
|
+
RBrace = "RBrace",
|
|
24
|
+
LParen = "LParen",
|
|
25
|
+
RParen = "RParen",
|
|
26
|
+
LBracket = "LBracket",
|
|
27
|
+
RBracket = "RBracket",
|
|
28
|
+
Colon = "Colon",
|
|
29
|
+
Semicolon = "Semicolon",
|
|
30
|
+
Comma = "Comma",
|
|
31
|
+
Ellipsis = "Ellipsis",
|
|
32
|
+
Dot = "Dot",
|
|
33
|
+
Hash = "Hash",
|
|
34
|
+
Greater = "Greater",
|
|
35
|
+
Less = "Less",
|
|
36
|
+
Plus = "Plus",
|
|
37
|
+
Minus = "Minus",
|
|
38
|
+
Tilde = "Tilde",
|
|
39
|
+
Star = "Star",
|
|
40
|
+
Slash = "Slash",
|
|
41
|
+
Percent = "Percent",
|
|
42
|
+
Equals = "Equals",
|
|
43
|
+
Arrow = "Arrow",
|
|
44
|
+
DoubleEquals = "DoubleEquals",
|
|
45
|
+
TripleEquals = "TripleEquals",
|
|
46
|
+
NotEquals = "NotEquals",
|
|
47
|
+
StrictNotEquals = "StrictNotEquals",
|
|
48
|
+
LessEqual = "LessEqual",
|
|
49
|
+
GreaterEqual = "GreaterEqual",
|
|
50
|
+
And = "And",
|
|
51
|
+
Or = "Or",
|
|
52
|
+
Pipe = "Pipe",
|
|
53
|
+
NullishCoalesce = "NullishCoalesce",
|
|
54
|
+
OptionalChain = "OptionalChain",
|
|
55
|
+
Bang = "Bang",
|
|
56
|
+
At = "At",
|
|
57
|
+
Dollar = "Dollar",
|
|
58
|
+
Question = "Question"
|
|
59
|
+
}
|
|
60
|
+
interface Position {
|
|
61
|
+
index: number;
|
|
62
|
+
line: number;
|
|
63
|
+
column: number;
|
|
64
|
+
}
|
|
65
|
+
interface Token {
|
|
66
|
+
type: TokenType;
|
|
67
|
+
value: string;
|
|
68
|
+
start: Position;
|
|
69
|
+
end: Position;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare class Lexer {
|
|
73
|
+
private input;
|
|
74
|
+
private index;
|
|
75
|
+
private line;
|
|
76
|
+
private column;
|
|
77
|
+
private pendingTokens;
|
|
78
|
+
private templateMode;
|
|
79
|
+
private templateExpressionMode;
|
|
80
|
+
private templateBraceDepth;
|
|
81
|
+
constructor(input: string);
|
|
82
|
+
tokenize(): Token[];
|
|
83
|
+
private readWhitespace;
|
|
84
|
+
private readLineComment;
|
|
85
|
+
private readBlockComment;
|
|
86
|
+
private readIdentifier;
|
|
87
|
+
private readNumber;
|
|
88
|
+
private readString;
|
|
89
|
+
private readTemplateChunk;
|
|
90
|
+
private readPunctuator;
|
|
91
|
+
private trackTemplateBrace;
|
|
92
|
+
private token;
|
|
93
|
+
private position;
|
|
94
|
+
private peek;
|
|
95
|
+
private next;
|
|
96
|
+
private eof;
|
|
97
|
+
private isWhitespace;
|
|
98
|
+
private isAlpha;
|
|
99
|
+
private isDigit;
|
|
100
|
+
private isAlphaNumeric;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface ExecutionContext {
|
|
104
|
+
scope: {
|
|
105
|
+
getPath(key: string): any;
|
|
106
|
+
setPath?(key: string, value: any): void;
|
|
107
|
+
hasKey?(key: string): boolean;
|
|
108
|
+
createChild?(): ExecutionContext["scope"];
|
|
109
|
+
} | undefined;
|
|
110
|
+
rootScope: ExecutionContext["scope"];
|
|
111
|
+
globals?: Record<string, any>;
|
|
112
|
+
element?: Element;
|
|
113
|
+
returnValue?: any;
|
|
114
|
+
returning?: boolean;
|
|
115
|
+
}
|
|
116
|
+
interface CFSNode {
|
|
117
|
+
type: string;
|
|
118
|
+
prepare(context: ExecutionContext): Promise<void>;
|
|
119
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
120
|
+
}
|
|
121
|
+
declare abstract class BaseNode implements CFSNode {
|
|
122
|
+
type: string;
|
|
123
|
+
constructor(type: string);
|
|
124
|
+
prepare(_context: ExecutionContext): Promise<void>;
|
|
125
|
+
evaluate(_context: ExecutionContext): Promise<any>;
|
|
126
|
+
}
|
|
127
|
+
declare class ProgramNode extends BaseNode {
|
|
128
|
+
behaviors: BehaviorNode[];
|
|
129
|
+
uses: UseNode[];
|
|
130
|
+
constructor(behaviors: BehaviorNode[], uses?: UseNode[]);
|
|
131
|
+
}
|
|
132
|
+
declare class UseNode extends BaseNode {
|
|
133
|
+
name: string;
|
|
134
|
+
alias: string;
|
|
135
|
+
constructor(name: string, alias: string);
|
|
136
|
+
}
|
|
137
|
+
declare class BlockNode extends BaseNode {
|
|
138
|
+
statements: CFSNode[];
|
|
139
|
+
constructor(statements: CFSNode[]);
|
|
140
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
141
|
+
}
|
|
142
|
+
declare class SelectorNode extends BaseNode {
|
|
143
|
+
selectorText: string;
|
|
144
|
+
constructor(selectorText: string);
|
|
145
|
+
}
|
|
146
|
+
declare class BehaviorNode extends BaseNode {
|
|
147
|
+
selector: SelectorNode;
|
|
148
|
+
body: BlockNode;
|
|
149
|
+
constructor(selector: SelectorNode, body: BlockNode);
|
|
150
|
+
}
|
|
151
|
+
declare class StateEntryNode extends BaseNode {
|
|
152
|
+
name: string;
|
|
153
|
+
value: ExpressionNode;
|
|
154
|
+
important: boolean;
|
|
155
|
+
constructor(name: string, value: ExpressionNode, important: boolean);
|
|
156
|
+
}
|
|
157
|
+
declare class StateBlockNode extends BaseNode {
|
|
158
|
+
entries: StateEntryNode[];
|
|
159
|
+
constructor(entries: StateEntryNode[]);
|
|
160
|
+
}
|
|
161
|
+
declare class OnBlockNode extends BaseNode {
|
|
162
|
+
eventName: string;
|
|
163
|
+
args: string[];
|
|
164
|
+
body: BlockNode;
|
|
165
|
+
modifiers: string[];
|
|
166
|
+
constructor(eventName: string, args: string[], body: BlockNode, modifiers?: string[]);
|
|
167
|
+
}
|
|
168
|
+
declare class AssignmentNode extends BaseNode {
|
|
169
|
+
target: AssignmentTarget;
|
|
170
|
+
value: ExpressionNode;
|
|
171
|
+
constructor(target: AssignmentTarget, value: ExpressionNode);
|
|
172
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
173
|
+
private assignTarget;
|
|
174
|
+
}
|
|
175
|
+
declare class ReturnNode extends BaseNode {
|
|
176
|
+
value?: ExpressionNode | undefined;
|
|
177
|
+
constructor(value?: ExpressionNode | undefined);
|
|
178
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
179
|
+
}
|
|
180
|
+
declare class IfNode extends BaseNode {
|
|
181
|
+
test: ExpressionNode;
|
|
182
|
+
consequent: BlockNode;
|
|
183
|
+
alternate?: BlockNode | undefined;
|
|
184
|
+
constructor(test: ExpressionNode, consequent: BlockNode, alternate?: BlockNode | undefined);
|
|
185
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
186
|
+
}
|
|
187
|
+
declare class WhileNode extends BaseNode {
|
|
188
|
+
test: ExpressionNode;
|
|
189
|
+
body: BlockNode;
|
|
190
|
+
constructor(test: ExpressionNode, body: BlockNode);
|
|
191
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
192
|
+
}
|
|
193
|
+
declare class ForNode extends BaseNode {
|
|
194
|
+
init: CFSNode | undefined;
|
|
195
|
+
test: ExpressionNode | undefined;
|
|
196
|
+
update: CFSNode | undefined;
|
|
197
|
+
body: BlockNode;
|
|
198
|
+
constructor(init: CFSNode | undefined, test: ExpressionNode | undefined, update: CFSNode | undefined, body: BlockNode);
|
|
199
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
200
|
+
}
|
|
201
|
+
declare class TryNode extends BaseNode {
|
|
202
|
+
body: BlockNode;
|
|
203
|
+
errorName: string;
|
|
204
|
+
handler: BlockNode;
|
|
205
|
+
constructor(body: BlockNode, errorName: string, handler: BlockNode);
|
|
206
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
207
|
+
}
|
|
208
|
+
declare class FunctionDeclarationNode extends BaseNode {
|
|
209
|
+
name: string;
|
|
210
|
+
params: FunctionParam[];
|
|
211
|
+
body: BlockNode;
|
|
212
|
+
isAsync: boolean;
|
|
213
|
+
constructor(name: string, params: FunctionParam[], body: BlockNode, isAsync?: boolean);
|
|
214
|
+
}
|
|
215
|
+
declare class FunctionExpression extends BaseNode {
|
|
216
|
+
params: FunctionParam[];
|
|
217
|
+
body: BlockNode;
|
|
218
|
+
isAsync: boolean;
|
|
219
|
+
constructor(params: FunctionParam[], body: BlockNode, isAsync?: boolean);
|
|
220
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
221
|
+
private applyParams;
|
|
222
|
+
private restoreParams;
|
|
223
|
+
}
|
|
224
|
+
interface DeclarationFlags {
|
|
225
|
+
important?: boolean;
|
|
226
|
+
trusted?: boolean;
|
|
227
|
+
debounce?: boolean;
|
|
228
|
+
[key: string]: boolean | undefined;
|
|
229
|
+
}
|
|
230
|
+
interface DeclarationFlagArgs {
|
|
231
|
+
debounce?: number;
|
|
232
|
+
[key: string]: any;
|
|
233
|
+
}
|
|
234
|
+
declare class DeclarationNode extends BaseNode {
|
|
235
|
+
target: DeclarationTarget;
|
|
236
|
+
operator: ":" | ":=" | ":<" | ":>";
|
|
237
|
+
value: ExpressionNode;
|
|
238
|
+
flags: DeclarationFlags;
|
|
239
|
+
flagArgs: DeclarationFlagArgs;
|
|
240
|
+
constructor(target: DeclarationTarget, operator: ":" | ":=" | ":<" | ":>", value: ExpressionNode, flags: DeclarationFlags, flagArgs: DeclarationFlagArgs);
|
|
241
|
+
}
|
|
242
|
+
type ExpressionNode = IdentifierExpression | LiteralExpression | TemplateExpression | UnaryExpression | BinaryExpression | MemberExpression | CallExpression | ArrayExpression | ObjectExpression | IndexExpression | FunctionExpression | AwaitExpression | TernaryExpression | DirectiveExpression | QueryExpression;
|
|
243
|
+
type DeclarationTarget = IdentifierExpression | DirectiveExpression;
|
|
244
|
+
type AssignmentTarget = IdentifierExpression | DirectiveExpression | ArrayPattern | ObjectPattern;
|
|
245
|
+
type FunctionParam = {
|
|
246
|
+
name: string;
|
|
247
|
+
defaultValue?: ExpressionNode;
|
|
248
|
+
rest?: boolean;
|
|
249
|
+
};
|
|
250
|
+
type PatternNode = IdentifierExpression | ArrayPattern | ObjectPattern;
|
|
251
|
+
declare class IdentifierExpression extends BaseNode {
|
|
252
|
+
name: string;
|
|
253
|
+
constructor(name: string);
|
|
254
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
255
|
+
}
|
|
256
|
+
declare class SpreadElement extends BaseNode {
|
|
257
|
+
value: ExpressionNode;
|
|
258
|
+
constructor(value: ExpressionNode);
|
|
259
|
+
}
|
|
260
|
+
declare class RestElement extends BaseNode {
|
|
261
|
+
target: IdentifierExpression;
|
|
262
|
+
constructor(target: IdentifierExpression);
|
|
263
|
+
}
|
|
264
|
+
type ArrayPatternElement = PatternNode | RestElement | null;
|
|
265
|
+
declare class ArrayPattern extends BaseNode {
|
|
266
|
+
elements: ArrayPatternElement[];
|
|
267
|
+
constructor(elements: ArrayPatternElement[]);
|
|
268
|
+
}
|
|
269
|
+
type ObjectPatternEntry = {
|
|
270
|
+
key: string;
|
|
271
|
+
target: PatternNode;
|
|
272
|
+
} | {
|
|
273
|
+
rest: IdentifierExpression;
|
|
274
|
+
};
|
|
275
|
+
declare class ObjectPattern extends BaseNode {
|
|
276
|
+
entries: ObjectPatternEntry[];
|
|
277
|
+
constructor(entries: ObjectPatternEntry[]);
|
|
278
|
+
}
|
|
279
|
+
declare class LiteralExpression extends BaseNode {
|
|
280
|
+
value: string | number | boolean | null;
|
|
281
|
+
constructor(value: string | number | boolean | null);
|
|
282
|
+
evaluate(): Promise<any>;
|
|
283
|
+
}
|
|
284
|
+
declare class TemplateExpression extends BaseNode {
|
|
285
|
+
parts: ExpressionNode[];
|
|
286
|
+
constructor(parts: ExpressionNode[]);
|
|
287
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
288
|
+
}
|
|
289
|
+
declare class UnaryExpression extends BaseNode {
|
|
290
|
+
operator: string;
|
|
291
|
+
argument: ExpressionNode;
|
|
292
|
+
constructor(operator: string, argument: ExpressionNode);
|
|
293
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
294
|
+
}
|
|
295
|
+
declare class BinaryExpression extends BaseNode {
|
|
296
|
+
operator: string;
|
|
297
|
+
left: ExpressionNode;
|
|
298
|
+
right: ExpressionNode;
|
|
299
|
+
constructor(operator: string, left: ExpressionNode, right: ExpressionNode);
|
|
300
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
301
|
+
}
|
|
302
|
+
declare class TernaryExpression extends BaseNode {
|
|
303
|
+
test: ExpressionNode;
|
|
304
|
+
consequent: ExpressionNode;
|
|
305
|
+
alternate: ExpressionNode;
|
|
306
|
+
constructor(test: ExpressionNode, consequent: ExpressionNode, alternate: ExpressionNode);
|
|
307
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
308
|
+
}
|
|
309
|
+
declare class MemberExpression extends BaseNode {
|
|
310
|
+
target: ExpressionNode;
|
|
311
|
+
property: string;
|
|
312
|
+
optional: boolean;
|
|
313
|
+
constructor(target: ExpressionNode, property: string, optional?: boolean);
|
|
314
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
315
|
+
resolve(context: ExecutionContext): Promise<{
|
|
316
|
+
value: any;
|
|
317
|
+
target?: any;
|
|
318
|
+
optional?: boolean;
|
|
319
|
+
} | undefined>;
|
|
320
|
+
getIdentifierPath(): {
|
|
321
|
+
path: string;
|
|
322
|
+
root: string;
|
|
323
|
+
} | undefined;
|
|
324
|
+
private getTargetIdentifierPath;
|
|
325
|
+
private resolveFromScope;
|
|
326
|
+
private resolveFromGlobals;
|
|
327
|
+
private getTargetPath;
|
|
328
|
+
}
|
|
329
|
+
declare class CallExpression extends BaseNode {
|
|
330
|
+
callee: ExpressionNode;
|
|
331
|
+
args: ExpressionNode[];
|
|
332
|
+
constructor(callee: ExpressionNode, args: ExpressionNode[]);
|
|
333
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
334
|
+
private resolveCallee;
|
|
335
|
+
}
|
|
336
|
+
type ArrayElement = ExpressionNode | SpreadElement;
|
|
337
|
+
declare class ArrayExpression extends BaseNode {
|
|
338
|
+
elements: ArrayElement[];
|
|
339
|
+
constructor(elements: ArrayElement[]);
|
|
340
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
341
|
+
}
|
|
342
|
+
type ObjectEntry = {
|
|
343
|
+
key: string;
|
|
344
|
+
value: ExpressionNode;
|
|
345
|
+
computed?: false;
|
|
346
|
+
} | {
|
|
347
|
+
keyExpr: ExpressionNode;
|
|
348
|
+
value: ExpressionNode;
|
|
349
|
+
computed: true;
|
|
350
|
+
} | {
|
|
351
|
+
spread: ExpressionNode;
|
|
352
|
+
};
|
|
353
|
+
declare class ObjectExpression extends BaseNode {
|
|
354
|
+
entries: ObjectEntry[];
|
|
355
|
+
constructor(entries: ObjectEntry[]);
|
|
356
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
357
|
+
}
|
|
358
|
+
declare class IndexExpression extends BaseNode {
|
|
359
|
+
target: ExpressionNode;
|
|
360
|
+
index: ExpressionNode;
|
|
361
|
+
constructor(target: ExpressionNode, index: ExpressionNode);
|
|
362
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
363
|
+
}
|
|
364
|
+
declare class DirectiveExpression extends BaseNode {
|
|
365
|
+
kind: "attr" | "style";
|
|
366
|
+
name: string;
|
|
367
|
+
constructor(kind: "attr" | "style", name: string);
|
|
368
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
369
|
+
}
|
|
370
|
+
declare class AwaitExpression extends BaseNode {
|
|
371
|
+
argument: ExpressionNode;
|
|
372
|
+
constructor(argument: ExpressionNode);
|
|
373
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
374
|
+
}
|
|
375
|
+
declare class QueryExpression extends BaseNode {
|
|
376
|
+
direction: "self" | "descendant" | "ancestor";
|
|
377
|
+
selector: string;
|
|
378
|
+
constructor(direction: "self" | "descendant" | "ancestor", selector: string);
|
|
379
|
+
evaluate(context: ExecutionContext): Promise<any>;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
declare class Parser {
|
|
383
|
+
private stream;
|
|
384
|
+
private source;
|
|
385
|
+
private customFlags;
|
|
386
|
+
private allowImplicitSemicolon;
|
|
387
|
+
private awaitStack;
|
|
388
|
+
constructor(input: string, options?: {
|
|
389
|
+
customFlags?: Set<string>;
|
|
390
|
+
});
|
|
391
|
+
static parseInline(code: string): BlockNode;
|
|
392
|
+
parseProgram(): ProgramNode;
|
|
393
|
+
parseInlineBlock(): BlockNode;
|
|
394
|
+
private parseBehavior;
|
|
395
|
+
private parseSelector;
|
|
396
|
+
private parseUseStatement;
|
|
397
|
+
private wrapErrors;
|
|
398
|
+
private formatError;
|
|
399
|
+
private getLineSnippet;
|
|
400
|
+
private parseBlock;
|
|
401
|
+
private parseStatement;
|
|
402
|
+
private parseStateBlock;
|
|
403
|
+
private parseOnBlock;
|
|
404
|
+
private parseOnModifiers;
|
|
405
|
+
private parseAssignment;
|
|
406
|
+
private parseExpression;
|
|
407
|
+
private parsePipeExpression;
|
|
408
|
+
private buildPipeCall;
|
|
409
|
+
private parseTernaryExpression;
|
|
410
|
+
private parseNullishExpression;
|
|
411
|
+
private parseLogicalOrExpression;
|
|
412
|
+
private parseLogicalAndExpression;
|
|
413
|
+
private parseEqualityExpression;
|
|
414
|
+
private parseComparisonExpression;
|
|
415
|
+
private parseMultiplicativeExpression;
|
|
416
|
+
private parseAdditiveExpression;
|
|
417
|
+
private parseUnaryExpression;
|
|
418
|
+
private parseCallExpression;
|
|
419
|
+
private parsePrimaryExpression;
|
|
420
|
+
private parseArrayExpression;
|
|
421
|
+
private parseTemplateExpression;
|
|
422
|
+
private parseObjectExpression;
|
|
423
|
+
private consumeStatementTerminator;
|
|
424
|
+
private parseFunctionBlockWithAwait;
|
|
425
|
+
private isAsyncToken;
|
|
426
|
+
private isAwaitAllowed;
|
|
427
|
+
private parseArrowExpressionBody;
|
|
428
|
+
private parseAssignmentTarget;
|
|
429
|
+
private parseArrayPattern;
|
|
430
|
+
private parseObjectPattern;
|
|
431
|
+
private parseDeclaration;
|
|
432
|
+
private parseDeclarationTarget;
|
|
433
|
+
private parseDeclarationOperator;
|
|
434
|
+
private parseFlags;
|
|
435
|
+
private parseCustomFlagArg;
|
|
436
|
+
private isDeclarationStart;
|
|
437
|
+
private isAssignmentStart;
|
|
438
|
+
private isCallStart;
|
|
439
|
+
private isExpressionStatementStart;
|
|
440
|
+
private isFunctionDeclarationStart;
|
|
441
|
+
private isArrowFunctionStart;
|
|
442
|
+
private isAsyncArrowFunctionStart;
|
|
443
|
+
private isFunctionExpressionAssignmentStart;
|
|
444
|
+
private parseExpressionStatement;
|
|
445
|
+
private parseIfBlock;
|
|
446
|
+
private parseWhileBlock;
|
|
447
|
+
private parseForBlock;
|
|
448
|
+
private parseForClause;
|
|
449
|
+
private parseAssignmentExpression;
|
|
450
|
+
private parseTryBlock;
|
|
451
|
+
private parseConstructBlock;
|
|
452
|
+
private parseDestructBlock;
|
|
453
|
+
private parseQueryExpression;
|
|
454
|
+
private parseFunctionDeclaration;
|
|
455
|
+
private parseFunctionBlock;
|
|
456
|
+
private parseReturnStatement;
|
|
457
|
+
private parseArrowFunctionExpression;
|
|
458
|
+
private parseFunctionParams;
|
|
459
|
+
private readSelectorUntil;
|
|
460
|
+
private parseIdentifierPath;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
declare class Scope {
|
|
464
|
+
readonly parent?: Scope | undefined;
|
|
465
|
+
private data;
|
|
466
|
+
private root;
|
|
467
|
+
private listeners;
|
|
468
|
+
private anyListeners;
|
|
469
|
+
constructor(parent?: Scope | undefined);
|
|
470
|
+
createChild(): Scope;
|
|
471
|
+
get(key: string): any;
|
|
472
|
+
set(key: string, value: any): void;
|
|
473
|
+
hasKey(path: string): boolean;
|
|
474
|
+
getPath(path: string): any;
|
|
475
|
+
setPath(path: string, value: any): void;
|
|
476
|
+
on(path: string, handler: () => void): void;
|
|
477
|
+
off(path: string, handler: () => void): void;
|
|
478
|
+
onAny(handler: () => void): void;
|
|
479
|
+
offAny(handler: () => void): void;
|
|
480
|
+
private emitChange;
|
|
481
|
+
private resolveScope;
|
|
482
|
+
private getLocalPathValue;
|
|
483
|
+
private findNearestScopeWithKey;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
type AttributeHandler = {
|
|
487
|
+
id: string;
|
|
488
|
+
match: (name: string) => boolean;
|
|
489
|
+
handle: (element: Element, name: string, value: string, scope: Scope) => boolean | void;
|
|
490
|
+
};
|
|
491
|
+
type FlagApplyContext = {
|
|
492
|
+
name: string;
|
|
493
|
+
args: any;
|
|
494
|
+
element: Element;
|
|
495
|
+
scope: Scope;
|
|
496
|
+
declaration: DeclarationNode;
|
|
497
|
+
};
|
|
498
|
+
type FlagHandler = {
|
|
499
|
+
onApply?: (context: FlagApplyContext) => void;
|
|
500
|
+
};
|
|
501
|
+
type EngineOptions = {
|
|
502
|
+
diagnostics?: boolean;
|
|
503
|
+
logger?: Partial<Pick<Console, "info" | "warn">>;
|
|
504
|
+
};
|
|
505
|
+
declare class Engine {
|
|
506
|
+
private static activeEngines;
|
|
507
|
+
private scopes;
|
|
508
|
+
private bindBindings;
|
|
509
|
+
private ifBindings;
|
|
510
|
+
private showBindings;
|
|
511
|
+
private htmlBindings;
|
|
512
|
+
private getBindings;
|
|
513
|
+
private eachBindings;
|
|
514
|
+
private lifecycleBindings;
|
|
515
|
+
private behaviorRegistry;
|
|
516
|
+
private behaviorBindings;
|
|
517
|
+
private behaviorListeners;
|
|
518
|
+
private behaviorId;
|
|
519
|
+
private codeCache;
|
|
520
|
+
private behaviorCache;
|
|
521
|
+
private observer;
|
|
522
|
+
private observerRoot;
|
|
523
|
+
private attributeHandlers;
|
|
524
|
+
private globals;
|
|
525
|
+
private importantFlags;
|
|
526
|
+
private inlineDeclarations;
|
|
527
|
+
private flagHandlers;
|
|
528
|
+
private pendingAdded;
|
|
529
|
+
private pendingRemoved;
|
|
530
|
+
private pendingUpdated;
|
|
531
|
+
private observerFlush?;
|
|
532
|
+
private ignoredAdded;
|
|
533
|
+
private diagnostics;
|
|
534
|
+
private logger;
|
|
535
|
+
constructor(options?: EngineOptions);
|
|
536
|
+
mount(root: HTMLElement): Promise<void>;
|
|
537
|
+
unmount(element: Element): void;
|
|
538
|
+
registerBehaviors(source: string): void;
|
|
539
|
+
registerGlobal(name: string, value: any): void;
|
|
540
|
+
registerGlobals(values: Record<string, any>): void;
|
|
541
|
+
registerFlag(name: string, handler?: FlagHandler): void;
|
|
542
|
+
getRegistryStats(): {
|
|
543
|
+
behaviorCount: number;
|
|
544
|
+
behaviorCacheSize: number;
|
|
545
|
+
};
|
|
546
|
+
registerAttributeHandler(handler: AttributeHandler): void;
|
|
547
|
+
private resolveGlobalPath;
|
|
548
|
+
getScope(element: Element, parentScope?: Scope): Scope;
|
|
549
|
+
evaluate(element: Element): void;
|
|
550
|
+
private attachObserver;
|
|
551
|
+
private disconnectObserver;
|
|
552
|
+
private flushObserverQueue;
|
|
553
|
+
private handleRemovedNode;
|
|
554
|
+
private handleAddedNode;
|
|
555
|
+
private handleUpdatedNode;
|
|
556
|
+
private applyBehaviors;
|
|
557
|
+
private reapplyBehaviorsForElement;
|
|
558
|
+
private applyBehaviorForElement;
|
|
559
|
+
private unbindBehaviorForElement;
|
|
560
|
+
private runBehaviorDestruct;
|
|
561
|
+
private attachAttributes;
|
|
562
|
+
private setLifecycle;
|
|
563
|
+
private runConstruct;
|
|
564
|
+
private runDestruct;
|
|
565
|
+
private parseEachExpression;
|
|
566
|
+
private renderEach;
|
|
567
|
+
private attachBindInputHandler;
|
|
568
|
+
private parseBindDirection;
|
|
569
|
+
private hasVsnAttributes;
|
|
570
|
+
private markInlineDeclaration;
|
|
571
|
+
private isInlineDeclaration;
|
|
572
|
+
private findParentScope;
|
|
573
|
+
private watch;
|
|
574
|
+
private watchWithDebounce;
|
|
575
|
+
private watchAllScopes;
|
|
576
|
+
private parseOnAttribute;
|
|
577
|
+
private parseEventDescriptor;
|
|
578
|
+
private matchesKeyModifiers;
|
|
579
|
+
private matchesTargetModifiers;
|
|
580
|
+
private describeElement;
|
|
581
|
+
private logDiagnostic;
|
|
582
|
+
private emitError;
|
|
583
|
+
private attachOnHandler;
|
|
584
|
+
private attachBehaviorOnHandler;
|
|
585
|
+
private attachGetHandler;
|
|
586
|
+
private applyEventModifiers;
|
|
587
|
+
private getListenerOptions;
|
|
588
|
+
private execute;
|
|
589
|
+
private executeBlock;
|
|
590
|
+
private safeExecute;
|
|
591
|
+
private safeExecuteBlock;
|
|
592
|
+
private collectBehavior;
|
|
593
|
+
private collectNestedBehaviors;
|
|
594
|
+
private computeSpecificity;
|
|
595
|
+
private getBehaviorRootScope;
|
|
596
|
+
private getImportantKey;
|
|
597
|
+
private isImportant;
|
|
598
|
+
private markImportant;
|
|
599
|
+
private extractLifecycle;
|
|
600
|
+
private extractOnBlocks;
|
|
601
|
+
private extractDeclarations;
|
|
602
|
+
private extractFunctionDeclarations;
|
|
603
|
+
private getCachedBehavior;
|
|
604
|
+
private hashBehavior;
|
|
605
|
+
private normalizeNode;
|
|
606
|
+
private hashString;
|
|
607
|
+
private applyBehaviorFunctions;
|
|
608
|
+
private applyBehaviorFunction;
|
|
609
|
+
private applyFunctionParams;
|
|
610
|
+
private restoreFunctionParams;
|
|
611
|
+
private applyBehaviorDeclarations;
|
|
612
|
+
private applyBehaviorDeclaration;
|
|
613
|
+
private applyCustomFlags;
|
|
614
|
+
private applyDirectiveFromScope;
|
|
615
|
+
private applyDirectiveFromExpression;
|
|
616
|
+
private applyDirectiveToScope;
|
|
617
|
+
private applyCheckedBindingToScope;
|
|
618
|
+
private applyValueBindingToScope;
|
|
619
|
+
private setDirectiveValue;
|
|
620
|
+
private getDirectiveValue;
|
|
621
|
+
private handleTrustedHtml;
|
|
622
|
+
private registerDefaultAttributeHandlers;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
declare const VERSION = "0.1.0";
|
|
626
|
+
|
|
627
|
+
declare function parseCFS(source: string): ProgramNode;
|
|
628
|
+
declare function autoMount(root?: HTMLElement | Document): Engine | null;
|
|
629
|
+
|
|
630
|
+
export { type ArrayElement, ArrayExpression, ArrayPattern, type ArrayPatternElement, AssignmentNode, type AssignmentTarget, AwaitExpression, BaseNode, BehaviorNode, BinaryExpression, BlockNode, type CFSNode, CallExpression, type DeclarationFlagArgs, type DeclarationFlags, DeclarationNode, type DeclarationTarget, DirectiveExpression, Engine, type ExecutionContext, type ExpressionNode, ForNode, FunctionDeclarationNode, FunctionExpression, type FunctionParam, IdentifierExpression, IfNode, IndexExpression, Lexer, LiteralExpression, MemberExpression, type ObjectEntry, ObjectExpression, ObjectPattern, type ObjectPatternEntry, OnBlockNode, Parser, type PatternNode, ProgramNode, QueryExpression, RestElement, ReturnNode, SelectorNode, SpreadElement, StateBlockNode, StateEntryNode, TemplateExpression, TernaryExpression, TokenType, TryNode, UnaryExpression, UseNode, VERSION, WhileNode, autoMount, parseCFS };
|