@signalium/query 1.0.14 → 1.0.16
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/CHANGELOG.md +13 -0
- package/dist/cjs/development/index.js +11 -2
- package/dist/cjs/development/index.js.map +1 -1
- package/dist/cjs/production/index.js +11 -2
- package/dist/cjs/production/index.js.map +1 -1
- package/dist/esm/development/index.js +11 -2
- package/dist/esm/development/index.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/production/index.js +11 -2
- package/dist/esm/production/index.js.map +1 -1
- package/dist/esm/proxy.d.ts +4 -2
- package/dist/esm/proxy.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export type { Draft } from './utils.js';
|
|
|
10
10
|
export { NetworkManager, NoOpNetworkManager, defaultNetworkManager, NetworkManagerContext } from './NetworkManager.js';
|
|
11
11
|
export { MemoryEvictionManager, NoOpMemoryEvictionManager } from './MemoryEvictionManager.js';
|
|
12
12
|
export { RefetchManager, NoOpRefetchManager } from './RefetchManager.js';
|
|
13
|
+
export { Entity } from './proxy.js';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAChH,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC/D,O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AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -301,7 +301,7 @@ function defineUnion(...types) {
|
|
|
301
301
|
return new ValidatorDef(2, mask | Mask.UNION, void 0, values);
|
|
302
302
|
}
|
|
303
303
|
if (shape === void 0) {
|
|
304
|
-
return ValidatorDef.cloneWith(definition, mask
|
|
304
|
+
return ValidatorDef.cloneWith(definition, mask, values);
|
|
305
305
|
}
|
|
306
306
|
return new ValidatorDef(1, mask | Mask.UNION, shape, values);
|
|
307
307
|
}
|
|
@@ -698,6 +698,8 @@ const noopWarn = () => {
|
|
|
698
698
|
const entries$1 = Object.entries;
|
|
699
699
|
const isArray = Array.isArray;
|
|
700
700
|
const PROXY_ID = /* @__PURE__ */ new WeakMap();
|
|
701
|
+
class Entity {
|
|
702
|
+
}
|
|
701
703
|
function parseUnionValue(valueType, value, unionDef, path, warn = noopWarn) {
|
|
702
704
|
if (valueType === Mask.ARRAY) {
|
|
703
705
|
const shape = unionDef.shape[ARRAY_KEY];
|
|
@@ -842,7 +844,7 @@ function parseValue(value, propDef, path, skipFallbacks = false, warn = noopWarn
|
|
|
842
844
|
}
|
|
843
845
|
return value;
|
|
844
846
|
}
|
|
845
|
-
if ((
|
|
847
|
+
if ((propMask & Mask.UNION) !== 0) {
|
|
846
848
|
return parseUnionValue(
|
|
847
849
|
valueType,
|
|
848
850
|
value,
|
|
@@ -854,6 +856,9 @@ function parseValue(value, propDef, path, skipFallbacks = false, warn = noopWarn
|
|
|
854
856
|
if (valueType === Mask.ARRAY) {
|
|
855
857
|
return parseArrayValue(value, propDef.shape, path, warn);
|
|
856
858
|
}
|
|
859
|
+
if ((propMask & Mask.RECORD) !== 0) {
|
|
860
|
+
return parseRecordValue(value, propDef.shape, path, warn);
|
|
861
|
+
}
|
|
857
862
|
return parseObjectValue(value, propDef, path, warn);
|
|
858
863
|
}
|
|
859
864
|
}
|
|
@@ -879,6 +884,9 @@ function createEntityProxy(id, entityRecord, def, entityRelay, scopeOwner, warn
|
|
|
879
884
|
});
|
|
880
885
|
let proxy;
|
|
881
886
|
const handler = {
|
|
887
|
+
getPrototypeOf() {
|
|
888
|
+
return Entity.prototype;
|
|
889
|
+
},
|
|
882
890
|
get(target, prop) {
|
|
883
891
|
if (prop === "toJSON") {
|
|
884
892
|
return toJSON;
|
|
@@ -2957,6 +2965,7 @@ function mutation(mutationDefinitionBuilder) {
|
|
|
2957
2965
|
}
|
|
2958
2966
|
export {
|
|
2959
2967
|
ARRAY_KEY,
|
|
2968
|
+
Entity,
|
|
2960
2969
|
Mask,
|
|
2961
2970
|
MemoryEvictionManager,
|
|
2962
2971
|
NetworkManager,
|