@stencil/core 4.43.2 → 5.0.0-next.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/bin/stencil.mjs +2 -0
- package/dist/chunk-ClPoSABd.mjs +21 -0
- package/dist/client-DR9zhmKG.mjs +4449 -0
- package/dist/compiler/index.d.mts +187 -0
- package/dist/compiler/index.mjs +9 -0
- package/dist/compiler/utils/index.d.mts +3 -0
- package/dist/compiler/utils/index.mjs +5 -0
- package/dist/declarations/stencil-public-compiler.d.ts +4401 -0
- package/dist/declarations/stencil-public-compiler.js +53 -0
- package/dist/declarations/stencil-public-runtime.d.ts +1857 -0
- package/dist/index-Bxo2jCf6.d.mts +77 -0
- package/dist/index-szczUd2l.d.mts +6851 -0
- package/{internal/stencil-core/index.d.ts → dist/index.d.mts} +7 -3
- package/dist/index.mjs +4 -0
- package/dist/mock-doc.d.mts +1 -0
- package/dist/mock-doc.mjs +3 -0
- package/dist/node-sys-BGURUNOZ.mjs +1954 -0
- package/{internal → dist/runtime}/app-data/index.d.ts +11 -7
- package/dist/runtime/app-data/index.js +100 -0
- package/dist/runtime/app-globals/index.d.ts +5 -0
- package/dist/runtime/app-globals/index.js +6 -0
- package/dist/runtime/client/index.d.ts +2286 -0
- package/dist/runtime/client/index.js +4839 -0
- package/dist/runtime/index.d.ts +221 -0
- package/dist/runtime/index.js +4819 -0
- package/dist/runtime/server/index.d.mts +1277 -0
- package/dist/runtime/server/index.mjs +5376 -0
- package/dist/runtime/server/runner.d.mts +298 -0
- package/dist/runtime/server/runner.mjs +1976 -0
- package/dist/serialize-BJvhE9aQ.mjs +775 -0
- package/dist/stencil-private-Cgcr414u.d.ts +1893 -0
- package/dist/sys/node/index.d.mts +33 -0
- package/dist/sys/node/index.mjs +7 -0
- package/dist/sys/node/worker.d.mts +1 -0
- package/dist/sys/node/worker.mjs +60 -0
- package/dist/testing/index.d.mts +207 -0
- package/dist/testing/index.mjs +1188 -0
- package/dist/transpile-CJQcQEVa.mjs +21854 -0
- package/dist/validation-BdcPruW_.mjs +1451 -0
- package/package.json +88 -232
- package/bin/stencil +0 -57
- package/cli/config-flags.d.ts +0 -132
- package/cli/index.cjs +0 -5816
- package/cli/index.d.ts +0 -19
- package/cli/index.js +0 -5809
- package/cli/package.json +0 -14
- package/compiler/lib.d.ts +0 -22
- package/compiler/lib.decorators.d.ts +0 -384
- package/compiler/lib.decorators.legacy.d.ts +0 -22
- package/compiler/lib.dom.asynciterable.d.ts +0 -41
- package/compiler/lib.dom.d.ts +0 -29610
- package/compiler/lib.dom.iterable.d.ts +0 -493
- package/compiler/lib.es2015.collection.d.ts +0 -147
- package/compiler/lib.es2015.core.d.ts +0 -597
- package/compiler/lib.es2015.d.ts +0 -28
- package/compiler/lib.es2015.generator.d.ts +0 -77
- package/compiler/lib.es2015.iterable.d.ts +0 -605
- package/compiler/lib.es2015.promise.d.ts +0 -81
- package/compiler/lib.es2015.proxy.d.ts +0 -128
- package/compiler/lib.es2015.reflect.d.ts +0 -144
- package/compiler/lib.es2015.symbol.d.ts +0 -46
- package/compiler/lib.es2015.symbol.wellknown.d.ts +0 -326
- package/compiler/lib.es2016.array.include.d.ts +0 -116
- package/compiler/lib.es2016.d.ts +0 -21
- package/compiler/lib.es2016.full.d.ts +0 -23
- package/compiler/lib.es2016.intl.d.ts +0 -31
- package/compiler/lib.es2017.arraybuffer.d.ts +0 -21
- package/compiler/lib.es2017.d.ts +0 -26
- package/compiler/lib.es2017.date.d.ts +0 -31
- package/compiler/lib.es2017.full.d.ts +0 -23
- package/compiler/lib.es2017.intl.d.ts +0 -44
- package/compiler/lib.es2017.object.d.ts +0 -49
- package/compiler/lib.es2017.sharedmemory.d.ts +0 -135
- package/compiler/lib.es2017.string.d.ts +0 -45
- package/compiler/lib.es2017.typedarrays.d.ts +0 -53
- package/compiler/lib.es2018.asyncgenerator.d.ts +0 -77
- package/compiler/lib.es2018.asynciterable.d.ts +0 -53
- package/compiler/lib.es2018.d.ts +0 -24
- package/compiler/lib.es2018.full.d.ts +0 -24
- package/compiler/lib.es2018.intl.d.ts +0 -83
- package/compiler/lib.es2018.promise.d.ts +0 -30
- package/compiler/lib.es2018.regexp.d.ts +0 -37
- package/compiler/lib.es2019.array.d.ts +0 -79
- package/compiler/lib.es2019.d.ts +0 -24
- package/compiler/lib.es2019.full.d.ts +0 -24
- package/compiler/lib.es2019.intl.d.ts +0 -23
- package/compiler/lib.es2019.object.d.ts +0 -33
- package/compiler/lib.es2019.string.d.ts +0 -37
- package/compiler/lib.es2019.symbol.d.ts +0 -24
- package/compiler/lib.es2020.bigint.d.ts +0 -765
- package/compiler/lib.es2020.d.ts +0 -27
- package/compiler/lib.es2020.date.d.ts +0 -42
- package/compiler/lib.es2020.full.d.ts +0 -24
- package/compiler/lib.es2020.intl.d.ts +0 -474
- package/compiler/lib.es2020.number.d.ts +0 -28
- package/compiler/lib.es2020.promise.d.ts +0 -47
- package/compiler/lib.es2020.sharedmemory.d.ts +0 -99
- package/compiler/lib.es2020.string.d.ts +0 -44
- package/compiler/lib.es2020.symbol.wellknown.d.ts +0 -41
- package/compiler/lib.es2021.d.ts +0 -23
- package/compiler/lib.es2021.full.d.ts +0 -24
- package/compiler/lib.es2021.intl.d.ts +0 -166
- package/compiler/lib.es2021.promise.d.ts +0 -48
- package/compiler/lib.es2021.string.d.ts +0 -33
- package/compiler/lib.es2021.weakref.d.ts +0 -78
- package/compiler/lib.es2022.array.d.ts +0 -121
- package/compiler/lib.es2022.d.ts +0 -25
- package/compiler/lib.es2022.error.d.ts +0 -75
- package/compiler/lib.es2022.full.d.ts +0 -24
- package/compiler/lib.es2022.intl.d.ts +0 -121
- package/compiler/lib.es2022.object.d.ts +0 -26
- package/compiler/lib.es2022.regexp.d.ts +0 -39
- package/compiler/lib.es2022.string.d.ts +0 -25
- package/compiler/lib.es2023.array.d.ts +0 -924
- package/compiler/lib.es2023.collection.d.ts +0 -21
- package/compiler/lib.es2023.d.ts +0 -22
- package/compiler/lib.es2023.full.d.ts +0 -24
- package/compiler/lib.es2023.intl.d.ts +0 -56
- package/compiler/lib.es2024.arraybuffer.d.ts +0 -65
- package/compiler/lib.es2024.collection.d.ts +0 -29
- package/compiler/lib.es2024.d.ts +0 -26
- package/compiler/lib.es2024.full.d.ts +0 -24
- package/compiler/lib.es2024.object.d.ts +0 -29
- package/compiler/lib.es2024.promise.d.ts +0 -35
- package/compiler/lib.es2024.regexp.d.ts +0 -25
- package/compiler/lib.es2024.sharedmemory.d.ts +0 -68
- package/compiler/lib.es2024.string.d.ts +0 -29
- package/compiler/lib.es5.d.ts +0 -4594
- package/compiler/lib.es6.d.ts +0 -23
- package/compiler/lib.esnext.array.d.ts +0 -35
- package/compiler/lib.esnext.collection.d.ts +0 -96
- package/compiler/lib.esnext.d.ts +0 -27
- package/compiler/lib.esnext.decorators.d.ts +0 -28
- package/compiler/lib.esnext.disposable.d.ts +0 -193
- package/compiler/lib.esnext.float16.d.ts +0 -443
- package/compiler/lib.esnext.full.d.ts +0 -24
- package/compiler/lib.esnext.intl.d.ts +0 -21
- package/compiler/lib.esnext.iterator.d.ts +0 -148
- package/compiler/lib.esnext.promise.d.ts +0 -34
- package/compiler/lib.scripthost.d.ts +0 -322
- package/compiler/lib.webworker.asynciterable.d.ts +0 -41
- package/compiler/lib.webworker.d.ts +0 -9894
- package/compiler/lib.webworker.importscripts.d.ts +0 -23
- package/compiler/lib.webworker.iterable.d.ts +0 -287
- package/compiler/package.json +0 -8
- package/compiler/stencil.d.ts +0 -73
- package/compiler/stencil.js +0 -287816
- package/compiler/sys/in-memory-fs.d.ts +0 -227
- package/compiler/transpile.d.ts +0 -32
- package/dev-server/client/app-error.d.ts +0 -20
- package/dev-server/client/events.d.ts +0 -6
- package/dev-server/client/hmr-components.d.ts +0 -12
- package/dev-server/client/hmr-external-styles.d.ts +0 -1
- package/dev-server/client/hmr-images.d.ts +0 -1
- package/dev-server/client/hmr-inline-styles.d.ts +0 -1
- package/dev-server/client/hmr-util.d.ts +0 -39
- package/dev-server/client/hmr-window.d.ts +0 -10
- package/dev-server/client/index.d.ts +0 -6
- package/dev-server/client/index.js +0 -793
- package/dev-server/client/logger.d.ts +0 -6
- package/dev-server/client/package.json +0 -8
- package/dev-server/client/progress.d.ts +0 -3
- package/dev-server/client/status.d.ts +0 -4
- package/dev-server/client/test/hmr-util.spec.d.ts +0 -1
- package/dev-server/client/test/status.spec.d.ts +0 -1
- package/dev-server/connector.html +0 -6
- package/dev-server/index.d.ts +0 -3
- package/dev-server/index.js +0 -247
- package/dev-server/package.json +0 -8
- package/dev-server/server-process.js +0 -12095
- package/dev-server/server-worker-thread.js +0 -39
- package/dev-server/static/favicon.ico +0 -0
- package/dev-server/templates/directory-index.html +0 -176
- package/dev-server/templates/initial-load.html +0 -168
- package/dev-server/visualstudio.vbs +0 -82
- package/dev-server/xdg-open +0 -1066
- package/internal/app-data/index.cjs +0 -119
- package/internal/app-data/index.js +0 -92
- package/internal/app-data/package.json +0 -15
- package/internal/app-globals/index.d.ts +0 -2
- package/internal/app-globals/index.js +0 -14
- package/internal/app-globals/package.json +0 -14
- package/internal/child_process.d.ts +0 -7
- package/internal/client/index.js +0 -4736
- package/internal/client/package.json +0 -10
- package/internal/client/patch-browser.js +0 -45
- package/internal/client/polyfills/core-js.js +0 -11
- package/internal/client/polyfills/dom.js +0 -79
- package/internal/client/polyfills/es5-html-element.js +0 -1
- package/internal/client/polyfills/index.js +0 -34
- package/internal/client/polyfills/system.js +0 -6
- package/internal/client/shadow-css.js +0 -414
- package/internal/hydrate/index.js +0 -6671
- package/internal/hydrate/package.json +0 -7
- package/internal/hydrate/runner.d.ts +0 -287
- package/internal/hydrate/runner.js +0 -17950
- package/internal/index.d.ts +0 -4
- package/internal/index.js +0 -2
- package/internal/package.json +0 -9
- package/internal/stencil-core/index.cjs +0 -1
- package/internal/stencil-core/index.js +0 -18
- package/internal/stencil-core/jsx-dev-runtime.cjs +0 -7
- package/internal/stencil-core/jsx-dev-runtime.d.ts +0 -41
- package/internal/stencil-core/jsx-dev-runtime.js +0 -2
- package/internal/stencil-core/jsx-runtime.cjs +0 -8
- package/internal/stencil-core/jsx-runtime.d.ts +0 -40
- package/internal/stencil-core/jsx-runtime.js +0 -2
- package/internal/stencil-private.d.ts +0 -2549
- package/internal/stencil-public-compiler.d.ts +0 -2867
- package/internal/stencil-public-runtime.d.ts +0 -1860
- package/internal/testing/index.js +0 -6528
- package/internal/testing/jsx-dev-runtime.d.ts +0 -2
- package/internal/testing/jsx-dev-runtime.js +0 -8
- package/internal/testing/jsx-runtime.d.ts +0 -2
- package/internal/testing/jsx-runtime.js +0 -9
- package/internal/testing/package.json +0 -7
- package/internal/utils/index.d.ts +0 -1
- package/internal/utils/result.d.ts +0 -112
- package/mock-doc/index.cjs +0 -10165
- package/mock-doc/index.d.ts +0 -1172
- package/mock-doc/index.js +0 -10144
- package/mock-doc/package.json +0 -15
- package/readme.md +0 -94
- package/screenshot/compare/assets/favicon.ico +0 -0
- package/screenshot/compare/assets/logo.png +0 -0
- package/screenshot/compare/build/app.css +0 -1
- package/screenshot/compare/build/app.esm.js +0 -1
- package/screenshot/compare/build/app.js +0 -33
- package/screenshot/compare/build/p-081b0641.js +0 -1
- package/screenshot/compare/build/p-227a1e18.entry.js +0 -1
- package/screenshot/compare/build/p-2c298727.entry.js +0 -1
- package/screenshot/compare/build/p-5479268c.entry.js +0 -1
- package/screenshot/compare/build/p-573ec8a4.entry.js +0 -1
- package/screenshot/compare/build/p-6ba08604.entry.js +0 -1
- package/screenshot/compare/build/p-6bc63295.entry.js +0 -1
- package/screenshot/compare/build/p-7a3759fd.entry.js +0 -1
- package/screenshot/compare/build/p-7b4e3ba7.js +0 -1
- package/screenshot/compare/build/p-988eb362.css +0 -1
- package/screenshot/compare/build/p-9b6a9315.js +0 -1
- package/screenshot/compare/build/p-b4cc611c.entry.js +0 -1
- package/screenshot/compare/build/p-d1bf53f5.entry.js +0 -1
- package/screenshot/compare/build/p-e2efe0df.js +0 -1
- package/screenshot/compare/build/p-e8ca6d97.entry.js +0 -1
- package/screenshot/compare/build/p-ec2f13e0.entry.js +0 -1
- package/screenshot/compare/build/p-f0b99977.entry.js +0 -1
- package/screenshot/compare/build/p-f4745c2f.entry.js +0 -1
- package/screenshot/compare/build/p-fbbae598.js +0 -1
- package/screenshot/compare/host.config.json +0 -15
- package/screenshot/compare/index.html +0 -1
- package/screenshot/compare/manifest.json +0 -13
- package/screenshot/connector-base.d.ts +0 -42
- package/screenshot/connector-local.d.ts +0 -7
- package/screenshot/connector.js +0 -2
- package/screenshot/index.d.ts +0 -3
- package/screenshot/index.js +0 -2433
- package/screenshot/local-connector.js +0 -2
- package/screenshot/package.json +0 -15
- package/screenshot/pixel-match.d.ts +0 -1
- package/screenshot/pixel-match.js +0 -2315
- package/screenshot/screenshot-compare.d.ts +0 -20
- package/screenshot/screenshot-fs.d.ts +0 -14
- package/sys/node/460.node-fetch.js +0 -451
- package/sys/node/autoprefixer.js +0 -9
- package/sys/node/glob.js +0 -1
- package/sys/node/graceful-fs.js +0 -1
- package/sys/node/index.d.ts +0 -39
- package/sys/node/index.js +0 -64
- package/sys/node/node-fetch.js +0 -12
- package/sys/node/package.json +0 -8
- package/sys/node/prompts.js +0 -1
- package/sys/node/worker.js +0 -4
- package/testing/index.d.ts +0 -9
- package/testing/index.js +0 -13064
- package/testing/jest/jest-27-and-under/jest-config.d.ts +0 -16
- package/testing/jest/jest-27-and-under/jest-environment.d.ts +0 -2
- package/testing/jest/jest-27-and-under/jest-facade.d.ts +0 -155
- package/testing/jest/jest-27-and-under/jest-preprocessor.d.ts +0 -59
- package/testing/jest/jest-27-and-under/jest-preset.d.ts +0 -3
- package/testing/jest/jest-27-and-under/jest-runner.d.ts +0 -11
- package/testing/jest/jest-27-and-under/jest-screenshot.d.ts +0 -2
- package/testing/jest/jest-27-and-under/jest-serializer.d.ts +0 -4
- package/testing/jest/jest-27-and-under/jest-setup-test-framework.d.ts +0 -9
- package/testing/jest/jest-27-and-under/matchers/attributes.d.ts +0 -14
- package/testing/jest/jest-27-and-under/matchers/class-list.d.ts +0 -12
- package/testing/jest/jest-27-and-under/matchers/events.d.ts +0 -25
- package/testing/jest/jest-27-and-under/matchers/html.d.ts +0 -13
- package/testing/jest/jest-27-and-under/matchers/index.d.ts +0 -24
- package/testing/jest/jest-27-and-under/matchers/screenshot.d.ts +0 -5
- package/testing/jest/jest-27-and-under/matchers/text.d.ts +0 -4
- package/testing/jest/jest-27-and-under/test/jest-config.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-preprocessor.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-runner.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-serializer.spec.d.ts +0 -1
- package/testing/jest/jest-27-and-under/test/jest-setup-test-framework.spec.d.ts +0 -1
- package/testing/jest/jest-28/jest-config.d.ts +0 -16
- package/testing/jest/jest-28/jest-environment.d.ts +0 -2
- package/testing/jest/jest-28/jest-facade.d.ts +0 -134
- package/testing/jest/jest-28/jest-preprocessor.d.ts +0 -35
- package/testing/jest/jest-28/jest-preset.d.ts +0 -3
- package/testing/jest/jest-28/jest-runner.d.ts +0 -11
- package/testing/jest/jest-28/jest-screenshot.d.ts +0 -2
- package/testing/jest/jest-28/jest-serializer.d.ts +0 -4
- package/testing/jest/jest-28/jest-setup-test-framework.d.ts +0 -9
- package/testing/jest/jest-28/matchers/attributes.d.ts +0 -14
- package/testing/jest/jest-28/matchers/class-list.d.ts +0 -12
- package/testing/jest/jest-28/matchers/events.d.ts +0 -25
- package/testing/jest/jest-28/matchers/html.d.ts +0 -13
- package/testing/jest/jest-28/matchers/index.d.ts +0 -24
- package/testing/jest/jest-28/matchers/screenshot.d.ts +0 -5
- package/testing/jest/jest-28/matchers/text.d.ts +0 -4
- package/testing/jest/jest-28/test/jest-config.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-preprocessor.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-runner.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-serializer.spec.d.ts +0 -1
- package/testing/jest/jest-28/test/jest-setup-test-framework.spec.d.ts +0 -1
- package/testing/jest/jest-29/jest-config.d.ts +0 -16
- package/testing/jest/jest-29/jest-environment.d.ts +0 -2
- package/testing/jest/jest-29/jest-facade.d.ts +0 -136
- package/testing/jest/jest-29/jest-preprocessor.d.ts +0 -35
- package/testing/jest/jest-29/jest-preset.d.ts +0 -3
- package/testing/jest/jest-29/jest-runner.d.ts +0 -11
- package/testing/jest/jest-29/jest-screenshot.d.ts +0 -2
- package/testing/jest/jest-29/jest-serializer.d.ts +0 -4
- package/testing/jest/jest-29/jest-setup-test-framework.d.ts +0 -9
- package/testing/jest/jest-29/matchers/attributes.d.ts +0 -14
- package/testing/jest/jest-29/matchers/class-list.d.ts +0 -12
- package/testing/jest/jest-29/matchers/events.d.ts +0 -25
- package/testing/jest/jest-29/matchers/html.d.ts +0 -13
- package/testing/jest/jest-29/matchers/index.d.ts +0 -24
- package/testing/jest/jest-29/matchers/screenshot.d.ts +0 -5
- package/testing/jest/jest-29/matchers/text.d.ts +0 -4
- package/testing/jest/jest-29/test/jest-config.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-preprocessor.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-runner.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-serializer.spec.d.ts +0 -1
- package/testing/jest/jest-29/test/jest-setup-test-framework.spec.d.ts +0 -1
- package/testing/jest/jest-apis.d.ts +0 -86
- package/testing/jest/jest-facade.d.ts +0 -74
- package/testing/jest/jest-stencil-connector.d.ts +0 -65
- package/testing/jest/test/jest-stencil-connector.spec.d.ts +0 -1
- package/testing/jest-environment.js +0 -3
- package/testing/jest-preprocessor.js +0 -3
- package/testing/jest-preset.js +0 -2
- package/testing/jest-runner.js +0 -3
- package/testing/jest-setuptestframework.js +0 -3
- package/testing/mock-fetch.d.ts +0 -11
- package/testing/mocks.d.ts +0 -56
- package/testing/package.json +0 -8
- package/testing/puppeteer/index.d.ts +0 -2
- package/testing/puppeteer/puppeteer-browser.d.ts +0 -6
- package/testing/puppeteer/puppeteer-declarations.d.ts +0 -414
- package/testing/puppeteer/puppeteer-element.d.ts +0 -67
- package/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
- package/testing/puppeteer/puppeteer-events.d.ts +0 -21
- package/testing/puppeteer/puppeteer-page.d.ts +0 -2
- package/testing/puppeteer/puppeteer-screenshot.d.ts +0 -27
- package/testing/puppeteer/test/puppeteer-screenshot.spec.d.ts +0 -1
- package/testing/reset-build-conditionals.d.ts +0 -12
- package/testing/spec-page.d.ts +0 -7
- package/testing/test/testing-utils.spec.d.ts +0 -1
- package/testing/test-transpile.d.ts +0 -2
- package/testing/testing-logger.d.ts +0 -26
- package/testing/testing-sys.d.ts +0 -6
- package/testing/testing-utils.d.ts +0 -80
- package/testing/testing.d.ts +0 -2
- /package/{internal → dist/declarations}/stencil-ext-modules.d.ts +0 -0
- /package/{internal → dist/declarations}/stencil-public-docs.d.ts +0 -0
- /package/{screenshot/compare/build/index.esm.js → dist/declarations/stencil-public-runtime.js} +0 -0
|
@@ -1,793 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Stencil Dev Server Client v4.43.2 | MIT Licensed | https://stenciljs.com
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// src/dev-server/client/app-error.css
|
|
6
|
-
var app_error_default = "#dev-server-modal * { box-sizing: border-box !important; } #dev-server-modal { direction: ltr !important; display: block !important; position: absolute !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; z-index: 100000; margin: 0 !important; padding: 0 !important; font-family: -apple-system, 'Roboto', BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol' !important; font-size: 14px !important; line-height: 1.5 !important; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; text-size-adjust: none; word-wrap: break-word; color: #333 !important; background-color: white !important; box-sizing: border-box !important; overflow: hidden; user-select: auto; } #dev-server-modal-inner { position: relative !important; padding: 0 0 30px 0 !important; width: 100% !important; height: 100%; overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch; } .dev-server-diagnostic { margin: 20px !important; border: 1px solid #ddd !important; border-radius: 3px !important; } .dev-server-diagnostic-masthead { padding: 8px 12px 12px 12px !important; } .dev-server-diagnostic-title { margin: 0 !important; font-weight: bold !important; color: #222 !important; } .dev-server-diagnostic-message { margin-top: 4px !important; color: #555 !important; } .dev-server-diagnostic-file { position: relative !important; border-top: 1px solid #ddd !important; } .dev-server-diagnostic-file-header { display: block !important; padding: 5px 10px !important; color: #555 !important; border-bottom: 1px solid #ddd !important; border-top-left-radius: 2px !important; border-top-right-radius: 2px !important; background-color: #f9f9f9 !important; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; font-size: 12px !important; } a.dev-server-diagnostic-file-header { color: #0000ee !important; text-decoration: underline !important; } a.dev-server-diagnostic-file-header:hover { text-decoration: none !important; background-color: #f4f4f4 !important; } .dev-server-diagnostic-file-name { font-weight: bold !important; } .dev-server-diagnostic-blob { overflow-x: auto !important; overflow-y: hidden !important; border-bottom-right-radius: 3px !important; border-bottom-left-radius: 3px !important; } .dev-server-diagnostic-table { margin: 0 !important; padding: 0 !important; border-spacing: 0 !important; border-collapse: collapse !important; border-width: 0 !important; border-style: none !important; -moz-tab-size: 2; tab-size: 2; } .dev-server-diagnostic-table td, .dev-server-diagnostic-table th { padding: 0 !important; border-width: 0 !important; border-style: none !important; } td.dev-server-diagnostic-blob-num { padding-right: 10px !important; padding-left: 10px !important; width: 1% !important; min-width: 50px !important; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; font-size: 12px !important; line-height: 20px !important; color: rgba(0, 0, 0, 0.3) !important; text-align: right !important; white-space: nowrap !important; vertical-align: top !important; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: solid #eee !important; border-width: 0 1px 0 0 !important; } td.dev-server-diagnostic-blob-num::before { content: attr(data-line-number) !important; } .dev-server-diagnostic-error-line td.dev-server-diagnostic-blob-num { background-color: #ffdddd !important; border-color: #ffc9c9 !important; } .dev-server-diagnostic-error-line td.dev-server-diagnostic-blob-code { background: rgba(255, 221, 221, 0.25) !important; z-index: -1; } .dev-server-diagnostic-open-in-editor td.dev-server-diagnostic-blob-num:hover { cursor: pointer; background-color: #ffffe3 !important; font-weight: bold; } .dev-server-diagnostic-open-in-editor.dev-server-diagnostic-error-line td.dev-server-diagnostic-blob-num:hover { background-color: #ffdada !important; } td.dev-server-diagnostic-blob-code { position: relative !important; padding-right: 10px !important; padding-left: 10px !important; line-height: 20px !important; vertical-align: top !important; overflow: visible !important; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace !important; font-size: 12px !important; color: #333 !important; word-wrap: normal !important; white-space: pre !important; } td.dev-server-diagnostic-blob-code::before { content: '' !important; } .dev-server-diagnostic-error-chr { position: relative !important; } .dev-server-diagnostic-error-chr::before { position: absolute !important; z-index: -1; top: -3px !important; left: 0px !important; width: 8px !important; height: 20px !important; background-color: #ffdddd !important; content: '' !important; } /** * GitHub Gist Theme * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro * https://highlightjs.org/ */ .hljs-comment, .hljs-meta { color: #969896; } .hljs-string, .hljs-variable, .hljs-template-variable, .hljs-strong, .hljs-emphasis, .hljs-quote { color: #df5000; } .hljs-keyword, .hljs-selector-tag, .hljs-type { color: #a71d5d; } .hljs-literal, .hljs-symbol, .hljs-bullet, .hljs-attribute { color: #0086b3; } .hljs-section, .hljs-name { color: #63a35c; } .hljs-tag { color: #333333; } .hljs-title, .hljs-attr, .hljs-selector-id, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo { color: #795da3; } .hljs-addition { color: #55a532; background-color: #eaffea; } .hljs-deletion { color: #bd2c00; background-color: #ffecec; } .hljs-link { text-decoration: underline; }";
|
|
7
|
-
|
|
8
|
-
// build/dev-server/client/app-error.js
|
|
9
|
-
var appError = (data) => {
|
|
10
|
-
const results = {
|
|
11
|
-
diagnostics: [],
|
|
12
|
-
status: null
|
|
13
|
-
};
|
|
14
|
-
if (data && data.window && Array.isArray(data.buildResults.diagnostics)) {
|
|
15
|
-
const diagnostics = data.buildResults.diagnostics.filter((diagnostic) => diagnostic.level === "error");
|
|
16
|
-
if (diagnostics.length > 0) {
|
|
17
|
-
const modal = getDevServerModal(data.window.document);
|
|
18
|
-
diagnostics.forEach((diagnostic) => {
|
|
19
|
-
results.diagnostics.push(diagnostic);
|
|
20
|
-
appendDiagnostic(data.window.document, data.openInEditor, modal, diagnostic);
|
|
21
|
-
});
|
|
22
|
-
results.status = "error";
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return results;
|
|
26
|
-
};
|
|
27
|
-
var appendDiagnostic = (doc, openInEditor, modal, diagnostic) => {
|
|
28
|
-
var _a, _b, _c, _d;
|
|
29
|
-
const card = doc.createElement("div");
|
|
30
|
-
card.className = "dev-server-diagnostic";
|
|
31
|
-
const masthead = doc.createElement("div");
|
|
32
|
-
masthead.className = "dev-server-diagnostic-masthead";
|
|
33
|
-
masthead.title = `${escapeHtml(diagnostic.type)} error: ${escapeHtml((_a = diagnostic.code) != null ? _a : "unknown error")}`;
|
|
34
|
-
card.appendChild(masthead);
|
|
35
|
-
const title = doc.createElement("div");
|
|
36
|
-
title.className = "dev-server-diagnostic-title";
|
|
37
|
-
if (typeof diagnostic.header === "string" && diagnostic.header.trim().length > 0) {
|
|
38
|
-
title.textContent = diagnostic.header;
|
|
39
|
-
} else {
|
|
40
|
-
title.textContent = `${titleCase(diagnostic.type)} ${titleCase(diagnostic.level)}`;
|
|
41
|
-
}
|
|
42
|
-
masthead.appendChild(title);
|
|
43
|
-
const message = doc.createElement("div");
|
|
44
|
-
message.className = "dev-server-diagnostic-message";
|
|
45
|
-
message.textContent = diagnostic.messageText;
|
|
46
|
-
masthead.appendChild(message);
|
|
47
|
-
const file = doc.createElement("div");
|
|
48
|
-
file.className = "dev-server-diagnostic-file";
|
|
49
|
-
card.appendChild(file);
|
|
50
|
-
const isUrl = typeof diagnostic.absFilePath === "string" && diagnostic.absFilePath.indexOf("http") === 0;
|
|
51
|
-
const canOpenInEditor = typeof openInEditor === "function" && typeof diagnostic.absFilePath === "string" && !isUrl;
|
|
52
|
-
if (isUrl) {
|
|
53
|
-
const fileHeader = doc.createElement("a");
|
|
54
|
-
fileHeader.href = (_b = diagnostic.absFilePath) != null ? _b : "";
|
|
55
|
-
fileHeader.setAttribute("target", "_blank");
|
|
56
|
-
fileHeader.setAttribute("rel", "noopener noreferrer");
|
|
57
|
-
fileHeader.className = "dev-server-diagnostic-file-header";
|
|
58
|
-
const filePath = doc.createElement("span");
|
|
59
|
-
filePath.className = "dev-server-diagnostic-file-path";
|
|
60
|
-
filePath.textContent = (_c = diagnostic.absFilePath) != null ? _c : "";
|
|
61
|
-
fileHeader.appendChild(filePath);
|
|
62
|
-
file.appendChild(fileHeader);
|
|
63
|
-
} else if (diagnostic.relFilePath) {
|
|
64
|
-
const fileHeader = doc.createElement(canOpenInEditor ? "a" : "div");
|
|
65
|
-
fileHeader.className = "dev-server-diagnostic-file-header";
|
|
66
|
-
if (diagnostic.absFilePath) {
|
|
67
|
-
fileHeader.title = escapeHtml(diagnostic.absFilePath);
|
|
68
|
-
if (canOpenInEditor) {
|
|
69
|
-
addOpenInEditor(openInEditor, fileHeader, diagnostic.absFilePath, diagnostic.lineNumber, diagnostic.columnNumber);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const parts = diagnostic.relFilePath.split("/");
|
|
73
|
-
const fileName = doc.createElement("span");
|
|
74
|
-
fileName.className = "dev-server-diagnostic-file-name";
|
|
75
|
-
fileName.textContent = (_d = parts.pop()) != null ? _d : "";
|
|
76
|
-
const filePath = doc.createElement("span");
|
|
77
|
-
filePath.className = "dev-server-diagnostic-file-path";
|
|
78
|
-
filePath.textContent = parts.join("/") + "/";
|
|
79
|
-
fileHeader.appendChild(filePath);
|
|
80
|
-
fileHeader.appendChild(fileName);
|
|
81
|
-
file.appendChild(fileHeader);
|
|
82
|
-
}
|
|
83
|
-
if (diagnostic.lines && diagnostic.lines.length > 0) {
|
|
84
|
-
const blob = doc.createElement("div");
|
|
85
|
-
blob.className = "dev-server-diagnostic-blob";
|
|
86
|
-
file.appendChild(blob);
|
|
87
|
-
const table = doc.createElement("table");
|
|
88
|
-
table.className = "dev-server-diagnostic-table";
|
|
89
|
-
blob.appendChild(table);
|
|
90
|
-
prepareLines(diagnostic.lines).forEach((l) => {
|
|
91
|
-
var _a2, _b2, _c2;
|
|
92
|
-
const tr = doc.createElement("tr");
|
|
93
|
-
if (l.errorCharStart > 0) {
|
|
94
|
-
tr.classList.add("dev-server-diagnostic-error-line");
|
|
95
|
-
}
|
|
96
|
-
if (canOpenInEditor) {
|
|
97
|
-
tr.classList.add("dev-server-diagnostic-open-in-editor");
|
|
98
|
-
}
|
|
99
|
-
table.appendChild(tr);
|
|
100
|
-
const tdNum = doc.createElement("td");
|
|
101
|
-
tdNum.className = "dev-server-diagnostic-blob-num";
|
|
102
|
-
if (l.lineNumber > 0) {
|
|
103
|
-
tdNum.setAttribute("data-line-number", l.lineNumber + "");
|
|
104
|
-
tdNum.title = escapeHtml((_a2 = diagnostic.relFilePath) != null ? _a2 : "") + ", line " + l.lineNumber;
|
|
105
|
-
const maybeFile = diagnostic.absFilePath;
|
|
106
|
-
if (canOpenInEditor && maybeFile) {
|
|
107
|
-
const column = l.lineNumber === diagnostic.lineNumber ? diagnostic.columnNumber : 1;
|
|
108
|
-
addOpenInEditor(openInEditor, tdNum, maybeFile, l.lineNumber, column);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
tr.appendChild(tdNum);
|
|
112
|
-
const tdCode = doc.createElement("td");
|
|
113
|
-
tdCode.className = "dev-server-diagnostic-blob-code";
|
|
114
|
-
tdCode.innerHTML = highlightError((_b2 = l.text) != null ? _b2 : "", l.errorCharStart, (_c2 = l.errorLength) != null ? _c2 : 0);
|
|
115
|
-
tr.appendChild(tdCode);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
modal.appendChild(card);
|
|
119
|
-
};
|
|
120
|
-
var addOpenInEditor = (openInEditor, elm, file, line, column) => {
|
|
121
|
-
if (elm.tagName === "A") {
|
|
122
|
-
elm.href = "#open-in-editor";
|
|
123
|
-
}
|
|
124
|
-
const lineNumber = typeof line !== "number" || line < 1 ? 1 : line;
|
|
125
|
-
const columnNumber = typeof column !== "number" || column < 1 ? 1 : column;
|
|
126
|
-
elm.addEventListener("click", (ev) => {
|
|
127
|
-
ev.preventDefault();
|
|
128
|
-
ev.stopPropagation();
|
|
129
|
-
openInEditor({
|
|
130
|
-
file,
|
|
131
|
-
line: lineNumber,
|
|
132
|
-
column: columnNumber
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
};
|
|
136
|
-
var getDevServerModal = (doc) => {
|
|
137
|
-
let outer = doc.getElementById(DEV_SERVER_MODAL);
|
|
138
|
-
if (!outer) {
|
|
139
|
-
outer = doc.createElement("div");
|
|
140
|
-
outer.id = DEV_SERVER_MODAL;
|
|
141
|
-
outer.setAttribute("role", "dialog");
|
|
142
|
-
doc.body.appendChild(outer);
|
|
143
|
-
}
|
|
144
|
-
outer.innerHTML = `<style>${app_error_default}</style><div id="${DEV_SERVER_MODAL}-inner"></div>`;
|
|
145
|
-
return doc.getElementById(`${DEV_SERVER_MODAL}-inner`);
|
|
146
|
-
};
|
|
147
|
-
var clearAppErrorModal = (data) => {
|
|
148
|
-
const appErrorElm = data.window.document.getElementById(DEV_SERVER_MODAL);
|
|
149
|
-
if (appErrorElm == null ? void 0 : appErrorElm.parentNode) {
|
|
150
|
-
appErrorElm.parentNode.removeChild(appErrorElm);
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
var escapeHtml = (unsafe) => {
|
|
154
|
-
if (typeof unsafe === "number" || typeof unsafe === "boolean") {
|
|
155
|
-
return unsafe.toString();
|
|
156
|
-
}
|
|
157
|
-
if (typeof unsafe === "string") {
|
|
158
|
-
return unsafe.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
159
|
-
}
|
|
160
|
-
return "";
|
|
161
|
-
};
|
|
162
|
-
var titleCase = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
163
|
-
var highlightError = (text, errorCharStart, errorLength) => {
|
|
164
|
-
if (typeof text !== "string") {
|
|
165
|
-
return "";
|
|
166
|
-
}
|
|
167
|
-
const errorCharEnd = errorCharStart + errorLength;
|
|
168
|
-
return text.split("").map((inputChar, charIndex) => {
|
|
169
|
-
let outputChar;
|
|
170
|
-
if (inputChar === `<`) {
|
|
171
|
-
outputChar = `<`;
|
|
172
|
-
} else if (inputChar === `>`) {
|
|
173
|
-
outputChar = `>`;
|
|
174
|
-
} else if (inputChar === `"`) {
|
|
175
|
-
outputChar = `"`;
|
|
176
|
-
} else if (inputChar === `'`) {
|
|
177
|
-
outputChar = `'`;
|
|
178
|
-
} else if (inputChar === `&`) {
|
|
179
|
-
outputChar = `&`;
|
|
180
|
-
} else {
|
|
181
|
-
outputChar = inputChar;
|
|
182
|
-
}
|
|
183
|
-
if (charIndex >= errorCharStart && charIndex < errorCharEnd) {
|
|
184
|
-
outputChar = `<span class="dev-server-diagnostic-error-chr">${outputChar}</span>`;
|
|
185
|
-
}
|
|
186
|
-
return outputChar;
|
|
187
|
-
}).join("");
|
|
188
|
-
};
|
|
189
|
-
var prepareLines = (orgLines) => {
|
|
190
|
-
var _a, _b, _c;
|
|
191
|
-
const lines = JSON.parse(JSON.stringify(orgLines));
|
|
192
|
-
for (let i = 0; i < 100; i++) {
|
|
193
|
-
if (!eachLineHasLeadingWhitespace(lines)) {
|
|
194
|
-
return lines;
|
|
195
|
-
}
|
|
196
|
-
for (let i2 = 0; i2 < lines.length; i2++) {
|
|
197
|
-
lines[i2].text = (_b = (_a = lines[i2].text) == null ? void 0 : _a.slice(1)) != null ? _b : "";
|
|
198
|
-
lines[i2].errorCharStart--;
|
|
199
|
-
if (!((_c = lines[i2].text) == null ? void 0 : _c.length)) {
|
|
200
|
-
return lines;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return lines;
|
|
205
|
-
};
|
|
206
|
-
var eachLineHasLeadingWhitespace = (lines) => {
|
|
207
|
-
var _a, _b, _c;
|
|
208
|
-
if (!lines.length) {
|
|
209
|
-
return false;
|
|
210
|
-
}
|
|
211
|
-
for (let i = 0; i < lines.length; i++) {
|
|
212
|
-
if (!lines[i].text || ((_b = (_a = lines[i].text) == null ? void 0 : _a.length) != null ? _b : 0) < 1) {
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
const firstChar = (_c = lines[i].text) == null ? void 0 : _c.charAt(0);
|
|
216
|
-
if (firstChar !== " " && firstChar !== " ") {
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return true;
|
|
221
|
-
};
|
|
222
|
-
var DEV_SERVER_MODAL = `dev-server-modal`;
|
|
223
|
-
|
|
224
|
-
// build/dev-server/client/events.js
|
|
225
|
-
var emitBuildLog = (win, buildLog) => {
|
|
226
|
-
win.dispatchEvent(new CustomEvent(BUILD_LOG, { detail: buildLog }));
|
|
227
|
-
};
|
|
228
|
-
var emitBuildResults = (win, buildResults) => {
|
|
229
|
-
win.dispatchEvent(new CustomEvent(BUILD_RESULTS, { detail: buildResults }));
|
|
230
|
-
};
|
|
231
|
-
var emitBuildStatus = (win, buildStatus) => {
|
|
232
|
-
win.dispatchEvent(new CustomEvent(BUILD_STATUS, { detail: buildStatus }));
|
|
233
|
-
};
|
|
234
|
-
var onBuildLog = (win, cb) => {
|
|
235
|
-
win.addEventListener(BUILD_LOG, (ev) => {
|
|
236
|
-
cb(ev.detail);
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
var onBuildResults = (win, cb) => {
|
|
240
|
-
win.addEventListener(BUILD_RESULTS, (ev) => {
|
|
241
|
-
cb(ev.detail);
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
var onBuildStatus = (win, cb) => {
|
|
245
|
-
win.addEventListener(BUILD_STATUS, (ev) => {
|
|
246
|
-
cb(ev.detail);
|
|
247
|
-
});
|
|
248
|
-
};
|
|
249
|
-
var BUILD_LOG = `devserver:buildlog`;
|
|
250
|
-
var BUILD_RESULTS = `devserver:buildresults`;
|
|
251
|
-
var BUILD_STATUS = `devserver:buildstatus`;
|
|
252
|
-
|
|
253
|
-
// build/dev-server/client/hmr-util.js
|
|
254
|
-
var getHmrHref = (versionId, fileName, testUrl) => {
|
|
255
|
-
if (typeof testUrl === "string" && testUrl.trim() !== "") {
|
|
256
|
-
if (getUrlFileName(fileName) === getUrlFileName(testUrl)) {
|
|
257
|
-
return setHmrQueryString(testUrl, versionId);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
return testUrl;
|
|
261
|
-
};
|
|
262
|
-
var getUrlFileName = (url) => {
|
|
263
|
-
const splt = url.split("/");
|
|
264
|
-
return splt[splt.length - 1].split("&")[0].split("?")[0];
|
|
265
|
-
};
|
|
266
|
-
var parseQuerystring = (oldQs) => {
|
|
267
|
-
const newQs = {};
|
|
268
|
-
if (typeof oldQs === "string") {
|
|
269
|
-
oldQs.split("&").forEach((kv) => {
|
|
270
|
-
const splt = kv.split("=");
|
|
271
|
-
newQs[splt[0]] = splt[1] ? splt[1] : "";
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
return newQs;
|
|
275
|
-
};
|
|
276
|
-
var stringifyQuerystring = (qs) => Object.keys(qs).map((key) => key + "=" + qs[key]).join("&");
|
|
277
|
-
var setQueryString = (url, qsKey, qsValue) => {
|
|
278
|
-
const urlSplt = url.split("?");
|
|
279
|
-
const urlPath = urlSplt[0];
|
|
280
|
-
const qs = parseQuerystring(urlSplt[1]);
|
|
281
|
-
qs[qsKey] = qsValue;
|
|
282
|
-
return urlPath + "?" + stringifyQuerystring(qs);
|
|
283
|
-
};
|
|
284
|
-
var setHmrQueryString = (url, versionId) => setQueryString(url, "s-hmr", versionId);
|
|
285
|
-
var updateCssUrlValue = (versionId, fileName, oldCss) => {
|
|
286
|
-
const reg = /url\((['"]?)(.*)\1\)/gi;
|
|
287
|
-
let result;
|
|
288
|
-
let newCss = oldCss;
|
|
289
|
-
while ((result = reg.exec(oldCss)) !== null) {
|
|
290
|
-
const url = result[2];
|
|
291
|
-
newCss = newCss.replace(url, getHmrHref(versionId, fileName, url));
|
|
292
|
-
}
|
|
293
|
-
return newCss;
|
|
294
|
-
};
|
|
295
|
-
var isLinkStylesheet = (elm) => elm.nodeName.toLowerCase() === "link" && !!elm.href && !!elm.rel && elm.rel.toLowerCase() === "stylesheet";
|
|
296
|
-
var isTemplate = (elm) => elm.nodeName.toLowerCase() === "template" && !!elm.content && elm.content.nodeType === 11;
|
|
297
|
-
var setHmrAttr = (elm, versionId) => {
|
|
298
|
-
elm.setAttribute("data-hmr", versionId);
|
|
299
|
-
};
|
|
300
|
-
var hasShadowRoot = (elm) => !!elm.shadowRoot && elm.shadowRoot.nodeType === 11 && elm.shadowRoot !== elm;
|
|
301
|
-
var isElement = (elm) => !!elm && elm.nodeType === 1 && !!elm.getAttribute;
|
|
302
|
-
|
|
303
|
-
// build/dev-server/client/hmr-components.js
|
|
304
|
-
var hmrComponents = (element, versionId, hmrTagNames) => {
|
|
305
|
-
const updatedTags = [];
|
|
306
|
-
hmrTagNames.forEach((hmrTagName) => {
|
|
307
|
-
hmrComponent(updatedTags, element, versionId, hmrTagName);
|
|
308
|
-
});
|
|
309
|
-
return updatedTags.sort();
|
|
310
|
-
};
|
|
311
|
-
var hmrComponent = (updatedTags, element, versionId, cmpTagName) => {
|
|
312
|
-
if (element.nodeName.toLowerCase() === cmpTagName && typeof element["s-hmr"] === "function") {
|
|
313
|
-
element["s-hmr"](versionId);
|
|
314
|
-
setHmrAttr(element, versionId);
|
|
315
|
-
if (updatedTags.indexOf(cmpTagName) === -1) {
|
|
316
|
-
updatedTags.push(cmpTagName);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
if (hasShadowRoot(element)) {
|
|
320
|
-
hmrComponent(updatedTags, element.shadowRoot, versionId, cmpTagName);
|
|
321
|
-
}
|
|
322
|
-
if (element.children) {
|
|
323
|
-
for (let i = 0; i < element.children.length; i++) {
|
|
324
|
-
hmrComponent(updatedTags, element.children[i], versionId, cmpTagName);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
|
|
329
|
-
// build/dev-server/client/hmr-external-styles.js
|
|
330
|
-
var hmrExternalStyles = (elm, versionId, cssFileNames) => {
|
|
331
|
-
if (isLinkStylesheet(elm)) {
|
|
332
|
-
cssFileNames.forEach((cssFileName) => {
|
|
333
|
-
hmrStylesheetLink(elm, versionId, cssFileName);
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
if (isTemplate(elm)) {
|
|
337
|
-
hmrExternalStyles(elm.content, versionId, cssFileNames);
|
|
338
|
-
}
|
|
339
|
-
if (hasShadowRoot(elm)) {
|
|
340
|
-
hmrExternalStyles(elm.shadowRoot, versionId, cssFileNames);
|
|
341
|
-
}
|
|
342
|
-
if (elm.children) {
|
|
343
|
-
for (let i = 0; i < elm.children.length; i++) {
|
|
344
|
-
hmrExternalStyles(elm.children[i], versionId, cssFileNames);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
return cssFileNames.sort();
|
|
348
|
-
};
|
|
349
|
-
var hmrStylesheetLink = (styleSheetElm, versionId, cssFileName) => {
|
|
350
|
-
const orgHref = styleSheetElm.getAttribute("href");
|
|
351
|
-
const newHref = getHmrHref(versionId, cssFileName, styleSheetElm.href);
|
|
352
|
-
if (newHref !== orgHref) {
|
|
353
|
-
styleSheetElm.setAttribute("href", newHref);
|
|
354
|
-
setHmrAttr(styleSheetElm, versionId);
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
// build/dev-server/client/hmr-images.js
|
|
359
|
-
var hmrImages = (win, doc, versionId, imageFileNames) => {
|
|
360
|
-
if (win.location.protocol !== "file:" && doc.styleSheets) {
|
|
361
|
-
hmrStyleSheetsImages(doc, versionId, imageFileNames);
|
|
362
|
-
}
|
|
363
|
-
hmrImagesElements(win, doc.documentElement, versionId, imageFileNames);
|
|
364
|
-
return imageFileNames.sort();
|
|
365
|
-
};
|
|
366
|
-
var hmrStyleSheetsImages = (doc, versionId, imageFileNames) => {
|
|
367
|
-
const cssImageProps = Object.keys(doc.documentElement.style).filter((cssProp) => {
|
|
368
|
-
return cssProp.endsWith("Image");
|
|
369
|
-
});
|
|
370
|
-
for (let i = 0; i < doc.styleSheets.length; i++) {
|
|
371
|
-
hmrStyleSheetImages(cssImageProps, doc.styleSheets[i], versionId, imageFileNames);
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
var hmrStyleSheetImages = (cssImageProps, styleSheet, versionId, imageFileNames) => {
|
|
375
|
-
try {
|
|
376
|
-
const cssRules = styleSheet.cssRules;
|
|
377
|
-
for (let i = 0; i < cssRules.length; i++) {
|
|
378
|
-
const cssRule = cssRules[i];
|
|
379
|
-
switch (cssRule.type) {
|
|
380
|
-
case CSSRule.IMPORT_RULE:
|
|
381
|
-
hmrStyleSheetImages(cssImageProps, cssRule.styleSheet, versionId, imageFileNames);
|
|
382
|
-
break;
|
|
383
|
-
case CSSRule.STYLE_RULE:
|
|
384
|
-
hmrStyleSheetRuleImages(cssImageProps, cssRule, versionId, imageFileNames);
|
|
385
|
-
break;
|
|
386
|
-
case CSSRule.MEDIA_RULE:
|
|
387
|
-
hmrStyleSheetImages(cssImageProps, cssRule, versionId, imageFileNames);
|
|
388
|
-
break;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
} catch (e) {
|
|
392
|
-
console.error("hmrStyleSheetImages: " + e);
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
var hmrStyleSheetRuleImages = (cssImageProps, cssRule, versionId, imageFileNames) => {
|
|
396
|
-
cssImageProps.forEach((cssImageProp) => {
|
|
397
|
-
imageFileNames.forEach((imageFileName) => {
|
|
398
|
-
const oldCssText = cssRule.style[cssImageProp];
|
|
399
|
-
const newCssText = updateCssUrlValue(versionId, imageFileName, oldCssText);
|
|
400
|
-
if (oldCssText !== newCssText) {
|
|
401
|
-
cssRule.style[cssImageProp] = newCssText;
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
|
-
var hmrImagesElements = (win, elm, versionId, imageFileNames) => {
|
|
407
|
-
const tagName = elm.nodeName.toLowerCase();
|
|
408
|
-
if (tagName === "img") {
|
|
409
|
-
hmrImgElement(elm, versionId, imageFileNames);
|
|
410
|
-
}
|
|
411
|
-
if (isElement(elm)) {
|
|
412
|
-
const styleAttr = elm.getAttribute("style");
|
|
413
|
-
if (styleAttr) {
|
|
414
|
-
hmrUpdateStyleAttr(elm, versionId, imageFileNames, styleAttr);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
if (tagName === "style") {
|
|
418
|
-
hmrUpdateStyleElementUrl(elm, versionId, imageFileNames);
|
|
419
|
-
}
|
|
420
|
-
if (win.location.protocol !== "file:" && isLinkStylesheet(elm)) {
|
|
421
|
-
hmrUpdateLinkElementUrl(elm, versionId, imageFileNames);
|
|
422
|
-
}
|
|
423
|
-
if (isTemplate(elm)) {
|
|
424
|
-
hmrImagesElements(win, elm.content, versionId, imageFileNames);
|
|
425
|
-
}
|
|
426
|
-
if (hasShadowRoot(elm)) {
|
|
427
|
-
hmrImagesElements(win, elm.shadowRoot, versionId, imageFileNames);
|
|
428
|
-
}
|
|
429
|
-
if (elm.children) {
|
|
430
|
-
for (let i = 0; i < elm.children.length; i++) {
|
|
431
|
-
hmrImagesElements(win, elm.children[i], versionId, imageFileNames);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
var hmrImgElement = (imgElm, versionId, imageFileNames) => {
|
|
436
|
-
imageFileNames.forEach((imageFileName) => {
|
|
437
|
-
const orgSrc = imgElm.getAttribute("src");
|
|
438
|
-
const newSrc = getHmrHref(versionId, imageFileName, orgSrc);
|
|
439
|
-
if (newSrc !== orgSrc) {
|
|
440
|
-
imgElm.setAttribute("src", newSrc);
|
|
441
|
-
setHmrAttr(imgElm, versionId);
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
};
|
|
445
|
-
var hmrUpdateStyleAttr = (elm, versionId, imageFileNames, oldStyleAttr) => {
|
|
446
|
-
imageFileNames.forEach((imageFileName) => {
|
|
447
|
-
const newStyleAttr = updateCssUrlValue(versionId, imageFileName, oldStyleAttr);
|
|
448
|
-
if (newStyleAttr !== oldStyleAttr) {
|
|
449
|
-
elm.setAttribute("style", newStyleAttr);
|
|
450
|
-
setHmrAttr(elm, versionId);
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
};
|
|
454
|
-
var hmrUpdateStyleElementUrl = (styleElm, versionId, imageFileNames) => {
|
|
455
|
-
imageFileNames.forEach((imageFileName) => {
|
|
456
|
-
const oldCssText = styleElm.innerHTML;
|
|
457
|
-
const newCssText = updateCssUrlValue(versionId, imageFileName, oldCssText);
|
|
458
|
-
if (newCssText !== oldCssText) {
|
|
459
|
-
styleElm.innerHTML = newCssText;
|
|
460
|
-
setHmrAttr(styleElm, versionId);
|
|
461
|
-
}
|
|
462
|
-
});
|
|
463
|
-
};
|
|
464
|
-
var hmrUpdateLinkElementUrl = (linkElm, versionId, imageFileNames) => {
|
|
465
|
-
linkElm.href = setQueryString(linkElm.href, "s-hmr-urls", imageFileNames.sort().join(","));
|
|
466
|
-
linkElm.href = setHmrQueryString(linkElm.href, versionId);
|
|
467
|
-
linkElm.setAttribute("data-hmr", versionId);
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
// build/dev-server/client/hmr-inline-styles.js
|
|
471
|
-
var hmrInlineStyles = (elm, versionId, stylesUpdatedData) => {
|
|
472
|
-
const stylesUpdated = stylesUpdatedData;
|
|
473
|
-
if (isElement(elm) && elm.nodeName.toLowerCase() === "style") {
|
|
474
|
-
stylesUpdated.forEach((styleUpdated) => {
|
|
475
|
-
hmrStyleElement(elm, versionId, styleUpdated);
|
|
476
|
-
});
|
|
477
|
-
}
|
|
478
|
-
if (isTemplate(elm)) {
|
|
479
|
-
hmrInlineStyles(elm.content, versionId, stylesUpdated);
|
|
480
|
-
}
|
|
481
|
-
if (hasShadowRoot(elm)) {
|
|
482
|
-
hmrInlineStyles(elm.shadowRoot, versionId, stylesUpdated);
|
|
483
|
-
}
|
|
484
|
-
if (elm.children) {
|
|
485
|
-
for (let i = 0; i < elm.children.length; i++) {
|
|
486
|
-
hmrInlineStyles(elm.children[i], versionId, stylesUpdated);
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
return stylesUpdated.map((s) => s.styleTag).reduce((arr, v) => {
|
|
490
|
-
if (arr.indexOf(v) === -1) {
|
|
491
|
-
arr.push(v);
|
|
492
|
-
}
|
|
493
|
-
return arr;
|
|
494
|
-
}, []).sort();
|
|
495
|
-
};
|
|
496
|
-
var hmrStyleElement = (elm, versionId, stylesUpdated) => {
|
|
497
|
-
const styleId = elm.getAttribute("sty-id");
|
|
498
|
-
if (styleId === stylesUpdated.styleId && stylesUpdated.styleText) {
|
|
499
|
-
elm.innerHTML = stylesUpdated.styleText.replace(/\\n/g, "\n");
|
|
500
|
-
elm.setAttribute("data-hmr", versionId);
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
// build/dev-server/client/hmr-window.js
|
|
505
|
-
var hmrWindow = (data) => {
|
|
506
|
-
const results = {
|
|
507
|
-
updatedComponents: [],
|
|
508
|
-
updatedExternalStyles: [],
|
|
509
|
-
updatedInlineStyles: [],
|
|
510
|
-
updatedImages: [],
|
|
511
|
-
versionId: ""
|
|
512
|
-
};
|
|
513
|
-
try {
|
|
514
|
-
if (!data || !data.window || !data.window.document.documentElement || !data.hmr || typeof data.hmr.versionId !== "string") {
|
|
515
|
-
return results;
|
|
516
|
-
}
|
|
517
|
-
const win = data.window;
|
|
518
|
-
const doc = win.document;
|
|
519
|
-
const hmr = data.hmr;
|
|
520
|
-
const documentElement = doc.documentElement;
|
|
521
|
-
const versionId = hmr.versionId;
|
|
522
|
-
results.versionId = versionId;
|
|
523
|
-
if (hmr.componentsUpdated) {
|
|
524
|
-
results.updatedComponents = hmrComponents(documentElement, versionId, hmr.componentsUpdated);
|
|
525
|
-
}
|
|
526
|
-
if (hmr.inlineStylesUpdated) {
|
|
527
|
-
results.updatedInlineStyles = hmrInlineStyles(documentElement, versionId, hmr.inlineStylesUpdated);
|
|
528
|
-
}
|
|
529
|
-
if (hmr.externalStylesUpdated) {
|
|
530
|
-
results.updatedExternalStyles = hmrExternalStyles(documentElement, versionId, hmr.externalStylesUpdated);
|
|
531
|
-
}
|
|
532
|
-
if (hmr.imagesUpdated) {
|
|
533
|
-
results.updatedImages = hmrImages(win, doc, versionId, hmr.imagesUpdated);
|
|
534
|
-
}
|
|
535
|
-
setHmrAttr(documentElement, versionId);
|
|
536
|
-
} catch (e) {
|
|
537
|
-
console.error(e);
|
|
538
|
-
}
|
|
539
|
-
return results;
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
// build/dev-server/client/logger.js
|
|
543
|
-
var logBuild = (msg) => log(BLUE, "Build", msg);
|
|
544
|
-
var logReload = (msg) => logWarn("Reload", msg);
|
|
545
|
-
var logWarn = (prefix, msg) => log(YELLOW, prefix, msg);
|
|
546
|
-
var logDisabled = (prefix, msg) => log(GRAY, prefix, msg);
|
|
547
|
-
var logDiagnostic = (diag) => {
|
|
548
|
-
const diagnostic = diag;
|
|
549
|
-
let color = RED;
|
|
550
|
-
let prefix = "Error";
|
|
551
|
-
if (diagnostic.level === "warn") {
|
|
552
|
-
color = YELLOW;
|
|
553
|
-
prefix = "Warning";
|
|
554
|
-
}
|
|
555
|
-
if (diagnostic.header) {
|
|
556
|
-
prefix = diagnostic.header;
|
|
557
|
-
}
|
|
558
|
-
let msg = ``;
|
|
559
|
-
if (diagnostic.relFilePath) {
|
|
560
|
-
msg += diagnostic.relFilePath;
|
|
561
|
-
if (typeof diagnostic.lineNumber === "number" && diagnostic.lineNumber > 0) {
|
|
562
|
-
msg += ", line " + diagnostic.lineNumber;
|
|
563
|
-
if (typeof diagnostic.columnNumber === "number" && diagnostic.columnNumber > 0) {
|
|
564
|
-
msg += ", column " + diagnostic.columnNumber;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
msg += `
|
|
568
|
-
`;
|
|
569
|
-
}
|
|
570
|
-
msg += diagnostic.messageText;
|
|
571
|
-
log(color, prefix, msg);
|
|
572
|
-
};
|
|
573
|
-
var log = (color, prefix, msg) => {
|
|
574
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.indexOf("Trident") > -1) {
|
|
575
|
-
console.log(prefix, msg);
|
|
576
|
-
} else {
|
|
577
|
-
console.log.apply(console, [
|
|
578
|
-
"%c" + prefix,
|
|
579
|
-
`background: ${color}; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;`,
|
|
580
|
-
msg
|
|
581
|
-
]);
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
var YELLOW = `#f39c12`;
|
|
585
|
-
var RED = `#c0392b`;
|
|
586
|
-
var BLUE = `#3498db`;
|
|
587
|
-
var GRAY = `#717171`;
|
|
588
|
-
|
|
589
|
-
// build/dev-server/client/progress.js
|
|
590
|
-
var initBuildProgress = (data) => {
|
|
591
|
-
const win = data.window;
|
|
592
|
-
const doc = win.document;
|
|
593
|
-
const barColor = `#5851ff`;
|
|
594
|
-
const errorColor = `#b70c19`;
|
|
595
|
-
let addBarTimerId;
|
|
596
|
-
let removeBarTimerId;
|
|
597
|
-
let opacityTimerId;
|
|
598
|
-
let incIntervalId;
|
|
599
|
-
let progressIncrease;
|
|
600
|
-
let currentProgress = 0;
|
|
601
|
-
function update() {
|
|
602
|
-
clearTimeout(opacityTimerId);
|
|
603
|
-
clearTimeout(removeBarTimerId);
|
|
604
|
-
const progressBar = getProgressBar();
|
|
605
|
-
if (!progressBar) {
|
|
606
|
-
createProgressBar();
|
|
607
|
-
addBarTimerId = setTimeout(update, 16);
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
progressBar.style.background = barColor;
|
|
611
|
-
progressBar.style.opacity = `1`;
|
|
612
|
-
progressBar.style.transform = `scaleX(${Math.min(1, displayProgress())})`;
|
|
613
|
-
if (incIntervalId == null) {
|
|
614
|
-
incIntervalId = setInterval(() => {
|
|
615
|
-
progressIncrease += Math.random() * 0.05 + 0.01;
|
|
616
|
-
if (displayProgress() < 0.9) {
|
|
617
|
-
update();
|
|
618
|
-
} else {
|
|
619
|
-
clearInterval(incIntervalId);
|
|
620
|
-
}
|
|
621
|
-
}, 800);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
function reset() {
|
|
625
|
-
clearInterval(incIntervalId);
|
|
626
|
-
progressIncrease = 0.05;
|
|
627
|
-
incIntervalId = null;
|
|
628
|
-
clearTimeout(opacityTimerId);
|
|
629
|
-
clearTimeout(addBarTimerId);
|
|
630
|
-
clearTimeout(removeBarTimerId);
|
|
631
|
-
const progressBar = getProgressBar();
|
|
632
|
-
if (progressBar) {
|
|
633
|
-
if (currentProgress >= 1) {
|
|
634
|
-
progressBar.style.transform = `scaleX(1)`;
|
|
635
|
-
}
|
|
636
|
-
opacityTimerId = setTimeout(() => {
|
|
637
|
-
try {
|
|
638
|
-
const progressBar2 = getProgressBar();
|
|
639
|
-
if (progressBar2) {
|
|
640
|
-
progressBar2.style.opacity = `0`;
|
|
641
|
-
}
|
|
642
|
-
} catch (e) {
|
|
643
|
-
}
|
|
644
|
-
}, 150);
|
|
645
|
-
removeBarTimerId = setTimeout(() => {
|
|
646
|
-
try {
|
|
647
|
-
const progressBar2 = getProgressBar();
|
|
648
|
-
if (progressBar2) {
|
|
649
|
-
progressBar2.parentNode.removeChild(progressBar2);
|
|
650
|
-
}
|
|
651
|
-
} catch (e) {
|
|
652
|
-
}
|
|
653
|
-
}, 1e3);
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
function displayProgress() {
|
|
657
|
-
const p = currentProgress + progressIncrease;
|
|
658
|
-
return Math.max(0, Math.min(1, p));
|
|
659
|
-
}
|
|
660
|
-
reset();
|
|
661
|
-
onBuildLog(win, (buildLog) => {
|
|
662
|
-
currentProgress = buildLog.progress;
|
|
663
|
-
if (currentProgress >= 0 && currentProgress < 1) {
|
|
664
|
-
update();
|
|
665
|
-
} else {
|
|
666
|
-
reset();
|
|
667
|
-
}
|
|
668
|
-
});
|
|
669
|
-
onBuildResults(win, (buildResults) => {
|
|
670
|
-
if (buildResults.hasError) {
|
|
671
|
-
const progressBar = getProgressBar();
|
|
672
|
-
if (progressBar) {
|
|
673
|
-
progressBar.style.transform = `scaleX(1)`;
|
|
674
|
-
progressBar.style.background = errorColor;
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
reset();
|
|
678
|
-
});
|
|
679
|
-
onBuildStatus(win, (buildStatus) => {
|
|
680
|
-
if (buildStatus === "disabled") {
|
|
681
|
-
reset();
|
|
682
|
-
}
|
|
683
|
-
});
|
|
684
|
-
if (doc.head.dataset.tmpl === "tmpl-initial-load") {
|
|
685
|
-
update();
|
|
686
|
-
}
|
|
687
|
-
const PROGRESS_BAR_ID = `dev-server-progress-bar`;
|
|
688
|
-
function getProgressBar() {
|
|
689
|
-
return doc.getElementById(PROGRESS_BAR_ID);
|
|
690
|
-
}
|
|
691
|
-
function createProgressBar() {
|
|
692
|
-
const progressBar = doc.createElement("div");
|
|
693
|
-
progressBar.id = PROGRESS_BAR_ID;
|
|
694
|
-
progressBar.style.position = `absolute`;
|
|
695
|
-
progressBar.style.top = `0`;
|
|
696
|
-
progressBar.style.left = `0`;
|
|
697
|
-
progressBar.style.zIndex = `100001`;
|
|
698
|
-
progressBar.style.width = `100%`;
|
|
699
|
-
progressBar.style.height = `2px`;
|
|
700
|
-
progressBar.style.transform = `scaleX(0)`;
|
|
701
|
-
progressBar.style.opacity = `1`;
|
|
702
|
-
progressBar.style.background = barColor;
|
|
703
|
-
progressBar.style.transformOrigin = `left center`;
|
|
704
|
-
progressBar.style.transition = `transform .1s ease-in-out, opacity .5s ease-in`;
|
|
705
|
-
progressBar.style.contain = `strict`;
|
|
706
|
-
doc.body.appendChild(progressBar);
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
|
|
710
|
-
// build/dev-server/client/status.js
|
|
711
|
-
var initBuildStatus = (data) => {
|
|
712
|
-
const win = data.window;
|
|
713
|
-
const doc = win.document;
|
|
714
|
-
const iconElms = getFavIcons(doc);
|
|
715
|
-
iconElms.forEach((iconElm) => {
|
|
716
|
-
if (iconElm.href) {
|
|
717
|
-
iconElm.dataset.href = iconElm.href;
|
|
718
|
-
iconElm.dataset.type = iconElm.type;
|
|
719
|
-
}
|
|
720
|
-
});
|
|
721
|
-
onBuildStatus(win, (buildStatus) => {
|
|
722
|
-
updateBuildStatus(doc, buildStatus);
|
|
723
|
-
});
|
|
724
|
-
};
|
|
725
|
-
var updateBuildStatus = (doc, status) => {
|
|
726
|
-
const iconElms = getFavIcons(doc);
|
|
727
|
-
iconElms.forEach((iconElm) => {
|
|
728
|
-
updateFavIcon(iconElm, status);
|
|
729
|
-
});
|
|
730
|
-
};
|
|
731
|
-
var updateFavIcon = (linkElm, status) => {
|
|
732
|
-
if (status === "pending") {
|
|
733
|
-
linkElm.href = ICON_PENDING;
|
|
734
|
-
linkElm.type = ICON_TYPE;
|
|
735
|
-
linkElm.setAttribute("data-status", status);
|
|
736
|
-
} else if (status === "error") {
|
|
737
|
-
linkElm.href = ICON_ERROR;
|
|
738
|
-
linkElm.type = ICON_TYPE;
|
|
739
|
-
linkElm.setAttribute("data-status", status);
|
|
740
|
-
} else if (status === "disabled") {
|
|
741
|
-
linkElm.href = ICON_DISABLED;
|
|
742
|
-
linkElm.type = ICON_TYPE;
|
|
743
|
-
linkElm.setAttribute("data-status", status);
|
|
744
|
-
} else {
|
|
745
|
-
linkElm.removeAttribute("data-status");
|
|
746
|
-
if (linkElm.dataset.href) {
|
|
747
|
-
linkElm.href = linkElm.dataset.href;
|
|
748
|
-
linkElm.type = linkElm.dataset.type;
|
|
749
|
-
} else {
|
|
750
|
-
linkElm.href = ICON_DEFAULT;
|
|
751
|
-
linkElm.type = ICON_TYPE;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
};
|
|
755
|
-
var getFavIcons = (doc) => {
|
|
756
|
-
const iconElms = [];
|
|
757
|
-
const linkElms = doc.querySelectorAll("link");
|
|
758
|
-
for (let i = 0; i < linkElms.length; i++) {
|
|
759
|
-
if (linkElms[i].href && linkElms[i].rel && (linkElms[i].rel.indexOf("shortcut") > -1 || linkElms[i].rel.indexOf("icon") > -1)) {
|
|
760
|
-
iconElms.push(linkElms[i]);
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
if (iconElms.length === 0) {
|
|
764
|
-
const linkElm = doc.createElement("link");
|
|
765
|
-
linkElm.rel = "shortcut icon";
|
|
766
|
-
doc.head.appendChild(linkElm);
|
|
767
|
-
iconElms.push(linkElm);
|
|
768
|
-
}
|
|
769
|
-
return iconElms;
|
|
770
|
-
};
|
|
771
|
-
var ICON_DEFAULT = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAAAnFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4jUzeAAAAM3RSTlMAsGDs4wML8QEbBvr2FMhAM7+ILCUPnNzXrX04otO6j3RiT0ggzLSTcmtWUUWo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r28Uf2WTQAAAAAAAAAAAYMiWpTxJQ8JSTqThwVI2pKFZsJC3ghTs5izkmpKCcspCljNSkB9ZSLsnBfuWhRxzUjBbspBpSQrSKwuZr0lB8cZCFg1p2LCUB2k4sZSENNxYypY0nFlKTxqGmoUcClJwEQu4SUoKdmIBtEpJQZ6xkHeVAKqOYgFUkYL9OwvJclKQrsQCbkcK0olYAF1IQXFgIfVAGnqWcqZwFidYN4phb4L1onCYYMlPsLqUFKwxwRozwTIYcG1FCqrWdwBhgqU7wUo7FlJ7n2DdScPL+RPezfkT3tl5AA217yc89xMssYBbzUjDkEjZEwAA+NFMbOrDJygmZXnwBMWkaRk8QTFpvg6eoJi0aIInKDY9gp/AbEqCJyg2bYOfwGzqKUzPNh2K0Ccwm0IfRBK2KfSLkDvbFPog0tRsUlsh4EZAwP2SgKu9B9wdATcOAg4BZwACbgQEHALOCATcCAg4BJwVCLhREHB/LOAebFNwwC3YJATcKAi4yICjfmJTQwAA4EeZSBkojrWdsvmO4hjbKYtd6ra2Uxa71G1tp0xnqbvo+IPfpe4Nf3K703Ridr3T9OQPfnea7szseaepqX3vNH3NM/xe5fmeZ7i9yiMXQFlJEeydhYy4ymMygCICzmQAxQactbOQMQFnMoBiAs7iVaHIgDN3VSgq4AxeFYoOOGNXhbCUPkaJs4o4q/iXzyp2vgPO/VnFl/OAu/F/jq8KnZ0H3FD7DriL9x+DTH0HXJ75Driq9R1ws6XvgEuvvgOu6HwHHG18BxydnAfc03nAAQAAAAAAAADAz/4BoL2Us9XM2zMAAAAASUVORK5CYII=";
|
|
775
|
-
var ICON_TYPE = "image/x-icon";
|
|
776
|
-
export {
|
|
777
|
-
appError,
|
|
778
|
-
clearAppErrorModal,
|
|
779
|
-
emitBuildLog,
|
|
780
|
-
emitBuildResults,
|
|
781
|
-
emitBuildStatus,
|
|
782
|
-
hmrWindow,
|
|
783
|
-
initBuildProgress,
|
|
784
|
-
initBuildStatus,
|
|
785
|
-
logBuild,
|
|
786
|
-
logDiagnostic,
|
|
787
|
-
logDisabled,
|
|
788
|
-
logReload,
|
|
789
|
-
logWarn,
|
|
790
|
-
onBuildLog,
|
|
791
|
-
onBuildResults,
|
|
792
|
-
onBuildStatus
|
|
793
|
-
};
|