@mintjamsinc/ichigojs 0.1.3 → 0.1.4

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.
@@ -62,6 +62,30 @@ export declare class VBindDirective implements VDirective {
62
62
  * Gets the original expression string from the directive.
63
63
  */
64
64
  get expression(): string | undefined;
65
+ /**
66
+ * @inheritdoc
67
+ */
68
+ get onMount(): (() => void) | undefined;
69
+ /**
70
+ * @inheritdoc
71
+ */
72
+ get onMounted(): (() => void) | undefined;
73
+ /**
74
+ * @inheritdoc
75
+ */
76
+ get onUpdate(): (() => void) | undefined;
77
+ /**
78
+ * @inheritdoc
79
+ */
80
+ get onUpdated(): (() => void) | undefined;
81
+ /**
82
+ * @inheritdoc
83
+ */
84
+ get onUnmount(): (() => void) | undefined;
85
+ /**
86
+ * @inheritdoc
87
+ */
88
+ get onUnmounted(): (() => void) | undefined;
65
89
  /**
66
90
  * @inheritdoc
67
91
  */
@@ -48,6 +48,30 @@ export declare abstract class VConditionalDirective implements VDirective {
48
48
  * For v-else, this is always true.
49
49
  */
50
50
  get conditionIsMet(): boolean;
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ get onMount(): (() => void) | undefined;
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ get onMounted(): (() => void) | undefined;
59
+ /**
60
+ * @inheritdoc
61
+ */
62
+ get onUpdate(): (() => void) | undefined;
63
+ /**
64
+ * @inheritdoc
65
+ */
66
+ get onUpdated(): (() => void) | undefined;
67
+ /**
68
+ * @inheritdoc
69
+ */
70
+ get onUnmount(): (() => void) | undefined;
71
+ /**
72
+ * @inheritdoc
73
+ */
74
+ get onUnmounted(): (() => void) | undefined;
51
75
  /**
52
76
  * @inheritdoc
53
77
  */
@@ -57,6 +57,36 @@ export interface VDirective {
57
57
  * @returns An array of dependent identifier names.
58
58
  */
59
59
  get dependentIdentifiers(): string[];
60
+ /**
61
+ * Lifecycle hook called before the directive is mounted to the DOM.
62
+ * This is called once, before the element is inserted into the DOM.
63
+ */
64
+ get onMount(): (() => void) | undefined;
65
+ /**
66
+ * Lifecycle hook called after the directive is mounted to the DOM.
67
+ * This is called once, after the element is inserted into the DOM.
68
+ */
69
+ get onMounted(): (() => void) | undefined;
70
+ /**
71
+ * Lifecycle hook called before the directive is updated.
72
+ * This is called before the element is re-rendered.
73
+ */
74
+ get onUpdate(): (() => void) | undefined;
75
+ /**
76
+ * Lifecycle hook called after the directive is updated.
77
+ * This is called after the element is re-rendered.
78
+ */
79
+ get onUpdated(): (() => void) | undefined;
80
+ /**
81
+ * Lifecycle hook called before the directive is unmounted from the DOM.
82
+ * This is called once, before the element is removed from the DOM.
83
+ */
84
+ get onUnmount(): (() => void) | undefined;
85
+ /**
86
+ * Lifecycle hook called after the directive is unmounted from the DOM.
87
+ * This is called once, after the element is removed from the DOM.
88
+ */
89
+ get onUnmounted(): (() => void) | undefined;
60
90
  /**
61
91
  * Cleans up any resources used by the directive.
62
92
  * This method is called when the directive is no longer needed.
@@ -52,6 +52,30 @@ export declare class VForDirective implements VDirective {
52
52
  * @inheritdoc
53
53
  */
54
54
  get dependentIdentifiers(): string[];
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ get onMount(): (() => void) | undefined;
59
+ /**
60
+ * @inheritdoc
61
+ */
62
+ get onMounted(): (() => void) | undefined;
63
+ /**
64
+ * @inheritdoc
65
+ */
66
+ get onUpdate(): (() => void) | undefined;
67
+ /**
68
+ * @inheritdoc
69
+ */
70
+ get onUpdated(): (() => void) | undefined;
71
+ /**
72
+ * @inheritdoc
73
+ */
74
+ get onUnmount(): (() => void) | undefined;
75
+ /**
76
+ * @inheritdoc
77
+ */
78
+ get onUnmounted(): (() => void) | undefined;
55
79
  /**
56
80
  * @inheritdoc
57
81
  */
@@ -48,6 +48,30 @@ export declare class VModelDirective implements VDirective {
48
48
  * @inheritdoc
49
49
  */
50
50
  get dependentIdentifiers(): string[];
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ get onMount(): (() => void) | undefined;
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ get onMounted(): (() => void) | undefined;
59
+ /**
60
+ * @inheritdoc
61
+ */
62
+ get onUpdate(): (() => void) | undefined;
63
+ /**
64
+ * @inheritdoc
65
+ */
66
+ get onUpdated(): (() => void) | undefined;
67
+ /**
68
+ * @inheritdoc
69
+ */
70
+ get onUnmount(): (() => void) | undefined;
71
+ /**
72
+ * @inheritdoc
73
+ */
74
+ get onUnmounted(): (() => void) | undefined;
51
75
  /**
52
76
  * @inheritdoc
53
77
  */
@@ -4,7 +4,7 @@ import { VDirective } from "./VDirective";
4
4
  import { VDirectiveParseContext } from "./VDirectiveParseContext";
5
5
  import { VDOMUpdater } from "../VDOMUpdater";
6
6
  /**
7
- * Directive for binding event listeners to DOM elements.
7
+ * Directive for binding event listeners to DOM elements and lifecycle hooks.
8
8
  * The `v-on` directive allows you to listen to DOM events and execute specified methods when those events are triggered.
9
9
  * The syntax for using the `v-on` directive is `v-on:event="methodName"`, where `event` is the name of the event to listen for (e.g., `click`, `mouseover`, etc.), and `methodName` is the name of the method to be called when the event occurs.
10
10
  * Example usage:
@@ -13,7 +13,16 @@ import { VDOMUpdater } from "../VDOMUpdater";
13
13
  * You can also use the shorthand `@event` instead of `v-on:event`. For example, `@click="handleClick"` is equivalent to `v-on:click="handleClick"`.
14
14
  * The `v-on` directive supports event modifiers such as `.stop`, `.prevent`, `.capture`, `.self`, and `.once` to modify the behavior of the event listener.
15
15
  * For example, `v-on:click.stop="handleClick"` will stop the event from propagating up the DOM tree.
16
- * This directive is essential for handling user interactions in your application.
16
+ *
17
+ * Additionally, this directive supports lifecycle hooks:
18
+ * @mount="onMount" - Called before the element is inserted into the DOM
19
+ * @mounted="onMounted" - Called after the element is inserted into the DOM
20
+ * @update="onUpdate" - Called before the element is updated
21
+ * @updated="onUpdated" - Called after the element is updated
22
+ * @unmount="onUnmount" - Called before the element is removed from the DOM
23
+ * @unmounted="onUnmounted" - Called after the element is removed from the DOM
24
+ *
25
+ * This directive is essential for handling user interactions and lifecycle events in your application.
17
26
  * Note that the methods referenced in the directive should be defined in the component's methods object.
18
27
  */
19
28
  export declare class VOnDirective implements VDirective {
@@ -50,6 +59,30 @@ export declare class VOnDirective implements VDirective {
50
59
  * @inheritdoc
51
60
  */
52
61
  get dependentIdentifiers(): string[];
62
+ /**
63
+ * @inheritdoc
64
+ */
65
+ get onMount(): (() => void) | undefined;
66
+ /**
67
+ * @inheritdoc
68
+ */
69
+ get onMounted(): (() => void) | undefined;
70
+ /**
71
+ * @inheritdoc
72
+ */
73
+ get onUpdate(): (() => void) | undefined;
74
+ /**
75
+ * @inheritdoc
76
+ */
77
+ get onUpdated(): (() => void) | undefined;
78
+ /**
79
+ * @inheritdoc
80
+ */
81
+ get onUnmount(): (() => void) | undefined;
82
+ /**
83
+ * @inheritdoc
84
+ */
85
+ get onUnmounted(): (() => void) | undefined;
53
86
  /**
54
87
  * @inheritdoc
55
88
  */
@@ -58,6 +58,30 @@ export declare class VShowDirective implements VDirective {
58
58
  * If the node is already hidden, no action is taken.
59
59
  */
60
60
  invisibleNode(): void;
61
+ /**
62
+ * @inheritdoc
63
+ */
64
+ get onMount(): (() => void) | undefined;
65
+ /**
66
+ * @inheritdoc
67
+ */
68
+ get onMounted(): (() => void) | undefined;
69
+ /**
70
+ * @inheritdoc
71
+ */
72
+ get onUpdate(): (() => void) | undefined;
73
+ /**
74
+ * @inheritdoc
75
+ */
76
+ get onUpdated(): (() => void) | undefined;
77
+ /**
78
+ * @inheritdoc
79
+ */
80
+ get onUnmount(): (() => void) | undefined;
81
+ /**
82
+ * @inheritdoc
83
+ */
84
+ get onUnmounted(): (() => void) | undefined;
61
85
  /**
62
86
  * @inheritdoc
63
87
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintjamsinc/ichigojs",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "ichigo.js - Simple and intuitive reactive framework. Lightweight, fast, and user-friendly virtual DOM library",
5
5
  "main": "./dist/ichigo.umd.js",
6
6
  "module": "./dist/ichigo.esm.js",