@mintjamsinc/ichigojs 0.1.0
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/LICENSE +21 -0
- package/README.md +292 -0
- package/dist/ichigo.esm.js +9517 -0
- package/dist/ichigo.esm.js.map +1 -0
- package/dist/ichigo.esm.min.js +2 -0
- package/dist/ichigo.esm.min.js.map +1 -0
- package/dist/ichigo.umd.js +9525 -0
- package/dist/ichigo.umd.js.map +1 -0
- package/dist/ichigo.umd.min.js +2 -0
- package/dist/ichigo.umd.min.js.map +1 -0
- package/dist/types/ichigo/VApplication.d.ts +66 -0
- package/dist/types/ichigo/VApplicationOptions.d.ts +28 -0
- package/dist/types/ichigo/VBindings.d.ts +9 -0
- package/dist/types/ichigo/VBindingsPreparer.d.ts +23 -0
- package/dist/types/ichigo/VCloser.d.ts +9 -0
- package/dist/types/ichigo/VComponent.d.ts +2 -0
- package/dist/types/ichigo/VComponentRegistry.d.ts +2 -0
- package/dist/types/ichigo/VDOM.d.ts +30 -0
- package/dist/types/ichigo/VDOMUpdater.d.ts +17 -0
- package/dist/types/ichigo/VNode.d.ts +102 -0
- package/dist/types/ichigo/VNodeInit.d.ts +29 -0
- package/dist/types/ichigo/VTextEvaluator.d.ts +29 -0
- package/dist/types/ichigo/VUpdateContext.d.ts +21 -0
- package/dist/types/ichigo/components/VComponent.d.ts +2 -0
- package/dist/types/ichigo/components/VComponentRegistry.d.ts +2 -0
- package/dist/types/ichigo/directives/StandardDirectiveName.d.ts +10 -0
- package/dist/types/ichigo/directives/VBindDirective.d.ts +61 -0
- package/dist/types/ichigo/directives/VBindingsPreparer.d.ts +24 -0
- package/dist/types/ichigo/directives/VConditionalDirective.d.ts +47 -0
- package/dist/types/ichigo/directives/VConditionalDirectiveContext.d.ts +19 -0
- package/dist/types/ichigo/directives/VDOMUpdater.d.ts +17 -0
- package/dist/types/ichigo/directives/VDirective.d.ts +48 -0
- package/dist/types/ichigo/directives/VDirectiveManager.d.ts +39 -0
- package/dist/types/ichigo/directives/VDirectiveParseContext.d.ts +19 -0
- package/dist/types/ichigo/directives/VDirectiveParser.d.ts +31 -0
- package/dist/types/ichigo/directives/VDirectiveParserRegistry.d.ts +26 -0
- package/dist/types/ichigo/directives/VElseDirective.d.ts +21 -0
- package/dist/types/ichigo/directives/VElseIfDirective.d.ts +20 -0
- package/dist/types/ichigo/directives/VForDirective.d.ts +51 -0
- package/dist/types/ichigo/directives/VIfDirective.d.ts +20 -0
- package/dist/types/ichigo/directives/VModelDirective.d.ts +47 -0
- package/dist/types/ichigo/directives/VOnDirective.d.ts +49 -0
- package/dist/types/ichigo/directives/VShowDirective.d.ts +57 -0
- package/dist/types/ichigo/directives/VStandardDirectiveParser.d.ts +20 -0
- package/dist/types/ichigo/util/BindingsUtils.d.ts +10 -0
- package/dist/types/ichigo/util/ExpressionUtils.d.ts +15 -0
- package/dist/types/ichigo/util/LogLevel.d.ts +9 -0
- package/dist/types/ichigo/util/ReactiveProxy.d.ts +34 -0
- package/dist/types/ichigo/util/VLogLevel.d.ts +9 -0
- package/dist/types/ichigo/util/VLogManager.d.ts +9 -0
- package/dist/types/ichigo/util/VLogger.d.ts +9 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +64 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
import { VNode } from "../VNode";
|
2
|
+
/**
|
3
|
+
* The context for parsing a directive.
|
4
|
+
* This interface provides the necessary information required during the parsing of a directive from an HTML attribute.
|
5
|
+
* It includes references to the application instance, the virtual node being processed, the HTML element containing the directive, and the specific attribute representing the directive.
|
6
|
+
* Implementations of directive parsers can utilize this context to access relevant data and perform parsing operations effectively.
|
7
|
+
*/
|
8
|
+
export interface VDirectiveParseContext {
|
9
|
+
/**
|
10
|
+
* The virtual node being processed.
|
11
|
+
* This property represents the specific virtual node that is associated with the directive being parsed.
|
12
|
+
*/
|
13
|
+
vNode: VNode;
|
14
|
+
/**
|
15
|
+
* The attribute representing the directive.
|
16
|
+
* This property contains the actual HTML attribute that holds the directive information, allowing parsers to extract its name and value.
|
17
|
+
*/
|
18
|
+
attribute: Attr;
|
19
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { VDirective } from "./VDirective";
|
2
|
+
import { VDirectiveParseContext } from "./VDirectiveParseContext";
|
3
|
+
/**
|
4
|
+
* Interface for parsing directives from HTML attributes.
|
5
|
+
* Each implementation of this interface should provide logic to determine if it can parse a given attribute and to perform the parsing.
|
6
|
+
* Implementations should handle specific directive syntaxes and convert them into corresponding `VDirective` instances.
|
7
|
+
* Example implementations could include parsers for `v-bind`, `v-if`, `v-for`, and other custom directives.
|
8
|
+
* This interface helps in modularizing the directive parsing logic, making it easier to extend and maintain.
|
9
|
+
* When implementing this interface, ensure that the `canParse` method accurately identifies attributes that the parser can handle, and the `parse` method correctly transforms those attributes into directive instances.
|
10
|
+
* This design allows for a flexible and scalable approach to handling various directives in a templating system.
|
11
|
+
*/
|
12
|
+
export interface VDirectiveParser {
|
13
|
+
/**
|
14
|
+
* The name of the directive parser.
|
15
|
+
* This property provides a human-readable identifier for the parser, which can be useful for logging, debugging, or displaying information about the parser in user interfaces.
|
16
|
+
*/
|
17
|
+
get name(): string;
|
18
|
+
/**
|
19
|
+
* Determines if the parser can handle the given attribute.
|
20
|
+
* @param context The context containing the element and attribute to parse.
|
21
|
+
* @returns `true` if the parser can handle the attribute; otherwise, `false`.
|
22
|
+
*/
|
23
|
+
canParse(context: VDirectiveParseContext): boolean;
|
24
|
+
/**
|
25
|
+
* Parses the given attribute into a directive.
|
26
|
+
* @param context The context containing the element and attribute to parse.
|
27
|
+
* @returns The parsed directive.
|
28
|
+
* @throws Error if the attribute cannot be parsed by this parser.
|
29
|
+
*/
|
30
|
+
parse(context: VDirectiveParseContext): VDirective;
|
31
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { VDirectiveParseContext } from "./VDirectiveParseContext";
|
2
|
+
import { VDirectiveParser } from "./VDirectiveParser";
|
3
|
+
export declare class VDirectiveParserRegistry {
|
4
|
+
#private;
|
5
|
+
/**
|
6
|
+
* Gets the list of registered directive parsers.
|
7
|
+
* @returns The list of registered directive parsers.
|
8
|
+
*/
|
9
|
+
get parsers(): VDirectiveParser[];
|
10
|
+
/**
|
11
|
+
* Registers a directive parser.
|
12
|
+
* @param parser The directive parser to register.
|
13
|
+
*/
|
14
|
+
register(parser: VDirectiveParser): void;
|
15
|
+
/**
|
16
|
+
* Unregisters a directive parser.
|
17
|
+
* @param parser The directive parser to unregister.
|
18
|
+
*/
|
19
|
+
unregister(parser: VDirectiveParser): void;
|
20
|
+
/**
|
21
|
+
* Finds a directive parser that can parse the given context.
|
22
|
+
* @param context The context for parsing the directive.
|
23
|
+
* @returns A directive parser that can parse the given context, or null if no suitable parser is found.
|
24
|
+
*/
|
25
|
+
findParser(context: VDirectiveParseContext): VDirectiveParser | null;
|
26
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { VConditionalDirective } from "./VConditionalDirective";
|
2
|
+
import { VDirectiveParseContext } from "./VDirectiveParseContext";
|
3
|
+
/**
|
4
|
+
* Directive for conditional rendering in the virtual DOM.
|
5
|
+
* This directive renders an element if the preceding v-if or v-else-if directive evaluated to false.
|
6
|
+
* For example:
|
7
|
+
* <div v-else>This div is rendered if the previous v-if or v-else-if was false.</div>
|
8
|
+
* The element and its children are included in the DOM only if the preceding v-if or v-else-if expression evaluates to false.
|
9
|
+
* If the preceding expression is true, this element and its children are not rendered.
|
10
|
+
* This directive must be used immediately after a v-if or v-else-if directive.
|
11
|
+
*/
|
12
|
+
export declare class VElseDirective extends VConditionalDirective {
|
13
|
+
/**
|
14
|
+
* @param context The context for parsing the directive.
|
15
|
+
*/
|
16
|
+
constructor(context: VDirectiveParseContext);
|
17
|
+
/**
|
18
|
+
* @inheritdoc
|
19
|
+
*/
|
20
|
+
get name(): string;
|
21
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { VConditionalDirective } from "./VConditionalDirective";
|
2
|
+
import { VDirectiveParseContext } from "./VDirectiveParseContext";
|
3
|
+
/**
|
4
|
+
* Directive for conditional rendering in the virtual DOM.
|
5
|
+
* This directive renders an element based on a boolean expression, but only if preceding v-if or v-else-if directives were false.
|
6
|
+
* For example:
|
7
|
+
* <div v-else-if="isAlternativeVisible">This div is conditionally rendered.</div>
|
8
|
+
* The element and its children are included in the DOM only if the expression evaluates to true AND no preceding condition was met.
|
9
|
+
* This directive must be used after a v-if or another v-else-if directive.
|
10
|
+
*/
|
11
|
+
export declare class VElseIfDirective extends VConditionalDirective {
|
12
|
+
/**
|
13
|
+
* @param context The context for parsing the directive.
|
14
|
+
*/
|
15
|
+
constructor(context: VDirectiveParseContext);
|
16
|
+
/**
|
17
|
+
* @inheritdoc
|
18
|
+
*/
|
19
|
+
get name(): string;
|
20
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { VNode } from "../VNode";
|
2
|
+
import { VDirective } from "./VDirective";
|
3
|
+
import { VDirectiveParseContext } from "./VDirectiveParseContext";
|
4
|
+
import { VDOMUpdater } from "../VDOMUpdater";
|
5
|
+
import { VBindingsPreparer } from "../VBindingsPreparer";
|
6
|
+
/**
|
7
|
+
* Directive for rendering a list of items using a loop.
|
8
|
+
* This directive iterates over a collection and renders a template for each item.
|
9
|
+
* Example usage:
|
10
|
+
* <ul>
|
11
|
+
* <li v-for="item in items" :key="item.id">{{ item.name }}</li>
|
12
|
+
* </ul>
|
13
|
+
* In this example, the v-for directive iterates over the items array, rendering an <li> element for each item.
|
14
|
+
* The :key attribute is used to provide a unique identifier for each item, which helps with efficient updates and rendering.
|
15
|
+
* The directive supports iterating over arrays and objects. When iterating over an object, you can access both the key and value.
|
16
|
+
* For example:
|
17
|
+
* <div v-for="(value, key) in object">{{ key }}: {{ value }}</div>
|
18
|
+
* This will render each key-value pair in the object.
|
19
|
+
* Note that the v-for directive requires a unique key for each item to optimize rendering performance.
|
20
|
+
*/
|
21
|
+
export declare class VForDirective implements VDirective {
|
22
|
+
#private;
|
23
|
+
/**
|
24
|
+
* @param context The context for parsing the directive.
|
25
|
+
*/
|
26
|
+
constructor(context: VDirectiveParseContext);
|
27
|
+
/**
|
28
|
+
* @inheritdoc
|
29
|
+
*/
|
30
|
+
get name(): string;
|
31
|
+
/**
|
32
|
+
* @inheritdoc
|
33
|
+
*/
|
34
|
+
get vNode(): VNode;
|
35
|
+
/**
|
36
|
+
* @inheritdoc
|
37
|
+
*/
|
38
|
+
get needsAnchor(): boolean;
|
39
|
+
/**
|
40
|
+
* @inheritdoc
|
41
|
+
*/
|
42
|
+
get bindingsPreparer(): VBindingsPreparer | undefined;
|
43
|
+
/**
|
44
|
+
* @inheritdoc
|
45
|
+
*/
|
46
|
+
get domUpdater(): VDOMUpdater | undefined;
|
47
|
+
/**
|
48
|
+
* @inheritdoc
|
49
|
+
*/
|
50
|
+
destroy(): void;
|
51
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { VDirectiveParseContext } from "./VDirectiveParseContext";
|
2
|
+
import { VConditionalDirective } from "./VConditionalDirective";
|
3
|
+
/**
|
4
|
+
* Directive for conditional rendering in the virtual DOM.
|
5
|
+
* This directive conditionally renders elements based on a boolean expression.
|
6
|
+
* For example:
|
7
|
+
* <div v-if="isVisible">This div is conditionally rendered.</div>
|
8
|
+
* The element and its children are included in the DOM only if the expression evaluates to true.
|
9
|
+
* If the expression is false, the element and its children are not rendered.
|
10
|
+
*/
|
11
|
+
export declare class VIfDirective extends VConditionalDirective {
|
12
|
+
/**
|
13
|
+
* @param context The context for parsing the directive.
|
14
|
+
*/
|
15
|
+
constructor(context: VDirectiveParseContext);
|
16
|
+
/**
|
17
|
+
* @inheritdoc
|
18
|
+
*/
|
19
|
+
get name(): string;
|
20
|
+
}
|
@@ -0,0 +1,47 @@
|
|
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 two-way data binding on form input elements.
|
8
|
+
* This directive binds the value of an input element to a data property and updates the property when the input value changes.
|
9
|
+
* Example usage:
|
10
|
+
* <input v-model="username" />
|
11
|
+
* In this example, the v-model directive binds the value of the input element to the username data property.
|
12
|
+
* When the user types in the input field, the username property is automatically updated with the new value.
|
13
|
+
* This directive supports various input types, including text, checkbox, radio, and select elements.
|
14
|
+
* For checkboxes and radio buttons, it binds to boolean or specific values accordingly.
|
15
|
+
* For select elements, it binds to the selected option's value.
|
16
|
+
*/
|
17
|
+
export declare class VModelDirective implements VDirective {
|
18
|
+
#private;
|
19
|
+
/**
|
20
|
+
* @param context The context for parsing the directive.
|
21
|
+
*/
|
22
|
+
constructor(context: VDirectiveParseContext);
|
23
|
+
/**
|
24
|
+
* @inheritdoc
|
25
|
+
*/
|
26
|
+
get name(): string;
|
27
|
+
/**
|
28
|
+
* @inheritdoc
|
29
|
+
*/
|
30
|
+
get vNode(): VNode;
|
31
|
+
/**
|
32
|
+
* @inheritdoc
|
33
|
+
*/
|
34
|
+
get needsAnchor(): boolean;
|
35
|
+
/**
|
36
|
+
* @inheritdoc
|
37
|
+
*/
|
38
|
+
get bindingsPreparer(): VBindingsPreparer | undefined;
|
39
|
+
/**
|
40
|
+
* @inheritdoc
|
41
|
+
*/
|
42
|
+
get domUpdater(): VDOMUpdater | undefined;
|
43
|
+
/**
|
44
|
+
* @inheritdoc
|
45
|
+
*/
|
46
|
+
destroy(): void;
|
47
|
+
}
|
@@ -0,0 +1,49 @@
|
|
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 binding event listeners to DOM elements.
|
8
|
+
* The `v-on` directive allows you to listen to DOM events and execute specified methods when those events are triggered.
|
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
|
+
* Example usage:
|
11
|
+
* <button v-on:click="handleClick">Click Me</button>
|
12
|
+
* In this example, when the button is clicked, the `handleClick` method will be executed.
|
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
|
+
* The `v-on` directive supports event modifiers such as `.stop`, `.prevent`, `.capture`, `.self`, and `.once` to modify the behavior of the event listener.
|
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.
|
17
|
+
* Note that the methods referenced in the directive should be defined in the component's methods object.
|
18
|
+
*/
|
19
|
+
export declare class VOnDirective implements VDirective {
|
20
|
+
#private;
|
21
|
+
/**
|
22
|
+
* @param context The context for parsing the directive.
|
23
|
+
*/
|
24
|
+
constructor(context: VDirectiveParseContext);
|
25
|
+
/**
|
26
|
+
* @inheritdoc
|
27
|
+
*/
|
28
|
+
get name(): string;
|
29
|
+
/**
|
30
|
+
* @inheritdoc
|
31
|
+
*/
|
32
|
+
get vNode(): VNode;
|
33
|
+
/**
|
34
|
+
* @inheritdoc
|
35
|
+
*/
|
36
|
+
get needsAnchor(): boolean;
|
37
|
+
/**
|
38
|
+
* @inheritdoc
|
39
|
+
*/
|
40
|
+
get bindingsPreparer(): VBindingsPreparer | undefined;
|
41
|
+
/**
|
42
|
+
* @inheritdoc
|
43
|
+
*/
|
44
|
+
get domUpdater(): VDOMUpdater | undefined;
|
45
|
+
/**
|
46
|
+
* @inheritdoc
|
47
|
+
*/
|
48
|
+
destroy(): void;
|
49
|
+
}
|
@@ -0,0 +1,57 @@
|
|
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 conditionally displaying an element.
|
8
|
+
* This directive shows or hides an element based on a boolean expression.
|
9
|
+
* For example:
|
10
|
+
* <div v-show="isVisible">This element is conditionally visible.</div>
|
11
|
+
* The element is included in the DOM regardless of the expression's value, but its visibility is controlled via CSS (display property).
|
12
|
+
* If the expression evaluates to true, the element is visible; if false, it is hidden (display: none).
|
13
|
+
* This directive is useful for toggling visibility without removing the element from the DOM.
|
14
|
+
* Note that this directive does not support v-else or v-else-if.
|
15
|
+
*/
|
16
|
+
export declare class VShowDirective implements VDirective {
|
17
|
+
#private;
|
18
|
+
/**
|
19
|
+
* @param context The context for parsing the directive.
|
20
|
+
*/
|
21
|
+
constructor(context: VDirectiveParseContext);
|
22
|
+
/**
|
23
|
+
* @inheritdoc
|
24
|
+
*/
|
25
|
+
get name(): string;
|
26
|
+
/**
|
27
|
+
* @inheritdoc
|
28
|
+
*/
|
29
|
+
get vNode(): VNode;
|
30
|
+
/**
|
31
|
+
* @inheritdoc
|
32
|
+
*/
|
33
|
+
get needsAnchor(): boolean;
|
34
|
+
/**
|
35
|
+
* @inheritdoc
|
36
|
+
*/
|
37
|
+
get bindingsPreparer(): VBindingsPreparer | undefined;
|
38
|
+
/**
|
39
|
+
* @inheritdoc
|
40
|
+
*/
|
41
|
+
get domUpdater(): VDOMUpdater | undefined;
|
42
|
+
/**
|
43
|
+
* Makes the node visible by resetting its display style.
|
44
|
+
* If the node is already visible, no action is taken.
|
45
|
+
*/
|
46
|
+
visibleNode(): void;
|
47
|
+
/**
|
48
|
+
* Hides the node by setting its display style to "none".
|
49
|
+
* This effectively removes the node from the layout.
|
50
|
+
* If the node is already hidden, no action is taken.
|
51
|
+
*/
|
52
|
+
invisibleNode(): void;
|
53
|
+
/**
|
54
|
+
* @inheritdoc
|
55
|
+
*/
|
56
|
+
destroy(): void;
|
57
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { VDirective } from "./VDirective";
|
2
|
+
import { VDirectiveParseContext } from "./VDirectiveParseContext";
|
3
|
+
import { VDirectiveParser } from "./VDirectiveParser";
|
4
|
+
/**
|
5
|
+
* The directive parser for standard directives.
|
6
|
+
*/
|
7
|
+
export declare class VStandardDirectiveParser implements VDirectiveParser {
|
8
|
+
/**
|
9
|
+
* @inheritdoc
|
10
|
+
*/
|
11
|
+
get name(): string;
|
12
|
+
/**
|
13
|
+
* @inheritdoc
|
14
|
+
*/
|
15
|
+
canParse(context: VDirectiveParseContext): boolean;
|
16
|
+
/**
|
17
|
+
* @inheritdoc
|
18
|
+
*/
|
19
|
+
parse(context: VDirectiveParseContext): VDirective;
|
20
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { VBindings } from "../VBindings";
|
2
|
+
export declare class BindingsUtils {
|
3
|
+
/**
|
4
|
+
* Gets the identifiers that have changed between two sets of bindings.
|
5
|
+
* @param oldBindings The old set of bindings.
|
6
|
+
* @param newBindings The new set of bindings.
|
7
|
+
* @returns An array of identifiers that have changed.
|
8
|
+
*/
|
9
|
+
static getChangedIdentifiers(oldBindings: VBindings, newBindings: VBindings): string[];
|
10
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export declare class ExpressionUtils {
|
2
|
+
/**
|
3
|
+
* Extracts variable and function names used in the expression.
|
4
|
+
* @param expression The expression string to analyze.
|
5
|
+
* @param functionDependencies A dictionary mapping function names to their dependencies.
|
6
|
+
* @returns An array of identifier names.
|
7
|
+
*/
|
8
|
+
static extractIdentifiers(expression: string, functionDependencies: Record<string, string[]>): string[];
|
9
|
+
/**
|
10
|
+
* Analyzes the dependencies of functions in the provided dictionary.
|
11
|
+
* @param functions A dictionary mapping function names to their implementations.
|
12
|
+
* @returns A dictionary mapping function names to arrays of their dependencies.
|
13
|
+
*/
|
14
|
+
static analyzeFunctionDependencies(functions: Record<string, Function>): Record<string, string[]>;
|
15
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* Utility class for creating reactive proxies that automatically track changes.
|
3
|
+
*/
|
4
|
+
export declare class ReactiveProxy {
|
5
|
+
/**
|
6
|
+
* A WeakMap to store the original target for each proxy.
|
7
|
+
* This allows us to avoid creating multiple proxies for the same object.
|
8
|
+
*/
|
9
|
+
private static proxyMap;
|
10
|
+
/**
|
11
|
+
* Creates a reactive proxy for the given object.
|
12
|
+
* The proxy will call the onChange callback whenever a property is modified.
|
13
|
+
*
|
14
|
+
* @param target The object to make reactive.
|
15
|
+
* @param onChange Callback function to call when the object changes. Receives the changed key name.
|
16
|
+
* @returns A reactive proxy of the target object.
|
17
|
+
*/
|
18
|
+
static create<T extends object>(target: T, onChange: (changedKey?: string) => void): T;
|
19
|
+
/**
|
20
|
+
* Checks if the given object is a reactive proxy.
|
21
|
+
*
|
22
|
+
* @param obj The object to check.
|
23
|
+
* @returns True if the object is a reactive proxy, false otherwise.
|
24
|
+
*/
|
25
|
+
static isReactive(obj: any): boolean;
|
26
|
+
/**
|
27
|
+
* Unwraps a reactive proxy to get the original object.
|
28
|
+
* If the object is not a proxy, returns it as-is.
|
29
|
+
*
|
30
|
+
* @param obj The object to unwrap.
|
31
|
+
* @returns The original object.
|
32
|
+
*/
|
33
|
+
static unwrap<T>(obj: T): T;
|
34
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { VLogManager } from "./VLogManager";
|
2
|
+
export declare class VLogger {
|
3
|
+
#private;
|
4
|
+
constructor(name: string, logManager: VLogManager);
|
5
|
+
debug(message: string): void;
|
6
|
+
info(message: string): void;
|
7
|
+
warn(message: string): void;
|
8
|
+
error(message: string): void;
|
9
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { VDOM } from './ichigo/VDOM';
|
package/package.json
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"name": "@mintjamsinc/ichigojs",
|
3
|
+
"version": "0.1.0",
|
4
|
+
"description": "ichigo.js - Simple and intuitive reactive framework. Lightweight, fast, and user-friendly virtual DOM library",
|
5
|
+
"main": "./dist/ichigo.umd.js",
|
6
|
+
"module": "./dist/ichigo.esm.js",
|
7
|
+
"types": "./dist/types/index.d.ts",
|
8
|
+
"type": "module",
|
9
|
+
"author": "MintJams Inc.",
|
10
|
+
"license": "MIT",
|
11
|
+
"homepage": "https://github.com/mintjamsinc/ichigojs#readme",
|
12
|
+
"repository": {
|
13
|
+
"type": "git",
|
14
|
+
"url": "https://github.com/mintjamsinc/ichigojs.git"
|
15
|
+
},
|
16
|
+
"bugs": {
|
17
|
+
"url": "https://github.com/mintjamsinc/ichigojs/issues"
|
18
|
+
},
|
19
|
+
"keywords": [
|
20
|
+
"virtual-dom",
|
21
|
+
"reactive",
|
22
|
+
"framework",
|
23
|
+
"vdom",
|
24
|
+
"ui",
|
25
|
+
"typescript",
|
26
|
+
"vue-like",
|
27
|
+
"lightweight",
|
28
|
+
"reactive-proxy",
|
29
|
+
"computed-properties",
|
30
|
+
"two-way-binding"
|
31
|
+
],
|
32
|
+
"files": [
|
33
|
+
"dist/**/*",
|
34
|
+
"README.md",
|
35
|
+
"LICENSE"
|
36
|
+
],
|
37
|
+
"scripts": {
|
38
|
+
"build": "rollup -c",
|
39
|
+
"prepare": "npm run build",
|
40
|
+
"test": "npm run build && node --test"
|
41
|
+
},
|
42
|
+
"devDependencies": {
|
43
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
44
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
45
|
+
"@rollup/plugin-terser": "^0.4.4",
|
46
|
+
"esbuild": "^0.21.5",
|
47
|
+
"rollup": "^4.52.0",
|
48
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
49
|
+
"typedoc": "^0.28.13",
|
50
|
+
"typescript": "^5.9.2"
|
51
|
+
},
|
52
|
+
"exports": {
|
53
|
+
".": {
|
54
|
+
"import": "./dist/ichigo.esm.js",
|
55
|
+
"require": "./dist/ichigo.umd.js",
|
56
|
+
"types": "./dist/types/index.d.ts"
|
57
|
+
},
|
58
|
+
"./package.json": "./package.json"
|
59
|
+
},
|
60
|
+
"dependencies": {
|
61
|
+
"acorn": "^8.14.0",
|
62
|
+
"acorn-walk": "^8.3.4"
|
63
|
+
}
|
64
|
+
}
|