@charde/core 0.0.5 → 0.0.7

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.
@@ -0,0 +1 @@
1
+ export * from './types'
@@ -0,0 +1,189 @@
1
+ // // --- TOKEN & PROPERTY TYPES ---
2
+ // export type TokenType =
3
+ // | "color"
4
+ // | "string"
5
+ // | "dimension"
6
+ // | "font family"
7
+ // | "font weight"
8
+ // | "duration"
9
+ // | "number"
10
+ // | "cubic-bezier"
11
+ // | "spacer"
12
+ // | "shadow"
13
+ // | "transition"
14
+ // | "border"
15
+ // | "display"
16
+ // | "layout";
17
+
18
+ // export type DesignToken = {
19
+ // name: string;
20
+ // value: string;
21
+ // type: TokenType;
22
+ // unit: string | null;
23
+ // comment: string;
24
+ // category?: string;
25
+ // deprecated?: boolean;
26
+ // };
27
+
28
+ // export type ComponentProperty = {
29
+ // value: string;
30
+ // unit: string | null;
31
+ // type: TokenType;
32
+ // comment: string;
33
+ // resolvedValue?: string;
34
+ // sourceToken?: string;
35
+ // };
36
+
37
+ // export type LinkedElement = {
38
+ // htmlTag: string;
39
+ // attributes: Record<string, string>;
40
+ // };
41
+
42
+ // export type ComponentVariant = {
43
+ // description?: string;
44
+ // properties: Record<string, ComponentProperty>;
45
+ // linkedElement?: Partial<LinkedElement>;
46
+ // textContent?: string;
47
+ // children?: Record<string, ComponentNode> | null;
48
+ // states?: Record<string, Record<string, ComponentProperty>>;
49
+ // };
50
+
51
+ // export interface ComponentNode {
52
+ // displayName?: string;
53
+ // description?: string;
54
+ // properties?: Record<string, ComponentProperty>;
55
+ // children?: Record<string, ComponentNode> | null;
56
+ // linkedElement?: LinkedElement;
57
+ // textContent?: string;
58
+ // variant?: string;
59
+ // variants?: Record<string, ComponentVariant>;
60
+ // states?: Record<string, Record<string, ComponentProperty>>;
61
+ // }
62
+
63
+ // export interface DesignSystemData {
64
+ // metadata?: {
65
+ // name?: string;
66
+ // version?: string;
67
+ // lastUpdated?: string;
68
+ // };
69
+ // variables: Record<string, DesignToken>;
70
+ // components: Record<string, ComponentNode>;
71
+ // }
72
+
73
+ // export type TokenCategory = {
74
+ // name: string;
75
+ // tokens: Record<string, DesignToken>;
76
+ // description?: string;
77
+ // };
78
+
79
+ // export interface UtilityClassMap {
80
+ // [className: string]: {
81
+ // properties: Record<string, string>;
82
+ // description?: string;
83
+ // tokens?: string[];
84
+ // };
85
+ // }
86
+
87
+ // export interface GeneratedComponentCSS {
88
+ // componentName: string;
89
+ // utilityClasses: Set<string>;
90
+ // componentStyles: string;
91
+ // tokenReferences: Map<string, string>;
92
+ // }
93
+
94
+
95
+
96
+ // src/types/index.ts
97
+
98
+ // --- TOKEN & PROPERTY TYPES ---
99
+ export type TokenType =
100
+ | "color"
101
+ | "string"
102
+ | "dimension"
103
+ | "font family"
104
+ | "font weight"
105
+ | "duration"
106
+ | "number"
107
+ | "cubic-bezier"
108
+ | "spacer"
109
+ | "shadow"
110
+ | "transition"
111
+ | "border"
112
+ | "display"
113
+ | "layout";
114
+
115
+ export type DesignToken = {
116
+ name: string;
117
+ value: string;
118
+ type: TokenType;
119
+ unit: string | null;
120
+ comment: string;
121
+ category?: string;
122
+ deprecated?: boolean;
123
+ };
124
+
125
+ export type ComponentProperty = {
126
+ value: string;
127
+ unit: string | null;
128
+ type: TokenType;
129
+ comment: string;
130
+ resolvedValue?: string;
131
+ sourceToken?: string;
132
+ };
133
+
134
+ export type LinkedElement = {
135
+ htmlTag: string;
136
+ attributes: Record<string, string>;
137
+ };
138
+
139
+ export type ComponentVariant = {
140
+ description?: string;
141
+ properties: Record<string, ComponentProperty>;
142
+ linkedElement?: Partial<LinkedElement>;
143
+ textContent?: string;
144
+ children?: Record<string, ComponentNode> | null;
145
+ states?: Record<string, Record<string, ComponentProperty>>;
146
+ };
147
+
148
+ export interface ComponentNode {
149
+ displayName?: string;
150
+ description?: string;
151
+ properties?: Record<string, ComponentProperty>;
152
+ children?: Record<string, ComponentNode> | null;
153
+ linkedElement?: LinkedElement;
154
+ textContent?: string;
155
+ variant?: string;
156
+ variants?: Record<string, ComponentVariant>;
157
+ states?: Record<string, Record<string, ComponentProperty>>;
158
+ }
159
+
160
+ export interface DesignSystemData {
161
+ metadata?: {
162
+ name?: string;
163
+ version?: string;
164
+ lastUpdated?: string;
165
+ };
166
+ variables: Record<string, DesignToken>;
167
+ components: Record<string, ComponentNode>;
168
+ }
169
+
170
+ export type TokenCategory = {
171
+ name: string;
172
+ tokens: Record<string, DesignToken>;
173
+ description?: string;
174
+ };
175
+
176
+ export interface UtilityClassMap {
177
+ [className: string]: {
178
+ properties: Record<string, string>;
179
+ description?: string;
180
+ tokens?: string[];
181
+ };
182
+ }
183
+
184
+ export interface GeneratedComponentCSS {
185
+ componentName: string;
186
+ utilityClasses: Set<string>;
187
+ componentStyles: string;
188
+ tokenReferences: Map<string, string>;
189
+ }
@@ -0,0 +1 @@
1
+ export * from './types'
@@ -0,0 +1,189 @@
1
+ // // --- TOKEN & PROPERTY TYPES ---
2
+ // export type TokenType =
3
+ // | "color"
4
+ // | "string"
5
+ // | "dimension"
6
+ // | "font family"
7
+ // | "font weight"
8
+ // | "duration"
9
+ // | "number"
10
+ // | "cubic-bezier"
11
+ // | "spacer"
12
+ // | "shadow"
13
+ // | "transition"
14
+ // | "border"
15
+ // | "display"
16
+ // | "layout";
17
+
18
+ // export type DesignToken = {
19
+ // name: string;
20
+ // value: string;
21
+ // type: TokenType;
22
+ // unit: string | null;
23
+ // comment: string;
24
+ // category?: string;
25
+ // deprecated?: boolean;
26
+ // };
27
+
28
+ // export type ComponentProperty = {
29
+ // value: string;
30
+ // unit: string | null;
31
+ // type: TokenType;
32
+ // comment: string;
33
+ // resolvedValue?: string;
34
+ // sourceToken?: string;
35
+ // };
36
+
37
+ // export type LinkedElement = {
38
+ // htmlTag: string;
39
+ // attributes: Record<string, string>;
40
+ // };
41
+
42
+ // export type ComponentVariant = {
43
+ // description?: string;
44
+ // properties: Record<string, ComponentProperty>;
45
+ // linkedElement?: Partial<LinkedElement>;
46
+ // textContent?: string;
47
+ // children?: Record<string, ComponentNode> | null;
48
+ // states?: Record<string, Record<string, ComponentProperty>>;
49
+ // };
50
+
51
+ // export interface ComponentNode {
52
+ // displayName?: string;
53
+ // description?: string;
54
+ // properties?: Record<string, ComponentProperty>;
55
+ // children?: Record<string, ComponentNode> | null;
56
+ // linkedElement?: LinkedElement;
57
+ // textContent?: string;
58
+ // variant?: string;
59
+ // variants?: Record<string, ComponentVariant>;
60
+ // states?: Record<string, Record<string, ComponentProperty>>;
61
+ // }
62
+
63
+ // export interface DesignSystemData {
64
+ // metadata?: {
65
+ // name?: string;
66
+ // version?: string;
67
+ // lastUpdated?: string;
68
+ // };
69
+ // variables: Record<string, DesignToken>;
70
+ // components: Record<string, ComponentNode>;
71
+ // }
72
+
73
+ // export type TokenCategory = {
74
+ // name: string;
75
+ // tokens: Record<string, DesignToken>;
76
+ // description?: string;
77
+ // };
78
+
79
+ // export interface UtilityClassMap {
80
+ // [className: string]: {
81
+ // properties: Record<string, string>;
82
+ // description?: string;
83
+ // tokens?: string[];
84
+ // };
85
+ // }
86
+
87
+ // export interface GeneratedComponentCSS {
88
+ // componentName: string;
89
+ // utilityClasses: Set<string>;
90
+ // componentStyles: string;
91
+ // tokenReferences: Map<string, string>;
92
+ // }
93
+
94
+
95
+
96
+ // src/types/index.ts
97
+
98
+ // --- TOKEN & PROPERTY TYPES ---
99
+ export type TokenType =
100
+ | "color"
101
+ | "string"
102
+ | "dimension"
103
+ | "font family"
104
+ | "font weight"
105
+ | "duration"
106
+ | "number"
107
+ | "cubic-bezier"
108
+ | "spacer"
109
+ | "shadow"
110
+ | "transition"
111
+ | "border"
112
+ | "display"
113
+ | "layout";
114
+
115
+ export type DesignToken = {
116
+ name: string;
117
+ value: string;
118
+ type: TokenType;
119
+ unit: string | null;
120
+ comment: string;
121
+ category?: string;
122
+ deprecated?: boolean;
123
+ };
124
+
125
+ export type ComponentProperty = {
126
+ value: string;
127
+ unit: string | null;
128
+ type: TokenType;
129
+ comment: string;
130
+ resolvedValue?: string;
131
+ sourceToken?: string;
132
+ };
133
+
134
+ export type LinkedElement = {
135
+ htmlTag: string;
136
+ attributes: Record<string, string>;
137
+ };
138
+
139
+ export type ComponentVariant = {
140
+ description?: string;
141
+ properties: Record<string, ComponentProperty>;
142
+ linkedElement?: Partial<LinkedElement>;
143
+ textContent?: string;
144
+ children?: Record<string, ComponentNode> | null;
145
+ states?: Record<string, Record<string, ComponentProperty>>;
146
+ };
147
+
148
+ export interface ComponentNode {
149
+ displayName?: string;
150
+ description?: string;
151
+ properties?: Record<string, ComponentProperty>;
152
+ children?: Record<string, ComponentNode> | null;
153
+ linkedElement?: LinkedElement;
154
+ textContent?: string;
155
+ variant?: string;
156
+ variants?: Record<string, ComponentVariant>;
157
+ states?: Record<string, Record<string, ComponentProperty>>;
158
+ }
159
+
160
+ export interface DesignSystemData {
161
+ metadata?: {
162
+ name?: string;
163
+ version?: string;
164
+ lastUpdated?: string;
165
+ };
166
+ variables: Record<string, DesignToken>;
167
+ components: Record<string, ComponentNode>;
168
+ }
169
+
170
+ export type TokenCategory = {
171
+ name: string;
172
+ tokens: Record<string, DesignToken>;
173
+ description?: string;
174
+ };
175
+
176
+ export interface UtilityClassMap {
177
+ [className: string]: {
178
+ properties: Record<string, string>;
179
+ description?: string;
180
+ tokens?: string[];
181
+ };
182
+ }
183
+
184
+ export interface GeneratedComponentCSS {
185
+ componentName: string;
186
+ utilityClasses: Set<string>;
187
+ componentStyles: string;
188
+ tokenReferences: Map<string, string>;
189
+ }
package/package.json CHANGED
@@ -1,23 +1,24 @@
1
1
  {
2
2
  "name": "@charde/core",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
5
  "description": "Chardes Web Component Library",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
8
+ "types": "dist/types/components.d.ts",
9
9
  "collection": "dist/collection/collection-manifest.json",
10
10
  "exports": {
11
11
  ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.js"
12
+ "types": "./dist/types/components.d.ts",
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.cjs.js"
15
+ },
16
+ "./loader": {
17
+ "types": "./loader/index.d.ts",
18
+ "import": "./loader/index.js",
19
+ "require": "./loader/index.cjs"
14
20
  }
15
21
  },
16
- "./loader": {
17
- "import": "./loader/index.js",
18
- "require": "./loader/index.cjs",
19
- "types": "./loader/index.d.ts"
20
- },
21
22
  "repository": {
22
23
  "type": "git",
23
24
  "url": "https://github.com/Willochs316/charisol-component-starter.git"