@firstprateek/vastu 0.0.0-stage → 1.0.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.
Files changed (114) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +51 -2
  3. package/custom-elements.json +3046 -0
  4. package/dist/dev/all.d.ts +9 -0
  5. package/dist/dev/all.d.ts.map +1 -0
  6. package/dist/dev/all.js +10 -0
  7. package/dist/dev/all.js.map +1 -0
  8. package/dist/dev/button/button.d.ts +98 -0
  9. package/dist/dev/button/button.d.ts.map +1 -0
  10. package/dist/dev/button/button.js +292 -0
  11. package/dist/dev/button/button.js.map +1 -0
  12. package/dist/dev/button/index.d.ts +4 -0
  13. package/dist/dev/button/index.d.ts.map +1 -0
  14. package/dist/dev/button/index.js +5 -0
  15. package/dist/dev/button/index.js.map +1 -0
  16. package/dist/dev/checkbox/checkbox.d.ts +71 -0
  17. package/dist/dev/checkbox/checkbox.d.ts.map +1 -0
  18. package/dist/dev/checkbox/checkbox.js +232 -0
  19. package/dist/dev/checkbox/checkbox.js.map +1 -0
  20. package/dist/dev/checkbox/index.d.ts +3 -0
  21. package/dist/dev/checkbox/index.d.ts.map +1 -0
  22. package/dist/dev/checkbox/index.js +5 -0
  23. package/dist/dev/checkbox/index.js.map +1 -0
  24. package/dist/dev/core/define.d.ts +3 -0
  25. package/dist/dev/core/define.d.ts.map +1 -0
  26. package/dist/dev/core/define.js +6 -0
  27. package/dist/dev/core/define.js.map +1 -0
  28. package/dist/dev/core/dev-mode.d.ts +6 -0
  29. package/dist/dev/core/dev-mode.d.ts.map +1 -0
  30. package/dist/dev/core/dev-mode.js +6 -0
  31. package/dist/dev/core/dev-mode.js.map +1 -0
  32. package/dist/dev/core/focus-ring.d.ts +3 -0
  33. package/dist/dev/core/focus-ring.d.ts.map +1 -0
  34. package/dist/dev/core/focus-ring.js +14 -0
  35. package/dist/dev/core/focus-ring.js.map +1 -0
  36. package/dist/dev/core/form-control.d.ts +47 -0
  37. package/dist/dev/core/form-control.d.ts.map +1 -0
  38. package/dist/dev/core/form-control.js +75 -0
  39. package/dist/dev/core/form-control.js.map +1 -0
  40. package/dist/dev/core/warn.d.ts +12 -0
  41. package/dist/dev/core/warn.d.ts.map +1 -0
  42. package/dist/dev/core/warn.js +35 -0
  43. package/dist/dev/core/warn.js.map +1 -0
  44. package/dist/dev/dialog/dialog.d.ts +77 -0
  45. package/dist/dev/dialog/dialog.d.ts.map +1 -0
  46. package/dist/dev/dialog/dialog.js +253 -0
  47. package/dist/dev/dialog/dialog.js.map +1 -0
  48. package/dist/dev/dialog/index.d.ts +4 -0
  49. package/dist/dev/dialog/index.d.ts.map +1 -0
  50. package/dist/dev/dialog/index.js +5 -0
  51. package/dist/dev/dialog/index.js.map +1 -0
  52. package/dist/dev/menu/index.d.ts +3 -0
  53. package/dist/dev/menu/index.d.ts.map +1 -0
  54. package/dist/dev/menu/index.js +5 -0
  55. package/dist/dev/menu/index.js.map +1 -0
  56. package/dist/dev/menu/menu.d.ts +71 -0
  57. package/dist/dev/menu/menu.d.ts.map +1 -0
  58. package/dist/dev/menu/menu.js +330 -0
  59. package/dist/dev/menu/menu.js.map +1 -0
  60. package/dist/dev/switch/index.d.ts +3 -0
  61. package/dist/dev/switch/index.d.ts.map +1 -0
  62. package/dist/dev/switch/index.js +5 -0
  63. package/dist/dev/switch/index.js.map +1 -0
  64. package/dist/dev/switch/switch.d.ts +69 -0
  65. package/dist/dev/switch/switch.d.ts.map +1 -0
  66. package/dist/dev/switch/switch.js +213 -0
  67. package/dist/dev/switch/switch.js.map +1 -0
  68. package/dist/dev/tabs/index.d.ts +3 -0
  69. package/dist/dev/tabs/index.d.ts.map +1 -0
  70. package/dist/dev/tabs/index.js +5 -0
  71. package/dist/dev/tabs/index.js.map +1 -0
  72. package/dist/dev/tabs/tabs.d.ts +64 -0
  73. package/dist/dev/tabs/tabs.d.ts.map +1 -0
  74. package/dist/dev/tabs/tabs.js +212 -0
  75. package/dist/dev/tabs/tabs.js.map +1 -0
  76. package/dist/dev/text-field/index.d.ts +3 -0
  77. package/dist/dev/text-field/index.d.ts.map +1 -0
  78. package/dist/dev/text-field/index.js +5 -0
  79. package/dist/dev/text-field/index.js.map +1 -0
  80. package/dist/dev/text-field/text-field.d.ts +91 -0
  81. package/dist/dev/text-field/text-field.d.ts.map +1 -0
  82. package/dist/dev/text-field/text-field.js +267 -0
  83. package/dist/dev/text-field/text-field.js.map +1 -0
  84. package/dist/dev/toast/index.d.ts +4 -0
  85. package/dist/dev/toast/index.d.ts.map +1 -0
  86. package/dist/dev/toast/index.js +5 -0
  87. package/dist/dev/toast/index.js.map +1 -0
  88. package/dist/dev/toast/toast.d.ts +71 -0
  89. package/dist/dev/toast/toast.d.ts.map +1 -0
  90. package/dist/dev/toast/toast.js +258 -0
  91. package/dist/dev/toast/toast.js.map +1 -0
  92. package/dist/prod/all.js +10 -0
  93. package/dist/prod/button/button.js +292 -0
  94. package/dist/prod/button/index.js +5 -0
  95. package/dist/prod/checkbox/checkbox.js +232 -0
  96. package/dist/prod/checkbox/index.js +5 -0
  97. package/dist/prod/core/define.js +6 -0
  98. package/dist/prod/core/dev-mode.js +1 -0
  99. package/dist/prod/core/focus-ring.js +14 -0
  100. package/dist/prod/core/form-control.js +75 -0
  101. package/dist/prod/core/warn.js +2 -0
  102. package/dist/prod/dialog/dialog.js +253 -0
  103. package/dist/prod/dialog/index.js +5 -0
  104. package/dist/prod/menu/index.js +5 -0
  105. package/dist/prod/menu/menu.js +330 -0
  106. package/dist/prod/switch/index.js +5 -0
  107. package/dist/prod/switch/switch.js +213 -0
  108. package/dist/prod/tabs/index.js +5 -0
  109. package/dist/prod/tabs/tabs.js +212 -0
  110. package/dist/prod/text-field/index.js +5 -0
  111. package/dist/prod/text-field/text-field.js +267 -0
  112. package/dist/prod/toast/index.js +5 -0
  113. package/dist/prod/toast/toast.js +258 -0
  114. package/package.json +95 -3
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026 firstprateek
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,52 @@
1
- # Temporary Holding Version
1
+ # @firstprateek/vastu
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Accessible, themeable web components built with [Lit](https://lit.dev/), described in a machine-readable
4
+ manifest that drives their docs, their tests and the tools agents use.
5
+
6
+ **[Docs and live examples](https://firstprateek.github.io/vastu/)** · [Source](https://github.com/firstprateek/vastu)
7
+
8
+ Components: `va-button`, `va-checkbox`, `va-switch`, `va-text-field`, `va-tabs`, `va-dialog`, `va-menu`, `va-toast`.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @firstprateek/vastu @firstprateek/vastu-tokens
14
+ ```
15
+
16
+ ## Use
17
+
18
+ Load one brand stylesheet once per page, then import the components you use:
19
+
20
+ ```js
21
+ import '@firstprateek/vastu-tokens/vastu.css'; // or lekha.css
22
+ import '@firstprateek/vastu/button'; // or '@firstprateek/vastu/all'
23
+ ```
24
+
25
+ ```html
26
+ <va-button commandfor="confirm" command="--show">Delete project</va-button>
27
+ <va-dialog id="confirm" heading="Delete this project?">
28
+ <p>This can't be undone.</p>
29
+ <va-button slot="footer" variant="secondary" commandfor="confirm" command="--close">Cancel</va-button>
30
+ <va-button slot="footer" variant="danger">Delete</va-button>
31
+ </va-dialog>
32
+ ```
33
+
34
+ Set `data-va-mode="light|dark|high-contrast"` on `<html>` to choose a mode; without it, the mode follows
35
+ the user's system. Components work in plain HTML, React 19, Vue and Svelte, and under a strict Content
36
+ Security Policy with Trusted Types.
37
+
38
+ The development build (the `development` export condition, used by Vite and webpack in dev mode) logs a
39
+ warning with the exact fix when a component is used wrongly, such as a button with no accessible name.
40
+ The production build drops those warnings.
41
+
42
+ ## For agents and tooling
43
+
44
+ - `custom-elements.json` ships in this package (`@firstprateek/vastu/custom-elements.json`), with the
45
+ keyboard behaviour, accessibility notes and usage guidance of each component.
46
+ - [`@firstprateek/vastu-lint`](https://www.npmjs.com/package/@firstprateek/vastu-lint) checks markup against it.
47
+ - [`@firstprateek/vastu-mcp`](https://www.npmjs.com/package/@firstprateek/vastu-mcp) serves it to agents over MCP.
48
+ - [`llms.txt`](https://firstprateek.github.io/vastu/llms.txt) and [`llms-full.txt`](https://firstprateek.github.io/vastu/llms-full.txt).
49
+
50
+ ## License
51
+
52
+ ISC