tw5-typed 0.2.22 → 0.2.23

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
@@ -2,7 +2,7 @@
2
2
  "description": "Types for tiddlywiki",
3
3
  "license": "MIT",
4
4
  "name": "tw5-typed",
5
- "version": "0.2.22",
5
+ "version": "0.2.23",
6
6
  "url": "https://github.com/tiddly-gittly/tw5-typed",
7
7
  "homepage": "https://github.com/tiddly-gittly/tw5-typed",
8
8
  "bugs": {
package/src/core.d.ts CHANGED
@@ -31,14 +31,15 @@ declare module 'tiddlywiki' {
31
31
  boot: IBoot;
32
32
  crypto: Crypto;
33
33
  utils: IUtils;
34
+ config: IConfig;
34
35
  version: string;
35
36
  safeMode: boolean;
36
- config: IConfig;
37
+ modules: IModules;
37
38
  rootWidget: Widget;
38
39
  notifier: Notifier;
39
40
  language: ILanguage;
40
- modules: IModules;
41
41
  locationHash: string;
42
+ fakeDocument: IFakeDocument;
42
43
  passwordPrompt: PasswordPrompt;
43
44
  packageInfo: Record<string, unknown>;
44
45
 
@@ -0,0 +1,27 @@
1
+ declare module 'tiddlywiki' {
2
+ export class TW_Element extends HTMLElement {
3
+ _style: Record<string, unknown>;
4
+ appendChild: <T extends TW_Element | TW_TextNode | Node>(node: T) => T;
5
+ isRaw: boolean;
6
+ isTiddlyWikiFakeDom: boolean;
7
+ namespaceURI: string;
8
+ tag: string;
9
+ }
10
+
11
+ export class TW_TextNode extends Node {
12
+ textContent: string;
13
+ }
14
+
15
+ export interface IFakeDocument {
16
+ compatMode: string;
17
+ createElement: (tag: string) => TW_Element;
18
+ createElementNS: (namespace: string, tag: string) => TW_Element;
19
+ createTextNode: (text: string) => TW_TextNode;
20
+ isTiddlyWikiFakeDom: boolean;
21
+ setSequenceNumber: (value: any) => void;
22
+ }
23
+ }
24
+
25
+ declare module '$:/core/modules/utils/fakedom.js' {
26
+ export type { TW_Element, TW_TextNode, IFakeDocument } from 'tiddlywiki';
27
+ }
@@ -1,3 +1,4 @@
1
1
  /// <reference path="dom.d.ts" />
2
2
  /// <reference path="utils.d.ts" />
3
- /// <reference path="filesystem.d.ts" />
3
+ /// <reference path="fakedom.d.ts" />
4
+ /// <reference path="filesystem.d.ts" />
@@ -477,28 +477,6 @@ declare module 'tiddlywiki' {
477
477
  ): boolean;
478
478
  }
479
479
 
480
- export interface IFakeDocument {
481
- compatMode: string;
482
- createElement: (tag: string) => TW_Element;
483
- createElementNS: (namespace: string, tag: string) => TW_Element;
484
- createTextNode: (text: string) => TW_TextNode;
485
- isTiddlyWikiFakeDom: boolean;
486
- setSequenceNumber: (value: any) => void;
487
- }
488
- // eslint-disable-next-line @typescript-eslint/naming-convention
489
- export interface TW_Element extends HTMLElement {
490
- _style: Record<string, unknown>;
491
- appendChild: <T extends TW_Element | TW_TextNode | Node>(node: T) => T;
492
- isRaw: boolean;
493
- isTiddlyWikiFakeDom: boolean;
494
- namespaceURI: string;
495
- tag: string;
496
- }
497
- // eslint-disable-next-line @typescript-eslint/naming-convention
498
- export interface TW_TextNode extends Node {
499
- textContent: string;
500
- }
501
-
502
480
  export type ModalWidget = {
503
481
  adjustPageClass: () => void;
504
482
  /**