vite-plugin-vanjs 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.
package/README.md CHANGED
@@ -36,6 +36,7 @@ deno add npm:vite-plugin-vanjs@latest
36
36
  bun add vite-plugin-vanjs@latest
37
37
  ```
38
38
 
39
+
39
40
  ### Wiki
40
41
 
41
42
  For a complete guide on how to use the plugin, be sure to check the wiki:
package/jsx/jsx.d.ts CHANGED
@@ -34,7 +34,7 @@ declare global {
34
34
  declare namespace JSX {
35
35
  // type FunctionMaybe<T = unknown> = { (): T } | T;
36
36
  // type Element = VanNode;
37
- type FunctionMaybe<T = unknown> = (() => T) | StateView<T> | T;
37
+ type FunctionMaybe<T = unknown> = (() => T) | StateView<T> | T | undefined;
38
38
  type Element =
39
39
  | State<Primitive | null | undefined>
40
40
  | Node
@@ -402,61 +402,61 @@ declare namespace JSX {
402
402
  * Identifies the currently active element when DOM focus is on a composite widget, textbox,
403
403
  * group, or application.
404
404
  */
405
- "aria-activedescendant"?: string;
405
+ "aria-activedescendant"?: FunctionMaybe<string>;
406
406
  /**
407
407
  * Indicates whether assistive technologies will present all, or only parts of, the changed
408
408
  * region based on the change notifications defined by the aria-relevant attribute.
409
409
  */
410
- "aria-atomic"?: boolean | "false" | "true";
410
+ "aria-atomic"?: FunctionMaybe<boolean | "false" | "true">;
411
411
  /**
412
412
  * Indicates whether inputting text could trigger display of one or more predictions of the
413
413
  * user's intended value for an input and specifies how predictions would be presented if they
414
414
  * are made.
415
415
  */
416
- "aria-autocomplete"?: "none" | "inline" | "list" | "both";
416
+ "aria-autocomplete"?: FunctionMaybe<"none" | "inline" | "list" | "both">;
417
417
  /**
418
418
  * Indicates an element is being modified and that assistive technologies MAY want to wait until
419
419
  * the modifications are complete before exposing them to the user.
420
420
  */
421
- "aria-busy"?: boolean | "false" | "true";
421
+ "aria-busy"?: FunctionMaybe<boolean | "false" | "true">;
422
422
  /**
423
423
  * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
424
424
  *
425
425
  * @see aria-pressed @see aria-selected.
426
426
  */
427
- "aria-checked"?: boolean | "false" | "mixed" | "true";
427
+ "aria-checked"?: FunctionMaybe<boolean | "false" | "mixed" | "true">;
428
428
  /**
429
429
  * Defines the total number of columns in a table, grid, or treegrid.
430
430
  *
431
431
  * @see aria-colindex.
432
432
  */
433
- "aria-colcount"?: number | string;
433
+ "aria-colcount"?: FunctionMaybe<number | string>;
434
434
  /**
435
435
  * Defines an element's column index or position with respect to the total number of columns
436
436
  * within a table, grid, or treegrid.
437
437
  *
438
438
  * @see aria-colcount @see aria-colspan.
439
439
  */
440
- "aria-colindex"?: number | string;
440
+ "aria-colindex"?: FunctionMaybe<number | string>;
441
441
  /**
442
442
  * Defines the number of columns spanned by a cell or gridcell within a table, grid, or
443
443
  * treegrid.
444
444
  *
445
445
  * @see aria-colindex @see aria-rowspan.
446
446
  */
447
- "aria-colspan"?: number | string;
447
+ "aria-colspan"?: FunctionMaybe<number | string>;
448
448
  /**
449
449
  * Identifies the element (or elements) whose contents or presence are controlled by the current
450
450
  * element.
451
451
  *
452
452
  * @see aria-owns.
453
453
  */
454
- "aria-controls"?: string;
454
+ "aria-controls"?: FunctionMaybe<string>;
455
455
  /**
456
456
  * Indicates the element that represents the current item within a container or set of related
457
457
  * elements.
458
458
  */
459
- "aria-current"?:
459
+ "aria-current"?: FunctionMaybe<
460
460
  | boolean
461
461
  | "false"
462
462
  | "true"
@@ -464,61 +464,65 @@ declare namespace JSX {
464
464
  | "step"
465
465
  | "location"
466
466
  | "date"
467
- | "time";
467
+ | "time"
468
+ | undefined
469
+ >;
468
470
  /**
469
471
  * Identifies the element (or elements) that describes the object.
470
472
  *
471
473
  * @see aria-labelledby
472
474
  */
473
- "aria-describedby"?: string;
475
+ "aria-describedby"?: FunctionMaybe<string>;
474
476
  /**
475
477
  * Identifies the element that provides a detailed, extended description for the object.
476
478
  *
477
479
  * @see aria-describedby.
478
480
  */
479
- "aria-details"?: string;
481
+ "aria-details"?: FunctionMaybe<string>;
480
482
  /**
481
483
  * Indicates that the element is perceivable but disabled, so it is not editable or otherwise
482
484
  * operable.
483
485
  *
484
486
  * @see aria-hidden @see aria-readonly.
485
487
  */
486
- "aria-disabled"?: boolean | "false" | "true";
488
+ "aria-disabled"?: FunctionMaybe<boolean | "false" | "true">;
487
489
  /**
488
490
  * Indicates what functions can be performed when a dragged object is released on the drop
489
491
  * target.
490
492
  *
491
493
  * @deprecated In ARIA 1.1
492
494
  */
493
- "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup";
495
+ "aria-dropeffect"?: FunctionMaybe<
496
+ "none" | "copy" | "execute" | "link" | "move" | "popup"
497
+ >;
494
498
  /**
495
499
  * Identifies the element that provides an error message for the object.
496
500
  *
497
501
  * @see aria-invalid @see aria-describedby.
498
502
  */
499
- "aria-errormessage"?: string;
503
+ "aria-errormessage"?: FunctionMaybe<string>;
500
504
  /**
501
505
  * Indicates whether the element, or another grouping element it controls, is currently expanded
502
506
  * or collapsed.
503
507
  */
504
- "aria-expanded"?: boolean | "false" | "true";
508
+ "aria-expanded"?: FunctionMaybe<boolean | "false" | "true">;
505
509
  /**
506
510
  * Identifies the next element (or elements) in an alternate reading order of content which, at
507
511
  * the user's discretion, allows assistive technology to override the general default of reading
508
512
  * in document source order.
509
513
  */
510
- "aria-flowto"?: string;
514
+ "aria-flowto"?: FunctionMaybe<string>;
511
515
  /**
512
516
  * Indicates an element's "grabbed" state in a drag-and-drop operation.
513
517
  *
514
518
  * @deprecated In ARIA 1.1
515
519
  */
516
- "aria-grabbed"?: boolean | "false" | "true";
520
+ "aria-grabbed"?: FunctionMaybe<boolean | "false" | "true">;
517
521
  /**
518
522
  * Indicates the availability and type of interactive popup element, such as menu or dialog,
519
523
  * that can be triggered by an element.
520
524
  */
521
- "aria-haspopup"?:
525
+ "aria-haspopup"?: FunctionMaybe<
522
526
  | boolean
523
527
  | "false"
524
528
  | "true"
@@ -526,54 +530,57 @@ declare namespace JSX {
526
530
  | "listbox"
527
531
  | "tree"
528
532
  | "grid"
529
- | "dialog";
533
+ | "dialog"
534
+ >;
530
535
  /**
531
536
  * Indicates whether the element is exposed to an accessibility API.
532
537
  *
533
538
  * @see aria-disabled.
534
539
  */
535
- "aria-hidden"?: boolean | "false" | "true";
540
+ "aria-hidden"?: FunctionMaybe<boolean | "false" | "true">;
536
541
  /**
537
542
  * Indicates the entered value does not conform to the format expected by the application.
538
543
  *
539
544
  * @see aria-errormessage.
540
545
  */
541
- "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling";
546
+ "aria-invalid"?: FunctionMaybe<
547
+ boolean | "false" | "true" | "grammar" | "spelling"
548
+ >;
542
549
  /**
543
550
  * Indicates keyboard shortcuts that an author has implemented to activate or give focus to an
544
551
  * element.
545
552
  */
546
- "aria-keyshortcuts"?: string;
553
+ "aria-keyshortcuts"?: FunctionMaybe<string>;
547
554
  /**
548
555
  * Defines a string value that labels the current element.
549
556
  *
550
557
  * @see aria-labelledby.
551
558
  */
552
- "aria-label"?: string;
559
+ "aria-label"?: FunctionMaybe<string>;
553
560
  /**
554
561
  * Identifies the element (or elements) that labels the current element.
555
562
  *
556
563
  * @see aria-describedby.
557
564
  */
558
- "aria-labelledby"?: string;
565
+ "aria-labelledby"?: FunctionMaybe<string>;
559
566
  /** Defines the hierarchical level of an element within a structure. */
560
- "aria-level"?: number | string;
567
+ "aria-level"?: FunctionMaybe<number | string>;
561
568
  /**
562
569
  * Indicates that an element will be updated, and describes the types of updates the user
563
570
  * agents, assistive technologies, and user can expect from the live region.
564
571
  */
565
- "aria-live"?: "off" | "assertive" | "polite";
572
+ "aria-live"?: FunctionMaybe<"off" | "assertive" | "polite">;
566
573
  /** Indicates whether an element is modal when displayed. */
567
- "aria-modal"?: boolean | "false" | "true";
574
+ "aria-modal"?: FunctionMaybe<boolean | "false" | "true">;
568
575
  /** Indicates whether a text box accepts multiple lines of input or only a single line. */
569
- "aria-multiline"?: boolean | "false" | "true";
576
+ "aria-multiline"?: FunctionMaybe<boolean | "false" | "true">;
570
577
  /**
571
578
  * Indicates that the user may select more than one item from the current selectable
572
579
  * descendants.
573
580
  */
574
- "aria-multiselectable"?: boolean | "false" | "true";
581
+ "aria-multiselectable"?: FunctionMaybe<boolean | "false" | "true">;
575
582
  /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
576
- "aria-orientation"?: "horizontal" | "vertical";
583
+ "aria-orientation"?: FunctionMaybe<"horizontal" | "vertical">;
577
584
  /**
578
585
  * Identifies an element (or elements) in order to define a visual, functional, or contextual
579
586
  * parent/child relationship between DOM elements where the DOM hierarchy cannot be used to
@@ -581,39 +588,39 @@ declare namespace JSX {
581
588
  *
582
589
  * @see aria-controls.
583
590
  */
584
- "aria-owns"?: string;
591
+ "aria-owns"?: FunctionMaybe<string>;
585
592
  /**
586
593
  * Defines a short hint (a word or short phrase) intended to aid the user with data entry when
587
594
  * the control has no value. A hint could be a sample value or a brief description of the
588
595
  * expected format.
589
596
  */
590
- "aria-placeholder"?: string;
597
+ "aria-placeholder"?: FunctionMaybe<string>;
591
598
  /**
592
599
  * Defines an element's number or position in the current set of listitems or treeitems. Not
593
600
  * required if all elements in the set are present in the DOM.
594
601
  *
595
602
  * @see aria-setsize.
596
603
  */
597
- "aria-posinset"?: number | string;
604
+ "aria-posinset"?: FunctionMaybe<number | string>;
598
605
  /**
599
606
  * Indicates the current "pressed" state of toggle buttons.
600
607
  *
601
608
  * @see aria-checked @see aria-selected.
602
609
  */
603
- "aria-pressed"?: boolean | "false" | "mixed" | "true";
610
+ "aria-pressed"?: FunctionMaybe<boolean | "false" | "mixed" | "true">;
604
611
  /**
605
612
  * Indicates that the element is not editable, but is otherwise operable.
606
613
  *
607
614
  * @see aria-disabled.
608
615
  */
609
- "aria-readonly"?: boolean | "false" | "true";
616
+ "aria-readonly"?: FunctionMaybe<boolean | "false" | "true">;
610
617
  /**
611
618
  * Indicates what notifications the user agent will trigger when the accessibility tree within a
612
619
  * live region is modified.
613
620
  *
614
621
  * @see aria-atomic.
615
622
  */
616
- "aria-relevant"?:
623
+ "aria-relevant"?: FunctionMaybe<
617
624
  | "additions"
618
625
  | "additions removals"
619
626
  | "additions text"
@@ -623,57 +630,58 @@ declare namespace JSX {
623
630
  | "removals text"
624
631
  | "text"
625
632
  | "text additions"
626
- | "text removals";
633
+ | "text removals"
634
+ >;
627
635
  /** Indicates that user input is required on the element before a form may be submitted. */
628
- "aria-required"?: boolean | "false" | "true";
636
+ "aria-required"?: FunctionMaybe<boolean | "false" | "true">;
629
637
  /** Defines a human-readable, author-localized description for the role of an element. */
630
- "aria-roledescription"?: string;
638
+ "aria-roledescription"?: FunctionMaybe<string>;
631
639
  /**
632
640
  * Defines the total number of rows in a table, grid, or treegrid.
633
641
  *
634
642
  * @see aria-rowindex.
635
643
  */
636
- "aria-rowcount"?: number | string;
644
+ "aria-rowcount"?: FunctionMaybe<number | string>;
637
645
  /**
638
646
  * Defines an element's row index or position with respect to the total number of rows within a
639
647
  * table, grid, or treegrid.
640
648
  *
641
649
  * @see aria-rowcount @see aria-rowspan.
642
650
  */
643
- "aria-rowindex"?: number | string;
651
+ "aria-rowindex"?: FunctionMaybe<number | string>;
644
652
  /**
645
653
  * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
646
654
  *
647
655
  * @see aria-rowindex @see aria-colspan.
648
656
  */
649
- "aria-rowspan"?: number | string;
657
+ "aria-rowspan"?: FunctionMaybe<number | string>;
650
658
  /**
651
659
  * Indicates the current "selected" state of various widgets.
652
660
  *
653
661
  * @see aria-checked @see aria-pressed.
654
662
  */
655
- "aria-selected"?: boolean | "false" | "true";
663
+ "aria-selected"?: FunctionMaybe<boolean | "false" | "true">;
656
664
  /**
657
665
  * Defines the number of items in the current set of listitems or treeitems. Not required if all
658
666
  * elements in the set are present in the DOM.
659
667
  *
660
668
  * @see aria-posinset.
661
669
  */
662
- "aria-setsize"?: number | string;
670
+ "aria-setsize"?: FunctionMaybe<number | string>;
663
671
  /** Indicates if items in a table or grid are sorted in ascending or descending order. */
664
- "aria-sort"?: "none" | "ascending" | "descending" | "other";
672
+ "aria-sort"?: FunctionMaybe<"none" | "ascending" | "descending" | "other">;
665
673
  /** Defines the maximum allowed value for a range widget. */
666
- "aria-valuemax"?: number | string;
674
+ "aria-valuemax"?: FunctionMaybe<number | string>;
667
675
  /** Defines the minimum allowed value for a range widget. */
668
- "aria-valuemin"?: number | string;
676
+ "aria-valuemin"?: FunctionMaybe<number | string>;
669
677
  /**
670
678
  * Defines the current value for a range widget.
671
679
  *
672
680
  * @see aria-valuetext.
673
681
  */
674
- "aria-valuenow"?: number | string;
682
+ "aria-valuenow"?: FunctionMaybe<number | string>;
675
683
  /** Defines the human readable text alternative of aria-valuenow for a range widget. */
676
- "aria-valuetext"?: string;
684
+ "aria-valuetext"?: FunctionMaybe<string>;
677
685
  role?: FunctionMaybe<
678
686
  | "alert"
679
687
  | "alertdialog"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vanjs",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "author": "thednp",
5
5
  "license": "MIT",
6
6
  "description": "A mini meta-framework for VanJS powered by Vite",
@@ -87,7 +87,7 @@
87
87
  "vanjs-ext": "^0.6.2"
88
88
  },
89
89
  "devDependencies": {
90
- "@types/node": "^22.15.3",
90
+ "@types/node": "^22.15.12",
91
91
  "@vitest/browser": "^3.1.3",
92
92
  "@vitest/coverage-istanbul": "^3.1.3",
93
93
  "@vitest/ui": "^3.1.3",
package/plugin/index.mjs CHANGED
@@ -71,8 +71,7 @@ export default function VitePluginVanJS(options = {}) {
71
71
  include: [
72
72
  "vanjs-core",
73
73
  "vanjs-ext",
74
- "mini-van-plate/van-plate",
75
- "mini-van-plate/shared",
74
+ "mini-van-plate",
76
75
  ],
77
76
  },
78
77
  ssr: {