verstak 0.24.127 → 0.24.128

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.
@@ -21,13 +21,13 @@ export type El<T = any, M = any> = {
21
21
  useStyle(styleName: string, enabled?: boolean): void;
22
22
  };
23
23
  export declare enum ElKind {
24
- Section = 0,
25
- Table = 1,
26
- Note = 2,
27
- Group = 3,
28
- Part = 4,
29
- Cursor = 5,
30
- Native = 6
24
+ section = 0,
25
+ table = 1,
26
+ note = 2,
27
+ group = 3,
28
+ part = 4,
29
+ cursor = 5,
30
+ native = 6
31
31
  }
32
32
  export type ElCoords = {
33
33
  x1: number;
@@ -36,15 +36,15 @@ export type ElCoords = {
36
36
  y2: number;
37
37
  };
38
38
  export declare enum Align {
39
- Default = 16,
40
- ToBounds = 0,
41
- ToLeft = 1,
42
- ToCenterX = 2,
43
- ToRight = 3,
44
- ToTop = 4,
45
- ToCenterY = 8,
46
- ToBottom = 12,
47
- ToCenter = 10
39
+ default = 16,
40
+ toBounds = 0,
41
+ toLeft = 1,
42
+ toCenterX = 2,
43
+ toRight = 3,
44
+ toTop = 4,
45
+ toCenterY = 8,
46
+ toBottom = 12,
47
+ toCenter = 10
48
48
  }
49
49
  export type ElasticSize = {
50
50
  cells?: number;
@@ -121,10 +121,10 @@ declare class CursorPosition {
121
121
  constructor(prev: CursorPosition);
122
122
  }
123
123
  declare enum CursorFlags {
124
- None = 0,
125
- OwnCursorPosition = 1,
126
- UsesRunningColumnCount = 2,
127
- UsesRunningRowCount = 4
124
+ none = 0,
125
+ ownCursorPosition = 1,
126
+ usesRunningColumnCount = 2,
127
+ usesRunningRowCount = 4
128
128
  }
129
129
  export declare class CursorCommand {
130
130
  absolute?: string;
@@ -7,25 +7,25 @@ export class ElDriver extends BaseDriver {
7
7
  }
8
8
  export var ElKind;
9
9
  (function (ElKind) {
10
- ElKind[ElKind["Section"] = 0] = "Section";
11
- ElKind[ElKind["Table"] = 1] = "Table";
12
- ElKind[ElKind["Note"] = 2] = "Note";
13
- ElKind[ElKind["Group"] = 3] = "Group";
14
- ElKind[ElKind["Part"] = 4] = "Part";
15
- ElKind[ElKind["Cursor"] = 5] = "Cursor";
16
- ElKind[ElKind["Native"] = 6] = "Native";
10
+ ElKind[ElKind["section"] = 0] = "section";
11
+ ElKind[ElKind["table"] = 1] = "table";
12
+ ElKind[ElKind["note"] = 2] = "note";
13
+ ElKind[ElKind["group"] = 3] = "group";
14
+ ElKind[ElKind["part"] = 4] = "part";
15
+ ElKind[ElKind["cursor"] = 5] = "cursor";
16
+ ElKind[ElKind["native"] = 6] = "native";
17
17
  })(ElKind || (ElKind = {}));
18
18
  export var Align;
19
19
  (function (Align) {
20
- Align[Align["Default"] = 16] = "Default";
21
- Align[Align["ToBounds"] = 0] = "ToBounds";
22
- Align[Align["ToLeft"] = 1] = "ToLeft";
23
- Align[Align["ToCenterX"] = 2] = "ToCenterX";
24
- Align[Align["ToRight"] = 3] = "ToRight";
25
- Align[Align["ToTop"] = 4] = "ToTop";
26
- Align[Align["ToCenterY"] = 8] = "ToCenterY";
27
- Align[Align["ToBottom"] = 12] = "ToBottom";
28
- Align[Align["ToCenter"] = 10] = "ToCenter";
20
+ Align[Align["default"] = 16] = "default";
21
+ Align[Align["toBounds"] = 0] = "toBounds";
22
+ Align[Align["toLeft"] = 1] = "toLeft";
23
+ Align[Align["toCenterX"] = 2] = "toCenterX";
24
+ Align[Align["toRight"] = 3] = "toRight";
25
+ Align[Align["toTop"] = 4] = "toTop";
26
+ Align[Align["toCenterY"] = 8] = "toCenterY";
27
+ Align[Align["toBottom"] = 12] = "toBottom";
28
+ Align[Align["toCenter"] = 10] = "toCenter";
29
29
  })(Align || (Align = {}));
30
30
  export class ElImpl {
31
31
  constructor(node) {
@@ -35,7 +35,7 @@ export class ElImpl {
35
35
  this.cursorPosition = undefined;
36
36
  this.native = undefined;
37
37
  this.model = undefined;
38
- this._kind = ElKind.Part;
38
+ this._kind = ElKind.part;
39
39
  this._area = undefined;
40
40
  this._coords = UndefinedElCoords;
41
41
  this._widthGrowth = 0;
@@ -44,8 +44,8 @@ export class ElImpl {
44
44
  this._heightGrowth = 0;
45
45
  this._minHeight = "";
46
46
  this._maxHeight = "";
47
- this._contentAlignment = Align.Default;
48
- this._elementAlignment = Align.Default;
47
+ this._contentAlignment = Align.default;
48
+ this._elementAlignment = Align.default;
49
49
  this._contentWrapping = true;
50
50
  this._overlayVisible = undefined;
51
51
  this._hasStyles = false;
@@ -54,9 +54,9 @@ export class ElImpl {
54
54
  this._area = undefined;
55
55
  this._hasStyles = false;
56
56
  }
57
- get isSection() { return this.kind === ElKind.Section; }
58
- get isTable() { return this.kind === ElKind.Table; }
59
- get isAuxiliary() { return this.kind > ElKind.Note; }
57
+ get isSection() { return this.kind === ElKind.section; }
58
+ get isTable() { return this.kind === ElKind.table; }
59
+ get isAuxiliary() { return this.kind > ElKind.note; }
60
60
  get kind() { return this._kind; }
61
61
  set kind(value) {
62
62
  if (value !== this._kind || this.node.stamp >= Number.MAX_SAFE_INTEGER - 1) {
@@ -178,18 +178,18 @@ class CursorPosition {
178
178
  this.y = prev.y;
179
179
  this.runningMaxX = prev.runningMaxX;
180
180
  this.runningMaxY = prev.runningMaxY;
181
- this.flags = prev.flags & ~CursorFlags.OwnCursorPosition;
181
+ this.flags = prev.flags & ~CursorFlags.ownCursorPosition;
182
182
  }
183
183
  }
184
184
  var CursorFlags;
185
185
  (function (CursorFlags) {
186
- CursorFlags[CursorFlags["None"] = 0] = "None";
187
- CursorFlags[CursorFlags["OwnCursorPosition"] = 1] = "OwnCursorPosition";
188
- CursorFlags[CursorFlags["UsesRunningColumnCount"] = 2] = "UsesRunningColumnCount";
189
- CursorFlags[CursorFlags["UsesRunningRowCount"] = 4] = "UsesRunningRowCount";
186
+ CursorFlags[CursorFlags["none"] = 0] = "none";
187
+ CursorFlags[CursorFlags["ownCursorPosition"] = 1] = "ownCursorPosition";
188
+ CursorFlags[CursorFlags["usesRunningColumnCount"] = 2] = "usesRunningColumnCount";
189
+ CursorFlags[CursorFlags["usesRunningRowCount"] = 4] = "usesRunningRowCount";
190
190
  })(CursorFlags || (CursorFlags = {}));
191
191
  const UndefinedElCoords = Object.freeze({ x1: 0, y1: 0, x2: 0, y2: 0 });
192
- const InitialCursorPosition = Object.freeze(new CursorPosition({ x: 1, y: 1, runningMaxX: 0, runningMaxY: 0, flags: CursorFlags.None }));
192
+ const InitialCursorPosition = Object.freeze(new CursorPosition({ x: 1, y: 1, runningMaxX: 0, runningMaxY: 0, flags: CursorFlags.none }));
193
193
  function getEffectiveElCoords(isRegularElement, area, maxX, maxY, cursorPosition, newCursorPosition) {
194
194
  var _a, _b;
195
195
  let result;
@@ -199,7 +199,7 @@ function getEffectiveElCoords(isRegularElement, area, maxX, maxY, cursorPosition
199
199
  if (newCursorPosition) {
200
200
  newCursorPosition.x = isRegularElement ? result.x2 + 1 : result.x1;
201
201
  newCursorPosition.y = result.y1;
202
- newCursorPosition.flags = CursorFlags.OwnCursorPosition;
202
+ newCursorPosition.flags = CursorFlags.ownCursorPosition;
203
203
  }
204
204
  }
205
205
  else if (newCursorPosition) {
@@ -216,7 +216,7 @@ function getEffectiveElCoords(isRegularElement, area, maxX, maxY, cursorPosition
216
216
  result = { x1: 0, y1: 0, x2: 0, y2: 0 };
217
217
  if (dx === 0 && isRegularElement) {
218
218
  dx = runningX || 1;
219
- newCursorPosition.flags = CursorFlags.UsesRunningColumnCount;
219
+ newCursorPosition.flags = CursorFlags.usesRunningColumnCount;
220
220
  }
221
221
  if (dx >= 0) {
222
222
  if (isRegularElement) {
@@ -242,7 +242,7 @@ function getEffectiveElCoords(isRegularElement, area, maxX, maxY, cursorPosition
242
242
  }
243
243
  if (dy === 0 && isRegularElement) {
244
244
  dy = runningY || 1;
245
- newCursorPosition.flags |= CursorFlags.UsesRunningRowCount;
245
+ newCursorPosition.flags |= CursorFlags.usesRunningRowCount;
246
246
  }
247
247
  if (dy >= 0) {
248
248
  if (isRegularElement) {
@@ -295,7 +295,7 @@ export class CursorCommand {
295
295
  }
296
296
  export class CursorCommandDriver extends ElDriver {
297
297
  constructor() {
298
- super("cursor", false, el => el.kind = ElKind.Cursor);
298
+ super("cursor", false, el => el.kind = ElKind.cursor);
299
299
  }
300
300
  }
301
301
  export class Apply {
@@ -355,7 +355,7 @@ export class Apply {
355
355
  const hostDriver = bNode.host.driver;
356
356
  if (hostDriver.isPartitionSeparator) {
357
357
  const host = bNode.host.seat.instance;
358
- Apply.elementAlignment(element, Align.ToBounds);
358
+ Apply.elementAlignment(element, Align.toBounds);
359
359
  Apply.heightGrowth(host.element, value);
360
360
  }
361
361
  }
@@ -371,7 +371,7 @@ export class Apply {
371
371
  static contentAlignment(element, value) {
372
372
  if (element.native instanceof HTMLElement) {
373
373
  const s = element.native.style;
374
- if ((value & Align.Default) === 0) {
374
+ if ((value & Align.default) === 0) {
375
375
  const v = AlignToCss[(value >> 2) & 0b11];
376
376
  const h = AlignToCss[value & 0b11];
377
377
  const t = TextAlignCss[value & 0b11];
@@ -386,7 +386,7 @@ export class Apply {
386
386
  static elementAlignment(element, value) {
387
387
  if (element.native instanceof HTMLElement) {
388
388
  const s = element.native.style;
389
- if ((value & Align.Default) === 0) {
389
+ if ((value & Align.default) === 0) {
390
390
  const v = AlignToCss[(value >> 2) & 0b11];
391
391
  const h = AlignToCss[value & 0b11];
392
392
  s.alignSelf = v;
@@ -47,17 +47,17 @@ export function SyntheticElement(declaration, preset) {
47
47
  export class VerstakElementDriver extends HtmlElementDriver {
48
48
  update(node) {
49
49
  const element = node.element;
50
- if (element.kind === ElKind.Section)
50
+ if (element.kind === ElKind.section)
51
51
  startNewRow();
52
52
  return super.update(node);
53
53
  }
54
54
  }
55
55
  const Drivers = {
56
- section: new VerstakElementDriver(Constants.element, false, el => el.kind = ElKind.Section),
57
- table: new VerstakElementDriver(Constants.element, false, el => el.kind = ElKind.Table),
58
- note: new VerstakElementDriver(Constants.element, false, el => el.kind = ElKind.Note),
59
- group: new VerstakElementDriver(Constants.group, false, el => el.kind = ElKind.Group),
60
- partition: new VerstakElementDriver(Constants.partition, true, el => el.kind = ElKind.Part),
56
+ section: new VerstakElementDriver(Constants.element, false, el => el.kind = ElKind.section),
57
+ table: new VerstakElementDriver(Constants.element, false, el => el.kind = ElKind.table),
58
+ note: new VerstakElementDriver(Constants.element, false, el => el.kind = ElKind.note),
59
+ group: new VerstakElementDriver(Constants.group, false, el => el.kind = ElKind.group),
60
+ partition: new VerstakElementDriver(Constants.partition, true, el => el.kind = ElKind.part),
61
61
  cursor: new CursorCommandDriver(),
62
- pseudo: new ElDriver("pseudo", false, el => el.kind = ElKind.Group),
62
+ pseudo: new ElDriver("pseudo", false, el => el.kind = ElKind.group),
63
63
  };
@@ -2,7 +2,7 @@ import { RxNode } from "reactronic";
2
2
  import { ElKind } from "./El.js";
3
3
  import { HtmlElementDriver, StaticDriver, SvgElementDriver } from "./HtmlDriver.js";
4
4
  export function HtmlBody(declaration, preset) {
5
- const driver = new StaticDriver(global.document.body, "HtmlBody", false, el => el.kind = ElKind.Section);
5
+ const driver = new StaticDriver(global.document.body, "HtmlBody", false, el => el.kind = ElKind.section);
6
6
  return RxNode.acquire(driver, declaration, preset);
7
7
  }
8
8
  export function A(declaration, preset) { return RxNode.acquire(HtmlTags.a, declaration, preset); }
@@ -179,179 +179,179 @@ export function TSpan(declaration, preset) { return RxNode.acquire(SvgTags.tspan
179
179
  export function Use(declaration, preset) { return RxNode.acquire(SvgTags.use, declaration, preset); }
180
180
  export function View(declaration, preset) { return RxNode.acquire(SvgTags.view, declaration, preset); }
181
181
  const HtmlTags = {
182
- a: new HtmlElementDriver("a", false, el => el.kind = ElKind.Native),
183
- abbr: new HtmlElementDriver("abbr", false, el => el.kind = ElKind.Native),
184
- address: new HtmlElementDriver("address", false, el => el.kind = ElKind.Native),
185
- area: new HtmlElementDriver("area", false, el => el.kind = ElKind.Native),
186
- article: new HtmlElementDriver("article", false, el => el.kind = ElKind.Native),
187
- aside: new HtmlElementDriver("aside", false, el => el.kind = ElKind.Native),
188
- audio: new HtmlElementDriver("audio", false, el => el.kind = ElKind.Native),
189
- b: new HtmlElementDriver("b", false, el => el.kind = ElKind.Native),
190
- base: new HtmlElementDriver("base", false, el => el.kind = ElKind.Native),
191
- bdi: new HtmlElementDriver("bdi", false, el => el.kind = ElKind.Native),
192
- bdo: new HtmlElementDriver("bdo", false, el => el.kind = ElKind.Native),
193
- big: new HtmlElementDriver("big", false, el => el.kind = ElKind.Native),
194
- blockquote: new HtmlElementDriver("blockquote", false, el => el.kind = ElKind.Native),
195
- body: new HtmlElementDriver("body", false, el => el.kind = ElKind.Native),
196
- br: new HtmlElementDriver("br", false, el => el.kind = ElKind.Native),
197
- button: new HtmlElementDriver("button", false, el => el.kind = ElKind.Native),
198
- canvas: new HtmlElementDriver("canvas", false, el => el.kind = ElKind.Native),
199
- caption: new HtmlElementDriver("caption", false, el => el.kind = ElKind.Native),
200
- cite: new HtmlElementDriver("cite", false, el => el.kind = ElKind.Native),
201
- code: new HtmlElementDriver("code", false, el => el.kind = ElKind.Native),
202
- col: new HtmlElementDriver("col", false, el => el.kind = ElKind.Native),
203
- colgroup: new HtmlElementDriver("colgroup", false, el => el.kind = ElKind.Native),
204
- data: new HtmlElementDriver("data", false, el => el.kind = ElKind.Native),
205
- datalist: new HtmlElementDriver("datalist", false, el => el.kind = ElKind.Native),
206
- dd: new HtmlElementDriver("dd", false, el => el.kind = ElKind.Native),
207
- del: new HtmlElementDriver("del", false, el => el.kind = ElKind.Native),
208
- details: new HtmlElementDriver("details", false, el => el.kind = ElKind.Native),
209
- dfn: new HtmlElementDriver("dfn", false, el => el.kind = ElKind.Native),
210
- div: new HtmlElementDriver("div", false, el => el.kind = ElKind.Native),
211
- dl: new HtmlElementDriver("dl", false, el => el.kind = ElKind.Native),
212
- dt: new HtmlElementDriver("dt", false, el => el.kind = ElKind.Native),
213
- em: new HtmlElementDriver("em", false, el => el.kind = ElKind.Native),
214
- embed: new HtmlElementDriver("embed", false, el => el.kind = ElKind.Native),
215
- fieldset: new HtmlElementDriver("fieldset", false, el => el.kind = ElKind.Native),
216
- figcaption: new HtmlElementDriver("figcaption", false, el => el.kind = ElKind.Native),
217
- figure: new HtmlElementDriver("figure", false, el => el.kind = ElKind.Native),
218
- footer: new HtmlElementDriver("footer", false, el => el.kind = ElKind.Native),
219
- form: new HtmlElementDriver("form", false, el => el.kind = ElKind.Native),
220
- h1: new HtmlElementDriver("h1", false, el => el.kind = ElKind.Native),
221
- h2: new HtmlElementDriver("h2", false, el => el.kind = ElKind.Native),
222
- h3: new HtmlElementDriver("h3", false, el => el.kind = ElKind.Native),
223
- h4: new HtmlElementDriver("h4", false, el => el.kind = ElKind.Native),
224
- h5: new HtmlElementDriver("h5", false, el => el.kind = ElKind.Native),
225
- h6: new HtmlElementDriver("h6", false, el => el.kind = ElKind.Native),
226
- head: new HtmlElementDriver("head", false, el => el.kind = ElKind.Native),
227
- header: new HtmlElementDriver("header", false, el => el.kind = ElKind.Native),
228
- hgroup: new HtmlElementDriver("hgroup", false, el => el.kind = ElKind.Native),
229
- hr: new HtmlElementDriver("hr", false, el => el.kind = ElKind.Native),
230
- html: new HtmlElementDriver("html", false, el => el.kind = ElKind.Native),
231
- i: new HtmlElementDriver("i", false, el => el.kind = ElKind.Native),
232
- iframe: new HtmlElementDriver("iframe", false, el => el.kind = ElKind.Native),
233
- img: new HtmlElementDriver("img", false, el => el.kind = ElKind.Native),
234
- input: new HtmlElementDriver("input", false, el => el.kind = ElKind.Native),
235
- ins: new HtmlElementDriver("ins", false, el => el.kind = ElKind.Native),
236
- kbd: new HtmlElementDriver("kbd", false, el => el.kind = ElKind.Native),
237
- keygen: new HtmlElementDriver("keygen", false, el => el.kind = ElKind.Native),
238
- label: new HtmlElementDriver("label", false, el => el.kind = ElKind.Native),
239
- legend: new HtmlElementDriver("legend", false, el => el.kind = ElKind.Native),
240
- li: new HtmlElementDriver("li", false, el => el.kind = ElKind.Native),
241
- link: new HtmlElementDriver("link", false, el => el.kind = ElKind.Native),
242
- main: new HtmlElementDriver("main", false, el => el.kind = ElKind.Native),
243
- map: new HtmlElementDriver("map", false, el => el.kind = ElKind.Native),
244
- mark: new HtmlElementDriver("mark", false, el => el.kind = ElKind.Native),
245
- menu: new HtmlElementDriver("menu", false, el => el.kind = ElKind.Native),
246
- menuitem: new HtmlElementDriver("menuitem", false, el => el.kind = ElKind.Native),
247
- meta: new HtmlElementDriver("meta", false, el => el.kind = ElKind.Native),
248
- meter: new HtmlElementDriver("meter", false, el => el.kind = ElKind.Native),
249
- nav: new HtmlElementDriver("nav", false, el => el.kind = ElKind.Native),
250
- noindex: new HtmlElementDriver("noindex", false, el => el.kind = ElKind.Native),
251
- noscript: new HtmlElementDriver("noscript", false, el => el.kind = ElKind.Native),
252
- object: new HtmlElementDriver("object", false, el => el.kind = ElKind.Native),
253
- ol: new HtmlElementDriver("ol", false, el => el.kind = ElKind.Native),
254
- optgroup: new HtmlElementDriver("optgroup", false, el => el.kind = ElKind.Native),
255
- option: new HtmlElementDriver("option", false, el => el.kind = ElKind.Native),
256
- output: new HtmlElementDriver("output", false, el => el.kind = ElKind.Native),
257
- p: new HtmlElementDriver("p", false, el => el.kind = ElKind.Native),
258
- param: new HtmlElementDriver("param", false, el => el.kind = ElKind.Native),
259
- picture: new HtmlElementDriver("picture", false, el => el.kind = ElKind.Native),
260
- pre: new HtmlElementDriver("pre", false, el => el.kind = ElKind.Native),
261
- progress: new HtmlElementDriver("progress", false, el => el.kind = ElKind.Native),
262
- q: new HtmlElementDriver("q", false, el => el.kind = ElKind.Native),
263
- rp: new HtmlElementDriver("rp", false, el => el.kind = ElKind.Native),
264
- rt: new HtmlElementDriver("rt", false, el => el.kind = ElKind.Native),
265
- ruby: new HtmlElementDriver("ruby", false, el => el.kind = ElKind.Native),
266
- s: new HtmlElementDriver("s", false, el => el.kind = ElKind.Native),
267
- samp: new HtmlElementDriver("samp", false, el => el.kind = ElKind.Native),
268
- script: new HtmlElementDriver("script", false, el => el.kind = ElKind.Native),
269
- section: new HtmlElementDriver("section", false, el => el.kind = ElKind.Native),
270
- select: new HtmlElementDriver("select", false, el => el.kind = ElKind.Native),
271
- small: new HtmlElementDriver("small", false, el => el.kind = ElKind.Native),
272
- source: new HtmlElementDriver("source", false, el => el.kind = ElKind.Native),
273
- span: new HtmlElementDriver("span", false, el => el.kind = ElKind.Native),
274
- strong: new HtmlElementDriver("strong", false, el => el.kind = ElKind.Native),
275
- style: new HtmlElementDriver("style", false, el => el.kind = ElKind.Native),
276
- sub: new HtmlElementDriver("sub", false, el => el.kind = ElKind.Native),
277
- summary: new HtmlElementDriver("summary", false, el => el.kind = ElKind.Native),
278
- sup: new HtmlElementDriver("sup", false, el => el.kind = ElKind.Native),
279
- table: new HtmlElementDriver("table", false, el => el.kind = ElKind.Native),
280
- template: new HtmlElementDriver("template", false, el => el.kind = ElKind.Native),
281
- tbody: new HtmlElementDriver("tbody", false, el => el.kind = ElKind.Native),
282
- td: new HtmlElementDriver("td", false, el => el.kind = ElKind.Native),
283
- textarea: new HtmlElementDriver("textarea", false, el => el.kind = ElKind.Native),
284
- tfoot: new HtmlElementDriver("tfoot", false, el => el.kind = ElKind.Native),
285
- th: new HtmlElementDriver("th", false, el => el.kind = ElKind.Native),
286
- thead: new HtmlElementDriver("thead", false, el => el.kind = ElKind.Native),
287
- time: new HtmlElementDriver("time", false, el => el.kind = ElKind.Native),
288
- title: new HtmlElementDriver("title", false, el => el.kind = ElKind.Native),
289
- tr: new HtmlElementDriver("tr", false, el => el.kind = ElKind.Native),
290
- track: new HtmlElementDriver("track", false, el => el.kind = ElKind.Native),
291
- u: new HtmlElementDriver("u", false, el => el.kind = ElKind.Native),
292
- ul: new HtmlElementDriver("ul", false, el => el.kind = ElKind.Native),
293
- var: new HtmlElementDriver("var", false, el => el.kind = ElKind.Native),
294
- video: new HtmlElementDriver("video", false, el => el.kind = ElKind.Native),
295
- wbr: new HtmlElementDriver("wbr", false, el => el.kind = ElKind.Native),
182
+ a: new HtmlElementDriver("a", false, el => el.kind = ElKind.native),
183
+ abbr: new HtmlElementDriver("abbr", false, el => el.kind = ElKind.native),
184
+ address: new HtmlElementDriver("address", false, el => el.kind = ElKind.native),
185
+ area: new HtmlElementDriver("area", false, el => el.kind = ElKind.native),
186
+ article: new HtmlElementDriver("article", false, el => el.kind = ElKind.native),
187
+ aside: new HtmlElementDriver("aside", false, el => el.kind = ElKind.native),
188
+ audio: new HtmlElementDriver("audio", false, el => el.kind = ElKind.native),
189
+ b: new HtmlElementDriver("b", false, el => el.kind = ElKind.native),
190
+ base: new HtmlElementDriver("base", false, el => el.kind = ElKind.native),
191
+ bdi: new HtmlElementDriver("bdi", false, el => el.kind = ElKind.native),
192
+ bdo: new HtmlElementDriver("bdo", false, el => el.kind = ElKind.native),
193
+ big: new HtmlElementDriver("big", false, el => el.kind = ElKind.native),
194
+ blockquote: new HtmlElementDriver("blockquote", false, el => el.kind = ElKind.native),
195
+ body: new HtmlElementDriver("body", false, el => el.kind = ElKind.native),
196
+ br: new HtmlElementDriver("br", false, el => el.kind = ElKind.native),
197
+ button: new HtmlElementDriver("button", false, el => el.kind = ElKind.native),
198
+ canvas: new HtmlElementDriver("canvas", false, el => el.kind = ElKind.native),
199
+ caption: new HtmlElementDriver("caption", false, el => el.kind = ElKind.native),
200
+ cite: new HtmlElementDriver("cite", false, el => el.kind = ElKind.native),
201
+ code: new HtmlElementDriver("code", false, el => el.kind = ElKind.native),
202
+ col: new HtmlElementDriver("col", false, el => el.kind = ElKind.native),
203
+ colgroup: new HtmlElementDriver("colgroup", false, el => el.kind = ElKind.native),
204
+ data: new HtmlElementDriver("data", false, el => el.kind = ElKind.native),
205
+ datalist: new HtmlElementDriver("datalist", false, el => el.kind = ElKind.native),
206
+ dd: new HtmlElementDriver("dd", false, el => el.kind = ElKind.native),
207
+ del: new HtmlElementDriver("del", false, el => el.kind = ElKind.native),
208
+ details: new HtmlElementDriver("details", false, el => el.kind = ElKind.native),
209
+ dfn: new HtmlElementDriver("dfn", false, el => el.kind = ElKind.native),
210
+ div: new HtmlElementDriver("div", false, el => el.kind = ElKind.native),
211
+ dl: new HtmlElementDriver("dl", false, el => el.kind = ElKind.native),
212
+ dt: new HtmlElementDriver("dt", false, el => el.kind = ElKind.native),
213
+ em: new HtmlElementDriver("em", false, el => el.kind = ElKind.native),
214
+ embed: new HtmlElementDriver("embed", false, el => el.kind = ElKind.native),
215
+ fieldset: new HtmlElementDriver("fieldset", false, el => el.kind = ElKind.native),
216
+ figcaption: new HtmlElementDriver("figcaption", false, el => el.kind = ElKind.native),
217
+ figure: new HtmlElementDriver("figure", false, el => el.kind = ElKind.native),
218
+ footer: new HtmlElementDriver("footer", false, el => el.kind = ElKind.native),
219
+ form: new HtmlElementDriver("form", false, el => el.kind = ElKind.native),
220
+ h1: new HtmlElementDriver("h1", false, el => el.kind = ElKind.native),
221
+ h2: new HtmlElementDriver("h2", false, el => el.kind = ElKind.native),
222
+ h3: new HtmlElementDriver("h3", false, el => el.kind = ElKind.native),
223
+ h4: new HtmlElementDriver("h4", false, el => el.kind = ElKind.native),
224
+ h5: new HtmlElementDriver("h5", false, el => el.kind = ElKind.native),
225
+ h6: new HtmlElementDriver("h6", false, el => el.kind = ElKind.native),
226
+ head: new HtmlElementDriver("head", false, el => el.kind = ElKind.native),
227
+ header: new HtmlElementDriver("header", false, el => el.kind = ElKind.native),
228
+ hgroup: new HtmlElementDriver("hgroup", false, el => el.kind = ElKind.native),
229
+ hr: new HtmlElementDriver("hr", false, el => el.kind = ElKind.native),
230
+ html: new HtmlElementDriver("html", false, el => el.kind = ElKind.native),
231
+ i: new HtmlElementDriver("i", false, el => el.kind = ElKind.native),
232
+ iframe: new HtmlElementDriver("iframe", false, el => el.kind = ElKind.native),
233
+ img: new HtmlElementDriver("img", false, el => el.kind = ElKind.native),
234
+ input: new HtmlElementDriver("input", false, el => el.kind = ElKind.native),
235
+ ins: new HtmlElementDriver("ins", false, el => el.kind = ElKind.native),
236
+ kbd: new HtmlElementDriver("kbd", false, el => el.kind = ElKind.native),
237
+ keygen: new HtmlElementDriver("keygen", false, el => el.kind = ElKind.native),
238
+ label: new HtmlElementDriver("label", false, el => el.kind = ElKind.native),
239
+ legend: new HtmlElementDriver("legend", false, el => el.kind = ElKind.native),
240
+ li: new HtmlElementDriver("li", false, el => el.kind = ElKind.native),
241
+ link: new HtmlElementDriver("link", false, el => el.kind = ElKind.native),
242
+ main: new HtmlElementDriver("main", false, el => el.kind = ElKind.native),
243
+ map: new HtmlElementDriver("map", false, el => el.kind = ElKind.native),
244
+ mark: new HtmlElementDriver("mark", false, el => el.kind = ElKind.native),
245
+ menu: new HtmlElementDriver("menu", false, el => el.kind = ElKind.native),
246
+ menuitem: new HtmlElementDriver("menuitem", false, el => el.kind = ElKind.native),
247
+ meta: new HtmlElementDriver("meta", false, el => el.kind = ElKind.native),
248
+ meter: new HtmlElementDriver("meter", false, el => el.kind = ElKind.native),
249
+ nav: new HtmlElementDriver("nav", false, el => el.kind = ElKind.native),
250
+ noindex: new HtmlElementDriver("noindex", false, el => el.kind = ElKind.native),
251
+ noscript: new HtmlElementDriver("noscript", false, el => el.kind = ElKind.native),
252
+ object: new HtmlElementDriver("object", false, el => el.kind = ElKind.native),
253
+ ol: new HtmlElementDriver("ol", false, el => el.kind = ElKind.native),
254
+ optgroup: new HtmlElementDriver("optgroup", false, el => el.kind = ElKind.native),
255
+ option: new HtmlElementDriver("option", false, el => el.kind = ElKind.native),
256
+ output: new HtmlElementDriver("output", false, el => el.kind = ElKind.native),
257
+ p: new HtmlElementDriver("p", false, el => el.kind = ElKind.native),
258
+ param: new HtmlElementDriver("param", false, el => el.kind = ElKind.native),
259
+ picture: new HtmlElementDriver("picture", false, el => el.kind = ElKind.native),
260
+ pre: new HtmlElementDriver("pre", false, el => el.kind = ElKind.native),
261
+ progress: new HtmlElementDriver("progress", false, el => el.kind = ElKind.native),
262
+ q: new HtmlElementDriver("q", false, el => el.kind = ElKind.native),
263
+ rp: new HtmlElementDriver("rp", false, el => el.kind = ElKind.native),
264
+ rt: new HtmlElementDriver("rt", false, el => el.kind = ElKind.native),
265
+ ruby: new HtmlElementDriver("ruby", false, el => el.kind = ElKind.native),
266
+ s: new HtmlElementDriver("s", false, el => el.kind = ElKind.native),
267
+ samp: new HtmlElementDriver("samp", false, el => el.kind = ElKind.native),
268
+ script: new HtmlElementDriver("script", false, el => el.kind = ElKind.native),
269
+ section: new HtmlElementDriver("section", false, el => el.kind = ElKind.native),
270
+ select: new HtmlElementDriver("select", false, el => el.kind = ElKind.native),
271
+ small: new HtmlElementDriver("small", false, el => el.kind = ElKind.native),
272
+ source: new HtmlElementDriver("source", false, el => el.kind = ElKind.native),
273
+ span: new HtmlElementDriver("span", false, el => el.kind = ElKind.native),
274
+ strong: new HtmlElementDriver("strong", false, el => el.kind = ElKind.native),
275
+ style: new HtmlElementDriver("style", false, el => el.kind = ElKind.native),
276
+ sub: new HtmlElementDriver("sub", false, el => el.kind = ElKind.native),
277
+ summary: new HtmlElementDriver("summary", false, el => el.kind = ElKind.native),
278
+ sup: new HtmlElementDriver("sup", false, el => el.kind = ElKind.native),
279
+ table: new HtmlElementDriver("table", false, el => el.kind = ElKind.native),
280
+ template: new HtmlElementDriver("template", false, el => el.kind = ElKind.native),
281
+ tbody: new HtmlElementDriver("tbody", false, el => el.kind = ElKind.native),
282
+ td: new HtmlElementDriver("td", false, el => el.kind = ElKind.native),
283
+ textarea: new HtmlElementDriver("textarea", false, el => el.kind = ElKind.native),
284
+ tfoot: new HtmlElementDriver("tfoot", false, el => el.kind = ElKind.native),
285
+ th: new HtmlElementDriver("th", false, el => el.kind = ElKind.native),
286
+ thead: new HtmlElementDriver("thead", false, el => el.kind = ElKind.native),
287
+ time: new HtmlElementDriver("time", false, el => el.kind = ElKind.native),
288
+ title: new HtmlElementDriver("title", false, el => el.kind = ElKind.native),
289
+ tr: new HtmlElementDriver("tr", false, el => el.kind = ElKind.native),
290
+ track: new HtmlElementDriver("track", false, el => el.kind = ElKind.native),
291
+ u: new HtmlElementDriver("u", false, el => el.kind = ElKind.native),
292
+ ul: new HtmlElementDriver("ul", false, el => el.kind = ElKind.native),
293
+ var: new HtmlElementDriver("var", false, el => el.kind = ElKind.native),
294
+ video: new HtmlElementDriver("video", false, el => el.kind = ElKind.native),
295
+ wbr: new HtmlElementDriver("wbr", false, el => el.kind = ElKind.native),
296
296
  };
297
297
  const SvgTags = {
298
- svg: new SvgElementDriver("svg", false, el => el.kind = ElKind.Native),
299
- a: new SvgElementDriver("a", false, el => el.kind = ElKind.Native),
300
- animate: new SvgElementDriver("animate", false, el => el.kind = ElKind.Native),
301
- animateMotion: new SvgElementDriver("animateMotion", false, el => el.kind = ElKind.Native),
302
- animateTransform: new SvgElementDriver("animateTransform", false, el => el.kind = ElKind.Native),
303
- circle: new SvgElementDriver("circle", false, el => el.kind = ElKind.Native),
304
- clipPath: new SvgElementDriver("clipPath", false, el => el.kind = ElKind.Native),
305
- defs: new SvgElementDriver("defs", false, el => el.kind = ElKind.Native),
306
- desc: new SvgElementDriver("desc", false, el => el.kind = ElKind.Native),
307
- ellipse: new SvgElementDriver("ellipse", false, el => el.kind = ElKind.Native),
308
- feBlend: new SvgElementDriver("feBlend", false, el => el.kind = ElKind.Native),
309
- feColorMatrix: new SvgElementDriver("feColorMatrix", false, el => el.kind = ElKind.Native),
310
- feComponentTransfer: new SvgElementDriver("feComponentTransfer", false, el => el.kind = ElKind.Native),
311
- feComposite: new SvgElementDriver("feComposite", false, el => el.kind = ElKind.Native),
312
- feConvolveMatrix: new SvgElementDriver("feConvolveMatrix", false, el => el.kind = ElKind.Native),
313
- feDiffuseLighting: new SvgElementDriver("feDiffuseLighting", false, el => el.kind = ElKind.Native),
314
- feDisplacementMap: new SvgElementDriver("feDisplacementMap", false, el => el.kind = ElKind.Native),
315
- feDistantLight: new SvgElementDriver("feDistantLight", false, el => el.kind = ElKind.Native),
316
- feDropShadow: new SvgElementDriver("feDropShadow", false, el => el.kind = ElKind.Native),
317
- feFlood: new SvgElementDriver("feFlood", false, el => el.kind = ElKind.Native),
318
- feFuncA: new SvgElementDriver("feFuncA", false, el => el.kind = ElKind.Native),
319
- feFuncB: new SvgElementDriver("feFuncB", false, el => el.kind = ElKind.Native),
320
- feFuncG: new SvgElementDriver("feFuncG", false, el => el.kind = ElKind.Native),
321
- feFuncR: new SvgElementDriver("feFuncR", false, el => el.kind = ElKind.Native),
322
- feGaussianBlur: new SvgElementDriver("feGaussianBlur", false, el => el.kind = ElKind.Native),
323
- feImage: new SvgElementDriver("feImage", false, el => el.kind = ElKind.Native),
324
- feMerge: new SvgElementDriver("feMerge", false, el => el.kind = ElKind.Native),
325
- feMergeNode: new SvgElementDriver("feMergeNode", false, el => el.kind = ElKind.Native),
326
- feMorphology: new SvgElementDriver("feMorphology", false, el => el.kind = ElKind.Native),
327
- feOffset: new SvgElementDriver("feOffset", false, el => el.kind = ElKind.Native),
328
- fePointLight: new SvgElementDriver("fePointLight", false, el => el.kind = ElKind.Native),
329
- feSpecularLighting: new SvgElementDriver("feSpecularLighting", false, el => el.kind = ElKind.Native),
330
- feSpotLight: new SvgElementDriver("feSpotLight", false, el => el.kind = ElKind.Native),
331
- feTile: new SvgElementDriver("feTile", false, el => el.kind = ElKind.Native),
332
- feTurbulence: new SvgElementDriver("feTurbulence", false, el => el.kind = ElKind.Native),
333
- filter: new SvgElementDriver("filter", false, el => el.kind = ElKind.Native),
334
- foreignObject: new SvgElementDriver("foreignObject", false, el => el.kind = ElKind.Native),
335
- g: new SvgElementDriver("g", false, el => el.kind = ElKind.Native),
336
- image: new SvgElementDriver("image", false, el => el.kind = ElKind.Native),
337
- line: new SvgElementDriver("line", false, el => el.kind = ElKind.Native),
338
- linearGradient: new SvgElementDriver("linearGradient", false, el => el.kind = ElKind.Native),
339
- marker: new SvgElementDriver("marker", false, el => el.kind = ElKind.Native),
340
- mask: new SvgElementDriver("mask", false, el => el.kind = ElKind.Native),
341
- metadata: new SvgElementDriver("metadata", false, el => el.kind = ElKind.Native),
342
- mpath: new SvgElementDriver("mpath", false, el => el.kind = ElKind.Native),
343
- path: new SvgElementDriver("path", false, el => el.kind = ElKind.Native),
344
- pattern: new SvgElementDriver("pattern", false, el => el.kind = ElKind.Native),
345
- polygon: new SvgElementDriver("polygon", false, el => el.kind = ElKind.Native),
346
- polyline: new SvgElementDriver("polyline", false, el => el.kind = ElKind.Native),
347
- radialGradient: new SvgElementDriver("radialGradient", false, el => el.kind = ElKind.Native),
348
- rect: new SvgElementDriver("rect", false, el => el.kind = ElKind.Native),
349
- stop: new SvgElementDriver("stop", false, el => el.kind = ElKind.Native),
350
- switch: new SvgElementDriver("switch", false, el => el.kind = ElKind.Native),
351
- symbol: new SvgElementDriver("symbol", false, el => el.kind = ElKind.Native),
352
- text: new SvgElementDriver("text", false, el => el.kind = ElKind.Native),
353
- textPath: new SvgElementDriver("textPath", false, el => el.kind = ElKind.Native),
354
- tspan: new SvgElementDriver("tspan", false, el => el.kind = ElKind.Native),
355
- use: new SvgElementDriver("use", false, el => el.kind = ElKind.Native),
356
- view: new SvgElementDriver("view", false, el => el.kind = ElKind.Native),
298
+ svg: new SvgElementDriver("svg", false, el => el.kind = ElKind.native),
299
+ a: new SvgElementDriver("a", false, el => el.kind = ElKind.native),
300
+ animate: new SvgElementDriver("animate", false, el => el.kind = ElKind.native),
301
+ animateMotion: new SvgElementDriver("animateMotion", false, el => el.kind = ElKind.native),
302
+ animateTransform: new SvgElementDriver("animateTransform", false, el => el.kind = ElKind.native),
303
+ circle: new SvgElementDriver("circle", false, el => el.kind = ElKind.native),
304
+ clipPath: new SvgElementDriver("clipPath", false, el => el.kind = ElKind.native),
305
+ defs: new SvgElementDriver("defs", false, el => el.kind = ElKind.native),
306
+ desc: new SvgElementDriver("desc", false, el => el.kind = ElKind.native),
307
+ ellipse: new SvgElementDriver("ellipse", false, el => el.kind = ElKind.native),
308
+ feBlend: new SvgElementDriver("feBlend", false, el => el.kind = ElKind.native),
309
+ feColorMatrix: new SvgElementDriver("feColorMatrix", false, el => el.kind = ElKind.native),
310
+ feComponentTransfer: new SvgElementDriver("feComponentTransfer", false, el => el.kind = ElKind.native),
311
+ feComposite: new SvgElementDriver("feComposite", false, el => el.kind = ElKind.native),
312
+ feConvolveMatrix: new SvgElementDriver("feConvolveMatrix", false, el => el.kind = ElKind.native),
313
+ feDiffuseLighting: new SvgElementDriver("feDiffuseLighting", false, el => el.kind = ElKind.native),
314
+ feDisplacementMap: new SvgElementDriver("feDisplacementMap", false, el => el.kind = ElKind.native),
315
+ feDistantLight: new SvgElementDriver("feDistantLight", false, el => el.kind = ElKind.native),
316
+ feDropShadow: new SvgElementDriver("feDropShadow", false, el => el.kind = ElKind.native),
317
+ feFlood: new SvgElementDriver("feFlood", false, el => el.kind = ElKind.native),
318
+ feFuncA: new SvgElementDriver("feFuncA", false, el => el.kind = ElKind.native),
319
+ feFuncB: new SvgElementDriver("feFuncB", false, el => el.kind = ElKind.native),
320
+ feFuncG: new SvgElementDriver("feFuncG", false, el => el.kind = ElKind.native),
321
+ feFuncR: new SvgElementDriver("feFuncR", false, el => el.kind = ElKind.native),
322
+ feGaussianBlur: new SvgElementDriver("feGaussianBlur", false, el => el.kind = ElKind.native),
323
+ feImage: new SvgElementDriver("feImage", false, el => el.kind = ElKind.native),
324
+ feMerge: new SvgElementDriver("feMerge", false, el => el.kind = ElKind.native),
325
+ feMergeNode: new SvgElementDriver("feMergeNode", false, el => el.kind = ElKind.native),
326
+ feMorphology: new SvgElementDriver("feMorphology", false, el => el.kind = ElKind.native),
327
+ feOffset: new SvgElementDriver("feOffset", false, el => el.kind = ElKind.native),
328
+ fePointLight: new SvgElementDriver("fePointLight", false, el => el.kind = ElKind.native),
329
+ feSpecularLighting: new SvgElementDriver("feSpecularLighting", false, el => el.kind = ElKind.native),
330
+ feSpotLight: new SvgElementDriver("feSpotLight", false, el => el.kind = ElKind.native),
331
+ feTile: new SvgElementDriver("feTile", false, el => el.kind = ElKind.native),
332
+ feTurbulence: new SvgElementDriver("feTurbulence", false, el => el.kind = ElKind.native),
333
+ filter: new SvgElementDriver("filter", false, el => el.kind = ElKind.native),
334
+ foreignObject: new SvgElementDriver("foreignObject", false, el => el.kind = ElKind.native),
335
+ g: new SvgElementDriver("g", false, el => el.kind = ElKind.native),
336
+ image: new SvgElementDriver("image", false, el => el.kind = ElKind.native),
337
+ line: new SvgElementDriver("line", false, el => el.kind = ElKind.native),
338
+ linearGradient: new SvgElementDriver("linearGradient", false, el => el.kind = ElKind.native),
339
+ marker: new SvgElementDriver("marker", false, el => el.kind = ElKind.native),
340
+ mask: new SvgElementDriver("mask", false, el => el.kind = ElKind.native),
341
+ metadata: new SvgElementDriver("metadata", false, el => el.kind = ElKind.native),
342
+ mpath: new SvgElementDriver("mpath", false, el => el.kind = ElKind.native),
343
+ path: new SvgElementDriver("path", false, el => el.kind = ElKind.native),
344
+ pattern: new SvgElementDriver("pattern", false, el => el.kind = ElKind.native),
345
+ polygon: new SvgElementDriver("polygon", false, el => el.kind = ElKind.native),
346
+ polyline: new SvgElementDriver("polyline", false, el => el.kind = ElKind.native),
347
+ radialGradient: new SvgElementDriver("radialGradient", false, el => el.kind = ElKind.native),
348
+ rect: new SvgElementDriver("rect", false, el => el.kind = ElKind.native),
349
+ stop: new SvgElementDriver("stop", false, el => el.kind = ElKind.native),
350
+ switch: new SvgElementDriver("switch", false, el => el.kind = ElKind.native),
351
+ symbol: new SvgElementDriver("symbol", false, el => el.kind = ElKind.native),
352
+ text: new SvgElementDriver("text", false, el => el.kind = ElKind.native),
353
+ textPath: new SvgElementDriver("textPath", false, el => el.kind = ElKind.native),
354
+ tspan: new SvgElementDriver("tspan", false, el => el.kind = ElKind.native),
355
+ use: new SvgElementDriver("use", false, el => el.kind = ElKind.native),
356
+ view: new SvgElementDriver("view", false, el => el.kind = ElKind.native),
357
357
  };
@@ -3,10 +3,10 @@ import { HtmlElementSensor } from "./HtmlElementSensor.js";
3
3
  import { KeyboardModifiers } from "./KeyboardSensor.js";
4
4
  import { WindowSensor } from "./WindowSensor.js";
5
5
  export declare enum PointerButton {
6
- None = 0,
7
- Left = 1,
8
- Right = 2,
9
- Middle = 4
6
+ none = 0,
7
+ left = 1,
8
+ right = 2,
9
+ middle = 4
10
10
  }
11
11
  export declare class BasePointerSensor extends HtmlElementSensor {
12
12
  positionX: number;
@@ -2,29 +2,29 @@ import { HtmlElementSensor } from "./HtmlElementSensor.js";
2
2
  import { KeyboardModifiers } from "./KeyboardSensor.js";
3
3
  export var PointerButton;
4
4
  (function (PointerButton) {
5
- PointerButton[PointerButton["None"] = 0] = "None";
6
- PointerButton[PointerButton["Left"] = 1] = "Left";
7
- PointerButton[PointerButton["Right"] = 2] = "Right";
8
- PointerButton[PointerButton["Middle"] = 4] = "Middle";
5
+ PointerButton[PointerButton["none"] = 0] = "none";
6
+ PointerButton[PointerButton["left"] = 1] = "left";
7
+ PointerButton[PointerButton["right"] = 2] = "right";
8
+ PointerButton[PointerButton["middle"] = 4] = "middle";
9
9
  })(PointerButton || (PointerButton = {}));
10
10
  export class BasePointerSensor extends HtmlElementSensor {
11
11
  constructor(element, focusSensor, windowSensor) {
12
12
  super(element, focusSensor, windowSensor);
13
13
  this.positionX = Infinity;
14
14
  this.positionY = Infinity;
15
- this.modifiers = KeyboardModifiers.None;
15
+ this.modifiers = KeyboardModifiers.none;
16
16
  }
17
17
  }
18
18
  export function extractPointerButton(e) {
19
19
  switch (e.button) {
20
20
  case 0:
21
- return PointerButton.Left;
21
+ return PointerButton.left;
22
22
  case 1:
23
- return PointerButton.Middle;
23
+ return PointerButton.middle;
24
24
  case 2:
25
- return PointerButton.Right;
25
+ return PointerButton.right;
26
26
  default:
27
- return PointerButton.None;
27
+ return PointerButton.none;
28
28
  }
29
29
  }
30
30
  export function isPointerButtonDown(button, buttonsMask) {
@@ -2,10 +2,10 @@ import { PointerButton, BasePointerSensor } from "./BasePointerSensor.js";
2
2
  import { FocusSensor } from "./FocusSensor.js";
3
3
  import { WindowSensor } from "./WindowSensor.js";
4
4
  export declare enum ButtonState {
5
- Pressed = 0,
6
- Selecting = 1,
7
- Selected = 2,
8
- Released = 3
5
+ pressed = 0,
6
+ selecting = 1,
7
+ selected = 2,
8
+ released = 3
9
9
  }
10
10
  export declare class ButtonSensor extends BasePointerSensor {
11
11
  state: ButtonState;
@@ -13,16 +13,16 @@ import { findTargetElementData, SymDataForSensor } from "./DataForSensor.js";
13
13
  import { extractModifierKeys, KeyboardModifiers } from "./KeyboardSensor.js";
14
14
  export var ButtonState;
15
15
  (function (ButtonState) {
16
- ButtonState[ButtonState["Pressed"] = 0] = "Pressed";
17
- ButtonState[ButtonState["Selecting"] = 1] = "Selecting";
18
- ButtonState[ButtonState["Selected"] = 2] = "Selected";
19
- ButtonState[ButtonState["Released"] = 3] = "Released";
16
+ ButtonState[ButtonState["pressed"] = 0] = "pressed";
17
+ ButtonState[ButtonState["selecting"] = 1] = "selecting";
18
+ ButtonState[ButtonState["selected"] = 2] = "selected";
19
+ ButtonState[ButtonState["released"] = 3] = "released";
20
20
  })(ButtonState || (ButtonState = {}));
21
21
  export class ButtonSensor extends BasePointerSensor {
22
22
  constructor(element, focusSensor, windowSensor) {
23
23
  super(element, focusSensor, windowSensor);
24
- this.state = ButtonState.Released;
25
- this.pointerButton = PointerButton.None;
24
+ this.state = ButtonState.released;
25
+ this.pointerButton = PointerButton.none;
26
26
  this.originData = undefined;
27
27
  this.selectedData = undefined;
28
28
  this.selectedX = Infinity;
@@ -47,17 +47,17 @@ export class ButtonSensor extends BasePointerSensor {
47
47
  }
48
48
  }
49
49
  onPointerDown(e) {
50
- if (this.state === ButtonState.Released && (this.pointerButton === PointerButton.None))
50
+ if (this.state === ButtonState.released && (this.pointerButton === PointerButton.none))
51
51
  this.press(e);
52
52
  this.setPreventDefaultAndStopPropagation(e);
53
53
  }
54
54
  onPointerMove(e) {
55
55
  const state = this.state;
56
56
  if (isPointerButtonDown(this.pointerButton, e.buttons)) {
57
- if (state === ButtonState.Pressed || state === ButtonState.Selecting)
57
+ if (state === ButtonState.pressed || state === ButtonState.selecting)
58
58
  this.selecting(e);
59
59
  }
60
- else if (state !== ButtonState.Released) {
60
+ else if (state !== ButtonState.released) {
61
61
  this.cancel();
62
62
  this.reset();
63
63
  }
@@ -66,11 +66,11 @@ export class ButtonSensor extends BasePointerSensor {
66
66
  onPointerUp(e) {
67
67
  const button = extractPointerButton(e);
68
68
  if (button === this.pointerButton) {
69
- if (this.state === ButtonState.Selecting) {
69
+ if (this.state === ButtonState.selecting) {
70
70
  this.select(e);
71
71
  this.release();
72
72
  }
73
- else if (this.state === ButtonState.Pressed) {
73
+ else if (this.state === ButtonState.pressed) {
74
74
  this.release();
75
75
  }
76
76
  }
@@ -80,13 +80,13 @@ export class ButtonSensor extends BasePointerSensor {
80
80
  this.setPreventDefaultAndStopPropagation(e);
81
81
  }
82
82
  onLostPointerCapture(e) {
83
- if (this.state !== ButtonState.Released) {
83
+ if (this.state !== ButtonState.released) {
84
84
  this.cancel();
85
85
  this.reset();
86
86
  }
87
87
  }
88
88
  onKeyDown(e) {
89
- if (e.key === "Escape" && this.state !== ButtonState.Released) {
89
+ if (e.key === "Escape" && this.state !== ButtonState.released) {
90
90
  this.cancel();
91
91
  this.reset();
92
92
  }
@@ -99,7 +99,7 @@ export class ButtonSensor extends BasePointerSensor {
99
99
  const { data, window } = findTargetElementData(targetPath, underPointer, SymDataForSensor, ["button"]);
100
100
  const originData = data === null || data === void 0 ? void 0 : data.button;
101
101
  if (originData) {
102
- this.state = ButtonState.Pressed;
102
+ this.state = ButtonState.pressed;
103
103
  this.pointerButton = extractPointerButton(e);
104
104
  this.originData = originData;
105
105
  this.modifiers = extractModifierKeys(e);
@@ -114,12 +114,12 @@ export class ButtonSensor extends BasePointerSensor {
114
114
  }
115
115
  selecting(e) {
116
116
  this.updateSensorData(e);
117
- this.state = ButtonState.Selecting;
117
+ this.state = ButtonState.selecting;
118
118
  this.selected = false;
119
119
  }
120
120
  select(e) {
121
121
  this.updateSensorData(e);
122
- this.state = ButtonState.Selected;
122
+ this.state = ButtonState.selected;
123
123
  this.selectedX = e.clientX;
124
124
  this.selectedY = e.clientY;
125
125
  this.selected = true;
@@ -127,26 +127,26 @@ export class ButtonSensor extends BasePointerSensor {
127
127
  release() {
128
128
  this.preventDefault = false;
129
129
  this.stopPropagation = false;
130
- this.state = ButtonState.Released;
130
+ this.state = ButtonState.released;
131
131
  this.revision++;
132
132
  }
133
133
  cancel() {
134
- this.state = ButtonState.Released;
134
+ this.state = ButtonState.released;
135
135
  this.selected = false;
136
136
  this.revision++;
137
137
  }
138
138
  reset() {
139
139
  this.preventDefault = false;
140
140
  this.stopPropagation = false;
141
- this.state = ButtonState.Released;
141
+ this.state = ButtonState.released;
142
142
  this.originData = undefined;
143
143
  this.selectedData = undefined;
144
- this.pointerButton = PointerButton.None;
144
+ this.pointerButton = PointerButton.none;
145
145
  this.positionX = Infinity;
146
146
  this.positionY = Infinity;
147
147
  this.selectedX = Infinity;
148
148
  this.selectedY = Infinity;
149
- this.modifiers = KeyboardModifiers.None;
149
+ this.modifiers = KeyboardModifiers.none;
150
150
  this.selected = false;
151
151
  }
152
152
  updateSensorData(e) {
@@ -81,7 +81,7 @@ export class HoverSensor extends BasePointerSensor {
81
81
  this.target = undefined;
82
82
  this.positionX = Infinity;
83
83
  this.positionY = Infinity;
84
- this.modifiers = KeyboardModifiers.None;
84
+ this.modifiers = KeyboardModifiers.none;
85
85
  }
86
86
  }
87
87
  __decorate([
@@ -35,13 +35,13 @@ export class HtmlDragSensor extends HtmlElementSensor {
35
35
  this.draggingDataTypes = [];
36
36
  this.positionX = Infinity;
37
37
  this.positionY = Infinity;
38
- this.modifiers = KeyboardModifiers.None;
38
+ this.modifiers = KeyboardModifiers.none;
39
39
  this.dropX = Infinity;
40
40
  this.dropY = Infinity;
41
41
  this.dropped = false;
42
42
  this.immediatePositionX = Infinity;
43
43
  this.immediatePositionY = Infinity;
44
- this.immediateModifiers = KeyboardModifiers.None;
44
+ this.immediateModifiers = KeyboardModifiers.none;
45
45
  }
46
46
  getData(format) {
47
47
  return this.dataByFormat.get(format);
@@ -214,13 +214,13 @@ export class HtmlDragSensor extends HtmlElementSensor {
214
214
  this.draggingDataTypes = [];
215
215
  this.positionX = Infinity;
216
216
  this.positionY = Infinity;
217
- this.modifiers = KeyboardModifiers.None;
217
+ this.modifiers = KeyboardModifiers.none;
218
218
  this.dropX = Infinity;
219
219
  this.dropY = Infinity;
220
220
  this.dropped = false;
221
221
  this.immediatePositionX = Infinity;
222
222
  this.immediatePositionY = Infinity;
223
- this.immediateModifiers = KeyboardModifiers.None;
223
+ this.immediateModifiers = KeyboardModifiers.none;
224
224
  this.revision++;
225
225
  }
226
226
  updateDragTarget(e) {
@@ -1,20 +1,20 @@
1
1
  import { HtmlElementSensor } from "./HtmlElementSensor.js";
2
2
  export declare enum KeyboardModifiers {
3
- None = 0,
4
- Ctrl = 1,
5
- Shift = 2,
6
- Alt = 4,
7
- Meta = 8,
8
- CtrlShift = 3,
9
- CtrlAlt = 5,
10
- CtrlMeta = 9,
11
- CtrlShiftAlt = 7,
12
- CtrlShiftAltMeta = 15,
13
- CtrlShiftMeta = 11,
14
- ShiftAlt = 6,
15
- ShiftMeta = 10,
16
- ShiftAltMeta = 14,
17
- AltMeta = 12
3
+ none = 0,
4
+ ctrl = 1,
5
+ shift = 2,
6
+ alt = 4,
7
+ meta = 8,
8
+ ctrlShift = 3,
9
+ ctrlAlt = 5,
10
+ ctrlMeta = 9,
11
+ ctrlShiftAlt = 7,
12
+ ctrlShiftAltMeta = 15,
13
+ ctrlShiftMeta = 11,
14
+ shiftAlt = 6,
15
+ shiftMeta = 10,
16
+ shiftAltMeta = 14,
17
+ altMeta = 12
18
18
  }
19
19
  export declare class KeyboardSensor extends HtmlElementSensor {
20
20
  down: string;
@@ -12,28 +12,28 @@ import { grabElementDataList, SymDataForSensor } from "./DataForSensor.js";
12
12
  import { HtmlElementSensor } from "./HtmlElementSensor.js";
13
13
  export var KeyboardModifiers;
14
14
  (function (KeyboardModifiers) {
15
- KeyboardModifiers[KeyboardModifiers["None"] = 0] = "None";
16
- KeyboardModifiers[KeyboardModifiers["Ctrl"] = 1] = "Ctrl";
17
- KeyboardModifiers[KeyboardModifiers["Shift"] = 2] = "Shift";
18
- KeyboardModifiers[KeyboardModifiers["Alt"] = 4] = "Alt";
19
- KeyboardModifiers[KeyboardModifiers["Meta"] = 8] = "Meta";
20
- KeyboardModifiers[KeyboardModifiers["CtrlShift"] = 3] = "CtrlShift";
21
- KeyboardModifiers[KeyboardModifiers["CtrlAlt"] = 5] = "CtrlAlt";
22
- KeyboardModifiers[KeyboardModifiers["CtrlMeta"] = 9] = "CtrlMeta";
23
- KeyboardModifiers[KeyboardModifiers["CtrlShiftAlt"] = 7] = "CtrlShiftAlt";
24
- KeyboardModifiers[KeyboardModifiers["CtrlShiftAltMeta"] = 15] = "CtrlShiftAltMeta";
25
- KeyboardModifiers[KeyboardModifiers["CtrlShiftMeta"] = 11] = "CtrlShiftMeta";
26
- KeyboardModifiers[KeyboardModifiers["ShiftAlt"] = 6] = "ShiftAlt";
27
- KeyboardModifiers[KeyboardModifiers["ShiftMeta"] = 10] = "ShiftMeta";
28
- KeyboardModifiers[KeyboardModifiers["ShiftAltMeta"] = 14] = "ShiftAltMeta";
29
- KeyboardModifiers[KeyboardModifiers["AltMeta"] = 12] = "AltMeta";
15
+ KeyboardModifiers[KeyboardModifiers["none"] = 0] = "none";
16
+ KeyboardModifiers[KeyboardModifiers["ctrl"] = 1] = "ctrl";
17
+ KeyboardModifiers[KeyboardModifiers["shift"] = 2] = "shift";
18
+ KeyboardModifiers[KeyboardModifiers["alt"] = 4] = "alt";
19
+ KeyboardModifiers[KeyboardModifiers["meta"] = 8] = "meta";
20
+ KeyboardModifiers[KeyboardModifiers["ctrlShift"] = 3] = "ctrlShift";
21
+ KeyboardModifiers[KeyboardModifiers["ctrlAlt"] = 5] = "ctrlAlt";
22
+ KeyboardModifiers[KeyboardModifiers["ctrlMeta"] = 9] = "ctrlMeta";
23
+ KeyboardModifiers[KeyboardModifiers["ctrlShiftAlt"] = 7] = "ctrlShiftAlt";
24
+ KeyboardModifiers[KeyboardModifiers["ctrlShiftAltMeta"] = 15] = "ctrlShiftAltMeta";
25
+ KeyboardModifiers[KeyboardModifiers["ctrlShiftMeta"] = 11] = "ctrlShiftMeta";
26
+ KeyboardModifiers[KeyboardModifiers["shiftAlt"] = 6] = "shiftAlt";
27
+ KeyboardModifiers[KeyboardModifiers["shiftMeta"] = 10] = "shiftMeta";
28
+ KeyboardModifiers[KeyboardModifiers["shiftAltMeta"] = 14] = "shiftAltMeta";
29
+ KeyboardModifiers[KeyboardModifiers["altMeta"] = 12] = "altMeta";
30
30
  })(KeyboardModifiers || (KeyboardModifiers = {}));
31
31
  export class KeyboardSensor extends HtmlElementSensor {
32
32
  constructor(element) {
33
33
  super(element);
34
34
  this.down = "";
35
35
  this.up = "";
36
- this.modifiers = KeyboardModifiers.None;
36
+ this.modifiers = KeyboardModifiers.none;
37
37
  }
38
38
  listen(enabled = true) {
39
39
  const element = this.sourceElement;
@@ -51,7 +51,7 @@ export class KeyboardSensor extends HtmlElementSensor {
51
51
  this.stopPropagation = false;
52
52
  this.down = "";
53
53
  this.up = "";
54
- this.modifiers = KeyboardModifiers.None;
54
+ this.modifiers = KeyboardModifiers.none;
55
55
  }
56
56
  onKeyDown(e) {
57
57
  this.keyDown(e);
@@ -80,15 +80,15 @@ export class KeyboardSensor extends HtmlElementSensor {
80
80
  this.revision++;
81
81
  }
82
82
  static getKeyAsModifierIfAny(key) {
83
- let modifier = KeyboardModifiers.None;
83
+ let modifier = KeyboardModifiers.none;
84
84
  if (key === "Control")
85
- modifier = KeyboardModifiers.Ctrl;
85
+ modifier = KeyboardModifiers.ctrl;
86
86
  else if (key === "Shift")
87
- modifier = KeyboardModifiers.Shift;
87
+ modifier = KeyboardModifiers.shift;
88
88
  else if (key === "Alt")
89
- modifier = KeyboardModifiers.Alt;
89
+ modifier = KeyboardModifiers.alt;
90
90
  else if (key === "Meta")
91
- modifier = KeyboardModifiers.Meta;
91
+ modifier = KeyboardModifiers.meta;
92
92
  return modifier;
93
93
  }
94
94
  }
@@ -113,22 +113,22 @@ __decorate([
113
113
  __metadata("design:returntype", void 0)
114
114
  ], KeyboardSensor.prototype, "keyUp", null);
115
115
  export function extractModifierKeys(e) {
116
- let modifiers = KeyboardModifiers.None;
116
+ let modifiers = KeyboardModifiers.none;
117
117
  if (e.ctrlKey)
118
- modifiers |= KeyboardModifiers.Ctrl;
118
+ modifiers |= KeyboardModifiers.ctrl;
119
119
  else
120
- modifiers &= ~KeyboardModifiers.Ctrl;
120
+ modifiers &= ~KeyboardModifiers.ctrl;
121
121
  if (e.shiftKey)
122
- modifiers |= KeyboardModifiers.Shift;
122
+ modifiers |= KeyboardModifiers.shift;
123
123
  else
124
- modifiers &= ~KeyboardModifiers.Shift;
124
+ modifiers &= ~KeyboardModifiers.shift;
125
125
  if (e.altKey)
126
- modifiers |= KeyboardModifiers.Alt;
126
+ modifiers |= KeyboardModifiers.alt;
127
127
  else
128
- modifiers &= ~KeyboardModifiers.Alt;
128
+ modifiers &= ~KeyboardModifiers.alt;
129
129
  if (e.metaKey)
130
- modifiers |= KeyboardModifiers.Meta;
130
+ modifiers |= KeyboardModifiers.meta;
131
131
  else
132
- modifiers &= ~KeyboardModifiers.Meta;
132
+ modifiers &= ~KeyboardModifiers.meta;
133
133
  return modifiers;
134
134
  }
@@ -16,7 +16,7 @@ export class PointerSensor extends BasePointerSensor {
16
16
  super(element, focusSensor, windowSensor);
17
17
  this.hotPositionX = Infinity;
18
18
  this.hotPositionY = Infinity;
19
- this.pointerButton = PointerButton.None;
19
+ this.pointerButton = PointerButton.none;
20
20
  this.tryingDragging = false;
21
21
  this.clickable = undefined;
22
22
  this.clicking = undefined;
@@ -37,13 +37,13 @@ export class PointerSensor extends BasePointerSensor {
37
37
  this.draggingOver = false;
38
38
  this.positionX = Infinity;
39
39
  this.positionY = Infinity;
40
- this.modifiers = KeyboardModifiers.None;
40
+ this.modifiers = KeyboardModifiers.none;
41
41
  this.dropX = Infinity;
42
42
  this.dropY = Infinity;
43
43
  this.dropped = false;
44
44
  this.immediatePositionX = Infinity;
45
45
  this.immediatePositionY = Infinity;
46
- this.immediateModifiers = KeyboardModifiers.None;
46
+ this.immediateModifiers = KeyboardModifiers.none;
47
47
  }
48
48
  getData() {
49
49
  return this.draggingData;
@@ -66,7 +66,7 @@ export class PointerSensor extends BasePointerSensor {
66
66
  onPointerDown(e) {
67
67
  const button = extractPointerButton(e);
68
68
  if (!this.dragStarted && this.clickable === undefined &&
69
- (button === PointerButton.Left || button === PointerButton.Right)) {
69
+ (button === PointerButton.left || button === PointerButton.right)) {
70
70
  this.tryClickingOrDragging(e);
71
71
  }
72
72
  }
@@ -206,7 +206,7 @@ export class PointerSensor extends BasePointerSensor {
206
206
  this.revision++;
207
207
  }
208
208
  reset() {
209
- this.pointerButton = PointerButton.None;
209
+ this.pointerButton = PointerButton.none;
210
210
  this.clickable = undefined;
211
211
  this.clicking = undefined;
212
212
  this.clicked = undefined;
@@ -227,13 +227,13 @@ export class PointerSensor extends BasePointerSensor {
227
227
  this.draggingOver = false;
228
228
  this.positionX = Infinity;
229
229
  this.positionY = Infinity;
230
- this.modifiers = KeyboardModifiers.None;
230
+ this.modifiers = KeyboardModifiers.none;
231
231
  this.dropX = Infinity;
232
232
  this.dropY = Infinity;
233
233
  this.dropped = false;
234
234
  this.immediatePositionX = Infinity;
235
235
  this.immediatePositionY = Infinity;
236
- this.immediateModifiers = KeyboardModifiers.None;
236
+ this.immediateModifiers = KeyboardModifiers.none;
237
237
  this.revision++;
238
238
  }
239
239
  updateClicking(e) {
@@ -40,7 +40,7 @@ export class WheelSensor extends BasePointerSensor {
40
40
  doReset() {
41
41
  this.preventDefault = false;
42
42
  this.stopPropagation = false;
43
- this.modifiers = KeyboardModifiers.None;
43
+ this.modifiers = KeyboardModifiers.none;
44
44
  this.positionX = Infinity;
45
45
  this.positionY = Infinity;
46
46
  this.target = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verstak",
3
- "version": "0.24.127",
3
+ "version": "0.24.128",
4
4
  "description": "Verstak - Front-End Library",
5
5
  "publisher": "Nezaboodka Software",
6
6
  "license": "Apache-2.0",