From 14f24d55efa306e0b69dc1271bb637158bfcd15a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 26 Dec 2023 16:02:58 -0500 Subject: [PATCH 001/199] refactor(item): change events types and calbacks to present tense Doing that to be consistent with the original event types names from JavaScript. As the onClick type is click the onActiveChange event type will be activechange. Fixes: #112 --- src/item.ts | 62 +++++++++++++++++++++++------------------------ test/item.test.ts | 8 +++--- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/item.ts b/src/item.ts index 4a7eca2..8e01131 100644 --- a/src/item.ts +++ b/src/item.ts @@ -110,15 +110,15 @@ export class FazElementItem extends HTMLElement { const oldValue = this._active; this._active = value; if (!this.loading) { - const event = this.createEvent("activechanged", value, + const event = this.createEvent("activechange", value, oldValue); this.dispatchEvent(event); - this.onActiveChanged(event); + this.onActiveChange(event); } } } - onActiveChanged(event: CustomEvent) {} + onActiveChange(event: CustomEvent) {} get content(): string | null { return this._content; @@ -129,15 +129,15 @@ export class FazElementItem extends HTMLElement { const oldValue = this._content; this._content = value; if (!this.loading) { - const event = this.createEvent("contentchanged", value, + const event = this.createEvent("contentchange", value, oldValue); this.dispatchEvent(event); - this.onContentChanged(event); + this.onContentChange(event); } } } - onContentChanged(event: CustomEvent) {} + onContentChange(event: CustomEvent) {} get disabled(): boolean { return this._disabled; @@ -148,15 +148,15 @@ export class FazElementItem extends HTMLElement { const oldValue = this._disabled; this._disabled = value; if (!this.loading) { - const event = this.createEvent("disabledchanged", value, + const event = this.createEvent("disabledchange", value, oldValue); this.dispatchEvent(event); - this.onDisabledChanged(event); + this.onDisabledChange(event); } } } - onDisabledChanged(event: CustomEvent) {} + onDisabledChange(event: CustomEvent) {} get extraClasses(): string { return this._extraClasses; @@ -167,15 +167,15 @@ export class FazElementItem extends HTMLElement { const oldValue = this._extraClasses; this._extraClasses = value; if (!this.loading) { - const event = this.createEvent("extraclasseschanged", value, + const event = this.createEvent("extraclasseschange", value, oldValue); this.dispatchEvent(event); - this.onExtraClassesChanged(event); + this.onExtraClassesChange(event); } } } - onExtraClassesChanged(event: CustomEvent) {} + onExtraClassesChange(event: CustomEvent) {} get link() { // From: https://stackoverflow.com/a/66717705/2887989 @@ -191,14 +191,14 @@ export class FazElementItem extends HTMLElement { const oldValue = this._link; this._link = value; if (!this.loading) { - const event = this.createEvent("linkchanged", value, oldValue); + const event = this.createEvent("linkchange", value, oldValue); this.dispatchEvent(event); - this.onLinkChanged(event); + this.onLinkChange(event); } } } - onLinkChanged(event: CustomEvent) {} + onLinkChange(event: CustomEvent) {} get parent(): FazElementItem | null { return this._parent; @@ -209,15 +209,15 @@ export class FazElementItem extends HTMLElement { const oldValue = {...this._parent} as FazElementItem | null; this._parent = value; if (!this.loading) { - const event = this.createEvent("parentchanged", value, + const event = this.createEvent("parentchange", value, oldValue); this.dispatchEvent(event); - this.onParentChanged(event); + this.onParentChange(event); } } } - onParentChanged(event: CustomEvent) {} + onParentChange(event: CustomEvent) {} get items(): Array { return this._items; @@ -228,10 +228,10 @@ export class FazElementItem extends HTMLElement { const oldItems = {...this._items} as Array; this._items.push(item); if (!this.loading) { - const event = this.createEvent("itemschanged", this._items, + const event = this.createEvent("itemschange", this._items, oldItems); this.dispatchEvent(event); - this.onItemsChanged(event); + this.onItemsChange(event); } } } @@ -241,10 +241,10 @@ export class FazElementItem extends HTMLElement { const oldItems = {...this._items} as Array; this._items = this._items.filter(_item => _item !== item); if (!this.loading) { - const event = this.createEvent("itemschanged", this._items, + const event = this.createEvent("itemschange", this._items, oldItems); this.dispatchEvent(event); - this.onItemsChanged(event); + this.onItemsChange(event); } } } @@ -253,14 +253,14 @@ export class FazElementItem extends HTMLElement { const oldItems = {...this._items} as Array; this._items = items; if (!this.loading) { - const event = this.createEvent("itemschanged", this._items, + const event = this.createEvent("itemschange", this._items, oldItems); this.dispatchEvent(event); - this.onItemsChanged(event); + this.onItemsChange(event); } } - onItemsChanged(event: CustomEvent) {} + onItemsChange(event: CustomEvent) {} get loading(): boolean { return this._loading; @@ -270,13 +270,13 @@ export class FazElementItem extends HTMLElement { if (this._loading !== value) { const oldValue = this._loading; this._loading = value; - const event = this.createEvent("loadingchanged", value, oldValue); + const event = this.createEvent("loadingchange", value, oldValue); this.dispatchEvent(event); - this.onLoadingChanged(event); + this.onLoadingChange(event); } } - onLoadingChanged(event: CustomEvent) {} + onLoadingChange(event: CustomEvent) {} get reload(): boolean { return this._reload; @@ -286,13 +286,13 @@ export class FazElementItem extends HTMLElement { if (this._reload !== value) { const oldValue = this._reload; this._reload = value; - const event = this.createEvent("reloadchanged", value, oldValue); + const event = this.createEvent("reloadchange", value, oldValue); this.dispatchEvent(event); - this.onReloadChanged(event); + this.onReloadChange(event); } } - onReloadChanged(event: CustomEvent) {} + onReloadChange(event: CustomEvent) {} get activeItems() { return this.items.filter(item => { diff --git a/test/item.test.ts b/test/item.test.ts index cf0980f..dfc0b6f 100644 --- a/test/item.test.ts +++ b/test/item.test.ts @@ -10,14 +10,14 @@ class TestElement extends FazElementItem { constructor() { super(); // Add an event listener to catch a faz element property change. - this.addEventListener("activechanged", (_) => + this.addEventListener("activechange", (_) => this.doActiveChanged = true); } // Or override the event method to catch a faz element property change. // This is preferred for the end user(developer), if you are creating a // component it is preferred to use the addEventListener method. - onDisabledChanged(_: Event) { + onDisabledChange(_: Event) { this.doDisabledChanged = true; } @@ -38,7 +38,7 @@ describe("Test Element", () => { afterEach(() => { jest.useRealTimers(); }); - test("Changed properties", async() => { + test("Properties changed", async() => { document.body.innerHTML = ` @@ -63,7 +63,7 @@ describe("Test Element", () => { }); }); - test("Renderend tag", async () => { + test("Tag rendered", async () => { document.body.innerHTML = ` From 54f47536a8c6713c8428780b7a768ebad8c81bca Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 26 Dec 2023 16:11:03 -0500 Subject: [PATCH 002/199] build: deliver 0.1.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 30c5ba8..2e083db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.9", + "version": "0.1.10", "description": "Vanilla JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 2f67dad1ffd1f3da640ad860b8ed42af9eb396d3 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:31:11 -0400 Subject: [PATCH 003/199] chore(dependencies): bump axios to 1.6.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2e083db..27e4078 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "toolkit" ], "dependencies": { - "axios": "1.6.1", + "axios": "1.6.8", "bootstrap": "5.3.2", "bootstrap-icons": "1.11.2", "bootswatch": "5.3.2", From 0933e39f7eeb869ec4c099bea21caa700888e36a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:32:24 -0400 Subject: [PATCH 004/199] chore(dependencies): bump bootstrap to 5.3.3 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 27e4078..b333255 100644 --- a/package.json +++ b/package.json @@ -31,9 +31,9 @@ ], "dependencies": { "axios": "1.6.8", - "bootstrap": "5.3.2", - "bootstrap-icons": "1.11.2", - "bootswatch": "5.3.2", + "bootstrap": "5.3.3", + "bootstrap-icons": "1.11.3", + "bootswatch": "5.3.3", "can": "6.6.2", "jquery": "3.7.0", "less": "4.2.0", From 67f7ccf3f8c06c890777c3d8b3619d3e79e63235 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:34:17 -0400 Subject: [PATCH 005/199] chore(dependencies): bump solid-js to 1.8.17 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b333255..9a0c9fa 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "jquery": "3.7.0", "less": "4.2.0", "lodash": "4.17.21", - "solid-js": "1.8.5" + "solid-js": "1.8.17" }, "devDependencies": { "@codemirror/lang-html": "6.4.5", From a0d553d8e5c5c18dcc2601067de4fd8cb15da0d9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:37:55 -0400 Subject: [PATCH 006/199] chore(dependencies): bump esbuild 0.21.2 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9a0c9fa..20bcd35 100644 --- a/package.json +++ b/package.json @@ -50,10 +50,10 @@ "@types/lodash": "4.14.197", "can-stache-loader": "3.0.0", "electron": "27.0.4", - "esbuild": "0.19.10", + "esbuild": "0.21.2", "esbuild-jest": "0.5.0", "esbuild-plugin-copy": "2.1.1", - "esbuild-plugin-solid": "0.5.0", + "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", From 2e2c1da75b7389ac4bb394e90170b9fd0c7291dd Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:41:28 -0400 Subject: [PATCH 007/199] chore(dependencies): bump prettier to 3.2.5 --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 20bcd35..6f88bf8 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,7 @@ "http-server": "14.1.1", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", - "prettier": "3.1.1", - "qunit": "2.17.2", + "prettier": "3.2.5", "ts-jest": "29.1.1", "ts-loader": "9.5.1", "ts-node": "10.9.2", From 58eb8384902f8ac05d2c514ba4f30ed9887489b7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:42:30 -0400 Subject: [PATCH 008/199] chore(dependencies): bump ts-jest to 29.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6f88bf8..0b3c31e 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "prettier": "3.2.5", - "ts-jest": "29.1.1", + "ts-jest": "29.1.2", "ts-loader": "9.5.1", "ts-node": "10.9.2", "typescript": "5.3.3" From d4195ffe0affd7ad8ef36d860a97db82d138973a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:44:04 -0400 Subject: [PATCH 009/199] build(dependencies): bump typescript to 5.4.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b3c31e..a5c3131 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "ts-jest": "29.1.2", "ts-loader": "9.5.1", "ts-node": "10.9.2", - "typescript": "5.3.3" + "typescript": "5.4.5" }, "scripts": { "watch": "node watch.mjs", From a9f16b6da5ff4c15a8d0ccadc5b56b32463c6982 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:45:06 -0400 Subject: [PATCH 010/199] build(dependencies): bump types/jest to 29.5.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5c3131..77c4b14 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@codemirror/view": "6.16.0", "@testing-library/dom": "9.3.3", "@testing-library/jest-dom": "6.1.5", - "@types/jest": "29.5.11", + "@types/jest": "29.5.12", "@types/lodash": "4.14.197", "can-stache-loader": "3.0.0", "electron": "27.0.4", From d3ce20c822525609a0dd456a8e3e5eba19d08fda Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:46:09 -0400 Subject: [PATCH 011/199] build(dependencies): bump @testing-library/jest-dom to 6.4.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77c4b14..242951a 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@codemirror/language": "6.8.0", "@codemirror/view": "6.16.0", "@testing-library/dom": "9.3.3", - "@testing-library/jest-dom": "6.1.5", + "@testing-library/jest-dom": "6.4.5", "@types/jest": "29.5.12", "@types/lodash": "4.14.197", "can-stache-loader": "3.0.0", From d375389f8b35ff7b3aff1fef29cf0dae4d9a6866 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:47:44 -0400 Subject: [PATCH 012/199] build(dependencies): bump @testing-library/dom to 10.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 242951a..9819168 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@codemirror/lang-html": "6.4.5", "@codemirror/language": "6.8.0", "@codemirror/view": "6.16.0", - "@testing-library/dom": "9.3.3", + "@testing-library/dom": "10.1.0", "@testing-library/jest-dom": "6.4.5", "@types/jest": "29.5.12", "@types/lodash": "4.14.197", From 5208f43c1e14f134a2408a49005e317dc5861a86 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 19:51:16 -0400 Subject: [PATCH 013/199] build(test): remove karma test --- LICENSE | 2 +- package.json | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index d096af3..b4d5c0e 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2023 Flavio Garcia. + Copyright 2018-2024 Flavio Garcia. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/package.json b/package.json index 9819168..daf2e10 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "showcase": "http-server & npm run watch", "esbuild": "node build.mjs", "build": "npm run build:clean && npm run lessc && npm run esbuild", - "build:prod": "npm run build:clean && webpack --config webpack.config.prod.js && npm run lessc", "build:clean": "rm -rf dist", "build:vendors": "rm -rf dist", "lessc": "npm run lessc:faz && npm run lessc:showcase", @@ -78,7 +77,6 @@ "lessc:dev:faz": "lessc stylesheets/faz.less stylesheets/faz.css --source-map", "lessc:dev:showcase": "lessc stylesheets/showcase.less stylesheets/showcase.css --source-map", "test": "jest", - "test:browser": "karma start --single-run", "yarn": "npm run yarn:clean && npm run yarn:v2 && npm run yarn:install", "yarn:install": "yarn install", "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", From 7d961e845bbb083b3bff1d59345ee333b13b1dab Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 21:29:45 -0400 Subject: [PATCH 014/199] build(scope): replace esbuild-jest for esbuild-jest2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index daf2e10..794fbaf 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "can-stache-loader": "3.0.0", "electron": "27.0.4", "esbuild": "0.21.2", - "esbuild-jest": "0.5.0", + "esbuild-jest2": "0.6.7", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", From f44f2b6591d6cfd99e31da69da09b3731ea1276e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 13 May 2024 21:31:12 -0400 Subject: [PATCH 015/199] build(release): deliver 0.1.11 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 794fbaf..bad93c6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "faz", - "version": "0.1.10", - "description": "Vanilla JS HTML Web Components", + "version": "0.1.11", + "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", "mainFields": [ From ec5299381197c9436c4be1904b7de2e1f51341d5 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 24 May 2024 13:17:14 -0400 Subject: [PATCH 016/199] refactor: handle faz item extra classes as an array Refs: #149 --- src/form.tsx | 106 ++++++++++++--- src/item.ts | 336 +++++++++++++++++++++++++--------------------- test/item.test.ts | 120 +++++++++++------ 3 files changed, 357 insertions(+), 205 deletions(-) diff --git a/src/form.tsx b/src/form.tsx index 198139d..78ebc71 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -1,5 +1,5 @@ /** - * Copyright 2018-2023 Flavio Garcia + * Copyright 2018-2024 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,29 +14,103 @@ * limitations under the License. */ -import { FazElementItem } from "./item"; -import { Accessor, createSignal, Setter} from "solid-js"; +import { FazElementItem } from "./item" export class FazFormElement extends FazElementItem { - public action: Accessor; - public setAction: Setter; + private _action: string|null = null; + private _errors: Array = new Array(); + private _method: string|null = null; - public errors: Accessor>; - public setErrors: Setter>; + constructor() { + super(); + for (const attribute of this.attributes) { + switch (attribute.name.toLowerCase()) { + case "action": + this._action = attribute.value; + break; + case "method": + this._method = attribute.value; + break; + } + } + } - public method: Accessor; - public setMethod: Setter; + get action(): string | null { + return this._action; + } - hasErrors() { - return this.errors().length > 0; + set action(value: string | null) { + if (this._action !== value) { + const oldValue = this._action; + this._action = value; + if (!this.loading) { + const event = this.createEvent("actionchanged", value, + oldValue); + this.dispatchEvent(event); + this.onActionChange(event); + } + } } - constructor() { - super(); - [this.action, this.setAction] = createSignal(null); - [this.errors, this.setErrors] = createSignal>([]); - [this.method, this.setMethod] = createSignal("get"); + onActionChange(event: CustomEvent) {} + + get errors(): Array { + return this._errors; + } + + set errors(value: Array) { + if (this._action !== value) { + const oldValue = this._action; + this._action = value; + if (!this.loading) { + const event = this.createEvent("actionchanged", value, + oldValue); + this.dispatchEvent(event); + this.onActionChange(event); + } + } + } + + hasError(value: string): boolean { + return this.errors.find(item => item == value) !== undefined; } + + hasErrors(): boolean { + return this.errors.length > 0; + } + + + pushError(value: string) { + if (!this.hasError(value)) { + const oldValue = this.errors; + this.errors.push(value); + if (!this.loading) { + const event = this.createEvent("errorschanged", this.errors, + oldValue); + this.dispatchEvent(event); + this.onActionChange(event); + } + } + } + + get method(): string | null { + return this._method; + } + + set method(value: string | null) { + if (this._method !== value) { + const oldValue = this._method; + this._method = value; + if (!this.loading) { + const event = this.createEvent("methodchanged", value, + oldValue); + this.dispatchEvent(event); + this.onActionChange(event); + } + } + } + + onMethodChange(event: CustomEvent) {} } diff --git a/src/item.ts b/src/item.ts index 8e01131..2cba0c8 100644 --- a/src/item.ts +++ b/src/item.ts @@ -14,80 +14,82 @@ * limitations under the License. */ -import { randomId } from "./id"; -import { toBoolean } from "./values"; +import { randomId } from "./id" +import { toBoolean } from "./values" class FazNode extends Node { - public fazElement: FazElementItem | null = null; + public fazElement: FazElementItem | null = null } export class FazElementItem extends HTMLElement { - private _active: boolean = false; - private _content: string | null = null; - private _disabled: boolean = false; - private _extraClasses: string = ""; - private _items: Array = new Array(); - private _loading: boolean = true; - private _parent: FazElementItem | null = null; - private _reload: boolean = false; - private _link: string | null = null; - - public childPrefix: string = ""; - private connected: boolean = false; - public debug: boolean = false; - public renderedChild: ChildNode | null = null; - private initialOuterHTML: string = ""; - private comment: Comment | null = null; - public source: any; + private _active: boolean = false + private _content: string | null = null + private _disabled: boolean = false + private _extraClasses: Array = new Array() + private _items: Array = new Array() + private _loading: boolean = true + private _parent: FazElementItem | null = null + private _reload: boolean = false + private _link: string | null = null + + public childPrefix: string = "" + private connected: boolean = false + public debug: boolean = false + public renderedChild: ChildNode | null = null + private initialOuterHTML: string = "" + private comment: Comment | null = null + public source: any constructor() { - super(); - this.initialOuterHTML = this.outerHTML; + super() + this.initialOuterHTML = this.outerHTML if (!this.id) { - this.id = randomId(); + this.id = randomId() } + for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "active": - this._active = toBoolean(attribute.value); - break; + this._active = toBoolean(attribute.value) + break case "class": + case "fazclass": case "faz-class": - this._extraClasses = attribute.value; - break; + this.extraClasses = attribute.value + break case "content": - this._content = attribute.value; - break; + this._content = attribute.value + break case "disabled": - this._disabled = toBoolean(attribute.value); - break; + this._disabled = toBoolean(attribute.value) + break case "id": case "fazid": case "faz-id": - this.id = attribute.value; - break; + this.id = attribute.value + break case "href": case "link": - this._link = attribute.value; - break; + this._link = attribute.value + break } } - this.dataset['faz_element_item'] = this.tagName; - this.childPrefix = "__child-prefix__"; + this.dataset['faz_element_item'] = this.tagName + this.childPrefix = "__child-prefix__" if (this.source) { console.debug( "The element" + this.id + " has a source " + "attribute. All child nodes will be removed." - ); + ) this.childNodes.forEach((node) => { - node.remove(); - }); + node.remove() + }) } - this.comment = document.createComment(this.nodeName + " " + this.id); - this.before(this.comment); + this.comment = document.createComment(this.nodeName + " " + this.id) + this.before(this.comment) } protected createEvent(eventName: string, value: any, @@ -98,22 +100,22 @@ export class FazElementItem extends HTMLElement { value: value, oldValue: oldValue, }, - }); + }) } get active(): boolean { - return this._active; + return this._active } set active(value: boolean) { if (this._active !== value) { - const oldValue = this._active; - this._active = value; + const oldValue = this._active + this._active = value if (!this.loading) { - const event = this.createEvent("activechange", value, - oldValue); - this.dispatchEvent(event); - this.onActiveChange(event); + const event = this.createEvent("activechanged", value, + oldValue) + this.dispatchEvent(event) + this.onActiveChange(event) } } } @@ -121,18 +123,18 @@ export class FazElementItem extends HTMLElement { onActiveChange(event: CustomEvent) {} get content(): string | null { - return this._content; + return this._content } set content(value: string | null) { if (this._content !== value) { - const oldValue = this._content; - this._content = value; + const oldValue = this._content + this._content = value if (!this.loading) { - const event = this.createEvent("contentchange", value, - oldValue); - this.dispatchEvent(event); - this.onContentChange(event); + const event = this.createEvent("contentchanged", value, + oldValue) + this.dispatchEvent(event) + this.onContentChange(event) } } } @@ -140,18 +142,18 @@ export class FazElementItem extends HTMLElement { onContentChange(event: CustomEvent) {} get disabled(): boolean { - return this._disabled; + return this._disabled } set disabled(value: boolean) { if (this._disabled !== value) { - const oldValue = this._disabled; - this._disabled = value; + const oldValue = this._disabled + this._disabled = value if (!this.loading) { - const event = this.createEvent("disabledchange", value, - oldValue); - this.dispatchEvent(event); - this.onDisabledChange(event); + const event = this.createEvent("disabledchanged", value, + oldValue) + this.dispatchEvent(event) + this.onDisabledChange(event) } } } @@ -159,41 +161,75 @@ export class FazElementItem extends HTMLElement { onDisabledChange(event: CustomEvent) {} get extraClasses(): string { - return this._extraClasses; + return this._extraClasses.join(" ") } set extraClasses(value: string) { - if (this._extraClasses !== value) { - const oldValue = this._extraClasses; - this._extraClasses = value; + const extraClasses = value.trim().split(" ") + let changed:boolean = false + const oldValue = this._extraClasses + extraClasses.forEach(item => { + if (!this.hasExtraClass(item)) { + changed = true + } + }) + if (changed) { + this._extraClasses = new Array() + extraClasses.forEach(item => { + this._extraClasses.push(item.toLowerCase()) + }) if (!this.loading) { - const event = this.createEvent("extraclasseschange", value, - oldValue); - this.dispatchEvent(event); - this.onExtraClassesChange(event); + const event = this.createEvent("extraclasseschanged", + this._extraClasses, oldValue) + this.dispatchEvent(event) + this.onExtraClassesChange(event) } } } + hasExtraClass(value: string): boolean { + return this._extraClasses.find( + item => item == value.toLowerCase()) !== undefined + } + + hasExtraClasses(): boolean { + return this.extraClasses.length > 0 + } + + pushExtraClass(value: string) { + value = value.trim() + if (!this.hasExtraClass(value)) { + const oldValue = this._extraClasses + this._extraClasses.push(value.toLowerCase()) + if (!this.loading) { + const event = this.createEvent("extraclasseschanged", + this.extraClasses, oldValue) + this.dispatchEvent(event) + this.onExtraClassesChange(event) + } + } + this._extraClasses.push(value) + } + onExtraClassesChange(event: CustomEvent) {} get link() { // From: https://stackoverflow.com/a/66717705/2887989 - let voidHref = "#!"; + let voidHref = "#!" if (this.disabled || this._link === null || this._link === "") { - return voidHref; + return voidHref } - return this._link; + return this._link } set link(value: string) { if (this._link !== value) { - const oldValue = this._link; - this._link = value; + const oldValue = this._link + this._link = value if (!this.loading) { - const event = this.createEvent("linkchange", value, oldValue); - this.dispatchEvent(event); - this.onLinkChange(event); + const event = this.createEvent("linkchanged", value, oldValue) + this.dispatchEvent(event) + this.onLinkChange(event) } } } @@ -201,18 +237,18 @@ export class FazElementItem extends HTMLElement { onLinkChange(event: CustomEvent) {} get parent(): FazElementItem | null { - return this._parent; + return this._parent } set parent(value: FazElementItem | null) { if (this._parent !== value) { - const oldValue = {...this._parent} as FazElementItem | null; - this._parent = value; + const oldValue = {...this._parent} as FazElementItem | null + this._parent = value if (!this.loading) { - const event = this.createEvent("parentchange", value, - oldValue); - this.dispatchEvent(event); - this.onParentChange(event); + const event = this.createEvent("parentchanged", value, + oldValue) + this.dispatchEvent(event) + this.onParentChange(event) } } } @@ -220,75 +256,75 @@ export class FazElementItem extends HTMLElement { onParentChange(event: CustomEvent) {} get items(): Array { - return this._items; + return this._items } addItem(item: FazElementItem) { if (this._items.indexOf(item) === -1) { - const oldItems = {...this._items} as Array; - this._items.push(item); + const oldItems = {...this._items} as Array + this._items.push(item) if (!this.loading) { - const event = this.createEvent("itemschange", this._items, - oldItems); - this.dispatchEvent(event); - this.onItemsChange(event); + const event = this.createEvent("itemschanged", this._items, + oldItems) + this.dispatchEvent(event) + this.onItemsChange(event) } } } removeItem(item: FazElementItem) { if (this._items.indexOf(item) !== -1) { - const oldItems = {...this._items} as Array; - this._items = this._items.filter(_item => _item !== item); + const oldItems = {...this._items} as Array + this._items = this._items.filter(_item => _item !== item) if (!this.loading) { - const event = this.createEvent("itemschange", this._items, - oldItems); - this.dispatchEvent(event); - this.onItemsChange(event); + const event = this.createEvent("itemschanged", this._items, + oldItems) + this.dispatchEvent(event) + this.onItemsChange(event) } } } setItems(items: Array) { - const oldItems = {...this._items} as Array; - this._items = items; + const oldItems = {...this._items} as Array + this._items = items if (!this.loading) { - const event = this.createEvent("itemschange", this._items, - oldItems); - this.dispatchEvent(event); - this.onItemsChange(event); + const event = this.createEvent("itemschanged", this._items, + oldItems) + this.dispatchEvent(event) + this.onItemsChange(event) } } onItemsChange(event: CustomEvent) {} get loading(): boolean { - return this._loading; + return this._loading } set loading(value: boolean) { if (this._loading !== value) { - const oldValue = this._loading; - this._loading = value; - const event = this.createEvent("loadingchange", value, oldValue); - this.dispatchEvent(event); - this.onLoadingChange(event); + const oldValue = this._loading + this._loading = value + const event = this.createEvent("loadingchanged", value, oldValue) + this.dispatchEvent(event) + this.onLoadingChange(event) } } onLoadingChange(event: CustomEvent) {} get reload(): boolean { - return this._reload; + return this._reload } set reload(value: boolean) { if (this._reload !== value) { - const oldValue = this._reload; - this._reload = value; - const event = this.createEvent("reloadchange", value, oldValue); - this.dispatchEvent(event); - this.onReloadChange(event); + const oldValue = this._reload + this._reload = value + const event = this.createEvent("reloadchanged", value, oldValue) + this.dispatchEvent(event) + this.onReloadChange(event) } } @@ -296,66 +332,66 @@ export class FazElementItem extends HTMLElement { get activeItems() { return this.items.filter(item => { - return item.active; + return item.active }) } get childId() { - return this.childPrefix.concat("-", this.id); + return this.childPrefix.concat("-", this.id) } get contentChild(): ChildNode | null { - return this.firstChild; + return this.firstChild } get linkIsVoid() { if (this.disabled) { - return true; + return true } return this._link === null || this._link === "" || - this._link === "#" || this._link === "#!"; + this._link === "#" || this._link === "#!" } addChild(node: T): T { this.contentChild?.appendChild(node) - return node; + return node } afterShow(children:Node[]) { if (this.loading) { children.forEach(child => { - this.addChild(child); - }); + this.addChild(child) + }) } } beforeShow():void {} collectChildren() { - const children:Node[] = []; - const items: FazElementItem[] = []; + const children:Node[] = [] + const items: FazElementItem[] = [] if (this.loading) { while(this.firstChild) { if (this.firstChild instanceof FazElementItem) { - const item = this.firstChild as FazElementItem; - item.parent = this; - items.push(item); - item.dataset['parent'] = this.id; + const item = this.firstChild as FazElementItem + item.parent = this + items.push(item) + item.dataset['parent'] = this.id } - children.push(this.firstChild); - this.removeChild(this.firstChild); + children.push(this.firstChild) + this.removeChild(this.firstChild) } if (items.length > 0) { - this.setItems(items); + this.setItems(items) } } - return children; + return children } connectedCallback() { - this.render(); - this.connected = true; + this.render() + this.connected = true } load() {} @@ -364,25 +400,25 @@ export class FazElementItem extends HTMLElement { render() { new Promise((resolve) => { - setTimeout(()=>resolve(null), 0); + setTimeout(()=>resolve(null), 0) }).then(()=> { - this.load(); - this.beforeShow(); - const children = this.collectChildren(); + this.load() + this.beforeShow() + const children = this.collectChildren() if (this.loading) { - this.show(); + this.show() } - this.afterShow(children); - this.loading = false; - }); + this.afterShow(children) + this.loading = false + }) } cleanFazTag() { let parentElement = this.parentElement this.childNodes.forEach((node) => { - ((node as unknown) as FazNode).fazElement = this; - this.before(node); - }); - parentElement?.removeChild(this); + ((node as unknown) as FazNode).fazElement = this + this.before(node) + }) + parentElement?.removeChild(this) } } diff --git a/test/item.test.ts b/test/item.test.ts index dfc0b6f..4012745 100644 --- a/test/item.test.ts +++ b/test/item.test.ts @@ -1,67 +1,109 @@ -import { FazElementItem } from "../src/item"; -import { describe, expect, test, jest } from "@jest/globals"; -import { screen, waitFor } from "@testing-library/dom"; +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazElementItem } from "../src/item" +import { describe, expect, test, jest } from "@jest/globals" +import { screen, waitFor } from "@testing-library/dom" class TestElement extends FazElementItem { - public doActiveChanged: boolean = false; - public doDisabledChanged: boolean = false; + public doActiveChanged: boolean = false + public doDisabledChanged: boolean = false + public doExtraClassesChanged: boolean = false constructor() { - super(); + super() // Add an event listener to catch a faz element property change. - this.addEventListener("activechange", (_) => - this.doActiveChanged = true); + this.addEventListener("activechanged", (_) => + this.doActiveChanged = true) } // Or override the event method to catch a faz element property change. // This is preferred for the end user(developer), if you are creating a // component it is preferred to use the addEventListener method. onDisabledChange(_: Event) { - this.doDisabledChanged = true; + this.doDisabledChanged = true + } + + onExtraClassesChange(_: Event) { + this.doExtraClassesChanged = true } show() { - const innerDiv = document.createElement("div"); - innerDiv.dataset.testid = "rendered_div_" + this.id; - this.appendChild(innerDiv); + const innerDiv = document.createElement("div") + innerDiv.dataset.testid = "rendered_div_" + this.id + this.appendChild(innerDiv) } } -customElements.define("faz-test-element", TestElement); +customElements.define("faz-test-element", TestElement) describe("Test Element", () => { - const theText = "A text"; + const theText = "A text" beforeEach(() => { - jest.useFakeTimers(); - }); + jest.useFakeTimers() + }) afterEach(() => { - jest.useRealTimers(); - }); + jest.useRealTimers() + }) test("Properties changed", async() => { document.body.innerHTML = ` - + ${theText} - `; - jest.runAllTimers(); + ` + jest.runAllTimers() await waitFor(() => {}).then(() => { const outerElement = screen.queryByTestId( - "outer_element") as TestElement; + "outer_element") as TestElement const innerElement = screen.queryByTestId( - "inner_element") as TestElement; - outerElement.active = true; - outerElement.disabled = true; - expect(outerElement.doActiveChanged).toBeTruthy(); - expect(outerElement.doDisabledChanged).toBeTruthy(); - outerElement.active = false; - outerElement.disabled = false; - expect(innerElement.doActiveChanged).toBeFalsy(); - expect(innerElement.doDisabledChanged).toBeFalsy(); - }); - }); + "inner_element") as TestElement + outerElement.active = true + outerElement.disabled = true + expect(outerElement.doActiveChanged).toBeTruthy() + expect(outerElement.doDisabledChanged).toBeTruthy() + expect(outerElement.doExtraClassesChanged).toBeFalsy() + outerElement.extraClasses = "aclass" + expect(outerElement.doExtraClassesChanged).toBeFalsy() + outerElement.extraClasses = "aclass bclass" + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.extraClasses = "bclass aclass" + outerElement.extraClasses = "bclass aclass " + outerElement.extraClasses = " bclass aclass" + outerElement.extraClasses = " bclass aclass " + expect(outerElement.doExtraClassesChanged).toBeFalsy() + outerElement.extraClasses = "bclass aclass cclass" + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.pushExtraClass("aclass") + outerElement.pushExtraClass("bclass ") + outerElement.pushExtraClass(" cclass") + outerElement.pushExtraClass(" aclass ") + expect(outerElement.doExtraClassesChanged).toBeFalsy() + outerElement.pushExtraClass("eclass") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.active = false + outerElement.disabled = false + expect(innerElement.doActiveChanged).toBeFalsy() + expect(innerElement.doDisabledChanged).toBeFalsy() + }) + }) test("Tag rendered", async () => { document.body.innerHTML = ` @@ -70,12 +112,12 @@ describe("Test Element", () => { ${theText} - `; - jest.runAllTimers(); + ` + jest.runAllTimers() await waitFor(() => { expect( screen.queryByTestId("rendered_div_outer")?.tagName - ).toBe("DIV"); - }); - }); -}); + ).toBe("DIV") + }) + }) +}) From a143dca78de611ec09ab7b05f84d81a0b1d219c5 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 24 May 2024 13:35:20 -0400 Subject: [PATCH 017/199] feat(form): add basic form with the new structure Refs: #127 --- src/form.tsx | 66 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/form.tsx b/src/form.tsx index 78ebc71..fa53ca4 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -19,37 +19,37 @@ import { FazElementItem } from "./item" export class FazFormElement extends FazElementItem { - private _action: string|null = null; - private _errors: Array = new Array(); - private _method: string|null = null; + private _action: string|null = null + private _errors: Array = new Array() + private _method: string|null = null constructor() { - super(); + super() for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "action": - this._action = attribute.value; - break; + this._action = attribute.value + break case "method": - this._method = attribute.value; - break; + this._method = attribute.value + break } } } get action(): string | null { - return this._action; + return this._action } set action(value: string | null) { if (this._action !== value) { - const oldValue = this._action; - this._action = value; + const oldValue = this._action + this._action = value if (!this.loading) { const event = this.createEvent("actionchanged", value, - oldValue); - this.dispatchEvent(event); - this.onActionChange(event); + oldValue) + this.dispatchEvent(event) + this.onActionChange(event) } } } @@ -57,57 +57,57 @@ export class FazFormElement extends FazElementItem { onActionChange(event: CustomEvent) {} get errors(): Array { - return this._errors; + return this._errors } set errors(value: Array) { if (this._action !== value) { - const oldValue = this._action; - this._action = value; + const oldValue = this._action + this._action = value if (!this.loading) { const event = this.createEvent("actionchanged", value, - oldValue); - this.dispatchEvent(event); - this.onActionChange(event); + oldValue) + this.dispatchEvent(event) + this.onActionChange(event) } } } hasError(value: string): boolean { - return this.errors.find(item => item == value) !== undefined; + return this.errors.find(item => item == value) !== undefined } hasErrors(): boolean { - return this.errors.length > 0; + return this.errors.length > 0 } pushError(value: string) { if (!this.hasError(value)) { - const oldValue = this.errors; - this.errors.push(value); + const oldValue = this.errors + this.errors.push(value) if (!this.loading) { const event = this.createEvent("errorschanged", this.errors, - oldValue); - this.dispatchEvent(event); - this.onActionChange(event); + oldValue) + this.dispatchEvent(event) + this.onActionChange(event) } } } get method(): string | null { - return this._method; + return this._method } set method(value: string | null) { if (this._method !== value) { - const oldValue = this._method; - this._method = value; + const oldValue = this._method + this._method = value if (!this.loading) { const event = this.createEvent("methodchanged", value, - oldValue); - this.dispatchEvent(event); - this.onActionChange(event); + oldValue) + this.dispatchEvent(event) + this.onActionChange(event) } } } From 4e6b582bbca6b3cce3ca26597c8c5916ef06d2e3 Mon Sep 17 00:00:00 2001 From: Michael Lins Date: Mon, 20 May 2024 13:44:46 -0300 Subject: [PATCH 018/199] fix: return correctly first 9 characters as random id --- src/id.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/id.ts b/src/id.ts index 11c2a01..e5e2dc7 100644 --- a/src/id.ts +++ b/src/id.ts @@ -20,5 +20,5 @@ export function randomId() { // Convert it to base 36 (numbers + letters), and grab the first // 9 characters // after the decimal. - return "_" + Math.random().toString(36).substring(2, 9); + return "_" + Math.random().toString(36).substring(2, 11); } From 338c654276915611cbb851097e5f705e689faf34 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Thu, 30 May 2024 13:14:44 -0400 Subject: [PATCH 019/199] build: add showcase back to the project Also providing a house cleaning to the project, and get karma out of the project. Fix: #122 Refs: #115 --- assets.mjs | 20 +++ breadcrumb/breadcrumb-item.js | 95 --------------- breadcrumb/breadcrumb.js | 78 ------------ breadcrumb/fixtures/breadcrumb.json | 15 --- breadcrumb/index.html | 61 ---------- breadcrumb/stache/breadcrumb-item.stache | 7 -- breadcrumb/stache/breadcrumb.stache | 7 -- karma.conf.js | 149 ----------------------- package.json | 3 +- showcase/index.html | 39 ++++++ src/app/global.ts | 16 +-- src/id.ts | 4 +- src/types/index.d.ts | 31 +++-- src/values.ts | 4 +- watch.mjs | 22 +++- 15 files changed, 112 insertions(+), 439 deletions(-) create mode 100644 assets.mjs delete mode 100644 breadcrumb/breadcrumb-item.js delete mode 100644 breadcrumb/breadcrumb.js delete mode 100644 breadcrumb/fixtures/breadcrumb.json delete mode 100644 breadcrumb/index.html delete mode 100644 breadcrumb/stache/breadcrumb-item.stache delete mode 100644 breadcrumb/stache/breadcrumb.stache delete mode 100644 karma.conf.js create mode 100644 showcase/index.html diff --git a/assets.mjs b/assets.mjs new file mode 100644 index 0000000..ec5aad1 --- /dev/null +++ b/assets.mjs @@ -0,0 +1,20 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const assets = { + assets:[ + ] +} diff --git a/breadcrumb/breadcrumb-item.js b/breadcrumb/breadcrumb-item.js deleted file mode 100644 index c5ffb41..0000000 --- a/breadcrumb/breadcrumb-item.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright 2018-2020 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { ObservableArray, type } from "can"; -import { default as FazItem } from "../item"; -import itemTemplate from "./stache/breadcrumb-item.stache"; - -export class FazBreadcrumbItem extends FazItem { - - static get props() { - return $.extend(super.props, { - disabled: {type: type.convert(Boolean), default: false}, - target: {type: type.convert(String), default: ""}, - }); - } - - get classes() { - let classes = ["breadcrumb-item"]; - if(this.active) { - classes.push("active"); - } - return classes.join(" "); - } - - get html() { - return itemTemplate(this); - } - - setParent(parent) { - this.parent = parent; - } - - processElement(parent, element) { - this.setParent(parent); - for(let attribute of element.attributes) { - switch (attribute.name.toLowerCase()) { - case "id": - this.id = attribute.value; - break; - case "href": - this.href = attribute.value; - break; - } - } - this.content = element.innerHTML; - } - - process(parent, element, activeItem) { - - } -} - -export class FazBreadcrumbItemList extends ObservableArray { - static get props() { - return { - get enabled() { - return this.filter({disabled: false}); - }, - get last() { - return this[this.length-1]; - }, - get active() { - return this.filter({active: true}); - } - }; - } - - constructor(items) { - super(items); - this.on( "add", function ( ev, items, index ) { - console.log( "add", items, index ); - }); - } - - clearAll() { - while(this.length>0) { - this.pop(); - } - } - - static items = type.convert(FazBreadcrumbItem); -} diff --git a/breadcrumb/breadcrumb.js b/breadcrumb/breadcrumb.js deleted file mode 100644 index f65f73d..0000000 --- a/breadcrumb/breadcrumb.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Copyright 2018-2022 Flávio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {StacheElement, type} from "can"; -import { FazBreadcrumbItem, FazBreadcrumbItemList } from "./breadcrumb-item"; -import breadcrumbTemplate from "./stache/breadcrumb.stache"; - -export default class FazBreadcrumb extends StacheElement { - static view = breadcrumbTemplate; - - static get props() { - return { - isLoading: {type: Boolean, default: true}, - content: {type: type.convert(String)}, - source: {type: type.convert(String)}, - items: {type: FazBreadcrumbItemList, get default() { - return new FazBreadcrumbItemList([]); - }}, - set jsonString(value) { - try { - let data = JSON.parse(value); - this.items.clearAll(); - data.items.forEach(function(item){ - this.items.push(item); - }.bind(this)); - } catch (e) { - console.error(e); - } - } - }; - } - - connectedCallback() { - this.content = this.innerHTML; - for(let attribute of this.attributes) { - switch (attribute.name.toLowerCase()) { - case "json-string": - this.jsonString = attribute.value; - break; - case "source": - this.source = attribute.value; - break; - } - } - this.querySelectorAll("faz-breadcrumb > faz-breadcrumb-item").forEach( - function(item) { - let breadcrumbItem = new FazBreadcrumbItem(); - breadcrumbItem.processElement(this, item); - this.items.push(breadcrumbItem); - }.bind(this) - ); - super.connectedCallback(); - - if (this.items.last!==undefined) { - this.items.last.active = true; - } - - } - - static get seal() { - return true; - } -} - -customElements.define("faz-breadcrumb", FazBreadcrumb); diff --git a/breadcrumb/fixtures/breadcrumb.json b/breadcrumb/fixtures/breadcrumb.json deleted file mode 100644 index e7c16ce..0000000 --- a/breadcrumb/fixtures/breadcrumb.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "items": [ - { - "content": "Root From Source" - }, - { - "content": "First Level From Source", - "href": "#firstLevelFromSrouce" - }, - { - "content": "Edge From Source", - "href": "#edgeFromSrouce" - } - ] -} diff --git a/breadcrumb/index.html b/breadcrumb/index.html deleted file mode 100644 index 528f801..0000000 --- a/breadcrumb/index.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - Candango Faz Toolkit - Breadcrumbs - - - - - - - - - - - -
- -

Breadcrumbs

- -
-
    -
  • - - Root - First Level - Edge - - - -
  • -
  • <faz-alert>An alert</faz-alert>
    -
  • -
-
-
- - - - - - - - - - - - diff --git a/breadcrumb/stache/breadcrumb-item.stache b/breadcrumb/stache/breadcrumb-item.stache deleted file mode 100644 index 4461a7d..0000000 --- a/breadcrumb/stache/breadcrumb-item.stache +++ /dev/null @@ -1,7 +0,0 @@ -
  • - {{# if(isLink) }} - {{{ content }}} - {{ else }} - {{{ content }}} - {{/ if }} -
  • diff --git a/breadcrumb/stache/breadcrumb.stache b/breadcrumb/stache/breadcrumb.stache deleted file mode 100644 index 6ba5703..0000000 --- a/breadcrumb/stache/breadcrumb.stache +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index cc1af1e..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,149 +0,0 @@ -const path = require("path"); -const webpack = require("webpack"); - -// This is related to the new jsx transform -// SEE: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html -// Yanked from the create react app. O.o -const hasJsxRuntime = (() => { - if (process.env.DISABLE_NEW_JSX_TRANSFORM === "true") { - return false; - } - try { - require.resolve("react/jsx-runtime"); - return true; - } catch (e) { - return false; - } -})(); - -const defaultWebpackOptions = { - mode: 'development', - output: { - filename: '[name]-test.js', - path: path.resolve(__dirname, "test/dist") - }, - stats: { - modules: false, - colors: true, - }, - watch: false, - module: { - rules: [ - { - test: /\.stache$/, - use: { - loader: "can-stache-loader" - } - }, - { - test: /\.js|\.jsx$/, - exclude: /node_modules/, - use: { - loader: 'babel-loader', - options: { - presets: [ - [ - require.resolve("@babel/preset-env") - ], - [ - require.resolve("@babel/preset-react"), - { - runtime: hasJsxRuntime ? "automatic" : - "classic", - } - ], - ], - // SEE: https://newbedev.com/babel-7-referenceerror-regeneratorruntime-is-not-defined - plugins: [ - require.resolve("@babel/plugin-transform-runtime") - ], - } - } - } - ] - }, - // optimization: { - // runtimeChunk: 'single', - // splitChunks: { - // chunks: 'all', - // minSize: 0, - // cacheGroups: { - // commons: { - // name: 'commons', - // chunks: 'initial', - // minChunks: 1, - // }, - // }, - // }, - // }, - plugins: [ - new webpack.SourceMapDevToolPlugin({ - append: '\n//# sourceMappingURL=[url]', - filename: '[name].bundle.map', - }) - ], -}; - -module.exports = (config) => { - config.set({ - // ... normal karma configuration - browsers: ['Electron'], - client: { - captureConsole: true, - useIframe: false, - clearContext: false, - qunit: { - showUI: true, - testTimeout: 500 - } - - }, - // make sure to include webpack as a framework - frameworks: ['webpack', "qunit"], - reporters: ['dots'], - //browserNoActivityTimeout: 15000, - customLaunchers: { - CustomElectron: { - base: 'Electron', - browserWindowOptions: { - show: true, - // DEV: More preferentially, should link your own `webPreferences` from your Electron app instead - webPreferences: { - // Preferred `preload` mechanism to expose `require` - - - // Alternative non-preload mechanism to expose `require` - // nodeIntegration: true, - // contextIsolation: false - - - - // nativeWindowOpen is set to `true` by default by `karma-electron` as well, see #50 - nativeWindowOpen: false - } - } - } - }, - plugins: [ - 'karma-qunit', - 'karma-electron', - 'karma-webpack' - - ], - - files: [ - "./node_modules/jquery/dist/jquery.min.js", - // all files ending in ".test.js" - // !!! use watched: false as we use webpacks watch - { pattern: './test/**/*-test.js', watched: false }, - { pattern: "./test/dist/*-test.*.js", watched: false } - ], - - preprocessors: { - // add webpack as preprocessor - './test/**/*-test.js': ["webpack"] - }, - - webpack: defaultWebpackOptions, - }); -} diff --git a/package.json b/package.json index bad93c6..f91731c 100644 --- a/package.json +++ b/package.json @@ -81,5 +81,6 @@ "yarn:install": "yarn install", "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/showcase/index.html b/showcase/index.html new file mode 100644 index 0000000..a78b0a4 --- /dev/null +++ b/showcase/index.html @@ -0,0 +1,39 @@ + + + + + + + + + + Candango Faz + + + + + + + + + +
    + +
    +

    Faz

    +

    Faz components

    + +
    + +
    + + + + + + diff --git a/src/app/global.ts b/src/app/global.ts index cb6d44c..9d5bc61 100644 --- a/src/app/global.ts +++ b/src/app/global.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2023 Flavio Garcia + * Copyright 2018-2024 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,21 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { EditorView } from "@codemirror/view"; +import { EditorView } from "@codemirror/view" import { syntaxHighlighting, defaultHighlightStyle -} from "@codemirror/language"; -import { html } from "@codemirror/lang-html"; +} from "@codemirror/language" +import { html } from "@codemirror/lang-html" declare global { interface Window { - codemirrorit: (id:string) => void; + codemirrorit: (id:string) => void } } // TODO: Apply this theme https://palettes.shecodes.io/palettes/1313 window.codemirrorit = function (id:string) { - let referenceNode = document.getElementById(id) || document.body; + let referenceNode = document.getElementById(id) || document.body let theme = EditorView.theme({ "&": { @@ -48,7 +48,7 @@ window.codemirrorit = function (id:string) { color: "#ddd", border: "none" } - }, { dark: true }); + }, { dark: true }) new EditorView({ doc: referenceNode.innerHTML, @@ -56,5 +56,5 @@ window.codemirrorit = function (id:string) { html(),theme, syntaxHighlighting(defaultHighlightStyle) ], parent: referenceNode, - }); + }) } diff --git a/src/id.ts b/src/id.ts index e5e2dc7..9fe8415 100644 --- a/src/id.ts +++ b/src/id.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2023 Flavio Garcia + * Copyright 2018-2024 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,5 +20,5 @@ export function randomId() { // Convert it to base 36 (numbers + letters), and grab the first // 9 characters // after the decimal. - return "_" + Math.random().toString(36).substring(2, 11); + return "_" + Math.random().toString(36).substring(2, 11) } diff --git a/src/types/index.d.ts b/src/types/index.d.ts index a9d2aeb..deb4c3d 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -1,16 +1,31 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // See: https://cutt.ly/RwyeQ7ZT -export { randomId } from "../id"; -export { FazFormElement } from "../form"; -export { FazElementItem } from "../item"; -export { toBoolean } from "../values"; +export { randomId } from "../id" +export { FazFormElement } from "../form" +export { FazElementItem } from "../item" +export { toBoolean } from "../values" interface FazElementItem extends HTMLElement { - fazid: string; + fazid: string } interface FazElementItemAttributes extends HTMLAttributes { - fazid?: string; + fazid?: string } interface FazNavElement extends FazElementItem { @@ -20,8 +35,8 @@ declare global { declare module "solid-js" { namespace JSX { interface IntrinsicElements { - 'faz-nav': FazElementItemAttributes; - 'faz-nav-item': HTMLDivElement; + 'faz-nav': FazElementItemAttributes + 'faz-nav-item': HTMLDivElement } } } diff --git a/src/values.ts b/src/values.ts index 6bd20a7..f353af0 100644 --- a/src/values.ts +++ b/src/values.ts @@ -16,7 +16,7 @@ export function toBoolean(value: string | null): boolean { if (value === null) { - return false; + return false } - return value.toLowerCase() === "true"; + return value.toLowerCase() === "true" } diff --git a/watch.mjs b/watch.mjs index dc48064..97170e2 100644 --- a/watch.mjs +++ b/watch.mjs @@ -1,5 +1,5 @@ /** - * Copyright 2018-2023 Flavio Garcia + * Copyright 2018-2024 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ import * as esbuild from "esbuild"; import { assets } from "./assets.mjs"; import { entryPoints } from "./entryPoints.mjs"; import { copy } from "esbuild-plugin-copy"; -import { solidPlugin } from "esbuild-plugin-solid"; let ctx = await esbuild.context({ entryPoints: entryPoints, @@ -28,13 +27,24 @@ let ctx = await esbuild.context({ treeShaking: true, sourcemap: true, logLevel: "info", - outdir: "dist", + outdir: "showcase/dist", legalComments: "none", - allowOverwrite: true, + allowOverwrite: false, plugins:[ - copy(assets), - solidPlugin() + copy(assets) ] }); await ctx.watch(); + +await ctx.serve({ + port: 8080, + servedir: "showcase", + onRequest: (args) => { + let logMessage = ""; + for (let key in args) { + logMessage += key + ": " + args[key] + " "; + } + console.log(logMessage); + } +}) From c66a6aeb380c06f15fd4d08bcbf9a46578fb312d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Thu, 30 May 2024 13:20:34 -0400 Subject: [PATCH 020/199] build(release): deliver 0.1.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f91731c..2d9bf59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.11", + "version": "0.1.12", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 6867f1611cf7ae9c1e3ab06b05c7c8943e76097f Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 22 Sep 2024 18:22:50 -0400 Subject: [PATCH 021/199] build: bump axios to 1.7.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2d9bf59..8a028a1 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "toolkit" ], "dependencies": { - "axios": "1.6.8", + "axios": "1.7.7", "bootstrap": "5.3.3", "bootstrap-icons": "1.11.3", "bootswatch": "5.3.3", From 0ac99b4b34ee43f3c94be1f705af8f691a563e09 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 22 Sep 2024 23:39:21 -0400 Subject: [PATCH 022/199] build: bump typescript to 5.6.2 Also ts-jest to 29.2.5, prettier to 3.3.3. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8a028a1..c05aeb5 100644 --- a/package.json +++ b/package.json @@ -57,11 +57,11 @@ "http-server": "14.1.1", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", - "prettier": "3.2.5", - "ts-jest": "29.1.2", + "prettier": "3.3.3", + "ts-jest": "29.2.5", "ts-loader": "9.5.1", "ts-node": "10.9.2", - "typescript": "5.4.5" + "typescript": "5.6.2" }, "scripts": { "watch": "node watch.mjs", From d36ba381784b786188297cbaa95c63619d0f604a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Sep 2024 01:01:47 -0400 Subject: [PATCH 023/199] build: bump esbuild to 0.24.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c05aeb5..d08d83f 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@types/lodash": "4.14.197", "can-stache-loader": "3.0.0", "electron": "27.0.4", - "esbuild": "0.21.2", + "esbuild": "0.24.0", "esbuild-jest2": "0.6.7", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", From d3ba646811f00ddd37c4a16df9a67df8c47735b4 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Sep 2024 01:02:49 -0400 Subject: [PATCH 024/199] build: bump @types/jest to 29.5.13 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d08d83f..5dd92b1 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@codemirror/view": "6.16.0", "@testing-library/dom": "10.1.0", "@testing-library/jest-dom": "6.4.5", - "@types/jest": "29.5.12", + "@types/jest": "29.5.13", "@types/lodash": "4.14.197", "can-stache-loader": "3.0.0", "electron": "27.0.4", From de4bcafbb6ccc63c0543b8979f432e59f6308b71 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Sep 2024 01:05:17 -0400 Subject: [PATCH 025/199] build: bump @types/lodash to 4.17.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5dd92b1..2a7b9be 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@testing-library/dom": "10.1.0", "@testing-library/jest-dom": "6.4.5", "@types/jest": "29.5.13", - "@types/lodash": "4.14.197", + "@types/lodash": "4.17.7", "can-stache-loader": "3.0.0", "electron": "27.0.4", "esbuild": "0.24.0", From 20b6c7cfe3d2e5f5c36986a72b2405d80000f29b Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Sep 2024 01:07:17 -0400 Subject: [PATCH 026/199] build: bump @testing-library/dom to 10.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a7b9be..1e40f42 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@codemirror/lang-html": "6.4.5", "@codemirror/language": "6.8.0", "@codemirror/view": "6.16.0", - "@testing-library/dom": "10.1.0", + "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.4.5", "@types/jest": "29.5.13", "@types/lodash": "4.17.7", From 7d90451083350e21534e5a26a39db8f625a75f31 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Sep 2024 01:08:21 -0400 Subject: [PATCH 027/199] buildl: bump @testing-library/jest-dom to 6.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e40f42..db32f99 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@codemirror/language": "6.8.0", "@codemirror/view": "6.16.0", "@testing-library/dom": "10.4.0", - "@testing-library/jest-dom": "6.4.5", + "@testing-library/jest-dom": "6.5.0", "@types/jest": "29.5.13", "@types/lodash": "4.17.7", "can-stache-loader": "3.0.0", From c1048faf950726a4baebd218d18b7eccad610c96 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Sep 2024 01:11:28 -0400 Subject: [PATCH 028/199] build(release): deliver 0.1.13 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db32f99..2b4e9ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.12", + "version": "0.1.13", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From ea97ee6bcf797e209cf11c5f284732320122b35c Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 24 Sep 2024 16:18:04 -0400 Subject: [PATCH 029/199] refactor: get solid back as base of FazElementItem Convert active, content, disabled and extraClasses properties to signals. Refs #116 --- src/item.ts | 175 +++++++++++++++++++--------------------------------- 1 file changed, 64 insertions(+), 111 deletions(-) diff --git a/src/item.ts b/src/item.ts index 2cba0c8..789addb 100644 --- a/src/item.ts +++ b/src/item.ts @@ -16,6 +16,7 @@ import { randomId } from "./id" import { toBoolean } from "./values" +import { Accessor, createSignal, Setter, Signal } from "solid-js" class FazNode extends Node { @@ -23,10 +24,12 @@ class FazNode extends Node { } export class FazElementItem extends HTMLElement { - private _active: boolean = false - private _content: string | null = null - private _disabled: boolean = false - private _extraClasses: Array = new Array() + + private activeSignal: Signal + private contentSignal: Signal + private disabledSignal: Signal + private extraClassesSignal: Signal + private _items: Array = new Array() private _loading: boolean = true private _parent: FazElementItem | null = null @@ -43,6 +46,12 @@ export class FazElementItem extends HTMLElement { constructor() { super() + + this.activeSignal = createSignal(false) + this.contentSignal = createSignal(null) + this.disabledSignal = createSignal(false) + this.extraClassesSignal = createSignal("") + this.initialOuterHTML = this.outerHTML if (!this.id) { this.id = randomId() @@ -51,18 +60,18 @@ export class FazElementItem extends HTMLElement { for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "active": - this._active = toBoolean(attribute.value) + this.setActive(toBoolean(attribute.value)) break case "class": case "fazclass": case "faz-class": - this.extraClasses = attribute.value + this.setExtraClasses(attribute.value) break case "content": - this._content = attribute.value + this.setContent(attribute.value) break case "disabled": - this._disabled = toBoolean(attribute.value) + this.setDisabled(toBoolean(attribute.value)) break case "id": case "fazid": @@ -92,131 +101,72 @@ export class FazElementItem extends HTMLElement { this.before(this.comment) } - protected createEvent(eventName: string, value: any, - oldValue: any): CustomEvent { - return new CustomEvent(eventName, { - bubbles: true, - detail: { - value: value, - oldValue: oldValue, - }, - }) + get active(): Accessor { + return this.activeSignal[0] } - get active(): boolean { - return this._active + get setActive(): Setter { + return this.activeSignal[1] } - set active(value: boolean) { - if (this._active !== value) { - const oldValue = this._active - this._active = value - if (!this.loading) { - const event = this.createEvent("activechanged", value, - oldValue) - this.dispatchEvent(event) - this.onActiveChange(event) - } - } + get content(): Accessor { + return this.contentSignal[0] } - onActiveChange(event: CustomEvent) {} - - get content(): string | null { - return this._content + get setContent(): Setter { + return this.contentSignal[1] } - set content(value: string | null) { - if (this._content !== value) { - const oldValue = this._content - this._content = value - if (!this.loading) { - const event = this.createEvent("contentchanged", value, - oldValue) - this.dispatchEvent(event) - this.onContentChange(event) - } - } + get disabled(): Accessor { + return this.disabledSignal[0] } - onContentChange(event: CustomEvent) {} - - get disabled(): boolean { - return this._disabled + get setDisabled(): Setter { + return this.disabledSignal[1] } - set disabled(value: boolean) { - if (this._disabled !== value) { - const oldValue = this._disabled - this._disabled = value - if (!this.loading) { - const event = this.createEvent("disabledchanged", value, - oldValue) - this.dispatchEvent(event) - this.onDisabledChange(event) - } - } + get extraClasses(): Accessor { + return this.extraClassesSignal[0] } - onDisabledChange(event: CustomEvent) {} - - get extraClasses(): string { - return this._extraClasses.join(" ") + get setExtraClasses(): Setter { + return this.extraClassesSignal[1] } - set extraClasses(value: string) { - const extraClasses = value.trim().split(" ") - let changed:boolean = false - const oldValue = this._extraClasses - extraClasses.forEach(item => { - if (!this.hasExtraClass(item)) { - changed = true - } + protected createEvent(eventName: string, value: any, + oldValue: any): CustomEvent { + return new CustomEvent(eventName, { + bubbles: true, + detail: { + value: value, + oldValue: oldValue, + }, }) - if (changed) { - this._extraClasses = new Array() - extraClasses.forEach(item => { - this._extraClasses.push(item.toLowerCase()) - }) - if (!this.loading) { - const event = this.createEvent("extraclasseschanged", - this._extraClasses, oldValue) - this.dispatchEvent(event) - this.onExtraClassesChange(event) - } - } } hasExtraClass(value: string): boolean { - return this._extraClasses.find( + const extraClasses = this.extraClasses().trim().split(" ") + return extraClasses.find( item => item == value.toLowerCase()) !== undefined } hasExtraClasses(): boolean { - return this.extraClasses.length > 0 + return this.extraClasses().trim().split(" ").length > 0 } pushExtraClass(value: string) { value = value.trim() if (!this.hasExtraClass(value)) { - const oldValue = this._extraClasses - this._extraClasses.push(value.toLowerCase()) - if (!this.loading) { - const event = this.createEvent("extraclasseschanged", - this.extraClasses, oldValue) - this.dispatchEvent(event) - this.onExtraClassesChange(event) - } + const extraClasses = this.extraClasses().trim().split(" ") + extraClasses.push(value) + this.setExtraClasses(extraClasses.join(" ")) } - this._extraClasses.push(value) } - onExtraClassesChange(event: CustomEvent) {} - get link() { // From: https://stackoverflow.com/a/66717705/2887989 let voidHref = "#!" - if (this.disabled || this._link === null || this._link === "") { + if (this.disabled() || this._link === null || this._link === "") { return voidHref } return this._link @@ -346,7 +296,7 @@ export class FazElementItem extends HTMLElement { } get linkIsVoid() { - if (this.disabled) { + if (this.disabled()) { return true } return this._link === null || this._link === "" || @@ -358,13 +308,7 @@ export class FazElementItem extends HTMLElement { return node } - afterShow(children:Node[]) { - if (this.loading) { - children.forEach(child => { - this.addChild(child) - }) - } - } + afterShow():void {} beforeShow():void {} @@ -389,6 +333,14 @@ export class FazElementItem extends HTMLElement { return children } + placeBackChildren(children: Node[]) { + if (this.loading) { + children.forEach(child => { + this.addChild(child) + }) + } + } + connectedCallback() { this.render() this.connected = true @@ -399,18 +351,19 @@ export class FazElementItem extends HTMLElement { show() {} render() { - new Promise((resolve) => { - setTimeout(()=>resolve(null), 0) - }).then(()=> { + // new Promise((resolve) => { + // setTimeout(()=>resolve(null), 0) + // }).then(()=> { this.load() this.beforeShow() const children = this.collectChildren() if (this.loading) { this.show() } - this.afterShow(children) + this.placeBackChildren(children) + this.afterShow() this.loading = false - }) + // }) } cleanFazTag() { From 73332894ac658b59cd8ed6a227c21f077b8a5176 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 24 Sep 2024 16:30:32 -0400 Subject: [PATCH 030/199] build: replace jest by vitest Covert test to vitest also. Refs: #110 --- package.json | 11 ++-- test/item.test.ts | 123 --------------------------------------------- test/item.test.tsx | 121 ++++++++++++++++++++++++++++++++++++++++++++ tsconfig.json | 4 +- vitest.config.ts | 9 ++++ 5 files changed, 138 insertions(+), 130 deletions(-) delete mode 100644 test/item.test.ts create mode 100644 test/item.test.tsx create mode 100644 vitest.config.ts diff --git a/package.json b/package.json index 2b4e9ba..e12966b 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "homepage": "https://github.com/candango/faz#readme", "author": "Flavio Garcia ", "license": "Apache-2.0", + "type": "module", "keywords": [ "webcomponent", "solidjs", @@ -55,13 +56,13 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jest": "29.7.0", - "jest-environment-jsdom": "29.7.0", + "jsdom": "25.0.1", "prettier": "3.3.3", - "ts-jest": "29.2.5", "ts-loader": "9.5.1", "ts-node": "10.9.2", - "typescript": "5.6.2" + "typescript": "5.6.2", + "vite-plugin-solid": "2.10.2", + "vitest": "2.1.1" }, "scripts": { "watch": "node watch.mjs", @@ -76,7 +77,7 @@ "lessc:dev": "npm run lessc:dev:faz && npm run lessc:dev:showcase", "lessc:dev:faz": "lessc stylesheets/faz.less stylesheets/faz.css --source-map", "lessc:dev:showcase": "lessc stylesheets/showcase.less stylesheets/showcase.css --source-map", - "test": "jest", + "test": "vitest run", "yarn": "npm run yarn:clean && npm run yarn:v2 && npm run yarn:install", "yarn:install": "yarn install", "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", diff --git a/test/item.test.ts b/test/item.test.ts deleted file mode 100644 index 4012745..0000000 --- a/test/item.test.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright 2018-2024 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { FazElementItem } from "../src/item" -import { describe, expect, test, jest } from "@jest/globals" -import { screen, waitFor } from "@testing-library/dom" - -class TestElement extends FazElementItem { - - public doActiveChanged: boolean = false - public doDisabledChanged: boolean = false - public doExtraClassesChanged: boolean = false - - constructor() { - super() - // Add an event listener to catch a faz element property change. - this.addEventListener("activechanged", (_) => - this.doActiveChanged = true) - } - - // Or override the event method to catch a faz element property change. - // This is preferred for the end user(developer), if you are creating a - // component it is preferred to use the addEventListener method. - onDisabledChange(_: Event) { - this.doDisabledChanged = true - } - - onExtraClassesChange(_: Event) { - this.doExtraClassesChanged = true - } - - show() { - const innerDiv = document.createElement("div") - innerDiv.dataset.testid = "rendered_div_" + this.id - this.appendChild(innerDiv) - } -} - -customElements.define("faz-test-element", TestElement) - -describe("Test Element", () => { - const theText = "A text" - beforeEach(() => { - jest.useFakeTimers() - }) - afterEach(() => { - jest.useRealTimers() - }) - test("Properties changed", async() => { - document.body.innerHTML = ` - - - ${theText} - - - ` - jest.runAllTimers() - await waitFor(() => {}).then(() => { - const outerElement = screen.queryByTestId( - "outer_element") as TestElement - const innerElement = screen.queryByTestId( - "inner_element") as TestElement - outerElement.active = true - outerElement.disabled = true - expect(outerElement.doActiveChanged).toBeTruthy() - expect(outerElement.doDisabledChanged).toBeTruthy() - expect(outerElement.doExtraClassesChanged).toBeFalsy() - outerElement.extraClasses = "aclass" - expect(outerElement.doExtraClassesChanged).toBeFalsy() - outerElement.extraClasses = "aclass bclass" - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.extraClasses = "bclass aclass" - outerElement.extraClasses = "bclass aclass " - outerElement.extraClasses = " bclass aclass" - outerElement.extraClasses = " bclass aclass " - expect(outerElement.doExtraClassesChanged).toBeFalsy() - outerElement.extraClasses = "bclass aclass cclass" - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.pushExtraClass("aclass") - outerElement.pushExtraClass("bclass ") - outerElement.pushExtraClass(" cclass") - outerElement.pushExtraClass(" aclass ") - expect(outerElement.doExtraClassesChanged).toBeFalsy() - outerElement.pushExtraClass("eclass") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.active = false - outerElement.disabled = false - expect(innerElement.doActiveChanged).toBeFalsy() - expect(innerElement.doDisabledChanged).toBeFalsy() - }) - }) - - test("Tag rendered", async () => { - document.body.innerHTML = ` - - - ${theText} - - - ` - jest.runAllTimers() - await waitFor(() => { - expect( - screen.queryByTestId("rendered_div_outer")?.tagName - ).toBe("DIV") - }) - }) -}) diff --git a/test/item.test.tsx b/test/item.test.tsx new file mode 100644 index 0000000..f3087de --- /dev/null +++ b/test/item.test.tsx @@ -0,0 +1,121 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazElementItem } from "../src/item" +import { describe, expect, test } from "vitest" +import { screen } from "@testing-library/dom" +import { createEffect, getOwner, runWithOwner } from "solid-js" +import { render } from "solid-js/web" + +class TestElement extends FazElementItem { + + public doActiveChanged: boolean = false + public doDisabledChanged: boolean = false + public doExtraClassesChanged: boolean = false + + constructor() { + super() + createEffect((prevActive) => { + if (this.active() != prevActive) { + this.doActiveChanged = true + } + }, false) + + createEffect((prevDisabled) => { + if (this.disabled() != prevDisabled) { + this.doDisabledChanged = true + } + }, false) + + createEffect((prevExtraClasses) => { + if (this.extraClasses() != prevExtraClasses) { + this.doExtraClassesChanged = true + } + }, "aclass") + } + + show() { + render(() =>
    , this) + } +} + +customElements.define("faz-test-element", TestElement) + +describe("Test Element", () => { + const theText = "A text" + test("Properties changed", () => { + document.body.innerHTML = ` + + + ${theText} + + + ` + const outerElement = screen.queryByTestId( + "outer_element") as TestElement + const innerElement = screen.queryByTestId( + "inner_element") as TestElement + outerElement.setActive(true) + outerElement.setDisabled(true) + expect(outerElement.doActiveChanged).toBeTruthy() + expect(outerElement.doDisabledChanged).toBeTruthy() + expect(outerElement.doExtraClassesChanged).toBeFalsy() + outerElement.setExtraClasses("aclass") + expect(outerElement.doExtraClassesChanged).toBeFalsy() + outerElement.setExtraClasses("aclass bclass") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.setExtraClasses("bclass aclass") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.setExtraClasses("bclass aclass ") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.setExtraClasses(" bclass aclass") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.setExtraClasses(" bclass aclass ") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.setExtraClasses("bclass aclass cclass") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.doExtraClassesChanged = false + outerElement.pushExtraClass("aclass") + outerElement.pushExtraClass("bclass ") + outerElement.pushExtraClass(" cclass") + outerElement.pushExtraClass(" aclass ") + expect(outerElement.doExtraClassesChanged).toBeFalsy() + outerElement.pushExtraClass("eclass") + expect(outerElement.doExtraClassesChanged).toBeTruthy() + outerElement.setActive(false) + outerElement.setDisabled(false) + expect(innerElement.doActiveChanged).toBeFalsy() + expect(innerElement.doDisabledChanged).toBeFalsy() + }) + + test("Tag rendered", () => { + document.body.innerHTML = ` + + + ${theText} + + + ` + expect( + screen.queryByTestId("rendered_div_outer")?.tagName + ).toBe("DIV") + }) +}) diff --git a/tsconfig.json b/tsconfig.json index 04b9d0e..fcb03ac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ /* Language and Environment */ "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "lib": ["esnext", "dom"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "lib": ["esnext", "dom", "dom.iterable"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ @@ -33,7 +33,7 @@ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": ["node", "jest"], /* Specify type package names to be included without being referenced in a source file. */ + "types": ["vite/client", "@testing-library/jest-dom"],/* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ // "resolveJsonModule": true, /* Enable importing .json files. */ diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..a4a963f --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,9 @@ +import solid from "vite-plugin-solid" +import { defineConfig } from "vitest/config" + +export default defineConfig({ + plugins: [solid()], + resolve: { + conditions: ["development", "browser"], + }, +}) From 047a04d7d9a376d8763980cf42f3d68a90375290 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 24 Sep 2024 16:33:19 -0400 Subject: [PATCH 031/199] build: add node 22 to the test matrix Replace jest by vitest in the unit test step name. Refs: #110 --- .github/workflows/run_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 12b7c41..efb217d 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: ["18", "20", "21"] + node-version: ["18", "20", "21", "22"] steps: - uses: actions/checkout@v4 @@ -23,6 +23,6 @@ jobs: npm install -g yarn npm run yarn yarn install - - name: Run jest unit tests + - name: Run vitest unit tests run: | npm test From 1ad4f3bc211837a0795b925a44d745093dd0798b Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 08:52:25 -0400 Subject: [PATCH 032/199] build(release): deliver 0.0.14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e12966b..8c74373 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.13", + "version": "0.1.14", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From cf400855f392d2063056e8ec6d0b06fcd76d7547 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 11:46:59 -0400 Subject: [PATCH 033/199] refactor: storing accessor and setter direcly instead of signal Refs: #116 --- package.json | 1 + src/item.ts | 63 ++++++++++++++++++---------------------------------- 2 files changed, 22 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 8c74373..37e41cc 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "@testing-library/jest-dom": "6.5.0", "@types/jest": "29.5.13", "@types/lodash": "4.17.7", + "@types/node": "22.7.0", "can-stache-loader": "3.0.0", "electron": "27.0.4", "esbuild": "0.24.0", diff --git a/src/item.ts b/src/item.ts index 789addb..e83fb03 100644 --- a/src/item.ts +++ b/src/item.ts @@ -16,7 +16,7 @@ import { randomId } from "./id" import { toBoolean } from "./values" -import { Accessor, createSignal, Setter, Signal } from "solid-js" +import { Accessor, createSignal, Setter } from "solid-js" class FazNode extends Node { @@ -25,10 +25,14 @@ class FazNode extends Node { export class FazElementItem extends HTMLElement { - private activeSignal: Signal - private contentSignal: Signal - private disabledSignal: Signal - private extraClassesSignal: Signal + public active: Accessor + public setActive: Setter + public content: Accessor + public setContent: Setter + public disabled: Accessor + public setDisabled: Setter + public extraClasses: Accessor + public setExtraClasses: Setter private _items: Array = new Array() private _loading: boolean = true @@ -46,11 +50,18 @@ export class FazElementItem extends HTMLElement { constructor() { super() - - this.activeSignal = createSignal(false) - this.contentSignal = createSignal(null) - this.disabledSignal = createSignal(false) - this.extraClassesSignal = createSignal("") + const [active, setActive] = createSignal(false) + this.active = active + this.setActive = setActive + const [content, setContent] = createSignal(null) + this.content = content + this.setContent = setContent + const [disabled, setDisabled] = createSignal(false) + this.disabled = disabled + this.setDisabled = setDisabled + const [extraClasses, setExtraClasses] = createSignal("") + this.extraClasses = extraClasses + this.setExtraClasses = setExtraClasses this.initialOuterHTML = this.outerHTML if (!this.id) { @@ -101,38 +112,6 @@ export class FazElementItem extends HTMLElement { this.before(this.comment) } - get active(): Accessor { - return this.activeSignal[0] - } - - get setActive(): Setter { - return this.activeSignal[1] - } - - get content(): Accessor { - return this.contentSignal[0] - } - - get setContent(): Setter { - return this.contentSignal[1] - } - - get disabled(): Accessor { - return this.disabledSignal[0] - } - - get setDisabled(): Setter { - return this.disabledSignal[1] - } - - get extraClasses(): Accessor { - return this.extraClassesSignal[0] - } - - get setExtraClasses(): Setter { - return this.extraClassesSignal[1] - } - protected createEvent(eventName: string, value: any, oldValue: any): CustomEvent { return new CustomEvent(eventName, { From 6af0d2fe15734780222ff5ab563ce2d18186641c Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 11:48:51 -0400 Subject: [PATCH 034/199] build(release): delivel 0.1.15 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37e41cc..ed167f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.14", + "version": "0.1.15", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 186bca965773ee9d93d15131ee47cf0b4cce4ddf Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 13:37:12 -0400 Subject: [PATCH 035/199] build(ts): use tsc to generate types Refs: #110 #116 --- jest.config.ts | 21 ----------- package.json | 7 ++-- src/form.tsx | 2 +- tsconfig.json | 8 +++-- types/app/global.d.ts | 7 ++++ types/app/global.d.ts.map | 1 + types/form.d.ts | 34 ++++++++++++++++++ types/form.d.ts.map | 1 + types/id.d.ts | 17 +++++++++ types/id.d.ts.map | 1 + types/index.d.ts | 47 +++++++++++------------- types/index.d.ts.map | 1 + types/item.d.ts | 75 +++++++++++++++++++++++++++++++++++++++ types/item.d.ts.map | 1 + types/values.d.ts | 17 +++++++++ types/values.d.ts.map | 1 + 16 files changed, 187 insertions(+), 54 deletions(-) delete mode 100644 jest.config.ts create mode 100644 types/app/global.d.ts create mode 100644 types/app/global.d.ts.map create mode 100644 types/form.d.ts create mode 100644 types/form.d.ts.map create mode 100644 types/id.d.ts create mode 100644 types/id.d.ts.map create mode 100644 types/index.d.ts.map create mode 100644 types/item.d.ts create mode 100644 types/item.d.ts.map create mode 100644 types/values.d.ts create mode 100644 types/values.d.ts.map diff --git a/jest.config.ts b/jest.config.ts deleted file mode 100644 index dcf4919..0000000 --- a/jest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { Config } from "@jest/types"; - -// Solutions for jest: -// jsdom: https://stackoverflow.com/a/69228464/2887989 -// watch: https://stackoverflow.com/a/39091907/2887989 -// this file: https://stackoverflow.com/a/76995084/2887989 -const config: Config.InitialOptions = { - verbose: true, - testEnvironment: "jsdom", - transform: { - "^.+\\.ts?$": ["ts-jest", {tsconfig: "./tsconfig.json"}], - }, - preset: "ts-jest", - moduleNameMapper: { - "React": "/node_modules/solid-js/h/jsx-runtime/dist/jsx.cjs", - "solid-js/web": "/node_modules/solid-js/web/dist/web.cjs", - "solid-js": "/node_modules/solid-js/dist/solid.cjs" - } -}; - -export default config; diff --git a/package.json b/package.json index ed167f8..88227f0 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,10 @@ "watch": "node watch.mjs", "showcase": "http-server & npm run watch", "esbuild": "node build.mjs", - "build": "npm run build:clean && npm run lessc && npm run esbuild", + "ts:build": "npm run ts:clean && npm run ts:declaration", + "ts:declaration": "tsc -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.tsbuildinfo", + "ts:clean": "rm -rf tsconfig.tsbuildinfo types/*", + "build": "npm run build:clean && npm run lessc && npm run esbuild && npm run ts:build", "build:clean": "rm -rf dist", "build:vendors": "rm -rf dist", "lessc": "npm run lessc:faz && npm run lessc:showcase", @@ -84,5 +87,5 @@ "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + "packageManager": "yarn@4.5.0" } diff --git a/src/form.tsx b/src/form.tsx index fa53ca4..78f6fe1 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -60,7 +60,7 @@ export class FazFormElement extends FazElementItem { return this._errors } - set errors(value: Array) { + set errors(value: string) { if (this._action !== value) { const oldValue = this._action this._action = value diff --git a/tsconfig.json b/tsconfig.json index fcb03ac..33c7458 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,12 @@ { + "include": ["tsconfig.json", "src/**/*"], + "exclude": ["jest.config.ts", "vitest.config.ts"], "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ /* Projects */ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ @@ -27,7 +29,7 @@ /* Modules */ // "module": "ES6", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ + "rootDir": "./src", /* Specify the root folder within your source files. */ "moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ @@ -46,7 +48,7 @@ /* Emit */ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ diff --git a/types/app/global.d.ts b/types/app/global.d.ts new file mode 100644 index 0000000..d419b9f --- /dev/null +++ b/types/app/global.d.ts @@ -0,0 +1,7 @@ +declare global { + interface Window { + codemirrorit: (id: string) => void; + } +} +export {}; +//# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/types/app/global.d.ts.map b/types/app/global.d.ts.map new file mode 100644 index 0000000..983d797 --- /dev/null +++ b/types/app/global.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/app/global.ts"],"names":[],"mappings":"AAqBA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,YAAY,EAAE,CAAC,EAAE,EAAC,MAAM,KAAK,IAAI,CAAA;KACpC;CACJ"} \ No newline at end of file diff --git a/types/form.d.ts b/types/form.d.ts new file mode 100644 index 0000000..29ca96d --- /dev/null +++ b/types/form.d.ts @@ -0,0 +1,34 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FazElementItem } from "./item"; +export declare class FazFormElement extends FazElementItem { + private _action; + private _errors; + private _method; + constructor(); + get action(): string | null; + set action(value: string | null); + onActionChange(event: CustomEvent): void; + get errors(): Array; + set errors(value: string); + hasError(value: string): boolean; + hasErrors(): boolean; + pushError(value: string): void; + get method(): string | null; + set method(value: string | null); + onMethodChange(event: CustomEvent): void; +} +//# sourceMappingURL=form.d.ts.map \ No newline at end of file diff --git a/types/form.d.ts.map b/types/form.d.ts.map new file mode 100644 index 0000000..dda2919 --- /dev/null +++ b/types/form.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAGvC,qBAAa,cAAe,SAAQ,cAAc;IAE9C,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,OAAO,CAAoB;;IAgBnC,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAE1B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAW9B;IAED,cAAc,CAAC,KAAK,EAAE,WAAW;IAEjC,IAAI,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAE1B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAWvB;IAED,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIhC,SAAS,IAAI,OAAO;IAKpB,SAAS,CAAC,KAAK,EAAE,MAAM;IAavB,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAE1B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAW9B;IAED,cAAc,CAAC,KAAK,EAAE,WAAW;CACpC"} \ No newline at end of file diff --git a/types/id.d.ts b/types/id.d.ts new file mode 100644 index 0000000..97bc2f6 --- /dev/null +++ b/types/id.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export declare function randomId(): string; +//# sourceMappingURL=id.d.ts.map \ No newline at end of file diff --git a/types/id.d.ts.map b/types/id.d.ts.map new file mode 100644 index 0000000..9a9f7e3 --- /dev/null +++ b/types/id.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,QAAQ,WAOvB"} \ No newline at end of file diff --git a/types/index.d.ts b/types/index.d.ts index e0fc627..4f722b8 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,27 +1,20 @@ -// See: https://cutt.ly/RwyeQ7ZT - -export { randomId } from "../src/id"; -export { FazFormElement } from "../src/form"; -export { FazElementItem } from "../src/item"; - -interface FazElementItem extends HTMLElement { - fazid: string; -} - -interface FazElementItemAttributes extends HTMLAttributes { - fazid?: string; -} - -interface FazNavElement extends FazElementItem { -} - -declare global { - declare module "solid-js" { - namespace JSX { - interface IntrinsicElements { - 'faz-nav': FazElementItemAttributes; - 'faz-nav-item': HTMLDivElement; - } - } - } -} +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { randomId } from "./id"; +export { FazFormElement } from "./form"; +export { FazElementItem } from "./item"; +export { toBoolean } from "./values"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/types/index.d.ts.map b/types/index.d.ts.map new file mode 100644 index 0000000..a21af8c --- /dev/null +++ b/types/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/types/item.d.ts b/types/item.d.ts new file mode 100644 index 0000000..e2605ef --- /dev/null +++ b/types/item.d.ts @@ -0,0 +1,75 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Accessor, Setter } from "solid-js"; +export declare class FazElementItem extends HTMLElement { + active: Accessor; + setActive: Setter; + content: Accessor; + setContent: Setter; + disabled: Accessor; + setDisabled: Setter; + extraClasses: Accessor; + setExtraClasses: Setter; + private _items; + private _loading; + private _parent; + private _reload; + private _link; + childPrefix: string; + private connected; + debug: boolean; + renderedChild: ChildNode | null; + private initialOuterHTML; + private comment; + source: any; + constructor(); + protected createEvent(eventName: string, value: any, oldValue: any): CustomEvent; + hasExtraClass(value: string): boolean; + hasExtraClasses(): boolean; + pushExtraClass(value: string): void; + get link(): string; + set link(value: string); + onLinkChange(event: CustomEvent): void; + get parent(): FazElementItem | null; + set parent(value: FazElementItem | null); + onParentChange(event: CustomEvent): void; + get items(): Array; + addItem(item: FazElementItem): void; + removeItem(item: FazElementItem): void; + setItems(items: Array): void; + onItemsChange(event: CustomEvent): void; + get loading(): boolean; + set loading(value: boolean); + onLoadingChange(event: CustomEvent): void; + get reload(): boolean; + set reload(value: boolean); + onReloadChange(event: CustomEvent): void; + get activeItems(): FazElementItem[]; + get childId(): string; + get contentChild(): ChildNode | null; + get linkIsVoid(): boolean; + addChild(node: T): T; + afterShow(): void; + beforeShow(): void; + collectChildren(): Node[]; + placeBackChildren(children: Node[]): void; + connectedCallback(): void; + load(): void; + show(): void; + render(): void; + cleanFazTag(): void; +} +//# sourceMappingURL=item.d.ts.map \ No newline at end of file diff --git a/types/item.d.ts.map b/types/item.d.ts.map new file mode 100644 index 0000000..4a3c806 --- /dev/null +++ b/types/item.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAA;AAOzD,qBAAa,cAAe,SAAQ,WAAW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CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,EAWtC;IAED,cAAc,CAAC,KAAK,EAAE,WAAW;IAEjC,IAAI,KAAK,IAAI,KAAK,CAAC,cAAc,CAAC,CAEjC;IAED,OAAO,CAAC,IAAI,EAAE,cAAc;IAa5B,UAAU,CAAC,IAAI,EAAE,cAAc;IAa/B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC;IAWrC,aAAa,CAAC,KAAK,EAAE,WAAW;IAEhC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAQzB;IAED,eAAe,CAAC,KAAK,EAAE,WAAW;IAElC,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,EAQxB;IAED,cAAc,CAAC,KAAK,EAAE,WAAW;IAEjC,IAAI,WAAW,qBAId;IAGD,IAAI,OAAO,WAEV;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAMb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAKjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAgBN,WAAW;CAQd"} \ No newline at end of file diff --git a/types/values.d.ts b/types/values.d.ts new file mode 100644 index 0000000..bbe0436 --- /dev/null +++ b/types/values.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export declare function toBoolean(value: string | null): boolean; +//# sourceMappingURL=values.d.ts.map \ No newline at end of file diff --git a/types/values.d.ts.map b/types/values.d.ts.map new file mode 100644 index 0000000..6216f6d --- /dev/null +++ b/types/values.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKvD"} \ No newline at end of file From a5fed89fe3628a64c42f5ae73ce87f3491914b25 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 13:39:09 -0400 Subject: [PATCH 036/199] build(release): deliver 0.1.16 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88227f0..7e92559 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.15", + "version": "0.1.16", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 643b4136d9d158badd9f189b041cf59e79343e66 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 14:14:06 -0400 Subject: [PATCH 037/199] fix: types was pointing to the wrong file Refs: #116 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7e92559..e589a43 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "module", "main" ], - "types": "./src/types/index.d.ts", + "types": "./types/index.d.ts", "files": [ "dist", "src" From 91a0cc0cec3c0acfc50de4dd49f4a2dd7e04daff Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 14:14:50 -0400 Subject: [PATCH 038/199] build(release): deliver 0.1.17 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e589a43..76266ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.16", + "version": "0.1.17", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 690207d87fccc37d8113550e0b62dfacd7206bce Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 14:18:53 -0400 Subject: [PATCH 039/199] build: add types to the list of directories to be published Refs: #116 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 76266ff..e28d434 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "types": "./types/index.d.ts", "files": [ "dist", - "src" + "src", + "types" ], "repository": { "type": "git", From c12999317475f9e98b5da193f5587037ec886bc5 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 14:19:57 -0400 Subject: [PATCH 040/199] build(release): deliver 0.1.18 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e28d434..a53750b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.17", + "version": "0.1.18", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 6c8f8c3b2453257255c4605ad67e3c8ae71d1219 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 19:28:38 -0400 Subject: [PATCH 041/199] refactor: convert several properties to solid-js Convert items, loading, parent, reload and link solid-js Assessor and Setter. Refs: #116 --- src/item.ts | 190 ++++++++++++++++------------------------------------ 1 file changed, 57 insertions(+), 133 deletions(-) diff --git a/src/item.ts b/src/item.ts index e83fb03..39b0783 100644 --- a/src/item.ts +++ b/src/item.ts @@ -27,18 +27,22 @@ export class FazElementItem extends HTMLElement { public active: Accessor public setActive: Setter - public content: Accessor - public setContent: Setter + public content: Accessor + public setContent: Setter public disabled: Accessor public setDisabled: Setter public extraClasses: Accessor public setExtraClasses: Setter - - private _items: Array = new Array() - private _loading: boolean = true - private _parent: FazElementItem | null = null - private _reload: boolean = false - private _link: string | null = null + public items: Accessor + public setItems: Setter + public loading: Accessor + public setLoading: Setter + public parent: Accessor + public setParent: Setter + public reload: Accessor + public setReload: Setter + public link: Accessor + public setLink: Setter public childPrefix: string = "" private connected: boolean = false @@ -53,7 +57,7 @@ export class FazElementItem extends HTMLElement { const [active, setActive] = createSignal(false) this.active = active this.setActive = setActive - const [content, setContent] = createSignal(null) + const [content, setContent] = createSignal(undefined) this.content = content this.setContent = setContent const [disabled, setDisabled] = createSignal(false) @@ -62,6 +66,21 @@ export class FazElementItem extends HTMLElement { const [extraClasses, setExtraClasses] = createSignal("") this.extraClasses = extraClasses this.setExtraClasses = setExtraClasses + const [items, setItems] = createSignal([]) + this.items = items + this.setItems = setItems + const [loading, setLoading] = createSignal(true) + this.loading = loading + this.setLoading = setLoading + const [parent, setParent] = createSignal(undefined) + this.parent = parent + this.setParent = setParent + const [reload, setReload] = createSignal(false) + this.reload = reload + this.setReload = setReload + const [link, setLink] = createSignal(undefined) + this.link = link + this.setLink = setLink this.initialOuterHTML = this.outerHTML if (!this.id) { @@ -91,7 +110,7 @@ export class FazElementItem extends HTMLElement { break case "href": case "link": - this._link = attribute.value + this.setLink(attribute.value) break } } @@ -142,125 +161,33 @@ export class FazElementItem extends HTMLElement { } } - get link() { + resolveLink(): string|undefined { // From: https://stackoverflow.com/a/66717705/2887989 let voidHref = "#!" - if (this.disabled() || this._link === null || this._link === "") { + const link = this.link() + if (this.disabled() || link === undefined || link === "") { return voidHref } - return this._link - } - - set link(value: string) { - if (this._link !== value) { - const oldValue = this._link - this._link = value - if (!this.loading) { - const event = this.createEvent("linkchanged", value, oldValue) - this.dispatchEvent(event) - this.onLinkChange(event) - } - } - } - - onLinkChange(event: CustomEvent) {} - - get parent(): FazElementItem | null { - return this._parent - } - - set parent(value: FazElementItem | null) { - if (this._parent !== value) { - const oldValue = {...this._parent} as FazElementItem | null - this._parent = value - if (!this.loading) { - const event = this.createEvent("parentchanged", value, - oldValue) - this.dispatchEvent(event) - this.onParentChange(event) - } - } - } - - onParentChange(event: CustomEvent) {} - - get items(): Array { - return this._items + return this.link() } addItem(item: FazElementItem) { - if (this._items.indexOf(item) === -1) { - const oldItems = {...this._items} as Array - this._items.push(item) - if (!this.loading) { - const event = this.createEvent("itemschanged", this._items, - oldItems) - this.dispatchEvent(event) - this.onItemsChange(event) - } + if (this.items().indexOf(item) === -1) { + const items = {...this.items()} as FazElementItem[] + items.push(item) + this.setItems(items) } } removeItem(item: FazElementItem) { - if (this._items.indexOf(item) !== -1) { - const oldItems = {...this._items} as Array - this._items = this._items.filter(_item => _item !== item) - if (!this.loading) { - const event = this.createEvent("itemschanged", this._items, - oldItems) - this.dispatchEvent(event) - this.onItemsChange(event) - } + if (this.items().indexOf(item) !== -1) { + const items = {...this.items()} as FazElementItem[] + this.setItems(items.filter(i => i !== item)) } } - setItems(items: Array) { - const oldItems = {...this._items} as Array - this._items = items - if (!this.loading) { - const event = this.createEvent("itemschanged", this._items, - oldItems) - this.dispatchEvent(event) - this.onItemsChange(event) - } - } - - onItemsChange(event: CustomEvent) {} - - get loading(): boolean { - return this._loading - } - - set loading(value: boolean) { - if (this._loading !== value) { - const oldValue = this._loading - this._loading = value - const event = this.createEvent("loadingchanged", value, oldValue) - this.dispatchEvent(event) - this.onLoadingChange(event) - } - } - - onLoadingChange(event: CustomEvent) {} - - get reload(): boolean { - return this._reload - } - - set reload(value: boolean) { - if (this._reload !== value) { - const oldValue = this._reload - this._reload = value - const event = this.createEvent("reloadchanged", value, oldValue) - this.dispatchEvent(event) - this.onReloadChange(event) - } - } - - onReloadChange(event: CustomEvent) {} - - get activeItems() { - return this.items.filter(item => { + get activeItems(): FazElementItem[] { + return this.items().filter(item => { return item.active }) } @@ -278,8 +205,9 @@ export class FazElementItem extends HTMLElement { if (this.disabled()) { return true } - return this._link === null || this._link === "" || - this._link === "#" || this._link === "#!" + const linkResolved = this.resolveLink() + return linkResolved === undefined || linkResolved === "" || + linkResolved === "#" || linkResolved === "#!" } addChild(node: T): T { @@ -294,11 +222,11 @@ export class FazElementItem extends HTMLElement { collectChildren() { const children:Node[] = [] const items: FazElementItem[] = [] - if (this.loading) { + if (this.loading()) { while(this.firstChild) { if (this.firstChild instanceof FazElementItem) { const item = this.firstChild as FazElementItem - item.parent = this + item.setParent(this as FazElementItem) items.push(item) item.dataset['parent'] = this.id } @@ -313,7 +241,7 @@ export class FazElementItem extends HTMLElement { } placeBackChildren(children: Node[]) { - if (this.loading) { + if (this.loading()) { children.forEach(child => { this.addChild(child) }) @@ -330,19 +258,15 @@ export class FazElementItem extends HTMLElement { show() {} render() { - // new Promise((resolve) => { - // setTimeout(()=>resolve(null), 0) - // }).then(()=> { - this.load() - this.beforeShow() - const children = this.collectChildren() - if (this.loading) { - this.show() - } - this.placeBackChildren(children) - this.afterShow() - this.loading = false - // }) + this.load() + this.beforeShow() + const children = this.collectChildren() + if (this.loading()) { + this.show() + } + this.placeBackChildren(children) + this.afterShow() + this.setLoading(false) } cleanFazTag() { From b3d3fdf03d9f7688ac4f79931b4d25a21c58bf64 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 25 Sep 2024 19:31:46 -0400 Subject: [PATCH 042/199] build(release): deliver 0.1.19 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a53750b..534b4ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.18", + "version": "0.1.19", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 550ad53074ee7a70dc94f8de83d21365283ee44a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 27 Sep 2024 17:38:50 -0400 Subject: [PATCH 043/199] fix: wrap connectedCallback execution into a setTimeout Fixes: #150 --- src/item.ts | 8 ++++++-- test/item.test.tsx | 27 ++++++++++++++++++++------- tsconfig.json | 7 ++++--- vitest.config.ts | 8 ++++---- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/item.ts b/src/item.ts index 39b0783..ee1c5b4 100644 --- a/src/item.ts +++ b/src/item.ts @@ -249,8 +249,12 @@ export class FazElementItem extends HTMLElement { } connectedCallback() { - this.render() - this.connected = true + new Promise((resolve) => { + setTimeout(()=>resolve(null), 0); + }).then(()=> { + this.render() + this.connected = true + }) } load() {} diff --git a/test/item.test.tsx b/test/item.test.tsx index f3087de..6a83d28 100644 --- a/test/item.test.tsx +++ b/test/item.test.tsx @@ -15,8 +15,8 @@ */ import { FazElementItem } from "../src/item" -import { describe, expect, test } from "vitest" -import { screen } from "@testing-library/dom" +import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest" +import { screen, waitFor } from "@testing-library/dom" import { createEffect, getOwner, runWithOwner } from "solid-js" import { render } from "solid-js/web" @@ -48,7 +48,9 @@ class TestElement extends FazElementItem { } show() { - render(() =>
    , this) + render(() => { + return
    + }, this) } } @@ -56,6 +58,12 @@ customElements.define("faz-test-element", TestElement) describe("Test Element", () => { const theText = "A text" + beforeEach(() => { + vitest.useFakeTimers(); + }); + afterEach(() => { + vitest.useRealTimers(); + }); test("Properties changed", () => { document.body.innerHTML = ` @@ -106,7 +114,7 @@ describe("Test Element", () => { expect(innerElement.doDisabledChanged).toBeFalsy() }) - test("Tag rendered", () => { + test("Tag rendered", async () => { document.body.innerHTML = ` @@ -114,8 +122,13 @@ describe("Test Element", () => { ` - expect( - screen.queryByTestId("rendered_div_outer")?.tagName - ).toBe("DIV") + vitest.runAllTimers() + await waitFor(() => { + const outerElement = screen.getByTestId("outer_element") as FazElementItem + const innerElement = screen.getByTestId("inner_element") as FazElementItem + expect(outerElement.items().length).toBe(1); + expect(innerElement.parent()).toBe(outerElement); + expect(screen.queryByTestId("rendered_div_outer")?.tagName).toBe("DIV"); + }); }) }) diff --git a/tsconfig.json b/tsconfig.json index 33c7458..45fc421 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,4 @@ { - "include": ["tsconfig.json", "src/**/*"], - "exclude": ["jest.config.ts", "vitest.config.ts"], "compilerOptions": { /* Visit https://aka.ms/tsconfig to read more about this file */ @@ -35,7 +33,10 @@ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - "types": ["vite/client", "@testing-library/jest-dom"],/* Specify type package names to be included without being referenced in a source file. */ + "types": [ /* Specify type package names to be included without being referenced in a source file. */ + "vite/client", + "@testing-library/jest-dom" + ], // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ // "resolveJsonModule": true, /* Enable importing .json files. */ diff --git a/vitest.config.ts b/vitest.config.ts index a4a963f..ae385fc 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,8 +2,8 @@ import solid from "vite-plugin-solid" import { defineConfig } from "vitest/config" export default defineConfig({ - plugins: [solid()], - resolve: { - conditions: ["development", "browser"], - }, + plugins: [solid()], + resolve: { + conditions: ["development", "browser"], + } }) From 51dd4cc85d0cb61dce53d15deb78df17d0db2b67 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 27 Sep 2024 17:43:23 -0400 Subject: [PATCH 044/199] fix: fix test execution and types generation Refs: #110 --- package.json | 4 ++-- tsconfig.types.json | 26 ++++++++++++++++++++++++++ types/item.d.ts | 35 +++++++++++++---------------------- types/item.d.ts.map | 2 +- 4 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 tsconfig.types.json diff --git a/package.json b/package.json index 534b4ce..250604a 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "showcase": "http-server & npm run watch", "esbuild": "node build.mjs", "ts:build": "npm run ts:clean && npm run ts:declaration", - "ts:declaration": "tsc -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.tsbuildinfo", + "ts:declaration": "tsc -p tsconfig.types.json -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.types.tsbuildinfo", "ts:clean": "rm -rf tsconfig.tsbuildinfo types/*", "build": "npm run build:clean && npm run lessc && npm run esbuild && npm run ts:build", "build:clean": "rm -rf dist", @@ -88,5 +88,5 @@ "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" }, - "packageManager": "yarn@4.5.0" + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/tsconfig.types.json b/tsconfig.types.json new file mode 100644 index 0000000..16d9dd6 --- /dev/null +++ b/tsconfig.types.json @@ -0,0 +1,26 @@ +{ + "include": ["tsconfig.json", "src/**/*"], + "exclude": ["jest.config.ts", "vitest.config.ts"], + "compilerOptions": { + "composite": true, + "target": "ESNext", + "lib": ["esnext", "dom", "dom.iterable"], + "jsx": "preserve", + "jsxImportSource": "solid-js", + "rootDir": "./src", + "moduleResolution": "Node", + "types": [ + "vite/client", + "@testing-library/jest-dom" + ], + "declaration": true, + "declarationMap": true, + "outDir": "./dist", + "isolatedModules": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitAny": true, + "skipLibCheck": true + } +} diff --git a/types/item.d.ts b/types/item.d.ts index e2605ef..b131042 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -17,17 +17,22 @@ import { Accessor, Setter } from "solid-js"; export declare class FazElementItem extends HTMLElement { active: Accessor; setActive: Setter; - content: Accessor; - setContent: Setter; + content: Accessor; + setContent: Setter; disabled: Accessor; setDisabled: Setter; extraClasses: Accessor; setExtraClasses: Setter; - private _items; - private _loading; - private _parent; - private _reload; - private _link; + items: Accessor; + setItems: Setter; + loading: Accessor; + setLoading: Setter; + parent: Accessor; + setParent: Setter; + reload: Accessor; + setReload: Setter; + link: Accessor; + setLink: Setter; childPrefix: string; private connected; debug: boolean; @@ -40,23 +45,9 @@ export declare class FazElementItem extends HTMLElement { hasExtraClass(value: string): boolean; hasExtraClasses(): boolean; pushExtraClass(value: string): void; - get link(): string; - set link(value: string); - onLinkChange(event: CustomEvent): void; - get parent(): FazElementItem | null; - set parent(value: FazElementItem | null); - onParentChange(event: CustomEvent): void; - get items(): Array; + resolveLink(): string | undefined; addItem(item: FazElementItem): void; removeItem(item: FazElementItem): void; - setItems(items: Array): void; - onItemsChange(event: CustomEvent): void; - get loading(): boolean; - set loading(value: boolean); - onLoadingChange(event: CustomEvent): void; - get reload(): boolean; - set reload(value: boolean); - onReloadChange(event: CustomEvent): void; get activeItems(): FazElementItem[]; get childId(): string; get contentChild(): ChildNode | null; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index 4a3c806..b7f979d 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAA;AAOzD,qBAAa,cAAe,SAAQ,WAAW;IAEpC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IACzB,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;IAC1B,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAC,IAAI,CAAC,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,GAAC,IAAI,CAAC,CAAA;IAC/B,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;IAC5B,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC9B,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,CA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,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAuBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IASjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAYN,WAAW;CAQd"} \ No newline at end of file From 34cd850b5e26419c494f9eac9283b7447c689144 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 27 Sep 2024 17:46:13 -0400 Subject: [PATCH 045/199] build(release): deliver 0.1.20 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 250604a..daaae39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.19", + "version": "0.1.20", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 1ea63b9555c6b725351c575816884bfea053c81a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 12:59:28 -0400 Subject: [PATCH 046/199] refactor: remove createEvent method from FazElementItem This ins't necessary anymore as we're using reactivity from solid-js signals. Refs: #116 --- src/form.tsx | 83 +++++++++---------------------- src/item.ts | 135 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 104 insertions(+), 114 deletions(-) diff --git a/src/form.tsx b/src/form.tsx index 78f6fe1..69957f8 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -15,102 +15,67 @@ */ import { FazElementItem } from "./item" +import { Accessor, createSignal, Setter, Signal } from "solid-js" export class FazFormElement extends FazElementItem { - private _action: string|null = null - private _errors: Array = new Array() - private _method: string|null = null + private actionSignal: Signal = createSignal(undefined) + private errorsSignal: Signal = createSignal([]) + private methodSignal: Signal = createSignal("get") constructor() { super() for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "action": - this._action = attribute.value + this.setAction(attribute.value) break case "method": - this._method = attribute.value + this.setMethod(attribute.value) break } } } - get action(): string | null { - return this._action + get action(): Accessor { + return this.actionSignal[0] } - set action(value: string | null) { - if (this._action !== value) { - const oldValue = this._action - this._action = value - if (!this.loading) { - const event = this.createEvent("actionchanged", value, - oldValue) - this.dispatchEvent(event) - this.onActionChange(event) - } - } + get setAction(): Setter { + return this.actionSignal[1] } - onActionChange(event: CustomEvent) {} - - get errors(): Array { - return this._errors + get errors(): Accessor { + return this.errorsSignal[0] } - set errors(value: string) { - if (this._action !== value) { - const oldValue = this._action - this._action = value - if (!this.loading) { - const event = this.createEvent("actionchanged", value, - oldValue) - this.dispatchEvent(event) - this.onActionChange(event) - } - } + get setErrors(): Setter { + return this.errorsSignal[1] } hasError(value: string): boolean { - return this.errors.find(item => item == value) !== undefined + return this.errors().find(item => item == value) !== undefined } hasErrors(): boolean { - return this.errors.length > 0 + return this.errors().length > 0 } - pushError(value: string) { + value = value.trim() if (!this.hasError(value)) { - const oldValue = this.errors - this.errors.push(value) - if (!this.loading) { - const event = this.createEvent("errorschanged", this.errors, - oldValue) - this.dispatchEvent(event) - this.onActionChange(event) - } + const errors = this.errors() + errors.push(value) + this.setErrors(errors) } } - get method(): string | null { - return this._method + get method(): Accessor { + return this.methodSignal[0] } - set method(value: string | null) { - if (this._method !== value) { - const oldValue = this._method - this._method = value - if (!this.loading) { - const event = this.createEvent("methodchanged", value, - oldValue) - this.dispatchEvent(event) - this.onActionChange(event) - } - } + get setMethod(): Setter { + return this.methodSignal[1] } - - onMethodChange(event: CustomEvent) {} } diff --git a/src/item.ts b/src/item.ts index ee1c5b4..53daaf0 100644 --- a/src/item.ts +++ b/src/item.ts @@ -16,7 +16,7 @@ import { randomId } from "./id" import { toBoolean } from "./values" -import { Accessor, createSignal, Setter } from "solid-js" +import { Accessor, createSignal, Setter, Signal } from "solid-js" class FazNode extends Node { @@ -25,24 +25,15 @@ class FazNode extends Node { export class FazElementItem extends HTMLElement { - public active: Accessor - public setActive: Setter - public content: Accessor - public setContent: Setter - public disabled: Accessor - public setDisabled: Setter - public extraClasses: Accessor - public setExtraClasses: Setter - public items: Accessor - public setItems: Setter - public loading: Accessor - public setLoading: Setter - public parent: Accessor - public setParent: Setter - public reload: Accessor - public setReload: Setter - public link: Accessor - public setLink: Setter + private activeSignal: Signal = createSignal(false) + private contentSignal: Signal = createSignal(undefined) + private disabledSignal: Signal = createSignal(false) + private extraClassesSignal: Signal = createSignal("") + private itemsSignal: Signal = createSignal([]) + private loadingSignal: Signal = createSignal(true) + private parentSignal: Signal = createSignal(undefined) + private reloadSignal: Signal = createSignal(false) + private linkSignal: Signal = createSignal(undefined) public childPrefix: string = "" private connected: boolean = false @@ -54,33 +45,6 @@ export class FazElementItem extends HTMLElement { constructor() { super() - const [active, setActive] = createSignal(false) - this.active = active - this.setActive = setActive - const [content, setContent] = createSignal(undefined) - this.content = content - this.setContent = setContent - const [disabled, setDisabled] = createSignal(false) - this.disabled = disabled - this.setDisabled = setDisabled - const [extraClasses, setExtraClasses] = createSignal("") - this.extraClasses = extraClasses - this.setExtraClasses = setExtraClasses - const [items, setItems] = createSignal([]) - this.items = items - this.setItems = setItems - const [loading, setLoading] = createSignal(true) - this.loading = loading - this.setLoading = setLoading - const [parent, setParent] = createSignal(undefined) - this.parent = parent - this.setParent = setParent - const [reload, setReload] = createSignal(false) - this.reload = reload - this.setReload = setReload - const [link, setLink] = createSignal(undefined) - this.link = link - this.setLink = setLink this.initialOuterHTML = this.outerHTML if (!this.id) { @@ -131,15 +95,76 @@ export class FazElementItem extends HTMLElement { this.before(this.comment) } - protected createEvent(eventName: string, value: any, - oldValue: any): CustomEvent { - return new CustomEvent(eventName, { - bubbles: true, - detail: { - value: value, - oldValue: oldValue, - }, - }) + get active(): Accessor { + return this.activeSignal[0] + } + + get setActive(): Setter { + return this.activeSignal[1] + } + + get content(): Accessor { + return this.contentSignal[0] + } + + get setContent(): Setter { + return this.contentSignal[1] + } + + get disabled(): Accessor { + return this.disabledSignal[0] + } + + get setDisabled(): Setter { + return this.disabledSignal[1] + } + + get extraClasses(): Accessor { + return this.extraClassesSignal[0] + } + + get setExtraClasses(): Setter { + return this.extraClassesSignal[1] + } + + get items(): Accessor { + return this.itemsSignal[0] + } + + get setItems(): Setter { + return this.itemsSignal[1] + } + + get loading(): Accessor { + return this.loadingSignal[0] + } + + get setLoading(): Setter { + return this.loadingSignal[1] + } + + get parent(): Accessor { + return this.parentSignal[0] + } + + get setParent(): Setter { + return this.parentSignal[1] + } + + get reload(): Accessor { + return this.reloadSignal[0] + } + + get setReload(): Setter { + return this.reloadSignal[1] + } + + get link(): Accessor { + return this.linkSignal[0] + } + + get setLink(): Setter { + return this.linkSignal[1] } hasExtraClass(value: string): boolean { From 000992048b22cea30e46cd3d0bb4cc05e37a7d00 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 13:15:44 -0400 Subject: [PATCH 047/199] build(deps): add vite as dependencie and remove unused ones Refs: #116 --- package.json | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index daaae39..ff426f9 100644 --- a/package.json +++ b/package.json @@ -32,14 +32,7 @@ "toolkit" ], "dependencies": { - "axios": "1.7.7", - "bootstrap": "5.3.3", - "bootstrap-icons": "1.11.3", - "bootswatch": "5.3.3", - "can": "6.6.2", - "jquery": "3.7.0", "less": "4.2.0", - "lodash": "4.17.21", "solid-js": "1.8.17" }, "devDependencies": { @@ -49,20 +42,17 @@ "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.5.0", "@types/jest": "29.5.13", - "@types/lodash": "4.17.7", "@types/node": "22.7.0", "can-stache-loader": "3.0.0", - "electron": "27.0.4", "esbuild": "0.24.0", - "esbuild-jest2": "0.6.7", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", "jsdom": "25.0.1", "prettier": "3.3.3", - "ts-loader": "9.5.1", "ts-node": "10.9.2", "typescript": "5.6.2", + "vite": "5.4.8", "vite-plugin-solid": "2.10.2", "vitest": "2.1.1" }, @@ -88,5 +78,5 @@ "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + "packageManager": "yarn@4.5.0" } From c7d99f5dde02e40269b394722764f994ad36b9d4 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 13:19:01 -0400 Subject: [PATCH 048/199] chore(types): update form and item types Refs: #116 --- types/form.d.ts | 21 ++++++++++----------- types/form.d.ts.map | 2 +- types/item.d.ts | 46 ++++++++++++++++++++++++++------------------- types/item.d.ts.map | 2 +- 4 files changed, 39 insertions(+), 32 deletions(-) diff --git a/types/form.d.ts b/types/form.d.ts index 29ca96d..2398a8c 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -14,21 +14,20 @@ * limitations under the License. */ import { FazElementItem } from "./item"; +import { Accessor, Setter } from "solid-js"; export declare class FazFormElement extends FazElementItem { - private _action; - private _errors; - private _method; + private actionSignal; + private errorsSignal; + private methodSignal; constructor(); - get action(): string | null; - set action(value: string | null); - onActionChange(event: CustomEvent): void; - get errors(): Array; - set errors(value: string); + get action(): Accessor; + get setAction(): Setter; + get errors(): Accessor; + get setErrors(): Setter; hasError(value: string): boolean; hasErrors(): boolean; pushError(value: string): void; - get method(): string | null; - set method(value: string | null); - onMethodChange(event: CustomEvent): void; + get method(): Accessor; + get setMethod(): Setter; } //# sourceMappingURL=form.d.ts.map \ No newline at end of file diff --git a/types/form.d.ts.map b/types/form.d.ts.map index dda2919..01cb0df 100644 --- a/types/form.d.ts.map +++ b/types/form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AAGvC,qBAAa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;IAED,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIhC,SAAS,IAAI,OAAO;IAIpB,SAAS,CAAC,KAAK,EAAE,MAAM;IASvB,IAAI,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,CAE7B;IAED,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,CAE9B;CACJ"} \ No newline at end of file diff --git a/types/item.d.ts b/types/item.d.ts index b131042..f4d238f 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -15,24 +15,15 @@ */ import { Accessor, Setter } from "solid-js"; export declare class FazElementItem extends HTMLElement { - active: Accessor; - setActive: Setter; - content: Accessor; - setContent: Setter; - disabled: Accessor; - setDisabled: Setter; - extraClasses: Accessor; - setExtraClasses: Setter; - items: Accessor; - setItems: Setter; - loading: Accessor; - setLoading: Setter; - parent: Accessor; - setParent: Setter; - reload: Accessor; - setReload: Setter; - link: Accessor; - setLink: Setter; + private activeSignal; + private contentSignal; + private disabledSignal; + private extraClassesSignal; + private itemsSignal; + private loadingSignal; + private parentSignal; + private reloadSignal; + private linkSignal; childPrefix: string; private connected; debug: boolean; @@ -41,7 +32,24 @@ export declare class FazElementItem extends HTMLElement { private comment; source: any; constructor(); - protected createEvent(eventName: string, value: any, oldValue: any): CustomEvent; + get active(): Accessor; + get setActive(): Setter; + get content(): Accessor; + get setContent(): Setter; + get disabled(): Accessor; + get setDisabled(): Setter; + get extraClasses(): Accessor; + get setExtraClasses(): Setter; + get items(): Accessor; + get setItems(): Setter; + get loading(): Accessor; + get setLoading(): Setter; + get parent(): Accessor; + get setParent(): Setter; + get reload(): Accessor; + get setReload(): Setter; + get link(): Accessor; + get setLink(): Setter; hasExtraClass(value: string): boolean; hasExtraClasses(): boolean; pushExtraClass(value: string): void; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index b7f979d..81711c9 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":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AAC,CAE9B;IAED,IAAI,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,CAE/B;IAED,IAAI,IAAI,IAAI,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAErC;IAED,IAAI,OAAO,IAAI,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAEtC;IAED,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAC,SAAS;IAU/B,OAAO,CAAC,IAAI,EAAE,cAAc;IAQ5B,UAAU,CAAC,IAAI,EAAE,cAAc;IAO/B,IAAI,WAAW,IAAI,cAAc,EAAE,CAIlC;IAGD,IAAI,OAAO,WAEV;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAOb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IASjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAYN,WAAW;CAQd"} \ No newline at end of file From 931ab40e2c572a20e944b07e4b310eaecc7a4b2d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 13:19:44 -0400 Subject: [PATCH 049/199] build(release): deliver 0.1.21 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff426f9..508fa1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.20", + "version": "0.1.21", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 283a5920f8905046d783a7717e766ec98ef4f2e5 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 18:05:49 -0400 Subject: [PATCH 050/199] fix: return only the active item Fixes: #151 --- package.json | 2 +- src/item.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 508fa1e..b4380da 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" }, - "packageManager": "yarn@4.5.0" + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/src/item.ts b/src/item.ts index 53daaf0..bf6facb 100644 --- a/src/item.ts +++ b/src/item.ts @@ -213,7 +213,7 @@ export class FazElementItem extends HTMLElement { get activeItems(): FazElementItem[] { return this.items().filter(item => { - return item.active + return item.active() }) } From 2113fe9b5184e34a4fede9f7b26369717616c5f8 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 18:08:02 -0400 Subject: [PATCH 051/199] build(release): deliver 0.1.22 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b4380da..a4e9970 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.21", + "version": "0.1.22", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 7bc8db46ccb58c49813e57d771df69260615d9c9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 20:10:14 -0400 Subject: [PATCH 052/199] refactor: back with semicolons For some strange reason without semicolons will prevent direct creation of Accessors and Setters defined in a class. Refs: #116 --- src/form.tsx | 63 ++++------ src/id.ts | 2 +- src/item.ts | 279 ++++++++++++++++++-------------------------- src/values.ts | 4 +- types/form.d.ts | 15 +-- types/form.d.ts.map | 2 +- types/item.d.ts | 45 +++---- types/item.d.ts.map | 2 +- 8 files changed, 165 insertions(+), 247 deletions(-) diff --git a/src/form.tsx b/src/form.tsx index 69957f8..867a143 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -14,68 +14,51 @@ * limitations under the License. */ -import { FazElementItem } from "./item" -import { Accessor, createSignal, Setter, Signal } from "solid-js" +import { FazElementItem } from "./item"; +import { Accessor, createSignal, Setter } from "solid-js"; export class FazFormElement extends FazElementItem { - private actionSignal: Signal = createSignal(undefined) - private errorsSignal: Signal = createSignal([]) - private methodSignal: Signal = createSignal("get") + public action: Accessor; + public setAction: Setter; + public errors: Accessor; + public setErrors: Setter; + public method: Accessor; + public setMethod: Setter; constructor() { - super() + super(); + [this.action, this.setAction] = createSignal(undefined); + [this.errors, this.setErrors] = createSignal([]); + [this.method, this.setMethod] = createSignal("get"); + for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "action": - this.setAction(attribute.value) - break + this.setAction(attribute.value); + break; case "method": - this.setMethod(attribute.value) - break + this.setMethod(attribute.value); + break; } } } - get action(): Accessor { - return this.actionSignal[0] - } - - get setAction(): Setter { - return this.actionSignal[1] - } - - get errors(): Accessor { - return this.errorsSignal[0] - } - - get setErrors(): Setter { - return this.errorsSignal[1] - } - hasError(value: string): boolean { - return this.errors().find(item => item == value) !== undefined + return this.errors().find(item => item == value) !== undefined; } hasErrors(): boolean { - return this.errors().length > 0 + return this.errors().length > 0; } pushError(value: string) { - value = value.trim() + value = value.trim(); if (!this.hasError(value)) { - const errors = this.errors() - errors.push(value) - this.setErrors(errors) + const errors = this.errors(); + errors.push(value); + this.setErrors(errors); } } - - get method(): Accessor { - return this.methodSignal[0] - } - - get setMethod(): Setter { - return this.methodSignal[1] - } } diff --git a/src/id.ts b/src/id.ts index 9fe8415..5e452bc 100644 --- a/src/id.ts +++ b/src/id.ts @@ -20,5 +20,5 @@ export function randomId() { // Convert it to base 36 (numbers + letters), and grab the first // 9 characters // after the decimal. - return "_" + Math.random().toString(36).substring(2, 11) + return "_" + Math.random().toString(36).substring(2, 11); } diff --git a/src/item.ts b/src/item.ts index bf6facb..7e38f1b 100644 --- a/src/item.ts +++ b/src/item.ts @@ -14,230 +14,177 @@ * limitations under the License. */ -import { randomId } from "./id" -import { toBoolean } from "./values" -import { Accessor, createSignal, Setter, Signal } from "solid-js" +import { randomId } from "./id"; +import { toBoolean } from "./values"; +import { Accessor, createSignal, Setter } from "solid-js"; class FazNode extends Node { - public fazElement: FazElementItem | null = null + public fazElement: FazElementItem | null = null; } export class FazElementItem extends HTMLElement { - private activeSignal: Signal = createSignal(false) - private contentSignal: Signal = createSignal(undefined) - private disabledSignal: Signal = createSignal(false) - private extraClassesSignal: Signal = createSignal("") - private itemsSignal: Signal = createSignal([]) - private loadingSignal: Signal = createSignal(true) - private parentSignal: Signal = createSignal(undefined) - private reloadSignal: Signal = createSignal(false) - private linkSignal: Signal = createSignal(undefined) - - public childPrefix: string = "" - private connected: boolean = false - public debug: boolean = false - public renderedChild: ChildNode | null = null - private initialOuterHTML: string = "" - private comment: Comment | null = null - public source: any + public active: Accessor; + public setActive: Setter; + public content: Accessor; + public setContent: Setter; + public disabled: Accessor; + public setDisabled: Setter; + public extraClasses: Accessor; + public setExtraClasses: Setter; + public items: Accessor; + public setItems: Setter; + public loading: Accessor; + public setLoading: Setter; + public parent: Accessor; + public setParent: Setter; + public reload: Accessor; + public setReload: Setter; + public link: Accessor; + public setLink: Setter; + + public childPrefix: string = ""; + private connected: boolean = false; + public debug: boolean = false; + public renderedChild: ChildNode | null = null; + private initialOuterHTML: string = ""; + private comment: Comment | null = null; + public source: any; constructor() { - super() - - this.initialOuterHTML = this.outerHTML + super(); + + [this.active, this.setActive] = createSignal(false); + [this.content, this.setContent] = createSignal(undefined); + [this.disabled, this.setDisabled] = createSignal(false); + [this.extraClasses, this.setExtraClasses] = createSignal(""); + [this.items, this.setItems] = createSignal([]); + [this.loading, this.setLoading] = createSignal(true); + [this.parent, this.setParent] = createSignal(undefined); + [this.reload, this.setReload] = createSignal(true); + [this.link, this.setLink] = createSignal(undefined); + + this.initialOuterHTML = this.outerHTML; if (!this.id) { - this.id = randomId() + this.id = randomId(); } for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "active": - this.setActive(toBoolean(attribute.value)) - break + this.setActive(toBoolean(attribute.value)); + break; case "class": case "fazclass": case "faz-class": - this.setExtraClasses(attribute.value) - break + this.setExtraClasses(attribute.value); + break; case "content": - this.setContent(attribute.value) - break + this.setContent(attribute.value); + break; case "disabled": - this.setDisabled(toBoolean(attribute.value)) - break + this.setDisabled(toBoolean(attribute.value)); + break; case "id": case "fazid": case "faz-id": - this.id = attribute.value - break + this.id = attribute.value; + break; case "href": case "link": - this.setLink(attribute.value) - break + this.setLink(attribute.value); + break; } } - this.dataset['faz_element_item'] = this.tagName - this.childPrefix = "__child-prefix__" + this.dataset['faz_element_item'] = this.tagName; + this.childPrefix = "__child-prefix__"; if (this.source) { console.debug( "The element" + this.id + " has a source " + "attribute. All child nodes will be removed." - ) + ); this.childNodes.forEach((node) => { - node.remove() - }) + node.remove(); + }); } - this.comment = document.createComment(this.nodeName + " " + this.id) - this.before(this.comment) - } - - get active(): Accessor { - return this.activeSignal[0] - } - - get setActive(): Setter { - return this.activeSignal[1] - } - - get content(): Accessor { - return this.contentSignal[0] - } - - get setContent(): Setter { - return this.contentSignal[1] - } - - get disabled(): Accessor { - return this.disabledSignal[0] - } - - get setDisabled(): Setter { - return this.disabledSignal[1] - } - - get extraClasses(): Accessor { - return this.extraClassesSignal[0] - } - - get setExtraClasses(): Setter { - return this.extraClassesSignal[1] - } - - get items(): Accessor { - return this.itemsSignal[0] - } - - get setItems(): Setter { - return this.itemsSignal[1] - } - - get loading(): Accessor { - return this.loadingSignal[0] - } - - get setLoading(): Setter { - return this.loadingSignal[1] - } - - get parent(): Accessor { - return this.parentSignal[0] - } - - get setParent(): Setter { - return this.parentSignal[1] - } - - get reload(): Accessor { - return this.reloadSignal[0] - } - - get setReload(): Setter { - return this.reloadSignal[1] - } - - get link(): Accessor { - return this.linkSignal[0] - } - - get setLink(): Setter { - return this.linkSignal[1] + this.comment = document.createComment(this.nodeName + " " + this.id); + this.before(this.comment); } hasExtraClass(value: string): boolean { - const extraClasses = this.extraClasses().trim().split(" ") + const extraClasses = this.extraClasses().trim().split(" "); return extraClasses.find( - item => item == value.toLowerCase()) !== undefined + item => item == value.toLowerCase()) !== undefined; } hasExtraClasses(): boolean { - return this.extraClasses().trim().split(" ").length > 0 + return this.extraClasses().trim().split(" ").length > 0; } pushExtraClass(value: string) { - value = value.trim() + value = value.trim(); if (!this.hasExtraClass(value)) { - const extraClasses = this.extraClasses().trim().split(" ") - extraClasses.push(value) - this.setExtraClasses(extraClasses.join(" ")) + const extraClasses = this.extraClasses().trim().split(" "); + extraClasses.push(value); + this.setExtraClasses(extraClasses.join(" ")); } } resolveLink(): string|undefined { // From: https://stackoverflow.com/a/66717705/2887989 - let voidHref = "#!" - const link = this.link() + let voidHref = "#!"; + const link = this.link(); if (this.disabled() || link === undefined || link === "") { - return voidHref + return voidHref; } - return this.link() + return this.link(); } addItem(item: FazElementItem) { if (this.items().indexOf(item) === -1) { - const items = {...this.items()} as FazElementItem[] - items.push(item) - this.setItems(items) + const items = {...this.items()} as FazElementItem[]; + items.push(item); + this.setItems(items); } } removeItem(item: FazElementItem) { if (this.items().indexOf(item) !== -1) { - const items = {...this.items()} as FazElementItem[] - this.setItems(items.filter(i => i !== item)) + const items = {...this.items()} as FazElementItem[]; + this.setItems(items.filter(i => i !== item)); } } get activeItems(): FazElementItem[] { return this.items().filter(item => { - return item.active() + return item.active(); }) } get childId() { - return this.childPrefix.concat("-", this.id) + return this.childPrefix.concat("-", this.id); } get contentChild(): ChildNode | null { - return this.firstChild + return this.firstChild; } get linkIsVoid() { if (this.disabled()) { - return true + return true; } - const linkResolved = this.resolveLink() + const linkResolved = this.resolveLink(); return linkResolved === undefined || linkResolved === "" || - linkResolved === "#" || linkResolved === "#!" + linkResolved === "#" || linkResolved === "#!"; } addChild(node: T): T { - this.contentChild?.appendChild(node) - return node + this.contentChild?.appendChild(node); + return node; } afterShow():void {} @@ -245,31 +192,31 @@ export class FazElementItem extends HTMLElement { beforeShow():void {} collectChildren() { - const children:Node[] = [] - const items: FazElementItem[] = [] + const children:Node[] = []; + const items: FazElementItem[] = []; if (this.loading()) { while(this.firstChild) { if (this.firstChild instanceof FazElementItem) { - const item = this.firstChild as FazElementItem - item.setParent(this as FazElementItem) - items.push(item) - item.dataset['parent'] = this.id + const item = this.firstChild as FazElementItem; + item.setParent(this as FazElementItem); + items.push(item); + item.dataset['parent'] = this.id; } - children.push(this.firstChild) - this.removeChild(this.firstChild) + children.push(this.firstChild); + this.removeChild(this.firstChild); } if (items.length > 0) { - this.setItems(items) + this.setItems(items); } } - return children + return children; } placeBackChildren(children: Node[]) { if (this.loading()) { children.forEach(child => { - this.addChild(child) - }) + this.addChild(child); + }); } } @@ -277,9 +224,9 @@ export class FazElementItem extends HTMLElement { new Promise((resolve) => { setTimeout(()=>resolve(null), 0); }).then(()=> { - this.render() - this.connected = true - }) + this.render(); + this.connected = true; + }); } load() {} @@ -287,23 +234,23 @@ export class FazElementItem extends HTMLElement { show() {} render() { - this.load() - this.beforeShow() - const children = this.collectChildren() + this.load(); + this.beforeShow(); + const children = this.collectChildren(); if (this.loading()) { - this.show() + this.show(); } - this.placeBackChildren(children) - this.afterShow() - this.setLoading(false) + this.placeBackChildren(children); + this.afterShow(); + this.setLoading(false); } cleanFazTag() { - let parentElement = this.parentElement + let parentElement = this.parentElement; this.childNodes.forEach((node) => { - ((node as unknown) as FazNode).fazElement = this - this.before(node) + ((node as unknown) as FazNode).fazElement = this; + this.before(node); }) - parentElement?.removeChild(this) + parentElement?.removeChild(this); } } diff --git a/src/values.ts b/src/values.ts index f353af0..6bd20a7 100644 --- a/src/values.ts +++ b/src/values.ts @@ -16,7 +16,7 @@ export function toBoolean(value: string | null): boolean { if (value === null) { - return false + return false; } - return value.toLowerCase() === "true" + return value.toLowerCase() === "true"; } diff --git a/types/form.d.ts b/types/form.d.ts index 2398a8c..c034bfc 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -16,18 +16,15 @@ import { FazElementItem } from "./item"; import { Accessor, Setter } from "solid-js"; export declare class FazFormElement extends FazElementItem { - private actionSignal; - private errorsSignal; - private methodSignal; + action: Accessor; + setAction: Setter; + errors: Accessor; + setErrors: Setter; + method: Accessor; + setMethod: Setter; constructor(); - get action(): Accessor; - get setAction(): Setter; - get errors(): Accessor; - get setErrors(): Setter; hasError(value: string): boolean; hasErrors(): boolean; pushError(value: string): void; - get method(): Accessor; - get setMethod(): Setter; } //# sourceMappingURL=form.d.ts.map \ No newline at end of file diff --git a/types/form.d.ts.map b/types/form.d.ts.map index 01cb0df..6522cf0 100644 --- a/types/form.d.ts.map +++ b/types/form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAU,MAAM,UAAU,CAAA;AAGjE,qBAAa,cAAe,SAAQ,cAAc;IAE9C,OAAO,CAAC,YAAY,CAAsE;IAC1F,OAAO,CAAC,YAAY,CAA+C;IACnE,OAAO,CAAC,YAAY,CAA8C;;IAgBlE,IAAI,MAAM,IAAI,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAEvC;IAED,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAExC;IAED,IAAI,MAAM,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC,CAE/B;IAED,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAEhC;IAED,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIhC,SAAS,IAAI,OAAO;IAIpB,SAAS,CAAC,KAAK,EAAE,MAAM;IASvB,IAAI,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,CAE7B;IAED,IAAI,SAAS,IAAI,MAAM,CAAC,MAAM,CAAC,CAE9B;CACJ"} \ No newline at end of file +{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,cAAc;IAEvC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IAoBjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIhC,SAAS,IAAI,OAAO;IAIpB,SAAS,CAAC,KAAK,EAAE,MAAM;CAQ1B"} \ No newline at end of file diff --git a/types/item.d.ts b/types/item.d.ts index f4d238f..1d5a66a 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -15,15 +15,24 @@ */ import { Accessor, Setter } from "solid-js"; export declare class FazElementItem extends HTMLElement { - private activeSignal; - private contentSignal; - private disabledSignal; - private extraClassesSignal; - private itemsSignal; - private loadingSignal; - private parentSignal; - private reloadSignal; - private linkSignal; + active: Accessor; + setActive: Setter; + content: Accessor; + setContent: Setter; + disabled: Accessor; + setDisabled: Setter; + extraClasses: Accessor; + setExtraClasses: Setter; + items: Accessor; + setItems: Setter; + loading: Accessor; + setLoading: Setter; + parent: Accessor; + setParent: Setter; + reload: Accessor; + setReload: Setter; + link: Accessor; + setLink: Setter; childPrefix: string; private connected; debug: boolean; @@ -32,24 +41,6 @@ export declare class FazElementItem extends HTMLElement { private comment; source: any; constructor(); - get active(): Accessor; - get setActive(): Setter; - get content(): Accessor; - get setContent(): Setter; - get disabled(): Accessor; - get setDisabled(): Setter; - get extraClasses(): Accessor; - get setExtraClasses(): Setter; - get items(): Accessor; - get setItems(): Setter; - get loading(): Accessor; - get setLoading(): Setter; - get parent(): Accessor; - get setParent(): Setter; - get reload(): Accessor; - get setReload(): Setter; - get link(): Accessor; - get setLink(): Setter; hasExtraClass(value: string): boolean; hasExtraClasses(): boolean; pushExtraClass(value: string): void; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index 81711c9..f980e56 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAU,MAAM,UAAU,CAAA;AAOjE,qBAAa,cAAe,SAAQ,WAAW;IAE3C,OAAO,CAAC,YAAY,CAAgD;IACpE,OAAO,CAAC,aAAa,CAAsE;IAC3F,OAAO,CAAC,cAAc,CAAgD;IACtE,OAAO,CAAC,kBAAkB,CAA2C;IACrE,OAAO,CAAC,WAAW,CAA+D;IAClF,OAAO,CAAC,aAAa,CAA+C;IACpE,OAAO,CAAC,YAAY,CAAsF;IAC1G,OAAO,CAAC,YAAY,CAAgD;IACpE,OAAO,CAAC,UAAU,CAAsE;IAEjF,WAAW,EAAE,MAAM,CAAK;IAC/B,OAAO,CAAC,SAAS,CAAiB;IAC3B,KAAK,EAAE,OAAO,CAAQ;IACtB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAO;IAC7C,OAAO,CAAC,gBAAgB,CAAa;IACrC,OAAO,CAAC,OAAO,CAAuB;IAC/B,MAAM,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EJ,IAAI;IAEJ,MAAM;IAYN,WAAW;CAQd"} \ No newline at end of file From 2c274a99a8a50bd94c5b4191625ff2bd4c33c5d8 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 20:12:16 -0400 Subject: [PATCH 053/199] build(relase): deliver 0.1.23 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4e9970..c701eec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.22", + "version": "0.1.23", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 0dd4cba456eb070e21378a4c3a82da04adc42e9c Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 21:10:57 -0400 Subject: [PATCH 054/199] feat: changed contentChild to contentChildren That will return an array or ChildNode so we can place the same content in diferent places. Fixes: #152 --- src/item.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/item.ts b/src/item.ts index 7e38f1b..ee1a029 100644 --- a/src/item.ts +++ b/src/item.ts @@ -169,8 +169,12 @@ export class FazElementItem extends HTMLElement { return this.childPrefix.concat("-", this.id); } - get contentChild(): ChildNode | null { - return this.firstChild; + get contentChildren(): ChildNode[] { + const children:ChildNode[] = [] + if (this.firstChild != null) { + children.push(this.firstChild) + } + return children; } get linkIsVoid() { @@ -183,7 +187,9 @@ export class FazElementItem extends HTMLElement { } addChild(node: T): T { - this.contentChild?.appendChild(node); + this.contentChildren.forEach(child => { + child.appendChild(node); + }); return node; } From 170cbcaa9dd82c1146aabd5458e75bb6cd58872d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 21:15:39 -0400 Subject: [PATCH 055/199] build(release): deliver 0.1.24 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c701eec..0eee40e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.23", + "version": "0.1.24", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From b201a6fffe20bfd8457cd3034a418e5e7195411e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 21:16:45 -0400 Subject: [PATCH 056/199] chore: update item types Refs: #152 --- types/item.d.ts | 2 +- types/item.d.ts.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/item.d.ts b/types/item.d.ts index 1d5a66a..b30c84c 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -49,7 +49,7 @@ export declare class FazElementItem extends HTMLElement { removeItem(item: FazElementItem): void; get activeItems(): FazElementItem[]; get childId(): string; - get contentChild(): ChildNode | null; + get contentChildren(): ChildNode[]; get linkIsVoid(): boolean; addChild(node: T): T; afterShow(): void; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index f980e56..fd8fdca 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAO1D,qBAAa,cAAe,SAAQ,WAAW;IAEpC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC,M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O,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAElC,WAAW,EAAE,MAAM,CAAM;IAChC,OAAO,CAAC,SAAS,CAAkB;IAC5B,KAAK,EAAE,OAAO,CAAS;IACvB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAQ;IAC9C,OAAO,CAAC,gBAAgB,CAAc;IACtC,OAAO,CAAC,OAAO,CAAwB;IAChC,MAAM,EAAE,GAAG,CAAC;;IAgEnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAC,SAAS;IAU/B,OAAO,CAAC,IAAI,EAAE,cAAc;IAQ5B,UAAU,CAAC,IAAI,EAAE,cAAc;IAO/B,IAAI,WAAW,IAAI,cAAc,EAAE,CAIlC;IAGD,IAAI,OAAO,WAEV;IAED,IAAI,eAAe,IAAI,SAAS,EAAE,CAMjC;IAED,IAAI,UAAU,YAOb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAOpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IASjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAYN,WAAW;CAQd"} \ No newline at end of file From 571de9e549a0c4c9b8c81421f31ac7fbd6e4c9e3 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 21:32:39 -0400 Subject: [PATCH 057/199] refactor: revert contentChildren to contentChild Refs: #152 --- src/item.ts | 12 +++--------- types/item.d.ts | 2 +- types/item.d.ts.map | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/item.ts b/src/item.ts index ee1a029..9bb2f94 100644 --- a/src/item.ts +++ b/src/item.ts @@ -169,12 +169,8 @@ export class FazElementItem extends HTMLElement { return this.childPrefix.concat("-", this.id); } - get contentChildren(): ChildNode[] { - const children:ChildNode[] = [] - if (this.firstChild != null) { - children.push(this.firstChild) - } - return children; + get contentChild(): ChildNode|null { + return this.firstChild; } get linkIsVoid() { @@ -187,9 +183,7 @@ export class FazElementItem extends HTMLElement { } addChild(node: T): T { - this.contentChildren.forEach(child => { - child.appendChild(node); - }); + this.contentChild?.appendChild(node); return node; } diff --git a/types/item.d.ts b/types/item.d.ts index b30c84c..1d5a66a 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -49,7 +49,7 @@ export declare class FazElementItem extends HTMLElement { removeItem(item: FazElementItem): void; get activeItems(): FazElementItem[]; get childId(): string; - get contentChildren(): ChildNode[]; + get contentChild(): ChildNode | null; get linkIsVoid(): boolean; addChild(node: T): T; afterShow(): void; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index fd8fdca..8c9c190 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAO1D,qBAAa,cAAe,SAAQ,WAAW;IAEpC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,YA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,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAElC,WAAW,EAAE,MAAM,CAAM;IAChC,OAAO,CAAC,SAAS,CAAkB;IAC5B,KAAK,EAAE,OAAO,CAAS;IACvB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAQ;IAC9C,OAAO,CAAC,gBAAgB,CAAc;IACtC,OAAO,CAAC,OAAO,CAAwB;IAChC,MAAM,EAAE,GAAG,CAAC;;IAgEnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAC,SAAS;IAU/B,OAAO,CAAC,IAAI,EAAE,cAAc;IAQ5B,UAAU,CAAC,IAAI,EAAE,cAAc;IAO/B,IAAI,WAAW,IAAI,cAAc,EAAE,CAIlC;IAGD,IAAI,OAAO,WAEV;IAED,IAAI,YAAY,IAAI,SAAS,GAAC,IAAI,CAEjC;IAED,IAAI,UAAU,YAOb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IASjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAYN,WAAW;CAQd"} \ No newline at end of file From 64e3ffe252baa5ec2eab01abd455038a8749f0d9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 28 Sep 2024 21:33:32 -0400 Subject: [PATCH 058/199] build(release): deliver 0.1.25 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0eee40e..c6a843a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.24", + "version": "0.1.25", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 352d0ba994170fcc14714cd60f650b5b6fdaa6e7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Oct 2024 18:16:13 -0400 Subject: [PATCH 059/199] feat: remove faz tag by default Refs: #117 --- src/item.ts | 34 ++++++--- src/test.ts | 35 ++++++++++ test/item.test.tsx | 165 +++++++++++++++++++++++--------------------- types/item.d.ts | 13 +++- types/item.d.ts.map | 2 +- types/test.d.ts | 18 +++++ types/test.d.ts.map | 1 + 7 files changed, 177 insertions(+), 91 deletions(-) create mode 100644 src/test.ts create mode 100644 types/test.d.ts create mode 100644 types/test.d.ts.map diff --git a/src/item.ts b/src/item.ts index 9bb2f94..74daaba 100644 --- a/src/item.ts +++ b/src/item.ts @@ -18,21 +18,30 @@ import { randomId } from "./id"; import { toBoolean } from "./values"; import { Accessor, createSignal, Setter } from "solid-js"; +export interface FazComment extends Comment { + fazElement: Accessor ; + setFazElement: Setter ; +} -class FazNode extends Node { - public fazElement: FazElementItem | null = null; +export interface FazNode extends ChildNode { + fazElement: Accessor ; + setFazElement: Setter ; } export class FazElementItem extends HTMLElement { public active: Accessor; public setActive: Setter; + public connected: Accessor; + public setConnected: Setter; public content: Accessor; public setContent: Setter; public disabled: Accessor; public setDisabled: Setter; public extraClasses: Accessor; public setExtraClasses: Setter; + public fazElement: Accessor ; + public setFazElement: Setter ; public items: Accessor; public setItems: Setter; public loading: Accessor; @@ -45,20 +54,21 @@ export class FazElementItem extends HTMLElement { public setLink: Setter; public childPrefix: string = ""; - private connected: boolean = false; public debug: boolean = false; public renderedChild: ChildNode | null = null; private initialOuterHTML: string = ""; - private comment: Comment | null = null; + private comment: FazComment | null = null; public source: any; constructor() { super(); [this.active, this.setActive] = createSignal(false); + [this.connected, this.setConnected] = createSignal(false); [this.content, this.setContent] = createSignal(undefined); [this.disabled, this.setDisabled] = createSignal(false); [this.extraClasses, this.setExtraClasses] = createSignal(""); + [this.fazElement, this.setFazElement] = createSignal(undefined); [this.items, this.setItems] = createSignal([]); [this.loading, this.setLoading] = createSignal(true); [this.parent, this.setParent] = createSignal(undefined); @@ -97,6 +107,7 @@ export class FazElementItem extends HTMLElement { break; } } + this.dataset['faz_element_item'] = this.tagName; this.childPrefix = "__child-prefix__"; if (this.source) { @@ -110,7 +121,8 @@ export class FazElementItem extends HTMLElement { node.remove(); }); } - this.comment = document.createComment(this.nodeName + " " + this.id); + this.comment = (document.createComment(this.nodeName + " " + this.id) as FazComment); + [this.comment.fazElement, this.comment.setFazElement] = createSignal(this); this.before(this.comment); } @@ -133,7 +145,7 @@ export class FazElementItem extends HTMLElement { } } - resolveLink(): string|undefined { + resolveLink(): string | undefined { // From: https://stackoverflow.com/a/66717705/2887989 let voidHref = "#!"; const link = this.link(); @@ -169,7 +181,7 @@ export class FazElementItem extends HTMLElement { return this.childPrefix.concat("-", this.id); } - get contentChild(): ChildNode|null { + get contentChild(): ChildNode | null { return this.firstChild; } @@ -225,7 +237,7 @@ export class FazElementItem extends HTMLElement { setTimeout(()=>resolve(null), 0); }).then(()=> { this.render(); - this.connected = true; + this.setConnected(true); }); } @@ -243,13 +255,15 @@ export class FazElementItem extends HTMLElement { this.placeBackChildren(children); this.afterShow(); this.setLoading(false); + this.cleanFazTag(); } cleanFazTag() { let parentElement = this.parentElement; this.childNodes.forEach((node) => { - ((node as unknown) as FazNode).fazElement = this; - this.before(node); + const fNode = node as FazNode; + [fNode.fazElement, fNode.setFazElement] = createSignal(this); + this.before(fNode); }) parentElement?.removeChild(this); } diff --git a/src/test.ts b/src/test.ts new file mode 100644 index 0000000..cae6e0c --- /dev/null +++ b/src/test.ts @@ -0,0 +1,35 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazComment } from "./item"; + +// SEE: https://stackoverflow.com/a/25388984/2887989 +export function allComments(context: any): FazComment[] { + const commentsFound = []; + const elementPath = [context]; + while (elementPath.length > 0) { + const el = elementPath.pop(); + for (let i = 0; i < el.childNodes.length; i++) { + const node = el.childNodes[i]; + if (node.nodeType === Node.COMMENT_NODE) { + commentsFound.push(node); + } else { + elementPath.push(node); + } + } + } + return commentsFound; +} diff --git a/test/item.test.tsx b/test/item.test.tsx index 6a83d28..e008031 100644 --- a/test/item.test.tsx +++ b/test/item.test.tsx @@ -14,50 +14,53 @@ * limitations under the License. */ -import { FazElementItem } from "../src/item" -import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest" -import { screen, waitFor } from "@testing-library/dom" -import { createEffect, getOwner, runWithOwner } from "solid-js" -import { render } from "solid-js/web" +import { FazElementItem, FazNode } from "../src/item"; +import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest"; +import { waitFor } from "@testing-library/dom"; +import { createEffect, createRoot } from "solid-js"; +import { render} from "solid-js/web"; +import { allComments } from "../src/test"; class TestElement extends FazElementItem { - public doActiveChanged: boolean = false - public doDisabledChanged: boolean = false - public doExtraClassesChanged: boolean = false + public doActiveChanged: boolean = false; + public doDisabledChanged: boolean = false; + public doExtraClassesChanged: boolean = false; constructor() { - super() - createEffect((prevActive) => { - if (this.active() != prevActive) { - this.doActiveChanged = true - } - }, false) + super(); + createRoot(() => { + createEffect((prevActive) => { + if (this.active() != prevActive) { + this.doActiveChanged = true; + } + }, false); - createEffect((prevDisabled) => { - if (this.disabled() != prevDisabled) { - this.doDisabledChanged = true - } - }, false) + createEffect((prevDisabled) => { + if (this.disabled() != prevDisabled) { + this.doDisabledChanged = true; + } + }, false); - createEffect((prevExtraClasses) => { - if (this.extraClasses() != prevExtraClasses) { - this.doExtraClassesChanged = true - } - }, "aclass") + createEffect((prevExtraClasses) => { + if (this.extraClasses() != prevExtraClasses) { + this.doExtraClassesChanged = true; + } + }, "aclass"); + }); } show() { render(() => { - return
    - }, this) + return
    + }, this); } } -customElements.define("faz-test-element", TestElement) +customElements.define("faz-test-element", TestElement); describe("Test Element", () => { - const theText = "A text" + const theText = "A text"; beforeEach(() => { vitest.useFakeTimers(); }); @@ -71,48 +74,49 @@ describe("Test Element", () => { ${theText}
    - ` - const outerElement = screen.queryByTestId( - "outer_element") as TestElement - const innerElement = screen.queryByTestId( - "inner_element") as TestElement - outerElement.setActive(true) - outerElement.setDisabled(true) - expect(outerElement.doActiveChanged).toBeTruthy() - expect(outerElement.doDisabledChanged).toBeTruthy() - expect(outerElement.doExtraClassesChanged).toBeFalsy() - outerElement.setExtraClasses("aclass") - expect(outerElement.doExtraClassesChanged).toBeFalsy() - outerElement.setExtraClasses("aclass bclass") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.setExtraClasses("bclass aclass") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.setExtraClasses("bclass aclass ") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.setExtraClasses(" bclass aclass") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.setExtraClasses(" bclass aclass ") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.setExtraClasses("bclass aclass cclass") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.doExtraClassesChanged = false - outerElement.pushExtraClass("aclass") - outerElement.pushExtraClass("bclass ") - outerElement.pushExtraClass(" cclass") - outerElement.pushExtraClass(" aclass ") - expect(outerElement.doExtraClassesChanged).toBeFalsy() - outerElement.pushExtraClass("eclass") - expect(outerElement.doExtraClassesChanged).toBeTruthy() - outerElement.setActive(false) - outerElement.setDisabled(false) - expect(innerElement.doActiveChanged).toBeFalsy() - expect(innerElement.doDisabledChanged).toBeFalsy() - }) + `; + const comments = allComments(document.body); + const [outerElementComment, innerElementComment] = comments; + const outerElement = outerElementComment.fazElement() as TestElement; + const innerElement = innerElementComment.fazElement() as TestElement; + + outerElement.setActive(true); + outerElement.setDisabled(true); + expect(outerElement.doActiveChanged).toBeTruthy(); + expect(outerElement.doDisabledChanged).toBeTruthy(); + expect(outerElement.doExtraClassesChanged).toBeFalsy(); + outerElement.setExtraClasses("aclass"); + expect(outerElement.doExtraClassesChanged).toBeFalsy(); + outerElement.setExtraClasses("aclass bclass"); + expect(outerElement.doExtraClassesChanged).toBeTruthy(); + outerElement.doExtraClassesChanged = false; + outerElement.setExtraClasses("bclass aclass"); + expect(outerElement.doExtraClassesChanged).toBeTruthy(); + outerElement.doExtraClassesChanged = false; + outerElement.setExtraClasses("bclass aclass "); + expect(outerElement.doExtraClassesChanged).toBeTruthy(); + outerElement.doExtraClassesChanged = false; + outerElement.setExtraClasses(" bclass aclass"); + expect(outerElement.doExtraClassesChanged).toBeTruthy(); + outerElement.doExtraClassesChanged = false; + outerElement.setExtraClasses(" bclass aclass "); + expect(outerElement.doExtraClassesChanged).toBeTruthy(); + outerElement.doExtraClassesChanged = false; + outerElement.setExtraClasses("bclass aclass cclass"); + expect(outerElement.doExtraClassesChanged).toBeTruthy(); + outerElement.doExtraClassesChanged = false; + outerElement.pushExtraClass("aclass"); + outerElement.pushExtraClass("bclass "); + outerElement.pushExtraClass(" cclass"); + outerElement.pushExtraClass(" aclass "); + expect(outerElement.doExtraClassesChanged).toBeFalsy(); + outerElement.pushExtraClass("eclass"); + expect(outerElement.doExtraClassesChanged).toBeTruthy(); + outerElement.setActive(false); + outerElement.setDisabled(false); + expect(innerElement.doActiveChanged).toBeFalsy(); + expect(innerElement.doDisabledChanged).toBeFalsy(); + }); test("Tag rendered", async () => { document.body.innerHTML = ` @@ -121,14 +125,17 @@ describe("Test Element", () => { ${theText}
    - ` - vitest.runAllTimers() + `; + vitest.runAllTimers(); await waitFor(() => { - const outerElement = screen.getByTestId("outer_element") as FazElementItem - const innerElement = screen.getByTestId("inner_element") as FazElementItem - expect(outerElement.items().length).toBe(1); - expect(innerElement.parent()).toBe(outerElement); - expect(screen.queryByTestId("rendered_div_outer")?.tagName).toBe("DIV"); + const outerDiv = document.getElementById("faz_test_outer") as unknown as FazNode; + const innerDiv = document.getElementById("faz_test_inner") as unknown as FazNode; + const outerElement = outerDiv.fazElement(); + const innerElement = innerDiv.fazElement(); + expect(outerElement?.items().length).toBe(1); + expect(outerElement?.items()[0]).toBe(innerElement); + expect(innerElement?.parent()).toBe(outerElement); + expect((outerDiv as unknown as Element).tagName).toBe("DIV"); }); - }) -}) + }); +}); diff --git a/types/item.d.ts b/types/item.d.ts index 1d5a66a..f16d57e 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -14,15 +14,27 @@ * limitations under the License. */ import { Accessor, Setter } from "solid-js"; +export interface FazComment extends Comment { + fazElement: Accessor; + setFazElement: Setter; +} +export interface FazNode extends ChildNode { + fazElement: Accessor; + setFazElement: Setter; +} export declare class FazElementItem extends HTMLElement { active: Accessor; setActive: Setter; + connected: Accessor; + setConnected: Setter; content: Accessor; setContent: Setter; disabled: Accessor; setDisabled: Setter; extraClasses: Accessor; setExtraClasses: Setter; + fazElement: Accessor; + setFazElement: Setter; items: Accessor; setItems: Setter; loading: Accessor; @@ -34,7 +46,6 @@ export declare class FazElementItem extends HTMLElement { link: Accessor; setLink: Setter; childPrefix: string; - private connected; debug: boolean; renderedChild: ChildNode | null; private initialOuterHTML; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index 8c9c190..c848fa3 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item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,MAAM,GAAC,SAAS,CAAC,CAAC;IAElC,WAAW,EAAE,MAAM,CAAM;IACzB,KAAK,EAAE,OAAO,CAAS;IACvB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAQ;IAC9C,OAAO,CAAC,gBAAgB,CAAc;IACtC,OAAO,CAAC,OAAO,CAA2B;IACnC,MAAM,EAAE,GAAG,CAAC;;IAoEnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAG,SAAS;IAUjC,OAAO,CAAC,IAAI,EAAE,cAAc;IAQ5B,UAAU,CAAC,IAAI,EAAE,cAAc;IAO/B,IAAI,WAAW,IAAI,cAAc,EAAE,CAIlC;IAGD,IAAI,OAAO,WAEV;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAOb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IASjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAaN,WAAW;CASd"} \ No newline at end of file diff --git a/types/test.d.ts b/types/test.d.ts new file mode 100644 index 0000000..b3a24b0 --- /dev/null +++ b/types/test.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FazComment } from "./item"; +export declare function allComments(context: any): FazComment[]; +//# sourceMappingURL=test.d.ts.map \ No newline at end of file diff --git a/types/test.d.ts.map b/types/test.d.ts.map new file mode 100644 index 0000000..1e4ea84 --- /dev/null +++ b/types/test.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU,EAAE,CAetD"} \ No newline at end of file From d90341d17eec8affa867d0df06861cf56b162ad7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Oct 2024 18:24:52 -0400 Subject: [PATCH 060/199] refactor: change debug attribute to signal Fixes: #118 --- entryPoints.mjs | 1 + src/item.ts | 7 ++++++- types/item.d.ts | 3 ++- types/item.d.ts.map | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/entryPoints.mjs b/entryPoints.mjs index 486ea3f..091ad6c 100644 --- a/entryPoints.mjs +++ b/entryPoints.mjs @@ -19,4 +19,5 @@ export const entryPoints = [ { out: "id", in: "src/id.ts" }, { out: "index", in: "src/index.ts" }, { out: "item", in: "src/item.ts" }, + { out: "test", in: "src/test.ts" }, ]; diff --git a/src/item.ts b/src/item.ts index 74daaba..7b5248a 100644 --- a/src/item.ts +++ b/src/item.ts @@ -36,6 +36,8 @@ export class FazElementItem extends HTMLElement { public setConnected: Setter; public content: Accessor; public setContent: Setter; + public debug: Accessor; + public setDebug: Setter; public disabled: Accessor; public setDisabled: Setter; public extraClasses: Accessor; @@ -54,7 +56,6 @@ export class FazElementItem extends HTMLElement { public setLink: Setter; public childPrefix: string = ""; - public debug: boolean = false; public renderedChild: ChildNode | null = null; private initialOuterHTML: string = ""; private comment: FazComment | null = null; @@ -66,6 +67,7 @@ export class FazElementItem extends HTMLElement { [this.active, this.setActive] = createSignal(false); [this.connected, this.setConnected] = createSignal(false); [this.content, this.setContent] = createSignal(undefined); + [this.debug, this.setDebug] = createSignal(false); [this.disabled, this.setDisabled] = createSignal(false); [this.extraClasses, this.setExtraClasses] = createSignal(""); [this.fazElement, this.setFazElement] = createSignal(undefined); @@ -93,6 +95,9 @@ export class FazElementItem extends HTMLElement { case "content": this.setContent(attribute.value); break; + case "debug": + this.setDebug(toBoolean(attribute.value)); + break; case "disabled": this.setDisabled(toBoolean(attribute.value)); break; diff --git a/types/item.d.ts b/types/item.d.ts index f16d57e..b2f63b1 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -29,6 +29,8 @@ export declare class FazElementItem extends HTMLElement { setConnected: Setter; content: Accessor; setContent: Setter; + debug: Accessor; + setDebug: Setter; disabled: Accessor; setDisabled: Setter; extraClasses: Accessor; @@ -46,7 +48,6 @@ export declare class FazElementItem extends HTMLElement { link: Accessor; setLink: Setter; childPrefix: string; - debug: boolean; renderedChild: ChildNode | null; private initialOuterHTML; private comment; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index c848fa3..c9e462c 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;IAClD,aAAa,EAAE,MAAM,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAAU,EAAE,QAAQ,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;IAClD,aAAa,EAAE,MAAM,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;CACtD;AAED,qB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IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAElC,WAAW,EAAE,MAAM,CAAM;IACzB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAQ;IAC9C,OAAO,CAAC,gBAAgB,CAAc;IACtC,OAAO,CAAC,OAAO,CAA2B;IACnC,MAAM,EAAE,GAAG,CAAC;;IAwEnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAG,SAAS;IAUjC,OAAO,CAAC,IAAI,EAAE,cAAc;IAQ5B,UAAU,CAAC,IAAI,EAAE,cAAc;IAO/B,IAAI,WAAW,IAAI,cAAc,EAAE,CAIlC;IAGD,IAAI,OAAO,WAEV;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAOb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IASjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAaN,WAAW;CASd"} \ No newline at end of file From 60dfaa10de0e925825b1af6ad0d7c3c737e766dd Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Oct 2024 18:26:48 -0400 Subject: [PATCH 061/199] build(release): deliver 0.1.26 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6a843a..d25dbc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.25", + "version": "0.1.26", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From 878a380f56d5ab7149ce6d07d4a5e546d4327ae9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 22:13:15 -0400 Subject: [PATCH 062/199] build(deps): bump solid-js to 1.9.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d25dbc7..4b250d6 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ], "dependencies": { "less": "4.2.0", - "solid-js": "1.8.17" + "solid-js": "1.9.2" }, "devDependencies": { "@codemirror/lang-html": "6.4.5", From 57be9e47583b32a836d9db4b82de412a3e86e1a4 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 22:14:43 -0400 Subject: [PATCH 063/199] build(deps): bump typescript to 5.6.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b250d6..9303e5c 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "jsdom": "25.0.1", "prettier": "3.3.3", "ts-node": "10.9.2", - "typescript": "5.6.2", + "typescript": "5.6.3", "vite": "5.4.8", "vite-plugin-solid": "2.10.2", "vitest": "2.1.1" From 21b14b82c98e8d1ff36753c9a3a2d32a960d2981 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 22:16:53 -0400 Subject: [PATCH 064/199] build(deps): bump @types/node to 22.7.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9303e5c..3463366 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.5.0", "@types/jest": "29.5.13", - "@types/node": "22.7.0", + "@types/node": "22.7.5", "can-stache-loader": "3.0.0", "esbuild": "0.24.0", "esbuild-plugin-copy": "2.1.1", From 58016ebbd5592ba7aff9142e2482326acbe485fc Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 22:19:21 -0400 Subject: [PATCH 065/199] build(deps): bump vitest to 2.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3463366..32c8c88 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "typescript": "5.6.3", "vite": "5.4.8", "vite-plugin-solid": "2.10.2", - "vitest": "2.1.1" + "vitest": "2.1.2" }, "scripts": { "watch": "node watch.mjs", From eadffba6a8c0ba3c181adb49b6c70f13aea840b6 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 22:54:19 -0400 Subject: [PATCH 066/199] fix: force after show to run just once Fixes: #119 --- src/item.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/item.ts b/src/item.ts index 7b5248a..c13255f 100644 --- a/src/item.ts +++ b/src/item.ts @@ -258,18 +258,22 @@ export class FazElementItem extends HTMLElement { this.show(); } this.placeBackChildren(children); - this.afterShow(); this.setLoading(false); this.cleanFazTag(); + if (!this.loading()) { + this.afterShow(); + } } - cleanFazTag() { - let parentElement = this.parentElement; + cleanFazTag(): void { this.childNodes.forEach((node) => { const fNode = node as FazNode; [fNode.fazElement, fNode.setFazElement] = createSignal(this); this.before(fNode); }) - parentElement?.removeChild(this); + if (this.parent()) { + this.parent()?.appendChild(this); + return; + } } } From 5853bc0a630f27beff013f55e0d65cb0ccd22446 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 22:55:45 -0400 Subject: [PATCH 067/199] build(release): deliver 0.1.27 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 32c8c88..9d857de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.26", + "version": "0.1.27", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From f428b0b52cb7050d5ba7fa2d73ccee7aff054c10 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 23:38:38 -0400 Subject: [PATCH 068/199] fix: all render methods will run only when the item is loading This will prevent other methods(i.e. afterShow) to be executed more than once due to the component be moved from one place to another. Fixes: #121 --- src/item.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/item.ts b/src/item.ts index c13255f..c31e38d 100644 --- a/src/item.ts +++ b/src/item.ts @@ -241,8 +241,11 @@ export class FazElementItem extends HTMLElement { new Promise((resolve) => { setTimeout(()=>resolve(null), 0); }).then(()=> { - this.render(); + if (this.loading()) { + this.render(); + } this.setConnected(true); + this.setLoading(false); }); } @@ -254,15 +257,10 @@ export class FazElementItem extends HTMLElement { this.load(); this.beforeShow(); const children = this.collectChildren(); - if (this.loading()) { - this.show(); - } + this.show(); this.placeBackChildren(children); - this.setLoading(false); this.cleanFazTag(); - if (!this.loading()) { - this.afterShow(); - } + this.afterShow(); } cleanFazTag(): void { From 14c614260b236edba86b73b5803ec515a8cbcc10 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 23:40:45 -0400 Subject: [PATCH 069/199] build(release): deliver 0.1.28 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d857de..a342a2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.27", + "version": "0.1.28", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/esm/index.js", From f26343cb13041bc225db558c2a04899dbb39392e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Oct 2024 23:41:51 -0400 Subject: [PATCH 070/199] chore: update item type map Refs: #121 --- types/item.d.ts.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/item.d.ts.map b/types/item.d.ts.map index c9e462c..7ede7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D,IAAI,OAAO,WAEV;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAOb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAYjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAUN,WAAW,IAAI,IAAI;CAWtB"} \ No newline at end of file From 8265f6b3d1baa32806732ce1b2834f2372c69b4a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 14 Oct 2024 22:22:51 -0400 Subject: [PATCH 071/199] build(deps): bump vite to 5.4.9 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a342a2a..fa17d52 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.28", "description": "JS HTML Web Components", "main": "./dist/index.js", - "module": "./dist/esm/index.js", + "module": "./dist/js/index.js", "mainFields": [ "module", "main" @@ -52,7 +52,7 @@ "prettier": "3.3.3", "ts-node": "10.9.2", "typescript": "5.6.3", - "vite": "5.4.8", + "vite": "5.4.9", "vite-plugin-solid": "2.10.2", "vitest": "2.1.2" }, From 047d4288a596ebf319dc0929cc3b8b3fbdcfcd21 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 14 Oct 2024 22:23:31 -0400 Subject: [PATCH 072/199] build(deps): bump vitest to 2.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa17d52..da9676f 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "typescript": "5.6.3", "vite": "5.4.9", "vite-plugin-solid": "2.10.2", - "vitest": "2.1.2" + "vitest": "2.1.3" }, "scripts": { "watch": "node watch.mjs", From 5f20d023b3be53d87ca48d98d32106577d372bb2 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 15 Oct 2024 15:21:46 -0400 Subject: [PATCH 073/199] refactor: rename items to fazChild property in FazElementItem Fixes: #120 --- build.mjs | 2 +- src/item.ts | 47 +++++++++++++++++---------------------------- test/item.test.tsx | 4 ++-- types/item.d.ts | 11 +++++------ types/item.d.ts.map | 2 +- 5 files changed, 27 insertions(+), 39 deletions(-) diff --git a/build.mjs b/build.mjs index 3563740..ccee943 100644 --- a/build.mjs +++ b/build.mjs @@ -31,7 +31,7 @@ await esbuild.build({ format: "esm", define: { gobal: "window" }, target: ["esnext"], - outdir: "dist/esm", + outdir: "dist/js", logLevel: "info", legalComments: "none", // outExtension: { '.js': '.cjs' }, diff --git a/src/item.ts b/src/item.ts index c31e38d..f54658c 100644 --- a/src/item.ts +++ b/src/item.ts @@ -44,8 +44,8 @@ export class FazElementItem extends HTMLElement { public setExtraClasses: Setter; public fazElement: Accessor ; public setFazElement: Setter ; - public items: Accessor; - public setItems: Setter; + public fazChildren: Accessor; + public setFazChildren: Setter; public loading: Accessor; public setLoading: Setter; public parent: Accessor; @@ -71,7 +71,7 @@ export class FazElementItem extends HTMLElement { [this.disabled, this.setDisabled] = createSignal(false); [this.extraClasses, this.setExtraClasses] = createSignal(""); [this.fazElement, this.setFazElement] = createSignal(undefined); - [this.items, this.setItems] = createSignal([]); + [this.fazChildren, this.setFazChildren] = createSignal([]); [this.loading, this.setLoading] = createSignal(true); [this.parent, this.setParent] = createSignal(undefined); [this.reload, this.setReload] = createSignal(true); @@ -116,12 +116,7 @@ export class FazElementItem extends HTMLElement { this.dataset['faz_element_item'] = this.tagName; this.childPrefix = "__child-prefix__"; if (this.source) { - console.debug( - "The element" + - this.id + - " has a source " + - "attribute. All child nodes will be removed." - ); + console.debug(`The element ${this.id} has a source attribute. All child nodes will be removed.`); this.childNodes.forEach((node) => { node.remove(); }); @@ -160,32 +155,27 @@ export class FazElementItem extends HTMLElement { return this.link(); } - addItem(item: FazElementItem) { - if (this.items().indexOf(item) === -1) { - const items = {...this.items()} as FazElementItem[]; - items.push(item); - this.setItems(items); + addFazChild(child: FazElementItem) { + if (this.fazChildren().indexOf(child) === -1) { + const children = {...this.fazChildren()} as FazElementItem[]; + children.push(child); + this.setFazChildren(children); } } - removeItem(item: FazElementItem) { - if (this.items().indexOf(item) !== -1) { - const items = {...this.items()} as FazElementItem[]; - this.setItems(items.filter(i => i !== item)); + removeFazChild(child: FazElementItem) { + if (this.fazChildren().indexOf(child) !== -1) { + const children = {...this.fazChildren()} as FazElementItem[]; + this.setFazChildren(children.filter(i => i !== child)); } } - get activeItems(): FazElementItem[] { - return this.items().filter(item => { - return item.active(); + get activeFazChildren(): FazElementItem[] { + return this.fazChildren().filter(child => { + return child.active(); }) } - - get childId() { - return this.childPrefix.concat("-", this.id); - } - get contentChild(): ChildNode | null { return this.firstChild; } @@ -195,8 +185,7 @@ export class FazElementItem extends HTMLElement { return true; } const linkResolved = this.resolveLink(); - return linkResolved === undefined || linkResolved === "" || - linkResolved === "#" || linkResolved === "#!"; + return linkResolved === undefined || linkResolved === "" || linkResolved === "#" || linkResolved === "#!"; } addChild(node: T): T { @@ -223,7 +212,7 @@ export class FazElementItem extends HTMLElement { this.removeChild(this.firstChild); } if (items.length > 0) { - this.setItems(items); + this.setFazChildren(items); } } return children; diff --git a/test/item.test.tsx b/test/item.test.tsx index e008031..2b3f2c1 100644 --- a/test/item.test.tsx +++ b/test/item.test.tsx @@ -132,8 +132,8 @@ describe("Test Element", () => { const innerDiv = document.getElementById("faz_test_inner") as unknown as FazNode; const outerElement = outerDiv.fazElement(); const innerElement = innerDiv.fazElement(); - expect(outerElement?.items().length).toBe(1); - expect(outerElement?.items()[0]).toBe(innerElement); + expect(outerElement?.fazChildren().length).toBe(1); + expect(outerElement?.fazChildren()[0]).toBe(innerElement); expect(innerElement?.parent()).toBe(outerElement); expect((outerDiv as unknown as Element).tagName).toBe("DIV"); }); diff --git a/types/item.d.ts b/types/item.d.ts index b2f63b1..96fe7b6 100644 --- a/types/item.d.ts +++ b/types/item.d.ts @@ -37,8 +37,8 @@ export declare class FazElementItem extends HTMLElement { setExtraClasses: Setter; fazElement: Accessor; setFazElement: Setter; - items: Accessor; - setItems: Setter; + fazChildren: Accessor; + setFazChildren: Setter; loading: Accessor; setLoading: Setter; parent: Accessor; @@ -57,10 +57,9 @@ export declare class FazElementItem extends HTMLElement { hasExtraClasses(): boolean; pushExtraClass(value: string): void; resolveLink(): string | undefined; - addItem(item: FazElementItem): void; - removeItem(item: FazElementItem): void; - get activeItems(): FazElementItem[]; - get childId(): string; + addFazChild(child: FazElementItem): void; + removeFazChild(child: FazElementItem): void; + get activeFazChildren(): FazElementItem[]; get contentChild(): ChildNode | null; get linkIsVoid(): boolean; addChild(node: T): T; diff --git a/types/item.d.ts.map b/types/item.d.ts.map index 7ede7f4..9a1033c 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;IAClD,aAAa,EAAE,MAAM,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAAU,EAAE,QAAQ,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;IAClD,aAAa,EAAE,MAAM,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;CACtD;AAED,qBAAa,cAAe,SAAQ,WAAW;IAEpC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,S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;IAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAElC,WAAW,EAAE,MAAM,CAAM;IACzB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAQ;IAC9C,OAAO,CAAC,gBAAgB,CAAc;IACtC,OAAO,CAAC,OAAO,CAA2B;IACnC,MAAM,EAAE,GAAG,CAAC;;IAmEnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAG,SAAS;IAUjC,WAAW,CAAC,KAAK,EAAE,cAAc;IAQjC,cAAc,CAAC,KAAK,EAAE,cAAc;IAOpC,IAAI,iBAAiB,IAAI,cAAc,EAAE,CAIxC;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAMb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAYjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAUN,WAAW,IAAI,IAAI;CAWtB"} \ No newline at end of file From 41212e004dc4f6d94e8dd6af59b74d6b58267c70 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 15 Oct 2024 15:32:03 -0400 Subject: [PATCH 074/199] build(release): deliver 0.1.29 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da9676f..8f1ef6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.28", + "version": "0.1.29", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From f63b05278a3fd4d43062fcade230dc9da4851b1e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 29 Nov 2024 09:21:18 -0500 Subject: [PATCH 075/199] build(deps): bump solid-js to 1.9.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f1ef6b..1fc8dd2 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ], "dependencies": { "less": "4.2.0", - "solid-js": "1.9.2" + "solid-js": "1.9.3" }, "devDependencies": { "@codemirror/lang-html": "6.4.5", From f9b20e5cd378af4c602e10b8c5577e9e0f6cc911 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 29 Nov 2024 09:21:52 -0500 Subject: [PATCH 076/199] build(deps): remove codemirror by now --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 1fc8dd2..7c5608c 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,6 @@ "solid-js": "1.9.3" }, "devDependencies": { - "@codemirror/lang-html": "6.4.5", - "@codemirror/language": "6.8.0", - "@codemirror/view": "6.16.0", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.5.0", "@types/jest": "29.5.13", From f2e003c468e9b711085eb657e1da48fbe677ba60 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 29 Nov 2024 09:23:54 -0500 Subject: [PATCH 077/199] build(deps): bump prettier to 3.4.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7c5608c..3d5f6d4 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", "jsdom": "25.0.1", - "prettier": "3.3.3", + "prettier": "3.4.1", "ts-node": "10.9.2", "typescript": "5.6.3", "vite": "5.4.9", From fbcba59462fde13a817cac98ab7223b5849aaa48 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 29 Nov 2024 09:24:48 -0500 Subject: [PATCH 078/199] build(deps): bump typescript to 5.7.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d5f6d4..9a849fa 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "jsdom": "25.0.1", "prettier": "3.4.1", "ts-node": "10.9.2", - "typescript": "5.6.3", + "typescript": "5.7.2", "vite": "5.4.9", "vite-plugin-solid": "2.10.2", "vitest": "2.1.3" From da3f0ab32aa0be7b170cc225cf5e3df25f087c70 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 29 Nov 2024 09:25:50 -0500 Subject: [PATCH 079/199] build(deps): bump vite to 6.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9a849fa..4b490e3 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "prettier": "3.4.1", "ts-node": "10.9.2", "typescript": "5.7.2", - "vite": "5.4.9", + "vite": "6.0.1", "vite-plugin-solid": "2.10.2", "vitest": "2.1.3" }, From 6e4fd0b009c94c826a095adb4fa04f8ff2744e79 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 29 Nov 2024 09:33:17 -0500 Subject: [PATCH 080/199] refactor(global): remove codemirror from global Fixes: #125 --- src/app/global.ts | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/app/global.ts b/src/app/global.ts index 9d5bc61..71378fa 100644 --- a/src/app/global.ts +++ b/src/app/global.ts @@ -13,48 +13,3 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { EditorView } from "@codemirror/view" -import { - syntaxHighlighting, defaultHighlightStyle -} from "@codemirror/language" -import { html } from "@codemirror/lang-html" - -declare global { - interface Window { - codemirrorit: (id:string) => void - } -} - -// TODO: Apply this theme https://palettes.shecodes.io/palettes/1313 -window.codemirrorit = function (id:string) { - let referenceNode = document.getElementById(id) || document.body - - let theme = EditorView.theme({ - "&": { - color: "#ececec", - backgroundColor: "#142d4c" - }, - ".cm-content": { - caretColor: "#ececec" - }, - "&.cm-focused .cm-cursor": { - borderLeftColor: "#ececec" - }, - "&.cm-focused .cm-selectionBackground, ::selection": { - backgroundColor: "#074" - }, - ".cm-gutters": { - backgroundColor: "#045", - color: "#ddd", - border: "none" - } - }, { dark: true }) - - new EditorView({ - doc: referenceNode.innerHTML, - extensions: [ - html(),theme, syntaxHighlighting(defaultHighlightStyle) - ], - parent: referenceNode, - }) -} From f9a03bb59b9b98ba159bb5941b6819a99e3d829b Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 29 Nov 2024 09:36:35 -0500 Subject: [PATCH 081/199] refactor(global): update types after removal of codemirror Refs: #125 --- types/app/global.d.ts | 21 +++++++++++++++------ types/app/global.d.ts.map | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/types/app/global.d.ts b/types/app/global.d.ts index d419b9f..e14953e 100644 --- a/types/app/global.d.ts +++ b/types/app/global.d.ts @@ -1,7 +1,16 @@ -declare global { - interface Window { - codemirrorit: (id: string) => void; - } -} -export {}; +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ //# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/types/app/global.d.ts.map b/types/app/global.d.ts.map index 983d797..cf9979a 100644 --- a/types/app/global.d.ts.map +++ b/types/app/global.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/app/global.ts"],"names":[],"mappings":"AAqBA,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,YAAY,EAAE,CAAC,EAAE,EAAC,MAAM,KAAK,IAAI,CAAA;KACpC;CACJ"} \ No newline at end of file +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/app/global.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file From 8e5c390e29a38b4e240185a7d162bc56b9d05b5d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:14:13 -0500 Subject: [PATCH 082/199] build(deps): bump prettier to 3.4.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b490e3..08c7fab 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", "jsdom": "25.0.1", - "prettier": "3.4.1", + "prettier": "3.4.2", "ts-node": "10.9.2", "typescript": "5.7.2", "vite": "6.0.1", From 649b660103282c10658ed45ccb389ab226bd2949 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:15:35 -0500 Subject: [PATCH 083/199] build(deps): bump esbuild 0.24.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08c7fab..30b8c01 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@types/jest": "29.5.13", "@types/node": "22.7.5", "can-stache-loader": "3.0.0", - "esbuild": "0.24.0", + "esbuild": "0.24.2", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", From f6915cdc17c2f0a64eefbfe00fdcee9d781dad68 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:17:05 -0500 Subject: [PATCH 084/199] build(deps): bump vite to 6.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 30b8c01..66bd0f6 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "prettier": "3.4.2", "ts-node": "10.9.2", "typescript": "5.7.2", - "vite": "6.0.1", + "vite": "6.0.5", "vite-plugin-solid": "2.10.2", "vitest": "2.1.3" }, From 06d4f7f1080fa6203c2f093ab61b79311427b3cb Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:18:53 -0500 Subject: [PATCH 085/199] build(deps): bump testing-library/jest-dom to 6.6.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66bd0f6..9d2faa7 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@testing-library/dom": "10.4.0", - "@testing-library/jest-dom": "6.5.0", + "@testing-library/jest-dom": "6.6.3", "@types/jest": "29.5.13", "@types/node": "22.7.5", "can-stache-loader": "3.0.0", From ae7aeb43140cab6331a2ec04bc3676fd61684252 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:19:50 -0500 Subject: [PATCH 086/199] build(deps): bump types/jest to 29.5.14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d2faa7..951837f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", - "@types/jest": "29.5.13", + "@types/jest": "29.5.14", "@types/node": "22.7.5", "can-stache-loader": "3.0.0", "esbuild": "0.24.2", From dfa4f43e0aac00933491b62542d7d8583cf84ee8 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:20:44 -0500 Subject: [PATCH 087/199] build(deps): bump types/node to 22.10.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 951837f..d3afc15 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@types/jest": "29.5.14", - "@types/node": "22.7.5", + "@types/node": "22.10.2", "can-stache-loader": "3.0.0", "esbuild": "0.24.2", "esbuild-plugin-copy": "2.1.1", From f61ab297f111dc36b317cb4b65744eb72e294b9b Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:23:16 -0500 Subject: [PATCH 088/199] build(deps): bump vite-plugin-solid to 2.11.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d3afc15..efd06bc 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "ts-node": "10.9.2", "typescript": "5.7.2", "vite": "6.0.5", - "vite-plugin-solid": "2.10.2", + "vite-plugin-solid": "2.11.0", "vitest": "2.1.3" }, "scripts": { From e3aecc18a0c66ae67031235a019b16cc99e35450 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:23:54 -0500 Subject: [PATCH 089/199] build(deps): bump vitest to 2.1.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index efd06bc..ee58578 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "typescript": "5.7.2", "vite": "6.0.5", "vite-plugin-solid": "2.11.0", - "vitest": "2.1.3" + "vitest": "2.1.8" }, "scripts": { "watch": "node watch.mjs", From 1f1df7a2b671ae037b7e1f3af128277ab9611f46 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Dec 2024 23:25:41 -0500 Subject: [PATCH 090/199] build(release): deliver 0.1.30 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ee58578..597d482 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.29", + "version": "0.1.30", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From 83270512b9104695cb55eebf7f78c94142e596fb Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 29 Dec 2024 21:08:09 -0500 Subject: [PATCH 091/199] fix: remove faz tag after rendering Fixes: #133 --- src/item.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/item.ts b/src/item.ts index f54658c..2db5b66 100644 --- a/src/item.ts +++ b/src/item.ts @@ -262,5 +262,6 @@ export class FazElementItem extends HTMLElement { this.parent()?.appendChild(this); return; } + this.remove(); } } From 6e1b176c7240dd30de7efcf666d63ea95207c46c Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 29 Dec 2024 21:10:06 -0500 Subject: [PATCH 092/199] build(deps): add axios and nise to the project --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 597d482..b358bb9 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,11 @@ "solid-js": "1.9.3" }, "devDependencies": { + "axios": "1.7.7", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@types/jest": "29.5.14", + "@types/nise": "1.4.5", "@types/node": "22.10.2", "can-stache-loader": "3.0.0", "esbuild": "0.24.2", @@ -46,6 +48,7 @@ "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", "jsdom": "25.0.1", + "nise": "6.1.1", "prettier": "3.4.2", "ts-node": "10.9.2", "typescript": "5.7.2", From 9d8d73ff5f833b5eb2882f4b523cc64ef8d15dfa Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 29 Dec 2024 21:13:32 -0500 Subject: [PATCH 093/199] chore(showcase): update watch script to start the showcase app Refs: #115 --- package.json | 3 +- showcase/form/index.html | 29 ++++++++++++++++++ showcase/src/form.tsx | 66 ++++++++++++++++++++++++++++++++++++++++ showcase/src/global.ts | 15 +++++++++ watch.mjs | 20 ++++++++---- 5 files changed, 126 insertions(+), 7 deletions(-) create mode 100644 showcase/form/index.html create mode 100644 showcase/src/form.tsx create mode 100644 showcase/src/global.ts diff --git a/package.json b/package.json index b358bb9..7cb736a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,8 @@ "vitest": "2.1.8" }, "scripts": { - "watch": "node watch.mjs", + "watch": "npm run watch:clean && node watch.mjs", + "watch:clean": "rm -rf watch/dist", "showcase": "http-server & npm run watch", "esbuild": "node build.mjs", "ts:build": "npm run ts:clean && npm run ts:declaration", diff --git a/showcase/form/index.html b/showcase/form/index.html new file mode 100644 index 0000000..1261797 --- /dev/null +++ b/showcase/form/index.html @@ -0,0 +1,29 @@ + + + + + + + + + + Candango Faz Toolkit - Form + + + + + + + + +
    + +
    + + + + + + diff --git a/showcase/src/form.tsx b/showcase/src/form.tsx new file mode 100644 index 0000000..54fd5c2 --- /dev/null +++ b/showcase/src/form.tsx @@ -0,0 +1,66 @@ +/** + * Copyright 2018-2025 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazFormElement } from "../../src"; +import { Accessor, createSignal, JSX, Setter } from "solid-js"; +import { MountableElement, render } from "solid-js/web"; +import { fakeServer, FakeXMLHttpRequest } from "nise"; + +const server = fakeServer.create(); +import axios from "axios"; + + +server.autoRespond = true; +server.respondWith("GET", "/sometest", function(xhr: FakeXMLHttpRequest) { + xhr.respond( + 200, + { "Content-Type": "application/json" }, + '{"id":1}', + ); +}); +server.respondWith("GET", "/sometest1", function(xhr: FakeXMLHttpRequest) { + xhr.respond( + 200, + { "Content-Type": "application/json" }, + '{"id":2}', + ); +}); + + +export class FormExample extends FazFormElement { + + constructor(){ + super(); + } + + show() { + render(() =>
    , this); + return; + } +} + +axios.get("/sometest").then(function (response) { + console.log(response); +}).catch(function(error){ + console.log(error); +}); + +axios.get("/sometest1").then(function (response) { + console.log(response); +}).catch(function(error){ + console.log(error); +}); +customElements.define("faz-form-example", FormExample); diff --git a/showcase/src/global.ts b/showcase/src/global.ts new file mode 100644 index 0000000..71378fa --- /dev/null +++ b/showcase/src/global.ts @@ -0,0 +1,15 @@ +/** + * Copyright 2018-2024 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/watch.mjs b/watch.mjs index 97170e2..4715cbc 100644 --- a/watch.mjs +++ b/watch.mjs @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,12 +14,18 @@ * limitations under the License. */ -import * as esbuild from "esbuild"; +import { context } from "esbuild"; import { assets } from "./assets.mjs"; import { entryPoints } from "./entryPoints.mjs"; import { copy } from "esbuild-plugin-copy"; +import { solidPlugin } from "esbuild-plugin-solid"; -let ctx = await esbuild.context({ +entryPoints.push({ out: "form.bundle", in: "showcase/src/form.tsx" }); + +entryPoints.push({ out: "global.bundle", in: "showcase/src/global.ts" }); +entryPoints.push({ out: "css/showcase", in: "stylesheets/showcase.css"}); + +let ctx = await context({ entryPoints: entryPoints, bundle: true, minify: true, @@ -31,14 +37,16 @@ let ctx = await esbuild.context({ legalComments: "none", allowOverwrite: false, plugins:[ - copy(assets) - ] + copy(assets), + solidPlugin() + ], + loader: { '.png': 'binary' }, }); await ctx.watch(); await ctx.serve({ - port: 8080, + port: 8081, servedir: "showcase", onRequest: (args) => { let logMessage = ""; From c8a4a0a46a8463f189feccdec49c8e1ef614d0ec Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 29 Dec 2024 21:17:11 -0500 Subject: [PATCH 094/199] chore: update item types Refs: #133 --- types/item.d.ts.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/item.d.ts.map b/types/item.d.ts.map index 9a1033c..f413796 100644 --- a/types/item.d.ts.map +++ b/types/item.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;IAClD,aAAa,EAAE,MAAM,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAAU,EAAE,QAAQ,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;IAClD,aAAa,EAAE,MAAM,CAAE,cAAc,GAAG,SAAS,CAAC,CAAC;CACtD;AAED,qBAAa,cAAe,SAAQ,WAAW;IAEpC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACrC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7B,YAAY,EAAE,QAAQ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KAAK,EAAE,cAAc;IAQjC,cAAc,CAAC,KAAK,EAAE,cAAc;IAOpC,IAAI,iBAAiB,IAAI,cAAc,EAAE,CAIxC;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAMb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAYjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAUN,WAAW,IAAI,IAAI;CAYtB"} \ No newline at end of file From a85a2d9faa23e6ef0de8d744a473c3176f87f4db Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 29 Dec 2024 21:18:28 -0500 Subject: [PATCH 095/199] build(relase): deliver 0.1.31 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7cb736a..aa5b01c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.30", + "version": "0.1.31", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From 650900318d82f899a74cd5f9aecd297d2b016ff1 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 1 Jan 2025 17:33:58 -0500 Subject: [PATCH 096/199] refactor(from): change errors to be key value instead of an array Fixes: #153 --- src/form.tsx | 45 +++++++++++++++++++++++++++----------- test/form.test.tsx | 54 ++++++++++++++++++++++++++++++++++++++++++++++ test/item.test.tsx | 2 +- 3 files changed, 88 insertions(+), 13 deletions(-) create mode 100644 test/form.test.tsx diff --git a/src/form.tsx b/src/form.tsx index 867a143..e4b353f 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,15 +22,15 @@ export class FazFormElement extends FazElementItem { public action: Accessor; public setAction: Setter; - public errors: Accessor; - public setErrors: Setter; + public errors: Accessor>; + public setErrors: Setter>; public method: Accessor; public setMethod: Setter; constructor() { super(); [this.action, this.setAction] = createSignal(undefined); - [this.errors, this.setErrors] = createSignal([]); + [this.errors, this.setErrors] = createSignal>({}); [this.method, this.setMethod] = createSignal("get"); for (const attribute of this.attributes) { @@ -45,19 +45,40 @@ export class FazFormElement extends FazElementItem { } } - hasError(value: string): boolean { - return this.errors().find(item => item == value) !== undefined; + public clearErrorsFor(key: string) { + const errors = { ...this.errors() }; + if (key in errors) { + delete errors[key]; + } + this.setErrors(errors); + } + + public clearErrors() { + this.setErrors({}); + } + + public hasErrorsFor(key: string): boolean { + return key in this.errors() && this.errors()[key].length > 0; } - hasErrors(): boolean { - return this.errors().length > 0; + public hasErrors(): boolean { + return Object.values(this.errors()).some(errors => errors.length > 0); } - pushError(value: string) { + public getErrorsFor(key: string): string[] { + return this.errors()[key] || []; + } + + public pushError(key: string, value: string) { value = value.trim(); - if (!this.hasError(value)) { - const errors = this.errors(); - errors.push(value); + if (value) { + const errors = { ...this.errors() }; + if (!errors[key]) { + errors[key] = []; + } + if (!errors[key].includes(value)) { + errors[key].push(value); + } this.setErrors(errors); } } diff --git a/test/form.test.tsx b/test/form.test.tsx new file mode 100644 index 0000000..49d7729 --- /dev/null +++ b/test/form.test.tsx @@ -0,0 +1,54 @@ +/** + * Copyright 2018-2025 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazFormElement } from "../src/form"; +import { describe, expect, test } from "vitest"; +import { allComments } from "../src/test"; + +class TestForm extends FazFormElement { + + constructor() { + super(); + } +} + +customElements.define("test-form", TestForm); + + +describe("Test Forms", () => { + test("Form errors", () => { + document.body.innerHTML = ` + + + `; + const [formComment] = allComments(document.body); + const form = formComment.fazElement() as FazFormElement; + expect(form.hasErrors()).toBeFalsy(); + form.pushError("field1", "error 1"); + form.pushError("field1", "error 1"); + form.pushError("field1", "error 2"); + form.pushError("field2", "errrr 1"); + expect(form.hasErrors()).toBeTruthy(); + expect(form.hasErrorsFor("field1")).toBeTruthy(); + expect(form.hasErrorsFor("field2")).toBeTruthy(); + expect(form.hasErrorsFor("field3")).toBeFalsy(); + expect(form.getErrorsFor("field1").length == 2).toBeTruthy(); + expect(form.getErrorsFor("field2").length == 1).toBeTruthy(); + form.clearErrors(); + expect(form.hasErrors()).toBeFalsy(); + + }); +}); diff --git a/test/item.test.tsx b/test/item.test.tsx index 2b3f2c1..8125aab 100644 --- a/test/item.test.tsx +++ b/test/item.test.tsx @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 022568a861b391abad3b89737ec43525d35d296f Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 1 Jan 2025 17:36:30 -0500 Subject: [PATCH 097/199] chore(form): update form types Refs: #153 --- types/form.d.ts | 13 ++++++++----- types/form.d.ts.map | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/types/form.d.ts b/types/form.d.ts index c034bfc..41ad60e 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,13 +18,16 @@ import { Accessor, Setter } from "solid-js"; export declare class FazFormElement extends FazElementItem { action: Accessor; setAction: Setter; - errors: Accessor; - setErrors: Setter; + errors: Accessor>; + setErrors: Setter>; method: Accessor; setMethod: Setter; constructor(); - hasError(value: string): boolean; + clearErrorsFor(key: string): void; + clearErrors(): void; + hasErrorsFor(key: string): boolean; hasErrors(): boolean; - pushError(value: string): void; + getErrorsFor(key: string): string[]; + pushError(key: string, value: string): void; } //# sourceMappingURL=form.d.ts.map \ No newline at end of file diff --git a/types/form.d.ts.map b/types/form.d.ts.map index 6522cf0..8cb2a64 100644 --- a/types/form.d.ts.map +++ b/types/form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,cAAc;IAEvC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IAoBjC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIhC,SAAS,IAAI,OAAO;IAIpB,SAAS,CAAC,KAAK,EAAE,MAAM;CAQ1B"} \ No newline at end of file +{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,cAAc;IAEvC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IAoB1B,cAAc,CAAC,GAAG,EAAE,MAAM;IAQ1B,WAAW;IAIX,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,SAAS,IAAI,OAAO;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAa9C"} \ No newline at end of file From 4c43efd81cb9c007cd8209b38340c11ca43d8071 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Wed, 1 Jan 2025 17:37:36 -0500 Subject: [PATCH 098/199] build(release): deliver 0.1.32 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa5b01c..1df524c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.31", + "version": "0.1.32", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From 7ab761f6c7ae098dfca5baf1e40bb91aa1eec81e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 3 Jan 2025 15:16:40 -0500 Subject: [PATCH 099/199] refactor: rename FazElementItem to FazElement Fixes: #154 --- entryPoints.mjs | 4 +- package.json | 7 ++- showcase/custom/index.html | 30 +++++++++++ types/id.d.ts => showcase/src/custom-tag.tsx | 16 ++++-- src/{item.ts => element.ts} | 55 ++++++++++---------- src/faz-elements.d.ts | 16 ++++++ src/form.tsx | 4 +- src/id.ts | 24 --------- src/index.ts | 7 ++- src/test.ts | 4 +- src/values.ts | 11 +++- test/{item.test.tsx => element.test.tsx} | 4 +- types/{item.d.ts => element.d.ts} | 32 ++++++------ types/element.d.ts.map | 1 + types/faz-elements.d.ts | 16 ++++++ types/form.d.ts | 4 +- types/form.d.ts.map | 2 +- types/id.d.ts.map | 1 - types/index.d.ts | 7 ++- types/index.d.ts.map | 2 +- types/item.d.ts.map | 1 - types/test.d.ts | 4 +- types/test.d.ts.map | 2 +- types/values.d.ts | 3 +- types/values.d.ts.map | 2 +- watch.mjs | 1 + 26 files changed, 159 insertions(+), 101 deletions(-) create mode 100644 showcase/custom/index.html rename types/id.d.ts => showcase/src/custom-tag.tsx (71%) rename src/{item.ts => element.ts} (85%) create mode 100644 src/faz-elements.d.ts delete mode 100644 src/id.ts rename test/{item.test.tsx => element.test.tsx} (98%) rename types/{item.d.ts => element.d.ts} (71%) create mode 100644 types/element.d.ts.map create mode 100644 types/faz-elements.d.ts delete mode 100644 types/id.d.ts.map delete mode 100644 types/item.d.ts.map diff --git a/entryPoints.mjs b/entryPoints.mjs index 091ad6c..1c05e15 100644 --- a/entryPoints.mjs +++ b/entryPoints.mjs @@ -16,8 +16,8 @@ export const entryPoints = [ { out: "form", in: "src/form.tsx" }, - { out: "id", in: "src/id.ts" }, { out: "index", in: "src/index.ts" }, - { out: "item", in: "src/item.ts" }, + { out: "element", in: "src/element.ts" }, { out: "test", in: "src/test.ts" }, + { out: "values", in: "src/values.ts" }, ]; diff --git a/package.json b/package.json index 1df524c..d78d332 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,10 @@ "module", "main" ], - "types": "./types/index.d.ts", + "types": [ + "./src/faz-elements.d.ts", + "./types/index.d.ts" + ], "files": [ "dist", "src", @@ -61,7 +64,7 @@ "watch:clean": "rm -rf watch/dist", "showcase": "http-server & npm run watch", "esbuild": "node build.mjs", - "ts:build": "npm run ts:clean && npm run ts:declaration", + "ts:build": "npm run ts:clean && npm run ts:declaration && cp src/*.d.ts types", "ts:declaration": "tsc -p tsconfig.types.json -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.types.tsbuildinfo", "ts:clean": "rm -rf tsconfig.tsbuildinfo types/*", "build": "npm run build:clean && npm run lessc && npm run esbuild && npm run ts:build", diff --git a/showcase/custom/index.html b/showcase/custom/index.html new file mode 100644 index 0000000..0a1de7b --- /dev/null +++ b/showcase/custom/index.html @@ -0,0 +1,30 @@ + + + + + + + + + + Candango Faz Toolkit - Custom component + + + + + + + + +
    +

    Faz - Custom Component

    + +
    + + + + + + diff --git a/types/id.d.ts b/showcase/src/custom-tag.tsx similarity index 71% rename from types/id.d.ts rename to showcase/src/custom-tag.tsx index 97bc2f6..43c1b49 100644 --- a/types/id.d.ts +++ b/showcase/src/custom-tag.tsx @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,5 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export declare function randomId(): string; -//# sourceMappingURL=id.d.ts.map \ No newline at end of file + +import { FazElement } from "../../src/element"; + +class CustomTag extends FazElement { + + constructor() { + super(); + } + +} + +customElements.define("custom-tag", CustomTag); diff --git a/src/item.ts b/src/element.ts similarity index 85% rename from src/item.ts rename to src/element.ts index 2db5b66..6ab4744 100644 --- a/src/item.ts +++ b/src/element.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,21 +14,20 @@ * limitations under the License. */ -import { randomId } from "./id"; -import { toBoolean } from "./values"; +import { randomId, toBoolean } from "./values"; import { Accessor, createSignal, Setter } from "solid-js"; export interface FazComment extends Comment { - fazElement: Accessor ; - setFazElement: Setter ; + fazElement: Accessor ; + setFazElement: Setter ; } export interface FazNode extends ChildNode { - fazElement: Accessor ; - setFazElement: Setter ; + fazElement: Accessor ; + setFazElement: Setter ; } -export class FazElementItem extends HTMLElement { +export class FazElement extends HTMLElement { public active: Accessor; public setActive: Setter; @@ -42,14 +41,14 @@ export class FazElementItem extends HTMLElement { public setDisabled: Setter; public extraClasses: Accessor; public setExtraClasses: Setter; - public fazElement: Accessor ; - public setFazElement: Setter ; - public fazChildren: Accessor; - public setFazChildren: Setter; + public fazElement: Accessor ; + public setFazElement: Setter ; + public fazChildren: Accessor; + public setFazChildren: Setter; public loading: Accessor; public setLoading: Setter; - public parent: Accessor; - public setParent: Setter; + public parent: Accessor; + public setParent: Setter; public reload: Accessor; public setReload: Setter; public link: Accessor; @@ -70,10 +69,10 @@ export class FazElementItem extends HTMLElement { [this.debug, this.setDebug] = createSignal(false); [this.disabled, this.setDisabled] = createSignal(false); [this.extraClasses, this.setExtraClasses] = createSignal(""); - [this.fazElement, this.setFazElement] = createSignal(undefined); - [this.fazChildren, this.setFazChildren] = createSignal([]); + [this.fazElement, this.setFazElement] = createSignal(undefined); + [this.fazChildren, this.setFazChildren] = createSignal([]); [this.loading, this.setLoading] = createSignal(true); - [this.parent, this.setParent] = createSignal(undefined); + [this.parent, this.setParent] = createSignal(undefined); [this.reload, this.setReload] = createSignal(true); [this.link, this.setLink] = createSignal(undefined); @@ -122,7 +121,7 @@ export class FazElementItem extends HTMLElement { }); } this.comment = (document.createComment(this.nodeName + " " + this.id) as FazComment); - [this.comment.fazElement, this.comment.setFazElement] = createSignal(this); + [this.comment.fazElement, this.comment.setFazElement] = createSignal(this); this.before(this.comment); } @@ -155,22 +154,22 @@ export class FazElementItem extends HTMLElement { return this.link(); } - addFazChild(child: FazElementItem) { + addFazChild(child: FazElement) { if (this.fazChildren().indexOf(child) === -1) { - const children = {...this.fazChildren()} as FazElementItem[]; + const children = {...this.fazChildren()} as FazElement[]; children.push(child); this.setFazChildren(children); } } - removeFazChild(child: FazElementItem) { + removeFazChild(child: FazElement) { if (this.fazChildren().indexOf(child) !== -1) { - const children = {...this.fazChildren()} as FazElementItem[]; + const children = {...this.fazChildren()} as FazElement[]; this.setFazChildren(children.filter(i => i !== child)); } } - get activeFazChildren(): FazElementItem[] { + get activeFazChildren(): FazElement[] { return this.fazChildren().filter(child => { return child.active(); }) @@ -199,12 +198,12 @@ export class FazElementItem extends HTMLElement { collectChildren() { const children:Node[] = []; - const items: FazElementItem[] = []; + const items: FazElement[] = []; if (this.loading()) { while(this.firstChild) { - if (this.firstChild instanceof FazElementItem) { - const item = this.firstChild as FazElementItem; - item.setParent(this as FazElementItem); + if (this.firstChild instanceof FazElement) { + const item = this.firstChild as FazElement; + item.setParent(this as FazElement); items.push(item); item.dataset['parent'] = this.id; } @@ -255,7 +254,7 @@ export class FazElementItem extends HTMLElement { cleanFazTag(): void { this.childNodes.forEach((node) => { const fNode = node as FazNode; - [fNode.fazElement, fNode.setFazElement] = createSignal(this); + [fNode.fazElement, fNode.setFazElement] = createSignal(this); this.before(fNode); }) if (this.parent()) { diff --git a/src/faz-elements.d.ts b/src/faz-elements.d.ts new file mode 100644 index 0000000..c36a135 --- /dev/null +++ b/src/faz-elements.d.ts @@ -0,0 +1,16 @@ +import {FazElement} from "."; + +interface FazElementAttributes extends HTMLAttributes { + fazid?: string; + active?: boolean; + connected?: boolean; + content?: string; + debug?: boolean; + disabled?: boolean; + extraClasses?: string; + fazChildren?: FazElement[]; + loading?: boolean; + parent?: FazElement; + reload?: boolean; + link?: string; +} diff --git a/src/form.tsx b/src/form.tsx index e4b353f..57ee9eb 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -14,11 +14,11 @@ * limitations under the License. */ -import { FazElementItem } from "./item"; +import { FazElement } from "./element"; import { Accessor, createSignal, Setter } from "solid-js"; -export class FazFormElement extends FazElementItem { +export class FazFormElement extends FazElement { public action: Accessor; public setAction: Setter; diff --git a/src/id.ts b/src/id.ts deleted file mode 100644 index 5e452bc..0000000 --- a/src/id.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Copyright 2018-2024 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export function randomId() { - // SEE: https://gist.github.com/gordonbrander/2230317 - // Math.random should be unique because of its seeding algorithm. - // Convert it to base 36 (numbers + letters), and grab the first - // 9 characters - // after the decimal. - return "_" + Math.random().toString(36).substring(2, 11); -} diff --git a/src/index.ts b/src/index.ts index e00724a..f14a723 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,6 @@ * limitations under the License. */ -export { randomId } from "./id"; +export { FazElement } from "./element"; export { FazFormElement } from "./form"; -export { FazElementItem } from "./item"; -export { toBoolean } from "./values"; +export { randomId, toBoolean } from "./values"; diff --git a/src/test.ts b/src/test.ts index cae6e0c..6075432 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -import { FazComment } from "./item"; +import { FazComment } from "./element"; // SEE: https://stackoverflow.com/a/25388984/2887989 export function allComments(context: any): FazComment[] { diff --git a/src/values.ts b/src/values.ts index 6bd20a7..cb025f4 100644 --- a/src/values.ts +++ b/src/values.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,3 +20,12 @@ export function toBoolean(value: string | null): boolean { } return value.toLowerCase() === "true"; } + +export function randomId() { + // SEE: https://gist.github.com/gordonbrander/2230317 + // Math.random should be unique because of its seeding algorithm. + // Convert it to base 36 (numbers + letters), and grab the first + // 9 characters + // after the decimal. + return "_" + Math.random().toString(36).substring(2, 11); +} diff --git a/test/item.test.tsx b/test/element.test.tsx similarity index 98% rename from test/item.test.tsx rename to test/element.test.tsx index 8125aab..52052c5 100644 --- a/test/item.test.tsx +++ b/test/element.test.tsx @@ -14,14 +14,14 @@ * limitations under the License. */ -import { FazElementItem, FazNode } from "../src/item"; +import { FazElement, FazNode } from "../src/element"; import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest"; import { waitFor } from "@testing-library/dom"; import { createEffect, createRoot } from "solid-js"; import { render} from "solid-js/web"; import { allComments } from "../src/test"; -class TestElement extends FazElementItem { +class TestElement extends FazElement { public doActiveChanged: boolean = false; public doDisabledChanged: boolean = false; diff --git a/types/item.d.ts b/types/element.d.ts similarity index 71% rename from types/item.d.ts rename to types/element.d.ts index 96fe7b6..ff888fb 100644 --- a/types/item.d.ts +++ b/types/element.d.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +15,14 @@ */ import { Accessor, Setter } from "solid-js"; export interface FazComment extends Comment { - fazElement: Accessor; - setFazElement: Setter; + fazElement: Accessor; + setFazElement: Setter; } export interface FazNode extends ChildNode { - fazElement: Accessor; - setFazElement: Setter; + fazElement: Accessor; + setFazElement: Setter; } -export declare class FazElementItem extends HTMLElement { +export declare class FazElement extends HTMLElement { active: Accessor; setActive: Setter; connected: Accessor; @@ -35,14 +35,14 @@ export declare class FazElementItem extends HTMLElement { setDisabled: Setter; extraClasses: Accessor; setExtraClasses: Setter; - fazElement: Accessor; - setFazElement: Setter; - fazChildren: Accessor; - setFazChildren: Setter; + fazElement: Accessor; + setFazElement: Setter; + fazChildren: Accessor; + setFazChildren: Setter; loading: Accessor; setLoading: Setter; - parent: Accessor; - setParent: Setter; + parent: Accessor; + setParent: Setter; reload: Accessor; setReload: Setter; link: Accessor; @@ -57,9 +57,9 @@ export declare class FazElementItem extends HTMLElement { hasExtraClasses(): boolean; pushExtraClass(value: string): void; resolveLink(): string | undefined; - addFazChild(child: FazElementItem): void; - removeFazChild(child: FazElementItem): void; - get activeFazChildren(): FazElementItem[]; + addFazChild(child: FazElement): void; + removeFazChild(child: FazElement): void; + get activeFazChildren(): FazElement[]; get contentChild(): ChildNode | null; get linkIsVoid(): boolean; addChild(node: T): T; @@ -73,4 +73,4 @@ export declare class FazElementItem extends HTMLElement { render(): void; cleanFazTag(): void; } -//# sourceMappingURL=item.d.ts.map \ No newline at end of file +//# sourceMappingURL=element.d.ts.map \ No newline at end of file diff --git a/types/element.d.ts.map b/types/element.d.ts.map new file mode 100644 index 0000000..5be8367 --- /dev/null +++ b/types/element.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,C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AAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAElC,WAAW,EAAE,MAAM,CAAM;IACzB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAQ;IAC9C,OAAO,CAAC,gBAAgB,CAAc;IACtC,OAAO,CAAC,OAAO,CAA2B;IACnC,MAAM,EAAE,GAAG,CAAC;;IAmEnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAG,SAAS;IAUjC,WAAW,CAAC,KAAK,EAAE,UAAU;IAQ7B,cAAc,CAAC,KAAK,EAAE,UAAU;IAOhC,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAIpC;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAMb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAYjB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAUN,WAAW,IAAI,IAAI;CAYtB"} \ No newline at end of file diff --git a/types/faz-elements.d.ts b/types/faz-elements.d.ts new file mode 100644 index 0000000..c36a135 --- /dev/null +++ b/types/faz-elements.d.ts @@ -0,0 +1,16 @@ +import {FazElement} from "."; + +interface FazElementAttributes extends HTMLAttributes { + fazid?: string; + active?: boolean; + connected?: boolean; + content?: string; + debug?: boolean; + disabled?: boolean; + extraClasses?: string; + fazChildren?: FazElement[]; + loading?: boolean; + parent?: FazElement; + reload?: boolean; + link?: string; +} diff --git a/types/form.d.ts b/types/form.d.ts index 41ad60e..d35b3b1 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { FazElementItem } from "./item"; +import { FazElement } from "./element"; import { Accessor, Setter } from "solid-js"; -export declare class FazFormElement extends FazElementItem { +export declare class FazFormElement extends FazElement { action: Accessor; setAction: Setter; errors: Accessor>; diff --git a/types/form.d.ts.map b/types/form.d.ts.map index 8cb2a64..01bfd24 100644 --- a/types/form.d.ts.map +++ b/types/form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,cAAc;IAEvC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IAoB1B,cAAc,CAAC,GAAG,EAAE,MAAM;IAQ1B,WAAW;IAIX,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,SAAS,IAAI,OAAO;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAa9C"} \ No newline at end of file +{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,UAAU;IAEnC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IAoB1B,cAAc,CAAC,GAAG,EAAE,MAAM;IAQ1B,WAAW;IAIX,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,SAAS,IAAI,OAAO;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAa9C"} \ No newline at end of file diff --git a/types/id.d.ts.map b/types/id.d.ts.map deleted file mode 100644 index 9a9f7e3..0000000 --- a/types/id.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../src/id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,QAAQ,WAOvB"} \ No newline at end of file diff --git a/types/index.d.ts b/types/index.d.ts index 4f722b8..82b352e 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,8 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export { randomId } from "./id"; +export { FazElement } from "./element"; export { FazFormElement } from "./form"; -export { FazElementItem } from "./item"; -export { toBoolean } from "./values"; +export { randomId, toBoolean } from "./values"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/types/index.d.ts.map b/types/index.d.ts.map index a21af8c..dde3a54 100644 --- a/types/index.d.ts.map +++ b/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/types/item.d.ts.map b/types/item.d.ts.map deleted file mode 100644 index f413796..0000000 --- a/types/item.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../src/item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,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No newline at end of file diff --git a/types/test.d.ts b/types/test.d.ts index b3a24b0..bd553d5 100644 --- a/types/test.d.ts +++ b/types/test.d.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,6 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { FazComment } from "./item"; +import { FazComment } from "./element"; export declare function allComments(context: any): FazComment[]; //# sourceMappingURL=test.d.ts.map \ No newline at end of file diff --git a/types/test.d.ts.map b/types/test.d.ts.map index 1e4ea84..80b7986 100644 --- a/types/test.d.ts.map +++ b/types/test.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGpC,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU,EAAE,CAetD"} \ No newline at end of file +{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU,EAAE,CAetD"} \ No newline at end of file diff --git a/types/values.d.ts b/types/values.d.ts index bbe0436..6fccede 100644 --- a/types/values.d.ts +++ b/types/values.d.ts @@ -1,5 +1,5 @@ /** - * Copyright 2018-2024 Flavio Garcia + * Copyright 2018-2025 Flavio Garcia * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,4 +14,5 @@ * limitations under the License. */ export declare function toBoolean(value: string | null): boolean; +export declare function randomId(): string; //# sourceMappingURL=values.d.ts.map \ No newline at end of file diff --git a/types/values.d.ts.map b/types/values.d.ts.map index 6216f6d..7167c8c 100644 --- a/types/values.d.ts.map +++ b/types/values.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKvD"} \ No newline at end of file +{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKvD;AAED,wBAAgB,QAAQ,WAOvB"} \ No newline at end of file diff --git a/watch.mjs b/watch.mjs index 4715cbc..4f5a1c6 100644 --- a/watch.mjs +++ b/watch.mjs @@ -20,6 +20,7 @@ import { entryPoints } from "./entryPoints.mjs"; import { copy } from "esbuild-plugin-copy"; import { solidPlugin } from "esbuild-plugin-solid"; +entryPoints.push({ out: "custom-tag.bundle", in: "showcase/src/custom-tag.tsx" }); entryPoints.push({ out: "form.bundle", in: "showcase/src/form.tsx" }); entryPoints.push({ out: "global.bundle", in: "showcase/src/global.ts" }); From ed9e0cea9ed9f8f2e8c86ceaaf7be5ce250deaef Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 3 Jan 2025 15:28:33 -0500 Subject: [PATCH 100/199] build(release): deliver 0.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d78d332..dca0d28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.1.32", + "version": "0.2.0", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From be0f10c378a0431c1992c8c09aa4152836bb48be Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 3 Jan 2025 22:43:16 -0500 Subject: [PATCH 101/199] fix(element): add comment at the connectCallback When the comment was being added in the constructor, the comment was visible in the html but not when used in a txs as a jsx. Fix: #155 --- src/element.ts | 4 +++- src/faz-elements.d.ts | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/element.ts b/src/element.ts index 6ab4744..17e5aa5 100644 --- a/src/element.ts +++ b/src/element.ts @@ -122,7 +122,6 @@ export class FazElement extends HTMLElement { } this.comment = (document.createComment(this.nodeName + " " + this.id) as FazComment); [this.comment.fazElement, this.comment.setFazElement] = createSignal(this); - this.before(this.comment); } hasExtraClass(value: string): boolean { @@ -226,6 +225,9 @@ export class FazElement extends HTMLElement { } connectedCallback() { + if (this.comment){ + this.before(this.comment); + } new Promise((resolve) => { setTimeout(()=>resolve(null), 0); }).then(()=> { diff --git a/src/faz-elements.d.ts b/src/faz-elements.d.ts index c36a135..ff8e34f 100644 --- a/src/faz-elements.d.ts +++ b/src/faz-elements.d.ts @@ -1,4 +1,20 @@ -import {FazElement} from "."; +/** + * Copyright 2018-2025 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazElement } from "."; interface FazElementAttributes extends HTMLAttributes { fazid?: string; From 4e161c4342501260e5ad0137184f27588f701405 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 3 Jan 2025 22:47:26 -0500 Subject: [PATCH 102/199] build(release): deliver 0.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dca0d28..6555dfe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.2.0", + "version": "0.2.1", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From 36f9b0423009eaffc31192d10b7fabe41ff415d7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Fri, 3 Jan 2025 22:48:49 -0500 Subject: [PATCH 103/199] chore(element): update element types Refs: #155 --- types/element.d.ts.map | 2 +- types/faz-elements.d.ts | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/types/element.d.ts.map b/types/element.d.ts.map index 5be8367..3b831e6 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CAClD;AAED,qBAAa,UAAW,SAAQ,WAAW;IAEhC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3B,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACrC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACzB,QAAQ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IAkEnB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrC,eAAe,IAAI,OAAO;IAI1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAS5B,WAAW,IAAI,MAAM,GAAG,SAAS;IAUjC,WAAW,CAAC,KAAK,EAAE,UAAU;IAQ7B,cAAc,CAAC,KAAK,EAAE,UAAU;IAOhC,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAIpC;IAED,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAED,IAAI,UAAU,YAMb;IAED,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAKpC,SAAS,IAAG,IAAI;IAEhB,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAejB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAUN,WAAW,IAAI,IAAI;CAYtB"} \ No newline at end of file diff --git a/types/faz-elements.d.ts b/types/faz-elements.d.ts index c36a135..ff8e34f 100644 --- a/types/faz-elements.d.ts +++ b/types/faz-elements.d.ts @@ -1,4 +1,20 @@ -import {FazElement} from "."; +/** + * Copyright 2018-2025 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazElement } from "."; interface FazElementAttributes extends HTMLAttributes { fazid?: string; From 3018f0fe8aca36a323952a8790bd012a9a80385d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 4 Jan 2025 23:34:29 -0500 Subject: [PATCH 104/199] build(deps): bump less to 4.2.1 --- package.json | 2 +- src/faz-elements.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6555dfe..e9e4cf1 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "toolkit" ], "dependencies": { - "less": "4.2.0", + "less": "4.2.1", "solid-js": "1.9.3" }, "devDependencies": { diff --git a/src/faz-elements.d.ts b/src/faz-elements.d.ts index ff8e34f..eda876f 100644 --- a/src/faz-elements.d.ts +++ b/src/faz-elements.d.ts @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - import { FazElement } from "."; +import { JSX } from "solid-js/types/jsx"; -interface FazElementAttributes extends HTMLAttributes { +interface FazElementAttributes extends JSX.HTMLAttributes { fazid?: string; active?: boolean; connected?: boolean; From 30c7242dd63ae39b957f8bbd5f20ec6710ec4a05 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 4 Jan 2025 23:35:19 -0500 Subject: [PATCH 105/199] build(deps): bump axios to 1.7.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e9e4cf1..41ce546 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "solid-js": "1.9.3" }, "devDependencies": { - "axios": "1.7.7", + "axios": "1.7.9", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@types/jest": "29.5.14", From 0b536711aa35708fda84928a58194fabb3c3407d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 4 Jan 2025 23:37:16 -0500 Subject: [PATCH 106/199] build(deps): bump @types/node to 22.10.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 41ce546..09eac6b 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@testing-library/jest-dom": "6.6.3", "@types/jest": "29.5.14", "@types/nise": "1.4.5", - "@types/node": "22.10.2", + "@types/node": "22.10.5", "can-stache-loader": "3.0.0", "esbuild": "0.24.2", "esbuild-plugin-copy": "2.1.1", From 5f2ff4e3b90653230dc8ed68b499cdc3302aff7f Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 4 Jan 2025 23:39:35 -0500 Subject: [PATCH 107/199] build(deps): bump vite to 6.0.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09eac6b..636af4c 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "prettier": "3.4.2", "ts-node": "10.9.2", "typescript": "5.7.2", - "vite": "6.0.5", + "vite": "6.0.7", "vite-plugin-solid": "2.11.0", "vitest": "2.1.8" }, From 0f663f9036fa232c35c754ac515dcd1ff8673bcf Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 4 Jan 2025 23:42:07 -0500 Subject: [PATCH 108/199] chore(types): add correct JSX reference to faz-elements.d.ts --- types/faz-elements.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/faz-elements.d.ts b/types/faz-elements.d.ts index ff8e34f..eda876f 100644 --- a/types/faz-elements.d.ts +++ b/types/faz-elements.d.ts @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - import { FazElement } from "."; +import { JSX } from "solid-js/types/jsx"; -interface FazElementAttributes extends HTMLAttributes { +interface FazElementAttributes extends JSX.HTMLAttributes { fazid?: string; active?: boolean; connected?: boolean; From edd91a3ed7040b990990f2a83f5c6936e6efb549 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 4 Jan 2025 23:44:13 -0500 Subject: [PATCH 109/199] build(release): deliver 0.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 636af4c..a4dd71a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.2.1", + "version": "0.2.2", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From 2e30f79b822e0f6388b5db765ce015926e1518f4 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:30:21 -0400 Subject: [PATCH 110/199] build: set yarn to 4.8.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a4dd71a..9da9acb 100644 --- a/package.json +++ b/package.json @@ -39,12 +39,12 @@ "solid-js": "1.9.3" }, "devDependencies": { - "axios": "1.7.9", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@types/jest": "29.5.14", "@types/nise": "1.4.5", "@types/node": "22.10.5", + "axios": "1.7.9", "can-stache-loader": "3.0.0", "esbuild": "0.24.2", "esbuild-plugin-copy": "2.1.1", @@ -82,5 +82,5 @@ "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + "packageManager": "yarn@4.8.1" } From 7a005e7f3264a46b4484bd7dec35d8f2b9a32b03 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:32:34 -0400 Subject: [PATCH 111/199] build: enable corepack --- .github/workflows/run_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index efb217d..dab3a80 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -20,6 +20,7 @@ jobs: # Solution from: https://stackoverflow.com/a/67740771/2887989 run: | export YARN_ENABLE_IMMUTABLE_INSTALLS=false + corepack enable npm install -g yarn npm run yarn yarn install From 520793f158f8c71c409b0bbb55e449aca829a94d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:37:03 -0400 Subject: [PATCH 112/199] build: use npm set version instead of instaling via npm install --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index dab3a80..28c0391 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -21,7 +21,7 @@ jobs: run: | export YARN_ENABLE_IMMUTABLE_INSTALLS=false corepack enable - npm install -g yarn + npm set version stable npm run yarn yarn install - name: Run vitest unit tests From 5ce1d8586be667511d30fe80461499bbcc3f9e7d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:46:28 -0400 Subject: [PATCH 113/199] build(deps): bump solid-js to 1.9.5 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9da9acb..bc9f8ce 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "main" ], "types": [ - "./src/faz-elements.d.ts", + "./types/faz-elements.d.ts", "./types/index.d.ts" ], "files": [ @@ -36,7 +36,7 @@ ], "dependencies": { "less": "4.2.1", - "solid-js": "1.9.3" + "solid-js": "1.9.5" }, "devDependencies": { "@testing-library/dom": "10.4.0", From cb84a301b0d03e6d209c62ef12922b133d82ccc4 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:47:34 -0400 Subject: [PATCH 114/199] build(deps): bump less to 4.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bc9f8ce..a157734 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "toolkit" ], "dependencies": { - "less": "4.2.1", + "less": "4.3.0", "solid-js": "1.9.5" }, "devDependencies": { From d87da9a23a1c522e38215dec071830dd5ae1ea0b Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:49:34 -0400 Subject: [PATCH 115/199] build(deps): bump @types/node to 22.14.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a157734..2a7bf6b 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@testing-library/jest-dom": "6.6.3", "@types/jest": "29.5.14", "@types/nise": "1.4.5", - "@types/node": "22.10.5", + "@types/node": "22.14.0", "axios": "1.7.9", "can-stache-loader": "3.0.0", "esbuild": "0.24.2", From d107534d4cfc40d0ab001cdc0ad7ec2630cef98a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:50:53 -0400 Subject: [PATCH 116/199] build(deps): bump axios to 1.8.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a7bf6b..1469e05 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@types/jest": "29.5.14", "@types/nise": "1.4.5", "@types/node": "22.14.0", - "axios": "1.7.9", + "axios": "1.8.4", "can-stache-loader": "3.0.0", "esbuild": "0.24.2", "esbuild-plugin-copy": "2.1.1", From b9a9e467997c18c4e49d800ac7b90a37bd78b4d2 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:52:30 -0400 Subject: [PATCH 117/199] build(deps): bump esbuild to 0.25.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1469e05..c07e52b 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/node": "22.14.0", "axios": "1.8.4", "can-stache-loader": "3.0.0", - "esbuild": "0.24.2", + "esbuild": "0.25.2", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", From fc31001f65d9707bc05c3fe5f89f9b4d12309daf Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:55:03 -0400 Subject: [PATCH 118/199] build(deps): bump jsdom to 26.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c07e52b..06303ac 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jsdom": "25.0.1", + "jsdom": "26.0.0", "nise": "6.1.1", "prettier": "3.4.2", "ts-node": "10.9.2", From b095acfa3c743d5d5d3b00c596ec3e0037d9d350 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:55:50 -0400 Subject: [PATCH 119/199] build(deps): bump prettier to 3.5.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 06303ac..5c3f18f 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "http-server": "14.1.1", "jsdom": "26.0.0", "nise": "6.1.1", - "prettier": "3.4.2", + "prettier": "3.5.3", "ts-node": "10.9.2", "typescript": "5.7.2", "vite": "6.0.7", From 4d2b1404d3e9a84548aff5fa65a50421a28496a6 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:57:13 -0400 Subject: [PATCH 120/199] build(deps): bump typescript to 5.9.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c3f18f..3bc7686 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "nise": "6.1.1", "prettier": "3.5.3", "ts-node": "10.9.2", - "typescript": "5.7.2", + "typescript": "5.8.3", "vite": "6.0.7", "vite-plugin-solid": "2.11.0", "vitest": "2.1.8" From df72c4c8abf72c05411b39888414bae507da98a7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:58:08 -0400 Subject: [PATCH 121/199] build(deps): bump vite to 6.2.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3bc7686..6385d35 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "prettier": "3.5.3", "ts-node": "10.9.2", "typescript": "5.8.3", - "vite": "6.0.7", + "vite": "6.2.5", "vite-plugin-solid": "2.11.0", "vitest": "2.1.8" }, From 91b2259e91edf47396337331e62194e6d51a3929 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 16:59:13 -0400 Subject: [PATCH 122/199] build(deps): bump vite-plugin-solid to 2.11.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6385d35..c6b3f33 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "ts-node": "10.9.2", "typescript": "5.8.3", "vite": "6.2.5", - "vite-plugin-solid": "2.11.0", + "vite-plugin-solid": "2.11.6", "vitest": "2.1.8" }, "scripts": { From e6b6fa9b32dbf13f08090aafb4eb7540e7bbf812 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 17:00:23 -0400 Subject: [PATCH 123/199] build(deps): bump vitest to 3.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c6b3f33..c21dd76 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "typescript": "5.8.3", "vite": "6.2.5", "vite-plugin-solid": "2.11.6", - "vitest": "2.1.8" + "vitest": "3.1.1" }, "scripts": { "watch": "npm run watch:clean && node watch.mjs", From 8df5a879313d0915b2c4c14a969dc186b7d6cdf6 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 7 Apr 2025 17:04:38 -0400 Subject: [PATCH 124/199] build(release): deliver 0.2.3 --- package.json | 2 +- src/types/index.d.ts | 43 ------------------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 src/types/index.d.ts diff --git a/package.json b/package.json index c21dd76..1124fa9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.2.2", + "version": "0.2.3", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", diff --git a/src/types/index.d.ts b/src/types/index.d.ts deleted file mode 100644 index deb4c3d..0000000 --- a/src/types/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright 2018-2024 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// See: https://cutt.ly/RwyeQ7ZT - -export { randomId } from "../id" -export { FazFormElement } from "../form" -export { FazElementItem } from "../item" -export { toBoolean } from "../values" - -interface FazElementItem extends HTMLElement { - fazid: string -} - -interface FazElementItemAttributes extends HTMLAttributes { - fazid?: string -} - -interface FazNavElement extends FazElementItem { -} - -declare global { - declare module "solid-js" { - namespace JSX { - interface IntrinsicElements { - 'faz-nav': FazElementItemAttributes - 'faz-nav-item': HTMLDivElement - } - } - } -} From 01d94c416e4cb599feb55bdbb0dc71802fb7fc57 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Apr 2025 15:01:14 -0400 Subject: [PATCH 125/199] feat(types): add element-attributes type Remove faz-elements.d.ts manual copy from src to types. Fixes: #156 --- package.json | 7 ++----- src/{faz-elements.d.ts => element-attributes.ts} | 7 ++++--- src/index.ts | 1 + types/{faz-elements.d.ts => element-attributes.d.ts} | 8 ++++---- types/element-attributes.d.ts.map | 1 + types/index.d.ts | 1 + types/index.d.ts.map | 2 +- 7 files changed, 14 insertions(+), 13 deletions(-) rename src/{faz-elements.d.ts => element-attributes.ts} (85%) rename types/{faz-elements.d.ts => element-attributes.d.ts} (82%) create mode 100644 types/element-attributes.d.ts.map diff --git a/package.json b/package.json index 1124fa9..28879ed 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,7 @@ "module", "main" ], - "types": [ - "./types/faz-elements.d.ts", - "./types/index.d.ts" - ], + "types": "./types/index.d.ts", "files": [ "dist", "src", @@ -64,7 +61,7 @@ "watch:clean": "rm -rf watch/dist", "showcase": "http-server & npm run watch", "esbuild": "node build.mjs", - "ts:build": "npm run ts:clean && npm run ts:declaration && cp src/*.d.ts types", + "ts:build": "npm run ts:clean && npm run ts:declaration", "ts:declaration": "tsc -p tsconfig.types.json -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.types.tsbuildinfo", "ts:clean": "rm -rf tsconfig.tsbuildinfo types/*", "build": "npm run build:clean && npm run lessc && npm run esbuild && npm run ts:build", diff --git a/src/faz-elements.d.ts b/src/element-attributes.ts similarity index 85% rename from src/faz-elements.d.ts rename to src/element-attributes.ts index eda876f..e560547 100644 --- a/src/faz-elements.d.ts +++ b/src/element-attributes.ts @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { FazElement } from "."; -import { JSX } from "solid-js/types/jsx"; -interface FazElementAttributes extends JSX.HTMLAttributes { +import { FazElement } from "./element"; +import { JSX } from "solid-js"; + +export interface FazElementAttributes extends JSX.HTMLAttributes { fazid?: string; active?: boolean; connected?: boolean; diff --git a/src/index.ts b/src/index.ts index f14a723..a7de57f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -15,5 +15,6 @@ */ export { FazElement } from "./element"; +export type { FazElementAttributes } from "./element-attributes"; export { FazFormElement } from "./form"; export { randomId, toBoolean } from "./values"; diff --git a/types/faz-elements.d.ts b/types/element-attributes.d.ts similarity index 82% rename from types/faz-elements.d.ts rename to types/element-attributes.d.ts index eda876f..2dc18c2 100644 --- a/types/faz-elements.d.ts +++ b/types/element-attributes.d.ts @@ -13,10 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { FazElement } from "."; -import { JSX } from "solid-js/types/jsx"; - -interface FazElementAttributes extends JSX.HTMLAttributes { +import { FazElement } from "./element"; +import { JSX } from "solid-js"; +export interface FazElementAttributes extends JSX.HTMLAttributes { fazid?: string; active?: boolean; connected?: boolean; @@ -30,3 +29,4 @@ interface FazElementAttributes extends JSX.HTMLAttributes { reload?: boolean; link?: string; } +//# sourceMappingURL=element-attributes.d.ts.map \ No newline at end of file diff --git a/types/element-attributes.d.ts.map b/types/element-attributes.d.ts.map new file mode 100644 index 0000000..d803b2a --- /dev/null +++ b/types/element-attributes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"element-attributes.d.ts","sourceRoot":"","sources":["../src/element-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"} \ No newline at end of file diff --git a/types/index.d.ts b/types/index.d.ts index 82b352e..4e91480 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -14,6 +14,7 @@ * limitations under the License. */ export { FazElement } from "./element"; +export type { FazElementAttributes } from "./element-attributes"; export { FazFormElement } from "./form"; export { randomId, toBoolean } from "./values"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/types/index.d.ts.map b/types/index.d.ts.map index dde3a54..95d3471 100644 --- a/types/index.d.ts.map +++ b/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file From 2d93474173558d85843a75080d4e7b6e1f347a30 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 8 Apr 2025 15:04:18 -0400 Subject: [PATCH 126/199] build(release): deliver 0.2.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28879ed..a6493df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.2.3", + "version": "0.2.4", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From 4f049f628c92a7277e4aea8a78d442c06c4ca24a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:21:28 -0400 Subject: [PATCH 127/199] build(deps): bump solid-js to 1.9.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6493df..4aadfd7 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ], "dependencies": { "less": "4.3.0", - "solid-js": "1.9.5" + "solid-js": "1.9.7" }, "devDependencies": { "@testing-library/dom": "10.4.0", From f96632232af7de4968616332122c6625aac5a6f9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:22:42 -0400 Subject: [PATCH 128/199] build(deps): bump @types/jest to 30.0.0 @types/jest --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4aadfd7..e5bf3b1 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", - "@types/jest": "29.5.14", + "@types/jest": "30.0.0", "@types/nise": "1.4.5", "@types/node": "22.14.0", "axios": "1.8.4", From b6d645a6d901c27843b31fa2df3df0d953e7456a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:23:56 -0400 Subject: [PATCH 129/199] build(deps): bump @types/node to 24.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5bf3b1..b58100d 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@testing-library/jest-dom": "6.6.3", "@types/jest": "30.0.0", "@types/nise": "1.4.5", - "@types/node": "22.14.0", + "@types/node": "24.0.3", "axios": "1.8.4", "can-stache-loader": "3.0.0", "esbuild": "0.25.2", From 4381f116317f39a6f72d6aee234253971af7f90c Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:24:48 -0400 Subject: [PATCH 130/199] build(deps): bump axios to 1.10.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b58100d..c1e4c3a 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@types/jest": "30.0.0", "@types/nise": "1.4.5", "@types/node": "24.0.3", - "axios": "1.8.4", + "axios": "1.10.0", "can-stache-loader": "3.0.0", "esbuild": "0.25.2", "esbuild-plugin-copy": "2.1.1", From 45d06280b24cf95ad648d3ef2ba29ce51b51b177 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:26:35 -0400 Subject: [PATCH 131/199] build(deps): bump esbuild to 0.25.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1e4c3a..e8b295e 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@types/node": "24.0.3", "axios": "1.10.0", "can-stache-loader": "3.0.0", - "esbuild": "0.25.2", + "esbuild": "0.25.5", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", From 577b4369f88c9a3d5fe5a172585b84cd51108feb Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:29:28 -0400 Subject: [PATCH 132/199] build(deps): bump jsdom to 26.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8b295e..e5a0e61 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jsdom": "26.0.0", + "jsdom": "26.1.0", "nise": "6.1.1", "prettier": "3.5.3", "ts-node": "10.9.2", From 6665cc4b90698b15101e43640b6ff4119d038b11 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:31:07 -0400 Subject: [PATCH 133/199] build(deps): bump vite to 6.3.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5a0e61..4328f17 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "prettier": "3.5.3", "ts-node": "10.9.2", "typescript": "5.8.3", - "vite": "6.2.5", + "vite": "6.3.5", "vite-plugin-solid": "2.11.6", "vitest": "3.1.1" }, From 01dbd894dceaeddf56cf5178cca4020d1f9f3cb7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:32:15 -0400 Subject: [PATCH 134/199] build(deps): bump vitest to 3.2.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4328f17..909730c 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "typescript": "5.8.3", "vite": "6.3.5", "vite-plugin-solid": "2.11.6", - "vitest": "3.1.1" + "vitest": "3.2.4" }, "scripts": { "watch": "npm run watch:clean && node watch.mjs", From 56596e970887ea0fef35ebd42182889e19075049 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 21 Jun 2025 19:38:02 -0400 Subject: [PATCH 135/199] build(release): delivery 0.2.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 909730c..0d76f81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.2.4", + "version": "0.2.5", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From c5958bc4bc6cc88b88c9b64baf25463a13b93a3e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Jun 2025 10:24:51 -0400 Subject: [PATCH 136/199] docs(template): Add release note template to the project --- .github/RELEASE-NOTE-TEMPLATE.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/RELEASE-NOTE-TEMPLATE.md diff --git a/.github/RELEASE-NOTE-TEMPLATE.md b/.github/RELEASE-NOTE-TEMPLATE.md new file mode 100644 index 0000000..42af0df --- /dev/null +++ b/.github/RELEASE-NOTE-TEMPLATE.md @@ -0,0 +1,27 @@ +# What's new in Faz X.X.X + +## YYYY-MM-DD + +We are pleased to announce the release of Faz X.X.X. + +Here are the highlights: + +## Features + +* Describe new features here. [#issue-number](https://github.com/candango/faz/issues/issue-number) + +## Build + +* Describe build changes or improvements here. [#issue-number](https://github.com/candango/faz/issues/issue-number) + +## Refactory + +* Describe refactoring efforts or code structure improvements here. [#issue-number](https://github.com/candango/faz/issues/issue-number) + +## Bug Fixes + +* List bug fixes here, if any. [#issue-number](https://github.com/candango/faz/issues/issue-number) + +## Other Notes + +* Add any additional notes or acknowledgments here. From 0700ce37e876306d1d07d021ba5ba01403d2749c Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Jun 2025 10:28:12 -0400 Subject: [PATCH 137/199] docs(template): add optinal block and example to the release note --- .github/RELEASE-NOTE-TEMPLATE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/RELEASE-NOTE-TEMPLATE.md b/.github/RELEASE-NOTE-TEMPLATE.md index 42af0df..307945b 100644 --- a/.github/RELEASE-NOTE-TEMPLATE.md +++ b/.github/RELEASE-NOTE-TEMPLATE.md @@ -4,6 +4,9 @@ We are pleased to announce the release of Faz X.X.X. + + + Here are the highlights: ## Features From ccd53fe1b5638374ad7a15a7001d8c5338e2cb13 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Jun 2025 10:32:17 -0400 Subject: [PATCH 138/199] feat(paginator): add paginator to the project Fixes: #157 --- src/paginator.ts | 207 +++++++++++++++++++++++++++++++++++++++++ test/paginator.test.ts | 158 +++++++++++++++++++++++++++++++ 2 files changed, 365 insertions(+) create mode 100644 src/paginator.ts create mode 100644 test/paginator.test.ts diff --git a/src/paginator.ts b/src/paginator.ts new file mode 100644 index 0000000..453e3c2 --- /dev/null +++ b/src/paginator.ts @@ -0,0 +1,207 @@ +/** + * Copyright 2018-2025 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Accessor, createSignal, Setter } from "solid-js"; + +/** + * FazPaginator is a pagination utility class built for use with Solid.js + * reactive primitives. + * It manages page, block, and record calculations for paginated collections, + * offering helpers for navigation, state, and boundary conditions. + */ +export class FazPaginator { + + // Number of total records/items (reactive getter/setter) + public count: Accessor; + public setCount: Setter; + + // Current page number (reactive getter/setter) + public page: Accessor; + public setPage: Setter; + + // Number of pages per block (reactive getter/setter) + public perBlock: Accessor; + public setPerBlock: Setter; + + // Number of records per page (reactive getter/setter) + public perPage: Accessor; + public setPerPage: Setter; + + constructor() { + [this.count, this.setCount] = createSignal(0); + [this.page, this.setPage] = createSignal(1); + [this.perBlock, this.setPerBlock] = createSignal(10); + [this.perPage, this.setPerPage] = createSignal(10); + } + + /** + * Returns the total number of blocks needed for the current settings. + */ + get blocks(): number { + const blocksFloor = Math.floor(this.pages / this.perBlock()); + const reminder = this.pages % this.perBlock() > 0 ? 1 : 0; + return blocksFloor + reminder; + } + + /** + * Returns the total number of pages based on count and perPage. + */ + get pages(): number { + if (this.count() === 0) { + return 1; + } + const pagesFloor = Math.floor(this.count() / this.perPage()); + let remainder = this.count() % this.perPage(); + remainder = remainder > 0 ? 1 : 0; + return pagesFloor + remainder; + } + + /** + * Returns a 'safe' current page value, always in the valid range. + * Adjusts the page if it's out of bounds. + */ + get safePage(): number { + if (this.page() < 1) { + this.setPage(1); + } + if (this.pages < this.page()) { + this.setPage(this.pages); + } + return this.page(); + } + + /** + * Returns the current block number (1-based) for the current page. + */ + get block(): number { + if (this.safePage <= this.perBlock()) { + return 1; + } + const currentBlockFloor = Math.floor(this.safePage / this.perBlock()); + const remainder = this.safePage % this.perBlock(); + const addRemainder = remainder > 0 ? 1 : 0; + return currentBlockFloor + addRemainder; + } + + /** + * Returns the first page number in the current block. + */ + get currentFirstPage(): number { + return (this.block * this.perBlock()) - this.perBlock() + 1; + } + + /** + * Returns the last page number in the current block. + * Handles the last block which may have fewer pages. + */ + get currentLastPage() { + if (this.isLastBlock) { + return this.currentFirstPage + this.pagesInLastBlock - 1; + } + return this.block * this.perBlock(); + } + + /** + * Returns the number of pages in the last block. + */ + get pagesInLastBlock(): number { + let lastBlockRemainder = this.pages % this.perBlock(); + return lastBlockRemainder > 0 ? lastBlockRemainder : this.perBlock(); + } + + /** + * Returns an array of page numbers in the current block. + */ + get blockPages(): number[] { + let pages = this.isLastBlock ? this.pagesInLastBlock : this.perBlock(); + return Array(pages).fill(undefined).map((_, i) => i + this.currentFirstPage); + } + + /** + * Checks if a given page is the current page. + * @param page Page number to check + */ + isCurrentPage(page: number): boolean { + return page === this.safePage; + } + + /** + * Is the current page the first page? + */ + get isFirstPage() { + return this.safePage === 1 + } + + /** + * Is the current block the first block? + */ + get isFirstBlock() { + return this.block === 1; + } + + /** + * Is the current page the last page? + */ + get isLastPage() { + return this.safePage >= this.pages; + } + + /** + * Is the current block the last block? + */ + get isLastBlock() { + return this.block >= this.blocks; + } + + /** + * Does the pagination have multiple pages? + */ + get hasMultiplePages() { + return this.pages > 1; + } + + /** + * Does the pagination have multiple blocks? + */ + get hasMultipleBlocks() { + return this.blocks > 1; + } + + /** + * Returns the number of records in the last page. + */ + get recordsInLastPage() { + let lastPageRemainder = this.count() % this.perPage(); + return lastPageRemainder > 0 ? lastPageRemainder : this.perPage(); + } + + /** + * Returns the absolute index of the first record on the current page. + */ + get firstRecord() { + return (this.safePage * this.perPage()) - this.perPage() + 1; + } + + /** + * Returns the absolute index of the last record on the current page. + */ + get lastRecord() { + if (this.isLastPage) { + return this.firstRecord + this.recordsInLastPage - 1; + } + return this.safePage * this.perPage(); + } +} diff --git a/test/paginator.test.ts b/test/paginator.test.ts new file mode 100644 index 0000000..2bfa0e6 --- /dev/null +++ b/test/paginator.test.ts @@ -0,0 +1,158 @@ +/** + * Copyright 2018-2025 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { FazPaginator } from "../src/paginator"; +import { describe, expect, test } from "vitest"; + +describe("Test Paginator", () => { + test("One page", () => { + const paginator = new FazPaginator(); + paginator.setCount(10) + expect(paginator.pages).toBe(1); + expect(paginator.blocks).toBe(1); + + expect(paginator.page()).toBe(1); + expect(paginator.safePage).toBe(1); + expect(paginator.block).toBe(1); + expect(paginator.isLastPage).toBeTruthy(); + expect(paginator.isLastBlock).toBeTruthy(); + paginator.setPage(0) + expect(paginator.safePage).toBe(1); + expect(paginator.page()).toBe(1); + expect(paginator.isLastPage).toBeTruthy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.firstRecord).toBe(1); + expect(paginator.lastRecord).toBe(10); + expect(paginator.recordsInLastPage).toBe(10); + paginator.setPage(2) + expect(paginator.safePage == 2).toBeFalsy(); + expect(paginator.page() == 2).toBeFalsy(); + expect(paginator.safePage).toBe(1); + expect(paginator.page()).toBe(1); + expect(paginator.block).toBe(1); + expect(paginator.hasMultiplePages).toBeFalsy(); + expect(paginator.hasMultipleBlocks).toBeFalsy(); + expect(paginator.isLastPage).toBeTruthy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.pagesInLastBlock).toBe(1); + expect(paginator.firstRecord).toBe(1); + expect(paginator.lastRecord).toBe(10); + expect(paginator.recordsInLastPage).toBe(10); + }); + test("More than one page, one block", () => { + const paginator = new FazPaginator(); + paginator.setCount(91) + expect(paginator.blocks).toBe(1); + expect(paginator.pages).toBe(10); + + expect(paginator.page()).toBe(1); + expect(paginator.safePage).toBe(1); + expect(paginator.block).toBe(1); + expect(paginator.isFirstPage).toBeTruthy(); + expect(paginator.isLastPage).toBeFalsy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.firstRecord).toBe(1); + expect(paginator.lastRecord).toBe(10); + paginator.setPage(2) + expect(paginator.safePage).toBe(2); + expect(paginator.page()).toBe(2); + expect(paginator.block).toBe(1); + expect(paginator.isFirstPage).toBeFalsy(); + expect(paginator.isLastPage).toBeFalsy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.firstRecord).toBe(11); + expect(paginator.lastRecord).toBe(20); + paginator.setPage(8) + expect(paginator.safePage).toBe(8); + expect(paginator.page()).toBe(8); + expect(paginator.block).toBe(1); + expect(paginator.isFirstPage).toBeFalsy(); + expect(paginator.isLastPage).toBeFalsy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.hasMultiplePages).toBeTruthy(); + expect(paginator.hasMultipleBlocks).toBeFalsy(); + expect(paginator.firstRecord).toBe(71); + expect(paginator.lastRecord).toBe(80); + paginator.setPage(10) + expect(paginator.isFirstPage).toBeFalsy(); + expect(paginator.isLastPage).toBeTruthy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.safePage).toBe(10); + expect(paginator.page()).toBe(10); + expect(paginator.block).toBe(1); + expect(paginator.firstRecord).toBe(91); + expect(paginator.lastRecord).toBe(91); + expect(paginator.recordsInLastPage).toBe(1); + expect(paginator.pagesInLastBlock).toBe(10); + }); + test("More than one page, more than one block", () => { + const paginator = new FazPaginator(); + paginator.setCount(340) + expect(paginator.pages).toBe(34); + expect(paginator.blocks).toBe(4); + + expect(paginator.page()).toBe(1); + expect(paginator.safePage).toBe(1); + expect(paginator.block).toBe(1); + expect(paginator.isLastPage).toBeFalsy(); + expect(paginator.isLastBlock).toBeFalsy(); + expect(paginator.firstRecord).toBe(1); + expect(paginator.lastRecord).toBe(10); + paginator.setPage(11) + expect(paginator.isLastPage).toBeFalsy(); + expect(paginator.isLastBlock).toBeFalsy(); + expect(paginator.safePage).toBe(11); + expect(paginator.page()).toBe(11); + expect(paginator.block).toBe(2); + expect(paginator.firstRecord).toBe(101); + expect(paginator.lastRecord).toBe(110); + paginator.setPage(25) + expect(paginator.isLastPage).toBeFalsy(); + expect(paginator.isLastBlock).toBeFalsy(); + expect(paginator.safePage).toBe(25); + expect(paginator.page()).toBe(25); + expect(paginator.block).toBe(3); + expect(paginator.firstRecord).toBe(241); + expect(paginator.lastRecord).toBe(250); + paginator.setPage(32) + expect(paginator.isLastPage).toBeFalsy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.pagesInLastBlock).toBe(4); + expect(paginator.safePage).toBe(32); + expect(paginator.page()).toBe(32); + expect(paginator.block).toBe(4); + expect(paginator.firstRecord).toBe(311); + expect(paginator.lastRecord).toBe(320); + paginator.setPage(34) + expect(paginator.isLastPage).toBeTruthy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.pagesInLastBlock).toBe(4); + expect(paginator.safePage).toBe(34); + expect(paginator.page()).toBe(34); + expect(paginator.block).toBe(4); + expect(paginator.firstRecord).toBe(331); + expect(paginator.lastRecord).toBe(340); + paginator.setPage(35) + expect(paginator.pagesInLastBlock).toBe(4); + expect(paginator.safePage).toBe(34); + expect(paginator.isLastPage).toBeTruthy(); + expect(paginator.isLastBlock).toBeTruthy(); + expect(paginator.page()).toBe(34); + expect(paginator.block).toBe(4); + expect(paginator.firstRecord).toBe(331); + expect(paginator.lastRecord).toBe(340); + }); +}); From 8085bd6142a7437cc779940b3b3a1e1a6c1fde72 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Jun 2025 10:34:44 -0400 Subject: [PATCH 139/199] build(release): deliver 0.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d76f81..d6b97be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.2.5", + "version": "0.3.0", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From 985bec32f79411cc098900d36c62690d1863e459 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Mon, 23 Jun 2025 10:37:14 -0400 Subject: [PATCH 140/199] chore: add paginator types --- types/paginator.d.ts | 109 +++++++++++++++++++++++++++++++++++++++ types/paginator.d.ts.map | 1 + 2 files changed, 110 insertions(+) create mode 100644 types/paginator.d.ts create mode 100644 types/paginator.d.ts.map diff --git a/types/paginator.d.ts b/types/paginator.d.ts new file mode 100644 index 0000000..536548b --- /dev/null +++ b/types/paginator.d.ts @@ -0,0 +1,109 @@ +/** + * Copyright 2018-2025 Flavio Garcia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Accessor, Setter } from "solid-js"; +/** + * FazPaginator is a pagination utility class built for use with Solid.js + * reactive primitives. + * It manages page, block, and record calculations for paginated collections, + * offering helpers for navigation, state, and boundary conditions. + */ +export declare class FazPaginator { + count: Accessor; + setCount: Setter; + page: Accessor; + setPage: Setter; + perBlock: Accessor; + setPerBlock: Setter; + perPage: Accessor; + setPerPage: Setter; + constructor(); + /** + * Returns the total number of blocks needed for the current settings. + */ + get blocks(): number; + /** + * Returns the total number of pages based on count and perPage. + */ + get pages(): number; + /** + * Returns a 'safe' current page value, always in the valid range. + * Adjusts the page if it's out of bounds. + */ + get safePage(): number; + /** + * Returns the current block number (1-based) for the current page. + */ + get block(): number; + /** + * Returns the first page number in the current block. + */ + get currentFirstPage(): number; + /** + * Returns the last page number in the current block. + * Handles the last block which may have fewer pages. + */ + get currentLastPage(): number; + /** + * Returns the number of pages in the last block. + */ + get pagesInLastBlock(): number; + /** + * Returns an array of page numbers in the current block. + */ + get blockPages(): number[]; + /** + * Checks if a given page is the current page. + * @param page Page number to check + */ + isCurrentPage(page: number): boolean; + /** + * Is the current page the first page? + */ + get isFirstPage(): boolean; + /** + * Is the current block the first block? + */ + get isFirstBlock(): boolean; + /** + * Is the current page the last page? + */ + get isLastPage(): boolean; + /** + * Is the current block the last block? + */ + get isLastBlock(): boolean; + /** + * Does the pagination have multiple pages? + */ + get hasMultiplePages(): boolean; + /** + * Does the pagination have multiple blocks? + */ + get hasMultipleBlocks(): boolean; + /** + * Returns the number of records in the last page. + */ + get recordsInLastPage(): number; + /** + * Returns the absolute index of the first record on the current page. + */ + get firstRecord(): number; + /** + * Returns the absolute index of the last record on the current page. + */ + get lastRecord(): number; +} +//# sourceMappingURL=paginator.d.ts.map \ No newline at end of file diff --git a/types/paginator.d.ts.map b/types/paginator.d.ts.map new file mode 100644 index 0000000..3c8b1da --- /dev/null +++ b/types/paginator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"paginator.d.ts","sourceRoot":"","sources":["../src/paginator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,qBAAa,YAAY;IAGd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAGzB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAGxB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAG5B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IASlC;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAInB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAQlB;IAED;;;OAGG;IACH,IAAI,QAAQ,IAAI,MAAM,CAQrB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAQlB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED;;;OAGG;IACH,IAAI,eAAe,WAKlB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAG7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,EAAE,CAGzB;IAED;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIpC;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,YAAY,YAEf;IAED;;OAEG;IACH,IAAI,UAAU,YAEb;IAED;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,gBAAgB,YAEnB;IAED;;OAEG;IACH,IAAI,iBAAiB,YAEpB;IAED;;OAEG;IACH,IAAI,iBAAiB,WAGpB;IAED;;OAEG;IACH,IAAI,WAAW,WAEd;IAED;;OAEG;IACH,IAAI,UAAU,WAKb;CACJ"} \ No newline at end of file From 4cc89bfde7f5f9eec4d1a5b5a3bf8ab791ee2a0e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 24 Jun 2025 15:36:05 -0400 Subject: [PATCH 141/199] feat(element): add faz-role to FazElement Fixes: #158 --- src/element-attributes.ts | 73 +++++++++++++++++++++++++++++++++++++++ src/element.ts | 17 ++++++--- test/element.test.tsx | 6 ++-- 3 files changed, 89 insertions(+), 7 deletions(-) diff --git a/src/element-attributes.ts b/src/element-attributes.ts index e560547..34b7f5f 100644 --- a/src/element-attributes.ts +++ b/src/element-attributes.ts @@ -31,3 +31,76 @@ export interface FazElementAttributes extends JSX.HTMLAttributes { reload?: boolean; link?: string; } + +export type FazAttributeRole = + | "alert" + | "alertdialog" + | "application" + | "article" + | "banner" + | "button" + | "cell" + | "checkbox" + | "columnheader" + | "combobox" + | "complementary" + | "contentinfo" + | "definition" + | "dialog" + | "directory" + | "document" + | "feed" + | "figure" + | "form" + | "grid" + | "gridcell" + | "group" + | "heading" + | "img" + | "link" + | "list" + | "listbox" + | "listitem" + | "log" + | "main" + | "marquee" + | "math" + | "menu" + | "menubar" + | "menuitem" + | "menuitemcheckbox" + | "menuitemradio" + | "meter" + | "navigation" + | "none" + | "note" + | "option" + | "presentation" + | "progressbar" + | "radio" + | "radiogroup" + | "region" + | "row" + | "rowgroup" + | "rowheader" + | "scrollbar" + | "search" + | "searchbox" + | "separator" + | "slider" + | "spinbutton" + | "status" + | "switch" + | "tab" + | "table" + | "tablist" + | "tabpanel" + | "term" + | "textbox" + | "timer" + | "toolbar" + | "tooltip" + | "tree" + | "treegrid" + | "treeitem" + | undefined; diff --git a/src/element.ts b/src/element.ts index 17e5aa5..81362d8 100644 --- a/src/element.ts +++ b/src/element.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { FazAttributeRole } from "./element-attributes"; import { randomId, toBoolean } from "./values"; import { Accessor, createSignal, Setter } from "solid-js"; @@ -41,10 +42,12 @@ export class FazElement extends HTMLElement { public setDisabled: Setter; public extraClasses: Accessor; public setExtraClasses: Setter; - public fazElement: Accessor ; - public setFazElement: Setter ; public fazChildren: Accessor; public setFazChildren: Setter; + public fazElement: Accessor ; + public setFazElement: Setter ; + public fazRole: Accessor ; + public setFazRole: Setter ; public loading: Accessor; public setLoading: Setter; public parent: Accessor; @@ -56,7 +59,6 @@ export class FazElement extends HTMLElement { public childPrefix: string = ""; public renderedChild: ChildNode | null = null; - private initialOuterHTML: string = ""; private comment: FazComment | null = null; public source: any; @@ -69,14 +71,14 @@ export class FazElement extends HTMLElement { [this.debug, this.setDebug] = createSignal(false); [this.disabled, this.setDisabled] = createSignal(false); [this.extraClasses, this.setExtraClasses] = createSignal(""); - [this.fazElement, this.setFazElement] = createSignal(undefined); [this.fazChildren, this.setFazChildren] = createSignal([]); + [this.fazElement, this.setFazElement] = createSignal(undefined); + [this.fazRole, this.setFazRole] = createSignal(undefined); [this.loading, this.setLoading] = createSignal(true); [this.parent, this.setParent] = createSignal(undefined); [this.reload, this.setReload] = createSignal(true); [this.link, this.setLink] = createSignal(undefined); - this.initialOuterHTML = this.outerHTML; if (!this.id) { this.id = randomId(); } @@ -109,6 +111,11 @@ export class FazElement extends HTMLElement { case "link": this.setLink(attribute.value); break; + case "role": + case "fazrole": + case "faz-role": + this.setFazRole(attribute.value as FazAttributeRole); + break; } } diff --git a/test/element.test.tsx b/test/element.test.tsx index 52052c5..a0e4d03 100644 --- a/test/element.test.tsx +++ b/test/element.test.tsx @@ -69,8 +69,8 @@ describe("Test Element", () => { }); test("Properties changed", () => { document.body.innerHTML = ` - - + + ${theText} @@ -82,6 +82,8 @@ describe("Test Element", () => { outerElement.setActive(true); outerElement.setDisabled(true); + expect(outerElement.fazRole()).toBe("list"); + expect(innerElement.fazRole()).toBe("listitem"); expect(outerElement.doActiveChanged).toBeTruthy(); expect(outerElement.doDisabledChanged).toBeTruthy(); expect(outerElement.doExtraClassesChanged).toBeFalsy(); From 2ab12b6bb474a0a4516805af6281fc582ac1adf6 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 24 Jun 2025 15:43:57 -0400 Subject: [PATCH 142/199] chore: remove old form, nav, and pagination components Refs: #110 --- form/form.js | 116 ------ form/index.html | 39 --- nav/index.html | 219 ------------ nav/nav-data-example1.json | 26 -- nav/nav-data-example2.json | 50 --- nav/nav-item.js | 246 ------------- nav/nav-tab.js | 172 --------- nav/nav.js | 419 ---------------------- nav/stache/nav-item.stache | 36 -- nav/stache/nav-tab-content.stache | 1 - nav/stache/nav.stache | 41 --- pagination/index.html | 148 -------- pagination/pagination.js | 565 ------------------------------ 13 files changed, 2078 deletions(-) delete mode 100644 form/form.js delete mode 100644 form/index.html delete mode 100644 nav/index.html delete mode 100644 nav/nav-data-example1.json delete mode 100644 nav/nav-data-example2.json delete mode 100644 nav/nav-item.js delete mode 100644 nav/nav-tab.js delete mode 100644 nav/nav.js delete mode 100644 nav/stache/nav-item.stache delete mode 100644 nav/stache/nav-tab-content.stache delete mode 100644 nav/stache/nav.stache delete mode 100644 pagination/index.html delete mode 100644 pagination/pagination.js diff --git a/form/form.js b/form/form.js deleted file mode 100644 index 1c6b970..0000000 --- a/form/form.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Copyright 2018-2022 Flavio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FazElementItem, FazReactItem} from "../item" -import React from "react" - - -export class FazFormReact extends FazReactItem { - - defineStates(props) { - this.values = {} - this.state['action'] = undefined - this.state['method'] = "get" - this.state['type'] = "primary" - this.state['message'] = undefined - this.state['errors'] = [] - this.state['valueUpdated'] = 0 - if (props.action) { - this.state['action'] = props.action - } - if (props.method) { - this.state['method'] = props.method.toLowerCase() - } - if (props.message) { - this.state['message'] = props.message - } - if (props.errors) { - this.state['errors'] = props.errors - } - this.from = this.from.bind(this) - this.to = this.to.bind(this) - } - - hasValue(index) { - return this.values[index] !== undefined - } - - valueIsEmpty(index) { - if (this.hasValue(index)) { - return this.values[index] === "" - } - return false - } - - /** - * - * @param {String} index - * @param defaultValue - */ - from(index, defaultValue="") { - if(!this.hasValue(index)) { - this.values[index] = defaultValue - } - return this.values[index] - } - - /** - * - * @param {Event} event - * @param {string} index - */ - to(event, index) { - this.values[index] = event.target.value - this.incrementState(index) - } - - get prefix() { - return "faz-form-react" - } - - get hasMessage() { - return this.state.message !== ""; - } - - get hasErrors() { - return this.state.errors.length > 0; - } - -} - -export default class FazFormElement extends FazElementItem { - - constructor(props) { - super(props) - } - - attributesToStates() { - super.attributesToStates() - for (let attribute of this.attributes) { - switch (attribute.name.toLowerCase()) { - case "action": - this.reactItem.state['action'] = attribute.value - break - case "method": - this.reactItem.state['method'] = attribute.value - break - case "active": - this.reactItem.state['active'] = attribute.value - break - } - } - } -} diff --git a/form/index.html b/form/index.html deleted file mode 100644 index 92ed51b..0000000 --- a/form/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - Candango Faz Toolkit - Form - - - - - - - - - - - - - - -
    - -
    - - - - - - - - - diff --git a/nav/index.html b/nav/index.html deleted file mode 100644 index c865261..0000000 --- a/nav/index.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - Candango Faz Toolkit - - - - - - - - - - - - -
    - -

    Navs

    - -
    -
    -
    Basic example
    - - -
    -
    -

    -

    Horizontal alignment

    -
    -
    -
    Centered
    - - -
    -
    -

    -
    -
    -
    Right Aligned and pills
    - -
    -
    -

    -
    -
    -
    Fill and pills
    - -
    -
    -

    -

    Vertical alignment

    -
    -
    -
    Just vertical
    - - -
    -
    -

    -
    -
    -
    Vertical and pills
    - - -
    -
    -

    -

    From a json data source

    -
    -
    -
    Basic example.
    - -
    -
    -

    -
    -
    -
    With children.
    - -
    -
    -

    -

    With children, justified to the right

    -
    -
    -
    With children.
    - -
    -
    -

    -

    With tabs

    - -

    -
    -
    -
    Horizontal.
    - -
    -
    -
    -
    -
    -
    -
    Vertical.
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - diff --git a/nav/nav-data-example1.json b/nav/nav-data-example1.json deleted file mode 100644 index cad6f03..0000000 --- a/nav/nav-data-example1.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "items": [ - { - "active": true, - "type": "faz-nav-item", - "id": "activeData", - "value": "Active Data" - }, - { - "type": "faz-nav-item", - "id": "item1Data1", - "value": "Item 1 Data" - }, - { - "type": "faz-nav-item", - "id": "item2Data", - "value": "Item 2 Data" - }, - { - "type": "faz-nav-item", - "id": "disabledData", - "value": "Disabled Data", - "disabled": true - } - ] -} diff --git a/nav/nav-data-example2.json b/nav/nav-data-example2.json deleted file mode 100644 index c54290e..0000000 --- a/nav/nav-data-example2.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "items": [ - { - "type": "faz-nav-item", - "id": "activeData1", - "value": "Active Data 1" - }, - { - "type": "faz-nav-item", - "id": "item1Data1", - "value": "Item 1 Data 1", - "items": [ - { - "type": "faz-nav-item", - "id": "item1Data1Child1", - "value": "Item1 Data1 Child 1" - }, - { - "type": "faz-nav-item", - "id": "item1Data1Child2", - "value": "Item1 Data1 Child 2", - "items": [ - { - "type": "faz-nav-item", - "id": "item1Data1Child2Grandchild1", - "value": "Item1 Data1 Child 2 Grandchild 1" - }, - { - "type": "faz-nav-item", - "id": "item1Data1Child2Grandchild2", - "value": "Item1 Data1 Child 2 Grandchild 2" - } - ] - } - ] - }, - { - "type": "faz-nav-item", - "id": "item2Data", - "active": true, - "value": "Item 2 Data 1" - }, - { - "type": "faz-nav-item", - "id": "disabledData", - "value": "Disabled Data 1", - "disabled": "true" - } - ] -} diff --git a/nav/nav-item.js b/nav/nav-item.js deleted file mode 100644 index 4a7d963..0000000 --- a/nav/nav-item.js +++ /dev/null @@ -1,246 +0,0 @@ -/** - * Copyright 2018-2023 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FazReactItem} from "../item"; -import React from 'react' -import FazNavElement from "./nav"; - - -export default class FazNavItemReact extends FazReactItem { - - processProps(props) { - super.processProps(props) - this.previousItem = undefined - for(let key in props) { - switch (key) { - case "children": - this.state['items'] = props[key] - break - case "parent": - this.parent = props[key] - let filterMe = this.parent.renderedItems.filter( - item => item.hash === this.hash) - if (!filterMe.length) { - this.parent.renderedItems.push(this) - } - break - case "root": - this.root = props[key] - break - } - } - this.handleClick = this.handleClick.bind(this) - } - - get isDropdown() { - return this.state.items.length > 0 - } - - get isRoot() { - return this.parent === this.root - } - - defineStates(props) { - super.defineStates(props) - if (this.element) { - let elementProps = [] - for (let attribute of this.element.attributes) { - if (attribute.name.toLowerCase() !== "id") { - elementProps[attribute.name.toLowerCase()] = - attribute.value.toLowerCase() - } - } - } - } - - get hasTabs() { - return !!this.state.tabs.length; - } - - get orientation() { - return this.state.vertical ? "vertical" : undefined - } - - get prefix() { - return "faz-nav-react" - } - - get classNames() { - let classes = [] - if(this.isRoot) { - classes.push("nav-item") - if (this.isDropdown) { - classes.push("dropdown") - } - } else { - if (this.isDropdown) { - classes.push("dropdown-submenu") - } - } - return classes.join(" ") - } - - get linkClassNames() { - let classes = ["nav-link"] - - if (!this.isRoot) { - classes.pop() - classes.push("dropdown-item") - } - - if (this.state.active && !this.state.disabled) { - this.root.current = this - classes.push("active") - } - if (this.state.disabled) { - classes.push("disabled") - } - if (this.isDropdown) { - classes.push("dropdown-toggle") - } - return classes.join(" ") - } - - get dropdownClassNames() { - let classes = ["dropdown-menu"] - if (this.state.active && !this.state.disabled) { - classes.push("show") - } - return classes.join(" ") - } - - get containerId() { - return "faz-nav-item-container-".concat(this.state.id) - } - - get link() { - if (!this.isDropdown) { - if (this.isRoot && this.root.hasTabs) { - return `#${super.link}` - } - return super.link; - } - } - - renderItems() { - return
      - {this.state.items.map((item) => { - let content = item.content ? item.content : item.value - return - })} -
    - } - - get role() { - if (this.isDropdown && this.isRoot) { - return "button" - } - if (!this.isDropdown && !this.isRoot) { - return "tab" - } - } - - get dataBsToggle() { - if (this.isDropdown && this.isRoot) { - return "dropdown" - } - } - - get ariaExpanded() { - if (this.isDropdown) { - return this.state.active - } - } - - get content() { - if (this.isDropdown && this.isRoot) { - return this.state.content - } - return super.content - } - - render() { - return ( -
  • - {this.handleClick(event)}} - aria-expanded={this.ariaExpanded} - data-bs-toggle={this.dataBsToggle} - >{this.content} - {this.isDropdown ? this.renderItems() : ""} -
  • - ) - } - - handleClick(event) { - if (this.linkIsVoid && !this.isDropdown) { - event.preventDefault() - } - this.activate() - } - - get activeItems() { - return this.renderedItems.filter(item => { - return item.state.active - }) - } - - setDisabled(value) { - let items = this.parent.state.items - items.filter((item) => item.id === this.state.id).forEach((item)=> { - item.disabled = value - }) - this.parent.updateState({items: items}) - } - - activate() { - this.parent.activeItems.forEach((item) => { - if (item instanceof FazNavItemReact) { - this.previousItem = item - item.deactivate() - } - }) - if (this.root.hasTabs) { - this.root.renderedTabItems.forEach((item) => { - if(item.state.id === this.link.replace("#", "")){ - item.updateState({active: true}) - return - } - item.deactivate() - }) - } - this.updateState({active: true}) - } - - deactivate() { - this.previousItem = undefined - this.updateState({active: false}) - this.renderedItems.forEach((item)=> { - item.deactivate() - }) - } -} diff --git a/nav/nav-tab.js b/nav/nav-tab.js deleted file mode 100644 index 2fb5b28..0000000 --- a/nav/nav-tab.js +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright 2018-2022 Flávio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FazReactItem} from "../item" -import React from "react" - - -export default class FazNavTabReact extends FazReactItem { - - processProps(props) { - super.processProps(props) - this.previousItem = undefined - for(let key in props) { - switch (key) { - case "fade": - this.state['fade'] = props[key] - break - case "parent": - this.parent = props[key] - let filterMe = this.parent.renderedItems.filter( - item => item.hash === this.hash) - if (!filterMe.length) { - this.parent.renderedItems.push(this) - } - break - } - } - this.handleClick = this.handleClick.bind(this) - } - - defineStates(props) { - super.defineStates(props) - if (this.element) { - let elementProps = [] - for (let attribute of this.element.attributes) { - if (attribute.name.toLowerCase() !== "id") { - elementProps[attribute.name.toLowerCase()] = - attribute.value.toLowerCase() - } - } - } - } - - get hasTabs() { - return !!this.state.tabs.length; - } - - get orientation() { - return this.state.vertical ? "vertical" : undefined - } - - get prefix() { - return "faz-nav-tab-content-react" - } - - get classNames() { - let classes = ["tab-pane"] - if (this.state.fade) { - classes.push("fade") - if (this.state.active) { - classes.push("show") - } - } - if (this.state.active) { - classes.push("anchor") - classes.push("active") - } - - return classes.join(" ") - } - - get dropdownClassNames() { - let classes = ["dropdown-menu"] - if (this.state.active && !this.state.disabled) { - classes.push("show") - } - return classes.join(" ") - } - - get containerId() { - return "faz-nav-item-container-".concat(this.state.id) - } - - get link() { - if(!this.isDropdown) { - return super.link - } - } - - get role() { - if (this.isDropdown && this.isRoot) { - return "button" - } - if (!this.isDropdown && !this.isRoot) { - return "tab" - } - } - - get dataBsToggle() { - if (this.isDropdown && this.isRoot) { - return "dropdown" - } - } - - get ariaLabelledby() { - let labelledby = "" - this.parent.navItems.forEach((item) => { - if (this.state.id === item.href) { - labelledby = item.id - return - } - }) - return labelledby - } - - render() { - return
    - {this.content} -
    ; - } - - handleClick(event) { - if (this.linkIsVoid && !this.isDropdown) { - event.preventDefault() - } - this.activate() - } - - get activeItems() { - return this.renderedItems.filter(item => { - return item.state.active - }) - } - - setDisabled(value) { - let items = this.parent.state.items - items.filter((item) => item.id === this.state.id).forEach((item)=> { - item.disabled = value - }) - this.parent.updateState({items: items}) - } - - activate() { - this.parent.activeItems.forEach((item)=> { - this.previousItem = item - item.deactivate() - }) - this.updateState({active: true}) - } - - deactivate() { - this.previousItem = undefined - this.updateState({active: false}) - this.renderedItems.forEach((item)=> { - item.deactivate() - }) - } -} diff --git a/nav/nav.js b/nav/nav.js deleted file mode 100644 index 8ef1b84..0000000 --- a/nav/nav.js +++ /dev/null @@ -1,419 +0,0 @@ -/** - * Copyright 2018-2023 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FazElementItem, FazReactItem} from "../item" -import FazNavItemReact from "./nav-item" -import FazNavTabReact from "./nav-tab" -import React from "react" -import ReactDOM from "react-dom" -import includes from "lodash/includes" - - -class FazNavReact extends FazReactItem { - - defineStates(props) { - this.state['fill'] = false - this.state['justify'] = "left" - this.state['pills'] = false - this.state['source'] = undefined - this.state['vertical'] = false - this.state['loaded'] = false - this.timeout = 0 - this.current = undefined - - this.state['tabs'] = [] - for (let key in props) { - switch (key) { - case "children": - this.state['items'] = props[key] - break - case "fill": - this.state['fill'] = props[key].toLowerCase() === "true" - break - case "justify": - this.state['justify'] = props[key].toLowerCase() - break - case "pills": - this.state['pills'] = props[key].toLowerCase() === "true" - break - case "source": - this.state['source'] = props[key] - break - case "vertical": - this.state['vertical'] = props[key].toLowerCase() === "true" - break - } - } - this.beOverMe = this.beOverMe.bind(this) - this.leaveMe = this.leaveMe.bind(this) - } - - get onEdge() { - if(this.current) { - return !this.current.isDropdown - } - return false - } - - get renderedNavItems() { - return this.renderedItems.filter(item => { - return item instanceof FazNavItemReact - }) - } - - get renderedTabItems() { - return this.renderedItems.filter(item => { - return item instanceof FazNavTabReact - }) - } - - get activeNavItems() { - return this.renderedNavItems.filter(item => { - return item.state.active - }) - } - - get activeItems() { - return this.renderedItems.filter(item => { - return item.state.active - }) - } - - get hasTabs() { - return !!this.tabItems.length; - } - - get orientation() { - return this.state.vertical ? "vertical" : undefined - } - - get isVertical() { - return this.orientation === "vertical" - } - - get prefix() { - return "faz-nav-react" - } - - get classNames() { - let classes = ["nav"] - - if (this.state.pills && !this.hasTabs) { - classes.push("nav-pills") - } - - if (this.state.fill) { - classes.push("nav-fill") - } - - if (this.state.justify === "center") { - classes.push("justify-content-center") - } else if (this.state.justify === "right") { - classes.push("justify-content-end") - } - - if (this.hasTabs) { - classes.push("nav-tabs") - } - - if (this.state.vertical) { - classes.push("flex-column") - } - return classes.join(" ") - } - - get containerId() { - return "faz-nav-container-".concat(this.state.id) - } - - get navItems() { - let itemsToRender = [ - "faz-nav-item", - "faz-nav-item-el" - ] - return this.state.items.filter( - item => includes(itemsToRender, item['type'])) - } - - get tabItems() { - let itemsToRender = [ - "faz-nav-tab" - ] - return this.state.items.filter( - item => includes(itemsToRender, item['type'])) - } - - componentDidMount() { - super.componentDidMount() - // Activate first item if no nav items are selected and nav has tabs - if (this.hasTabs) { - if (!this.activeNavItems.length) { - this.renderedNavItems[0].activate() - } - } - } - - requestDataCallback(response) { - this.updateState({items:response.data.items}) - } - - afterMount() { - if(this.state.source) { - this.requestData().then( - this.updateState({loaded: true}) - ) - } - } - - renderItems() { - return this.navItems.map((item) => { - if (item.element) { - return item.element.toReact(item, this, this) - } - let content = item.content ? item.content : item.value - return - }) - } - - renderTabs() { - return this.tabItems.map((item) => { - if(item.element) { - return item.element.toReact(item, this, this) - } - let content = item.content ? item.content : item.value - return - }) - } - - beOverMe(event) { - clearTimeout(this.timeout) - } - - leaveMe(event) { - clearTimeout(this.timeout) - this.timeout = setTimeout(() => { - this.activeItems.forEach(item => { - if (item.isDropdown && !this.onEdge) { - if (item.previousItem) { - item.previousItem.updateState({active: true}) - } - item.deactivate() - } - }) - }, 250) - } - - render() { - if (this.hasTabs && this.isVertical) { - return ( -
    -
    - {this.renderNav()} -
    -
    -
    - {this.renderTabs()} -
    -
    -
    - ) - } - return ( -
    - {this.renderNav()} - {this.hasTabs ? -
    - {this.renderTabs()} -
    : ""} -
    - ) - } - - renderNav() { - return( -
      - {this.renderItems()} -
    - ) - } - -} - -Object.assign(FazNavReact, { - Item: FazNavItemReact, - Tab: FazNavTabReact -}) - - -export default class FazNavElement extends FazElementItem { - constructor() { - super() - } - - contentLoaded(event) { - super.contentLoaded(event) - let reactItem = - {this.items.map(item=>item.attributesToProps({}))} - - ReactDOM.render(reactItem, this) - this.classList.add("faz-nav-rendered") - } - - attributesToStates() { - super.attributesToStates() - for (let attribute of this.attributes) { - switch (attribute.name) { - case "fill": - this.reactItem.state['fill'] = - attribute.value.toLowerCase() === "true" - break - case "justify": - this.reactItem.state['justify'] = - attribute.value.toLowerCase() - break - case "pills": - this.reactItem.state['pills'] = - attribute.value.toLowerCase() === "true" - break - case "vertical": - this.reactItem.state['vertical'] = - attribute.value.toLowerCase() === "true" - break - } - } - } -} - - -export class FazNavItemElement extends FazElementItem { - constructor() { - super() - this.detach = true - } - - toReact(props, parent, root) { - props['parent'] = parent - if (root) { - props['root'] = root - } - return - {this.items.map(item=>item.attributesToProps({root: root, - parent: parent}))} - - } - - attributesToProps(addProps = []) { - let props = super.attributesToProps(addProps) - // Fixing with original nodes and not dropdowns - if (this.originalNodes.length && !this.items.length) { - if (this.parentElement.tagName.toLowerCase() === "faz-nav-el") { - props['content'] = undefined - } - } - let hasTitle = false - if (this.items.length) { - this.items.forEach(item => { - if (item.constructor.name === "FazNavItemTitleElement") { - props['content'] = item.innerHTML - } - }) - } - if (hasTitle) { - console.log(props) - } - return props; - } -} - -export class FazNavItemTitleElement extends FazElementItem { - constructor() { - super() - this.detach = true - } -} - - -export class FazNavTabElement extends FazElementItem { - constructor() { - super() - this.detach = true - this.fade = false - for(let attribute of this.attributes) { - switch (attribute.name) { - case "fade": - this.fade = attribute.value - break - } - } - } - - toReact(props, parent, root) { - props['parent'] = parent - if (root) { - props['root'] = root - } - return - - } -} - -customElements.define("faz-nav", FazNavElement) -customElements.define("faz-nav-item", FazNavItemElement) -customElements.define("faz-nav-item-content", FazNavItemTitleElement) -customElements.define("faz-nav-tab", FazNavTabElement) diff --git a/nav/stache/nav-item.stache b/nav/stache/nav-item.stache deleted file mode 100644 index 4ca7946..0000000 --- a/nav/stache/nav-item.stache +++ /dev/null @@ -1,36 +0,0 @@ -{{# isRoot }} - {{# ../dropdown }} - - - {{else}} - - - - {{/ ../dropdown }} -{{else}} - {{# dropdown }} - - - {{else}} -
  • - - {{ content }} -
  • - {{/ dropdown }} -{{/ isRoot }} diff --git a/nav/stache/nav-tab-content.stache b/nav/stache/nav-tab-content.stache deleted file mode 100644 index 5686ab4..0000000 --- a/nav/stache/nav-tab-content.stache +++ /dev/null @@ -1 +0,0 @@ -
    {{{ content }}}
    diff --git a/nav/stache/nav.stache b/nav/stache/nav.stache deleted file mode 100644 index 1bbeca2..0000000 --- a/nav/stache/nav.stache +++ /dev/null @@ -1,41 +0,0 @@ -{{# this.isLoading}} -
    Loading...
    -{{ else }} - {{#hasTabs}} - {{#if(../vertical)}} -
    -
    -
    - {{#each (scope.top.items, item=value)}} - {{ item.html }} - {{/each}} -
    -
    -
    -
    - {{#each (scope.top.tabs, tab=value)}} - {{ tab.html }} - {{/each}} -
    -
    -
    - {{else}} -
    - {{#each (../items, item=value)}} - {{ item.html }} - {{/each}} -
    - {{/if}} -
    - {{#each (../tabs, tab=value)}} - {{ tab.html }} - {{/each}} -
    - {{else}} - - {{/hasTabs}} -{{/ this.isLoading }} diff --git a/pagination/index.html b/pagination/index.html deleted file mode 100644 index 5039f72..0000000 --- a/pagination/index.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - Candango Faz Toolkit - Alerts - - - - - - - - - - - - - -
    -

    Pagination

    -
    -
    -

    One page

    -

    Pagination has count equals 9 (9 records counted).

    -

    Records per page(perPage property) by default is 10 resulting in a pagination with only one page.

    -

    All navigation buttons won't be displayed.

    -
    -
    -
    -
    -
    -
    -

    Multiple pages and one block

    -

    A pagination with count equals 91 resulting in multiple pages.

    -

    Pages per page(perBlock property) by default is 10 resulting in a pagination with only one block.

    -

    All block navigation buttons won't be displayed.

    -
    -
    -
    -
    -
    -
    -

    Multiple pages and multiple blocks

    -

    A pagination with count equals 340 resulting in multiple pages and multiple blocks.

    -
    -
    -
    -
    -
    -
    -

    Start on a defined page

    -

    Set current page as 173.

    -

    The pagination will be rendered with the page 173 selected at the block of pages 18, displaying pages from 171 to 180.

    -

    Block navigation buttons will be displayed.

    -
    -
    -
    -
    -
    -
    -

    Disabled pagination

    -

    Pagination is disabled but we still show the - current page.

    -
    -
    - -
    -
    -
    -
    -

    Initial callback to be called after pagination is rendered

    -
    -
    -
    -
    -
    -
    -

    Page callback to be called after page is changed

    -
    -
    -
    -
    -
    -
    -

    Negative page value

    -

    A negative page value will be informed - defaulting the current page value to 1 and sending a warning at - the console.

    -
    -
    -
    -
    -
    -
    -

    Page value bigger than the page count

    -

    A page valu bigger than the page count will be - informed defaulting the current page value as the page count - and sending a warning at the console.

    -
    -
    -
    -
    -
    - - -
    - - - - - - - - - - - - - - diff --git a/pagination/pagination.js b/pagination/pagination.js deleted file mode 100644 index 17b33b4..0000000 --- a/pagination/pagination.js +++ /dev/null @@ -1,565 +0,0 @@ -/** - * Copyright 2018-2022 Flávio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {FazElementItem, FazReactItem} from "../item" -import ReactDOM from "react-dom" -import React from "react" - -export class FazReactPagination extends FazReactItem { - - defineStates(props) { - super.defineStates(props); - this.state['ariaLabel'] = undefined - // Used to be records - this.state['count'] = 0 - // Used to be currentPage - this.state['page'] = 1 - // Used to be pagesPerBlock - this.state['perBlock'] = 10 - // Used to be pagesPerPage - this.state['perPage'] = 10 - - this.state['labels'] = { - first : "First", - firstTooltip : "Go to the first page", - last : "Last", - lastTooltip : "Go to the last page", - previous : "Previous", - previousBlock : "Previous {perBlock}", - previousTooltip : "Go to the previous page", - previousBlockTooltip : "Go to the previous {perBlock} pages", - next : "Next", - nextBlock : "Next {perBlock}", - nextBlockTooltip : "Go to the next {perBlock} pages", - nextTooltip : "Go to the next page", - } - this.state['initCallback'] = undefined - this.state['pageCallback'] = undefined - - for(let key in props) { - switch (key) { - case "ariaLabel": - this.state['ariaLabel'] = props[key] - break - case "count": - this.state['count'] = parseInt(props[key]) - break - case "page": - this.state['page'] =parseInt(props[key]) - break - case "perBlock": - this.state['perBlock'] = parseInt(props[key]) - break - case "perPage": - this.state['perPage'] = parseInt(props[key]) - break - } - } - - } - - afterMount() { - this.callInitCallback() - } - - get prefix() { - return "faz-react-pagination" - } - - get containerId() { - return "faz-pagination-container-".concat(this.state.id) - } - - render() { - return
    - {this.state.debug ? this.renderDebug() : ""}
    - } - - renderFirstPage() { - return
  • - {this.isFirstPage ? - {this.state.labels.first} : - this.goToFirstPage(event)} - href={this.paginatedLink(1)} - data-bs-toggle="tooltip" - data-bs-placement="top" - title={this.state.labels.firstTooltip} - >{this.state.labels.first}} -
  • - } - - renderLastPage() { - return
  • - {this.isLastPage ? - {this.state.labels.last} : - this.goToLastPage(event)} - href={this.paginatedLink(this.pages)} - data-bs-toggle="tooltip" - data-bs-placement="top" - title={this.state.labels.lastTooltip} - >{this.state.labels.last}} -
  • - } - - renderPreviousPage() { - let page = this.state.page - 1 - return
  • - {this.isFirstPage ? - {this.state.labels.previous} : - this.goToPreviousPage(event)} - href={this.paginatedLink(page)} - data-bs-toggle="tooltip" - data-bs-placement="top" - title={this.state.labels.previousTooltip} - >{this.state.labels.previous}} -
  • - } - - renderPreviousBlock() { - let page = this.currentFirstPage - 1 - let label = this.state.labels.previousBlock.replace("{perBlock}", - this.state.perBlock) - let tooltipLabel = this.state.labels.previousBlockTooltip.replace( - "{perBlock}", this.state.perBlock) - return
  • - {this.isFirstBlock ? - "" : - this.goToPreviousBlock(event)} - href={this.paginatedLink(page)} - data-bs-toggle="tooltip" - data-bs-placement="top" - title={tooltipLabel}>{label}} -
  • - } - - renderNextPage() { - let page = this.state.page + 1 - return
  • - {this.isLastPage ? - {this.state.labels.next} : - this.goToNextPage(event)} - href={this.paginatedLink(page)} - data-bs-toggle="tooltip" - data-bs-placement="top" - title={this.state.labels.nextTooltip} - >{this.state.labels.next}} -
  • - } - - renderNextBlock() { - let page = this.currentLastPage + 1 - let label = this.state.labels.nextBlock.replace("{perBlock}", - this.state.perBlock) - let tooltipLabel = this.state.labels.nextBlockTooltip.replace( - "{perBlock}", this.state.perBlock) - return
  • - {this.isLastPage ? - "" : - this.goToNextBlock(event)} - href={this.paginatedLink(page)} - data-bs-toggle="tooltip" - data-bs-placement="top" - title={tooltipLabel}>{label}} -
  • - } - - renderNumberedPages() { - return this.pagesInCurrentBlock.map((page) => -
  • - {this.isCurrentPage(page) ? - {page} : - this.goToPage(event, page)} - href={this.paginatedLink(page)}>{page}} -
  • - ) - } - - renderDebug() { - let accordionId = "faz-pagination-debug-".concat(this.state.id) - let collapseId = accordionId.concat("-", this.state.id) - return (
    -
    -

    - -

    -
    -
    -
    Component State Information
    -
    -
    Disabled:
    -
    {this.disabled}
    -
    -
    Records Information
    -
    -
    Records:
    -
    {this.state.count}
    -
    Current First Record:
    -
    {this.currentFirstRecord}
    -
    Current Last Record:
    -
    {this.currentLastRecord}
    -
    -
    Pages Information
    -
    -
    Pages:
    -
    {this.pages}
    -
    Current Page:
    -
    {this.state.page}
    -
    Current Page Computed:
    -
    {this.pageComputed}
    -
    Current First Page:
    -
    {this.currentFirstPage}
    -
    Current Last Page:
    -
    {this.currentLastPage}
    -
    Records per page:
    -
    {this.state.perPage}
    -
    Records in last page:
    -
    {this.recordsInLastPage}
    -
    Is first page:
    -
    - {this.isFirstPage ? "True" : "False"} -
    -
    Is last page:
    -
    - {this.isLastPage ? "True" : "False"} -
    -
    -
    Blocks Information
    -
    -
    Blocks:
    -
    {this.blocks}
    -
    Current Block:
    -
    {this.currentBlock}
    -
    Pages per Block:
    -
    {this.state.perBlock}
    -
    Pages in last Block:
    -
    {this.pagesInLastBlock}
    -
    Is Last Block:
    -
    - {this.isLastBlock ? "True" : "False"} -
    -
    Has Multiple Blocks:
    -
    - {this.hasMultipleBlocks ? "True" : "False"} -
    -
    -
    -
    -
    -
    ) - } - - get firstPreviousButtonClass() { - let classes = ["page-item"] - if (this.isFirstPage || this.disabled) { - classes.push("disabled") - } - return classes.join(" ") - } - - get previousBlockButtonClass() { - let classes = ["page-item"] - if (this.isFirstBlock || this.disabled) { - classes.push("disabled") - } - return classes.join(" ") - } - - get lastNextButtonClass() { - let classes = ["page-item"] - if (this.isLastPage || this.disabled) { - classes.push("disabled") - } - return classes.join(" ") - } - - get nextBlockButtonClass() { - let classes = ["page-item"] - if (this.isLastBlock || this.disabled) { - classes.push("disabled") - } - return classes.join(" ") - } - - getButtonClass(page) { - let classes = ["page-item"] - if (this.isCurrentPage(page)) { - classes.push("active") - } - if (this.disabled && !this.isCurrentPage(page)) { - classes.push("disabled") - } - return classes.join(" ") - } - - get pages() { - if (this.state.count === 0) { - return 1 - } - let pagesFloor = Math.floor(this.state.count/this.state.perPage) - let remainder = this.state.count % this.state.perPage - let addRemainder = remainder > 0 ? 1 : 0 - return pagesFloor + addRemainder - } - - /** - * Page computed is used to protect the page limit. - * - * If the state page is out of limits of 1 and pages we fix the state - * page value. - * - * @returns {number|*} - */ - get pageComputed() { - if (this.state.page < 1) { - this.updateState({page: 1}) - } - if (this.pages < this.state.page) { - this.updateState({page: this.pages}) - } - return this.state.page - } - - get recordsInLastPage() { - let lastPageRemainder = this.state.count % this.state.perPage; - return lastPageRemainder > 0 ? lastPageRemainder : this.state.perPage - } - - get blocks() { - let blocksFloor = Math.floor(this.pages / this.state.perBlock); - let addReminder = this.pages % this.state.perBlock > 0 ? 1 : 0; - return blocksFloor + addReminder; - } - - get pagesInLastBlock() { - let lastBlockRemainder = this.pages % this.state.perBlock - return lastBlockRemainder > 0 ? lastBlockRemainder : - this.state.perBlock - } - - get currentFirstRecord() { - return (this.pageComputed * this.state.perPage) - this.state.perPage + 1 - } - - get currentLastRecord() { - if (this.isLastPage) { - return this.currentFirstRecord + this.recordsInLastPage - 1 - } - return this.pageComputed * this.state.perPage - } - - get currentBlock() { - if (this.pageComputed <= this.state.perBlock) { - return 1 - } - let currentBlockFloor = Math.floor( - this.pageComputed / this.state.perBlock) - let remainder = this.pageComputed % this.state.perBlock - let addRemainder = remainder > 0 ? 1 : 0 - - return currentBlockFloor + addRemainder - } - - get currentFirstPage() { - return (this.currentBlock * this.state.perBlock) - - this.state.perBlock + 1 - } - - get currentLastPage() { - if (this.isLastBlock) { - return this.currentFirstPage + this.pagesInLastBlock - 1 - } - return this.currentBlock * this.state.perBlock - } - - get pagesInCurrentBlock() { - let pages = this.isLastBlock ? - this.pagesInLastBlock : this.state.perBlock - return Array(pages).fill( - undefined).map((_, i) => i + this.currentFirstPage) - } - - isCurrentPage(page) { - return page === this.pageComputed - } - - get isFirstPage() { - return this.pageComputed === 1 - } - - get isFirstBlock() { - return this.currentBlock === 1 - } - - get isLastPage() { - return this.pageComputed >= this.pages - } - - get isLastBlock() { - return this.currentBlock >= this.blocks - } - - get hasMultiplePages() { - return this.pages > 1 - } - - get hasMultipleBlocks() { - return this.blocks > 1 - } - - /** - * Returns the nav item href. If item is disabled a javascript void - * function will be placed to avoid any action. - * - * @param page - * @returns {string} - */ - paginatedLink(page) { - return this.link.replace("{page}", page) - } - - callInitCallback() { - if (this.state.initCallback !== undefined) { - this.state.initCallback(this); - } - } - - callPageCallback(page) { - if (this.state.pageCallback !== undefined) { - this.state.pageCallback(page, this); - } - } - - goToPage(event, page) { - this.updateState({page: page}) - this.callPageCallback(page) - } - - goToFirstPage(event) { - this.goToPage(event, 1); - } - - goToLastPage(event) { - this.goToPage(event, this.pages); - } - - goToPreviousPage(event) { - this.goToPage(event, this.state.page - 1) - } - - goToPreviousBlock(event) { - this.goToPage(event, this.currentFirstPage - 1) - } - - goToNextPage(event) { - this.goToPage(event, this.state.page + 1); - } - - goToNextBlock(event) { - this.goToPage(event, this.currentLastPage + 1) - } -} - -export default class FazPaginationElement extends FazElementItem { - constructor(props) { - super(props) - } - - show() { - ReactDOM.render( - , this) - } - - attributesToStates() { - super.attributesToStates(); - for(let attribute of this.attributes) { - switch (attribute.name) { - case "aria-label": - this.reactItem.state['ariaLabel'] = attribute.value - break; - case "count": - this.reactItem.state['count'] = parseInt(attribute.value) - break; - case "init-callback": - this.reactItem.state['initCallback'] = eval( - attribute.value) - break; - case "page-callback": - this.reactItem.state['pageCallback'] = eval( - attribute.value) - break; - } - } - let pageAttribute = this.attributes.getNamedItem("page") - if (pageAttribute) { - let page = parseInt(pageAttribute.value) - if (page > this.reactItem.pages) { - let warning = "You cannot inform a page bigger than than the " + - "page count(currently {pages} pages). It was informed " + - "{page} as page to be set. The current page will default " + - "to {pages} page(the last page), but please inform a " + - "correct the value next time.\n\nSee element:" - console.warn(warning.replaceAll( - "{pages}", this.reactItem.pages).replaceAll( - "{page}", page.toString())) - console.log(this) - page = this.reactItem.pages - } - if (page > 1) { - this.reactItem.state['page'] = page - } else { - let warning = "You cannot inform a page smaller than than " + - "1(the first page). It was informed " + - "{page} as page to be set. Will keep the current page " + - "will default to 1, but please inform a correct the " + - "value next time.\n\nSee element:" - console.warn(warning.replaceAll("{page}", page.toString())) - console.log(this) - } - - } - } -} - -customElements.define("faz-pagination", FazPaginationElement) From 6ed0e27787b4305409c57696d0bd3447862c81d9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 24 Jun 2025 15:46:15 -0400 Subject: [PATCH 143/199] chore(element): add element and element-attributes types Refs: #158 --- types/element-attributes.d.ts | 1 + types/element-attributes.d.ts.map | 2 +- types/element.d.ts | 8 +++++--- types/element.d.ts.map | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/types/element-attributes.d.ts b/types/element-attributes.d.ts index 2dc18c2..44bee96 100644 --- a/types/element-attributes.d.ts +++ b/types/element-attributes.d.ts @@ -29,4 +29,5 @@ export interface FazElementAttributes extends JSX.HTMLAttributes { reload?: boolean; link?: string; } +export type FazAttributeRole = "alert" | "alertdialog" | "application" | "article" | "banner" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "dialog" | "directory" | "document" | "feed" | "figure" | "form" | "grid" | "gridcell" | "group" | "heading" | "img" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "meter" | "navigation" | "none" | "note" | "option" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem" | undefined; //# sourceMappingURL=element-attributes.d.ts.map \ No newline at end of file diff --git a/types/element-attributes.d.ts.map b/types/element-attributes.d.ts.map index d803b2a..8f4eac0 100644 --- a/types/element-attributes.d.ts.map +++ b/types/element-attributes.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element-attributes.d.ts","sourceRoot":"","sources":["../src/element-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"} \ No newline at end of file +{"version":3,"file":"element-attributes.d.ts","sourceRoot":"","sources":["../src/element-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,gBAAgB,GACpB,OAAO,GACP,aAAa,GACb,aAAa,GACb,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,UAAU,GACV,cAAc,GACd,UAAU,GACV,eAAe,GACf,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,SAAS,GACT,KAAK,GACL,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,kBAAkB,GAClB,eAAe,GACf,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,QAAQ,GACR,cAAc,GACd,aAAa,GACb,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,KAAK,GACL,UAAU,GACV,WAAW,GACX,WAAW,GACX,QAAQ,GACR,WAAW,GACX,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,SAAS,CAAC"} \ No newline at end of file diff --git a/types/element.d.ts b/types/element.d.ts index ff888fb..2e87b5e 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { FazAttributeRole } from "./element-attributes"; import { Accessor, Setter } from "solid-js"; export interface FazComment extends Comment { fazElement: Accessor; @@ -35,10 +36,12 @@ export declare class FazElement extends HTMLElement { setDisabled: Setter; extraClasses: Accessor; setExtraClasses: Setter; - fazElement: Accessor; - setFazElement: Setter; fazChildren: Accessor; setFazChildren: Setter; + fazElement: Accessor; + setFazElement: Setter; + fazRole: Accessor; + setFazRole: Setter; loading: Accessor; setLoading: Setter; parent: Accessor; @@ -49,7 +52,6 @@ export declare class FazElement extends HTMLElement { setLink: Setter; childPrefix: string; renderedChild: ChildNode | null; - private initialOuterHTML; private comment; source: any; constructor(); diff --git a/types/element.d.ts.map b/types/element.d.ts.map index 3b831e6..9cd5881 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SA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B,UAAU,IAAG,IAAI;IAEjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAejB,IAAI;IAEJ,IAAI;IAEJ,MAAM;IAUN,WAAW,IAAI,IAAI;CAYtB"} \ No newline at end of file From 728eb21f57c2d6af1026619b5a416fadf2adaf89 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 24 Jun 2025 15:49:52 -0400 Subject: [PATCH 144/199] build(release): delivery 0.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d6b97be..31225b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.3.0", + "version": "0.3.1", "description": "JS HTML Web Components", "main": "./dist/index.js", "module": "./dist/js/index.js", From f96818682778dd58075291b389ddc0f42f8310c8 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Thu, 26 Jun 2025 22:27:52 -0400 Subject: [PATCH 145/199] refactor(tsconfig): tsconfig.types now extends tsconfg Fixes: #159 --- package.json | 9 ++++----- tsconfig.types.json | 38 +++++++++++++------------------------- 2 files changed, 17 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 31225b3..5a66df1 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,13 @@ "name": "faz", "version": "0.3.1", "description": "JS HTML Web Components", - "main": "./dist/index.js", - "module": "./dist/js/index.js", + "main": "dist/index.js", + "module": "dist/js/index.js", "mainFields": [ "module", "main" ], - "types": "./types/index.d.ts", + "types": "dist/types/index.d.ts", "files": [ "dist", "src", @@ -36,7 +36,6 @@ "solid-js": "1.9.7" }, "devDependencies": { - "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", "@types/jest": "30.0.0", "@types/nise": "1.4.5", @@ -61,7 +60,7 @@ "watch:clean": "rm -rf watch/dist", "showcase": "http-server & npm run watch", "esbuild": "node build.mjs", - "ts:build": "npm run ts:clean && npm run ts:declaration", + "ts:build": "npm run ts:clean && npm run ts:declaration && cp -r types dist", "ts:declaration": "tsc -p tsconfig.types.json -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.types.tsbuildinfo", "ts:clean": "rm -rf tsconfig.tsbuildinfo types/*", "build": "npm run build:clean && npm run lessc && npm run esbuild && npm run ts:build", diff --git a/tsconfig.types.json b/tsconfig.types.json index 16d9dd6..76d3ae9 100644 --- a/tsconfig.types.json +++ b/tsconfig.types.json @@ -1,26 +1,14 @@ -{ - "include": ["tsconfig.json", "src/**/*"], - "exclude": ["jest.config.ts", "vitest.config.ts"], - "compilerOptions": { - "composite": true, - "target": "ESNext", - "lib": ["esnext", "dom", "dom.iterable"], - "jsx": "preserve", - "jsxImportSource": "solid-js", - "rootDir": "./src", - "moduleResolution": "Node", - "types": [ - "vite/client", - "@testing-library/jest-dom" - ], - "declaration": true, - "declarationMap": true, - "outDir": "./dist", - "isolatedModules": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitAny": true, - "skipLibCheck": true - } +{ + "extends": "./tsconfig", + "include": ["src/**/*"], + "exclude": ["jest.config.ts", "vitest.config.ts"], + "compilerOptions": { + "composite": true, + "rootDir": "./src", + "types": [ + "vite/client", + "@testing-library/jest-dom" + ], + "outDir": "./dist", + } } From b13ef1beaec391f8b6353c7639e6768c8b43e5c7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Thu, 26 Jun 2025 22:33:03 -0400 Subject: [PATCH 146/199] feat(element): optimize connectedCallback with Promise.resolve Fixes: #160 --- src/element.ts | 39 ++++++++++++++++++++++++++++++++++++--- test/element.test.tsx | 34 +++++++++++++++++++--------------- types/element.d.ts | 1 + types/element.d.ts.map | 2 +- 4 files changed, 57 insertions(+), 19 deletions(-) diff --git a/src/element.ts b/src/element.ts index 81362d8..678ce17 100644 --- a/src/element.ts +++ b/src/element.ts @@ -18,18 +18,22 @@ import { FazAttributeRole } from "./element-attributes"; import { randomId, toBoolean } from "./values"; import { Accessor, createSignal, Setter } from "solid-js"; +// FazComment extends the standard Comment node to include FazElement reactivity. export interface FazComment extends Comment { fazElement: Accessor ; setFazElement: Setter ; } +// FazNode extends ChildNode to include FazElement reactivity. export interface FazNode extends ChildNode { fazElement: Accessor ; setFazElement: Setter ; } +// Main FazElement class, extends HTMLElement to provide custom logic and reactivity for web components. export class FazElement extends HTMLElement { + // Reactive properties for component state. public active: Accessor; public setActive: Setter; public connected: Accessor; @@ -48,6 +52,7 @@ export class FazElement extends HTMLElement { public setFazElement: Setter ; public fazRole: Accessor ; public setFazRole: Setter ; + public idGenerated: boolean = false; public loading: Accessor; public setLoading: Setter; public parent: Accessor; @@ -57,11 +62,13 @@ export class FazElement extends HTMLElement { public link: Accessor; public setLink: Setter; + // Prefix for children and rendered child tracking. public childPrefix: string = ""; public renderedChild: ChildNode | null = null; private comment: FazComment | null = null; public source: any; + // Constructor initializes reactivity, attributes, and default state. constructor() { super(); @@ -81,6 +88,7 @@ export class FazElement extends HTMLElement { if (!this.id) { this.id = randomId(); + this.idGenerated = true; } for (const attribute of this.attributes) { @@ -119,8 +127,10 @@ export class FazElement extends HTMLElement { } } + // Store tag name in dataset for reference. this.dataset['faz_element_item'] = this.tagName; this.childPrefix = "__child-prefix__"; + // If source is present, remove all child nodes (for virtualized or remote sourced components). if (this.source) { console.debug(`The element ${this.id} has a source attribute. All child nodes will be removed.`); this.childNodes.forEach((node) => { @@ -131,16 +141,19 @@ export class FazElement extends HTMLElement { [this.comment.fazElement, this.comment.setFazElement] = createSignal(this); } + // Check if a specific extra class is present. hasExtraClass(value: string): boolean { const extraClasses = this.extraClasses().trim().split(" "); return extraClasses.find( item => item == value.toLowerCase()) !== undefined; } + // Check if any extra classes are present. hasExtraClasses(): boolean { return this.extraClasses().trim().split(" ").length > 0; } + // Add a new extra class if not already present. pushExtraClass(value: string) { value = value.trim(); if (!this.hasExtraClass(value)) { @@ -150,6 +163,7 @@ export class FazElement extends HTMLElement { } } + // Resolve the link attribute, returning a void href if disabled or missing. resolveLink(): string | undefined { // From: https://stackoverflow.com/a/66717705/2887989 let voidHref = "#!"; @@ -160,6 +174,7 @@ export class FazElement extends HTMLElement { return this.link(); } + // Add a FazElement child to the list of reactive children. addFazChild(child: FazElement) { if (this.fazChildren().indexOf(child) === -1) { const children = {...this.fazChildren()} as FazElement[]; @@ -168,6 +183,7 @@ export class FazElement extends HTMLElement { } } + // Remove a FazElement child from the reactive children array. removeFazChild(child: FazElement) { if (this.fazChildren().indexOf(child) !== -1) { const children = {...this.fazChildren()} as FazElement[]; @@ -175,16 +191,19 @@ export class FazElement extends HTMLElement { } } + // Get all children that are currently active. get activeFazChildren(): FazElement[] { return this.fazChildren().filter(child => { return child.active(); }) } + // Get the first child node (used as content root). get contentChild(): ChildNode | null { return this.firstChild; } + // Check if the link attribute is void (should not navigate). get linkIsVoid() { if (this.disabled()) { return true; @@ -193,15 +212,19 @@ export class FazElement extends HTMLElement { return linkResolved === undefined || linkResolved === "" || linkResolved === "#" || linkResolved === "#!"; } + // Add a child node to the content container. addChild(node: T): T { this.contentChild?.appendChild(node); return node; } + // Lifecycle hook, can be overridden by subclasses for logic after showing. afterShow():void {} + // Lifecycle hook, can be overridden by subclasses for logic before showing. beforeShow():void {} + // Remove and collect all children, update fazChildren list. collectChildren() { const children:Node[] = []; const items: FazElement[] = []; @@ -223,6 +246,7 @@ export class FazElement extends HTMLElement { return children; } + // Place previously collected children back into the DOM. placeBackChildren(children: Node[]) { if (this.loading()) { children.forEach(child => { @@ -231,13 +255,18 @@ export class FazElement extends HTMLElement { } } + // Standard web component lifecycle method: called when element is inserted + // into the DOM. connectedCallback() { + // Insert the comment node as a placeholder. if (this.comment){ this.before(this.comment); } - new Promise((resolve) => { - setTimeout(()=>resolve(null), 0); - }).then(()=> { + // Defer rendering and state updates until the next microtask to ensure + // all child custom elements are upgraded. + // This is necessary because, during connectedCallback, child elements + // may not be fully constructed or upgraded yet. + Promise.resolve().then(()=> { if (this.loading()) { this.render(); } @@ -246,10 +275,13 @@ export class FazElement extends HTMLElement { }); } + // Lifecycle method to be overridden for loading logic. load() {} + // Lifecycle method to be overridden for showing logic. show() {} + // Main render method: load data, prepare, manipulate, and restore children. render() { this.load(); this.beforeShow(); @@ -260,6 +292,7 @@ export class FazElement extends HTMLElement { this.afterShow(); } + // Cleans Faz tags and sets fazElement on all child nodes. cleanFazTag(): void { this.childNodes.forEach((node) => { const fNode = node as FazNode; diff --git a/test/element.test.tsx b/test/element.test.tsx index a0e4d03..b5eb5cf 100644 --- a/test/element.test.tsx +++ b/test/element.test.tsx @@ -16,10 +16,9 @@ import { FazElement, FazNode } from "../src/element"; import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest"; -import { waitFor } from "@testing-library/dom"; import { createEffect, createRoot } from "solid-js"; import { render} from "solid-js/web"; -import { allComments } from "../src/test"; +import { allComments} from "../src/test"; class TestElement extends FazElement { @@ -73,17 +72,24 @@ describe("Test Element", () => { ${theText} + + Another inner +
    `; const comments = allComments(document.body); - const [outerElementComment, innerElementComment] = comments; + const [outerElementComment, innerElementComment, anotherInnerElementComment] = comments; const outerElement = outerElementComment.fazElement() as TestElement; const innerElement = innerElementComment.fazElement() as TestElement; - + const anotherInnerElement = anotherInnerElementComment.fazElement() as TestElement; outerElement.setActive(true); outerElement.setDisabled(true); + expect(outerElement.idGenerated).toBeFalsy(); + expect(innerElement.idGenerated).toBeFalsy(); + expect(anotherInnerElement.idGenerated).toBeTruthy(); expect(outerElement.fazRole()).toBe("list"); expect(innerElement.fazRole()).toBe("listitem"); + expect(anotherInnerElement.fazRole()).toBe("listitem"); expect(outerElement.doActiveChanged).toBeTruthy(); expect(outerElement.doDisabledChanged).toBeTruthy(); expect(outerElement.doExtraClassesChanged).toBeFalsy(); @@ -128,16 +134,14 @@ describe("Test Element", () => {
    `; - vitest.runAllTimers(); - await waitFor(() => { - const outerDiv = document.getElementById("faz_test_outer") as unknown as FazNode; - const innerDiv = document.getElementById("faz_test_inner") as unknown as FazNode; - const outerElement = outerDiv.fazElement(); - const innerElement = innerDiv.fazElement(); - expect(outerElement?.fazChildren().length).toBe(1); - expect(outerElement?.fazChildren()[0]).toBe(innerElement); - expect(innerElement?.parent()).toBe(outerElement); - expect((outerDiv as unknown as Element).tagName).toBe("DIV"); - }); + await vitest.runAllTimersAsync(); + const outerDiv = document.getElementById("faz_test_outer") as unknown as FazNode; + const innerDiv = document.getElementById("faz_test_inner") as unknown as FazNode; + const outerElement = outerDiv.fazElement(); + const innerElement = innerDiv.fazElement(); + expect(outerElement?.fazChildren().length).toBe(1); + expect(outerElement?.fazChildren()[0]).toBe(innerElement); + expect(innerElement?.parent()).toBe(outerElement); + expect((outerDiv as unknown as Element).tagName).toBe("DIV"); }); }); diff --git a/types/element.d.ts b/types/element.d.ts index 2e87b5e..7bf14b5 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -42,6 +42,7 @@ export declare class FazElement extends HTMLElement { setFazElement: Setter; fazRole: Accessor; setFazRole: Setter; + idGenerated: boolean; loading: Accessor; setLoading: Setter; parent: Accessor; diff --git a/types/element.d.ts.map b/types/element.d.ts.map index 9cd5881..acca404 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EA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AAiB;IAmBjB,IAAI;IAGJ,IAAI;IAGJ,MAAM;IAWN,WAAW,IAAI,IAAI;CAYtB"} \ No newline at end of file From dfeaae478fb7046ca270bbab466eb4b5d8098aff Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Thu, 26 Jun 2025 22:35:55 -0400 Subject: [PATCH 147/199] feat(form): add values property to FazForm Fixes: #161 --- src/form.tsx | 16 ++++++++++++++++ test/form.test.tsx | 35 +++++++++++++++++++++++++++++------ types/form.d.ts | 2 ++ types/form.d.ts.map | 2 +- 4 files changed, 48 insertions(+), 7 deletions(-) diff --git a/src/form.tsx b/src/form.tsx index 57ee9eb..ec06040 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -44,6 +44,22 @@ export class FazFormElement extends FazElement { } } } + + get form(): HTMLFormElement|undefined { + return undefined + } + + get values(): Record { + const values: Record = {}; + if (this.form === undefined) { + return values; + } + const formData = new FormData(this.form); + for (const [key, value] of formData.entries()) { + values[key] = value; + } + return values; + } public clearErrorsFor(key: string) { const errors = { ...this.errors() }; diff --git a/test/form.test.tsx b/test/form.test.tsx index 49d7729..e24a02a 100644 --- a/test/form.test.tsx +++ b/test/form.test.tsx @@ -15,27 +15,49 @@ */ import { FazFormElement } from "../src/form"; -import { describe, expect, test } from "vitest"; -import { allComments } from "../src/test"; +import { allComments} from "../src/test"; +import { JSX } from "solid-js/jsx-runtime"; +import { render } from "solid-js/web"; +import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest"; class TestForm extends FazFormElement { + public testForm: JSX.Element; + constructor() { super(); } + + get form(): HTMLFormElement|undefined { + return this.testForm as HTMLFormElement; + } + + show() { + this.testForm =
    ; + render(() => this.testForm, this); + } } customElements.define("test-form", TestForm); + beforeEach(() => { + vitest.useFakeTimers(); + }); + afterEach(() => { + vitest.useRealTimers(); + }); describe("Test Forms", () => { - test("Form errors", () => { + test("Form errors", async() => { document.body.innerHTML = ` + + `; const [formComment] = allComments(document.body); const form = formComment.fazElement() as FazFormElement; + await vitest.runAllTimersAsync(); expect(form.hasErrors()).toBeFalsy(); form.pushError("field1", "error 1"); form.pushError("field1", "error 1"); @@ -45,10 +67,11 @@ describe("Test Forms", () => { expect(form.hasErrorsFor("field1")).toBeTruthy(); expect(form.hasErrorsFor("field2")).toBeTruthy(); expect(form.hasErrorsFor("field3")).toBeFalsy(); - expect(form.getErrorsFor("field1").length == 2).toBeTruthy(); - expect(form.getErrorsFor("field2").length == 1).toBeTruthy(); + expect(form.getErrorsFor("field1").length).toBe(2); + expect(form.getErrorsFor("field2").length).toBe(1); form.clearErrors(); expect(form.hasErrors()).toBeFalsy(); - + expect(form.form).toStrictEqual((form as TestForm).testForm); + expect(form.values).toStrictEqual({ input1: '1', input2: '2' }); }); }); diff --git a/types/form.d.ts b/types/form.d.ts index d35b3b1..da4c9f5 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -23,6 +23,8 @@ export declare class FazFormElement extends FazElement { method: Accessor; setMethod: Setter; constructor(); + get form(): HTMLFormElement | undefined; + get values(): Record; clearErrorsFor(key: string): void; clearErrors(): void; hasErrorsFor(key: string): boolean; diff --git a/types/form.d.ts.map b/types/form.d.ts.map index 01bfd24..025f857 100644 --- a/types/form.d.ts.map +++ b/types/form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,UAAU;IAEnC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C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,WAAW;IAIX,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,SAAS,IAAI,OAAO;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAa9C"} \ No newline at end of file From 7996af80880ef82ba5de91d4c98b981ddec290ea Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Thu, 26 Jun 2025 22:36:53 -0400 Subject: [PATCH 148/199] build(release): deliver 0.3.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a66df1..4966b39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.3.1", + "version": "0.3.2", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", From b61cf9613e536eff51d5a66a6575e2e4b72a109b Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 6 Jul 2025 00:10:22 -0400 Subject: [PATCH 149/199] refactor(element): remove clearFazTag from the rendering process Fixes: #162 --- src/element.ts | 21 +++------------------ test/element.test.tsx | 18 +++++++++--------- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/src/element.ts b/src/element.ts index 678ce17..767b771 100644 --- a/src/element.ts +++ b/src/element.ts @@ -42,8 +42,8 @@ export class FazElement extends HTMLElement { public setContent: Setter; public debug: Accessor; public setDebug: Setter; - public disabled: Accessor; - public setDisabled: Setter; + public disabled: Accessor; + public setDisabled: Setter; public extraClasses: Accessor; public setExtraClasses: Setter; public fazChildren: Accessor; @@ -76,7 +76,7 @@ export class FazElement extends HTMLElement { [this.connected, this.setConnected] = createSignal(false); [this.content, this.setContent] = createSignal(undefined); [this.debug, this.setDebug] = createSignal(false); - [this.disabled, this.setDisabled] = createSignal(false); + [this.disabled, this.setDisabled] = createSignal(undefined); [this.extraClasses, this.setExtraClasses] = createSignal(""); [this.fazChildren, this.setFazChildren] = createSignal([]); [this.fazElement, this.setFazElement] = createSignal(undefined); @@ -288,21 +288,6 @@ export class FazElement extends HTMLElement { const children = this.collectChildren(); this.show(); this.placeBackChildren(children); - this.cleanFazTag(); this.afterShow(); } - - // Cleans Faz tags and sets fazElement on all child nodes. - cleanFazTag(): void { - this.childNodes.forEach((node) => { - const fNode = node as FazNode; - [fNode.fazElement, fNode.setFazElement] = createSignal(this); - this.before(fNode); - }) - if (this.parent()) { - this.parent()?.appendChild(this); - return; - } - this.remove(); - } } diff --git a/test/element.test.tsx b/test/element.test.tsx index b5eb5cf..4856451 100644 --- a/test/element.test.tsx +++ b/test/element.test.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { FazElement, FazNode } from "../src/element"; +import { FazElement } from "../src/element"; import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest"; import { createEffect, createRoot } from "solid-js"; import { render} from "solid-js/web"; @@ -28,6 +28,7 @@ class TestElement extends FazElement { constructor() { super(); + this.setDisabled(false); createRoot(() => { createEffect((prevActive) => { if (this.active() != prevActive) { @@ -50,9 +51,7 @@ class TestElement extends FazElement { } show() { - render(() => { - return
    - }, this); + render(() =>
    , this); } } @@ -121,7 +120,7 @@ describe("Test Element", () => { outerElement.pushExtraClass("eclass"); expect(outerElement.doExtraClassesChanged).toBeTruthy(); outerElement.setActive(false); - outerElement.setDisabled(false); + outerElement.setDisabled(undefined); expect(innerElement.doActiveChanged).toBeFalsy(); expect(innerElement.doDisabledChanged).toBeFalsy(); }); @@ -135,13 +134,14 @@ describe("Test Element", () => { `; await vitest.runAllTimersAsync(); - const outerDiv = document.getElementById("faz_test_outer") as unknown as FazNode; - const innerDiv = document.getElementById("faz_test_inner") as unknown as FazNode; - const outerElement = outerDiv.fazElement(); - const innerElement = innerDiv.fazElement(); + const outerElement = document.getElementById("outer") as unknown as FazElement; + const innerElement = document.getElementById("inner") as unknown as FazElement; + const outerDiv = outerElement.contentChild; + const innerDiv = innerElement.contentChild; expect(outerElement?.fazChildren().length).toBe(1); expect(outerElement?.fazChildren()[0]).toBe(innerElement); expect(innerElement?.parent()).toBe(outerElement); expect((outerDiv as unknown as Element).tagName).toBe("DIV"); + expect((innerDiv as unknown as Element).tagName).toBe("DIV"); }); }); From b9bb912adce50cbaa9eef04f6c4bcb399663a5a9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 6 Jul 2025 00:12:21 -0400 Subject: [PATCH 150/199] chore(element): add types without clearFazTag method Refs: #162 --- types/element.d.ts | 5 ++--- types/element.d.ts.map | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/types/element.d.ts b/types/element.d.ts index 7bf14b5..260304f 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -32,8 +32,8 @@ export declare class FazElement extends HTMLElement { setContent: Setter; debug: Accessor; setDebug: Setter; - disabled: Accessor; - setDisabled: Setter; + disabled: Accessor; + setDisabled: Setter; extraClasses: Accessor; setExtraClasses: Setter; fazChildren: Accessor; @@ -74,6 +74,5 @@ export declare class FazElement extends HTMLElement { load(): void; show(): void; render(): void; - cleanFazTag(): void; } //# sourceMappingURL=element.d.ts.map \ No newline at end of file diff --git a/types/element.d.ts.map b/types/element.d.ts.map index acca404..c02d650 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CAClD;AAGD,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAA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,CAAC;IAMpC,SAAS,IAAG,IAAI;IAGhB,UAAU,IAAG,IAAI;IAGjB,eAAe;IAsBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAUlC,iBAAiB;IAmBjB,IAAI;IAGJ,IAAI;IAGJ,MAAM;CAQT"} \ No newline at end of file From 0c67ff9622b145eb3f71c78e8e60bb09697d806d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 6 Jul 2025 00:13:00 -0400 Subject: [PATCH 151/199] build(release): deliver 0.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4966b39..299d29f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.3.2", + "version": "0.4.0", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", From 936f062edb16114ec0df60ac00f60aa3a4ef4df9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 6 Jul 2025 01:55:57 -0400 Subject: [PATCH 152/199] feat(element): add disconnect method to the project The disconnect will be called by the built in disconnectCallback only if the the element was connected before. The disconnectCallback will be responsible to remove the element's comment. Fixes: #163 --- src/element.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/element.ts b/src/element.ts index 767b771..cf8b14d 100644 --- a/src/element.ts +++ b/src/element.ts @@ -141,6 +141,25 @@ export class FazElement extends HTMLElement { [this.comment.fazElement, this.comment.setFazElement] = createSignal(this); } + /** + * The `disconnectedCallback` is a built-in lifecycle method of custom elements. + * It is called automatically by the browser when the element is removed from the DOM. + */ + disconnectedCallback() { + if (this.connected()) { + this.comment?.parentElement?.removeChild(this.comment); + this.disconnect(); + } + } + + /** + * Custom cleanup method for the component. + * Implement additional resource or event listener cleanups here as needed. + * Currently empty. + */ + disconnect() { + } + // Check if a specific extra class is present. hasExtraClass(value: string): boolean { const extraClasses = this.extraClasses().trim().split(" "); From ca732fa87792fa0ca7da7e4c4429b3c1f740b353 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 6 Jul 2025 02:00:01 -0400 Subject: [PATCH 153/199] build(release): deliver 0.4.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 299d29f..4fe6853 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.4.0", + "version": "0.4.1", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", From 3490ed8a0c12fc3971846a4b736e25d628843d92 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 6 Jul 2025 02:00:36 -0400 Subject: [PATCH 154/199] chore(element): add element types with the disconnect method Refs: #163 --- types/element.d.ts | 11 +++++++++++ types/element.d.ts.map | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/types/element.d.ts b/types/element.d.ts index 260304f..0b30587 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -56,6 +56,17 @@ export declare class FazElement extends HTMLElement { private comment; source: any; constructor(); + /** + * The `disconnectedCallback` is a built-in lifecycle method of custom elements. + * It is called automatically by the browser when the element is removed from the DOM. + */ + disconnectedCallback(): void; + /** + * Custom cleanup method for the component. + * Implement additional resource or event listener cleanups here as needed. + * Currently empty. + */ + disconnect(): void; hasExtraClass(value: string): boolean; hasExtraClasses(): boolean; pushExtraClass(value: string): void; diff --git a/types/element.d.ts.map b/types/element.d.ts.map index c02d650..3a3c571 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,C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AK,EAAE,UAAU;IAQhC,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAIpC;IAGD,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAGD,IAAI,UAAU,YAMb;IAGD,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAMpC,SAAS,IAAG,IAAI;IAGhB,UAAU,IAAG,IAAI;IAGjB,eAAe;IAsBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAUlC,iBAAiB;IAmBjB,IAAI;IAGJ,IAAI;IAGJ,MAAM;CAQT"} \ No newline at end of file From 7381862a21d4619fdc46d3839a3ff170bb034654 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:20:09 -0400 Subject: [PATCH 155/199] build(deps): bump esbuild to 0.25.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4fe6853..4cedb17 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@types/node": "24.0.3", "axios": "1.10.0", "can-stache-loader": "3.0.0", - "esbuild": "0.25.5", + "esbuild": "0.25.10", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", From dec1bb1831f73970fc840422f10008693441d3b0 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:20:55 -0400 Subject: [PATCH 156/199] build(deps): bump solid-js to 1.9.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4cedb17..39efde3 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ], "dependencies": { "less": "4.3.0", - "solid-js": "1.9.7" + "solid-js": "1.9.9" }, "devDependencies": { "@testing-library/jest-dom": "6.6.3", From 9a606609ba993c6bd88ab089a199cf23e056272e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:23:26 -0400 Subject: [PATCH 157/199] build(deps): bump vite to 7.1.9 and vite-plugin-solid to 2.11.9 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 39efde3..1d166e0 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "prettier": "3.5.3", "ts-node": "10.9.2", "typescript": "5.8.3", - "vite": "6.3.5", - "vite-plugin-solid": "2.11.6", + "vite": "7.1.9", + "vite-plugin-solid": "2.11.9", "vitest": "3.2.4" }, "scripts": { From de8257e753ed655d76462b7b54a587b30d529c84 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:25:17 -0400 Subject: [PATCH 158/199] build(deps): bump jsdom to 27.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1d166e0..3372c92 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jsdom": "26.1.0", + "jsdom": "27.0.0", "nise": "6.1.1", "prettier": "3.5.3", "ts-node": "10.9.2", From eb08d2bf187f3f52718554adf71455b67f38d364 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:27:19 -0400 Subject: [PATCH 159/199] build(deps): bump @types/node to 24.7.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3372c92..9c47384 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@testing-library/jest-dom": "6.6.3", "@types/jest": "30.0.0", "@types/nise": "1.4.5", - "@types/node": "24.0.3", + "@types/node": "24.7.2", "axios": "1.10.0", "can-stache-loader": "3.0.0", "esbuild": "0.25.10", From 9e77cfada56271317754b7448767fa82b71a4b4f Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:28:49 -0400 Subject: [PATCH 160/199] build(deps): bump @testing-library/jest-dom to 6.9.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9c47384..fe773ff 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "solid-js": "1.9.9" }, "devDependencies": { - "@testing-library/jest-dom": "6.6.3", + "@testing-library/jest-dom": "6.9.1", "@types/jest": "30.0.0", "@types/nise": "1.4.5", "@types/node": "24.7.2", From 625fa6818e7b3b3c07039c40e16123bd7c69b767 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:30:12 -0400 Subject: [PATCH 161/199] build(deps): bump prettier to 3.6.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fe773ff..184df5a 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "http-server": "14.1.1", "jsdom": "27.0.0", "nise": "6.1.1", - "prettier": "3.5.3", + "prettier": "3.6.2", "ts-node": "10.9.2", "typescript": "5.8.3", "vite": "7.1.9", From 0440ab636931adf992d6ef379443e9309acc22b5 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:31:24 -0400 Subject: [PATCH 162/199] build(deps): bump typescript to 5.9.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 184df5a..640129a 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "nise": "6.1.1", "prettier": "3.6.2", "ts-node": "10.9.2", - "typescript": "5.8.3", + "typescript": "5.9.3", "vite": "7.1.9", "vite-plugin-solid": "2.11.9", "vitest": "3.2.4" From e07a7676e812d9a940c10e1de341092150aea1c8 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:32:37 -0400 Subject: [PATCH 163/199] build(release): deliver 0.4.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 640129a..d056a9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.4.1", + "version": "0.4.2", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", From 66b4a7fe34c876bf98ceacf6dc0e6d678ea6ecd0 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:35:28 -0400 Subject: [PATCH 164/199] build(tests): remove nodejs 18 from the build Fixes: #164 --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 28c0391..998280e 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: ["18", "20", "21", "22"] + node-version: ["20", "21", "22"] steps: - uses: actions/checkout@v4 From 20a93f67da816db0ebf9de6ae770c95fbe9f6c26 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 12 Oct 2025 15:40:44 -0400 Subject: [PATCH 165/199] chore(date): remove some warns from the code --- date.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/date.js b/date.js index 94246ae..0e284c5 100644 --- a/date.js +++ b/date.js @@ -28,7 +28,7 @@ export default class DateUtil { let days = []; Array.from( {length: new Date(year, month + 1, 0).getDate()}, - (x, day)=> days.push( + (_, day)=> days.push( new Date(year, month, day + 1) ) ); @@ -41,7 +41,7 @@ export default class DateUtil { let dayMatrix = new Array(weeks); Array.from( {length: weeks}, - (x, i)=> dayMatrix[i] = new Array(7) + (_, i)=> dayMatrix[i] = new Array(7) ); let week = 0; DateUtil.daysOfMonthArray(year, month).forEach(day=>{ From f45c3589f2b8c45c7a3bc4af4afe4e57e87f70dd Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:10:22 -0500 Subject: [PATCH 166/199] build(deps): bump @types/node to 25.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d056a9d..0c897fb 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@testing-library/jest-dom": "6.9.1", "@types/jest": "30.0.0", "@types/nise": "1.4.5", - "@types/node": "24.7.2", + "@types/node": "25.0.3", "axios": "1.10.0", "can-stache-loader": "3.0.0", "esbuild": "0.25.10", From e7473b8b76af3a4f52c7c489cf303fd61b5702d1 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:11:14 -0500 Subject: [PATCH 167/199] build(deps): bump axios to 1.13.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c897fb..4a1604f 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@types/jest": "30.0.0", "@types/nise": "1.4.5", "@types/node": "25.0.3", - "axios": "1.10.0", + "axios": "1.13.2", "can-stache-loader": "3.0.0", "esbuild": "0.25.10", "esbuild-plugin-copy": "2.1.1", From d1ff53779fd91a6d772793b9d6dbfba5634d07b7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:12:48 -0500 Subject: [PATCH 168/199] build(deps): bump esbuild to 0.27.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a1604f..2f1ca8d 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@types/node": "25.0.3", "axios": "1.13.2", "can-stache-loader": "3.0.0", - "esbuild": "0.25.10", + "esbuild": "0.27.2", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", From 1b8817f5aca1d6b7ecfd5f1fa44852665c6095e1 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:14:04 -0500 Subject: [PATCH 169/199] build(deps): bump jsdom to 27.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f1ca8d..40df51d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jsdom": "27.0.0", + "jsdom": "27.4.0", "nise": "6.1.1", "prettier": "3.6.2", "ts-node": "10.9.2", From 3f704de8fca1bd83bf68977e6cf0137bd87a040e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:15:35 -0500 Subject: [PATCH 170/199] build(deps): revert back jsdom to 27.0.0 The 27.4.0 was breaking tests. Will need to investigate the issue further. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 40df51d..2f1ca8d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jsdom": "27.4.0", + "jsdom": "27.0.0", "nise": "6.1.1", "prettier": "3.6.2", "ts-node": "10.9.2", From 2ee5f4d6f9fb14275bb10c229dff486da6ca2b17 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:17:19 -0500 Subject: [PATCH 171/199] build(deps): bump prettier to 3.7.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2f1ca8d..ec06ccb 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "http-server": "14.1.1", "jsdom": "27.0.0", "nise": "6.1.1", - "prettier": "3.6.2", + "prettier": "3.7.4", "ts-node": "10.9.2", "typescript": "5.9.3", "vite": "7.1.9", From 6da14571424e58236174ce75451d85c5ace0e3e7 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:18:43 -0500 Subject: [PATCH 172/199] build(deps): bump vite to 7.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec06ccb..75416be 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "prettier": "3.7.4", "ts-node": "10.9.2", "typescript": "5.9.3", - "vite": "7.1.9", + "vite": "7.3.0", "vite-plugin-solid": "2.11.9", "vitest": "3.2.4" }, From 9985c79f44123afa7f2c29de17ec268547929d7d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:19:27 -0500 Subject: [PATCH 173/199] build(deps): bump vite-plugin-solid to 2.11.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 75416be..741017e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "ts-node": "10.9.2", "typescript": "5.9.3", "vite": "7.3.0", - "vite-plugin-solid": "2.11.9", + "vite-plugin-solid": "2.11.10", "vitest": "3.2.4" }, "scripts": { From 37510a34a23c7c73bcc89f54b59d99aed41422b9 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:20:40 -0500 Subject: [PATCH 174/199] build(deps): bump vitest to 4.0.16 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 741017e..e7a6366 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "typescript": "5.9.3", "vite": "7.3.0", "vite-plugin-solid": "2.11.10", - "vitest": "3.2.4" + "vitest": "4.0.16" }, "scripts": { "watch": "npm run watch:clean && node watch.mjs", From 07776929a5b5b38ac3644126bd521a17c0d2168a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:21:25 -0500 Subject: [PATCH 175/199] build(deps): bump less to 4.5.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e7a6366..210a974 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "toolkit" ], "dependencies": { - "less": "4.3.0", + "less": "4.5.1", "solid-js": "1.9.9" }, "devDependencies": { From 2bb94623a72eb5b8b255c76fe87260ff3785f10e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:22:11 -0500 Subject: [PATCH 176/199] build(deps): bump solid-js to 1.9.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 210a974..79d990e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ], "dependencies": { "less": "4.5.1", - "solid-js": "1.9.9" + "solid-js": "1.9.10" }, "devDependencies": { "@testing-library/jest-dom": "6.9.1", From 5c90733a1620266d49c15a8aac66abaa18fa5bd5 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 10:28:49 -0500 Subject: [PATCH 177/199] build(release): deliver 0.4.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79d990e..7311484 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.4.2", + "version": "0.4.3", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", From 8e361ad168481d9c4cf334f119a3bba5dcdd5bce Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 30 Dec 2025 11:10:55 -0500 Subject: [PATCH 178/199] docs(license): change license from APACHE-2.0 to MIT Fixes: #165 --- LICENSE | 222 +++++---------------------------------------- LICENSE-apache-old | 201 ++++++++++++++++++++++++++++++++++++++++ README.md | 6 ++ package.json | 2 +- 4 files changed, 229 insertions(+), 202 deletions(-) create mode 100644 LICENSE-apache-old diff --git a/LICENSE b/LICENSE index b4d5c0e..1257355 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,21 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018-2024 Flavio Garcia. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +MIT License + +Copyright (c) 2026 Flavio Garcia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/LICENSE-apache-old b/LICENSE-apache-old new file mode 100644 index 0000000..39e3663 --- /dev/null +++ b/LICENSE-apache-old @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2025 Flavio Garcia. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index d1175fb..718c8e0 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,9 @@ Candango faz is a toolkit based on bootstrap and solid-js. - Add new Node.Js at the Run/Debug configurations. - Java Script file: node_modules/http-server/bin/http-server - Working directory: the faz project root directory + +# License + +Candango Faz was licensed under Apache-2.0 from 2018 to 2025. + +Since 2026 it is licensed under the MIT License. diff --git a/package.json b/package.json index 7311484..c94b43d 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/candango/faz#readme", "author": "Flavio Garcia ", - "license": "Apache-2.0", + "license": "MIT", "type": "module", "keywords": [ "webcomponent", From 97c78d6a3096c0d38c644ca89531dcfb9485caa0 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 3 Mar 2026 12:17:59 -0500 Subject: [PATCH 179/199] docs(license): remove old Apache-2.0 headers from source files - Removed per-file Apache-2.0 license headers across the project - MIT license does not require these headers, reducing boilerplate - Reference: #166 --- app/breadcrumb.js | 15 --------------- app/code-highlight.js | 15 --------------- app/datepicker.js | 15 --------------- app/filterbox.js | 15 --------------- app/form.js | 15 --------------- app/global.js | 15 --------------- app/input.js | 15 --------------- app/main-navbar.js | 15 --------------- app/nav.js | 15 --------------- app/navbar.js | 15 --------------- app/pagination.js | 15 --------------- app/picklist.js | 15 --------------- app/sidebar.js | 15 --------------- assets.mjs | 15 --------------- build.mjs | 15 --------------- date.js | 15 --------------- datepicker/datepicker.js | 15 --------------- entryPoints.mjs | 15 --------------- input/datepicker.js | 15 --------------- input/filterbox.js | 15 --------------- input/picklist.js | 15 --------------- navbar/navbar-brand.js | 15 --------------- navbar/navbar-collapse.js | 15 --------------- navbar/navbar-nav-item-title.js | 15 --------------- navbar/navbar-nav-item.js | 15 --------------- navbar/navbar-nav.js | 15 --------------- navbar/navbar-toggler.js | 15 --------------- navbar/navbar.js | 15 --------------- showcase/src/custom-tag.tsx | 15 --------------- showcase/src/form.tsx | 15 --------------- showcase/src/global.ts | 15 --------------- sidebar/sidebar.js | 15 --------------- src/app/global.ts | 15 --------------- src/element-attributes.ts | 15 --------------- src/element.ts | 15 --------------- src/form.tsx | 15 --------------- src/index.ts | 15 --------------- src/paginator.ts | 15 --------------- src/test.ts | 15 --------------- src/values.ts | 15 --------------- test/element.test.tsx | 15 --------------- test/form.test.tsx | 15 --------------- test/paginator.test.ts | 15 --------------- types/app/global.d.ts | 15 --------------- types/element-attributes.d.ts | 15 --------------- types/element.d.ts | 15 --------------- types/form.d.ts | 15 --------------- types/index.d.ts | 15 --------------- types/paginator.d.ts | 15 --------------- types/test.d.ts | 15 --------------- types/values.d.ts | 15 --------------- watch.mjs | 15 --------------- 52 files changed, 780 deletions(-) diff --git a/app/breadcrumb.js b/app/breadcrumb.js index a11e006..d6e0062 100644 --- a/app/breadcrumb.js +++ b/app/breadcrumb.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2020 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazNavbar, FazBreadcrumb } from "../faz"; diff --git a/app/code-highlight.js b/app/code-highlight.js index 61bf1db..d9139ea 100644 --- a/app/code-highlight.js +++ b/app/code-highlight.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2020 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import hljs from "highlight.js/lib/highlight"; import "highlightjs-line-numbers.js"; diff --git a/app/datepicker.js b/app/datepicker.js index 625174f..4dbf2f2 100644 --- a/app/datepicker.js +++ b/app/datepicker.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2020 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazInputDatepicker, FazDatepicker, FazNavbar } from "../faz"; diff --git a/app/filterbox.js b/app/filterbox.js index 50c64c6..8247bad 100644 --- a/app/filterbox.js +++ b/app/filterbox.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flávio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazFilterbox, FazNavbar } from "../faz"; diff --git a/app/form.js b/app/form.js index 59d959e..1a0fda6 100644 --- a/app/form.js +++ b/app/form.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flavio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { fixture } from "can" import {default as MainNavbar} from "./main-navbar" diff --git a/app/global.js b/app/global.js index 7b34458..78b7960 100644 --- a/app/global.js +++ b/app/global.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flavio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ window.codemirrorit = function(id) { let referenceNode = document.getElementById(id) diff --git a/app/input.js b/app/input.js index 90913c5..53bd8ab 100644 --- a/app/input.js +++ b/app/input.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazNavbar } from "../faz"; diff --git a/app/main-navbar.js b/app/main-navbar.js index fae4858..30845ba 100644 --- a/app/main-navbar.js +++ b/app/main-navbar.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { ObservableObject } from "can"; import {FazStacheItem} from "../item"; diff --git a/app/nav.js b/app/nav.js index dd532cc..5cf46d9 100644 --- a/app/nav.js +++ b/app/nav.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flávio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazAlert, FazNavElement, FazNavbar } from "../faz"; diff --git a/app/navbar.js b/app/navbar.js index 7f28679..45942bb 100644 --- a/app/navbar.js +++ b/app/navbar.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2020 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazNavbar } from "../faz"; diff --git a/app/pagination.js b/app/pagination.js index cb28116..6de8806 100644 --- a/app/pagination.js +++ b/app/pagination.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flavio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazNavbar, FazPaginationElement } from "../faz"; diff --git a/app/picklist.js b/app/picklist.js index 3e658b6..3aba25b 100644 --- a/app/picklist.js +++ b/app/picklist.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazPicklist, FazNavbar } from "../faz"; diff --git a/app/sidebar.js b/app/sidebar.js index f2a5007..978630b 100644 --- a/app/sidebar.js +++ b/app/sidebar.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flavio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazSidebarElement, FazNavbar } from "../faz"; diff --git a/assets.mjs b/assets.mjs index ec5aad1..58c5ef8 100644 --- a/assets.mjs +++ b/assets.mjs @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2024 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export const assets = { assets:[ diff --git a/build.mjs b/build.mjs index ccee943..d1d936f 100644 --- a/build.mjs +++ b/build.mjs @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2023 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import * as esbuild from "esbuild"; import {entryPoints} from "./entryPoints.mjs"; diff --git a/date.js b/date.js index 0e284c5..133234f 100644 --- a/date.js +++ b/date.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2019 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export default class DateUtil { diff --git a/datepicker/datepicker.js b/datepicker/datepicker.js index 3cf335a..715fcce 100644 --- a/datepicker/datepicker.js +++ b/datepicker/datepicker.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2020 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { domEvents } from "can"; diff --git a/entryPoints.mjs b/entryPoints.mjs index 1c05e15..704736f 100644 --- a/entryPoints.mjs +++ b/entryPoints.mjs @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2023 Flávio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export const entryPoints = [ { out: "form", in: "src/form.tsx" }, diff --git a/input/datepicker.js b/input/datepicker.js index f2c68a1..961d8c5 100644 --- a/input/datepicker.js +++ b/input/datepicker.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2020 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import FazDatepicker from "../datepicker/datepicker"; import { domEvents } from "can"; diff --git a/input/filterbox.js b/input/filterbox.js index 3000678..58a4f86 100644 --- a/input/filterbox.js +++ b/input/filterbox.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flávio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import {FazElementItem, FazReactItem} from "../item" import {isString} from "lodash" diff --git a/input/picklist.js b/input/picklist.js index cea9553..3551076 100644 --- a/input/picklist.js +++ b/input/picklist.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import {ObservableArray, type} from "can"; import { FazStacheItem } from "../item"; diff --git a/navbar/navbar-brand.js b/navbar/navbar-brand.js index ee7fa83..2c61a64 100644 --- a/navbar/navbar-brand.js +++ b/navbar/navbar-brand.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import {FazStacheItem} from "../item"; diff --git a/navbar/navbar-collapse.js b/navbar/navbar-collapse.js index 6408116..e407fe8 100644 --- a/navbar/navbar-collapse.js +++ b/navbar/navbar-collapse.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazStacheItem, FazStacheItemList } from "../item"; import {default as FazNavbarBrand} from "./navbar-brand"; diff --git a/navbar/navbar-nav-item-title.js b/navbar/navbar-nav-item-title.js index 2c7cce5..d2947b0 100644 --- a/navbar/navbar-nav-item-title.js +++ b/navbar/navbar-nav-item-title.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazStacheItem } from "../item"; diff --git a/navbar/navbar-nav-item.js b/navbar/navbar-nav-item.js index 6db965b..0d0fa19 100644 --- a/navbar/navbar-nav-item.js +++ b/navbar/navbar-nav-item.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { type } from "can"; import { FazStacheItem, FazStacheItemList } from "../item"; diff --git a/navbar/navbar-nav.js b/navbar/navbar-nav.js index c0a037e..1e34b13 100644 --- a/navbar/navbar-nav.js +++ b/navbar/navbar-nav.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazStacheItem, FazStacheItemList} from "../item"; import navTemplate from "./stache/navbar-nav.stache"; diff --git a/navbar/navbar-toggler.js b/navbar/navbar-toggler.js index a239881..0f19225 100644 --- a/navbar/navbar-toggler.js +++ b/navbar/navbar-toggler.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazStacheItem } from "../item"; import navbarTogglerTemplate from "./stache/navbar-toggler.stache"; diff --git a/navbar/navbar.js b/navbar/navbar.js index d993f51..bf2b1f3 100644 --- a/navbar/navbar.js +++ b/navbar/navbar.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2021 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { ajax, DeepObservable, ObservableObject, type diff --git a/showcase/src/custom-tag.tsx b/showcase/src/custom-tag.tsx index 43c1b49..b4abdb8 100644 --- a/showcase/src/custom-tag.tsx +++ b/showcase/src/custom-tag.tsx @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazElement } from "../../src/element"; diff --git a/showcase/src/form.tsx b/showcase/src/form.tsx index 54fd5c2..a399f14 100644 --- a/showcase/src/form.tsx +++ b/showcase/src/form.tsx @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazFormElement } from "../../src"; import { Accessor, createSignal, JSX, Setter } from "solid-js"; diff --git a/showcase/src/global.ts b/showcase/src/global.ts index 71378fa..e69de29 100644 --- a/showcase/src/global.ts +++ b/showcase/src/global.ts @@ -1,15 +0,0 @@ -/** - * Copyright 2018-2024 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ diff --git a/sidebar/sidebar.js b/sidebar/sidebar.js index 5f4c1b1..91cd866 100644 --- a/sidebar/sidebar.js +++ b/sidebar/sidebar.js @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2022 Flavio Gonçalves Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import {FazElementItem, FazReactItem} from "../item"; import React from 'react' diff --git a/src/app/global.ts b/src/app/global.ts index 71378fa..e69de29 100644 --- a/src/app/global.ts +++ b/src/app/global.ts @@ -1,15 +0,0 @@ -/** - * Copyright 2018-2024 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ diff --git a/src/element-attributes.ts b/src/element-attributes.ts index 34b7f5f..07a05fa 100644 --- a/src/element-attributes.ts +++ b/src/element-attributes.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazElement } from "./element"; import { JSX } from "solid-js"; diff --git a/src/element.ts b/src/element.ts index cf8b14d..fdfaaad 100644 --- a/src/element.ts +++ b/src/element.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazAttributeRole } from "./element-attributes"; import { randomId, toBoolean } from "./values"; diff --git a/src/form.tsx b/src/form.tsx index ec06040..dc1349d 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazElement } from "./element"; import { Accessor, createSignal, Setter } from "solid-js"; diff --git a/src/index.ts b/src/index.ts index a7de57f..2d90d8d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export { FazElement } from "./element"; export type { FazElementAttributes } from "./element-attributes"; diff --git a/src/paginator.ts b/src/paginator.ts index 453e3c2..99be46a 100644 --- a/src/paginator.ts +++ b/src/paginator.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { Accessor, createSignal, Setter } from "solid-js"; diff --git a/src/test.ts b/src/test.ts index 6075432..4df16f7 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazComment } from "./element"; diff --git a/src/values.ts b/src/values.ts index cb025f4..1224cfe 100644 --- a/src/values.ts +++ b/src/values.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export function toBoolean(value: string | null): boolean { if (value === null) { diff --git a/test/element.test.tsx b/test/element.test.tsx index 4856451..2caa2fb 100644 --- a/test/element.test.tsx +++ b/test/element.test.tsx @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazElement } from "../src/element"; import { afterEach, beforeEach, describe, expect, test, vitest } from "vitest"; diff --git a/test/form.test.tsx b/test/form.test.tsx index e24a02a..a418cfd 100644 --- a/test/form.test.tsx +++ b/test/form.test.tsx @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazFormElement } from "../src/form"; import { allComments} from "../src/test"; diff --git a/test/paginator.test.ts b/test/paginator.test.ts index 2bfa0e6..55bebdb 100644 --- a/test/paginator.test.ts +++ b/test/paginator.test.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazPaginator } from "../src/paginator"; import { describe, expect, test } from "vitest"; diff --git a/types/app/global.d.ts b/types/app/global.d.ts index e14953e..a223183 100644 --- a/types/app/global.d.ts +++ b/types/app/global.d.ts @@ -1,16 +1 @@ -/** - * Copyright 2018-2024 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ //# sourceMappingURL=global.d.ts.map \ No newline at end of file diff --git a/types/element-attributes.d.ts b/types/element-attributes.d.ts index 44bee96..d488088 100644 --- a/types/element-attributes.d.ts +++ b/types/element-attributes.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazElement } from "./element"; import { JSX } from "solid-js"; export interface FazElementAttributes extends JSX.HTMLAttributes { diff --git a/types/element.d.ts b/types/element.d.ts index 0b30587..426874f 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazAttributeRole } from "./element-attributes"; import { Accessor, Setter } from "solid-js"; export interface FazComment extends Comment { diff --git a/types/form.d.ts b/types/form.d.ts index da4c9f5..0edd37e 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazElement } from "./element"; import { Accessor, Setter } from "solid-js"; export declare class FazFormElement extends FazElement { diff --git a/types/index.d.ts b/types/index.d.ts index 4e91480..3f92560 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export { FazElement } from "./element"; export type { FazElementAttributes } from "./element-attributes"; export { FazFormElement } from "./form"; diff --git a/types/paginator.d.ts b/types/paginator.d.ts index 536548b..e491bb7 100644 --- a/types/paginator.d.ts +++ b/types/paginator.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { Accessor, Setter } from "solid-js"; /** * FazPaginator is a pagination utility class built for use with Solid.js diff --git a/types/test.d.ts b/types/test.d.ts index bd553d5..e6dd963 100644 --- a/types/test.d.ts +++ b/types/test.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { FazComment } from "./element"; export declare function allComments(context: any): FazComment[]; //# sourceMappingURL=test.d.ts.map \ No newline at end of file diff --git a/types/values.d.ts b/types/values.d.ts index 6fccede..9eadc2e 100644 --- a/types/values.d.ts +++ b/types/values.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export declare function toBoolean(value: string | null): boolean; export declare function randomId(): string; //# sourceMappingURL=values.d.ts.map \ No newline at end of file diff --git a/watch.mjs b/watch.mjs index 4f5a1c6..c1ef31d 100644 --- a/watch.mjs +++ b/watch.mjs @@ -1,18 +1,3 @@ -/** - * Copyright 2018-2025 Flavio Garcia - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ import { context } from "esbuild"; import { assets } from "./assets.mjs"; From 7d2a9ab84555e5d47e4f4d57cc6d9f26f04dcc6a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 3 Mar 2026 17:28:07 -0500 Subject: [PATCH 180/199] build(deps): bump vitest to 4.0.18 --- package.json | 2 +- src/element.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c94b43d..f27fb8e 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "typescript": "5.9.3", "vite": "7.3.0", "vite-plugin-solid": "2.11.10", - "vitest": "4.0.16" + "vitest": "4.0.18" }, "scripts": { "watch": "npm run watch:clean && node watch.mjs", diff --git a/src/element.ts b/src/element.ts index fdfaaad..5f4e9f4 100644 --- a/src/element.ts +++ b/src/element.ts @@ -223,10 +223,14 @@ export class FazElement extends HTMLElement { } // Lifecycle hook, can be overridden by subclasses for logic after showing. - afterShow():void {} + afterShow():void { + this.removeAttribute("data-faz-loading"); + } // Lifecycle hook, can be overridden by subclasses for logic before showing. - beforeShow():void {} + beforeShow():void { + this.setAttribute("data-faz-loading", "true"); + } // Remove and collect all children, update fazChildren list. collectChildren() { From 1887f616ecd6fa02208b6a7d523429c3f2e430b4 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 3 Mar 2026 17:34:53 -0500 Subject: [PATCH 181/199] feat(element): implement layout stabilization and loading lifecycle - Managed 'data-faz-loading' attribute directly in render() - Preserved beforeShow/afterShow hooks for framework users - Strategy: Prepare core for synchronous rendering and skeleton states - Reference: #115 --- src/element.ts | 10 ++++------ types/app/global.d.ts.map | 2 +- types/element-attributes.d.ts.map | 2 +- types/element.d.ts.map | 2 +- types/form.d.ts.map | 2 +- types/index.d.ts.map | 2 +- types/paginator.d.ts.map | 2 +- types/test.d.ts.map | 2 +- types/values.d.ts.map | 2 +- 9 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/element.ts b/src/element.ts index 5f4e9f4..252c33b 100644 --- a/src/element.ts +++ b/src/element.ts @@ -223,14 +223,10 @@ export class FazElement extends HTMLElement { } // Lifecycle hook, can be overridden by subclasses for logic after showing. - afterShow():void { - this.removeAttribute("data-faz-loading"); - } + afterShow():void {} // Lifecycle hook, can be overridden by subclasses for logic before showing. - beforeShow():void { - this.setAttribute("data-faz-loading", "true"); - } + beforeShow():void {} // Remove and collect all children, update fazChildren list. collectChildren() { @@ -292,10 +288,12 @@ export class FazElement extends HTMLElement { // Main render method: load data, prepare, manipulate, and restore children. render() { this.load(); + this.setAttribute("data-faz-loading", "true"); this.beforeShow(); const children = this.collectChildren(); this.show(); this.placeBackChildren(children); this.afterShow(); + this.removeAttribute("data-faz-loading"); } } diff --git a/types/app/global.d.ts.map b/types/app/global.d.ts.map index cf9979a..fb37d51 100644 --- a/types/app/global.d.ts.map +++ b/types/app/global.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/app/global.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"} \ No newline at end of file +{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/app/global.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/types/element-attributes.d.ts.map b/types/element-attributes.d.ts.map index 8f4eac0..dbae6e4 100644 --- a/types/element-attributes.d.ts.map +++ b/types/element-attributes.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element-attributes.d.ts","sourceRoot":"","sources":["../src/element-attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,gBAAgB,GACpB,OAAO,GACP,aAAa,GACb,aAAa,GACb,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,UAAU,GACV,cAAc,GACd,UAAU,GACV,eAAe,GACf,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,SAAS,GACT,KAAK,GACL,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,kBAAkB,GAClB,eAAe,GACf,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,QAAQ,GACR,cAAc,GACd,aAAa,GACb,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,KAAK,GACL,UAAU,GACV,WAAW,GACX,WAAW,GACX,QAAQ,GACR,WAAW,GACX,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"element-attributes.d.ts","sourceRoot":"","sources":["../src/element-attributes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,MAAM,WAAW,oBAAoB,CAAC,CAAC,CAAE,SAAQ,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,gBAAgB,GACpB,OAAO,GACP,aAAa,GACb,aAAa,GACb,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,UAAU,GACV,cAAc,GACd,UAAU,GACV,eAAe,GACf,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,SAAS,GACT,KAAK,GACL,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,KAAK,GACL,MAAM,GACN,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,GACT,UAAU,GACV,kBAAkB,GAClB,eAAe,GACf,OAAO,GACP,YAAY,GACZ,MAAM,GACN,MAAM,GACN,QAAQ,GACR,cAAc,GACd,aAAa,GACb,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,KAAK,GACL,UAAU,GACV,WAAW,GACX,WAAW,GACX,QAAQ,GACR,WAAW,GACX,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,SAAS,CAAC"} \ No newline at end of file diff --git a/types/element.d.ts.map b/types/element.d.ts.map index 3a3c571..3e9bfbc 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AAAA;;;;;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OAIG;IACH,UAAU;IAIV,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAOrC,eAAe,IAAI,OAAO;IAK1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAU5B,WAAW,IAAI,MAAM,GAAG,SAAS;IAWjC,WAAW,CAAC,KAAK,EAAE,UAAU;IAS7B,cAAc,CAAC,KAAK,EAAE,UAAU;IAQhC,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAIpC;IAGD,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAGD,IAAI,UAAU,YAMb;IAGD,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAMpC,SAAS,IAAG,IAAI;IAGhB,UAAU,IAAG,IAAI;IAGjB,eAAe;IAsBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAUlC,iBAAiB;IAmBjB,IAAI;IAGJ,IAAI;IAGJ,MAAM;CAUT"} \ No newline at end of file diff --git a/types/form.d.ts.map b/types/form.d.ts.map index 025f857..6eef8e5 100644 --- a/types/form.d.ts.map +++ b/types/form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,UAAU;IAEnC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,C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,GAAG,EAAE,MAAM;IAQ1B,WAAW;IAIX,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,SAAS,IAAI,OAAO;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAa9C"} \ No newline at end of file diff --git a/types/index.d.ts.map b/types/index.d.ts.map index 95d3471..5ca58b6 100644 --- a/types/index.d.ts.map +++ b/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file diff --git a/types/paginator.d.ts.map b/types/paginator.d.ts.map index 3c8b1da..b09ae9e 100644 --- a/types/paginator.d.ts.map +++ b/types/paginator.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"paginator.d.ts","sourceRoot":"","sources":["../src/paginator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D;;;;;GAKG;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BAAiB,WAGpB;IAED;;OAEG;IACH,IAAI,WAAW,WAEd;IAED;;OAEG;IACH,IAAI,UAAU,WAKb;CACJ"} \ No newline at end of file diff --git a/types/test.d.ts.map b/types/test.d.ts.map index 80b7986..c1a6cfd 100644 --- a/types/test.d.ts.map +++ b/types/test.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU,EAAE,CAetD"} \ No newline at end of file +{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,wBAAgB,WAAW,CAAC,OAAO,EAAE,GAAG,GAAG,UAAU,EAAE,CAetD"} \ No newline at end of file diff --git a/types/values.d.ts.map b/types/values.d.ts.map index 7167c8c..1b20b9b 100644 --- a/types/values.d.ts.map +++ b/types/values.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKvD;AAED,wBAAgB,QAAQ,WAOvB"} \ No newline at end of file +{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../src/values.ts"],"names":[],"mappings":"AACA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAKvD;AAED,wBAAgB,QAAQ,WAOvB"} \ No newline at end of file From 656360f65f3737b0b036688c1f7161b11b2f99af Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 11:31:47 -0500 Subject: [PATCH 182/199] feat(poc): add layout stabilization proof of concept - Implemented fast-poc-element with synchronous rendering strategy - Added POC showcase for Alert and Breadcrumb components - Verified 'display: contents' and 'data-faz-loading' lifecycle - Updated watch config for local development on port 8082 Refs: #115 --- showcase/poc/index.html | 52 ++++++++++++++++++++++++ showcase/src/poc/fast-poc-element.tsx | 18 ++++++++ showcase/src/poc/poc-alert.tsx | 25 ++++++++++++ showcase/src/poc/poc-breadcrumb-item.tsx | 27 ++++++++++++ showcase/src/poc/poc-breadcrumb.tsx | 16 ++++++++ showcase/src/poc/poc.tsx | 4 ++ watch.mjs | 3 +- 7 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 showcase/poc/index.html create mode 100644 showcase/src/poc/fast-poc-element.tsx create mode 100644 showcase/src/poc/poc-alert.tsx create mode 100644 showcase/src/poc/poc-breadcrumb-item.tsx create mode 100644 showcase/src/poc/poc-breadcrumb.tsx create mode 100644 showcase/src/poc/poc.tsx diff --git a/showcase/poc/index.html b/showcase/poc/index.html new file mode 100644 index 0000000..afe2b95 --- /dev/null +++ b/showcase/poc/index.html @@ -0,0 +1,52 @@ + + + + + + Candango Faz POC - Blink & Malabarismo + + + + + + + +
    +

    POC: Estratégia de Renderização

    + +
    +

    1. Caso Alert (Simples)

    + + + +
    + +
    +

    2. Caso Breadcrumb (Malabarismo)

    + + + + + +
    +
    + + + + diff --git a/showcase/src/poc/fast-poc-element.tsx b/showcase/src/poc/fast-poc-element.tsx new file mode 100644 index 0000000..d995fc1 --- /dev/null +++ b/showcase/src/poc/fast-poc-element.tsx @@ -0,0 +1,18 @@ + +import { FazElement } from "../../../src/element"; + +// Uma versão do FazElement que renderiza SINCRONAMENTE pra matar a expansão +export class FastPocElement extends FazElement { + connectedCallback() { + if (this.comment){ + this.before(this.comment); + } + // SEM Promise.resolve().then()! + // Renderizamos IMEDIATAMENTE no momento da conexão. + if (this.loading()) { + this.render(); + } + this.setConnected(true); + this.setLoading(false); + } +} diff --git a/showcase/src/poc/poc-alert.tsx b/showcase/src/poc/poc-alert.tsx new file mode 100644 index 0000000..5854140 --- /dev/null +++ b/showcase/src/poc/poc-alert.tsx @@ -0,0 +1,25 @@ +import { FazElement } from "../../../src/element"; + +export class PocAlert extends FazElement { + constructor() { + super(); + } + + connectedCallback() { + const contentAttr = this.getAttribute("content"); + if (contentAttr) this.setContent(contentAttr); + super.connectedCallback(); + } + + show() { + this.classList.add("alert", "alert-primary"); + this.setAttribute("role", "alert"); + const content = this.content(); + if (content) { + // Usando innerHTML na POC pra eliminar qualquer dúvida com SolidJS render + this.innerHTML = `${content}`; + } + } +} + +customElements.define("poc-alert", PocAlert); diff --git a/showcase/src/poc/poc-breadcrumb-item.tsx b/showcase/src/poc/poc-breadcrumb-item.tsx new file mode 100644 index 0000000..d7c7b65 --- /dev/null +++ b/showcase/src/poc/poc-breadcrumb-item.tsx @@ -0,0 +1,27 @@ +import { FazElement } from "../../../src/element"; + +export class PocBreadcrumbItem extends FazElement { + + connectedCallback() { + const contentAttr = this.getAttribute("content"); + if (contentAttr) this.setContent(contentAttr); + const linkAttr = this.getAttribute("link"); + if (linkAttr) this.setLink(linkAttr); + super.connectedCallback(); + } + + show() { + this.classList.add("breadcrumb-item"); + const content = this.content(); + const link = this.link(); + if (content) { + if (link) { + this.innerHTML = `${content}`; + } else { + this.innerHTML = `${content}`; + } + } + } +} + +customElements.define("poc-breadcrumb-item", PocBreadcrumbItem); diff --git a/showcase/src/poc/poc-breadcrumb.tsx b/showcase/src/poc/poc-breadcrumb.tsx new file mode 100644 index 0000000..aac4310 --- /dev/null +++ b/showcase/src/poc/poc-breadcrumb.tsx @@ -0,0 +1,16 @@ +import { FazElement } from "../../../src/element"; + +export class PocBreadcrumb extends FazElement { + private itemOl: HTMLElement | null = null; + + get contentChild() { + return this.itemOl as ChildNode; + } + + show() { + this.innerHTML = ``; + this.itemOl = this.querySelector("ol"); + } +} + +customElements.define("poc-breadcrumb", PocBreadcrumb); diff --git a/showcase/src/poc/poc.tsx b/showcase/src/poc/poc.tsx new file mode 100644 index 0000000..3bf399b --- /dev/null +++ b/showcase/src/poc/poc.tsx @@ -0,0 +1,4 @@ + +import "./poc-alert.tsx"; +import "./poc-breadcrumb.tsx"; +import "./poc-breadcrumb-item.tsx"; diff --git a/watch.mjs b/watch.mjs index c1ef31d..84ba4d9 100644 --- a/watch.mjs +++ b/watch.mjs @@ -9,6 +9,7 @@ entryPoints.push({ out: "custom-tag.bundle", in: "showcase/src/custom-tag.tsx" } entryPoints.push({ out: "form.bundle", in: "showcase/src/form.tsx" }); entryPoints.push({ out: "global.bundle", in: "showcase/src/global.ts" }); +entryPoints.push({ out: "poc.bundle", in: "showcase/src/poc/poc.tsx" }); entryPoints.push({ out: "css/showcase", in: "stylesheets/showcase.css"}); let ctx = await context({ @@ -32,7 +33,7 @@ let ctx = await context({ await ctx.watch(); await ctx.serve({ - port: 8081, + port: 8082, servedir: "showcase", onRequest: (args) => { let logMessage = ""; From fcd7139a1c6bebc66bebcd873f34cece5ccc811d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 20:23:00 -0500 Subject: [PATCH 183/199] feat(core): modernize reactivity and stabilize layout (v0.5.0) - Implemented decomposed reactivity engine (bindReactive) in src/reactivity.ts - Added layout stabilization using 'display: contents' and microtask rendering - Refactored FazElement, FazFormElement, and FazPaginator to use property-based reactivity - Removed legacy signal accessors/setters and redundant boilerplate - Updated all unit tests and the POC showcase to the new API - Bumped version to 0.5.0 Fixes: #167 Refs: #115 --- .gitignore | 3 + package.json | 2 +- showcase/src/poc/fast-poc-element.tsx | 14 +- showcase/src/poc/poc-alert.tsx | 12 +- showcase/src/poc/poc-breadcrumb-item.tsx | 24 ++-- showcase/src/poc/poc-breadcrumb.tsx | 12 +- src/element.ts | 174 +++++++++++------------ src/form.tsx | 43 +++--- src/paginator.ts | 74 +++++----- src/reactivity.ts | 25 ++++ test/element.test.tsx | 48 +++---- test/form.test.tsx | 2 +- test/paginator.test.ts | 54 +++---- test/reactivity.test.ts | 61 ++++++++ 14 files changed, 312 insertions(+), 236 deletions(-) create mode 100644 src/reactivity.ts create mode 100644 test/reactivity.test.ts diff --git a/.gitignore b/.gitignore index 5b2910b..9165514 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ yarn-error.log # Less stylesheets/*.css stylesheets/*.css.map + +# Project +.gemini/ diff --git a/package.json b/package.json index f27fb8e..c555971 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.4.3", + "version": "0.5.0", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", diff --git a/showcase/src/poc/fast-poc-element.tsx b/showcase/src/poc/fast-poc-element.tsx index d995fc1..5281b09 100644 --- a/showcase/src/poc/fast-poc-element.tsx +++ b/showcase/src/poc/fast-poc-element.tsx @@ -3,16 +3,6 @@ import { FazElement } from "../../../src/element"; // Uma versão do FazElement que renderiza SINCRONAMENTE pra matar a expansão export class FastPocElement extends FazElement { - connectedCallback() { - if (this.comment){ - this.before(this.comment); - } - // SEM Promise.resolve().then()! - // Renderizamos IMEDIATAMENTE no momento da conexão. - if (this.loading()) { - this.render(); - } - this.setConnected(true); - this.setLoading(false); - } + // A classe base agora já é síncrona por padrão, mas mantemos aqui + // para garantir o comportamento desejado na POC. } diff --git a/showcase/src/poc/poc-alert.tsx b/showcase/src/poc/poc-alert.tsx index 5854140..ed82354 100644 --- a/showcase/src/poc/poc-alert.tsx +++ b/showcase/src/poc/poc-alert.tsx @@ -1,22 +1,24 @@ -import { FazElement } from "../../../src/element"; +import { FastPocElement } from "./fast-poc-element"; -export class PocAlert extends FazElement { +export class PocAlert extends FastPocElement { constructor() { super(); } connectedCallback() { const contentAttr = this.getAttribute("content"); - if (contentAttr) this.setContent(contentAttr); + if (contentAttr) this.content = contentAttr; super.connectedCallback(); } show() { + // Restauramos o display pra que as classes do Bootstrap funcionem no host + this.style.display = "block"; this.classList.add("alert", "alert-primary"); this.setAttribute("role", "alert"); - const content = this.content(); + + const content = this.content; if (content) { - // Usando innerHTML na POC pra eliminar qualquer dúvida com SolidJS render this.innerHTML = `${content}`; } } diff --git a/showcase/src/poc/poc-breadcrumb-item.tsx b/showcase/src/poc/poc-breadcrumb-item.tsx index d7c7b65..37113f3 100644 --- a/showcase/src/poc/poc-breadcrumb-item.tsx +++ b/showcase/src/poc/poc-breadcrumb-item.tsx @@ -1,25 +1,27 @@ -import { FazElement } from "../../../src/element"; +import { FastPocElement } from "./fast-poc-element"; -export class PocBreadcrumbItem extends FazElement { +export class PocBreadcrumbItem extends FastPocElement { + constructor() { + super(); + } connectedCallback() { const contentAttr = this.getAttribute("content"); - if (contentAttr) this.setContent(contentAttr); + if (contentAttr) this.content = contentAttr; const linkAttr = this.getAttribute("link"); - if (linkAttr) this.setLink(linkAttr); + if (linkAttr) this.link = linkAttr; super.connectedCallback(); } show() { + // Removemos o 'contents' pra ele virar um flex-item de verdade + this.style.display = "list-item"; this.classList.add("breadcrumb-item"); - const content = this.content(); - const link = this.link(); + + const content = this.content; + const link = this.link; if (content) { - if (link) { - this.innerHTML = `${content}`; - } else { - this.innerHTML = `${content}`; - } + this.innerHTML = link ? `${content}` : `${content}`; } } } diff --git a/showcase/src/poc/poc-breadcrumb.tsx b/showcase/src/poc/poc-breadcrumb.tsx index aac4310..6daffa6 100644 --- a/showcase/src/poc/poc-breadcrumb.tsx +++ b/showcase/src/poc/poc-breadcrumb.tsx @@ -1,14 +1,18 @@ -import { FazElement } from "../../../src/element"; +import { FastPocElement } from "./fast-poc-element"; -export class PocBreadcrumb extends FazElement { +export class PocBreadcrumb extends FastPocElement { private itemOl: HTMLElement | null = null; get contentChild() { - return this.itemOl as ChildNode; + return (this.itemOl as unknown as ChildNode) || this.firstChild; } show() { - this.innerHTML = ``; + this.innerHTML = ` + + `; this.itemOl = this.querySelector("ol"); } } diff --git a/src/element.ts b/src/element.ts index 252c33b..82cb903 100644 --- a/src/element.ts +++ b/src/element.ts @@ -1,51 +1,37 @@ import { FazAttributeRole } from "./element-attributes"; import { randomId, toBoolean } from "./values"; -import { Accessor, createSignal, Setter } from "solid-js"; +import { createSignal } from "solid-js"; +import { bindReactive } from "./reactivity"; // FazComment extends the standard Comment node to include FazElement reactivity. export interface FazComment extends Comment { - fazElement: Accessor ; - setFazElement: Setter ; + fazElement: FazElement | undefined; } // FazNode extends ChildNode to include FazElement reactivity. export interface FazNode extends ChildNode { - fazElement: Accessor ; - setFazElement: Setter ; + fazElement: FazElement | undefined; } // Main FazElement class, extends HTMLElement to provide custom logic and reactivity for web components. export class FazElement extends HTMLElement { // Reactive properties for component state. - public active: Accessor; - public setActive: Setter; - public connected: Accessor; - public setConnected: Setter; - public content: Accessor; - public setContent: Setter; - public debug: Accessor; - public setDebug: Setter; - public disabled: Accessor; - public setDisabled: Setter; - public extraClasses: Accessor; - public setExtraClasses: Setter; - public fazChildren: Accessor; - public setFazChildren: Setter; - public fazElement: Accessor ; - public setFazElement: Setter ; - public fazRole: Accessor ; - public setFazRole: Setter ; + public active!: boolean; + public connected!: boolean; + public content: string|undefined; + public debug!: boolean; + public disabled: boolean|undefined; + public extraClasses!: string; + public fazChildren!: FazElement[]; + public fazElement: FazElement | undefined; + public fazRole: FazAttributeRole; public idGenerated: boolean = false; - public loading: Accessor; - public setLoading: Setter; - public parent: Accessor; - public setParent: Setter; - public reload: Accessor; - public setReload: Setter; - public link: Accessor; - public setLink: Setter; + public loading!: boolean; + public parent: FazElement | undefined; + public reload!: boolean; + public link: string|undefined; // Prefix for children and rendered child tracking. public childPrefix: string = ""; @@ -57,19 +43,28 @@ export class FazElement extends HTMLElement { constructor() { super(); - [this.active, this.setActive] = createSignal(false); - [this.connected, this.setConnected] = createSignal(false); - [this.content, this.setContent] = createSignal(undefined); - [this.debug, this.setDebug] = createSignal(false); - [this.disabled, this.setDisabled] = createSignal(undefined); - [this.extraClasses, this.setExtraClasses] = createSignal(""); - [this.fazChildren, this.setFazChildren] = createSignal([]); - [this.fazElement, this.setFazElement] = createSignal(undefined); - [this.fazRole, this.setFazRole] = createSignal(undefined); - [this.loading, this.setLoading] = createSignal(true); - [this.parent, this.setParent] = createSignal(undefined); - [this.reload, this.setReload] = createSignal(true); - [this.link, this.setLink] = createSignal(undefined); + // Standardize Render Strategy: use display: contents to avoid layout expansion + this.style.display = "contents"; + + const reactiveProps: Partial = { + active: false, + connected: false, + content: undefined, + debug: false, + disabled: undefined, + extraClasses: "", + fazChildren: [], + fazElement: undefined, + fazRole: undefined, + loading: true, + parent: undefined, + reload: true, + link: undefined, + }; + + for (const [key, value] of Object.entries(reactiveProps)) { + bindReactive(this, key as keyof this, value); + } if (!this.id) { this.id = randomId(); @@ -79,21 +74,21 @@ export class FazElement extends HTMLElement { for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "active": - this.setActive(toBoolean(attribute.value)); + this.active = toBoolean(attribute.value); break; case "class": case "fazclass": case "faz-class": - this.setExtraClasses(attribute.value); + this.extraClasses = attribute.value; break; case "content": - this.setContent(attribute.value); + this.content = attribute.value; break; case "debug": - this.setDebug(toBoolean(attribute.value)); + this.debug = toBoolean(attribute.value); break; case "disabled": - this.setDisabled(toBoolean(attribute.value)); + this.disabled = toBoolean(attribute.value); break; case "id": case "fazid": @@ -102,12 +97,12 @@ export class FazElement extends HTMLElement { break; case "href": case "link": - this.setLink(attribute.value); + this.link = attribute.value; break; case "role": case "fazrole": case "faz-role": - this.setFazRole(attribute.value as FazAttributeRole); + this.fazRole = attribute.value as FazAttributeRole; break; } } @@ -123,7 +118,7 @@ export class FazElement extends HTMLElement { }); } this.comment = (document.createComment(this.nodeName + " " + this.id) as FazComment); - [this.comment.fazElement, this.comment.setFazElement] = createSignal(this); + bindReactive(this.comment, "fazElement", this); } /** @@ -131,7 +126,7 @@ export class FazElement extends HTMLElement { * It is called automatically by the browser when the element is removed from the DOM. */ disconnectedCallback() { - if (this.connected()) { + if (this.connected) { this.comment?.parentElement?.removeChild(this.comment); this.disconnect(); } @@ -147,23 +142,23 @@ export class FazElement extends HTMLElement { // Check if a specific extra class is present. hasExtraClass(value: string): boolean { - const extraClasses = this.extraClasses().trim().split(" "); + const extraClasses = this.extraClasses.trim().split(" "); return extraClasses.find( item => item == value.toLowerCase()) !== undefined; } // Check if any extra classes are present. hasExtraClasses(): boolean { - return this.extraClasses().trim().split(" ").length > 0; + return this.extraClasses.trim().split(" ").length > 0; } // Add a new extra class if not already present. pushExtraClass(value: string) { value = value.trim(); if (!this.hasExtraClass(value)) { - const extraClasses = this.extraClasses().trim().split(" "); + const extraClasses = this.extraClasses.trim().split(" "); extraClasses.push(value); - this.setExtraClasses(extraClasses.join(" ")); + this.extraClasses = extraClasses.join(" "); } } @@ -171,34 +166,34 @@ export class FazElement extends HTMLElement { resolveLink(): string | undefined { // From: https://stackoverflow.com/a/66717705/2887989 let voidHref = "#!"; - const link = this.link(); - if (this.disabled() || link === undefined || link === "") { + const link = this.link; + if (this.disabled || link === undefined || link === "") { return voidHref; } - return this.link(); + return this.link; } // Add a FazElement child to the list of reactive children. addFazChild(child: FazElement) { - if (this.fazChildren().indexOf(child) === -1) { - const children = {...this.fazChildren()} as FazElement[]; + if (this.fazChildren.indexOf(child) === -1) { + const children = [...this.fazChildren] as FazElement[]; children.push(child); - this.setFazChildren(children); + this.fazChildren = children; } } // Remove a FazElement child from the reactive children array. removeFazChild(child: FazElement) { - if (this.fazChildren().indexOf(child) !== -1) { - const children = {...this.fazChildren()} as FazElement[]; - this.setFazChildren(children.filter(i => i !== child)); + if (this.fazChildren.indexOf(child) !== -1) { + const children = [...this.fazChildren] as FazElement[]; + this.fazChildren = children.filter(i => i !== child); } } // Get all children that are currently active. get activeFazChildren(): FazElement[] { - return this.fazChildren().filter(child => { - return child.active(); + return this.fazChildren.filter(child => { + return child.active; }) } @@ -209,7 +204,7 @@ export class FazElement extends HTMLElement { // Check if the link attribute is void (should not navigate). get linkIsVoid() { - if (this.disabled()) { + if (this.disabled) { return true; } const linkResolved = this.resolveLink(); @@ -232,31 +227,27 @@ export class FazElement extends HTMLElement { collectChildren() { const children:Node[] = []; const items: FazElement[] = []; - if (this.loading()) { - while(this.firstChild) { - if (this.firstChild instanceof FazElement) { - const item = this.firstChild as FazElement; - item.setParent(this as FazElement); - items.push(item); - item.dataset['parent'] = this.id; - } - children.push(this.firstChild); - this.removeChild(this.firstChild); - } - if (items.length > 0) { - this.setFazChildren(items); + while(this.firstChild) { + if (this.firstChild instanceof FazElement) { + const item = this.firstChild as FazElement; + item.parent = this as FazElement; + items.push(item); + item.dataset['parent'] = this.id; } + children.push(this.firstChild); + this.removeChild(this.firstChild); + } + if (items.length > 0) { + this.fazChildren = items; } return children; } // Place previously collected children back into the DOM. placeBackChildren(children: Node[]) { - if (this.loading()) { - children.forEach(child => { - this.addChild(child); - }); - } + children.forEach(child => { + this.addChild(child); + }); } // Standard web component lifecycle method: called when element is inserted @@ -266,16 +257,17 @@ export class FazElement extends HTMLElement { if (this.comment){ this.before(this.comment); } + // Defer rendering and state updates until the next microtask to ensure // all child custom elements are upgraded. // This is necessary because, during connectedCallback, child elements // may not be fully constructed or upgraded yet. Promise.resolve().then(()=> { - if (this.loading()) { + if (this.loading) { this.render(); } - this.setConnected(true); - this.setLoading(false); + this.connected = true; + this.loading = false; }); } @@ -288,12 +280,10 @@ export class FazElement extends HTMLElement { // Main render method: load data, prepare, manipulate, and restore children. render() { this.load(); - this.setAttribute("data-faz-loading", "true"); this.beforeShow(); const children = this.collectChildren(); this.show(); this.placeBackChildren(children); this.afterShow(); - this.removeAttribute("data-faz-loading"); } } diff --git a/src/form.tsx b/src/form.tsx index dc1349d..c481f77 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -1,30 +1,33 @@ import { FazElement } from "./element"; -import { Accessor, createSignal, Setter } from "solid-js"; +import { bindReactive } from "./reactivity"; export class FazFormElement extends FazElement { - public action: Accessor; - public setAction: Setter; - public errors: Accessor>; - public setErrors: Setter>; - public method: Accessor; - public setMethod: Setter; + public action: string|undefined; + public errors!: Record; + public method!: string; constructor() { super(); - [this.action, this.setAction] = createSignal(undefined); - [this.errors, this.setErrors] = createSignal>({}); - [this.method, this.setMethod] = createSignal("get"); + const reactiveProps: Partial = { + action: undefined, + errors: {}, + method: "get", + }; + + for (const [key, value] of Object.entries(reactiveProps)) { + bindReactive(this, key as keyof this, value); + } for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "action": - this.setAction(attribute.value); + this.action = attribute.value; break; case "method": - this.setMethod(attribute.value); + this.method = attribute.value; break; } } @@ -47,40 +50,40 @@ export class FazFormElement extends FazElement { } public clearErrorsFor(key: string) { - const errors = { ...this.errors() }; + const errors = { ...this.errors }; if (key in errors) { delete errors[key]; } - this.setErrors(errors); + this.errors = errors; } public clearErrors() { - this.setErrors({}); + this.errors = {}; } public hasErrorsFor(key: string): boolean { - return key in this.errors() && this.errors()[key].length > 0; + return key in this.errors && this.errors[key].length > 0; } public hasErrors(): boolean { - return Object.values(this.errors()).some(errors => errors.length > 0); + return Object.values(this.errors).some(errors => errors.length > 0); } public getErrorsFor(key: string): string[] { - return this.errors()[key] || []; + return this.errors[key] || []; } public pushError(key: string, value: string) { value = value.trim(); if (value) { - const errors = { ...this.errors() }; + const errors = { ...this.errors }; if (!errors[key]) { errors[key] = []; } if (!errors[key].includes(value)) { errors[key].push(value); } - this.setErrors(errors); + this.errors = errors; } } } diff --git a/src/paginator.ts b/src/paginator.ts index 99be46a..2981f52 100644 --- a/src/paginator.ts +++ b/src/paginator.ts @@ -1,5 +1,5 @@ -import { Accessor, createSignal, Setter } from "solid-js"; +import { bindReactive } from "./reactivity"; /** * FazPaginator is a pagination utility class built for use with Solid.js @@ -9,35 +9,31 @@ import { Accessor, createSignal, Setter } from "solid-js"; */ export class FazPaginator { - // Number of total records/items (reactive getter/setter) - public count: Accessor; - public setCount: Setter; + // Number of total records/items + public count!: number; - // Current page number (reactive getter/setter) - public page: Accessor; - public setPage: Setter; + // Current page number + public page!: number; - // Number of pages per block (reactive getter/setter) - public perBlock: Accessor; - public setPerBlock: Setter; + // Number of pages per block + public perBlock!: number; - // Number of records per page (reactive getter/setter) - public perPage: Accessor; - public setPerPage: Setter; + // Number of records per page + public perPage!: number; constructor() { - [this.count, this.setCount] = createSignal(0); - [this.page, this.setPage] = createSignal(1); - [this.perBlock, this.setPerBlock] = createSignal(10); - [this.perPage, this.setPerPage] = createSignal(10); + bindReactive(this, "count", 0); + bindReactive(this, "page", 1); + bindReactive(this, "perBlock", 10); + bindReactive(this, "perPage", 10); } /** * Returns the total number of blocks needed for the current settings. */ get blocks(): number { - const blocksFloor = Math.floor(this.pages / this.perBlock()); - const reminder = this.pages % this.perBlock() > 0 ? 1 : 0; + const blocksFloor = Math.floor(this.pages / this.perBlock); + const reminder = this.pages % this.perBlock > 0 ? 1 : 0; return blocksFloor + reminder; } @@ -45,11 +41,11 @@ export class FazPaginator { * Returns the total number of pages based on count and perPage. */ get pages(): number { - if (this.count() === 0) { + if (this.count === 0) { return 1; } - const pagesFloor = Math.floor(this.count() / this.perPage()); - let remainder = this.count() % this.perPage(); + const pagesFloor = Math.floor(this.count / this.perPage); + let remainder = this.count % this.perPage; remainder = remainder > 0 ? 1 : 0; return pagesFloor + remainder; } @@ -59,24 +55,24 @@ export class FazPaginator { * Adjusts the page if it's out of bounds. */ get safePage(): number { - if (this.page() < 1) { - this.setPage(1); + if (this.page < 1) { + this.page = 1; } - if (this.pages < this.page()) { - this.setPage(this.pages); + if (this.pages < this.page) { + this.page = this.pages; } - return this.page(); + return this.page; } /** * Returns the current block number (1-based) for the current page. */ get block(): number { - if (this.safePage <= this.perBlock()) { + if (this.safePage <= this.perBlock) { return 1; } - const currentBlockFloor = Math.floor(this.safePage / this.perBlock()); - const remainder = this.safePage % this.perBlock(); + const currentBlockFloor = Math.floor(this.safePage / this.perBlock); + const remainder = this.safePage % this.perBlock; const addRemainder = remainder > 0 ? 1 : 0; return currentBlockFloor + addRemainder; } @@ -85,7 +81,7 @@ export class FazPaginator { * Returns the first page number in the current block. */ get currentFirstPage(): number { - return (this.block * this.perBlock()) - this.perBlock() + 1; + return (this.block * this.perBlock) - this.perBlock + 1; } /** @@ -96,22 +92,22 @@ export class FazPaginator { if (this.isLastBlock) { return this.currentFirstPage + this.pagesInLastBlock - 1; } - return this.block * this.perBlock(); + return this.block * this.perBlock; } /** * Returns the number of pages in the last block. */ get pagesInLastBlock(): number { - let lastBlockRemainder = this.pages % this.perBlock(); - return lastBlockRemainder > 0 ? lastBlockRemainder : this.perBlock(); + let lastBlockRemainder = this.pages % this.perBlock; + return lastBlockRemainder > 0 ? lastBlockRemainder : this.perBlock; } /** * Returns an array of page numbers in the current block. */ get blockPages(): number[] { - let pages = this.isLastBlock ? this.pagesInLastBlock : this.perBlock(); + let pages = this.isLastBlock ? this.pagesInLastBlock : this.perBlock; return Array(pages).fill(undefined).map((_, i) => i + this.currentFirstPage); } @@ -169,15 +165,15 @@ export class FazPaginator { * Returns the number of records in the last page. */ get recordsInLastPage() { - let lastPageRemainder = this.count() % this.perPage(); - return lastPageRemainder > 0 ? lastPageRemainder : this.perPage(); + let lastPageRemainder = this.count % this.perPage; + return lastPageRemainder > 0 ? lastPageRemainder : this.perPage; } /** * Returns the absolute index of the first record on the current page. */ get firstRecord() { - return (this.safePage * this.perPage()) - this.perPage() + 1; + return (this.safePage * this.perPage) - this.perPage + 1; } /** @@ -187,6 +183,6 @@ export class FazPaginator { if (this.isLastPage) { return this.firstRecord + this.recordsInLastPage - 1; } - return this.safePage * this.perPage(); + return this.safePage * this.perPage; } } diff --git a/src/reactivity.ts b/src/reactivity.ts new file mode 100644 index 0000000..3101567 --- /dev/null +++ b/src/reactivity.ts @@ -0,0 +1,25 @@ + +import { createSignal } from "solid-js"; + +/** + * Binds a SolidJS signal to an object property, making it reactive. + * This is a decomposed approach that avoids boilerplate and strings-only APIs. + * + * @param target The object to define the property on. + * @param key The key of the property. + * @param initialValue The initial value for the signal. + */ +export function bindReactive( + target: T, + key: K, + initialValue: T[K] +) { + const [getter, setter] = createSignal(initialValue); + + Object.defineProperty(target, key, { + get: () => getter(), + set: (val: T[K]) => setter(() => val), + enumerable: true, + configurable: true + }); +} diff --git a/test/element.test.tsx b/test/element.test.tsx index 2caa2fb..4f83d22 100644 --- a/test/element.test.tsx +++ b/test/element.test.tsx @@ -13,22 +13,22 @@ class TestElement extends FazElement { constructor() { super(); - this.setDisabled(false); + this.disabled = false; createRoot(() => { createEffect((prevActive) => { - if (this.active() != prevActive) { + if (this.active != prevActive) { this.doActiveChanged = true; } }, false); createEffect((prevDisabled) => { - if (this.disabled() != prevDisabled) { + if (this.disabled != prevDisabled) { this.doDisabledChanged = true; } }, false); createEffect((prevExtraClasses) => { - if (this.extraClasses() != prevExtraClasses) { + if (this.extraClasses != prevExtraClasses) { this.doExtraClassesChanged = true; } }, "aclass"); @@ -63,38 +63,38 @@ describe("Test Element", () => { `; const comments = allComments(document.body); const [outerElementComment, innerElementComment, anotherInnerElementComment] = comments; - const outerElement = outerElementComment.fazElement() as TestElement; - const innerElement = innerElementComment.fazElement() as TestElement; - const anotherInnerElement = anotherInnerElementComment.fazElement() as TestElement; - outerElement.setActive(true); - outerElement.setDisabled(true); + const outerElement = outerElementComment.fazElement as TestElement; + const innerElement = innerElementComment.fazElement as TestElement; + const anotherInnerElement = anotherInnerElementComment.fazElement as TestElement; + outerElement.active = true; + outerElement.disabled = true; expect(outerElement.idGenerated).toBeFalsy(); expect(innerElement.idGenerated).toBeFalsy(); expect(anotherInnerElement.idGenerated).toBeTruthy(); - expect(outerElement.fazRole()).toBe("list"); - expect(innerElement.fazRole()).toBe("listitem"); - expect(anotherInnerElement.fazRole()).toBe("listitem"); + expect(outerElement.fazRole).toBe("list"); + expect(innerElement.fazRole).toBe("listitem"); + expect(anotherInnerElement.fazRole).toBe("listitem"); expect(outerElement.doActiveChanged).toBeTruthy(); expect(outerElement.doDisabledChanged).toBeTruthy(); expect(outerElement.doExtraClassesChanged).toBeFalsy(); - outerElement.setExtraClasses("aclass"); + outerElement.extraClasses = "aclass"; expect(outerElement.doExtraClassesChanged).toBeFalsy(); - outerElement.setExtraClasses("aclass bclass"); + outerElement.extraClasses = "aclass bclass"; expect(outerElement.doExtraClassesChanged).toBeTruthy(); outerElement.doExtraClassesChanged = false; - outerElement.setExtraClasses("bclass aclass"); + outerElement.extraClasses = "bclass aclass"; expect(outerElement.doExtraClassesChanged).toBeTruthy(); outerElement.doExtraClassesChanged = false; - outerElement.setExtraClasses("bclass aclass "); + outerElement.extraClasses = "bclass aclass "; expect(outerElement.doExtraClassesChanged).toBeTruthy(); outerElement.doExtraClassesChanged = false; - outerElement.setExtraClasses(" bclass aclass"); + outerElement.extraClasses = " bclass aclass"; expect(outerElement.doExtraClassesChanged).toBeTruthy(); outerElement.doExtraClassesChanged = false; - outerElement.setExtraClasses(" bclass aclass "); + outerElement.extraClasses = " bclass aclass "; expect(outerElement.doExtraClassesChanged).toBeTruthy(); outerElement.doExtraClassesChanged = false; - outerElement.setExtraClasses("bclass aclass cclass"); + outerElement.extraClasses = "bclass aclass cclass"; expect(outerElement.doExtraClassesChanged).toBeTruthy(); outerElement.doExtraClassesChanged = false; outerElement.pushExtraClass("aclass"); @@ -104,8 +104,8 @@ describe("Test Element", () => { expect(outerElement.doExtraClassesChanged).toBeFalsy(); outerElement.pushExtraClass("eclass"); expect(outerElement.doExtraClassesChanged).toBeTruthy(); - outerElement.setActive(false); - outerElement.setDisabled(undefined); + outerElement.active = false; + outerElement.disabled = undefined; expect(innerElement.doActiveChanged).toBeFalsy(); expect(innerElement.doDisabledChanged).toBeFalsy(); }); @@ -123,9 +123,9 @@ describe("Test Element", () => { const innerElement = document.getElementById("inner") as unknown as FazElement; const outerDiv = outerElement.contentChild; const innerDiv = innerElement.contentChild; - expect(outerElement?.fazChildren().length).toBe(1); - expect(outerElement?.fazChildren()[0]).toBe(innerElement); - expect(innerElement?.parent()).toBe(outerElement); + expect(outerElement?.fazChildren.length).toBe(1); + expect(outerElement?.fazChildren[0]).toBe(innerElement); + expect(innerElement?.parent).toBe(outerElement); expect((outerDiv as unknown as Element).tagName).toBe("DIV"); expect((innerDiv as unknown as Element).tagName).toBe("DIV"); }); diff --git a/test/form.test.tsx b/test/form.test.tsx index a418cfd..ec7729f 100644 --- a/test/form.test.tsx +++ b/test/form.test.tsx @@ -41,7 +41,7 @@ describe("Test Forms", () => { `; const [formComment] = allComments(document.body); - const form = formComment.fazElement() as FazFormElement; + const form = formComment.fazElement as FazFormElement; await vitest.runAllTimersAsync(); expect(form.hasErrors()).toBeFalsy(); form.pushError("field1", "error 1"); diff --git a/test/paginator.test.ts b/test/paginator.test.ts index 55bebdb..89b6e4e 100644 --- a/test/paginator.test.ts +++ b/test/paginator.test.ts @@ -5,28 +5,28 @@ import { describe, expect, test } from "vitest"; describe("Test Paginator", () => { test("One page", () => { const paginator = new FazPaginator(); - paginator.setCount(10) + paginator.count = 10; expect(paginator.pages).toBe(1); expect(paginator.blocks).toBe(1); - expect(paginator.page()).toBe(1); + expect(paginator.page).toBe(1); expect(paginator.safePage).toBe(1); expect(paginator.block).toBe(1); expect(paginator.isLastPage).toBeTruthy(); expect(paginator.isLastBlock).toBeTruthy(); - paginator.setPage(0) + paginator.page = 0; expect(paginator.safePage).toBe(1); - expect(paginator.page()).toBe(1); + expect(paginator.page).toBe(1); expect(paginator.isLastPage).toBeTruthy(); expect(paginator.isLastBlock).toBeTruthy(); expect(paginator.firstRecord).toBe(1); expect(paginator.lastRecord).toBe(10); expect(paginator.recordsInLastPage).toBe(10); - paginator.setPage(2) + paginator.page = 2; expect(paginator.safePage == 2).toBeFalsy(); - expect(paginator.page() == 2).toBeFalsy(); + expect(paginator.page == 2).toBeFalsy(); expect(paginator.safePage).toBe(1); - expect(paginator.page()).toBe(1); + expect(paginator.page).toBe(1); expect(paginator.block).toBe(1); expect(paginator.hasMultiplePages).toBeFalsy(); expect(paginator.hasMultipleBlocks).toBeFalsy(); @@ -39,11 +39,11 @@ describe("Test Paginator", () => { }); test("More than one page, one block", () => { const paginator = new FazPaginator(); - paginator.setCount(91) + paginator.count = 91; expect(paginator.blocks).toBe(1); expect(paginator.pages).toBe(10); - expect(paginator.page()).toBe(1); + expect(paginator.page).toBe(1); expect(paginator.safePage).toBe(1); expect(paginator.block).toBe(1); expect(paginator.isFirstPage).toBeTruthy(); @@ -51,18 +51,18 @@ describe("Test Paginator", () => { expect(paginator.isLastBlock).toBeTruthy(); expect(paginator.firstRecord).toBe(1); expect(paginator.lastRecord).toBe(10); - paginator.setPage(2) + paginator.page = 2; expect(paginator.safePage).toBe(2); - expect(paginator.page()).toBe(2); + expect(paginator.page).toBe(2); expect(paginator.block).toBe(1); expect(paginator.isFirstPage).toBeFalsy(); expect(paginator.isLastPage).toBeFalsy(); expect(paginator.isLastBlock).toBeTruthy(); expect(paginator.firstRecord).toBe(11); expect(paginator.lastRecord).toBe(20); - paginator.setPage(8) + paginator.page = 8; expect(paginator.safePage).toBe(8); - expect(paginator.page()).toBe(8); + expect(paginator.page).toBe(8); expect(paginator.block).toBe(1); expect(paginator.isFirstPage).toBeFalsy(); expect(paginator.isLastPage).toBeFalsy(); @@ -71,12 +71,12 @@ describe("Test Paginator", () => { expect(paginator.hasMultipleBlocks).toBeFalsy(); expect(paginator.firstRecord).toBe(71); expect(paginator.lastRecord).toBe(80); - paginator.setPage(10) + paginator.page = 10; expect(paginator.isFirstPage).toBeFalsy(); expect(paginator.isLastPage).toBeTruthy(); expect(paginator.isLastBlock).toBeTruthy(); expect(paginator.safePage).toBe(10); - expect(paginator.page()).toBe(10); + expect(paginator.page).toBe(10); expect(paginator.block).toBe(1); expect(paginator.firstRecord).toBe(91); expect(paginator.lastRecord).toBe(91); @@ -85,57 +85,57 @@ describe("Test Paginator", () => { }); test("More than one page, more than one block", () => { const paginator = new FazPaginator(); - paginator.setCount(340) + paginator.count = 340; expect(paginator.pages).toBe(34); expect(paginator.blocks).toBe(4); - expect(paginator.page()).toBe(1); + expect(paginator.page).toBe(1); expect(paginator.safePage).toBe(1); expect(paginator.block).toBe(1); expect(paginator.isLastPage).toBeFalsy(); expect(paginator.isLastBlock).toBeFalsy(); expect(paginator.firstRecord).toBe(1); expect(paginator.lastRecord).toBe(10); - paginator.setPage(11) + paginator.page = 11; expect(paginator.isLastPage).toBeFalsy(); expect(paginator.isLastBlock).toBeFalsy(); expect(paginator.safePage).toBe(11); - expect(paginator.page()).toBe(11); + expect(paginator.page).toBe(11); expect(paginator.block).toBe(2); expect(paginator.firstRecord).toBe(101); expect(paginator.lastRecord).toBe(110); - paginator.setPage(25) + paginator.page = 25; expect(paginator.isLastPage).toBeFalsy(); expect(paginator.isLastBlock).toBeFalsy(); expect(paginator.safePage).toBe(25); - expect(paginator.page()).toBe(25); + expect(paginator.page).toBe(25); expect(paginator.block).toBe(3); expect(paginator.firstRecord).toBe(241); expect(paginator.lastRecord).toBe(250); - paginator.setPage(32) + paginator.page = 32; expect(paginator.isLastPage).toBeFalsy(); expect(paginator.isLastBlock).toBeTruthy(); expect(paginator.pagesInLastBlock).toBe(4); expect(paginator.safePage).toBe(32); - expect(paginator.page()).toBe(32); + expect(paginator.page).toBe(32); expect(paginator.block).toBe(4); expect(paginator.firstRecord).toBe(311); expect(paginator.lastRecord).toBe(320); - paginator.setPage(34) + paginator.page = 34; expect(paginator.isLastPage).toBeTruthy(); expect(paginator.isLastBlock).toBeTruthy(); expect(paginator.pagesInLastBlock).toBe(4); expect(paginator.safePage).toBe(34); - expect(paginator.page()).toBe(34); + expect(paginator.page).toBe(34); expect(paginator.block).toBe(4); expect(paginator.firstRecord).toBe(331); expect(paginator.lastRecord).toBe(340); - paginator.setPage(35) + paginator.page = 35; expect(paginator.pagesInLastBlock).toBe(4); expect(paginator.safePage).toBe(34); expect(paginator.isLastPage).toBeTruthy(); expect(paginator.isLastBlock).toBeTruthy(); - expect(paginator.page()).toBe(34); + expect(paginator.page).toBe(34); expect(paginator.block).toBe(4); expect(paginator.firstRecord).toBe(331); expect(paginator.lastRecord).toBe(340); diff --git a/test/reactivity.test.ts b/test/reactivity.test.ts new file mode 100644 index 0000000..55c20e8 --- /dev/null +++ b/test/reactivity.test.ts @@ -0,0 +1,61 @@ + +import { describe, expect, test, vitest } from "vitest"; +import { createEffect, createRoot } from "solid-js"; +import { bindReactive } from "../src/reactivity"; + +describe("Reactivity Engine", () => { + test("bindReactive should link a property to a Solid signal", () => { + const target = { + active: false + }; + + // Bind reactivity to 'active' property + bindReactive(target, "active", false); + + let effectCount = 0; + let lastValue: boolean | undefined; + + createRoot(() => { + createEffect(() => { + lastValue = target.active; + effectCount++; + }); + }); + + // Initial effect run + expect(effectCount).toBe(1); + expect(lastValue).toBe(false); + + // Update target property + target.active = true; + + // Solid effects are scheduled on the next microtask or can be observed + // if we wait or use synchronous patterns. + // In Vitest, we might need a small delay or check after a tick. + + expect(target.active).toBe(true); + expect(effectCount).toBe(2); + expect(lastValue).toBe(true); + }); + + test("bindReactive should handle complex types", () => { + const target = { + data: { name: "initial" } + }; + + bindReactive(target, "data", { name: "initial" }); + + let lastValue: string = ""; + + createRoot(() => { + createEffect(() => { + lastValue = target.data.name; + }); + }); + + expect(lastValue).toBe("initial"); + + target.data = { name: "updated" }; + expect(lastValue).toBe("updated"); + }); +}); From 50b8176937ff4f18b5a9644752622c8c751e2ac3 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 20:42:21 -0500 Subject: [PATCH 184/199] feat(core): implement property-based reactivity and layout stability - Introduced bindReactive engine for property-based SolidJS integration - Implemented layout stabilization using 'display: contents' and microtask rendering - Refactored FazElement, FazFormElement, and FazPaginator with full type safety - Cleaned up legacy signal accessors and boilerplate - Completed full build and updated type declarations Refs: #167 --- src/element.ts | 22 +++++++++---------- src/form.tsx | 12 +++++----- types/element.d.ts | 46 +++++++++++++-------------------------- types/element.d.ts.map | 2 +- types/form.d.ts | 10 +++------ types/form.d.ts.map | 2 +- types/paginator.d.ts | 13 ++++------- types/paginator.d.ts.map | 2 +- types/reactivity.d.ts | 10 +++++++++ types/reactivity.d.ts.map | 1 + 10 files changed, 53 insertions(+), 67 deletions(-) create mode 100644 types/reactivity.d.ts create mode 100644 types/reactivity.d.ts.map diff --git a/src/element.ts b/src/element.ts index 82cb903..66800e1 100644 --- a/src/element.ts +++ b/src/element.ts @@ -46,25 +46,25 @@ export class FazElement extends HTMLElement { // Standardize Render Strategy: use display: contents to avoid layout expansion this.style.display = "contents"; - const reactiveProps: Partial = { + const config = { active: false, connected: false, - content: undefined, + content: undefined as string | undefined, debug: false, - disabled: undefined, + disabled: undefined as boolean | undefined, extraClasses: "", - fazChildren: [], - fazElement: undefined, - fazRole: undefined, + fazChildren: [] as FazElement[], + fazElement: undefined as FazElement | undefined, + fazRole: undefined as FazAttributeRole, loading: true, - parent: undefined, + parent: undefined as FazElement | undefined, reload: true, - link: undefined, + link: undefined as string | undefined, }; - for (const [key, value] of Object.entries(reactiveProps)) { - bindReactive(this, key as keyof this, value); - } + (Object.keys(config) as Array).forEach((key) => { + bindReactive(this, key as any, config[key]); + }); if (!this.id) { this.id = randomId(); diff --git a/src/form.tsx b/src/form.tsx index c481f77..f521229 100644 --- a/src/form.tsx +++ b/src/form.tsx @@ -11,15 +11,15 @@ export class FazFormElement extends FazElement { constructor() { super(); - const reactiveProps: Partial = { - action: undefined, - errors: {}, + const config = { + action: undefined as string | undefined, + errors: {} as Record, method: "get", }; - for (const [key, value] of Object.entries(reactiveProps)) { - bindReactive(this, key as keyof this, value); - } + (Object.keys(config) as Array).forEach((key) => { + bindReactive(this, key as any, config[key]); + }); for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { diff --git a/types/element.d.ts b/types/element.d.ts index 426874f..2cb0214 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -1,41 +1,25 @@ import { FazAttributeRole } from "./element-attributes"; -import { Accessor, Setter } from "solid-js"; export interface FazComment extends Comment { - fazElement: Accessor; - setFazElement: Setter; + fazElement: FazElement | undefined; } export interface FazNode extends ChildNode { - fazElement: Accessor; - setFazElement: Setter; + fazElement: FazElement | undefined; } export declare class FazElement extends HTMLElement { - active: Accessor; - setActive: Setter; - connected: Accessor; - setConnected: Setter; - content: Accessor; - setContent: Setter; - debug: Accessor; - setDebug: Setter; - disabled: Accessor; - setDisabled: Setter; - extraClasses: Accessor; - setExtraClasses: Setter; - fazChildren: Accessor; - setFazChildren: Setter; - fazElement: Accessor; - setFazElement: Setter; - fazRole: Accessor; - setFazRole: Setter; + active: boolean; + connected: boolean; + content: string | undefined; + debug: boolean; + disabled: boolean | undefined; + extraClasses: string; + fazChildren: FazElement[]; + fazElement: FazElement | undefined; + fazRole: FazAttributeRole; idGenerated: boolean; - loading: Accessor; - setLoading: Setter; - parent: Accessor; - setParent: Setter; - reload: Accessor; - setReload: Setter; - link: Accessor; - setLink: Setter; + loading: boolean; + parent: FazElement | undefined; + reload: boolean; + link: string | undefined; childPrefix: string; renderedChild: ChildNode | null; private comment; diff --git a/types/element.d.ts.map b/types/element.d.ts.map index 3e9bfbc..d8aa3c2 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CAClD;AAGD,MAAM,WAAW,OAAQ,SAAQ,SAAS;IACtC,UAAU,EAAE,QAAQ,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CAClD;AAGD,qBAAa,UAAW,SAAQ,WAAW;IAGhC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,C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E;IAQlC,iBAAiB;IAoBjB,IAAI;IAGJ,IAAI;IAGJ,MAAM;CAQT"} \ No newline at end of file diff --git a/types/form.d.ts b/types/form.d.ts index 0edd37e..7e0dac0 100644 --- a/types/form.d.ts +++ b/types/form.d.ts @@ -1,12 +1,8 @@ import { FazElement } from "./element"; -import { Accessor, Setter } from "solid-js"; export declare class FazFormElement extends FazElement { - action: Accessor; - setAction: Setter; - errors: Accessor>; - setErrors: Setter>; - method: Accessor; - setMethod: Setter; + action: string | undefined; + errors: Record; + method: string; constructor(); get form(): HTMLFormElement | undefined; get values(): Record; diff --git a/types/form.d.ts.map b/types/form.d.ts.map index 6eef8e5..339b3cd 100644 --- a/types/form.d.ts.map +++ b/types/form.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAG1D,qBAAa,cAAe,SAAQ,UAAU;IAEnC,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5C,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IAoBjC,IAAI,IAAI,IAAI,eAAe,GAAC,SAAS,CAEpC;IAED,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAU/C;IAEM,cAAc,CAAC,GAAG,EAAE,MAAM;IAQ1B,WAAW;IAIX,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,SAAS,IAAI,OAAO;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAa9C"} \ No newline at end of file +{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/form.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAIvC,qBAAa,cAAe,SAAQ,UAAU;IAEnC,MAAM,EAAE,MAAM,GAAC,SAAS,CAAC;IACzB,MAAM,EAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,MAAM,EAAG,MAAM,CAAC;;IA0BvB,IAAI,IAAI,IAAI,eAAe,GAAC,SAAS,CAEpC;IAED,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAU/C;IAEM,cAAc,CAAC,GAAG,EAAE,MAAM;IAQ1B,WAAW;IAIX,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIlC,SAAS,IAAI,OAAO;IAIpB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAInC,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAa9C"} \ No newline at end of file diff --git a/types/paginator.d.ts b/types/paginator.d.ts index e491bb7..6415bf7 100644 --- a/types/paginator.d.ts +++ b/types/paginator.d.ts @@ -1,4 +1,3 @@ -import { Accessor, Setter } from "solid-js"; /** * FazPaginator is a pagination utility class built for use with Solid.js * reactive primitives. @@ -6,14 +5,10 @@ import { Accessor, Setter } from "solid-js"; * offering helpers for navigation, state, and boundary conditions. */ export declare class FazPaginator { - count: Accessor; - setCount: Setter; - page: Accessor; - setPage: Setter; - perBlock: Accessor; - setPerBlock: Setter; - perPage: Accessor; - setPerPage: Setter; + count: number; + page: number; + perBlock: number; + perPage: number; constructor(); /** * Returns the total number of blocks needed for the current settings. diff --git a/types/paginator.d.ts.map b/types/paginator.d.ts.map index b09ae9e..66b12ca 100644 --- a/types/paginator.d.ts.map +++ b/types/paginator.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"paginator.d.ts","sourceRoot":"","sources":["../src/paginator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1D;;;;;GAKG;AACH,qBAAa,YAAY;IAGd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAGzB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAGxB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAG5B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;;IASlC;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAInB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAQlB;IAED;;;OAGG;IACH,IAAI,QAAQ,IAAI,MAAM,CAQrB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAQlB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED;;;OAGG;IACH,IAAI,eAAe,WAKlB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAG7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,EAAE,CAGzB;IAED;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIpC;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,YAAY,YAEf;IAED;;OAEG;IACH,IAAI,UAAU,YAEb;IAED;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,gBAAgB,YAEnB;IAED;;OAEG;IACH,IAAI,iBAAiB,YAEpB;IAED;;OAEG;IACH,IAAI,iBAAiB,WAGpB;IAED;;OAEG;IACH,IAAI,WAAW,WAEd;IAED;;OAEG;IACH,IAAI,UAAU,WAKb;CACJ"} \ No newline at end of file +{"version":3,"file":"paginator.d.ts","sourceRoot":"","sources":["../src/paginator.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,qBAAa,YAAY;IAGd,KAAK,EAAG,MAAM,CAAC;IAGf,IAAI,EAAG,MAAM,CAAC;IAGd,QAAQ,EAAG,MAAM,CAAC;IAGlB,OAAO,EAAG,MAAM,CAAC;;IASxB;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAInB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAQlB;IAED;;;OAGG;IACH,IAAI,QAAQ,IAAI,MAAM,CAQrB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAQlB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED;;;OAGG;IACH,IAAI,eAAe,WAKlB;IAED;;OAEG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAG7B;IAED;;OAEG;IACH,IAAI,UAAU,IAAI,MAAM,EAAE,CAGzB;IAED;;;OAGG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIpC;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,YAAY,YAEf;IAED;;OAEG;IACH,IAAI,UAAU,YAEb;IAED;;OAEG;IACH,IAAI,WAAW,YAEd;IAED;;OAEG;IACH,IAAI,gBAAgB,YAEnB;IAED;;OAEG;IACH,IAAI,iBAAiB,YAEpB;IAED;;OAEG;IACH,IAAI,iBAAiB,WAGpB;IAED;;OAEG;IACH,IAAI,WAAW,WAEd;IAED;;OAEG;IACH,IAAI,UAAU,WAKb;CACJ"} \ No newline at end of file diff --git a/types/reactivity.d.ts b/types/reactivity.d.ts new file mode 100644 index 0000000..c1332b1 --- /dev/null +++ b/types/reactivity.d.ts @@ -0,0 +1,10 @@ +/** + * Binds a SolidJS signal to an object property, making it reactive. + * This is a decomposed approach that avoids boilerplate and strings-only APIs. + * + * @param target The object to define the property on. + * @param key The key of the property. + * @param initialValue The initial value for the signal. + */ +export declare function bindReactive(target: T, key: K, initialValue: T[K]): void; +//# sourceMappingURL=reactivity.d.ts.map \ No newline at end of file diff --git a/types/reactivity.d.ts.map b/types/reactivity.d.ts.map new file mode 100644 index 0000000..50ccc96 --- /dev/null +++ b/types/reactivity.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reactivity.d.ts","sourceRoot":"","sources":["../src/reactivity.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAC5D,MAAM,EAAE,CAAC,EACT,GAAG,EAAE,CAAC,EACN,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,QAUrB"} \ No newline at end of file From a1c78ac71768947e6ae5035045fe7b01d9b3ed56 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 21:12:51 -0500 Subject: [PATCH 185/199] test(fix): resolve ESM/CJS interop issue for Node 21 - Inlined problematic CSS dependencies in Vitest config - Prevents ERR_REQUIRE_ESM in CI environments - Maintains compatibility across Node 20, 21, and 22 Refs: #167 --- vitest.config.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index ae385fc..63ab86d 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,5 +5,16 @@ export default defineConfig({ plugins: [solid()], resolve: { conditions: ["development", "browser"], + }, + test: { + environment: "jsdom", + server: { + deps: { + inline: [ + "@csstools/css-calc", + "@asamuzakjp/css-color" + ] + } + } } }) From 9e39ebc0bd0859566749e68dc24c077f2e173dae Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 21:24:30 -0500 Subject: [PATCH 186/199] test(fix): force dependency inlining and switch to threads pool - Added root ssr.noExternal for problematic CSS packages - Switched Vitest pool to 'threads' for better ESM/CJS interop - Aims to resolve persistent ERR_REQUIRE_ESM in Node 21 CI Refs: #167 --- vitest.config.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index 63ab86d..94f740d 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -6,8 +6,15 @@ export default defineConfig({ resolve: { conditions: ["development", "browser"], }, + ssr: { + noExternal: [ + "@csstools/css-calc", + "@asamuzakjp/css-color" + ] + }, test: { environment: "jsdom", + pool: "threads", server: { deps: { inline: [ From f989d54c606e650a80907d1fbac915a9a7258f1f Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 21:29:22 -0500 Subject: [PATCH 187/199] build(deps): bump jsdom to 28.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c555971..e322103 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jsdom": "27.0.0", + "jsdom": "28.1.0", "nise": "6.1.1", "prettier": "3.7.4", "ts-node": "10.9.2", From 02e054d2d1186a8e6c7f0c5ba51131b97e065fc1 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 21:45:45 -0500 Subject: [PATCH 188/199] build(fix): lock css-color to resolve ESM/CJS interop errors - Added resolution for @asamuzakjp/css-color@4.1.1 - Reverted experimental Vitest config changes - Fixes persistent ERR_REQUIRE_ESM in Node 21/22 environments Refs: #167 --- package.json | 7 +++++-- vitest.config.ts | 18 ------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index e322103..b655baf 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", - "jsdom": "28.1.0", + "jsdom": "27.0.0", "nise": "6.1.1", "prettier": "3.7.4", "ts-node": "10.9.2", @@ -78,5 +78,8 @@ "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" }, - "packageManager": "yarn@4.8.1" + "packageManager": "yarn@4.8.1", + "resolutions": { + "@asamuzakjp/css-color": "4.1.1" + } } diff --git a/vitest.config.ts b/vitest.config.ts index 94f740d..ae385fc 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,23 +5,5 @@ export default defineConfig({ plugins: [solid()], resolve: { conditions: ["development", "browser"], - }, - ssr: { - noExternal: [ - "@csstools/css-calc", - "@asamuzakjp/css-color" - ] - }, - test: { - environment: "jsdom", - pool: "threads", - server: { - deps: { - inline: [ - "@csstools/css-calc", - "@asamuzakjp/css-color" - ] - } - } } }) From ed7fec05ffb7e1ca2ed8691f7c46819a374a96ba Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 23:26:05 -0500 Subject: [PATCH 189/199] feat(core): expose reactivity engine and implement subpath exports - Added 'bindReactive' and 'FazPaginator' to main entry point (src/index.ts) - Implemented subpath exports in package.json for modern bundlers - Ensured type declarations are correctly generated and exposed - Resolves blocking issues for downstream libraries (e.g., faz-bootstrap) Fixes: #168 --- package.json | 14 ++++++++++++++ src/index.ts | 2 ++ types/index.d.ts | 2 ++ types/index.d.ts.map | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b655baf..6be142a 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,20 @@ "src", "types" ], + "exports": { + ".": { + "types": "./dist/types/index.d.ts", + "import": "./dist/js/index.js" + }, + "./reactivity": { + "types": "./dist/types/reactivity.d.ts", + "import": "./dist/js/reactivity.js" + }, + "./paginator": { + "types": "./dist/types/paginator.d.ts", + "import": "./dist/js/paginator.js" + } + }, "repository": { "type": "git", "url": "git+https://github.com/candango/faz.git" diff --git a/src/index.ts b/src/index.ts index 2d90d8d..63daddc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,3 +3,5 @@ export { FazElement } from "./element"; export type { FazElementAttributes } from "./element-attributes"; export { FazFormElement } from "./form"; export { randomId, toBoolean } from "./values"; +export { bindReactive } from "./reactivity"; +export { FazPaginator } from "./paginator"; diff --git a/types/index.d.ts b/types/index.d.ts index 3f92560..4c2f8e5 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2,4 +2,6 @@ export { FazElement } from "./element"; export type { FazElementAttributes } from "./element-attributes"; export { FazFormElement } from "./form"; export { randomId, toBoolean } from "./values"; +export { bindReactive } from "./reactivity"; +export { FazPaginator } from "./paginator"; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/types/index.d.ts.map b/types/index.d.ts.map index 5ca58b6..6ebde84 100644 --- a/types/index.d.ts.map +++ b/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file From 93ef25e20b22447c12cba0895610b9edbebefa2e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sat, 7 Mar 2026 23:40:41 -0500 Subject: [PATCH 190/199] chore(release): bump version to 0.5.1 and finalize distribution types - Updated version to 0.5.1 in package.json - Finalized exports and subpath mappings for external consumers - Completed full build and generated updated declaration files Refs: #168 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6be142a..37aee5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.5.0", + "version": "0.5.1", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", From 16bc2689950ab2d450f6466b191b28d7ea56f0f5 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Sun, 8 Mar 2026 00:19:21 -0500 Subject: [PATCH 191/199] fix(core): restore direct access to src for unified reactivity - Exposed ./src and ./src/* in package.json exports - Restores compatibility with 0.4.3 for downstream libraries (faz-bootstrap) - Ensures unified SolidJS instance by allowing direct source imports - Bumped version to 0.5.2 Fixes: #169 --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 37aee5f..a610797 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faz", - "version": "0.5.1", + "version": "0.5.2", "description": "JS HTML Web Components", "main": "dist/index.js", "module": "dist/js/index.js", @@ -26,7 +26,9 @@ "./paginator": { "types": "./dist/types/paginator.d.ts", "import": "./dist/js/paginator.js" - } + }, + "./src": "./src/index.ts", + "./src/*": "./src/*" }, "repository": { "type": "git", From e16370453d7d260fedcd2b51c6fde6cd1d25df0a Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 10:27:48 -0400 Subject: [PATCH 192/199] build(deps): bump solid-js to 1.9.13 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a610797..fe29bb7 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ ], "dependencies": { "less": "4.5.1", - "solid-js": "1.9.10" + "solid-js": "1.9.13" }, "devDependencies": { "@testing-library/jest-dom": "6.9.1", From c381a2c2d7b667c0869d10ade68536b88623d636 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 10:29:59 -0400 Subject: [PATCH 193/199] build(deps): bump nise to 6.1.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fe29bb7..704fbb3 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "esbuild-plugin-solid": "0.6.0", "http-server": "14.1.1", "jsdom": "27.0.0", - "nise": "6.1.1", + "nise": "6.1.5", "prettier": "3.7.4", "ts-node": "10.9.2", "typescript": "5.9.3", From 68e18f919aeaf4b102cb9b6e7907207749326c6d Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 10:36:12 -0400 Subject: [PATCH 194/199] build(deps): bump vite to 8.0.16 Also bump vite-plugin-solid to 2.11.12. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 704fbb3..43f87fb 100644 --- a/package.json +++ b/package.json @@ -67,8 +67,8 @@ "prettier": "3.7.4", "ts-node": "10.9.2", "typescript": "5.9.3", - "vite": "7.3.0", - "vite-plugin-solid": "2.11.10", + "vite": "8.0.16", + "vite-plugin-solid": "2.11.12", "vitest": "4.0.18" }, "scripts": { From 248c3f54dfdcb5143102c30dd936a5f938f82973 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 11:05:14 -0400 Subject: [PATCH 195/199] fix: harden element and package build Move host DOM mutation out of the custom element constructor so dynamic\nFazElement children can upgrade cleanly and be tracked by fazChildren.\n\nClean stale declaration build state, expose the built ESM entrypoint as\npackage main, remove axios from the showcase, and document the project\nmission plus build hardening follow-ups.\n\nFixes: #170\nFixes: #171 --- AGENTS.md | 81 +++++++++++++++++++++++++++ package.json | 9 ++- showcase/src/form.tsx | 30 +++++----- src/element.ts | 124 ++++++++++++++++++++++++++++++++++++----- test/mutation.test.ts | 79 ++++++++++++++++++++++++++ types/element.d.ts | 19 +++++++ types/element.d.ts.map | 2 +- 7 files changed, 311 insertions(+), 33 deletions(-) create mode 100644 AGENTS.md create mode 100644 test/mutation.test.ts diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..40bbe5c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,81 @@ +# AGENTS.md + +## Project Identity + +Candango Faz is a Web Components toolkit for incremental modernization of legacy applications. + +This repository is not primarily an application. It is a substrate for building reusable custom elements that can be embedded into existing systems, including legacy PHP applications, server-rendered pages, and mixed frontend stacks. + +The strategic goal is to let teams replace tangled combinations of business logic, control flow, markup, Bootstrap classes, and imperative JavaScript with focused HTML tags that encapsulate UI behavior and presentation. + +## Core Mission + +Faz exists to support gradual migration, not big-bang rewrites. + +A typical target environment may contain legacy PHP templates with conditionals, echoes, inline markup, duplicated Bootstrap snippets, and procedural JavaScript. Faz should make it possible to replace those fragments incrementally with reusable custom elements, one screen or one UI island at a time. + +The intended migration pattern is: + +1. Identify a painful legacy UI fragment. +2. Extract the behavior and presentation into a Faz component. +3. Replace the legacy fragment with a single custom element tag. +4. Keep the surrounding legacy system running. +5. Repeat until the system becomes easier to maintain. + +This avoids the common failure mode where a team disappears for months attempting a full rewrite and returns with an incomplete proof of concept while the legacy system remains unchanged. + +## Architectural Implications + +Agents working in this repository must preserve the following priorities: + +- **HTML-first integration:** Components must be easy to consume from plain HTML and server-rendered templates. +- **Attribute-driven APIs:** Public component APIs should work naturally through HTML attributes and properties. +- **Legacy compatibility:** Do not assume a clean SPA environment. Components may be mounted inside old pages with existing CSS and JavaScript. +- **Incremental adoption:** Changes should support partial replacement of legacy UI, not require full application rewrites. +- **Reusable UI islands:** Components should encapsulate behavior, state, and presentation cleanly enough to be reused across legacy screens. +- **Bootstrap-aware presentation:** Faz builds on Bootstrap conventions and should cooperate with Bootstrap-based layouts. +- **Small blast radius:** Prefer changes that can be adopted component-by-component without forcing consumers to reorganize their whole frontend. + +## Development Guidance + +When designing or changing APIs, ask: + +- Can this be used from a legacy PHP template with a simple tag? +- Does the component expose enough behavior through attributes/properties? +- Does this require consumers to adopt a full frontend runtime architecture? +- Can this replace a small legacy fragment without rewriting the whole page? +- Will this behave predictably when embedded into an existing Bootstrap page? + +Avoid designs that only make sense in a modern greenfield SPA. + +## Security and Build Hardening TODOs + +The current build and CI setup needs supply-chain hardening before release automation becomes trusted. + +TODO: + +- Replace the mutable Yarn CI install flow with a reproducible package-manager workflow. + - Current GitHub Actions disables immutable installs and runs `npm run yarn`, which deletes and regenerates `yarn.lock`, `.yarnrc.yml`, and `node_modules`. + - Prefer a committed lockfile and an immutable install command. + - The project may migrate from Yarn to pnpm, but the migration must preserve reproducibility. +- Add explicit least-privilege permissions to GitHub Actions. + - The test workflow should start with `permissions: contents: read` unless a job needs more. +- Decide whether to pin GitHub Actions by SHA. + - Current workflow uses tag references such as `actions/checkout@v4` and `actions/setup-node@v4`. + - Pinning by SHA reduces tag-compromise risk. +- Retire or modernize Travis CI. + - `.travis.yml` still targets Node.js 12 and caches `node_modules`. + - If Travis is no longer used, remove it to avoid stale CI behavior. +- Decide release sourcemap policy. + - `build.mjs` currently emits sourcemaps into `dist/js`. + - Keep them intentionally for open-source/debuggability or disable them for release builds. +- Review bundled legal comment handling. + - `build.mjs` uses `legalComments: "none"`. + - Consider `legalComments: "eof"` or another policy that preserves required dependency notices. +- Audit legacy `eval()` usage before exposing related code paths. + - `input/filterbox.js` contains callback evaluation via `eval(...)`. + - If that code is still reachable, replace it with an explicit callback registry or allowlist. + +## Working Definition + +Candango Faz is a toolkit for replacing legacy UI fragments with reusable Web Components, enabling progressive modernization without stopping the business for a rewrite. diff --git a/package.json b/package.json index 43f87fb..4503a12 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "faz", - "version": "0.5.2", + "version": "0.5.3", "description": "JS HTML Web Components", - "main": "dist/index.js", + "main": "dist/js/index.js", "module": "dist/js/index.js", "mainFields": [ "module", @@ -56,7 +56,6 @@ "@types/jest": "30.0.0", "@types/nise": "1.4.5", "@types/node": "25.0.3", - "axios": "1.13.2", "can-stache-loader": "3.0.0", "esbuild": "0.27.2", "esbuild-plugin-copy": "2.1.1", @@ -78,7 +77,7 @@ "esbuild": "node build.mjs", "ts:build": "npm run ts:clean && npm run ts:declaration && cp -r types dist", "ts:declaration": "tsc -p tsconfig.types.json -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.types.tsbuildinfo", - "ts:clean": "rm -rf tsconfig.tsbuildinfo types/*", + "ts:clean": "rm -rf tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo types/*", "build": "npm run build:clean && npm run lessc && npm run esbuild && npm run ts:build", "build:clean": "rm -rf dist", "build:vendors": "rm -rf dist", @@ -94,7 +93,7 @@ "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" }, - "packageManager": "yarn@4.8.1", + "packageManager": "yarn@4.17.0", "resolutions": { "@asamuzakjp/css-color": "4.1.1" } diff --git a/showcase/src/form.tsx b/showcase/src/form.tsx index a399f14..00b0787 100644 --- a/showcase/src/form.tsx +++ b/showcase/src/form.tsx @@ -5,8 +5,6 @@ import { MountableElement, render } from "solid-js/web"; import { fakeServer, FakeXMLHttpRequest } from "nise"; const server = fakeServer.create(); -import axios from "axios"; - server.autoRespond = true; server.respondWith("GET", "/sometest", function(xhr: FakeXMLHttpRequest) { @@ -37,15 +35,21 @@ export class FormExample extends FazFormElement { } } -axios.get("/sometest").then(function (response) { - console.log(response); -}).catch(function(error){ - console.log(error); -}); - -axios.get("/sometest1").then(function (response) { - console.log(response); -}).catch(function(error){ - console.log(error); -}); +fetch("/sometest") + .then((response) => response.json()) + .then((data) => { + console.log(data); + }) + .catch((error) => { + console.log(error); + }); + +fetch("/sometest1") + .then((response) => response.json()) + .then((data) => { + console.log(data); + }) + .catch((error) => { + console.log(error); + }); customElements.define("faz-form-example", FormExample); diff --git a/src/element.ts b/src/element.ts index 66800e1..fb1f604 100644 --- a/src/element.ts +++ b/src/element.ts @@ -1,7 +1,7 @@ import { FazAttributeRole } from "./element-attributes"; import { randomId, toBoolean } from "./values"; -import { createSignal } from "solid-js"; +import { createSignal, createRoot, createEffect } from "solid-js"; import { bindReactive } from "./reactivity"; // FazComment extends the standard Comment node to include FazElement reactivity. @@ -38,14 +38,14 @@ export class FazElement extends HTMLElement { public renderedChild: ChildNode | null = null; private comment: FazComment | null = null; public source: any; + private observer: MutationObserver | null = null; + private isMoving: boolean = false; + private hostInitialized: boolean = false; // Constructor initializes reactivity, attributes, and default state. constructor() { super(); - // Standardize Render Strategy: use display: contents to avoid layout expansion - this.style.display = "contents"; - const config = { active: false, connected: false, @@ -66,11 +66,6 @@ export class FazElement extends HTMLElement { bindReactive(this, key as any, config[key]); }); - if (!this.id) { - this.id = randomId(); - this.idGenerated = true; - } - for (const attribute of this.attributes) { switch (attribute.name.toLowerCase()) { case "active": @@ -107,8 +102,6 @@ export class FazElement extends HTMLElement { } } - // Store tag name in dataset for reference. - this.dataset['faz_element_item'] = this.tagName; this.childPrefix = "__child-prefix__"; // If source is present, remove all child nodes (for virtualized or remote sourced components). if (this.source) { @@ -121,12 +114,105 @@ export class FazElement extends HTMLElement { bindReactive(this.comment, "fazElement", this); } + /** + * Initialize host DOM attributes after construction. + * + * Custom element constructors must not mutate attributes or children. + * Keep DOM-affecting setup in the connected lifecycle so elements created + * via document.createElement() can upgrade cleanly in browsers and jsdom. + */ + private initializeHost() { + if (this.hostInitialized) return; + + this.style.display = "contents"; + + if (!this.id) { + this.id = randomId(); + this.idGenerated = true; + } + + this.dataset['faz_element_item'] = this.tagName; + + if (this.comment) { + this.comment.data = this.nodeName + " " + this.id; + } + + this.hostInitialized = true; + } + + /** + * Set up a MutationObserver to handle dynamic DOM changes (e.g., HTMX). + */ + private setupMutationObserver() { + this.observer = new MutationObserver((mutations) => { + if (this.isMoving) return; + + let shouldUpdateChildren = false; + + for (const mutation of mutations) { + if (mutation.type === "childList") { + // Handle additions + if (mutation.addedNodes.length > 0) { + this.isMoving = true; + mutation.addedNodes.forEach((node) => { + if (node.parentElement === this && node !== this.comment && node !== this.contentChild) { + this.addChild(node); + } + }); + this.isMoving = false; + shouldUpdateChildren = true; + } + + // Handle removals + if (mutation.removedNodes.length > 0) { + shouldUpdateChildren = true; + } + } + } + + if (shouldUpdateChildren) { + this.updateFazChildren(); + } + }); + + this.observer.observe(this, { childList: true, subtree: true }); + } + + /** + * Updates the reactive fazChildren list by scanning current child nodes. + */ + private updateFazChildren() { + const items: FazElement[] = []; + // Deep scan for elements that are FazElements + const scan = (root: Node | null) => { + root?.childNodes.forEach((node) => { + if (node.nodeType === 1) { + const el = node as HTMLElement; + // Check if it's a FazElement (via our custom marker or duck typing) + if (el.dataset?.['faz_element_item'] || (el as any).fazChildren !== undefined) { + const item = el as unknown as FazElement; + item.parent = this as FazElement; + items.push(item); + } else { + // Only recurse if it's NOT a FazElement (to find nested ones in wrappers) + // If it IS a FazElement, its own observer will handle its children. + scan(node); + } + } + }); + }; + + scan(this); + this.fazChildren = items; + } + /** * The `disconnectedCallback` is a built-in lifecycle method of custom elements. * It is called automatically by the browser when the element is removed from the DOM. */ disconnectedCallback() { if (this.connected) { + this.observer?.disconnect(); this.comment?.parentElement?.removeChild(this.comment); this.disconnect(); } @@ -213,7 +299,12 @@ export class FazElement extends HTMLElement { // Add a child node to the content container. addChild(node: T): T { - this.contentChild?.appendChild(node); + const contentChild = this.contentChild; + if (contentChild && contentChild.nodeType === Node.ELEMENT_NODE) { + contentChild.appendChild(node); + } else { + this.appendChild(node); + } return node; } @@ -228,8 +319,9 @@ export class FazElement extends HTMLElement { const children:Node[] = []; const items: FazElement[] = []; while(this.firstChild) { - if (this.firstChild instanceof FazElement) { - const item = this.firstChild as FazElement; + const el = this.firstChild as HTMLElement; + if (this.firstChild.nodeType === 1 && (el.dataset?.['faz_element_item'] || (el as any).fazChildren !== undefined)) { + const item = this.firstChild as unknown as FazElement; item.parent = this as FazElement; items.push(item); item.dataset['parent'] = this.id; @@ -253,11 +345,15 @@ export class FazElement extends HTMLElement { // Standard web component lifecycle method: called when element is inserted // into the DOM. connectedCallback() { + this.initializeHost(); + // Insert the comment node as a placeholder. if (this.comment){ this.before(this.comment); } + this.setupMutationObserver(); + // Defer rendering and state updates until the next microtask to ensure // all child custom elements are upgraded. // This is necessary because, during connectedCallback, child elements diff --git a/test/mutation.test.ts b/test/mutation.test.ts new file mode 100644 index 0000000..140ade6 --- /dev/null +++ b/test/mutation.test.ts @@ -0,0 +1,79 @@ + +import { describe, expect, test, vitest, beforeEach, afterEach } from "vitest"; +import { FazElement } from "../src/element"; + +// A simple component to test mutations +class MutationTestElement extends FazElement { + show() { + this.style.display = "block"; + this.innerHTML = `
    `; + } + + get contentChild() { + return this.querySelector(".content-root") as ChildNode; + } +} + +if (!customElements.get("mutation-test-element")) { + customElements.define("mutation-test-element", MutationTestElement); +} + +describe("MutationObserver (HTMX Compatibility)", () => { + beforeEach(() => { + document.body.innerHTML = ""; + }); + + test("should detect and move new children added via innerHTML (HTMX append)", async () => { + document.body.innerHTML = ``; + + // Wait for upgrade + await new Promise(resolve => setTimeout(resolve, 50)); + const parent = document.getElementById("parent") as MutationTestElement; + + parent.innerHTML += `
    I am new
    `; + + // Wait for MutationObserver + await new Promise(resolve => setTimeout(resolve, 100)); + + const newChild = document.getElementById("new-child"); + const contentRoot = parent.querySelector(".content-root"); + + expect(newChild?.parentElement).toBe(contentRoot); + }); + + test("should update fazChildren when a FazElement is added", async () => { + document.body.innerHTML = ``; + await new Promise(resolve => setTimeout(resolve, 50)); + const parent = document.getElementById("parent") as MutationTestElement; + + const child = document.createElement("mutation-test-element"); + child.id = "child"; + parent.appendChild(child); + + // Wait for MutationObserver + await new Promise(resolve => setTimeout(resolve, 100)); + + expect(parent.fazChildren.length).toBe(1); + expect(parent.fazChildren[0]).toBe(child); + }); + + test("should update fazChildren when a child is removed", async () => { + document.body.innerHTML = ` + + + + `; + await new Promise(resolve => setTimeout(resolve, 50)); + const parent = document.getElementById("parent") as MutationTestElement; + const child = document.getElementById("child") as MutationTestElement; + + expect(parent.fazChildren.length).toBe(1); + + child.remove(); + + // Wait for MutationObserver + await new Promise(resolve => setTimeout(resolve, 100)); + + expect(parent.fazChildren.length).toBe(0); + }); +}); diff --git a/types/element.d.ts b/types/element.d.ts index 2cb0214..d66017f 100644 --- a/types/element.d.ts +++ b/types/element.d.ts @@ -24,7 +24,26 @@ export declare class FazElement extends HTMLElement { renderedChild: ChildNode | null; private comment; source: any; + private observer; + private isMoving; + private hostInitialized; constructor(); + /** + * Initialize host DOM attributes after construction. + * + * Custom element constructors must not mutate attributes or children. + * Keep DOM-affecting setup in the connected lifecycle so elements created + * via document.createElement() can upgrade cleanly in browsers and jsdom. + */ + private initializeHost; + /** + * Set up a MutationObserver to handle dynamic DOM changes (e.g., HTMX). + */ + private setupMutationObserver; + /** + * Updates the reactive fazChildren list by scanning current child nodes. + */ + private updateFazChildren; /** * The `disconnectedCallback` is a built-in lifecycle method of custom elements. * It is called automatically by the browser when the element is removed from the DOM. diff --git a/types/element.d.ts.map b/types/element.d.ts.map index d8aa3c2..568282c 100644 --- a/types/element.d.ts.map +++ b/types/element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../src/element.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAMxD,MAAM,WAAW,UAAW,SAAQ,OAAO;IACvC,UAAU,EAAE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kB;IAClC,OAAO,CAAC,eAAe,CAAkB;;IA0EzC;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IAmBtB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAmC7B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAyBzB;;;OAGG;IACH,oBAAoB;IAQpB;;;;OAIG;IACH,UAAU;IAIV,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAOrC,eAAe,IAAI,OAAO;IAK1B,cAAc,CAAC,KAAK,EAAE,MAAM;IAU5B,WAAW,IAAI,MAAM,GAAG,SAAS;IAWjC,WAAW,CAAC,KAAK,EAAE,UAAU;IAS7B,cAAc,CAAC,KAAK,EAAE,UAAU;IAQhC,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAIpC;IAGD,IAAI,YAAY,IAAI,SAAS,GAAG,IAAI,CAEnC;IAGD,IAAI,UAAU,YAMb;IAGD,QAAQ,CAAC,CAAC,SAAS,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC;IAWpC,SAAS,IAAG,IAAI;IAGhB,UAAU,IAAG,IAAI;IAGjB,eAAe;IAqBf,iBAAiB,CAAC,QAAQ,EAAE,IAAI,EAAE;IAQlC,iBAAiB;IAwBjB,IAAI;IAGJ,IAAI;IAGJ,MAAM;CAQT"} \ No newline at end of file From 57a36d1d95d79ea1c42b736a3beb89782d1f2ff0 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 11:21:52 -0400 Subject: [PATCH 196/199] build: migrate package workflow to pnpm Replace the mutable Yarn workflow with pnpm and a committed lockfile so installs are reproducible for faz consumers. Update CI to install dependencies with a frozen pnpm lockfile, run the build before tests, and document pnpm-based development in the README. Refs: #172 --- .github/workflows/run_tests.yml | 19 +- README.md | 101 +- package.json | 26 +- pnpm-lock.yaml | 3673 +++++++++++++++++++++++++++++++ 4 files changed, 3778 insertions(+), 41 deletions(-) create mode 100644 pnpm-lock.yaml diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 998280e..d6087a2 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -2,6 +2,9 @@ name: Run faz tests on: [push, pull_request] +permissions: + contents: read + jobs: build: @@ -16,14 +19,16 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.25.0 - name: Install dependencies - # Solution from: https://stackoverflow.com/a/67740771/2887989 run: | - export YARN_ENABLE_IMMUTABLE_INSTALLS=false - corepack enable - npm set version stable - npm run yarn - yarn install + pnpm install --frozen-lockfile + - name: Run build + run: | + pnpm run build - name: Run vitest unit tests run: | - npm test + pnpm test diff --git a/README.md b/README.md index 718c8e0..dead1c8 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,109 @@ # Candango Faz -**master:** [![Build Status](https://travis-ci.org/candango/faz.svg?branch=master)](https://travis-ci.org/candango/faz) +Candango Faz is a Web Components toolkit for incremental modernization of legacy applications. -**develop:** [![Build Status develop](https://travis-ci.org/candango/faz.svg?branch=develop)](https://travis-ci.org/candango/faz) +It provides a small substrate for replacing tangled server-rendered UI fragments with reusable custom elements. A common target is an existing PHP or server-rendered application where markup, conditionals, Bootstrap classes, and imperative JavaScript are mixed together. Faz lets teams replace those fragments gradually with focused HTML tags instead of stopping the business for a full rewrite. -## Introduction +## Purpose -Candango faz is a toolkit based on bootstrap and solid-js. +Faz is designed for progressive migration: -# Installation +1. Find a painful legacy UI fragment. +2. Extract its behavior and presentation into a Faz component. +3. Replace the legacy fragment with a custom element tag. +4. Keep the surrounding application running. +5. Repeat safely, one UI island at a time. -## npm +The project is intentionally HTML-first. Components should be easy to consume from plain HTML, server-rendered templates, and older Bootstrap-based pages. +## Installation + +```bash +npm i faz ``` -> npm i faz + +```bash +pnpm add faz ``` -## yarn +## Package entrypoints + +The package exposes built ESM and declaration artifacts through the package export map: +```ts +import { + FazElement, + FazFormElement, + FazPaginator, + bindReactive, + randomId, + toBoolean, +} from "faz"; ``` -> yarn add faz + +Additional public entrypoints: + +```ts +import { bindReactive } from "faz/reactivity"; +import { FazPaginator } from "faz/paginator"; ``` -# Development +The `faz/src` entrypoint is still published for compatibility with existing Faz-based packages, but consumers should prefer the built package entrypoints whenever possible. + +## Development + +This project uses pnpm. + +Install dependencies: + +```bash +pnpm install +``` -## At the command line +Run the full build: +```bash +pnpm run build ``` -> yarn -> npm run lessc:dev -> npm run run + +Run tests: + +```bash +pnpm test ``` -## Running tests +Run development stylesheet compilation: +```bash +pnpm run lessc:dev ``` -> yarn + +Run the showcase watcher: + +```bash +pnpm run showcase ``` - - Add new Node.Js at the Run/Debug configurations. - - Java Script file: node_modules/http-server/bin/http-server - - Working directory: the faz project root directory +## Build and distribution + +The build generates: + +- `dist/js/*` bundled ESM artifacts; +- `dist/types/*` TypeScript declarations; +- `dist/css/*` compiled stylesheets. + +The package entrypoint is `dist/js/index.js`, and the public type entrypoint is `dist/types/index.d.ts`. + +Before publishing or testing downstream consumers, run: + +```bash +pnpm install --frozen-lockfile +pnpm run build +pnpm test +pnpm pack +``` -# License +## License Candango Faz was licensed under Apache-2.0 from 2018 to 2025. diff --git a/package.json b/package.json index 4503a12..5416719 100644 --- a/package.json +++ b/package.json @@ -71,30 +71,28 @@ "vitest": "4.0.18" }, "scripts": { - "watch": "npm run watch:clean && node watch.mjs", + "watch": "pnpm run watch:clean && node watch.mjs", "watch:clean": "rm -rf watch/dist", - "showcase": "http-server & npm run watch", + "showcase": "http-server & pnpm run watch", "esbuild": "node build.mjs", - "ts:build": "npm run ts:clean && npm run ts:declaration && cp -r types dist", + "ts:build": "pnpm run ts:clean && pnpm run ts:declaration && cp -r types dist", "ts:declaration": "tsc -p tsconfig.types.json -d --declarationDir types --emitDeclarationOnly && rm -rf tsconfig.types.tsbuildinfo", "ts:clean": "rm -rf tsconfig.tsbuildinfo tsconfig.types.tsbuildinfo types/*", - "build": "npm run build:clean && npm run lessc && npm run esbuild && npm run ts:build", + "build": "pnpm run build:clean && pnpm run lessc && pnpm run esbuild && pnpm run ts:build", "build:clean": "rm -rf dist", "build:vendors": "rm -rf dist", - "lessc": "npm run lessc:faz && npm run lessc:showcase", + "lessc": "pnpm run lessc:faz && pnpm run lessc:showcase", "lessc:faz": "lessc stylesheets/faz.less dist/css/faz.css --source-map", "lessc:showcase": "lessc stylesheets/showcase.less dist/css/showcase.css --source-map", - "lessc:dev": "npm run lessc:dev:faz && npm run lessc:dev:showcase", + "lessc:dev": "pnpm run lessc:dev:faz && pnpm run lessc:dev:showcase", "lessc:dev:faz": "lessc stylesheets/faz.less stylesheets/faz.css --source-map", "lessc:dev:showcase": "lessc stylesheets/showcase.less stylesheets/showcase.css --source-map", - "test": "vitest run", - "yarn": "npm run yarn:clean && npm run yarn:v2 && npm run yarn:install", - "yarn:install": "yarn install", - "yarn:clean": "rm -rf yarn.lock .yarn .yarnrc.yml .next node_modules", - "yarn:v2": "yarn set version berry && yarn config set nodeLinker node-modules" + "test": "vitest run" }, - "packageManager": "yarn@4.17.0", - "resolutions": { - "@asamuzakjp/css-color": "4.1.1" + "packageManager": "pnpm@10.25.0", + "pnpm": { + "overrides": { + "@asamuzakjp/css-color": "4.1.1" + } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..7781f60 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,3673 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +overrides: + '@asamuzakjp/css-color': 4.1.1 + +importers: + + .: + dependencies: + less: + specifier: 4.5.1 + version: 4.5.1 + solid-js: + specifier: 1.9.13 + version: 1.9.13 + devDependencies: + '@testing-library/jest-dom': + specifier: 6.9.1 + version: 6.9.1 + '@types/jest': + specifier: 30.0.0 + version: 30.0.0 + '@types/nise': + specifier: 1.4.5 + version: 1.4.5 + '@types/node': + specifier: 25.0.3 + version: 25.0.3 + can-stache-loader: + specifier: 3.0.0 + version: 3.0.0 + esbuild: + specifier: 0.27.2 + version: 0.27.2 + esbuild-plugin-copy: + specifier: 2.1.1 + version: 2.1.1(esbuild@0.27.2) + esbuild-plugin-solid: + specifier: 0.6.0 + version: 0.6.0(esbuild@0.27.2)(solid-js@1.9.13) + http-server: + specifier: 14.1.1 + version: 14.1.1 + jsdom: + specifier: 27.0.0 + version: 27.0.0 + nise: + specifier: 6.1.5 + version: 6.1.5 + prettier: + specifier: 3.7.4 + version: 3.7.4 + ts-node: + specifier: 10.9.2 + version: 10.9.2(@types/node@25.0.3)(typescript@5.9.3) + typescript: + specifier: 5.9.3 + version: 5.9.3 + vite: + specifier: 8.0.16 + version: 8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1) + vite-plugin-solid: + specifier: 2.11.12 + version: 2.11.12(@testing-library/jest-dom@6.9.1)(solid-js@1.9.13)(vite@8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1)) + vitest: + specifier: 4.0.18 + version: 4.0.18(@types/node@25.0.3)(jsdom@27.0.0)(less@4.5.1)(lightningcss@1.32.0) + +packages: + + '@adobe/css-tools@4.5.0': + resolution: {integrity: sha512-6OzddxPio9UiWTCemp4N8cYLV2ZN1ncRnV1cVGtve7dhPOtRkleRyx32GQCYSwDYgaHU3USMm84tNsvKzRCa1Q==} + + '@asamuzakjp/css-color@4.1.1': + resolution: {integrity: sha512-B0Hv6G3gWGMn0xKJ0txEi/jM5iFpT3MfDxmhZFb4W047GvytCf1DHQ1D69W3zHI4yWe2aTZAA0JnbMZ7Xc8DuQ==} + + '@asamuzakjp/dom-selector@6.8.1': + resolution: {integrity: sha512-MvRz1nCqW0fsy8Qz4dnLIvhOlMzqDVBabZx6lH+YywFDdjXhMY37SmpV1XFX3JzG5GWHn63j6HX6QPr3lZXHvQ==} + + '@asamuzakjp/nwsapi@2.3.9': + resolution: {integrity: sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.7': + resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-annotate-as-pure@7.29.7': + resolution: {integrity: sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-create-class-features-plugin@7.29.7': + resolution: {integrity: sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-member-expression-to-functions@7.29.7': + resolution: {integrity: sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.18.6': + resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-optimise-call-expression@7.29.7': + resolution: {integrity: sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==} + engines: {node: '>=6.9.0'} + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-replace-supers@7.29.7': + resolution: {integrity: sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-skip-transparent-expression-wrappers@7.29.7': + resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-jsx@7.29.7': + resolution: {integrity: sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.29.7': + resolution: {integrity: sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-modules-commonjs@7.29.7': + resolution: {integrity: sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-typescript@7.29.7': + resolution: {integrity: sha512-jK52h8LaLc7JarhQV2ofeFMts4H7vnOXnqZNA6fYglBTZewRBE51KWt3BUltW1P+KoPsYkHoJeXePuz4zo2LMw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/preset-typescript@7.29.7': + resolution: {integrity: sha512-/Foi8vKY2EVbed/1eZx0gJEEwHAIxogrySI7rULcRIvhZzbvoE/b5qG5Ghc0WKAFKOHA9SD1x7RsFlOYdutIiQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.7': + resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} + engines: {node: '>=6.9.0'} + + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@csstools/color-helpers@5.1.0': + resolution: {integrity: sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==} + engines: {node: '>=18'} + + '@csstools/css-calc@2.1.4': + resolution: {integrity: sha512-3N8oaj+0juUw/1H3YwmDDJXCgTB1gKU6Hc/bB502u9zR0q2vd786XJH9QfrKIEgFlZmhZiq6epXl4rHqhzsIgQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-color-parser@3.1.0': + resolution: {integrity: sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-parser-algorithms': ^3.0.5 + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-parser-algorithms@3.0.5': + resolution: {integrity: sha512-DaDeUkXZKjdGhgYaHNJTV9pV7Y9B3b644jCLs9Upc3VeNGg6LWARAT6O+Q+/COo+2gg/bM5rhpMAtf70WqfBdQ==} + engines: {node: '>=18'} + peerDependencies: + '@csstools/css-tokenizer': ^3.0.4 + + '@csstools/css-syntax-patches-for-csstree@1.1.5': + resolution: {integrity: sha512-oNjBvzLq2GPZtJphCjLqXow/cHySHSgtxvKZb7OqSZ/xHgw6NWNhfad+6AB9cLeVm6eA9d/qMll3JdEHjy6M+A==} + peerDependencies: + css-tree: ^3.2.1 + peerDependenciesMeta: + css-tree: + optional: true + + '@csstools/css-tokenizer@3.0.4': + resolution: {integrity: sha512-Vd/9EVDiu6PPJt9yAh6roZP6El1xHrdvIVGjyBsHR0RYwNHgL7FJPyIIW4fANJNG6FtyZfvlRPpFI4ZM/lubvw==} + engines: {node: '>=18'} + + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} + + '@esbuild/aix-ppc64@0.27.2': + resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.27.2': + resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.27.2': + resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.27.2': + resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.27.2': + resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.27.2': + resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.27.2': + resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.27.2': + resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.27.2': + resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.27.2': + resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.27.2': + resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.27.2': + resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.27.2': + resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.27.2': + resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.27.2': + resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.27.2': + resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.27.2': + resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.27.2': + resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.27.2': + resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.27.2': + resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.27.2': + resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.27.2': + resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.27.2': + resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.27.2': + resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.27.2': + resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.27.2': + resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@jest/diff-sequences@30.4.0': + resolution: {integrity: sha512-zOpzlfUs45l6u7jm39qr87JCHUDsaeCtvL+kQe/Vn9jSnRB4/5IPXISm0h9I1vZW/o00Kn4UTJ2MOlhnUGwv3g==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/expect-utils@30.4.1': + resolution: {integrity: sha512-ZBn5CglH8fBsQsvs4VWNzD4aWfUYks+IdOOQU3MEK71ol/BcVm+P+rtb1KpiFBpSWSCE27uOahyyf1vfqOVbcQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/get-type@30.1.0': + resolution: {integrity: sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/pattern@30.4.0': + resolution: {integrity: sha512-RAWn3+f9u8BsHijKJ71uHcFp6vmyEt6VvoWXkl6hKF3qVIuWNmudVjg12DlBPGup/frIl5UcUlH5HfEuvHpEXg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/schemas@30.4.1': + resolution: {integrity: sha512-i6b4qw5qnP8c5FEeBJg/uZQ4ddrkN6Ca8qISJh0pr7a5hfn3h3v5x60BEbOC7OYAGZNMs1LfFLwnW2CuK8F57Q==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jest/types@30.4.1': + resolution: {integrity: sha512-f1x/vJXIfjOlEmejYpbkbgw1gOqpPECwMvMEtBqe47j7H2Hg8h8w3o3ikhSXq3MI15kg+oQ0exWO0uCtTNJLoQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@napi-rs/wasm-runtime@1.1.5': + resolution: {integrity: sha512-AWPoBRJ9tsnVhor4sjO7rkni+7p+2IAEFj6cx06UgP10jkQHqay/36uRV/bFkgrh18D9vb4cr8Q0Pthskgzy+Q==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@oxc-project/types@0.133.0': + resolution: {integrity: sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==} + + '@rolldown/binding-android-arm64@1.0.3': + resolution: {integrity: sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.0.3': + resolution: {integrity: sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.0.3': + resolution: {integrity: sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.0.3': + resolution: {integrity: sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.0.3': + resolution: {integrity: sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.0.3': + resolution: {integrity: sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-arm64-musl@1.0.3': + resolution: {integrity: sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + + '@rolldown/binding-linux-ppc64-gnu@1.0.3': + resolution: {integrity: sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + + '@rolldown/binding-linux-s390x-gnu@1.0.3': + resolution: {integrity: sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + + '@rolldown/binding-linux-x64-gnu@1.0.3': + resolution: {integrity: sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-linux-x64-musl@1.0.3': + resolution: {integrity: sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + + '@rolldown/binding-openharmony-arm64@1.0.3': + resolution: {integrity: sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.3': + resolution: {integrity: sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.0.3': + resolution: {integrity: sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.0.3': + resolution: {integrity: sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@rollup/rollup-android-arm-eabi@4.62.2': + resolution: {integrity: sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.62.2': + resolution: {integrity: sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.62.2': + resolution: {integrity: sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.62.2': + resolution: {integrity: sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.62.2': + resolution: {integrity: sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.62.2': + resolution: {integrity: sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + resolution: {integrity: sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + resolution: {integrity: sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.62.2': + resolution: {integrity: sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.62.2': + resolution: {integrity: sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.62.2': + resolution: {integrity: sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.62.2': + resolution: {integrity: sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + resolution: {integrity: sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.62.2': + resolution: {integrity: sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + resolution: {integrity: sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + resolution: {integrity: sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + resolution: {integrity: sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.62.2': + resolution: {integrity: sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.62.2': + resolution: {integrity: sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@4.62.2': + resolution: {integrity: sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.62.2': + resolution: {integrity: sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + resolution: {integrity: sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + resolution: {integrity: sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.62.2': + resolution: {integrity: sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.62.2': + resolution: {integrity: sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==} + cpu: [x64] + os: [win32] + + '@sinclair/typebox@0.34.49': + resolution: {integrity: sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==} + + '@sinonjs/commons@3.0.1': + resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} + + '@sinonjs/fake-timers@15.4.0': + resolution: {integrity: sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@testing-library/jest-dom@6.9.1': + resolution: {integrity: sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==} + engines: {node: '>=14', npm: '>=6', yarn: '>=1'} + + '@tsconfig/node10@1.0.12': + resolution: {integrity: sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + + '@types/babel__core@7.20.5': + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + + '@types/babel__generator@7.27.0': + resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} + + '@types/babel__template@7.4.4': + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + + '@types/babel__traverse@7.28.0': + resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/istanbul-lib-coverage@2.0.6': + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + + '@types/istanbul-lib-report@3.0.3': + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + + '@types/istanbul-reports@3.0.4': + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + + '@types/jest@30.0.0': + resolution: {integrity: sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==} + + '@types/nise@1.4.5': + resolution: {integrity: sha512-KNx8h0QdeA+BnH5E8rFPBznTGCl+aQwZ+45TaFWRavTULakVpwu6vis8IMVCGphgGCVtqWD1ne/vO1yOq1QJxg==} + + '@types/node@25.0.3': + resolution: {integrity: sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA==} + + '@types/stack-utils@2.0.3': + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + + '@types/yargs-parser@21.0.3': + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + + '@types/yargs@17.0.35': + resolution: {integrity: sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==} + + '@vitest/expect@4.0.18': + resolution: {integrity: sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==} + + '@vitest/mocker@4.0.18': + resolution: {integrity: sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.0.18': + resolution: {integrity: sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==} + + '@vitest/runner@4.0.18': + resolution: {integrity: sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==} + + '@vitest/snapshot@4.0.18': + resolution: {integrity: sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==} + + '@vitest/spy@4.0.18': + resolution: {integrity: sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==} + + '@vitest/utils@4.0.18': + resolution: {integrity: sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==} + + acorn-walk@8.3.5: + resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} + engines: {node: '>=0.4.0'} + + acorn@8.17.0: + resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + + babel-plugin-jsx-dom-expressions@0.40.7: + resolution: {integrity: sha512-/O6JWUmjv03OI9lL2ry9bUjpD5S3PclM55RRJEyCdcFZ5W2SEA/59d+l2hNsk3gI6kiWRdRPdOtqZmsQzFN1pQ==} + peerDependencies: + '@babel/core': ^7.20.12 + + babel-preset-solid@1.9.12: + resolution: {integrity: sha512-LLqnuKVDlKpyBlMPcH6qEvs/wmS9a+NczppxJ3ryS/c0O5IiSFOIBQi9GzyiGDSbcJpx4Gr87jyFTos1MyEuWg==} + peerDependencies: + '@babel/core': ^7.0.0 + solid-js: ^1.9.12 + peerDependenciesMeta: + solid-js: + optional: true + + baseline-browser-mapping@2.10.38: + resolution: {integrity: sha512-31/02mVB4yuQU6adKk5SlY6m+mxDwUq5KZkyYgnLrrKl7TEm1+3PyDtDBz2kOv/wxZz41GHsvV1A/u6RmiyBvw==} + engines: {node: '>=6.0.0'} + hasBin: true + + basic-auth@2.0.1: + resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} + engines: {node: '>= 0.8'} + + bidi-js@1.0.3: + resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} + + big.js@5.2.2: + resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + browserslist@4.28.4: + resolution: {integrity: sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + can-attribute-encoder@1.1.4: + resolution: {integrity: sha512-ZUHwzrTRNdtVM+7BgTLbDOOyO7dohPhCjEisJ8tOIIha1pvnn4D/pKcz3IAnZ+sUnYZgHK5JjGtiwl/0TlrzaA==} + + can-log@1.0.2: + resolution: {integrity: sha512-wmT8aGIb8u82HqKXjjXodb1fCanntC0RvMtluTMtt1GwVDZyPLV9RQHJ1+j3b5PgSPW6ZwCjyiKwnSkI+2swiw==} + + can-namespace@1.0.0: + resolution: {integrity: sha512-1sBY/SLwwcmxz3NhyVhLjt2uD/dZ7V1mII82/MIXSDn5QXnslnosJnjlP8+yTx2uTCRvw1jlFDElRs4pX7AG5w==} + + can-stache-ast@1.1.0: + resolution: {integrity: sha512-3df63QcrsJo6XYj8E3RGerr/Z+nGoKO/Cg0TaSybrdNqJmK7XtLsP42XMc4OrIH/edDQ63BH2DfAtTdSMTEbqQ==} + + can-stache-loader@3.0.0: + resolution: {integrity: sha512-c3eKZtON+Bx/mTIIrm1ARQuljOIo9nIz1jmZVDlNkrqFEQs5WQZHvmO69POUygVra4k6ud6RrPknycUOIu8onQ==} + + can-view-parser@4.1.3: + resolution: {integrity: sha512-+sK9Ntcr+gI8hYo7/6fLUK8R30ER63Vj4FOwZbuIAJrl6MJSJ0cXs+Kljw/NTZyjzLEdynzM3uaqWTNjzP2PLw==} + + caniuse-lite@1.0.30001799: + resolution: {integrity: sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw==} + + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + ci-info@4.4.0: + resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} + engines: {node: '>=8'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + copy-anything@2.0.6: + resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==} + + corser@2.0.1: + resolution: {integrity: sha512-utCYNzRSQIZNPIcGZdQc92UVJYAhtGAteCFg0yRaFm8f0P+CPtyGyHXJcGXnffjCybUCEx3FQ2G7U3/o9eIkVQ==} + engines: {node: '>= 0.4.0'} + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + css-tree@3.2.1: + resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + + css.escape@1.5.1: + resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} + + cssstyle@5.3.7: + resolution: {integrity: sha512-7D2EPVltRrsTkhpQmksIu+LxeWAIEk6wRDMJ1qljlv+CKHJM+cJLlfhWIzNA44eAsHXSNe3+vO6DW1yCYx8SuQ==} + engines: {node: '>=20'} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + data-urls@6.0.1: + resolution: {integrity: sha512-euIQENZg6x8mj3fO6o9+fOW8MimUI4PpD/fZBhJfeioZVy9TUpM4UY7KjQNVZFlqwJ0UdzRDzkycB997HEq1BQ==} + engines: {node: '>=20'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + diff@4.0.4: + resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} + engines: {node: '>=0.3.1'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + dom-accessibility-api@0.6.3: + resolution: {integrity: sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + electron-to-chromium@1.5.377: + resolution: {integrity: sha512-cH1jZgJHoezfTnKfKwnScpHywTFVnJUNITDPREFdhNjiuD502+QFpG0Qk7G8jhsV/f+CEAFlIrzP1fT+IMb92g==} + + emojis-list@3.0.0: + resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} + engines: {node: '>= 4'} + + entities@6.0.1: + resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} + engines: {node: '>=0.12'} + + errno@0.1.8: + resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} + hasBin: true + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + esbuild-plugin-copy@2.1.1: + resolution: {integrity: sha512-Bk66jpevTcV8KMFzZI1P7MZKZ+uDcrZm2G2egZ2jNIvVnivDpodZI+/KnpL3Jnap0PBdIHU7HwFGB8r+vV5CVw==} + peerDependencies: + esbuild: '>= 0.14.0' + + esbuild-plugin-solid@0.6.0: + resolution: {integrity: sha512-V1FvDALwLDX6K0XNYM9CMRAnMzA0+Ecu55qBUT9q/eAJh1KIDsTMFoOzMSgyHqbOfvrVfO3Mws3z7TW2GVnIZA==} + peerDependencies: + esbuild: '>=0.20' + solid-js: '>= 1.0' + + esbuild@0.27.2: + resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + eventemitter3@4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} + engines: {node: '>=12.0.0'} + + expect@30.4.1: + resolution: {integrity: sha512-PMARsyh/JtqC20HoGqlFcIlQAyqUtW4PlI1rup1uhYJtKuwAjbvWi3GQMAn+STdHum/dk8xrKfUM1+5SAwpolA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fastq@1.20.1: + resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + follow-redirects@1.16.0: + resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + html-encoding-sniffer@3.0.0: + resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} + engines: {node: '>=12'} + + html-encoding-sniffer@4.0.0: + resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} + engines: {node: '>=18'} + + html-entities@2.3.3: + resolution: {integrity: sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==} + + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + http-proxy@1.18.1: + resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} + engines: {node: '>=8.0.0'} + + http-server@14.1.1: + resolution: {integrity: sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==} + engines: {node: '>=12'} + hasBin: true + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + image-size@0.5.5: + resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} + engines: {node: '>=0.10.0'} + hasBin: true + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + + is-what@3.14.1: + resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==} + + is-what@4.1.16: + resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} + engines: {node: '>=12.13'} + + jest-diff@30.4.1: + resolution: {integrity: sha512-CRpFK0RtLriVDGcPPAnR6HMVI8bSR2jnUIgralhauzYQZIb4RH9AtEInTuQr65LmmGggGcRT6HIASxwqsVsmlA==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-matcher-utils@30.4.1: + resolution: {integrity: sha512-zvYfX5CaeEkFrrLS9suWe9rvJrm9J1Iv3ua8kIBv9GEPzcnsfBf0bob37la7s67fs0nlBC3EuvkOLnXQKxtx4A==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-message-util@30.4.1: + resolution: {integrity: sha512-kwCKIvq0MCW1HzLoGola9Te6JUdzgV0loyKJ3Qghrkz9i5/RRIHsL95BMQc2HBBhlBKC4j22K9p11TGHH8RBpQ==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-mock@30.4.1: + resolution: {integrity: sha512-/i8SVb8/NSB7RfNi8gfqu8gxLV23KaL5EpAttyb9iz8qWRIqXRLflycz/32wXsYkOnaUlx8NAKnJYtpsmXUmfw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-regex-util@30.4.0: + resolution: {integrity: sha512-mWlvLviKIgIQ8VCuM1xRdD0TWp3zlzionlmDBjuXVBs+VkmXq6FgW9T4Emr7oGz/Rk6feDCGyiugolcQEyp3mg==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + jest-util@30.4.1: + resolution: {integrity: sha512-vjQb1sACEiv13DKJMDToJpzVW0joCsIQrmbg0fi7CyOOt+g9jTuQl2A216pWRBYhOVt53XbL/2LbMKg1BECWOw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsdom@27.0.0: + resolution: {integrity: sha512-lIHeR1qlIRrIN5VMccd8tI2Sgw6ieYXSVktcSHaNe3Z5nE/tcPQYQWOq00wxMvYOsz+73eAkNenVvmPC6bba9A==} + engines: {node: '>=20'} + peerDependencies: + canvas: ^3.0.0 + peerDependenciesMeta: + canvas: + optional: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + + json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jsonfile@6.2.1: + resolution: {integrity: sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==} + + just-extend@6.2.0: + resolution: {integrity: sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==} + + less@4.5.1: + resolution: {integrity: sha512-UKgI3/KON4u6ngSsnDADsUERqhZknsVZbnuzlRZXLQCmfC/MDld42fTydUE9B+Mla1AL6SJ/Pp6SlEFi/AVGfw==} + engines: {node: '>=14'} + hasBin: true + + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + + loader-utils@1.4.2: + resolution: {integrity: sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==} + engines: {node: '>=4.0.0'} + + lru-cache@11.5.1: + resolution: {integrity: sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==} + engines: {node: 20 || >=22} + + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + make-dir@2.1.0: + resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} + engines: {node: '>=6'} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + mdn-data@2.27.1: + resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} + + merge-anything@5.1.7: + resolution: {integrity: sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==} + engines: {node: '>=12.13'} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.15: + resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + needle@3.5.0: + resolution: {integrity: sha512-jaQyPKKk2YokHrEg+vFDYxXIHTCBgiZwSHOoVx/8V3GIBS8/VN6NdVRmg8q1ERtPkMvmOvebsgga4sAj5hls/w==} + engines: {node: '>= 4.4.x'} + hasBin: true + + nise@6.1.5: + resolution: {integrity: sha512-SnRDPDBjxZZoU2n0+gzzLtSvo1OZo7j6jnbXsoh3AFxEGhaFU7ZF0TmefuKERq79wxR2U+MPn7ArW+Tl+clC3A==} + + node-releases@2.0.48: + resolution: {integrity: sha512-1uz8041X6LoI6ZSdZacM9lVY28vuzDlSKitnpbSNK0RfKoIJkX29NBPVEFXhnuSuEOA9Ww0xnPJ+ILWbGAv8DA==} + engines: {node: '>=18'} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + obug@2.1.3: + resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} + engines: {node: '>=12.20.0'} + + opener@1.5.2: + resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} + hasBin: true + + parse-node-version@1.0.1: + resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} + engines: {node: '>= 0.10'} + + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} + + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} + engines: {node: '>=8.6'} + + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} + engines: {node: '>=12'} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + portfinder@1.0.38: + resolution: {integrity: sha512-rEwq/ZHlJIKw++XtLAO8PPuOQA/zaPJOZJ37BVuN97nLpMJeuDVLVGRwbFoBgLudgdTMP2hdRJP++H+8QOA3vg==} + engines: {node: '>= 10.12'} + + postcss@8.5.15: + resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} + engines: {node: ^10 || ^12 || >=14} + + prettier@3.7.4: + resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@30.4.1: + resolution: {integrity: sha512-K6KiKMHTL4jjX4u3Kir2EW07nRfcqVTXIImx50wbjHQTcZPgg+gjVeNTIT3l3L1Rd4UefxfogquC9J37SoFyyw==} + engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0} + + prr@1.0.1: + resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qs@6.15.2: + resolution: {integrity: sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==} + engines: {node: '>=0.6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + react-is@19.2.7: + resolution: {integrity: sha512-kZFnouyVv7eP/Phmrlo9FK+zcAdriZJvzxXHF1Sl1P377WSGe2G/JxVolhTrB/jeV47lKImhNUsijjHAAbcl/A==} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rolldown@1.0.3: + resolution: {integrity: sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + rollup@4.62.2: + resolution: {integrity: sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + rrweb-cssom@0.8.0: + resolution: {integrity: sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + sax@1.6.0: + resolution: {integrity: sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==} + engines: {node: '>=11.0.0'} + + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + + secure-compare@3.0.1: + resolution: {integrity: sha512-AckIIV90rPDcBcglUwXPF3kg0P0qmPsPXAj6BBEENQE1p5yA1xfmDJzfi1Tappj37Pv2mVbKpL3Z1T+Nn7k1Qw==} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + + seroval-plugins@1.5.4: + resolution: {integrity: sha512-S0xQPhUTefAhNvNWFg0c1J8qJArHt5KdtJ/cFAofo06KD1MVSeFWyl4iiu+ApDIuw0WhjpOfCdgConOfAnLgkw==} + engines: {node: '>=10'} + peerDependencies: + seroval: ^1.0 + + seroval@1.5.4: + resolution: {integrity: sha512-46uFvgrXTVxZcUorgSSRZ4y+ieqLLQRMlG4bnCZKW3qI6BZm7Rg4ntMW4p1mILEEBZWrFlcpp0AyIIlM6jD9iw==} + engines: {node: '>=10'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + solid-js@1.9.13: + resolution: {integrity: sha512-6hJeJMOcEX8ktqjpDoJZEmld3ijvcvWBDtiXBm7f4332SiFN66QeAQI1REQshvyUoISsSeJ4PHDauKYbwao9JQ==} + + solid-refresh@0.6.3: + resolution: {integrity: sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA==} + peerDependencies: + solid-js: ^1.3 + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + stack-utils@2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + symbol-tree@3.2.4: + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinyrainbow@3.1.0: + resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} + engines: {node: '>=14.0.0'} + + tldts-core@7.4.4: + resolution: {integrity: sha512-vwVLJVvvpslm7vqAH7+XNj/neA/Ynq7DT2EEcMuwc5YzN5XaMyRAqxwU+uX3azZ1FQtB2gvrvnLnAEkvYlVdfg==} + + tldts@7.4.4: + resolution: {integrity: sha512-kFXFK7O4WPextIUAOk8qtnw9dxR9UIXP9CjuH1cTBVBZMDeQcUPgr/IazGiw1B0Yiw5L75gHLWeW4iD793r90g==} + hasBin: true + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tough-cookie@6.0.1: + resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==} + engines: {node: '>=16'} + + tr46@6.0.0: + resolution: {integrity: sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==} + engines: {node: '>=20'} + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@7.16.0: + resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + + union@0.5.0: + resolution: {integrity: sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==} + engines: {node: '>= 0.8.0'} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + + url-join@4.0.1: + resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + vite-plugin-solid@2.11.12: + resolution: {integrity: sha512-FgjPcx2OwX9h6f28jli7A4bG7PP3te8uyakE5iqsmpq3Jqi1TWLgSroC9N6cMfGRU2zXsl4Q6ISvTr2VL0QHpA==} + peerDependencies: + '@testing-library/jest-dom': ^5.16.6 || ^5.17.0 || ^6.* + solid-js: ^1.7.2 + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@testing-library/jest-dom': + optional: true + + vite@7.3.5: + resolution: {integrity: sha512-KuOaNhcnGFN2zIPGA7wRmzF+lJA1sea7rHq17aiJ++9lzY1WWG6Jpwqwe1KNbRVPIqHmr8GLYx7jbrQcN/7/ww==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vite@8.0.16: + resolution: {integrity: sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.1.18 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitefu@1.1.3: + resolution: {integrity: sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + vite: + optional: true + + vitest@4.0.18: + resolution: {integrity: sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.0.18 + '@vitest/browser-preview': 4.0.18 + '@vitest/browser-webdriverio': 4.0.18 + '@vitest/ui': 4.0.18 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + w3c-xmlserializer@5.0.0: + resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} + engines: {node: '>=18'} + + webidl-conversions@8.0.1: + resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==} + engines: {node: '>=20'} + + whatwg-encoding@2.0.0: + resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} + engines: {node: '>=12'} + deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation + + whatwg-encoding@3.1.1: + resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} + engines: {node: '>=18'} + deprecated: Use @exodus/bytes instead for a more spec-conformant and faster implementation + + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + + whatwg-mimetype@5.0.0: + resolution: {integrity: sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==} + engines: {node: '>=20'} + + whatwg-url@15.1.0: + resolution: {integrity: sha512-2ytDk0kiEj/yu90JOAp44PVPUkO9+jVhyf+SybKlRHSDlvOOZhdPIrr7xTH64l4WixO2cP+wQIcgujkGBPPz6g==} + engines: {node: '>=20'} + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + +snapshots: + + '@adobe/css-tools@4.5.0': {} + + '@asamuzakjp/css-color@4.1.1': + dependencies: + '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-color-parser': 3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + lru-cache: 11.5.1 + + '@asamuzakjp/dom-selector@6.8.1': + dependencies: + '@asamuzakjp/nwsapi': 2.3.9 + bidi-js: 1.0.3 + css-tree: 3.2.1 + is-potential-custom-element-name: 1.0.1 + lru-cache: 11.5.1 + + '@asamuzakjp/nwsapi@2.3.9': {} + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.7': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-annotate-as-pure@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.28.4 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-annotate-as-pure': 7.29.7 + '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/helper-optimise-call-expression': 7.29.7 + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/traverse': 7.29.7 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-member-expression-to-functions@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-imports@7.18.6': + dependencies: + '@babel/types': 7.29.7 + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-optimise-call-expression@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/helper-optimise-call-expression': 7.29.7 + '@babel/traverse': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-skip-transparent-expression-wrappers@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-string-parser@7.29.7': {} + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/parser@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-modules-commonjs@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helper-plugin-utils': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-annotate-as-pure': 7.29.7 + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-plugin-utils': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7) + transitivePeerDependencies: + - supports-color + + '@babel/preset-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.7) + transitivePeerDependencies: + - supports-color + + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/traverse@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@csstools/color-helpers@5.1.0': {} + + '@csstools/css-calc@2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/css-color-parser@3.1.0(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/color-helpers': 5.1.0 + '@csstools/css-calc': 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4) + '@csstools/css-parser-algorithms': 3.0.5(@csstools/css-tokenizer@3.0.4) + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4)': + dependencies: + '@csstools/css-tokenizer': 3.0.4 + + '@csstools/css-syntax-patches-for-csstree@1.1.5(css-tree@3.2.1)': + optionalDependencies: + css-tree: 3.2.1 + + '@csstools/css-tokenizer@3.0.4': {} + + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@esbuild/aix-ppc64@0.27.2': + optional: true + + '@esbuild/android-arm64@0.27.2': + optional: true + + '@esbuild/android-arm@0.27.2': + optional: true + + '@esbuild/android-x64@0.27.2': + optional: true + + '@esbuild/darwin-arm64@0.27.2': + optional: true + + '@esbuild/darwin-x64@0.27.2': + optional: true + + '@esbuild/freebsd-arm64@0.27.2': + optional: true + + '@esbuild/freebsd-x64@0.27.2': + optional: true + + '@esbuild/linux-arm64@0.27.2': + optional: true + + '@esbuild/linux-arm@0.27.2': + optional: true + + '@esbuild/linux-ia32@0.27.2': + optional: true + + '@esbuild/linux-loong64@0.27.2': + optional: true + + '@esbuild/linux-mips64el@0.27.2': + optional: true + + '@esbuild/linux-ppc64@0.27.2': + optional: true + + '@esbuild/linux-riscv64@0.27.2': + optional: true + + '@esbuild/linux-s390x@0.27.2': + optional: true + + '@esbuild/linux-x64@0.27.2': + optional: true + + '@esbuild/netbsd-arm64@0.27.2': + optional: true + + '@esbuild/netbsd-x64@0.27.2': + optional: true + + '@esbuild/openbsd-arm64@0.27.2': + optional: true + + '@esbuild/openbsd-x64@0.27.2': + optional: true + + '@esbuild/openharmony-arm64@0.27.2': + optional: true + + '@esbuild/sunos-x64@0.27.2': + optional: true + + '@esbuild/win32-arm64@0.27.2': + optional: true + + '@esbuild/win32-ia32@0.27.2': + optional: true + + '@esbuild/win32-x64@0.27.2': + optional: true + + '@jest/diff-sequences@30.4.0': {} + + '@jest/expect-utils@30.4.1': + dependencies: + '@jest/get-type': 30.1.0 + + '@jest/get-type@30.1.0': {} + + '@jest/pattern@30.4.0': + dependencies: + '@types/node': 25.0.3 + jest-regex-util: 30.4.0 + + '@jest/schemas@30.4.1': + dependencies: + '@sinclair/typebox': 0.34.49 + + '@jest/types@30.4.1': + dependencies: + '@jest/pattern': 30.4.0 + '@jest/schemas': 30.4.1 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 25.0.3 + '@types/yargs': 17.0.35 + chalk: 4.1.2 + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 + + '@napi-rs/wasm-runtime@1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.20.1 + + '@oxc-project/types@0.133.0': {} + + '@rolldown/binding-android-arm64@1.0.3': + optional: true + + '@rolldown/binding-darwin-arm64@1.0.3': + optional: true + + '@rolldown/binding-darwin-x64@1.0.3': + optional: true + + '@rolldown/binding-freebsd-x64@1.0.3': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.0.3': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.0.3': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.0.3': + optional: true + + '@rolldown/binding-linux-x64-musl@1.0.3': + optional: true + + '@rolldown/binding-openharmony-arm64@1.0.3': + optional: true + + '@rolldown/binding-wasm32-wasi@1.0.3': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.5(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.0.3': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.0.3': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@rollup/rollup-android-arm-eabi@4.62.2': + optional: true + + '@rollup/rollup-android-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-x64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-arm64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-x64@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-musl@4.62.2': + optional: true + + '@rollup/rollup-openbsd-x64@4.62.2': + optional: true + + '@rollup/rollup-openharmony-arm64@4.62.2': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.62.2': + optional: true + + '@sinclair/typebox@0.34.49': {} + + '@sinonjs/commons@3.0.1': + dependencies: + type-detect: 4.0.8 + + '@sinonjs/fake-timers@15.4.0': + dependencies: + '@sinonjs/commons': 3.0.1 + + '@standard-schema/spec@1.1.0': {} + + '@testing-library/jest-dom@6.9.1': + dependencies: + '@adobe/css-tools': 4.5.0 + aria-query: 5.3.2 + css.escape: 1.5.1 + dom-accessibility-api: 0.6.3 + picocolors: 1.1.1 + redent: 3.0.0 + + '@tsconfig/node10@1.0.12': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@types/babel__core@7.20.5': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@types/babel__generator': 7.27.0 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.28.0 + + '@types/babel__generator@7.27.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/babel__template@7.4.4': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@types/babel__traverse@7.28.0': + dependencies: + '@babel/types': 7.29.7 + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.9': {} + + '@types/istanbul-lib-coverage@2.0.6': {} + + '@types/istanbul-lib-report@3.0.3': + dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + + '@types/istanbul-reports@3.0.4': + dependencies: + '@types/istanbul-lib-report': 3.0.3 + + '@types/jest@30.0.0': + dependencies: + expect: 30.4.1 + pretty-format: 30.4.1 + + '@types/nise@1.4.5': {} + + '@types/node@25.0.3': + dependencies: + undici-types: 7.16.0 + + '@types/stack-utils@2.0.3': {} + + '@types/yargs-parser@21.0.3': {} + + '@types/yargs@17.0.35': + dependencies: + '@types/yargs-parser': 21.0.3 + + '@vitest/expect@4.0.18': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.0.18 + '@vitest/utils': 4.0.18 + chai: 6.2.2 + tinyrainbow: 3.1.0 + + '@vitest/mocker@4.0.18(vite@7.3.5(@types/node@25.0.3)(less@4.5.1)(lightningcss@1.32.0))': + dependencies: + '@vitest/spy': 4.0.18 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.3.5(@types/node@25.0.3)(less@4.5.1)(lightningcss@1.32.0) + + '@vitest/pretty-format@4.0.18': + dependencies: + tinyrainbow: 3.1.0 + + '@vitest/runner@4.0.18': + dependencies: + '@vitest/utils': 4.0.18 + pathe: 2.0.3 + + '@vitest/snapshot@4.0.18': + dependencies: + '@vitest/pretty-format': 4.0.18 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.0.18': {} + + '@vitest/utils@4.0.18': + dependencies: + '@vitest/pretty-format': 4.0.18 + tinyrainbow: 3.1.0 + + acorn-walk@8.3.5: + dependencies: + acorn: 8.17.0 + + acorn@8.17.0: {} + + agent-base@7.1.4: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + arg@4.1.3: {} + + aria-query@5.3.2: {} + + array-union@2.1.0: {} + + assertion-error@2.0.1: {} + + async@3.2.6: {} + + babel-plugin-jsx-dom-expressions@0.40.7(@babel/core@7.29.7): + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.18.6 + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/types': 7.29.7 + html-entities: 2.3.3 + parse5: 7.3.0 + + babel-preset-solid@1.9.12(@babel/core@7.29.7)(solid-js@1.9.13): + dependencies: + '@babel/core': 7.29.7 + babel-plugin-jsx-dom-expressions: 0.40.7(@babel/core@7.29.7) + optionalDependencies: + solid-js: 1.9.13 + + baseline-browser-mapping@2.10.38: {} + + basic-auth@2.0.1: + dependencies: + safe-buffer: 5.1.2 + + bidi-js@1.0.3: + dependencies: + require-from-string: 2.0.2 + + big.js@5.2.2: {} + + binary-extensions@2.3.0: {} + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + browserslist@4.28.4: + dependencies: + baseline-browser-mapping: 2.10.38 + caniuse-lite: 1.0.30001799 + electron-to-chromium: 1.5.377 + node-releases: 2.0.48 + update-browserslist-db: 1.2.3(browserslist@4.28.4) + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + can-attribute-encoder@1.1.4: + dependencies: + can-log: 1.0.2 + can-namespace: 1.0.0 + + can-log@1.0.2: {} + + can-namespace@1.0.0: {} + + can-stache-ast@1.1.0: + dependencies: + can-view-parser: 4.1.3 + + can-stache-loader@3.0.0: + dependencies: + can-stache-ast: 1.1.0 + loader-utils: 1.4.2 + + can-view-parser@4.1.3: + dependencies: + can-attribute-encoder: 1.1.4 + can-log: 1.0.2 + can-namespace: 1.0.0 + + caniuse-lite@1.0.30001799: {} + + chai@6.2.2: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + ci-info@4.4.0: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + convert-source-map@2.0.0: {} + + copy-anything@2.0.6: + dependencies: + is-what: 3.14.1 + + corser@2.0.1: {} + + create-require@1.1.1: {} + + css-tree@3.2.1: + dependencies: + mdn-data: 2.27.1 + source-map-js: 1.2.1 + + css.escape@1.5.1: {} + + cssstyle@5.3.7: + dependencies: + '@asamuzakjp/css-color': 4.1.1 + '@csstools/css-syntax-patches-for-csstree': 1.1.5(css-tree@3.2.1) + css-tree: 3.2.1 + lru-cache: 11.5.1 + + csstype@3.2.3: {} + + data-urls@6.0.1: + dependencies: + whatwg-mimetype: 5.0.0 + whatwg-url: 15.1.0 + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decimal.js@10.6.0: {} + + detect-libc@2.1.2: {} + + diff@4.0.4: {} + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + dom-accessibility-api@0.6.3: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + electron-to-chromium@1.5.377: {} + + emojis-list@3.0.0: {} + + entities@6.0.1: {} + + errno@0.1.8: + dependencies: + prr: 1.0.1 + optional: true + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@1.7.0: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + esbuild-plugin-copy@2.1.1(esbuild@0.27.2): + dependencies: + chalk: 4.1.2 + chokidar: 3.6.0 + esbuild: 0.27.2 + fs-extra: 10.1.0 + globby: 11.1.0 + + esbuild-plugin-solid@0.6.0(esbuild@0.27.2)(solid-js@1.9.13): + dependencies: + '@babel/core': 7.29.7 + '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) + babel-preset-solid: 1.9.12(@babel/core@7.29.7)(solid-js@1.9.13) + esbuild: 0.27.2 + solid-js: 1.9.13 + transitivePeerDependencies: + - supports-color + + esbuild@0.27.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.27.2 + '@esbuild/android-arm': 0.27.2 + '@esbuild/android-arm64': 0.27.2 + '@esbuild/android-x64': 0.27.2 + '@esbuild/darwin-arm64': 0.27.2 + '@esbuild/darwin-x64': 0.27.2 + '@esbuild/freebsd-arm64': 0.27.2 + '@esbuild/freebsd-x64': 0.27.2 + '@esbuild/linux-arm': 0.27.2 + '@esbuild/linux-arm64': 0.27.2 + '@esbuild/linux-ia32': 0.27.2 + '@esbuild/linux-loong64': 0.27.2 + '@esbuild/linux-mips64el': 0.27.2 + '@esbuild/linux-ppc64': 0.27.2 + '@esbuild/linux-riscv64': 0.27.2 + '@esbuild/linux-s390x': 0.27.2 + '@esbuild/linux-x64': 0.27.2 + '@esbuild/netbsd-arm64': 0.27.2 + '@esbuild/netbsd-x64': 0.27.2 + '@esbuild/openbsd-arm64': 0.27.2 + '@esbuild/openbsd-x64': 0.27.2 + '@esbuild/openharmony-arm64': 0.27.2 + '@esbuild/sunos-x64': 0.27.2 + '@esbuild/win32-arm64': 0.27.2 + '@esbuild/win32-ia32': 0.27.2 + '@esbuild/win32-x64': 0.27.2 + + escalade@3.2.0: {} + + escape-string-regexp@2.0.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + eventemitter3@4.0.7: {} + + expect-type@1.3.0: {} + + expect@30.4.1: + dependencies: + '@jest/expect-utils': 30.4.1 + '@jest/get-type': 30.1.0 + jest-matcher-utils: 30.4.1 + jest-message-util: 30.4.1 + jest-mock: 30.4.1 + jest-util: 30.4.1 + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fastq@1.20.1: + dependencies: + reusify: 1.1.0 + + fdir@6.5.0(picomatch@4.0.4): + optionalDependencies: + picomatch: 4.0.4 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + follow-redirects@1.16.0: {} + + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.2.1 + universalify: 2.0.1 + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + gensync@1.0.0-beta.2: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.3 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + he@1.2.0: {} + + html-encoding-sniffer@3.0.0: + dependencies: + whatwg-encoding: 2.0.0 + + html-encoding-sniffer@4.0.0: + dependencies: + whatwg-encoding: 3.1.1 + + html-entities@2.3.3: {} + + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + http-proxy@1.18.1: + dependencies: + eventemitter3: 4.0.7 + follow-redirects: 1.16.0 + requires-port: 1.0.0 + transitivePeerDependencies: + - debug + + http-server@14.1.1: + dependencies: + basic-auth: 2.0.1 + chalk: 4.1.2 + corser: 2.0.1 + he: 1.2.0 + html-encoding-sniffer: 3.0.0 + http-proxy: 1.18.1 + mime: 1.6.0 + minimist: 1.2.8 + opener: 1.5.2 + portfinder: 1.0.38 + secure-compare: 3.0.1 + union: 0.5.0 + url-join: 4.0.1 + transitivePeerDependencies: + - debug + - supports-color + + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ignore@5.3.2: {} + + image-size@0.5.5: + optional: true + + indent-string@4.0.0: {} + + is-binary-path@2.1.0: + dependencies: + binary-extensions: 2.3.0 + + is-extglob@2.1.1: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + is-potential-custom-element-name@1.0.1: {} + + is-what@3.14.1: {} + + is-what@4.1.16: {} + + jest-diff@30.4.1: + dependencies: + '@jest/diff-sequences': 30.4.0 + '@jest/get-type': 30.1.0 + chalk: 4.1.2 + pretty-format: 30.4.1 + + jest-matcher-utils@30.4.1: + dependencies: + '@jest/get-type': 30.1.0 + chalk: 4.1.2 + jest-diff: 30.4.1 + pretty-format: 30.4.1 + + jest-message-util@30.4.1: + dependencies: + '@babel/code-frame': 7.29.7 + '@jest/types': 30.4.1 + '@types/stack-utils': 2.0.3 + chalk: 4.1.2 + graceful-fs: 4.2.11 + jest-util: 30.4.1 + picomatch: 4.0.4 + pretty-format: 30.4.1 + slash: 3.0.0 + stack-utils: 2.0.6 + + jest-mock@30.4.1: + dependencies: + '@jest/types': 30.4.1 + '@types/node': 25.0.3 + jest-util: 30.4.1 + + jest-regex-util@30.4.0: {} + + jest-util@30.4.1: + dependencies: + '@jest/types': 30.4.1 + '@types/node': 25.0.3 + chalk: 4.1.2 + ci-info: 4.4.0 + graceful-fs: 4.2.11 + picomatch: 4.0.4 + + js-tokens@4.0.0: {} + + jsdom@27.0.0: + dependencies: + '@asamuzakjp/dom-selector': 6.8.1 + cssstyle: 5.3.7 + data-urls: 6.0.1 + decimal.js: 10.6.0 + html-encoding-sniffer: 4.0.0 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + is-potential-custom-element-name: 1.0.1 + parse5: 7.3.0 + rrweb-cssom: 0.8.0 + saxes: 6.0.0 + symbol-tree: 3.2.4 + tough-cookie: 6.0.1 + w3c-xmlserializer: 5.0.0 + webidl-conversions: 8.0.1 + whatwg-encoding: 3.1.1 + whatwg-mimetype: 4.0.0 + whatwg-url: 15.1.0 + ws: 8.21.0 + xml-name-validator: 5.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + jsesc@3.1.0: {} + + json5@1.0.2: + dependencies: + minimist: 1.2.8 + + json5@2.2.3: {} + + jsonfile@6.2.1: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + just-extend@6.2.0: {} + + less@4.5.1: + dependencies: + copy-anything: 2.0.6 + parse-node-version: 1.0.1 + tslib: 2.8.1 + optionalDependencies: + errno: 0.1.8 + graceful-fs: 4.2.11 + image-size: 0.5.5 + make-dir: 2.1.0 + mime: 1.6.0 + needle: 3.5.0 + source-map: 0.6.1 + + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + + loader-utils@1.4.2: + dependencies: + big.js: 5.2.2 + emojis-list: 3.0.0 + json5: 1.0.2 + + lru-cache@11.5.1: {} + + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + make-dir@2.1.0: + dependencies: + pify: 4.0.1 + semver: 5.7.2 + optional: true + + make-error@1.3.6: {} + + math-intrinsics@1.1.0: {} + + mdn-data@2.27.1: {} + + merge-anything@5.1.7: + dependencies: + is-what: 4.1.16 + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.2 + + mime@1.6.0: {} + + min-indent@1.0.1: {} + + minimist@1.2.8: {} + + ms@2.1.3: {} + + nanoid@3.3.15: {} + + needle@3.5.0: + dependencies: + iconv-lite: 0.6.3 + sax: 1.6.0 + optional: true + + nise@6.1.5: + dependencies: + '@sinonjs/commons': 3.0.1 + '@sinonjs/fake-timers': 15.4.0 + just-extend: 6.2.0 + path-to-regexp: 8.4.2 + + node-releases@2.0.48: {} + + normalize-path@3.0.0: {} + + object-inspect@1.13.4: {} + + obug@2.1.3: {} + + opener@1.5.2: {} + + parse-node-version@1.0.1: {} + + parse5@7.3.0: + dependencies: + entities: 6.0.1 + + path-to-regexp@8.4.2: {} + + path-type@4.0.0: {} + + pathe@2.0.3: {} + + picocolors@1.1.1: {} + + picomatch@2.3.2: {} + + picomatch@4.0.4: {} + + pify@4.0.1: + optional: true + + portfinder@1.0.38: + dependencies: + async: 3.2.6 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + postcss@8.5.15: + dependencies: + nanoid: 3.3.15 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prettier@3.7.4: {} + + pretty-format@30.4.1: + dependencies: + '@jest/schemas': 30.4.1 + ansi-styles: 5.2.0 + react-is-18: react-is@18.3.1 + react-is-19: react-is@19.2.7 + + prr@1.0.1: + optional: true + + punycode@2.3.1: {} + + qs@6.15.2: + dependencies: + side-channel: 1.1.1 + + queue-microtask@1.2.3: {} + + react-is@18.3.1: {} + + react-is@19.2.7: {} + + readdirp@3.6.0: + dependencies: + picomatch: 2.3.2 + + redent@3.0.0: + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + + require-from-string@2.0.2: {} + + requires-port@1.0.0: {} + + reusify@1.1.0: {} + + rolldown@1.0.3: + dependencies: + '@oxc-project/types': 0.133.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.0.3 + '@rolldown/binding-darwin-arm64': 1.0.3 + '@rolldown/binding-darwin-x64': 1.0.3 + '@rolldown/binding-freebsd-x64': 1.0.3 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.3 + '@rolldown/binding-linux-arm64-gnu': 1.0.3 + '@rolldown/binding-linux-arm64-musl': 1.0.3 + '@rolldown/binding-linux-ppc64-gnu': 1.0.3 + '@rolldown/binding-linux-s390x-gnu': 1.0.3 + '@rolldown/binding-linux-x64-gnu': 1.0.3 + '@rolldown/binding-linux-x64-musl': 1.0.3 + '@rolldown/binding-openharmony-arm64': 1.0.3 + '@rolldown/binding-wasm32-wasi': 1.0.3 + '@rolldown/binding-win32-arm64-msvc': 1.0.3 + '@rolldown/binding-win32-x64-msvc': 1.0.3 + + rollup@4.62.2: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.62.2 + '@rollup/rollup-android-arm64': 4.62.2 + '@rollup/rollup-darwin-arm64': 4.62.2 + '@rollup/rollup-darwin-x64': 4.62.2 + '@rollup/rollup-freebsd-arm64': 4.62.2 + '@rollup/rollup-freebsd-x64': 4.62.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.62.2 + '@rollup/rollup-linux-arm-musleabihf': 4.62.2 + '@rollup/rollup-linux-arm64-gnu': 4.62.2 + '@rollup/rollup-linux-arm64-musl': 4.62.2 + '@rollup/rollup-linux-loong64-gnu': 4.62.2 + '@rollup/rollup-linux-loong64-musl': 4.62.2 + '@rollup/rollup-linux-ppc64-gnu': 4.62.2 + '@rollup/rollup-linux-ppc64-musl': 4.62.2 + '@rollup/rollup-linux-riscv64-gnu': 4.62.2 + '@rollup/rollup-linux-riscv64-musl': 4.62.2 + '@rollup/rollup-linux-s390x-gnu': 4.62.2 + '@rollup/rollup-linux-x64-gnu': 4.62.2 + '@rollup/rollup-linux-x64-musl': 4.62.2 + '@rollup/rollup-openbsd-x64': 4.62.2 + '@rollup/rollup-openharmony-arm64': 4.62.2 + '@rollup/rollup-win32-arm64-msvc': 4.62.2 + '@rollup/rollup-win32-ia32-msvc': 4.62.2 + '@rollup/rollup-win32-x64-gnu': 4.62.2 + '@rollup/rollup-win32-x64-msvc': 4.62.2 + fsevents: 2.3.3 + + rrweb-cssom@0.8.0: {} + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + safe-buffer@5.1.2: {} + + safer-buffer@2.1.2: {} + + sax@1.6.0: + optional: true + + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + + secure-compare@3.0.1: {} + + semver@5.7.2: + optional: true + + semver@6.3.1: {} + + seroval-plugins@1.5.4(seroval@1.5.4): + dependencies: + seroval: 1.5.4 + + seroval@1.5.4: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + siginfo@2.0.0: {} + + slash@3.0.0: {} + + solid-js@1.9.13: + dependencies: + csstype: 3.2.3 + seroval: 1.5.4 + seroval-plugins: 1.5.4(seroval@1.5.4) + + solid-refresh@0.6.3(solid-js@1.9.13): + dependencies: + '@babel/generator': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/types': 7.29.7 + solid-js: 1.9.13 + transitivePeerDependencies: + - supports-color + + source-map-js@1.2.1: {} + + source-map@0.6.1: + optional: true + + stack-utils@2.0.6: + dependencies: + escape-string-regexp: 2.0.0 + + stackback@0.0.2: {} + + std-env@3.10.0: {} + + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + symbol-tree@3.2.4: {} + + tinybench@2.9.0: {} + + tinyexec@1.2.4: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + + tinyrainbow@3.1.0: {} + + tldts-core@7.4.4: {} + + tldts@7.4.4: + dependencies: + tldts-core: 7.4.4 + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tough-cookie@6.0.1: + dependencies: + tldts: 7.4.4 + + tr46@6.0.0: + dependencies: + punycode: 2.3.1 + + ts-node@10.9.2(@types/node@25.0.3)(typescript@5.9.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.12 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 25.0.3 + acorn: 8.17.0 + acorn-walk: 8.3.5 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.4 + make-error: 1.3.6 + typescript: 5.9.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + tslib@2.8.1: {} + + type-detect@4.0.8: {} + + typescript@5.9.3: {} + + undici-types@7.16.0: {} + + union@0.5.0: + dependencies: + qs: 6.15.2 + + universalify@2.0.1: {} + + update-browserslist-db@1.2.3(browserslist@4.28.4): + dependencies: + browserslist: 4.28.4 + escalade: 3.2.0 + picocolors: 1.1.1 + + url-join@4.0.1: {} + + v8-compile-cache-lib@3.0.1: {} + + vite-plugin-solid@2.11.12(@testing-library/jest-dom@6.9.1)(solid-js@1.9.13)(vite@8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1)): + dependencies: + '@babel/core': 7.29.7 + '@types/babel__core': 7.20.5 + babel-preset-solid: 1.9.12(@babel/core@7.29.7)(solid-js@1.9.13) + merge-anything: 5.1.7 + solid-js: 1.9.13 + solid-refresh: 0.6.3(solid-js@1.9.13) + vite: 8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1) + vitefu: 1.1.3(vite@8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1)) + optionalDependencies: + '@testing-library/jest-dom': 6.9.1 + transitivePeerDependencies: + - supports-color + + vite@7.3.5(@types/node@25.0.3)(less@4.5.1)(lightningcss@1.32.0): + dependencies: + esbuild: 0.27.2 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + postcss: 8.5.15 + rollup: 4.62.2 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 25.0.3 + fsevents: 2.3.3 + less: 4.5.1 + lightningcss: 1.32.0 + + vite@8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1): + dependencies: + lightningcss: 1.32.0 + picomatch: 4.0.4 + postcss: 8.5.15 + rolldown: 1.0.3 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 25.0.3 + esbuild: 0.27.2 + fsevents: 2.3.3 + less: 4.5.1 + + vitefu@1.1.3(vite@8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1)): + optionalDependencies: + vite: 8.0.16(@types/node@25.0.3)(esbuild@0.27.2)(less@4.5.1) + + vitest@4.0.18(@types/node@25.0.3)(jsdom@27.0.0)(less@4.5.1)(lightningcss@1.32.0): + dependencies: + '@vitest/expect': 4.0.18 + '@vitest/mocker': 4.0.18(vite@7.3.5(@types/node@25.0.3)(less@4.5.1)(lightningcss@1.32.0)) + '@vitest/pretty-format': 4.0.18 + '@vitest/runner': 4.0.18 + '@vitest/snapshot': 4.0.18 + '@vitest/spy': 4.0.18 + '@vitest/utils': 4.0.18 + es-module-lexer: 1.7.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.3 + pathe: 2.0.3 + picomatch: 4.0.4 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 1.2.4 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.0 + vite: 7.3.5(@types/node@25.0.3)(less@4.5.1)(lightningcss@1.32.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 25.0.3 + jsdom: 27.0.0 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - terser + - tsx + - yaml + + w3c-xmlserializer@5.0.0: + dependencies: + xml-name-validator: 5.0.0 + + webidl-conversions@8.0.1: {} + + whatwg-encoding@2.0.0: + dependencies: + iconv-lite: 0.6.3 + + whatwg-encoding@3.1.1: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@4.0.0: {} + + whatwg-mimetype@5.0.0: {} + + whatwg-url@15.1.0: + dependencies: + tr46: 6.0.0 + webidl-conversions: 8.0.1 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + ws@8.21.0: {} + + xml-name-validator@5.0.0: {} + + xmlchars@2.2.0: {} + + yallist@3.1.1: {} + + yn@3.1.1: {} From 7e0ceb97c095886998cb04e067f3a7a134f7bffd Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 11:30:36 -0400 Subject: [PATCH 197/199] ci: bump workflow actions Update checkout, setup-node, and pnpm setup actions to the current major versions used by the project CI. Refs: #172 --- .github/workflows/run_tests.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index d6087a2..c2ef697 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -14,15 +14,13 @@ jobs: node-version: ["20", "21", "22"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Node ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} - name: Set up pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.25.0 + uses: pnpm/action-setup@v6 - name: Install dependencies run: | pnpm install --frozen-lockfile From 753f4b7979556d91408058d050ccc859c3f66e27 Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 11:37:11 -0400 Subject: [PATCH 198/199] ci: bump node test matrix Run CI against newer Node.js versions to match the pnpm migration and current runtime targets. Refs: #172 --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c2ef697..2a56db9 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: ["20", "21", "22"] + node-version: ["21", "24", "26"] steps: - uses: actions/checkout@v7 From e809920f908f2d85e0348054d5a693f2678aa50e Mon Sep 17 00:00:00 2001 From: Flavio Garcia Date: Tue, 23 Jun 2026 11:39:09 -0400 Subject: [PATCH 199/199] ci: correct node test matrix Use the intended supported Node.js versions for CI after the pnpm workflow migration. Refs: #172 --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 2a56db9..c7972e1 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: ["21", "24", "26"] + node-version: ["22", "24", "26"] steps: - uses: actions/checkout@v7