Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 238 additions & 48 deletions README.md

Large diffs are not rendered by default.

23 changes: 7 additions & 16 deletions dist/LumeElement.d.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
import type { AttributeHandler, AttributePropSpecs, __attributesToProps, __hasAttributeChangedCallback } from './decorators/attribute.js';
import type { AttributeHandler, AttributePropSpecs, attributesToProps__, hasAttributeChangedCallback__ } from './decorators/attribute.js';
import type { DashCasedProps } from './utils.js';
declare const root: unique symbol;
declare const LumeElement_base: (new (...a: any[]) => {
"__#1@#effects": Set<import("classy-solid").Effect>;
createEffect(fn: () => void): void;
stopEffects(): void;
"__#1@#createEffect1"(fn: () => void): void;
"__#1@#stopEffects1"(): void;
"__#1@#owner": import("solid-js").Owner | null;
"__#1@#dispose": (() => void) | null;
"__#1@#createEffect2"(fn: () => void): void;
"__#1@#stopEffects2"(): void;
}) & {
declare const HTMLElement: {
new (): HTMLElement;
prototype: HTMLElement;
};
declare class LumeElement extends LumeElement_base {
declare const root: unique symbol;
declare class LumeElement extends HTMLElement {
#private;
/**
* The default tag name of the elements this class instantiates. When using
Expand Down Expand Up @@ -90,9 +80,9 @@ declare class LumeElement extends LumeElement_base {
*/
static observedAttributeHandlers?: AttributeHandlerMap;
/** Note, this is internal and used by the @attribute decorator, see attribute.ts. */
[__attributesToProps]?: AttributePropSpecs;
[attributesToProps__]?: AttributePropSpecs;
/** Note, this is internal and used by the @attribute decorator, see attribute.ts. */
[__hasAttributeChangedCallback]?: true;
[hasAttributeChangedCallback__]?: true;
/**
* This can be used by a subclass, or other frameworks handling elements, to
* detect property values that exist from before custom element upgrade.
Expand Down Expand Up @@ -163,6 +153,7 @@ declare class LumeElement extends LumeElement_base {
*/
protected get styleRoot(): Node;
attachShadow(options: ShadowRootInit): ShadowRoot;
createEffect(fn: () => void): void;
connectedCallback(): void;
disconnectedCallback(): void;
attributeChangedCallback?(name: string, oldVal: string | null, newVal: string | null): void;
Expand Down
2 changes: 1 addition & 1 deletion dist/LumeElement.d.ts.map

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions dist/LumeElement.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/LumeElement.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/LumeElement.test.js.map

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions dist/decorators/attribute.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './metadata-shim.js';
import type { ElementCtor } from './element.js';
export declare const __classFinishers: ((Class: ElementCtor) => void)[];
export declare const classFinishers__: ((Class: ElementCtor) => void)[];
type AttributeDecoratorContext<This = unknown, Value = unknown> = ClassFieldDecoratorContext<This, Value> | ClassGetterDecoratorContext<This, Value> | ClassSetterDecoratorContext<This, Value> | ClassAccessorDecoratorContext<This, Value>;
/**
* A decorator that when used on a property or accessor causes an HTML attribute
Expand Down Expand Up @@ -43,9 +43,9 @@ export declare namespace attribute {
* still receive values from the HTML attribute.
*/
export declare const noSignal: (_value: unknown, context: AttributeDecoratorContext) => void;
export declare function __setUpAttribute(ctor: ElementCtor, attrName: string, propName: string, attributeHandler: AttributeHandler): any;
export declare const __hasAttributeChangedCallback: unique symbol;
export declare const __attributesToProps: unique symbol;
export declare function setUpAttribute__(ctor: ElementCtor, attrName: string, propName: string, attributeHandler: AttributeHandler): any;
export declare const hasAttributeChangedCallback__: unique symbol;
export declare const attributesToProps__: unique symbol;
export type AttributePropSpec = {
name: string;
default?: unknown;
Expand Down Expand Up @@ -317,6 +317,10 @@ export type EventListener<T extends Event = Event> = (event: T) => void;
export type EventHandler<T extends Event = Event> = {
handleEvent: EventListener<T>;
};
/**
* A decorator for mapping a JSON-valued attribute to a JS property. The string
* value of the attribute will be parsed into a JS value using `JSON.parse()`.
*/
export declare const jsonAttribute: (value: unknown, context: AttributeDecoratorContext) => any;
export type JSONValue = string | number | boolean | null | {
[key: string]: JSONValue;
Expand Down
2 changes: 1 addition & 1 deletion dist/decorators/attribute.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 23 additions & 20 deletions dist/decorators/attribute.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading