@bquery/bquery 1.0.0 → 1.0.2
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 +22 -22
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
[](https://github.com/bquery/bquery/stargazers)
|
|
5
5
|
[](https://github.com/bquery/bquery/issues)
|
|
6
6
|
[](https://github.com/bquery/bquery/blob/main/LICENSE.md)
|
|
7
|
-
[](https://www.npmjs.com/package/bquery)
|
|
8
|
-
[](https://bundlephobia.com/package/bquery)
|
|
9
|
-
[](https://unpkg.com/bquery
|
|
7
|
+
[](https://www.npmjs.com/package/@bquery/bquery)
|
|
8
|
+
[](https://bundlephobia.com/package/@bquery/bquery)
|
|
9
|
+
[](https://unpkg.com/@bquery/bquery)
|
|
10
10
|
|
|
11
11
|
**The jQuery for the modern Web Platform.**
|
|
12
12
|
|
|
@@ -26,13 +26,13 @@ bQuery.js is a slim, TypeScript-first library that combines jQuery's direct DOM
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# npm
|
|
29
|
-
npm install bquery
|
|
29
|
+
npm install @bquery/bquery
|
|
30
30
|
|
|
31
31
|
# bun
|
|
32
|
-
bun add bquery
|
|
32
|
+
bun add @bquery/bquery
|
|
33
33
|
|
|
34
34
|
# pnpm
|
|
35
|
-
pnpm add bquery
|
|
35
|
+
pnpm add @bquery/bquery
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
### Via CDN (Zero-build)
|
|
@@ -41,7 +41,7 @@ pnpm add bquery
|
|
|
41
41
|
|
|
42
42
|
```html
|
|
43
43
|
<script type="module">
|
|
44
|
-
import { $, signal } from 'https://unpkg.com/bquery@1/dist/full.es.mjs';
|
|
44
|
+
import { $, signal } from 'https://unpkg.com/@bquery/bquery@1/dist/full.es.mjs';
|
|
45
45
|
|
|
46
46
|
const count = signal(0);
|
|
47
47
|
$('#counter').text(`Count: ${count.value}`);
|
|
@@ -51,7 +51,7 @@ pnpm add bquery
|
|
|
51
51
|
#### UMD (global variable)
|
|
52
52
|
|
|
53
53
|
```html
|
|
54
|
-
<script src="https://unpkg.com/bquery@1/dist/full.umd.js"></script>
|
|
54
|
+
<script src="https://unpkg.com/@bquery/bquery@1/dist/full.umd.js"></script>
|
|
55
55
|
<script>
|
|
56
56
|
const { $, signal } = bQuery;
|
|
57
57
|
const count = signal(0);
|
|
@@ -61,7 +61,7 @@ pnpm add bquery
|
|
|
61
61
|
#### IIFE (self-executing)
|
|
62
62
|
|
|
63
63
|
```html
|
|
64
|
-
<script src="https://unpkg.com/bquery@1/dist/full.iife.js"></script>
|
|
64
|
+
<script src="https://unpkg.com/@bquery/bquery@1/dist/full.iife.js"></script>
|
|
65
65
|
<script>
|
|
66
66
|
const { $, $$ } = bQuery;
|
|
67
67
|
$$('.items').addClass('loaded');
|
|
@@ -72,17 +72,17 @@ pnpm add bquery
|
|
|
72
72
|
|
|
73
73
|
```ts
|
|
74
74
|
// Full bundle (all modules)
|
|
75
|
-
import { $, signal, component } from 'bquery';
|
|
75
|
+
import { $, signal, component } from '@bquery/bquery';
|
|
76
76
|
|
|
77
77
|
// Core only
|
|
78
|
-
import { $, $$ } from 'bquery/core';
|
|
78
|
+
import { $, $$ } from '@bquery/bquery/core';
|
|
79
79
|
|
|
80
80
|
// À la carte (individual modules)
|
|
81
|
-
import { signal, computed, effect } from 'bquery/reactive';
|
|
82
|
-
import { component, html } from 'bquery/component';
|
|
83
|
-
import { transition, spring } from 'bquery/motion';
|
|
84
|
-
import { sanitize } from 'bquery/security';
|
|
85
|
-
import { storage, cache } from 'bquery/platform';
|
|
81
|
+
import { signal, computed, effect } from '@bquery/bquery/reactive';
|
|
82
|
+
import { component, html } from '@bquery/bquery/component';
|
|
83
|
+
import { transition, spring } from '@bquery/bquery/motion';
|
|
84
|
+
import { sanitize } from '@bquery/bquery/security';
|
|
85
|
+
import { storage, cache } from '@bquery/bquery/platform';
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
## Modules at a glance
|
|
@@ -101,7 +101,7 @@ import { storage, cache } from 'bquery/platform';
|
|
|
101
101
|
### Core – DOM & events
|
|
102
102
|
|
|
103
103
|
```ts
|
|
104
|
-
import { $, $$ } from 'bquery/core';
|
|
104
|
+
import { $, $$ } from '@bquery/bquery/core';
|
|
105
105
|
|
|
106
106
|
// jQuery-style selectors
|
|
107
107
|
$('#save').on('click', (event) => {
|
|
@@ -118,7 +118,7 @@ $$('.items').addClass('highlight');
|
|
|
118
118
|
### Reactive – signals
|
|
119
119
|
|
|
120
120
|
```ts
|
|
121
|
-
import { signal, computed, effect, batch } from 'bquery/reactive';
|
|
121
|
+
import { signal, computed, effect, batch } from '@bquery/bquery/reactive';
|
|
122
122
|
|
|
123
123
|
const count = signal(0);
|
|
124
124
|
const doubled = computed(() => count.value * 2);
|
|
@@ -137,7 +137,7 @@ batch(() => {
|
|
|
137
137
|
### Components – Web Components
|
|
138
138
|
|
|
139
139
|
```ts
|
|
140
|
-
import { component, html } from 'bquery/component';
|
|
140
|
+
import { component, html } from '@bquery/bquery/component';
|
|
141
141
|
|
|
142
142
|
component('user-card', {
|
|
143
143
|
props: {
|
|
@@ -152,7 +152,7 @@ component('user-card', {
|
|
|
152
152
|
### Motion – animations
|
|
153
153
|
|
|
154
154
|
```ts
|
|
155
|
-
import { transition, spring } from 'bquery/motion';
|
|
155
|
+
import { transition, spring } from '@bquery/bquery/motion';
|
|
156
156
|
|
|
157
157
|
// View transitions (with fallback)
|
|
158
158
|
await transition(() => {
|
|
@@ -170,7 +170,7 @@ await x.to(100);
|
|
|
170
170
|
### Security – sanitizing
|
|
171
171
|
|
|
172
172
|
```ts
|
|
173
|
-
import { sanitize, escapeHtml } from 'bquery/security';
|
|
173
|
+
import { sanitize, escapeHtml } from '@bquery/bquery/security';
|
|
174
174
|
|
|
175
175
|
// Sanitize HTML (removes dangerous elements)
|
|
176
176
|
const safeHtml = sanitize(userInput);
|
|
@@ -182,7 +182,7 @@ const escaped = escapeHtml('<script>alert(1)</script>');
|
|
|
182
182
|
### Platform – storage & APIs
|
|
183
183
|
|
|
184
184
|
```ts
|
|
185
|
-
import { storage, notifications } from 'bquery/platform';
|
|
185
|
+
import { storage, notifications } from '@bquery/bquery/platform';
|
|
186
186
|
|
|
187
187
|
// Unified storage API
|
|
188
188
|
const local = storage.local();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bquery/bquery",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "The jQuery for the Modern Web Platform - Zero build, TypeScript-first library with reactivity, components, and motion",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/full.umd.js",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
"zero-build",
|
|
86
86
|
"cdn"
|
|
87
87
|
],
|
|
88
|
-
"author": "
|
|
88
|
+
"author": "Jonas Pfalzgraf <support@josunlp.de>",
|
|
89
89
|
"license": "MIT",
|
|
90
90
|
"repository": {
|
|
91
91
|
"type": "git",
|
|
92
92
|
"url": "https://github.com/bquery/bquery.git"
|
|
93
93
|
},
|
|
94
|
-
"homepage": "https://bquery.
|
|
94
|
+
"homepage": "https://bquery.flausch-code.de",
|
|
95
95
|
"bugs": {
|
|
96
96
|
"url": "https://github.com/bquery/bquery/issues"
|
|
97
97
|
},
|