@hf-chimera/store 0.1.0 → 0.2.0
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/README.md +171 -360
- package/dist/defaults-CDnbUToo.cjs +175 -0
- package/dist/defaults-CDnbUToo.cjs.map +1 -0
- package/dist/defaults-DkrKTPXY.mjs +91 -0
- package/dist/defaults-DkrKTPXY.mjs.map +1 -0
- package/dist/defaults.cjs +3 -14
- package/dist/defaults.d.cts +16 -42
- package/dist/defaults.d.cts.map +1 -1
- package/dist/defaults.d.mts +33 -0
- package/dist/defaults.d.mts.map +1 -0
- package/dist/defaults.mjs +3 -0
- package/dist/index.cjs +1709 -23
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +634 -2
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +634 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/{src-C74sq0jQ.js → index.mjs} +252 -246
- package/dist/index.mjs.map +1 -0
- package/dist/types-CNGIuRUw.d.mts +117 -0
- package/dist/types-CNGIuRUw.d.mts.map +1 -0
- package/dist/types-CuI5yXiY.d.cts +117 -0
- package/dist/types-CuI5yXiY.d.cts.map +1 -0
- package/package.json +10 -51
- package/.changeset/README.md +0 -8
- package/CHANGELOG.md +0 -98
- package/dist/adapters/react.cjs +0 -70
- package/dist/adapters/react.cjs.map +0 -1
- package/dist/adapters/react.d.cts +0 -15
- package/dist/adapters/react.d.cts.map +0 -1
- package/dist/adapters/react.d.ts +0 -15
- package/dist/adapters/react.d.ts.map +0 -1
- package/dist/adapters/react.js +0 -69
- package/dist/adapters/react.js.map +0 -1
- package/dist/adapters/vue.cjs +0 -92
- package/dist/adapters/vue.cjs.map +0 -1
- package/dist/adapters/vue.d.cts +0 -19
- package/dist/adapters/vue.d.cts.map +0 -1
- package/dist/adapters/vue.d.ts +0 -19
- package/dist/adapters/vue.d.ts.map +0 -1
- package/dist/adapters/vue.js +0 -91
- package/dist/adapters/vue.js.map +0 -1
- package/dist/defaults-C48gY1ow.cjs +0 -372
- package/dist/defaults-C48gY1ow.cjs.map +0 -1
- package/dist/defaults-CLUQg2zK.js +0 -210
- package/dist/defaults-CLUQg2zK.js.map +0 -1
- package/dist/defaults.cjs.map +0 -1
- package/dist/defaults.d.ts +0 -59
- package/dist/defaults.d.ts.map +0 -1
- package/dist/defaults.js +0 -13
- package/dist/defaults.js.map +0 -1
- package/dist/index-BuYMaiND.d.ts +0 -22
- package/dist/index-BuYMaiND.d.ts.map +0 -1
- package/dist/index-C45y61aH.d.ts +0 -821
- package/dist/index-C45y61aH.d.ts.map +0 -1
- package/dist/index-DP6-nR2O.d.cts +0 -821
- package/dist/index-DP6-nR2O.d.cts.map +0 -1
- package/dist/index-FQNcJwA7.d.cts +0 -22
- package/dist/index-FQNcJwA7.d.cts.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -4
- package/dist/params-B-wurzdZ.d.ts +0 -8
- package/dist/params-B-wurzdZ.d.ts.map +0 -1
- package/dist/params-C5dnCvJr.cjs +0 -47
- package/dist/params-C5dnCvJr.cjs.map +0 -1
- package/dist/params-DmOyCS2B.js +0 -13
- package/dist/params-DmOyCS2B.js.map +0 -1
- package/dist/params-uxNE-e4a.d.cts +0 -8
- package/dist/params-uxNE-e4a.d.cts.map +0 -1
- package/dist/qb-D6vPK6P0.cjs +0 -50
- package/dist/qb-D6vPK6P0.cjs.map +0 -1
- package/dist/qb-pchs-vdM.js +0 -45
- package/dist/qb-pchs-vdM.js.map +0 -1
- package/dist/qb.cjs +0 -5
- package/dist/qb.d.cts +0 -3
- package/dist/qb.d.ts +0 -3
- package/dist/qb.js +0 -5
- package/dist/src-C74sq0jQ.js.map +0 -1
- package/dist/src-YxpDmKvq.cjs +0 -1771
- package/dist/src-YxpDmKvq.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CuI5yXiY.d.cts","names":[],"sources":["../../../src/shared/types.ts","../../../src/filter/constants.ts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AA;EJDC,KAAA,GAAA,OAAA;EAAM,IAAA,GAAA,MAAA;;AAAe,KIMtB,sBJNsB,CAAA,MAAA,CAAA,GAAA;EAAO,GAAA,EIOnC,qBJPmC,CIOb,MJPa,CAAA;EACjC,IAAA,EAAA,OAAA;EAAG,KAAA,EIQH,iBJRG;AAEX,CAAA;AAIY,KIKA,oBJLW,CAAA,MAAA,CAAA,GIKoB,sBJLpB,CIK2C,MJL3C,CAAA,EAAA;AAAM,KIOjB,wBJPiB,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,EIOsB,MJPtB,EAAA,CAAA,EIOiC,MJPjC,EAAA,GAAA,MAAA;AAEd,KIOH,0BAAA,GJPG,CAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,OAAA,EAAA,GAAA,MAAA;AAWH,KIIA,gCJJiC,CAAA,aAAA,MAAA,GAAA,MAAA,CAAA,GAAA;EAOjC,KAAA,EIFJ,IJEI,GAAA,MAAe;EAEf,IAAA,EAAA,OAAA;EACA,KAAA,EIHJ,iBJGyB;CACP;AAAQ,KIDtB,yBAAA,GJCsB,CAAA,KAAA,EIDc,gCJCd,EAAA,GAAA,IAAA,EAAA,GAAA,MAAA;AAA5B,KICM,kBAAA,GJDN;EAAiD,mBAAA,CAAA,EIEhC,0BJFgC;EAAQ,MAAA,CAAA,EIGrD,yBJHqD;CAAnB"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"author": "hewston",
|
|
3
2
|
"name": "@hf-chimera/store",
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Cross-end reactivity API - Core store",
|
|
6
5
|
"license": "MIT",
|
|
6
|
+
"author": "hewston",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"state-management",
|
|
9
9
|
"reactivity",
|
|
10
10
|
"reactive",
|
|
11
11
|
"store",
|
|
12
12
|
"cross-platform",
|
|
13
|
-
"react",
|
|
14
|
-
"query-builder",
|
|
15
13
|
"typescript",
|
|
16
14
|
"fullstack",
|
|
17
15
|
"client-server",
|
|
@@ -31,62 +29,23 @@
|
|
|
31
29
|
"types": "./dist/defaults.d.ts",
|
|
32
30
|
"require": "./dist/defaults.cjs",
|
|
33
31
|
"import": "./dist/defaults.js"
|
|
34
|
-
},
|
|
35
|
-
"./qb": {
|
|
36
|
-
"types": "./dist/qb.d.ts",
|
|
37
|
-
"require": "./dist/qb.cjs",
|
|
38
|
-
"import": "./dist/qb.js"
|
|
39
|
-
},
|
|
40
|
-
"./adapters/react": {
|
|
41
|
-
"types": "./dist/adapters/react.d.ts",
|
|
42
|
-
"require": "./dist/adapters/react.cjs",
|
|
43
|
-
"import": "./dist/adapters/react.js"
|
|
44
|
-
},
|
|
45
|
-
"./adapters/vue": {
|
|
46
|
-
"types": "./dist/adapters/vue.d.ts",
|
|
47
|
-
"require": "./dist/adapters/vue.cjs",
|
|
48
|
-
"import": "./dist/adapters/vue.js"
|
|
49
32
|
}
|
|
50
33
|
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
51
37
|
"bugs": {
|
|
52
38
|
"url": "https://github.com/hf-chimera/store/issues"
|
|
53
39
|
},
|
|
54
40
|
"repository": {
|
|
55
41
|
"url": "https://github.com/hf-chimera/store"
|
|
56
42
|
},
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"@commitlint/cli": "^20.1.0",
|
|
61
|
-
"@commitlint/config-conventional": "^20.0.0",
|
|
62
|
-
"@vitest/coverage-v8": "^4.0.6",
|
|
63
|
-
"@vitest/ui": "^4.0.6",
|
|
64
|
-
"husky": "^9.1.7",
|
|
65
|
-
"tsdown": "^0.15.12",
|
|
66
|
-
"typescript": "^5.9.3",
|
|
67
|
-
"vitest": "^4.0.6"
|
|
68
|
-
},
|
|
69
|
-
"peerDependencies": {
|
|
70
|
-
"@types/react": ">=16.8.0",
|
|
71
|
-
"react": ">=16.8.0",
|
|
72
|
-
"vue": ">=3.0.0"
|
|
73
|
-
},
|
|
74
|
-
"peerDependenciesMeta": {
|
|
75
|
-
"@types/react": {
|
|
76
|
-
"optional": true
|
|
77
|
-
},
|
|
78
|
-
"react": {
|
|
79
|
-
"optional": true
|
|
80
|
-
},
|
|
81
|
-
"vue": {
|
|
82
|
-
"optional": true
|
|
83
|
-
}
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"provenance": true
|
|
84
46
|
},
|
|
85
47
|
"scripts": {
|
|
86
48
|
"build": "tsdown",
|
|
87
|
-
"
|
|
88
|
-
"test": "vitest run --passWithNoTests",
|
|
89
|
-
"test:coverage": "vitest --ui --coverage.enabled --coverage.all",
|
|
90
|
-
"release": "pnpm run build && pnpm publish --provenance --access public"
|
|
49
|
+
"changeset:patch": "node ../../scripts/changeset-patch.mjs @hf-chimera/store"
|
|
91
50
|
}
|
|
92
51
|
}
|
package/.changeset/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Changesets
|
|
2
|
-
|
|
3
|
-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
-
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
-
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
-
|
|
7
|
-
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
-
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
package/CHANGELOG.md
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
# @hf-chimera/store
|
|
2
|
-
|
|
3
|
-
## 0.1.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- Add Vue adapter
|
|
8
|
-
|
|
9
|
-
## 0.0.15
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- Fix readme
|
|
14
|
-
|
|
15
|
-
## 0.0.14
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- Try to get npm confirmation v1
|
|
20
|
-
|
|
21
|
-
## 0.0.13
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- Fix readme
|
|
26
|
-
|
|
27
|
-
## 0.0.12
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- Update README
|
|
32
|
-
|
|
33
|
-
## 0.0.11
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
- Add filter utils
|
|
38
|
-
|
|
39
|
-
## 0.0.10
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- Export correct types
|
|
44
|
-
|
|
45
|
-
## 0.0.9
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- Add defaults export
|
|
50
|
-
|
|
51
|
-
## 0.0.8
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- Fix dist ignore
|
|
56
|
-
|
|
57
|
-
## 0.0.7
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
- Fix exports
|
|
62
|
-
|
|
63
|
-
## 0.0.6
|
|
64
|
-
|
|
65
|
-
### Patch Changes
|
|
66
|
-
|
|
67
|
-
- Update npmignore
|
|
68
|
-
|
|
69
|
-
## 0.0.5
|
|
70
|
-
|
|
71
|
-
### Patch Changes
|
|
72
|
-
|
|
73
|
-
- Implement library with adapters
|
|
74
|
-
|
|
75
|
-
This patch release introduces the complete implementation of the
|
|
76
|
-
`@hf-chimera/store` library with a flexible adapter system:
|
|
77
|
-
|
|
78
|
-
- **React Adapter** (`packages/adapters/react`): Hooks and context for
|
|
79
|
-
integrating the store with React applications
|
|
80
|
-
- **Query Builder** (`packages/qb`): Fluent API for constructing complex queries
|
|
81
|
-
- **CRUD Example**: Full-stack example application demonstrating store usage
|
|
82
|
-
with customers and orders
|
|
83
|
-
- **Core Improvements**: Bug fixes in ordering logic (using the first non-equal
|
|
84
|
-
result) and enhanced type safety
|
|
85
|
-
- **Testing Infrastructure**: Added Vitest UI and comprehensive test coverage
|
|
86
|
-
|
|
87
|
-
## 0.0.4
|
|
88
|
-
|
|
89
|
-
### Patch Changes
|
|
90
|
-
|
|
91
|
-
- 2b3dd61: Cleanup try 3
|
|
92
|
-
- bafd87f: Cleanup try 2
|
|
93
|
-
|
|
94
|
-
## 0.0.3
|
|
95
|
-
|
|
96
|
-
### Patch Changes
|
|
97
|
-
|
|
98
|
-
- b582743: Cleanup
|
package/dist/adapters/react.cjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
const require_params = require('../params-C5dnCvJr.cjs');
|
|
2
|
-
require('../defaults-C48gY1ow.cjs');
|
|
3
|
-
require('../src-YxpDmKvq.cjs');
|
|
4
|
-
require('../qb-D6vPK6P0.cjs');
|
|
5
|
-
let react = require("react");
|
|
6
|
-
react = require_params.__toESM(react);
|
|
7
|
-
|
|
8
|
-
//#region packages/adapters/react/hooks.ts
|
|
9
|
-
const CHIMERA_COLLECTION_UPDATE_EVENTS = [
|
|
10
|
-
"ready",
|
|
11
|
-
"updated",
|
|
12
|
-
"selfUpdated",
|
|
13
|
-
"selfItemCreated",
|
|
14
|
-
"itemAdded",
|
|
15
|
-
"itemUpdated",
|
|
16
|
-
"selfItemUpdated",
|
|
17
|
-
"itemDeleted",
|
|
18
|
-
"selfItemDeleted",
|
|
19
|
-
"error"
|
|
20
|
-
];
|
|
21
|
-
const CHIMERA_ITEM_UPDATE_EVENTS = [
|
|
22
|
-
"initialized",
|
|
23
|
-
"selfCreated",
|
|
24
|
-
"ready",
|
|
25
|
-
"updated",
|
|
26
|
-
"selfUpdated",
|
|
27
|
-
"deleted",
|
|
28
|
-
"selfDeleted",
|
|
29
|
-
"error"
|
|
30
|
-
];
|
|
31
|
-
const createChimeraHooks = (store) => {
|
|
32
|
-
const useChimeraRepository = (entityName) => (0, react.useMemo)(() => store.from(entityName), [entityName]);
|
|
33
|
-
return {
|
|
34
|
-
useChimeraStore: () => store,
|
|
35
|
-
useChimeraRepository,
|
|
36
|
-
useChimeraCollection: (entityName, params, deps) => {
|
|
37
|
-
const [, trigger] = (0, react.useState)(() => ({}));
|
|
38
|
-
const repository = useChimeraRepository(entityName);
|
|
39
|
-
const oldDeps = (0, react.useRef)(deps);
|
|
40
|
-
if (oldDeps.current && !deps || !oldDeps.current && deps) console.warn("useChimeraCollection deps is not a reactive param!\nUse deps if you want to control dependencies manually.\nOmit it if you already have a stable reference to params");
|
|
41
|
-
oldDeps.current = deps;
|
|
42
|
-
const memeParams = (0, react.useMemo)(() => require_params.normalizeParams(params), deps ? deps : [params]);
|
|
43
|
-
const collection = (0, react.useMemo)(() => repository.getCollection(memeParams), [repository, memeParams]);
|
|
44
|
-
(0, react.useEffect)(() => {
|
|
45
|
-
const handler = () => trigger({});
|
|
46
|
-
for (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) collection.on(event, handler);
|
|
47
|
-
return () => {
|
|
48
|
-
for (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) collection.off(event, handler);
|
|
49
|
-
};
|
|
50
|
-
}, [collection]);
|
|
51
|
-
return collection;
|
|
52
|
-
},
|
|
53
|
-
useChimeraItem: (entityName, id, meta) => {
|
|
54
|
-
const [, trigger] = (0, react.useState)(() => ({}));
|
|
55
|
-
const item = useChimeraRepository(entityName).getItem(id, meta);
|
|
56
|
-
(0, react.useEffect)(() => {
|
|
57
|
-
const handler = () => trigger({});
|
|
58
|
-
for (const event of CHIMERA_ITEM_UPDATE_EVENTS) item.on(event, handler);
|
|
59
|
-
return () => {
|
|
60
|
-
for (const event of CHIMERA_ITEM_UPDATE_EVENTS) item.off(event, handler);
|
|
61
|
-
};
|
|
62
|
-
}, [item]);
|
|
63
|
-
return item;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
//#endregion
|
|
69
|
-
exports.createChimeraHooks = createChimeraHooks;
|
|
70
|
-
//# sourceMappingURL=react.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.cjs","names":["normalizeParams"],"sources":["../../packages/adapters/react/hooks.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport type { ChimeraCollectionQuery } from \"../../../src/query/ChimeraCollectionQuery\";\nimport type { ChimeraItemQuery } from \"../../../src/query/ChimeraItemQuery\";\nimport type { ChimeraEntityId } from \"../../../src/shared/types\";\nimport type { ChimeraEntityRepository } from \"../../../src/store/ChimeraEntityRepository\";\nimport type {\n\tAnyChimeraStore,\n\tChimeraStoreEntities,\n\tChimeraStoreEntityType,\n\tChimeraStoreOperatorMap,\n} from \"../../../src/store/ChimeraStore\";\nimport { type AnyChimeraParams, normalizeParams } from \"../shared/params\";\n\nconst CHIMERA_COLLECTION_UPDATE_EVENTS = [\n\t\"ready\",\n\t\"updated\",\n\t\"selfUpdated\",\n\t\"selfItemCreated\",\n\t\"itemAdded\",\n\t\"itemUpdated\",\n\t\"selfItemUpdated\",\n\t\"itemDeleted\",\n\t\"selfItemDeleted\",\n\t\"error\",\n] as const;\n\nconst CHIMERA_ITEM_UPDATE_EVENTS = [\n\t\"initialized\",\n\t\"selfCreated\",\n\t\"ready\",\n\t\"updated\",\n\t\"selfUpdated\",\n\t\"deleted\",\n\t\"selfDeleted\",\n\t\"error\",\n] as const;\n\nexport const createChimeraHooks = <T extends AnyChimeraStore>(\n\tstore: T,\n): {\n\tuseChimeraStore: () => T;\n\tuseChimeraRepository: <EntityName extends ChimeraStoreEntities<T>>(\n\t\tentityName: EntityName,\n\t) => ChimeraEntityRepository<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;\n\tuseChimeraCollection: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(\n\t\tentityName: EntityName,\n\t\tparams: AnyChimeraParams<T, EntityName, Meta>,\n\t\tdeps?: unknown[],\n\t) => ChimeraCollectionQuery<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;\n\tuseChimeraItem: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(\n\t\tentityName: EntityName,\n\t\tid: ChimeraEntityId,\n\t\tmeta?: Meta,\n\t) => ChimeraItemQuery<ChimeraStoreEntityType<T, EntityName>>;\n} => {\n\tconst useChimeraRepository = <EntityName extends ChimeraStoreEntities<T>>(entityName: EntityName) =>\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: this hook is generated for a specific store so it never changes\n\t\tuseMemo(() => store.from(entityName), [entityName]);\n\n\treturn {\n\t\tuseChimeraStore: () => store,\n\t\tuseChimeraRepository,\n\t\tuseChimeraCollection: (entityName, params, deps?) => {\n\t\t\tconst [, trigger] = useState(() => ({}));\n\n\t\t\tconst repository = useChimeraRepository(entityName);\n\n\t\t\tconst oldDeps = useRef(deps);\n\t\t\tif ((oldDeps.current && !deps) || (!oldDeps.current && deps)) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t\"useChimeraCollection deps is not a reactive param!\\n\" +\n\t\t\t\t\t\t\"Use deps if you want to control dependencies manually.\\n\" +\n\t\t\t\t\t\t\"Omit it if you already have a stable reference to params\",\n\t\t\t\t);\n\t\t\t}\n\t\t\toldDeps.current = deps;\n\n\t\t\tconst memeParams = useMemo(\n\t\t\t\t() => normalizeParams(params),\n\t\t\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: Very unlikely it will be changed over time, anyway warning for this already added.\n\t\t\t\tdeps ? deps : [params],\n\t\t\t);\n\t\t\tconst collection = useMemo(() => repository.getCollection(memeParams), [repository, memeParams]);\n\n\t\t\tuseEffect(() => {\n\t\t\t\tconst handler = () => trigger({});\n\t\t\t\tfor (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) {\n\t\t\t\t\tcollection.on(event, handler);\n\t\t\t\t}\n\t\t\t\treturn () => {\n\t\t\t\t\tfor (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) {\n\t\t\t\t\t\tcollection.off(event, handler);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}, [collection]);\n\n\t\t\treturn collection;\n\t\t},\n\t\tuseChimeraItem: (entityName, id, meta?) => {\n\t\t\tconst [, trigger] = useState(() => ({}));\n\n\t\t\tconst repository = useChimeraRepository(entityName);\n\t\t\tconst item = repository.getItem(id, meta);\n\n\t\t\tuseEffect(() => {\n\t\t\t\tconst handler = () => trigger({});\n\t\t\t\tfor (const event of CHIMERA_ITEM_UPDATE_EVENTS) {\n\t\t\t\t\titem.on(event, handler);\n\t\t\t\t}\n\t\t\t\treturn () => {\n\t\t\t\t\tfor (const event of CHIMERA_ITEM_UPDATE_EVENTS) {\n\t\t\t\t\t\titem.off(event, handler);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}, [item]);\n\n\t\t\treturn item;\n\t\t},\n\t};\n};\n"],"mappings":";;;;;;;;AAaA,MAAM,mCAAmC;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAED,MAAM,6BAA6B;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAED,MAAa,sBACZ,UAgBI;CACJ,MAAM,wBAAoE,wCAE3D,MAAM,KAAK,WAAW,EAAE,CAAC,WAAW,CAAC;AAEpD,QAAO;EACN,uBAAuB;EACvB;EACA,uBAAuB,YAAY,QAAQ,SAAU;GACpD,MAAM,GAAG,sCAA2B,EAAE,EAAE;GAExC,MAAM,aAAa,qBAAqB,WAAW;GAEnD,MAAM,4BAAiB,KAAK;AAC5B,OAAK,QAAQ,WAAW,CAAC,QAAU,CAAC,QAAQ,WAAW,KACtD,SAAQ,KACP,uKAGA;AAEF,WAAQ,UAAU;GAElB,MAAM,sCACCA,+BAAgB,OAAO,EAE7B,OAAO,OAAO,CAAC,OAAO,CACtB;GACD,MAAM,sCAA2B,WAAW,cAAc,WAAW,EAAE,CAAC,YAAY,WAAW,CAAC;AAEhG,8BAAgB;IACf,MAAM,gBAAgB,QAAQ,EAAE,CAAC;AACjC,SAAK,MAAM,SAAS,iCACnB,YAAW,GAAG,OAAO,QAAQ;AAE9B,iBAAa;AACZ,UAAK,MAAM,SAAS,iCACnB,YAAW,IAAI,OAAO,QAAQ;;MAG9B,CAAC,WAAW,CAAC;AAEhB,UAAO;;EAER,iBAAiB,YAAY,IAAI,SAAU;GAC1C,MAAM,GAAG,sCAA2B,EAAE,EAAE;GAGxC,MAAM,OADa,qBAAqB,WAAW,CAC3B,QAAQ,IAAI,KAAK;AAEzC,8BAAgB;IACf,MAAM,gBAAgB,QAAQ,EAAE,CAAC;AACjC,SAAK,MAAM,SAAS,2BACnB,MAAK,GAAG,OAAO,QAAQ;AAExB,iBAAa;AACZ,UAAK,MAAM,SAAS,2BACnB,MAAK,IAAI,OAAO,QAAQ;;MAGxB,CAAC,KAAK,CAAC;AAEV,UAAO;;EAER"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { D as ChimeraItemQuery, Ut as ChimeraEntityId, _ as ChimeraStoreEntityType, h as ChimeraStoreEntities, p as AnyChimeraStore, w as ChimeraEntityRepository, y as ChimeraStoreOperatorMap, z as ChimeraCollectionQuery } from "../index-DP6-nR2O.cjs";
|
|
2
|
-
import "../index-FQNcJwA7.cjs";
|
|
3
|
-
import { t as AnyChimeraParams } from "../params-uxNE-e4a.cjs";
|
|
4
|
-
|
|
5
|
-
//#region packages/adapters/react/hooks.d.ts
|
|
6
|
-
|
|
7
|
-
declare const createChimeraHooks: <T extends AnyChimeraStore>(store: T) => {
|
|
8
|
-
useChimeraStore: () => T;
|
|
9
|
-
useChimeraRepository: <EntityName extends ChimeraStoreEntities<T>>(entityName: EntityName) => ChimeraEntityRepository<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;
|
|
10
|
-
useChimeraCollection: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(entityName: EntityName, params: AnyChimeraParams<T, EntityName, Meta>, deps?: unknown[]) => ChimeraCollectionQuery<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;
|
|
11
|
-
useChimeraItem: <EntityName extends ChimeraStoreEntities<T>, Meta_1 = any>(entityName: EntityName, id: ChimeraEntityId, meta?: Meta_1) => ChimeraItemQuery<ChimeraStoreEntityType<T, EntityName>>;
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { createChimeraHooks };
|
|
15
|
-
//# sourceMappingURL=react.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.cts","names":[],"sources":["../../packages/adapters/react/hooks.ts"],"sourcesContent":[],"mappings":";;;;;;AAqC6C,cAAhC,kBAAgC,EAAA,CAAA,UAAA,eAAA,CAAA,CAAA,KAAA,EACrC,CADqC,EAAA,GAAA;EACrC,eAAA,EAAA,GAAA,GAEgB,CAFhB;EAEgB,oBAAA,EAAA,CAAA,mBACmB,oBADnB,CACwC,CADxC,CAAA,CAAA,CAAA,UAAA,EAEV,UAFU,EAAA,GAGlB,uBAHkB,CAGM,sBAHN,CAG6B,CAH7B,EAGgC,UAHhC,CAAA,EAG6C,uBAH7C,CAGqE,CAHrE,CAAA,CAAA;EACwC,oBAAA,EAAA,CAAA,mBAGrB,oBAHqB,CAGA,CAHA,CAAA,EAAA,OAAA,GAAA,CAAA,CAAA,UAAA,EAIlD,UAJkD,EAAA,MAAA,EAKtD,gBALsD,CAKrC,CALqC,EAKlC,UALkC,EAKtB,IALsB,CAAA,EAAA,IAAA,CAAA,EAAA,OAAA,EAAA,EAAA,GAO1D,sBAP0D,CAOnC,sBAPmC,CAOZ,CAPY,EAOT,UAPS,CAAA,EAOI,uBAPJ,CAO4B,CAP5B,CAAA,CAAA;EAArB,cAAA,EAAA,CAAA,mBAQN,oBARM,CAQe,CARf,CAAA,EAAA,SAAA,GAAA,CAAA,CAAA,UAAA,EAS7B,UAT6B,EAAA,EAAA,EAUrC,eAVqC,EAAA,IAAA,CAAA,EAWlC,MAXkC,EAAA,GAYrC,gBAZqC,CAYpB,sBAZoB,CAYG,CAZH,EAYM,UAZN,CAAA,CAAA;CAC7B"}
|
package/dist/adapters/react.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { D as ChimeraItemQuery, Ut as ChimeraEntityId, _ as ChimeraStoreEntityType, h as ChimeraStoreEntities, p as AnyChimeraStore, w as ChimeraEntityRepository, y as ChimeraStoreOperatorMap, z as ChimeraCollectionQuery } from "../index-C45y61aH.js";
|
|
2
|
-
import "../index-BuYMaiND.js";
|
|
3
|
-
import { t as AnyChimeraParams } from "../params-B-wurzdZ.js";
|
|
4
|
-
|
|
5
|
-
//#region packages/adapters/react/hooks.d.ts
|
|
6
|
-
|
|
7
|
-
declare const createChimeraHooks: <T extends AnyChimeraStore>(store: T) => {
|
|
8
|
-
useChimeraStore: () => T;
|
|
9
|
-
useChimeraRepository: <EntityName extends ChimeraStoreEntities<T>>(entityName: EntityName) => ChimeraEntityRepository<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;
|
|
10
|
-
useChimeraCollection: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(entityName: EntityName, params: AnyChimeraParams<T, EntityName, Meta>, deps?: unknown[]) => ChimeraCollectionQuery<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;
|
|
11
|
-
useChimeraItem: <EntityName extends ChimeraStoreEntities<T>, Meta_1 = any>(entityName: EntityName, id: ChimeraEntityId, meta?: Meta_1) => ChimeraItemQuery<ChimeraStoreEntityType<T, EntityName>>;
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { createChimeraHooks };
|
|
15
|
-
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","names":[],"sources":["../../packages/adapters/react/hooks.ts"],"sourcesContent":[],"mappings":";;;;;;AAqC6C,cAAhC,kBAAgC,EAAA,CAAA,UAAA,eAAA,CAAA,CAAA,KAAA,EACrC,CADqC,EAAA,GAAA;EACrC,eAAA,EAAA,GAAA,GAEgB,CAFhB;EAEgB,oBAAA,EAAA,CAAA,mBACmB,oBADnB,CACwC,CADxC,CAAA,CAAA,CAAA,UAAA,EAEV,UAFU,EAAA,GAGlB,uBAHkB,CAGM,sBAHN,CAG6B,CAH7B,EAGgC,UAHhC,CAAA,EAG6C,uBAH7C,CAGqE,CAHrE,CAAA,CAAA;EACwC,oBAAA,EAAA,CAAA,mBAGrB,oBAHqB,CAGA,CAHA,CAAA,EAAA,OAAA,GAAA,CAAA,CAAA,UAAA,EAIlD,UAJkD,EAAA,MAAA,EAKtD,gBALsD,CAKrC,CALqC,EAKlC,UALkC,EAKtB,IALsB,CAAA,EAAA,IAAA,CAAA,EAAA,OAAA,EAAA,EAAA,GAO1D,sBAP0D,CAOnC,sBAPmC,CAOZ,CAPY,EAOT,UAPS,CAAA,EAOI,uBAPJ,CAO4B,CAP5B,CAAA,CAAA;EAArB,cAAA,EAAA,CAAA,mBAQN,oBARM,CAQe,CARf,CAAA,EAAA,SAAA,GAAA,CAAA,CAAA,UAAA,EAS7B,UAT6B,EAAA,EAAA,EAUrC,eAVqC,EAAA,IAAA,CAAA,EAWlC,MAXkC,EAAA,GAYrC,gBAZqC,CAYpB,sBAZoB,CAYG,CAZH,EAYM,UAZN,CAAA,CAAA;CAC7B"}
|
package/dist/adapters/react.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import "../defaults-CLUQg2zK.js";
|
|
2
|
-
import "../src-C74sq0jQ.js";
|
|
3
|
-
import "../qb-pchs-vdM.js";
|
|
4
|
-
import { t as normalizeParams } from "../params-DmOyCS2B.js";
|
|
5
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
-
|
|
7
|
-
//#region packages/adapters/react/hooks.ts
|
|
8
|
-
const CHIMERA_COLLECTION_UPDATE_EVENTS = [
|
|
9
|
-
"ready",
|
|
10
|
-
"updated",
|
|
11
|
-
"selfUpdated",
|
|
12
|
-
"selfItemCreated",
|
|
13
|
-
"itemAdded",
|
|
14
|
-
"itemUpdated",
|
|
15
|
-
"selfItemUpdated",
|
|
16
|
-
"itemDeleted",
|
|
17
|
-
"selfItemDeleted",
|
|
18
|
-
"error"
|
|
19
|
-
];
|
|
20
|
-
const CHIMERA_ITEM_UPDATE_EVENTS = [
|
|
21
|
-
"initialized",
|
|
22
|
-
"selfCreated",
|
|
23
|
-
"ready",
|
|
24
|
-
"updated",
|
|
25
|
-
"selfUpdated",
|
|
26
|
-
"deleted",
|
|
27
|
-
"selfDeleted",
|
|
28
|
-
"error"
|
|
29
|
-
];
|
|
30
|
-
const createChimeraHooks = (store) => {
|
|
31
|
-
const useChimeraRepository = (entityName) => useMemo(() => store.from(entityName), [entityName]);
|
|
32
|
-
return {
|
|
33
|
-
useChimeraStore: () => store,
|
|
34
|
-
useChimeraRepository,
|
|
35
|
-
useChimeraCollection: (entityName, params, deps) => {
|
|
36
|
-
const [, trigger] = useState(() => ({}));
|
|
37
|
-
const repository = useChimeraRepository(entityName);
|
|
38
|
-
const oldDeps = useRef(deps);
|
|
39
|
-
if (oldDeps.current && !deps || !oldDeps.current && deps) console.warn("useChimeraCollection deps is not a reactive param!\nUse deps if you want to control dependencies manually.\nOmit it if you already have a stable reference to params");
|
|
40
|
-
oldDeps.current = deps;
|
|
41
|
-
const memeParams = useMemo(() => normalizeParams(params), deps ? deps : [params]);
|
|
42
|
-
const collection = useMemo(() => repository.getCollection(memeParams), [repository, memeParams]);
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
const handler = () => trigger({});
|
|
45
|
-
for (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) collection.on(event, handler);
|
|
46
|
-
return () => {
|
|
47
|
-
for (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) collection.off(event, handler);
|
|
48
|
-
};
|
|
49
|
-
}, [collection]);
|
|
50
|
-
return collection;
|
|
51
|
-
},
|
|
52
|
-
useChimeraItem: (entityName, id, meta) => {
|
|
53
|
-
const [, trigger] = useState(() => ({}));
|
|
54
|
-
const item = useChimeraRepository(entityName).getItem(id, meta);
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
const handler = () => trigger({});
|
|
57
|
-
for (const event of CHIMERA_ITEM_UPDATE_EVENTS) item.on(event, handler);
|
|
58
|
-
return () => {
|
|
59
|
-
for (const event of CHIMERA_ITEM_UPDATE_EVENTS) item.off(event, handler);
|
|
60
|
-
};
|
|
61
|
-
}, [item]);
|
|
62
|
-
return item;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
//#endregion
|
|
68
|
-
export { createChimeraHooks };
|
|
69
|
-
//# sourceMappingURL=react.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","names":[],"sources":["../../packages/adapters/react/hooks.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport type { ChimeraCollectionQuery } from \"../../../src/query/ChimeraCollectionQuery\";\nimport type { ChimeraItemQuery } from \"../../../src/query/ChimeraItemQuery\";\nimport type { ChimeraEntityId } from \"../../../src/shared/types\";\nimport type { ChimeraEntityRepository } from \"../../../src/store/ChimeraEntityRepository\";\nimport type {\n\tAnyChimeraStore,\n\tChimeraStoreEntities,\n\tChimeraStoreEntityType,\n\tChimeraStoreOperatorMap,\n} from \"../../../src/store/ChimeraStore\";\nimport { type AnyChimeraParams, normalizeParams } from \"../shared/params\";\n\nconst CHIMERA_COLLECTION_UPDATE_EVENTS = [\n\t\"ready\",\n\t\"updated\",\n\t\"selfUpdated\",\n\t\"selfItemCreated\",\n\t\"itemAdded\",\n\t\"itemUpdated\",\n\t\"selfItemUpdated\",\n\t\"itemDeleted\",\n\t\"selfItemDeleted\",\n\t\"error\",\n] as const;\n\nconst CHIMERA_ITEM_UPDATE_EVENTS = [\n\t\"initialized\",\n\t\"selfCreated\",\n\t\"ready\",\n\t\"updated\",\n\t\"selfUpdated\",\n\t\"deleted\",\n\t\"selfDeleted\",\n\t\"error\",\n] as const;\n\nexport const createChimeraHooks = <T extends AnyChimeraStore>(\n\tstore: T,\n): {\n\tuseChimeraStore: () => T;\n\tuseChimeraRepository: <EntityName extends ChimeraStoreEntities<T>>(\n\t\tentityName: EntityName,\n\t) => ChimeraEntityRepository<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;\n\tuseChimeraCollection: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(\n\t\tentityName: EntityName,\n\t\tparams: AnyChimeraParams<T, EntityName, Meta>,\n\t\tdeps?: unknown[],\n\t) => ChimeraCollectionQuery<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>;\n\tuseChimeraItem: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(\n\t\tentityName: EntityName,\n\t\tid: ChimeraEntityId,\n\t\tmeta?: Meta,\n\t) => ChimeraItemQuery<ChimeraStoreEntityType<T, EntityName>>;\n} => {\n\tconst useChimeraRepository = <EntityName extends ChimeraStoreEntities<T>>(entityName: EntityName) =>\n\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: this hook is generated for a specific store so it never changes\n\t\tuseMemo(() => store.from(entityName), [entityName]);\n\n\treturn {\n\t\tuseChimeraStore: () => store,\n\t\tuseChimeraRepository,\n\t\tuseChimeraCollection: (entityName, params, deps?) => {\n\t\t\tconst [, trigger] = useState(() => ({}));\n\n\t\t\tconst repository = useChimeraRepository(entityName);\n\n\t\t\tconst oldDeps = useRef(deps);\n\t\t\tif ((oldDeps.current && !deps) || (!oldDeps.current && deps)) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t\"useChimeraCollection deps is not a reactive param!\\n\" +\n\t\t\t\t\t\t\"Use deps if you want to control dependencies manually.\\n\" +\n\t\t\t\t\t\t\"Omit it if you already have a stable reference to params\",\n\t\t\t\t);\n\t\t\t}\n\t\t\toldDeps.current = deps;\n\n\t\t\tconst memeParams = useMemo(\n\t\t\t\t() => normalizeParams(params),\n\t\t\t\t// biome-ignore lint/correctness/useExhaustiveDependencies: Very unlikely it will be changed over time, anyway warning for this already added.\n\t\t\t\tdeps ? deps : [params],\n\t\t\t);\n\t\t\tconst collection = useMemo(() => repository.getCollection(memeParams), [repository, memeParams]);\n\n\t\t\tuseEffect(() => {\n\t\t\t\tconst handler = () => trigger({});\n\t\t\t\tfor (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) {\n\t\t\t\t\tcollection.on(event, handler);\n\t\t\t\t}\n\t\t\t\treturn () => {\n\t\t\t\t\tfor (const event of CHIMERA_COLLECTION_UPDATE_EVENTS) {\n\t\t\t\t\t\tcollection.off(event, handler);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}, [collection]);\n\n\t\t\treturn collection;\n\t\t},\n\t\tuseChimeraItem: (entityName, id, meta?) => {\n\t\t\tconst [, trigger] = useState(() => ({}));\n\n\t\t\tconst repository = useChimeraRepository(entityName);\n\t\t\tconst item = repository.getItem(id, meta);\n\n\t\t\tuseEffect(() => {\n\t\t\t\tconst handler = () => trigger({});\n\t\t\t\tfor (const event of CHIMERA_ITEM_UPDATE_EVENTS) {\n\t\t\t\t\titem.on(event, handler);\n\t\t\t\t}\n\t\t\t\treturn () => {\n\t\t\t\t\tfor (const event of CHIMERA_ITEM_UPDATE_EVENTS) {\n\t\t\t\t\t\titem.off(event, handler);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}, [item]);\n\n\t\t\treturn item;\n\t\t},\n\t};\n};\n"],"mappings":";;;;;;;AAaA,MAAM,mCAAmC;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAED,MAAM,6BAA6B;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAED,MAAa,sBACZ,UAgBI;CACJ,MAAM,wBAAoE,eAEzE,cAAc,MAAM,KAAK,WAAW,EAAE,CAAC,WAAW,CAAC;AAEpD,QAAO;EACN,uBAAuB;EACvB;EACA,uBAAuB,YAAY,QAAQ,SAAU;GACpD,MAAM,GAAG,WAAW,gBAAgB,EAAE,EAAE;GAExC,MAAM,aAAa,qBAAqB,WAAW;GAEnD,MAAM,UAAU,OAAO,KAAK;AAC5B,OAAK,QAAQ,WAAW,CAAC,QAAU,CAAC,QAAQ,WAAW,KACtD,SAAQ,KACP,uKAGA;AAEF,WAAQ,UAAU;GAElB,MAAM,aAAa,cACZ,gBAAgB,OAAO,EAE7B,OAAO,OAAO,CAAC,OAAO,CACtB;GACD,MAAM,aAAa,cAAc,WAAW,cAAc,WAAW,EAAE,CAAC,YAAY,WAAW,CAAC;AAEhG,mBAAgB;IACf,MAAM,gBAAgB,QAAQ,EAAE,CAAC;AACjC,SAAK,MAAM,SAAS,iCACnB,YAAW,GAAG,OAAO,QAAQ;AAE9B,iBAAa;AACZ,UAAK,MAAM,SAAS,iCACnB,YAAW,IAAI,OAAO,QAAQ;;MAG9B,CAAC,WAAW,CAAC;AAEhB,UAAO;;EAER,iBAAiB,YAAY,IAAI,SAAU;GAC1C,MAAM,GAAG,WAAW,gBAAgB,EAAE,EAAE;GAGxC,MAAM,OADa,qBAAqB,WAAW,CAC3B,QAAQ,IAAI,KAAK;AAEzC,mBAAgB;IACf,MAAM,gBAAgB,QAAQ,EAAE,CAAC;AACjC,SAAK,MAAM,SAAS,2BACnB,MAAK,GAAG,OAAO,QAAQ;AAExB,iBAAa;AACZ,UAAK,MAAM,SAAS,2BACnB,MAAK,IAAI,OAAO,QAAQ;;MAGxB,CAAC,KAAK,CAAC;AAEV,UAAO;;EAER"}
|
package/dist/adapters/vue.cjs
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
const require_params = require('../params-C5dnCvJr.cjs');
|
|
2
|
-
require('../defaults-C48gY1ow.cjs');
|
|
3
|
-
require('../src-YxpDmKvq.cjs');
|
|
4
|
-
require('../qb-D6vPK6P0.cjs');
|
|
5
|
-
let vue = require("vue");
|
|
6
|
-
vue = require_params.__toESM(vue);
|
|
7
|
-
|
|
8
|
-
//#region packages/adapters/vue/composables.ts
|
|
9
|
-
const isFunction = (value) => typeof value === "function";
|
|
10
|
-
const toValue = (value) => isFunction(value) ? value() : (0, vue.isRef)(value) ? value.value : value;
|
|
11
|
-
const CHIMERA_COLLECTION_UPDATE_EVENTS = [
|
|
12
|
-
"ready",
|
|
13
|
-
"updated",
|
|
14
|
-
"selfUpdated",
|
|
15
|
-
"selfItemCreated",
|
|
16
|
-
"itemAdded",
|
|
17
|
-
"itemUpdated",
|
|
18
|
-
"selfItemUpdated",
|
|
19
|
-
"itemDeleted",
|
|
20
|
-
"selfItemDeleted",
|
|
21
|
-
"error"
|
|
22
|
-
];
|
|
23
|
-
const CHIMERA_ITEM_UPDATE_EVENTS = [
|
|
24
|
-
"initialized",
|
|
25
|
-
"selfCreated",
|
|
26
|
-
"ready",
|
|
27
|
-
"updated",
|
|
28
|
-
"selfUpdated",
|
|
29
|
-
"deleted",
|
|
30
|
-
"selfDeleted",
|
|
31
|
-
"error"
|
|
32
|
-
];
|
|
33
|
-
const createChimeraComposables = (store) => {
|
|
34
|
-
const useChimeraRepository = (entityName) => (0, vue.computed)(() => store.from(toValue(entityName)));
|
|
35
|
-
return {
|
|
36
|
-
useChimeraStore: () => store,
|
|
37
|
-
useChimeraRepository,
|
|
38
|
-
useChimeraCollection: (entityName, params) => {
|
|
39
|
-
const repository = useChimeraRepository(entityName);
|
|
40
|
-
const normalizedParams = (0, vue.computed)(() => require_params.normalizeParams(toValue(params)));
|
|
41
|
-
const collection = (0, vue.computed)(() => repository.value.getCollection(normalizedParams.value));
|
|
42
|
-
return (0, vue.customRef)((track, trigger) => {
|
|
43
|
-
(0, vue.watch)(collection, (collection$1, _, onCleanup) => {
|
|
44
|
-
const handler = () => trigger();
|
|
45
|
-
CHIMERA_COLLECTION_UPDATE_EVENTS.forEach((event) => {
|
|
46
|
-
collection$1.on(event, handler);
|
|
47
|
-
});
|
|
48
|
-
onCleanup(() => CHIMERA_COLLECTION_UPDATE_EVENTS.forEach((event) => {
|
|
49
|
-
collection$1.off(event, handler);
|
|
50
|
-
}));
|
|
51
|
-
}, { immediate: true });
|
|
52
|
-
return {
|
|
53
|
-
get() {
|
|
54
|
-
track();
|
|
55
|
-
return collection.value;
|
|
56
|
-
},
|
|
57
|
-
set() {
|
|
58
|
-
console.warn("ChimeraCollectionRef is readonly");
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
useChimeraItem: (entityName, id, meta) => {
|
|
64
|
-
const repository = useChimeraRepository(entityName);
|
|
65
|
-
const item = (0, vue.computed)(() => repository.value.getItem(toValue(id), toValue(meta)));
|
|
66
|
-
return (0, vue.customRef)((track, trigger) => {
|
|
67
|
-
(0, vue.watch)(item, (item$1, _, onCleanup) => {
|
|
68
|
-
const handler = () => trigger();
|
|
69
|
-
CHIMERA_ITEM_UPDATE_EVENTS.forEach((event) => {
|
|
70
|
-
item$1.on(event, handler);
|
|
71
|
-
});
|
|
72
|
-
onCleanup(() => CHIMERA_ITEM_UPDATE_EVENTS.forEach((event) => {
|
|
73
|
-
item$1.off(event, handler);
|
|
74
|
-
}));
|
|
75
|
-
}, { immediate: true });
|
|
76
|
-
return {
|
|
77
|
-
get() {
|
|
78
|
-
track();
|
|
79
|
-
return item.value;
|
|
80
|
-
},
|
|
81
|
-
set() {
|
|
82
|
-
console.warn("ChimeraItemRef is readonly");
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
//#endregion
|
|
91
|
-
exports.createChimeraComposables = createChimeraComposables;
|
|
92
|
-
//# sourceMappingURL=vue.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vue.cjs","names":["normalizeParams"],"sources":["../../packages/adapters/vue/composables.ts"],"sourcesContent":["import { computed, customRef, isRef, type Ref, watch } from \"vue\";\nimport type {\n\tAnyChimeraStore,\n\tChimeraCollectionQuery,\n\tChimeraEntityId,\n\tChimeraItemQuery,\n\tChimeraStoreEntities,\n\tChimeraStoreEntityType,\n\tChimeraStoreOperatorMap,\n} from \"../../../src\";\nimport type { ChimeraEntityRepository } from \"../../../src/store/ChimeraEntityRepository\";\nimport { type AnyChimeraParams, normalizeParams } from \"../shared/params\";\n\ntype MaybeRef<T> = T | Ref<T>;\ntype MaybeRefOrGetter<T> = MaybeRef<T> | (() => T);\n\nconst isFunction = (value: any): value is () => any => typeof value === \"function\";\nconst toValue = <T>(value: MaybeRefOrGetter<T>): T =>\n\tisFunction(value) ? value() : isRef(value) ? value.value : value;\n\nconst CHIMERA_COLLECTION_UPDATE_EVENTS = [\n\t\"ready\",\n\t\"updated\",\n\t\"selfUpdated\",\n\t\"selfItemCreated\",\n\t\"itemAdded\",\n\t\"itemUpdated\",\n\t\"selfItemUpdated\",\n\t\"itemDeleted\",\n\t\"selfItemDeleted\",\n\t\"error\",\n] as const;\n\nconst CHIMERA_ITEM_UPDATE_EVENTS = [\n\t\"initialized\",\n\t\"selfCreated\",\n\t\"ready\",\n\t\"updated\",\n\t\"selfUpdated\",\n\t\"deleted\",\n\t\"selfDeleted\",\n\t\"error\",\n] as const;\n\nexport type ChimeraCollectionRef<T extends AnyChimeraStore, EntityName extends ChimeraStoreEntities<T>> = Ref<\n\tChimeraCollectionQuery<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>\n>;\n\nexport type ChimeraItemRef<T extends AnyChimeraStore, EntityName extends ChimeraStoreEntities<T>> = Ref<\n\tChimeraItemQuery<ChimeraStoreEntityType<T, EntityName>>\n>;\n\nexport const createChimeraComposables = <T extends AnyChimeraStore>(\n\tstore: T,\n): {\n\tuseChimeraStore: () => T;\n\tuseChimeraRepository: <EntityName extends ChimeraStoreEntities<T>>(\n\t\tentityName: MaybeRefOrGetter<EntityName>,\n\t) => Ref<ChimeraEntityRepository<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>>;\n\tuseChimeraCollection: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(\n\t\tentityName: MaybeRefOrGetter<EntityName>,\n\t\tparams: MaybeRefOrGetter<AnyChimeraParams<T, EntityName, Meta>>,\n\t) => ChimeraCollectionRef<T, EntityName>;\n\tuseChimeraItem: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(\n\t\tentityName: MaybeRefOrGetter<EntityName>,\n\t\tid: MaybeRefOrGetter<ChimeraEntityId>,\n\t\tmeta?: MaybeRefOrGetter<Meta>,\n\t) => ChimeraItemRef<T, EntityName>;\n} => {\n\tconst useChimeraRepository = <EntityName extends ChimeraStoreEntities<T>>(entityName: MaybeRefOrGetter<EntityName>) =>\n\t\tcomputed(() => store.from(toValue(entityName)));\n\n\treturn {\n\t\tuseChimeraStore: () => store,\n\t\tuseChimeraRepository,\n\t\tuseChimeraCollection: (entityName, params) => {\n\t\t\tconst repository = useChimeraRepository(entityName);\n\t\t\tconst normalizedParams = computed(() => normalizeParams(toValue(params)));\n\t\t\tconst collection = computed(() => repository.value.getCollection(normalizedParams.value));\n\n\t\t\treturn customRef((track, trigger) => {\n\t\t\t\twatch(\n\t\t\t\t\tcollection,\n\t\t\t\t\t(collection, _, onCleanup) => {\n\t\t\t\t\t\tconst handler = () => trigger();\n\t\t\t\t\t\tCHIMERA_COLLECTION_UPDATE_EVENTS.forEach((event) => {\n\t\t\t\t\t\t\tcollection.on(event, handler);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tonCleanup(() =>\n\t\t\t\t\t\t\tCHIMERA_COLLECTION_UPDATE_EVENTS.forEach((event) => {\n\t\t\t\t\t\t\t\tcollection.off(event, handler);\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\t{ immediate: true },\n\t\t\t\t);\n\n\t\t\t\treturn {\n\t\t\t\t\tget() {\n\t\t\t\t\t\ttrack();\n\t\t\t\t\t\treturn collection.value;\n\t\t\t\t\t},\n\t\t\t\t\tset() {\n\t\t\t\t\t\tconsole.warn(\"ChimeraCollectionRef is readonly\");\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\tuseChimeraItem: (entityName, id, meta) => {\n\t\t\tconst repository = useChimeraRepository(entityName);\n\t\t\tconst item = computed(() => repository.value.getItem(toValue(id), toValue(meta)));\n\n\t\t\treturn customRef((track, trigger) => {\n\t\t\t\twatch(\n\t\t\t\t\titem,\n\t\t\t\t\t(item, _, onCleanup) => {\n\t\t\t\t\t\tconst handler = () => trigger();\n\t\t\t\t\t\tCHIMERA_ITEM_UPDATE_EVENTS.forEach((event) => {\n\t\t\t\t\t\t\titem.on(event, handler);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tonCleanup(() =>\n\t\t\t\t\t\t\tCHIMERA_ITEM_UPDATE_EVENTS.forEach((event) => {\n\t\t\t\t\t\t\t\titem.off(event, handler);\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\t{ immediate: true },\n\t\t\t\t);\n\n\t\t\t\treturn {\n\t\t\t\t\tget() {\n\t\t\t\t\t\ttrack();\n\t\t\t\t\t\treturn item.value;\n\t\t\t\t\t},\n\t\t\t\t\tset() {\n\t\t\t\t\t\tconsole.warn(\"ChimeraItemRef is readonly\");\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t};\n};\n"],"mappings":";;;;;;;;AAgBA,MAAM,cAAc,UAAmC,OAAO,UAAU;AACxE,MAAM,WAAc,UACnB,WAAW,MAAM,GAAG,OAAO,kBAAS,MAAM,GAAG,MAAM,QAAQ;AAE5D,MAAM,mCAAmC;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAED,MAAM,6BAA6B;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAUD,MAAa,4BACZ,UAeI;CACJ,MAAM,wBAAoE,uCAC1D,MAAM,KAAK,QA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ntityType, h as ChimeraStoreEntities, p as AnyChimeraStore, w as ChimeraEntityRepository, y as ChimeraStoreOperatorMap, z as ChimeraCollectionQuery } from "../index-DP6-nR2O.cjs";
|
|
2
|
-
import "../index-FQNcJwA7.cjs";
|
|
3
|
-
import { t as AnyChimeraParams } from "../params-uxNE-e4a.cjs";
|
|
4
|
-
import { Ref } from "vue";
|
|
5
|
-
|
|
6
|
-
//#region packages/adapters/vue/composables.d.ts
|
|
7
|
-
type MaybeRef<T> = T | Ref<T>;
|
|
8
|
-
type MaybeRefOrGetter<T> = MaybeRef<T> | (() => T);
|
|
9
|
-
type ChimeraCollectionRef<T extends AnyChimeraStore, EntityName extends ChimeraStoreEntities<T>> = Ref<ChimeraCollectionQuery<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>>;
|
|
10
|
-
type ChimeraItemRef<T extends AnyChimeraStore, EntityName extends ChimeraStoreEntities<T>> = Ref<ChimeraItemQuery<ChimeraStoreEntityType<T, EntityName>>>;
|
|
11
|
-
declare const createChimeraComposables: <T extends AnyChimeraStore>(store: T) => {
|
|
12
|
-
useChimeraStore: () => T;
|
|
13
|
-
useChimeraRepository: <EntityName extends ChimeraStoreEntities<T>>(entityName: MaybeRefOrGetter<EntityName>) => Ref<ChimeraEntityRepository<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>>;
|
|
14
|
-
useChimeraCollection: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(entityName: MaybeRefOrGetter<EntityName>, params: MaybeRefOrGetter<AnyChimeraParams<T, EntityName, Meta>>) => ChimeraCollectionRef<T, EntityName>;
|
|
15
|
-
useChimeraItem: <EntityName extends ChimeraStoreEntities<T>, Meta_1 = any>(entityName: MaybeRefOrGetter<EntityName>, id: MaybeRefOrGetter<ChimeraEntityId>, meta?: MaybeRefOrGetter<Meta_1>) => ChimeraItemRef<T, EntityName>;
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { ChimeraCollectionRef, ChimeraItemRef, createChimeraComposables };
|
|
19
|
-
//# sourceMappingURL=vue.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.cts","names":[],"sources":["../../packages/adapters/vue/composables.ts"],"sourcesContent":[],"mappings":";;;;;;KAaK,cAAc,IAAI,IAAI;KACtB,sBAAsB,SAAS,YAAY;AAD3C,KA+BO,oBA/BC,CAAA,UA+B8B,eA/B9B,EAAA,mBA+BkE,oBA/BlE,CA+BuF,CA/BvF,CAAA,CAAA,GA+B6F,GA/B7F,CAgCZ,sBAhCY,CAgCW,sBAhCX,CAgCkC,CAhClC,EAgCqC,UAhCrC,CAAA,EAgCkD,uBAhClD,CAgC0E,CAhC1E,CAAA,CAAA,CAAA;AAAM,KAmCP,cAnCO,CAAA,UAmCkB,eAnClB,EAAA,mBAmCsD,oBAnCtD,CAmC2E,CAnC3E,CAAA,CAAA,GAmCiF,GAnCjF,CAoClB,gBApCkB,CAoCD,sBApCC,CAoCsB,CApCtB,EAoCyB,UApCzB,CAAA,CAAA,CAAA;AAAQ,cAuCd,wBAvCc,EAAA,CAAA,UAuCwB,eAvCxB,CAAA,CAAA,KAAA,EAwCnB,CAxCmB,EAAA,GAAA;EAAJ,eAAA,EAAA,GAAA,GA0CC,CA1CD;EAAG,oBAAA,EAAA,CAAA,mBA2CiB,oBA3CjB,CA2CsC,CA3CtC,CAAA,CAAA,CAAA,UAAA,EA4CZ,gBA5CY,CA4CK,UA5CL,CAAA,EAAA,GA6CpB,GA7CoB,CA6ChB,uBA7CgB,CA6CQ,sBA7CR,CA6C+B,CA7C/B,EA6CkC,UA7ClC,CAAA,EA6C+C,uBA7C/C,CA6CuE,CA7CvE,CAAA,CAAA,CAAA;EACrB,oBAAgB,EAAA,CAAA,mBA6CsB,oBA7CtB,CA6C2C,CA7C3C,CAAA,EAAA,OAAA,GAAA,CAAA,CAAA,UAAA,EA8CP,gBA9CO,CA8CU,UA9CV,CAAA,EAAA,MAAA,EA+CX,gBA/CW,CA+CM,gBA/CN,CA+CuB,CA/CvB,EA+C0B,UA/C1B,EA+CsC,IA/CtC,CAAA,CAAA,EAAA,GAgDf,oBAhDe,CAgDM,CAhDN,EAgDS,UAhDT,CAAA;EAAe,cAAA,EAAA,CAAA,mBAiDC,oBAjDD,CAiDsB,CAjDtB,CAAA,EAAA,SAAA,GAAA,CAAA,CAAA,UAAA,EAkDtB,gBAlDsB,CAkDL,UAlDK,CAAA,EAAA,EAAA,EAmD9B,gBAnD8B,CAmDb,eAnDa,CAAA,EAAA,IAAA,CAAA,EAoD3B,gBApD2B,CAoDV,MApDU,CAAA,EAAA,GAqD9B,cArD8B,CAqDf,CArDe,EAqDZ,UArDY,CAAA;CAAT"}
|
package/dist/adapters/vue.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { D as ChimeraItemQuery, Ut as ChimeraEntityId, _ as ChimeraStoreEntityType, h as ChimeraStoreEntities, p as AnyChimeraStore, w as ChimeraEntityRepository, y as ChimeraStoreOperatorMap, z as ChimeraCollectionQuery } from "../index-C45y61aH.js";
|
|
2
|
-
import "../index-BuYMaiND.js";
|
|
3
|
-
import { t as AnyChimeraParams } from "../params-B-wurzdZ.js";
|
|
4
|
-
import { Ref } from "vue";
|
|
5
|
-
|
|
6
|
-
//#region packages/adapters/vue/composables.d.ts
|
|
7
|
-
type MaybeRef<T> = T | Ref<T>;
|
|
8
|
-
type MaybeRefOrGetter<T> = MaybeRef<T> | (() => T);
|
|
9
|
-
type ChimeraCollectionRef<T extends AnyChimeraStore, EntityName extends ChimeraStoreEntities<T>> = Ref<ChimeraCollectionQuery<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>>;
|
|
10
|
-
type ChimeraItemRef<T extends AnyChimeraStore, EntityName extends ChimeraStoreEntities<T>> = Ref<ChimeraItemQuery<ChimeraStoreEntityType<T, EntityName>>>;
|
|
11
|
-
declare const createChimeraComposables: <T extends AnyChimeraStore>(store: T) => {
|
|
12
|
-
useChimeraStore: () => T;
|
|
13
|
-
useChimeraRepository: <EntityName extends ChimeraStoreEntities<T>>(entityName: MaybeRefOrGetter<EntityName>) => Ref<ChimeraEntityRepository<ChimeraStoreEntityType<T, EntityName>, ChimeraStoreOperatorMap<T>>>;
|
|
14
|
-
useChimeraCollection: <EntityName extends ChimeraStoreEntities<T>, Meta = any>(entityName: MaybeRefOrGetter<EntityName>, params: MaybeRefOrGetter<AnyChimeraParams<T, EntityName, Meta>>) => ChimeraCollectionRef<T, EntityName>;
|
|
15
|
-
useChimeraItem: <EntityName extends ChimeraStoreEntities<T>, Meta_1 = any>(entityName: MaybeRefOrGetter<EntityName>, id: MaybeRefOrGetter<ChimeraEntityId>, meta?: MaybeRefOrGetter<Meta_1>) => ChimeraItemRef<T, EntityName>;
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { ChimeraCollectionRef, ChimeraItemRef, createChimeraComposables };
|
|
19
|
-
//# sourceMappingURL=vue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.ts","names":[],"sources":["../../packages/adapters/vue/composables.ts"],"sourcesContent":[],"mappings":";;;;;;KAaK,cAAc,IAAI,IAAI;KACtB,sBAAsB,SAAS,YAAY;AAD3C,KA+BO,oBA/BC,CAAA,UA+B8B,eA/B9B,EAAA,mBA+BkE,oBA/BlE,CA+BuF,CA/BvF,CAAA,CAAA,GA+B6F,GA/B7F,CAgCZ,sBAhCY,CAgCW,sBAhCX,CAgCkC,CAhClC,EAgCqC,UAhCrC,CAAA,EAgCkD,uBAhClD,CAgC0E,CAhC1E,CAAA,CAAA,CAAA;AAAM,KAmCP,cAnCO,CAAA,UAmCkB,eAnClB,EAAA,mBAmCsD,oBAnCtD,CAmC2E,CAnC3E,CAAA,CAAA,GAmCiF,GAnCjF,CAoClB,gBApCkB,CAoCD,sBApCC,CAoCsB,CApCtB,EAoCyB,UApCzB,CAAA,CAAA,CAAA;AAAQ,cAuCd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