hyperclayjs 1.5.0 → 1.6.0
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/LICENSE +0 -5
- package/README.md +6 -9
- package/core/savePage.js +2 -0
- package/hyperclay.js +1 -3
- package/module-dependency-graph.json +4 -24
- package/package.json +1 -1
- package/vendor/tailwind-base.css +0 -1471
- package/vendor/tailwind-play.js +0 -23
- package/vendor/tailwind-play.vendor.js +0 -169
package/LICENSE
CHANGED
|
@@ -31,11 +31,6 @@ This project includes the following third-party libraries:
|
|
|
31
31
|
- License: 0BSD (Zero-Clause BSD)
|
|
32
32
|
- https://github.com/bigskysoftware/idiomorph
|
|
33
33
|
|
|
34
|
-
### Tailwind CSS
|
|
35
|
-
- Copyright (c) Tailwind Labs, Inc.
|
|
36
|
-
- License: MIT
|
|
37
|
-
- https://github.com/tailwindlabs/tailwindcss
|
|
38
|
-
|
|
39
34
|
### Sortable.js
|
|
40
35
|
- Copyright (c) All contributors to Sortable
|
|
41
36
|
- License: MIT
|
package/README.md
CHANGED
|
@@ -63,8 +63,8 @@ import 'hyperclayjs/presets/standard.js';
|
|
|
63
63
|
| option-visibility | 4.7KB | Dynamic show/hide based on ancestor state with option:attribute="value" |
|
|
64
64
|
| persist | 2.5KB | Persist input/select/textarea values to the DOM with [persist] attribute |
|
|
65
65
|
| save-core | 6.3KB | Basic save function only - hyperclay.savePage() |
|
|
66
|
-
| save-system |
|
|
67
|
-
| save-toast | 0.9KB | Toast notifications for save events
|
|
66
|
+
| save-system | 7.1KB | Manual save: keyboard shortcut (CMD+S), save button, change tracking |
|
|
67
|
+
| save-toast | 0.9KB | Toast notifications for save events |
|
|
68
68
|
|
|
69
69
|
### Custom Attributes (HTML enhancements)
|
|
70
70
|
|
|
@@ -82,7 +82,6 @@ import 'hyperclayjs/presets/standard.js';
|
|
|
82
82
|
| Module | Size | Description |
|
|
83
83
|
|--------|------|-------------|
|
|
84
84
|
| dialogs | 8.4KB | ask(), consent(), tell(), snippet() dialog functions |
|
|
85
|
-
| tailwind-play | 0.7KB | Live Tailwind CSS editing, lazy-loads ~370KB script in edit mode only |
|
|
86
85
|
| the-modal | 19.8KB | Full modal window creation system - window.theModal |
|
|
87
86
|
| toast | 7.7KB | Success/error message notifications, toast(msg, msgType) |
|
|
88
87
|
|
|
@@ -128,17 +127,17 @@ import 'hyperclayjs/presets/standard.js';
|
|
|
128
127
|
|
|
129
128
|
## Presets
|
|
130
129
|
|
|
131
|
-
### Minimal (~27.
|
|
130
|
+
### Minimal (~27.8KB)
|
|
132
131
|
Essential features for basic editing
|
|
133
132
|
|
|
134
133
|
**Modules:** `save-core`, `save-system`, `edit-mode-helpers`, `toast`, `save-toast`, `export-to-window`
|
|
135
134
|
|
|
136
|
-
### Standard (~44.
|
|
135
|
+
### Standard (~44.3KB)
|
|
137
136
|
Standard feature set for most use cases
|
|
138
137
|
|
|
139
138
|
**Modules:** `save-core`, `save-system`, `edit-mode-helpers`, `persist`, `option-visibility`, `event-attrs`, `dom-helpers`, `toast`, `save-toast`, `export-to-window`
|
|
140
139
|
|
|
141
|
-
### Everything (~
|
|
140
|
+
### Everything (~149KB)
|
|
142
141
|
All available features
|
|
143
142
|
|
|
144
143
|
Includes all available modules across all categories.
|
|
@@ -150,7 +149,6 @@ Some modules with large vendor dependencies are **lazy-loaded** to optimize page
|
|
|
150
149
|
| Module | Wrapper Size | Vendor Size | Loaded When |
|
|
151
150
|
|--------|-------------|-------------|-------------|
|
|
152
151
|
| `sortable` | ~3KB | ~118KB | Edit mode only |
|
|
153
|
-
| `tailwind-play` | ~1KB | ~370KB | Edit mode only |
|
|
154
152
|
|
|
155
153
|
**How it works:**
|
|
156
154
|
- The wrapper module checks if the page is in edit mode (`isEditMode`)
|
|
@@ -160,7 +158,7 @@ Some modules with large vendor dependencies are **lazy-loaded** to optimize page
|
|
|
160
158
|
|
|
161
159
|
This means:
|
|
162
160
|
- **Editors** get full functionality when needed
|
|
163
|
-
- **Viewers** never download
|
|
161
|
+
- **Viewers** never download the heavy vendor scripts
|
|
164
162
|
- **Saved pages** stay clean with no leftover script tags
|
|
165
163
|
|
|
166
164
|
## Visual Configurator
|
|
@@ -369,7 +367,6 @@ MIT © Hyperclay
|
|
|
369
367
|
This project includes the following open-source libraries:
|
|
370
368
|
|
|
371
369
|
- **[Idiomorph](https://github.com/bigskysoftware/idiomorph)** - DOM morphing library by Big Sky Software (0BSD)
|
|
372
|
-
- **[Tailwind CSS](https://github.com/tailwindlabs/tailwindcss)** - Utility-first CSS framework by Tailwind Labs (MIT)
|
|
373
370
|
- **[Sortable.js](https://github.com/SortableJS/Sortable)** - Drag-and-drop library (MIT)
|
|
374
371
|
|
|
375
372
|
## Links
|
package/core/savePage.js
CHANGED
|
@@ -100,6 +100,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
100
100
|
if (isEditMode) {
|
|
101
101
|
// Capture initial state immediately for comparison
|
|
102
102
|
lastSavedContents = getPageContents();
|
|
103
|
+
// Set initial save status to 'saved'
|
|
104
|
+
document.documentElement.setAttribute('savestatus', 'saved');
|
|
103
105
|
}
|
|
104
106
|
});
|
|
105
107
|
|
package/hyperclay.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* HyperclayJS v1.
|
|
2
|
+
* HyperclayJS v1.6.0 - Minimal Browser-Native Loader
|
|
3
3
|
*
|
|
4
4
|
* Modules auto-init when imported (no separate init call needed).
|
|
5
5
|
* Include `export-to-window` feature to export to window.hyperclay.
|
|
@@ -43,7 +43,6 @@ const MODULE_PATHS = {
|
|
|
43
43
|
"toast": "./ui/toast.js",
|
|
44
44
|
"toast-hyperclay": "./ui/toast-hyperclay.js",
|
|
45
45
|
"the-modal": "./ui/theModal.js",
|
|
46
|
-
"tailwind-play": "./vendor/tailwind-play.js",
|
|
47
46
|
"mutation": "./utilities/mutation.js",
|
|
48
47
|
"nearest": "./utilities/nearest.js",
|
|
49
48
|
"cookie": "./utilities/cookie.js",
|
|
@@ -114,7 +113,6 @@ const PRESETS = {
|
|
|
114
113
|
"toast",
|
|
115
114
|
"toast-hyperclay",
|
|
116
115
|
"the-modal",
|
|
117
|
-
"tailwind-play",
|
|
118
116
|
"mutation",
|
|
119
117
|
"nearest",
|
|
120
118
|
"cookie",
|
|
@@ -155,14 +155,7 @@
|
|
|
155
155
|
"utilities/pipe.js": [],
|
|
156
156
|
"utilities/throttle.js": [],
|
|
157
157
|
"vendor/Sortable.vendor.js": [],
|
|
158
|
-
"vendor/idiomorph.min.js": []
|
|
159
|
-
"vendor/tailwind-play.js": [
|
|
160
|
-
"core/isAdminOfCurrentResource.js",
|
|
161
|
-
"utilities/loadVendorScript.js"
|
|
162
|
-
],
|
|
163
|
-
"vendor/tailwind-play.vendor.js": [
|
|
164
|
-
"dom-utilities/insertStyleTag.js"
|
|
165
|
-
]
|
|
158
|
+
"vendor/idiomorph.min.js": []
|
|
166
159
|
},
|
|
167
160
|
"modules": {
|
|
168
161
|
"save-core": {
|
|
@@ -182,7 +175,7 @@
|
|
|
182
175
|
"save-system": {
|
|
183
176
|
"name": "save-system",
|
|
184
177
|
"category": "core",
|
|
185
|
-
"size": 7,
|
|
178
|
+
"size": 7.1,
|
|
186
179
|
"files": [
|
|
187
180
|
"core/savePage.js"
|
|
188
181
|
],
|
|
@@ -219,7 +212,7 @@
|
|
|
219
212
|
"files": [
|
|
220
213
|
"core/saveToast.js"
|
|
221
214
|
],
|
|
222
|
-
"description": "Toast notifications for save events
|
|
215
|
+
"description": "Toast notifications for save events",
|
|
223
216
|
"exports": {}
|
|
224
217
|
},
|
|
225
218
|
"edit-mode-helpers": {
|
|
@@ -415,16 +408,6 @@
|
|
|
415
408
|
]
|
|
416
409
|
}
|
|
417
410
|
},
|
|
418
|
-
"tailwind-play": {
|
|
419
|
-
"name": "tailwind-play",
|
|
420
|
-
"category": "ui",
|
|
421
|
-
"size": 0.7,
|
|
422
|
-
"files": [
|
|
423
|
-
"vendor/tailwind-play.js"
|
|
424
|
-
],
|
|
425
|
-
"description": "Live Tailwind CSS editing, lazy-loads ~370KB script in edit mode only",
|
|
426
|
-
"exports": {}
|
|
427
|
-
},
|
|
428
411
|
"mutation": {
|
|
429
412
|
"name": "mutation",
|
|
430
413
|
"category": "utilities",
|
|
@@ -707,7 +690,6 @@
|
|
|
707
690
|
"toast": "./ui/toast.js",
|
|
708
691
|
"toast-hyperclay": "./ui/toast-hyperclay.js",
|
|
709
692
|
"the-modal": "./ui/theModal.js",
|
|
710
|
-
"tailwind-play": "./vendor/tailwind-play.js",
|
|
711
693
|
"mutation": "./utilities/mutation.js",
|
|
712
694
|
"nearest": "./utilities/nearest.js",
|
|
713
695
|
"cookie": "./utilities/cookie.js",
|
|
@@ -760,8 +742,7 @@
|
|
|
760
742
|
"modules": [
|
|
761
743
|
"dialogs",
|
|
762
744
|
"toast",
|
|
763
|
-
"the-modal"
|
|
764
|
-
"tailwind-play"
|
|
745
|
+
"the-modal"
|
|
765
746
|
]
|
|
766
747
|
},
|
|
767
748
|
"utilities": {
|
|
@@ -861,7 +842,6 @@
|
|
|
861
842
|
"toast",
|
|
862
843
|
"toast-hyperclay",
|
|
863
844
|
"the-modal",
|
|
864
|
-
"tailwind-play",
|
|
865
845
|
"mutation",
|
|
866
846
|
"nearest",
|
|
867
847
|
"cookie",
|