@saasira/holi 0.1.4 → 0.1.5
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/CHANGELOG.md +18 -0
- package/README.md +101 -10
- package/dist/components.html +822 -0
- package/dist/holi.html +33 -1
- package/dist/holi.js +1 -1
- package/dist/layouts/3x9.html +29 -0
- package/dist/layouts.html +34 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.1.5] - 2026-03-19
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added runtime page-layout composition with configurable layout resolution, named `block` and `region` slot mapping, and optional inherited slot fallbacks.
|
|
10
|
+
- Added layout-owned asset placement through `layout-head` for real head nodes and `tail` for deferred body-end assets.
|
|
11
|
+
- Added in-memory template and layout registries backed by bundled `dist/components.html` and `dist/layouts.html`.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Stopped injecting bundled component templates into the live page body; templates now stay in an internal registry.
|
|
16
|
+
- Renamed the primary bundled component-template artifact from `holi.html` to `components.html` while keeping `holi.html` as a compatibility bundle.
|
|
17
|
+
- Extended the example/build pipeline and smoke checks to cover runtime layout composition and layout asset containers.
|
|
18
|
+
|
|
19
|
+
### Validation
|
|
20
|
+
|
|
21
|
+
- Verified with `npm run build`, `npm run smoke:examples`, and `npm pack --dry-run`.
|
|
22
|
+
|
|
5
23
|
## [0.1.4] - 2026-03-19
|
|
6
24
|
|
|
7
25
|
### Changed
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Canonical reference: `docs/holi-principles.md`.
|
|
|
26
26
|
- Tag: `<tabs></tabs>`
|
|
27
27
|
- Attribute: `<section component="tabs"></section>`
|
|
28
28
|
- Role: `<section role="tabs"></section>`
|
|
29
|
-
-
|
|
29
|
+
- Component-template bundling (`dist/components.html`) and runtime in-memory template registration.
|
|
30
30
|
- Template bindings:
|
|
31
31
|
- `@{expression}` interpolation
|
|
32
32
|
- `data-if`, `data-show`, `data-open`, `visible`
|
|
@@ -73,27 +73,48 @@ Main artifacts:
|
|
|
73
73
|
|
|
74
74
|
- `dist/holi.js`
|
|
75
75
|
- `dist/holi.css`
|
|
76
|
-
- `dist/
|
|
76
|
+
- `dist/components.html` (component templates)
|
|
77
|
+
- `dist/layouts.html` (layout templates)
|
|
78
|
+
- `dist/holi.html` (legacy compatibility bundle)
|
|
79
|
+
- `dist/layouts/**` (optional runtime-resolved layouts)
|
|
77
80
|
- Example site output: `public/examples/**`
|
|
78
81
|
|
|
82
|
+
## CDN Quick Start
|
|
83
|
+
|
|
84
|
+
For application pages that consume Holi directly from a CDN, use the published npm package via jsDelivr:
|
|
85
|
+
|
|
86
|
+
```html
|
|
87
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/holi.css" />
|
|
88
|
+
<script src="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/holi.js"></script>
|
|
89
|
+
<link rel="preload" as="fetch" href="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/components.html" crossorigin="anonymous" />
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Direct file URLs:
|
|
93
|
+
|
|
94
|
+
- `https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/holi.js`
|
|
95
|
+
- `https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/holi.css`
|
|
96
|
+
- `https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/components.html`
|
|
97
|
+
|
|
98
|
+
Pin an exact version in production so releases remain repeatable.
|
|
99
|
+
|
|
79
100
|
## CDN Usage
|
|
80
101
|
|
|
81
102
|
Holi can be shipped directly from a free CDN after publishing the package to npm.
|
|
82
103
|
|
|
83
|
-
Recommended jsDelivr links for `v0.1.
|
|
104
|
+
Recommended jsDelivr links for `v0.1.5`:
|
|
84
105
|
|
|
85
106
|
```html
|
|
86
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.
|
|
87
|
-
<script src="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.
|
|
88
|
-
<link rel="preload" as="fetch" href="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.
|
|
107
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/holi.css" />
|
|
108
|
+
<script src="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/holi.js"></script>
|
|
109
|
+
<link rel="preload" as="fetch" href="https://cdn.jsdelivr.net/npm/@saasira/holi@0.1.5/dist/components.html" crossorigin="anonymous" />
|
|
89
110
|
```
|
|
90
111
|
|
|
91
112
|
Fallback unpkg links:
|
|
92
113
|
|
|
93
114
|
```html
|
|
94
|
-
<link rel="stylesheet" href="https://unpkg.com/@saasira/holi@0.1.
|
|
95
|
-
<script src="https://unpkg.com/@saasira/holi@0.1.
|
|
96
|
-
<link rel="preload" as="fetch" href="https://unpkg.com/@saasira/holi@0.1.
|
|
115
|
+
<link rel="stylesheet" href="https://unpkg.com/@saasira/holi@0.1.5/dist/holi.css" />
|
|
116
|
+
<script src="https://unpkg.com/@saasira/holi@0.1.5/dist/holi.js"></script>
|
|
117
|
+
<link rel="preload" as="fetch" href="https://unpkg.com/@saasira/holi@0.1.5/dist/components.html" crossorigin="anonymous" />
|
|
97
118
|
```
|
|
98
119
|
|
|
99
120
|
Repository setup details for automated npm publishing are documented in `docs/CDN.md`.
|
|
@@ -134,12 +155,81 @@ Repository setup details for automated npm publishing are documented in `docs/CD
|
|
|
134
155
|
- Component styles: `src/styles/components/<componentname>.css`
|
|
135
156
|
- Component templates: `src/templates/components/<componentname>.html`
|
|
136
157
|
- Shared utilities: `src/scripts/utils/<utilityname>.js`
|
|
158
|
+
- Optional layout templates:
|
|
159
|
+
- library layouts: `src/templates/layouts/*.html`
|
|
160
|
+
- example/app layouts in examples: `src/examples/layouts/*.html`
|
|
137
161
|
- Example sources:
|
|
138
162
|
- `src/examples/pages/*.html`
|
|
139
163
|
- `src/examples/styles/*.css`
|
|
140
164
|
- `src/examples/scripts/*.js`
|
|
141
165
|
- Built examples: `public/examples/**` (referencing `dist/holi.js` and `dist/holi.css`)
|
|
142
166
|
|
|
167
|
+
## Page Layout Composition
|
|
168
|
+
|
|
169
|
+
Holi supports runtime page composition with a layout template plus named placeholders.
|
|
170
|
+
|
|
171
|
+
Supported structure:
|
|
172
|
+
|
|
173
|
+
```html
|
|
174
|
+
<page layout="3x9" layouts-base="/examples/layouts/">
|
|
175
|
+
<block name="head">
|
|
176
|
+
<region name="meta">
|
|
177
|
+
<meta name="page-layout-demo" content="true" />
|
|
178
|
+
</region>
|
|
179
|
+
<region name="styles">
|
|
180
|
+
<style>.page-title { letter-spacing: 0.02em; }</style>
|
|
181
|
+
</region>
|
|
182
|
+
<region name="scripts">
|
|
183
|
+
<script>window.pageLayoutExampleLoaded = true;</script>
|
|
184
|
+
</region>
|
|
185
|
+
</block>
|
|
186
|
+
|
|
187
|
+
<block name="header">
|
|
188
|
+
<h1 class="page-title">Project Dashboard</h1>
|
|
189
|
+
</block>
|
|
190
|
+
|
|
191
|
+
<block name="main">
|
|
192
|
+
<region name="lhs"><div>Navigation</div></region>
|
|
193
|
+
<region name="middle"><div>Primary content</div></region>
|
|
194
|
+
<region name="rhs"><div>Context tools</div></region>
|
|
195
|
+
</block>
|
|
196
|
+
</page>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Layout template example:
|
|
200
|
+
|
|
201
|
+
```html
|
|
202
|
+
<template id="page-layout-3x9" data-layout="3x9">
|
|
203
|
+
<layout-head data-layout-head="true">
|
|
204
|
+
<meta name="example-layout" content="3x9" />
|
|
205
|
+
<slot name="meta"></slot>
|
|
206
|
+
<slot name="styles"></slot>
|
|
207
|
+
<slot name="scripts"></slot>
|
|
208
|
+
</layout-head>
|
|
209
|
+
|
|
210
|
+
<header><slot name="header"></slot></header>
|
|
211
|
+
<slot name="main">
|
|
212
|
+
<main>
|
|
213
|
+
<aside><slot name="lhs"></slot></aside>
|
|
214
|
+
<section><slot name="middle"></slot></section>
|
|
215
|
+
<aside><slot name="rhs"></slot></aside>
|
|
216
|
+
</main>
|
|
217
|
+
</slot>
|
|
218
|
+
</template>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Rules:
|
|
222
|
+
|
|
223
|
+
- Top-level `block[name]` fills a matching layout slot.
|
|
224
|
+
- Direct `region[name]` inside a block fills matching nested slots inside that block's assigned subtree.
|
|
225
|
+
- Missing slots are empty by default.
|
|
226
|
+
- Set `inherit-missing="true"` on `page` to keep fallback slot content.
|
|
227
|
+
- Use `layout-src` for an explicit layout file or `layouts-base` for a layout folder.
|
|
228
|
+
- Use `<layout-head data-layout-head="true">` for shared head assets in layouts.
|
|
229
|
+
- Use `<tail data-layout-tail="true">` for deferred body-end assets in layouts.
|
|
230
|
+
- Non-script nodes from `layout-head` go to the real HTML `<head>`.
|
|
231
|
+
- Nodes from `tail` are appended near the end of `<body>`.
|
|
232
|
+
|
|
143
233
|
## Holi vs React / Angular / Vue
|
|
144
234
|
|
|
145
235
|
| Area | Holi | React | Angular | Vue |
|
|
@@ -170,4 +260,5 @@ Practical summary:
|
|
|
170
260
|
|
|
171
261
|
- Holi exports `window.HoliApp` / `window.Holi`.
|
|
172
262
|
- Auto init can be disabled with `window.HoliAutoInit = false` before loading `dist/holi.js`.
|
|
173
|
-
-
|
|
263
|
+
- Component templates are loaded from `dist/components.html` (with runtime fallback paths).
|
|
264
|
+
- Layout templates are loaded from `dist/layouts.html` (with runtime fallback paths).
|