lumen-plus 0.0.3 → 0.0.4
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/dist/index.js +2 -0
- package/dist/theme-chalk/_index.scss +69 -0
- package/dist/theme-chalk/_reset.scss +16 -0
- package/dist/theme-chalk/_variables.scss +91 -0
- package/dist/theme-chalk/affix.scss +8 -0
- package/dist/theme-chalk/alert.scss +140 -0
- package/dist/theme-chalk/autocomplete.scss +238 -0
- package/dist/theme-chalk/avatar.scss +49 -0
- package/dist/theme-chalk/backtop.scss +55 -0
- package/dist/theme-chalk/badge.scss +47 -0
- package/dist/theme-chalk/breadcrumb.scss +50 -0
- package/dist/theme-chalk/button.scss +472 -0
- package/dist/theme-chalk/calendar.scss +166 -0
- package/dist/theme-chalk/card.scss +70 -0
- package/dist/theme-chalk/carousel.scss +167 -0
- package/dist/theme-chalk/cascader.scss +265 -0
- package/dist/theme-chalk/checkbox.scss +127 -0
- package/dist/theme-chalk/collapse.scss +100 -0
- package/dist/theme-chalk/color-picker.scss +247 -0
- package/dist/theme-chalk/container.scss +79 -0
- package/dist/theme-chalk/date-picker.scss +352 -0
- package/dist/theme-chalk/date-time-picker.scss +396 -0
- package/dist/theme-chalk/descriptions.scss +160 -0
- package/dist/theme-chalk/dialog.scss +154 -0
- package/dist/theme-chalk/divider.scss +61 -0
- package/dist/theme-chalk/drawer.scss +211 -0
- package/dist/theme-chalk/dropdown.scss +230 -0
- package/dist/theme-chalk/empty.scss +36 -0
- package/dist/theme-chalk/form.scss +187 -0
- package/dist/theme-chalk/icon.scss +16 -0
- package/dist/theme-chalk/image.scss +171 -0
- package/dist/theme-chalk/input-number.scss +229 -0
- package/dist/theme-chalk/input-tag.scss +119 -0
- package/dist/theme-chalk/input.scss +249 -0
- package/dist/theme-chalk/link.scss +28 -0
- package/dist/theme-chalk/loading.scss +68 -0
- package/dist/theme-chalk/menu.scss +239 -0
- package/dist/theme-chalk/message.scss +150 -0
- package/dist/theme-chalk/messagebox.scss +76 -0
- package/dist/theme-chalk/mixins/_bem.scss +103 -0
- package/dist/theme-chalk/mixins/_function.scss +12 -0
- package/dist/theme-chalk/notification.scss +164 -0
- package/dist/theme-chalk/pagination.scss +130 -0
- package/dist/theme-chalk/pin-input.scss +192 -0
- package/dist/theme-chalk/popconfirm.scss +194 -0
- package/dist/theme-chalk/popover.scss +196 -0
- package/dist/theme-chalk/progress.scss +51 -0
- package/dist/theme-chalk/radio.scss +128 -0
- package/dist/theme-chalk/rating.scss +227 -0
- package/dist/theme-chalk/result.scss +80 -0
- package/dist/theme-chalk/segmented.scss +108 -0
- package/dist/theme-chalk/select.scss +301 -0
- package/dist/theme-chalk/skeleton.scss +113 -0
- package/dist/theme-chalk/slider.scss +259 -0
- package/dist/theme-chalk/space.scss +44 -0
- package/dist/theme-chalk/statistic.scss +49 -0
- package/dist/theme-chalk/steps.scss +255 -0
- package/dist/theme-chalk/switch.scss +277 -0
- package/dist/theme-chalk/table.scss +343 -0
- package/dist/theme-chalk/tabs.scss +433 -0
- package/dist/theme-chalk/tag.scss +143 -0
- package/dist/theme-chalk/textarea.scss +125 -0
- package/dist/theme-chalk/time-picker.scss +321 -0
- package/dist/theme-chalk/timeline.scss +119 -0
- package/dist/theme-chalk/tooltip.scss +165 -0
- package/dist/theme-chalk/transfer.scss +219 -0
- package/dist/theme-chalk/tree-select.scss +384 -0
- package/dist/theme-chalk/tree.scss +101 -0
- package/dist/theme-chalk/upload.scss +457 -0
- package/dist/theme-chalk/watermark.scss +30 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/node_modules/.bin/tsc +2 -0
- package/dist/utils/node_modules/.bin/tsserver +2 -0
- package/dist/utils/node_modules/svelte/LICENSE.md +7 -0
- package/dist/utils/node_modules/svelte/README.md +41 -0
- package/dist/utils/node_modules/svelte/compiler/index.js +1 -0
- package/dist/utils/node_modules/svelte/compiler/package.json +3 -0
- package/dist/utils/node_modules/svelte/package.json +184 -0
- package/dist/utils/node_modules/svelte/src/animate/index.js +78 -0
- package/dist/utils/node_modules/svelte/src/attachments/index.js +113 -0
- package/dist/utils/node_modules/svelte/src/compiler/errors.js +1719 -0
- package/dist/utils/node_modules/svelte/src/compiler/index.js +198 -0
- package/dist/utils/node_modules/svelte/src/compiler/legacy.js +632 -0
- package/dist/utils/node_modules/svelte/src/compiler/migrate/index.js +1996 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/acorn.js +198 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/index.js +326 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/context.js +116 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/expression.js +93 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/options.js +261 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/script.js +97 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/read/style.js +633 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/remove_typescript_nodes.js +180 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/element.js +877 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/fragment.js +17 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/tag.js +751 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/state/text.js +23 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/bracket.js +213 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/create.js +16 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/entities.js +2234 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/fuzzymatch.js +280 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/1-parse/utils/html.js +127 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/css-analyze.js +331 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/css-prune.js +1160 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/css-warn.js +47 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/css/utils.js +177 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/index.js +1283 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/utils/check_graph_for_cycles.js +47 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AnimateDirective.js +15 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ArrowFunctionExpression.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AssignmentExpression.js +31 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AttachTag.js +17 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Attribute.js +66 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AwaitBlock.js +48 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/AwaitExpression.js +150 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js +280 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js +339 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js +156 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ClassDeclaration.js +25 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ClassDirective.js +13 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Component.js +26 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ConstTag.js +45 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/DebugTag.js +15 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/EachBlock.js +97 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExportDefaultDeclaration.js +20 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExportNamedDeclaration.js +70 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExportSpecifier.js +30 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExpressionStatement.js +38 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ExpressionTag.js +26 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Fragment.js +10 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/FunctionDeclaration.js +16 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/FunctionExpression.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/HtmlTag.js +19 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Identifier.js +193 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/IfBlock.js +27 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/ImportDeclaration.js +31 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/KeyBlock.js +21 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/LabeledStatement.js +95 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/LetDirective.js +24 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Literal.js +14 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/MemberExpression.js +28 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/NewExpression.js +17 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/OnDirective.js +28 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/PropertyDefinition.js +21 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/RegularElement.js +210 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/RenderTag.js +68 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SlotElement.js +42 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SnippetBlock.js +113 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SpreadAttribute.js +13 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SpreadElement.js +16 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/StyleDirective.js +39 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteBody.js +22 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteBoundary.js +30 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteComponent.js +18 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteDocument.js +24 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteElement.js +78 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteFragment.js +27 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteHead.js +18 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteSelf.js +36 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/SvelteWindow.js +24 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TaggedTemplateExpression.js +16 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TemplateElement.js +12 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/Text.js +52 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TitleElement.js +21 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/TransitionDirective.js +19 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/UpdateExpression.js +29 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/UseDirective.js +18 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/VariableDeclarator.js +160 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/constants.js +319 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js +977 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/attribute.js +125 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/component.js +177 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/element.js +160 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/fragment.js +15 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/function.js +24 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/snippets.js +17 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/special-element.js +16 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/2-analyze/visitors/shared/utils.js +301 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-client.js +709 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-template/fix-attribute-casing.js +18 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-template/index.js +67 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/transform-template/template.js +162 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/utils.js +181 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AnimateDirective.js +38 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ArrowFunctionExpression.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AssignmentExpression.js +225 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AttachTag.js +26 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Attribute.js +14 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AwaitBlock.js +124 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/AwaitExpression.js +25 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BinaryExpression.js +34 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BindDirective.js +290 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BlockStatement.js +32 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/BreakStatement.js +20 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/CallExpression.js +136 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ClassBody.js +111 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Comment.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Component.js +12 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ConstTag.js +134 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/DebugTag.js +28 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/EachBlock.js +367 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ExportNamedDeclaration.js +19 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ExpressionStatement.js +20 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/ForOfStatement.js +25 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Fragment.js +181 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/FunctionDeclaration.js +12 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/FunctionExpression.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/HtmlTag.js +49 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Identifier.js +45 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/IfBlock.js +90 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/KeyBlock.js +39 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/LabeledStatement.js +64 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/LetDirective.js +55 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/MemberExpression.js +23 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/OnDirective.js +38 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/Program.js +153 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js +791 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/RenderTag.js +91 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SlotElement.js +94 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SnippetBlock.js +94 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SpreadAttribute.js +10 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteBody.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteBoundary.js +126 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteComponent.js +13 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteDocument.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteElement.js +157 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteFragment.js +17 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteHead.js +23 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteSelf.js +13 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/SvelteWindow.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/TitleElement.js +48 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/TransitionDirective.js +41 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/UpdateExpression.js +55 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/UseDirective.js +49 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/VariableDeclaration.js +422 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/component.js +530 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/declarations.js +53 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/element.js +263 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/events.js +176 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/fragment.js +185 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/function.js +17 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/special_element.js +22 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/client/visitors/shared/utils.js +513 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/css/index.js +479 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/index.js +118 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/transform-server.js +423 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/AssignmentExpression.js +107 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/AwaitBlock.js +37 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/AwaitExpression.js +40 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/CallExpression.js +71 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/ClassBody.js +81 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Component.js +12 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/ConstTag.js +49 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/DebugTag.js +24 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/EachBlock.js +80 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/ExpressionStatement.js +23 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Fragment.js +53 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/HtmlTag.js +26 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Identifier.js +19 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/IfBlock.js +39 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/KeyBlock.js +22 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/LabeledStatement.js +24 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/MemberExpression.js +19 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/Program.js +25 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/PropertyDefinition.js +37 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/RegularElement.js +255 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/RenderTag.js +51 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SlotElement.js +77 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SnippetBlock.js +29 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SpreadAttribute.js +10 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteBoundary.js +71 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteComponent.js +12 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteElement.js +102 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteFragment.js +11 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteHead.js +25 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/SvelteSelf.js +12 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/TitleElement.js +21 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/UpdateExpression.js +26 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/VariableDeclaration.js +212 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/shared/component.js +360 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/shared/element.js +563 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/server/visitors/shared/utils.js +407 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/shared/assignments.js +93 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/shared/transform-async.js +114 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/3-transform/utils.js +451 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/bindings.js +227 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/css.js +14 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/nodes.js +245 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/patterns.js +27 -0
- package/dist/utils/node_modules/svelte/src/compiler/phases/scope.js +1412 -0
- package/dist/utils/node_modules/svelte/src/compiler/preprocess/decode_sourcemap.js +96 -0
- package/dist/utils/node_modules/svelte/src/compiler/preprocess/index.js +368 -0
- package/dist/utils/node_modules/svelte/src/compiler/preprocess/replace_in_code.js +72 -0
- package/dist/utils/node_modules/svelte/src/compiler/print/index.js +890 -0
- package/dist/utils/node_modules/svelte/src/compiler/state.js +144 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/assert.js +9 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/ast.js +639 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/builders.js +698 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/compile_diagnostic.js +107 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/extract_svelte_ignore.js +104 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/mapped_code.js +454 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/push_array.js +13 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/sanitize_template_string.js +7 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/slot.js +20 -0
- package/dist/utils/node_modules/svelte/src/compiler/utils/string.js +9 -0
- package/dist/utils/node_modules/svelte/src/compiler/validate-options.js +324 -0
- package/dist/utils/node_modules/svelte/src/compiler/warnings.js +845 -0
- package/dist/utils/node_modules/svelte/src/constants.js +64 -0
- package/dist/utils/node_modules/svelte/src/easing/index.js +286 -0
- package/dist/utils/node_modules/svelte/src/escaping.js +26 -0
- package/dist/utils/node_modules/svelte/src/events/index.js +1 -0
- package/dist/utils/node_modules/svelte/src/html-tree-validation.js +238 -0
- package/dist/utils/node_modules/svelte/src/index-client.js +255 -0
- package/dist/utils/node_modules/svelte/src/index-server.js +56 -0
- package/dist/utils/node_modules/svelte/src/internal/client/constants.js +73 -0
- package/dist/utils/node_modules/svelte/src/internal/client/context.js +258 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/assign.js +78 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/console-log.js +35 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/css.js +31 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/debug.js +500 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/elements.js +63 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/equality.js +101 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/hmr.js +89 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/inspect.js +72 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/legacy.js +25 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/ownership.js +81 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/tracing.js +162 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dev/validation.js +16 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/async.js +64 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/await.js +142 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/boundary.js +507 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/branches.js +227 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/css-props.js +28 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/each.js +666 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/html.js +121 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/if.js +70 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/key.js +33 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/slot.js +44 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/snippet.js +103 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/svelte-component.js +26 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/svelte-element.js +152 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js +59 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/css.js +32 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/actions.js +43 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/attachments.js +33 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/attributes.js +657 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/document.js +17 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/input.js +312 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/media.js +232 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/navigator.js +11 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/props.js +22 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/select.js +159 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js +76 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js +108 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js +61 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/universal.js +75 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/bindings/window.js +66 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/class.js +51 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/custom-element.js +338 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/customizable-select.js +98 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/events.js +338 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/misc.js +58 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/style.js +57 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/elements/transitions.js +472 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/hydration.js +120 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/legacy/event-modifiers.js +127 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/legacy/lifecycle.js +82 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/legacy/misc.js +68 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/operations.js +260 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/reconciler.js +6 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/task.js +42 -0
- package/dist/utils/node_modules/svelte/src/internal/client/dom/template.js +388 -0
- package/dist/utils/node_modules/svelte/src/internal/client/error-handling.js +116 -0
- package/dist/utils/node_modules/svelte/src/internal/client/errors.js +491 -0
- package/dist/utils/node_modules/svelte/src/internal/client/hydratable.js +33 -0
- package/dist/utils/node_modules/svelte/src/internal/client/index.js +184 -0
- package/dist/utils/node_modules/svelte/src/internal/client/legacy.js +46 -0
- package/dist/utils/node_modules/svelte/src/internal/client/loop.js +48 -0
- package/dist/utils/node_modules/svelte/src/internal/client/proxy.js +432 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/async.js +302 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/batch.js +988 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/deriveds.js +394 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/effects.js +717 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/equality.js +31 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/props.js +430 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/sources.js +368 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/status.js +25 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/store.js +203 -0
- package/dist/utils/node_modules/svelte/src/internal/client/reactivity/utils.js +40 -0
- package/dist/utils/node_modules/svelte/src/internal/client/render.js +319 -0
- package/dist/utils/node_modules/svelte/src/internal/client/runtime.js +831 -0
- package/dist/utils/node_modules/svelte/src/internal/client/timing.js +16 -0
- package/dist/utils/node_modules/svelte/src/internal/client/validate.js +88 -0
- package/dist/utils/node_modules/svelte/src/internal/client/warnings.js +271 -0
- package/dist/utils/node_modules/svelte/src/internal/disclose-version.js +6 -0
- package/dist/utils/node_modules/svelte/src/internal/flags/async.js +3 -0
- package/dist/utils/node_modules/svelte/src/internal/flags/index.js +23 -0
- package/dist/utils/node_modules/svelte/src/internal/flags/legacy.js +3 -0
- package/dist/utils/node_modules/svelte/src/internal/flags/tracing.js +3 -0
- package/dist/utils/node_modules/svelte/src/internal/index.js +5 -0
- package/dist/utils/node_modules/svelte/src/internal/server/abort-signal.js +13 -0
- package/dist/utils/node_modules/svelte/src/internal/server/blocks/html.js +11 -0
- package/dist/utils/node_modules/svelte/src/internal/server/blocks/snippet.js +24 -0
- package/dist/utils/node_modules/svelte/src/internal/server/context.js +122 -0
- package/dist/utils/node_modules/svelte/src/internal/server/crypto.js +41 -0
- package/dist/utils/node_modules/svelte/src/internal/server/dev.js +115 -0
- package/dist/utils/node_modules/svelte/src/internal/server/errors.js +118 -0
- package/dist/utils/node_modules/svelte/src/internal/server/hydratable.js +142 -0
- package/dist/utils/node_modules/svelte/src/internal/server/hydration.js +6 -0
- package/dist/utils/node_modules/svelte/src/internal/server/index.js +490 -0
- package/dist/utils/node_modules/svelte/src/internal/server/render-context.js +86 -0
- package/dist/utils/node_modules/svelte/src/internal/server/renderer.js +770 -0
- package/dist/utils/node_modules/svelte/src/internal/server/warnings.js +29 -0
- package/dist/utils/node_modules/svelte/src/internal/shared/attributes.js +223 -0
- package/dist/utils/node_modules/svelte/src/internal/shared/clone.js +137 -0
- package/dist/utils/node_modules/svelte/src/internal/shared/dev.js +65 -0
- package/dist/utils/node_modules/svelte/src/internal/shared/errors.js +134 -0
- package/dist/utils/node_modules/svelte/src/internal/shared/utils.js +118 -0
- package/dist/utils/node_modules/svelte/src/internal/shared/validate.js +47 -0
- package/dist/utils/node_modules/svelte/src/internal/shared/warnings.js +40 -0
- package/dist/utils/node_modules/svelte/src/legacy/legacy-client.js +280 -0
- package/dist/utils/node_modules/svelte/src/legacy/legacy-server.js +112 -0
- package/dist/utils/node_modules/svelte/src/motion/index.js +32 -0
- package/dist/utils/node_modules/svelte/src/motion/spring.js +369 -0
- package/dist/utils/node_modules/svelte/src/motion/tweened.js +306 -0
- package/dist/utils/node_modules/svelte/src/motion/utils.js +7 -0
- package/dist/utils/node_modules/svelte/src/reactivity/create-subscriber.js +95 -0
- package/dist/utils/node_modules/svelte/src/reactivity/date.js +118 -0
- package/dist/utils/node_modules/svelte/src/reactivity/index-client.js +7 -0
- package/dist/utils/node_modules/svelte/src/reactivity/index-server.js +23 -0
- package/dist/utils/node_modules/svelte/src/reactivity/map.js +273 -0
- package/dist/utils/node_modules/svelte/src/reactivity/media-query.js +55 -0
- package/dist/utils/node_modules/svelte/src/reactivity/reactive-value.js +24 -0
- package/dist/utils/node_modules/svelte/src/reactivity/set.js +213 -0
- package/dist/utils/node_modules/svelte/src/reactivity/url-search-params.js +174 -0
- package/dist/utils/node_modules/svelte/src/reactivity/url.js +205 -0
- package/dist/utils/node_modules/svelte/src/reactivity/window/index.js +161 -0
- package/dist/utils/node_modules/svelte/src/server/index.js +1 -0
- package/dist/utils/node_modules/svelte/src/store/index-client.js +169 -0
- package/dist/utils/node_modules/svelte/src/store/index-server.js +101 -0
- package/dist/utils/node_modules/svelte/src/store/shared/index.js +209 -0
- package/dist/utils/node_modules/svelte/src/store/utils.js +36 -0
- package/dist/utils/node_modules/svelte/src/transition/index.js +300 -0
- package/dist/utils/node_modules/svelte/src/utils.js +491 -0
- package/dist/utils/node_modules/svelte/src/version.js +8 -0
- package/dist/utils/node_modules/typescript/LICENSE.txt +55 -0
- package/dist/utils/node_modules/typescript/README.md +50 -0
- package/dist/utils/node_modules/typescript/SECURITY.md +41 -0
- package/dist/utils/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/dist/utils/node_modules/typescript/bin/tsc +2 -0
- package/dist/utils/node_modules/typescript/bin/tsserver +2 -0
- package/dist/utils/node_modules/typescript/lib/_tsc.js +133818 -0
- package/dist/utils/node_modules/typescript/lib/_tsserver.js +659 -0
- package/dist/utils/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/dist/utils/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/tsc.js +8 -0
- package/dist/utils/node_modules/typescript/lib/tsserver.js +8 -0
- package/dist/utils/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/dist/utils/node_modules/typescript/lib/typesMap.json +497 -0
- package/dist/utils/node_modules/typescript/lib/typescript.js +200276 -0
- package/dist/utils/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/dist/utils/node_modules/typescript/lib/watchGuard.js +53 -0
- package/dist/utils/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- package/dist/utils/node_modules/typescript/package.json +120 -0
- package/dist/utils/package.json +27 -0
- package/dist/utils/transitions.js +31 -0
- package/package.json +8 -2
|
@@ -0,0 +1,988 @@
|
|
|
1
|
+
/** @import { Fork } from 'svelte' */
|
|
2
|
+
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
3
|
+
/** @import { Boundary } from '../dom/blocks/boundary' */
|
|
4
|
+
import {
|
|
5
|
+
BLOCK_EFFECT,
|
|
6
|
+
BRANCH_EFFECT,
|
|
7
|
+
CLEAN,
|
|
8
|
+
DESTROYED,
|
|
9
|
+
DIRTY,
|
|
10
|
+
EFFECT,
|
|
11
|
+
ASYNC,
|
|
12
|
+
INERT,
|
|
13
|
+
RENDER_EFFECT,
|
|
14
|
+
ROOT_EFFECT,
|
|
15
|
+
MAYBE_DIRTY,
|
|
16
|
+
DERIVED,
|
|
17
|
+
BOUNDARY_EFFECT,
|
|
18
|
+
EAGER_EFFECT,
|
|
19
|
+
HEAD_EFFECT,
|
|
20
|
+
ERROR_VALUE,
|
|
21
|
+
MANAGED_EFFECT
|
|
22
|
+
} from '#client/constants';
|
|
23
|
+
import { async_mode_flag } from '../../flags/index.js';
|
|
24
|
+
import { deferred, define_property } from '../../shared/utils.js';
|
|
25
|
+
import {
|
|
26
|
+
active_effect,
|
|
27
|
+
get,
|
|
28
|
+
increment_write_version,
|
|
29
|
+
is_dirty,
|
|
30
|
+
update_effect
|
|
31
|
+
} from '../runtime.js';
|
|
32
|
+
import * as e from '../errors.js';
|
|
33
|
+
import { flush_tasks, queue_micro_task } from '../dom/task.js';
|
|
34
|
+
import { DEV } from 'esm-env';
|
|
35
|
+
import { invoke_error_boundary } from '../error-handling.js';
|
|
36
|
+
import { flush_eager_effects, old_values, set_eager_effects, source, update } from './sources.js';
|
|
37
|
+
import { eager_effect, unlink_effect } from './effects.js';
|
|
38
|
+
import { defer_effect } from './utils.js';
|
|
39
|
+
import { UNINITIALIZED } from '../../../constants.js';
|
|
40
|
+
import { set_signal_status } from './status.js';
|
|
41
|
+
|
|
42
|
+
/** @type {Set<Batch>} */
|
|
43
|
+
const batches = new Set();
|
|
44
|
+
|
|
45
|
+
/** @type {Batch | null} */
|
|
46
|
+
export let current_batch = null;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* This is needed to avoid overwriting inputs in non-async mode
|
|
50
|
+
* TODO 6.0 remove this, as non-async mode will go away
|
|
51
|
+
* @type {Batch | null}
|
|
52
|
+
*/
|
|
53
|
+
export let previous_batch = null;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* When time travelling (i.e. working in one batch, while other batches
|
|
57
|
+
* still have ongoing work), we ignore the real values of affected
|
|
58
|
+
* signals in favour of their values within the batch
|
|
59
|
+
* @type {Map<Value, any> | null}
|
|
60
|
+
*/
|
|
61
|
+
export let batch_values = null;
|
|
62
|
+
|
|
63
|
+
// TODO this should really be a property of `batch`
|
|
64
|
+
/** @type {Effect[]} */
|
|
65
|
+
let queued_root_effects = [];
|
|
66
|
+
|
|
67
|
+
/** @type {Effect | null} */
|
|
68
|
+
let last_scheduled_effect = null;
|
|
69
|
+
|
|
70
|
+
let is_flushing = false;
|
|
71
|
+
export let is_flushing_sync = false;
|
|
72
|
+
|
|
73
|
+
export class Batch {
|
|
74
|
+
committed = false;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The current values of any sources that are updated in this batch
|
|
78
|
+
* They keys of this map are identical to `this.#previous`
|
|
79
|
+
* @type {Map<Source, any>}
|
|
80
|
+
*/
|
|
81
|
+
current = new Map();
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
85
|
+
* They keys of this map are identical to `this.#current`
|
|
86
|
+
* @type {Map<Source, any>}
|
|
87
|
+
*/
|
|
88
|
+
previous = new Map();
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
92
|
+
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
93
|
+
* @type {Set<() => void>}
|
|
94
|
+
*/
|
|
95
|
+
#commit_callbacks = new Set();
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
99
|
+
* @type {Set<(batch: Batch) => void>}
|
|
100
|
+
*/
|
|
101
|
+
#discard_callbacks = new Set();
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The number of async effects that are currently in flight
|
|
105
|
+
*/
|
|
106
|
+
#pending = 0;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
110
|
+
*/
|
|
111
|
+
#blocking_pending = 0;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
115
|
+
* TODO replace with Promise.withResolvers once supported widely enough
|
|
116
|
+
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
117
|
+
*/
|
|
118
|
+
#deferred = null;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
122
|
+
* @type {Set<Effect>}
|
|
123
|
+
*/
|
|
124
|
+
#dirty_effects = new Set();
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Deferred effects that are MAYBE_DIRTY
|
|
128
|
+
* @type {Set<Effect>}
|
|
129
|
+
*/
|
|
130
|
+
#maybe_dirty_effects = new Set();
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* A set of branches that still exist, but will be destroyed when this batch
|
|
134
|
+
* is committed — we skip over these during `process`
|
|
135
|
+
* @type {Set<Effect>}
|
|
136
|
+
*/
|
|
137
|
+
skipped_effects = new Set();
|
|
138
|
+
|
|
139
|
+
is_fork = false;
|
|
140
|
+
|
|
141
|
+
#decrement_queued = false;
|
|
142
|
+
|
|
143
|
+
is_deferred() {
|
|
144
|
+
return this.is_fork || this.#blocking_pending > 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* @param {Effect[]} root_effects
|
|
150
|
+
*/
|
|
151
|
+
process(root_effects) {
|
|
152
|
+
queued_root_effects = [];
|
|
153
|
+
|
|
154
|
+
this.apply();
|
|
155
|
+
|
|
156
|
+
/** @type {Effect[]} */
|
|
157
|
+
var effects = [];
|
|
158
|
+
|
|
159
|
+
/** @type {Effect[]} */
|
|
160
|
+
var render_effects = [];
|
|
161
|
+
|
|
162
|
+
for (const root of root_effects) {
|
|
163
|
+
this.#traverse_effect_tree(root, effects, render_effects);
|
|
164
|
+
// Note: #traverse_effect_tree runs block effects eagerly, which can schedule effects,
|
|
165
|
+
// which means queued_root_effects now may be filled again.
|
|
166
|
+
|
|
167
|
+
// Helpful for debugging reactivity loss that has to do with branches being skipped:
|
|
168
|
+
// log_inconsistent_branches(root);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (this.is_deferred()) {
|
|
172
|
+
this.#defer_effects(render_effects);
|
|
173
|
+
this.#defer_effects(effects);
|
|
174
|
+
} else {
|
|
175
|
+
// append/remove branches
|
|
176
|
+
for (const fn of this.#commit_callbacks) fn();
|
|
177
|
+
this.#commit_callbacks.clear();
|
|
178
|
+
|
|
179
|
+
if (this.#pending === 0) {
|
|
180
|
+
this.#commit();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// If sources are written to, then work needs to happen in a separate batch, else prior sources would be mixed with
|
|
184
|
+
// newly updated sources, which could lead to infinite loops when effects run over and over again.
|
|
185
|
+
previous_batch = this;
|
|
186
|
+
current_batch = null;
|
|
187
|
+
|
|
188
|
+
flush_queued_effects(render_effects);
|
|
189
|
+
flush_queued_effects(effects);
|
|
190
|
+
|
|
191
|
+
previous_batch = null;
|
|
192
|
+
|
|
193
|
+
this.#deferred?.resolve();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
batch_values = null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Traverse the effect tree, executing effects or stashing
|
|
201
|
+
* them for later execution as appropriate
|
|
202
|
+
* @param {Effect} root
|
|
203
|
+
* @param {Effect[]} effects
|
|
204
|
+
* @param {Effect[]} render_effects
|
|
205
|
+
*/
|
|
206
|
+
#traverse_effect_tree(root, effects, render_effects) {
|
|
207
|
+
root.f ^= CLEAN;
|
|
208
|
+
|
|
209
|
+
var effect = root.first;
|
|
210
|
+
|
|
211
|
+
/** @type {Effect | null} */
|
|
212
|
+
var pending_boundary = null;
|
|
213
|
+
|
|
214
|
+
while (effect !== null) {
|
|
215
|
+
var flags = effect.f;
|
|
216
|
+
var is_branch = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) !== 0;
|
|
217
|
+
var is_skippable_branch = is_branch && (flags & CLEAN) !== 0;
|
|
218
|
+
|
|
219
|
+
var skip = is_skippable_branch || (flags & INERT) !== 0 || this.skipped_effects.has(effect);
|
|
220
|
+
|
|
221
|
+
// Inside a `<svelte:boundary>` with a pending snippet,
|
|
222
|
+
// all effects are deferred until the boundary resolves
|
|
223
|
+
// (except block/async effects, which run immediately)
|
|
224
|
+
if (
|
|
225
|
+
async_mode_flag &&
|
|
226
|
+
pending_boundary === null &&
|
|
227
|
+
(flags & BOUNDARY_EFFECT) !== 0 &&
|
|
228
|
+
effect.b?.is_pending
|
|
229
|
+
) {
|
|
230
|
+
pending_boundary = effect;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (!skip && effect.fn !== null) {
|
|
234
|
+
if (is_branch) {
|
|
235
|
+
effect.f ^= CLEAN;
|
|
236
|
+
} else if (
|
|
237
|
+
pending_boundary !== null &&
|
|
238
|
+
(flags & (EFFECT | RENDER_EFFECT | MANAGED_EFFECT)) !== 0
|
|
239
|
+
) {
|
|
240
|
+
/** @type {Boundary} */ (pending_boundary.b).defer_effect(effect);
|
|
241
|
+
} else if ((flags & EFFECT) !== 0) {
|
|
242
|
+
effects.push(effect);
|
|
243
|
+
} else if (async_mode_flag && (flags & (RENDER_EFFECT | MANAGED_EFFECT)) !== 0) {
|
|
244
|
+
render_effects.push(effect);
|
|
245
|
+
} else if (is_dirty(effect)) {
|
|
246
|
+
if ((flags & BLOCK_EFFECT) !== 0) this.#dirty_effects.add(effect);
|
|
247
|
+
update_effect(effect);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
var child = effect.first;
|
|
251
|
+
|
|
252
|
+
if (child !== null) {
|
|
253
|
+
effect = child;
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
var parent = effect.parent;
|
|
259
|
+
effect = effect.next;
|
|
260
|
+
|
|
261
|
+
while (effect === null && parent !== null) {
|
|
262
|
+
if (parent === pending_boundary) {
|
|
263
|
+
pending_boundary = null;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
effect = parent.next;
|
|
267
|
+
parent = parent.parent;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @param {Effect[]} effects
|
|
274
|
+
*/
|
|
275
|
+
#defer_effects(effects) {
|
|
276
|
+
for (var i = 0; i < effects.length; i += 1) {
|
|
277
|
+
defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Associate a change to a given source with the current
|
|
283
|
+
* batch, noting its previous and current values
|
|
284
|
+
* @param {Source} source
|
|
285
|
+
* @param {any} value
|
|
286
|
+
*/
|
|
287
|
+
capture(source, value) {
|
|
288
|
+
if (value !== UNINITIALIZED && !this.previous.has(source)) {
|
|
289
|
+
this.previous.set(source, value);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Don't save errors in `batch_values`, or they won't be thrown in `runtime.js#get`
|
|
293
|
+
if ((source.f & ERROR_VALUE) === 0) {
|
|
294
|
+
this.current.set(source, source.v);
|
|
295
|
+
batch_values?.set(source, source.v);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
activate() {
|
|
300
|
+
current_batch = this;
|
|
301
|
+
this.apply();
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
deactivate() {
|
|
305
|
+
// If we're not the current batch, don't deactivate,
|
|
306
|
+
// else we could create zombie batches that are never flushed
|
|
307
|
+
if (current_batch !== this) return;
|
|
308
|
+
|
|
309
|
+
current_batch = null;
|
|
310
|
+
batch_values = null;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
flush() {
|
|
314
|
+
this.activate();
|
|
315
|
+
|
|
316
|
+
if (queued_root_effects.length > 0) {
|
|
317
|
+
flush_effects();
|
|
318
|
+
|
|
319
|
+
if (current_batch !== null && current_batch !== this) {
|
|
320
|
+
// this can happen if a new batch was created during `flush_effects()`
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
} else if (this.#pending === 0) {
|
|
324
|
+
this.process([]); // TODO this feels awkward
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
this.deactivate();
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
discard() {
|
|
331
|
+
for (const fn of this.#discard_callbacks) fn(this);
|
|
332
|
+
this.#discard_callbacks.clear();
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
#commit() {
|
|
336
|
+
// If there are other pending batches, they now need to be 'rebased' —
|
|
337
|
+
// in other words, we re-run block/async effects with the newly
|
|
338
|
+
// committed state, unless the batch in question has a more
|
|
339
|
+
// recent value for a given source
|
|
340
|
+
if (batches.size > 1) {
|
|
341
|
+
this.previous.clear();
|
|
342
|
+
|
|
343
|
+
var previous_batch_values = batch_values;
|
|
344
|
+
var is_earlier = true;
|
|
345
|
+
|
|
346
|
+
for (const batch of batches) {
|
|
347
|
+
if (batch === this) {
|
|
348
|
+
is_earlier = false;
|
|
349
|
+
continue;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** @type {Source[]} */
|
|
353
|
+
const sources = [];
|
|
354
|
+
|
|
355
|
+
for (const [source, value] of this.current) {
|
|
356
|
+
if (batch.current.has(source)) {
|
|
357
|
+
if (is_earlier && value !== batch.current.get(source)) {
|
|
358
|
+
// bring the value up to date
|
|
359
|
+
batch.current.set(source, value);
|
|
360
|
+
} else {
|
|
361
|
+
// same value or later batch has more recent value,
|
|
362
|
+
// no need to re-run these effects
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
sources.push(source);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
if (sources.length === 0) {
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Re-run async/block effects that depend on distinct values changed in both batches
|
|
375
|
+
const others = [...batch.current.keys()].filter((s) => !this.current.has(s));
|
|
376
|
+
if (others.length > 0) {
|
|
377
|
+
// Avoid running queued root effects on the wrong branch
|
|
378
|
+
var prev_queued_root_effects = queued_root_effects;
|
|
379
|
+
queued_root_effects = [];
|
|
380
|
+
|
|
381
|
+
/** @type {Set<Value>} */
|
|
382
|
+
const marked = new Set();
|
|
383
|
+
/** @type {Map<Reaction, boolean>} */
|
|
384
|
+
const checked = new Map();
|
|
385
|
+
for (const source of sources) {
|
|
386
|
+
mark_effects(source, others, marked, checked);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (queued_root_effects.length > 0) {
|
|
390
|
+
current_batch = batch;
|
|
391
|
+
batch.apply();
|
|
392
|
+
|
|
393
|
+
for (const root of queued_root_effects) {
|
|
394
|
+
batch.#traverse_effect_tree(root, [], []);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// TODO do we need to do anything with the dummy effect arrays?
|
|
398
|
+
|
|
399
|
+
batch.deactivate();
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
queued_root_effects = prev_queued_root_effects;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
current_batch = null;
|
|
407
|
+
batch_values = previous_batch_values;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
this.committed = true;
|
|
411
|
+
batches.delete(this);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
*
|
|
416
|
+
* @param {boolean} blocking
|
|
417
|
+
*/
|
|
418
|
+
increment(blocking) {
|
|
419
|
+
this.#pending += 1;
|
|
420
|
+
if (blocking) this.#blocking_pending += 1;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
*
|
|
425
|
+
* @param {boolean} blocking
|
|
426
|
+
*/
|
|
427
|
+
decrement(blocking) {
|
|
428
|
+
this.#pending -= 1;
|
|
429
|
+
if (blocking) this.#blocking_pending -= 1;
|
|
430
|
+
|
|
431
|
+
if (this.#decrement_queued) return;
|
|
432
|
+
this.#decrement_queued = true;
|
|
433
|
+
|
|
434
|
+
queue_micro_task(() => {
|
|
435
|
+
this.#decrement_queued = false;
|
|
436
|
+
|
|
437
|
+
if (!this.is_deferred()) {
|
|
438
|
+
// we only reschedule previously-deferred effects if we expect
|
|
439
|
+
// to be able to run them after processing the batch
|
|
440
|
+
this.revive();
|
|
441
|
+
} else if (queued_root_effects.length > 0) {
|
|
442
|
+
// if other effects are scheduled, process the batch _without_
|
|
443
|
+
// rescheduling the previously-deferred effects
|
|
444
|
+
this.flush();
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
revive() {
|
|
450
|
+
for (const e of this.#dirty_effects) {
|
|
451
|
+
this.#maybe_dirty_effects.delete(e);
|
|
452
|
+
set_signal_status(e, DIRTY);
|
|
453
|
+
schedule_effect(e);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
for (const e of this.#maybe_dirty_effects) {
|
|
457
|
+
set_signal_status(e, MAYBE_DIRTY);
|
|
458
|
+
schedule_effect(e);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
this.flush();
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/** @param {() => void} fn */
|
|
465
|
+
oncommit(fn) {
|
|
466
|
+
this.#commit_callbacks.add(fn);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/** @param {(batch: Batch) => void} fn */
|
|
470
|
+
ondiscard(fn) {
|
|
471
|
+
this.#discard_callbacks.add(fn);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
settled() {
|
|
475
|
+
return (this.#deferred ??= deferred()).promise;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
static ensure() {
|
|
479
|
+
if (current_batch === null) {
|
|
480
|
+
const batch = (current_batch = new Batch());
|
|
481
|
+
batches.add(current_batch);
|
|
482
|
+
|
|
483
|
+
if (!is_flushing_sync) {
|
|
484
|
+
queue_micro_task(() => {
|
|
485
|
+
if (current_batch !== batch) {
|
|
486
|
+
// a flushSync happened in the meantime
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
batch.flush();
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
return current_batch;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
apply() {
|
|
499
|
+
if (!async_mode_flag || (!this.is_fork && batches.size === 1)) return;
|
|
500
|
+
|
|
501
|
+
// if there are multiple batches, we are 'time travelling' —
|
|
502
|
+
// we need to override values with the ones in this batch...
|
|
503
|
+
batch_values = new Map(this.current);
|
|
504
|
+
|
|
505
|
+
// ...and undo changes belonging to other batches
|
|
506
|
+
for (const batch of batches) {
|
|
507
|
+
if (batch === this) continue;
|
|
508
|
+
|
|
509
|
+
for (const [source, previous] of batch.previous) {
|
|
510
|
+
if (!batch_values.has(source)) {
|
|
511
|
+
batch_values.set(source, previous);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Synchronously flush any pending updates.
|
|
520
|
+
* Returns void if no callback is provided, otherwise returns the result of calling the callback.
|
|
521
|
+
* @template [T=void]
|
|
522
|
+
* @param {(() => T) | undefined} [fn]
|
|
523
|
+
* @returns {T}
|
|
524
|
+
*/
|
|
525
|
+
export function flushSync(fn) {
|
|
526
|
+
var was_flushing_sync = is_flushing_sync;
|
|
527
|
+
is_flushing_sync = true;
|
|
528
|
+
|
|
529
|
+
try {
|
|
530
|
+
var result;
|
|
531
|
+
|
|
532
|
+
if (fn) {
|
|
533
|
+
if (current_batch !== null) {
|
|
534
|
+
flush_effects();
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
result = fn();
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
while (true) {
|
|
541
|
+
flush_tasks();
|
|
542
|
+
|
|
543
|
+
if (queued_root_effects.length === 0) {
|
|
544
|
+
current_batch?.flush();
|
|
545
|
+
|
|
546
|
+
// we need to check again, in case we just updated an `$effect.pending()`
|
|
547
|
+
if (queued_root_effects.length === 0) {
|
|
548
|
+
// this would be reset in `flush_effects()` but since we are early returning here,
|
|
549
|
+
// we need to reset it here as well in case the first time there's 0 queued root effects
|
|
550
|
+
last_scheduled_effect = null;
|
|
551
|
+
|
|
552
|
+
return /** @type {T} */ (result);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
flush_effects();
|
|
557
|
+
}
|
|
558
|
+
} finally {
|
|
559
|
+
is_flushing_sync = was_flushing_sync;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
function flush_effects() {
|
|
564
|
+
is_flushing = true;
|
|
565
|
+
|
|
566
|
+
var source_stacks = DEV ? new Set() : null;
|
|
567
|
+
|
|
568
|
+
try {
|
|
569
|
+
var flush_count = 0;
|
|
570
|
+
|
|
571
|
+
while (queued_root_effects.length > 0) {
|
|
572
|
+
var batch = Batch.ensure();
|
|
573
|
+
|
|
574
|
+
if (flush_count++ > 1000) {
|
|
575
|
+
if (DEV) {
|
|
576
|
+
var updates = new Map();
|
|
577
|
+
|
|
578
|
+
for (const source of batch.current.keys()) {
|
|
579
|
+
for (const [stack, update] of source.updated ?? []) {
|
|
580
|
+
var entry = updates.get(stack);
|
|
581
|
+
|
|
582
|
+
if (!entry) {
|
|
583
|
+
entry = { error: update.error, count: 0 };
|
|
584
|
+
updates.set(stack, entry);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
entry.count += update.count;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
for (const update of updates.values()) {
|
|
592
|
+
if (update.error) {
|
|
593
|
+
// eslint-disable-next-line no-console
|
|
594
|
+
console.error(update.error);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
infinite_loop_guard();
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
batch.process(queued_root_effects);
|
|
603
|
+
old_values.clear();
|
|
604
|
+
|
|
605
|
+
if (DEV) {
|
|
606
|
+
for (const source of batch.current.keys()) {
|
|
607
|
+
/** @type {Set<Source>} */ (source_stacks).add(source);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
} finally {
|
|
612
|
+
is_flushing = false;
|
|
613
|
+
|
|
614
|
+
last_scheduled_effect = null;
|
|
615
|
+
|
|
616
|
+
if (DEV) {
|
|
617
|
+
for (const source of /** @type {Set<Source>} */ (source_stacks)) {
|
|
618
|
+
source.updated = null;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
function infinite_loop_guard() {
|
|
625
|
+
try {
|
|
626
|
+
e.effect_update_depth_exceeded();
|
|
627
|
+
} catch (error) {
|
|
628
|
+
if (DEV) {
|
|
629
|
+
// stack contains no useful information, replace it
|
|
630
|
+
define_property(error, 'stack', { value: '' });
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// Best effort: invoke the boundary nearest the most recent
|
|
634
|
+
// effect and hope that it's relevant to the infinite loop
|
|
635
|
+
invoke_error_boundary(error, last_scheduled_effect);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/** @type {Set<Effect> | null} */
|
|
640
|
+
export let eager_block_effects = null;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* @param {Array<Effect>} effects
|
|
644
|
+
* @returns {void}
|
|
645
|
+
*/
|
|
646
|
+
function flush_queued_effects(effects) {
|
|
647
|
+
var length = effects.length;
|
|
648
|
+
if (length === 0) return;
|
|
649
|
+
|
|
650
|
+
var i = 0;
|
|
651
|
+
|
|
652
|
+
while (i < length) {
|
|
653
|
+
var effect = effects[i++];
|
|
654
|
+
|
|
655
|
+
if ((effect.f & (DESTROYED | INERT)) === 0 && is_dirty(effect)) {
|
|
656
|
+
eager_block_effects = new Set();
|
|
657
|
+
|
|
658
|
+
update_effect(effect);
|
|
659
|
+
|
|
660
|
+
// Effects with no dependencies or teardown do not get added to the effect tree.
|
|
661
|
+
// Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we
|
|
662
|
+
// don't know if we need to keep them until they are executed. Doing the check
|
|
663
|
+
// here (rather than in `update_effect`) allows us to skip the work for
|
|
664
|
+
// immediate effects.
|
|
665
|
+
if (effect.deps === null && effect.first === null && effect.nodes === null) {
|
|
666
|
+
// if there's no teardown or abort controller we completely unlink
|
|
667
|
+
// the effect from the graph
|
|
668
|
+
if (effect.teardown === null && effect.ac === null) {
|
|
669
|
+
// remove this effect from the graph
|
|
670
|
+
unlink_effect(effect);
|
|
671
|
+
} else {
|
|
672
|
+
// keep the effect in the graph, but free up some memory
|
|
673
|
+
effect.fn = null;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// If update_effect() has a flushSync() in it, we may have flushed another flush_queued_effects(),
|
|
678
|
+
// which already handled this logic and did set eager_block_effects to null.
|
|
679
|
+
if (eager_block_effects?.size > 0) {
|
|
680
|
+
old_values.clear();
|
|
681
|
+
|
|
682
|
+
for (const e of eager_block_effects) {
|
|
683
|
+
// Skip eager effects that have already been unmounted
|
|
684
|
+
if ((e.f & (DESTROYED | INERT)) !== 0) continue;
|
|
685
|
+
|
|
686
|
+
// Run effects in order from ancestor to descendant, else we could run into nullpointers
|
|
687
|
+
/** @type {Effect[]} */
|
|
688
|
+
const ordered_effects = [e];
|
|
689
|
+
let ancestor = e.parent;
|
|
690
|
+
while (ancestor !== null) {
|
|
691
|
+
if (eager_block_effects.has(ancestor)) {
|
|
692
|
+
eager_block_effects.delete(ancestor);
|
|
693
|
+
ordered_effects.push(ancestor);
|
|
694
|
+
}
|
|
695
|
+
ancestor = ancestor.parent;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
for (let j = ordered_effects.length - 1; j >= 0; j--) {
|
|
699
|
+
const e = ordered_effects[j];
|
|
700
|
+
// Skip eager effects that have already been unmounted
|
|
701
|
+
if ((e.f & (DESTROYED | INERT)) !== 0) continue;
|
|
702
|
+
update_effect(e);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
eager_block_effects.clear();
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
eager_block_effects = null;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* This is similar to `mark_reactions`, but it only marks async/block effects
|
|
716
|
+
* depending on `value` and at least one of the other `sources`, so that
|
|
717
|
+
* these effects can re-run after another batch has been committed
|
|
718
|
+
* @param {Value} value
|
|
719
|
+
* @param {Source[]} sources
|
|
720
|
+
* @param {Set<Value>} marked
|
|
721
|
+
* @param {Map<Reaction, boolean>} checked
|
|
722
|
+
*/
|
|
723
|
+
function mark_effects(value, sources, marked, checked) {
|
|
724
|
+
if (marked.has(value)) return;
|
|
725
|
+
marked.add(value);
|
|
726
|
+
|
|
727
|
+
if (value.reactions !== null) {
|
|
728
|
+
for (const reaction of value.reactions) {
|
|
729
|
+
const flags = reaction.f;
|
|
730
|
+
|
|
731
|
+
if ((flags & DERIVED) !== 0) {
|
|
732
|
+
mark_effects(/** @type {Derived} */ (reaction), sources, marked, checked);
|
|
733
|
+
} else if (
|
|
734
|
+
(flags & (ASYNC | BLOCK_EFFECT)) !== 0 &&
|
|
735
|
+
(flags & DIRTY) === 0 &&
|
|
736
|
+
depends_on(reaction, sources, checked)
|
|
737
|
+
) {
|
|
738
|
+
set_signal_status(reaction, DIRTY);
|
|
739
|
+
schedule_effect(/** @type {Effect} */ (reaction));
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* When committing a fork, we need to trigger eager effects so that
|
|
747
|
+
* any `$state.eager(...)` expressions update immediately. This
|
|
748
|
+
* function allows us to discover them
|
|
749
|
+
* @param {Value} value
|
|
750
|
+
* @param {Set<Effect>} effects
|
|
751
|
+
*/
|
|
752
|
+
function mark_eager_effects(value, effects) {
|
|
753
|
+
if (value.reactions === null) return;
|
|
754
|
+
|
|
755
|
+
for (const reaction of value.reactions) {
|
|
756
|
+
const flags = reaction.f;
|
|
757
|
+
|
|
758
|
+
if ((flags & DERIVED) !== 0) {
|
|
759
|
+
mark_eager_effects(/** @type {Derived} */ (reaction), effects);
|
|
760
|
+
} else if ((flags & EAGER_EFFECT) !== 0) {
|
|
761
|
+
set_signal_status(reaction, DIRTY);
|
|
762
|
+
effects.add(/** @type {Effect} */ (reaction));
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* @param {Reaction} reaction
|
|
769
|
+
* @param {Source[]} sources
|
|
770
|
+
* @param {Map<Reaction, boolean>} checked
|
|
771
|
+
*/
|
|
772
|
+
function depends_on(reaction, sources, checked) {
|
|
773
|
+
const depends = checked.get(reaction);
|
|
774
|
+
if (depends !== undefined) return depends;
|
|
775
|
+
|
|
776
|
+
if (reaction.deps !== null) {
|
|
777
|
+
for (const dep of reaction.deps) {
|
|
778
|
+
if (sources.includes(dep)) {
|
|
779
|
+
return true;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
if ((dep.f & DERIVED) !== 0 && depends_on(/** @type {Derived} */ (dep), sources, checked)) {
|
|
783
|
+
checked.set(/** @type {Derived} */ (dep), true);
|
|
784
|
+
return true;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
checked.set(reaction, false);
|
|
790
|
+
|
|
791
|
+
return false;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* @param {Effect} signal
|
|
796
|
+
* @returns {void}
|
|
797
|
+
*/
|
|
798
|
+
export function schedule_effect(signal) {
|
|
799
|
+
var effect = (last_scheduled_effect = signal);
|
|
800
|
+
|
|
801
|
+
while (effect.parent !== null) {
|
|
802
|
+
effect = effect.parent;
|
|
803
|
+
var flags = effect.f;
|
|
804
|
+
|
|
805
|
+
// if the effect is being scheduled because a parent (each/await/etc) block
|
|
806
|
+
// updated an internal source, bail out or we'll cause a second flush
|
|
807
|
+
if (
|
|
808
|
+
is_flushing &&
|
|
809
|
+
effect === active_effect &&
|
|
810
|
+
(flags & BLOCK_EFFECT) !== 0 &&
|
|
811
|
+
(flags & HEAD_EFFECT) === 0
|
|
812
|
+
) {
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
if ((flags & (ROOT_EFFECT | BRANCH_EFFECT)) !== 0) {
|
|
817
|
+
if ((flags & CLEAN) === 0) return;
|
|
818
|
+
effect.f ^= CLEAN;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
queued_root_effects.push(effect);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/** @type {Source<number>[]} */
|
|
826
|
+
let eager_versions = [];
|
|
827
|
+
|
|
828
|
+
function eager_flush() {
|
|
829
|
+
try {
|
|
830
|
+
flushSync(() => {
|
|
831
|
+
for (const version of eager_versions) {
|
|
832
|
+
update(version);
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
} finally {
|
|
836
|
+
eager_versions = [];
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Implementation of `$state.eager(fn())`
|
|
842
|
+
* @template T
|
|
843
|
+
* @param {() => T} fn
|
|
844
|
+
* @returns {T}
|
|
845
|
+
*/
|
|
846
|
+
export function eager(fn) {
|
|
847
|
+
var version = source(0);
|
|
848
|
+
var initial = true;
|
|
849
|
+
var value = /** @type {T} */ (undefined);
|
|
850
|
+
|
|
851
|
+
get(version);
|
|
852
|
+
|
|
853
|
+
eager_effect(() => {
|
|
854
|
+
if (initial) {
|
|
855
|
+
// the first time this runs, we create an eager effect
|
|
856
|
+
// that will run eagerly whenever the expression changes
|
|
857
|
+
var previous_batch_values = batch_values;
|
|
858
|
+
|
|
859
|
+
try {
|
|
860
|
+
batch_values = null;
|
|
861
|
+
value = fn();
|
|
862
|
+
} finally {
|
|
863
|
+
batch_values = previous_batch_values;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
return;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
// the second time this effect runs, it's to schedule a
|
|
870
|
+
// `version` update. since this will recreate the effect,
|
|
871
|
+
// we don't need to evaluate the expression here
|
|
872
|
+
if (eager_versions.length === 0) {
|
|
873
|
+
queue_micro_task(eager_flush);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
eager_versions.push(version);
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
initial = false;
|
|
880
|
+
|
|
881
|
+
return value;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Creates a 'fork', in which state changes are evaluated but not applied to the DOM.
|
|
886
|
+
* This is useful for speculatively loading data (for example) when you suspect that
|
|
887
|
+
* the user is about to take some action.
|
|
888
|
+
*
|
|
889
|
+
* Frameworks like SvelteKit can use this to preload data when the user touches or
|
|
890
|
+
* hovers over a link, making any subsequent navigation feel instantaneous.
|
|
891
|
+
*
|
|
892
|
+
* The `fn` parameter is a synchronous function that modifies some state. The
|
|
893
|
+
* state changes will be reverted after the fork is initialised, then reapplied
|
|
894
|
+
* if and when the fork is eventually committed.
|
|
895
|
+
*
|
|
896
|
+
* When it becomes clear that a fork will _not_ be committed (e.g. because the
|
|
897
|
+
* user navigated elsewhere), it must be discarded to avoid leaking memory.
|
|
898
|
+
*
|
|
899
|
+
* @param {() => void} fn
|
|
900
|
+
* @returns {Fork}
|
|
901
|
+
* @since 5.42
|
|
902
|
+
*/
|
|
903
|
+
export function fork(fn) {
|
|
904
|
+
if (!async_mode_flag) {
|
|
905
|
+
e.experimental_async_required('fork');
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
if (current_batch !== null) {
|
|
909
|
+
e.fork_timing();
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
var batch = Batch.ensure();
|
|
913
|
+
batch.is_fork = true;
|
|
914
|
+
batch_values = new Map();
|
|
915
|
+
|
|
916
|
+
var committed = false;
|
|
917
|
+
var settled = batch.settled();
|
|
918
|
+
|
|
919
|
+
flushSync(fn);
|
|
920
|
+
|
|
921
|
+
// revert state changes
|
|
922
|
+
for (var [source, value] of batch.previous) {
|
|
923
|
+
source.v = value;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
// make writable deriveds dirty, so they recalculate correctly
|
|
927
|
+
for (source of batch.current.keys()) {
|
|
928
|
+
if ((source.f & DERIVED) !== 0) {
|
|
929
|
+
set_signal_status(source, DIRTY);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
return {
|
|
934
|
+
commit: async () => {
|
|
935
|
+
if (committed) {
|
|
936
|
+
await settled;
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
if (!batches.has(batch)) {
|
|
941
|
+
e.fork_discarded();
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
committed = true;
|
|
945
|
+
|
|
946
|
+
batch.is_fork = false;
|
|
947
|
+
|
|
948
|
+
// apply changes and update write versions so deriveds see the change
|
|
949
|
+
for (var [source, value] of batch.current) {
|
|
950
|
+
source.v = value;
|
|
951
|
+
source.wv = increment_write_version();
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
// trigger any `$state.eager(...)` expressions with the new state.
|
|
955
|
+
// eager effects don't get scheduled like other effects, so we
|
|
956
|
+
// can't just encounter them during traversal, we need to
|
|
957
|
+
// proactively flush them
|
|
958
|
+
// TODO maybe there's a better implementation?
|
|
959
|
+
flushSync(() => {
|
|
960
|
+
/** @type {Set<Effect>} */
|
|
961
|
+
var eager_effects = new Set();
|
|
962
|
+
|
|
963
|
+
for (var source of batch.current.keys()) {
|
|
964
|
+
mark_eager_effects(source, eager_effects);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
set_eager_effects(eager_effects);
|
|
968
|
+
flush_eager_effects();
|
|
969
|
+
});
|
|
970
|
+
|
|
971
|
+
batch.revive();
|
|
972
|
+
await settled;
|
|
973
|
+
},
|
|
974
|
+
discard: () => {
|
|
975
|
+
if (!committed && batches.has(batch)) {
|
|
976
|
+
batches.delete(batch);
|
|
977
|
+
batch.discard();
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Forcibly remove all current batches, to prevent cross-talk between tests
|
|
985
|
+
*/
|
|
986
|
+
export function clear() {
|
|
987
|
+
batches.clear();
|
|
988
|
+
}
|