@manyducks.co/dolla 2.0.0-alpha.19 → 2.0.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { s } from "./passthrough-DcOD0Wf3.js";
2
- import { P as m } from "./passthrough-DcOD0Wf3.js";
1
+ import { s } from "./passthrough-DrILnMr2.js";
2
+ import { P as m } from "./passthrough-DrILnMr2.js";
3
3
  function d(n, r, t, e, a, l) {
4
4
  const i = { ...o(["children", "key"], r) }, c = Array.isArray(r.children) ? r.children : [r.children];
5
5
  return s(n, i, ...c);
@@ -1,5 +1,5 @@
1
- import { s as t } from "./passthrough-DcOD0Wf3.js";
2
- import { P as l } from "./passthrough-DcOD0Wf3.js";
1
+ import { s as t } from "./passthrough-DrILnMr2.js";
2
+ import { P as l } from "./passthrough-DrILnMr2.js";
3
3
  function d(n, e, r) {
4
4
  return t(n, e ? { ...u(["children", "key"], e) } : void 0, e.children);
5
5
  }
package/dist/markup.d.ts CHANGED
@@ -45,7 +45,10 @@ export interface MarkupElement {
45
45
  readonly node?: Node;
46
46
  readonly isMounted: boolean;
47
47
  mount(parent: Node, after?: Node): void;
48
- unmount(): void;
48
+ /**
49
+ * Disconnect from the DOM and clean up. If parentIsUnmounting, DOM operations are skipped.
50
+ */
51
+ unmount(parentIsUnmounting: boolean): void;
49
52
  }
50
53
  export declare function isMarkup(value: unknown): value is Markup;
51
54
  export declare function isMarkupElement(value: unknown): value is MarkupElement;
@@ -21,6 +21,6 @@ export declare class Conditional implements MarkupElement {
21
21
  constructor(config: ConditionalConfig);
22
22
  get isMounted(): boolean;
23
23
  mount(parent: Node, after?: Node | undefined): void;
24
- unmount(): void;
24
+ unmount(parentIsUnmounting: boolean): void;
25
25
  update(value: any): void;
26
26
  }
@@ -18,7 +18,7 @@ export declare class HTML implements MarkupElement {
18
18
  get isMounted(): boolean;
19
19
  constructor({ tag, props, children, elementContext }: HTMLOptions);
20
20
  mount(parent: Node, after?: Node): void;
21
- unmount(): void;
21
+ unmount(parentIsUnmounting: boolean): void;
22
22
  getUpdateKey(type: string, value: string | number): string;
23
23
  attachProp<T>(value: State<T> | T, callback: (value: T) => void, updateKey: string): void;
24
24
  applyProps(element: HTMLElement | SVGElement, props: Record<string, unknown>): void;
@@ -23,8 +23,8 @@ export declare class Observer implements MarkupElement {
23
23
  get isMounted(): boolean;
24
24
  constructor({ states, renderFn, elementContext }: ObserverOptions);
25
25
  mount(parent: Node, after?: Node): void;
26
- unmount(): void;
27
- cleanup(): void;
26
+ unmount(parentIsUnmounting: boolean): void;
27
+ cleanup(parentIsUnmounting: boolean): void;
28
28
  update(...children: Renderable[]): void;
29
29
  }
30
30
  export {};
@@ -17,6 +17,6 @@ export declare class Outlet implements MarkupElement {
17
17
  constructor(config: OutletConfig);
18
18
  get isMounted(): boolean;
19
19
  mount(parent: Node, after?: Node | undefined): void;
20
- unmount(): void;
20
+ unmount(parentIsUnmounting: boolean): void;
21
21
  update(newChildren: MarkupElement[]): void;
22
22
  }
@@ -14,6 +14,6 @@ export declare class Portal implements MarkupElement {
14
14
  get isMounted(): boolean;
15
15
  constructor(config: PortalConfig);
16
16
  mount(_parent: Node, _after?: Node): void;
17
- unmount(): void;
17
+ unmount(parentIsUnmounting: boolean): void;
18
18
  }
19
19
  export {};
@@ -27,8 +27,8 @@ export declare class Repeat<T> implements MarkupElement {
27
27
  get isMounted(): boolean;
28
28
  constructor({ elementContext, $items, renderFn, keyFn }: RepeatOptions<T>);
29
29
  mount(parent: Node, after?: Node): void;
30
- unmount(): void;
31
- _cleanup(): void;
30
+ unmount(parentIsUnmounting: boolean): void;
31
+ _cleanup(parentIsUnmounting: boolean): void;
32
32
  _update(value: T[]): void;
33
33
  }
34
34
  export {};
@@ -13,7 +13,7 @@ export declare class Text implements MarkupElement {
13
13
  get isMounted(): boolean;
14
14
  constructor({ value }: TextOptions);
15
15
  mount(parent: Node, after?: Node | null): Promise<void>;
16
- unmount(): Promise<void>;
16
+ unmount(parentIsUnmounting: boolean): Promise<void>;
17
17
  update(value?: Stringable): void;
18
18
  }
19
19
  export {};