@ppg_pl/tinting 0.0.5 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-0a139db0.js → index-b6962659.js} +51 -4
- package/dist/cjs/index-b6962659.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/modal-header_9.cjs.entry.js +165 -41
- package/dist/cjs/modal-header_9.cjs.entry.js.map +1 -1
- package/dist/cjs/tinting.cjs.js +2 -2
- package/dist/collection/components/colorbox/index.js +18 -1
- package/dist/collection/components/colorbox/index.js.map +1 -1
- package/dist/collection/components/colorinfo/index.js +128 -1
- package/dist/collection/components/colorinfo/index.js.map +1 -1
- package/dist/collection/components/component/index.js +64 -1
- package/dist/collection/components/component/index.js.map +1 -1
- package/dist/collection/components/modal/index.css +176 -1
- package/dist/collection/components/modal/index.js +50 -2
- package/dist/collection/components/modal/index.js.map +1 -1
- package/dist/collection/components/slider/index.css +24 -6
- package/dist/collection/components/slider/index.js +32 -21
- package/dist/collection/components/slider/index.js.map +1 -1
- package/dist/collection/types.js.map +1 -1
- package/dist/collection/utils/index.js +17 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/index10.js +4934 -3598
- package/dist/components/index10.js.map +1 -1
- package/dist/components/index11.js +3989 -0
- package/dist/components/index11.js.map +1 -0
- package/dist/components/index4.js +2 -13
- package/dist/components/index4.js.map +1 -1
- package/dist/components/index6.js +28 -27
- package/dist/components/index6.js.map +1 -1
- package/dist/components/index7.js +9 -53
- package/dist/components/index7.js.map +1 -1
- package/dist/components/index8.js +57 -52
- package/dist/components/index8.js.map +1 -1
- package/dist/components/index9.js +124 -5272
- package/dist/components/index9.js.map +1 -1
- package/dist/components/my-backdrop.js +1 -1
- package/dist/components/my-colorbox.js +1 -1
- package/dist/components/my-colorinfo.js +1 -1
- package/dist/components/my-component.js +18 -7
- package/dist/components/my-component.js.map +1 -1
- package/dist/components/my-modal.js +1 -1
- package/dist/components/my-slider.js +1 -1
- package/dist/esm/{index-f3be6531.js → index-cb79645d.js} +51 -4
- package/dist/esm/index-cb79645d.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/modal-header_9.entry.js +165 -41
- package/dist/esm/modal-header_9.entry.js.map +1 -1
- package/dist/esm/tinting.js +3 -3
- package/dist/tinting/p-2730a042.entry.js +15 -0
- package/dist/tinting/p-2730a042.entry.js.map +1 -0
- package/dist/tinting/p-5b9dc044.js +3 -0
- package/dist/tinting/p-5b9dc044.js.map +1 -0
- package/dist/tinting/tinting.esm.js +1 -1
- package/dist/tinting/tinting.esm.js.map +1 -1
- package/dist/types/components/colorbox/index.d.ts +3 -0
- package/dist/types/components/colorinfo/index.d.ts +17 -1
- package/dist/types/components/component/index.d.ts +8 -0
- package/dist/types/components/modal/index.d.ts +6 -1
- package/dist/types/components.d.ts +16 -2
- package/dist/types/types.d.ts +4 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/package.json +3 -2
- package/www/build/p-2730a042.entry.js +15 -0
- package/www/build/p-2730a042.entry.js.map +1 -0
- package/www/build/p-5b9dc044.js +3 -0
- package/www/build/p-5b9dc044.js.map +1 -0
- package/www/build/tinting.esm.js +1 -1
- package/www/build/tinting.esm.js.map +1 -1
- package/www/index.html +76 -12
- package/dist/cjs/index-0a139db0.js.map +0 -1
- package/dist/esm/index-f3be6531.js.map +0 -1
- package/dist/tinting/p-398633de.entry.js +0 -15
- package/dist/tinting/p-398633de.entry.js.map +0 -1
- package/dist/tinting/p-b135c76f.js +0 -3
- package/dist/tinting/p-b135c76f.js.map +0 -1
- package/www/build/p-398633de.entry.js +0 -15
- package/www/build/p-398633de.entry.js.map +0 -1
- package/www/build/p-b135c76f.js +0 -3
- package/www/build/p-b135c76f.js.map +0 -1
|
@@ -31,6 +31,7 @@ const NAMESPACE = 'tinting';
|
|
|
31
31
|
* Modified for Stencil's renderer and slot projection
|
|
32
32
|
*/
|
|
33
33
|
let scopeId;
|
|
34
|
+
let hostTagName;
|
|
34
35
|
let isSvgMode = false;
|
|
35
36
|
let queuePending = false;
|
|
36
37
|
const getAssetPath = (path) => {
|
|
@@ -60,6 +61,11 @@ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
|
60
61
|
* Don't add values to these!!
|
|
61
62
|
*/
|
|
62
63
|
const EMPTY_OBJ = {};
|
|
64
|
+
/**
|
|
65
|
+
* Namespaces
|
|
66
|
+
*/
|
|
67
|
+
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
68
|
+
const HTML_NS = 'http://www.w3.org/1999/xhtml';
|
|
63
69
|
const isDef = (v) => v != null;
|
|
64
70
|
/**
|
|
65
71
|
* Check whether a value is a 'complex type', defined here as an object or a
|
|
@@ -375,7 +381,7 @@ const attachStyles = (hostRef) => {
|
|
|
375
381
|
const elm = hostRef.$hostElement$;
|
|
376
382
|
const flags = cmpMeta.$flags$;
|
|
377
383
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
378
|
-
const scopeId = addStyle(elm.getRootNode(), cmpMeta);
|
|
384
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
379
385
|
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
380
386
|
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
381
387
|
// only required when we're NOT using native shadow dom (slot)
|
|
@@ -561,8 +567,15 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
561
567
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
562
568
|
}
|
|
563
569
|
else {
|
|
570
|
+
if (!isSvgMode) {
|
|
571
|
+
isSvgMode = newVNode.$tag$ === 'svg';
|
|
572
|
+
}
|
|
564
573
|
// create element
|
|
565
|
-
elm = newVNode.$elm$ = (doc.
|
|
574
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
|
|
575
|
+
);
|
|
576
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
577
|
+
isSvgMode = false;
|
|
578
|
+
}
|
|
566
579
|
// add css classes, attrs, props, listeners, etc.
|
|
567
580
|
{
|
|
568
581
|
updateElement(null, newVNode, isSvgMode);
|
|
@@ -583,6 +596,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
583
596
|
}
|
|
584
597
|
}
|
|
585
598
|
}
|
|
599
|
+
{
|
|
600
|
+
if (newVNode.$tag$ === 'svg') {
|
|
601
|
+
// Only reset the SVG context when we're exiting <svg> element
|
|
602
|
+
isSvgMode = false;
|
|
603
|
+
}
|
|
604
|
+
else if (elm.tagName === 'foreignObject') {
|
|
605
|
+
// Reenter SVG context when we're exiting <foreignObject> element
|
|
606
|
+
isSvgMode = true;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
586
609
|
}
|
|
587
610
|
return elm;
|
|
588
611
|
};
|
|
@@ -604,6 +627,9 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
604
627
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
605
628
|
let containerElm = (parentElm);
|
|
606
629
|
let childNode;
|
|
630
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
631
|
+
containerElm = containerElm.shadowRoot;
|
|
632
|
+
}
|
|
607
633
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
608
634
|
if (vnodes[startIdx]) {
|
|
609
635
|
childNode = createElm(null, parentVNode, startIdx);
|
|
@@ -885,8 +911,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
885
911
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
886
912
|
const oldChildren = oldVNode.$children$;
|
|
887
913
|
const newChildren = newVNode.$children$;
|
|
914
|
+
const tag = newVNode.$tag$;
|
|
888
915
|
const text = newVNode.$text$;
|
|
889
916
|
if (text === null) {
|
|
917
|
+
{
|
|
918
|
+
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
919
|
+
// only add this to the when the compiler sees we're using an svg somewhere
|
|
920
|
+
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
921
|
+
}
|
|
890
922
|
{
|
|
891
923
|
{
|
|
892
924
|
// either this is the first render of an element OR it's an update
|
|
@@ -913,6 +945,9 @@ const patch = (oldVNode, newVNode) => {
|
|
|
913
945
|
// no new child vnodes, but there are old child vnodes to remove
|
|
914
946
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
915
947
|
}
|
|
948
|
+
if (isSvgMode && tag === 'svg') {
|
|
949
|
+
isSvgMode = false;
|
|
950
|
+
}
|
|
916
951
|
}
|
|
917
952
|
else if (oldVNode.$text$ !== text) {
|
|
918
953
|
// update the text content for the text only vnode
|
|
@@ -936,10 +971,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
936
971
|
const hostElm = hostRef.$hostElement$;
|
|
937
972
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
938
973
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
974
|
+
hostTagName = hostElm.tagName;
|
|
939
975
|
rootVnode.$tag$ = null;
|
|
940
976
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
941
977
|
hostRef.$vnode$ = rootVnode;
|
|
942
|
-
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
|
|
978
|
+
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
943
979
|
{
|
|
944
980
|
scopeId = hostElm['s-sc'];
|
|
945
981
|
}
|
|
@@ -1451,6 +1487,17 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1451
1487
|
super(self);
|
|
1452
1488
|
self = this;
|
|
1453
1489
|
registerHost(self, cmpMeta);
|
|
1490
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1491
|
+
// this component is using shadow dom
|
|
1492
|
+
// and this browser supports shadow dom
|
|
1493
|
+
// add the read-only property "shadowRoot" to the host element
|
|
1494
|
+
// adding the shadow root build conditionals to minimize runtime
|
|
1495
|
+
{
|
|
1496
|
+
{
|
|
1497
|
+
self.attachShadow({ mode: 'open' });
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1454
1501
|
}
|
|
1455
1502
|
connectedCallback() {
|
|
1456
1503
|
if (appLoadFallback) {
|
|
@@ -1664,4 +1711,4 @@ exports.promiseResolve = promiseResolve;
|
|
|
1664
1711
|
exports.registerInstance = registerInstance;
|
|
1665
1712
|
exports.setNonce = setNonce;
|
|
1666
1713
|
|
|
1667
|
-
//# sourceMappingURL=index-
|
|
1714
|
+
//# sourceMappingURL=index-b6962659.js.map
|