@gramlot/gramlot 0.2.10 → 0.2.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gramlot/gramlot",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "Declarative HTML/SVG interfaces with live data binding, authored in JavaScript or Python.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/dom.d.ts CHANGED
@@ -18,6 +18,12 @@ export type DomNode = any;
18
18
  // deno-lint-ignore no-explicit-any
19
19
  /** A browser `DocumentFragment`. */
20
20
  export type DomFragment = any;
21
+ // deno-lint-ignore no-explicit-any
22
+ /** A browser `Window`. */
23
+ export type DomWindow = any;
24
+ // deno-lint-ignore no-explicit-any
25
+ /** A browser `Event`. */
26
+ export type DomEvent = any;
21
27
  /** The part of a browser `Navigator` that sends the close beacon. */
22
28
  export interface BeaconNavigator {
23
29
  /** Queue `data` for delivery to `url`; returns false when the browser refuses it. */
package/src/gramlot.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import type {DomElement, DomDocument} from './dom.d.ts';
6
+ import type {DomElement, DomDocument, DomEvent, DomWindow} from './dom.d.ts';
7
7
  import type {Bag} from '@genrojs/bag';
8
8
  import type {MainTransport} from './transport.js';
9
9
  import type {SourceHandler} from './handlers/source-handler.js';
@@ -59,9 +59,9 @@ export class Gramlot {
59
59
  /** The pending `start` promise, while loading. */
60
60
  loading?: Promise<Gramlot> | null;
61
61
  /** The window whose `pagehide` disposes the page; set only with the default `MainTransport`. */
62
- window?: Window;
62
+ window?: DomWindow;
63
63
  /** The `pagehide` listener that disposes the page with a beacon; set only with the default `MainTransport`. */
64
- pagehide?: (event: PageTransitionEvent) => void;
64
+ pagehide?: (event: DomEvent) => void;
65
65
  /** Create the page instance; the construction order is the one of the source plan. */
66
66
  constructor(options?: GramlotOptions);
67
67
  /** Load `main` from the server and mount it; resolves with the instance. */
package/src/index.d.ts CHANGED
@@ -25,4 +25,4 @@ export type {SourceReference} from './references.js';
25
25
  export {MainTransport} from './transport.js';
26
26
  export type {Fetcher} from './transport.js';
27
27
  export {InOut} from './inout.js';
28
- export type {BeaconNavigator, DomDocument, DomElement, DomFragment, DomNode} from './dom.d.ts';
28
+ export type {BeaconNavigator, DomDocument, DomElement, DomEvent, DomFragment, DomNode, DomWindow} from './dom.d.ts';