dothtml 5.2.1 → 5.2.3

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 (94) hide show
  1. package/lib/dothtml.js +1 -1
  2. package/package.json +2 -1
  3. package/.vscode/launch.json +0 -34
  4. package/.vscode/settings.json +0 -6
  5. package/azure-pipelines.yml +0 -14
  6. package/babel.config.js +0 -1
  7. package/jest.config.ts +0 -207
  8. package/lib/arg-callback-obj.d.ts +0 -29
  9. package/lib/built-in-components/nav-link.d.ts +0 -8
  10. package/lib/built-in-components/router.d.ts +0 -57
  11. package/lib/component.d.ts +0 -82
  12. package/lib/dot-util.d.ts +0 -26
  13. package/lib/dot.d.ts +0 -5
  14. package/lib/dothtml.d.ts +0 -25
  15. package/lib/dothtml.js.LICENSE.txt +0 -1
  16. package/lib/err.d.ts +0 -2
  17. package/lib/event-bus.d.ts +0 -10
  18. package/lib/i-dot.d.ts +0 -674
  19. package/lib/node-polyfill.d.ts +0 -2
  20. package/lib/observable-array.d.ts +0 -49
  21. package/lib/styling/css-types.ts/css-angle.d.ts +0 -7
  22. package/lib/styling/css-types.ts/css-color.d.ts +0 -9
  23. package/lib/styling/css-types.ts/css-complex.d.ts +0 -7
  24. package/lib/styling/css-types.ts/css-data-type.d.ts +0 -5
  25. package/lib/styling/css-types.ts/css-filter.d.ts +0 -22
  26. package/lib/styling/css-types.ts/css-length.d.ts +0 -7
  27. package/lib/styling/css-types.ts/css-number.d.ts +0 -6
  28. package/lib/styling/css-types.ts/css-percentage.d.ts +0 -5
  29. package/lib/styling/css-types.ts/css-transform.d.ts +0 -38
  30. package/lib/styling/css-types.ts/css-unknown.d.ts +0 -6
  31. package/lib/styling/css-types.ts/css-url.d.ts +0 -6
  32. package/lib/styling/i-dotcss.d.ts +0 -1069
  33. package/lib/styling/style-builder.d.ts +0 -24
  34. package/lib/styling/unit-function-tables.d.ts +0 -10
  35. package/out.md +0 -1340
  36. package/src/arg-callback-obj.ts +0 -76
  37. package/src/built-in-components/nav-link.ts +0 -21
  38. package/src/built-in-components/router.ts +0 -315
  39. package/src/component.ts +0 -415
  40. package/src/dot-util.ts +0 -69
  41. package/src/dot.ts +0 -1147
  42. package/src/dothtml.ts +0 -37
  43. package/src/err.ts +0 -22
  44. package/src/event-bus.ts +0 -39
  45. package/src/i-dot.ts +0 -787
  46. package/src/node-polyfill.ts +0 -11
  47. package/src/observable-array.ts +0 -289
  48. package/src/styling/css-types.ts/css-angle.ts +0 -18
  49. package/src/styling/css-types.ts/css-color.ts +0 -233
  50. package/src/styling/css-types.ts/css-complex.ts +0 -20
  51. package/src/styling/css-types.ts/css-data-type.ts +0 -9
  52. package/src/styling/css-types.ts/css-filter.ts +0 -134
  53. package/src/styling/css-types.ts/css-length.ts +0 -20
  54. package/src/styling/css-types.ts/css-number.ts +0 -12
  55. package/src/styling/css-types.ts/css-percentage.ts +0 -10
  56. package/src/styling/css-types.ts/css-transform.ts +0 -220
  57. package/src/styling/css-types.ts/css-unknown.ts +0 -13
  58. package/src/styling/css-types.ts/css-url.ts +0 -41
  59. package/src/styling/i-dotcss.ts +0 -1181
  60. package/src/styling/style-builder.ts +0 -966
  61. package/src/styling/unit-function-tables.ts +0 -24
  62. package/tsconfig.json +0 -99
  63. package/unittests/advanced-bindings.test.ts +0 -421
  64. package/unittests/array-evaluation.test.ts +0 -7
  65. package/unittests/basic-functionality.test.ts +0 -88
  66. package/unittests/calc.test.ts +0 -6
  67. package/unittests/class-binding.test.ts +0 -227
  68. package/unittests/components/component-decorator.-.ts +0 -14
  69. package/unittests/components/components-data.test.ts +0 -153
  70. package/unittests/components/components.test.ts +0 -258
  71. package/unittests/computed.test.ts +0 -35
  72. package/unittests/core.ts +0 -66
  73. package/unittests/element-and-attribute-coverage.test.ts +0 -472
  74. package/unittests/hooks.test.ts +0 -67
  75. package/unittests/immutable-if.test.ts +0 -19
  76. package/unittests/input-bindings.test.ts +0 -166
  77. package/unittests/integration.test.ts +0 -5
  78. package/unittests/iterations.test.ts +0 -18
  79. package/unittests/logic.test.ts +0 -18
  80. package/unittests/non-function-props-rerender.test.ts +0 -86
  81. package/unittests/refs.test.ts +0 -36
  82. package/unittests/routing.-.ts +0 -56
  83. package/unittests/scopes.test.ts +0 -22
  84. package/unittests/special-tags.test.ts +0 -39
  85. package/unittests/styles.test.ts +0 -9
  86. package/unittests/styling/animations.test.ts +0 -14
  87. package/unittests/styling/filters.test.ts +0 -23
  88. package/unittests/styling/inline-styling.test.ts +0 -18
  89. package/unittests/styling/pseudo-selectors.test.ts +0 -33
  90. package/unittests/styling/transformations.test.ts +0 -234
  91. package/unittests/styling/value-interpretation.test.ts +0 -3
  92. package/unittests/testpage.ts +0 -5
  93. package/unittests/wait.test.ts +0 -31
  94. package/webpack.config.js +0 -28
@@ -1,57 +0,0 @@
1
- import Component from "../component";
2
- interface RouterParams {
3
- autoNavigate: boolean;
4
- onNavigateInit: Function;
5
- onError: Function;
6
- onResponse: Function;
7
- onComplete: Function;
8
- routes: Array<{
9
- path: string;
10
- }>;
11
- }
12
- export default class DotRouter extends Component {
13
- static allRouters: {
14
- [key: string]: DotRouter;
15
- };
16
- static routerId: number;
17
- static mayRedirect: boolean;
18
- static _get(url: any, success: any, fail: any): void;
19
- static routerEventSet: boolean;
20
- static setupPopupFunction(): void;
21
- id: number;
22
- outlet: Element;
23
- navId: number;
24
- currentRoute: string;
25
- currentParams: RouterParams;
26
- params: RouterParams;
27
- routesAndSegments: Array<{
28
- path: string;
29
- segments: string[];
30
- }>;
31
- constructor(params: RouterParams);
32
- /**
33
- * TODO: convert to interface.
34
- * @param {Object} params - Parameters.
35
- * @param {Array.<{path: string, title: string, component: Object}>} params.routes - Array of routes.
36
- * @param {boolean} params.autoNavigate - Router will automatically navigate when outlet is created.
37
- * @param {Function} params.onNavigateInit - Occurs before any request is sent, and before the router outlet is emptied.
38
- * @param {Function} params.onError - Occurs in the event of an HTTP error.
39
- * @param {Function} params.onResponse - Occurs after a successful HTTP response, but before rendering.
40
- * @param {Function} params.onComplete - Occurs after an uncancelled route completes without an error.
41
- */
42
- builder(): import("../i-dot").IDotElementDocument<import("../i-dot").IDotGenericElement>;
43
- registered(): void;
44
- ready(): void;
45
- deleting(): void;
46
- navigate(path: string, noHistory?: boolean, force?: boolean): {
47
- cancel: () => void;
48
- element: Element;
49
- httpResponse: any;
50
- isNew: boolean;
51
- params: any;
52
- path: string;
53
- title: any;
54
- wasCancelled: boolean;
55
- };
56
- }
57
- export {};
@@ -1,82 +0,0 @@
1
- import { IDotElement } from "./i-dot";
2
- import IDotCss from "./styling/i-dotcss";
3
- declare abstract class Component {
4
- #private;
5
- /**
6
- * Called once per component, on the first build.
7
- * TODO: this shouldn't require an instance of the component. Please experiment with fixing this.
8
- */
9
- static initializeComponent<T extends Component>(obj: T): void;
10
- static build<T extends Component>(obj: T): HTMLElement;
11
- /**
12
- * Called any time the component needs to be completely rebuilt.
13
- */
14
- static rebuild<T extends Component>(obj: T): void;
15
- static initializeEventHandlers(obj: any): void;
16
- static createProp(activePropContainer: Function, name: string): void;
17
- static configureDependency(cc: Component, name: string): void;
18
- static updateProp(obj: Component, name: string): void;
19
- constructor(...args: Array<any>);
20
- /**
21
- * A function returning DOThtml (required).
22
- */
23
- abstract builder(...args: Array<any>): IDotElement;
24
- /**
25
- *
26
- */
27
- props: {
28
- [key: string]: any;
29
- };
30
- /**
31
- * A series of events that can be raised from inside the component.
32
- */
33
- events: {
34
- [key: string]: (...params: Array<any>) => void;
35
- };
36
- /**
37
- * An optional function that gets called before the component is created, scoped to the new component object.
38
- */
39
- created(...args: Array<any>): void;
40
- /**
41
- * An optional function called after the element has been added. One parameter will be provided containing the added element.
42
- */
43
- ready(): void;
44
- /**
45
- * An optional function called before the component is deleted.
46
- */
47
- deleting(): void;
48
- /**
49
- * An optional function called after the component is deleted.
50
- */
51
- deleted(): void;
52
- /**
53
- * An optional function called after the component is built.
54
- */
55
- built(): void;
56
- on(event: string, handler: Function): void;
57
- off(event: string, handler: Function): void;
58
- private __$el;
59
- private __built;
60
- private __stylesSet;
61
- private __eventsInitialized;
62
- private __propContainer;
63
- private __args;
64
- /**
65
- * The main element of this component - automatically set after the builder is called.
66
- */
67
- get $el(): HTMLElement;
68
- $refs: {
69
- [key: string]: HTMLElement;
70
- };
71
- /**
72
- * Name of the component (optional). If provided, dot and the VDBO will be extended.
73
- */
74
- name: string;
75
- /**
76
- * An optional function that is called after builder that stylizes the component using a scoped style builder.
77
- */
78
- style?(styleBuilder: IDotCss): void;
79
- $styleBuilder?: Function;
80
- $updateStyles(): void;
81
- }
82
- export default Component;
package/lib/dot-util.d.ts DELETED
@@ -1,26 +0,0 @@
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.d.ts DELETED
@@ -1,5 +0,0 @@
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;
package/lib/dothtml.d.ts DELETED
@@ -1,25 +0,0 @@
1
- import dot from "./dot";
2
- /*! DOThtml (c) Joshua Sideris | dothtml.org/license */
3
- /**
4
- * Changes:
5
- * - Converted to typescript.
6
- * - Removed if, IF, elseif, ELSEIF, else, and ELSE functions, replacing them with when, otherwiseWhen, and otherwise. Improves compatibility for IE 8.
7
- * - Also took some shortcuts that may not have polyfill with older browsers. Will get back to adding reverse compatibility in a future update.
8
- * - Created several type interfaces.
9
- * - Changed the names to HTML tags and attributes to pascal case.
10
- * - Removed most E and A suffixes from tag and attribute names.
11
- * - Removed special selection behavior for overlapping HTML names. Instead, all conflicts were renamed.
12
- * - Added attribute-element associations.
13
- * - Added `as` function for casting (mostly useful when adding attributes via the dot selector).
14
- * - Started the long process of adding comment documentation for custom built-in functions.
15
- * - Re-imagined components from the ground up. Components are now classes that inherit from `Component`. Plays very nicely with TS and ES6.
16
- * - Added interfaces for new methods that can be invoked on various elements. For instance, play, pause, and stop on audio and video elements.
17
- * - Updated scopeClass method to put the optional parameter last.
18
- * - Fixed some color bugs.
19
- * - Added a filter builder.
20
- * - Added flex gap.
21
- */
22
- export default dot;
23
- export { default as DotComponent } from "./component";
24
- export { IDotElement } from "./i-dot";
25
- export { default as IDotCss } from "./styling/i-dotcss";
@@ -1 +0,0 @@
1
- /*! DOThtml (c) Joshua Sideris | dothtml.org/license */
package/lib/err.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare var ERR: (c: string, ...p: Array<string>) => never;
2
- export default ERR;
@@ -1,10 +0,0 @@
1
- declare class _EventBus {
2
- private _callbacks;
3
- _checkAddEvent: (event: any) => any;
4
- on(event: any, callback: any): void;
5
- off(event: any, callback: any): void;
6
- emit(event: any, ...args: any[]): void;
7
- flush(event: any): void;
8
- }
9
- declare const EventBus: _EventBus;
10
- export default EventBus;