@phatvu/web-component-poc 1.0.1 → 1.0.3

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.
Files changed (30) hide show
  1. package/dist/cjs/{fast-carousel.cjs.entry.js → fast-button_3.cjs.entry.js} +210 -3
  2. package/dist/cjs/{index-C756SOR-.js → index-B2BTpdbN.js} +373 -114
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/web-component-poc.cjs.js +2 -2
  5. package/dist/collection/components/button/button.js +2 -3
  6. package/dist/collection/components/fast-carousel/carousel.js +2 -3
  7. package/dist/components/fast-button.js +1 -1
  8. package/dist/components/fast-carousel.js +1 -1
  9. package/dist/components/index.js +1 -1
  10. package/dist/components/jobs-list-only-ui.js +1 -1
  11. package/dist/components/p-UM9TUfe3.js +1 -0
  12. package/dist/esm/{fast-carousel.entry.js → fast-button_3.entry.js} +209 -4
  13. package/dist/esm/{index-D7_MJBO8.js → index-Dk5CvWmb.js} +373 -114
  14. package/dist/esm/loader.js +3 -3
  15. package/dist/esm/web-component-poc.js +3 -3
  16. package/dist/web-component-poc/p-3d68d559.entry.js +1 -0
  17. package/dist/web-component-poc/p-Dk5CvWmb.js +2 -0
  18. package/dist/web-component-poc/web-component-poc.esm.js +1 -1
  19. package/hydrate/index.js +15 -506
  20. package/hydrate/index.mjs +15 -506
  21. package/package.json +1 -1
  22. package/dist/cjs/fast-button_2.cjs.entry.js +0 -211
  23. package/dist/components/p-Cw2MJ5l2.js +0 -1
  24. package/dist/esm/fast-button_2.entry.js +0 -208
  25. package/dist/web-component-poc/index-xE9n11HX.js.map +0 -1
  26. package/dist/web-component-poc/index.esm.js.map +0 -1
  27. package/dist/web-component-poc/p-0bc6d45d.entry.js +0 -1
  28. package/dist/web-component-poc/p-8ab359cc.entry.js +0 -1
  29. package/dist/web-component-poc/p-D7_MJBO8.js +0 -2
  30. package/dist/web-component-poc/web-component-poc.esm.js.map +0 -1
package/hydrate/index.mjs CHANGED
@@ -130,7 +130,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
130
130
 
131
131
 
132
132
  const NAMESPACE = 'web-component-poc';
133
- const BUILD = /* web-component-poc */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", prop: true, propChangeCallback: false, slotRelocation: true, updatable: true};
133
+ const BUILD = /* web-component-poc */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", prop: true, propChangeCallback: false, shadowDom: false, slotRelocation: true, updatable: true};
134
134
 
135
135
  /*
136
136
  Stencil Hydrate Platform v4.43.2 | MIT Licensed | https://stenciljs.com
@@ -730,21 +730,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
730
730
  var attachStyles = (hostRef) => {
731
731
  const cmpMeta = hostRef.$cmpMeta$;
732
732
  const elm = hostRef.$hostElement$;
733
- const flags = cmpMeta.$flags$;
734
733
  const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
735
- const scopeId2 = addStyle(
736
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
734
+ addStyle(
735
+ elm.getRootNode(),
737
736
  cmpMeta);
738
- if (flags & 10 /* needsScopedEncapsulation */) {
739
- elm["s-sc"] = scopeId2;
740
- elm.classList.add(scopeId2 + "-h");
741
- }
742
737
  endAttachStyles();
743
738
  };
744
739
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
745
-
746
- // src/utils/helpers.ts
747
- var isDef = (v) => v != null && v !== void 0;
748
740
  var isComplexType = (o) => {
749
741
  o = typeof o;
750
742
  return o === "object" || o === "function";
@@ -838,7 +830,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
838
830
  const childRenderNodes = [];
839
831
  const slotNodes = [];
840
832
  const slottedNodes = [];
841
- const shadowRootNodes = shadowRoot ? [] : null;
833
+ const shadowRootNodes = null;
842
834
  const vnode = newVNode(tagName, null);
843
835
  vnode.$elm$ = hostElm;
844
836
  if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
@@ -946,27 +938,6 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
946
938
  currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
947
939
  }
948
940
  }
949
- if (shadowRoot && !shadowRoot.childNodes.length) {
950
- let rnIdex = 0;
951
- const rnLen = shadowRootNodes.length;
952
- if (rnLen) {
953
- for (rnIdex; rnIdex < rnLen; rnIdex++) {
954
- const node = shadowRootNodes[rnIdex];
955
- if (node) {
956
- shadowRoot.appendChild(node);
957
- }
958
- }
959
- Array.from(hostElm.childNodes).forEach((node) => {
960
- if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
961
- if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
962
- node.removeAttribute("hidden");
963
- } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
964
- node.parentNode.removeChild(node);
965
- }
966
- }
967
- });
968
- }
969
- }
970
941
  hostRef.$hostElement$ = hostElm;
971
942
  endHydrate();
972
943
  };
@@ -1019,9 +990,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1019
990
  parentVNode.$children$[childVNode.$index$] = childVNode;
1020
991
  }
1021
992
  parentVNode = childVNode;
1022
- if (shadowRootNodes && childVNode.$depth$ === "0") {
1023
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1024
- }
1025
993
  }
1026
994
  }
1027
995
  if (node.shadowRoot) {
@@ -1080,9 +1048,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1080
1048
  }
1081
1049
  parentVNode.$children$[childVNode.$index$] = childVNode;
1082
1050
  }
1083
- if (shadowRootNodes && childVNode.$depth$ === "0") {
1084
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1085
- }
1086
1051
  }
1087
1052
  } else if (childNodeType === COMMENT_NODE_ID) {
1088
1053
  childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
@@ -1105,9 +1070,7 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1105
1070
  slottedNodes
1106
1071
  );
1107
1072
  } else if (childNodeType === CONTENT_REF_ID) {
1108
- if (shadowRootNodes) {
1109
- node.remove();
1110
- } else {
1073
+ {
1111
1074
  hostElm["s-cr"] = node;
1112
1075
  node["s-cn"] = true;
1113
1076
  }
@@ -1169,22 +1132,7 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1169
1132
  childVNode.$name$ = slotName || null;
1170
1133
  childVNode.$tag$ = "slot";
1171
1134
  const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1172
- if (shadowRootNodes && win.document) {
1173
- const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1174
- if (childVNode.$name$) {
1175
- childVNode.$elm$.setAttribute("name", slotName);
1176
- }
1177
- if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
1178
- internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1179
- } else {
1180
- internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1181
- }
1182
- addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1183
- node.remove();
1184
- if (childVNode.$depth$ === "0") {
1185
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1186
- }
1187
- } else {
1135
+ {
1188
1136
  const slot = childVNode.$elm$;
1189
1137
  const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1190
1138
  addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
@@ -1221,417 +1169,6 @@ var findCorrespondingNode = (node, type) => {
1221
1169
  return sibling;
1222
1170
  };
1223
1171
 
1224
- // src/utils/regular-expression.ts
1225
- var escapeRegExpSpecialCharacters = (text) => {
1226
- return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1227
- };
1228
-
1229
- // src/utils/shadow-css.ts
1230
- /**
1231
- * @license
1232
- * Copyright Google Inc. All Rights Reserved.
1233
- *
1234
- * Use of this source code is governed by an MIT-style license that can be
1235
- * found in the LICENSE file at https://angular.io/license
1236
- *
1237
- * This file is a port of shadowCSS from `webcomponents.js` to TypeScript.
1238
- * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
1239
- * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
1240
- */
1241
- var safeSelector = (selector) => {
1242
- const placeholders = [];
1243
- let index = 0;
1244
- selector = selector.replace(/(\[\s*part~=\s*("[^"]*"|'[^']*')\s*\])/g, (_, keep) => {
1245
- const replaceBy = `__part-${index}__`;
1246
- placeholders.push(keep);
1247
- index++;
1248
- return replaceBy;
1249
- });
1250
- selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
1251
- const replaceBy = `__ph-${index}__`;
1252
- placeholders.push(keep);
1253
- index++;
1254
- return replaceBy;
1255
- });
1256
- const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
1257
- const replaceBy = `__ph-${index}__`;
1258
- placeholders.push(exp);
1259
- index++;
1260
- return pseudo + replaceBy;
1261
- });
1262
- const ss = {
1263
- content,
1264
- placeholders
1265
- };
1266
- return ss;
1267
- };
1268
- var restoreSafeSelector = (placeholders, content) => {
1269
- content = content.replace(/__part-(\d+)__/g, (_, index) => placeholders[+index]);
1270
- return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
1271
- };
1272
- var _polyfillHost = "-shadowcsshost";
1273
- var _polyfillSlotted = "-shadowcssslotted";
1274
- var _polyfillHostContext = "-shadowcsscontext";
1275
- var _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
1276
- var _cssColonHostRe = new RegExp("(" + _polyfillHost + _parenSuffix, "gim");
1277
- var _cssColonHostContextRe = new RegExp("(" + _polyfillHostContext + _parenSuffix, "gim");
1278
- var _cssColonSlottedRe = new RegExp("(" + _polyfillSlotted + _parenSuffix, "gim");
1279
- var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
1280
- var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
1281
- var _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
1282
- var _safePartRe = /__part-(\d+)__/g;
1283
- var _selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$";
1284
- var _polyfillHostRe = /-shadowcsshost/gim;
1285
- var createSupportsRuleRe = (selector) => {
1286
- const safeSelector2 = escapeRegExpSpecialCharacters(selector);
1287
- return new RegExp(
1288
- // First capture group: match any context before the selector that's not inside @supports selector()
1289
- // Using negative lookahead to avoid matching inside @supports selector(...) condition
1290
- `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
1291
- "g"
1292
- );
1293
- };
1294
- var _commentRe = /\/\*\s*[\s\S]*?\*\//g;
1295
- var stripComments = (input) => {
1296
- return input.replace(_commentRe, "");
1297
- };
1298
- var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
1299
- var extractCommentsWithHash = (input) => {
1300
- return input.match(_commentWithHashRe) || [];
1301
- };
1302
- var _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
1303
- var _curlyRe = /([{}])/g;
1304
- var _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
1305
- var OPEN_CURLY = "{";
1306
- var CLOSE_CURLY = "}";
1307
- var BLOCK_PLACEHOLDER = "%BLOCK%";
1308
- var processRules = (input, ruleCallback) => {
1309
- const inputWithEscapedBlocks = escapeBlocks(input);
1310
- let nextBlockIndex = 0;
1311
- return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
1312
- const selector = m[2];
1313
- let content = "";
1314
- let suffix = m[4];
1315
- let contentPrefix = "";
1316
- if (suffix && suffix.startsWith("{" + BLOCK_PLACEHOLDER)) {
1317
- content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
1318
- suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
1319
- contentPrefix = "{";
1320
- }
1321
- const cssRule = {
1322
- selector,
1323
- content
1324
- };
1325
- const rule = ruleCallback(cssRule);
1326
- return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
1327
- });
1328
- };
1329
- var escapeBlocks = (input) => {
1330
- const inputParts = input.split(_curlyRe);
1331
- const resultParts = [];
1332
- const escapedBlocks = [];
1333
- let bracketCount = 0;
1334
- let currentBlockParts = [];
1335
- for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
1336
- const part = inputParts[partIndex];
1337
- if (part === CLOSE_CURLY) {
1338
- bracketCount--;
1339
- }
1340
- if (bracketCount > 0) {
1341
- currentBlockParts.push(part);
1342
- } else {
1343
- if (currentBlockParts.length > 0) {
1344
- escapedBlocks.push(currentBlockParts.join(""));
1345
- resultParts.push(BLOCK_PLACEHOLDER);
1346
- currentBlockParts = [];
1347
- }
1348
- resultParts.push(part);
1349
- }
1350
- if (part === OPEN_CURLY) {
1351
- bracketCount++;
1352
- }
1353
- }
1354
- if (currentBlockParts.length > 0) {
1355
- escapedBlocks.push(currentBlockParts.join(""));
1356
- resultParts.push(BLOCK_PLACEHOLDER);
1357
- }
1358
- const strEscapedBlocks = {
1359
- escapedString: resultParts.join(""),
1360
- blocks: escapedBlocks
1361
- };
1362
- return strEscapedBlocks;
1363
- };
1364
- var insertPolyfillHostInCssText = (cssText) => {
1365
- const supportsBlocks = [];
1366
- cssText = cssText.replace(/@supports\s+selector\s*\(\s*([^)]*)\s*\)/g, (_, selectorContent) => {
1367
- const placeholder = `__supports_${supportsBlocks.length}__`;
1368
- supportsBlocks.push(selectorContent);
1369
- return `@supports selector(${placeholder})`;
1370
- });
1371
- const _colonSlottedRe = createSupportsRuleRe("::slotted");
1372
- const _colonHostRe = createSupportsRuleRe(":host");
1373
- const _colonHostContextRe = createSupportsRuleRe(":host-context");
1374
- cssText = cssText.replace(_colonHostContextRe, `$1${_polyfillHostContext}`).replace(_colonHostRe, `$1${_polyfillHost}`).replace(_colonSlottedRe, `$1${_polyfillSlotted}`);
1375
- supportsBlocks.forEach((originalSelector, index) => {
1376
- cssText = cssText.replace(`__supports_${index}__`, originalSelector);
1377
- });
1378
- return cssText;
1379
- };
1380
- var convertColonRule = (cssText, regExp, partReplacer) => {
1381
- return cssText.replace(regExp, (...m) => {
1382
- if (m[2]) {
1383
- const parts = m[2].split(",");
1384
- const r = [];
1385
- for (let i2 = 0; i2 < parts.length; i2++) {
1386
- const p = parts[i2].trim();
1387
- if (!p) break;
1388
- r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
1389
- }
1390
- return r.join(",");
1391
- } else {
1392
- return _polyfillHostNoCombinator + m[3];
1393
- }
1394
- });
1395
- };
1396
- var colonHostPartReplacer = (host, part, suffix) => {
1397
- return host + part.replace(_polyfillHost, "") + suffix;
1398
- };
1399
- var convertColonHost = (cssText) => {
1400
- return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
1401
- };
1402
- var colonHostContextPartReplacer = (host, part, suffix) => {
1403
- if (part.indexOf(_polyfillHost) > -1) {
1404
- return colonHostPartReplacer(host, part, suffix);
1405
- } else {
1406
- return host + part + suffix + ", " + part + " " + host + suffix;
1407
- }
1408
- };
1409
- var convertColonSlotted = (cssText, slotScopeId) => {
1410
- const slotClass = "." + slotScopeId + " > ";
1411
- const selectors = [];
1412
- cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
1413
- if (m[2]) {
1414
- const compound = m[2].trim();
1415
- const suffix = m[3];
1416
- const slottedSelector = slotClass + compound + suffix;
1417
- let prefixSelector = "";
1418
- for (let i2 = m[4] - 1; i2 >= 0; i2--) {
1419
- const char = m[5][i2];
1420
- if (char === "}" || char === ",") {
1421
- break;
1422
- }
1423
- prefixSelector = char + prefixSelector;
1424
- }
1425
- const orgSelector = (prefixSelector + slottedSelector).trim();
1426
- const addedSelector = `${prefixSelector.trimEnd()}${slottedSelector.trim()}`.trim();
1427
- if (orgSelector !== addedSelector) {
1428
- const updatedSelector = `${addedSelector}, ${orgSelector}`;
1429
- selectors.push({
1430
- orgSelector,
1431
- updatedSelector
1432
- });
1433
- }
1434
- return slottedSelector;
1435
- } else {
1436
- return _polyfillHostNoCombinator + m[3];
1437
- }
1438
- });
1439
- return {
1440
- selectors,
1441
- cssText
1442
- };
1443
- };
1444
- var convertColonHostContext = (cssText) => {
1445
- return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
1446
- };
1447
- var convertShadowDOMSelectors = (cssText) => {
1448
- return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, " "), cssText);
1449
- };
1450
- var makeScopeMatcher = (scopeSelector2) => {
1451
- const lre = /\[/g;
1452
- const rre = /\]/g;
1453
- scopeSelector2 = scopeSelector2.replace(lre, "\\[").replace(rre, "\\]");
1454
- return new RegExp("^(" + scopeSelector2 + ")" + _selectorReSuffix, "m");
1455
- };
1456
- var selectorNeedsScoping = (selector, scopeSelector2) => {
1457
- const re = makeScopeMatcher(scopeSelector2);
1458
- return !re.test(selector);
1459
- };
1460
- var injectScopingSelector = (selector, scopingSelector) => {
1461
- return selector.replace(_selectorPartsRe, (_, before = "", _colonGroup, colon = "", after = "") => {
1462
- return before + scopingSelector + colon + after;
1463
- });
1464
- };
1465
- var applySimpleSelectorScope = (selector, scopeSelector2, hostSelector) => {
1466
- _polyfillHostRe.lastIndex = 0;
1467
- if (_polyfillHostRe.test(selector)) {
1468
- const replaceBy = `.${hostSelector}`;
1469
- return selector.replace(_polyfillHostNoCombinatorRe, (_, selector2) => injectScopingSelector(selector2, replaceBy)).replace(_polyfillHostRe, replaceBy + " ");
1470
- }
1471
- return scopeSelector2 + " " + selector;
1472
- };
1473
- var applyStrictSelectorScope = (selector, scopeSelector2, hostSelector) => {
1474
- const isRe = /\[is=([^\]]*)\]/g;
1475
- scopeSelector2 = scopeSelector2.replace(isRe, (_, ...parts) => parts[0]);
1476
- const className = "." + scopeSelector2;
1477
- const _scopeSelectorPart = (p) => {
1478
- let scopedP = p.trim();
1479
- if (!scopedP) {
1480
- return "";
1481
- }
1482
- if (p.indexOf(_polyfillHostNoCombinator) > -1) {
1483
- scopedP = applySimpleSelectorScope(p, scopeSelector2, hostSelector);
1484
- } else {
1485
- const t = p.replace(_polyfillHostRe, "");
1486
- if (t.length > 0) {
1487
- scopedP = injectScopingSelector(t, className);
1488
- }
1489
- }
1490
- return scopedP;
1491
- };
1492
- const safeContent = safeSelector(selector);
1493
- selector = safeContent.content;
1494
- let scopedSelector = "";
1495
- let startIndex = 0;
1496
- let res;
1497
- const sep2 = /( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g;
1498
- const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
1499
- let shouldScope = !hasHost;
1500
- while ((res = sep2.exec(selector)) !== null) {
1501
- const separator = res[1];
1502
- const part2 = selector.slice(startIndex, res.index).trim();
1503
- shouldScope = shouldScope || part2.indexOf(_polyfillHostNoCombinator) > -1;
1504
- const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
1505
- scopedSelector += `${scopedPart} ${separator} `;
1506
- startIndex = sep2.lastIndex;
1507
- }
1508
- const part = selector.substring(startIndex);
1509
- shouldScope = !part.match(_safePartRe) && (shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1);
1510
- scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
1511
- return restoreSafeSelector(safeContent.placeholders, scopedSelector);
1512
- };
1513
- var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
1514
- return selector.split(",").map((shallowPart) => {
1515
- if (slotSelector && shallowPart.indexOf("." + slotSelector) > -1) {
1516
- return shallowPart.trim();
1517
- }
1518
- if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
1519
- return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
1520
- } else {
1521
- return shallowPart.trim();
1522
- }
1523
- }).join(", ");
1524
- };
1525
- var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
1526
- return processRules(cssText, (rule) => {
1527
- let selector = rule.selector;
1528
- let content = rule.content;
1529
- if (rule.selector[0] !== "@") {
1530
- selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
1531
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
1532
- content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
1533
- }
1534
- const cssRule = {
1535
- selector: selector.replace(/\s{2,}/g, " ").trim(),
1536
- content
1537
- };
1538
- return cssRule;
1539
- });
1540
- };
1541
- var scopeCssText = (cssText, scopeId2, hostScopeId, slotScopeId, commentOriginalSelector) => {
1542
- cssText = insertPolyfillHostInCssText(cssText);
1543
- cssText = convertColonHost(cssText);
1544
- cssText = convertColonHostContext(cssText);
1545
- const slotted = convertColonSlotted(cssText, slotScopeId);
1546
- cssText = slotted.cssText;
1547
- cssText = convertShadowDOMSelectors(cssText);
1548
- if (scopeId2) {
1549
- cssText = scopeSelectors(cssText, scopeId2, hostScopeId, slotScopeId);
1550
- }
1551
- cssText = replaceShadowCssHost(cssText, hostScopeId);
1552
- cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ");
1553
- return {
1554
- cssText: cssText.trim(),
1555
- // We need to replace the shadow CSS host string in each of these selectors since we created
1556
- // them prior to the replacement happening in the components CSS text.
1557
- slottedSelectors: slotted.selectors.map((ref) => ({
1558
- orgSelector: replaceShadowCssHost(ref.orgSelector, hostScopeId),
1559
- updatedSelector: replaceShadowCssHost(ref.updatedSelector, hostScopeId)
1560
- }))
1561
- };
1562
- };
1563
- var replaceShadowCssHost = (cssText, hostScopeId) => {
1564
- return cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
1565
- };
1566
- var expandPartSelectors = (cssText) => {
1567
- const partSelectorRe = /([^\s,{][^,{]*?)::part\(\s*([^)]+?)\s*\)((?:[:.][^,{]*)*)/g;
1568
- return processRules(cssText, (rule) => {
1569
- if (rule.selector[0] === "@") {
1570
- return rule;
1571
- }
1572
- const selectors = rule.selector.split(",").map((sel) => {
1573
- const out = [sel.trim()];
1574
- let m;
1575
- while ((m = partSelectorRe.exec(sel)) !== null) {
1576
- const before = m[1].trimEnd();
1577
- const partNames = m[2].trim().split(/\s+/);
1578
- const after = m[3] || "";
1579
- const partAttr = partNames.flatMap((p) => {
1580
- if (!rule.selector.includes(`[part~="${p}"]`)) {
1581
- return [`[part~="${p}"]`];
1582
- }
1583
- return [];
1584
- }).join("");
1585
- const expanded = `${before} ${partAttr}${after}`;
1586
- if (!!partAttr && expanded !== sel.trim()) {
1587
- out.push(expanded);
1588
- }
1589
- }
1590
- return out.join(", ");
1591
- });
1592
- rule.selector = selectors.join(", ");
1593
- return rule;
1594
- });
1595
- };
1596
- var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
1597
- const hostScopeId = scopeId2 + "-h";
1598
- const slotScopeId = scopeId2 + "-s";
1599
- const commentsWithHash = extractCommentsWithHash(cssText);
1600
- cssText = stripComments(cssText);
1601
- const orgSelectors = [];
1602
- {
1603
- const processCommentedSelector = (rule) => {
1604
- const placeholder = `/*!@___${orgSelectors.length}___*/`;
1605
- const comment = `/*!@${rule.selector}*/`;
1606
- orgSelectors.push({ placeholder, comment });
1607
- rule.selector = placeholder + rule.selector;
1608
- return rule;
1609
- };
1610
- cssText = processRules(cssText, (rule) => {
1611
- if (rule.selector[0] !== "@") {
1612
- return processCommentedSelector(rule);
1613
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
1614
- rule.content = processRules(rule.content, processCommentedSelector);
1615
- return rule;
1616
- }
1617
- return rule;
1618
- });
1619
- }
1620
- const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId);
1621
- cssText = [scoped.cssText, ...commentsWithHash].join("\n");
1622
- {
1623
- orgSelectors.forEach(({ placeholder, comment }) => {
1624
- cssText = cssText.replace(placeholder, comment);
1625
- });
1626
- }
1627
- scoped.slottedSelectors.forEach((slottedSelector) => {
1628
- const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector) + "(?=\\s*[,{]|$)", "g");
1629
- cssText = cssText.replace(regex, slottedSelector.updatedSelector);
1630
- });
1631
- cssText = expandPartSelectors(cssText);
1632
- return cssText;
1633
- };
1634
-
1635
1172
  // src/utils/remote-value.ts
1636
1173
  var RemoteValue = class _RemoteValue {
1637
1174
  /**
@@ -1961,9 +1498,6 @@ function sortedAttrNames(attrNames) {
1961
1498
  attrNames
1962
1499
  );
1963
1500
  }
1964
-
1965
- // src/runtime/vdom/vdom-render.ts
1966
- var scopeId;
1967
1501
  var contentRef;
1968
1502
  var hostTagName;
1969
1503
  var useNativeShadowDom = false;
@@ -2018,9 +1552,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2018
1552
  {
2019
1553
  updateElement(null, newVNode2, isSvgMode);
2020
1554
  }
2021
- if (isDef(scopeId) && elm["s-si"] !== scopeId) {
2022
- elm.classList.add(elm["s-si"] = scopeId);
2023
- }
2024
1555
  if (newVNode2.$children$) {
2025
1556
  const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
2026
1557
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
@@ -2106,9 +1637,6 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
2106
1637
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
2107
1638
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
2108
1639
  let childNode;
2109
- if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
2110
- containerElm = containerElm.shadowRoot;
2111
- }
2112
1640
  if (parentVNode.$tag$ === "template") {
2113
1641
  containerElm = containerElm.content;
2114
1642
  }
@@ -2422,11 +1950,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2422
1950
  rootVnode.$tag$ = null;
2423
1951
  rootVnode.$flags$ |= 4 /* isHost */;
2424
1952
  hostRef.$vnode$ = rootVnode;
2425
- rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
2426
- {
2427
- scopeId = hostElm["s-sc"];
2428
- }
2429
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1953
+ rootVnode.$elm$ = oldVNode.$elm$ = hostElm;
1954
+ useNativeShadowDom = supportsShadow;
2430
1955
  {
2431
1956
  contentRef = hostElm["s-cr"];
2432
1957
  checkSlotFallbackVisibility = false;
@@ -2884,13 +2409,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2884
2409
  const scopeId2 = getScopeId(cmpMeta);
2885
2410
  if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
2886
2411
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2887
- {
2888
- if (cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */) {
2889
- style = scopeCss(style, scopeId2);
2890
- } else if (needsScopedSSR()) {
2891
- style = expandPartSelectors(style);
2892
- }
2893
- }
2894
2412
  registerStyle(scopeId2, style);
2895
2413
  endRegisterStyles();
2896
2414
  }
@@ -2935,10 +2453,6 @@ var connectedCallback = (elm) => {
2935
2453
  {
2936
2454
  hostId = elm.getAttribute(HYDRATE_ID);
2937
2455
  if (hostId) {
2938
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2939
- const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
2940
- elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2941
- }
2942
2456
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2943
2457
  }
2944
2458
  }
@@ -4651,7 +4165,6 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
4651
4165
  const orgDocumentCreateElement = win2.document.createElement;
4652
4166
  const orgDocumentCreateElementNS = win2.document.createElementNS;
4653
4167
  const resolved2 = Promise.resolve();
4654
- setScopedSSR(opts);
4655
4168
  let tmrId;
4656
4169
  let ranCompleted = false;
4657
4170
  function hydratedComplete() {
@@ -4981,6 +4494,7 @@ var plt = {
4981
4494
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
4982
4495
  ce: (eventName, opts) => new win.CustomEvent(eventName, opts)
4983
4496
  };
4497
+ var supportsShadow = BUILD.shadowDom;
4984
4498
  var getHostRef = (ref) => {
4985
4499
  if (ref.__stencil__getHostRef) {
4986
4500
  return ref.__stencil__getHostRef();
@@ -5014,11 +4528,6 @@ var registerHost = (elm, cmpMeta) => {
5014
4528
  return hostRef;
5015
4529
  };
5016
4530
  var styles = /* @__PURE__ */ new Map();
5017
- var setScopedSSR = (opts) => {
5018
- scopedSSR = opts.serializeShadowRoot !== false && opts.serializeShadowRoot !== "declarative-shadow-dom";
5019
- };
5020
- var needsScopedSSR = () => scopedSSR;
5021
- var scopedSSR = false;
5022
4531
 
5023
4532
  function isNumber(subject) {
5024
4533
  return typeof subject === 'number';
@@ -6913,17 +6422,17 @@ class AppCarousel {
6913
6422
  render() {
6914
6423
  const itemsArray = this.getItemsArray();
6915
6424
  const useItems = itemsArray !== undefined && itemsArray.length > 0;
6916
- return (hAsync("div", { key: '313c58e9c1ea3b9c0d0fd4b9d6354336682d9353', class: `carousel ${this.class || ''}`.trim() }, hAsync("div", { key: '14ad75526a24ed38df053fa221e2fafef6d532ed', class: `carousel__viewport ${this.slideClass || ''}`.trim(), ref: (el) => (this.viewportRef = el) }, hAsync("div", { key: '1d3a771598c382592b789289494f2439fea56918', class: "carousel__container", ref: (el) => (this.containerRef = el) }, useItems && itemsArray
6425
+ return (hAsync("div", { key: '3a2ea6c339bf0fe656e5a333789df7a37156b5dc', class: `carousel ${this.class || ''}`.trim() }, hAsync("div", { key: '0a73b925095ae3188e5e40b024bc250e4c183894', class: `carousel__viewport ${this.slideClass || ''}`.trim(), ref: (el) => (this.viewportRef = el) }, hAsync("div", { key: '7fc3b5a72e386f7fa21702aeb363e08da1b728cf', class: "carousel__container", ref: (el) => (this.containerRef = el) }, useItems && itemsArray
6917
6426
  ? itemsArray.map((item, i) => (hAsync("div", { key: i, class: `carousel__slide ${this.itemClass || ''}`.trim() }, typeof item === 'object' &&
6918
6427
  item !== null &&
6919
6428
  'content' in item
6920
6429
  ? item.content
6921
6430
  : String(item))))
6922
- : null)), !useItems && (hAsync("div", { key: 'cdecd3275ac3c5ffe7a0f46153d3e59ad0d4ba9d', style: { display: 'none' }, "aria-hidden": "true" }, hAsync("slot", { key: '450dd5b90f20166a4d6ef4a0d46d208ad47bbf4b', ref: (el) => (this.slotRef = el) }))), hAsync("div", { key: 'ad4eab3f45204170308d8021799d227eaff36d71', class: `carousel__controls ${this.controlClass || ''}`.trim() }, hAsync("button", { key: '1a4ef7209ea768a55892f4d928da3f6100faab4b', type: "button", "aria-label": "Previous", class: "carousel__prev", ref: (el) => (this.prevBtnRef = el) }, hAsync("svg", { key: '7d579cb030149947791db565bc1520ef2707c360', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, hAsync("path", { key: 'fdca1a876d4967c39286bddba6122351fbf0d925', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }))), hAsync("div", { key: '4d9a30f1988f2ce04f271967f1dd39c5287273f2', class: "carousel__dots", ref: (el) => (this.dotsRef = el) }), hAsync("button", { key: 'c8bc7787821f3277c6d038e3ff1240b3ce936825', type: "button", "aria-label": "Next", class: "carousel__next", ref: (el) => (this.nextBtnRef = el) }, hAsync("svg", { key: 'e6e4eff954b1b08711cc843de558e00a8257e9f8', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, hAsync("path", { key: '37b394093f327bdc46f8da1dcf78ec609a585a0a', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }))))));
6431
+ : null)), !useItems && (hAsync("div", { key: 'dee2fc91470728c136c9853cd74ae350ad3c5676', style: { display: 'none' }, "aria-hidden": "true" }, hAsync("slot", { key: '35dd47c03a1b9b6b73d845252c3d0482590f7da2', ref: (el) => (this.slotRef = el) }))), hAsync("div", { key: 'df639ad86ae8533f1dc15eed30afb70d99e36e1a', class: `carousel__controls ${this.controlClass || ''}`.trim() }, hAsync("button", { key: 'c17c0ea9bf023b5d2621e558c957d92b13425584', type: "button", "aria-label": "Previous", class: "carousel__prev", ref: (el) => (this.prevBtnRef = el) }, hAsync("svg", { key: '5125abcae0b08ee72106d511b4c24c2d0f24187b', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, hAsync("path", { key: '9b7f28be56f451ad14de226d7163a5587a1cd9e6', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }))), hAsync("div", { key: '9939d3496092a3f319efac9132cec8097c83b497', class: "carousel__dots", ref: (el) => (this.dotsRef = el) }), hAsync("button", { key: 'a0b1228f6df0065885f1d272386283926e78464b', type: "button", "aria-label": "Next", class: "carousel__next", ref: (el) => (this.nextBtnRef = el) }, hAsync("svg", { key: 'e00c92cc0485f41a30e97d5d0466aaee48a64998', class: "carousel__icon", "stroke-width": "1.5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true" }, hAsync("path", { key: 'a35c46fdbd1cd333d3e6f76590f45dd837546165', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }))))));
6923
6432
  }
6924
6433
  static get style() { return carouselCss(); }
6925
6434
  static get cmpMeta() { return {
6926
- "$flags$": 777,
6435
+ "$flags$": 772,
6927
6436
  "$tagName$": "fast-carousel",
6928
6437
  "$members$": {
6929
6438
  "items": [1],
@@ -6975,15 +6484,15 @@ class CustomButton {
6975
6484
  this.buttonClick.emit(e);
6976
6485
  };
6977
6486
  render() {
6978
- return (hAsync("button", { key: 'b373f44e11e651d0371ce3cade98b4650ccdd727', type: this.type, class: {
6487
+ return (hAsync("button", { key: '3b74909afe4e305dfd38f0b07657202e3d5bfccd', type: this.type, class: {
6979
6488
  'custom-button': true,
6980
6489
  [`custom-button--${this.variant}`]: true,
6981
6490
  'custom-button--disabled': this.disabled,
6982
- }, disabled: this.disabled, onClick: this.handleClick }, hAsync("slot", { key: '2a046bc70af051c04f4549def87dac7044b41e04' })));
6491
+ }, disabled: this.disabled, onClick: this.handleClick }, hAsync("slot", { key: '49845d350e4665c5c66e30bd9262f788eaaa1e20' })));
6983
6492
  }
6984
6493
  static get style() { return buttonCss(); }
6985
6494
  static get cmpMeta() { return {
6986
- "$flags$": 777,
6495
+ "$flags$": 772,
6987
6496
  "$tagName$": "fast-button",
6988
6497
  "$members$": {
6989
6498
  "variant": [1],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phatvu/web-component-poc",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",