solid-js 1.5.8 → 1.6.0-beta.1

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/dev.cjs CHANGED
@@ -564,11 +564,11 @@ function serializeGraph(owner) {
564
564
  ...(owner.owned ? serializeChildren(owner) : {})
565
565
  };
566
566
  }
567
- function createContext(defaultValue) {
567
+ function createContext(defaultValue, options) {
568
568
  const id = Symbol("context");
569
569
  return {
570
570
  id,
571
- Provider: createProvider(id),
571
+ Provider: createProvider(id, options),
572
572
  defaultValue
573
573
  };
574
574
  }
@@ -962,7 +962,7 @@ function resolveChildren(children) {
962
962
  }
963
963
  return children;
964
964
  }
965
- function createProvider(id) {
965
+ function createProvider(id, options) {
966
966
  return function provider(props) {
967
967
  let res;
968
968
  createRenderEffect(() => res = untrack(() => {
@@ -970,7 +970,7 @@ function createProvider(id) {
970
970
  [id]: props.value
971
971
  };
972
972
  return children(() => props.children);
973
- }));
973
+ }), undefined, options);
974
974
  return res;
975
975
  };
976
976
  }
@@ -1259,29 +1259,41 @@ function resolveSource(s) {
1259
1259
  return (s = typeof s === "function" ? s() : s) == null ? {} : s;
1260
1260
  }
1261
1261
  function mergeProps(...sources) {
1262
- return new Proxy({
1263
- get(property) {
1264
- for (let i = sources.length - 1; i >= 0; i--) {
1265
- const v = resolveSource(sources[i])[property];
1266
- if (v !== undefined) return v;
1267
- }
1268
- },
1269
- has(property) {
1270
- for (let i = sources.length - 1; i >= 0; i--) {
1271
- if (property in resolveSource(sources[i])) return true;
1262
+ if (sources.some(s => s && ($PROXY in s || typeof s === "function"))) {
1263
+ return new Proxy({
1264
+ get(property) {
1265
+ for (let i = sources.length - 1; i >= 0; i--) {
1266
+ const v = resolveSource(sources[i])[property];
1267
+ if (v !== undefined) return v;
1268
+ }
1269
+ },
1270
+ has(property) {
1271
+ for (let i = sources.length - 1; i >= 0; i--) {
1272
+ if (property in resolveSource(sources[i])) return true;
1273
+ }
1274
+ return false;
1275
+ },
1276
+ keys() {
1277
+ const keys = [];
1278
+ for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1279
+ return [...new Set(keys)];
1272
1280
  }
1273
- return false;
1274
- },
1275
- keys() {
1276
- const keys = [];
1277
- for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1278
- return [...new Set(keys)];
1281
+ }, propTraps);
1282
+ }
1283
+ const target = {};
1284
+ for (let i = 0; i < sources.length; i++) {
1285
+ if (sources[i]) {
1286
+ const descriptors = Object.getOwnPropertyDescriptors(sources[i]);
1287
+ Object.defineProperties(target, descriptors);
1279
1288
  }
1280
- }, propTraps);
1289
+ }
1290
+ return target;
1281
1291
  }
1282
1292
  function splitProps(props, ...keys) {
1283
1293
  const blocked = new Set(keys.flat());
1284
1294
  const descriptors = Object.getOwnPropertyDescriptors(props);
1295
+ const isProxy = ($PROXY in props);
1296
+ if (!isProxy) keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));
1285
1297
  const res = keys.map(k => {
1286
1298
  const clone = {};
1287
1299
  for (let i = 0; i < k.length; i++) {
@@ -1297,17 +1309,19 @@ function splitProps(props, ...keys) {
1297
1309
  }
1298
1310
  return clone;
1299
1311
  });
1300
- res.push(new Proxy({
1301
- get(property) {
1302
- return blocked.has(property) ? undefined : props[property];
1303
- },
1304
- has(property) {
1305
- return blocked.has(property) ? false : property in props;
1306
- },
1307
- keys() {
1308
- return Object.keys(props).filter(k => !blocked.has(k));
1309
- }
1310
- }, propTraps));
1312
+ if (isProxy) {
1313
+ res.push(new Proxy({
1314
+ get(property) {
1315
+ return blocked.has(property) ? undefined : props[property];
1316
+ },
1317
+ has(property) {
1318
+ return blocked.has(property) ? false : property in props;
1319
+ },
1320
+ keys() {
1321
+ return Object.keys(props).filter(k => !blocked.has(k));
1322
+ }
1323
+ }, propTraps));
1324
+ }
1311
1325
  return res;
1312
1326
  }
1313
1327
  function lazy(fn) {
package/dist/dev.js CHANGED
@@ -560,11 +560,11 @@ function serializeGraph(owner) {
560
560
  ...(owner.owned ? serializeChildren(owner) : {})
561
561
  };
562
562
  }
563
- function createContext(defaultValue) {
563
+ function createContext(defaultValue, options) {
564
564
  const id = Symbol("context");
565
565
  return {
566
566
  id,
567
- Provider: createProvider(id),
567
+ Provider: createProvider(id, options),
568
568
  defaultValue
569
569
  };
570
570
  }
@@ -958,7 +958,7 @@ function resolveChildren(children) {
958
958
  }
959
959
  return children;
960
960
  }
961
- function createProvider(id) {
961
+ function createProvider(id, options) {
962
962
  return function provider(props) {
963
963
  let res;
964
964
  createRenderEffect(() => res = untrack(() => {
@@ -966,7 +966,7 @@ function createProvider(id) {
966
966
  [id]: props.value
967
967
  };
968
968
  return children(() => props.children);
969
- }));
969
+ }), undefined, options);
970
970
  return res;
971
971
  };
972
972
  }
@@ -1255,29 +1255,41 @@ function resolveSource(s) {
1255
1255
  return (s = typeof s === "function" ? s() : s) == null ? {} : s;
1256
1256
  }
1257
1257
  function mergeProps(...sources) {
1258
- return new Proxy({
1259
- get(property) {
1260
- for (let i = sources.length - 1; i >= 0; i--) {
1261
- const v = resolveSource(sources[i])[property];
1262
- if (v !== undefined) return v;
1263
- }
1264
- },
1265
- has(property) {
1266
- for (let i = sources.length - 1; i >= 0; i--) {
1267
- if (property in resolveSource(sources[i])) return true;
1258
+ if (sources.some(s => s && ($PROXY in s || typeof s === "function"))) {
1259
+ return new Proxy({
1260
+ get(property) {
1261
+ for (let i = sources.length - 1; i >= 0; i--) {
1262
+ const v = resolveSource(sources[i])[property];
1263
+ if (v !== undefined) return v;
1264
+ }
1265
+ },
1266
+ has(property) {
1267
+ for (let i = sources.length - 1; i >= 0; i--) {
1268
+ if (property in resolveSource(sources[i])) return true;
1269
+ }
1270
+ return false;
1271
+ },
1272
+ keys() {
1273
+ const keys = [];
1274
+ for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1275
+ return [...new Set(keys)];
1268
1276
  }
1269
- return false;
1270
- },
1271
- keys() {
1272
- const keys = [];
1273
- for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1274
- return [...new Set(keys)];
1277
+ }, propTraps);
1278
+ }
1279
+ const target = {};
1280
+ for (let i = 0; i < sources.length; i++) {
1281
+ if (sources[i]) {
1282
+ const descriptors = Object.getOwnPropertyDescriptors(sources[i]);
1283
+ Object.defineProperties(target, descriptors);
1275
1284
  }
1276
- }, propTraps);
1285
+ }
1286
+ return target;
1277
1287
  }
1278
1288
  function splitProps(props, ...keys) {
1279
1289
  const blocked = new Set(keys.flat());
1280
1290
  const descriptors = Object.getOwnPropertyDescriptors(props);
1291
+ const isProxy = ($PROXY in props);
1292
+ if (!isProxy) keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));
1281
1293
  const res = keys.map(k => {
1282
1294
  const clone = {};
1283
1295
  for (let i = 0; i < k.length; i++) {
@@ -1293,17 +1305,19 @@ function splitProps(props, ...keys) {
1293
1305
  }
1294
1306
  return clone;
1295
1307
  });
1296
- res.push(new Proxy({
1297
- get(property) {
1298
- return blocked.has(property) ? undefined : props[property];
1299
- },
1300
- has(property) {
1301
- return blocked.has(property) ? false : property in props;
1302
- },
1303
- keys() {
1304
- return Object.keys(props).filter(k => !blocked.has(k));
1305
- }
1306
- }, propTraps));
1308
+ if (isProxy) {
1309
+ res.push(new Proxy({
1310
+ get(property) {
1311
+ return blocked.has(property) ? undefined : props[property];
1312
+ },
1313
+ has(property) {
1314
+ return blocked.has(property) ? false : property in props;
1315
+ },
1316
+ keys() {
1317
+ return Object.keys(props).filter(k => !blocked.has(k));
1318
+ }
1319
+ }, propTraps));
1320
+ }
1307
1321
  return res;
1308
1322
  }
1309
1323
  function lazy(fn) {
package/dist/solid.cjs CHANGED
@@ -503,7 +503,7 @@ function resumeEffects(e) {
503
503
  Effects.push.apply(Effects, e);
504
504
  e.length = 0;
505
505
  }
506
- function createContext(defaultValue) {
506
+ function createContext(defaultValue, options) {
507
507
  const id = Symbol("context");
508
508
  return {
509
509
  id,
@@ -899,7 +899,7 @@ function resolveChildren(children) {
899
899
  }
900
900
  return children;
901
901
  }
902
- function createProvider(id) {
902
+ function createProvider(id, options) {
903
903
  return function provider(props) {
904
904
  let res;
905
905
  createRenderEffect(() => res = untrack(() => {
@@ -907,7 +907,7 @@ function createProvider(id) {
907
907
  [id]: props.value
908
908
  };
909
909
  return children(() => props.children);
910
- }));
910
+ }), undefined);
911
911
  return res;
912
912
  };
913
913
  }
@@ -1173,29 +1173,41 @@ function resolveSource(s) {
1173
1173
  return (s = typeof s === "function" ? s() : s) == null ? {} : s;
1174
1174
  }
1175
1175
  function mergeProps(...sources) {
1176
- return new Proxy({
1177
- get(property) {
1178
- for (let i = sources.length - 1; i >= 0; i--) {
1179
- const v = resolveSource(sources[i])[property];
1180
- if (v !== undefined) return v;
1181
- }
1182
- },
1183
- has(property) {
1184
- for (let i = sources.length - 1; i >= 0; i--) {
1185
- if (property in resolveSource(sources[i])) return true;
1176
+ if (sources.some(s => s && ($PROXY in s || typeof s === "function"))) {
1177
+ return new Proxy({
1178
+ get(property) {
1179
+ for (let i = sources.length - 1; i >= 0; i--) {
1180
+ const v = resolveSource(sources[i])[property];
1181
+ if (v !== undefined) return v;
1182
+ }
1183
+ },
1184
+ has(property) {
1185
+ for (let i = sources.length - 1; i >= 0; i--) {
1186
+ if (property in resolveSource(sources[i])) return true;
1187
+ }
1188
+ return false;
1189
+ },
1190
+ keys() {
1191
+ const keys = [];
1192
+ for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1193
+ return [...new Set(keys)];
1186
1194
  }
1187
- return false;
1188
- },
1189
- keys() {
1190
- const keys = [];
1191
- for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1192
- return [...new Set(keys)];
1195
+ }, propTraps);
1196
+ }
1197
+ const target = {};
1198
+ for (let i = 0; i < sources.length; i++) {
1199
+ if (sources[i]) {
1200
+ const descriptors = Object.getOwnPropertyDescriptors(sources[i]);
1201
+ Object.defineProperties(target, descriptors);
1193
1202
  }
1194
- }, propTraps);
1203
+ }
1204
+ return target;
1195
1205
  }
1196
1206
  function splitProps(props, ...keys) {
1197
1207
  const blocked = new Set(keys.flat());
1198
1208
  const descriptors = Object.getOwnPropertyDescriptors(props);
1209
+ const isProxy = ($PROXY in props);
1210
+ if (!isProxy) keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));
1199
1211
  const res = keys.map(k => {
1200
1212
  const clone = {};
1201
1213
  for (let i = 0; i < k.length; i++) {
@@ -1211,17 +1223,19 @@ function splitProps(props, ...keys) {
1211
1223
  }
1212
1224
  return clone;
1213
1225
  });
1214
- res.push(new Proxy({
1215
- get(property) {
1216
- return blocked.has(property) ? undefined : props[property];
1217
- },
1218
- has(property) {
1219
- return blocked.has(property) ? false : property in props;
1220
- },
1221
- keys() {
1222
- return Object.keys(props).filter(k => !blocked.has(k));
1223
- }
1224
- }, propTraps));
1226
+ if (isProxy) {
1227
+ res.push(new Proxy({
1228
+ get(property) {
1229
+ return blocked.has(property) ? undefined : props[property];
1230
+ },
1231
+ has(property) {
1232
+ return blocked.has(property) ? false : property in props;
1233
+ },
1234
+ keys() {
1235
+ return Object.keys(props).filter(k => !blocked.has(k));
1236
+ }
1237
+ }, propTraps));
1238
+ }
1225
1239
  return res;
1226
1240
  }
1227
1241
  function lazy(fn) {
package/dist/solid.js CHANGED
@@ -499,7 +499,7 @@ function resumeEffects(e) {
499
499
  Effects.push.apply(Effects, e);
500
500
  e.length = 0;
501
501
  }
502
- function createContext(defaultValue) {
502
+ function createContext(defaultValue, options) {
503
503
  const id = Symbol("context");
504
504
  return {
505
505
  id,
@@ -895,7 +895,7 @@ function resolveChildren(children) {
895
895
  }
896
896
  return children;
897
897
  }
898
- function createProvider(id) {
898
+ function createProvider(id, options) {
899
899
  return function provider(props) {
900
900
  let res;
901
901
  createRenderEffect(() => res = untrack(() => {
@@ -903,7 +903,7 @@ function createProvider(id) {
903
903
  [id]: props.value
904
904
  };
905
905
  return children(() => props.children);
906
- }));
906
+ }), undefined);
907
907
  return res;
908
908
  };
909
909
  }
@@ -1169,29 +1169,41 @@ function resolveSource(s) {
1169
1169
  return (s = typeof s === "function" ? s() : s) == null ? {} : s;
1170
1170
  }
1171
1171
  function mergeProps(...sources) {
1172
- return new Proxy({
1173
- get(property) {
1174
- for (let i = sources.length - 1; i >= 0; i--) {
1175
- const v = resolveSource(sources[i])[property];
1176
- if (v !== undefined) return v;
1177
- }
1178
- },
1179
- has(property) {
1180
- for (let i = sources.length - 1; i >= 0; i--) {
1181
- if (property in resolveSource(sources[i])) return true;
1172
+ if (sources.some(s => s && ($PROXY in s || typeof s === "function"))) {
1173
+ return new Proxy({
1174
+ get(property) {
1175
+ for (let i = sources.length - 1; i >= 0; i--) {
1176
+ const v = resolveSource(sources[i])[property];
1177
+ if (v !== undefined) return v;
1178
+ }
1179
+ },
1180
+ has(property) {
1181
+ for (let i = sources.length - 1; i >= 0; i--) {
1182
+ if (property in resolveSource(sources[i])) return true;
1183
+ }
1184
+ return false;
1185
+ },
1186
+ keys() {
1187
+ const keys = [];
1188
+ for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1189
+ return [...new Set(keys)];
1182
1190
  }
1183
- return false;
1184
- },
1185
- keys() {
1186
- const keys = [];
1187
- for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));
1188
- return [...new Set(keys)];
1191
+ }, propTraps);
1192
+ }
1193
+ const target = {};
1194
+ for (let i = 0; i < sources.length; i++) {
1195
+ if (sources[i]) {
1196
+ const descriptors = Object.getOwnPropertyDescriptors(sources[i]);
1197
+ Object.defineProperties(target, descriptors);
1189
1198
  }
1190
- }, propTraps);
1199
+ }
1200
+ return target;
1191
1201
  }
1192
1202
  function splitProps(props, ...keys) {
1193
1203
  const blocked = new Set(keys.flat());
1194
1204
  const descriptors = Object.getOwnPropertyDescriptors(props);
1205
+ const isProxy = ($PROXY in props);
1206
+ if (!isProxy) keys.push(Object.keys(descriptors).filter(k => !blocked.has(k)));
1195
1207
  const res = keys.map(k => {
1196
1208
  const clone = {};
1197
1209
  for (let i = 0; i < k.length; i++) {
@@ -1207,17 +1219,19 @@ function splitProps(props, ...keys) {
1207
1219
  }
1208
1220
  return clone;
1209
1221
  });
1210
- res.push(new Proxy({
1211
- get(property) {
1212
- return blocked.has(property) ? undefined : props[property];
1213
- },
1214
- has(property) {
1215
- return blocked.has(property) ? false : property in props;
1216
- },
1217
- keys() {
1218
- return Object.keys(props).filter(k => !blocked.has(k));
1219
- }
1220
- }, propTraps));
1222
+ if (isProxy) {
1223
+ res.push(new Proxy({
1224
+ get(property) {
1225
+ return blocked.has(property) ? undefined : props[property];
1226
+ },
1227
+ has(property) {
1228
+ return blocked.has(property) ? false : property in props;
1229
+ },
1230
+ keys() {
1231
+ return Object.keys(props).filter(k => !blocked.has(k));
1232
+ }
1233
+ }, propTraps));
1234
+ }
1221
1235
  return res;
1222
1236
  }
1223
1237
  function lazy(fn) {
@@ -196,7 +196,7 @@ function createHTML(r, {
196
196
  templates[i].innerHTML = html[i];
197
197
  const nomarkers = templates[i].content.querySelectorAll("script,style");
198
198
  for (let j = 0; j < nomarkers.length; j++) {
199
- const d = nomarkers[j].firstChild.data || "";
199
+ const d = nomarkers[j].firstChild?.data || "";
200
200
  if (d.indexOf(marker) > -1) {
201
201
  const parts = d.split(marker).reduce((memo, p, i) => {
202
202
  i && memo.push("");
@@ -405,15 +405,35 @@ function createHTML(r, {
405
405
  const isSVG = r.SVGElements.has(node.name);
406
406
  const isCE = node.name.includes("-");
407
407
  options.hasCustomElement = isCE;
408
- for (let i = 0; i < keys.length; i++) {
409
- const name = keys[i],
410
- value = node.attrs[name];
411
- if (value.includes("###")) {
412
- delete node.attrs[name];
413
- parseAttribute(tag, name, value, isSVG, isCE, options);
414
- } else if (name === "###") {
415
- delete node.attrs[name];
416
- options.exprs.push(`r.spread(${tag},exprs[${options.counter++}],${isSVG},${!!node.children.length})`);
408
+ if (keys.includes("###")) {
409
+ const spreadArgs = [];
410
+ let current = "";
411
+ for (let i = 0; i < keys.length; i++) {
412
+ const name = keys[i],
413
+ value = node.attrs[name];
414
+ if (value.includes("###")) {
415
+ let count = options.counter++;
416
+ current += `${name}: ${name !== "ref" ? `typeof exprs[${count}] === "function" ? exprs[${count}]() : ` : ""}exprs[${count}],`;
417
+ delete node.attrs[name];
418
+ } else if (name === "###") {
419
+ if (current.length) {
420
+ spreadArgs.push(`()=>({${current}})`);
421
+ current = "";
422
+ }
423
+ spreadArgs.push(`exprs[${options.counter++}]`);
424
+ delete node.attrs[name];
425
+ }
426
+ }
427
+ if (current.length) spreadArgs.push(`()=>({${current}})`);
428
+ options.exprs.push(`r.spread(${tag},${spreadArgs.length === 1 ? `typeof ${spreadArgs[0]} === "function" ? r.mergeProps(${spreadArgs[0]}) : ${spreadArgs[0]}` : `r.mergeProps(${spreadArgs.join(",")})`},${isSVG},${!!node.children.length})`);
429
+ } else {
430
+ for (let i = 0; i < keys.length; i++) {
431
+ const name = keys[i],
432
+ value = node.attrs[name];
433
+ if (value.includes("###")) {
434
+ delete node.attrs[name];
435
+ parseAttribute(tag, name, value, isSVG, isCE, options);
436
+ }
417
437
  }
418
438
  }
419
439
  options.path = tag;
package/html/dist/html.js CHANGED
@@ -194,7 +194,7 @@ function createHTML(r, {
194
194
  templates[i].innerHTML = html[i];
195
195
  const nomarkers = templates[i].content.querySelectorAll("script,style");
196
196
  for (let j = 0; j < nomarkers.length; j++) {
197
- const d = nomarkers[j].firstChild.data || "";
197
+ const d = nomarkers[j].firstChild?.data || "";
198
198
  if (d.indexOf(marker) > -1) {
199
199
  const parts = d.split(marker).reduce((memo, p, i) => {
200
200
  i && memo.push("");
@@ -403,15 +403,35 @@ function createHTML(r, {
403
403
  const isSVG = r.SVGElements.has(node.name);
404
404
  const isCE = node.name.includes("-");
405
405
  options.hasCustomElement = isCE;
406
- for (let i = 0; i < keys.length; i++) {
407
- const name = keys[i],
408
- value = node.attrs[name];
409
- if (value.includes("###")) {
410
- delete node.attrs[name];
411
- parseAttribute(tag, name, value, isSVG, isCE, options);
412
- } else if (name === "###") {
413
- delete node.attrs[name];
414
- options.exprs.push(`r.spread(${tag},exprs[${options.counter++}],${isSVG},${!!node.children.length})`);
406
+ if (keys.includes("###")) {
407
+ const spreadArgs = [];
408
+ let current = "";
409
+ for (let i = 0; i < keys.length; i++) {
410
+ const name = keys[i],
411
+ value = node.attrs[name];
412
+ if (value.includes("###")) {
413
+ let count = options.counter++;
414
+ current += `${name}: ${name !== "ref" ? `typeof exprs[${count}] === "function" ? exprs[${count}]() : ` : ""}exprs[${count}],`;
415
+ delete node.attrs[name];
416
+ } else if (name === "###") {
417
+ if (current.length) {
418
+ spreadArgs.push(`()=>({${current}})`);
419
+ current = "";
420
+ }
421
+ spreadArgs.push(`exprs[${options.counter++}]`);
422
+ delete node.attrs[name];
423
+ }
424
+ }
425
+ if (current.length) spreadArgs.push(`()=>({${current}})`);
426
+ options.exprs.push(`r.spread(${tag},${spreadArgs.length === 1 ? `typeof ${spreadArgs[0]} === "function" ? r.mergeProps(${spreadArgs[0]}) : ${spreadArgs[0]}` : `r.mergeProps(${spreadArgs.join(",")})`},${isSVG},${!!node.children.length})`);
427
+ } else {
428
+ for (let i = 0; i < keys.length; i++) {
429
+ const name = keys[i],
430
+ value = node.attrs[name];
431
+ if (value.includes("###")) {
432
+ delete node.attrs[name];
433
+ parseAttribute(tag, name, value, isSVG, isCE, options);
434
+ }
415
435
  }
416
436
  }
417
437
  options.path = tag;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-js",
3
3
  "description": "A declarative JavaScript library for building user interfaces.",
4
- "version": "1.5.8",
4
+ "version": "1.6.0-beta.1",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -69,7 +69,7 @@ function getDataNodes(target) {
69
69
  function getDataNode(nodes, property, value) {
70
70
  return nodes[property] || (nodes[property] = createDataNode(value));
71
71
  }
72
- function proxyDescriptor(target, property) {
72
+ function proxyDescriptor$1(target, property) {
73
73
  const desc = Reflect.getOwnPropertyDescriptor(target, property);
74
74
  if (!desc || desc.get || !desc.configurable || property === solidJs.$PROXY || property === $NODE || property === $NAME) return desc;
75
75
  delete desc.value;
@@ -128,7 +128,7 @@ const proxyTraps$1 = {
128
128
  return true;
129
129
  },
130
130
  ownKeys: ownKeys,
131
- getOwnPropertyDescriptor: proxyDescriptor
131
+ getOwnPropertyDescriptor: proxyDescriptor$1
132
132
  };
133
133
  function setProperty(state, property, value, deleting = false) {
134
134
  if (!deleting && state[property] === value) return;
@@ -228,6 +228,15 @@ function createStore(...[store, options]) {
228
228
  return [wrappedStore, setStore];
229
229
  }
230
230
 
231
+ function proxyDescriptor(target, property) {
232
+ const desc = Reflect.getOwnPropertyDescriptor(target, property);
233
+ if (!desc || desc.get || desc.set || !desc.configurable || property === solidJs.$PROXY || property === $NODE || property === $NAME) return desc;
234
+ delete desc.value;
235
+ delete desc.writable;
236
+ desc.get = () => target[solidJs.$PROXY][property];
237
+ desc.set = v => target[solidJs.$PROXY][property] = v;
238
+ return desc;
239
+ }
231
240
  const proxyTraps = {
232
241
  get(target, property, receiver) {
233
242
  if (property === $RAW) return target;
package/store/dist/dev.js CHANGED
@@ -65,7 +65,7 @@ function getDataNodes(target) {
65
65
  function getDataNode(nodes, property, value) {
66
66
  return nodes[property] || (nodes[property] = createDataNode(value));
67
67
  }
68
- function proxyDescriptor(target, property) {
68
+ function proxyDescriptor$1(target, property) {
69
69
  const desc = Reflect.getOwnPropertyDescriptor(target, property);
70
70
  if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME) return desc;
71
71
  delete desc.value;
@@ -124,7 +124,7 @@ const proxyTraps$1 = {
124
124
  return true;
125
125
  },
126
126
  ownKeys: ownKeys,
127
- getOwnPropertyDescriptor: proxyDescriptor
127
+ getOwnPropertyDescriptor: proxyDescriptor$1
128
128
  };
129
129
  function setProperty(state, property, value, deleting = false) {
130
130
  if (!deleting && state[property] === value) return;
@@ -224,6 +224,15 @@ function createStore(...[store, options]) {
224
224
  return [wrappedStore, setStore];
225
225
  }
226
226
 
227
+ function proxyDescriptor(target, property) {
228
+ const desc = Reflect.getOwnPropertyDescriptor(target, property);
229
+ if (!desc || desc.get || desc.set || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME) return desc;
230
+ delete desc.value;
231
+ delete desc.writable;
232
+ desc.get = () => target[$PROXY][property];
233
+ desc.set = v => target[$PROXY][property] = v;
234
+ return desc;
235
+ }
227
236
  const proxyTraps = {
228
237
  get(target, property, receiver) {
229
238
  if (property === $RAW) return target;