@langchain/macaw-components 1.0.0-beta.8 → 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.
- package/README.md +3 -3
- package/dist/_chunks/{ErrorState-CmPX01HV.js → ErrorState-BY6VBCRB.js} +2 -2
- package/dist/_chunks/{ErrorState-CmPX01HV.js.map → ErrorState-BY6VBCRB.js.map} +1 -1
- package/dist/_chunks/{LoadingIndicator-DujSAzqj.js → LoadingIndicator-Itl4c0WV.js} +10 -10
- package/dist/_chunks/LoadingIndicator-Itl4c0WV.js.map +1 -0
- package/dist/base.css +14 -1
- package/dist/catalog.json +481 -478
- package/dist/components/Banner/Banner.js +3 -1
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/BarChart/AnimatedBar.js +1 -1
- package/dist/components/BarChart/AnimatedBar.js.map +1 -1
- package/dist/components/BarChart/BarChartPlot.js +1 -1
- package/dist/components/BarChart/BarChartPlot.js.map +1 -1
- package/dist/components/Button/constants.js +2 -2
- package/dist/components/Button/constants.js.map +1 -1
- package/dist/components/ChartLegend/ChartLegend.js +1 -1
- package/dist/components/ChartLegend/ChartLegend.js.map +1 -1
- package/dist/components/ChartLegend/ChartLegendItemRenderer.js +2 -2
- package/dist/components/ChartLegend/ChartLegendItemRenderer.js.map +1 -1
- package/dist/components/Checkbox/constants.d.ts +1 -1
- package/dist/components/Checkbox/constants.js +1 -1
- package/dist/components/Checkbox/constants.js.map +1 -1
- package/dist/components/Code/CodeLite.d.ts +16 -2
- package/dist/components/Code/CodeLite.js +79 -33
- package/dist/components/Code/CodeLite.js.map +1 -1
- package/dist/components/Code/CodeLite.utils.d.ts +1 -1
- package/dist/components/Code/CodeLite.utils.js +2 -2
- package/dist/components/Code/CodeLite.utils.js.map +1 -1
- package/dist/components/Code/CodeLiteDiff.d.ts +2 -0
- package/dist/components/Code/CodeLiteDiff.js +102 -0
- package/dist/components/Code/CodeLiteDiff.js.map +1 -0
- package/dist/components/Code/CodeToolbar.js +7 -3
- package/dist/components/Code/CodeToolbar.js.map +1 -1
- package/dist/components/Code/JsonHighlighterExtension.js +1 -1
- package/dist/components/Code/JsonHighlighterExtension.js.map +1 -1
- package/dist/components/Code/index.js +1 -1
- package/dist/components/Command/Command.js +1 -1
- package/dist/components/Command/Command.js.map +1 -1
- package/dist/components/Command/CommandMenu.js +2 -2
- package/dist/components/Command/CommandMenu.js.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
- package/dist/components/DonutChart/DonutChart.js +1 -1
- package/dist/components/DonutChart/DonutChart.js.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +2 -2
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/dist/components/ErrorState/ErrorState.js +1 -1
- package/dist/components/ErrorState/index.js +1 -1
- package/dist/components/Input/inputStyles.js +2 -2
- package/dist/components/Input/inputStyles.js.map +1 -1
- package/dist/components/Pane/Pane.js +1 -1
- package/dist/components/Pane/Pane.js.map +1 -1
- package/dist/components/Popover/constants.d.ts +1 -1
- package/dist/components/Popover/constants.js +1 -1
- package/dist/components/Popover/constants.js.map +1 -1
- package/dist/components/RadioButton/constants.d.ts +1 -1
- package/dist/components/RadioButton/constants.js +1 -1
- package/dist/components/RadioButton/constants.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroupItem.js +1 -1
- package/dist/components/RadioGroup/RadioGroupItem.js.map +1 -1
- package/dist/components/SankeyChart/AnimatedSankeyLink.js +1 -1
- package/dist/components/SankeyChart/AnimatedSankeyLink.js.map +1 -1
- package/dist/components/SankeyChart/AnimatedSankeyNode.js +1 -1
- package/dist/components/SankeyChart/AnimatedSankeyNode.js.map +1 -1
- package/dist/components/Select/SelectPrimitive.js +3 -3
- package/dist/components/Select/SelectPrimitive.js.map +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/SplitViewPane/SplitViewPane.js +1 -1
- package/dist/components/SplitViewPane/SplitViewPane.js.map +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/ThinkingState/LoadingIndicator.js +1 -1
- package/dist/components/ThinkingState/ThinkingState.js +1 -1
- package/dist/components/ThinkingState/index.js +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/index.js.map +1 -1
- package/dist/components/Typeahead/TypeaheadParts.js +1 -1
- package/dist/components/Typeahead/TypeaheadParts.js.map +1 -1
- package/dist/components/Typeahead/TypeaheadView.js +1 -1
- package/dist/components/Typeahead/TypeaheadView.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components.css +2 -105
- package/dist/icons/WeightedPhosphorIcons.js +1 -1
- package/dist/index.js +1 -1
- package/dist/utilities.css +2 -2
- package/dist/utils/cn.js +17 -11
- package/dist/utils/cn.js.map +1 -1
- package/dist/utils/useCodeMirror.d.ts +2 -2
- package/dist/utils/useCodeMirror.js +4 -4
- package/dist/utils/useCodeMirror.js.map +1 -1
- package/docs/DESIGN.md +20 -2
- package/docs/STYLES.md +12 -2
- package/package.json +11 -9
- package/tailwind.preset.cjs +285 -331
- package/dist/_chunks/LoadingIndicator-DujSAzqj.js.map +0 -1
package/docs/DESIGN.md
CHANGED
|
@@ -18,16 +18,26 @@ utilities used by package components. Use
|
|
|
18
18
|
not import both.
|
|
19
19
|
|
|
20
20
|
Applications that author the semantic Tailwind classes may additionally extend
|
|
21
|
-
the optional Tailwind
|
|
21
|
+
the optional Tailwind v4 preset:
|
|
22
22
|
|
|
23
23
|
```js
|
|
24
24
|
// tailwind.config.cjs
|
|
25
25
|
module.exports = {
|
|
26
|
-
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
|
|
27
26
|
presets: [require('@langchain/macaw-components/tailwind-preset')],
|
|
28
27
|
};
|
|
29
28
|
```
|
|
30
29
|
|
|
30
|
+
Load this config explicitly from your application CSS (Tailwind v4 does not
|
|
31
|
+
auto-detect JavaScript config files):
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
@import 'tailwindcss';
|
|
35
|
+
@config '../tailwind.config.cjs';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Adjust the relative config path for your stylesheet. Tailwind discovers application
|
|
39
|
+
sources automatically; Macaw component utilities are precompiled.
|
|
40
|
+
|
|
31
41
|
The preset intentionally does not define consumer `content` paths and does not
|
|
32
42
|
replace the stylesheet import. Consumers scan their own source; the package's
|
|
33
43
|
component classes are already precompiled. Theme switching uses `html.dark`.
|
|
@@ -65,6 +75,14 @@ Import `Code`, `CodeToolbar`, and `CodeLanguageSelect` from
|
|
|
65
75
|
and actions above the editor; include `CopyButton` there when needed. Without a
|
|
66
76
|
toolbar, `showCopyButton` keeps the floating copy control.
|
|
67
77
|
|
|
78
|
+
Import `CodeLite` from `@langchain/macaw-components/Code/CodeLite`. Its default
|
|
79
|
+
plain variant renders read-only code; `variant="block"` adds a label and copy
|
|
80
|
+
toolbar. Set `label` for a filename, replace the toolbar with `toolbar`, or hide
|
|
81
|
+
it with `toolbar={null}`. `variant="diff"` compares `oldString` and `newString`,
|
|
82
|
+
with an optional `fileName` and `contextLines`; the diff renderer loads on demand.
|
|
83
|
+
The diff toolbar remains visible when there are no changes, with an empty body.
|
|
84
|
+
Use `language="plaintext"` to skip syntax highlighting.
|
|
85
|
+
|
|
68
86
|
`CodeLanguageSelect` accepts language aliases such as `ts` and `py`, preserves
|
|
69
87
|
unknown language labels, and reports supported `CodeLanguageType` values.
|
|
70
88
|
`showFoldGutter={false}` hides folding controls. Use `onChange` for user edits and
|
package/docs/STYLES.md
CHANGED
|
@@ -34,17 +34,27 @@ the CSS custom properties without components, fonts, base rules, or utilities.
|
|
|
34
34
|
Do not import both CSS entries; `styles.css` already includes the tokens.
|
|
35
35
|
|
|
36
36
|
Applications that author semantic Tailwind classes should also use the optional
|
|
37
|
-
Tailwind
|
|
37
|
+
Tailwind v4 preset. The preset deliberately has no `content` paths and does not
|
|
38
38
|
replace the stylesheet import:
|
|
39
39
|
|
|
40
40
|
```js
|
|
41
41
|
// tailwind.config.cjs
|
|
42
42
|
module.exports = {
|
|
43
|
-
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
|
|
44
43
|
presets: [require('@langchain/macaw-components/tailwind-preset')],
|
|
45
44
|
};
|
|
46
45
|
```
|
|
47
46
|
|
|
47
|
+
Load this config explicitly from your application CSS (Tailwind v4 does not
|
|
48
|
+
auto-detect JavaScript config files):
|
|
49
|
+
|
|
50
|
+
```css
|
|
51
|
+
@import 'tailwindcss';
|
|
52
|
+
@config '../tailwind.config.cjs';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Adjust the relative config path for your stylesheet. Tailwind discovers application
|
|
56
|
+
sources automatically; Macaw component utilities are precompiled.
|
|
57
|
+
|
|
48
58
|
The precompiled stylesheet already covers classes used inside the package, so
|
|
49
59
|
consumers only need to scan their own source. Add or remove `html.dark` to
|
|
50
60
|
switch the token values and Tailwind dark variants together. A nested
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/macaw-components",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "React components and usage guidance for the Macaw Design System.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -547,7 +547,9 @@
|
|
|
547
547
|
}
|
|
548
548
|
},
|
|
549
549
|
"publishConfig": {
|
|
550
|
-
"access": "public"
|
|
550
|
+
"access": "public",
|
|
551
|
+
"provenance": true,
|
|
552
|
+
"tag": "latest"
|
|
551
553
|
},
|
|
552
554
|
"dependencies": {
|
|
553
555
|
"@braintree/sanitize-url": "^7.1.2",
|
|
@@ -564,12 +566,13 @@
|
|
|
564
566
|
"@fontsource/fira-code": "^5.2.7",
|
|
565
567
|
"@fontsource/inter": "^5.2.8",
|
|
566
568
|
"@headlessui/react": "^2.2.10",
|
|
567
|
-
"@langchain/macaw-tokens": "1.0.0
|
|
569
|
+
"@langchain/macaw-tokens": "1.0.0",
|
|
568
570
|
"@lezer/common": "^1.2.1",
|
|
569
571
|
"@lezer/highlight": "^1.2.0",
|
|
570
572
|
"@lezer/yaml": "^1.0.4",
|
|
571
573
|
"@mantine/hooks": "^8.3.7",
|
|
572
574
|
"@phosphor-icons/react": "2.1.10",
|
|
575
|
+
"@pierre/diffs": "1.3.6",
|
|
573
576
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
574
577
|
"@radix-ui/react-context-menu": "^2.2.16",
|
|
575
578
|
"@radix-ui/react-dialog": "1.1.23",
|
|
@@ -585,7 +588,6 @@
|
|
|
585
588
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
586
589
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
587
590
|
"@react-spring/web": "^10.1.2",
|
|
588
|
-
"@tailwindcss/container-queries": "^0.1.1",
|
|
589
591
|
"@tailwindcss/forms": "^0.5.7",
|
|
590
592
|
"@uiw/codemirror-theme-tokyo-night-day": "^4.25.4",
|
|
591
593
|
"@uiw/codemirror-theme-tokyo-night-storm": "^4.25.4",
|
|
@@ -603,15 +605,15 @@
|
|
|
603
605
|
"linkify-it": "^5.0.2",
|
|
604
606
|
"react-hotkeys-hook": "^4.5.0",
|
|
605
607
|
"react-virtuoso": "^4.18.6",
|
|
606
|
-
"tailwind-merge": "^
|
|
608
|
+
"tailwind-merge": "^3.6.0",
|
|
607
609
|
"tailwindcss-animate": "^1.0.7",
|
|
608
610
|
"use-debounce": "^9.0.4",
|
|
609
611
|
"yaml": "^2.8.3"
|
|
610
612
|
},
|
|
611
613
|
"peerDependencies": {
|
|
612
|
-
"react": ">=
|
|
613
|
-
"react-dom": ">=
|
|
614
|
-
"tailwindcss": "^3.
|
|
614
|
+
"react": ">=19 <20",
|
|
615
|
+
"react-dom": ">=19 <20",
|
|
616
|
+
"tailwindcss": "^4.3.3"
|
|
615
617
|
},
|
|
616
618
|
"peerDependenciesMeta": {
|
|
617
619
|
"tailwindcss": {
|
|
@@ -619,7 +621,7 @@
|
|
|
619
621
|
}
|
|
620
622
|
},
|
|
621
623
|
"engines": {
|
|
622
|
-
"node": ">=
|
|
624
|
+
"node": ">=26"
|
|
623
625
|
},
|
|
624
626
|
"nx": {
|
|
625
627
|
"targets": {
|