@texturehq/edges 1.5.2 → 1.5.3

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.
@@ -103,6 +103,46 @@
103
103
  }
104
104
  }
105
105
 
106
+ @keyframes zoom-in-97 {
107
+ from {
108
+ opacity: 0;
109
+ transform: scale(0.97);
110
+ }
111
+ to {
112
+ opacity: 1;
113
+ transform: scale(1);
114
+ }
115
+ }
116
+
117
+ @keyframes zoom-out-97 {
118
+ from {
119
+ opacity: 1;
120
+ transform: scale(1);
121
+ }
122
+ to {
123
+ opacity: 0;
124
+ transform: scale(0.97);
125
+ }
126
+ }
127
+
128
+ @keyframes slide-in-from-top-2 {
129
+ from {
130
+ transform: translateY(-0.5rem);
131
+ }
132
+ to {
133
+ transform: translateY(0);
134
+ }
135
+ }
136
+
137
+ @keyframes slide-out-to-top-2 {
138
+ from {
139
+ transform: translateY(0);
140
+ }
141
+ to {
142
+ transform: translateY(-0.5rem);
143
+ }
144
+ }
145
+
106
146
  /* ============================================
107
147
  Animation Utility Classes
108
148
  ============================================ */
package/dist/styles.css CHANGED
@@ -221,6 +221,7 @@
221
221
  --text-4xl--line-height: calc(2.5 / 2.25);
222
222
  --tracking-tight: -0.025em;
223
223
  --tracking-wider: 0.05em;
224
+ --leading-tight: 1.25;
224
225
  --leading-relaxed: 1.625;
225
226
  --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15);
226
227
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
@@ -801,6 +802,42 @@
801
802
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
802
803
  }
803
804
  }
805
+ @keyframes zoom-in-97 {
806
+ from {
807
+ opacity: 0;
808
+ transform: scale(0.97);
809
+ }
810
+ to {
811
+ opacity: 1;
812
+ transform: scale(1);
813
+ }
814
+ }
815
+ @keyframes zoom-out-97 {
816
+ from {
817
+ opacity: 1;
818
+ transform: scale(1);
819
+ }
820
+ to {
821
+ opacity: 0;
822
+ transform: scale(0.97);
823
+ }
824
+ }
825
+ @keyframes slide-in-from-top-2 {
826
+ from {
827
+ transform: translateY(-0.5rem);
828
+ }
829
+ to {
830
+ transform: translateY(0);
831
+ }
832
+ }
833
+ @keyframes slide-out-to-top-2 {
834
+ from {
835
+ transform: translateY(0);
836
+ }
837
+ to {
838
+ transform: translateY(-0.5rem);
839
+ }
840
+ }
804
841
  .slide-in-from-right {
805
842
  animation: slide-in-from-right 0.3s ease-out;
806
843
  }
@@ -1730,6 +1767,12 @@
1730
1767
  --tw-border-spacing-y: var(--spacing-0);
1731
1768
  border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
1732
1769
  }
1770
+ .origin-top-left {
1771
+ transform-origin: 0 0;
1772
+ }
1773
+ .origin-top-right {
1774
+ transform-origin: 100% 0;
1775
+ }
1733
1776
  .-translate-x-1\/2 {
1734
1777
  --tw-translate-x: calc(calc(1/2 * 100%) * -1);
1735
1778
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -3029,6 +3072,10 @@
3029
3072
  --tw-leading: var(--leading-relaxed);
3030
3073
  line-height: var(--leading-relaxed);
3031
3074
  }
3075
+ .leading-tight {
3076
+ --tw-leading: var(--leading-tight);
3077
+ line-height: var(--leading-tight);
3078
+ }
3032
3079
  .font-\[500\] {
3033
3080
  --tw-font-weight: 500;
3034
3081
  font-weight: 500;
@@ -4202,6 +4249,12 @@
4202
4249
  opacity: 50%;
4203
4250
  }
4204
4251
  }
4252
+ .data-\[exiting\]\:duration-150 {
4253
+ &[data-exiting] {
4254
+ --tw-duration: 150ms;
4255
+ transition-duration: 150ms;
4256
+ }
4257
+ }
4205
4258
  .data-\[exiting\]\:duration-200 {
4206
4259
  &[data-exiting] {
4207
4260
  --tw-duration: 200ms;
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.5.2",
3
- "generatedAt": "2025-10-11T01:32:19.296Z",
2
+ "version": "1.5.3",
3
+ "generatedAt": "2025-10-12T13:19:01.260Z",
4
4
  "categories": {
5
5
  "hooks": {
6
6
  "description": "React hooks for common functionality like debouncing, local storage, and time controls",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texturehq/edges",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "author": "Nicholas Brown <nick@texturehq.com>",
5
5
  "description": "A shared component library for Texture",
6
6
  "type": "module",
@@ -39,7 +39,7 @@ function findComponentFile(relPath) {
39
39
  // Components can be in directories like Button/Button.tsx or charts/ChartAxis/ChartAxis.tsx
40
40
  const base = path.join(SRC_DIR, "components", relPath);
41
41
  // Get the component name (last part of the path)
42
- const componentName = relPath.split('/').pop();
42
+ const componentName = relPath.split("/").pop();
43
43
  const candidates = [
44
44
  path.join(base, `${componentName}.tsx`),
45
45
  path.join(base, `${componentName}.ts`),
@@ -127,7 +127,7 @@ function run() {
127
127
  // Description: JSDoc above various export patterns
128
128
  let idx = -1;
129
129
  let description = "";
130
-
130
+
131
131
  // Try multiple patterns to find the component export
132
132
  const patterns = [
133
133
  `export function ${name}`,
@@ -137,11 +137,11 @@ function run() {
137
137
  new RegExp(`export\\s+const\\s+${name}\\s*[:=]`),
138
138
  new RegExp(`export\\s+function\\s+${name}\\s*[(<]`),
139
139
  new RegExp(`export\\s+class\\s+${name}\\s*[{<]`),
140
- new RegExp(`export\\s+(interface|type)\\s+${name}Props\\b`)
140
+ new RegExp(`export\\s+(interface|type)\\s+${name}Props\\b`),
141
141
  ];
142
-
142
+
143
143
  for (const pattern of patterns) {
144
- if (typeof pattern === 'string') {
144
+ if (typeof pattern === "string") {
145
145
  idx = content.indexOf(pattern);
146
146
  } else {
147
147
  const match = content.search(pattern);
@@ -149,7 +149,7 @@ function run() {
149
149
  }
150
150
  if (idx !== -1) break;
151
151
  }
152
-
152
+
153
153
  // If we found an export, get the JSDoc above it
154
154
  if (idx !== -1) {
155
155
  description = getJsdocAbove(content, idx);
@@ -23,13 +23,19 @@ function extractJSDoc(content, functionName) {
23
23
  // Look for JSDoc block immediately before the function/const declaration
24
24
  const patterns = [
25
25
  // Function declaration: /** ... */ export function name OR export async function name
26
- new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`, "s"),
26
+ new RegExp(
27
+ `\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`,
28
+ "s"
29
+ ),
27
30
  // Arrow function: /** ... */ export const name =
28
31
  new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+const\\s+${functionName}\\s*=`, "s"),
29
32
  // Type export: /** ... */ export type name
30
33
  new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+type\\s+${functionName}\\b`, "s"),
31
34
  // Interface export: /** ... */ export interface name
32
- new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+interface\\s+${functionName}\\b`, "s"),
35
+ new RegExp(
36
+ `\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+interface\\s+${functionName}\\b`,
37
+ "s"
38
+ ),
33
39
  ];
34
40
 
35
41
  for (const pattern of patterns) {
@@ -56,7 +62,10 @@ function extractJSDoc(content, functionName) {
56
62
  */
57
63
  function extractParams(content, functionName) {
58
64
  const patterns = [
59
- new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`, "s"),
65
+ new RegExp(
66
+ `\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`,
67
+ "s"
68
+ ),
60
69
  new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+const\\s+${functionName}\\s*=`, "s"),
61
70
  ];
62
71
 
@@ -89,7 +98,10 @@ function extractParams(content, functionName) {
89
98
  */
90
99
  function extractReturns(content, functionName) {
91
100
  const patterns = [
92
- new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`, "s"),
101
+ new RegExp(
102
+ `\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`,
103
+ "s"
104
+ ),
93
105
  new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+const\\s+${functionName}\\s*=`, "s"),
94
106
  ];
95
107
 
@@ -119,7 +131,10 @@ function extractReturns(content, functionName) {
119
131
  */
120
132
  function extractExample(content, functionName) {
121
133
  const patterns = [
122
- new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`, "s"),
134
+ new RegExp(
135
+ `\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+(?:async\\s+)?function\\s+${functionName}\\b`,
136
+ "s"
137
+ ),
123
138
  new RegExp(`\\/\\*\\*([^*]|\\*(?!\\/))*\\*\\/\\s*export\\s+const\\s+${functionName}\\s*=`, "s"),
124
139
  ];
125
140
 
@@ -137,7 +152,10 @@ function extractExample(content, functionName) {
137
152
  .join("\n")
138
153
  .trim();
139
154
  // Remove ```typescript and ``` markers if present
140
- return example.replace(/^```\w*\n?/, "").replace(/\n?```$/, "").trim();
155
+ return example
156
+ .replace(/^```\w*\n?/, "")
157
+ .replace(/\n?```$/, "")
158
+ .trim();
141
159
  }
142
160
  }
143
161
  }
@@ -153,7 +171,7 @@ function extractExports(filePath) {
153
171
  if (!content) return [];
154
172
 
155
173
  const utilities = [];
156
-
174
+
157
175
  // Match export function declarations
158
176
  const functionPattern = /export\s+(?:async\s+)?function\s+(\w+)/g;
159
177
  let match;
@@ -174,9 +192,12 @@ function extractExports(filePath) {
174
192
  while ((match = constPattern.exec(content))) {
175
193
  const name = match[1];
176
194
  // Check if it's likely a function (has => or function keyword after =)
177
- const afterMatch = content.slice(match.index + match[0].length, match.index + match[0].length + 50);
195
+ const afterMatch = content.slice(
196
+ match.index + match[0].length,
197
+ match.index + match[0].length + 50
198
+ );
178
199
  const isFunction = afterMatch.includes("=>") || afterMatch.includes("function");
179
-
200
+
180
201
  utilities.push({
181
202
  name,
182
203
  type: isFunction ? "function" : "constant",
@@ -207,28 +228,24 @@ function extractExports(filePath) {
207
228
  */
208
229
  function scanDirectory(dir, category) {
209
230
  const utilities = [];
210
-
231
+
211
232
  if (!fs.existsSync(dir)) return utilities;
212
-
233
+
213
234
  const files = fs.readdirSync(dir);
214
-
235
+
215
236
  for (const file of files) {
216
237
  const filePath = path.join(dir, file);
217
238
  const stat = fs.statSync(filePath);
218
-
239
+
219
240
  if (stat.isDirectory() && file !== "__tests__" && file !== "tests") {
220
241
  // Recursively scan subdirectories
221
242
  utilities.push(...scanDirectory(filePath, `${category}/${file}`));
222
243
  } else if ((file.endsWith(".ts") || file.endsWith(".tsx")) && !file.endsWith(".d.ts")) {
223
244
  // Skip test files, stories, and type definition files
224
- if (
225
- file.includes(".test.") ||
226
- file.includes(".spec.") ||
227
- file.includes(".stories.")
228
- ) {
245
+ if (file.includes(".test.") || file.includes(".spec.") || file.includes(".stories.")) {
229
246
  continue;
230
247
  }
231
-
248
+
232
249
  const funcs = extractExports(filePath);
233
250
  for (const func of funcs) {
234
251
  utilities.push({
@@ -239,43 +256,45 @@ function scanDirectory(dir, category) {
239
256
  }
240
257
  }
241
258
  }
242
-
259
+
243
260
  return utilities;
244
261
  }
245
262
 
246
263
  function run() {
247
264
  try {
248
265
  console.log("Generating utilities manifest...");
249
-
266
+
250
267
  const manifest = {
251
268
  version: process.env.npm_package_version || "unknown",
252
269
  generatedAt: new Date().toISOString(),
253
270
  categories: {},
254
271
  };
255
-
272
+
256
273
  // Scan hooks directory
257
274
  const hooksDir = path.join(SRC_DIR, "hooks");
258
275
  const hooks = scanDirectory(hooksDir, "hooks");
259
276
  if (hooks.length > 0) {
260
277
  manifest.categories.hooks = {
261
- description: "React hooks for common functionality like debouncing, local storage, and time controls",
278
+ description:
279
+ "React hooks for common functionality like debouncing, local storage, and time controls",
262
280
  utilities: hooks.sort((a, b) => a.name.localeCompare(b.name)),
263
281
  };
264
282
  }
265
-
283
+
266
284
  // Scan utils directory
267
285
  const utilsDir = path.join(SRC_DIR, "utils");
268
-
286
+
269
287
  // Formatting utilities
270
288
  const formattingDir = path.join(utilsDir, "formatting");
271
289
  const formatting = scanDirectory(formattingDir, "formatting");
272
290
  if (formatting.length > 0) {
273
291
  manifest.categories.formatting = {
274
- description: "Comprehensive formatting utilities for text, numbers, dates, currency, energy, temperature, distance, and more",
292
+ description:
293
+ "Comprehensive formatting utilities for text, numbers, dates, currency, energy, temperature, distance, and more",
275
294
  utilities: formatting.sort((a, b) => a.name.localeCompare(b.name)),
276
295
  };
277
296
  }
278
-
297
+
279
298
  // Chart utilities
280
299
  const chartsDir = path.join(utilsDir, "charts");
281
300
  const charts = scanDirectory(chartsDir, "charts");
@@ -283,52 +302,56 @@ function run() {
283
302
  const chartUtils = extractExports(path.join(utilsDir, "charts.ts"));
284
303
  const allChartUtils = [
285
304
  ...charts,
286
- ...chartExportUtils.map(f => ({ ...f, category: "charts", file: "utils/chartExport.ts" })),
287
- ...chartUtils.map(f => ({ ...f, category: "charts", file: "utils/charts.ts" }))
305
+ ...chartExportUtils.map((f) => ({ ...f, category: "charts", file: "utils/chartExport.ts" })),
306
+ ...chartUtils.map((f) => ({ ...f, category: "charts", file: "utils/charts.ts" })),
288
307
  ];
289
-
308
+
290
309
  if (allChartUtils.length > 0) {
291
310
  manifest.categories.charts = {
292
311
  description: "Chart utilities for data visualization, scaling, and export functionality",
293
312
  utilities: allChartUtils.sort((a, b) => a.name.localeCompare(b.name)),
294
313
  };
295
314
  }
296
-
315
+
297
316
  // Color utilities
298
317
  const colorUtils = extractExports(path.join(utilsDir, "colors.ts"));
299
318
  if (colorUtils.length > 0) {
300
319
  manifest.categories.colors = {
301
- description: "Color management utilities for theme-aware color resolution, contrast calculation, and palette generation",
302
- utilities: colorUtils.map(f => ({ ...f, category: "colors", file: "utils/colors.ts" }))
320
+ description:
321
+ "Color management utilities for theme-aware color resolution, contrast calculation, and palette generation",
322
+ utilities: colorUtils
323
+ .map((f) => ({ ...f, category: "colors", file: "utils/colors.ts" }))
303
324
  .sort((a, b) => a.name.localeCompare(b.name)),
304
325
  };
305
326
  }
306
-
327
+
307
328
  // General utilities from utils/index.ts
308
329
  const generalUtils = extractExports(path.join(utilsDir, "index.ts"));
309
330
  if (generalUtils.length > 0) {
310
331
  manifest.categories.general = {
311
- description: "General utility functions for focus management, Tailwind class composition, and theme utilities",
312
- utilities: generalUtils.map(f => ({ ...f, category: "general", file: "utils/index.ts" }))
332
+ description:
333
+ "General utility functions for focus management, Tailwind class composition, and theme utilities",
334
+ utilities: generalUtils
335
+ .map((f) => ({ ...f, category: "general", file: "utils/index.ts" }))
313
336
  .sort((a, b) => a.name.localeCompare(b.name)),
314
337
  };
315
338
  }
316
-
339
+
317
340
  // Add summary
318
341
  const totalUtilities = Object.values(manifest.categories).reduce(
319
342
  (sum, cat) => sum + cat.utilities.length,
320
343
  0
321
344
  );
322
-
345
+
323
346
  manifest.summary = {
324
347
  totalUtilities,
325
348
  totalCategories: Object.keys(manifest.categories).length,
326
- categories: Object.keys(manifest.categories).map(cat => ({
349
+ categories: Object.keys(manifest.categories).map((cat) => ({
327
350
  name: cat,
328
351
  count: manifest.categories[cat].utilities.length,
329
352
  })),
330
353
  };
331
-
354
+
332
355
  // Add import information
333
356
  manifest.importInfo = {
334
357
  package: "@texturehq/edges",
@@ -348,15 +371,15 @@ function run() {
348
371
  {
349
372
  description: "Import color utilities",
350
373
  code: 'import { getResolvedColor, isLightColor } from "@texturehq/edges"',
351
- }
374
+ },
352
375
  ],
353
376
  };
354
-
377
+
355
378
  // Write the manifest
356
379
  ensureDir(DIST_DIR);
357
380
  const outputPath = path.join(DIST_DIR, "utilities.manifest.json");
358
381
  fs.writeFileSync(outputPath, JSON.stringify(manifest, null, 2));
359
-
382
+
360
383
  console.log(
361
384
  `Generated ${path.join("dist", "utilities.manifest.json")} with ${totalUtilities} utilities in ${Object.keys(manifest.categories).length} categories.`
362
385
  );
@@ -92,4 +92,3 @@ try {
92
92
  console.error("❌ Error generating viz-runtime.css:", error);
93
93
  process.exit(1);
94
94
  }
95
-