@builder.io/sdk-vue 0.5.9 → 0.6.1-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/package.json +145 -22
- package/vue2/css/package.json +4 -0
- package/vue2/node_modules/@types/node/LICENSE +21 -0
- package/vue2/node_modules/@types/node/README.md +16 -0
- package/vue2/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/vue2/node_modules/@types/node/assert.d.ts +962 -0
- package/vue2/node_modules/@types/node/async_hooks.d.ts +497 -0
- package/vue2/node_modules/@types/node/buffer.d.ts +2236 -0
- package/vue2/node_modules/@types/node/child_process.d.ts +1396 -0
- package/vue2/node_modules/@types/node/cluster.d.ts +414 -0
- package/vue2/node_modules/@types/node/console.d.ts +412 -0
- package/vue2/node_modules/@types/node/constants.d.ts +18 -0
- package/vue2/node_modules/@types/node/crypto.d.ts +3869 -0
- package/vue2/node_modules/@types/node/dgram.d.ts +545 -0
- package/vue2/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/vue2/node_modules/@types/node/dns/promises.d.ts +369 -0
- package/vue2/node_modules/@types/node/dns.d.ts +655 -0
- package/vue2/node_modules/@types/node/domain.d.ts +170 -0
- package/vue2/node_modules/@types/node/events.d.ts +641 -0
- package/vue2/node_modules/@types/node/fs/promises.d.ts +1094 -0
- package/vue2/node_modules/@types/node/fs.d.ts +3803 -0
- package/vue2/node_modules/@types/node/globals.d.ts +287 -0
- package/vue2/node_modules/@types/node/globals.global.d.ts +1 -0
- package/vue2/node_modules/@types/node/http.d.ts +1504 -0
- package/vue2/node_modules/@types/node/http2.d.ts +2100 -0
- package/vue2/node_modules/@types/node/https.d.ts +532 -0
- package/vue2/node_modules/@types/node/index.d.ts +131 -0
- package/vue2/node_modules/@types/node/inspector.d.ts +2745 -0
- package/vue2/node_modules/@types/node/module.d.ts +115 -0
- package/vue2/node_modules/@types/node/net.d.ts +828 -0
- package/vue2/node_modules/@types/node/os.d.ts +455 -0
- package/vue2/node_modules/@types/node/package.json +232 -0
- package/vue2/node_modules/@types/node/path.d.ts +191 -0
- package/vue2/node_modules/@types/node/perf_hooks.d.ts +586 -0
- package/vue2/node_modules/@types/node/process.d.ts +1481 -0
- package/vue2/node_modules/@types/node/punycode.d.ts +117 -0
- package/vue2/node_modules/@types/node/querystring.d.ts +131 -0
- package/vue2/node_modules/@types/node/readline.d.ts +543 -0
- package/vue2/node_modules/@types/node/repl.d.ts +424 -0
- package/vue2/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/vue2/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/vue2/node_modules/@types/node/stream/web.d.ts +392 -0
- package/vue2/node_modules/@types/node/stream.d.ts +1363 -0
- package/vue2/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/vue2/node_modules/@types/node/test.d.ts +190 -0
- package/vue2/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/vue2/node_modules/@types/node/timers.d.ts +94 -0
- package/vue2/node_modules/@types/node/tls.d.ts +1019 -0
- package/vue2/node_modules/@types/node/trace_events.d.ts +161 -0
- package/vue2/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/vue2/node_modules/@types/node/ts4.8/assert.d.ts +962 -0
- package/vue2/node_modules/@types/node/ts4.8/async_hooks.d.ts +497 -0
- package/vue2/node_modules/@types/node/ts4.8/buffer.d.ts +2236 -0
- package/vue2/node_modules/@types/node/ts4.8/child_process.d.ts +1396 -0
- package/vue2/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
- package/vue2/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/vue2/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/vue2/node_modules/@types/node/ts4.8/crypto.d.ts +3866 -0
- package/vue2/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/vue2/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/vue2/node_modules/@types/node/ts4.8/dns/promises.d.ts +368 -0
- package/vue2/node_modules/@types/node/ts4.8/dns.d.ts +654 -0
- package/vue2/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/vue2/node_modules/@types/node/ts4.8/events.d.ts +641 -0
- package/vue2/node_modules/@types/node/ts4.8/fs/promises.d.ts +1094 -0
- package/vue2/node_modules/@types/node/ts4.8/fs.d.ts +3802 -0
- package/vue2/node_modules/@types/node/ts4.8/globals.d.ts +284 -0
- package/vue2/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/vue2/node_modules/@types/node/ts4.8/http.d.ts +1503 -0
- package/vue2/node_modules/@types/node/ts4.8/http2.d.ts +2100 -0
- package/vue2/node_modules/@types/node/ts4.8/https.d.ts +532 -0
- package/vue2/node_modules/@types/node/ts4.8/index.d.ts +86 -0
- package/vue2/node_modules/@types/node/ts4.8/inspector.d.ts +2745 -0
- package/vue2/node_modules/@types/node/ts4.8/module.d.ts +115 -0
- package/vue2/node_modules/@types/node/ts4.8/net.d.ts +828 -0
- package/vue2/node_modules/@types/node/ts4.8/os.d.ts +456 -0
- package/vue2/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/vue2/node_modules/@types/node/ts4.8/perf_hooks.d.ts +586 -0
- package/vue2/node_modules/@types/node/ts4.8/process.d.ts +1481 -0
- package/vue2/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/vue2/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/vue2/node_modules/@types/node/ts4.8/readline.d.ts +543 -0
- package/vue2/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/vue2/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/vue2/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/vue2/node_modules/@types/node/ts4.8/stream/web.d.ts +392 -0
- package/vue2/node_modules/@types/node/ts4.8/stream.d.ts +1363 -0
- package/vue2/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/vue2/node_modules/@types/node/ts4.8/test.d.ts +190 -0
- package/vue2/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/vue2/node_modules/@types/node/ts4.8/timers.d.ts +94 -0
- package/vue2/node_modules/@types/node/ts4.8/tls.d.ts +1019 -0
- package/vue2/node_modules/@types/node/ts4.8/trace_events.d.ts +161 -0
- package/vue2/node_modules/@types/node/ts4.8/tty.d.ts +204 -0
- package/vue2/node_modules/@types/node/ts4.8/url.d.ts +855 -0
- package/vue2/node_modules/@types/node/ts4.8/util.d.ts +1594 -0
- package/vue2/node_modules/@types/node/ts4.8/v8.d.ts +472 -0
- package/vue2/node_modules/@types/node/ts4.8/vm.d.ts +507 -0
- package/vue2/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/vue2/node_modules/@types/node/ts4.8/worker_threads.d.ts +649 -0
- package/vue2/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/vue2/node_modules/@types/node/tty.d.ts +204 -0
- package/vue2/node_modules/@types/node/url.d.ts +855 -0
- package/vue2/node_modules/@types/node/util.d.ts +1594 -0
- package/vue2/node_modules/@types/node/v8.d.ts +472 -0
- package/vue2/node_modules/@types/node/vm.d.ts +507 -0
- package/vue2/node_modules/@types/node/wasi.d.ts +158 -0
- package/vue2/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/vue2/node_modules/@types/node/zlib.d.ts +517 -0
- package/vue2/node_modules/@vitejs/plugin-vue2/LICENSE +21 -0
- package/vue2/node_modules/@vitejs/plugin-vue2/README.md +115 -0
- package/vue2/node_modules/@vitejs/plugin-vue2/package.json +65 -0
- package/vue2/node_modules/@vue/compiler-sfc/LICENSE +21 -0
- package/vue2/node_modules/@vue/compiler-sfc/package.json +34 -0
- package/vue2/node_modules/@vue/tsconfig/README.md +31 -0
- package/vue2/node_modules/@vue/tsconfig/package.json +35 -0
- package/vue2/node_modules/@vue/tsconfig/tsconfig.json +40 -0
- package/vue2/node_modules/@vue/tsconfig/tsconfig.node.json +17 -0
- package/vue2/node_modules/@vue/tsconfig/tsconfig.web.json +19 -0
- package/vue2/node_modules/rollup/LICENSE.md +695 -0
- package/vue2/node_modules/rollup/README.md +125 -0
- package/vue2/node_modules/rollup/package.json +178 -0
- package/vue2/node_modules/vite/LICENSE.md +3396 -0
- package/vue2/node_modules/vite/README.md +20 -0
- package/vue2/node_modules/vite/bin/openChrome.applescript +95 -0
- package/vue2/node_modules/vite/bin/vite.js +61 -0
- package/vue2/node_modules/vite/client.d.ts +281 -0
- package/vue2/node_modules/vite/index.cjs +34 -0
- package/vue2/node_modules/vite/package.json +170 -0
- package/vue2/node_modules/vite-plugin-dts/LICENSE +21 -0
- package/vue2/node_modules/vite-plugin-dts/README.md +368 -0
- package/vue2/node_modules/vite-plugin-dts/README.zh-CN.md +368 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/LICENSE +21 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/README.md +36 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/bin/vue-tsc.js +67 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/index.d.ts +16 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/index.js +120 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/shared.d.ts +8 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/shared.js +5 -0
- package/vue2/node_modules/vite-plugin-dts/node_modules/vue-tsc/package.json +28 -0
- package/vue2/node_modules/vite-plugin-dts/package.json +103 -0
- package/vue2/node_modules/vue/LICENSE +21 -0
- package/vue2/node_modules/vue/README.md +118 -0
- package/vue2/node_modules/vue/compiler-sfc/index.d.ts +1 -0
- package/vue2/node_modules/vue/compiler-sfc/index.js +1 -0
- package/vue2/node_modules/vue/compiler-sfc/index.mjs +1 -0
- package/vue2/node_modules/vue/compiler-sfc/package.json +5 -0
- package/vue2/node_modules/vue/package.json +132 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/api-extractor.json +64 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/node_modules/.bin/lessc +17 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/node_modules/.bin/parser +17 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/node_modules/.bin/sass +17 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/node_modules/.bin/stylus +17 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/package.json +34 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/babelUtils.ts +423 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/compileScript.ts +1911 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/compileStyle.ts +147 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/compileTemplate.ts +205 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/cssVars.ts +179 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/index.ts +31 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/parse.ts +129 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/parseComponent.ts +220 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/prefixIdentifiers.ts +82 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/rewriteDefault.ts +115 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/stylePlugins/scoped.ts +203 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/stylePlugins/trim.ts +18 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/stylePreprocessors.ts +135 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/templateCompilerModules/assetUrl.ts +84 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/templateCompilerModules/srcset.ts +76 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/templateCompilerModules/utils.ts +86 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/types.ts +69 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/src/warn.ts +16 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/__snapshots__/compileScript.spec.ts.snap +925 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/__snapshots__/cssVars.spec.ts.snap +189 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/compileScript.spec.ts +1594 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/compileStyle.spec.ts +203 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/compileTemplate.spec.ts +258 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/cssVars.spec.ts +247 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/parseComponent.spec.ts +269 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/prefixIdentifiers.spec.ts +97 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/rewriteDefault.spec.ts +245 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/stylePluginScoped.spec.ts +137 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/tsconfig.json +7 -0
- package/vue2/node_modules/vue/packages/compiler-sfc/test/util.ts +35 -0
- package/vue2/node_modules/vue/src/compiler/codeframe.ts +52 -0
- package/vue2/node_modules/vue/src/compiler/codegen/events.ts +170 -0
- package/vue2/node_modules/vue/src/compiler/codegen/index.ts +668 -0
- package/vue2/node_modules/vue/src/compiler/create-compiler.ts +83 -0
- package/vue2/node_modules/vue/src/compiler/directives/bind.ts +9 -0
- package/vue2/node_modules/vue/src/compiler/directives/index.ts +9 -0
- package/vue2/node_modules/vue/src/compiler/directives/model.ts +145 -0
- package/vue2/node_modules/vue/src/compiler/directives/on.ts +9 -0
- package/vue2/node_modules/vue/src/compiler/error-detector.ts +158 -0
- package/vue2/node_modules/vue/src/compiler/helpers.ts +243 -0
- package/vue2/node_modules/vue/src/compiler/index.ts +24 -0
- package/vue2/node_modules/vue/src/compiler/optimizer.ts +135 -0
- package/vue2/node_modules/vue/src/compiler/parser/entity-decoder.ts +9 -0
- package/vue2/node_modules/vue/src/compiler/parser/filter-parser.ts +116 -0
- package/vue2/node_modules/vue/src/compiler/parser/html-parser.ts +341 -0
- package/vue2/node_modules/vue/src/compiler/parser/index.ts +999 -0
- package/vue2/node_modules/vue/src/compiler/parser/text-parser.ts +52 -0
- package/vue2/node_modules/vue/src/compiler/to-function.ts +119 -0
- package/vue2/node_modules/vue/src/core/components/index.ts +5 -0
- package/vue2/node_modules/vue/src/core/components/keep-alive.ts +165 -0
- package/vue2/node_modules/vue/src/core/config.ts +128 -0
- package/vue2/node_modules/vue/src/core/global-api/assets.ts +35 -0
- package/vue2/node_modules/vue/src/core/global-api/extend.ts +94 -0
- package/vue2/node_modules/vue/src/core/global-api/index.ts +68 -0
- package/vue2/node_modules/vue/src/core/global-api/mixin.ts +9 -0
- package/vue2/node_modules/vue/src/core/global-api/use.ts +23 -0
- package/vue2/node_modules/vue/src/core/index.ts +27 -0
- package/vue2/node_modules/vue/src/core/instance/events.ts +160 -0
- package/vue2/node_modules/vue/src/core/instance/index.ts +27 -0
- package/vue2/node_modules/vue/src/core/instance/init.ts +140 -0
- package/vue2/node_modules/vue/src/core/instance/inject.ts +80 -0
- package/vue2/node_modules/vue/src/core/instance/lifecycle.ts +415 -0
- package/vue2/node_modules/vue/src/core/instance/proxy.ts +97 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/bind-dynamic-keys.ts +36 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/bind-object-listeners.ts +18 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/bind-object-props.ts +59 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/check-keycodes.ts +33 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/index.ts +31 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/render-list.ts +49 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/render-slot.ts +39 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/render-static.ts +57 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/resolve-filter.ts +8 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/resolve-scoped-slots.ts +30 -0
- package/vue2/node_modules/vue/src/core/instance/render-helpers/resolve-slots.ts +51 -0
- package/vue2/node_modules/vue/src/core/instance/render.ts +173 -0
- package/vue2/node_modules/vue/src/core/instance/state.ts +387 -0
- package/vue2/node_modules/vue/src/core/observer/array.ts +54 -0
- package/vue2/node_modules/vue/src/core/observer/dep.ts +108 -0
- package/vue2/node_modules/vue/src/core/observer/index.ts +338 -0
- package/vue2/node_modules/vue/src/core/observer/scheduler.ts +199 -0
- package/vue2/node_modules/vue/src/core/observer/traverse.ts +47 -0
- package/vue2/node_modules/vue/src/core/observer/watcher.ts +278 -0
- package/vue2/node_modules/vue/src/core/util/debug.ts +105 -0
- package/vue2/node_modules/vue/src/core/util/env.ts +93 -0
- package/vue2/node_modules/vue/src/core/util/error.ts +81 -0
- package/vue2/node_modules/vue/src/core/util/index.ts +9 -0
- package/vue2/node_modules/vue/src/core/util/lang.ts +45 -0
- package/vue2/node_modules/vue/src/core/util/next-tick.ts +117 -0
- package/vue2/node_modules/vue/src/core/util/options.ts +489 -0
- package/vue2/node_modules/vue/src/core/util/perf.ts +28 -0
- package/vue2/node_modules/vue/src/core/util/props.ts +254 -0
- package/vue2/node_modules/vue/src/core/vdom/create-component.ts +275 -0
- package/vue2/node_modules/vue/src/core/vdom/create-element.ts +172 -0
- package/vue2/node_modules/vue/src/core/vdom/create-functional-component.ts +180 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/extract-props.ts +75 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/get-first-component-child.ts +16 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/index.ts +7 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/is-async-placeholder.ts +6 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/merge-hook.ts +40 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/normalize-children.ts +99 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/normalize-scoped-slots.ts +97 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/resolve-async-component.ts +157 -0
- package/vue2/node_modules/vue/src/core/vdom/helpers/update-listeners.ts +101 -0
- package/vue2/node_modules/vue/src/core/vdom/modules/directives.ts +137 -0
- package/vue2/node_modules/vue/src/core/vdom/modules/index.ts +4 -0
- package/vue2/node_modules/vue/src/core/vdom/modules/template-ref.ts +94 -0
- package/vue2/node_modules/vue/src/core/vdom/patch.ts +904 -0
- package/vue2/node_modules/vue/src/core/vdom/vnode.ts +119 -0
- package/vue2/node_modules/vue/src/global.d.ts +17 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/directives/html.ts +8 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/directives/index.ts +9 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/directives/model.ts +181 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/directives/text.ts +8 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/index.ts +6 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/modules/class.ts +44 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/modules/index.ts +5 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/modules/model.ts +89 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/modules/style.ts +47 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/options.ts +25 -0
- package/vue2/node_modules/vue/src/platforms/web/compiler/util.ts +22 -0
- package/vue2/node_modules/vue/src/platforms/web/entry-compiler.ts +4 -0
- package/vue2/node_modules/vue/src/platforms/web/entry-runtime-esm.ts +5 -0
- package/vue2/node_modules/vue/src/platforms/web/entry-runtime-with-compiler-esm.ts +5 -0
- package/vue2/node_modules/vue/src/platforms/web/entry-runtime-with-compiler.ts +10 -0
- package/vue2/node_modules/vue/src/platforms/web/entry-runtime.ts +7 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/class-util.ts +61 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/components/index.ts +7 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/components/transition-group.ts +204 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/components/transition.ts +205 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/directives/index.ts +7 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/directives/model.ts +148 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/directives/show.ts +61 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/index.ts +75 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/modules/attrs.ts +115 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/modules/class.ts +37 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/modules/dom-props.ts +123 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/modules/events.ts +127 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/modules/index.ts +8 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/modules/style.ts +104 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/modules/transition.ts +341 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/node-ops.ts +66 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/patch.ts +10 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime/transition-util.ts +215 -0
- package/vue2/node_modules/vue/src/platforms/web/runtime-with-compiler.ts +110 -0
- package/vue2/node_modules/vue/src/platforms/web/util/attrs.ts +58 -0
- package/vue2/node_modules/vue/src/platforms/web/util/class.ts +87 -0
- package/vue2/node_modules/vue/src/platforms/web/util/compat.ts +16 -0
- package/vue2/node_modules/vue/src/platforms/web/util/element.ts +76 -0
- package/vue2/node_modules/vue/src/platforms/web/util/index.ts +21 -0
- package/vue2/node_modules/vue/src/platforms/web/util/style.ts +71 -0
- package/vue2/node_modules/vue/src/shared/constants.ts +20 -0
- package/vue2/node_modules/vue/src/shared/util.ts +372 -0
- package/vue2/node_modules/vue/src/v3/apiAsyncComponent.ts +117 -0
- package/vue2/node_modules/vue/src/v3/apiInject.ts +71 -0
- package/vue2/node_modules/vue/src/v3/apiLifecycle.ts +68 -0
- package/vue2/node_modules/vue/src/v3/apiSetup.ts +246 -0
- package/vue2/node_modules/vue/src/v3/apiWatch.ts +349 -0
- package/vue2/node_modules/vue/src/v3/currentInstance.ts +23 -0
- package/vue2/node_modules/vue/src/v3/debug.ts +21 -0
- package/vue2/node_modules/vue/src/v3/h.ts +18 -0
- package/vue2/node_modules/vue/src/v3/index.ts +96 -0
- package/vue2/node_modules/vue/src/v3/reactivity/computed.ts +100 -0
- package/vue2/node_modules/vue/src/v3/reactivity/effect.ts +20 -0
- package/vue2/node_modules/vue/src/v3/reactivity/effectScope.ts +137 -0
- package/vue2/node_modules/vue/src/v3/reactivity/operations.ts +14 -0
- package/vue2/node_modules/vue/src/v3/reactivity/reactive.ts +137 -0
- package/vue2/node_modules/vue/src/v3/reactivity/readonly.ts +127 -0
- package/vue2/node_modules/vue/src/v3/reactivity/ref.ts +296 -0
- package/vue2/node_modules/vue/src/v3/sfc-helpers/useCssModule.ts +24 -0
- package/vue2/node_modules/vue/src/v3/sfc-helpers/useCssVars.ts +34 -0
- package/vue2/package.json +49 -0
- package/vue2/src/blocks/BaseText.vue +25 -0
- package/vue2/src/blocks/button/button.vue +68 -0
- package/vue2/src/blocks/button/component-info.ts +35 -0
- package/vue2/src/blocks/columns/columns.vue +238 -0
- package/vue2/src/blocks/columns/component-info.ts +219 -0
- package/vue2/src/blocks/custom-code/component-info.ts +24 -0
- package/vue2/src/blocks/custom-code/custom-code.vue +88 -0
- package/vue2/src/blocks/embed/component-info.ts +38 -0
- package/vue2/src/blocks/embed/embed.vue +71 -0
- package/vue2/src/blocks/embed/helpers.ts +2 -0
- package/vue2/src/blocks/form/component-info.ts +233 -0
- package/vue2/src/blocks/form/form.vue +7 -0
- package/vue2/src/blocks/fragment/component-info.ts +8 -0
- package/vue2/src/blocks/fragment/fragment.vue +19 -0
- package/vue2/src/blocks/helpers.ts +43 -0
- package/vue2/src/blocks/image/component-info.ts +124 -0
- package/vue2/src/blocks/image/image.helpers.ts +47 -0
- package/vue2/src/blocks/image/image.vue +174 -0
- package/vue2/src/blocks/img/component-info.ts +16 -0
- package/vue2/src/blocks/img/img.vue +59 -0
- package/vue2/src/blocks/input/component-info.ts +47 -0
- package/vue2/src/blocks/input/input.vue +52 -0
- package/vue2/src/blocks/raw-text/component-info.ts +11 -0
- package/vue2/src/blocks/raw-text/raw-text.vue +35 -0
- package/vue2/src/blocks/section/component-info.ts +41 -0
- package/vue2/src/blocks/section/section.vue +47 -0
- package/vue2/src/blocks/select/component-info.ts +44 -0
- package/vue2/src/blocks/select/select.vue +50 -0
- package/vue2/src/blocks/submit-button/component-info.ts +27 -0
- package/vue2/src/blocks/submit-button/submit-button.vue +34 -0
- package/vue2/src/blocks/symbol/component-info.ts +35 -0
- package/vue2/src/blocks/symbol/symbol.helpers.ts +47 -0
- package/vue2/src/blocks/symbol/symbol.vue +143 -0
- package/vue2/src/blocks/text/component-info.ts +20 -0
- package/vue2/src/blocks/text/text.vue +23 -0
- package/vue2/src/blocks/textarea/component-info.ts +38 -0
- package/vue2/src/blocks/textarea/textarea.vue +38 -0
- package/vue2/src/blocks/video/component-info.ts +83 -0
- package/vue2/src/blocks/video/video.vue +105 -0
- package/vue2/src/components/block/block.helpers.ts +89 -0
- package/vue2/src/components/block/block.vue +203 -0
- package/vue2/src/components/block/components/block-styles.vue +110 -0
- package/vue2/src/components/block/components/block-wrapper.vue +83 -0
- package/vue2/src/components/block/components/component-ref/component-ref.helpers.ts +52 -0
- package/vue2/src/components/block/components/component-ref/component-ref.vue +97 -0
- package/vue2/src/components/block/components/interactive-element.vue +48 -0
- package/vue2/src/components/block/components/repeated-block.vue +51 -0
- package/vue2/src/components/block/types.ts +6 -0
- package/vue2/src/components/blocks/blocks-wrapper.vue +91 -0
- package/vue2/src/components/blocks/blocks.vue +99 -0
- package/vue2/src/components/content/components/enable-editor.vue +418 -0
- package/vue2/src/components/content/components/styles.helpers.ts +77 -0
- package/vue2/src/components/content/components/styles.vue +60 -0
- package/vue2/src/components/content/content.helpers.ts +42 -0
- package/vue2/src/components/content/content.types.ts +23 -0
- package/vue2/src/components/content/content.vue +205 -0
- package/vue2/src/components/content/index.ts +1 -0
- package/vue2/src/components/content/wrap-component-ref.ts +6 -0
- package/vue2/src/components/content-variants/content-variants.types.ts +20 -0
- package/vue2/src/components/content-variants/content-variants.vue +177 -0
- package/vue2/src/components/content-variants/helpers.ts +207 -0
- package/vue2/src/components/inlined-script.vue +18 -0
- package/vue2/src/components/inlined-styles.vue +18 -0
- package/vue2/src/constants/builder-registered-components.ts +62 -0
- package/vue2/src/constants/device-sizes.ts +59 -0
- package/vue2/src/constants/sdk-version.ts +1 -0
- package/vue2/src/constants/target.ts +4 -0
- package/vue2/src/context/builder.context.ts +16 -0
- package/vue2/src/context/components.context.ts +6 -0
- package/vue2/src/context/types.ts +36 -0
- package/vue2/src/functions/apply-patch-with-mutation.ts +61 -0
- package/vue2/src/functions/camel-to-kebab-case.ts +1 -0
- package/vue2/src/functions/deopt.ts +6 -0
- package/vue2/src/functions/evaluate/browser-runtime/browser.ts +41 -0
- package/vue2/src/functions/evaluate/browser-runtime/index.ts +1 -0
- package/vue2/src/functions/evaluate/edge-runtime/acorn-interpreter.ts +2891 -0
- package/vue2/src/functions/evaluate/edge-runtime/edge-runtime.ts +96 -0
- package/vue2/src/functions/evaluate/edge-runtime/index.ts +1 -0
- package/vue2/src/functions/evaluate/evaluate.ts +66 -0
- package/vue2/src/functions/evaluate/helpers.ts +32 -0
- package/vue2/src/functions/evaluate/index.ts +1 -0
- package/vue2/src/functions/evaluate/node-runtime/index.ts +1 -0
- package/vue2/src/functions/evaluate/placeholder-runtime.ts +4 -0
- package/vue2/src/functions/event-handler-name.ts +1 -0
- package/vue2/src/functions/extract-text-styles.ts +24 -0
- package/vue2/src/functions/fast-clone.ts +4 -0
- package/vue2/src/functions/fetch-builder-props.ts +62 -0
- package/vue2/src/functions/get-block-actions-handler.ts +16 -0
- package/vue2/src/functions/get-block-actions.ts +36 -0
- package/vue2/src/functions/get-block-component-options.ts +11 -0
- package/vue2/src/functions/get-block-properties.ts +82 -0
- package/vue2/src/functions/get-builder-search-params/index.ts +40 -0
- package/vue2/src/functions/get-content/generate-content-url.ts +45 -0
- package/vue2/src/functions/get-content/index.ts +110 -0
- package/vue2/src/functions/get-content/types.ts +62 -0
- package/vue2/src/functions/get-fetch.ts +11 -0
- package/vue2/src/functions/get-global-this.ts +16 -0
- package/vue2/src/functions/get-processed-block.ts +69 -0
- package/vue2/src/functions/get-react-native-block-styles.ts +27 -0
- package/vue2/src/functions/is-browser.ts +3 -0
- package/vue2/src/functions/is-edge-runtime.ts +9 -0
- package/vue2/src/functions/is-editing.ts +5 -0
- package/vue2/src/functions/is-iframe.ts +4 -0
- package/vue2/src/functions/is-previewing.ts +11 -0
- package/vue2/src/functions/on-change.ts +29 -0
- package/vue2/src/functions/register-component.ts +48 -0
- package/vue2/src/functions/register.ts +44 -0
- package/vue2/src/functions/sanitize-react-native-block-styles.ts +58 -0
- package/vue2/src/functions/set-editor-settings.ts +15 -0
- package/vue2/src/functions/set.ts +14 -0
- package/vue2/src/functions/track/helpers.ts +51 -0
- package/vue2/src/functions/track/index.ts +131 -0
- package/vue2/src/functions/track/interaction.ts +63 -0
- package/vue2/src/functions/transform-block-properties.ts +18 -0
- package/vue2/src/functions/transform-block.ts +6 -0
- package/vue2/src/helpers/ab-tests.ts +166 -0
- package/vue2/src/helpers/canTrack.ts +2 -0
- package/vue2/src/helpers/cookie.ts +81 -0
- package/vue2/src/helpers/css.ts +33 -0
- package/vue2/src/helpers/flatten.ts +19 -0
- package/vue2/src/helpers/localStorage.ts +36 -0
- package/vue2/src/helpers/logger.ts +7 -0
- package/vue2/src/helpers/nullable.ts +2 -0
- package/vue2/src/helpers/preview-lru-cache/get.ts +4 -0
- package/vue2/src/helpers/preview-lru-cache/helpers.ts +0 -0
- package/vue2/src/helpers/preview-lru-cache/init.ts +7 -0
- package/vue2/src/helpers/preview-lru-cache/set.ts +12 -0
- package/vue2/src/helpers/preview-lru-cache/types.ts +0 -0
- package/vue2/src/helpers/sessionId.ts +37 -0
- package/vue2/src/helpers/time.ts +2 -0
- package/vue2/src/helpers/url.ts +15 -0
- package/vue2/src/helpers/uuid.ts +17 -0
- package/vue2/src/helpers/visitorId.ts +37 -0
- package/vue2/src/index-helpers/blocks-exports.ts +20 -0
- package/vue2/src/index-helpers/top-of-file.ts +4 -0
- package/vue2/src/index.ts +8 -0
- package/vue2/src/scripts/init-editing.ts +113 -0
- package/vue2/src/server-index.ts +15 -0
- package/vue2/tsconfig.config.json +8 -0
- package/vue2/tsconfig.json +16 -0
- package/vue2/vite.config.js +31 -0
- package/vue3/css/package.json +4 -0
- package/vue3/node_modules/@types/node/LICENSE +21 -0
- package/vue3/node_modules/@types/node/README.md +16 -0
- package/vue3/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/vue3/node_modules/@types/node/assert.d.ts +962 -0
- package/vue3/node_modules/@types/node/async_hooks.d.ts +497 -0
- package/vue3/node_modules/@types/node/buffer.d.ts +2236 -0
- package/vue3/node_modules/@types/node/child_process.d.ts +1396 -0
- package/vue3/node_modules/@types/node/cluster.d.ts +414 -0
- package/vue3/node_modules/@types/node/console.d.ts +412 -0
- package/vue3/node_modules/@types/node/constants.d.ts +18 -0
- package/vue3/node_modules/@types/node/crypto.d.ts +3869 -0
- package/vue3/node_modules/@types/node/dgram.d.ts +545 -0
- package/vue3/node_modules/@types/node/diagnostics_channel.d.ts +191 -0
- package/vue3/node_modules/@types/node/dns/promises.d.ts +369 -0
- package/vue3/node_modules/@types/node/dns.d.ts +655 -0
- package/vue3/node_modules/@types/node/domain.d.ts +170 -0
- package/vue3/node_modules/@types/node/events.d.ts +641 -0
- package/vue3/node_modules/@types/node/fs/promises.d.ts +1094 -0
- package/vue3/node_modules/@types/node/fs.d.ts +3803 -0
- package/vue3/node_modules/@types/node/globals.d.ts +287 -0
- package/vue3/node_modules/@types/node/globals.global.d.ts +1 -0
- package/vue3/node_modules/@types/node/http.d.ts +1504 -0
- package/vue3/node_modules/@types/node/http2.d.ts +2100 -0
- package/vue3/node_modules/@types/node/https.d.ts +532 -0
- package/vue3/node_modules/@types/node/index.d.ts +131 -0
- package/vue3/node_modules/@types/node/inspector.d.ts +2745 -0
- package/vue3/node_modules/@types/node/module.d.ts +115 -0
- package/vue3/node_modules/@types/node/net.d.ts +828 -0
- package/vue3/node_modules/@types/node/os.d.ts +455 -0
- package/vue3/node_modules/@types/node/package.json +232 -0
- package/vue3/node_modules/@types/node/path.d.ts +191 -0
- package/vue3/node_modules/@types/node/perf_hooks.d.ts +586 -0
- package/vue3/node_modules/@types/node/process.d.ts +1481 -0
- package/vue3/node_modules/@types/node/punycode.d.ts +117 -0
- package/vue3/node_modules/@types/node/querystring.d.ts +131 -0
- package/vue3/node_modules/@types/node/readline.d.ts +543 -0
- package/vue3/node_modules/@types/node/repl.d.ts +424 -0
- package/vue3/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/vue3/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/vue3/node_modules/@types/node/stream/web.d.ts +392 -0
- package/vue3/node_modules/@types/node/stream.d.ts +1363 -0
- package/vue3/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/vue3/node_modules/@types/node/test.d.ts +190 -0
- package/vue3/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/vue3/node_modules/@types/node/timers.d.ts +94 -0
- package/vue3/node_modules/@types/node/tls.d.ts +1019 -0
- package/vue3/node_modules/@types/node/trace_events.d.ts +161 -0
- package/vue3/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/vue3/node_modules/@types/node/ts4.8/assert.d.ts +962 -0
- package/vue3/node_modules/@types/node/ts4.8/async_hooks.d.ts +497 -0
- package/vue3/node_modules/@types/node/ts4.8/buffer.d.ts +2236 -0
- package/vue3/node_modules/@types/node/ts4.8/child_process.d.ts +1396 -0
- package/vue3/node_modules/@types/node/ts4.8/cluster.d.ts +414 -0
- package/vue3/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/vue3/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/vue3/node_modules/@types/node/ts4.8/crypto.d.ts +3866 -0
- package/vue3/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/vue3/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/vue3/node_modules/@types/node/ts4.8/dns/promises.d.ts +368 -0
- package/vue3/node_modules/@types/node/ts4.8/dns.d.ts +654 -0
- package/vue3/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/vue3/node_modules/@types/node/ts4.8/events.d.ts +641 -0
- package/vue3/node_modules/@types/node/ts4.8/fs/promises.d.ts +1094 -0
- package/vue3/node_modules/@types/node/ts4.8/fs.d.ts +3802 -0
- package/vue3/node_modules/@types/node/ts4.8/globals.d.ts +284 -0
- package/vue3/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/vue3/node_modules/@types/node/ts4.8/http.d.ts +1503 -0
- package/vue3/node_modules/@types/node/ts4.8/http2.d.ts +2100 -0
- package/vue3/node_modules/@types/node/ts4.8/https.d.ts +532 -0
- package/vue3/node_modules/@types/node/ts4.8/index.d.ts +86 -0
- package/vue3/node_modules/@types/node/ts4.8/inspector.d.ts +2745 -0
- package/vue3/node_modules/@types/node/ts4.8/module.d.ts +115 -0
- package/vue3/node_modules/@types/node/ts4.8/net.d.ts +828 -0
- package/vue3/node_modules/@types/node/ts4.8/os.d.ts +456 -0
- package/vue3/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/vue3/node_modules/@types/node/ts4.8/perf_hooks.d.ts +586 -0
- package/vue3/node_modules/@types/node/ts4.8/process.d.ts +1481 -0
- package/vue3/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/vue3/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/vue3/node_modules/@types/node/ts4.8/readline.d.ts +543 -0
- package/vue3/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/vue3/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/vue3/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/vue3/node_modules/@types/node/ts4.8/stream/web.d.ts +392 -0
- package/vue3/node_modules/@types/node/ts4.8/stream.d.ts +1363 -0
- package/vue3/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/vue3/node_modules/@types/node/ts4.8/test.d.ts +190 -0
- package/vue3/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/vue3/node_modules/@types/node/ts4.8/timers.d.ts +94 -0
- package/vue3/node_modules/@types/node/ts4.8/tls.d.ts +1019 -0
- package/vue3/node_modules/@types/node/ts4.8/trace_events.d.ts +161 -0
- package/vue3/node_modules/@types/node/ts4.8/tty.d.ts +204 -0
- package/vue3/node_modules/@types/node/ts4.8/url.d.ts +855 -0
- package/vue3/node_modules/@types/node/ts4.8/util.d.ts +1594 -0
- package/vue3/node_modules/@types/node/ts4.8/v8.d.ts +472 -0
- package/vue3/node_modules/@types/node/ts4.8/vm.d.ts +507 -0
- package/vue3/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
- package/vue3/node_modules/@types/node/ts4.8/worker_threads.d.ts +649 -0
- package/vue3/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/vue3/node_modules/@types/node/tty.d.ts +204 -0
- package/vue3/node_modules/@types/node/url.d.ts +855 -0
- package/vue3/node_modules/@types/node/util.d.ts +1594 -0
- package/vue3/node_modules/@types/node/v8.d.ts +472 -0
- package/vue3/node_modules/@types/node/vm.d.ts +507 -0
- package/vue3/node_modules/@types/node/wasi.d.ts +158 -0
- package/vue3/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/vue3/node_modules/@types/node/zlib.d.ts +517 -0
- package/vue3/node_modules/@vitejs/plugin-vue/LICENSE +21 -0
- package/vue3/node_modules/@vitejs/plugin-vue/README.md +171 -0
- package/vue3/node_modules/@vitejs/plugin-vue/package.json +51 -0
- package/vue3/node_modules/@vue/server-renderer/LICENSE +21 -0
- package/vue3/node_modules/@vue/server-renderer/README.md +178 -0
- package/vue3/node_modules/@vue/server-renderer/index.js +7 -0
- package/vue3/node_modules/@vue/server-renderer/package.json +41 -0
- package/vue3/node_modules/@vue/tsconfig/README.md +31 -0
- package/vue3/node_modules/@vue/tsconfig/package.json +35 -0
- package/vue3/node_modules/@vue/tsconfig/tsconfig.json +40 -0
- package/vue3/node_modules/@vue/tsconfig/tsconfig.node.json +17 -0
- package/vue3/node_modules/@vue/tsconfig/tsconfig.web.json +19 -0
- package/vue3/node_modules/esbuild/LICENSE.md +21 -0
- package/vue3/node_modules/esbuild/README.md +3 -0
- package/vue3/node_modules/esbuild/bin/esbuild +212 -0
- package/vue3/node_modules/esbuild/install.js +245 -0
- package/vue3/node_modules/esbuild/package.json +42 -0
- package/vue3/node_modules/vite/LICENSE.md +3450 -0
- package/vue3/node_modules/vite/README.md +20 -0
- package/vue3/node_modules/vite/bin/openChrome.applescript +95 -0
- package/vue3/node_modules/vite/bin/vite.js +61 -0
- package/vue3/node_modules/vite/client.d.ts +248 -0
- package/vue3/node_modules/vite/index.cjs +34 -0
- package/vue3/node_modules/vite/package.json +154 -0
- package/vue3/node_modules/vite-plugin-dts/LICENSE +21 -0
- package/vue3/node_modules/vite-plugin-dts/README.md +368 -0
- package/vue3/node_modules/vite-plugin-dts/README.zh-CN.md +368 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/LICENSE +21 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/README.md +36 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/bin/vue-tsc.js +67 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/index.d.ts +16 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/index.js +120 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/shared.d.ts +8 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/out/shared.js +5 -0
- package/vue3/node_modules/vite-plugin-dts/node_modules/vue-tsc/package.json +28 -0
- package/vue3/node_modules/vite-plugin-dts/package.json +103 -0
- package/vue3/node_modules/vue/LICENSE +21 -0
- package/vue3/node_modules/vue/README.md +54 -0
- package/vue3/node_modules/vue/compiler-sfc/index.d.mts +1 -0
- package/vue3/node_modules/vue/compiler-sfc/index.d.ts +1 -0
- package/vue3/node_modules/vue/compiler-sfc/index.js +3 -0
- package/vue3/node_modules/vue/compiler-sfc/index.mjs +3 -0
- package/vue3/node_modules/vue/compiler-sfc/package.json +4 -0
- package/vue3/node_modules/vue/compiler-sfc/register-ts.js +5 -0
- package/vue3/node_modules/vue/index.js +7 -0
- package/vue3/node_modules/vue/index.mjs +1 -0
- package/vue3/node_modules/vue/jsx-runtime/index.d.ts +29 -0
- package/vue3/node_modules/vue/jsx-runtime/index.js +15 -0
- package/vue3/node_modules/vue/jsx-runtime/index.mjs +17 -0
- package/vue3/node_modules/vue/jsx-runtime/package.json +5 -0
- package/vue3/node_modules/vue/jsx.d.ts +26 -0
- package/vue3/node_modules/vue/macros-global.d.ts +19 -0
- package/vue3/node_modules/vue/macros.d.ts +112 -0
- package/vue3/node_modules/vue/package.json +103 -0
- package/vue3/node_modules/vue/ref-macros.d.ts +2 -0
- package/vue3/node_modules/vue/server-renderer/index.d.mts +1 -0
- package/vue3/node_modules/vue/server-renderer/index.d.ts +1 -0
- package/vue3/node_modules/vue/server-renderer/index.js +1 -0
- package/vue3/node_modules/vue/server-renderer/index.mjs +1 -0
- package/vue3/node_modules/vue/server-renderer/package.json +4 -0
- package/vue3/node_modules/vue-tsc/LICENSE +21 -0
- package/vue3/node_modules/vue-tsc/README.md +44 -0
- package/vue3/node_modules/vue-tsc/bin/vue-tsc.js +48 -0
- package/vue3/node_modules/vue-tsc/out/proxy.d.ts +4 -0
- package/vue3/node_modules/vue-tsc/out/proxy.js +110 -0
- package/vue3/node_modules/vue-tsc/package.json +26 -0
- package/vue3/package.json +48 -0
- package/vue3/src/blocks/BaseText.vue +25 -0
- package/vue3/src/blocks/button/button.vue +71 -0
- package/vue3/src/blocks/button/component-info.ts +35 -0
- package/vue3/src/blocks/columns/columns.vue +220 -0
- package/vue3/src/blocks/columns/component-info.ts +219 -0
- package/vue3/src/blocks/custom-code/component-info.ts +24 -0
- package/vue3/src/blocks/custom-code/custom-code.vue +88 -0
- package/vue3/src/blocks/embed/component-info.ts +38 -0
- package/vue3/src/blocks/embed/embed.vue +71 -0
- package/vue3/src/blocks/embed/helpers.ts +2 -0
- package/vue3/src/blocks/form/component-info.ts +233 -0
- package/vue3/src/blocks/form/form.vue +7 -0
- package/vue3/src/blocks/fragment/component-info.ts +8 -0
- package/vue3/src/blocks/fragment/fragment.vue +19 -0
- package/vue3/src/blocks/helpers.ts +43 -0
- package/vue3/src/blocks/image/component-info.ts +124 -0
- package/vue3/src/blocks/image/image.helpers.ts +47 -0
- package/vue3/src/blocks/image/image.vue +172 -0
- package/vue3/src/blocks/img/component-info.ts +16 -0
- package/vue3/src/blocks/img/img.vue +59 -0
- package/vue3/src/blocks/input/component-info.ts +47 -0
- package/vue3/src/blocks/input/input.vue +52 -0
- package/vue3/src/blocks/raw-text/component-info.ts +11 -0
- package/vue3/src/blocks/raw-text/raw-text.vue +35 -0
- package/vue3/src/blocks/section/component-info.ts +41 -0
- package/vue3/src/blocks/section/section.vue +47 -0
- package/vue3/src/blocks/select/component-info.ts +44 -0
- package/vue3/src/blocks/select/select.vue +46 -0
- package/vue3/src/blocks/submit-button/component-info.ts +27 -0
- package/vue3/src/blocks/submit-button/submit-button.vue +34 -0
- package/vue3/src/blocks/symbol/component-info.ts +35 -0
- package/vue3/src/blocks/symbol/symbol.helpers.ts +47 -0
- package/vue3/src/blocks/symbol/symbol.vue +134 -0
- package/vue3/src/blocks/text/component-info.ts +20 -0
- package/vue3/src/blocks/text/text.vue +23 -0
- package/vue3/src/blocks/textarea/component-info.ts +38 -0
- package/vue3/src/blocks/textarea/textarea.vue +38 -0
- package/vue3/src/blocks/video/component-info.ts +83 -0
- package/vue3/src/blocks/video/video.vue +105 -0
- package/vue3/src/components/block/block.helpers.ts +89 -0
- package/vue3/src/components/block/block.vue +214 -0
- package/vue3/src/components/block/components/block-styles.vue +100 -0
- package/vue3/src/components/block/components/block-wrapper.vue +86 -0
- package/vue3/src/components/block/components/component-ref/component-ref.helpers.ts +52 -0
- package/vue3/src/components/block/components/component-ref/component-ref.vue +74 -0
- package/vue3/src/components/block/components/interactive-element.vue +48 -0
- package/vue3/src/components/block/components/repeated-block.vue +51 -0
- package/vue3/src/components/block/types.ts +6 -0
- package/vue3/src/components/blocks/blocks-wrapper.vue +91 -0
- package/vue3/src/components/blocks/blocks.vue +78 -0
- package/vue3/src/components/content/components/enable-editor.vue +419 -0
- package/vue3/src/components/content/components/styles.helpers.ts +77 -0
- package/vue3/src/components/content/components/styles.vue +51 -0
- package/vue3/src/components/content/content.helpers.ts +42 -0
- package/vue3/src/components/content/content.types.ts +23 -0
- package/vue3/src/components/content/content.vue +169 -0
- package/vue3/src/components/content/index.ts +1 -0
- package/vue3/src/components/content/wrap-component-ref.ts +7 -0
- package/vue3/src/components/content-variants/content-variants.types.ts +20 -0
- package/vue3/src/components/content-variants/content-variants.vue +151 -0
- package/vue3/src/components/content-variants/helpers.ts +207 -0
- package/vue3/src/components/inlined-script.vue +12 -0
- package/vue3/src/components/inlined-styles.vue +12 -0
- package/vue3/src/constants/builder-registered-components.ts +62 -0
- package/vue3/src/constants/device-sizes.ts +59 -0
- package/vue3/src/constants/sdk-version.ts +1 -0
- package/vue3/src/constants/target.ts +4 -0
- package/vue3/src/context/builder.context.ts +16 -0
- package/vue3/src/context/components.context.ts +6 -0
- package/vue3/src/context/types.ts +36 -0
- package/vue3/src/functions/apply-patch-with-mutation.ts +61 -0
- package/vue3/src/functions/camel-to-kebab-case.ts +1 -0
- package/vue3/src/functions/deopt.ts +6 -0
- package/vue3/src/functions/evaluate/browser-runtime/browser.ts +41 -0
- package/vue3/src/functions/evaluate/browser-runtime/index.ts +1 -0
- package/vue3/src/functions/evaluate/edge-runtime/acorn-interpreter.ts +2891 -0
- package/vue3/src/functions/evaluate/edge-runtime/edge-runtime.ts +96 -0
- package/vue3/src/functions/evaluate/edge-runtime/index.ts +1 -0
- package/vue3/src/functions/evaluate/evaluate.ts +66 -0
- package/vue3/src/functions/evaluate/helpers.ts +32 -0
- package/vue3/src/functions/evaluate/index.ts +1 -0
- package/vue3/src/functions/evaluate/node-runtime/index.ts +1 -0
- package/vue3/src/functions/evaluate/placeholder-runtime.ts +4 -0
- package/vue3/src/functions/event-handler-name.ts +1 -0
- package/vue3/src/functions/extract-text-styles.ts +24 -0
- package/vue3/src/functions/fast-clone.ts +4 -0
- package/vue3/src/functions/fetch-builder-props.ts +62 -0
- package/vue3/src/functions/get-block-actions-handler.ts +16 -0
- package/vue3/src/functions/get-block-actions.ts +36 -0
- package/vue3/src/functions/get-block-component-options.ts +11 -0
- package/vue3/src/functions/get-block-properties.ts +82 -0
- package/vue3/src/functions/get-builder-search-params/index.ts +40 -0
- package/vue3/src/functions/get-content/generate-content-url.ts +45 -0
- package/vue3/src/functions/get-content/index.ts +110 -0
- package/vue3/src/functions/get-content/types.ts +62 -0
- package/vue3/src/functions/get-fetch.ts +11 -0
- package/vue3/src/functions/get-global-this.ts +16 -0
- package/vue3/src/functions/get-processed-block.ts +69 -0
- package/vue3/src/functions/get-react-native-block-styles.ts +27 -0
- package/vue3/src/functions/is-browser.ts +3 -0
- package/vue3/src/functions/is-edge-runtime.ts +9 -0
- package/vue3/src/functions/is-editing.ts +5 -0
- package/vue3/src/functions/is-iframe.ts +4 -0
- package/vue3/src/functions/is-previewing.ts +11 -0
- package/vue3/src/functions/on-change.ts +29 -0
- package/vue3/src/functions/register-component.ts +48 -0
- package/vue3/src/functions/register.ts +44 -0
- package/vue3/src/functions/sanitize-react-native-block-styles.ts +58 -0
- package/vue3/src/functions/set-editor-settings.ts +15 -0
- package/vue3/src/functions/set.ts +14 -0
- package/vue3/src/functions/track/helpers.ts +51 -0
- package/vue3/src/functions/track/index.ts +131 -0
- package/vue3/src/functions/track/interaction.ts +63 -0
- package/vue3/src/functions/transform-block-properties.ts +18 -0
- package/vue3/src/functions/transform-block.ts +6 -0
- package/vue3/src/helpers/ab-tests.ts +166 -0
- package/vue3/src/helpers/canTrack.ts +2 -0
- package/vue3/src/helpers/cookie.ts +81 -0
- package/vue3/src/helpers/css.ts +33 -0
- package/vue3/src/helpers/flatten.ts +19 -0
- package/vue3/src/helpers/localStorage.ts +36 -0
- package/vue3/src/helpers/logger.ts +7 -0
- package/vue3/src/helpers/nullable.ts +2 -0
- package/vue3/src/helpers/preview-lru-cache/get.ts +4 -0
- package/vue3/src/helpers/preview-lru-cache/helpers.ts +0 -0
- package/vue3/src/helpers/preview-lru-cache/init.ts +7 -0
- package/vue3/src/helpers/preview-lru-cache/set.ts +12 -0
- package/vue3/src/helpers/preview-lru-cache/types.ts +0 -0
- package/vue3/src/helpers/sessionId.ts +37 -0
- package/vue3/src/helpers/time.ts +2 -0
- package/vue3/src/helpers/url.ts +15 -0
- package/vue3/src/helpers/uuid.ts +17 -0
- package/vue3/src/helpers/visitorId.ts +37 -0
- package/vue3/src/index-helpers/blocks-exports.ts +20 -0
- package/vue3/src/index-helpers/top-of-file.ts +4 -0
- package/vue3/src/index.ts +8 -0
- package/vue3/src/scripts/init-editing.ts +113 -0
- package/vue3/src/server-index.ts +15 -0
- package/vue3/tsconfig.config.json +8 -0
- package/vue3/tsconfig.json +17 -0
- package/vue3/vite.config.js +31 -0
- package/packages/_vue2/dist/block-styles.2f2d681c.js +0 -78
- package/packages/_vue2/dist/block-styles.e0c362f1.cjs +0 -1
- package/packages/_vue2/dist/block-wrapper.60491ece.cjs +0 -1
- package/packages/_vue2/dist/block-wrapper.675417b1.js +0 -66
- package/packages/_vue2/dist/block.2b1ac86c.cjs +0 -3
- package/packages/_vue2/dist/block.b10ffc8d.js +0 -179
- package/packages/_vue2/dist/blocks-wrapper.1f4e53ec.js +0 -72
- package/packages/_vue2/dist/blocks-wrapper.87c356a1.cjs +0 -1
- package/packages/_vue2/dist/component-ref.d1a3e1db.js +0 -98
- package/packages/_vue2/dist/component-ref.e0e18275.cjs +0 -1
- package/packages/_vue2/dist/content.4dd9bed9.js +0 -913
- package/packages/_vue2/dist/content.e0c272e6.cjs +0 -1
- package/packages/_vue2/dist/css.3b52add0.js +0 -21
- package/packages/_vue2/dist/css.5b6afc6e.cjs +0 -6
- package/packages/_vue2/dist/enable-editor.29678a79.cjs +0 -1
- package/packages/_vue2/dist/enable-editor.c8c377d7.js +0 -427
- package/packages/_vue2/dist/evaluate.585803ce.cjs +0 -1
- package/packages/_vue2/dist/evaluate.b622b309.js +0 -97
- package/packages/_vue2/dist/get-block-actions.17f0418a.js +0 -36
- package/packages/_vue2/dist/get-block-actions.cc26a1a3.cjs +0 -1
- package/packages/_vue2/dist/get-block-properties.3a4c9314.js +0 -48
- package/packages/_vue2/dist/get-block-properties.fbe48fae.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block.5937bfa6.cjs +0 -1
- package/packages/_vue2/dist/get-processed-block.92e6395c.js +0 -53
- package/packages/_vue2/dist/index.04a22940.cjs +0 -32
- package/packages/_vue2/dist/index.835b8ee0.js +0 -1413
- package/packages/_vue2/dist/inlined-script.0c7f9ce3.cjs +0 -1
- package/packages/_vue2/dist/inlined-script.3ec95873.js +0 -23
- package/packages/_vue2/dist/inlined-styles.89ce41e1.cjs +0 -1
- package/packages/_vue2/dist/inlined-styles.ccff7c47.js +0 -23
- package/packages/_vue2/dist/interactive-element.fa779554.js +0 -42
- package/packages/_vue2/dist/interactive-element.fdd261bc.cjs +0 -1
- package/packages/_vue2/dist/non-node-runtime.ddfeed94.cjs +0 -21
- package/packages/_vue2/dist/non-node-runtime.eb7f6595.js +0 -2477
- package/packages/_vue2/dist/repeated-block.3c989659.js +0 -38
- package/packages/_vue2/dist/repeated-block.48fbaaab.cjs +0 -1
- package/packages/_vue2/dist/sdk.cjs +0 -1
- package/packages/_vue2/dist/sdk.d.ts +0 -1
- package/packages/_vue2/dist/sdk.js +0 -29
- package/packages/_vue2/dist/set.87eb0329.cjs +0 -1
- package/packages/_vue2/dist/set.b219ab0e.js +0 -9
- package/packages/_vue2/dist/src/blocks/button/button.vue.d.ts +0 -17
- package/packages/_vue2/dist/src/blocks/button/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +0 -44
- package/packages/_vue2/dist/src/blocks/columns/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/custom-code/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +0 -14
- package/packages/_vue2/dist/src/blocks/embed/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +0 -18
- package/packages/_vue2/dist/src/blocks/embed/helpers.d.ts +0 -1
- package/packages/_vue2/dist/src/blocks/fragment/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/fragment/fragment.vue.d.ts +0 -7
- package/packages/_vue2/dist/src/blocks/helpers.d.ts +0 -13
- package/packages/_vue2/dist/src/blocks/image/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/image/image.helpers.d.ts +0 -1
- package/packages/_vue2/dist/src/blocks/image/image.vue.d.ts +0 -72
- package/packages/_vue2/dist/src/blocks/img/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +0 -38
- package/packages/_vue2/dist/src/blocks/section/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/section/section.vue.d.ts +0 -22
- package/packages/_vue2/dist/src/blocks/symbol/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/symbol/symbol.helpers.d.ts +0 -14
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +0 -37
- package/packages/_vue2/dist/src/blocks/text/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/text/text.vue.d.ts +0 -11
- package/packages/_vue2/dist/src/blocks/video/component-info.d.ts +0 -2
- package/packages/_vue2/dist/src/blocks/video/video.vue.d.ts +0 -64
- package/packages/_vue2/dist/src/components/block/block.helpers.d.ts +0 -13
- package/packages/_vue2/dist/src/components/block/block.vue.d.ts +0 -9
- package/packages/_vue2/dist/src/components/block/components/block-styles.vue.d.ts +0 -23
- package/packages/_vue2/dist/src/components/block/components/block-wrapper.vue.d.ts +0 -29
- package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +0 -30
- package/packages/_vue2/dist/src/components/block/components/component-ref/component-ref.vue.d.ts +0 -2
- package/packages/_vue2/dist/src/components/block/components/interactive-element.vue.d.ts +0 -30
- package/packages/_vue2/dist/src/components/block/components/repeated-block.vue.d.ts +0 -16
- package/packages/_vue2/dist/src/components/block/types.d.ts +0 -6
- package/packages/_vue2/dist/src/components/blocks/blocks-wrapper.vue.d.ts +0 -30
- package/packages/_vue2/dist/src/components/blocks/blocks.vue.d.ts +0 -29
- package/packages/_vue2/dist/src/components/content/components/enable-editor.vue.d.ts +0 -56
- package/packages/_vue2/dist/src/components/content/components/styles.helpers.d.ts +0 -15
- package/packages/_vue2/dist/src/components/content/components/styles.vue.d.ts +0 -16
- package/packages/_vue2/dist/src/components/content/content.helpers.d.ts +0 -7
- package/packages/_vue2/dist/src/components/content/content.types.d.ts +0 -24
- package/packages/_vue2/dist/src/components/content/content.vue.d.ts +0 -26
- package/packages/_vue2/dist/src/components/content/wrap-component-ref.d.ts +0 -6
- package/packages/_vue2/dist/src/components/content-variants/content-variants.types.d.ts +0 -20
- package/packages/_vue2/dist/src/components/content-variants/content-variants.vue.d.ts +0 -50
- package/packages/_vue2/dist/src/components/content-variants/helpers.d.ts +0 -18
- package/packages/_vue2/dist/src/components/inlined-script.vue.d.ts +0 -11
- package/packages/_vue2/dist/src/components/inlined-styles.vue.d.ts +0 -11
- package/packages/_vue2/dist/src/constants/builder-registered-components.d.ts +0 -6
- package/packages/_vue2/dist/src/constants/device-sizes.d.ts +0 -13
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +0 -1
- package/packages/_vue2/dist/src/constants/target.d.ts +0 -2
- package/packages/_vue2/dist/src/context/builder.context.d.ts +0 -15
- package/packages/_vue2/dist/src/context/components.context.d.ts +0 -7
- package/packages/_vue2/dist/src/context/types.d.ts +0 -35
- package/packages/_vue2/dist/src/functions/camel-to-kebab-case.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/evaluate/browser-runtime/browser.d.ts +0 -4
- package/packages/_vue2/dist/src/functions/evaluate/evaluate.d.ts +0 -6
- package/packages/_vue2/dist/src/functions/evaluate/helpers.d.ts +0 -18
- package/packages/_vue2/dist/src/functions/evaluate/index.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/acorn-interpreter.d.ts +0 -2
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/index.d.ts +0 -6
- package/packages/_vue2/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +0 -2
- package/packages/_vue2/dist/src/functions/event-handler-name.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/extract-text-styles.d.ts +0 -4
- package/packages/_vue2/dist/src/functions/fast-clone.d.ts +0 -4
- package/packages/_vue2/dist/src/functions/fetch-builder-props.d.ts +0 -39
- package/packages/_vue2/dist/src/functions/get-block-actions-handler.d.ts +0 -8
- package/packages/_vue2/dist/src/functions/get-block-actions.d.ts +0 -10
- package/packages/_vue2/dist/src/functions/get-block-component-options.d.ts +0 -2
- package/packages/_vue2/dist/src/functions/get-block-properties.d.ts +0 -6
- package/packages/_vue2/dist/src/functions/get-builder-search-params/index.d.ts +0 -12
- package/packages/_vue2/dist/src/functions/get-content/generate-content-url.d.ts +0 -2
- package/packages/_vue2/dist/src/functions/get-content/index.d.ts +0 -29
- package/packages/_vue2/dist/src/functions/get-content/types.d.ts +0 -51
- package/packages/_vue2/dist/src/functions/get-fetch.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/get-processed-block.d.ts +0 -10
- package/packages/_vue2/dist/src/functions/get-react-native-block-styles.d.ts +0 -7
- package/packages/_vue2/dist/src/functions/is-browser.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/is-editing.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/is-iframe.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/is-non-node-server.d.ts +0 -4
- package/packages/_vue2/dist/src/functions/is-previewing.d.ts +0 -1
- package/packages/_vue2/dist/src/functions/register-component.d.ts +0 -15
- package/packages/_vue2/dist/src/functions/register.d.ts +0 -16
- package/packages/_vue2/dist/src/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/packages/_vue2/dist/src/functions/set-editor-settings.d.ts +0 -4
- package/packages/_vue2/dist/src/functions/set.d.ts +0 -7
- package/packages/_vue2/dist/src/functions/track/helpers.d.ts +0 -5
- package/packages/_vue2/dist/src/functions/track/index.d.ts +0 -51
- package/packages/_vue2/dist/src/functions/track/interaction.d.ts +0 -13
- package/packages/_vue2/dist/src/functions/transform-block-properties.d.ts +0 -2
- package/packages/_vue2/dist/src/functions/transform-block.d.ts +0 -2
- package/packages/_vue2/dist/src/helpers/ab-tests.d.ts +0 -9
- package/packages/_vue2/dist/src/helpers/canTrack.d.ts +0 -1
- package/packages/_vue2/dist/src/helpers/cookie.d.ts +0 -19
- package/packages/_vue2/dist/src/helpers/css.d.ts +0 -7
- package/packages/_vue2/dist/src/helpers/flatten.d.ts +0 -6
- package/packages/_vue2/dist/src/helpers/localStorage.d.ts +0 -9
- package/packages/_vue2/dist/src/helpers/logger.d.ts +0 -6
- package/packages/_vue2/dist/src/helpers/nullable.d.ts +0 -2
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/get.d.ts +0 -2
- package/packages/_vue2/dist/src/helpers/preview-lru-cache/set.d.ts +0 -7
- package/packages/_vue2/dist/src/helpers/sessionId.d.ts +0 -6
- package/packages/_vue2/dist/src/helpers/url.d.ts +0 -6
- package/packages/_vue2/dist/src/helpers/uuid.d.ts +0 -8
- package/packages/_vue2/dist/src/helpers/visitorId.d.ts +0 -6
- package/packages/_vue2/dist/src/index-helpers/blocks-exports.d.ts +0 -88
- package/packages/_vue2/dist/src/index-helpers/top-of-file.d.ts +0 -1
- package/packages/_vue2/dist/src/index.d.ts +0 -7
- package/packages/_vue2/dist/src/scripts/init-editing.d.ts +0 -6
- package/packages/_vue2/dist/src/server-index.d.ts +0 -15
- package/packages/_vue2/dist/src/types/api-version.d.ts +0 -2
- package/packages/_vue2/dist/src/types/builder-block.d.ts +0 -66
- package/packages/_vue2/dist/src/types/builder-content.d.ts +0 -44
- package/packages/_vue2/dist/src/types/builder-props.d.ts +0 -9
- package/packages/_vue2/dist/src/types/can-track.d.ts +0 -3
- package/packages/_vue2/dist/src/types/components.d.ts +0 -111
- package/packages/_vue2/dist/src/types/deep-partial.d.ts +0 -3
- package/packages/_vue2/dist/src/types/element.d.ts +0 -59
- package/packages/_vue2/dist/src/types/enforced-partials.d.ts +0 -21
- package/packages/_vue2/dist/src/types/input.d.ts +0 -121
- package/packages/_vue2/dist/src/types/targets.d.ts +0 -1
- package/packages/_vue2/dist/src/types/typescript.d.ts +0 -11
- package/packages/_vue2/dist/style.css +0 -1
- package/packages/_vue2/dist/styles.22b87564.js +0 -89
- package/packages/_vue2/dist/styles.a3209286.cjs +0 -31
- package/packages/_vue3/dist/block-wrapper.4abbfa5d.cjs +0 -1
- package/packages/_vue3/dist/block-wrapper.e6a959ca.js +0 -54
- package/packages/_vue3/dist/component-ref.16c18e90.cjs +0 -1
- package/packages/_vue3/dist/component-ref.b3232d22.js +0 -111
- package/packages/_vue3/dist/get-block-actions.48118020.js +0 -79
- package/packages/_vue3/dist/get-block-actions.83a66ea4.cjs +0 -1
- package/packages/_vue3/dist/index.ee80c2d7.js +0 -3262
- package/packages/_vue3/dist/index.f36face2.cjs +0 -69
- package/packages/_vue3/dist/non-node-runtime.15581a63.js +0 -2475
- package/packages/_vue3/dist/non-node-runtime.fb2b33d0.cjs +0 -21
- package/packages/_vue3/dist/repeated-block.33f567b4.cjs +0 -1
- package/packages/_vue3/dist/repeated-block.53ae8c41.js +0 -33
- package/packages/_vue3/dist/sdk.cjs +0 -1
- package/packages/_vue3/dist/sdk.d.ts +0 -1
- package/packages/_vue3/dist/sdk.js +0 -29
- package/packages/_vue3/dist/src/blocks/button/button.vue.d.ts +0 -30
- package/packages/_vue3/dist/src/blocks/button/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +0 -69
- package/packages/_vue3/dist/src/blocks/columns/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/custom-code/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +0 -21
- package/packages/_vue3/dist/src/blocks/embed/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +0 -22
- package/packages/_vue3/dist/src/blocks/embed/helpers.d.ts +0 -1
- package/packages/_vue3/dist/src/blocks/fragment/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/fragment/fragment.vue.d.ts +0 -7
- package/packages/_vue3/dist/src/blocks/helpers.d.ts +0 -13
- package/packages/_vue3/dist/src/blocks/image/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/image/image.helpers.d.ts +0 -1
- package/packages/_vue3/dist/src/blocks/image/image.vue.d.ts +0 -72
- package/packages/_vue3/dist/src/blocks/img/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +0 -38
- package/packages/_vue3/dist/src/blocks/section/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/section/section.vue.d.ts +0 -22
- package/packages/_vue3/dist/src/blocks/symbol/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/symbol/symbol.helpers.d.ts +0 -14
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +0 -56
- package/packages/_vue3/dist/src/blocks/text/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/text/text.vue.d.ts +0 -11
- package/packages/_vue3/dist/src/blocks/video/component-info.d.ts +0 -2
- package/packages/_vue3/dist/src/blocks/video/video.vue.d.ts +0 -64
- package/packages/_vue3/dist/src/components/block/block.helpers.d.ts +0 -13
- package/packages/_vue3/dist/src/components/block/block.vue.d.ts +0 -9
- package/packages/_vue3/dist/src/components/block/components/block-styles.vue.d.ts +0 -23
- package/packages/_vue3/dist/src/components/block/components/block-wrapper.vue.d.ts +0 -29
- package/packages/_vue3/dist/src/components/block/components/component-ref/component-ref.helpers.d.ts +0 -30
- package/packages/_vue3/dist/src/components/block/components/component-ref/component-ref.vue.d.ts +0 -2
- package/packages/_vue3/dist/src/components/block/components/interactive-element.vue.d.ts +0 -30
- package/packages/_vue3/dist/src/components/block/components/repeated-block.vue.d.ts +0 -16
- package/packages/_vue3/dist/src/components/block/types.d.ts +0 -6
- package/packages/_vue3/dist/src/components/blocks/blocks-wrapper.vue.d.ts +0 -30
- package/packages/_vue3/dist/src/components/blocks/blocks.vue.d.ts +0 -29
- package/packages/_vue3/dist/src/components/content/components/enable-editor.vue.d.ts +0 -90
- package/packages/_vue3/dist/src/components/content/components/styles.helpers.d.ts +0 -15
- package/packages/_vue3/dist/src/components/content/components/styles.vue.d.ts +0 -16
- package/packages/_vue3/dist/src/components/content/content.helpers.d.ts +0 -7
- package/packages/_vue3/dist/src/components/content/content.types.d.ts +0 -24
- package/packages/_vue3/dist/src/components/content/content.vue.d.ts +0 -69
- package/packages/_vue3/dist/src/components/content/wrap-component-ref.d.ts +0 -6
- package/packages/_vue3/dist/src/components/content-variants/content-variants.types.d.ts +0 -20
- package/packages/_vue3/dist/src/components/content-variants/content-variants.vue.d.ts +0 -73
- package/packages/_vue3/dist/src/components/content-variants/helpers.d.ts +0 -41
- package/packages/_vue3/dist/src/components/inlined-script.vue.d.ts +0 -11
- package/packages/_vue3/dist/src/components/inlined-styles.vue.d.ts +0 -11
- package/packages/_vue3/dist/src/constants/builder-registered-components.d.ts +0 -6
- package/packages/_vue3/dist/src/constants/device-sizes.d.ts +0 -13
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +0 -1
- package/packages/_vue3/dist/src/constants/target.d.ts +0 -2
- package/packages/_vue3/dist/src/context/builder.context.d.ts +0 -15
- package/packages/_vue3/dist/src/context/components.context.d.ts +0 -7
- package/packages/_vue3/dist/src/context/types.d.ts +0 -35
- package/packages/_vue3/dist/src/functions/camel-to-kebab-case.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/evaluate/browser-runtime/browser.d.ts +0 -4
- package/packages/_vue3/dist/src/functions/evaluate/evaluate.d.ts +0 -6
- package/packages/_vue3/dist/src/functions/evaluate/helpers.d.ts +0 -18
- package/packages/_vue3/dist/src/functions/evaluate/index.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/acorn-interpreter.d.ts +0 -2
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/index.d.ts +0 -6
- package/packages/_vue3/dist/src/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +0 -2
- package/packages/_vue3/dist/src/functions/event-handler-name.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/extract-text-styles.d.ts +0 -4
- package/packages/_vue3/dist/src/functions/fast-clone.d.ts +0 -4
- package/packages/_vue3/dist/src/functions/fetch-builder-props.d.ts +0 -39
- package/packages/_vue3/dist/src/functions/get-block-actions-handler.d.ts +0 -8
- package/packages/_vue3/dist/src/functions/get-block-actions.d.ts +0 -10
- package/packages/_vue3/dist/src/functions/get-block-component-options.d.ts +0 -2
- package/packages/_vue3/dist/src/functions/get-block-properties.d.ts +0 -6
- package/packages/_vue3/dist/src/functions/get-builder-search-params/index.d.ts +0 -12
- package/packages/_vue3/dist/src/functions/get-content/generate-content-url.d.ts +0 -2
- package/packages/_vue3/dist/src/functions/get-content/index.d.ts +0 -29
- package/packages/_vue3/dist/src/functions/get-content/types.d.ts +0 -51
- package/packages/_vue3/dist/src/functions/get-fetch.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/get-processed-block.d.ts +0 -10
- package/packages/_vue3/dist/src/functions/get-react-native-block-styles.d.ts +0 -7
- package/packages/_vue3/dist/src/functions/is-browser.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/is-editing.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/is-iframe.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/is-non-node-server.d.ts +0 -4
- package/packages/_vue3/dist/src/functions/is-previewing.d.ts +0 -1
- package/packages/_vue3/dist/src/functions/register-component.d.ts +0 -15
- package/packages/_vue3/dist/src/functions/register.d.ts +0 -16
- package/packages/_vue3/dist/src/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/packages/_vue3/dist/src/functions/set-editor-settings.d.ts +0 -4
- package/packages/_vue3/dist/src/functions/set.d.ts +0 -7
- package/packages/_vue3/dist/src/functions/track/helpers.d.ts +0 -5
- package/packages/_vue3/dist/src/functions/track/index.d.ts +0 -51
- package/packages/_vue3/dist/src/functions/track/interaction.d.ts +0 -13
- package/packages/_vue3/dist/src/functions/transform-block-properties.d.ts +0 -2
- package/packages/_vue3/dist/src/functions/transform-block.d.ts +0 -2
- package/packages/_vue3/dist/src/helpers/ab-tests.d.ts +0 -9
- package/packages/_vue3/dist/src/helpers/canTrack.d.ts +0 -1
- package/packages/_vue3/dist/src/helpers/cookie.d.ts +0 -19
- package/packages/_vue3/dist/src/helpers/css.d.ts +0 -7
- package/packages/_vue3/dist/src/helpers/flatten.d.ts +0 -6
- package/packages/_vue3/dist/src/helpers/localStorage.d.ts +0 -9
- package/packages/_vue3/dist/src/helpers/logger.d.ts +0 -6
- package/packages/_vue3/dist/src/helpers/nullable.d.ts +0 -2
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/get.d.ts +0 -2
- package/packages/_vue3/dist/src/helpers/preview-lru-cache/set.d.ts +0 -7
- package/packages/_vue3/dist/src/helpers/sessionId.d.ts +0 -6
- package/packages/_vue3/dist/src/helpers/url.d.ts +0 -6
- package/packages/_vue3/dist/src/helpers/uuid.d.ts +0 -8
- package/packages/_vue3/dist/src/helpers/visitorId.d.ts +0 -6
- package/packages/_vue3/dist/src/index-helpers/blocks-exports.d.ts +0 -111
- package/packages/_vue3/dist/src/index-helpers/top-of-file.d.ts +0 -1
- package/packages/_vue3/dist/src/index.d.ts +0 -7
- package/packages/_vue3/dist/src/scripts/init-editing.d.ts +0 -6
- package/packages/_vue3/dist/src/server-index.d.ts +0 -15
- package/packages/_vue3/dist/src/types/api-version.d.ts +0 -2
- package/packages/_vue3/dist/src/types/builder-block.d.ts +0 -66
- package/packages/_vue3/dist/src/types/builder-content.d.ts +0 -44
- package/packages/_vue3/dist/src/types/builder-props.d.ts +0 -9
- package/packages/_vue3/dist/src/types/can-track.d.ts +0 -3
- package/packages/_vue3/dist/src/types/components.d.ts +0 -111
- package/packages/_vue3/dist/src/types/deep-partial.d.ts +0 -3
- package/packages/_vue3/dist/src/types/element.d.ts +0 -59
- package/packages/_vue3/dist/src/types/enforced-partials.d.ts +0 -21
- package/packages/_vue3/dist/src/types/input.d.ts +0 -121
- package/packages/_vue3/dist/src/types/targets.d.ts +0 -1
- package/packages/_vue3/dist/src/types/typescript.d.ts +0 -11
- package/packages/_vue3/dist/style.css +0 -1
- /package/{packages/_vue2/dist → vue2}/env.d.ts +0 -0
- /package/{packages/_vue3/dist → vue3}/env.d.ts +0 -0
|
@@ -0,0 +1,999 @@
|
|
|
1
|
+
import he from 'he'
|
|
2
|
+
import { parseHTML } from './html-parser'
|
|
3
|
+
import { parseText } from './text-parser'
|
|
4
|
+
import { parseFilters } from './filter-parser'
|
|
5
|
+
import { genAssignmentCode } from '../directives/model'
|
|
6
|
+
import { extend, cached, no, camelize, hyphenate } from 'shared/util'
|
|
7
|
+
import { isIE, isEdge, isServerRendering } from 'core/util/env'
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
addProp,
|
|
11
|
+
addAttr,
|
|
12
|
+
baseWarn,
|
|
13
|
+
addHandler,
|
|
14
|
+
addDirective,
|
|
15
|
+
getBindingAttr,
|
|
16
|
+
getAndRemoveAttr,
|
|
17
|
+
getRawBindingAttr,
|
|
18
|
+
pluckModuleFunction,
|
|
19
|
+
getAndRemoveAttrByRegex
|
|
20
|
+
} from '../helpers'
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
ASTAttr,
|
|
24
|
+
ASTElement,
|
|
25
|
+
ASTIfCondition,
|
|
26
|
+
ASTNode,
|
|
27
|
+
ASTText,
|
|
28
|
+
CompilerOptions
|
|
29
|
+
} from 'types/compiler'
|
|
30
|
+
|
|
31
|
+
export const onRE = /^@|^v-on:/
|
|
32
|
+
export const dirRE = process.env.VBIND_PROP_SHORTHAND
|
|
33
|
+
? /^v-|^@|^:|^\.|^#/
|
|
34
|
+
: /^v-|^@|^:|^#/
|
|
35
|
+
export const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/
|
|
36
|
+
export const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/
|
|
37
|
+
const stripParensRE = /^\(|\)$/g
|
|
38
|
+
const dynamicArgRE = /^\[.*\]$/
|
|
39
|
+
|
|
40
|
+
const argRE = /:(.*)$/
|
|
41
|
+
export const bindRE = /^:|^\.|^v-bind:/
|
|
42
|
+
const propBindRE = /^\./
|
|
43
|
+
const modifierRE = /\.[^.\]]+(?=[^\]]*$)/g
|
|
44
|
+
|
|
45
|
+
export const slotRE = /^v-slot(:|$)|^#/
|
|
46
|
+
|
|
47
|
+
const lineBreakRE = /[\r\n]/
|
|
48
|
+
const whitespaceRE = /[ \f\t\r\n]+/g
|
|
49
|
+
|
|
50
|
+
const invalidAttributeRE = /[\s"'<>\/=]/
|
|
51
|
+
|
|
52
|
+
const decodeHTMLCached = cached(he.decode)
|
|
53
|
+
|
|
54
|
+
export const emptySlotScopeToken = `_empty_`
|
|
55
|
+
|
|
56
|
+
// configurable state
|
|
57
|
+
export let warn: any
|
|
58
|
+
let delimiters
|
|
59
|
+
let transforms
|
|
60
|
+
let preTransforms
|
|
61
|
+
let postTransforms
|
|
62
|
+
let platformIsPreTag
|
|
63
|
+
let platformMustUseProp
|
|
64
|
+
let platformGetTagNamespace
|
|
65
|
+
let maybeComponent
|
|
66
|
+
|
|
67
|
+
export function createASTElement(
|
|
68
|
+
tag: string,
|
|
69
|
+
attrs: Array<ASTAttr>,
|
|
70
|
+
parent: ASTElement | void
|
|
71
|
+
): ASTElement {
|
|
72
|
+
return {
|
|
73
|
+
type: 1,
|
|
74
|
+
tag,
|
|
75
|
+
attrsList: attrs,
|
|
76
|
+
attrsMap: makeAttrsMap(attrs),
|
|
77
|
+
rawAttrsMap: {},
|
|
78
|
+
parent,
|
|
79
|
+
children: []
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Convert HTML string to AST.
|
|
85
|
+
*/
|
|
86
|
+
export function parse(template: string, options: CompilerOptions): ASTElement {
|
|
87
|
+
warn = options.warn || baseWarn
|
|
88
|
+
|
|
89
|
+
platformIsPreTag = options.isPreTag || no
|
|
90
|
+
platformMustUseProp = options.mustUseProp || no
|
|
91
|
+
platformGetTagNamespace = options.getTagNamespace || no
|
|
92
|
+
const isReservedTag = options.isReservedTag || no
|
|
93
|
+
maybeComponent = (el: ASTElement) =>
|
|
94
|
+
!!(
|
|
95
|
+
el.component ||
|
|
96
|
+
el.attrsMap[':is'] ||
|
|
97
|
+
el.attrsMap['v-bind:is'] ||
|
|
98
|
+
!(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag))
|
|
99
|
+
)
|
|
100
|
+
transforms = pluckModuleFunction(options.modules, 'transformNode')
|
|
101
|
+
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode')
|
|
102
|
+
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode')
|
|
103
|
+
|
|
104
|
+
delimiters = options.delimiters
|
|
105
|
+
|
|
106
|
+
const stack: any[] = []
|
|
107
|
+
const preserveWhitespace = options.preserveWhitespace !== false
|
|
108
|
+
const whitespaceOption = options.whitespace
|
|
109
|
+
let root
|
|
110
|
+
let currentParent
|
|
111
|
+
let inVPre = false
|
|
112
|
+
let inPre = false
|
|
113
|
+
let warned = false
|
|
114
|
+
|
|
115
|
+
function warnOnce(msg, range) {
|
|
116
|
+
if (!warned) {
|
|
117
|
+
warned = true
|
|
118
|
+
warn(msg, range)
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function closeElement(element) {
|
|
123
|
+
trimEndingWhitespace(element)
|
|
124
|
+
if (!inVPre && !element.processed) {
|
|
125
|
+
element = processElement(element, options)
|
|
126
|
+
}
|
|
127
|
+
// tree management
|
|
128
|
+
if (!stack.length && element !== root) {
|
|
129
|
+
// allow root elements with v-if, v-else-if and v-else
|
|
130
|
+
if (root.if && (element.elseif || element.else)) {
|
|
131
|
+
if (__DEV__) {
|
|
132
|
+
checkRootConstraints(element)
|
|
133
|
+
}
|
|
134
|
+
addIfCondition(root, {
|
|
135
|
+
exp: element.elseif,
|
|
136
|
+
block: element
|
|
137
|
+
})
|
|
138
|
+
} else if (__DEV__) {
|
|
139
|
+
warnOnce(
|
|
140
|
+
`Component template should contain exactly one root element. ` +
|
|
141
|
+
`If you are using v-if on multiple elements, ` +
|
|
142
|
+
`use v-else-if to chain them instead.`,
|
|
143
|
+
{ start: element.start }
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (currentParent && !element.forbidden) {
|
|
148
|
+
if (element.elseif || element.else) {
|
|
149
|
+
processIfConditions(element, currentParent)
|
|
150
|
+
} else {
|
|
151
|
+
if (element.slotScope) {
|
|
152
|
+
// scoped slot
|
|
153
|
+
// keep it in the children list so that v-else(-if) conditions can
|
|
154
|
+
// find it as the prev node.
|
|
155
|
+
const name = element.slotTarget || '"default"'
|
|
156
|
+
;(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[
|
|
157
|
+
name
|
|
158
|
+
] = element
|
|
159
|
+
}
|
|
160
|
+
currentParent.children.push(element)
|
|
161
|
+
element.parent = currentParent
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// final children cleanup
|
|
166
|
+
// filter out scoped slots
|
|
167
|
+
element.children = element.children.filter(c => !c.slotScope)
|
|
168
|
+
// remove trailing whitespace node again
|
|
169
|
+
trimEndingWhitespace(element)
|
|
170
|
+
|
|
171
|
+
// check pre state
|
|
172
|
+
if (element.pre) {
|
|
173
|
+
inVPre = false
|
|
174
|
+
}
|
|
175
|
+
if (platformIsPreTag(element.tag)) {
|
|
176
|
+
inPre = false
|
|
177
|
+
}
|
|
178
|
+
// apply post-transforms
|
|
179
|
+
for (let i = 0; i < postTransforms.length; i++) {
|
|
180
|
+
postTransforms[i](element, options)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function trimEndingWhitespace(el) {
|
|
185
|
+
// remove trailing whitespace node
|
|
186
|
+
if (!inPre) {
|
|
187
|
+
let lastNode
|
|
188
|
+
while (
|
|
189
|
+
(lastNode = el.children[el.children.length - 1]) &&
|
|
190
|
+
lastNode.type === 3 &&
|
|
191
|
+
lastNode.text === ' '
|
|
192
|
+
) {
|
|
193
|
+
el.children.pop()
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function checkRootConstraints(el) {
|
|
199
|
+
if (el.tag === 'slot' || el.tag === 'template') {
|
|
200
|
+
warnOnce(
|
|
201
|
+
`Cannot use <${el.tag}> as component root element because it may ` +
|
|
202
|
+
'contain multiple nodes.',
|
|
203
|
+
{ start: el.start }
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
if (el.attrsMap.hasOwnProperty('v-for')) {
|
|
207
|
+
warnOnce(
|
|
208
|
+
'Cannot use v-for on stateful component root element because ' +
|
|
209
|
+
'it renders multiple elements.',
|
|
210
|
+
el.rawAttrsMap['v-for']
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
parseHTML(template, {
|
|
216
|
+
warn,
|
|
217
|
+
expectHTML: options.expectHTML,
|
|
218
|
+
isUnaryTag: options.isUnaryTag,
|
|
219
|
+
canBeLeftOpenTag: options.canBeLeftOpenTag,
|
|
220
|
+
shouldDecodeNewlines: options.shouldDecodeNewlines,
|
|
221
|
+
shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref,
|
|
222
|
+
shouldKeepComment: options.comments,
|
|
223
|
+
outputSourceRange: options.outputSourceRange,
|
|
224
|
+
start(tag, attrs, unary, start, end) {
|
|
225
|
+
// check namespace.
|
|
226
|
+
// inherit parent ns if there is one
|
|
227
|
+
const ns =
|
|
228
|
+
(currentParent && currentParent.ns) || platformGetTagNamespace(tag)
|
|
229
|
+
|
|
230
|
+
// handle IE svg bug
|
|
231
|
+
/* istanbul ignore if */
|
|
232
|
+
if (isIE && ns === 'svg') {
|
|
233
|
+
attrs = guardIESVGBug(attrs)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
let element: ASTElement = createASTElement(tag, attrs, currentParent)
|
|
237
|
+
if (ns) {
|
|
238
|
+
element.ns = ns
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (__DEV__) {
|
|
242
|
+
if (options.outputSourceRange) {
|
|
243
|
+
element.start = start
|
|
244
|
+
element.end = end
|
|
245
|
+
element.rawAttrsMap = element.attrsList.reduce((cumulated, attr) => {
|
|
246
|
+
cumulated[attr.name] = attr
|
|
247
|
+
return cumulated
|
|
248
|
+
}, {})
|
|
249
|
+
}
|
|
250
|
+
attrs.forEach(attr => {
|
|
251
|
+
if (invalidAttributeRE.test(attr.name)) {
|
|
252
|
+
warn(
|
|
253
|
+
`Invalid dynamic argument expression: attribute names cannot contain ` +
|
|
254
|
+
`spaces, quotes, <, >, / or =.`,
|
|
255
|
+
options.outputSourceRange
|
|
256
|
+
? {
|
|
257
|
+
start: attr.start! + attr.name.indexOf(`[`),
|
|
258
|
+
end: attr.start! + attr.name.length
|
|
259
|
+
}
|
|
260
|
+
: undefined
|
|
261
|
+
)
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (isForbiddenTag(element) && !isServerRendering()) {
|
|
267
|
+
element.forbidden = true
|
|
268
|
+
__DEV__ &&
|
|
269
|
+
warn(
|
|
270
|
+
'Templates should only be responsible for mapping the state to the ' +
|
|
271
|
+
'UI. Avoid placing tags with side-effects in your templates, such as ' +
|
|
272
|
+
`<${tag}>` +
|
|
273
|
+
', as they will not be parsed.',
|
|
274
|
+
{ start: element.start }
|
|
275
|
+
)
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// apply pre-transforms
|
|
279
|
+
for (let i = 0; i < preTransforms.length; i++) {
|
|
280
|
+
element = preTransforms[i](element, options) || element
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (!inVPre) {
|
|
284
|
+
processPre(element)
|
|
285
|
+
if (element.pre) {
|
|
286
|
+
inVPre = true
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
if (platformIsPreTag(element.tag)) {
|
|
290
|
+
inPre = true
|
|
291
|
+
}
|
|
292
|
+
if (inVPre) {
|
|
293
|
+
processRawAttrs(element)
|
|
294
|
+
} else if (!element.processed) {
|
|
295
|
+
// structural directives
|
|
296
|
+
processFor(element)
|
|
297
|
+
processIf(element)
|
|
298
|
+
processOnce(element)
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (!root) {
|
|
302
|
+
root = element
|
|
303
|
+
if (__DEV__) {
|
|
304
|
+
checkRootConstraints(root)
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (!unary) {
|
|
309
|
+
currentParent = element
|
|
310
|
+
stack.push(element)
|
|
311
|
+
} else {
|
|
312
|
+
closeElement(element)
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
|
|
316
|
+
end(tag, start, end) {
|
|
317
|
+
const element = stack[stack.length - 1]
|
|
318
|
+
// pop stack
|
|
319
|
+
stack.length -= 1
|
|
320
|
+
currentParent = stack[stack.length - 1]
|
|
321
|
+
if (__DEV__ && options.outputSourceRange) {
|
|
322
|
+
element.end = end
|
|
323
|
+
}
|
|
324
|
+
closeElement(element)
|
|
325
|
+
},
|
|
326
|
+
|
|
327
|
+
chars(text: string, start?: number, end?: number) {
|
|
328
|
+
if (!currentParent) {
|
|
329
|
+
if (__DEV__) {
|
|
330
|
+
if (text === template) {
|
|
331
|
+
warnOnce(
|
|
332
|
+
'Component template requires a root element, rather than just text.',
|
|
333
|
+
{ start }
|
|
334
|
+
)
|
|
335
|
+
} else if ((text = text.trim())) {
|
|
336
|
+
warnOnce(`text "${text}" outside root element will be ignored.`, {
|
|
337
|
+
start
|
|
338
|
+
})
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return
|
|
342
|
+
}
|
|
343
|
+
// IE textarea placeholder bug
|
|
344
|
+
/* istanbul ignore if */
|
|
345
|
+
if (
|
|
346
|
+
isIE &&
|
|
347
|
+
currentParent.tag === 'textarea' &&
|
|
348
|
+
currentParent.attrsMap.placeholder === text
|
|
349
|
+
) {
|
|
350
|
+
return
|
|
351
|
+
}
|
|
352
|
+
const children = currentParent.children
|
|
353
|
+
if (inPre || text.trim()) {
|
|
354
|
+
text = isTextTag(currentParent)
|
|
355
|
+
? text
|
|
356
|
+
: (decodeHTMLCached(text) as string)
|
|
357
|
+
} else if (!children.length) {
|
|
358
|
+
// remove the whitespace-only node right after an opening tag
|
|
359
|
+
text = ''
|
|
360
|
+
} else if (whitespaceOption) {
|
|
361
|
+
if (whitespaceOption === 'condense') {
|
|
362
|
+
// in condense mode, remove the whitespace node if it contains
|
|
363
|
+
// line break, otherwise condense to a single space
|
|
364
|
+
text = lineBreakRE.test(text) ? '' : ' '
|
|
365
|
+
} else {
|
|
366
|
+
text = ' '
|
|
367
|
+
}
|
|
368
|
+
} else {
|
|
369
|
+
text = preserveWhitespace ? ' ' : ''
|
|
370
|
+
}
|
|
371
|
+
if (text) {
|
|
372
|
+
if (!inPre && whitespaceOption === 'condense') {
|
|
373
|
+
// condense consecutive whitespaces into single space
|
|
374
|
+
text = text.replace(whitespaceRE, ' ')
|
|
375
|
+
}
|
|
376
|
+
let res
|
|
377
|
+
let child: ASTNode | undefined
|
|
378
|
+
if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) {
|
|
379
|
+
child = {
|
|
380
|
+
type: 2,
|
|
381
|
+
expression: res.expression,
|
|
382
|
+
tokens: res.tokens,
|
|
383
|
+
text
|
|
384
|
+
}
|
|
385
|
+
} else if (
|
|
386
|
+
text !== ' ' ||
|
|
387
|
+
!children.length ||
|
|
388
|
+
children[children.length - 1].text !== ' '
|
|
389
|
+
) {
|
|
390
|
+
child = {
|
|
391
|
+
type: 3,
|
|
392
|
+
text
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
if (child) {
|
|
396
|
+
if (__DEV__ && options.outputSourceRange) {
|
|
397
|
+
child.start = start
|
|
398
|
+
child.end = end
|
|
399
|
+
}
|
|
400
|
+
children.push(child)
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
comment(text: string, start, end) {
|
|
405
|
+
// adding anything as a sibling to the root node is forbidden
|
|
406
|
+
// comments should still be allowed, but ignored
|
|
407
|
+
if (currentParent) {
|
|
408
|
+
const child: ASTText = {
|
|
409
|
+
type: 3,
|
|
410
|
+
text,
|
|
411
|
+
isComment: true
|
|
412
|
+
}
|
|
413
|
+
if (__DEV__ && options.outputSourceRange) {
|
|
414
|
+
child.start = start
|
|
415
|
+
child.end = end
|
|
416
|
+
}
|
|
417
|
+
currentParent.children.push(child)
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
})
|
|
421
|
+
return root
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
function processPre(el) {
|
|
425
|
+
if (getAndRemoveAttr(el, 'v-pre') != null) {
|
|
426
|
+
el.pre = true
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function processRawAttrs(el) {
|
|
431
|
+
const list = el.attrsList
|
|
432
|
+
const len = list.length
|
|
433
|
+
if (len) {
|
|
434
|
+
const attrs: Array<ASTAttr> = (el.attrs = new Array(len))
|
|
435
|
+
for (let i = 0; i < len; i++) {
|
|
436
|
+
attrs[i] = {
|
|
437
|
+
name: list[i].name,
|
|
438
|
+
value: JSON.stringify(list[i].value)
|
|
439
|
+
}
|
|
440
|
+
if (list[i].start != null) {
|
|
441
|
+
attrs[i].start = list[i].start
|
|
442
|
+
attrs[i].end = list[i].end
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
} else if (!el.pre) {
|
|
446
|
+
// non root node in pre blocks with no attributes
|
|
447
|
+
el.plain = true
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export function processElement(element: ASTElement, options: CompilerOptions) {
|
|
452
|
+
processKey(element)
|
|
453
|
+
|
|
454
|
+
// determine whether this is a plain element after
|
|
455
|
+
// removing structural attributes
|
|
456
|
+
element.plain =
|
|
457
|
+
!element.key && !element.scopedSlots && !element.attrsList.length
|
|
458
|
+
|
|
459
|
+
processRef(element)
|
|
460
|
+
processSlotContent(element)
|
|
461
|
+
processSlotOutlet(element)
|
|
462
|
+
processComponent(element)
|
|
463
|
+
for (let i = 0; i < transforms.length; i++) {
|
|
464
|
+
element = transforms[i](element, options) || element
|
|
465
|
+
}
|
|
466
|
+
processAttrs(element)
|
|
467
|
+
return element
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
function processKey(el) {
|
|
471
|
+
const exp = getBindingAttr(el, 'key')
|
|
472
|
+
if (exp) {
|
|
473
|
+
if (__DEV__) {
|
|
474
|
+
if (el.tag === 'template') {
|
|
475
|
+
warn(
|
|
476
|
+
`<template> cannot be keyed. Place the key on real elements instead.`,
|
|
477
|
+
getRawBindingAttr(el, 'key')
|
|
478
|
+
)
|
|
479
|
+
}
|
|
480
|
+
if (el.for) {
|
|
481
|
+
const iterator = el.iterator2 || el.iterator1
|
|
482
|
+
const parent = el.parent
|
|
483
|
+
if (
|
|
484
|
+
iterator &&
|
|
485
|
+
iterator === exp &&
|
|
486
|
+
parent &&
|
|
487
|
+
parent.tag === 'transition-group'
|
|
488
|
+
) {
|
|
489
|
+
warn(
|
|
490
|
+
`Do not use v-for index as key on <transition-group> children, ` +
|
|
491
|
+
`this is the same as not using keys.`,
|
|
492
|
+
getRawBindingAttr(el, 'key'),
|
|
493
|
+
true /* tip */
|
|
494
|
+
)
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
el.key = exp
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function processRef(el) {
|
|
503
|
+
const ref = getBindingAttr(el, 'ref')
|
|
504
|
+
if (ref) {
|
|
505
|
+
el.ref = ref
|
|
506
|
+
el.refInFor = checkInFor(el)
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export function processFor(el: ASTElement) {
|
|
511
|
+
let exp
|
|
512
|
+
if ((exp = getAndRemoveAttr(el, 'v-for'))) {
|
|
513
|
+
const res = parseFor(exp)
|
|
514
|
+
if (res) {
|
|
515
|
+
extend(el, res)
|
|
516
|
+
} else if (__DEV__) {
|
|
517
|
+
warn(`Invalid v-for expression: ${exp}`, el.rawAttrsMap['v-for'])
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
type ForParseResult = {
|
|
523
|
+
for: string
|
|
524
|
+
alias: string
|
|
525
|
+
iterator1?: string
|
|
526
|
+
iterator2?: string
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export function parseFor(exp: string): ForParseResult | undefined {
|
|
530
|
+
const inMatch = exp.match(forAliasRE)
|
|
531
|
+
if (!inMatch) return
|
|
532
|
+
const res: any = {}
|
|
533
|
+
res.for = inMatch[2].trim()
|
|
534
|
+
const alias = inMatch[1].trim().replace(stripParensRE, '')
|
|
535
|
+
const iteratorMatch = alias.match(forIteratorRE)
|
|
536
|
+
if (iteratorMatch) {
|
|
537
|
+
res.alias = alias.replace(forIteratorRE, '').trim()
|
|
538
|
+
res.iterator1 = iteratorMatch[1].trim()
|
|
539
|
+
if (iteratorMatch[2]) {
|
|
540
|
+
res.iterator2 = iteratorMatch[2].trim()
|
|
541
|
+
}
|
|
542
|
+
} else {
|
|
543
|
+
res.alias = alias
|
|
544
|
+
}
|
|
545
|
+
return res
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
function processIf(el) {
|
|
549
|
+
const exp = getAndRemoveAttr(el, 'v-if')
|
|
550
|
+
if (exp) {
|
|
551
|
+
el.if = exp
|
|
552
|
+
addIfCondition(el, {
|
|
553
|
+
exp: exp,
|
|
554
|
+
block: el
|
|
555
|
+
})
|
|
556
|
+
} else {
|
|
557
|
+
if (getAndRemoveAttr(el, 'v-else') != null) {
|
|
558
|
+
el.else = true
|
|
559
|
+
}
|
|
560
|
+
const elseif = getAndRemoveAttr(el, 'v-else-if')
|
|
561
|
+
if (elseif) {
|
|
562
|
+
el.elseif = elseif
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
function processIfConditions(el, parent) {
|
|
568
|
+
const prev = findPrevElement(parent.children)
|
|
569
|
+
if (prev && prev.if) {
|
|
570
|
+
addIfCondition(prev, {
|
|
571
|
+
exp: el.elseif,
|
|
572
|
+
block: el
|
|
573
|
+
})
|
|
574
|
+
} else if (__DEV__) {
|
|
575
|
+
warn(
|
|
576
|
+
`v-${el.elseif ? 'else-if="' + el.elseif + '"' : 'else'} ` +
|
|
577
|
+
`used on element <${el.tag}> without corresponding v-if.`,
|
|
578
|
+
el.rawAttrsMap[el.elseif ? 'v-else-if' : 'v-else']
|
|
579
|
+
)
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
function findPrevElement(children: Array<any>): ASTElement | void {
|
|
584
|
+
let i = children.length
|
|
585
|
+
while (i--) {
|
|
586
|
+
if (children[i].type === 1) {
|
|
587
|
+
return children[i]
|
|
588
|
+
} else {
|
|
589
|
+
if (__DEV__ && children[i].text !== ' ') {
|
|
590
|
+
warn(
|
|
591
|
+
`text "${children[i].text.trim()}" between v-if and v-else(-if) ` +
|
|
592
|
+
`will be ignored.`,
|
|
593
|
+
children[i]
|
|
594
|
+
)
|
|
595
|
+
}
|
|
596
|
+
children.pop()
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export function addIfCondition(el: ASTElement, condition: ASTIfCondition) {
|
|
602
|
+
if (!el.ifConditions) {
|
|
603
|
+
el.ifConditions = []
|
|
604
|
+
}
|
|
605
|
+
el.ifConditions.push(condition)
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
function processOnce(el) {
|
|
609
|
+
const once = getAndRemoveAttr(el, 'v-once')
|
|
610
|
+
if (once != null) {
|
|
611
|
+
el.once = true
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
// handle content being passed to a component as slot,
|
|
616
|
+
// e.g. <template slot="xxx">, <div slot-scope="xxx">
|
|
617
|
+
function processSlotContent(el) {
|
|
618
|
+
let slotScope
|
|
619
|
+
if (el.tag === 'template') {
|
|
620
|
+
slotScope = getAndRemoveAttr(el, 'scope')
|
|
621
|
+
/* istanbul ignore if */
|
|
622
|
+
if (__DEV__ && slotScope) {
|
|
623
|
+
warn(
|
|
624
|
+
`the "scope" attribute for scoped slots have been deprecated and ` +
|
|
625
|
+
`replaced by "slot-scope" since 2.5. The new "slot-scope" attribute ` +
|
|
626
|
+
`can also be used on plain elements in addition to <template> to ` +
|
|
627
|
+
`denote scoped slots.`,
|
|
628
|
+
el.rawAttrsMap['scope'],
|
|
629
|
+
true
|
|
630
|
+
)
|
|
631
|
+
}
|
|
632
|
+
el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope')
|
|
633
|
+
} else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) {
|
|
634
|
+
/* istanbul ignore if */
|
|
635
|
+
if (__DEV__ && el.attrsMap['v-for']) {
|
|
636
|
+
warn(
|
|
637
|
+
`Ambiguous combined usage of slot-scope and v-for on <${el.tag}> ` +
|
|
638
|
+
`(v-for takes higher priority). Use a wrapper <template> for the ` +
|
|
639
|
+
`scoped slot to make it clearer.`,
|
|
640
|
+
el.rawAttrsMap['slot-scope'],
|
|
641
|
+
true
|
|
642
|
+
)
|
|
643
|
+
}
|
|
644
|
+
el.slotScope = slotScope
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// slot="xxx"
|
|
648
|
+
const slotTarget = getBindingAttr(el, 'slot')
|
|
649
|
+
if (slotTarget) {
|
|
650
|
+
el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget
|
|
651
|
+
el.slotTargetDynamic = !!(
|
|
652
|
+
el.attrsMap[':slot'] || el.attrsMap['v-bind:slot']
|
|
653
|
+
)
|
|
654
|
+
// preserve slot as an attribute for native shadow DOM compat
|
|
655
|
+
// only for non-scoped slots.
|
|
656
|
+
if (el.tag !== 'template' && !el.slotScope) {
|
|
657
|
+
addAttr(el, 'slot', slotTarget, getRawBindingAttr(el, 'slot'))
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
// 2.6 v-slot syntax
|
|
662
|
+
if (process.env.NEW_SLOT_SYNTAX) {
|
|
663
|
+
if (el.tag === 'template') {
|
|
664
|
+
// v-slot on <template>
|
|
665
|
+
const slotBinding = getAndRemoveAttrByRegex(el, slotRE)
|
|
666
|
+
if (slotBinding) {
|
|
667
|
+
if (__DEV__) {
|
|
668
|
+
if (el.slotTarget || el.slotScope) {
|
|
669
|
+
warn(`Unexpected mixed usage of different slot syntaxes.`, el)
|
|
670
|
+
}
|
|
671
|
+
if (el.parent && !maybeComponent(el.parent)) {
|
|
672
|
+
warn(
|
|
673
|
+
`<template v-slot> can only appear at the root level inside ` +
|
|
674
|
+
`the receiving component`,
|
|
675
|
+
el
|
|
676
|
+
)
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
const { name, dynamic } = getSlotName(slotBinding)
|
|
680
|
+
el.slotTarget = name
|
|
681
|
+
el.slotTargetDynamic = dynamic
|
|
682
|
+
el.slotScope = slotBinding.value || emptySlotScopeToken // force it into a scoped slot for perf
|
|
683
|
+
}
|
|
684
|
+
} else {
|
|
685
|
+
// v-slot on component, denotes default slot
|
|
686
|
+
const slotBinding = getAndRemoveAttrByRegex(el, slotRE)
|
|
687
|
+
if (slotBinding) {
|
|
688
|
+
if (__DEV__) {
|
|
689
|
+
if (!maybeComponent(el)) {
|
|
690
|
+
warn(
|
|
691
|
+
`v-slot can only be used on components or <template>.`,
|
|
692
|
+
slotBinding
|
|
693
|
+
)
|
|
694
|
+
}
|
|
695
|
+
if (el.slotScope || el.slotTarget) {
|
|
696
|
+
warn(`Unexpected mixed usage of different slot syntaxes.`, el)
|
|
697
|
+
}
|
|
698
|
+
if (el.scopedSlots) {
|
|
699
|
+
warn(
|
|
700
|
+
`To avoid scope ambiguity, the default slot should also use ` +
|
|
701
|
+
`<template> syntax when there are other named slots.`,
|
|
702
|
+
slotBinding
|
|
703
|
+
)
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
// add the component's children to its default slot
|
|
707
|
+
const slots = el.scopedSlots || (el.scopedSlots = {})
|
|
708
|
+
const { name, dynamic } = getSlotName(slotBinding)
|
|
709
|
+
const slotContainer = (slots[name] = createASTElement(
|
|
710
|
+
'template',
|
|
711
|
+
[],
|
|
712
|
+
el
|
|
713
|
+
))
|
|
714
|
+
slotContainer.slotTarget = name
|
|
715
|
+
slotContainer.slotTargetDynamic = dynamic
|
|
716
|
+
slotContainer.children = el.children.filter((c: any) => {
|
|
717
|
+
if (!c.slotScope) {
|
|
718
|
+
c.parent = slotContainer
|
|
719
|
+
return true
|
|
720
|
+
}
|
|
721
|
+
})
|
|
722
|
+
slotContainer.slotScope = slotBinding.value || emptySlotScopeToken
|
|
723
|
+
// remove children as they are returned from scopedSlots now
|
|
724
|
+
el.children = []
|
|
725
|
+
// mark el non-plain so data gets generated
|
|
726
|
+
el.plain = false
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
function getSlotName(binding) {
|
|
733
|
+
let name = binding.name.replace(slotRE, '')
|
|
734
|
+
if (!name) {
|
|
735
|
+
if (binding.name[0] !== '#') {
|
|
736
|
+
name = 'default'
|
|
737
|
+
} else if (__DEV__) {
|
|
738
|
+
warn(`v-slot shorthand syntax requires a slot name.`, binding)
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return dynamicArgRE.test(name)
|
|
742
|
+
? // dynamic [name]
|
|
743
|
+
{ name: name.slice(1, -1), dynamic: true }
|
|
744
|
+
: // static name
|
|
745
|
+
{ name: `"${name}"`, dynamic: false }
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// handle <slot/> outlets
|
|
749
|
+
function processSlotOutlet(el) {
|
|
750
|
+
if (el.tag === 'slot') {
|
|
751
|
+
el.slotName = getBindingAttr(el, 'name')
|
|
752
|
+
if (__DEV__ && el.key) {
|
|
753
|
+
warn(
|
|
754
|
+
`\`key\` does not work on <slot> because slots are abstract outlets ` +
|
|
755
|
+
`and can possibly expand into multiple elements. ` +
|
|
756
|
+
`Use the key on a wrapping element instead.`,
|
|
757
|
+
getRawBindingAttr(el, 'key')
|
|
758
|
+
)
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
function processComponent(el) {
|
|
764
|
+
let binding
|
|
765
|
+
if ((binding = getBindingAttr(el, 'is'))) {
|
|
766
|
+
el.component = binding
|
|
767
|
+
}
|
|
768
|
+
if (getAndRemoveAttr(el, 'inline-template') != null) {
|
|
769
|
+
el.inlineTemplate = true
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
function processAttrs(el) {
|
|
774
|
+
const list = el.attrsList
|
|
775
|
+
let i, l, name, rawName, value, modifiers, syncGen, isDynamic
|
|
776
|
+
for (i = 0, l = list.length; i < l; i++) {
|
|
777
|
+
name = rawName = list[i].name
|
|
778
|
+
value = list[i].value
|
|
779
|
+
if (dirRE.test(name)) {
|
|
780
|
+
// mark element as dynamic
|
|
781
|
+
el.hasBindings = true
|
|
782
|
+
// modifiers
|
|
783
|
+
modifiers = parseModifiers(name.replace(dirRE, ''))
|
|
784
|
+
// support .foo shorthand syntax for the .prop modifier
|
|
785
|
+
if (process.env.VBIND_PROP_SHORTHAND && propBindRE.test(name)) {
|
|
786
|
+
;(modifiers || (modifiers = {})).prop = true
|
|
787
|
+
name = `.` + name.slice(1).replace(modifierRE, '')
|
|
788
|
+
} else if (modifiers) {
|
|
789
|
+
name = name.replace(modifierRE, '')
|
|
790
|
+
}
|
|
791
|
+
if (bindRE.test(name)) {
|
|
792
|
+
// v-bind
|
|
793
|
+
name = name.replace(bindRE, '')
|
|
794
|
+
value = parseFilters(value)
|
|
795
|
+
isDynamic = dynamicArgRE.test(name)
|
|
796
|
+
if (isDynamic) {
|
|
797
|
+
name = name.slice(1, -1)
|
|
798
|
+
}
|
|
799
|
+
if (__DEV__ && value.trim().length === 0) {
|
|
800
|
+
warn(
|
|
801
|
+
`The value for a v-bind expression cannot be empty. Found in "v-bind:${name}"`
|
|
802
|
+
)
|
|
803
|
+
}
|
|
804
|
+
if (modifiers) {
|
|
805
|
+
if (modifiers.prop && !isDynamic) {
|
|
806
|
+
name = camelize(name)
|
|
807
|
+
if (name === 'innerHtml') name = 'innerHTML'
|
|
808
|
+
}
|
|
809
|
+
if (modifiers.camel && !isDynamic) {
|
|
810
|
+
name = camelize(name)
|
|
811
|
+
}
|
|
812
|
+
if (modifiers.sync) {
|
|
813
|
+
syncGen = genAssignmentCode(value, `$event`)
|
|
814
|
+
if (!isDynamic) {
|
|
815
|
+
addHandler(
|
|
816
|
+
el,
|
|
817
|
+
`update:${camelize(name)}`,
|
|
818
|
+
syncGen,
|
|
819
|
+
null,
|
|
820
|
+
false,
|
|
821
|
+
warn,
|
|
822
|
+
list[i]
|
|
823
|
+
)
|
|
824
|
+
if (hyphenate(name) !== camelize(name)) {
|
|
825
|
+
addHandler(
|
|
826
|
+
el,
|
|
827
|
+
`update:${hyphenate(name)}`,
|
|
828
|
+
syncGen,
|
|
829
|
+
null,
|
|
830
|
+
false,
|
|
831
|
+
warn,
|
|
832
|
+
list[i]
|
|
833
|
+
)
|
|
834
|
+
}
|
|
835
|
+
} else {
|
|
836
|
+
// handler w/ dynamic event name
|
|
837
|
+
addHandler(
|
|
838
|
+
el,
|
|
839
|
+
`"update:"+(${name})`,
|
|
840
|
+
syncGen,
|
|
841
|
+
null,
|
|
842
|
+
false,
|
|
843
|
+
warn,
|
|
844
|
+
list[i],
|
|
845
|
+
true // dynamic
|
|
846
|
+
)
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
if (
|
|
851
|
+
(modifiers && modifiers.prop) ||
|
|
852
|
+
(!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name))
|
|
853
|
+
) {
|
|
854
|
+
addProp(el, name, value, list[i], isDynamic)
|
|
855
|
+
} else {
|
|
856
|
+
addAttr(el, name, value, list[i], isDynamic)
|
|
857
|
+
}
|
|
858
|
+
} else if (onRE.test(name)) {
|
|
859
|
+
// v-on
|
|
860
|
+
name = name.replace(onRE, '')
|
|
861
|
+
isDynamic = dynamicArgRE.test(name)
|
|
862
|
+
if (isDynamic) {
|
|
863
|
+
name = name.slice(1, -1)
|
|
864
|
+
}
|
|
865
|
+
addHandler(el, name, value, modifiers, false, warn, list[i], isDynamic)
|
|
866
|
+
} else {
|
|
867
|
+
// normal directives
|
|
868
|
+
name = name.replace(dirRE, '')
|
|
869
|
+
// parse arg
|
|
870
|
+
const argMatch = name.match(argRE)
|
|
871
|
+
let arg = argMatch && argMatch[1]
|
|
872
|
+
isDynamic = false
|
|
873
|
+
if (arg) {
|
|
874
|
+
name = name.slice(0, -(arg.length + 1))
|
|
875
|
+
if (dynamicArgRE.test(arg)) {
|
|
876
|
+
arg = arg.slice(1, -1)
|
|
877
|
+
isDynamic = true
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
addDirective(
|
|
881
|
+
el,
|
|
882
|
+
name,
|
|
883
|
+
rawName,
|
|
884
|
+
value,
|
|
885
|
+
arg,
|
|
886
|
+
isDynamic,
|
|
887
|
+
modifiers,
|
|
888
|
+
list[i]
|
|
889
|
+
)
|
|
890
|
+
if (__DEV__ && name === 'model') {
|
|
891
|
+
checkForAliasModel(el, value)
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
} else {
|
|
895
|
+
// literal attribute
|
|
896
|
+
if (__DEV__) {
|
|
897
|
+
const res = parseText(value, delimiters)
|
|
898
|
+
if (res) {
|
|
899
|
+
warn(
|
|
900
|
+
`${name}="${value}": ` +
|
|
901
|
+
'Interpolation inside attributes has been removed. ' +
|
|
902
|
+
'Use v-bind or the colon shorthand instead. For example, ' +
|
|
903
|
+
'instead of <div id="{{ val }}">, use <div :id="val">.',
|
|
904
|
+
list[i]
|
|
905
|
+
)
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
addAttr(el, name, JSON.stringify(value), list[i])
|
|
909
|
+
// #6887 firefox doesn't update muted state if set via attribute
|
|
910
|
+
// even immediately after element creation
|
|
911
|
+
if (
|
|
912
|
+
!el.component &&
|
|
913
|
+
name === 'muted' &&
|
|
914
|
+
platformMustUseProp(el.tag, el.attrsMap.type, name)
|
|
915
|
+
) {
|
|
916
|
+
addProp(el, name, 'true', list[i])
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
function checkInFor(el: ASTElement): boolean {
|
|
923
|
+
let parent: ASTElement | void = el
|
|
924
|
+
while (parent) {
|
|
925
|
+
if (parent.for !== undefined) {
|
|
926
|
+
return true
|
|
927
|
+
}
|
|
928
|
+
parent = parent.parent
|
|
929
|
+
}
|
|
930
|
+
return false
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
function parseModifiers(name: string): Object | void {
|
|
934
|
+
const match = name.match(modifierRE)
|
|
935
|
+
if (match) {
|
|
936
|
+
const ret = {}
|
|
937
|
+
match.forEach(m => {
|
|
938
|
+
ret[m.slice(1)] = true
|
|
939
|
+
})
|
|
940
|
+
return ret
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
function makeAttrsMap(attrs: Array<Record<string, any>>): Record<string, any> {
|
|
945
|
+
const map = {}
|
|
946
|
+
for (let i = 0, l = attrs.length; i < l; i++) {
|
|
947
|
+
if (__DEV__ && map[attrs[i].name] && !isIE && !isEdge) {
|
|
948
|
+
warn('duplicate attribute: ' + attrs[i].name, attrs[i])
|
|
949
|
+
}
|
|
950
|
+
map[attrs[i].name] = attrs[i].value
|
|
951
|
+
}
|
|
952
|
+
return map
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// for script (e.g. type="x/template") or style, do not decode content
|
|
956
|
+
function isTextTag(el): boolean {
|
|
957
|
+
return el.tag === 'script' || el.tag === 'style'
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
function isForbiddenTag(el): boolean {
|
|
961
|
+
return (
|
|
962
|
+
el.tag === 'style' ||
|
|
963
|
+
(el.tag === 'script' &&
|
|
964
|
+
(!el.attrsMap.type || el.attrsMap.type === 'text/javascript'))
|
|
965
|
+
)
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
const ieNSBug = /^xmlns:NS\d+/
|
|
969
|
+
const ieNSPrefix = /^NS\d+:/
|
|
970
|
+
|
|
971
|
+
/* istanbul ignore next */
|
|
972
|
+
function guardIESVGBug(attrs) {
|
|
973
|
+
const res: any[] = []
|
|
974
|
+
for (let i = 0; i < attrs.length; i++) {
|
|
975
|
+
const attr = attrs[i]
|
|
976
|
+
if (!ieNSBug.test(attr.name)) {
|
|
977
|
+
attr.name = attr.name.replace(ieNSPrefix, '')
|
|
978
|
+
res.push(attr)
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
return res
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
function checkForAliasModel(el, value) {
|
|
985
|
+
let _el = el
|
|
986
|
+
while (_el) {
|
|
987
|
+
if (_el.for && _el.alias === value) {
|
|
988
|
+
warn(
|
|
989
|
+
`<${el.tag} v-model="${value}">: ` +
|
|
990
|
+
`You are binding v-model directly to a v-for iteration alias. ` +
|
|
991
|
+
`This will not be able to modify the v-for source array because ` +
|
|
992
|
+
`writing to the alias is like modifying a function local variable. ` +
|
|
993
|
+
`Consider using an array of objects and use v-model on an object property instead.`,
|
|
994
|
+
el.rawAttrsMap['v-model']
|
|
995
|
+
)
|
|
996
|
+
}
|
|
997
|
+
_el = _el.parent
|
|
998
|
+
}
|
|
999
|
+
}
|