@saasira/holi 0.1.5 → 0.1.9
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 +40 -0
- package/README.md +44 -0
- package/dist/components.html +95 -1
- package/dist/holi.css +1066 -577
- package/dist/holi.html +95 -1
- package/dist/holi.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.1.9] - 2026-03-21
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Updated example smoke assertions to match the current declarative theme and locale example sources so CI release validation passes again.
|
|
10
|
+
|
|
11
|
+
### Validation
|
|
12
|
+
|
|
13
|
+
- Verified with `npm run ci:smoke`.
|
|
14
|
+
|
|
15
|
+
## [0.1.8] - 2026-03-21
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added a template-driven `include` component that fetches HTML fragments from relative or absolute sources and injects them in place.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Updated the `page-layout.html` example to load its header and footer content through reusable included fragments.
|
|
24
|
+
|
|
25
|
+
### Validation
|
|
26
|
+
|
|
27
|
+
- Verified with `npm run build` and `npm run build:examples`.
|
|
28
|
+
|
|
29
|
+
## [0.1.7] - 2026-03-21
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- Added declarative theme registration with a shared theme registry and release-aware page asset automation for `page[release]`.
|
|
34
|
+
- Added declarative locale registration with a shared locale registry and default-English document language fallback.
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Scoped bundled component styles to the default theme so custom themes can provide their own component styling cleanly.
|
|
39
|
+
- Updated theme and locale switching flows to resolve through centralized registries instead of directly mutating document attributes ad hoc.
|
|
40
|
+
|
|
41
|
+
### Validation
|
|
42
|
+
|
|
43
|
+
- Verified with `npm run build`.
|
|
44
|
+
|
|
5
45
|
## [0.1.5] - 2026-03-19
|
|
6
46
|
|
|
7
47
|
### Added
|
package/README.md
CHANGED
|
@@ -224,11 +224,22 @@ Rules:
|
|
|
224
224
|
- Direct `region[name]` inside a block fills matching nested slots inside that block's assigned subtree.
|
|
225
225
|
- Missing slots are empty by default.
|
|
226
226
|
- Set `inherit-missing="true"` on `page` to keep fallback slot content.
|
|
227
|
+
- Use `renderer="browser"` on source pages to show the built-in placeholder until runtime composition completes.
|
|
228
|
+
- After browser or compiler rendering completes, both `renderer` and `rendered` should be removed from the final page node.
|
|
227
229
|
- Use `layout-src` for an explicit layout file or `layouts-base` for a layout folder.
|
|
230
|
+
- Page-level attributes `title`, `description`, `canonical`, and `lang` are applied to the real document metadata.
|
|
231
|
+
- Page-level `theme` is applied to the real `<body>` element for theme scoping and switching.
|
|
228
232
|
- Use `<layout-head data-layout-head="true">` for shared head assets in layouts.
|
|
229
233
|
- Use `<tail data-layout-tail="true">` for deferred body-end assets in layouts.
|
|
230
234
|
- Non-script nodes from `layout-head` go to the real HTML `<head>`.
|
|
231
235
|
- Nodes from `tail` are appended near the end of `<body>`.
|
|
236
|
+
- Built-in region `meta` always targets the real HTML `<head>`.
|
|
237
|
+
- Built-in regions `styles` and `page-styles` always target the real HTML `<head>`, even when the layout does not declare those slots.
|
|
238
|
+
- Built-in regions `scripts` and `page-scripts` always target the end of `<body>`, even when the layout does not declare those slots.
|
|
239
|
+
- Use `styles` for external asset nodes such as `<link rel="stylesheet" href="...">`.
|
|
240
|
+
- Use `scripts` for external asset nodes such as `<script src="..."></script>`.
|
|
241
|
+
- Use `page-styles` for inline `<style>` tags.
|
|
242
|
+
- Use `page-scripts` for inline `<script>` tags.
|
|
232
243
|
|
|
233
244
|
## Holi vs React / Angular / Vue
|
|
234
245
|
|
|
@@ -262,3 +273,36 @@ Practical summary:
|
|
|
262
273
|
- Auto init can be disabled with `window.HoliAutoInit = false` before loading `dist/holi.js`.
|
|
263
274
|
- Component templates are loaded from `dist/components.html` (with runtime fallback paths).
|
|
264
275
|
- Layout templates are loaded from `dist/layouts.html` (with runtime fallback paths).
|
|
276
|
+
|
|
277
|
+
## OfflineIndicator
|
|
278
|
+
|
|
279
|
+
`OfflineIndicator` provides a template-driven connectivity banner with automatic polling and queue count display.
|
|
280
|
+
|
|
281
|
+
Supported declaration styles:
|
|
282
|
+
|
|
283
|
+
- `<offline></offline>`
|
|
284
|
+
- `<section component="offline"></section>`
|
|
285
|
+
- `<section role="offline"></section>`
|
|
286
|
+
- `[data-offline]`
|
|
287
|
+
|
|
288
|
+
Useful attributes:
|
|
289
|
+
|
|
290
|
+
- `scope="page|block|inline"`
|
|
291
|
+
- `position="top-left|top-right|bottom-left|bottom-right|top-center|bottom-center"`
|
|
292
|
+
- `host="#selector"` for `scope="block"`
|
|
293
|
+
- `ping-url="/api/ping"`
|
|
294
|
+
- `heartbeat-ms="2500"`
|
|
295
|
+
- `probe-timeout-ms="1800"`
|
|
296
|
+
- `duration="1200"`
|
|
297
|
+
- `max-attempts="4"`
|
|
298
|
+
|
|
299
|
+
Instance/static helpers:
|
|
300
|
+
|
|
301
|
+
- `el.offlineIndicator.retryConnection()`
|
|
302
|
+
- `el.offlineIndicator.simulateOffline()`
|
|
303
|
+
- `el.offlineIndicator.simulateOnline()`
|
|
304
|
+
- `window.OfflineIndicator.queue(payload)`
|
|
305
|
+
- `window.OfflineIndicator.clearQueue()`
|
|
306
|
+
- `window.OfflineIndicator.create(options)`
|
|
307
|
+
|
|
308
|
+
See [offline example](/D:/Work/Self/Holi/src/examples/pages/offline.html) for page-scoped, block-scoped, and queue-sync scenarios.
|
package/dist/components.html
CHANGED
|
@@ -96,6 +96,15 @@
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
|
|
99
|
+
<!-- Template: themeswitcher.html src/templates/components/themeswitcher.html -->
|
|
100
|
+
<template id="themeswitcher-template">
|
|
101
|
+
<section class="holi-themeswitcher">
|
|
102
|
+
<label data-role="theme-label" for="holi-theme-switcher-select">@{label}</label>
|
|
103
|
+
<select id="holi-theme-switcher-select" data-role="theme-select"></select>
|
|
104
|
+
</section>
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
|
|
99
108
|
<!-- Template: textarea.html src/templates/components/textarea.html -->
|
|
100
109
|
<template id="textarea-field-template">
|
|
101
110
|
<div class="holi-textarea" role="group">
|
|
@@ -231,6 +240,36 @@
|
|
|
231
240
|
</template>
|
|
232
241
|
|
|
233
242
|
|
|
243
|
+
<!-- Template: refresh.html src/templates/components/refresh.html -->
|
|
244
|
+
<template id="refresh-template">
|
|
245
|
+
<section class="holi-refresh" data-state="idle" tabindex="0">
|
|
246
|
+
<div class="holi-refresh__handle" data-role="handle" aria-hidden="true">
|
|
247
|
+
<div class="holi-refresh__icon">
|
|
248
|
+
<span class="holi-refresh__icon-arrow"></span>
|
|
249
|
+
<span class="holi-refresh__icon-spinner"></span>
|
|
250
|
+
</div>
|
|
251
|
+
<div class="holi-refresh__label" data-role="label">Pull to refresh</div>
|
|
252
|
+
<div class="holi-refresh__progress">
|
|
253
|
+
<span class="holi-refresh__progress-bar" data-role="progress"></span>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
<div class="holi-refresh__content" data-role="content"></div>
|
|
257
|
+
</section>
|
|
258
|
+
</template>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<!-- Template: rating.html src/templates/components/rating.html -->
|
|
262
|
+
<template id="rating-template">
|
|
263
|
+
<div class="rating" data-role="rating-root" data-rating="0">
|
|
264
|
+
<i class="fa fa-star-o" data-value="1" aria-hidden="true"></i>
|
|
265
|
+
<i class="fa fa-star-o" data-value="2" aria-hidden="true"></i>
|
|
266
|
+
<i class="fa fa-star-o" data-value="3" aria-hidden="true"></i>
|
|
267
|
+
<i class="fa fa-star-o" data-value="4" aria-hidden="true"></i>
|
|
268
|
+
<i class="fa fa-star-o" data-value="5" aria-hidden="true"></i>
|
|
269
|
+
</div>
|
|
270
|
+
</template>
|
|
271
|
+
|
|
272
|
+
|
|
234
273
|
<!-- Template: radio.html src/templates/components/radio.html -->
|
|
235
274
|
<template id="radio-group-template">
|
|
236
275
|
<fieldset class="holi-radio-group">
|
|
@@ -254,6 +293,21 @@
|
|
|
254
293
|
</template>
|
|
255
294
|
|
|
256
295
|
|
|
296
|
+
<!-- Template: pwa.html src/templates/components/pwa.html -->
|
|
297
|
+
<!-- Theme color meta (dynamic via JS) -->
|
|
298
|
+
<meta name="theme-color" content="#2563eb">
|
|
299
|
+
|
|
300
|
+
<!-- iOS Safari -->
|
|
301
|
+
<link rel="apple-touch-icon" href="/icons/icon-192.png">
|
|
302
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
303
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
304
|
+
<meta name="apple-mobile-web-app-title" content="HF Components">
|
|
305
|
+
|
|
306
|
+
<!-- Microsoft/Edge -->
|
|
307
|
+
<meta name="msapplication-TileImage" content="/icons/icon-192.png">
|
|
308
|
+
<meta name="msapplication-TileColor" content="#2563eb">
|
|
309
|
+
|
|
310
|
+
|
|
257
311
|
<!-- Template: progress.html src/templates/components/progress.html -->
|
|
258
312
|
<template id="progress">
|
|
259
313
|
<section class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
|
@@ -280,6 +334,24 @@
|
|
|
280
334
|
</template>
|
|
281
335
|
|
|
282
336
|
|
|
337
|
+
<!-- Template: offline.html src/templates/components/offline.html -->
|
|
338
|
+
<template id="offline-template">
|
|
339
|
+
<section class="holi-offline-indicator" data-status="online" data-visible="false" hidden aria-live="polite" aria-atomic="true" role="status">
|
|
340
|
+
<div class="holi-offline-indicator__badge" aria-hidden="true">
|
|
341
|
+
<span class="holi-offline-indicator__dot"></span>
|
|
342
|
+
</div>
|
|
343
|
+
<div class="holi-offline-indicator__message">
|
|
344
|
+
<span class="holi-offline-indicator__status" data-role="status-text">Offline</span>
|
|
345
|
+
<span class="holi-offline-indicator__meta">
|
|
346
|
+
<span class="holi-offline-indicator__sync" data-role="sync-text">0 pending</span>
|
|
347
|
+
<span class="holi-offline-indicator__attempts" data-role="attempt-text">Retry 0/5</span>
|
|
348
|
+
</span>
|
|
349
|
+
</div>
|
|
350
|
+
<button type="button" class="holi-offline-indicator__retry" data-action="retry" aria-label="Retry connection">Retry</button>
|
|
351
|
+
</section>
|
|
352
|
+
</template>
|
|
353
|
+
|
|
354
|
+
|
|
283
355
|
<!-- Template: menubar.html src/templates/components/menubar.html -->
|
|
284
356
|
<template id="menubar-template">
|
|
285
357
|
<nav class="holi-menubar" data-mode="bar" aria-label="Site menu">
|
|
@@ -289,12 +361,28 @@
|
|
|
289
361
|
</template>
|
|
290
362
|
|
|
291
363
|
|
|
364
|
+
<!-- Template: localeswitcher.html src/templates/components/localeswitcher.html -->
|
|
365
|
+
<template id="localeswitcher-template">
|
|
366
|
+
<section class="holi-localeswitcher">
|
|
367
|
+
<label data-role="locale-label" for="holi-locale-switcher-select">@{label}</label>
|
|
368
|
+
<select id="holi-locale-switcher-select" data-role="locale-select"></select>
|
|
369
|
+
</section>
|
|
370
|
+
</template>
|
|
371
|
+
|
|
372
|
+
|
|
292
373
|
<!-- Template: loader.html src/templates/components/loader.html -->
|
|
293
374
|
<template id="loader-template">
|
|
294
375
|
<section class="holi-loader" data-scope="inline" hidden>
|
|
295
376
|
<div class="holi-loader-backdrop"></div>
|
|
296
377
|
<div class="holi-loader-body" role="status" aria-live="polite" aria-atomic="true">
|
|
297
|
-
<span class="holi-loader-spinner" aria-hidden="true"
|
|
378
|
+
<span class="holi-loader-spinner" data-role="loader-spinner" data-type="spinner" aria-hidden="true">
|
|
379
|
+
<span class="holi-loader-spinner-ring" aria-hidden="true"></span>
|
|
380
|
+
<span class="holi-loader-dots" aria-hidden="true">
|
|
381
|
+
<span class="holi-loader-dot"></span>
|
|
382
|
+
<span class="holi-loader-dot"></span>
|
|
383
|
+
<span class="holi-loader-dot"></span>
|
|
384
|
+
</span>
|
|
385
|
+
</span>
|
|
298
386
|
<span class="holi-loader-message" data-role="loader-message">Loading...</span>
|
|
299
387
|
</div>
|
|
300
388
|
</section>
|
|
@@ -342,6 +430,12 @@
|
|
|
342
430
|
</template>
|
|
343
431
|
|
|
344
432
|
|
|
433
|
+
<!-- Template: include.html src/templates/components/include.html -->
|
|
434
|
+
<template id="include-template">
|
|
435
|
+
<slot name="fallback"></slot>
|
|
436
|
+
</template>
|
|
437
|
+
|
|
438
|
+
|
|
345
439
|
<!-- Template: gallery.html src/templates/components/gallery.html -->
|
|
346
440
|
<template id="gallery-template">
|
|
347
441
|
<section class="holi-gallery-root">
|