@g3nomaly/ui 0.3.3 → 0.3.5

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 (139) hide show
  1. package/README.md +49 -26
  2. package/dist/cli/adapter.d.ts +25 -8
  3. package/dist/cli/adapter.d.ts.map +1 -1
  4. package/dist/cli/adapter.js +34 -20
  5. package/dist/cli/adapter.js.map +1 -1
  6. package/dist/cli/afterInstall.d.ts +26 -0
  7. package/dist/cli/afterInstall.d.ts.map +1 -0
  8. package/dist/cli/afterInstall.js +54 -0
  9. package/dist/cli/afterInstall.js.map +1 -0
  10. package/dist/cli/commands/add.d.ts +8 -2
  11. package/dist/cli/commands/add.d.ts.map +1 -1
  12. package/dist/cli/commands/add.js +10 -5
  13. package/dist/cli/commands/add.js.map +1 -1
  14. package/dist/cli/commands/index.d.ts +1 -0
  15. package/dist/cli/commands/index.d.ts.map +1 -1
  16. package/dist/cli/commands/index.js +1 -0
  17. package/dist/cli/commands/index.js.map +1 -1
  18. package/dist/cli/commands/init.d.ts +16 -5
  19. package/dist/cli/commands/init.d.ts.map +1 -1
  20. package/dist/cli/commands/init.js +59 -13
  21. package/dist/cli/commands/init.js.map +1 -1
  22. package/dist/cli/commands/ls.d.ts +1 -1
  23. package/dist/cli/commands/ls.js +1 -1
  24. package/dist/cli/commands/ls.js.map +1 -1
  25. package/dist/cli/commands/manifest.js +1 -1
  26. package/dist/cli/commands/manifest.js.map +1 -1
  27. package/dist/cli/commands/source.d.ts +4 -1
  28. package/dist/cli/commands/source.d.ts.map +1 -1
  29. package/dist/cli/commands/source.js +29 -2
  30. package/dist/cli/commands/source.js.map +1 -1
  31. package/dist/cli/commands/sourceInit.d.ts +9 -0
  32. package/dist/cli/commands/sourceInit.d.ts.map +1 -0
  33. package/dist/cli/commands/sourceInit.js +78 -0
  34. package/dist/cli/commands/sourceInit.js.map +1 -0
  35. package/dist/cli/commands/update.d.ts +10 -3
  36. package/dist/cli/commands/update.d.ts.map +1 -1
  37. package/dist/cli/commands/update.js +9 -4
  38. package/dist/cli/commands/update.js.map +1 -1
  39. package/dist/cli/index.js +17 -6
  40. package/dist/cli/index.js.map +1 -1
  41. package/dist/cli/localSources.d.ts +12 -0
  42. package/dist/cli/localSources.d.ts.map +1 -0
  43. package/dist/cli/localSources.js +49 -0
  44. package/dist/cli/localSources.js.map +1 -0
  45. package/dist/cli/npmDependencies.d.ts +11 -0
  46. package/dist/cli/npmDependencies.d.ts.map +1 -0
  47. package/dist/cli/npmDependencies.js +73 -0
  48. package/dist/cli/npmDependencies.js.map +1 -0
  49. package/dist/cli/packageFiles.d.ts +15 -0
  50. package/dist/cli/packageFiles.d.ts.map +1 -0
  51. package/dist/cli/packageFiles.js +54 -0
  52. package/dist/cli/packageFiles.js.map +1 -0
  53. package/dist/cli/themeTokens.d.ts +12 -0
  54. package/dist/cli/themeTokens.d.ts.map +1 -0
  55. package/dist/cli/themeTokens.js +60 -0
  56. package/dist/cli/themeTokens.js.map +1 -0
  57. package/dist/packages/dependencies.d.ts +48 -0
  58. package/dist/packages/dependencies.d.ts.map +1 -0
  59. package/dist/packages/dependencies.js +66 -0
  60. package/dist/packages/dependencies.js.map +1 -0
  61. package/dist/packages/install.d.ts +30 -0
  62. package/dist/packages/install.d.ts.map +1 -0
  63. package/dist/packages/install.js +54 -0
  64. package/dist/packages/install.js.map +1 -0
  65. package/dist/packages/localPack.d.ts +48 -0
  66. package/dist/packages/localPack.d.ts.map +1 -0
  67. package/dist/packages/localPack.js +72 -0
  68. package/dist/packages/localPack.js.map +1 -0
  69. package/dist/registry/adapters/shadcn.adapter.d.ts +32 -7
  70. package/dist/registry/adapters/shadcn.adapter.d.ts.map +1 -1
  71. package/dist/registry/adapters/shadcn.adapter.js +75 -20
  72. package/dist/registry/adapters/shadcn.adapter.js.map +1 -1
  73. package/dist/registry/adapters/shadcnImports.d.ts +10 -0
  74. package/dist/registry/adapters/shadcnImports.d.ts.map +1 -0
  75. package/dist/registry/adapters/shadcnImports.js +18 -0
  76. package/dist/registry/adapters/shadcnImports.js.map +1 -0
  77. package/dist/registry/componentsJson.d.ts +6 -1
  78. package/dist/registry/componentsJson.d.ts.map +1 -1
  79. package/dist/registry/componentsJson.js +34 -1
  80. package/dist/registry/componentsJson.js.map +1 -1
  81. package/dist/registry/index.d.ts +1 -1
  82. package/dist/registry/index.d.ts.map +1 -1
  83. package/dist/registry/index.js +1 -1
  84. package/dist/registry/index.js.map +1 -1
  85. package/dist/registry/manifest.d.ts +2 -13
  86. package/dist/registry/manifest.d.ts.map +1 -1
  87. package/dist/registry/manifest.js +4 -76
  88. package/dist/registry/manifest.js.map +1 -1
  89. package/dist/registry/packageExports.d.ts +9 -0
  90. package/dist/registry/packageExports.d.ts.map +1 -0
  91. package/dist/registry/packageExports.js +50 -0
  92. package/dist/registry/packageExports.js.map +1 -0
  93. package/dist/registry/packageImports.d.ts +23 -0
  94. package/dist/registry/packageImports.d.ts.map +1 -0
  95. package/dist/registry/packageImports.js +51 -0
  96. package/dist/registry/packageImports.js.map +1 -0
  97. package/dist/registry/readSource.d.ts +4 -2
  98. package/dist/registry/readSource.d.ts.map +1 -1
  99. package/dist/registry/readSource.js +27 -3
  100. package/dist/registry/readSource.js.map +1 -1
  101. package/dist/registry/types.d.ts +86 -3
  102. package/dist/registry/types.d.ts.map +1 -1
  103. package/dist/registry/types.js +46 -3
  104. package/dist/registry/types.js.map +1 -1
  105. package/dist/sources/builtins.d.ts +1 -5
  106. package/dist/sources/builtins.d.ts.map +1 -1
  107. package/dist/sources/builtins.js +2 -7
  108. package/dist/sources/builtins.js.map +1 -1
  109. package/dist/theme/cssVars.d.ts +43 -0
  110. package/dist/theme/cssVars.d.ts.map +1 -0
  111. package/dist/theme/cssVars.js +107 -0
  112. package/dist/theme/cssVars.js.map +1 -0
  113. package/dist/theme/detectCssFile.d.ts +9 -0
  114. package/dist/theme/detectCssFile.d.ts.map +1 -0
  115. package/dist/theme/detectCssFile.js +41 -0
  116. package/dist/theme/detectCssFile.js.map +1 -0
  117. package/package.json +8 -21
  118. package/template/build.ts +32 -0
  119. package/template/package.json +22 -0
  120. package/template/src/components/example/Example.css +20 -0
  121. package/template/src/components/example/Example.tsx +26 -0
  122. package/template/src/components/example/example.meta.ts +69 -0
  123. package/dist/components/basic/Card.css +0 -32
  124. package/dist/components/basic/Card.debug.ts +0 -5
  125. package/dist/components/basic/Card.tsx +0 -31
  126. package/dist/components/basic/CardFooter.css +0 -16
  127. package/dist/components/basic/CardFooter.debug.ts +0 -5
  128. package/dist/components/basic/CardFooter.tsx +0 -29
  129. package/dist/components/basic/CardHeader.css +0 -14
  130. package/dist/components/basic/CardHeader.debug.ts +0 -5
  131. package/dist/components/basic/CardHeader.tsx +0 -29
  132. package/dist/components/basic/card.meta.ts +0 -14
  133. package/dist/components/basic/cardfooter.meta.ts +0 -14
  134. package/dist/components/basic/cardheader.meta.ts +0 -14
  135. package/dist/components/input/Button.css +0 -34
  136. package/dist/components/input/Button.debug.ts +0 -5
  137. package/dist/components/input/Button.tsx +0 -28
  138. package/dist/components/input/button.meta.ts +0 -14
  139. package/dist/components.json +0 -138
@@ -1,31 +0,0 @@
1
- // packages/ui/src/components/basic/Card.tsx
2
- import React from 'react';
3
- import './Card.css';
4
-
5
- /**
6
- * @brief Props of Card: the content, the extra classes and the look.
7
- *
8
- * @property children - Content rendered inside the card.
9
- * @property className - Extra classes appended to the root element.
10
- * @property variant - Look of the card: `default`, `outlined` or `elevated`, set as the `card--<variant>` class.
11
- */
12
- export interface CardProps {
13
- children?: React.ReactNode;
14
- className?: string;
15
- variant?: 'default' | 'outlined' | 'elevated';
16
- }
17
-
18
- export const Card = React.forwardRef<HTMLDivElement, CardProps>(
19
- ({ children, className = '', variant = 'default' }, ref) => {
20
- return (
21
- <div
22
- ref={ref}
23
- className={`g3nui card card--${variant} ${className}`}
24
- >
25
- {children}
26
- </div>
27
- );
28
- }
29
- );
30
-
31
- Card.displayName = 'Card';
@@ -1,16 +0,0 @@
1
- .g3nui {
2
- &.card__footer {
3
- padding: 1rem 1.5rem;
4
- border-top: 1px solid #e5e7eb;
5
- background-color: #f9fafb;
6
-
7
- &:first-child {
8
- border-top: none;
9
- }
10
-
11
- @media (prefers-color-scheme: dark) {
12
- border-color: #374151;
13
- background-color: #111827;
14
- }
15
- }
16
- }
@@ -1,5 +0,0 @@
1
- // packages/ui/src/components/basic/CardFooter.debug.ts
2
- export const __debug = {
3
- componentName: "CardFooter",
4
- version: "0.1.0",
5
- };
@@ -1,29 +0,0 @@
1
- // packages/ui/src/components/basic/CardFooter.tsx
2
- import React from 'react';
3
- import './CardFooter.css';
4
-
5
- /**
6
- * @brief Props of CardFooter: the content and the extra classes.
7
- *
8
- * @property children - Content rendered inside the footer.
9
- * @property className - Extra classes appended to the root element.
10
- */
11
- export interface CardFooterProps {
12
- children?: React.ReactNode;
13
- className?: string;
14
- }
15
-
16
- export const CardFooter = React.forwardRef<HTMLDivElement, CardFooterProps>(
17
- ({ children, className = '' }, ref) => {
18
- return (
19
- <div
20
- ref={ref}
21
- className={`g3nui card__footer ${className}`}
22
- >
23
- {children}
24
- </div>
25
- );
26
- }
27
- );
28
-
29
- CardFooter.displayName = 'CardFooter';
@@ -1,14 +0,0 @@
1
- .g3nui {
2
- &.card__header {
3
- padding: 1.5rem;
4
- border-bottom: 1px solid #e5e7eb;
5
-
6
- &:last-child {
7
- border-bottom: none;
8
- }
9
-
10
- @media (prefers-color-scheme: dark) {
11
- border-color: #374151;
12
- }
13
- }
14
- }
@@ -1,5 +0,0 @@
1
- // packages/ui/src/components/basic/CardHeader.debug.ts
2
- export const __debug = {
3
- componentName: "CardHeader",
4
- version: "0.1.0",
5
- };
@@ -1,29 +0,0 @@
1
- // packages/ui/src/components/basic/CardHeader.tsx
2
- import React from 'react';
3
- import './CardHeader.css';
4
-
5
- /**
6
- * @brief Props of CardHeader: the content and the extra classes.
7
- *
8
- * @property children - Content rendered inside the header.
9
- * @property className - Extra classes appended to the root element.
10
- */
11
- export interface CardHeaderProps {
12
- children?: React.ReactNode;
13
- className?: string;
14
- }
15
-
16
- export const CardHeader = React.forwardRef<HTMLDivElement, CardHeaderProps>(
17
- ({ children, className = '' }, ref) => {
18
- return (
19
- <div
20
- ref={ref}
21
- className={`g3nui card__header ${className}`}
22
- >
23
- {children}
24
- </div>
25
- );
26
- }
27
- );
28
-
29
- CardHeader.displayName = 'CardHeader';
@@ -1,14 +0,0 @@
1
- // packages/ui/src/components/basic/card.meta.ts
2
- import type { PackagedComponent } from "@g3nomaly/ui/types";
3
-
4
- export default {
5
- name: "Card",
6
- description: "A flexible card component.",
7
- category: "basic",
8
- files: [
9
- { path: "basic/Card.tsx", type: "component" },
10
- { path: "basic/Card.css", type: "style" },
11
- { path: "basic/Card.debug.ts", type: "util" },
12
- ],
13
- registryDependencies: [],
14
- } satisfies PackagedComponent;
@@ -1,14 +0,0 @@
1
- // packages/ui/src/components/basic/cardfooter.meta.ts
2
- import type { PackagedComponent } from "@g3nomaly/ui/types";
3
-
4
- export default {
5
- name: "CardFooter",
6
- description: "Footer section for Card component.",
7
- category: "basic",
8
- files: [
9
- { path: "basic/CardFooter.tsx", type: "component" },
10
- { path: "basic/CardFooter.css", type: "style" },
11
- { path: "basic/CardFooter.debug.ts", type: "util" },
12
- ],
13
- registryDependencies: ["card"],
14
- } satisfies PackagedComponent;
@@ -1,14 +0,0 @@
1
- // packages/ui/src/components/basic/cardheader.meta.ts
2
- import type { PackagedComponent } from "@g3nomaly/ui/types";
3
-
4
- export default {
5
- name: "CardHeader",
6
- description: "Header section for Card component.",
7
- category: "basic",
8
- files: [
9
- { path: "basic/CardHeader.tsx", type: "component" },
10
- { path: "basic/CardHeader.css", type: "style" },
11
- { path: "basic/CardHeader.debug.ts", type: "util" },
12
- ],
13
- registryDependencies: ["card"],
14
- } satisfies PackagedComponent;
@@ -1,34 +0,0 @@
1
- .g3nui {
2
- &.button {
3
- display: inline-flex;
4
- align-items: center;
5
- justify-content: center;
6
- padding: 0.5rem 1rem;
7
- border-radius: 0.375rem;
8
- font-weight: 500;
9
- cursor: pointer;
10
- transition: all 0.15s ease;
11
- border: none;
12
-
13
- &--primary {
14
- background-color: #2563eb;
15
- color: white;
16
-
17
- &:hover { background-color: #1d4ed8; }
18
- }
19
-
20
- &--secondary {
21
- background-color: #e5e7eb;
22
- color: #111827;
23
-
24
- &:hover { background-color: #d1d5db; }
25
- }
26
-
27
- &--ghost {
28
- background-color: transparent;
29
- color: #374151;
30
-
31
- &:hover { background-color: #f3f4f6; }
32
- }
33
- }
34
- }
@@ -1,5 +0,0 @@
1
- // packages/ui/src/components/input/Button.debug.ts
2
- export const __debug = {
3
- componentName: "Button",
4
- version: "0.1.0",
5
- };
@@ -1,28 +0,0 @@
1
- // packages/ui/src/components/input/Button.tsx
2
- import React from 'react';
3
- import './Button.css';
4
-
5
- /**
6
- * @brief Props of Button: the native button attributes plus its look.
7
- *
8
- * @property variant - Look of the button: `primary` (default), `secondary` or `ghost`, set as the `button--<variant>` class.
9
- */
10
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
11
- variant?: 'primary' | 'secondary' | 'ghost';
12
- }
13
-
14
- export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
15
- ({ children, className = '', variant = 'primary', ...props }, ref) => {
16
- return (
17
- <button
18
- ref={ref}
19
- className={`g3nui button button--${variant} ${className}`}
20
- {...props}
21
- >
22
- {children}
23
- </button>
24
- );
25
- }
26
- );
27
-
28
- Button.displayName = 'Button';
@@ -1,14 +0,0 @@
1
- // packages/ui/src/components/input/button.meta.ts
2
- import type { PackagedComponent } from "@g3nomaly/ui/types";
3
-
4
- export default {
5
- name: "Button",
6
- description: "A flexible button component.",
7
- category: "input",
8
- files: [
9
- { path: "input/Button.tsx", type: "component" },
10
- { path: "input/Button.css", type: "style" },
11
- { path: "input/Button.debug.ts", type: "util" },
12
- ],
13
- registryDependencies: [],
14
- } satisfies PackagedComponent;
@@ -1,138 +0,0 @@
1
- {
2
- "button": {
3
- "name": "Button",
4
- "description": "A flexible button component.",
5
- "category": "input",
6
- "registryDependencies": [],
7
- "files": [
8
- {
9
- "path": "input/Button.tsx",
10
- "type": "component",
11
- "version": "0.3.3",
12
- "hash": "4911cf7ade40890c2bc1ee9eba65b9297f33cc0c1287c550701780295ed16086"
13
- },
14
- {
15
- "path": "input/Button.css",
16
- "type": "style",
17
- "version": "0.3.3",
18
- "hash": "eaff21a3e7afa0e48210f146e6558df6997ff31fa8d239031ea110914d5ff208"
19
- },
20
- {
21
- "path": "input/Button.debug.ts",
22
- "type": "util",
23
- "version": "0.3.3",
24
- "hash": "f7be8d51584045a3dd712741922c9009fd1879db06915fcf1f11b9b4152d1441"
25
- },
26
- {
27
- "path": "input/button.meta.ts",
28
- "type": "meta",
29
- "version": "0.3.3",
30
- "hash": "51294b1c334186be2378259245c3a444b509328785f7ceee6d555ccc99ad05c6"
31
- }
32
- ],
33
- "version": "0.3.3"
34
- },
35
- "card": {
36
- "name": "Card",
37
- "description": "A flexible card component.",
38
- "category": "basic",
39
- "registryDependencies": [],
40
- "files": [
41
- {
42
- "path": "basic/Card.tsx",
43
- "type": "component",
44
- "version": "0.3.3",
45
- "hash": "2602d00902b38c45d4a6409febe47bdb9e79657d83d7da3bc4dff3c7a3ebea6d"
46
- },
47
- {
48
- "path": "basic/Card.css",
49
- "type": "style",
50
- "version": "0.3.3",
51
- "hash": "5315468962112167dd37b4893e7d38404c19a7f2ba76bf51372bc30d67d5dc42"
52
- },
53
- {
54
- "path": "basic/Card.debug.ts",
55
- "type": "util",
56
- "version": "0.3.3",
57
- "hash": "acecf600200a49337f65714f0b2b4efc5325446b11fa49d5360f1aee88f1023f"
58
- },
59
- {
60
- "path": "basic/card.meta.ts",
61
- "type": "meta",
62
- "version": "0.3.3",
63
- "hash": "4ffcfd020601e222f26961ac595f478d6e8907ad894cdba992ea2b34a8ba6b92"
64
- }
65
- ],
66
- "version": "0.3.3"
67
- },
68
- "cardfooter": {
69
- "name": "CardFooter",
70
- "description": "Footer section for Card component.",
71
- "category": "basic",
72
- "registryDependencies": [
73
- "card"
74
- ],
75
- "files": [
76
- {
77
- "path": "basic/CardFooter.tsx",
78
- "type": "component",
79
- "version": "0.3.3",
80
- "hash": "bfd4e73de6b16b529c22ca69e4661c30bd4be1237a5972eefce45cd6deb7dff5"
81
- },
82
- {
83
- "path": "basic/CardFooter.css",
84
- "type": "style",
85
- "version": "0.3.3",
86
- "hash": "751573c89dc46e83c9f240e58895f42652399f0519907c058568b14aaa52cb4d"
87
- },
88
- {
89
- "path": "basic/CardFooter.debug.ts",
90
- "type": "util",
91
- "version": "0.3.3",
92
- "hash": "3226f24e154a19daf4f0d9828245ff0cdf7b2e8bb75f10d785a33c1234578484"
93
- },
94
- {
95
- "path": "basic/cardfooter.meta.ts",
96
- "type": "meta",
97
- "version": "0.3.3",
98
- "hash": "1e9d82552826862ca25f13e71f80301b61fa8b9c3c8d0dc3ed51038db5b0f94c"
99
- }
100
- ],
101
- "version": "0.3.3"
102
- },
103
- "cardheader": {
104
- "name": "CardHeader",
105
- "description": "Header section for Card component.",
106
- "category": "basic",
107
- "registryDependencies": [
108
- "card"
109
- ],
110
- "files": [
111
- {
112
- "path": "basic/CardHeader.tsx",
113
- "type": "component",
114
- "version": "0.3.3",
115
- "hash": "fac021c0f55b4c115b0b9fcc3e6f452aea7403e99b4b7a1287861de5653c9eb5"
116
- },
117
- {
118
- "path": "basic/CardHeader.css",
119
- "type": "style",
120
- "version": "0.3.3",
121
- "hash": "e36cf86636d2e7619dd69725faaedac9604a9605be11c0e2a6aa3663db8c3b53"
122
- },
123
- {
124
- "path": "basic/CardHeader.debug.ts",
125
- "type": "util",
126
- "version": "0.3.3",
127
- "hash": "e5879c6caebc2d14ffaf49b8d630a32a23c1c5a1c3877288d7ea4333e333c9e7"
128
- },
129
- {
130
- "path": "basic/cardheader.meta.ts",
131
- "type": "meta",
132
- "version": "0.3.3",
133
- "hash": "46d85bb6e00d8fa518548b89a89deb53c2e27304fc5f808f7e4cd5472a51871a"
134
- }
135
- ],
136
- "version": "0.3.3"
137
- }
138
- }