@bquery/bquery 1.0.1 → 1.1.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 +79 -25
- package/dist/component/index.d.ts +8 -0
- package/dist/component/index.d.ts.map +1 -1
- package/dist/component.es.mjs +80 -53
- package/dist/component.es.mjs.map +1 -1
- package/dist/core/collection.d.ts +46 -0
- package/dist/core/collection.d.ts.map +1 -1
- package/dist/core/element.d.ts +124 -22
- package/dist/core/element.d.ts.map +1 -1
- package/dist/core/utils.d.ts +13 -0
- package/dist/core/utils.d.ts.map +1 -1
- package/dist/core.es.mjs +298 -55
- package/dist/core.es.mjs.map +1 -1
- package/dist/full.d.ts +2 -2
- package/dist/full.d.ts.map +1 -1
- package/dist/full.es.mjs +38 -33
- package/dist/full.iife.js +1 -1
- package/dist/full.iife.js.map +1 -1
- package/dist/full.umd.js +1 -1
- package/dist/full.umd.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.mjs +38 -33
- package/dist/reactive/index.d.ts +2 -2
- package/dist/reactive/index.d.ts.map +1 -1
- package/dist/reactive/signal.d.ts +107 -0
- package/dist/reactive/signal.d.ts.map +1 -1
- package/dist/reactive.es.mjs +92 -55
- package/dist/reactive.es.mjs.map +1 -1
- package/dist/security/sanitize.d.ts.map +1 -1
- package/dist/security.es.mjs +136 -66
- package/dist/security.es.mjs.map +1 -1
- package/package.json +120 -120
- package/src/component/index.ts +414 -360
- package/src/core/collection.ts +454 -339
- package/src/core/element.ts +740 -493
- package/src/core/utils.ts +444 -425
- package/src/full.ts +106 -101
- package/src/index.ts +27 -27
- package/src/reactive/index.ts +22 -9
- package/src/reactive/signal.ts +506 -347
- package/src/security/sanitize.ts +553 -446
package/src/full.ts
CHANGED
|
@@ -1,101 +1,106 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* bQuery.js — Full Bundle
|
|
3
|
-
*
|
|
4
|
-
* This is the complete bundle containing all modules for CDN usage.
|
|
5
|
-
* Use this when you want all features without tree-shaking concerns.
|
|
6
|
-
*
|
|
7
|
-
* @module bquery/full
|
|
8
|
-
*
|
|
9
|
-
* @example CDN Usage (ES Modules)
|
|
10
|
-
* ```html
|
|
11
|
-
* <script type="module">
|
|
12
|
-
* import { $, signal, component } from 'https://unpkg.com/bquery@1/dist/full.es.mjs';
|
|
13
|
-
*
|
|
14
|
-
* const count = signal(0);
|
|
15
|
-
* $('#counter').text(count.value);
|
|
16
|
-
* </script>
|
|
17
|
-
* ```
|
|
18
|
-
*
|
|
19
|
-
* @example CDN Usage (UMD/Global)
|
|
20
|
-
* ```html
|
|
21
|
-
* <script src="https://unpkg.com/bquery@1/dist/full.umd.js"></script>
|
|
22
|
-
* <script>
|
|
23
|
-
* const { $, signal } = bQuery;
|
|
24
|
-
* const count = signal(0);
|
|
25
|
-
* </script>
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @example CDN Usage (IIFE)
|
|
29
|
-
* ```html
|
|
30
|
-
* <script src="https://unpkg.com/bquery@1/dist/full.iife.js"></script>
|
|
31
|
-
* <script>
|
|
32
|
-
* // bQuery is available as a global variable
|
|
33
|
-
* const { $, $$ } = bQuery;
|
|
34
|
-
* </script>
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
// ============================================================================
|
|
39
|
-
// Core Module: Selectors, DOM operations, events, utilities
|
|
40
|
-
// ============================================================================
|
|
41
|
-
export { $, $$, BQueryCollection, BQueryElement, utils } from './core/index';
|
|
42
|
-
|
|
43
|
-
// ============================================================================
|
|
44
|
-
// Reactive Module: Signals, computed values, effects, batching
|
|
45
|
-
// ============================================================================
|
|
46
|
-
export {
|
|
47
|
-
Computed,
|
|
48
|
-
Signal,
|
|
49
|
-
batch,
|
|
50
|
-
computed,
|
|
51
|
-
effect,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
//
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
export {
|
|
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
|
-
export {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
/**
|
|
2
|
+
* bQuery.js — Full Bundle
|
|
3
|
+
*
|
|
4
|
+
* This is the complete bundle containing all modules for CDN usage.
|
|
5
|
+
* Use this when you want all features without tree-shaking concerns.
|
|
6
|
+
*
|
|
7
|
+
* @module bquery/full
|
|
8
|
+
*
|
|
9
|
+
* @example CDN Usage (ES Modules)
|
|
10
|
+
* ```html
|
|
11
|
+
* <script type="module">
|
|
12
|
+
* import { $, signal, component } from 'https://unpkg.com/bquery@1/dist/full.es.mjs';
|
|
13
|
+
*
|
|
14
|
+
* const count = signal(0);
|
|
15
|
+
* $('#counter').text(count.value);
|
|
16
|
+
* </script>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example CDN Usage (UMD/Global)
|
|
20
|
+
* ```html
|
|
21
|
+
* <script src="https://unpkg.com/bquery@1/dist/full.umd.js"></script>
|
|
22
|
+
* <script>
|
|
23
|
+
* const { $, signal } = bQuery;
|
|
24
|
+
* const count = signal(0);
|
|
25
|
+
* </script>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example CDN Usage (IIFE)
|
|
29
|
+
* ```html
|
|
30
|
+
* <script src="https://unpkg.com/bquery@1/dist/full.iife.js"></script>
|
|
31
|
+
* <script>
|
|
32
|
+
* // bQuery is available as a global variable
|
|
33
|
+
* const { $, $$ } = bQuery;
|
|
34
|
+
* </script>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
// ============================================================================
|
|
39
|
+
// Core Module: Selectors, DOM operations, events, utilities
|
|
40
|
+
// ============================================================================
|
|
41
|
+
export { $, $$, BQueryCollection, BQueryElement, utils } from './core/index';
|
|
42
|
+
|
|
43
|
+
// ============================================================================
|
|
44
|
+
// Reactive Module: Signals, computed values, effects, batching
|
|
45
|
+
// ============================================================================
|
|
46
|
+
export {
|
|
47
|
+
Computed,
|
|
48
|
+
Signal,
|
|
49
|
+
batch,
|
|
50
|
+
computed,
|
|
51
|
+
effect,
|
|
52
|
+
isComputed,
|
|
53
|
+
isSignal,
|
|
54
|
+
persistedSignal,
|
|
55
|
+
readonly,
|
|
56
|
+
signal,
|
|
57
|
+
untrack,
|
|
58
|
+
watch,
|
|
59
|
+
} from './reactive/index';
|
|
60
|
+
export type { CleanupFn, Observer, ReadonlySignal } from './reactive/index';
|
|
61
|
+
|
|
62
|
+
// ============================================================================
|
|
63
|
+
// Component Module: Web Components helper with Shadow DOM
|
|
64
|
+
// ============================================================================
|
|
65
|
+
export { component, html, safeHtml } from './component/index';
|
|
66
|
+
export type { ComponentDefinition, PropDefinition } from './component/index';
|
|
67
|
+
|
|
68
|
+
// ============================================================================
|
|
69
|
+
// Motion Module: View transitions, FLIP animations, springs
|
|
70
|
+
// ============================================================================
|
|
71
|
+
export { capturePosition, flip, flipList, spring, springPresets, transition } from './motion/index';
|
|
72
|
+
export type {
|
|
73
|
+
ElementBounds,
|
|
74
|
+
FlipOptions,
|
|
75
|
+
Spring,
|
|
76
|
+
SpringConfig,
|
|
77
|
+
TransitionOptions,
|
|
78
|
+
} from './motion/index';
|
|
79
|
+
|
|
80
|
+
// ============================================================================
|
|
81
|
+
// Security Module: Sanitization, CSP compatibility, Trusted Types
|
|
82
|
+
// ============================================================================
|
|
83
|
+
export {
|
|
84
|
+
createTrustedHtml,
|
|
85
|
+
escapeHtml,
|
|
86
|
+
generateNonce,
|
|
87
|
+
getTrustedTypesPolicy,
|
|
88
|
+
hasCSPDirective,
|
|
89
|
+
isTrustedTypesSupported,
|
|
90
|
+
sanitize,
|
|
91
|
+
sanitizeHtml,
|
|
92
|
+
stripTags,
|
|
93
|
+
} from './security/index';
|
|
94
|
+
export type { SanitizeOptions } from './security/index';
|
|
95
|
+
|
|
96
|
+
// ============================================================================
|
|
97
|
+
// Platform Module: Storage, buckets, notifications, cache
|
|
98
|
+
// ============================================================================
|
|
99
|
+
export { buckets, cache, notifications, storage } from './platform/index';
|
|
100
|
+
export type {
|
|
101
|
+
Bucket,
|
|
102
|
+
CacheHandle,
|
|
103
|
+
IndexedDBOptions,
|
|
104
|
+
NotificationOptions,
|
|
105
|
+
StorageAdapter,
|
|
106
|
+
} from './platform/index';
|
package/src/index.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* bQuery.js — The jQuery for the Modern Web Platform
|
|
3
|
-
*
|
|
4
|
-
* A zero-build, TypeScript-first library that bridges vanilla JavaScript
|
|
5
|
-
* and build-step frameworks with modern features.
|
|
6
|
-
*
|
|
7
|
-
* @module bquery
|
|
8
|
-
* @see https://github.com/
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// Core module: selectors, DOM ops, events, utils
|
|
12
|
-
export * from './core/index';
|
|
13
|
-
|
|
14
|
-
// Reactive module: signals, computed, effects, binding
|
|
15
|
-
export * from './reactive/index';
|
|
16
|
-
|
|
17
|
-
// Component module: Web Components helper
|
|
18
|
-
export * from './component/index';
|
|
19
|
-
|
|
20
|
-
// Motion module: view transitions, FLIP, springs
|
|
21
|
-
export * from './motion/index';
|
|
22
|
-
|
|
23
|
-
// Security module: sanitizer, CSP, Trusted Types
|
|
24
|
-
export * from './security/index';
|
|
25
|
-
|
|
26
|
-
// Platform module: storage, buckets, notifications, cache
|
|
27
|
-
export * from './platform/index';
|
|
1
|
+
/**
|
|
2
|
+
* bQuery.js — The jQuery for the Modern Web Platform
|
|
3
|
+
*
|
|
4
|
+
* A zero-build, TypeScript-first library that bridges vanilla JavaScript
|
|
5
|
+
* and build-step frameworks with modern features.
|
|
6
|
+
*
|
|
7
|
+
* @module bquery
|
|
8
|
+
* @see https://github.com/bquery/bquery
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Core module: selectors, DOM ops, events, utils
|
|
12
|
+
export * from './core/index';
|
|
13
|
+
|
|
14
|
+
// Reactive module: signals, computed, effects, binding
|
|
15
|
+
export * from './reactive/index';
|
|
16
|
+
|
|
17
|
+
// Component module: Web Components helper
|
|
18
|
+
export * from './component/index';
|
|
19
|
+
|
|
20
|
+
// Motion module: view transitions, FLIP, springs
|
|
21
|
+
export * from './motion/index';
|
|
22
|
+
|
|
23
|
+
// Security module: sanitizer, CSP, Trusted Types
|
|
24
|
+
export * from './security/index';
|
|
25
|
+
|
|
26
|
+
// Platform module: storage, buckets, notifications, cache
|
|
27
|
+
export * from './platform/index';
|
package/src/reactive/index.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reactive module providing fine-grained reactivity primitives.
|
|
3
|
-
*
|
|
4
|
-
* @module bquery/reactive
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Reactive module providing fine-grained reactivity primitives.
|
|
3
|
+
*
|
|
4
|
+
* @module bquery/reactive
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
Computed,
|
|
9
|
+
Signal,
|
|
10
|
+
batch,
|
|
11
|
+
computed,
|
|
12
|
+
effect,
|
|
13
|
+
isComputed,
|
|
14
|
+
isSignal,
|
|
15
|
+
persistedSignal,
|
|
16
|
+
readonly,
|
|
17
|
+
signal,
|
|
18
|
+
untrack,
|
|
19
|
+
watch,
|
|
20
|
+
} from './signal';
|
|
21
|
+
|
|
22
|
+
export type { CleanupFn, Observer, ReadonlySignal } from './signal';
|