@deskhero/dh_ui 2.63.1 → 2.64.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.
@@ -315,3 +315,66 @@ Full list of keys: `spacer-0`, `spacer-half`, `spacer-1` … `spacer-10`, `space
315
315
  - **Sizes:** Use `w-*` / `h-*` with the spacing scale for fixed sizes, or `w-100` / `h-100` for 100%.
316
316
  - **Combining:** e.g. `flex flex-row items-center justify-between gap-spacer-2 p-spacer-4` is a valid and preferred pattern.
317
317
  - **No new one-off CSS:** If a layout or spacing need is covered by these classes, use the classes instead of new rules in the component.
318
+
319
+ ---
320
+
321
+ ## 6. Typography utilities (`typography.scss`)
322
+
323
+ Utility classes for text transform, alignment, weight, decoration, truncation and line clamping. These are intentionally Tailwind-like and **do not use the `dh-` prefix**.
324
+
325
+ ### Text transform
326
+ | Class | Effect |
327
+ |---------------------------|---------------------------|
328
+ | `text-transform-none` | `text-transform: none` |
329
+ | `text-transform-capitalize` | `text-transform: capitalize` |
330
+ | `text-transform-uppercase` | `text-transform: uppercase` |
331
+ | `text-transform-lowercase` | `text-transform: lowercase` |
332
+
333
+ ### Text alignment
334
+ | Class | Effect |
335
+ |--------------|----------------------|
336
+ | `text-left` | `text-align: left` |
337
+ | `text-center`| `text-align: center` |
338
+ | `text-right` | `text-align: right` |
339
+ | `text-justify` | `text-align: justify` |
340
+
341
+ ### Font weight
342
+ | Class | Effect |
343
+ |--------------|---------------------|
344
+ | `font-normal`| `font-weight: 400` |
345
+ | `font-medium`| `font-weight: 500` |
346
+ | `font-bold` | `font-weight: 700` |
347
+
348
+ ### Text decoration
349
+ | Class | Effect |
350
+ |--------------------|----------------------------|
351
+ | `text-underline` | `text-decoration: underline` |
352
+ | `text-line-through`| `text-decoration: line-through` |
353
+ | `text-no-underline`| `text-decoration: none` |
354
+
355
+ ### Truncation & wrapping
356
+ | Class | Effect |
357
+ |----------------|-------------------------------------------------|
358
+ | `text-truncate`| Single-line ellipsis (`overflow: hidden; text-overflow: ellipsis; white-space: nowrap`) |
359
+ | `text-wrap` | Normal wrapping (`white-space: normal`) |
360
+ | `text-nowrap` | No wrapping (`white-space: nowrap`) |
361
+
362
+ ### Line clamp (multi-line truncation)
363
+ These rely on `-webkit-line-clamp` and `-webkit-box-orient` for cross-browser support.
364
+
365
+ | Class | Lines shown |
366
+ |----------------|-------------|
367
+ | `line-clamp-1` | 1 line |
368
+ | `line-clamp-2` | 2 lines |
369
+ | `line-clamp-3` | 3 lines |
370
+
371
+ **Example:**
372
+ ```html
373
+ <p class="text-primary font-medium text-center text-truncate">
374
+ This is a long title that will truncate on a single line.
375
+ </p>
376
+
377
+ <p class="text-secondary line-clamp-2">
378
+ This description will be clamped to two lines with an ellipsis in supporting browsers.
379
+ </p>
380
+ ```
package/README.md CHANGED
@@ -75,6 +75,33 @@ Then on your project
75
75
  npm link @deskhero/dh_ui
76
76
  ```
77
77
 
78
+ ## VS Code IntelliSense for Deskhero UI
79
+
80
+ You can enable richer autocomplete and hover information for Deskhero components and utility classes by pointing VS Code to the generated custom data manifests.
81
+
82
+ After building the library (or running `npm run build:all`), the following files are created:
83
+
84
+ - `dist/vscode.css-custom-data.json` – CSS classes (e.g. `flex`, `items-center`) with descriptions where available.
85
+ - `dist/vscode.html-custom-data.json` – Vue component tags (e.g. `dh-advanced-filter`) with descriptions from component docs.
86
+
87
+ In your **consumer application**, add a workspace-level `.vscode/settings.json` (or extend your existing one) and reference these files with paths relative to your app:
88
+
89
+ ```json
90
+ {
91
+ "css.customData": [
92
+ "../dh-ui/dist/vscode.css-custom-data.json"
93
+ ],
94
+ "html.customData": [
95
+ "../dh-ui/dist/vscode.html-custom-data.json"
96
+ ]
97
+ }
98
+ ```
99
+
100
+ Adjust the `../dh-ui` segment to match where this library lives relative to your consumer app. Once configured, VS Code will offer:
101
+
102
+ - Tag completion and hover for Deskhero components in Vue SFC templates.
103
+ - Class name completion and hover for Deskhero utility classes in templates and styles.
104
+
78
105
  <hr/>
79
106
 
80
107
  ### Recommended IDE Setup
package/bin/ai-init.cjs CHANGED
@@ -22,10 +22,7 @@ function main() {
22
22
  }
23
23
 
24
24
  if (fs.existsSync(DEST_FILE)) {
25
- console.log(
26
- "[AI-INIT] './ai/DH-UI-USAGE.MD' already exists. No changes made."
27
- );
28
- return;
25
+ fs.unlinkSync(DEST_FILE);
29
26
  }
30
27
 
31
28
  const contents = fs.readFileSync(SOURCE_FILE, "utf8");