json-renderers 1.13.7 → 1.14.1

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 CHANGED
@@ -1,272 +1,293 @@
1
- # json-renderers
2
-
3
- > **Browser DOM Component Renderer for JSON-Driven UIs**
4
- > Consumes declarative component specifications from `json-renderers-build` and mounts real DOM elements into target containers using `@keshavsoft/json-to-tag`.
5
-
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
- [![Version](https://img.shields.io/badge/version-1.13.6-emerald.svg)](package.json)
8
- [![Layer: DOM Runtime](https://img.shields.io/badge/Layer-DOM%20Mounting%20Runtime-indigo.svg)](#the-story-of-json-renderers)
9
-
10
- ---
11
-
12
- ## The Story of `json-renderers`
13
-
14
- `json-renderers` is the **DOM Mounting & Runtime Renderer** of the KeshavSoft JSON-to-DOM ecosystem.
15
-
16
- While its sister library [`json-renderers-build`](https://github.com/keshavsoft/json-renderers-build) handles **headless specification compilation** (pure data ➔ JSON AST), `json-renderers` is responsible for the **browser lifecycle**: resolving the target container, compiling the spec through `json-renderers-build`, instantiating concrete HTML elements via `@keshavsoft/json-to-tag`, and mounting them into the document.
17
-
18
- ---
19
-
20
- ## The 3-Tier Declarative Pipeline & The "In-Between" Story
21
-
22
- ```
23
- ┌────────────────────────────────────────────────────────────────────────┐
24
- │ 1. Application Layer: Raw Data & Configurations │
25
- │ data: [{ id: 101, name: "Alpha" }], columns: ["Name"] │
26
- └───────────────────────────────────┬────────────────────────────────────┘
27
- │ Calls: render({ type, data, columns, targetHtmlId })
28
- ▼
29
- ┌────────────────────────────────────────────────────────────────────────┐
30
- │ 2. Spec Compiler: json-renderers-build (Headless AST Builder) │
31
- │ • Skeletons for table, select, selectOptionsOnly │
32
- │ • Compiled via json-to-spec engine │
33
- │ • Output: Deterministic JSON-to-DOM AST (specAsJsonToDom) │
34
- └───────────────────────────────────┬────────────────────────────────────┘
35
- │ In-Between Handoff: specAsJsonToDom
36
- ▼
37
- ┌────────────────────────────────────────────────────────────────────────┐
38
- │ 3. DOM Mounting Runtime: json-renderers (THIS REPO) │
39
- │ • Passes spec to @keshavsoft/json-to-tag │
40
- │ • Creates real HTML elements (HTMLTableElement, HTMLSelectElement) │
41
- │ • Resolves document.getElementById(targetHtmlId) │
42
- │ • Handles append / prepend / replacement mount strategies │
43
- └───────────────────────────────────┬────────────────────────────────────┘
44
- │ Mounts into DOM
45
- ▼
46
- ┌────────────────────────────────────────────────────────────────────────┐
47
- │ 4. Live Browser DOM Container │
48
- │ <div id="targetHtmlId"> <table>...</table> </div> │
49
- └────────────────────────────────────────────────────────────────────────┘
50
- ```
51
-
52
- ### The "In-Between": How `json-renderers` and `json-renderers-build` Connect
53
-
54
- When you call `render({ type, targetHtmlId, data, columns, appendPosition })`:
55
-
56
- 1. **Spec Request:** `json-renderers` calls `json-renderers-build({ type, data, columns })`.
57
- 2. **Headless AST:** `json-renderers-build` merges the inputs with its internal component blueprints (`skeleton.json`) via `json-to-spec` and returns a pure specification tree (`specAsJsonToDom`).
58
- 3. **Fragment Unwrapping:** If the component is a fragment (such as `selectOptionsOnly` which has `{ children: [...] }` without a root `tagName`), `json-renderers` unwraps the `children` array.
59
- 4. **DOM Instantiation:** The specification is passed to `@keshavsoft/json-to-tag(jsonToSend)`, creating real browser `Node` or `NodeList` instances.
60
- 5. **DOM Mounting:** `json-renderers` locates `document.getElementById(targetHtmlId)`:
61
- - If `appendPosition === "prepend"`, it executes `container.prepend(content)`.
62
- - Otherwise, it clears `container.innerHTML = ""` and mounts `container.append(content)`.
63
- - Returns the updated container element.
64
-
65
- ---
66
-
67
- ## Features
68
-
69
- - **End-to-End JSON to DOM:** One function call turns your business data into fully rendered, styled UI controls.
70
- - **Built on `json-renderers-build` (v13):**
71
- - **`table`:** Complete responsive table with Bootstrap classes (`table table-hover table-striped mb-0`), headers, and rows.
72
- - **`select`:** Standalone `<select id="LedgerName">` populated with dynamic options.
73
- - **`selectOptionsOnly`:** Option fragments injected directly into pre-existing `<select>` elements.
74
- - **Flexible Mounting Modes:** Replace container content (default) or `prepend` to existing content.
75
- - **Global & ESM Distribution:** Usable via npm or directly in the browser via CDN script (`window.ks.jsonRenderers`).
76
-
77
- ---
78
-
79
- ## Installation
80
-
81
- ### NPM
82
-
83
- ```bash
84
- npm install json-renderers
85
- ```
86
-
87
- ### Browser (CDN / ES Module)
88
-
89
- ```html
90
- <!-- Load ES module bundle directly from CDN -->
91
- <script type="module" src="https://cdn.jsdelivr.net/gh/keshavsoft/json-renderers@main/docs/dist/v13/min.js"></script>
92
- ```
93
-
94
- When loaded via `<script type="module">`, it automatically registers globally on:
95
- ```javascript
96
- window.ks.jsonRenderers = {
97
- meta: {
98
- version: "v13.1.0",
99
- description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
100
- },
101
- renderToDom: [Function: render]
102
- };
103
- ```
104
-
105
- ---
106
-
107
- ## Quick Start & Usage
108
-
109
- ### 1. Rendering a Table into the DOM (`table`)
110
-
111
- HTML:
112
- ```html
113
- <div id="table-container"></div>
114
- ```
115
-
116
- JavaScript:
117
- ```javascript
118
- import render from "json-renderers";
119
-
120
- const records = [
121
- { id: 101, name: "Alpha Enterprise", city: "Hyderabad" },
122
- { id: 102, name: "Beta Logistics", city: "Bengaluru" }
123
- ];
124
-
125
- render({
126
- type: "table",
127
- targetHtmlId: "table-container",
128
- data: records,
129
- columns: ["Name", "City"]
130
- });
131
- ```
132
-
133
- *Result:* The table is rendered directly into `#table-container` with clean Bootstrap table classes.
134
-
135
- ---
136
-
137
- ### 2. Rendering a Select Dropdown (`select`)
138
-
139
- HTML:
140
- ```html
141
- <div id="dropdown-container"></div>
142
- ```
143
-
144
- JavaScript:
145
- ```javascript
146
- import render from "json-renderers";
147
-
148
- render({
149
- type: "select",
150
- targetHtmlId: "dropdown-container",
151
- data: ["Account Receivable", "Account Payable", "Sales Revenue"]
152
- });
153
- ```
154
-
155
- *Result:* Generates `<select id="LedgerName">` with three `<option>` children and mounts it into `#dropdown-container`.
156
-
157
- ---
158
-
159
- ### 3. Populating an Existing Select Element (`selectOptionsOnly`)
160
-
161
- When your page already contains a `<select>` element and you only want to dynamically populate its options:
162
-
163
- HTML:
164
- ```html
165
- <select id="user-role-select" class="form-select">
166
- <option value="" disabled selected>Select Role...</option>
167
- </select>
168
- ```
169
-
170
- JavaScript:
171
- ```javascript
172
- import render from "json-renderers";
173
-
174
- render({
175
- type: "selectOptionsOnly",
176
- targetHtmlId: "user-role-select",
177
- data: ["Administrator", "Editor", "Viewer"]
178
- });
179
- ```
180
-
181
- *Result:* The `<option>` elements are appended directly into `#user-role-select`.
182
-
183
- ---
184
-
185
- ## API Reference
186
-
187
- ### `render(options)` / `default export`
188
-
189
- The entry point exported by `json-renderers` accepts a single configuration object:
190
-
191
- ```javascript
192
- render({
193
- type = "table",
194
- targetHtmlId,
195
- data,
196
- columns,
197
- appendPosition,
198
- showLog = false
199
- })
200
- ```
201
-
202
- | Parameter | Type | Default | Description |
203
- |---|---|---|---|
204
- | `type` | `string` | `"table"` | The component renderer to invoke: `"table"`, `"select"`, or `"selectOptionsOnly"`. |
205
- | `targetHtmlId` | `string` | `undefined` | The ID of the DOM element (`document.getElementById(targetHtmlId)`) to mount into. |
206
- | `data` | `Array` | `[]` | Data array. For `table`: array of row objects. For `select` / `selectOptionsOnly`: array of strings. |
207
- | `columns` | `Array` | `undefined` | Column headers for `table`. Accepts an array of strings (e.g. `["Name"]`) or objects (e.g. `[{ title: "Name" }]`). |
208
- | `appendPosition` | `string` | `undefined` | If set to `"prepend"`, prepends to the container. Otherwise replaces (`container.innerHTML = ""`). |
209
- | `showLog` | `boolean` | `false` | Enables debug console logging during render execution. |
210
-
211
- **Returns:** `HTMLElement` — The mounted DOM container.
212
-
213
- ---
214
-
215
- ## Comparison: `json-renderers` vs `json-renderers-build`
216
-
217
- | Aspect | `json-renderers-build` | `json-renderers` (THIS REPO) |
218
- |---|---|---|
219
- | **Role** | Specification Builder / Compiler | DOM Mounting Runtime |
220
- | **Output** | Declarative JSON AST (`specAsJsonToDom`) | Real HTML DOM Elements inserted into page |
221
- | **DOM Dependency** | Zero (100% Headless & Isomorphic) | Browser DOM (`document.getElementById`) |
222
- | **Environments** | Browser, Node.js, SSR, Web Workers | Browser runtime |
223
- | **Core Dependency** | `json-to-spec` | `json-renderers-build`, `@keshavsoft/json-to-tag` |
224
- | **Typical Caller** | `json-renderers`, Custom build pipelines | Web Applications, Dashboards, UI Views |
225
-
226
- ---
227
-
228
- ## Project Structure
229
-
230
- ```text
231
- json-renderers/
232
- ├── docs/ # Documentation portal & distribution
233
- │ ├── dist/ # Production bundles (Vite build)
234
- │ │ ├── min.js # Latest bundle
235
- │ │ └── v13/min.js # v13 production bundle
236
- │ └── index.html # Interactive Documentation & Live DOM Workbench
237
- ├── samples/ # Runnable browser verification samples
238
- │ ├── table/ # Table DOM mounting sample
239
- │ ├── select/ # Select dropdown DOM mounting sample
240
- │ └── selectOptionsOnly/ # Existing select options population sample
241
- ├── src/ # Source code
242
- │ ├── index.js # Entry router (exports ./v13/index.js)
243
- │ └── v13/ # CURRENT: Runtime DOM renderer
244
- │ ├── buildSpec/ # In-between handoff: calls json-renderers-build & json-to-tag
245
- │ ├── meta.js # Version & metadata descriptor
246
- │ ├── registerGlobal.js # Global window.ks namespace attachment
247
- │ └── index.js # DOM resolver and mounter
248
- ├── package.json # Package definition & scripts
249
- ├── vite.config.js # Vite build configuration
250
- └── README.md # Complete repository guide
251
- ```
252
-
253
- ---
254
-
255
- ## Development & Build
256
-
257
- ```bash
258
- # Install dependencies
259
- npm install
260
-
261
- # Start Vite development server
262
- npm run dev
263
-
264
- # Build production bundle (into docs/dist/v13/min.js and docs/dist/min.js)
265
- npm run build
266
- ```
267
-
268
- ---
269
-
270
- ## License
271
-
272
- MIT © [KeshavSoft](https://github.com/keshavsoft)
1
+ # json-renderers
2
+
3
+ > **Browser DOM Component Renderer for JSON-Driven UIs**
4
+ > Consumes declarative component specifications from `json-renderers-build` and mounts real DOM elements into target containers using `@keshavsoft/json-to-tag`.
5
+
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+ [![Version](https://img.shields.io/badge/version-1.13.6-emerald.svg)](package.json)
8
+ [![Layer: DOM Runtime](https://img.shields.io/badge/Layer-DOM%20Mounting%20Runtime-indigo.svg)](#the-story-of-json-renderers)
9
+
10
+ ---
11
+
12
+ ## The Story of `json-renderers`
13
+
14
+ `json-renderers` is the **browser runtime layer** in the KeshavSoft declarative UI ecosystem.
15
+
16
+ It is not the data-shaping layer, and it is not the final DOM magic by itself. Its job is to coordinate the flow:
17
+
18
+ - raw or transformed data enters the system
19
+ - `json-renderers-build` prepares a UI blueprint/spec
20
+ - `@keshavsoft/json-to-tag` converts that blueprint into real DOM nodes
21
+ - `json-renderers` mounts the result into the target browser container
22
+
23
+ This is the crucial boundary: `json-renderers` should never be described as the repo that directly writes the browser DOM itself. It is the orchestrator. The actual DOM hook is `@keshavsoft/json-to-tag`, and the real responsibility for constructing complex UI structures is delegated to the JSON-driven spec that `json-renderers-build` creates.
24
+
25
+ For a table, select, datalist, or a hybrid form-table element, the runtime does not hand-code a DOM tree. Instead, it asks the builder for a JSON description of the desired component, then passes that description to `json-to-tag` to turn it into actual browser elements.
26
+
27
+ In other words, `json-renderers` is the orchestration shell around a larger pipeline, not the only engine in the stack.
28
+
29
+ ---
30
+
31
+ ## The Simple Pipeline
32
+
33
+ ```text
34
+ JSON transform / normalize
35
+ -> UI spec from json-renderers-build
36
+ -> DOM nodes from json-to-tag
37
+ -> rendered browser output from json-renderers
38
+ ```
39
+
40
+ ---
41
+
42
+ ## The 3-Tier Declarative Pipeline & The "In-Between" Story
43
+
44
+ ```
45
+ ┌────────────────────────────────────────────────────────────────────────┐
46
+ │ 1. Application Layer: Raw Data & Configurations │
47
+ │ data: [{ id: 101, name: "Alpha" }], columns: ["Name"] │
48
+ └───────────────────────────────────┬────────────────────────────────────┘
49
+ │ Calls: render({ type, data, columns, targetHtmlId })
50
+ ▼
51
+ ┌────────────────────────────────────────────────────────────────────────┐
52
+ │ 2. Spec Compiler: json-renderers-build (Headless AST Builder) │
53
+ │ • Skeletons for table, select, selectOptionsOnly │
54
+ │ • Compiled via json-to-spec engine │
55
+ │ • Output: Deterministic JSON-to-DOM AST (specAsJsonToDom) │
56
+ └───────────────────────────────────┬────────────────────────────────────┘
57
+ │ In-Between Handoff: specAsJsonToDom
58
+ ▼
59
+ ┌────────────────────────────────────────────────────────────────────────┐
60
+ │ 3. DOM Mounting Runtime: json-renderers (THIS REPO) │
61
+ │ • Passes spec to @keshavsoft/json-to-tag │
62
+ │ • Creates real HTML elements (HTMLTableElement, HTMLSelectElement) │
63
+ │ • Resolves document.getElementById(targetHtmlId) │
64
+ │ • Handles append / prepend / replacement mount strategies │
65
+ └───────────────────────────────────┬────────────────────────────────────┘
66
+ │ Mounts into DOM
67
+ ▼
68
+ ┌────────────────────────────────────────────────────────────────────────┐
69
+ │ 4. Live Browser DOM Container │
70
+ │ <div id="targetHtmlId"> <table>...</table> </div> │
71
+ └────────────────────────────────────────────────────────────────────────┘
72
+ ```
73
+
74
+ ### The "In-Between": How the Stack Connects
75
+
76
+ When you call `render({ type, targetHtmlId, data, columns, appendPosition })`:
77
+
78
+ 1. **Data shaping (optional upstream layer):** `@keshavsoft/json-transformer` or a similar normalizer may reshape incoming business JSON into a clean model.
79
+ 2. **Spec Request:** `json-renderers` calls `json-renderers-build({ type, data, columns })`.
80
+ 3. **Headless AST:** `json-renderers-build` merges the inputs with its internal component blueprints (`skeleton.json`) via `json-to-spec` and returns a pure specification tree (`specAsJsonToDom`).
81
+ 4. **DOM Instantiation:** The specification is passed to `@keshavsoft/json-to-tag(jsonToSend)`, creating real browser `Node` or `NodeList` instances.
82
+ 5. **DOM Mounting:** `json-renderers` locates `document.getElementById(targetHtmlId)` and appends or prepends the final content into the page.
83
+
84
+ This matters because the true DOM magic happens in `json-to-tag`, while `json-renderers` simply makes that runtime flow usable from an application.
85
+
86
+ ---
87
+
88
+ ## Features
89
+
90
+ - **End-to-End JSON to DOM:** One function call turns your business data into fully rendered, styled UI controls.
91
+ - **Built on `json-renderers-build` (v13):**
92
+ - **`table`:** Complete responsive table with Bootstrap classes (`table table-hover table-striped mb-0`), headers, and rows.
93
+ - **`select`:** Standalone `<select id="LedgerName">` populated with dynamic options.
94
+ - **`selectOptionsOnly`:** Option fragments injected directly into pre-existing `<select>` elements.
95
+ - **Flexible Mounting Modes:** Replace container content (default) or `prepend` to existing content.
96
+ - **Global & ESM Distribution:** Usable via npm or directly in the browser via CDN script (`window.ks.jsonRenderers`).
97
+
98
+ ---
99
+
100
+ ## Installation
101
+
102
+ ### NPM
103
+
104
+ ```bash
105
+ npm install json-renderers
106
+ ```
107
+
108
+ ### Browser (CDN / ES Module)
109
+
110
+ ```html
111
+ <!-- Load ES module bundle directly from CDN -->
112
+ <script type="module" src="https://cdn.jsdelivr.net/gh/keshavsoft/json-renderers@main/docs/dist/v13/min.js"></script>
113
+ ```
114
+
115
+ When loaded via `<script type="module">`, it automatically registers globally on:
116
+ ```javascript
117
+ window.ks.jsonRenderers = {
118
+ meta: {
119
+ version: "v13.1.0",
120
+ description: "build table from store data and render to DOM uses json-to-spec, json-to-dom under the hood"
121
+ },
122
+ renderToDom: [Function: render]
123
+ };
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Quick Start & Usage
129
+
130
+ ### 1. Rendering a Table into the DOM (`table`)
131
+
132
+ HTML:
133
+ ```html
134
+ <div id="table-container"></div>
135
+ ```
136
+
137
+ JavaScript:
138
+ ```javascript
139
+ import render from "json-renderers";
140
+
141
+ const records = [
142
+ { id: 101, name: "Alpha Enterprise", city: "Hyderabad" },
143
+ { id: 102, name: "Beta Logistics", city: "Bengaluru" }
144
+ ];
145
+
146
+ render({
147
+ type: "table",
148
+ targetHtmlId: "table-container",
149
+ data: records,
150
+ columns: ["Name", "City"]
151
+ });
152
+ ```
153
+
154
+ *Result:* The table is rendered directly into `#table-container` with clean Bootstrap table classes.
155
+
156
+ ---
157
+
158
+ ### 2. Rendering a Select Dropdown (`select`)
159
+
160
+ HTML:
161
+ ```html
162
+ <div id="dropdown-container"></div>
163
+ ```
164
+
165
+ JavaScript:
166
+ ```javascript
167
+ import render from "json-renderers";
168
+
169
+ render({
170
+ type: "select",
171
+ targetHtmlId: "dropdown-container",
172
+ data: ["Account Receivable", "Account Payable", "Sales Revenue"]
173
+ });
174
+ ```
175
+
176
+ *Result:* Generates `<select id="LedgerName">` with three `<option>` children and mounts it into `#dropdown-container`.
177
+
178
+ ---
179
+
180
+ ### 3. Populating an Existing Select Element (`selectOptionsOnly`)
181
+
182
+ When your page already contains a `<select>` element and you only want to dynamically populate its options:
183
+
184
+ HTML:
185
+ ```html
186
+ <select id="user-role-select" class="form-select">
187
+ <option value="" disabled selected>Select Role...</option>
188
+ </select>
189
+ ```
190
+
191
+ JavaScript:
192
+ ```javascript
193
+ import render from "json-renderers";
194
+
195
+ render({
196
+ type: "selectOptionsOnly",
197
+ targetHtmlId: "user-role-select",
198
+ data: ["Administrator", "Editor", "Viewer"]
199
+ });
200
+ ```
201
+
202
+ *Result:* The `<option>` elements are appended directly into `#user-role-select`.
203
+
204
+ ---
205
+
206
+ ## API Reference
207
+
208
+ ### `render(options)` / `default export`
209
+
210
+ The entry point exported by `json-renderers` accepts a single configuration object:
211
+
212
+ ```javascript
213
+ render({
214
+ type = "table",
215
+ targetHtmlId,
216
+ data,
217
+ columns,
218
+ appendPosition,
219
+ showLog = false
220
+ })
221
+ ```
222
+
223
+ | Parameter | Type | Default | Description |
224
+ |---|---|---|---|
225
+ | `type` | `string` | `"table"` | The component renderer to invoke: `"table"`, `"select"`, or `"selectOptionsOnly"`. |
226
+ | `targetHtmlId` | `string` | `undefined` | The ID of the DOM element (`document.getElementById(targetHtmlId)`) to mount into. |
227
+ | `data` | `Array` | `[]` | Data array. For `table`: array of row objects. For `select` / `selectOptionsOnly`: array of strings. |
228
+ | `columns` | `Array` | `undefined` | Column headers for `table`. Accepts an array of strings (e.g. `["Name"]`) or objects (e.g. `[{ title: "Name" }]`). |
229
+ | `appendPosition` | `string` | `undefined` | If set to `"prepend"`, prepends to the container. Otherwise replaces (`container.innerHTML = ""`). |
230
+ | `showLog` | `boolean` | `false` | Enables debug console logging during render execution. |
231
+
232
+ **Returns:** `HTMLElement` — The mounted DOM container.
233
+
234
+ ---
235
+
236
+ ## Comparison: `json-renderers` vs `json-renderers-build`
237
+
238
+ | Aspect | `json-renderers-build` | `json-renderers` (THIS REPO) |
239
+ |---|---|---|
240
+ | **Role** | Specification Builder / Compiler | DOM Mounting Runtime |
241
+ | **Output** | Declarative JSON AST (`specAsJsonToDom`) | Real HTML DOM Elements inserted into page |
242
+ | **DOM Dependency** | Zero (100% Headless & Isomorphic) | Browser DOM (`document.getElementById`) |
243
+ | **Environments** | Browser, Node.js, SSR, Web Workers | Browser runtime |
244
+ | **Core Dependency** | `json-to-spec` | `json-renderers-build`, `@keshavsoft/json-to-tag` |
245
+ | **Typical Caller** | `json-renderers`, Custom build pipelines | Web Applications, Dashboards, UI Views |
246
+
247
+ ---
248
+
249
+ ## Project Structure
250
+
251
+ ```text
252
+ json-renderers/
253
+ ├── docs/ # Documentation portal & distribution
254
+ │ ├── dist/ # Production bundles (Vite build)
255
+ │ │ ├── min.js # Latest bundle
256
+ │ │ └── v13/min.js # v13 production bundle
257
+ │ └── index.html # Interactive Documentation & Live DOM Workbench
258
+ ├── samples/ # Runnable browser verification samples
259
+ │ ├── table/ # Table DOM mounting sample
260
+ │ ├── select/ # Select dropdown DOM mounting sample
261
+ │ └── selectOptionsOnly/ # Existing select options population sample
262
+ ├── src/ # Source code
263
+ │ ├── index.js # Entry router (exports ./v13/index.js)
264
+ │ └── v13/ # CURRENT: Runtime DOM renderer
265
+ │ ├── buildSpec/ # In-between handoff: calls json-renderers-build & json-to-tag
266
+ │ ├── meta.js # Version & metadata descriptor
267
+ │ ├── registerGlobal.js # Global window.ks namespace attachment
268
+ │ └── index.js # DOM resolver and mounter
269
+ ├── package.json # Package definition & scripts
270
+ ├── vite.config.js # Vite build configuration
271
+ └── README.md # Complete repository guide
272
+ ```
273
+
274
+ ---
275
+
276
+ ## Development & Build
277
+
278
+ ```bash
279
+ # Install dependencies
280
+ npm install
281
+
282
+ # Start Vite development server
283
+ npm run dev
284
+
285
+ # Build production bundle (into docs/dist/v13/min.js and docs/dist/min.js)
286
+ npm run build
287
+ ```
288
+
289
+ ---
290
+
291
+ ## License
292
+
293
+ MIT © [KeshavSoft](https://github.com/keshavsoft)