@mintjamsinc/ichigojs 0.1.8 → 0.1.9

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.
@@ -1,12 +1,25 @@
1
+ /**
2
+ * Standard directive names used in the framework.
3
+ */
1
4
  export declare enum StandardDirectiveName {
5
+ /** Conditional rendering directives (if). */
2
6
  V_IF = "v-if",
7
+ /** Conditional rendering directives (else if). */
3
8
  V_ELSE_IF = "v-else-if",
9
+ /** Conditional rendering directives (else). */
4
10
  V_ELSE = "v-else",
11
+ /** Conditional rendering directives (show). */
5
12
  V_SHOW = "v-show",
13
+ /** List rendering directives. */
6
14
  V_FOR = "v-for",
15
+ /** Event handling directives. */
7
16
  V_ON = "v-on",
17
+ /** Attribute binding directives. */
8
18
  V_BIND = "v-bind",
19
+ /** Two-way data binding directives. */
9
20
  V_MODEL = "v-model",
21
+ /** Slot content insertion directives. */
10
22
  V_RESIZE = "v-resize",
23
+ /** Intersection observer directives. */
11
24
  V_INTERSECTION = "v-intersection"
12
25
  }
@@ -4,6 +4,11 @@ import { VConditionalDirectiveContext } from "./VConditionalDirectiveContext";
4
4
  import { VDirective } from "./VDirective";
5
5
  import { VDirectiveParseContext } from "./VDirectiveParseContext";
6
6
  import { VDOMUpdater } from "../VDOMUpdater";
7
+ /**
8
+ * Base class for conditional directives such as v-if, v-else-if, and v-else.
9
+ * This class manages the rendering of the associated virtual node based on the evaluation of the directive's condition.
10
+ * It also coordinates with other related conditional directives to ensure only one block is rendered at a time.
11
+ */
7
12
  export declare abstract class VConditionalDirective implements VDirective {
8
13
  #private;
9
14
  /**
@@ -1,5 +1,9 @@
1
1
  import { VDirectiveParseContext } from "./VDirectiveParseContext";
2
2
  import { VDirectiveParser } from "./VDirectiveParser";
3
+ /**
4
+ * Registry for managing directive parsers.
5
+ * This class allows registering, unregistering, and finding directive parsers.
6
+ */
3
7
  export declare class VDirectiveParserRegistry {
4
8
  #private;
5
9
  /**
@@ -0,0 +1,105 @@
1
+ import { VNode } from "../VNode";
2
+ import { VBindingsPreparer } from "../VBindingsPreparer";
3
+ import { VDirective } from "./VDirective";
4
+ import { VDirectiveParseContext } from "./VDirectiveParseContext";
5
+ import { VDOMUpdater } from "../VDOMUpdater";
6
+ /**
7
+ * Configuration options for the v-performance directive.
8
+ */
9
+ export interface VPerformanceOptions {
10
+ /**
11
+ * The type(s) of performance entries to observe.
12
+ * Can be a single type or an array of types.
13
+ * Common types: 'mark', 'measure', 'navigation', 'resource', 'paint', 'element', 'largest-contentful-paint', 'layout-shift'
14
+ */
15
+ entryTypes?: string | string[];
16
+ /**
17
+ * Whether to include buffered entries (entries that occurred before the observer was created).
18
+ * Default: false
19
+ */
20
+ buffered?: boolean;
21
+ }
22
+ /**
23
+ * Directive for observing performance entries using PerformanceObserver.
24
+ * The `v-performance` directive allows you to monitor various performance metrics.
25
+ *
26
+ * Example usage:
27
+ * <div v-performance="handlePerformance">Performance monitoring</div>
28
+ * <div v-performance="{ handler: handlePerformance, options: { entryTypes: ['measure', 'mark'], buffered: true } }">
29
+ * Advanced monitoring
30
+ * </div>
31
+ *
32
+ * The handler receives PerformanceObserverEntryList and PerformanceObserver as the first two arguments,
33
+ * and $ctx as the third:
34
+ * handlePerformance(list, observer, $ctx) {
35
+ * list.getEntries().forEach(entry => {
36
+ * console.log(`${entry.entryType}: ${entry.name} - ${entry.duration}ms`);
37
+ * });
38
+ * }
39
+ *
40
+ * This directive is useful for monitoring application performance, custom metrics,
41
+ * and identifying performance bottlenecks.
42
+ */
43
+ export declare class VPerformanceDirective implements VDirective {
44
+ #private;
45
+ /**
46
+ * @param context The context for parsing the directive.
47
+ */
48
+ constructor(context: VDirectiveParseContext);
49
+ /**
50
+ * @inheritdoc
51
+ */
52
+ get name(): string;
53
+ /**
54
+ * @inheritdoc
55
+ */
56
+ get vNode(): VNode;
57
+ /**
58
+ * @inheritdoc
59
+ */
60
+ get needsAnchor(): boolean;
61
+ /**
62
+ * @inheritdoc
63
+ */
64
+ get bindingsPreparer(): VBindingsPreparer | undefined;
65
+ /**
66
+ * @inheritdoc
67
+ */
68
+ get domUpdater(): VDOMUpdater | undefined;
69
+ /**
70
+ * @inheritdoc
71
+ */
72
+ get templatize(): boolean;
73
+ /**
74
+ * @inheritdoc
75
+ */
76
+ get dependentIdentifiers(): string[];
77
+ /**
78
+ * @inheritdoc
79
+ */
80
+ get onMount(): (() => void) | undefined;
81
+ /**
82
+ * @inheritdoc
83
+ */
84
+ get onMounted(): (() => void) | undefined;
85
+ /**
86
+ * @inheritdoc
87
+ */
88
+ get onUpdate(): (() => void) | undefined;
89
+ /**
90
+ * @inheritdoc
91
+ */
92
+ get onUpdated(): (() => void) | undefined;
93
+ /**
94
+ * @inheritdoc
95
+ */
96
+ get onUnmount(): (() => void) | undefined;
97
+ /**
98
+ * @inheritdoc
99
+ */
100
+ get onUnmounted(): (() => void) | undefined;
101
+ /**
102
+ * @inheritdoc
103
+ */
104
+ destroy(): void;
105
+ }
@@ -9,6 +9,7 @@ import { VDOMUpdater } from "../VDOMUpdater";
9
9
  *
10
10
  * Example usage:
11
11
  * <div v-resize="handleResize">Resizable content</div>
12
+ * <div v-resize="handleResize" :options.resize="{box: 'border-box'}">Resizable content</div>
12
13
  *
13
14
  * The handler receives ResizeObserverEntry array as the first argument and $ctx as the second:
14
15
  * handleResize(entries, $ctx) {
@@ -16,6 +17,10 @@ import { VDOMUpdater } from "../VDOMUpdater";
16
17
  * console.log(`Size: ${width}x${height}`);
17
18
  * }
18
19
  *
20
+ * Options can be provided via :options or :options.resize attribute:
21
+ * :options="{box: 'border-box'}"
22
+ * :options.resize="{box: 'content-box'}"
23
+ *
19
24
  * This directive is useful for responsive layouts, charts, and other components
20
25
  * that need to adapt to size changes.
21
26
  */
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Utility class for analyzing JavaScript expressions to extract variable and function dependencies.
3
+ */
1
4
  export declare class ExpressionUtils {
2
5
  /**
3
6
  * Extracts variable and function names used in the expression.
@@ -2,8 +2,12 @@
2
2
  * Log level enumeration.
3
3
  */
4
4
  export declare enum LogLevel {
5
+ /** Debug level */
5
6
  DEBUG = "debug",
7
+ /** Info level */
6
8
  INFO = "info",
9
+ /** Warning level */
7
10
  WARN = "warn",
11
+ /** Error level */
8
12
  ERROR = "error"
9
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintjamsinc/ichigojs",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
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",