dash-button-web 0.0.2 → 0.0.4
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/dash-button.cjs.entry.js +35 -4
- package/dist/cjs/dash-button.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-8282b36b.js → index-d91975cd.js} +37 -2
- package/dist/cjs/index-d91975cd.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/web-compnont.cjs.js +2 -2
- package/dist/collection/components/my-component/dash-button.css +51 -0
- package/dist/collection/components/my-component/dash-button.js +69 -2
- package/dist/collection/components/my-component/dash-button.js.map +1 -1
- package/dist/components/dash-button.js +36 -3
- package/dist/components/dash-button.js.map +1 -1
- package/dist/esm/dash-button.entry.js +35 -4
- package/dist/esm/dash-button.entry.js.map +1 -1
- package/dist/esm/{index-2b6c17bc.js → index-1c7e21da.js} +37 -2
- package/dist/esm/index-1c7e21da.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/web-compnont.js +3 -3
- package/dist/types/components/my-component/dash-button.d.ts +3 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/web-compnont/p-aa686508.js +3 -0
- package/dist/web-compnont/p-aa686508.js.map +1 -0
- package/dist/web-compnont/{p-4356bec1.entry.js → p-ccad140c.entry.js} +3 -3
- package/dist/web-compnont/p-ccad140c.entry.js.map +1 -0
- package/dist/web-compnont/web-compnont.esm.js +1 -1
- package/dist/web-compnont/web-compnont.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-8282b36b.js.map +0 -1
- package/dist/esm/index-2b6c17bc.js.map +0 -1
- package/dist/web-compnont/p-35259f64.js +0 -3
- package/dist/web-compnont/p-35259f64.js.map +0 -1
- package/dist/web-compnont/p-4356bec1.entry.js.map +0 -1
|
@@ -42,6 +42,11 @@ const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
|
42
42
|
* Don't add values to these!!
|
|
43
43
|
*/
|
|
44
44
|
const EMPTY_OBJ = {};
|
|
45
|
+
/**
|
|
46
|
+
* Namespaces
|
|
47
|
+
*/
|
|
48
|
+
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
49
|
+
const HTML_NS = 'http://www.w3.org/1999/xhtml';
|
|
45
50
|
const isDef = (v) => v != null;
|
|
46
51
|
/**
|
|
47
52
|
* Check whether a value is a 'complex type', defined here as an object or a
|
|
@@ -475,8 +480,15 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
475
480
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
476
481
|
}
|
|
477
482
|
else {
|
|
483
|
+
if (!isSvgMode) {
|
|
484
|
+
isSvgMode = newVNode.$tag$ === 'svg';
|
|
485
|
+
}
|
|
478
486
|
// create element
|
|
479
|
-
elm = newVNode.$elm$ = (doc.
|
|
487
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$tag$)
|
|
488
|
+
);
|
|
489
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
490
|
+
isSvgMode = false;
|
|
491
|
+
}
|
|
480
492
|
// add css classes, attrs, props, listeners, etc.
|
|
481
493
|
{
|
|
482
494
|
updateElement(null, newVNode, isSvgMode);
|
|
@@ -497,6 +509,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
497
509
|
}
|
|
498
510
|
}
|
|
499
511
|
}
|
|
512
|
+
{
|
|
513
|
+
if (newVNode.$tag$ === 'svg') {
|
|
514
|
+
// Only reset the SVG context when we're exiting <svg> element
|
|
515
|
+
isSvgMode = false;
|
|
516
|
+
}
|
|
517
|
+
else if (elm.tagName === 'foreignObject') {
|
|
518
|
+
// Reenter SVG context when we're exiting <foreignObject> element
|
|
519
|
+
isSvgMode = true;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
500
522
|
}
|
|
501
523
|
// This needs to always happen so we can hide nodes that are projected
|
|
502
524
|
// to another component but don't end up in a slot
|
|
@@ -814,8 +836,14 @@ const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
|
814
836
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
815
837
|
const oldChildren = oldVNode.$children$;
|
|
816
838
|
const newChildren = newVNode.$children$;
|
|
839
|
+
const tag = newVNode.$tag$;
|
|
817
840
|
const text = newVNode.$text$;
|
|
818
841
|
if (text === null) {
|
|
842
|
+
{
|
|
843
|
+
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
844
|
+
// only add this to the when the compiler sees we're using an svg somewhere
|
|
845
|
+
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
846
|
+
}
|
|
819
847
|
{
|
|
820
848
|
{
|
|
821
849
|
// either this is the first render of an element OR it's an update
|
|
@@ -842,6 +870,9 @@ const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
|
842
870
|
// no new child vnodes, but there are old child vnodes to remove
|
|
843
871
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
844
872
|
}
|
|
873
|
+
if (isSvgMode && tag === 'svg') {
|
|
874
|
+
isSvgMode = false;
|
|
875
|
+
}
|
|
845
876
|
}
|
|
846
877
|
else if (oldVNode.$text$ !== text) {
|
|
847
878
|
// update the text content for the text only vnode
|
|
@@ -1071,7 +1102,11 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1071
1102
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1072
1103
|
const elm = hostRef.$hostElement$;
|
|
1073
1104
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1105
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1074
1106
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1107
|
+
{
|
|
1108
|
+
safeCall(instance, 'componentDidRender');
|
|
1109
|
+
}
|
|
1075
1110
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1076
1111
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1077
1112
|
{
|
|
@@ -1703,4 +1738,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
1703
1738
|
|
|
1704
1739
|
export { bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1705
1740
|
|
|
1706
|
-
//# sourceMappingURL=index-
|
|
1741
|
+
//# sourceMappingURL=index-1c7e21da.js.map
|