@manyducks.co/dolla 2.0.0-alpha.21 → 2.0.0-alpha.22

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.
Files changed (35) hide show
  1. package/dist/{modules/render.d.ts → core/batch.d.ts} +4 -1
  2. package/dist/{modules → core}/dolla.d.ts +9 -9
  3. package/dist/{markup.d.ts → core/markup.d.ts} +2 -2
  4. package/dist/{nodes → core/nodes}/cond.d.ts +1 -1
  5. package/dist/{nodes → core/nodes}/observer.d.ts +1 -1
  6. package/dist/{nodes → core/nodes}/portal.d.ts +1 -1
  7. package/dist/{view.d.ts → core/view.d.ts} +4 -4
  8. package/dist/index.d.ts +9 -8
  9. package/dist/index.js +604 -1015
  10. package/dist/index.js.map +1 -1
  11. package/dist/jsx-dev-runtime.d.ts +2 -2
  12. package/dist/jsx-dev-runtime.js +3 -3
  13. package/dist/jsx-dev-runtime.js.map +1 -1
  14. package/dist/jsx-runtime.d.ts +3 -3
  15. package/dist/jsx-runtime.js +2 -2
  16. package/dist/jsx-runtime.js.map +1 -1
  17. package/dist/modules/i18n.d.ts +2 -2
  18. package/dist/modules/router.d.ts +16 -28
  19. package/dist/passthrough-CrReqVVB.js +1442 -0
  20. package/dist/passthrough-CrReqVVB.js.map +1 -0
  21. package/dist/typeChecking.d.ts +1 -1
  22. package/dist/types.d.ts +2 -2
  23. package/dist/utils.d.ts +13 -0
  24. package/dist/views/default-crash-view.d.ts +1 -1
  25. package/dist/views/passthrough.d.ts +2 -2
  26. package/package.json +3 -5
  27. package/dist/passthrough-6Lrg96Id.js +0 -1393
  28. package/dist/passthrough-6Lrg96Id.js.map +0 -1
  29. /package/dist/{nodes → core/nodes}/html.d.ts +0 -0
  30. /package/dist/{nodes → core/nodes}/outlet.d.ts +0 -0
  31. /package/dist/{nodes → core/nodes}/repeat.d.ts +0 -0
  32. /package/dist/{nodes → core/nodes}/text.d.ts +0 -0
  33. /package/dist/{state.d.ts → core/state.d.ts} +0 -0
  34. /package/dist/{routing.d.ts → modules/router.utils.d.ts} +0 -0
  35. /package/dist/{routing.test.d.ts → modules/router.utils.test.d.ts} +0 -0
@@ -1,5 +1,8 @@
1
1
  import type { Dolla } from "./dolla.js";
2
- export declare class Render {
2
+ /**
3
+ * Batches DOM updates; reads before writes.
4
+ */
5
+ export declare class Batch {
3
6
  #private;
4
7
  constructor(dolla: Dolla);
5
8
  /**
@@ -1,11 +1,11 @@
1
- import { type Markup, type MarkupElement } from "../markup.js";
2
- import { createRef, createSettableState, createState, createWatcher, derive, isRef, toSettableState, toState, valueOf } from "../state.js";
3
- import { type ViewElement, type ViewFunction } from "../view.js";
1
+ import { type Markup, type MarkupElement } from "./markup.js";
2
+ import { createRef, createSettableState, createState, createWatcher, derive, isRef, toSettableState, toState, valueOf } from "./state.js";
3
+ import { type ViewElement, type ViewFunction } from "./view.js";
4
4
  import { type CrashViewProps } from "../views/default-crash-view.js";
5
- import { HTTP } from "./http.js";
6
- import { I18n } from "./i18n.js";
7
- import { Render } from "./render.js";
8
- import { Router } from "./router.js";
5
+ import { Batch } from "./batch.js";
6
+ import { HTTP } from "../modules/http.js";
7
+ import { I18n } from "../modules/i18n.js";
8
+ import { Router } from "../modules/router.js";
9
9
  export type Environment = "development" | "production";
10
10
  /**
11
11
  * Log type toggles. Each message category can be turned on or off or enabled only in a specific environment.
@@ -41,12 +41,12 @@ export type LoggerOptions = {
41
41
  };
42
42
  export declare class Dolla {
43
43
  #private;
44
+ readonly batch: Batch;
44
45
  readonly http: HTTP;
45
46
  readonly i18n: I18n;
46
- readonly render: Render;
47
47
  readonly router: Router;
48
48
  constructor();
49
- watch: <I extends import("../state.js").MaybeState<any>[]>(states: [...I], fn: (...currentValues: import("../state.js").StateValues<I>) => void) => import("../state.js").StopFunction;
49
+ watch: <I extends import("./state.js").MaybeState<any>[]>(states: [...I], fn: (...currentValues: import("./state.js").StateValues<I>) => void) => import("./state.js").StopFunction;
50
50
  createState: typeof createState;
51
51
  createSettableState: typeof createSettableState;
52
52
  toSettableState: typeof toSettableState;
@@ -1,6 +1,6 @@
1
- import type { Dolla } from "./modules/dolla.js";
1
+ import type { Dolla } from "./dolla.js";
2
2
  import { MaybeState, type State } from "./state.js";
3
- import type { Renderable, Stringable } from "./types.js";
3
+ import type { Renderable, Stringable } from "../types.js";
4
4
  import { type ViewContext, type ViewFunction, type ViewResult } from "./view.js";
5
5
  export interface ElementContext {
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { type MarkupElement, type ElementContext, type Markup } from "../markup.js";
2
2
  import { type State, type StopFunction } from "../state.js";
3
- import { type Renderable } from "../types.js";
3
+ import { type Renderable } from "../../types.js";
4
4
  export interface ConditionalConfig {
5
5
  $predicate: State<any>;
6
6
  thenContent?: Renderable;
@@ -1,6 +1,6 @@
1
1
  import { type ElementContext, type MarkupElement } from "../markup.js";
2
2
  import { type State } from "../state.js";
3
- import type { Renderable } from "../types.js";
3
+ import type { Renderable } from "../../types.js";
4
4
  interface ObserverOptions {
5
5
  elementContext: ElementContext;
6
6
  states: State<any>[];
@@ -1,5 +1,5 @@
1
1
  import { type MarkupElement, type ElementContext } from "../markup.js";
2
- import { type Renderable } from "../types.js";
2
+ import { type Renderable } from "../../types.js";
3
3
  interface PortalConfig {
4
4
  content: Renderable;
5
5
  parent: Node;
@@ -1,6 +1,6 @@
1
- import { type MarkupElement, type ElementContext, type Markup } from "./markup.js";
2
- import type { Logger } from "./modules/dolla.js";
3
- import { type MaybeState, Setter, State, type StateValues, type StopFunction } from "./state.js";
1
+ import type { Logger } from "./dolla.js";
2
+ import { type ElementContext, type Markup, type MarkupElement } from "./markup.js";
3
+ import { type MaybeState, State, type StateValues, type StopFunction } from "./state.js";
4
4
  /**
5
5
  * Any valid value that a View can return.
6
6
  */
@@ -70,7 +70,7 @@ export declare class View<P> implements ViewElement {
70
70
  _props: P;
71
71
  _element?: MarkupElement;
72
72
  _$children: State<MarkupElement[]>;
73
- _setChildren: Setter<MarkupElement[], MarkupElement[]>;
73
+ _setChildren: import("./state.js").Setter<MarkupElement[], MarkupElement[]>;
74
74
  _watcher: import("./state.js").StateWatcher;
75
75
  _beforeMountCallbacks: (() => any)[];
76
76
  _onMountCallbacks: (() => any)[];
package/dist/index.d.ts CHANGED
@@ -1,17 +1,18 @@
1
- export { createRef, createSettableState, createSetter, createState, derive, isRef, toSettableState, toState, valueOf, } from "./state.js";
2
- export type { MaybeState, Ref, SettableState, State, StopFunction } from "./state.js";
3
- export { cond, createMarkup, html, portal, repeat } from "./markup.js";
4
- export type { Markup, MarkupElement } from "./markup.js";
5
- import { Dolla } from "./modules/dolla.js";
1
+ export { createRef, createSettableState, createSetter, createState, derive, isRef, toSettableState, toState, valueOf, } from "./core/state.js";
2
+ export type { MaybeState, Ref, SettableState, State, StopFunction } from "./core/state.js";
3
+ export { strictEqual, shallowEqual, deepEqual } from "./utils.js";
4
+ export { cond, createMarkup, html, portal, repeat } from "./core/markup.js";
5
+ export type { Markup, MarkupElement } from "./core/markup.js";
6
+ import { Dolla } from "./core/dolla.js";
6
7
  declare const dolla: Dolla;
7
8
  export default dolla;
8
- export declare const t: (selector: string, options?: import("./modules/i18n.js").TOptions) => import("./state.js").State<string>;
9
+ export declare const t: (selector: string, options?: import("./modules/i18n.js").TOptions) => import("./core/state.js").State<string>;
9
10
  export declare function setDevDebug(value: boolean): void;
10
11
  export declare function getDevDebug(): boolean;
11
- export type { Dolla, Environment, Logger, LoggerErrorContext, LoggerOptions, Loggles } from "./modules/dolla.js";
12
+ export type { Dolla, Environment, Logger, LoggerErrorContext, LoggerOptions, Loggles } from "./core/dolla.js";
12
13
  export type { HTTPRequest, HTTPResponse } from "./modules/http.js";
13
14
  export type { InputType, Renderable } from "./types.js";
14
- export type { ViewContext, ViewFunction, ViewElement as ViewNode } from "./view.js";
15
+ export type { ViewContext, ViewFunction, ViewElement as ViewNode } from "./core/view.js";
15
16
  export type { CrashViewProps } from "./views/default-crash-view.js";
16
17
  import type { IntrinsicElements as Elements } from "./types";
17
18
  declare global {