@bquery/bquery 1.5.0 → 1.6.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 (106) hide show
  1. package/README.md +586 -546
  2. package/dist/component/component.d.ts +13 -5
  3. package/dist/component/component.d.ts.map +1 -1
  4. package/dist/component/html.d.ts +40 -3
  5. package/dist/component/html.d.ts.map +1 -1
  6. package/dist/component/index.d.ts +2 -2
  7. package/dist/component/index.d.ts.map +1 -1
  8. package/dist/component/library.d.ts.map +1 -1
  9. package/dist/component/types.d.ts +131 -16
  10. package/dist/component/types.d.ts.map +1 -1
  11. package/dist/component-BEQgt5hl.js +600 -0
  12. package/dist/component-BEQgt5hl.js.map +1 -0
  13. package/dist/component.es.mjs +7 -6
  14. package/dist/config-DRmZZno3.js.map +1 -1
  15. package/dist/core-BGQJVw0-.js +35 -0
  16. package/dist/core-BGQJVw0-.js.map +1 -0
  17. package/dist/{core-CK2Mfpf4.js → core-CCEabVHl.js} +2 -2
  18. package/dist/{core-CK2Mfpf4.js.map → core-CCEabVHl.js.map} +1 -1
  19. package/dist/core.es.mjs +1 -1
  20. package/dist/effect-AFRW_Plg.js +84 -0
  21. package/dist/effect-AFRW_Plg.js.map +1 -0
  22. package/dist/full.d.ts +4 -4
  23. package/dist/full.d.ts.map +1 -1
  24. package/dist/full.es.mjs +98 -94
  25. package/dist/full.iife.js +14 -14
  26. package/dist/full.iife.js.map +1 -1
  27. package/dist/full.umd.js +14 -14
  28. package/dist/full.umd.js.map +1 -1
  29. package/dist/index.es.mjs +143 -139
  30. package/dist/{motion-C5DRdPnO.js → motion-D9TcHxOF.js} +1 -1
  31. package/dist/{motion-C5DRdPnO.js.map → motion-D9TcHxOF.js.map} +1 -1
  32. package/dist/motion.es.mjs +1 -1
  33. package/dist/{platform-B7JhGBc7.js → platform-Dr9b6fsq.js} +21 -20
  34. package/dist/platform-Dr9b6fsq.js.map +1 -0
  35. package/dist/platform.es.mjs +1 -1
  36. package/dist/{reactive-BDya-ia8.js → reactive-DSkct0dO.js} +51 -50
  37. package/dist/reactive-DSkct0dO.js.map +1 -0
  38. package/dist/reactive.es.mjs +19 -17
  39. package/dist/{router-CijiICxt.js → router-CbDhl8rS.js} +3 -3
  40. package/dist/{router-CijiICxt.js.map → router-CbDhl8rS.js.map} +1 -1
  41. package/dist/router.es.mjs +1 -1
  42. package/dist/{sanitize-jyJ2ryE2.js → sanitize-Bs2dkMby.js} +94 -83
  43. package/dist/sanitize-Bs2dkMby.js.map +1 -0
  44. package/dist/security/index.d.ts +4 -2
  45. package/dist/security/index.d.ts.map +1 -1
  46. package/dist/security/sanitize.d.ts +4 -1
  47. package/dist/security/sanitize.d.ts.map +1 -1
  48. package/dist/security/trusted-html.d.ts +53 -0
  49. package/dist/security/trusted-html.d.ts.map +1 -0
  50. package/dist/security.es.mjs +10 -9
  51. package/dist/store/define-store.d.ts +1 -1
  52. package/dist/store/define-store.d.ts.map +1 -1
  53. package/dist/store/mapping.d.ts +1 -1
  54. package/dist/store/mapping.d.ts.map +1 -1
  55. package/dist/store/persisted.d.ts +1 -1
  56. package/dist/store/persisted.d.ts.map +1 -1
  57. package/dist/store/types.d.ts +2 -2
  58. package/dist/store/types.d.ts.map +1 -1
  59. package/dist/store/watch.d.ts +1 -1
  60. package/dist/store/watch.d.ts.map +1 -1
  61. package/dist/{store-CPK9E62U.js → store-BwDvI45q.js} +49 -48
  62. package/dist/{store-CPK9E62U.js.map → store-BwDvI45q.js.map} +1 -1
  63. package/dist/store.es.mjs +1 -1
  64. package/dist/storybook/index.d.ts +37 -0
  65. package/dist/storybook/index.d.ts.map +1 -0
  66. package/dist/storybook.es.mjs +151 -0
  67. package/dist/storybook.es.mjs.map +1 -0
  68. package/dist/untrack-B0rVscTc.js +7 -0
  69. package/dist/untrack-B0rVscTc.js.map +1 -0
  70. package/dist/{view-Cdi0g-qo.js → view-C70lA3vf.js} +29 -28
  71. package/dist/{view-Cdi0g-qo.js.map → view-C70lA3vf.js.map} +1 -1
  72. package/dist/view.es.mjs +9 -8
  73. package/package.json +141 -136
  74. package/src/component/component.ts +259 -54
  75. package/src/component/html.ts +153 -53
  76. package/src/component/index.ts +10 -2
  77. package/src/component/library.ts +42 -28
  78. package/src/component/types.ts +184 -19
  79. package/src/full.ts +8 -2
  80. package/src/motion/transition.ts +97 -97
  81. package/src/motion/types.ts +208 -208
  82. package/src/platform/announcer.ts +208 -208
  83. package/src/platform/config.ts +163 -163
  84. package/src/platform/cookies.ts +165 -165
  85. package/src/platform/index.ts +39 -39
  86. package/src/platform/meta.ts +168 -168
  87. package/src/reactive/async-data.ts +486 -486
  88. package/src/reactive/index.ts +37 -37
  89. package/src/reactive/signal.ts +29 -29
  90. package/src/security/constants.ts +211 -211
  91. package/src/security/index.ts +17 -10
  92. package/src/security/sanitize.ts +70 -66
  93. package/src/security/trusted-html.ts +71 -0
  94. package/src/store/define-store.ts +49 -48
  95. package/src/store/mapping.ts +74 -73
  96. package/src/store/persisted.ts +62 -61
  97. package/src/store/types.ts +92 -94
  98. package/src/store/watch.ts +53 -52
  99. package/src/storybook/index.ts +479 -0
  100. package/dist/component-CY5MVoYN.js +0 -531
  101. package/dist/component-CY5MVoYN.js.map +0 -1
  102. package/dist/core-DPdbItcq.js +0 -112
  103. package/dist/core-DPdbItcq.js.map +0 -1
  104. package/dist/platform-B7JhGBc7.js.map +0 -1
  105. package/dist/reactive-BDya-ia8.js.map +0 -1
  106. package/dist/sanitize-jyJ2ryE2.js.map +0 -1
@@ -1,208 +1,208 @@
1
- /**
2
- * Shared Motion module types.
3
- *
4
- * @module bquery/motion
5
- */
6
-
7
- /**
8
- * Options for view transitions.
9
- */
10
- export interface TransitionOptions {
11
- /** The DOM update function to execute during transition */
12
- update: () => void | Promise<void>;
13
- /** Skip the transition when reduced motion is preferred. */
14
- skipOnReducedMotion?: boolean;
15
- /** Classes applied to the root element while the transition is active. */
16
- classes?: string[];
17
- /** Transition types added when supported by the browser. */
18
- types?: string[];
19
- /** Called after the transition becomes ready. */
20
- onReady?: () => void;
21
- /** Called after the transition finishes. */
22
- onFinish?: () => void;
23
- }
24
-
25
- /**
26
- * Captured element bounds for FLIP animations.
27
- */
28
- export interface ElementBounds {
29
- top: number;
30
- left: number;
31
- width: number;
32
- height: number;
33
- }
34
-
35
- /**
36
- * FLIP animation configuration options.
37
- */
38
- export interface FlipOptions {
39
- /** Animation duration in milliseconds */
40
- duration?: number;
41
- /** CSS easing function */
42
- easing?: string;
43
- /** Callback when animation completes */
44
- onComplete?: () => void;
45
- }
46
-
47
- /**
48
- * Stagger delay function signature.
49
- */
50
- export type StaggerFunction = (index: number, total: number) => number;
51
-
52
- /**
53
- * Extended options for group FLIP animations.
54
- */
55
- export interface FlipGroupOptions extends FlipOptions {
56
- /** Optional stagger delay function */
57
- stagger?: StaggerFunction;
58
- }
59
-
60
- /**
61
- * Spring physics configuration.
62
- */
63
- export interface SpringConfig {
64
- /** Spring stiffness (default: 100) */
65
- stiffness?: number;
66
- /** Damping coefficient (default: 10) */
67
- damping?: number;
68
- /** Mass of the object (default: 1) */
69
- mass?: number;
70
- /** Velocity threshold for completion (default: 0.01) */
71
- precision?: number;
72
- }
73
-
74
- /**
75
- * Spring instance for animating values.
76
- */
77
- export interface Spring {
78
- /** Start animating to target value */
79
- to(target: number): Promise<void>;
80
- /** Get current animated value */
81
- current(): number;
82
- /** Stop the animation */
83
- stop(): void;
84
- /** Subscribe to value changes */
85
- onChange(callback: (value: number) => void): () => void;
86
- }
87
-
88
- /**
89
- * Web Animations helper configuration.
90
- */
91
- export interface AnimateOptions {
92
- /** Keyframes to animate */
93
- keyframes: Keyframe[] | PropertyIndexedKeyframes;
94
- /** Animation options (duration, easing, etc.) */
95
- options?: KeyframeAnimationOptions;
96
- /** Commit final styles to the element (default: true) */
97
- commitStyles?: boolean;
98
- /** Respect prefers-reduced-motion (default: true) */
99
- respectReducedMotion?: boolean;
100
- /** Callback when animation completes */
101
- onFinish?: () => void;
102
- }
103
-
104
- /**
105
- * Stagger helper configuration.
106
- */
107
- export interface StaggerOptions {
108
- /** Start delay in milliseconds (default: 0) */
109
- start?: number;
110
- /** Origin index or keyword (default: 'start') */
111
- from?: 'start' | 'center' | 'end' | number;
112
- /** Optional easing function for normalized distance */
113
- easing?: EasingFunction;
114
- }
115
-
116
- /**
117
- * Easing function signature.
118
- */
119
- export type EasingFunction = (t: number) => number;
120
-
121
- /**
122
- * Sequence step configuration.
123
- */
124
- export interface SequenceStep extends AnimateOptions {
125
- /** Target element to animate */
126
- target: Element;
127
- }
128
-
129
- /**
130
- * Sequence run configuration.
131
- */
132
- export interface SequenceOptions {
133
- /** Optional stagger delay between steps */
134
- stagger?: StaggerFunction;
135
- /** Callback when sequence completes */
136
- onFinish?: () => void;
137
- }
138
-
139
- /**
140
- * Timeline step configuration.
141
- */
142
- export interface TimelineStep {
143
- /** Target element to animate */
144
- target: Element;
145
- /** Keyframes to animate */
146
- keyframes: Keyframe[] | PropertyIndexedKeyframes;
147
- /** Animation options for this step */
148
- options?: KeyframeAnimationOptions;
149
- /** Absolute or relative start time in milliseconds */
150
- at?: number | `+=${number}` | `-=${number}`;
151
- /** Optional label for debugging */
152
- label?: string;
153
- }
154
-
155
- /**
156
- * Timeline configuration.
157
- */
158
- export interface TimelineConfig {
159
- /** Commit final styles when timeline completes (default: true) */
160
- commitStyles?: boolean;
161
- /** Respect prefers-reduced-motion (default: true) */
162
- respectReducedMotion?: boolean;
163
- /** Callback when timeline completes */
164
- onFinish?: () => void;
165
- }
166
-
167
- /**
168
- * Timeline controls.
169
- */
170
- export interface TimelineControls {
171
- /** Play all steps */
172
- play(): Promise<void>;
173
- /** Pause animations */
174
- pause(): void;
175
- /** Resume animations */
176
- resume(): void;
177
- /** Stop and cancel animations */
178
- stop(): void;
179
- /** Seek to a specific time in milliseconds */
180
- seek(time: number): void;
181
- /** Add a step to the timeline */
182
- add(step: TimelineStep): void;
183
- /** Total timeline duration in milliseconds */
184
- duration(): number;
185
- /** Subscribe to finish events */
186
- onFinish(callback: () => void): () => void;
187
- }
188
-
189
- /**
190
- * Scroll animation configuration.
191
- */
192
- export interface ScrollAnimateOptions extends AnimateOptions {
193
- /** IntersectionObserver root */
194
- root?: Element | Document | null;
195
- /** Root margin for observer */
196
- rootMargin?: string;
197
- /** Intersection thresholds */
198
- threshold?: number | number[];
199
- /** Trigger only once (default: true) */
200
- once?: boolean;
201
- /** Callback when element enters the viewport */
202
- onEnter?: (element: Element) => void;
203
- }
204
-
205
- /**
206
- * Cleanup function for scroll animations.
207
- */
208
- export type ScrollAnimateCleanup = () => void;
1
+ /**
2
+ * Shared Motion module types.
3
+ *
4
+ * @module bquery/motion
5
+ */
6
+
7
+ /**
8
+ * Options for view transitions.
9
+ */
10
+ export interface TransitionOptions {
11
+ /** The DOM update function to execute during transition */
12
+ update: () => void | Promise<void>;
13
+ /** Skip the transition when reduced motion is preferred. */
14
+ skipOnReducedMotion?: boolean;
15
+ /** Classes applied to the root element while the transition is active. */
16
+ classes?: string[];
17
+ /** Transition types added when supported by the browser. */
18
+ types?: string[];
19
+ /** Called after the transition becomes ready. */
20
+ onReady?: () => void;
21
+ /** Called after the transition finishes. */
22
+ onFinish?: () => void;
23
+ }
24
+
25
+ /**
26
+ * Captured element bounds for FLIP animations.
27
+ */
28
+ export interface ElementBounds {
29
+ top: number;
30
+ left: number;
31
+ width: number;
32
+ height: number;
33
+ }
34
+
35
+ /**
36
+ * FLIP animation configuration options.
37
+ */
38
+ export interface FlipOptions {
39
+ /** Animation duration in milliseconds */
40
+ duration?: number;
41
+ /** CSS easing function */
42
+ easing?: string;
43
+ /** Callback when animation completes */
44
+ onComplete?: () => void;
45
+ }
46
+
47
+ /**
48
+ * Stagger delay function signature.
49
+ */
50
+ export type StaggerFunction = (index: number, total: number) => number;
51
+
52
+ /**
53
+ * Extended options for group FLIP animations.
54
+ */
55
+ export interface FlipGroupOptions extends FlipOptions {
56
+ /** Optional stagger delay function */
57
+ stagger?: StaggerFunction;
58
+ }
59
+
60
+ /**
61
+ * Spring physics configuration.
62
+ */
63
+ export interface SpringConfig {
64
+ /** Spring stiffness (default: 100) */
65
+ stiffness?: number;
66
+ /** Damping coefficient (default: 10) */
67
+ damping?: number;
68
+ /** Mass of the object (default: 1) */
69
+ mass?: number;
70
+ /** Velocity threshold for completion (default: 0.01) */
71
+ precision?: number;
72
+ }
73
+
74
+ /**
75
+ * Spring instance for animating values.
76
+ */
77
+ export interface Spring {
78
+ /** Start animating to target value */
79
+ to(target: number): Promise<void>;
80
+ /** Get current animated value */
81
+ current(): number;
82
+ /** Stop the animation */
83
+ stop(): void;
84
+ /** Subscribe to value changes */
85
+ onChange(callback: (value: number) => void): () => void;
86
+ }
87
+
88
+ /**
89
+ * Web Animations helper configuration.
90
+ */
91
+ export interface AnimateOptions {
92
+ /** Keyframes to animate */
93
+ keyframes: Keyframe[] | PropertyIndexedKeyframes;
94
+ /** Animation options (duration, easing, etc.) */
95
+ options?: KeyframeAnimationOptions;
96
+ /** Commit final styles to the element (default: true) */
97
+ commitStyles?: boolean;
98
+ /** Respect prefers-reduced-motion (default: true) */
99
+ respectReducedMotion?: boolean;
100
+ /** Callback when animation completes */
101
+ onFinish?: () => void;
102
+ }
103
+
104
+ /**
105
+ * Stagger helper configuration.
106
+ */
107
+ export interface StaggerOptions {
108
+ /** Start delay in milliseconds (default: 0) */
109
+ start?: number;
110
+ /** Origin index or keyword (default: 'start') */
111
+ from?: 'start' | 'center' | 'end' | number;
112
+ /** Optional easing function for normalized distance */
113
+ easing?: EasingFunction;
114
+ }
115
+
116
+ /**
117
+ * Easing function signature.
118
+ */
119
+ export type EasingFunction = (t: number) => number;
120
+
121
+ /**
122
+ * Sequence step configuration.
123
+ */
124
+ export interface SequenceStep extends AnimateOptions {
125
+ /** Target element to animate */
126
+ target: Element;
127
+ }
128
+
129
+ /**
130
+ * Sequence run configuration.
131
+ */
132
+ export interface SequenceOptions {
133
+ /** Optional stagger delay between steps */
134
+ stagger?: StaggerFunction;
135
+ /** Callback when sequence completes */
136
+ onFinish?: () => void;
137
+ }
138
+
139
+ /**
140
+ * Timeline step configuration.
141
+ */
142
+ export interface TimelineStep {
143
+ /** Target element to animate */
144
+ target: Element;
145
+ /** Keyframes to animate */
146
+ keyframes: Keyframe[] | PropertyIndexedKeyframes;
147
+ /** Animation options for this step */
148
+ options?: KeyframeAnimationOptions;
149
+ /** Absolute or relative start time in milliseconds */
150
+ at?: number | `+=${number}` | `-=${number}`;
151
+ /** Optional label for debugging */
152
+ label?: string;
153
+ }
154
+
155
+ /**
156
+ * Timeline configuration.
157
+ */
158
+ export interface TimelineConfig {
159
+ /** Commit final styles when timeline completes (default: true) */
160
+ commitStyles?: boolean;
161
+ /** Respect prefers-reduced-motion (default: true) */
162
+ respectReducedMotion?: boolean;
163
+ /** Callback when timeline completes */
164
+ onFinish?: () => void;
165
+ }
166
+
167
+ /**
168
+ * Timeline controls.
169
+ */
170
+ export interface TimelineControls {
171
+ /** Play all steps */
172
+ play(): Promise<void>;
173
+ /** Pause animations */
174
+ pause(): void;
175
+ /** Resume animations */
176
+ resume(): void;
177
+ /** Stop and cancel animations */
178
+ stop(): void;
179
+ /** Seek to a specific time in milliseconds */
180
+ seek(time: number): void;
181
+ /** Add a step to the timeline */
182
+ add(step: TimelineStep): void;
183
+ /** Total timeline duration in milliseconds */
184
+ duration(): number;
185
+ /** Subscribe to finish events */
186
+ onFinish(callback: () => void): () => void;
187
+ }
188
+
189
+ /**
190
+ * Scroll animation configuration.
191
+ */
192
+ export interface ScrollAnimateOptions extends AnimateOptions {
193
+ /** IntersectionObserver root */
194
+ root?: Element | Document | null;
195
+ /** Root margin for observer */
196
+ rootMargin?: string;
197
+ /** Intersection thresholds */
198
+ threshold?: number | number[];
199
+ /** Trigger only once (default: true) */
200
+ once?: boolean;
201
+ /** Callback when element enters the viewport */
202
+ onEnter?: (element: Element) => void;
203
+ }
204
+
205
+ /**
206
+ * Cleanup function for scroll animations.
207
+ */
208
+ export type ScrollAnimateCleanup = () => void;