@lukewarlow/lieu
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -46,4 +46,6 @@ import { Ref } from '@vue/reactivity'; | ||
emit(name: string, data?: unknown): boolean; | ||
internals: ElementInternals; | ||
self: HTMLElement; | ||
} | ||
export { } |
@@ -162,3 +162,3 @@ import { ref, effect, stop } from '@vue/reactivity'; | ||
} | ||
#renderRoot; | ||
#internals; | ||
#classes = ""; | ||
@@ -176,5 +176,6 @@ #render = null; | ||
}); | ||
this.#renderRoot = this.attachShadow({ mode: definition.mode ?? "open" }); | ||
this.attachShadow({ mode: definition.mode ?? "open" }); | ||
this.#classes = this.getAttribute("class") ?? ""; | ||
this.removeAttribute("class"); | ||
this.#internals = this.attachInternals(); | ||
onBeforeMount(() => { | ||
@@ -193,3 +194,5 @@ if (definition.props) { | ||
this.#render = definition.setup(this.reactiveProps, { | ||
emit: this.emit.bind(this) | ||
emit: this.emit.bind(this), | ||
internals: this.#internals, | ||
self: this | ||
}); | ||
@@ -202,4 +205,3 @@ }); | ||
this._lifecycleHooks.get("onBeforeUpdate").forEach((hook) => hook()); | ||
const foo = this.#render(this.#classes, this.style.cssText); | ||
render(foo, this.#renderRoot, { host: this }); | ||
render(this.#render(this.#classes, this.style.cssText), this.shadowRoot, { host: this }); | ||
this._lifecycleHooks.get("onUpdated").forEach((hook) => hook()); | ||
@@ -206,0 +208,0 @@ }); |
{ | ||
"name": "@lukewarlow/lieu", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts", |
10396
258