@mintjamsinc/ichigojs 0.1.9 → 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.
@@ -18,8 +18,10 @@ export declare enum StandardDirectiveName {
18
18
  V_BIND = "v-bind",
19
19
  /** Two-way data binding directives. */
20
20
  V_MODEL = "v-model",
21
- /** Slot content insertion directives. */
21
+ /** Resize observer directives. */
22
22
  V_RESIZE = "v-resize",
23
23
  /** Intersection observer directives. */
24
- V_INTERSECTION = "v-intersection"
24
+ V_INTERSECTION = "v-intersection",
25
+ /** Performance observer directives. */
26
+ V_PERFORMANCE = "v-performance"
25
27
  }
@@ -4,41 +4,31 @@ import { VDirective } from "./VDirective";
4
4
  import { VDirectiveParseContext } from "./VDirectiveParseContext";
5
5
  import { VDOMUpdater } from "../VDOMUpdater";
6
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.
7
+ * Directive for observing performance metrics using PerformanceObserver.
8
+ * The `v-performance` directive allows you to monitor various performance entries.
25
9
  *
26
10
  * Example usage:
27
11
  * <div v-performance="handlePerformance">Performance monitoring</div>
28
- * <div v-performance="{ handler: handlePerformance, options: { entryTypes: ['measure', 'mark'], buffered: true } }">
29
- * Advanced monitoring
30
- * </div>
12
+ * <div v-performance="handlePerformance" :options.performance="{entryTypes: ['measure']}">Performance monitoring</div>
31
13
  *
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`);
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`);
37
20
  * });
21
+ * if (options?.droppedEntriesCount) {
22
+ * console.log(`Dropped entries: ${options.droppedEntriesCount}`);
23
+ * }
38
24
  * }
39
25
  *
40
- * This directive is useful for monitoring application performance, custom metrics,
41
- * and identifying performance bottlenecks.
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.
42
32
  */
43
33
  export declare class VPerformanceDirective implements VDirective {
44
34
  #private;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintjamsinc/ichigojs",
3
- "version": "0.1.9",
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",