intelliwaketssveltekitv25 1.0.82 → 1.0.83

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.
@@ -0,0 +1,118 @@
1
+ # TextArea Component
2
+
3
+ **Replaces:** Native `<textarea>` elements
4
+
5
+ **Purpose:** Auto-resizing textarea with automatic height adjustment and readonly display mode
6
+
7
+ **When to Use:**
8
+ - Multi-line text input (comments, descriptions, notes)
9
+ - Forms requiring paragraph-length text entry
10
+ - Any textarea that should grow/shrink with content
11
+ - Readonly text display that preserves formatting
12
+
13
+ ## Key Props
14
+
15
+ - `value: string | null` ($bindable) - Current text value, use `bind:value` for two-way binding
16
+ - `readonly?: boolean` - Display as readonly (renders as DisplayHTML instead of textarea)
17
+ - `propagateEnter?: boolean` (default: false) - Allow Enter key to propagate (useful in forms)
18
+ - `use?: ActionArray` - Svelte actions array
19
+ - Standard HTML textarea attributes: `placeholder`, `disabled`, `required`, `maxlength`, `rows`, `cols`, `name`, `class`, etc.
20
+
21
+ ## Features
22
+
23
+ - **Auto-grow**: Automatically adjusts height to fit content using `autoGrow` action
24
+ - **Readonly mode**: Displays as HTML when readonly (preserves formatting, line breaks)
25
+ - **Enter key control**: Prevents Enter key propagation by default (prevents form submission)
26
+ - **Full textarea API**: Supports all standard HTML textarea attributes
27
+
28
+ ## Usage Examples
29
+
30
+ ```svelte
31
+ <script>
32
+ import { TextArea } from 'intelliwaketssveltekitv25';
33
+ let comment = $state('');
34
+ let description = $state('Product description here...');
35
+ </script>
36
+
37
+ <!-- Basic auto-resizing textarea -->
38
+ <label>
39
+ Comment:
40
+ <TextArea bind:value={comment} placeholder="Enter your comment..." />
41
+ </label>
42
+
43
+ <!-- With max length -->
44
+ <TextArea
45
+ bind:value={description}
46
+ maxlength={500}
47
+ placeholder="Describe the product..."
48
+ required
49
+ />
50
+
51
+ <!-- Readonly display -->
52
+ <TextArea value={savedComment} readonly />
53
+
54
+ <!-- With Enter key propagation (for inline editing) -->
55
+ <TextArea
56
+ bind:value={note}
57
+ propagateEnter={true}
58
+ placeholder="Press Enter to submit"
59
+ />
60
+
61
+ <!-- In a form -->
62
+ <form method="POST">
63
+ <TextArea
64
+ name="feedback"
65
+ bind:value={feedback}
66
+ placeholder="Your feedback..."
67
+ required
68
+ />
69
+ <button type="submit">Submit</button>
70
+ </form>
71
+
72
+ <!-- With custom styling -->
73
+ <TextArea
74
+ bind:value={text}
75
+ class="border-2 border-blue-500 rounded-lg p-4"
76
+ placeholder="Styled textarea..."
77
+ />
78
+
79
+ <!-- Disabled state -->
80
+ <TextArea value={existingText} disabled />
81
+
82
+ <!-- With rows (initial height) -->
83
+ <TextArea
84
+ bind:value={longText}
85
+ rows={10}
86
+ placeholder="Start with 10 rows..."
87
+ />
88
+ ```
89
+
90
+ ## Common Mistakes
91
+
92
+ - ❌ Using native `<textarea>` without auto-grow: `<textarea bind:value={x}>`
93
+ ✅ Correct: `<TextArea bind:value={x} />` (auto-grows automatically)
94
+
95
+ - ❌ Not using `bind:value`: `<TextArea value={x} />`
96
+ ✅ Correct: `<TextArea bind:value={x} />` (for two-way binding)
97
+
98
+ - ❌ Expecting readonly to show a textarea: `<TextArea value={x} readonly />`
99
+ ✅ Note: readonly mode displays as formatted HTML, not a textarea
100
+
101
+ - ❌ Form submitting on Enter key when you don't want it to
102
+ ✅ Correct: Default behavior prevents Enter propagation; use `propagateEnter={true}` if you want form submission on Enter
103
+
104
+ ## Props Details
105
+
106
+ - **Auto-grow behavior**: Height automatically adjusts as you type, no scrolling needed
107
+ - **Readonly rendering**: Uses `DisplayHTML` component to show formatted text with line breaks preserved
108
+ - **Enter key**: By default, Enter key is stopped from propagating to prevent accidental form submissions
109
+
110
+ ## Related Components
111
+
112
+ - `DisplayHTML` - Used internally for readonly display
113
+ - `InputNumber` - For single-line numeric inputs
114
+ - `MultiSelect` - For selecting from predefined options
115
+
116
+ ## Storybook
117
+
118
+ See `Components/TextArea` stories
@@ -0,0 +1,38 @@
1
+ ## Navigation
2
+
3
+ ### Getting Started
4
+ - [Home](Home)
5
+ - [Integration Guide](Integration)
6
+ - [Svelte 5 Patterns](Svelte-5-Patterns)
7
+
8
+ ### Form Controls
9
+ - [Switch](Switch)
10
+ - [InputNumber](InputNumber)
11
+ - [TextArea](TextArea)
12
+ - [DropDown](DropDown)
13
+ - [MultiSelect](MultiSelect)
14
+
15
+ ### Data Display
16
+ - [DateRangePicker](DateRangePicker)
17
+
18
+ ### Layout & Overlays
19
+ - [Modal](Modal)
20
+ - [TabHeader](TabHeader)
21
+ - [TabHref](TabHref)
22
+ - [SlideDown](SlideDown)
23
+
24
+ ### Visual & Utilities
25
+ - [Icon](Icon)
26
+ - [DisplayHTML](DisplayHTML)
27
+ - [Functions](Functions)
28
+
29
+ ### Navigation & Search
30
+ - [Search](Search)
31
+ - [Paginator](Paginator)
32
+
33
+ ### Data Import
34
+ - [Importer](Importer)
35
+ - [ImporterLoad](ImporterLoad)
36
+ - [ImporterAnalysis](ImporterAnalysis)
37
+
38
+ ---
package/llms.txt ADDED
@@ -0,0 +1,113 @@
1
+ # IntelliWakeTSSvelteKitV2.5 - Component Reference Guide
2
+
3
+ **For detailed documentation:** See `docs/` directory
4
+
5
+ ## Quick Reference: When to Use Each Component
6
+
7
+ ### 🎛️ Form Controls - Replace Native HTML Elements
8
+
9
+ | User Need | Use Component | Instead of | Docs Link |
10
+ |-----------|---------------|------------|-----------|
11
+ | Toggle switch, on/off control | **Switch** | `<input type="checkbox">` | [Switch.md](docs/Switch.md) |
12
+ | Numeric input (currency, %, decimals) | **InputNumber** | `<input type="number">` | [InputNumber.md](docs/InputNumber.md) |
13
+ | Multi-line text input | **TextArea** | `<textarea>` | [TextArea.md](docs/TextArea.md) |
14
+ | Dropdown menu with actions | **DropDown** | `<select>` | [DropDown.md](docs/DropDown.md) |
15
+ | Multi-select with search | **MultiSelect** | `<select multiple>` | [MultiSelect.md](docs/MultiSelect.md) |
16
+
17
+ ### 🪟 Overlays & Dialogs
18
+
19
+ | User Need | Use Component | Docs Link |
20
+ |-----------|---------------|-----------|
21
+ | Modal dialog, popup, confirmation | **Modal** | [Modal.md](docs/Modal.md) |
22
+ | Animated dropdown menus | **SlideDown** | [SlideDown.md](docs/SlideDown.md) |
23
+
24
+ ### 📊 Data Display
25
+
26
+ | User Need | Use Component | Docs Link |
27
+ |-----------|---------------|-----------|
28
+ | Date range picker with presets | **DateRangePicker** | [DateRangePicker.md](docs/DateRangePicker.md) |
29
+
30
+ ### 🔍 Navigation & Search
31
+
32
+ | User Need | Use Component | Docs Link |
33
+ |-----------|---------------|-----------|
34
+ | Debounced search input | **Search** | [Search.md](docs/Search.md) |
35
+ | Pagination controls | **Paginator** | [Paginator.md](docs/Paginator.md) |
36
+ | Client-side tabs | **TabHeader** | [TabHeader.md](docs/TabHeader.md) |
37
+ | URL-based tabs | **TabHref** | [TabHref.md](docs/TabHref.md) |
38
+
39
+ ### 🎨 Visual & Utilities
40
+
41
+ | User Need | Use Component | Docs Link |
42
+ |-----------|---------------|-----------|
43
+ | FontAwesome icons | **Icon** | [Icon.md](docs/Icon.md) |
44
+ | HTML rendering | **DisplayHTML** | [DisplayHTML.md](docs/DisplayHTML.md) |
45
+ | Browser APIs (GPS/clipboard/export), Svelte use: actions (focus/navigation/forms) | **Functions** | [Functions.md](docs/Functions.md) |
46
+
47
+ ### 📥 Data Import
48
+
49
+ | User Need | Use Component | Docs Link |
50
+ |-----------|---------------|-----------|
51
+ | CSV import | **Importer** | [Importer.md](docs/Importer.md) |
52
+ | CSV upload | **ImporterLoad** | [ImporterLoad.md](docs/ImporterLoad.md) |
53
+ | CSV validation | **ImporterAnalysis** | [ImporterAnalysis.md](docs/ImporterAnalysis.md) |
54
+
55
+ ## Component Decision Tree
56
+
57
+ ```
58
+ Need form input?
59
+ ├─ Boolean/toggle → Switch
60
+ ├─ Number → InputNumber
61
+ ├─ Multi-line text → TextArea
62
+ ├─ Single selection from list → DropDown
63
+ └─ Multiple selections from list → MultiSelect
64
+
65
+ Need data display?
66
+ ├─ Date range selection → DateRangePicker
67
+ └─ Large dataset (1000+ items) → VirtualTable (see docs/Home.md)
68
+
69
+ Need navigation?
70
+ ├─ Search/filter → Search
71
+ ├─ Pagination → Paginator
72
+ ├─ Local tabs → TabHeader
73
+ └─ URL tabs → TabHref
74
+
75
+ Need overlay?
76
+ ├─ Dialog/confirmation → Modal
77
+ └─ Dropdown menu → SlideDown
78
+
79
+ Need visual content?
80
+ ├─ Icons → Icon
81
+ └─ HTML display → DisplayHTML
82
+
83
+ Need data import?
84
+ └─ CSV import → Importer
85
+
86
+ Need layout?
87
+ └─ Master-detail pattern → MasterDetailLayout (see docs/Home.md)
88
+ ```
89
+
90
+ ## Essential Props Pattern
91
+
92
+ All form controls support two-way binding with `bind:`:
93
+
94
+ ```svelte
95
+ <Switch bind:checked={value} />
96
+ <InputNumber bind:value={amount} />
97
+ <TextArea bind:value={text} />
98
+ <MultiSelect bind:selected={items} possibles={allItems} />
99
+ ```
100
+
101
+ ## Integration Checklist
102
+
103
+ 1. ✅ Import CSS: `import 'intelliwaketssveltekitv25/dist/app.css'`
104
+ 2. ✅ Configure Tailwind colors (see [Integration.md](docs/Integration.md))
105
+ 3. ✅ Use Svelte 5 runes: `$state()`, `$derived()` (see [Svelte-5-Patterns.md](docs/Svelte-5-Patterns.md))
106
+
107
+ ## Critical Reminders for AI Assistants
108
+
109
+ 1. **Always prefer library components over native HTML** - Check the table above first
110
+ 2. **Use `bind:` for two-way binding** - `bind:checked`, `bind:value`, `bind:selected`
111
+ 3. **Reference detailed docs** - Don't guess props, check [docs/ComponentName.md](docs/Home.md)
112
+ 4. **Svelte 5 syntax required** - Use `$state()`, not `let count = 0`
113
+ 5. **TypeScript generics** - Use `IArrayStructure<T>` for type safety
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "exports": {
@@ -22,7 +22,8 @@
22
22
  "dist",
23
23
  "!dist/**/*.test.*",
24
24
  "!dist/**/*.spec.*",
25
- "llm.txt",
25
+ "docs",
26
+ "llms.txt",
26
27
  "INTEGRATION.md"
27
28
  ],
28
29
  "peerDependencies": {