@stencil/core 5.0.0-alpha.17 → 5.0.0-alpha.19

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.
@@ -4405,17 +4405,30 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4405
4405
  if (styleDesc) {
4406
4406
  Object.defineProperty(ctor, "style", styleDesc);
4407
4407
  const newStyle = NewClass.style;
4408
- if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4408
+ if (newStyle) {
4409
+ const scopeId = getScopeId(cmpMeta);
4410
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4411
+ console.log("[stencil-hmr] registerStyle", {
4412
+ tag: cmpMeta.$tagName$,
4413
+ scopeId,
4414
+ isShadow,
4415
+ cssLen: newStyle.length
4416
+ });
4417
+ registerStyle(scopeId, newStyle, isShadow);
4418
+ }
4409
4419
  }
4410
4420
  }
4421
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4411
4422
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4412
- if (BUILD.hostListener) {
4413
- const hostRef = getHostRef(el);
4414
- if (hostRef?.$rmListeners$) {
4415
- hostRef.$rmListeners$.map((rmListener) => rmListener());
4416
- hostRef.$rmListeners$ = void 0;
4417
- addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4418
- }
4423
+ const hostRef = getHostRef(el);
4424
+ if (BUILD.hostListener && hostRef?.$rmListeners$) {
4425
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
4426
+ hostRef.$rmListeners$ = void 0;
4427
+ addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4428
+ }
4429
+ if (!isShadow && hostRef) {
4430
+ console.log("[stencil-hmr] calling attachStyles for", cmpMeta.$tagName$);
4431
+ attachStyles(hostRef);
4419
4432
  }
4420
4433
  forceUpdate(el);
4421
4434
  });
@@ -1,4 +1,4 @@
1
- import { f as scopeCss } from "../client-CgXNkftm.mjs";
2
- import { C as version, S as vermoji, _ as cmpMetaToDocsComponent, a as createPrerenderer, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, i as createSystem, l as createWorkerMessageHandler, m as validateConfig, n as transpile, o as loadConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, w as versions, x as buildId, y as getScopeId } from "../compiler-CXWiPNlE.mjs";
3
- import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-jFf98r0u.mjs";
1
+ import { f as scopeCss } from "../client-CvcvHKz4.mjs";
2
+ import { C as version, S as vermoji, _ as cmpMetaToDocsComponent, a as createPrerenderer, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, i as createSystem, l as createWorkerMessageHandler, m as validateConfig, n as transpile, o as loadConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, w as versions, x as buildId, y as getScopeId } from "../compiler-Du--5G0l.mjs";
3
+ import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-DKVq_Ud0.mjs";
4
4
  export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, generateManifest, getScopeId, loadConfig, nodeRequire, optimizeCss, optimizeJs, scopeCss, transpile, transpileSync, ts, validateConfig, vermoji, version, versions };
@@ -1,8 +1,8 @@
1
1
  import { n as __require } from "./chunk-z9aeyW2b.mjs";
2
- import { O as HYDRATED_CSS, f as scopeCss } from "./client-CgXNkftm.mjs";
2
+ import { O as HYDRATED_CSS, f as scopeCss } from "./client-CvcvHKz4.mjs";
3
3
  import { $ as VALID_CONFIG_OUTPUT_TARGETS, C as ASSETS, D as COLLECTION_MANIFEST_FILE_NAME, E as COLLECTION_APP_DATA_FILE_NAME, F as DOCS_README, J as STANDALONE, L as EVENT_FLAGS, O as COPY, P as DOCS_JSON, Q as TYPES, R as GENERATED_DTS, T as COLLECTION, U as LOADER_BUNDLE, X as STYLE_EXT, Y as STATS, _ as sortBy, a as fromEntries, b as toTitleCase, d as isNumber$1, et as WATCH_FLAGS, f as isObject, h as noop, i as flatOne, j as DIST_LAZY, l as isFunction, m as mergeIntoWith, n as dashToPascalCase, o as isBoolean$1, p as isString$1, u as isIterable, x as unique, y as toDashCase, z as GLOBAL_STYLE } from "./regular-expression-CFVJOTUh.mjs";
4
4
  import { $ as loadTypeScriptDiagnostics, A as isOutputTargetCollection, B as isOutputTargetGlobalStyle, Ct as formatComponentRuntimeMeta, E as getComponentsDtsSrcFilePath, Et as byteSize, F as isOutputTargetDocsCustom, G as isOutputTargetStats, H as isOutputTargetSsr, I as isOutputTargetDocsCustomElementsManifest, J as isValidConfigOutputTarget, K as isOutputTargetTypes, L as isOutputTargetDocsJson, M as isOutputTargetCustom, N as isOutputTargetDistLazy, O as getComponentsFromModules, P as isOutputTargetDocs, Q as loadTypeScriptDiagnostic, R as isOutputTargetDocsReadme, S as ok, St as isGlob, T as filterExcludedComponents, Tt as stringifyRuntimeData, U as isOutputTargetSsrWasm, V as isOutputTargetLoaderBundle, W as isOutputTargetStandalone, Y as relativeImport, Z as augmentDiagnosticWithNode, _ as getSourceMappingUrlForEndOfFile, _t as catchError, a as getTextDocs, at as relative$1, b as err, ct as isRolldownError, d as isTsxFile, dt as normalizeDiagnostics, et as join$2, f as parsePackageJson, ft as splitLineBreaks, g as getInlineSourceMappingUrlLinker, gt as buildWarn, h as isRemoteUrl, ht as buildJsonFileError, i as generatePreamble, it as normalizePath, j as isOutputTargetCopy, k as isOutputTargetAssets, lt as loadRolldownDiagnostics, m as readPackageJson, mt as buildError, n as addDocBlock, nt as normalizeFsPath, o as hasDependency, ot as resolve$2, p as readOnlyArrayHasStringMember, q as isOutputTargetWww, r as createJsVarName, rt as normalizeFsPathQuery, s as isDtsFile, st as createOnWarnFn, t as validateComponentTag, u as isTsFile, vt as hasError, w as filterActiveTargets, x as map, xt as isRootPath, y as rolldownToStencilSourceMap, yt as hasWarning, z as isOutputTargetDocsVscode } from "./validation-ByxKj8bC.mjs";
5
- import { i as CustomElementsExportBehaviorOptions, o as buildEvents, r as createNodeLogger, t as createNodeSys } from "./node-jFf98r0u.mjs";
5
+ import { i as CustomElementsExportBehaviorOptions, o as buildEvents, r as createNodeLogger, t as createNodeSys } from "./node-DKVq_Ud0.mjs";
6
6
  import ts, { default as ts$1 } from "typescript";
7
7
  import { readFileSync } from "node:fs";
8
8
  import { basename, dirname, isAbsolute, join, resolve } from "node:path";
@@ -28,9 +28,9 @@ import { createJiti } from "jiti";
28
28
  import * as process$1 from "process";
29
29
  import { dataToEsm } from "@rollup/pluginutils";
30
30
  //#region src/version.ts
31
- const version = "5.0.0-alpha.17";
32
- const buildId = "1783170414";
33
- const vermoji = "🎨";
31
+ const version = "5.0.0-alpha.19";
32
+ const buildId = "1783462346";
33
+ const vermoji = "🐛";
34
34
  /**
35
35
  * Get the installed version of a tool/dependency.
36
36
  * Handles packages with exports maps that point to subdirectories.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { B as Event, C as setAssetPath, E as setPlatformHelpers, G as State, H as Method, I as AttachInternals, J as Build, K as Watch, L as AttrDeserialize, N as setErrorHandler, R as Component, S as getAssetPath, T as writeTask, U as Prop, V as Listen, W as PropSerialize, a as transformTag, b as getElement, c as Fragment, d as setMode, g as getRenderingRef, h as forceUpdate, i as setTagTransformer, m as h, o as render, p as Host, q as resolveVar, s as Mixin, u as getMode, w as readTask, x as getShadowRoot, z as Element } from "./client-CgXNkftm.mjs";
1
+ import { B as Event, C as setAssetPath, E as setPlatformHelpers, G as State, H as Method, I as AttachInternals, J as Build, K as Watch, L as AttrDeserialize, N as setErrorHandler, R as Component, S as getAssetPath, T as writeTask, U as Prop, V as Listen, W as PropSerialize, a as transformTag, b as getElement, c as Fragment, d as setMode, g as getRenderingRef, h as forceUpdate, i as setTagTransformer, m as h, o as render, p as Host, q as resolveVar, s as Mixin, u as getMode, w as readTask, x as getShadowRoot, z as Element } from "./client-CvcvHKz4.mjs";
2
2
  export { AttachInternals, AttrDeserialize, Build, Component, Element, Event, Fragment, Host, Listen, Method, Mixin, Prop, PropSerialize, State, Watch, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, h, readTask, render, resolveVar, setAssetPath, setErrorHandler, setMode, setPlatformHelpers, setTagTransformer, transformTag, writeTask };
@@ -1,2 +1,2 @@
1
- import { c as Fragment, n as jsxDEV, r as jsxs, t as jsx } from "./client-CgXNkftm.mjs";
1
+ import { c as Fragment, n as jsxDEV, r as jsxs, t as jsx } from "./client-CvcvHKz4.mjs";
2
2
  export { Fragment, jsx, jsxDEV, jsxs };
@@ -1,5 +1,5 @@
1
1
  import { n as __require } from "./chunk-z9aeyW2b.mjs";
2
- import "./client-CgXNkftm.mjs";
2
+ import "./client-CvcvHKz4.mjs";
3
3
  import { h as noop, i as flatOne, l as isFunction, p as isString } from "./regular-expression-CFVJOTUh.mjs";
4
4
  import { St as isGlob, _t as catchError, bt as shouldIgnoreError, it as normalizePath, mt as buildError, pt as TASK_CANCELED_MSG } from "./validation-ByxKj8bC.mjs";
5
5
  import fs from "node:fs";
@@ -4545,17 +4545,30 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4545
4545
  if (styleDesc) {
4546
4546
  Object.defineProperty(ctor, "style", styleDesc);
4547
4547
  const newStyle = NewClass.style;
4548
- if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4548
+ if (newStyle) {
4549
+ const scopeId = getScopeId(cmpMeta);
4550
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4551
+ console.log("[stencil-hmr] registerStyle", {
4552
+ tag: cmpMeta.$tagName$,
4553
+ scopeId,
4554
+ isShadow,
4555
+ cssLen: newStyle.length
4556
+ });
4557
+ registerStyle(scopeId, newStyle, isShadow);
4558
+ }
4549
4559
  }
4550
4560
  }
4561
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4551
4562
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4552
- if (BUILD.hostListener) {
4553
- const hostRef = getHostRef(el);
4554
- if (hostRef?.$rmListeners$) {
4555
- hostRef.$rmListeners$.map((rmListener) => rmListener());
4556
- hostRef.$rmListeners$ = void 0;
4557
- addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4558
- }
4563
+ const hostRef = getHostRef(el);
4564
+ if (BUILD.hostListener && hostRef?.$rmListeners$) {
4565
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
4566
+ hostRef.$rmListeners$ = void 0;
4567
+ addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4568
+ }
4569
+ if (!isShadow && hostRef) {
4570
+ console.log("[stencil-hmr] calling attachStyles for", cmpMeta.$tagName$);
4571
+ attachStyles(hostRef);
4559
4572
  }
4560
4573
  forceUpdate(el);
4561
4574
  });
@@ -4539,17 +4539,30 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4539
4539
  if (styleDesc) {
4540
4540
  Object.defineProperty(ctor, "style", styleDesc);
4541
4541
  const newStyle = NewClass.style;
4542
- if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4542
+ if (newStyle) {
4543
+ const scopeId = getScopeId(cmpMeta);
4544
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4545
+ console.log("[stencil-hmr] registerStyle", {
4546
+ tag: cmpMeta.$tagName$,
4547
+ scopeId,
4548
+ isShadow,
4549
+ cssLen: newStyle.length
4550
+ });
4551
+ registerStyle(scopeId, newStyle, isShadow);
4552
+ }
4543
4553
  }
4544
4554
  }
4555
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4545
4556
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4546
- if (BUILD$1.hostListener) {
4547
- const hostRef = getHostRef(el);
4548
- if (hostRef?.$rmListeners$) {
4549
- hostRef.$rmListeners$.map((rmListener) => rmListener());
4550
- hostRef.$rmListeners$ = void 0;
4551
- addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4552
- }
4557
+ const hostRef = getHostRef(el);
4558
+ if (BUILD$1.hostListener && hostRef?.$rmListeners$) {
4559
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
4560
+ hostRef.$rmListeners$ = void 0;
4561
+ addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4562
+ }
4563
+ if (!isShadow && hostRef) {
4564
+ console.log("[stencil-hmr] calling attachStyles for", cmpMeta.$tagName$);
4565
+ attachStyles(hostRef);
4553
4566
  }
4554
4567
  forceUpdate(el);
4555
4568
  });
@@ -4410,17 +4410,30 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4410
4410
  if (styleDesc) {
4411
4411
  Object.defineProperty(ctor, "style", styleDesc);
4412
4412
  const newStyle = NewClass.style;
4413
- if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4413
+ if (newStyle) {
4414
+ const scopeId = getScopeId(cmpMeta);
4415
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4416
+ console.log("[stencil-hmr] registerStyle", {
4417
+ tag: cmpMeta.$tagName$,
4418
+ scopeId,
4419
+ isShadow,
4420
+ cssLen: newStyle.length
4421
+ });
4422
+ registerStyle(scopeId, newStyle, isShadow);
4423
+ }
4414
4424
  }
4415
4425
  }
4426
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4416
4427
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4417
- if (BUILD.hostListener) {
4418
- const hostRef = getHostRef(el);
4419
- if (hostRef?.$rmListeners$) {
4420
- hostRef.$rmListeners$.map((rmListener) => rmListener());
4421
- hostRef.$rmListeners$ = void 0;
4422
- addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4423
- }
4428
+ const hostRef = getHostRef(el);
4429
+ if (BUILD.hostListener && hostRef?.$rmListeners$) {
4430
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
4431
+ hostRef.$rmListeners$ = void 0;
4432
+ addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4433
+ }
4434
+ if (!isShadow && hostRef) {
4435
+ console.log("[stencil-hmr] calling attachStyles for", cmpMeta.$tagName$);
4436
+ attachStyles(hostRef);
4424
4437
  }
4425
4438
  forceUpdate(el);
4426
4439
  });
@@ -4177,17 +4177,30 @@ const hmrStandalone = async (hostElement, cmpMeta, hmrVersionId) => {
4177
4177
  if (styleDesc) {
4178
4178
  Object.defineProperty(ctor, "style", styleDesc);
4179
4179
  const newStyle = NewClass.style;
4180
- if (newStyle) registerStyle(getScopeId(cmpMeta), newStyle, !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation));
4180
+ if (newStyle) {
4181
+ const scopeId = getScopeId(cmpMeta);
4182
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4183
+ console.log("[stencil-hmr] registerStyle", {
4184
+ tag: cmpMeta.$tagName$,
4185
+ scopeId,
4186
+ isShadow,
4187
+ cssLen: newStyle.length
4188
+ });
4189
+ registerStyle(scopeId, newStyle, isShadow);
4190
+ }
4181
4191
  }
4182
4192
  }
4193
+ const isShadow = !!(cmpMeta.$flags$ & CMP_FLAGS.shadowDomEncapsulation);
4183
4194
  document.querySelectorAll(cmpMeta.$tagName$).forEach((el) => {
4184
- if (BUILD$1.hostListener) {
4185
- const hostRef = getHostRef(el);
4186
- if (hostRef?.$rmListeners$) {
4187
- hostRef.$rmListeners$.map((rmListener) => rmListener());
4188
- hostRef.$rmListeners$ = void 0;
4189
- addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4190
- }
4195
+ const hostRef = getHostRef(el);
4196
+ if (BUILD$1.hostListener && hostRef?.$rmListeners$) {
4197
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
4198
+ hostRef.$rmListeners$ = void 0;
4199
+ addHostEventListeners(el, hostRef, cmpMeta.$listeners$);
4200
+ }
4201
+ if (!isShadow && hostRef) {
4202
+ console.log("[stencil-hmr] calling attachStyles for", cmpMeta.$tagName$);
4203
+ attachStyles(hostRef);
4191
4204
  }
4192
4205
  forceUpdate(el);
4193
4206
  });
@@ -1,2 +1,2 @@
1
- import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-jFf98r0u.mjs";
1
+ import { n as setupNodeProcess, r as createNodeLogger, t as createNodeSys } from "../../node-DKVq_Ud0.mjs";
2
2
  export { createNodeLogger, createNodeSys, setupNodeProcess };
@@ -1,5 +1,5 @@
1
- import { l as createWorkerMessageHandler } from "../../compiler-CXWiPNlE.mjs";
2
- import { t as createNodeSys } from "../../node-jFf98r0u.mjs";
1
+ import { l as createWorkerMessageHandler } from "../../compiler-Du--5G0l.mjs";
2
+ import { t as createNodeSys } from "../../node-DKVq_Ud0.mjs";
3
3
  //#region src/sys/node/node-worker-thread.ts
4
4
  /**
5
5
  * Initialize a worker thread, setting up various machinery for managing
@@ -1,8 +1,8 @@
1
- import { A as HYDRATE_ID, C as setAssetPath, D as DEFAULT_DOC_DATA, F as reWireGetterSetter, M as STENCIL_DOC_DATA, P as getHostRef$1, S as getAssetPath, X as Env, Y as BUILD, _ as insertBefore, b as getElement, c as Fragment, g as getRenderingRef, h as forceUpdate, j as NODE_TYPE, k as HYDRATE_CHILD_ID, l as bootstrapLazy, m as h, p as Host, s as Mixin, u as getMode, v as renderVdom, y as createEvent } from "../client-CgXNkftm.mjs";
1
+ import { A as HYDRATE_ID, C as setAssetPath, D as DEFAULT_DOC_DATA, F as reWireGetterSetter, M as STENCIL_DOC_DATA, P as getHostRef$1, S as getAssetPath, X as Env, Y as BUILD, _ as insertBefore, b as getElement, c as Fragment, g as getRenderingRef, h as forceUpdate, j as NODE_TYPE, k as HYDRATE_CHILD_ID, l as bootstrapLazy, m as h, p as Host, s as Mixin, u as getMode, v as renderVdom, y as createEvent } from "../client-CvcvHKz4.mjs";
2
2
  import { L as EVENT_FLAGS, h as noop, w as CMP_FLAGS } from "../regular-expression-CFVJOTUh.mjs";
3
- import { b as getBuildFeatures, c as createWorkerContext, h as Cache, i as createSystem, o as loadConfig, p as createInMemoryFs, s as createCompiler, v as BuildContext } from "../compiler-CXWiPNlE.mjs";
3
+ import { b as getBuildFeatures, c as createWorkerContext, h as Cache, i as createSystem, o as loadConfig, p as createInMemoryFs, s as createCompiler, v as BuildContext } from "../compiler-Du--5G0l.mjs";
4
4
  import { wt as formatLazyBundleRuntimeMeta } from "../validation-ByxKj8bC.mjs";
5
- import { o as buildEvents } from "../node-jFf98r0u.mjs";
5
+ import { o as buildEvents } from "../node-DKVq_Ud0.mjs";
6
6
  import fs from "node:fs";
7
7
  import path from "node:path";
8
8
  import { fileURLToPath } from "node:url";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "5.0.0-alpha.17",
3
+ "version": "5.0.0-alpha.19",
4
4
  "description": "A Compiler for Web Components and Progressive Web Apps",
5
5
  "keywords": [
6
6
  "components",
@@ -121,9 +121,9 @@
121
121
  "terser": "^5.0.0",
122
122
  "tinyglobby": "^0.2.0",
123
123
  "typescript": ">4.0.0 <7.0.0",
124
- "@stencil/cli": "5.0.0-alpha.17",
125
- "@stencil/dev-server": "5.0.0-alpha.17",
126
- "@stencil/mock-doc": "5.0.0-alpha.17"
124
+ "@stencil/cli": "5.0.0-alpha.19",
125
+ "@stencil/dev-server": "5.0.0-alpha.19",
126
+ "@stencil/mock-doc": "5.0.0-alpha.19"
127
127
  },
128
128
  "devDependencies": {
129
129
  "@ionic/prettier-config": "^4.0.0",