storybook-addon-sdc 0.27.1 → 0.27.2
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/preset.js +15 -1
- package/dist/renderer/twig.js +15 -1
- package/dist/renderer/twing.js +15 -1
- package/package.json +1 -1
package/dist/preset.js
CHANGED
|
@@ -206,11 +206,13 @@ function listDir(root) {
|
|
|
206
206
|
import DrupalAttribute from "drupal-attribute";
|
|
207
207
|
|
|
208
208
|
// src/renderer/collections.ts
|
|
209
|
+
var TWIG_JS_KEYS = "_keys";
|
|
209
210
|
function entries(value) {
|
|
210
211
|
if (value == null) return [];
|
|
211
212
|
if (value instanceof Map) return [...value.entries()];
|
|
212
213
|
if (Array.isArray(value)) return value.map((x, i) => [i, x]);
|
|
213
|
-
if (typeof value === "object")
|
|
214
|
+
if (typeof value === "object")
|
|
215
|
+
return Object.entries(value).filter(([key]) => key !== TWIG_JS_KEYS);
|
|
214
216
|
return [];
|
|
215
217
|
}
|
|
216
218
|
function toText(value) {
|
|
@@ -288,6 +290,18 @@ function patchDrupalAttribute(AttrClass) {
|
|
|
288
290
|
}
|
|
289
291
|
);
|
|
290
292
|
}
|
|
293
|
+
const set = Reflect.get(proto, "set");
|
|
294
|
+
if (typeof set === "function") {
|
|
295
|
+
Reflect.set(
|
|
296
|
+
proto,
|
|
297
|
+
"set",
|
|
298
|
+
function(key, value) {
|
|
299
|
+
if (key === TWIG_JS_KEYS) return this;
|
|
300
|
+
const result = Reflect.apply(set, this, [key, value]);
|
|
301
|
+
return result;
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
}
|
|
291
305
|
Object.defineProperty(proto, PATCHED, {
|
|
292
306
|
value: true,
|
|
293
307
|
enumerable: false
|
package/dist/renderer/twig.js
CHANGED
|
@@ -5,11 +5,13 @@ import DrupalAttribute3 from "drupal-attribute";
|
|
|
5
5
|
var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
6
6
|
|
|
7
7
|
// src/renderer/collections.ts
|
|
8
|
+
var TWIG_JS_KEYS = "_keys";
|
|
8
9
|
function entries(value) {
|
|
9
10
|
if (value == null) return [];
|
|
10
11
|
if (value instanceof Map) return [...value.entries()];
|
|
11
12
|
if (Array.isArray(value)) return value.map((x, i) => [i, x]);
|
|
12
|
-
if (typeof value === "object")
|
|
13
|
+
if (typeof value === "object")
|
|
14
|
+
return Object.entries(value).filter(([key]) => key !== TWIG_JS_KEYS);
|
|
13
15
|
return [];
|
|
14
16
|
}
|
|
15
17
|
function toText(value) {
|
|
@@ -99,6 +101,18 @@ function patchDrupalAttribute(AttrClass) {
|
|
|
99
101
|
}
|
|
100
102
|
);
|
|
101
103
|
}
|
|
104
|
+
const set = Reflect.get(proto, "set");
|
|
105
|
+
if (typeof set === "function") {
|
|
106
|
+
Reflect.set(
|
|
107
|
+
proto,
|
|
108
|
+
"set",
|
|
109
|
+
function(key, value) {
|
|
110
|
+
if (key === TWIG_JS_KEYS) return this;
|
|
111
|
+
const result = Reflect.apply(set, this, [key, value]);
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
102
116
|
Object.defineProperty(proto, PATCHED, {
|
|
103
117
|
value: true,
|
|
104
118
|
enumerable: false
|
package/dist/renderer/twing.js
CHANGED
|
@@ -11,11 +11,13 @@ import DrupalAttribute from "drupal-attribute";
|
|
|
11
11
|
var isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
12
12
|
|
|
13
13
|
// src/renderer/collections.ts
|
|
14
|
+
var TWIG_JS_KEYS = "_keys";
|
|
14
15
|
function entries(value) {
|
|
15
16
|
if (value == null) return [];
|
|
16
17
|
if (value instanceof Map) return [...value.entries()];
|
|
17
18
|
if (Array.isArray(value)) return value.map((x, i) => [i, x]);
|
|
18
|
-
if (typeof value === "object")
|
|
19
|
+
if (typeof value === "object")
|
|
20
|
+
return Object.entries(value).filter(([key]) => key !== TWIG_JS_KEYS);
|
|
19
21
|
return [];
|
|
20
22
|
}
|
|
21
23
|
function toText(value) {
|
|
@@ -124,6 +126,18 @@ function patchDrupalAttribute(AttrClass) {
|
|
|
124
126
|
}
|
|
125
127
|
);
|
|
126
128
|
}
|
|
129
|
+
const set = Reflect.get(proto, "set");
|
|
130
|
+
if (typeof set === "function") {
|
|
131
|
+
Reflect.set(
|
|
132
|
+
proto,
|
|
133
|
+
"set",
|
|
134
|
+
function(key, value) {
|
|
135
|
+
if (key === TWIG_JS_KEYS) return this;
|
|
136
|
+
const result = Reflect.apply(set, this, [key, value]);
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
127
141
|
Object.defineProperty(proto, PATCHED, {
|
|
128
142
|
value: true,
|
|
129
143
|
enumerable: false
|