@spirobel/mininext 0.2.26 → 0.2.27

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/html.js CHANGED
@@ -59,7 +59,9 @@ export function html(strings, ...values) {
59
59
  if (Array.isArray(value) &&
60
60
  value.every((val) => val instanceof HtmlString)) {
61
61
  // If the value is an array of HtmlString objects, add the whole array as a single value
62
- values[index] = value;
62
+ const notResolved = new HtmlString(...value);
63
+ notResolved.resolved = false;
64
+ values[index] = notResolved;
63
65
  htmlStringArray.resolved = false; // we could bother with .find here
64
66
  }
65
67
  else if (typeof value === "function") {
@@ -108,7 +110,9 @@ function JsonTemplateProcessor(danger = false) {
108
110
  if (Array.isArray(value) &&
109
111
  value.every((val) => val instanceof HtmlString)) {
110
112
  // If the value is an array of HtmlString objects, add the whole array as a single value
111
- values[index] = value;
113
+ const notResolved = new HtmlString(...value);
114
+ notResolved.resolved = false;
115
+ values[index] = notResolved;
112
116
  jsonStringArray.resolved = false; // we could bother with .find here
113
117
  }
114
118
  else if (typeof value === "function") {
package/mininext/html.ts CHANGED
@@ -82,7 +82,9 @@ export function html<X = unknown>(
82
82
  value.every((val) => val instanceof HtmlString)
83
83
  ) {
84
84
  // If the value is an array of HtmlString objects, add the whole array as a single value
85
- values[index] = value;
85
+ const notResolved = new HtmlString(...(value as any[]));
86
+ notResolved.resolved = false;
87
+ values[index] = notResolved;
86
88
  htmlStringArray.resolved = false; // we could bother with .find here
87
89
  } else if (typeof value === "function") {
88
90
  htmlStringArray.resolved = false;
@@ -145,7 +147,9 @@ function JsonTemplateProcessor(danger: boolean = false) {
145
147
  value.every((val) => val instanceof HtmlString)
146
148
  ) {
147
149
  // If the value is an array of HtmlString objects, add the whole array as a single value
148
- values[index] = value;
150
+ const notResolved = new HtmlString(...(value as any[]));
151
+ notResolved.resolved = false;
152
+ values[index] = notResolved;
149
153
  jsonStringArray.resolved = false; // we could bother with .find here
150
154
  } else if (typeof value === "function") {
151
155
  jsonStringArray.resolved = false;
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  },
14
14
  "files": ["dist", "mininext"],
15
- "version": "0.2.26",
15
+ "version": "0.2.27",
16
16
  "devDependencies": {
17
17
  "@types/bun": "latest"
18
18
  },