@bquery/bquery 1.1.1 → 1.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 +113 -6
- package/dist/full.d.ts +6 -0
- package/dist/full.d.ts.map +1 -1
- package/dist/full.es.mjs +58 -35
- package/dist/full.es.mjs.map +1 -1
- package/dist/full.iife.js +6 -1
- package/dist/full.iife.js.map +1 -1
- package/dist/full.umd.js +6 -1
- package/dist/full.umd.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.mjs +58 -35
- package/dist/index.es.mjs.map +1 -1
- package/dist/reactive/signal.d.ts +7 -0
- package/dist/reactive/signal.d.ts.map +1 -1
- package/dist/reactive.es.mjs +34 -25
- package/dist/reactive.es.mjs.map +1 -1
- package/dist/router/index.d.ts +287 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router.es.mjs +166 -0
- package/dist/router.es.mjs.map +1 -0
- package/dist/security/sanitize.d.ts.map +1 -1
- package/dist/security.es.mjs +95 -74
- package/dist/security.es.mjs.map +1 -1
- package/dist/store/index.d.ts +288 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store.es.mjs +229 -0
- package/dist/store.es.mjs.map +1 -0
- package/dist/view/index.d.ts +201 -0
- package/dist/view/index.d.ts.map +1 -0
- package/dist/view.es.mjs +325 -0
- package/dist/view.es.mjs.map +1 -0
- package/package.json +132 -120
- package/src/full.ts +44 -0
- package/src/index.ts +9 -0
- package/src/reactive/signal.ts +14 -0
- package/src/router/index.ts +718 -0
- package/src/security/sanitize.ts +72 -0
- package/src/store/index.ts +848 -0
- package/src/view/index.ts +1041 -0
package/package.json
CHANGED
|
@@ -1,120 +1,132 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bquery/bquery",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "The jQuery for the Modern Web Platform - Zero build, TypeScript-first library with reactivity, components, and motion",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/full.umd.js",
|
|
7
|
-
"module": "./dist/index.es.mjs",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"unpkg": "./dist/full.umd.js",
|
|
10
|
-
"jsdelivr": "./dist/full.umd.js",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.es.mjs",
|
|
14
|
-
"require": "./dist/full.umd.js",
|
|
15
|
-
"types": "./dist/index.d.ts"
|
|
16
|
-
},
|
|
17
|
-
"./full": {
|
|
18
|
-
"import": "./dist/full.es.mjs",
|
|
19
|
-
"require": "./dist/full.umd.js",
|
|
20
|
-
"types": "./dist/full.d.ts"
|
|
21
|
-
},
|
|
22
|
-
"./core": {
|
|
23
|
-
"import": "./dist/core.es.mjs",
|
|
24
|
-
"types": "./dist/core/index.d.ts"
|
|
25
|
-
},
|
|
26
|
-
"./reactive": {
|
|
27
|
-
"import": "./dist/reactive.es.mjs",
|
|
28
|
-
"types": "./dist/reactive/index.d.ts"
|
|
29
|
-
},
|
|
30
|
-
"./component": {
|
|
31
|
-
"import": "./dist/component.es.mjs",
|
|
32
|
-
"types": "./dist/component/index.d.ts"
|
|
33
|
-
},
|
|
34
|
-
"./motion": {
|
|
35
|
-
"import": "./dist/motion.es.mjs",
|
|
36
|
-
"types": "./dist/motion/index.d.ts"
|
|
37
|
-
},
|
|
38
|
-
"./security": {
|
|
39
|
-
"import": "./dist/security.es.mjs",
|
|
40
|
-
"types": "./dist/security/index.d.ts"
|
|
41
|
-
},
|
|
42
|
-
"./platform": {
|
|
43
|
-
"import": "./dist/platform.es.mjs",
|
|
44
|
-
"types": "./dist/platform/index.d.ts"
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@bquery/bquery",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "The jQuery for the Modern Web Platform - Zero build, TypeScript-first library with reactivity, components, and motion",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/full.umd.js",
|
|
7
|
+
"module": "./dist/index.es.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"unpkg": "./dist/full.umd.js",
|
|
10
|
+
"jsdelivr": "./dist/full.umd.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.es.mjs",
|
|
14
|
+
"require": "./dist/full.umd.js",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./full": {
|
|
18
|
+
"import": "./dist/full.es.mjs",
|
|
19
|
+
"require": "./dist/full.umd.js",
|
|
20
|
+
"types": "./dist/full.d.ts"
|
|
21
|
+
},
|
|
22
|
+
"./core": {
|
|
23
|
+
"import": "./dist/core.es.mjs",
|
|
24
|
+
"types": "./dist/core/index.d.ts"
|
|
25
|
+
},
|
|
26
|
+
"./reactive": {
|
|
27
|
+
"import": "./dist/reactive.es.mjs",
|
|
28
|
+
"types": "./dist/reactive/index.d.ts"
|
|
29
|
+
},
|
|
30
|
+
"./component": {
|
|
31
|
+
"import": "./dist/component.es.mjs",
|
|
32
|
+
"types": "./dist/component/index.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./motion": {
|
|
35
|
+
"import": "./dist/motion.es.mjs",
|
|
36
|
+
"types": "./dist/motion/index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./security": {
|
|
39
|
+
"import": "./dist/security.es.mjs",
|
|
40
|
+
"types": "./dist/security/index.d.ts"
|
|
41
|
+
},
|
|
42
|
+
"./platform": {
|
|
43
|
+
"import": "./dist/platform.es.mjs",
|
|
44
|
+
"types": "./dist/platform/index.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"./router": {
|
|
47
|
+
"import": "./dist/router.es.mjs",
|
|
48
|
+
"types": "./dist/router/index.d.ts"
|
|
49
|
+
},
|
|
50
|
+
"./store": {
|
|
51
|
+
"import": "./dist/store.es.mjs",
|
|
52
|
+
"types": "./dist/store/index.d.ts"
|
|
53
|
+
},
|
|
54
|
+
"./view": {
|
|
55
|
+
"import": "./dist/view.es.mjs",
|
|
56
|
+
"types": "./dist/view/index.d.ts"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"dist",
|
|
61
|
+
"src",
|
|
62
|
+
"README.md",
|
|
63
|
+
"LICENSE.md"
|
|
64
|
+
],
|
|
65
|
+
"sideEffects": false,
|
|
66
|
+
"scripts": {
|
|
67
|
+
"dev": "vitepress dev docs",
|
|
68
|
+
"build:docs": "vitepress build docs",
|
|
69
|
+
"preview": "vitepress preview docs",
|
|
70
|
+
"playground": "vite dev playground",
|
|
71
|
+
"build": "bun run build:lib && bun run build:umd && bun run build:types",
|
|
72
|
+
"build:lib": "vite build",
|
|
73
|
+
"build:umd": "vite build --config vite.umd.config.ts",
|
|
74
|
+
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
75
|
+
"test": "bun test",
|
|
76
|
+
"test:watch": "bun test --watch",
|
|
77
|
+
"lint": "eslint . --fix",
|
|
78
|
+
"lint:types": "tsc --noEmit",
|
|
79
|
+
"format": "prettier --write .",
|
|
80
|
+
"format:check": "prettier --check .",
|
|
81
|
+
"docs:api": "typedoc",
|
|
82
|
+
"clean": "rimraf dist",
|
|
83
|
+
"prepublishOnly": "bun run clean && bun run build && bun test"
|
|
84
|
+
},
|
|
85
|
+
"keywords": [
|
|
86
|
+
"dom",
|
|
87
|
+
"manipulation",
|
|
88
|
+
"jquery",
|
|
89
|
+
"modern",
|
|
90
|
+
"typescript",
|
|
91
|
+
"signals",
|
|
92
|
+
"reactive",
|
|
93
|
+
"components",
|
|
94
|
+
"web-components",
|
|
95
|
+
"animation",
|
|
96
|
+
"motion",
|
|
97
|
+
"zero-build",
|
|
98
|
+
"cdn"
|
|
99
|
+
],
|
|
100
|
+
"author": "Jonas Pfalzgraf <support@josunlp.de>",
|
|
101
|
+
"license": "MIT",
|
|
102
|
+
"repository": {
|
|
103
|
+
"type": "git",
|
|
104
|
+
"url": "https://github.com/bQuery/bQuery.git"
|
|
105
|
+
},
|
|
106
|
+
"homepage": "https://bQuery.flausch-code.de",
|
|
107
|
+
"bugs": {
|
|
108
|
+
"url": "https://github.com/bQuery/bQuery/issues"
|
|
109
|
+
},
|
|
110
|
+
"publishConfig": {
|
|
111
|
+
"access": "public",
|
|
112
|
+
"registry": "https://registry.npmjs.org/"
|
|
113
|
+
},
|
|
114
|
+
"engines": {
|
|
115
|
+
"node": ">=18.0.0"
|
|
116
|
+
},
|
|
117
|
+
"devDependencies": {
|
|
118
|
+
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
119
|
+
"@typescript-eslint/parser": "^8.53.1",
|
|
120
|
+
"bun-types": "^1.3.6",
|
|
121
|
+
"eslint": "^9.39.2",
|
|
122
|
+
"eslint-config-prettier": "^9.1.2",
|
|
123
|
+
"globals": "^15.15.0",
|
|
124
|
+
"happy-dom": "^20.3.7",
|
|
125
|
+
"prettier": "^3.8.1",
|
|
126
|
+
"rimraf": "^5.0.10",
|
|
127
|
+
"typedoc": "^0.25.13",
|
|
128
|
+
"typescript": "^5.9.3",
|
|
129
|
+
"vite": "^5.4.21",
|
|
130
|
+
"vitepress": "^1.6.4"
|
|
131
|
+
}
|
|
132
|
+
}
|
package/src/full.ts
CHANGED
|
@@ -104,3 +104,47 @@ export type {
|
|
|
104
104
|
NotificationOptions,
|
|
105
105
|
StorageAdapter,
|
|
106
106
|
} from './platform/index';
|
|
107
|
+
|
|
108
|
+
// ============================================================================
|
|
109
|
+
// Router Module: SPA routing, navigation guards, lazy loading
|
|
110
|
+
// ============================================================================
|
|
111
|
+
export {
|
|
112
|
+
back,
|
|
113
|
+
createRouter,
|
|
114
|
+
currentRoute,
|
|
115
|
+
forward,
|
|
116
|
+
interceptLinks,
|
|
117
|
+
isActive,
|
|
118
|
+
isActiveSignal,
|
|
119
|
+
link,
|
|
120
|
+
navigate,
|
|
121
|
+
resolve,
|
|
122
|
+
} from './router/index';
|
|
123
|
+
export type {
|
|
124
|
+
NavigationGuard,
|
|
125
|
+
Route,
|
|
126
|
+
RouteDefinition,
|
|
127
|
+
Router,
|
|
128
|
+
RouterOptions,
|
|
129
|
+
} from './router/index';
|
|
130
|
+
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// Store Module: Signal-based state management
|
|
133
|
+
// ============================================================================
|
|
134
|
+
export {
|
|
135
|
+
createPersistedStore,
|
|
136
|
+
createStore,
|
|
137
|
+
destroyStore,
|
|
138
|
+
getStore,
|
|
139
|
+
listStores,
|
|
140
|
+
mapActions,
|
|
141
|
+
mapState,
|
|
142
|
+
registerPlugin,
|
|
143
|
+
} from './store/index';
|
|
144
|
+
export type { StateFactory, Store, StoreDefinition, StorePlugin } from './store/index';
|
|
145
|
+
|
|
146
|
+
// ============================================================================
|
|
147
|
+
// View Module: Declarative DOM bindings without compiler
|
|
148
|
+
// ============================================================================
|
|
149
|
+
export { createTemplate, mount } from './view/index';
|
|
150
|
+
export type { BindingContext, MountOptions, View } from './view/index';
|
package/src/index.ts
CHANGED
|
@@ -25,3 +25,12 @@ export * from './security/index';
|
|
|
25
25
|
|
|
26
26
|
// Platform module: storage, buckets, notifications, cache
|
|
27
27
|
export * from './platform/index';
|
|
28
|
+
|
|
29
|
+
// Router module: SPA routing, navigation guards
|
|
30
|
+
export * from './router/index';
|
|
31
|
+
|
|
32
|
+
// Store module: state management with signals
|
|
33
|
+
export * from './store/index';
|
|
34
|
+
|
|
35
|
+
// View module: declarative DOM bindings
|
|
36
|
+
export * from './view/index';
|
package/src/reactive/signal.ts
CHANGED
|
@@ -205,6 +205,20 @@ export class Computed<T> {
|
|
|
205
205
|
}
|
|
206
206
|
return this.cachedValue;
|
|
207
207
|
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Reads the current computed value without tracking.
|
|
211
|
+
* Useful when you need the value but don't want to create a dependency.
|
|
212
|
+
*
|
|
213
|
+
* @returns The current cached value (recomputes if dirty)
|
|
214
|
+
*/
|
|
215
|
+
peek(): T {
|
|
216
|
+
if (this.dirty) {
|
|
217
|
+
this.dirty = false;
|
|
218
|
+
this.cachedValue = track(this.markDirty, this.compute);
|
|
219
|
+
}
|
|
220
|
+
return this.cachedValue;
|
|
221
|
+
}
|
|
208
222
|
}
|
|
209
223
|
|
|
210
224
|
/**
|