@bquery/bquery 1.0.2 → 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.
Files changed (41) hide show
  1. package/README.md +61 -7
  2. package/dist/component/index.d.ts +8 -0
  3. package/dist/component/index.d.ts.map +1 -1
  4. package/dist/component.es.mjs +80 -53
  5. package/dist/component.es.mjs.map +1 -1
  6. package/dist/core/collection.d.ts +46 -0
  7. package/dist/core/collection.d.ts.map +1 -1
  8. package/dist/core/element.d.ts +124 -22
  9. package/dist/core/element.d.ts.map +1 -1
  10. package/dist/core/utils.d.ts +13 -0
  11. package/dist/core/utils.d.ts.map +1 -1
  12. package/dist/core.es.mjs +298 -55
  13. package/dist/core.es.mjs.map +1 -1
  14. package/dist/full.d.ts +2 -2
  15. package/dist/full.d.ts.map +1 -1
  16. package/dist/full.es.mjs +38 -33
  17. package/dist/full.iife.js +1 -1
  18. package/dist/full.iife.js.map +1 -1
  19. package/dist/full.umd.js +1 -1
  20. package/dist/full.umd.js.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.es.mjs +38 -33
  23. package/dist/reactive/index.d.ts +2 -2
  24. package/dist/reactive/index.d.ts.map +1 -1
  25. package/dist/reactive/signal.d.ts +107 -0
  26. package/dist/reactive/signal.d.ts.map +1 -1
  27. package/dist/reactive.es.mjs +92 -55
  28. package/dist/reactive.es.mjs.map +1 -1
  29. package/dist/security/sanitize.d.ts.map +1 -1
  30. package/dist/security.es.mjs +136 -66
  31. package/dist/security.es.mjs.map +1 -1
  32. package/package.json +120 -120
  33. package/src/component/index.ts +414 -360
  34. package/src/core/collection.ts +454 -339
  35. package/src/core/element.ts +740 -493
  36. package/src/core/utils.ts +444 -425
  37. package/src/full.ts +106 -101
  38. package/src/index.ts +27 -27
  39. package/src/reactive/index.ts +22 -9
  40. package/src/reactive/signal.ts +506 -347
  41. 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
- persistedSignal,
53
- signal,
54
- } from './reactive/index';
55
- export type { CleanupFn, Observer } from './reactive/index';
56
-
57
- // ============================================================================
58
- // Component Module: Web Components helper with Shadow DOM
59
- // ============================================================================
60
- export { component, html, safeHtml } from './component/index';
61
- export type { ComponentDefinition, PropDefinition } from './component/index';
62
-
63
- // ============================================================================
64
- // Motion Module: View transitions, FLIP animations, springs
65
- // ============================================================================
66
- export { capturePosition, flip, flipList, spring, springPresets, transition } from './motion/index';
67
- export type {
68
- ElementBounds,
69
- FlipOptions,
70
- Spring,
71
- SpringConfig,
72
- TransitionOptions,
73
- } from './motion/index';
74
-
75
- // ============================================================================
76
- // Security Module: Sanitization, CSP compatibility, Trusted Types
77
- // ============================================================================
78
- export {
79
- createTrustedHtml,
80
- escapeHtml,
81
- generateNonce,
82
- getTrustedTypesPolicy,
83
- hasCSPDirective,
84
- isTrustedTypesSupported,
85
- sanitize,
86
- sanitizeHtml,
87
- stripTags,
88
- } from './security/index';
89
- export type { SanitizeOptions } from './security/index';
90
-
91
- // ============================================================================
92
- // Platform Module: Storage, buckets, notifications, cache
93
- // ============================================================================
94
- export { buckets, cache, notifications, storage } from './platform/index';
95
- export type {
96
- Bucket,
97
- CacheHandle,
98
- IndexedDBOptions,
99
- NotificationOptions,
100
- StorageAdapter,
101
- } from './platform/index';
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/your-org/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';
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';
@@ -1,9 +1,22 @@
1
- /**
2
- * Reactive module providing fine-grained reactivity primitives.
3
- *
4
- * @module bquery/reactive
5
- */
6
-
7
- export { batch, Computed, computed, effect, persistedSignal, Signal, signal } from './signal';
8
-
9
- export type { CleanupFn, Observer } from './signal';
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';