taggedjs 2.8.14 → 2.8.17
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/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.d.ts +0 -1
- package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.js +1 -163
- package/js/interpolations/optimizers/htmlInterpolationToDomMeta.function.js.map +1 -1
- package/js/interpolations/optimizers/parseHTML.function.d.ts +3 -0
- package/js/interpolations/optimizers/parseHTML.function.js +166 -0
- package/js/interpolations/optimizers/parseHTML.function.js.map +1 -0
- package/js/tag/Context.types.d.ts +5 -1
- package/js/tag/afterRender.function.js +1 -0
- package/js/tag/afterRender.function.js.map +1 -1
- package/js/tag/buildBeforeElement.function.js +3 -1
- package/js/tag/buildBeforeElement.function.js.map +1 -1
- package/js/tag/executeWrap.function.js +1 -0
- package/js/tag/executeWrap.function.js.map +1 -1
- package/js/tag/getChildTagsToDestroy.function.js +1 -1
- package/js/tag/getChildTagsToDestroy.function.js.map +1 -1
- package/js/tag/getTemplaterResult.function.d.ts +1 -0
- package/js/tag/getTemplaterResult.function.js.map +1 -1
- package/js/tag/update/compareArrayItems.function.d.ts +2 -3
- package/js/tag/update/compareArrayItems.function.js +30 -21
- package/js/tag/update/compareArrayItems.function.js.map +1 -1
- package/js/tag/update/getNewGlobal.function.js +3 -2
- package/js/tag/update/getNewGlobal.function.js.map +1 -1
- package/js/tag/update/processFirstSubjectValue.function.js +1 -0
- package/js/tag/update/processFirstSubjectValue.function.js.map +1 -1
- package/js/tag/update/processTag.function.d.ts +2 -2
- package/js/tag/update/processTag.function.js.map +1 -1
- package/js/tag/update/processTagArray.js +26 -19
- package/js/tag/update/processTagArray.js.map +1 -1
- package/js/tag/update/updateExistingTagComponent.function.js +1 -0
- package/js/tag/update/updateExistingTagComponent.function.js.map +1 -1
- package/js/tag/update/updateExistingValue.function.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,5 +2,4 @@ import { ParsedHtml } from "./types.js";
|
|
|
2
2
|
/** Run only during compile step OR when no compile step occurred at runtime */
|
|
3
3
|
export declare function htmlInterpolationToDomMeta(strings: string[], values: unknown[]): ParsedHtml;
|
|
4
4
|
export declare function htmlInterpolationToPlaceholders(strings: string[], values: unknown[]): string[];
|
|
5
|
-
export declare function parseHTML(html: string): ParsedHtml;
|
|
6
5
|
export declare function balanceArrayByArrays(results: unknown[], strings: string[], values: unknown[]): void;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { variablePrefix, variableSuffix } from "../../tag/getDomTag.function.js";
|
|
2
|
-
import {
|
|
3
|
-
const ondoubleclick = 'ondoubleclick';
|
|
4
|
-
const fragFindAny = /(:tagvar\d+:)/;
|
|
2
|
+
import { parseHTML } from "./parseHTML.function.js";
|
|
5
3
|
const fragReplacer = /(^:tagvar\d+:|:tagvar\d+:$)/g;
|
|
6
4
|
const safeVar = '__safeTagVar';
|
|
7
|
-
const regexAttr = /([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g;
|
|
8
|
-
const regexTagOrg = /<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;
|
|
9
5
|
/** Run only during compile step OR when no compile step occurred at runtime */
|
|
10
6
|
export function htmlInterpolationToDomMeta(strings, values) {
|
|
11
7
|
htmlInterpolationToPlaceholders(strings, values);
|
|
@@ -33,114 +29,6 @@ function addPlaceholders(strings, values) {
|
|
|
33
29
|
balanceArrayByArrays(results, strings, values);
|
|
34
30
|
return results;
|
|
35
31
|
}
|
|
36
|
-
export function parseHTML(html) {
|
|
37
|
-
const valuePositions = [];
|
|
38
|
-
const elements = [];
|
|
39
|
-
const stack = [];
|
|
40
|
-
let currentElement = null;
|
|
41
|
-
let valueIndex = -1;
|
|
42
|
-
let position = 0;
|
|
43
|
-
const regexTag = new RegExp(regexTagOrg, 'g');
|
|
44
|
-
html = preprocessTagsInComments(html);
|
|
45
|
-
while (position < html.length) {
|
|
46
|
-
const tagMatch = regexTag.exec(html);
|
|
47
|
-
if (!tagMatch) {
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
const [fullMatch, tagName, attrString] = tagMatch;
|
|
51
|
-
const isClosingTag = fullMatch.startsWith('</');
|
|
52
|
-
const isSelfClosing = fullMatch.endsWith('/>');
|
|
53
|
-
if (position < tagMatch.index) {
|
|
54
|
-
const textContent = html.slice(position, tagMatch.index);
|
|
55
|
-
if (textContent.trim()) {
|
|
56
|
-
const textVarMatches = splitByTagVar(textContent);
|
|
57
|
-
textVarMatches.forEach(textContent => {
|
|
58
|
-
if (textContent.startsWith(variablePrefix)) {
|
|
59
|
-
textContent = variablePrefix + (++valueIndex) + variableSuffix;
|
|
60
|
-
}
|
|
61
|
-
pushTextTo(currentElement, elements, textContent);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
position = tagMatch.index + fullMatch.length;
|
|
66
|
-
if (isClosingTag) {
|
|
67
|
-
currentElement = stack.pop() || null;
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
const attributes = [];
|
|
71
|
-
let attrMatch;
|
|
72
|
-
while ((attrMatch = regexAttr.exec(attrString)) !== null) {
|
|
73
|
-
const attrName = attrMatch[1] || attrMatch[3] || attrMatch[5];
|
|
74
|
-
const attrChoice = attrMatch[2] || attrMatch[4] || attrMatch[6];
|
|
75
|
-
let attrValue = attrChoice;
|
|
76
|
-
if (attrName === undefined) {
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
const notEmpty = attrMatch[2] !== '';
|
|
80
|
-
const noValue = attrValue === undefined && notEmpty;
|
|
81
|
-
const lowerName = attrName.toLowerCase();
|
|
82
|
-
const fixedName = lowerName.startsWith('on') ? cleanEventName(lowerName) : lowerName;
|
|
83
|
-
if (noValue) {
|
|
84
|
-
const standAloneVar = attrName.slice(0, variablePrefix.length) === variablePrefix;
|
|
85
|
-
if (standAloneVar) {
|
|
86
|
-
const valueName = variablePrefix + (++valueIndex) + variableSuffix;
|
|
87
|
-
valuePositions.push(['at', valueName]);
|
|
88
|
-
attributes.push([valueName]); // the name itself is dynamic
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
const startMatched = attrMatch[0].startsWith(attrName);
|
|
92
|
-
const standAloneAttr = startMatched && attrMatch[0].slice(attrName.length, attrMatch[0].length).search(/\s+$/) >= 0;
|
|
93
|
-
if (standAloneAttr) {
|
|
94
|
-
attributes.push([fixedName]);
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
const valueName = variablePrefix + (++valueIndex) + variableSuffix;
|
|
98
|
-
attrValue = valueName;
|
|
99
|
-
}
|
|
100
|
-
if (!notEmpty) {
|
|
101
|
-
attrValue = attrMatch[2];
|
|
102
|
-
}
|
|
103
|
-
const attrSet = [fixedName, attrValue];
|
|
104
|
-
const isSpecial = isSpecialAttr(lowerName); // check original name for "oninit" or "autofocus"
|
|
105
|
-
if (isSpecial) {
|
|
106
|
-
attrSet.push(isSpecial);
|
|
107
|
-
}
|
|
108
|
-
attributes.push(attrSet);
|
|
109
|
-
}
|
|
110
|
-
const element = {
|
|
111
|
-
nn: tagName, // nodeName
|
|
112
|
-
};
|
|
113
|
-
if (attributes.length) {
|
|
114
|
-
element.at = attributes;
|
|
115
|
-
}
|
|
116
|
-
if (currentElement) {
|
|
117
|
-
if (!currentElement.ch) {
|
|
118
|
-
currentElement.ch = [];
|
|
119
|
-
}
|
|
120
|
-
currentElement.ch.push(element);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
elements.push(element);
|
|
124
|
-
}
|
|
125
|
-
if (!isSelfClosing) {
|
|
126
|
-
stack.push(currentElement);
|
|
127
|
-
currentElement = element;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (position < html.length) {
|
|
131
|
-
const textContent = html.slice(position);
|
|
132
|
-
if (textContent.trim()) {
|
|
133
|
-
const textVarMatches = splitByTagVar(textContent);
|
|
134
|
-
textVarMatches.forEach(textContent => {
|
|
135
|
-
if (textContent.startsWith(variablePrefix)) {
|
|
136
|
-
++valueIndex;
|
|
137
|
-
}
|
|
138
|
-
return pushTextTo(currentElement, elements, textContent);
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return elements;
|
|
143
|
-
}
|
|
144
32
|
export function balanceArrayByArrays(results, strings, values) {
|
|
145
33
|
const diff = values.length - strings.length;
|
|
146
34
|
if (diff > 0) {
|
|
@@ -149,54 +37,4 @@ export function balanceArrayByArrays(results, strings, values) {
|
|
|
149
37
|
}
|
|
150
38
|
}
|
|
151
39
|
}
|
|
152
|
-
function splitByTagVar(inputString) {
|
|
153
|
-
// Split the string using the regular expression, keep delimiters in the output
|
|
154
|
-
const parts = inputString.split(fragFindAny);
|
|
155
|
-
// Filter out any empty strings from the results
|
|
156
|
-
const filteredParts = parts.filter(part => part !== '');
|
|
157
|
-
return filteredParts;
|
|
158
|
-
}
|
|
159
|
-
function pushTo(currentElement, elements, textNode) {
|
|
160
|
-
if (currentElement) {
|
|
161
|
-
if (!currentElement.ch) {
|
|
162
|
-
currentElement.ch = [];
|
|
163
|
-
}
|
|
164
|
-
currentElement.ch.push(textNode);
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
elements.push(textNode);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
function pushTextTo(currentElement, elements, textContent) {
|
|
171
|
-
const textNode = {
|
|
172
|
-
nn: 'text', // nodeName
|
|
173
|
-
tc: postprocessTagsInComments(textContent), // textContent
|
|
174
|
-
};
|
|
175
|
-
pushTo(currentElement, elements, textNode);
|
|
176
|
-
}
|
|
177
|
-
const removeCommentRegX = new RegExp('(<!--[\\s\\S]*?-->)', 'g');
|
|
178
|
-
function preprocessTagsInComments(html) {
|
|
179
|
-
// Use a regex to find all HTML comments
|
|
180
|
-
return html.replace(removeCommentRegX, function (match) {
|
|
181
|
-
// For each comment found, replace < and > inside it
|
|
182
|
-
return match.replace(/\[l t\]/g, '[l t]').replace(/\[g t\]/g, '[g t]').replace(/</g, '[l t]').replace(/>/g, '[g t]');
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
function postprocessTagsInComments(html) {
|
|
186
|
-
// Use a regex to find all segments that look like processed comments
|
|
187
|
-
return html.replace(/(\[l t\]!--[\s\S]*?--\[g t\])/g, function (match) {
|
|
188
|
-
// For each processed comment found, replace *lt* and *gt* back to < and >
|
|
189
|
-
return match.replace(/\[l t\]/g, '<').replace(/\[g t\]/g, '>').replace(/\[l t\]/g, '[l t]').replace(/\[g t\]/g, '[g t]');
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
function cleanEventName(eventName) {
|
|
193
|
-
if (eventName.startsWith('on')) {
|
|
194
|
-
const couldByDblClick = eventName.length === ondoubleclick.length && eventName === ondoubleclick;
|
|
195
|
-
if (couldByDblClick) {
|
|
196
|
-
return 'dblclick';
|
|
197
|
-
}
|
|
198
|
-
return eventName.slice(2, eventName.length);
|
|
199
|
-
}
|
|
200
|
-
return eventName;
|
|
201
|
-
}
|
|
202
40
|
//# sourceMappingURL=htmlInterpolationToDomMeta.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"htmlInterpolationToDomMeta.function.js","sourceRoot":"","sources":["../../../ts/interpolations/optimizers/htmlInterpolationToDomMeta.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"htmlInterpolationToDomMeta.function.js","sourceRoot":"","sources":["../../../ts/interpolations/optimizers/htmlInterpolationToDomMeta.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChF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E,MAAM,CAAC,CAAA;IAE9C,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,OAAkB,EAClB,OAAiB,EACjB,MAAiB;IAEjB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;IAC3C,IAAG,IAAI,GAAG,CAAC,EAAE,CAAC;QACZ,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YAC9B,OAAO,CAAC,IAAI,CAAE,cAAc,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,CAAE,CAAA;QAC5E,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { variablePrefix, variableSuffix } from "../../tag/getDomTag.function.js";
|
|
2
|
+
import { isSpecialAttr } from "../attributes/isSpecialAttribute.function.js";
|
|
3
|
+
const fragFindAny = /(:tagvar\d+:)/;
|
|
4
|
+
const ondoubleclick = 'ondoubleclick';
|
|
5
|
+
const regexAttr = /([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g;
|
|
6
|
+
const regexTagOrg = /<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;
|
|
7
|
+
/** Main start of string parsing */
|
|
8
|
+
export function parseHTML(html) {
|
|
9
|
+
const valuePositions = [];
|
|
10
|
+
const elements = [];
|
|
11
|
+
const stack = [];
|
|
12
|
+
let currentElement = null;
|
|
13
|
+
let valueIndex = -1;
|
|
14
|
+
let position = 0;
|
|
15
|
+
const regexTag = new RegExp(regexTagOrg, 'g');
|
|
16
|
+
html = preprocessTagsInComments(html);
|
|
17
|
+
while (position < html.length) {
|
|
18
|
+
const tagMatch = regexTag.exec(html);
|
|
19
|
+
if (!tagMatch) {
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
const [fullMatch, tagName, attrString] = tagMatch;
|
|
23
|
+
const isClosingTag = fullMatch.startsWith('</');
|
|
24
|
+
const isSelfClosing = fullMatch.endsWith('/>');
|
|
25
|
+
if (position < tagMatch.index) {
|
|
26
|
+
const textContent = html.slice(position, tagMatch.index);
|
|
27
|
+
if (textContent.trim()) {
|
|
28
|
+
const textVarMatches = splitByTagVar(textContent);
|
|
29
|
+
textVarMatches.forEach(textContent => {
|
|
30
|
+
if (textContent.startsWith(variablePrefix)) {
|
|
31
|
+
textContent = variablePrefix + (++valueIndex) + variableSuffix;
|
|
32
|
+
}
|
|
33
|
+
pushTextTo(currentElement, elements, textContent);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
position = tagMatch.index + fullMatch.length;
|
|
38
|
+
if (isClosingTag) {
|
|
39
|
+
currentElement = stack.pop() || null;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const attributes = [];
|
|
43
|
+
let attrMatch;
|
|
44
|
+
while ((attrMatch = regexAttr.exec(attrString)) !== null) {
|
|
45
|
+
const attrName = attrMatch[1] || attrMatch[3] || attrMatch[5];
|
|
46
|
+
const attrChoice = attrMatch[2] || attrMatch[4] || attrMatch[6];
|
|
47
|
+
let attrValue = attrChoice;
|
|
48
|
+
if (attrName === undefined) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const notEmpty = attrMatch[2] !== '';
|
|
52
|
+
const noValue = attrValue === undefined && notEmpty;
|
|
53
|
+
const lowerName = attrName.toLowerCase();
|
|
54
|
+
const fixedName = lowerName.startsWith('on') ? cleanEventName(lowerName) : lowerName;
|
|
55
|
+
if (noValue) {
|
|
56
|
+
const standAloneVar = attrName.slice(0, variablePrefix.length) === variablePrefix;
|
|
57
|
+
if (standAloneVar) {
|
|
58
|
+
const valueName = variablePrefix + (++valueIndex) + variableSuffix;
|
|
59
|
+
valuePositions.push(['at', valueName]);
|
|
60
|
+
attributes.push([valueName]); // the name itself is dynamic
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
const startMatched = attrMatch[0].startsWith(attrName);
|
|
64
|
+
const standAloneAttr = startMatched && attrMatch[0].slice(attrName.length, attrMatch[0].length).search(/\s+$/) >= 0;
|
|
65
|
+
if (standAloneAttr) {
|
|
66
|
+
attributes.push([fixedName]);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const valueName = variablePrefix + (++valueIndex) + variableSuffix;
|
|
70
|
+
attrValue = valueName;
|
|
71
|
+
}
|
|
72
|
+
if (!notEmpty) {
|
|
73
|
+
attrValue = attrMatch[2];
|
|
74
|
+
}
|
|
75
|
+
const attrSet = [fixedName, attrValue];
|
|
76
|
+
const isSpecial = isSpecialAttr(lowerName); // check original name for "oninit" or "autofocus"
|
|
77
|
+
if (isSpecial) {
|
|
78
|
+
attrSet.push(isSpecial);
|
|
79
|
+
}
|
|
80
|
+
attributes.push(attrSet);
|
|
81
|
+
}
|
|
82
|
+
const element = {
|
|
83
|
+
nn: tagName, // nodeName
|
|
84
|
+
};
|
|
85
|
+
if (attributes.length) {
|
|
86
|
+
element.at = attributes;
|
|
87
|
+
}
|
|
88
|
+
if (currentElement) {
|
|
89
|
+
if (!currentElement.ch) {
|
|
90
|
+
currentElement.ch = [];
|
|
91
|
+
}
|
|
92
|
+
currentElement.ch.push(element);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
elements.push(element);
|
|
96
|
+
}
|
|
97
|
+
if (!isSelfClosing) {
|
|
98
|
+
stack.push(currentElement);
|
|
99
|
+
currentElement = element;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (position < html.length) {
|
|
103
|
+
const textContent = html.slice(position);
|
|
104
|
+
if (textContent.trim()) {
|
|
105
|
+
const textVarMatches = splitByTagVar(textContent);
|
|
106
|
+
textVarMatches.forEach(textContent => {
|
|
107
|
+
if (textContent.startsWith(variablePrefix)) {
|
|
108
|
+
++valueIndex;
|
|
109
|
+
}
|
|
110
|
+
return pushTextTo(currentElement, elements, textContent);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return elements;
|
|
115
|
+
}
|
|
116
|
+
const removeCommentRegX = new RegExp('(<!--[\\s\\S]*?-->)', 'g');
|
|
117
|
+
function preprocessTagsInComments(html) {
|
|
118
|
+
// Use a regex to find all HTML comments
|
|
119
|
+
return html.replace(removeCommentRegX, function (match) {
|
|
120
|
+
// For each comment found, replace < and > inside it
|
|
121
|
+
return match.replace(/\[l t\]/g, '[l t]').replace(/\[g t\]/g, '[g t]').replace(/</g, '[l t]').replace(/>/g, '[g t]');
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
function cleanEventName(eventName) {
|
|
125
|
+
if (eventName.startsWith('on')) {
|
|
126
|
+
const couldByDblClick = eventName.length === ondoubleclick.length && eventName === ondoubleclick;
|
|
127
|
+
if (couldByDblClick) {
|
|
128
|
+
return 'dblclick';
|
|
129
|
+
}
|
|
130
|
+
return eventName.slice(2, eventName.length);
|
|
131
|
+
}
|
|
132
|
+
return eventName;
|
|
133
|
+
}
|
|
134
|
+
function pushTextTo(currentElement, elements, textContent) {
|
|
135
|
+
const textNode = {
|
|
136
|
+
nn: 'text', // nodeName
|
|
137
|
+
tc: postprocessTagsInComments(textContent), // textContent
|
|
138
|
+
};
|
|
139
|
+
pushTo(currentElement, elements, textNode);
|
|
140
|
+
}
|
|
141
|
+
function postprocessTagsInComments(html) {
|
|
142
|
+
// Use a regex to find all segments that look like processed comments
|
|
143
|
+
return html.replace(/(\[l t\]!--[\s\S]*?--\[g t\])/g, function (match) {
|
|
144
|
+
// For each processed comment found, replace *lt* and *gt* back to < and >
|
|
145
|
+
return match.replace(/\[l t\]/g, '<').replace(/\[g t\]/g, '>').replace(/\[l t\]/g, '[l t]').replace(/\[g t\]/g, '[g t]');
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function pushTo(currentElement, elements, textNode) {
|
|
149
|
+
if (currentElement) {
|
|
150
|
+
if (!currentElement.ch) {
|
|
151
|
+
currentElement.ch = [];
|
|
152
|
+
}
|
|
153
|
+
currentElement.ch.push(textNode);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
elements.push(textNode);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function splitByTagVar(inputString) {
|
|
160
|
+
// Split the string using the regular expression, keep delimiters in the output
|
|
161
|
+
const parts = inputString.split(fragFindAny);
|
|
162
|
+
// Filter out any empty strings from the results
|
|
163
|
+
const filteredParts = parts.filter(part => part !== '');
|
|
164
|
+
return filteredParts;
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=parseHTML.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseHTML.function.js","sourceRoot":"","sources":["../../../ts/interpolations/optimizers/parseHTML.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAG5E,MAAM,WAAW,GAAG,eAAe,CAAA;AACnC,MAAM,aAAa,GAAG,eAAe,CAAA;AACrC,MAAM,SAAS,GAAG,qDAAqD,CAAC;AACxE,MAAM,WAAW,GAAG,0GAA0G,CAAC;AAE/H,mCAAmC;AACnC,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,MAAM,cAAc,GAAe,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAe,EAAE,CAAC;IAChC,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,IAAI,cAAc,GAAyB,IAAI,CAAC;IAChD,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;IACpB,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC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I,CAAC,QAAQ,CAAC,CAAA;IACzB,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,WAAmB;IACxC,+EAA+E;IAC/E,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAE7C,gDAAgD;IAChD,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAExD,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -4,6 +4,10 @@ import { InterpolateSubject } from './update/processFirstSubject.utils.js';
|
|
|
4
4
|
import { Clone, TagGlobal } from './getTemplaterResult.function.js';
|
|
5
5
|
import { AnySupport, SupportContextItem } from './getSupport.function.js';
|
|
6
6
|
export type ContextHandler = (value: unknown, values: unknown[], newSupport: AnySupport, contextItem: ContextItem) => void;
|
|
7
|
+
export type LastArrayItem = {
|
|
8
|
+
context: ContextItem;
|
|
9
|
+
global: TagGlobal;
|
|
10
|
+
};
|
|
7
11
|
export type ContextItem = {
|
|
8
12
|
element?: Element;
|
|
9
13
|
handler?: ContextHandler;
|
|
@@ -14,7 +18,7 @@ export type ContextItem = {
|
|
|
14
18
|
isSpecial?: SpecialDefinition;
|
|
15
19
|
placeholder?: Text;
|
|
16
20
|
simpleValueElm?: Clone;
|
|
17
|
-
lastArray?:
|
|
21
|
+
lastArray?: LastArrayItem[];
|
|
18
22
|
subject?: InterpolateSubject;
|
|
19
23
|
global?: TagGlobal;
|
|
20
24
|
value?: any;
|
|
@@ -7,6 +7,7 @@ import { checkStateMismatch } from './checkStateMismatch.function.js';
|
|
|
7
7
|
export function runAfterRender(support, ownerSupport) {
|
|
8
8
|
const subject = support.subject;
|
|
9
9
|
++subject.renderCount;
|
|
10
|
+
// ++subject.global.renderCount
|
|
10
11
|
const config = setUseMemory.stateConfig;
|
|
11
12
|
delete config.support;
|
|
12
13
|
support.state = config.stateArray;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"afterRender.function.js","sourceRoot":"","sources":["../../ts/tag/afterRender.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAmB,EACnB,YAAyB;IAEzB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAC/B,EAAE,OAAO,CAAC,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"afterRender.function.js","sourceRoot":"","sources":["../../ts/tag/afterRender.function.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE;;;GAGG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAmB,EACnB,YAAyB;IAEzB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;IAC/B,EAAE,OAAO,CAAC,WAAW,CAAA;IACrB,+BAA+B;IAE/B,MAAM,MAAM,GAAgB,YAAY,CAAC,WAAW,CAAA;IACpD,OAAO,MAAM,CAAC,OAAO,CAAA;IACrB,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAA;IACjC,iCAAiC;IAEjC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IAC1C,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,OAAO,CAAA;AACjC,CAAC"}
|
|
@@ -5,13 +5,15 @@ import { ValueTypes } from './ValueTypes.enum.js';
|
|
|
5
5
|
import { painting } from './paint.function.js';
|
|
6
6
|
/** Function that kicks off actually putting tags down as HTML elements */
|
|
7
7
|
export function buildBeforeElement(support, counts, appendTo, insertBefore) {
|
|
8
|
-
const
|
|
8
|
+
const subject = support.subject;
|
|
9
|
+
const global = subject.global;
|
|
9
10
|
global.oldest = support;
|
|
10
11
|
global.newest = support;
|
|
11
12
|
++painting.locks;
|
|
12
13
|
const result = attachHtmlDomMeta(support, counts, appendTo, insertBefore);
|
|
13
14
|
global.htmlDomMeta = result.dom;
|
|
14
15
|
--painting.locks;
|
|
16
|
+
// ++global.renderCount
|
|
15
17
|
// return fragment
|
|
16
18
|
return result;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildBeforeElement.function.js","sourceRoot":"","sources":["../../ts/tag/buildBeforeElement.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAA;AAO9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,0EAA0E;AAC1E,MAAM,UAAU,kBAAkB,CAChC,OAAmB,EACnB,MAAc,EACd,QAAkB,EAClB,YAAmB;IAEnB,MAAM,
|
|
1
|
+
{"version":3,"file":"buildBeforeElement.function.js","sourceRoot":"","sources":["../../ts/tag/buildBeforeElement.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAA;AAO9F,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,0EAA0E;AAC1E,MAAM,UAAU,kBAAkB,CAChC,OAAmB,EACnB,MAAc,EACd,QAAkB,EAClB,YAAmB;IAEnB,MAAM,OAAO,GAAG,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AAiB,CAAA;IAC9C,CAAC;IAED,MAAM,OAAO,GAAI,OAAqB,CAAC,OAAO,CAAA;IAE9C,OAAO,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,KAAc,EACd,OAAsB,EACtB,kBAA2B;IAE3B,MAAM,WAAW,GAAgB;QAC/B,KAAK;QACL,gBAAgB,EAAE,sBAAsB;QACxC,kBAAkB;KACnB,CAAA;IAED,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAGzB,OAAO,WAAW,CAAA;AACpB,CAAC"}
|
|
@@ -19,6 +19,7 @@ export function executeWrap(templater, result, useSupport, castedProps) {
|
|
|
19
19
|
const config = setUseMemory.stateConfig;
|
|
20
20
|
useSupport.state = config.stateArray;
|
|
21
21
|
useSupport.states = config.states;
|
|
22
|
+
// ++useSupport.subject.renderCount
|
|
22
23
|
return useSupport;
|
|
23
24
|
}
|
|
24
25
|
//# sourceMappingURL=executeWrap.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeWrap.function.js","sourceRoot":"","sources":["../../ts/tag/executeWrap.function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAK9D,MAAM,UAAU,WAAW,CACzB,SAA0B,EAC1B,MAA2B,EAC3B,UAAsB,EACtB,WAAmB;IAEnB,MAAM,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAA,CAAC,4DAA4D;IACrG,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,KAAK,UAAU,CAAC,WAAW,CAAA;IAEhE,IAAI,GAAc,CAAC;IACnB,IAAG,SAAS,EAAE,CAAC;QACb,GAAG,GAAI,SAAwC,EAAE,CAAA;IACnD,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,gBAAg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AAG,GAAG,GAAG,CAAA;IAEnB,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAA;IACvC,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU,CAAA;IACpC,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IAEjC,mCAAmC;IAEnC,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
|
@@ -4,7 +4,7 @@ export function getChildTagsToDestroy(childTags) {
|
|
|
4
4
|
for (const child of childTags) {
|
|
5
5
|
const lastArray = child.lastArray;
|
|
6
6
|
if (lastArray) {
|
|
7
|
-
getChildTagsToDestroy(lastArray);
|
|
7
|
+
getChildTagsToDestroy(lastArray.map(x => x.context));
|
|
8
8
|
continue;
|
|
9
9
|
}
|
|
10
10
|
const global = child.global;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getChildTagsToDestroy.function.js","sourceRoot":"","sources":["../../ts/tag/getChildTagsToDestroy.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAIjD,MAAM,UAAU,qBAAqB,CACnC,SAAwB;IAExB,KAAK,MAAM,KAAK,IAAI,SAAS,EAAE,CAAC;QAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAG,SAAS,EAAE,CAAC;YACb,qBAAqB,CAAC,SAAS,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"getChildTagsToDestroy.function.js","sourceRoot":"","sources":["../../ts/tag/getChildTagsToDestroy.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAIjD,MAAM,UAAU,qBAAqB,CACnC,SAAwB;IAExB,KAAK,MAAM,KAAK,IAAI,SAAS,EAAE,CAAC;QAC9B,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IAAI,CAAC,GAAG,KAAK,CAAC,CAAA;YACrB,CAAC;QACH,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,CAAC,OAAwB,CAAA;QAC/C,IAAG,OAAO,EAAE,CAAC;YACX,yBAAyB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAChD,CAAC;IACH,CAAC;IAED,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,CAAA;AACrB,CAAC"}
|
|
@@ -13,6 +13,7 @@ import { PropWatches } from './tag.js';
|
|
|
13
13
|
export type Wrapper = ((newSupport: AnySupport, subject: ContextItem, prevSupport?: AnySupport) => AnySupport) & TagWrapper<unknown> & {
|
|
14
14
|
tagJsType: typeof ValueTypes.tagComponent | typeof ValueTypes.renderOnce | typeof ValueTypes.templater;
|
|
15
15
|
};
|
|
16
|
+
/** NOT shared across variable spots. The Subject/ContextItem is more global than this is */
|
|
16
17
|
export type TagGlobal = {
|
|
17
18
|
htmlDomMeta?: DomObjectChildren;
|
|
18
19
|
deleted?: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTemplaterResult.function.js","sourceRoot":"","sources":["../../ts/tag/getTemplaterResult.function.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"getTemplaterResult.function.js","sourceRoot":"","sources":["../../ts/tag/getTemplaterResult.function.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAqEjD,MAAM,UAAU,kBAAkB,CAChC,SAAsB,EACtB,KAAa;IAEb,MAAM,SAAS,GAAoB;QACjC,SAAS;QACT,KAAK;QACL,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,GAAG,EAAE,SAAS,WAAW,CAAI,UAAa;YACvC,SAAyC,CAAC,UAAU,GAAG,UAAU,CAAA;YAClE,OAAO,SAAS,CAAA;QAClB,CAAC;KACF,CAAA;IAED,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Counts } from '../../interpolations/interpolateTemplate.js';
|
|
2
|
-
import { ContextItem } from '../Context.types.js';
|
|
2
|
+
import { ContextItem, LastArrayItem } from '../Context.types.js';
|
|
3
3
|
import { TemplaterResult } from '../getTemplaterResult.function.js';
|
|
4
4
|
import type { StringTag } from '../StringTag.type.js';
|
|
5
|
-
export declare function compareArrayItems(
|
|
6
|
-
value: (TemplaterResult | StringTag)[], index: number, lastArray: ContextItem[], removed: number, counts: Counts): 1 | 0 | 2;
|
|
5
|
+
export declare function compareArrayItems(value: (TemplaterResult | StringTag)[], index: number, lastArray: LastArrayItem[], removed: number, counts: Counts): 1 | 0 | 2;
|
|
7
6
|
export declare function destroyArrayItem(item: ContextItem, counts: Counts): void;
|
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { paintRemoves } from '../paint.function.js';
|
|
2
2
|
import { destroySupport } from '../destroySupport.function.js';
|
|
3
|
-
export function compareArrayItems(
|
|
4
|
-
value, index, lastArray, removed, counts) {
|
|
3
|
+
export function compareArrayItems(value, index, lastArray, removed, counts) {
|
|
5
4
|
const newLength = value.length - 1;
|
|
6
5
|
const at = index - removed;
|
|
7
6
|
const lessLength = at < 0 || newLength < at;
|
|
8
|
-
const prevContext = lastArray[index];
|
|
7
|
+
const prevContext = lastArray[index].context;
|
|
9
8
|
if (lessLength) {
|
|
10
9
|
destroyArrayItem(prevContext, counts);
|
|
11
10
|
return 1;
|
|
12
11
|
}
|
|
13
|
-
const oldKey =
|
|
14
|
-
const
|
|
15
|
-
|
|
12
|
+
const oldKey = prevContext.value.arrayValue;
|
|
13
|
+
const newValueTag = value[index];
|
|
14
|
+
const result = runArrayItemDiff(oldKey, newValueTag, prevContext, counts, lastArray, index);
|
|
15
|
+
return result;
|
|
16
16
|
}
|
|
17
|
-
function runArrayItemDiff(oldKey,
|
|
18
|
-
const isDiff =
|
|
17
|
+
function runArrayItemDiff(oldKey, newValueTag, prevContext, counts, lastArray, index) {
|
|
18
|
+
const isDiff = newValueTag && oldKey !== newValueTag.arrayValue;
|
|
19
19
|
if (isDiff) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
// Intended to protect an array from adding and then immediately deleting
|
|
21
|
+
/*
|
|
22
|
+
// TODO: Does this code protect bad array keying?
|
|
23
|
+
if(prevContext.renderCount === 0) {
|
|
24
|
+
const newKey = newValueTag.arrayValue
|
|
25
|
+
console.warn('Possible array issue. Array is attempting to create/delete same items. Either html``.key is not unique or array changes with every render', {
|
|
26
|
+
oldKey,
|
|
27
|
+
newKey,
|
|
28
|
+
|
|
29
|
+
prevValue: prevContext.value,
|
|
30
|
+
prevContext,
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
paintAfters.push(() => {
|
|
34
|
+
destroyArrayItemByGlobal(prevContext.global, prevContext)
|
|
35
|
+
paintAfters.shift() // prevent endless recursion
|
|
36
|
+
paint()
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
return 1
|
|
32
40
|
}
|
|
41
|
+
*/
|
|
33
42
|
destroyArrayItem(prevContext, counts);
|
|
34
43
|
lastArray.splice(index, 1);
|
|
35
44
|
return 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compareArrayItems.function.js","sourceRoot":"","sources":["../../../ts/tag/update/compareArrayItems.function.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"compareArrayItems.function.js","sourceRoot":"","sources":["../../../ts/tag/update/compareArrayItems.function.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAI9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A0B,CAAA;IAE9C,wBAAwB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAEtC,EAAE,MAAM,CAAC,OAAO,CAAA;AAClB,CAAC;AAED,SAAS,wBAAwB,CAC/B,MAAwB,EACxB,IAAiB;IAEjB,IAAG,MAAM,EAAE,CAAC;QACV,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAA;QAC7B,cAAc,CAAC,OAAO,CAAC,CAAA;IACzB,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,IAAI,CAAC,cAAyB,CAAA;QAC9C,OAAO,IAAI,CAAC,cAAc,CAAA;QAC1B,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC5B,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export function getNewGlobal(subject) {
|
|
2
2
|
;
|
|
3
|
-
subject.renderCount = 0;
|
|
4
|
-
|
|
3
|
+
subject.renderCount = subject.renderCount || 0;
|
|
4
|
+
// ;(subject as SupportContextItem).renderCount = 0
|
|
5
|
+
return subject.global = {};
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=getNewGlobal.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNewGlobal.function.js","sourceRoot":"","sources":["../../../ts/tag/update/getNewGlobal.function.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,YAAY,CAAC,OAAoB;IAC/C,CAAC;IAAC,OAA8B,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"getNewGlobal.function.js","sourceRoot":"","sources":["../../../ts/tag/update/getNewGlobal.function.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,YAAY,CAAC,OAAoB;IAC/C,CAAC;IAAC,OAA8B,CAAC,WAAW,GAAI,OAA8B,CAAC,WAAW,IAAI,CAAC,CAAA;IAC/F,mDAAmD;IACnD,OAAO,OAAO,CAAC,MAAM,GAAG,EAAE,CAAA;AAC5B,CAAC"}
|
|
@@ -38,6 +38,7 @@ insertBefore) {
|
|
|
38
38
|
function processFirstTagValue(tagJsType, contextItem, value, ownerSupport, // owningSupport
|
|
39
39
|
counts, // {added:0, removed:0}
|
|
40
40
|
appendTo, insertBefore) {
|
|
41
|
+
++contextItem.renderCount;
|
|
41
42
|
switch (tagJsType) {
|
|
42
43
|
// TODO: Do we ever get in here? because dom, tag, and component are covered below
|
|
43
44
|
case ValueTypes.templater:
|