@langchain/macaw-tokens 1.0.0-beta.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.
- package/LICENSE +21 -0
- package/README.md +17 -0
- package/dist/tokens.css +979 -0
- package/dist/tokens.json +803 -0
- package/docs/TOKENS.md +26 -0
- package/package.json +46 -0
package/docs/TOKENS.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Macaw tokens
|
|
2
|
+
|
|
3
|
+
Import `@langchain/macaw-tokens/tokens.css` for CSS custom properties without
|
|
4
|
+
React, fonts, component styles, or a Tailwind dependency.
|
|
5
|
+
|
|
6
|
+
```css
|
|
7
|
+
@import '@langchain/macaw-tokens/tokens.css';
|
|
8
|
+
|
|
9
|
+
.surface {
|
|
10
|
+
background: var(--bg-surface-level-1);
|
|
11
|
+
color: var(--text-primary);
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Use semantic names such as `--bg-surface-level-1` and `--text-primary` rather
|
|
16
|
+
than primitive palette values. Add `dark` to the document's `html` element to
|
|
17
|
+
switch themes. A `.dark[data-theme-scope]` container also supports a scoped dark
|
|
18
|
+
theme. Component-specific custom properties are implementation details.
|
|
19
|
+
|
|
20
|
+
`@langchain/macaw-tokens/tokens.json` is the complete machine-readable reference,
|
|
21
|
+
generated from the same CSS. Its `rules` contain `selector` and `tokens` fields.
|
|
22
|
+
Values retain CSS `var()` references; dark rules contain overrides, so apply them
|
|
23
|
+
over the root values rather than treating them as a complete independent theme.
|
|
24
|
+
|
|
25
|
+
Applications using `@langchain/macaw-components/styles.css` already load these
|
|
26
|
+
tokens and should not import the token stylesheet a second time.
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@langchain/macaw-tokens",
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
|
+
"description": "Framework-independent CSS design tokens for Macaw.",
|
|
5
|
+
"homepage": "https://github.com/langchain-ai/macaw-design-system#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/langchain-ai/macaw-design-system/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/langchain-ai/macaw-design-system.git",
|
|
13
|
+
"directory": "packages/tokens"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"docs",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"**/*.css"
|
|
24
|
+
],
|
|
25
|
+
"exports": {
|
|
26
|
+
"./tokens.css": "./dist/tokens.css",
|
|
27
|
+
"./tokens.json": "./dist/tokens.json",
|
|
28
|
+
"./docs/*": "./docs/*",
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"nx": {
|
|
35
|
+
"targets": {
|
|
36
|
+
"build": {
|
|
37
|
+
"outputs": [
|
|
38
|
+
"{projectRoot}/dist"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "node ../../scripts/build.mjs tokens"
|
|
45
|
+
}
|
|
46
|
+
}
|