@mintjamsinc/ichigojs 0.1.8 → 0.1.10
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.
- package/README.md +71 -1
- package/dist/ichigo.esm.js +271 -6
- package/dist/ichigo.esm.js.map +1 -1
- package/dist/ichigo.esm.min.js +1 -1
- package/dist/ichigo.esm.min.js.map +1 -1
- package/dist/ichigo.umd.js +271 -6
- package/dist/ichigo.umd.js.map +1 -1
- package/dist/ichigo.umd.min.js +1 -1
- package/dist/ichigo.umd.min.js.map +1 -1
- package/dist/types/ichigo/directives/StandardDirectiveName.d.ts +16 -1
- package/dist/types/ichigo/directives/VConditionalDirective.d.ts +5 -0
- package/dist/types/ichigo/directives/VDirectiveParserRegistry.d.ts +4 -0
- package/dist/types/ichigo/directives/VPerformanceDirective.d.ts +95 -0
- package/dist/types/ichigo/directives/VResizeDirective.d.ts +5 -0
- package/dist/types/ichigo/util/ExpressionUtils.d.ts +3 -0
- package/dist/types/ichigo/util/LogLevel.d.ts +4 -0
- package/package.json +1 -1
@@ -1,12 +1,27 @@
|
|
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
|
+
/** Resize observer directives. */
|
10
22
|
V_RESIZE = "v-resize",
|
11
|
-
|
23
|
+
/** Intersection observer directives. */
|
24
|
+
V_INTERSECTION = "v-intersection",
|
25
|
+
/** Performance observer directives. */
|
26
|
+
V_PERFORMANCE = "v-performance"
|
12
27
|
}
|
@@ -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,95 @@
|
|
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
|
+
* Directive for observing performance metrics using PerformanceObserver.
|
8
|
+
* The `v-performance` directive allows you to monitor various performance entries.
|
9
|
+
*
|
10
|
+
* Example usage:
|
11
|
+
* <div v-performance="handlePerformance">Performance monitoring</div>
|
12
|
+
* <div v-performance="handlePerformance" :options.performance="{entryTypes: ['measure']}">Performance monitoring</div>
|
13
|
+
*
|
14
|
+
* By default (without options), it observes 'mark' and 'measure' entry types.
|
15
|
+
*
|
16
|
+
* The handler receives PerformanceObserverEntryList, PerformanceObserver, options (with droppedEntriesCount), and $ctx as arguments:
|
17
|
+
* handlePerformance(entries, observer, options, $ctx) {
|
18
|
+
* entries.getEntries().forEach(entry => {
|
19
|
+
* console.log(`${entry.name}: ${entry.duration}ms`);
|
20
|
+
* });
|
21
|
+
* if (options?.droppedEntriesCount) {
|
22
|
+
* console.log(`Dropped entries: ${options.droppedEntriesCount}`);
|
23
|
+
* }
|
24
|
+
* }
|
25
|
+
*
|
26
|
+
* Options can be provided via :options or :options.performance attribute:
|
27
|
+
* :options="{entryTypes: ['measure', 'mark']}"
|
28
|
+
* :options.performance="{type: 'navigation', buffered: true}"
|
29
|
+
*
|
30
|
+
* This directive is useful for performance monitoring, profiling, and identifying
|
31
|
+
* performance bottlenecks in your application.
|
32
|
+
*/
|
33
|
+
export declare class VPerformanceDirective implements VDirective {
|
34
|
+
#private;
|
35
|
+
/**
|
36
|
+
* @param context The context for parsing the directive.
|
37
|
+
*/
|
38
|
+
constructor(context: VDirectiveParseContext);
|
39
|
+
/**
|
40
|
+
* @inheritdoc
|
41
|
+
*/
|
42
|
+
get name(): string;
|
43
|
+
/**
|
44
|
+
* @inheritdoc
|
45
|
+
*/
|
46
|
+
get vNode(): VNode;
|
47
|
+
/**
|
48
|
+
* @inheritdoc
|
49
|
+
*/
|
50
|
+
get needsAnchor(): boolean;
|
51
|
+
/**
|
52
|
+
* @inheritdoc
|
53
|
+
*/
|
54
|
+
get bindingsPreparer(): VBindingsPreparer | undefined;
|
55
|
+
/**
|
56
|
+
* @inheritdoc
|
57
|
+
*/
|
58
|
+
get domUpdater(): VDOMUpdater | undefined;
|
59
|
+
/**
|
60
|
+
* @inheritdoc
|
61
|
+
*/
|
62
|
+
get templatize(): boolean;
|
63
|
+
/**
|
64
|
+
* @inheritdoc
|
65
|
+
*/
|
66
|
+
get dependentIdentifiers(): string[];
|
67
|
+
/**
|
68
|
+
* @inheritdoc
|
69
|
+
*/
|
70
|
+
get onMount(): (() => void) | undefined;
|
71
|
+
/**
|
72
|
+
* @inheritdoc
|
73
|
+
*/
|
74
|
+
get onMounted(): (() => void) | undefined;
|
75
|
+
/**
|
76
|
+
* @inheritdoc
|
77
|
+
*/
|
78
|
+
get onUpdate(): (() => void) | undefined;
|
79
|
+
/**
|
80
|
+
* @inheritdoc
|
81
|
+
*/
|
82
|
+
get onUpdated(): (() => void) | undefined;
|
83
|
+
/**
|
84
|
+
* @inheritdoc
|
85
|
+
*/
|
86
|
+
get onUnmount(): (() => void) | undefined;
|
87
|
+
/**
|
88
|
+
* @inheritdoc
|
89
|
+
*/
|
90
|
+
get onUnmounted(): (() => void) | undefined;
|
91
|
+
/**
|
92
|
+
* @inheritdoc
|
93
|
+
*/
|
94
|
+
destroy(): void;
|
95
|
+
}
|
@@ -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
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mintjamsinc/ichigojs",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.10",
|
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",
|