@fluixi/dom 1.0.0-alpha.78 → 1.0.0-alpha.79
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 +4 -4
- package/dist/cdn/dom-client.cjs +1 -1
- package/dist/cdn/dom-client.global.js +1 -1
- package/dist/cdn/dom-client.mjs +1 -1
- package/dist/cdn/dom.cjs +1 -1
- package/dist/cdn/dom.global.js +1 -1
- package/dist/cdn/dom.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lib/dom/hydration.cjs +1 -1
- package/dist/lib/dom/hydration.mjs +1 -1
- package/dist/lib/dom/index.cjs +1 -1
- package/dist/lib/dom/index.mjs +1 -1
- package/dist/lib/dom/integration.js +1 -1
- package/dist/lib/dom/island.cjs +1 -1
- package/dist/lib/dom/island.mjs +1 -1
- package/dist/lib/dom/runtime.cjs +1 -1
- package/dist/lib/dom/runtime.mjs +1 -1
- package/dist/lib/dom/utils.d.ts +23 -23
- package/dist/lib/dom/utils.js +23 -23
- package/dist/lib/dom/versions.cjs +1 -1
- package/dist/lib/dom/versions.d.ts +2 -2
- package/dist/lib/dom/versions.d.ts.map +1 -1
- package/dist/lib/dom/versions.js +4 -4
- package/dist/lib/dom/versions.mjs +1 -1
- package/dist/lib/html.d.ts +1 -1
- package/dist/lib/html.js +1 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/version.generated.cjs +1 -1
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/dist/version.generated.mjs +1 -1
- package/package.json +3 -3
package/dist/lib/dom/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview DOM utilities for Fluixi
|
|
3
|
-
* @module
|
|
3
|
+
* @module fluixi/dom
|
|
4
4
|
*
|
|
5
5
|
* This module provides utilities for DOM manipulation and queries.
|
|
6
6
|
*/
|
|
@@ -55,7 +55,7 @@ export declare const JSX_PROPERTIES: Set<string>;
|
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
57
57
|
* ```typescript
|
|
58
|
-
* import { query } from '
|
|
58
|
+
* import { query } from 'fluixi/dom';
|
|
59
59
|
*
|
|
60
60
|
* const button = query<HTMLButtonElement>('#my-button');
|
|
61
61
|
* button?.click();
|
|
@@ -72,7 +72,7 @@ export declare function query<T extends Element = Element>(selector: string, roo
|
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
74
|
* ```typescript
|
|
75
|
-
* import { queryAll } from '
|
|
75
|
+
* import { queryAll } from 'fluixi/dom';
|
|
76
76
|
*
|
|
77
77
|
* const buttons = queryAll<HTMLButtonElement>('button');
|
|
78
78
|
* buttons.forEach(btn => btn.disabled = true);
|
|
@@ -89,7 +89,7 @@ export declare function queryAll<T extends Element = Element>(selector: string,
|
|
|
89
89
|
*
|
|
90
90
|
* @example
|
|
91
91
|
* ```typescript
|
|
92
|
-
* import { closest } from '
|
|
92
|
+
* import { closest } from 'fluixi/dom';
|
|
93
93
|
*
|
|
94
94
|
* const form = closest<HTMLFormElement>(button, 'form');
|
|
95
95
|
* form?.submit();
|
|
@@ -104,7 +104,7 @@ export declare function closest<T extends Element = Element>(element: Element, s
|
|
|
104
104
|
*
|
|
105
105
|
* @example
|
|
106
106
|
* ```typescript
|
|
107
|
-
* import { addClass } from '
|
|
107
|
+
* import { addClass } from 'fluixi/dom';
|
|
108
108
|
*
|
|
109
109
|
* addClass(element, 'active', 'visible');
|
|
110
110
|
* ```
|
|
@@ -118,7 +118,7 @@ export declare function addClass(element: Element, ...classes: string[]): void;
|
|
|
118
118
|
*
|
|
119
119
|
* @example
|
|
120
120
|
* ```typescript
|
|
121
|
-
* import { removeClass } from '
|
|
121
|
+
* import { removeClass } from 'fluixi/dom';
|
|
122
122
|
*
|
|
123
123
|
* removeClass(element, 'active', 'visible');
|
|
124
124
|
* ```
|
|
@@ -132,7 +132,7 @@ export declare function removeClass(element: Element, ...classes: string[]): voi
|
|
|
132
132
|
*
|
|
133
133
|
* @example
|
|
134
134
|
* ```typescript
|
|
135
|
-
* import { toggleClass } from '
|
|
135
|
+
* import { toggleClass } from 'fluixi/dom';
|
|
136
136
|
*
|
|
137
137
|
* toggleClass(element, 'active');
|
|
138
138
|
* ```
|
|
@@ -147,7 +147,7 @@ export declare function toggleClass(element: Element, ...classes: string[]): voi
|
|
|
147
147
|
*
|
|
148
148
|
* @example
|
|
149
149
|
* ```typescript
|
|
150
|
-
* import { hasClass } from '
|
|
150
|
+
* import { hasClass } from 'fluixi/dom';
|
|
151
151
|
*
|
|
152
152
|
* if (hasClass(element, 'active')) {
|
|
153
153
|
* console.log('Element is active');
|
|
@@ -164,7 +164,7 @@ export declare function hasClass(element: Element, className: string): boolean;
|
|
|
164
164
|
*
|
|
165
165
|
* @example
|
|
166
166
|
* ```typescript
|
|
167
|
-
* import { setAttribute } from '
|
|
167
|
+
* import { setAttribute } from 'fluixi/dom';
|
|
168
168
|
*
|
|
169
169
|
* setAttribute(input, 'disabled', true);
|
|
170
170
|
* setAttribute(div, 'data-id', '123');
|
|
@@ -180,7 +180,7 @@ export declare function setAttribute(element: Element, name: string, value: unkn
|
|
|
180
180
|
*
|
|
181
181
|
* @example
|
|
182
182
|
* ```typescript
|
|
183
|
-
* import { getAttribute } from '
|
|
183
|
+
* import { getAttribute } from 'fluixi/dom';
|
|
184
184
|
*
|
|
185
185
|
* const id = getAttribute(div, 'data-id');
|
|
186
186
|
* ```
|
|
@@ -194,7 +194,7 @@ export declare function getAttribute(element: Element, name: string): string | n
|
|
|
194
194
|
*
|
|
195
195
|
* @example
|
|
196
196
|
* ```typescript
|
|
197
|
-
* import { removeAttribute } from '
|
|
197
|
+
* import { removeAttribute } from 'fluixi/dom';
|
|
198
198
|
*
|
|
199
199
|
* removeAttribute(input, 'disabled');
|
|
200
200
|
* ```
|
|
@@ -208,7 +208,7 @@ export declare function removeAttribute(element: Element, name: string): void;
|
|
|
208
208
|
*
|
|
209
209
|
* @example
|
|
210
210
|
* ```typescript
|
|
211
|
-
* import { setStyles } from '
|
|
211
|
+
* import { setStyles } from 'fluixi/dom';
|
|
212
212
|
*
|
|
213
213
|
* setStyles(div, {
|
|
214
214
|
* backgroundColor: 'red',
|
|
@@ -227,7 +227,7 @@ export declare function setStyles(element: any, styles: Partial<CSSStyleDeclarat
|
|
|
227
227
|
*
|
|
228
228
|
* @example
|
|
229
229
|
* ```typescript
|
|
230
|
-
* import { getStyle } from '
|
|
230
|
+
* import { getStyle } from 'fluixi/dom';
|
|
231
231
|
*
|
|
232
232
|
* const color = getStyle(div, 'backgroundColor');
|
|
233
233
|
* ```
|
|
@@ -244,7 +244,7 @@ export declare function getStyle(element: Element, property: string): string;
|
|
|
244
244
|
*
|
|
245
245
|
* @example
|
|
246
246
|
* ```typescript
|
|
247
|
-
* import { createElement } from '
|
|
247
|
+
* import { createElement } from 'fluixi/dom';
|
|
248
248
|
*
|
|
249
249
|
* const button = createElement('button',
|
|
250
250
|
* { class: 'btn', disabled: true },
|
|
@@ -260,7 +260,7 @@ export declare function createElement<K extends keyof HTMLElementTagNameMap>(tag
|
|
|
260
260
|
*
|
|
261
261
|
* @example
|
|
262
262
|
* ```typescript
|
|
263
|
-
* import { removeChildren } from '
|
|
263
|
+
* import { removeChildren } from 'fluixi/dom';
|
|
264
264
|
*
|
|
265
265
|
* removeChildren(container);
|
|
266
266
|
* ```
|
|
@@ -274,7 +274,7 @@ export declare function removeChildren(element: Element): void;
|
|
|
274
274
|
*
|
|
275
275
|
* @example
|
|
276
276
|
* ```typescript
|
|
277
|
-
* import { appendChildren } from '
|
|
277
|
+
* import { appendChildren } from 'fluixi/dom';
|
|
278
278
|
*
|
|
279
279
|
* appendChildren(container,
|
|
280
280
|
* createElement('div', {}, 'Child 1'),
|
|
@@ -292,7 +292,7 @@ export declare function appendChildren(parent: Element, ...children: (Node | str
|
|
|
292
292
|
*
|
|
293
293
|
* @example
|
|
294
294
|
* ```typescript
|
|
295
|
-
* import { isVisible } from '
|
|
295
|
+
* import { isVisible } from 'fluixi/dom';
|
|
296
296
|
*
|
|
297
297
|
* if (isVisible(element)) {
|
|
298
298
|
* console.log('Element is in viewport');
|
|
@@ -308,7 +308,7 @@ export declare function isVisible(element: Element): boolean;
|
|
|
308
308
|
*
|
|
309
309
|
* @example
|
|
310
310
|
* ```typescript
|
|
311
|
-
* import { scrollIntoView } from '
|
|
311
|
+
* import { scrollIntoView } from 'fluixi/dom';
|
|
312
312
|
*
|
|
313
313
|
* scrollIntoView(element, { behavior: 'smooth', block: 'center' });
|
|
314
314
|
* ```
|
|
@@ -322,7 +322,7 @@ export declare function scrollIntoView(element: Element, options?: ScrollIntoVie
|
|
|
322
322
|
*
|
|
323
323
|
* @example
|
|
324
324
|
* ```typescript
|
|
325
|
-
* import { getOffset } from '
|
|
325
|
+
* import { getOffset } from 'fluixi/dom';
|
|
326
326
|
*
|
|
327
327
|
* const { top, left } = getOffset(element);
|
|
328
328
|
* ```
|
|
@@ -343,7 +343,7 @@ export declare function getOffset(element: Element): {
|
|
|
343
343
|
*
|
|
344
344
|
* @example
|
|
345
345
|
* ```typescript
|
|
346
|
-
* import { delegate } from '
|
|
346
|
+
* import { delegate } from 'fluixi/dom';
|
|
347
347
|
*
|
|
348
348
|
* const cleanup = delegate(list, 'click', '.item', (event, target) => {
|
|
349
349
|
* console.log('Clicked item:', target);
|
|
@@ -360,7 +360,7 @@ export declare function delegate<K extends keyof HTMLElementEventMap>(parent: El
|
|
|
360
360
|
*
|
|
361
361
|
* @example
|
|
362
362
|
* ```typescript
|
|
363
|
-
* import { waitForElement } from '
|
|
363
|
+
* import { waitForElement } from 'fluixi/dom';
|
|
364
364
|
*
|
|
365
365
|
* const element = await waitForElement('#dynamic-content');
|
|
366
366
|
* ```
|
|
@@ -376,7 +376,7 @@ export declare function waitForElement(selector: string, timeout?: number): Prom
|
|
|
376
376
|
*
|
|
377
377
|
* @example
|
|
378
378
|
* ```typescript
|
|
379
|
-
* import { observeIntersection } from '
|
|
379
|
+
* import { observeIntersection } from 'fluixi/dom';
|
|
380
380
|
*
|
|
381
381
|
* const cleanup = observeIntersection(element, (isIntersecting) => {
|
|
382
382
|
* console.log('Element visible:', isIntersecting);
|
|
@@ -393,7 +393,7 @@ export declare function observeIntersection(element: Element, callback: (isInter
|
|
|
393
393
|
*
|
|
394
394
|
* @example
|
|
395
395
|
* ```typescript
|
|
396
|
-
* import { observeResize } from '
|
|
396
|
+
* import { observeResize } from 'fluixi/dom';
|
|
397
397
|
*
|
|
398
398
|
* const cleanup = observeResize(element, (entry) => {
|
|
399
399
|
* console.log('New size:', entry.contentRect.width, entry.contentRect.height);
|
package/dist/lib/dom/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview DOM utilities for Fluixi
|
|
3
|
-
* @module
|
|
3
|
+
* @module fluixi/dom
|
|
4
4
|
*
|
|
5
5
|
* This module provides utilities for DOM manipulation and queries.
|
|
6
6
|
*/
|
|
@@ -182,7 +182,7 @@ export const JSX_PROPERTIES = new Set([
|
|
|
182
182
|
*
|
|
183
183
|
* @example
|
|
184
184
|
* ```typescript
|
|
185
|
-
* import { query } from '
|
|
185
|
+
* import { query } from 'fluixi/dom';
|
|
186
186
|
*
|
|
187
187
|
* const button = query<HTMLButtonElement>('#my-button');
|
|
188
188
|
* button?.click();
|
|
@@ -201,7 +201,7 @@ export function query(selector, root = document) {
|
|
|
201
201
|
*
|
|
202
202
|
* @example
|
|
203
203
|
* ```typescript
|
|
204
|
-
* import { queryAll } from '
|
|
204
|
+
* import { queryAll } from 'fluixi/dom';
|
|
205
205
|
*
|
|
206
206
|
* const buttons = queryAll<HTMLButtonElement>('button');
|
|
207
207
|
* buttons.forEach(btn => btn.disabled = true);
|
|
@@ -220,7 +220,7 @@ export function queryAll(selector, root = document) {
|
|
|
220
220
|
*
|
|
221
221
|
* @example
|
|
222
222
|
* ```typescript
|
|
223
|
-
* import { closest } from '
|
|
223
|
+
* import { closest } from 'fluixi/dom';
|
|
224
224
|
*
|
|
225
225
|
* const form = closest<HTMLFormElement>(button, 'form');
|
|
226
226
|
* form?.submit();
|
|
@@ -237,7 +237,7 @@ export function closest(element, selector) {
|
|
|
237
237
|
*
|
|
238
238
|
* @example
|
|
239
239
|
* ```typescript
|
|
240
|
-
* import { addClass } from '
|
|
240
|
+
* import { addClass } from 'fluixi/dom';
|
|
241
241
|
*
|
|
242
242
|
* addClass(element, 'active', 'visible');
|
|
243
243
|
* ```
|
|
@@ -253,7 +253,7 @@ export function addClass(element, ...classes) {
|
|
|
253
253
|
*
|
|
254
254
|
* @example
|
|
255
255
|
* ```typescript
|
|
256
|
-
* import { removeClass } from '
|
|
256
|
+
* import { removeClass } from 'fluixi/dom';
|
|
257
257
|
*
|
|
258
258
|
* removeClass(element, 'active', 'visible');
|
|
259
259
|
* ```
|
|
@@ -269,7 +269,7 @@ export function removeClass(element, ...classes) {
|
|
|
269
269
|
*
|
|
270
270
|
* @example
|
|
271
271
|
* ```typescript
|
|
272
|
-
* import { toggleClass } from '
|
|
272
|
+
* import { toggleClass } from 'fluixi/dom';
|
|
273
273
|
*
|
|
274
274
|
* toggleClass(element, 'active');
|
|
275
275
|
* ```
|
|
@@ -286,7 +286,7 @@ export function toggleClass(element, ...classes) {
|
|
|
286
286
|
*
|
|
287
287
|
* @example
|
|
288
288
|
* ```typescript
|
|
289
|
-
* import { hasClass } from '
|
|
289
|
+
* import { hasClass } from 'fluixi/dom';
|
|
290
290
|
*
|
|
291
291
|
* if (hasClass(element, 'active')) {
|
|
292
292
|
* console.log('Element is active');
|
|
@@ -305,7 +305,7 @@ export function hasClass(element, className) {
|
|
|
305
305
|
*
|
|
306
306
|
* @example
|
|
307
307
|
* ```typescript
|
|
308
|
-
* import { setAttribute } from '
|
|
308
|
+
* import { setAttribute } from 'fluixi/dom';
|
|
309
309
|
*
|
|
310
310
|
* setAttribute(input, 'disabled', true);
|
|
311
311
|
* setAttribute(div, 'data-id', '123');
|
|
@@ -357,7 +357,7 @@ export function setAttribute(element, name, value, isSVG = false) {
|
|
|
357
357
|
*
|
|
358
358
|
* @example
|
|
359
359
|
* ```typescript
|
|
360
|
-
* import { getAttribute } from '
|
|
360
|
+
* import { getAttribute } from 'fluixi/dom';
|
|
361
361
|
*
|
|
362
362
|
* const id = getAttribute(div, 'data-id');
|
|
363
363
|
* ```
|
|
@@ -373,7 +373,7 @@ export function getAttribute(element, name) {
|
|
|
373
373
|
*
|
|
374
374
|
* @example
|
|
375
375
|
* ```typescript
|
|
376
|
-
* import { removeAttribute } from '
|
|
376
|
+
* import { removeAttribute } from 'fluixi/dom';
|
|
377
377
|
*
|
|
378
378
|
* removeAttribute(input, 'disabled');
|
|
379
379
|
* ```
|
|
@@ -389,7 +389,7 @@ export function removeAttribute(element, name) {
|
|
|
389
389
|
*
|
|
390
390
|
* @example
|
|
391
391
|
* ```typescript
|
|
392
|
-
* import { setStyles } from '
|
|
392
|
+
* import { setStyles } from 'fluixi/dom';
|
|
393
393
|
*
|
|
394
394
|
* setStyles(div, {
|
|
395
395
|
* backgroundColor: 'red',
|
|
@@ -410,7 +410,7 @@ export function setStyles(element, styles) {
|
|
|
410
410
|
*
|
|
411
411
|
* @example
|
|
412
412
|
* ```typescript
|
|
413
|
-
* import { getStyle } from '
|
|
413
|
+
* import { getStyle } from 'fluixi/dom';
|
|
414
414
|
*
|
|
415
415
|
* const color = getStyle(div, 'backgroundColor');
|
|
416
416
|
* ```
|
|
@@ -429,7 +429,7 @@ export function getStyle(element, property) {
|
|
|
429
429
|
*
|
|
430
430
|
* @example
|
|
431
431
|
* ```typescript
|
|
432
|
-
* import { createElement } from '
|
|
432
|
+
* import { createElement } from 'fluixi/dom';
|
|
433
433
|
*
|
|
434
434
|
* const button = createElement('button',
|
|
435
435
|
* { class: 'btn', disabled: true },
|
|
@@ -471,7 +471,7 @@ export function createElement(tagName, attributes = {}, ...children) {
|
|
|
471
471
|
*
|
|
472
472
|
* @example
|
|
473
473
|
* ```typescript
|
|
474
|
-
* import { removeChildren } from '
|
|
474
|
+
* import { removeChildren } from 'fluixi/dom';
|
|
475
475
|
*
|
|
476
476
|
* removeChildren(container);
|
|
477
477
|
* ```
|
|
@@ -489,7 +489,7 @@ export function removeChildren(element) {
|
|
|
489
489
|
*
|
|
490
490
|
* @example
|
|
491
491
|
* ```typescript
|
|
492
|
-
* import { appendChildren } from '
|
|
492
|
+
* import { appendChildren } from 'fluixi/dom';
|
|
493
493
|
*
|
|
494
494
|
* appendChildren(container,
|
|
495
495
|
* createElement('div', {}, 'Child 1'),
|
|
@@ -516,7 +516,7 @@ export function appendChildren(parent, ...children) {
|
|
|
516
516
|
*
|
|
517
517
|
* @example
|
|
518
518
|
* ```typescript
|
|
519
|
-
* import { isVisible } from '
|
|
519
|
+
* import { isVisible } from 'fluixi/dom';
|
|
520
520
|
*
|
|
521
521
|
* if (isVisible(element)) {
|
|
522
522
|
* console.log('Element is in viewport');
|
|
@@ -538,7 +538,7 @@ export function isVisible(element) {
|
|
|
538
538
|
*
|
|
539
539
|
* @example
|
|
540
540
|
* ```typescript
|
|
541
|
-
* import { scrollIntoView } from '
|
|
541
|
+
* import { scrollIntoView } from 'fluixi/dom';
|
|
542
542
|
*
|
|
543
543
|
* scrollIntoView(element, { behavior: 'smooth', block: 'center' });
|
|
544
544
|
* ```
|
|
@@ -554,7 +554,7 @@ export function scrollIntoView(element, options = { behavior: 'smooth', block: '
|
|
|
554
554
|
*
|
|
555
555
|
* @example
|
|
556
556
|
* ```typescript
|
|
557
|
-
* import { getOffset } from '
|
|
557
|
+
* import { getOffset } from 'fluixi/dom';
|
|
558
558
|
*
|
|
559
559
|
* const { top, left } = getOffset(element);
|
|
560
560
|
* ```
|
|
@@ -578,7 +578,7 @@ export function getOffset(element) {
|
|
|
578
578
|
*
|
|
579
579
|
* @example
|
|
580
580
|
* ```typescript
|
|
581
|
-
* import { delegate } from '
|
|
581
|
+
* import { delegate } from 'fluixi/dom';
|
|
582
582
|
*
|
|
583
583
|
* const cleanup = delegate(list, 'click', '.item', (event, target) => {
|
|
584
584
|
* console.log('Clicked item:', target);
|
|
@@ -606,7 +606,7 @@ export function delegate(parent, eventName, selector, handler) {
|
|
|
606
606
|
*
|
|
607
607
|
* @example
|
|
608
608
|
* ```typescript
|
|
609
|
-
* import { waitForElement } from '
|
|
609
|
+
* import { waitForElement } from 'fluixi/dom';
|
|
610
610
|
*
|
|
611
611
|
* const element = await waitForElement('#dynamic-content');
|
|
612
612
|
* ```
|
|
@@ -646,7 +646,7 @@ export function waitForElement(selector, timeout = 5000) {
|
|
|
646
646
|
*
|
|
647
647
|
* @example
|
|
648
648
|
* ```typescript
|
|
649
|
-
* import { observeIntersection } from '
|
|
649
|
+
* import { observeIntersection } from 'fluixi/dom';
|
|
650
650
|
*
|
|
651
651
|
* const cleanup = observeIntersection(element, (isIntersecting) => {
|
|
652
652
|
* console.log('Element visible:', isIntersecting);
|
|
@@ -673,7 +673,7 @@ export function observeIntersection(element, callback, options = {}) {
|
|
|
673
673
|
*
|
|
674
674
|
* @example
|
|
675
675
|
* ```typescript
|
|
676
|
-
* import { observeResize } from '
|
|
676
|
+
* import { observeResize } from 'fluixi/dom';
|
|
677
677
|
*
|
|
678
678
|
* const cleanup = observeResize(element, (entry) => {
|
|
679
679
|
* console.log('New size:', entry.contentRect.width, entry.contentRect.height);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var u=(e,o)=>{for(var s in o)t(e,s,{get:o[s],enumerable:!0})},m=(e,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of d(o))!f.call(e,r)&&r!==s&&t(e,r,{get:()=>o[r],enumerable:!(n=c(o,r))||n.enumerable});return e};var p=e=>m(t({},"__esModule",{value:!0}),e);var V={};u(V,{registerCoreVersion:()=>x,stampVersions:()=>v,versions:()=>i,warnOnVersionSkew:()=>g});module.exports=p(V);var a="1.0.0-alpha.
|
|
1
|
+
"use strict";var t=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var u=(e,o)=>{for(var s in o)t(e,s,{get:o[s],enumerable:!0})},m=(e,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of d(o))!f.call(e,r)&&r!==s&&t(e,r,{get:()=>o[r],enumerable:!(n=c(o,r))||n.enumerable});return e};var p=e=>m(t({},"__esModule",{value:!0}),e);var V={};u(V,{registerCoreVersion:()=>x,stampVersions:()=>v,versions:()=>i,warnOnVersionSkew:()=>g});module.exports=p(V);var a="1.0.0-alpha.79";var l=require("@fluixi/reactive/version"),i={dom:a,reactive:l.VERSION};function x(e){i.core=e}function v(e){i.core&&e.setAttribute("fluixi",i.core),e.setAttribute("fx-dom",i.dom),e.setAttribute("fx-reactive",i.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=i)}function g(){let e=[i.core,i.dom,i.reactive].filter(o=>o!==void 0);new Set(e).size<=1||console.warn(`[fluixi] package versions disagree — core ${i.core??"(absent)"}, dom ${i.dom}, reactive ${i.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** The versions of the packages this app is running. */
|
|
2
2
|
export interface FluixiVersions {
|
|
3
|
-
/** Absent when the app does not use
|
|
3
|
+
/** Absent when the app does not use `fluixi` — dom and reactive can run alone. */
|
|
4
4
|
core?: string;
|
|
5
5
|
dom: string;
|
|
6
6
|
reactive: string;
|
|
@@ -10,7 +10,7 @@ declare global {
|
|
|
10
10
|
var Fluixi: FluixiVersions | undefined;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Record the
|
|
13
|
+
* Record the `fluixi` version, called by core when it is loaded.
|
|
14
14
|
*
|
|
15
15
|
* Inverted rather than imported, because core sits above this package.
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/lib/dom/versions.ts"],"names":[],"mappings":"AAmBA,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../src/lib/dom/versions.ts"],"names":[],"mappings":"AAmBA,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,QAAQ,EAAE,cAAiD,CAAC;AAEzE,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,MAAM,EAAE,cAAc,GAAG,SAAS,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEzD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAMtD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAYxC"}
|
package/dist/lib/dom/versions.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Which build of each package is actually running.
|
|
3
3
|
*
|
|
4
|
-
* This used to live in
|
|
5
|
-
* reach the DOM through either entry point —
|
|
4
|
+
* This used to live in `fluixi`, stamped only by *its* `render`. But an app can
|
|
5
|
+
* reach the DOM through either entry point — `fluixi`'s `render`, or this package's
|
|
6
6
|
* `render`/`hydrate` by way of `startClient` — and only the first stamped anything. An app
|
|
7
7
|
* that hydrated (the docs site, every SSR app) therefore had no version attributes at all,
|
|
8
8
|
* which is exactly the case where a bug report needs them most.
|
|
9
9
|
*
|
|
10
10
|
* So the stamping sits at the bottom instead, where both paths pass through.
|
|
11
11
|
*
|
|
12
|
-
* The core version cannot be imported here:
|
|
12
|
+
* The core version cannot be imported here: `fluixi` depends on this package, not
|
|
13
13
|
* the other way round, and reversing that would be a cycle. Core registers its own version
|
|
14
14
|
* on import instead, and whichever render runs stamps whatever has been registered. That
|
|
15
15
|
* keeps the dependency direction intact and still gets all three onto the element.
|
|
@@ -18,7 +18,7 @@ import { VERSION as DOM } from '../../version.generated.js';
|
|
|
18
18
|
import { VERSION as REACTIVE } from '@fluixi/reactive/version';
|
|
19
19
|
export const versions = { dom: DOM, reactive: REACTIVE };
|
|
20
20
|
/**
|
|
21
|
-
* Record the
|
|
21
|
+
* Record the `fluixi` version, called by core when it is loaded.
|
|
22
22
|
*
|
|
23
23
|
* Inverted rather than imported, because core sits above this package.
|
|
24
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o="1.0.0-alpha.
|
|
1
|
+
var o="1.0.0-alpha.79";import{VERSION as s}from"@fluixi/reactive/version";var e={dom:o,reactive:s};function l(i){e.core=i}function c(i){e.core&&i.setAttribute("fluixi",e.core),i.setAttribute("fx-dom",e.dom),i.setAttribute("fx-reactive",e.reactive),typeof globalThis<"u"&&(globalThis.Fluixi=e)}function d(){let i=[e.core,e.dom,e.reactive].filter(r=>r!==void 0);new Set(i).size<=1||console.warn(`[fluixi] package versions disagree — core ${e.core??"(absent)"}, dom ${e.dom}, reactive ${e.reactive}. These ship as one release, so a mismatch usually means a stale lockfile or two copies resolved side by side. Reinstall, or check for duplicates with \`pnpm why @fluixi/dom\`.`)}export{l as registerCoreVersion,c as stampVersions,e as versions,d as warnOnVersionSkew};
|
package/dist/lib/html.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* wasn't enabled in the build.
|
|
9
9
|
*
|
|
10
10
|
* They live in @fluixi/dom (the runtime the compiler targets) so any tier can
|
|
11
|
-
* import them;
|
|
11
|
+
* import them; fluixi re-exports them for convenience.
|
|
12
12
|
*/
|
|
13
13
|
import type { ComponentChild } from './shared/types.js';
|
|
14
14
|
/**
|
package/dist/lib/html.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* wasn't enabled in the build.
|
|
9
9
|
*
|
|
10
10
|
* They live in @fluixi/dom (the runtime the compiler targets) so any tier can
|
|
11
|
-
* import them;
|
|
11
|
+
* import them; fluixi re-exports them for convenience.
|
|
12
12
|
*/
|
|
13
13
|
/** The `html` template tag. Compiled away by `fluixi({ format: 'lit' })`. */
|
|
14
14
|
export function html(_strings, ..._values) {
|