hyperclayjs 1.26.2 → 1.26.4

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
@@ -87,7 +87,7 @@ import 'hyperclayjs/presets/standard.js';
87
87
  | Module | Size | Description |
88
88
  |--------|------|-------------|
89
89
  | dialogs | 8.1KB | ask(), consent(), tell(), snippet() dialog functions |
90
- | the-modal | 22.4KB | Full modal window creation system - window.theModal |
90
+ | the-modal | 22.5KB | Full modal window creation system - window.theModal |
91
91
  | toast | 15.8KB | Success/error message notifications, toast(msg, msgType) |
92
92
 
93
93
  ### Utilities (Core utilities (often auto-included))
@@ -116,7 +116,7 @@ import 'hyperclayjs/presets/standard.js';
116
116
  |--------|------|-------------|
117
117
  | copy-to-clipboard | 0.9KB | Clipboard utility |
118
118
  | query-params | 0.3KB | Parse URL search params |
119
- | slugify | 0.7KB | URL-friendly slug generator |
119
+ | slugify | 1KB | URL-friendly slug generator |
120
120
 
121
121
  ### Communication & Files (File handling and messaging)
122
122
 
@@ -144,7 +144,7 @@ Standard feature set for most use cases
144
144
 
145
145
  **Modules:** `save-core`, `snapshot`, `save-system`, `unsaved-warning`, `edit-mode-helpers`, `persist`, `option-visibility`, `event-attrs`, `dom-helpers`, `toast`, `save-toast`, `export-to-window`, `view-mode-excludes-edit-modules`
146
146
 
147
- ### Everything (~231.4KB)
147
+ ### Everything (~231.8KB)
148
148
  All available features
149
149
 
150
150
  Includes all available modules across all categories.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperclayjs",
3
- "version": "1.26.2",
3
+ "version": "1.26.4",
4
4
  "description": "Modular JavaScript library for building interactive malleable HTML files with Hyperclay",
5
5
  "type": "module",
6
6
  "main": "src/hyperclay.js",
package/src/hyperclay.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * DO NOT EDIT THIS FILE DIRECTLY — it is generated from build/hyperclay.template.js
3
3
  *
4
- * HyperclayJS v1.26.2 - Minimal Browser-Native Loader
4
+ * HyperclayJS v1.26.4 - Minimal Browser-Native Loader
5
5
  *
6
6
  * Modules auto-init when imported (no separate init call needed).
7
7
  * Include `export-to-window` feature to export to window.hyperclay.
@@ -1,13 +1,20 @@
1
1
  // e.g. "Hello there" → "hello-there"
2
+ // Preserves .html/.htmlclay extensions
2
3
  function slugify (text) {
3
- return text.toString().toLowerCase()
4
+ if (text == null) return '';
5
+ const extMatch = text.toString().match(/\.(html|htmlclay)$/i);
6
+ const ext = extMatch ? extMatch[0].toLowerCase() : '';
7
+ const base = extMatch ? text.toString().slice(0, -ext.length) : text.toString();
8
+
9
+ return base.toLowerCase()
4
10
  .normalize('NFD') // separate accents from letters
5
11
  .replace(/[\u0300-\u036f]/g, '') // remove accents
6
12
  .replace(/\s+/g, '-') // replace spaces with -
7
13
  .replace(/[^\w\-]+/g, '') // remove all non-word chars
8
14
  .replace(/\-\-+/g, '-') // replace multiple - with single -
9
15
  .replace(/^-+/, '') // trim - from start of text
10
- .replace(/-+$/, ''); // trim - from end of text
16
+ .replace(/-+$/, '') // trim - from end of text
17
+ + ext;
11
18
  }
12
19
 
13
20
  // Auto-export to window unless suppressed by loader
@@ -369,6 +369,7 @@ const modalCss = `<style class="micromodal-css">
369
369
  .micromodal__container {
370
370
  position: relative;
371
371
  width: 100%;
372
+ min-width: 0;
372
373
  max-width: min(550px, calc(100vw - 2rem));
373
374
  max-height: calc(100vh - 4rem);
374
375
  max-height: calc(100dvh - 2rem);
@@ -419,6 +420,7 @@ const modalCss = `<style class="micromodal-css">
419
420
 
420
421
  .micromodal .micromodal__content {
421
422
  margin-bottom: 14px;
423
+ overflow-wrap: anywhere;
422
424
  }
423
425
 
424
426
  .micromodal .micromodal__heading {
@@ -426,6 +428,7 @@ const modalCss = `<style class="micromodal-css">
426
428
  flex-direction: column;
427
429
  gap: 2px;
428
430
  margin-bottom: 8px;
431
+ overflow-wrap: anywhere;
429
432
  }
430
433
 
431
434
  .micromodal .micromodal__input {