@quenk/wml 2.13.10 → 2.14.0

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 (60) hide show
  1. package/lib/cli.d.ts +8 -8
  2. package/lib/cli.js +1 -3
  3. package/lib/cli.js.map +1 -1
  4. package/lib/cli.ts +48 -60
  5. package/lib/compile/codegen.d.ts +4 -9
  6. package/lib/compile/codegen.js +164 -369
  7. package/lib/compile/codegen.js.map +1 -1
  8. package/lib/compile/codegen.ts +644 -952
  9. package/lib/compile/index.d.ts +2 -2
  10. package/lib/compile/index.js +4 -4
  11. package/lib/compile/index.js.map +1 -1
  12. package/lib/compile/index.ts +14 -17
  13. package/lib/compile/transform.d.ts +8 -6
  14. package/lib/compile/transform.js +46 -18
  15. package/lib/compile/transform.js.map +1 -1
  16. package/lib/compile/transform.ts +139 -116
  17. package/lib/{dom.d.ts → dom/index.d.ts} +8 -2
  18. package/lib/{dom.js → dom/index.js} +84 -66
  19. package/lib/dom/index.js.map +1 -0
  20. package/lib/dom/index.ts +425 -0
  21. package/lib/dom/monitor.d.ts +33 -0
  22. package/lib/dom/monitor.js +60 -0
  23. package/lib/dom/monitor.js.map +1 -0
  24. package/lib/dom/monitor.ts +75 -0
  25. package/lib/index.d.ts +10 -95
  26. package/lib/index.js +10 -10
  27. package/lib/index.js.map +1 -1
  28. package/lib/index.ts +57 -182
  29. package/lib/main.js +17 -17
  30. package/lib/main.js.map +1 -1
  31. package/lib/main.ts +38 -44
  32. package/lib/parse/ast.d.ts +12 -6
  33. package/lib/parse/ast.js +68 -58
  34. package/lib/parse/ast.js.map +1 -1
  35. package/lib/parse/ast.ts +400 -482
  36. package/lib/parse/generated.d.ts +3 -5
  37. package/lib/parse/generated.js +9504 -9264
  38. package/lib/parse/index.d.ts +2 -3
  39. package/lib/parse/index.js.map +1 -1
  40. package/lib/parse/index.ts +7 -9
  41. package/lib/parse/test.js +194 -192
  42. package/lib/parse/test.js.map +1 -1
  43. package/lib/parse/test.ts +294 -404
  44. package/lib/parse/wml.y +4 -0
  45. package/lib/tsconfig.json +19 -20
  46. package/lib/util.d.ts +10 -0
  47. package/lib/util.js +21 -0
  48. package/lib/util.js.map +1 -0
  49. package/lib/util.ts +39 -0
  50. package/lib/view/frame.d.ts +103 -0
  51. package/lib/view/frame.js +206 -0
  52. package/lib/view/frame.js.map +1 -0
  53. package/lib/view/frame.ts +249 -0
  54. package/lib/view/index.d.ts +58 -0
  55. package/lib/view/index.js +48 -0
  56. package/lib/view/index.js.map +1 -0
  57. package/lib/view/index.ts +97 -0
  58. package/package.json +4 -3
  59. package/lib/dom.js.map +0 -1
  60. package/lib/dom.ts +0 -475
package/lib/parse/wml.y CHANGED
@@ -371,6 +371,10 @@ view_statement
371
371
  | '{%' VIEW unqualified_constructor type_parameters WHERE
372
372
  context_members '%}' view_directives element
373
373
  { $$ = new yy.ast.ViewStatement($3, $4, $6, $8, $9, @$); }
374
+
375
+ | '{%' VIEW unqualified_constructor '%}'
376
+ view_directives? element
377
+ { $$ = new yy.ast.ViewStatement($3, [], undefined, $5 || [], $6, @$); }
374
378
  ;
375
379
 
376
380
  view_statement_context
package/lib/tsconfig.json CHANGED
@@ -1,22 +1,21 @@
1
1
  {
2
- "compilerOptions": {
3
- "baseUrl": "src",
4
- "lib": ["es5", "ES2015", "DOM"],
5
- "module": "commonjs",
6
- "target": "es6",
7
- "rootDir": ".",
8
- "moduleResolution": "node",
9
- "allowUnreachableCode": true,
10
- "noUnusedParameters": true,
11
- "noUnusedLocals": true,
12
- "skipLibCheck": true,
13
- "noImplicitAny": true,
14
- "sourceMap": true,
15
- "declaration": true,
16
- "strict": true,
17
- "types": ["node"],
18
- "typeRoots": ["../node_modules/@types"]
19
- },
20
- "exclude": ["node_modules"]
21
-
2
+ "compilerOptions": {
3
+ "baseUrl": "src",
4
+ "lib": ["es5", "ES2015", "dom", "dom.iterable"],
5
+ "module": "commonjs",
6
+ "target": "ES2021",
7
+ "rootDir": ".",
8
+ "moduleResolution": "node",
9
+ "allowUnreachableCode": true,
10
+ "noUnusedParameters": true,
11
+ "noUnusedLocals": true,
12
+ "skipLibCheck": true,
13
+ "noImplicitAny": true,
14
+ "sourceMap": true,
15
+ "declaration": true,
16
+ "strict": true,
17
+ "types": ["node"],
18
+ "typeRoots": ["../node_modules/@types"]
19
+ },
20
+ "exclude": ["node_modules"]
22
21
  }
package/lib/util.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { Record } from "@quenk/noni/lib/data/record";
2
+ import { Type } from "@quenk/noni/lib/data/type";
3
+ import { Content } from "./";
4
+ export type IfArg = () => Content[];
5
+ export type ForAlt = () => Content[];
6
+ export type ForInBody<A> = (val: A, idx: number, all: A[]) => Content[];
7
+ export type ForOfBody<A> = (val: A, key: string, all: object) => Content[];
8
+ export declare const forIn: <A>(list: A[], f: ForInBody<A>, alt: ForAlt) => Content[];
9
+ export declare const forOf: <A>(o: Record<A>, f: ForOfBody<A>, alt: ForAlt) => Content[];
10
+ export declare const isSet: (value: Type) => boolean;
package/lib/util.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSet = exports.forOf = exports.forIn = void 0;
4
+ const forIn = (list, f, alt) => {
5
+ let ret = [];
6
+ for (let i = 0; i < list.length; i++)
7
+ ret = ret.concat(f(list[i], i, list));
8
+ return ret.length === 0 ? alt() : ret;
9
+ };
10
+ exports.forIn = forIn;
11
+ const forOf = (o, f, alt) => {
12
+ let ret = [];
13
+ for (let key in o)
14
+ if (o.hasOwnProperty(key))
15
+ ret = ret.concat(f(o[key], key, o));
16
+ return ret.length === 0 ? alt() : ret;
17
+ };
18
+ exports.forOf = forOf;
19
+ const isSet = (value) => value != null;
20
+ exports.isSet = isSet;
21
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["util.ts"],"names":[],"mappings":";;;AAaO,MAAM,KAAK,GAAG,CACnB,IAAS,EACT,CAAe,EACf,GAAW,EACA,EAAE;IACb,IAAI,GAAG,GAAc,EAAE,CAAC;IAExB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAE5E,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACxC,CAAC,CAAC;AAVW,QAAA,KAAK,SAUhB;AAEK,MAAM,KAAK,GAAG,CACnB,CAAY,EACZ,CAAe,EACf,GAAW,EACA,EAAE;IACb,IAAI,GAAG,GAAc,EAAE,CAAC;IAExB,KAAK,IAAI,GAAG,IAAI,CAAC;QACf,IAAI,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC;YAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAEjE,OAAO,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AACxC,CAAC,CAAC;AAXW,QAAA,KAAK,SAWhB;AAEK,MAAM,KAAK,GAAG,CAAC,KAAW,EAAE,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC;AAAvC,QAAA,KAAK,SAAkC"}
package/lib/util.ts ADDED
@@ -0,0 +1,39 @@
1
+ import { Record } from "@quenk/noni/lib/data/record";
2
+ import { Type } from "@quenk/noni/lib/data/type";
3
+
4
+ import { Content } from "./";
5
+
6
+ export type IfArg = () => Content[];
7
+
8
+ export type ForAlt = () => Content[];
9
+
10
+ export type ForInBody<A> = (val: A, idx: number, all: A[]) => Content[];
11
+
12
+ export type ForOfBody<A> = (val: A, key: string, all: object) => Content[];
13
+
14
+ export const forIn = <A>(
15
+ list: A[],
16
+ f: ForInBody<A>,
17
+ alt: ForAlt,
18
+ ): Content[] => {
19
+ let ret: Content[] = [];
20
+
21
+ for (let i = 0; i < list.length; i++) ret = ret.concat(f(list[i], i, list));
22
+
23
+ return ret.length === 0 ? alt() : ret;
24
+ };
25
+
26
+ export const forOf = <A>(
27
+ o: Record<A>,
28
+ f: ForOfBody<A>,
29
+ alt: ForAlt,
30
+ ): Content[] => {
31
+ let ret: Content[] = [];
32
+
33
+ for (let key in o)
34
+ if (o.hasOwnProperty(key)) ret = ret.concat(f(o[key], key, o));
35
+
36
+ return ret.length === 0 ? alt() : ret;
37
+ };
38
+
39
+ export const isSet = (value: Type) => value != null;
@@ -0,0 +1,103 @@
1
+ import { Maybe } from "@quenk/noni/lib/data/maybe";
2
+ import { Attrs, Content, WMLId, Widget } from "..";
3
+ import { View } from ".";
4
+ /**
5
+ * Index used for lists and other data structures.
6
+ *
7
+ * TODO: migrate to noni.
8
+ */
9
+ export type Index = number;
10
+ /**
11
+ * Entry contains the DOM node and optional widget for an WMLElement.
12
+ */
13
+ export interface Entry {
14
+ node: Content;
15
+ widget?: Widget;
16
+ }
17
+ /**
18
+ * SetList is a list like data structure that ensures an object is only added
19
+ * once.
20
+ *
21
+ * This allows for items to be added and their index returned without having
22
+ * to iterate over the members to determine if the item was added already.
23
+ *
24
+ * Instead a map of item -> index values is kept internally allowing for fast
25
+ * lookup of new items being added.
26
+ *
27
+ * TODO:
28
+ * 1. Migrate to noni.
29
+ * 2. Find a way to support nested objects, example: {node, widget}
30
+ */
31
+ declare class SetList {
32
+ items: Content[];
33
+ cache: Map<Content, Index>;
34
+ constructor(items?: Content[], cache?: Map<Content, Index>);
35
+ add(item: Content): number;
36
+ set(id: Index, item: Content): number;
37
+ has(id: Index): boolean;
38
+ get(id: Index): Content;
39
+ delete(idx: Index): void;
40
+ }
41
+ /**
42
+ * ViewFrame serves as a container for a View's rendered template.
43
+ *
44
+ * This class containers helper methods for retreiving elements by id or
45
+ * group freeing the View class of such logic.
46
+ */
47
+ export declare class ViewFrame {
48
+ nodes: SetList;
49
+ widgets: Map<number, Widget>;
50
+ groups: Map<WMLId, Index[]>;
51
+ ids: Map<string, number>;
52
+ indexes: Map<number, string>;
53
+ tree?: Content | undefined;
54
+ constructor(nodes?: SetList, widgets?: Map<number, Widget>, groups?: Map<WMLId, Index[]>, ids?: Map<string, number>, indexes?: Map<number, string>, tree?: Content | undefined);
55
+ _register(id: WMLId, node: Content, widget?: Widget): void;
56
+ _registerGroupMember(id: WMLId, node: Content, widget?: Widget): void;
57
+ /**
58
+ * root sets the root element of a View's tree.
59
+ */
60
+ root(el: Content): void;
61
+ /**
62
+ * node constructs a DOM node to be used in the View's tree.
63
+ *
64
+ * Any id or group assignment will be honored.
65
+ */
66
+ node(tag: string, attrs: Attrs, children: Content[]): Content;
67
+ /**
68
+ * widget constructs a DOM sub-tree for a Widget in the View's tree.
69
+ *
70
+ * Any id or group assignment will be honored.
71
+ */
72
+ widget(w: Widget, attrs: Attrs): Content;
73
+ /**
74
+ * view renders the content of another view, saving its ids and groups to
75
+ * this one.
76
+ */
77
+ view(view: View): Content;
78
+ /**
79
+ * findById returns the entry stored for the specified wml element.
80
+ */
81
+ findById(id: WMLId): Maybe<Entry>;
82
+ /**
83
+ * findByGroup returns all the entries stored fro a group.
84
+ */
85
+ findByGroup(id: WMLId): Entry[];
86
+ /**
87
+ * replaceByIndex performs the heavy work of replacing a WMLElement
88
+ * with the corresponding index from another ViewFrame.
89
+ *
90
+ * The replaced element will have its DOM content redrawn if a parentNode
91
+ * is detected.
92
+ */
93
+ replaceByIndex(next: ViewFrame, idx: Index): void;
94
+ /**
95
+ * replaceById allows WMLElement replacement by using an id.
96
+ */
97
+ replaceById(next: ViewFrame, id: WMLId): void;
98
+ /**
99
+ * replaceByGroup allows WMLElement replaced by using a group identifier.
100
+ */
101
+ replaceByGroup(next: ViewFrame, id: WMLId): void;
102
+ }
103
+ export {};
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ViewFrame = void 0;
4
+ const dom = require("../dom");
5
+ const maybe_1 = require("@quenk/noni/lib/data/maybe");
6
+ const monitor_1 = require("../dom/monitor");
7
+ /**
8
+ * SetList is a list like data structure that ensures an object is only added
9
+ * once.
10
+ *
11
+ * This allows for items to be added and their index returned without having
12
+ * to iterate over the members to determine if the item was added already.
13
+ *
14
+ * Instead a map of item -> index values is kept internally allowing for fast
15
+ * lookup of new items being added.
16
+ *
17
+ * TODO:
18
+ * 1. Migrate to noni.
19
+ * 2. Find a way to support nested objects, example: {node, widget}
20
+ */
21
+ class SetList {
22
+ constructor(items = [], cache = new Map()) {
23
+ this.items = items;
24
+ this.cache = cache;
25
+ }
26
+ add(item) {
27
+ let idx = this.cache.get(item) ?? this.items.push(item) - 1;
28
+ this.cache.set(item, idx);
29
+ return idx;
30
+ }
31
+ set(id, item) {
32
+ let prev = this.items[id];
33
+ this.items[id] = item;
34
+ this.cache.delete(prev);
35
+ this.cache.set(item, id);
36
+ return id;
37
+ }
38
+ has(id) {
39
+ return Boolean(this.get(id));
40
+ }
41
+ get(id) {
42
+ return this.items[id];
43
+ }
44
+ delete(idx) {
45
+ let node = this.items[idx];
46
+ this.items.splice(idx, 1);
47
+ this.cache.delete(node);
48
+ }
49
+ }
50
+ /**
51
+ * ViewFrame serves as a container for a View's rendered template.
52
+ *
53
+ * This class containers helper methods for retreiving elements by id or
54
+ * group freeing the View class of such logic.
55
+ */
56
+ class ViewFrame {
57
+ constructor(nodes = new SetList(), widgets = new Map(), groups = new Map(), ids = new Map(), indexes = new Map(), tree) {
58
+ this.nodes = nodes;
59
+ this.widgets = widgets;
60
+ this.groups = groups;
61
+ this.ids = ids;
62
+ this.indexes = indexes;
63
+ this.tree = tree;
64
+ }
65
+ _register(id, node, widget) {
66
+ let idx = this.nodes.add(node);
67
+ this.ids.set(id, idx);
68
+ this.indexes.set(idx, id);
69
+ if (widget) {
70
+ this.widgets.set(idx, widget);
71
+ }
72
+ }
73
+ _registerGroupMember(id, node, widget) {
74
+ let group = this.groups.get(id) ?? [];
75
+ let idx = this.nodes.add(node);
76
+ group.push(idx);
77
+ if (widget)
78
+ this.widgets.set(idx, widget);
79
+ this.groups.set(id, group);
80
+ }
81
+ /**
82
+ * root sets the root element of a View's tree.
83
+ */
84
+ root(el) {
85
+ this.tree = el;
86
+ }
87
+ /**
88
+ * node constructs a DOM node to be used in the View's tree.
89
+ *
90
+ * Any id or group assignment will be honored.
91
+ */
92
+ node(tag, attrs, children) {
93
+ let elm = dom.createElement(tag, attrs, children, (attrs.wml && attrs.wml.ns) || "");
94
+ if (attrs?.wml?.id)
95
+ this._register(attrs.wml.id, elm);
96
+ if (attrs?.wml?.group)
97
+ this._registerGroupMember(attrs.wml.group, elm);
98
+ return elm;
99
+ }
100
+ /**
101
+ * widget constructs a DOM sub-tree for a Widget in the View's tree.
102
+ *
103
+ * Any id or group assignment will be honored.
104
+ */
105
+ widget(w, attrs) {
106
+ let tree = w.render();
107
+ monitor_1.DOMMonitor.getInstance().monitor(tree, w);
108
+ if (attrs?.wml?.id)
109
+ this._register(attrs.wml.id, tree, w);
110
+ if (attrs?.wml?.group)
111
+ this._registerGroupMember(attrs.wml.group, tree, w);
112
+ return tree;
113
+ }
114
+ /**
115
+ * view renders the content of another view, saving its ids and groups to
116
+ * this one.
117
+ */
118
+ view(view) {
119
+ let { root } = this;
120
+ let tree = view.render(this);
121
+ this.root = root;
122
+ return tree;
123
+ }
124
+ /**
125
+ * findById returns the entry stored for the specified wml element.
126
+ */
127
+ findById(id) {
128
+ let idx = this.ids.get(id) ?? -1;
129
+ let node = this.nodes.get(idx);
130
+ if (node == null)
131
+ return maybe_1.Maybe.nothing();
132
+ return maybe_1.Maybe.just({
133
+ node,
134
+ widget: this.widgets.get(idx),
135
+ });
136
+ }
137
+ /**
138
+ * findByGroup returns all the entries stored fro a group.
139
+ */
140
+ findByGroup(id) {
141
+ let result = [];
142
+ for (let idx of this.groups.get(id) ?? []) {
143
+ let node = this.nodes.get(idx);
144
+ let widget = this.widgets.get(idx);
145
+ if (node == null)
146
+ continue;
147
+ result.push({ node, widget });
148
+ }
149
+ return result;
150
+ }
151
+ /**
152
+ * replaceByIndex performs the heavy work of replacing a WMLElement
153
+ * with the corresponding index from another ViewFrame.
154
+ *
155
+ * The replaced element will have its DOM content redrawn if a parentNode
156
+ * is detected.
157
+ */
158
+ replaceByIndex(next, idx) {
159
+ let originalNode = this.nodes.get(idx);
160
+ let id = this.indexes.get(idx) ?? "";
161
+ if (idx == null || originalNode == null) {
162
+ console.warn(`Not replacing missing WMLElement for id "${id}"!`);
163
+ return;
164
+ }
165
+ let { parentNode } = originalNode;
166
+ let node = next.nodes.get(idx);
167
+ let widget = next.widgets.get(idx);
168
+ if (node == null) {
169
+ // Remove references since the node no longer exists.
170
+ this.nodes.delete(idx);
171
+ this.widgets.delete(idx);
172
+ this.ids.delete(id);
173
+ this.indexes.delete(idx);
174
+ if (parentNode)
175
+ parentNode.removeChild(originalNode);
176
+ return;
177
+ }
178
+ this.nodes.set(idx, node);
179
+ this.widgets.delete(idx);
180
+ if (widget)
181
+ this.widgets.set(idx, widget);
182
+ if (parentNode)
183
+ parentNode.replaceChild(node, originalNode);
184
+ }
185
+ /**
186
+ * replaceById allows WMLElement replacement by using an id.
187
+ */
188
+ replaceById(next, id) {
189
+ this.replaceByIndex(next, this.ids.get(id) ?? -1);
190
+ }
191
+ /**
192
+ * replaceByGroup allows WMLElement replaced by using a group identifier.
193
+ */
194
+ replaceByGroup(next, id) {
195
+ let group = this.groups.get(id) ?? [];
196
+ let newGroup = [];
197
+ for (let idx of group) {
198
+ this.replaceByIndex(next, idx);
199
+ if (this.nodes.has(idx))
200
+ newGroup.push(idx);
201
+ }
202
+ this.groups.set(id, newGroup);
203
+ }
204
+ }
205
+ exports.ViewFrame = ViewFrame;
206
+ //# source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