dothtml 5.2.9 → 5.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.
Files changed (59) hide show
  1. package/lib/arg-callback-obj.d.ts +29 -29
  2. package/lib/arg-callback-obj.js +63 -63
  3. package/lib/built-in-components/nav-link.d.ts +8 -8
  4. package/lib/built-in-components/nav-link.js +23 -23
  5. package/lib/built-in-components/router.d.ts +57 -57
  6. package/lib/built-in-components/router.js +281 -281
  7. package/lib/built-in-components/router.js.map +1 -1
  8. package/lib/component.d.ts +82 -82
  9. package/lib/component.js +328 -328
  10. package/lib/dot-util.d.ts +26 -26
  11. package/lib/dot-util.js +61 -61
  12. package/lib/dot.d.ts +5 -5
  13. package/lib/dot.js +1121 -1095
  14. package/lib/dot.js.map +1 -1
  15. package/lib/dothtml.d.ts +29 -28
  16. package/lib/dothtml.js +14 -37
  17. package/lib/dothtml.js.map +1 -1
  18. package/lib/err.d.ts +2 -2
  19. package/lib/err.js +25 -25
  20. package/lib/event-bus.d.ts +10 -10
  21. package/lib/event-bus.js +36 -36
  22. package/lib/i-dot.d.ts +689 -674
  23. package/lib/i-dot.js +2 -2
  24. package/lib/node-polyfill.d.ts +2 -2
  25. package/lib/node-polyfill.js +13 -13
  26. package/lib/observable-array.d.ts +49 -49
  27. package/lib/observable-array.js +273 -273
  28. package/lib/pages/home-page.d.ts +9 -0
  29. package/lib/pages/home-page.js +24 -0
  30. package/lib/pages/home-page.js.map +1 -0
  31. package/lib/styling/css-types.ts/css-angle.d.ts +7 -7
  32. package/lib/styling/css-types.ts/css-angle.js +21 -21
  33. package/lib/styling/css-types.ts/css-color.d.ts +9 -9
  34. package/lib/styling/css-types.ts/css-color.js +823 -823
  35. package/lib/styling/css-types.ts/css-complex.d.ts +7 -7
  36. package/lib/styling/css-types.ts/css-complex.js +22 -22
  37. package/lib/styling/css-types.ts/css-data-type.d.ts +5 -5
  38. package/lib/styling/css-types.ts/css-data-type.js +8 -8
  39. package/lib/styling/css-types.ts/css-filter.d.ts +22 -22
  40. package/lib/styling/css-types.ts/css-filter.js +120 -120
  41. package/lib/styling/css-types.ts/css-length.d.ts +7 -7
  42. package/lib/styling/css-types.ts/css-length.js +23 -23
  43. package/lib/styling/css-types.ts/css-number.d.ts +6 -6
  44. package/lib/styling/css-types.ts/css-number.js +16 -16
  45. package/lib/styling/css-types.ts/css-percentage.d.ts +5 -5
  46. package/lib/styling/css-types.ts/css-percentage.js +12 -12
  47. package/lib/styling/css-types.ts/css-transform.d.ts +38 -38
  48. package/lib/styling/css-types.ts/css-transform.js +182 -182
  49. package/lib/styling/css-types.ts/css-unknown.d.ts +6 -6
  50. package/lib/styling/css-types.ts/css-unknown.js +16 -16
  51. package/lib/styling/css-types.ts/css-url.d.ts +6 -6
  52. package/lib/styling/css-types.ts/css-url.js +44 -44
  53. package/lib/styling/i-dotcss.d.ts +1085 -1085
  54. package/lib/styling/i-dotcss.js +2 -2
  55. package/lib/styling/style-builder.d.ts +24 -24
  56. package/lib/styling/style-builder.js +814 -814
  57. package/lib/styling/unit-function-tables.d.ts +10 -10
  58. package/lib/styling/unit-function-tables.js +26 -26
  59. package/package.json +9 -8
package/lib/dot-util.d.ts CHANGED
@@ -1,26 +1,26 @@
1
- import type Component from "./component";
2
- export declare function eachK(obj: any, cb: any): void;
3
- export declare function isF(v: any): any;
4
- export declare const sT: typeof setTimeout;
5
- export declare function str(s: number, v?: number): string;
6
- declare class _ClassPrefix {
7
- private current;
8
- reset(): void;
9
- get next(): number;
10
- }
11
- export declare const ClassPrefix: _ClassPrefix;
12
- export declare const GlobalComponentStack: Array<Component>;
13
- export type AnimationType = "geometric" | "exponential" | "ease" | "linear";
14
- export declare var floatRegex: RegExp;
15
- /**
16
- * Function that takes in a bunch of parameters and steps the start value toward the target based on timeRemaining and style.
17
- * currentValue is the current value.
18
- * targetValue is the target valaue.
19
- * timeRemaining is the time remaining in ms.
20
- * stepProgress is the size of this step.
21
- * totalDuration is the duration of the entire animation from start to finish (not just this step).
22
- * style is the type of transition (geometric=exponential, ease, linear).
23
- * Returns the result.
24
- */
25
- export declare function numberStep(startValue: number, targetValue: number, currentTime: number, totalDuration: number, style: AnimationType): number;
26
- export {};
1
+ import type Component from "./component";
2
+ export declare function eachK(obj: any, cb: any): void;
3
+ export declare function isF(v: any): any;
4
+ export declare const sT: typeof setTimeout;
5
+ export declare function str(s: number, v?: number): string;
6
+ declare class _ClassPrefix {
7
+ private current;
8
+ reset(): void;
9
+ get next(): number;
10
+ }
11
+ export declare const ClassPrefix: _ClassPrefix;
12
+ export declare const GlobalComponentStack: Array<Component>;
13
+ export type AnimationType = "geometric" | "exponential" | "ease" | "linear";
14
+ export declare var floatRegex: RegExp;
15
+ /**
16
+ * Function that takes in a bunch of parameters and steps the start value toward the target based on timeRemaining and style.
17
+ * currentValue is the current value.
18
+ * targetValue is the target valaue.
19
+ * timeRemaining is the time remaining in ms.
20
+ * stepProgress is the size of this step.
21
+ * totalDuration is the duration of the entire animation from start to finish (not just this step).
22
+ * style is the type of transition (geometric=exponential, ease, linear).
23
+ * Returns the result.
24
+ */
25
+ export declare function numberStep(startValue: number, targetValue: number, currentTime: number, totalDuration: number, style: AnimationType): number;
26
+ export {};
package/lib/dot-util.js CHANGED
@@ -1,62 +1,62 @@
1
- "use strict";
2
- // Polyfill for Object.keys(...).forEach.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.numberStep = exports.floatRegex = exports.GlobalComponentStack = exports.ClassPrefix = exports.str = exports.sT = exports.isF = exports.eachK = void 0;
5
- function eachK(obj, cb) {
6
- if (obj) {
7
- var lst = Object.keys(obj);
8
- for (var i = 0; i < lst.length; i++)
9
- cb(lst[i], obj[lst[i]]);
10
- }
11
- }
12
- exports.eachK = eachK;
13
- function isF(v) {
14
- return v && v.constructor && v.call && v.apply;
15
- }
16
- exports.isF = isF;
17
- exports.sT = setTimeout;
18
- function str(s, v) { return (s || "").toString(v); } // This function seems really weird.
19
- exports.str = str;
20
- class _ClassPrefix {
21
- constructor() {
22
- this.current = 0x10000;
23
- }
24
- reset() {
25
- this.current = 0x10000;
26
- }
27
- get next() {
28
- return this.current++;
29
- }
30
- }
31
- exports.ClassPrefix = new _ClassPrefix();
32
- exports.GlobalComponentStack = [];
33
- exports.floatRegex = new RegExp("[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?", "g");
34
- /**
35
- * Function that takes in a bunch of parameters and steps the start value toward the target based on timeRemaining and style.
36
- * currentValue is the current value.
37
- * targetValue is the target valaue.
38
- * timeRemaining is the time remaining in ms.
39
- * stepProgress is the size of this step.
40
- * totalDuration is the duration of the entire animation from start to finish (not just this step).
41
- * style is the type of transition (geometric=exponential, ease, linear).
42
- * Returns the result.
43
- */
44
- function numberStep(startValue, targetValue, currentTime, totalDuration, style) {
45
- startValue = Number(startValue);
46
- targetValue = Number(targetValue);
47
- var timeRemaining = totalDuration - currentTime;
48
- switch (style) {
49
- case "geometric":
50
- case "exponential": //This is kind of stupid now that we have ease. I might come back and add it in the future. For now assume ease.
51
- // var m = Math.exp(-1 / timeRemaining);
52
- // return targetValue + m * (startValue - targetValue);
53
- case "ease":
54
- var m = (-Math.cos(Math.PI * (currentTime / totalDuration)) + 1) * 0.5;
55
- return startValue + m * (targetValue - startValue);
56
- case "linear":
57
- default:
58
- return startValue + (targetValue - startValue) * (currentTime / totalDuration);
59
- }
60
- }
61
- exports.numberStep = numberStep;
1
+ "use strict";
2
+ // Polyfill for Object.keys(...).forEach.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.numberStep = exports.floatRegex = exports.GlobalComponentStack = exports.ClassPrefix = exports.str = exports.sT = exports.isF = exports.eachK = void 0;
5
+ function eachK(obj, cb) {
6
+ if (obj) {
7
+ var lst = Object.keys(obj);
8
+ for (var i = 0; i < lst.length; i++)
9
+ cb(lst[i], obj[lst[i]]);
10
+ }
11
+ }
12
+ exports.eachK = eachK;
13
+ function isF(v) {
14
+ return v && v.constructor && v.call && v.apply;
15
+ }
16
+ exports.isF = isF;
17
+ exports.sT = setTimeout;
18
+ function str(s, v) { return (s || "").toString(v); } // This function seems really weird.
19
+ exports.str = str;
20
+ class _ClassPrefix {
21
+ constructor() {
22
+ this.current = 0x10000;
23
+ }
24
+ reset() {
25
+ this.current = 0x10000;
26
+ }
27
+ get next() {
28
+ return this.current++;
29
+ }
30
+ }
31
+ exports.ClassPrefix = new _ClassPrefix();
32
+ exports.GlobalComponentStack = [];
33
+ exports.floatRegex = new RegExp("[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?", "g");
34
+ /**
35
+ * Function that takes in a bunch of parameters and steps the start value toward the target based on timeRemaining and style.
36
+ * currentValue is the current value.
37
+ * targetValue is the target valaue.
38
+ * timeRemaining is the time remaining in ms.
39
+ * stepProgress is the size of this step.
40
+ * totalDuration is the duration of the entire animation from start to finish (not just this step).
41
+ * style is the type of transition (geometric=exponential, ease, linear).
42
+ * Returns the result.
43
+ */
44
+ function numberStep(startValue, targetValue, currentTime, totalDuration, style) {
45
+ startValue = Number(startValue);
46
+ targetValue = Number(targetValue);
47
+ var timeRemaining = totalDuration - currentTime;
48
+ switch (style) {
49
+ case "geometric":
50
+ case "exponential": //This is kind of stupid now that we have ease. I might come back and add it in the future. For now assume ease.
51
+ // var m = Math.exp(-1 / timeRemaining);
52
+ // return targetValue + m * (startValue - targetValue);
53
+ case "ease":
54
+ var m = (-Math.cos(Math.PI * (currentTime / totalDuration)) + 1) * 0.5;
55
+ return startValue + m * (targetValue - startValue);
56
+ case "linear":
57
+ default:
58
+ return startValue + (targetValue - startValue) * (currentTime / totalDuration);
59
+ }
60
+ }
61
+ exports.numberStep = numberStep;
62
62
  //# sourceMappingURL=dot-util.js.map
package/lib/dot.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { IDotCore } from "./i-dot";
2
- declare const dot: IDotCore;
3
- export declare const SELECTOR_MODE = 1;
4
- export declare const ATTRIBUTE_MODE = 2;
5
- export default dot;
1
+ import { IDotCore } from "./i-dot";
2
+ declare const dot: IDotCore;
3
+ export declare const SELECTOR_MODE = 1;
4
+ export declare const ATTRIBUTE_MODE = 2;
5
+ export default dot;