lumen-plus 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/Alert.svelte +1 -1
- package/dist/components/Autocomplete/Autocomplete.svelte +1 -1
- package/dist/components/Backtop/Backtop.svelte +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.svelte +1 -1
- package/dist/components/Button/Button.svelte +1 -1
- package/dist/components/Calendar/Calendar.svelte +1 -1
- package/dist/components/Carousel/Carousel.svelte +1 -1
- package/dist/components/Cascader/Cascader.svelte +2 -2
- package/dist/components/Checkbox/Checkbox.svelte +1 -1
- package/dist/components/Collapse/CollapseItem.svelte +1 -1
- package/dist/components/ColorPicker/ColorPicker.svelte +2 -2
- package/dist/components/DatePicker/DatePicker.svelte +2 -2
- package/dist/components/DateTimePicker/DateTimePicker.svelte +2 -2
- package/dist/components/Dialog/Dialog.svelte +1 -1
- package/dist/components/Drawer/Drawer.svelte +1 -1
- package/dist/components/Dropdown/Dropdown.svelte +1 -1
- package/dist/components/Image/Image.svelte +1 -1
- package/dist/components/Input/Input.svelte +1 -1
- package/dist/components/InputNumber/InputNumber.svelte +1 -1
- package/dist/components/InputTag/InputTag.svelte +1 -1
- package/dist/components/Loading/Loading.svelte +1 -1
- package/dist/components/Menu/Menu.svelte +1 -1
- package/dist/components/Message/MessageBox.svelte +1 -1
- package/dist/components/MessageBox/MessageBox.svelte +2 -2
- package/dist/components/Notification/Notification.svelte +1 -1
- package/dist/components/Pagination/Pagination.svelte +4 -4
- package/dist/components/Popconfirm/Popconfirm.svelte +2 -2
- package/dist/components/Result/Result.svelte +1 -1
- package/dist/components/Select/Select.svelte +2 -2
- package/dist/components/Slider/Slider.svelte +1 -1
- package/dist/components/Steps/Step.svelte +1 -1
- package/dist/components/Switch/Switch.svelte +1 -1
- package/dist/components/Table/Table.svelte +5 -5
- package/dist/components/Tabs/Tabs.svelte +1 -1
- package/dist/components/Tag/Tag.svelte +1 -1
- package/dist/components/Textarea/Textarea.svelte +1 -1
- package/dist/components/TimePicker/TimePicker.svelte +2 -2
- package/dist/components/Transfer/Transfer.svelte +2 -2
- package/dist/components/Tree/TreeNode.svelte +2 -2
- package/dist/components/TreeSelect/TreeSelect.svelte +4 -4
- package/dist/components/Upload/Upload.svelte +1 -1
- package/package.json +1 -1
- package/dist/utils/node_modules/.bin/tsc +0 -2
- package/dist/utils/node_modules/.bin/tsserver +0 -2
- package/dist/utils/node_modules/svelte/LICENSE.md +0 -7
- package/dist/utils/node_modules/svelte/README.md +0 -41
- package/dist/utils/node_modules/svelte/compiler/index.js +0 -1
- package/dist/utils/node_modules/svelte/compiler/package.json +0 -3
- package/dist/utils/node_modules/svelte/package.json +0 -184
- package/dist/utils/node_modules/svelte/src/animate/index.js +0 -78
- package/dist/utils/node_modules/svelte/src/attachments/index.js +0 -113
- package/dist/utils/node_modules/svelte/src/compiler/errors.js +0 -1719
- package/dist/utils/node_modules/svelte/src/compiler/index.js +0 -198
- package/dist/utils/node_modules/svelte/src/compiler/legacy.js +0 -632
- package/dist/utils/node_modules/svelte/src/compiler/migrate/index.js +0 -1996
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/acorn.js +0 -198
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/index.js +0 -326
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/context.js +0 -116
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/expression.js +0 -93
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/options.js +0 -261
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/script.js +0 -97
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/style.js +0 -633
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/remove_typescript_nodes.js +0 -180
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/element.js +0 -877
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/fragment.js +0 -17
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/tag.js +0 -751
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/text.js +0 -23
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/bracket.js +0 -213
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/create.js +0 -16
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/entities.js +0 -2234
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/fuzzymatch.js +0 -280
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/html.js +0 -127
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/css-analyze.js +0 -331
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/css-prune.js +0 -1160
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/css-warn.js +0 -47
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/utils.js +0 -177
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/index.js +0 -1283
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/utils/check_graph_for_cycles.js +0 -47
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AnimateDirective.js +0 -15
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ArrowFunctionExpression.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AssignmentExpression.js +0 -31
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AttachTag.js +0 -17
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Attribute.js +0 -66
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AwaitBlock.js +0 -48
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AwaitExpression.js +0 -150
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js +0 -280
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js +0 -339
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js +0 -156
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ClassDeclaration.js +0 -25
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ClassDirective.js +0 -13
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Component.js +0 -26
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ConstTag.js +0 -45
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/DebugTag.js +0 -15
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/EachBlock.js +0 -97
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExportDefaultDeclaration.js +0 -20
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExportNamedDeclaration.js +0 -70
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExportSpecifier.js +0 -30
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExpressionStatement.js +0 -38
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExpressionTag.js +0 -26
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Fragment.js +0 -10
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/FunctionDeclaration.js +0 -16
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/FunctionExpression.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/HtmlTag.js +0 -19
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Identifier.js +0 -193
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/IfBlock.js +0 -27
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ImportDeclaration.js +0 -31
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/KeyBlock.js +0 -21
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/LabeledStatement.js +0 -95
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/LetDirective.js +0 -24
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Literal.js +0 -14
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/MemberExpression.js +0 -28
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/NewExpression.js +0 -17
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/OnDirective.js +0 -28
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/PropertyDefinition.js +0 -21
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/RegularElement.js +0 -210
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/RenderTag.js +0 -68
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SlotElement.js +0 -42
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SnippetBlock.js +0 -113
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SpreadAttribute.js +0 -13
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SpreadElement.js +0 -16
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/StyleDirective.js +0 -39
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteBody.js +0 -22
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteBoundary.js +0 -30
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteComponent.js +0 -18
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteDocument.js +0 -24
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteElement.js +0 -78
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteFragment.js +0 -27
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteHead.js +0 -18
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteSelf.js +0 -36
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteWindow.js +0 -24
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TaggedTemplateExpression.js +0 -16
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TemplateElement.js +0 -12
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Text.js +0 -52
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TitleElement.js +0 -21
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TransitionDirective.js +0 -19
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/UpdateExpression.js +0 -29
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/UseDirective.js +0 -18
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/VariableDeclarator.js +0 -160
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/constants.js +0 -319
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js +0 -977
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/attribute.js +0 -125
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/component.js +0 -177
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/element.js +0 -160
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/fragment.js +0 -15
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/function.js +0 -24
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/snippets.js +0 -17
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/special-element.js +0 -16
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/utils.js +0 -301
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-client.js +0 -709
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-template/fix-attribute-casing.js +0 -18
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-template/index.js +0 -67
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-template/template.js +0 -162
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/utils.js +0 -181
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AnimateDirective.js +0 -38
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ArrowFunctionExpression.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AssignmentExpression.js +0 -225
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AttachTag.js +0 -26
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Attribute.js +0 -14
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AwaitBlock.js +0 -124
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AwaitExpression.js +0 -25
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BinaryExpression.js +0 -34
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BindDirective.js +0 -290
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BlockStatement.js +0 -32
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BreakStatement.js +0 -20
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/CallExpression.js +0 -136
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ClassBody.js +0 -111
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Comment.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Component.js +0 -12
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ConstTag.js +0 -134
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/DebugTag.js +0 -28
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/EachBlock.js +0 -367
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ExportNamedDeclaration.js +0 -19
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ExpressionStatement.js +0 -20
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ForOfStatement.js +0 -25
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Fragment.js +0 -181
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/FunctionDeclaration.js +0 -12
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/FunctionExpression.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/HtmlTag.js +0 -49
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Identifier.js +0 -45
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/IfBlock.js +0 -90
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/KeyBlock.js +0 -39
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/LabeledStatement.js +0 -64
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/LetDirective.js +0 -55
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/MemberExpression.js +0 -23
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/OnDirective.js +0 -38
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Program.js +0 -153
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js +0 -791
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/RenderTag.js +0 -91
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SlotElement.js +0 -94
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SnippetBlock.js +0 -94
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SpreadAttribute.js +0 -10
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteBody.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteBoundary.js +0 -126
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteComponent.js +0 -13
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteDocument.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteElement.js +0 -157
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteFragment.js +0 -17
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteHead.js +0 -23
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteSelf.js +0 -13
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteWindow.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/TitleElement.js +0 -48
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/TransitionDirective.js +0 -41
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/UpdateExpression.js +0 -55
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/UseDirective.js +0 -49
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/VariableDeclaration.js +0 -422
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/component.js +0 -530
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/declarations.js +0 -53
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/element.js +0 -263
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/events.js +0 -176
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/fragment.js +0 -185
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/function.js +0 -17
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/special_element.js +0 -22
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/utils.js +0 -513
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/css/index.js +0 -479
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/index.js +0 -118
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/transform-server.js +0 -423
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/AssignmentExpression.js +0 -107
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/AwaitBlock.js +0 -37
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/AwaitExpression.js +0 -40
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/CallExpression.js +0 -71
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/ClassBody.js +0 -81
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Component.js +0 -12
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/ConstTag.js +0 -49
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/DebugTag.js +0 -24
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/EachBlock.js +0 -80
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/ExpressionStatement.js +0 -23
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Fragment.js +0 -53
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/HtmlTag.js +0 -26
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Identifier.js +0 -19
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/IfBlock.js +0 -39
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/KeyBlock.js +0 -22
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/LabeledStatement.js +0 -24
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/MemberExpression.js +0 -19
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Program.js +0 -25
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/PropertyDefinition.js +0 -37
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/RegularElement.js +0 -255
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/RenderTag.js +0 -51
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SlotElement.js +0 -77
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SnippetBlock.js +0 -29
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SpreadAttribute.js +0 -10
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteBoundary.js +0 -71
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteComponent.js +0 -12
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteElement.js +0 -102
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteFragment.js +0 -11
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteHead.js +0 -25
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteSelf.js +0 -12
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/TitleElement.js +0 -21
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/UpdateExpression.js +0 -26
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/VariableDeclaration.js +0 -212
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/shared/component.js +0 -360
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/shared/element.js +0 -563
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/shared/utils.js +0 -407
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/shared/assignments.js +0 -93
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/shared/transform-async.js +0 -114
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/utils.js +0 -451
- package/dist/utils/node_modules/svelte/src/compiler/phases/bindings.js +0 -227
- package/dist/utils/node_modules/svelte/src/compiler/phases/css.js +0 -14
- package/dist/utils/node_modules/svelte/src/compiler/phases/nodes.js +0 -245
- package/dist/utils/node_modules/svelte/src/compiler/phases/patterns.js +0 -27
- package/dist/utils/node_modules/svelte/src/compiler/phases/scope.js +0 -1412
- package/dist/utils/node_modules/svelte/src/compiler/preprocess/decode_sourcemap.js +0 -96
- package/dist/utils/node_modules/svelte/src/compiler/preprocess/index.js +0 -368
- package/dist/utils/node_modules/svelte/src/compiler/preprocess/replace_in_code.js +0 -72
- package/dist/utils/node_modules/svelte/src/compiler/print/index.js +0 -890
- package/dist/utils/node_modules/svelte/src/compiler/state.js +0 -144
- package/dist/utils/node_modules/svelte/src/compiler/utils/assert.js +0 -9
- package/dist/utils/node_modules/svelte/src/compiler/utils/ast.js +0 -639
- package/dist/utils/node_modules/svelte/src/compiler/utils/builders.js +0 -698
- package/dist/utils/node_modules/svelte/src/compiler/utils/compile_diagnostic.js +0 -107
- package/dist/utils/node_modules/svelte/src/compiler/utils/extract_svelte_ignore.js +0 -104
- package/dist/utils/node_modules/svelte/src/compiler/utils/mapped_code.js +0 -454
- package/dist/utils/node_modules/svelte/src/compiler/utils/push_array.js +0 -13
- package/dist/utils/node_modules/svelte/src/compiler/utils/sanitize_template_string.js +0 -7
- package/dist/utils/node_modules/svelte/src/compiler/utils/slot.js +0 -20
- package/dist/utils/node_modules/svelte/src/compiler/utils/string.js +0 -9
- package/dist/utils/node_modules/svelte/src/compiler/validate-options.js +0 -324
- package/dist/utils/node_modules/svelte/src/compiler/warnings.js +0 -845
- package/dist/utils/node_modules/svelte/src/constants.js +0 -64
- package/dist/utils/node_modules/svelte/src/easing/index.js +0 -286
- package/dist/utils/node_modules/svelte/src/escaping.js +0 -26
- package/dist/utils/node_modules/svelte/src/events/index.js +0 -1
- package/dist/utils/node_modules/svelte/src/html-tree-validation.js +0 -238
- package/dist/utils/node_modules/svelte/src/index-client.js +0 -255
- package/dist/utils/node_modules/svelte/src/index-server.js +0 -56
- package/dist/utils/node_modules/svelte/src/internal/client/constants.js +0 -73
- package/dist/utils/node_modules/svelte/src/internal/client/context.js +0 -258
- package/dist/utils/node_modules/svelte/src/internal/client/dev/assign.js +0 -78
- package/dist/utils/node_modules/svelte/src/internal/client/dev/console-log.js +0 -35
- package/dist/utils/node_modules/svelte/src/internal/client/dev/css.js +0 -31
- package/dist/utils/node_modules/svelte/src/internal/client/dev/debug.js +0 -500
- package/dist/utils/node_modules/svelte/src/internal/client/dev/elements.js +0 -63
- package/dist/utils/node_modules/svelte/src/internal/client/dev/equality.js +0 -101
- package/dist/utils/node_modules/svelte/src/internal/client/dev/hmr.js +0 -89
- package/dist/utils/node_modules/svelte/src/internal/client/dev/inspect.js +0 -72
- package/dist/utils/node_modules/svelte/src/internal/client/dev/legacy.js +0 -25
- package/dist/utils/node_modules/svelte/src/internal/client/dev/ownership.js +0 -81
- package/dist/utils/node_modules/svelte/src/internal/client/dev/tracing.js +0 -162
- package/dist/utils/node_modules/svelte/src/internal/client/dev/validation.js +0 -16
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/async.js +0 -64
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/await.js +0 -142
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/boundary.js +0 -507
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/branches.js +0 -227
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/css-props.js +0 -28
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/each.js +0 -666
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/html.js +0 -121
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/if.js +0 -70
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/key.js +0 -33
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/slot.js +0 -44
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/snippet.js +0 -103
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/svelte-component.js +0 -26
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js +0 -152
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js +0 -59
- package/dist/utils/node_modules/svelte/src/internal/client/dom/css.js +0 -32
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/actions.js +0 -43
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/attachments.js +0 -33
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/attributes.js +0 -657
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/document.js +0 -17
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/input.js +0 -312
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/media.js +0 -232
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/navigator.js +0 -11
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/props.js +0 -22
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/select.js +0 -159
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js +0 -76
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js +0 -108
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js +0 -61
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/universal.js +0 -75
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/window.js +0 -66
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/class.js +0 -51
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/custom-element.js +0 -338
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/customizable-select.js +0 -98
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/events.js +0 -338
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/misc.js +0 -58
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/style.js +0 -57
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/transitions.js +0 -472
- package/dist/utils/node_modules/svelte/src/internal/client/dom/hydration.js +0 -120
- package/dist/utils/node_modules/svelte/src/internal/client/dom/legacy/event-modifiers.js +0 -127
- package/dist/utils/node_modules/svelte/src/internal/client/dom/legacy/lifecycle.js +0 -82
- package/dist/utils/node_modules/svelte/src/internal/client/dom/legacy/misc.js +0 -68
- package/dist/utils/node_modules/svelte/src/internal/client/dom/operations.js +0 -260
- package/dist/utils/node_modules/svelte/src/internal/client/dom/reconciler.js +0 -6
- package/dist/utils/node_modules/svelte/src/internal/client/dom/task.js +0 -42
- package/dist/utils/node_modules/svelte/src/internal/client/dom/template.js +0 -388
- package/dist/utils/node_modules/svelte/src/internal/client/error-handling.js +0 -116
- package/dist/utils/node_modules/svelte/src/internal/client/errors.js +0 -491
- package/dist/utils/node_modules/svelte/src/internal/client/hydratable.js +0 -33
- package/dist/utils/node_modules/svelte/src/internal/client/index.js +0 -184
- package/dist/utils/node_modules/svelte/src/internal/client/legacy.js +0 -46
- package/dist/utils/node_modules/svelte/src/internal/client/loop.js +0 -48
- package/dist/utils/node_modules/svelte/src/internal/client/proxy.js +0 -432
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/async.js +0 -302
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/batch.js +0 -988
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/deriveds.js +0 -394
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/effects.js +0 -717
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/equality.js +0 -31
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/props.js +0 -430
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/sources.js +0 -368
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/status.js +0 -25
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/store.js +0 -203
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/utils.js +0 -40
- package/dist/utils/node_modules/svelte/src/internal/client/render.js +0 -319
- package/dist/utils/node_modules/svelte/src/internal/client/runtime.js +0 -831
- package/dist/utils/node_modules/svelte/src/internal/client/timing.js +0 -16
- package/dist/utils/node_modules/svelte/src/internal/client/validate.js +0 -88
- package/dist/utils/node_modules/svelte/src/internal/client/warnings.js +0 -271
- package/dist/utils/node_modules/svelte/src/internal/disclose-version.js +0 -6
- package/dist/utils/node_modules/svelte/src/internal/flags/async.js +0 -3
- package/dist/utils/node_modules/svelte/src/internal/flags/index.js +0 -23
- package/dist/utils/node_modules/svelte/src/internal/flags/legacy.js +0 -3
- package/dist/utils/node_modules/svelte/src/internal/flags/tracing.js +0 -3
- package/dist/utils/node_modules/svelte/src/internal/index.js +0 -5
- package/dist/utils/node_modules/svelte/src/internal/server/abort-signal.js +0 -13
- package/dist/utils/node_modules/svelte/src/internal/server/blocks/html.js +0 -11
- package/dist/utils/node_modules/svelte/src/internal/server/blocks/snippet.js +0 -24
- package/dist/utils/node_modules/svelte/src/internal/server/context.js +0 -122
- package/dist/utils/node_modules/svelte/src/internal/server/crypto.js +0 -41
- package/dist/utils/node_modules/svelte/src/internal/server/dev.js +0 -115
- package/dist/utils/node_modules/svelte/src/internal/server/errors.js +0 -118
- package/dist/utils/node_modules/svelte/src/internal/server/hydratable.js +0 -142
- package/dist/utils/node_modules/svelte/src/internal/server/hydration.js +0 -6
- package/dist/utils/node_modules/svelte/src/internal/server/index.js +0 -490
- package/dist/utils/node_modules/svelte/src/internal/server/render-context.js +0 -86
- package/dist/utils/node_modules/svelte/src/internal/server/renderer.js +0 -770
- package/dist/utils/node_modules/svelte/src/internal/server/warnings.js +0 -29
- package/dist/utils/node_modules/svelte/src/internal/shared/attributes.js +0 -223
- package/dist/utils/node_modules/svelte/src/internal/shared/clone.js +0 -137
- package/dist/utils/node_modules/svelte/src/internal/shared/dev.js +0 -65
- package/dist/utils/node_modules/svelte/src/internal/shared/errors.js +0 -134
- package/dist/utils/node_modules/svelte/src/internal/shared/utils.js +0 -118
- package/dist/utils/node_modules/svelte/src/internal/shared/validate.js +0 -47
- package/dist/utils/node_modules/svelte/src/internal/shared/warnings.js +0 -40
- package/dist/utils/node_modules/svelte/src/legacy/legacy-client.js +0 -280
- package/dist/utils/node_modules/svelte/src/legacy/legacy-server.js +0 -112
- package/dist/utils/node_modules/svelte/src/motion/index.js +0 -32
- package/dist/utils/node_modules/svelte/src/motion/spring.js +0 -369
- package/dist/utils/node_modules/svelte/src/motion/tweened.js +0 -306
- package/dist/utils/node_modules/svelte/src/motion/utils.js +0 -7
- package/dist/utils/node_modules/svelte/src/reactivity/create-subscriber.js +0 -95
- package/dist/utils/node_modules/svelte/src/reactivity/date.js +0 -118
- package/dist/utils/node_modules/svelte/src/reactivity/index-client.js +0 -7
- package/dist/utils/node_modules/svelte/src/reactivity/index-server.js +0 -23
- package/dist/utils/node_modules/svelte/src/reactivity/map.js +0 -273
- package/dist/utils/node_modules/svelte/src/reactivity/media-query.js +0 -55
- package/dist/utils/node_modules/svelte/src/reactivity/reactive-value.js +0 -24
- package/dist/utils/node_modules/svelte/src/reactivity/set.js +0 -213
- package/dist/utils/node_modules/svelte/src/reactivity/url-search-params.js +0 -174
- package/dist/utils/node_modules/svelte/src/reactivity/url.js +0 -205
- package/dist/utils/node_modules/svelte/src/reactivity/window/index.js +0 -161
- package/dist/utils/node_modules/svelte/src/server/index.js +0 -1
- package/dist/utils/node_modules/svelte/src/store/index-client.js +0 -169
- package/dist/utils/node_modules/svelte/src/store/index-server.js +0 -101
- package/dist/utils/node_modules/svelte/src/store/shared/index.js +0 -209
- package/dist/utils/node_modules/svelte/src/store/utils.js +0 -36
- package/dist/utils/node_modules/svelte/src/transition/index.js +0 -300
- package/dist/utils/node_modules/svelte/src/utils.js +0 -491
- package/dist/utils/node_modules/svelte/src/version.js +0 -8
- package/dist/utils/node_modules/typescript/LICENSE.txt +0 -55
- package/dist/utils/node_modules/typescript/README.md +0 -50
- package/dist/utils/node_modules/typescript/SECURITY.md +0 -41
- package/dist/utils/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
- package/dist/utils/node_modules/typescript/bin/tsc +0 -2
- package/dist/utils/node_modules/typescript/bin/tsserver +0 -2
- package/dist/utils/node_modules/typescript/lib/_tsc.js +0 -133818
- package/dist/utils/node_modules/typescript/lib/_tsserver.js +0 -659
- package/dist/utils/node_modules/typescript/lib/_typingsInstaller.js +0 -222
- package/dist/utils/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/tsc.js +0 -8
- package/dist/utils/node_modules/typescript/lib/tsserver.js +0 -8
- package/dist/utils/node_modules/typescript/lib/tsserverlibrary.js +0 -21
- package/dist/utils/node_modules/typescript/lib/typesMap.json +0 -497
- package/dist/utils/node_modules/typescript/lib/typescript.js +0 -200276
- package/dist/utils/node_modules/typescript/lib/typingsInstaller.js +0 -8
- package/dist/utils/node_modules/typescript/lib/watchGuard.js +0 -53
- package/dist/utils/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
- package/dist/utils/node_modules/typescript/package.json +0 -120
- package/dist/utils/package.json +0 -27
package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/utils/check_graph_for_cycles.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @template T
|
|
3
|
-
* @param {Array<[T, T]>} edges
|
|
4
|
-
* @returns {Array<T>|undefined}
|
|
5
|
-
*/
|
|
6
|
-
export default function check_graph_for_cycles(edges) {
|
|
7
|
-
/** @type {Map<T, T[]>} */
|
|
8
|
-
const graph = edges.reduce((g, edge) => {
|
|
9
|
-
const [u, v] = edge;
|
|
10
|
-
if (!g.has(u)) g.set(u, []);
|
|
11
|
-
if (!g.has(v)) g.set(v, []);
|
|
12
|
-
g.get(u).push(v);
|
|
13
|
-
return g;
|
|
14
|
-
}, new Map());
|
|
15
|
-
|
|
16
|
-
const visited = new Set();
|
|
17
|
-
/** @type {Set<T>} */
|
|
18
|
-
const on_stack = new Set();
|
|
19
|
-
/** @type {Array<Array<T>>} */
|
|
20
|
-
const cycles = [];
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @param {T} v
|
|
24
|
-
*/
|
|
25
|
-
function visit(v) {
|
|
26
|
-
visited.add(v);
|
|
27
|
-
on_stack.add(v);
|
|
28
|
-
|
|
29
|
-
graph.get(v)?.forEach((w) => {
|
|
30
|
-
if (!visited.has(w)) {
|
|
31
|
-
visit(w);
|
|
32
|
-
} else if (on_stack.has(w)) {
|
|
33
|
-
cycles.push([...on_stack, w]);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
on_stack.delete(v);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
graph.forEach((_, v) => {
|
|
41
|
-
if (!visited.has(v)) {
|
|
42
|
-
visit(v);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
return cycles[0];
|
|
47
|
-
}
|
package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AnimateDirective.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/** @import { Context } from '../types' */
|
|
2
|
-
/** @import { AST } from '#compiler'; */
|
|
3
|
-
import * as e from '../../../errors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @param {AST.AnimateDirective} node
|
|
7
|
-
* @param {Context} context
|
|
8
|
-
*/
|
|
9
|
-
export function AnimateDirective(node, context) {
|
|
10
|
-
context.next({ ...context.state, expression: node.metadata.expression });
|
|
11
|
-
|
|
12
|
-
if (node.metadata.expression.has_await) {
|
|
13
|
-
e.illegal_await_expression(node);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** @import { ArrowFunctionExpression } from 'estree' */
|
|
2
|
-
/** @import { Context } from '../types' */
|
|
3
|
-
import { visit_function } from './shared/function.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @param {ArrowFunctionExpression} node
|
|
7
|
-
* @param {Context} context
|
|
8
|
-
*/
|
|
9
|
-
export function ArrowFunctionExpression(node, context) {
|
|
10
|
-
visit_function(node, context);
|
|
11
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/** @import { AssignmentExpression } from 'estree' */
|
|
2
|
-
/** @import { Context } from '../types' */
|
|
3
|
-
import { extract_identifiers, object } from '../../../utils/ast.js';
|
|
4
|
-
import { validate_assignment } from './shared/utils.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @param {AssignmentExpression} node
|
|
8
|
-
* @param {Context} context
|
|
9
|
-
*/
|
|
10
|
-
export function AssignmentExpression(node, context) {
|
|
11
|
-
validate_assignment(node, node.left, context);
|
|
12
|
-
|
|
13
|
-
if (context.state.reactive_statement) {
|
|
14
|
-
const id = node.left.type === 'MemberExpression' ? object(node.left) : node.left;
|
|
15
|
-
if (id !== null) {
|
|
16
|
-
for (const id of extract_identifiers(node.left)) {
|
|
17
|
-
const binding = context.state.scope.get(id.name);
|
|
18
|
-
|
|
19
|
-
if (binding) {
|
|
20
|
-
context.state.reactive_statement.assignments.add(binding);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (context.state.expression) {
|
|
27
|
-
context.state.expression.has_assignment = true;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
context.next();
|
|
31
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** @import { AST } from '#compiler' */
|
|
2
|
-
/** @import { Context } from '../types' */
|
|
3
|
-
import { mark_subtree_dynamic } from './shared/fragment.js';
|
|
4
|
-
import * as e from '../../../errors.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @param {AST.AttachTag} node
|
|
8
|
-
* @param {Context} context
|
|
9
|
-
*/
|
|
10
|
-
export function AttachTag(node, context) {
|
|
11
|
-
mark_subtree_dynamic(context.path);
|
|
12
|
-
context.next({ ...context.state, expression: node.metadata.expression });
|
|
13
|
-
|
|
14
|
-
if (node.metadata.expression.has_await) {
|
|
15
|
-
e.illegal_await_expression(node);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/** @import { AST } from '#compiler' */
|
|
2
|
-
/** @import { Context } from '../types' */
|
|
3
|
-
import { cannot_be_set_statically, can_delegate_event } from '../../../../utils.js';
|
|
4
|
-
import { get_attribute_chunks, is_event_attribute } from '../../../utils/ast.js';
|
|
5
|
-
import { mark_subtree_dynamic } from './shared/fragment.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {AST.Attribute} node
|
|
9
|
-
* @param {Context} context
|
|
10
|
-
*/
|
|
11
|
-
export function Attribute(node, context) {
|
|
12
|
-
context.next();
|
|
13
|
-
|
|
14
|
-
const parent = /** @type {AST.SvelteNode} */ (context.path.at(-1));
|
|
15
|
-
|
|
16
|
-
if (parent.type === 'RegularElement') {
|
|
17
|
-
// special case <option value="" />
|
|
18
|
-
if (node.name === 'value' && parent.name === 'option') {
|
|
19
|
-
mark_subtree_dynamic(context.path);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (is_event_attribute(node)) {
|
|
24
|
-
mark_subtree_dynamic(context.path);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (cannot_be_set_statically(node.name)) {
|
|
28
|
-
mark_subtree_dynamic(context.path);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// class={[...]} or class={{...}} or `class={x}` need clsx to resolve the classes
|
|
32
|
-
if (
|
|
33
|
-
node.name === 'class' &&
|
|
34
|
-
!Array.isArray(node.value) &&
|
|
35
|
-
node.value !== true &&
|
|
36
|
-
node.value.expression.type !== 'Literal' &&
|
|
37
|
-
node.value.expression.type !== 'TemplateLiteral' &&
|
|
38
|
-
node.value.expression.type !== 'BinaryExpression'
|
|
39
|
-
) {
|
|
40
|
-
mark_subtree_dynamic(context.path);
|
|
41
|
-
node.metadata.needs_clsx = true;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (node.value !== true) {
|
|
45
|
-
for (const chunk of get_attribute_chunks(node.value)) {
|
|
46
|
-
if (chunk.type !== 'ExpressionTag') continue;
|
|
47
|
-
|
|
48
|
-
if (
|
|
49
|
-
chunk.expression.type === 'FunctionExpression' ||
|
|
50
|
-
chunk.expression.type === 'ArrowFunctionExpression'
|
|
51
|
-
) {
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (is_event_attribute(node)) {
|
|
57
|
-
const parent = context.path.at(-1);
|
|
58
|
-
if (parent?.type === 'RegularElement' || parent?.type === 'SvelteElement') {
|
|
59
|
-
context.state.analysis.uses_event_attributes = true;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
node.metadata.delegated =
|
|
63
|
-
parent?.type === 'RegularElement' && can_delegate_event(node.name.slice(2));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/** @import { AST } from '#compiler' */
|
|
2
|
-
/** @import { Context } from '../types' */
|
|
3
|
-
import { validate_block_not_empty, validate_opening_tag } from './shared/utils.js';
|
|
4
|
-
import * as e from '../../../errors.js';
|
|
5
|
-
import { mark_subtree_dynamic } from './shared/fragment.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {AST.AwaitBlock} node
|
|
9
|
-
* @param {Context} context
|
|
10
|
-
*/
|
|
11
|
-
export function AwaitBlock(node, context) {
|
|
12
|
-
validate_block_not_empty(node.pending, context);
|
|
13
|
-
validate_block_not_empty(node.then, context);
|
|
14
|
-
validate_block_not_empty(node.catch, context);
|
|
15
|
-
|
|
16
|
-
if (context.state.analysis.runes) {
|
|
17
|
-
validate_opening_tag(node, context.state, '#');
|
|
18
|
-
|
|
19
|
-
if (node.value) {
|
|
20
|
-
const start = /** @type {number} */ (node.value.start);
|
|
21
|
-
const match = context.state.analysis.source
|
|
22
|
-
.substring(start - 10, start)
|
|
23
|
-
.match(/{(\s*):then\s+$/);
|
|
24
|
-
|
|
25
|
-
if (match && match[1] !== '') {
|
|
26
|
-
e.block_unexpected_character({ start: start - 10, end: start }, ':');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (node.error) {
|
|
31
|
-
const start = /** @type {number} */ (node.error.start);
|
|
32
|
-
const match = context.state.analysis.source
|
|
33
|
-
.substring(start - 10, start)
|
|
34
|
-
.match(/{(\s*):catch\s+$/);
|
|
35
|
-
|
|
36
|
-
if (match && match[1] !== '') {
|
|
37
|
-
e.block_unexpected_character({ start: start - 10, end: start }, ':');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
mark_subtree_dynamic(context.path);
|
|
43
|
-
|
|
44
|
-
context.visit(node.expression, { ...context.state, expression: node.metadata.expression });
|
|
45
|
-
if (node.pending) context.visit(node.pending);
|
|
46
|
-
if (node.then) context.visit(node.then);
|
|
47
|
-
if (node.catch) context.visit(node.catch);
|
|
48
|
-
}
|
package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AwaitExpression.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/** @import { AwaitExpression, Expression, SpreadElement, Property } from 'estree' */
|
|
2
|
-
/** @import { Context } from '../types' */
|
|
3
|
-
/** @import { AST } from '#compiler' */
|
|
4
|
-
import * as e from '../../../errors.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @param {AwaitExpression} node
|
|
8
|
-
* @param {Context} context
|
|
9
|
-
*/
|
|
10
|
-
export function AwaitExpression(node, context) {
|
|
11
|
-
const tla = context.state.ast_type === 'instance' && context.state.function_depth === 1;
|
|
12
|
-
|
|
13
|
-
// preserve context for awaits that precede other expressions in template or `$derived(...)`
|
|
14
|
-
if (
|
|
15
|
-
is_reactive_expression(
|
|
16
|
-
context.path,
|
|
17
|
-
context.state.derived_function_depth === context.state.function_depth
|
|
18
|
-
) &&
|
|
19
|
-
!is_last_evaluated_expression(context.path, node)
|
|
20
|
-
) {
|
|
21
|
-
context.state.analysis.pickled_awaits.add(node);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
let suspend = tla;
|
|
25
|
-
|
|
26
|
-
if (context.state.expression) {
|
|
27
|
-
context.state.expression.has_await = true;
|
|
28
|
-
|
|
29
|
-
suspend = true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// disallow top-level `await` or `await` in template expressions
|
|
33
|
-
// unless a) in runes mode and b) opted into `experimental.async`
|
|
34
|
-
if (suspend) {
|
|
35
|
-
if (!context.state.options.experimental.async) {
|
|
36
|
-
e.experimental_async(node);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (!context.state.analysis.runes) {
|
|
40
|
-
e.legacy_await_invalid(node);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
context.next();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @param {AST.SvelteNode[]} path
|
|
49
|
-
* @param {boolean} in_derived
|
|
50
|
-
*/
|
|
51
|
-
export function is_reactive_expression(path, in_derived) {
|
|
52
|
-
if (in_derived) return true;
|
|
53
|
-
|
|
54
|
-
let i = path.length;
|
|
55
|
-
|
|
56
|
-
while (i--) {
|
|
57
|
-
const parent = path[i];
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
parent.type === 'ArrowFunctionExpression' ||
|
|
61
|
-
parent.type === 'FunctionExpression' ||
|
|
62
|
-
parent.type === 'FunctionDeclaration'
|
|
63
|
-
) {
|
|
64
|
-
// No reactive expression found between function and await
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// @ts-expect-error we could probably use a neater/more robust mechanism
|
|
69
|
-
if (parent.metadata) {
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* @param {AST.SvelteNode[]} path
|
|
79
|
-
* @param {Expression | SpreadElement | Property} node
|
|
80
|
-
*/
|
|
81
|
-
function is_last_evaluated_expression(path, node) {
|
|
82
|
-
let i = path.length;
|
|
83
|
-
|
|
84
|
-
while (i--) {
|
|
85
|
-
const parent = path[i];
|
|
86
|
-
|
|
87
|
-
if (parent.type === 'ConstTag') {
|
|
88
|
-
// {@const ...} tags are treated as deriveds and its contents should all get the preserve-reactivity treatment
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// @ts-expect-error we could probably use a neater/more robust mechanism
|
|
93
|
-
if (parent.metadata) {
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
switch (parent.type) {
|
|
98
|
-
case 'ArrayExpression':
|
|
99
|
-
if (node !== parent.elements.at(-1)) return false;
|
|
100
|
-
break;
|
|
101
|
-
|
|
102
|
-
case 'AssignmentExpression':
|
|
103
|
-
case 'BinaryExpression':
|
|
104
|
-
case 'LogicalExpression':
|
|
105
|
-
if (node === parent.left) return false;
|
|
106
|
-
break;
|
|
107
|
-
|
|
108
|
-
case 'CallExpression':
|
|
109
|
-
case 'NewExpression':
|
|
110
|
-
if (node !== parent.arguments.at(-1)) return false;
|
|
111
|
-
break;
|
|
112
|
-
|
|
113
|
-
case 'ConditionalExpression':
|
|
114
|
-
if (node === parent.test) return false;
|
|
115
|
-
break;
|
|
116
|
-
|
|
117
|
-
case 'MemberExpression':
|
|
118
|
-
if (parent.computed && node === parent.object) return false;
|
|
119
|
-
break;
|
|
120
|
-
|
|
121
|
-
case 'ObjectExpression':
|
|
122
|
-
if (node !== parent.properties.at(-1)) return false;
|
|
123
|
-
break;
|
|
124
|
-
|
|
125
|
-
case 'Property':
|
|
126
|
-
if (node === parent.key) return false;
|
|
127
|
-
break;
|
|
128
|
-
|
|
129
|
-
case 'SequenceExpression':
|
|
130
|
-
if (node !== parent.expressions.at(-1)) return false;
|
|
131
|
-
break;
|
|
132
|
-
|
|
133
|
-
case 'TaggedTemplateExpression':
|
|
134
|
-
if (node !== parent.quasi.expressions.at(-1)) return false;
|
|
135
|
-
break;
|
|
136
|
-
|
|
137
|
-
case 'TemplateLiteral':
|
|
138
|
-
if (node !== parent.expressions.at(-1)) return false;
|
|
139
|
-
break;
|
|
140
|
-
|
|
141
|
-
case 'VariableDeclarator':
|
|
142
|
-
return true;
|
|
143
|
-
|
|
144
|
-
default:
|
|
145
|
-
return false;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
node = parent;
|
|
149
|
-
}
|
|
150
|
-
}
|
package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
/** @import { AST } from '#compiler' */
|
|
2
|
-
/** @import { Context } from '../types' */
|
|
3
|
-
import {
|
|
4
|
-
extract_all_identifiers_from_expression,
|
|
5
|
-
is_text_attribute,
|
|
6
|
-
object
|
|
7
|
-
} from '../../../utils/ast.js';
|
|
8
|
-
import { validate_assignment } from './shared/utils.js';
|
|
9
|
-
import * as e from '../../../errors.js';
|
|
10
|
-
import * as w from '../../../warnings.js';
|
|
11
|
-
import { binding_properties } from '../../bindings.js';
|
|
12
|
-
import fuzzymatch from '../../1-parse/utils/fuzzymatch.js';
|
|
13
|
-
import { is_content_editable_binding, is_svg } from '../../../../utils.js';
|
|
14
|
-
import { mark_subtree_dynamic } from './shared/fragment.js';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @param {AST.BindDirective} node
|
|
18
|
-
* @param {Context} context
|
|
19
|
-
*/
|
|
20
|
-
export function BindDirective(node, context) {
|
|
21
|
-
const parent = context.path.at(-1);
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
parent?.type === 'RegularElement' ||
|
|
25
|
-
parent?.type === 'SvelteElement' ||
|
|
26
|
-
parent?.type === 'SvelteWindow' ||
|
|
27
|
-
parent?.type === 'SvelteDocument' ||
|
|
28
|
-
parent?.type === 'SvelteBody'
|
|
29
|
-
) {
|
|
30
|
-
if (node.name in binding_properties) {
|
|
31
|
-
const property = binding_properties[node.name];
|
|
32
|
-
if (property.valid_elements && !property.valid_elements.includes(parent.name)) {
|
|
33
|
-
e.bind_invalid_target(
|
|
34
|
-
node,
|
|
35
|
-
node.name,
|
|
36
|
-
property.valid_elements.map((valid_element) => `\`<${valid_element}>\``).join(', ')
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (property.invalid_elements && property.invalid_elements.includes(parent.name)) {
|
|
41
|
-
const valid_bindings = Object.entries(binding_properties)
|
|
42
|
-
.filter(([_, binding_property]) => {
|
|
43
|
-
return (
|
|
44
|
-
binding_property.valid_elements?.includes(parent.name) ||
|
|
45
|
-
(!binding_property.valid_elements &&
|
|
46
|
-
!binding_property.invalid_elements?.includes(parent.name))
|
|
47
|
-
);
|
|
48
|
-
})
|
|
49
|
-
.map(([property_name]) => property_name)
|
|
50
|
-
.sort();
|
|
51
|
-
|
|
52
|
-
e.bind_invalid_name(
|
|
53
|
-
node,
|
|
54
|
-
node.name,
|
|
55
|
-
`Possible bindings for <${parent.name}> are ${valid_bindings.join(', ')}`
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (parent.name === 'input' && node.name !== 'this') {
|
|
60
|
-
const type = /** @type {AST.Attribute | undefined} */ (
|
|
61
|
-
parent.attributes.find((a) => a.type === 'Attribute' && a.name === 'type')
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
if (type && !is_text_attribute(type)) {
|
|
65
|
-
if (node.name !== 'value' || type.value === true) {
|
|
66
|
-
e.attribute_invalid_type(type);
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
if (node.name === 'checked' && type?.value[0].data !== 'checkbox') {
|
|
70
|
-
e.bind_invalid_target(
|
|
71
|
-
node,
|
|
72
|
-
node.name,
|
|
73
|
-
`\`<input type="checkbox">\`${type?.value[0].data === 'radio' ? ` — for \`<input type="radio">\`, use \`bind:group\`` : ''}`
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (node.name === 'files' && type?.value[0].data !== 'file') {
|
|
78
|
-
e.bind_invalid_target(node, node.name, '`<input type="file">`');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if (parent.name === 'select' && node.name !== 'this') {
|
|
84
|
-
const multiple = parent.attributes.find(
|
|
85
|
-
(a) =>
|
|
86
|
-
a.type === 'Attribute' &&
|
|
87
|
-
a.name === 'multiple' &&
|
|
88
|
-
!is_text_attribute(a) &&
|
|
89
|
-
a.value !== true
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
if (multiple) {
|
|
93
|
-
e.attribute_invalid_multiple(multiple);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (node.name === 'offsetWidth' && is_svg(parent.name)) {
|
|
98
|
-
e.bind_invalid_target(
|
|
99
|
-
node,
|
|
100
|
-
node.name,
|
|
101
|
-
`non-\`<svg>\` elements. Use \`bind:clientWidth\` for \`<svg>\` instead`
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (is_content_editable_binding(node.name)) {
|
|
106
|
-
const contenteditable = /** @type {AST.Attribute} */ (
|
|
107
|
-
parent.attributes.find((a) => a.type === 'Attribute' && a.name === 'contenteditable')
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
if (!contenteditable) {
|
|
111
|
-
e.attribute_contenteditable_missing(node);
|
|
112
|
-
} else if (!is_text_attribute(contenteditable) && contenteditable.value !== true) {
|
|
113
|
-
e.attribute_contenteditable_dynamic(contenteditable);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
} else {
|
|
117
|
-
const match = fuzzymatch(node.name, Object.keys(binding_properties));
|
|
118
|
-
|
|
119
|
-
if (match) {
|
|
120
|
-
const property = binding_properties[match];
|
|
121
|
-
if (!property.valid_elements || property.valid_elements.includes(parent.name)) {
|
|
122
|
-
e.bind_invalid_name(node, node.name, `Did you mean '${match}'?`);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
e.bind_invalid_name(node, node.name);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// When dealing with bind getters/setters skip the specific binding validation
|
|
131
|
-
// Group bindings aren't supported for getter/setters so we don't need to handle
|
|
132
|
-
// the metadata
|
|
133
|
-
if (node.expression.type === 'SequenceExpression') {
|
|
134
|
-
if (node.name === 'group') {
|
|
135
|
-
e.bind_group_invalid_expression(node);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
let i = /** @type {number} */ (node.expression.start);
|
|
139
|
-
let leading_comments_start = /**@type {any}*/ (node.expression.leadingComments?.at(0))?.start;
|
|
140
|
-
let leading_comments_end = /**@type {any}*/ (node.expression.leadingComments?.at(-1))?.end;
|
|
141
|
-
while (context.state.analysis.source[--i] !== '{') {
|
|
142
|
-
if (
|
|
143
|
-
context.state.analysis.source[i] === '(' &&
|
|
144
|
-
// if the parenthesis is in a leading comment we don't need to throw the error
|
|
145
|
-
!(
|
|
146
|
-
leading_comments_start &&
|
|
147
|
-
leading_comments_end &&
|
|
148
|
-
i <= leading_comments_end &&
|
|
149
|
-
i >= leading_comments_start
|
|
150
|
-
)
|
|
151
|
-
) {
|
|
152
|
-
e.bind_invalid_parens(node, node.name);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (node.expression.expressions.length !== 2) {
|
|
157
|
-
e.bind_invalid_expression(node);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
mark_subtree_dynamic(context.path);
|
|
161
|
-
|
|
162
|
-
const [get, set] = node.expression.expressions;
|
|
163
|
-
// We gotta jump across the getter/setter functions to avoid the expression metadata field being reset to null
|
|
164
|
-
// as we want to collect the functions' blocker/async info
|
|
165
|
-
context.visit(get.type === 'ArrowFunctionExpression' ? get.body : get, {
|
|
166
|
-
...context.state,
|
|
167
|
-
expression: node.metadata.expression
|
|
168
|
-
});
|
|
169
|
-
context.visit(set.type === 'ArrowFunctionExpression' ? set.body : set, {
|
|
170
|
-
...context.state,
|
|
171
|
-
expression: node.metadata.expression
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
if (node.metadata.expression.has_await) {
|
|
175
|
-
e.illegal_await_expression(node);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
validate_assignment(node, node.expression, context);
|
|
182
|
-
|
|
183
|
-
const assignee = node.expression;
|
|
184
|
-
const left = object(assignee);
|
|
185
|
-
|
|
186
|
-
if (left === null) {
|
|
187
|
-
e.bind_invalid_expression(node);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const binding = context.state.scope.get(left.name);
|
|
191
|
-
node.metadata.binding = binding;
|
|
192
|
-
|
|
193
|
-
if (assignee.type === 'Identifier') {
|
|
194
|
-
// reassignment
|
|
195
|
-
if (
|
|
196
|
-
node.name !== 'this' && // bind:this also works for regular variables
|
|
197
|
-
(!binding ||
|
|
198
|
-
(binding.kind !== 'state' &&
|
|
199
|
-
binding.kind !== 'raw_state' &&
|
|
200
|
-
binding.kind !== 'prop' &&
|
|
201
|
-
binding.kind !== 'bindable_prop' &&
|
|
202
|
-
binding.kind !== 'each' &&
|
|
203
|
-
binding.kind !== 'store_sub' &&
|
|
204
|
-
!binding.updated)) // TODO wut?
|
|
205
|
-
) {
|
|
206
|
-
e.bind_invalid_value(node.expression);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (node.name === 'group') {
|
|
211
|
-
if (!binding) {
|
|
212
|
-
throw new Error('Cannot find declaration for bind:group');
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
if (binding.kind === 'snippet') {
|
|
216
|
-
e.bind_group_invalid_snippet_parameter(node);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// Traverse the path upwards and find all EachBlocks who are (indirectly) contributing to bind:group,
|
|
220
|
-
// i.e. one of their declarations is referenced in the binding. This allows group bindings to work
|
|
221
|
-
// correctly when referencing a variable declared in an EachBlock by using the index of the each block
|
|
222
|
-
// entries as keys.
|
|
223
|
-
const each_blocks = [];
|
|
224
|
-
const [keypath, expression_ids] = extract_all_identifiers_from_expression(node.expression);
|
|
225
|
-
let ids = expression_ids;
|
|
226
|
-
|
|
227
|
-
let i = context.path.length;
|
|
228
|
-
while (i--) {
|
|
229
|
-
const parent = context.path[i];
|
|
230
|
-
|
|
231
|
-
if (parent.type === 'EachBlock') {
|
|
232
|
-
const references = ids.filter((id) => parent.metadata.declarations.has(id.name));
|
|
233
|
-
|
|
234
|
-
if (references.length > 0) {
|
|
235
|
-
parent.metadata.contains_group_binding = true;
|
|
236
|
-
|
|
237
|
-
each_blocks.push(parent);
|
|
238
|
-
ids = ids.filter((id) => !references.includes(id));
|
|
239
|
-
ids.push(...extract_all_identifiers_from_expression(parent.expression)[1]);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// The identifiers that make up the binding expression form they key for the binding group.
|
|
245
|
-
// If the same identifiers in the same order are used in another bind:group, they will be in the same group.
|
|
246
|
-
// (there's an edge case where `bind:group={a[i]}` will be in a different group than `bind:group={a[j]}` even when i == j,
|
|
247
|
-
// but this is a limitation of the current static analysis we do; it also never worked in Svelte 4)
|
|
248
|
-
const bindings = expression_ids.map((id) => context.state.scope.get(id.name));
|
|
249
|
-
let group_name;
|
|
250
|
-
|
|
251
|
-
outer: for (const [[key, b], group] of context.state.analysis.binding_groups) {
|
|
252
|
-
if (b.length !== bindings.length || key !== keypath) continue;
|
|
253
|
-
for (let i = 0; i < bindings.length; i++) {
|
|
254
|
-
if (bindings[i] !== b[i]) continue outer;
|
|
255
|
-
}
|
|
256
|
-
group_name = group;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (!group_name) {
|
|
260
|
-
group_name = context.state.scope.root.unique('binding_group');
|
|
261
|
-
context.state.analysis.binding_groups.set([keypath, bindings], group_name);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
node.metadata = {
|
|
265
|
-
binding_group_name: group_name,
|
|
266
|
-
parent_each_blocks: each_blocks,
|
|
267
|
-
expression: node.metadata.expression
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
if (binding?.kind === 'each' && binding.metadata?.inside_rest) {
|
|
272
|
-
w.bind_invalid_each_rest(binding.node, binding.node.name);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
context.next({ ...context.state, expression: node.metadata.expression });
|
|
276
|
-
|
|
277
|
-
if (node.metadata.expression.has_await) {
|
|
278
|
-
e.illegal_await_expression(node);
|
|
279
|
-
}
|
|
280
|
-
}
|