@texturehq/edges 1.29.1 → 1.30.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/dist/{colors-CkJf6_Bz.d.cts → colors-BgVu6fze.d.cts} +9 -5
- package/dist/{colors-DR1jXZhL.d.ts → colors-soT9-oWB.d.ts} +9 -5
- package/dist/components.manifest.json +13 -2
- package/dist/index.cjs +11 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -5
- package/dist/index.d.ts +39 -5
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/server.d.cts +1 -2
- package/dist/server.d.ts +1 -2
- package/dist/utilities.manifest.json +8 -1
- package/package.json +2 -2
- package/scripts/generate-edges-docs.js +10 -34
- package/scripts/setup-cursor-rules-manual.js +1 -2
- package/scripts/setup-cursor-rules.js +11 -30
package/dist/server.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export { A as ActionItem, a as ActionMenuProps, b as AppShell, c as AppShellProps, d as AvatarProps, B as BadgeProps, e as BaseDataPoint, C as ChartMargin, f as CodeEditorProps, g as CodeLanguage, h as CodeTheme, E as ENTITY_CONFIG, i as EntityConfig, j as EntityType, H as Heading, I as InteractiveMapProps, L as Loader, k as Logo, M as MapPoint, l as MeterProps, S as SegmentOption, m as SegmentedControlProps, n as SideNav, o as SideNavItem, p as SideNavProps, q as StaticMapProps, T as TextLink, r as TooltipData, s as TooltipSeries, t as TopNav, u as TopNavProps, Y as YFormatSettings, v as YFormatType, w as clearColorCache, x as createCategoryColorMap, y as createXScale, z as createYScale, D as defaultMargin, F as getContrastingTextColor, G as getDefaultChartColor, J as getDefaultColors, K as getEntityConfig, N as getEntityIcon, O as getEntityLabel, P as getResolvedColor, Q as getThemeCategoricalColors, R as getYFormatSettings, U as isLightColor } from './colors-
|
|
1
|
+
export { A as ActionItem, a as ActionMenuProps, b as AppShell, c as AppShellProps, d as AvatarProps, B as BadgeProps, e as BaseDataPoint, C as ChartMargin, f as CodeEditorProps, g as CodeLanguage, h as CodeTheme, E as ENTITY_CONFIG, i as EntityConfig, j as EntityType, H as Heading, I as InteractiveMapProps, L as Loader, k as Logo, M as MapPoint, l as MeterProps, S as SegmentOption, m as SegmentedControlProps, n as SideNav, o as SideNavItem, p as SideNavProps, q as StaticMapProps, T as TextLink, r as TooltipData, s as TooltipSeries, t as TopNav, u as TopNavProps, Y as YFormatSettings, v as YFormatType, w as clearColorCache, x as createCategoryColorMap, y as createXScale, z as createYScale, D as defaultMargin, F as getContrastingTextColor, G as getDefaultChartColor, J as getDefaultColors, K as getEntityConfig, N as getEntityIcon, O as getEntityLabel, P as getResolvedColor, Q as getThemeCategoricalColors, R as getYFormatSettings, U as isLightColor } from './colors-BgVu6fze.cjs';
|
|
2
2
|
export { BreadcrumbProps, BreadcrumbsProps } from 'react-aria-components';
|
|
3
3
|
export { D as DateFieldProps, F as FileUploadProps, R as RichTextEditorProps } from './RichTextEditor-CxrunTg7.cjs';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { IconProps } from '@phosphor-icons/react';
|
|
6
6
|
import React__default from 'react';
|
|
7
|
-
import '@visx/vendor/d3-scale';
|
|
8
7
|
import 'd3-scale';
|
|
9
8
|
import 'react-map-gl';
|
|
10
9
|
|
package/dist/server.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export { A as ActionItem, a as ActionMenuProps, b as AppShell, c as AppShellProps, d as AvatarProps, B as BadgeProps, e as BaseDataPoint, C as ChartMargin, f as CodeEditorProps, g as CodeLanguage, h as CodeTheme, E as ENTITY_CONFIG, i as EntityConfig, j as EntityType, H as Heading, I as InteractiveMapProps, L as Loader, k as Logo, M as MapPoint, l as MeterProps, S as SegmentOption, m as SegmentedControlProps, n as SideNav, o as SideNavItem, p as SideNavProps, q as StaticMapProps, T as TextLink, r as TooltipData, s as TooltipSeries, t as TopNav, u as TopNavProps, Y as YFormatSettings, v as YFormatType, w as clearColorCache, x as createCategoryColorMap, y as createXScale, z as createYScale, D as defaultMargin, F as getContrastingTextColor, G as getDefaultChartColor, J as getDefaultColors, K as getEntityConfig, N as getEntityIcon, O as getEntityLabel, P as getResolvedColor, Q as getThemeCategoricalColors, R as getYFormatSettings, U as isLightColor } from './colors-
|
|
1
|
+
export { A as ActionItem, a as ActionMenuProps, b as AppShell, c as AppShellProps, d as AvatarProps, B as BadgeProps, e as BaseDataPoint, C as ChartMargin, f as CodeEditorProps, g as CodeLanguage, h as CodeTheme, E as ENTITY_CONFIG, i as EntityConfig, j as EntityType, H as Heading, I as InteractiveMapProps, L as Loader, k as Logo, M as MapPoint, l as MeterProps, S as SegmentOption, m as SegmentedControlProps, n as SideNav, o as SideNavItem, p as SideNavProps, q as StaticMapProps, T as TextLink, r as TooltipData, s as TooltipSeries, t as TopNav, u as TopNavProps, Y as YFormatSettings, v as YFormatType, w as clearColorCache, x as createCategoryColorMap, y as createXScale, z as createYScale, D as defaultMargin, F as getContrastingTextColor, G as getDefaultChartColor, J as getDefaultColors, K as getEntityConfig, N as getEntityIcon, O as getEntityLabel, P as getResolvedColor, Q as getThemeCategoricalColors, R as getYFormatSettings, U as isLightColor } from './colors-soT9-oWB.js';
|
|
2
2
|
export { BreadcrumbProps, BreadcrumbsProps } from 'react-aria-components';
|
|
3
3
|
export { D as DateFieldProps, F as FileUploadProps, R as RichTextEditorProps } from './RichTextEditor-CxrunTg7.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { IconProps } from '@phosphor-icons/react';
|
|
6
6
|
import React__default from 'react';
|
|
7
|
-
import '@visx/vendor/d3-scale';
|
|
8
7
|
import 'd3-scale';
|
|
9
8
|
import 'react-map-gl';
|
|
10
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.30.0",
|
|
3
3
|
"categories": {
|
|
4
4
|
"hooks": {
|
|
5
5
|
"description": "React hooks for common functionality like breakpoints, debouncing, local storage, and media queries",
|
|
@@ -1056,6 +1056,13 @@
|
|
|
1056
1056
|
"description": "Utility to check if export is supported in the current environment",
|
|
1057
1057
|
"category": "charts",
|
|
1058
1058
|
"file": "utils/chartExport.ts"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"name": "resolveCSSVariables",
|
|
1062
|
+
"type": "function",
|
|
1063
|
+
"description": "Resolves CSS custom properties (e.g. `var(--color-brand-primary)`) in a cloned SVG by reading computed styles from the original DOM-attached SVG. When an SVG is cloned and serialized for export (PNG/SVG), it loses access to the page's CSS context, so any `var(--*)` values become empty/transparent. This function walks both trees in parallel and replaces unresolved variables with their computed values.",
|
|
1064
|
+
"category": "charts",
|
|
1065
|
+
"file": "utils/chartExport.ts"
|
|
1059
1066
|
}
|
|
1060
1067
|
]
|
|
1061
1068
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@texturehq/edges",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"author": "Nicholas Brown <nick@texturehq.com>",
|
|
5
5
|
"description": "A shared component library for Texture",
|
|
6
6
|
"type": "module",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"tailwind-merge": "^3.2.0"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
|
-
"@biomejs/biome": "
|
|
136
|
+
"@biomejs/biome": "2.4.9",
|
|
137
137
|
"@hookform/resolvers": "^3.9.0",
|
|
138
138
|
"@storybook/addon-essentials": "^8.6.14",
|
|
139
139
|
"@storybook/addon-interactions": "^8.6.14",
|
|
@@ -88,10 +88,7 @@ function findComponentFile(relPath) {
|
|
|
88
88
|
function findStorybookFile(relPath) {
|
|
89
89
|
const base = path.join(SRC_DIR, "components", relPath);
|
|
90
90
|
const componentName = relPath.split("/").pop();
|
|
91
|
-
const candidates = [
|
|
92
|
-
path.join(base, `${componentName}.stories.tsx`),
|
|
93
|
-
path.join(base, `${componentName}.stories.ts`),
|
|
94
|
-
];
|
|
91
|
+
const candidates = [path.join(base, `${componentName}.stories.tsx`), path.join(base, `${componentName}.stories.ts`)];
|
|
95
92
|
for (const f of candidates) {
|
|
96
93
|
if (fs.existsSync(f)) return f;
|
|
97
94
|
}
|
|
@@ -153,15 +150,11 @@ function extractProps(content, componentName) {
|
|
|
153
150
|
);
|
|
154
151
|
let m = ifaceRe.exec(content);
|
|
155
152
|
if (!m) {
|
|
156
|
-
const anyIfaceRe =
|
|
157
|
-
/export\s+interface\s+([A-Za-z0-9_]+Props)\s*(?:extends\s+[^{]+)?\{([\s\S]*?)\}/m;
|
|
153
|
+
const anyIfaceRe = /export\s+interface\s+([A-Za-z0-9_]+Props)\s*(?:extends\s+[^{]+)?\{([\s\S]*?)\}/m;
|
|
158
154
|
m = anyIfaceRe.exec(content);
|
|
159
155
|
}
|
|
160
156
|
if (!m) {
|
|
161
|
-
const typeRe = new RegExp(
|
|
162
|
-
`export\\s+type\\s+${componentName}Props\\s*=\\s*(?:[^{&]+&\s*)?([\\s\\S]*?)\\}`,
|
|
163
|
-
"m"
|
|
164
|
-
);
|
|
157
|
+
const typeRe = new RegExp(`export\\s+type\\s+${componentName}Props\\s*=\\s*(?:[^{&]+&\s*)?([\\s\\S]*?)\\}`, "m");
|
|
165
158
|
m = typeRe.exec(content);
|
|
166
159
|
}
|
|
167
160
|
const props = [];
|
|
@@ -302,9 +295,7 @@ function generateComponentsManifest() {
|
|
|
302
295
|
ensureDir(DIST_DIR);
|
|
303
296
|
writeFile(path.join(DIST_DIR, "components.manifest.json"), JSON.stringify(manifest, null, 2));
|
|
304
297
|
|
|
305
|
-
console.log(
|
|
306
|
-
` Found ${components.length} components in ${Object.keys(categories).length} categories`
|
|
307
|
-
);
|
|
298
|
+
console.log(` Found ${components.length} components in ${Object.keys(categories).length} categories`);
|
|
308
299
|
return manifest;
|
|
309
300
|
}
|
|
310
301
|
|
|
@@ -314,10 +305,7 @@ function generateComponentsManifest() {
|
|
|
314
305
|
|
|
315
306
|
function extractJSDoc(content, functionName) {
|
|
316
307
|
const patterns = [
|
|
317
|
-
new RegExp(
|
|
318
|
-
`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`,
|
|
319
|
-
"s"
|
|
320
|
-
),
|
|
308
|
+
new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`, "s"),
|
|
321
309
|
new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+const\\s+${functionName}\\s*=`, "s"),
|
|
322
310
|
];
|
|
323
311
|
|
|
@@ -326,9 +314,7 @@ function extractJSDoc(content, functionName) {
|
|
|
326
314
|
if (match) {
|
|
327
315
|
const jsdocMatch = match[0].match(/\/\*\*([\s\S]*?)\*\//);
|
|
328
316
|
if (jsdocMatch) {
|
|
329
|
-
const lines = jsdocMatch[1]
|
|
330
|
-
.split("\n")
|
|
331
|
-
.map((line) => line.replace(/^\s*\*\s?/, "").trim());
|
|
317
|
+
const lines = jsdocMatch[1].split("\n").map((line) => line.replace(/^\s*\*\s?/, "").trim());
|
|
332
318
|
|
|
333
319
|
// Extract only the main description (before any @tags)
|
|
334
320
|
const descriptionLines = [];
|
|
@@ -406,10 +392,7 @@ function extractExportsFromFile(filePath) {
|
|
|
406
392
|
while ((match = constPattern.exec(content))) {
|
|
407
393
|
if (!isInComment(match.index)) {
|
|
408
394
|
const name = match[1];
|
|
409
|
-
const afterMatch = content.slice(
|
|
410
|
-
match.index + match[0].length,
|
|
411
|
-
match.index + match[0].length + 50
|
|
412
|
-
);
|
|
395
|
+
const afterMatch = content.slice(match.index + match[0].length, match.index + match[0].length + 50);
|
|
413
396
|
const isFunction = afterMatch.includes("=>") || afterMatch.includes("function");
|
|
414
397
|
|
|
415
398
|
utilities.push({
|
|
@@ -517,17 +500,12 @@ function generateUtilitiesManifest() {
|
|
|
517
500
|
};
|
|
518
501
|
}
|
|
519
502
|
|
|
520
|
-
const totalUtilities = Object.values(manifest.categories).reduce(
|
|
521
|
-
(sum, cat) => sum + cat.utilities.length,
|
|
522
|
-
0
|
|
523
|
-
);
|
|
503
|
+
const totalUtilities = Object.values(manifest.categories).reduce((sum, cat) => sum + cat.utilities.length, 0);
|
|
524
504
|
|
|
525
505
|
ensureDir(DIST_DIR);
|
|
526
506
|
writeFile(path.join(DIST_DIR, "utilities.manifest.json"), JSON.stringify(manifest, null, 2));
|
|
527
507
|
|
|
528
|
-
console.log(
|
|
529
|
-
` Found ${totalUtilities} utilities in ${Object.keys(manifest.categories).length} categories`
|
|
530
|
-
);
|
|
508
|
+
console.log(` Found ${totalUtilities} utilities in ${Object.keys(manifest.categories).length} categories`);
|
|
531
509
|
return manifest;
|
|
532
510
|
}
|
|
533
511
|
|
|
@@ -1101,9 +1079,7 @@ async function main() {
|
|
|
1101
1079
|
});
|
|
1102
1080
|
console.log(output);
|
|
1103
1081
|
} catch (_err) {
|
|
1104
|
-
console.log(
|
|
1105
|
-
"⚠️ Note: Could not merge agent instructions (merge script may not be available yet)"
|
|
1106
|
-
);
|
|
1082
|
+
console.log("⚠️ Note: Could not merge agent instructions (merge script may not be available yet)");
|
|
1107
1083
|
}
|
|
1108
1084
|
|
|
1109
1085
|
console.log("\n✅ Edges AI context generation complete!");
|
|
@@ -132,8 +132,7 @@ const setupCursorRules = () => {
|
|
|
132
132
|
for (const c of manifest.components || []) {
|
|
133
133
|
lines.push(`- ${c.name}`);
|
|
134
134
|
if (c.importRoot) lines.push(` - Import: \`import { ${c.name} } from "${c.importRoot}"\``);
|
|
135
|
-
if (c.importPath)
|
|
136
|
-
lines.push(` - Subpath: \`import { ${c.name} } from "${c.importPath}"\``);
|
|
135
|
+
if (c.importPath) lines.push(` - Subpath: \`import { ${c.name} } from "${c.importPath}"\``);
|
|
137
136
|
if (c.props && c.props.length) {
|
|
138
137
|
const propNames = c.props
|
|
139
138
|
.slice(0, 8)
|
|
@@ -34,18 +34,9 @@ const setupCursorRules = () => {
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
const cursorTemplatesDir = path.join(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
);
|
|
41
|
-
const claudeTemplatesDir = path.join(
|
|
42
|
-
path.dirname(new URL(import.meta.url).pathname),
|
|
43
|
-
"../templates/claude-rules"
|
|
44
|
-
);
|
|
45
|
-
const codexTemplatesDir = path.join(
|
|
46
|
-
path.dirname(new URL(import.meta.url).pathname),
|
|
47
|
-
"../templates/codex-rules"
|
|
48
|
-
);
|
|
37
|
+
const cursorTemplatesDir = path.join(path.dirname(new URL(import.meta.url).pathname), "../templates/cursor-rules");
|
|
38
|
+
const claudeTemplatesDir = path.join(path.dirname(new URL(import.meta.url).pathname), "../templates/claude-rules");
|
|
39
|
+
const codexTemplatesDir = path.join(path.dirname(new URL(import.meta.url).pathname), "../templates/codex-rules");
|
|
49
40
|
const cursorDir = path.join(cwd, ".cursor");
|
|
50
41
|
const rulesDir = path.join(cursorDir, "rules");
|
|
51
42
|
|
|
@@ -55,9 +46,7 @@ const setupCursorRules = () => {
|
|
|
55
46
|
|
|
56
47
|
// Setup Cursor rules
|
|
57
48
|
if (fs.existsSync(cursorTemplatesDir)) {
|
|
58
|
-
const templateFiles = fs
|
|
59
|
-
.readdirSync(cursorTemplatesDir)
|
|
60
|
-
.filter((file) => file.endsWith(".mdc"));
|
|
49
|
+
const templateFiles = fs.readdirSync(cursorTemplatesDir).filter((file) => file.endsWith(".mdc"));
|
|
61
50
|
|
|
62
51
|
if (templateFiles.length > 0) {
|
|
63
52
|
let copiedCount = 0;
|
|
@@ -80,18 +69,16 @@ const setupCursorRules = () => {
|
|
|
80
69
|
|
|
81
70
|
// Setup Claude rules
|
|
82
71
|
if (fs.existsSync(claudeTemplatesDir)) {
|
|
83
|
-
const _claudeTemplateFiles = fs
|
|
84
|
-
.readdirSync(claudeTemplatesDir)
|
|
85
|
-
.filter((file) => file.endsWith(".md"));
|
|
72
|
+
const _claudeTemplateFiles = fs.readdirSync(claudeTemplatesDir).filter((file) => file.endsWith(".md"));
|
|
86
73
|
|
|
87
74
|
// Claude template processing is done later with component injection (lines 221-236)
|
|
88
75
|
// so we don't need to copy templates here
|
|
89
76
|
}
|
|
90
77
|
|
|
91
78
|
// Also render edges-components.mdc from manifest when present
|
|
92
|
-
const manifestPath = [
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
const manifestPath = [path.join(cwd, "node_modules/@texturehq/edges/dist/components.manifest.json")].find((p) =>
|
|
80
|
+
fs.existsSync(p)
|
|
81
|
+
);
|
|
95
82
|
|
|
96
83
|
// Track what we generated for summary
|
|
97
84
|
let cursorComponentCount = 0;
|
|
@@ -153,9 +140,7 @@ const setupCursorRules = () => {
|
|
|
153
140
|
|
|
154
141
|
fs.writeFileSync(cursorOutPath, cursorLines.join("\n"), "utf8");
|
|
155
142
|
cursorComponentCount = manifest.components?.length || 0;
|
|
156
|
-
console.log(
|
|
157
|
-
`✅ Wrote .cursor/rules/edges-components.mdc from manifest (${cursorComponentCount} components)`
|
|
158
|
-
);
|
|
143
|
+
console.log(`✅ Wrote .cursor/rules/edges-components.mdc from manifest (${cursorComponentCount} components)`);
|
|
159
144
|
|
|
160
145
|
// Generate Claude components list
|
|
161
146
|
const claudeLines = [];
|
|
@@ -207,9 +192,7 @@ const setupCursorRules = () => {
|
|
|
207
192
|
const claudeOutPath = path.join(claudeDir, "edges.md");
|
|
208
193
|
fs.writeFileSync(claudeOutPath, claudeContent, "utf8");
|
|
209
194
|
claudeComponentCount = manifest.components?.length || 0;
|
|
210
|
-
console.log(
|
|
211
|
-
`✅ Wrote .claude/edges.md with components list (${claudeComponentCount} components)`
|
|
212
|
-
);
|
|
195
|
+
console.log(`✅ Wrote .claude/edges.md with components list (${claudeComponentCount} components)`);
|
|
213
196
|
}
|
|
214
197
|
|
|
215
198
|
// Generate Codex docs using template
|
|
@@ -224,9 +207,7 @@ const setupCursorRules = () => {
|
|
|
224
207
|
const codexOutPath = path.join(codexDir, "edges.md");
|
|
225
208
|
fs.writeFileSync(codexOutPath, codexContent, "utf8");
|
|
226
209
|
codexComponentCount = manifest.components?.length || 0;
|
|
227
|
-
console.log(
|
|
228
|
-
`✅ Wrote .codex/edges.md with components list (${codexComponentCount} components)`
|
|
229
|
-
);
|
|
210
|
+
console.log(`✅ Wrote .codex/edges.md with components list (${codexComponentCount} components)`);
|
|
230
211
|
}
|
|
231
212
|
} catch (err) {
|
|
232
213
|
console.log("⚠️ Failed to read components.manifest.json:", err.message);
|