hyperclayjs 1.0.2 → 1.1.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 +2 -1
- package/hyperclay.js +295 -38
- package/module-dependency-graph.json +251 -34
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -95,6 +95,7 @@ import 'hyperclayjs/presets/standard.js';
|
|
|
95
95
|
|--------|------|-------------|
|
|
96
96
|
| All.js (jQuery-like) | 13.8KB | Full DOM manipulation library |
|
|
97
97
|
| DOM Ready | 0.2KB | DOM ready callback |
|
|
98
|
+
| Get Data From Form | 1.7KB | Extract form data as an object |
|
|
98
99
|
| Style Injection | 0.8KB | Dynamic stylesheet injection |
|
|
99
100
|
| Window Load | 0.2KB | Window load callback |
|
|
100
101
|
|
|
@@ -133,7 +134,7 @@ Standard feature set for most use cases
|
|
|
133
134
|
|
|
134
135
|
**Modules:** `save-core`, `save`, `admin`, `persist`, `ajax`, `events`, `helpers`, `toast`
|
|
135
136
|
|
|
136
|
-
### Everything (~
|
|
137
|
+
### Everything (~616.3KB)
|
|
137
138
|
All available features
|
|
138
139
|
|
|
139
140
|
Includes all available modules across all categories.
|
package/hyperclay.js
CHANGED
|
@@ -25,13 +25,27 @@
|
|
|
25
25
|
(async function() {
|
|
26
26
|
'use strict';
|
|
27
27
|
|
|
28
|
+
// Create a promise that resolves when hyperclay is ready
|
|
29
|
+
let hyperclayReadyResolve;
|
|
30
|
+
window.hyperclayReady = new Promise(resolve => {
|
|
31
|
+
hyperclayReadyResolve = resolve;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Initialize namespaces
|
|
35
|
+
window.hyperclay = window.hyperclay || {};
|
|
36
|
+
|
|
28
37
|
// Module dependency map - AUTO-GENERATED
|
|
29
38
|
const moduleDependencies = {
|
|
30
39
|
"save-core": {
|
|
31
40
|
"path": "./core/savePageCore.js",
|
|
32
41
|
"dependencies": [
|
|
33
42
|
"cookie"
|
|
34
|
-
]
|
|
43
|
+
],
|
|
44
|
+
"exports": {
|
|
45
|
+
"savePage": [
|
|
46
|
+
"hyperclay"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
35
49
|
},
|
|
36
50
|
"save": {
|
|
37
51
|
"path": "./core/savePage.js",
|
|
@@ -40,60 +54,120 @@
|
|
|
40
54
|
"toast",
|
|
41
55
|
"mutation",
|
|
42
56
|
"throttle"
|
|
43
|
-
]
|
|
57
|
+
],
|
|
58
|
+
"exports": {
|
|
59
|
+
"beforeSave": [
|
|
60
|
+
"hyperclay"
|
|
61
|
+
],
|
|
62
|
+
"savePage": [
|
|
63
|
+
"hyperclay"
|
|
64
|
+
],
|
|
65
|
+
"replacePageWith": [
|
|
66
|
+
"hyperclay"
|
|
67
|
+
],
|
|
68
|
+
"initHyperclaySaveButton": [
|
|
69
|
+
"hyperclay"
|
|
70
|
+
],
|
|
71
|
+
"initSaveKeyboardShortcut": [
|
|
72
|
+
"hyperclay"
|
|
73
|
+
],
|
|
74
|
+
"initSavePageOnChange": [
|
|
75
|
+
"hyperclay"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
44
78
|
},
|
|
45
79
|
"admin": {
|
|
46
80
|
"path": "./core/adminSystem.js",
|
|
47
81
|
"dependencies": [
|
|
48
82
|
"save",
|
|
49
83
|
"dom-ready"
|
|
50
|
-
]
|
|
84
|
+
],
|
|
85
|
+
"exports": {}
|
|
51
86
|
},
|
|
52
87
|
"persist": {
|
|
53
88
|
"path": "./core/enablePersistentFormInputValues.js",
|
|
54
89
|
"dependencies": [
|
|
55
90
|
"save"
|
|
56
|
-
]
|
|
91
|
+
],
|
|
92
|
+
"exports": {
|
|
93
|
+
"enablePersistentFormInputValues": [
|
|
94
|
+
"hyperclay"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
57
97
|
},
|
|
58
98
|
"options": {
|
|
59
99
|
"path": "./core/optionVisibilityRuleGenerator.js",
|
|
60
100
|
"dependencies": [
|
|
61
101
|
"mutation"
|
|
62
|
-
]
|
|
102
|
+
],
|
|
103
|
+
"exports": {
|
|
104
|
+
"optionVisibilityRuleGenerator": [
|
|
105
|
+
"window",
|
|
106
|
+
"hyperclay"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
63
109
|
},
|
|
64
110
|
"editmode": {
|
|
65
111
|
"path": "./core/editmodeSystem.js",
|
|
66
112
|
"dependencies": [
|
|
67
113
|
"save",
|
|
68
114
|
"dom-ready"
|
|
69
|
-
]
|
|
115
|
+
],
|
|
116
|
+
"exports": {
|
|
117
|
+
"toggleEditMode": [
|
|
118
|
+
"hyperclay"
|
|
119
|
+
],
|
|
120
|
+
"isEditMode": [
|
|
121
|
+
"hyperclay"
|
|
122
|
+
],
|
|
123
|
+
"isOwner": [
|
|
124
|
+
"hyperclay"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
70
127
|
},
|
|
71
128
|
"events": {
|
|
72
129
|
"path": "./custom-attributes/events.js",
|
|
73
130
|
"dependencies": [
|
|
74
131
|
"mutation",
|
|
75
132
|
"window-load"
|
|
76
|
-
]
|
|
133
|
+
],
|
|
134
|
+
"exports": {}
|
|
77
135
|
},
|
|
78
136
|
"ajax": {
|
|
79
137
|
"path": "./custom-attributes/ajaxElements.js",
|
|
80
|
-
"dependencies": [
|
|
138
|
+
"dependencies": [
|
|
139
|
+
"get-data-from-form"
|
|
140
|
+
],
|
|
141
|
+
"exports": {}
|
|
81
142
|
},
|
|
82
143
|
"sortable": {
|
|
83
144
|
"path": "./custom-attributes/sortable.js",
|
|
84
145
|
"dependencies": [
|
|
85
146
|
"mutation"
|
|
86
|
-
]
|
|
147
|
+
],
|
|
148
|
+
"exports": {
|
|
149
|
+
"Sortable": [
|
|
150
|
+
"window",
|
|
151
|
+
"hyperclay"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
87
154
|
},
|
|
88
155
|
"helpers": {
|
|
89
156
|
"path": "./custom-attributes/domHelpers.js",
|
|
90
157
|
"dependencies": [
|
|
91
158
|
"nearest"
|
|
92
|
-
]
|
|
159
|
+
],
|
|
160
|
+
"exports": {
|
|
161
|
+
"initCustomAttributes": [
|
|
162
|
+
"window",
|
|
163
|
+
"hyperclay"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
93
166
|
},
|
|
94
167
|
"inputs": {
|
|
95
168
|
"path": "./custom-attributes/inputHelpers.js",
|
|
96
|
-
"dependencies": []
|
|
169
|
+
"dependencies": [],
|
|
170
|
+
"exports": {}
|
|
97
171
|
},
|
|
98
172
|
"prompts": {
|
|
99
173
|
"path": "./ui/prompts.js",
|
|
@@ -102,95 +176,232 @@
|
|
|
102
176
|
"copy-to-clipboard",
|
|
103
177
|
"modals",
|
|
104
178
|
"toast"
|
|
105
|
-
]
|
|
179
|
+
],
|
|
180
|
+
"exports": {
|
|
181
|
+
"ask": [
|
|
182
|
+
"window",
|
|
183
|
+
"hyperclay"
|
|
184
|
+
],
|
|
185
|
+
"consent": [
|
|
186
|
+
"window",
|
|
187
|
+
"hyperclay"
|
|
188
|
+
],
|
|
189
|
+
"tell": [
|
|
190
|
+
"window",
|
|
191
|
+
"hyperclay"
|
|
192
|
+
],
|
|
193
|
+
"snippet": [
|
|
194
|
+
"hyperclay"
|
|
195
|
+
],
|
|
196
|
+
"showApiKey": [
|
|
197
|
+
"hyperclay"
|
|
198
|
+
]
|
|
199
|
+
}
|
|
106
200
|
},
|
|
107
201
|
"toast": {
|
|
108
202
|
"path": "./ui/toast.js",
|
|
109
|
-
"dependencies": []
|
|
203
|
+
"dependencies": [],
|
|
204
|
+
"exports": {
|
|
205
|
+
"toast": [
|
|
206
|
+
"window",
|
|
207
|
+
"hyperclay"
|
|
208
|
+
]
|
|
209
|
+
}
|
|
110
210
|
},
|
|
111
211
|
"modals": {
|
|
112
212
|
"path": "./ui/theModal.js",
|
|
113
|
-
"dependencies": []
|
|
213
|
+
"dependencies": [],
|
|
214
|
+
"exports": {
|
|
215
|
+
"themodal": [
|
|
216
|
+
"window",
|
|
217
|
+
"hyperclay"
|
|
218
|
+
]
|
|
219
|
+
}
|
|
114
220
|
},
|
|
115
221
|
"info": {
|
|
116
222
|
"path": "./ui/info.js",
|
|
117
223
|
"dependencies": [
|
|
118
224
|
"dom-ready",
|
|
119
225
|
"modals"
|
|
120
|
-
]
|
|
226
|
+
],
|
|
227
|
+
"exports": {
|
|
228
|
+
"info": [
|
|
229
|
+
"window",
|
|
230
|
+
"hyperclay"
|
|
231
|
+
]
|
|
232
|
+
}
|
|
121
233
|
},
|
|
122
234
|
"tailwind-play": {
|
|
123
235
|
"path": "./vendor/tailwind-play.js",
|
|
124
236
|
"dependencies": [
|
|
125
237
|
"style-injection"
|
|
126
|
-
]
|
|
238
|
+
],
|
|
239
|
+
"exports": {}
|
|
127
240
|
},
|
|
128
241
|
"mutation": {
|
|
129
242
|
"path": "./utilities/mutation.js",
|
|
130
|
-
"dependencies": []
|
|
243
|
+
"dependencies": [],
|
|
244
|
+
"exports": {
|
|
245
|
+
"Mutation": [
|
|
246
|
+
"window",
|
|
247
|
+
"hyperclay"
|
|
248
|
+
]
|
|
249
|
+
}
|
|
131
250
|
},
|
|
132
251
|
"nearest": {
|
|
133
252
|
"path": "./utilities/nearest.js",
|
|
134
|
-
"dependencies": []
|
|
253
|
+
"dependencies": [],
|
|
254
|
+
"exports": {
|
|
255
|
+
"nearest": [
|
|
256
|
+
"window",
|
|
257
|
+
"hyperclay"
|
|
258
|
+
]
|
|
259
|
+
}
|
|
135
260
|
},
|
|
136
261
|
"cookie": {
|
|
137
262
|
"path": "./utilities/cookie.js",
|
|
138
|
-
"dependencies": []
|
|
263
|
+
"dependencies": [],
|
|
264
|
+
"exports": {
|
|
265
|
+
"cookie": [
|
|
266
|
+
"window",
|
|
267
|
+
"hyperclay"
|
|
268
|
+
]
|
|
269
|
+
}
|
|
139
270
|
},
|
|
140
271
|
"throttle": {
|
|
141
272
|
"path": "./utilities/throttle.js",
|
|
142
|
-
"dependencies": []
|
|
273
|
+
"dependencies": [],
|
|
274
|
+
"exports": {
|
|
275
|
+
"throttle": [
|
|
276
|
+
"hyperclay"
|
|
277
|
+
]
|
|
278
|
+
}
|
|
143
279
|
},
|
|
144
280
|
"debounce": {
|
|
145
281
|
"path": "./utilities/debounce.js",
|
|
146
|
-
"dependencies": []
|
|
282
|
+
"dependencies": [],
|
|
283
|
+
"exports": {
|
|
284
|
+
"debounce": [
|
|
285
|
+
"hyperclay"
|
|
286
|
+
]
|
|
287
|
+
}
|
|
147
288
|
},
|
|
148
289
|
"dom-ready": {
|
|
149
290
|
"path": "./dom-utilities/onDomReady.js",
|
|
150
|
-
"dependencies": []
|
|
291
|
+
"dependencies": [],
|
|
292
|
+
"exports": {
|
|
293
|
+
"onDomReady": [
|
|
294
|
+
"hyperclay"
|
|
295
|
+
]
|
|
296
|
+
}
|
|
151
297
|
},
|
|
152
298
|
"window-load": {
|
|
153
299
|
"path": "./dom-utilities/onLoad.js",
|
|
154
|
-
"dependencies": []
|
|
300
|
+
"dependencies": [],
|
|
301
|
+
"exports": {
|
|
302
|
+
"onLoad": [
|
|
303
|
+
"hyperclay"
|
|
304
|
+
]
|
|
305
|
+
}
|
|
155
306
|
},
|
|
156
307
|
"jquery-like": {
|
|
157
308
|
"path": "./dom-utilities/All.js",
|
|
158
|
-
"dependencies": []
|
|
309
|
+
"dependencies": [],
|
|
310
|
+
"exports": {
|
|
311
|
+
"All": [
|
|
312
|
+
"window",
|
|
313
|
+
"hyperclay"
|
|
314
|
+
]
|
|
315
|
+
}
|
|
159
316
|
},
|
|
160
317
|
"style-injection": {
|
|
161
318
|
"path": "./dom-utilities/insertStyleTag.js",
|
|
162
|
-
"dependencies": []
|
|
319
|
+
"dependencies": [],
|
|
320
|
+
"exports": {
|
|
321
|
+
"insertStyleTag": [
|
|
322
|
+
"window",
|
|
323
|
+
"hyperclay"
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"get-data-from-form": {
|
|
328
|
+
"path": "./dom-utilities/getDataFromForm.js",
|
|
329
|
+
"dependencies": [],
|
|
330
|
+
"exports": {
|
|
331
|
+
"getDataFromForm": [
|
|
332
|
+
"window",
|
|
333
|
+
"hyperclay"
|
|
334
|
+
]
|
|
335
|
+
}
|
|
163
336
|
},
|
|
164
337
|
"dom-morphing": {
|
|
165
338
|
"path": "./vendor/idiomorph.min.js",
|
|
166
|
-
"dependencies": []
|
|
339
|
+
"dependencies": [],
|
|
340
|
+
"exports": {
|
|
341
|
+
"Idiomorph": [
|
|
342
|
+
"hyperclay"
|
|
343
|
+
]
|
|
344
|
+
}
|
|
167
345
|
},
|
|
168
346
|
"slugify": {
|
|
169
347
|
"path": "./string-utilities/slugify.js",
|
|
170
|
-
"dependencies": []
|
|
348
|
+
"dependencies": [],
|
|
349
|
+
"exports": {
|
|
350
|
+
"slugify": [
|
|
351
|
+
"window",
|
|
352
|
+
"hyperclay"
|
|
353
|
+
]
|
|
354
|
+
}
|
|
171
355
|
},
|
|
172
356
|
"emmet-html": {
|
|
173
357
|
"path": "./string-utilities/emmet-html.js",
|
|
174
|
-
"dependencies": []
|
|
358
|
+
"dependencies": [],
|
|
359
|
+
"exports": {
|
|
360
|
+
"emmet": [
|
|
361
|
+
"hyperclay"
|
|
362
|
+
]
|
|
363
|
+
}
|
|
175
364
|
},
|
|
176
365
|
"copy-to-clipboard": {
|
|
177
366
|
"path": "./string-utilities/copy-to-clipboard.js",
|
|
178
|
-
"dependencies": []
|
|
367
|
+
"dependencies": [],
|
|
368
|
+
"exports": {
|
|
369
|
+
"copyToClipboard": [
|
|
370
|
+
"hyperclay"
|
|
371
|
+
]
|
|
372
|
+
}
|
|
179
373
|
},
|
|
180
374
|
"query-parser": {
|
|
181
375
|
"path": "./string-utilities/query.js",
|
|
182
|
-
"dependencies": []
|
|
376
|
+
"dependencies": [],
|
|
377
|
+
"exports": {
|
|
378
|
+
"query": [
|
|
379
|
+
"window",
|
|
380
|
+
"hyperclay"
|
|
381
|
+
]
|
|
382
|
+
}
|
|
183
383
|
},
|
|
184
384
|
"behavior-collector": {
|
|
185
385
|
"path": "./communication/behaviorCollector.js",
|
|
186
|
-
"dependencies": []
|
|
386
|
+
"dependencies": [],
|
|
387
|
+
"exports": {
|
|
388
|
+
"behaviorCollector": [
|
|
389
|
+
"hyperclay"
|
|
390
|
+
]
|
|
391
|
+
}
|
|
187
392
|
},
|
|
188
393
|
"send-message": {
|
|
189
394
|
"path": "./communication/sendMessage.js",
|
|
190
395
|
"dependencies": [
|
|
191
396
|
"behavior-collector",
|
|
397
|
+
"get-data-from-form",
|
|
192
398
|
"toast"
|
|
193
|
-
]
|
|
399
|
+
],
|
|
400
|
+
"exports": {
|
|
401
|
+
"sendMessage": [
|
|
402
|
+
"hyperclay"
|
|
403
|
+
]
|
|
404
|
+
}
|
|
194
405
|
},
|
|
195
406
|
"file-upload": {
|
|
196
407
|
"path": "./communication/uploadFile.js",
|
|
@@ -198,7 +409,18 @@
|
|
|
198
409
|
"copy-to-clipboard",
|
|
199
410
|
"toast",
|
|
200
411
|
"debounce"
|
|
201
|
-
]
|
|
412
|
+
],
|
|
413
|
+
"exports": {
|
|
414
|
+
"uploadFile": [
|
|
415
|
+
"hyperclay"
|
|
416
|
+
],
|
|
417
|
+
"createFile": [
|
|
418
|
+
"hyperclay"
|
|
419
|
+
],
|
|
420
|
+
"uploadFileBasic": [
|
|
421
|
+
"hyperclay"
|
|
422
|
+
]
|
|
423
|
+
}
|
|
202
424
|
}
|
|
203
425
|
};
|
|
204
426
|
|
|
@@ -257,6 +479,7 @@
|
|
|
257
479
|
"window-load",
|
|
258
480
|
"jquery-like",
|
|
259
481
|
"style-injection",
|
|
482
|
+
"get-data-from-form",
|
|
260
483
|
"dom-morphing",
|
|
261
484
|
"slugify",
|
|
262
485
|
"emmet-html",
|
|
@@ -379,11 +602,6 @@
|
|
|
379
602
|
loaded.init();
|
|
380
603
|
}
|
|
381
604
|
|
|
382
|
-
// Make module available globally if it exports to window
|
|
383
|
-
if (loaded.exportToWindow && typeof loaded.exportToWindow === 'function') {
|
|
384
|
-
loaded.exportToWindow();
|
|
385
|
-
}
|
|
386
|
-
|
|
387
605
|
return loaded;
|
|
388
606
|
} catch (error) {
|
|
389
607
|
console.error(`HyperclayJS: Failed to load ${feature}:`, error);
|
|
@@ -418,6 +636,39 @@
|
|
|
418
636
|
// Store loaded modules globally for access
|
|
419
637
|
window.hyperclayModules = loadedModules;
|
|
420
638
|
|
|
639
|
+
// Attach exports to window based on module configuration
|
|
640
|
+
for (const feature of loadOrder) {
|
|
641
|
+
const module = loadedModules[feature];
|
|
642
|
+
const moduleConfig = moduleDependencies[feature];
|
|
643
|
+
|
|
644
|
+
if (!module || !moduleConfig.exports) continue;
|
|
645
|
+
|
|
646
|
+
// For each export in the module's configuration
|
|
647
|
+
for (const [exportName, locations] of Object.entries(moduleConfig.exports)) {
|
|
648
|
+
// Try to get the export - check both named export and default export
|
|
649
|
+
let exportValue = module[exportName];
|
|
650
|
+
|
|
651
|
+
// If not found as named export, try default export
|
|
652
|
+
if (!exportValue && module.default) {
|
|
653
|
+
exportValue = module.default;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
if (!exportValue) continue;
|
|
657
|
+
|
|
658
|
+
// Attach to each configured location
|
|
659
|
+
locations.forEach(location => {
|
|
660
|
+
if (location === 'window') {
|
|
661
|
+
window[exportName] = exportValue;
|
|
662
|
+
} else if (location === 'hyperclay') {
|
|
663
|
+
window.hyperclay[exportName] = exportValue;
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
// Create window.h alias
|
|
670
|
+
window.h = window.hyperclay;
|
|
671
|
+
|
|
421
672
|
// Fire custom event when loading is complete
|
|
422
673
|
window.dispatchEvent(new CustomEvent('hyperclayReady', {
|
|
423
674
|
detail: {
|
|
@@ -426,6 +677,11 @@
|
|
|
426
677
|
}
|
|
427
678
|
}));
|
|
428
679
|
|
|
680
|
+
// Resolve the ready promise
|
|
681
|
+
if (hyperclayReadyResolve) {
|
|
682
|
+
hyperclayReadyResolve(window.hyperclay);
|
|
683
|
+
}
|
|
684
|
+
|
|
429
685
|
console.log('HyperclayJS: All modules loaded successfully');
|
|
430
686
|
|
|
431
687
|
// Show feature summary - AUTO-GENERATED
|
|
@@ -455,6 +711,7 @@
|
|
|
455
711
|
"window-load": 0.2,
|
|
456
712
|
"jquery-like": 13.8,
|
|
457
713
|
"style-injection": 0.8,
|
|
714
|
+
"get-data-from-form": 1.7,
|
|
458
715
|
"dom-morphing": 7.9,
|
|
459
716
|
"slugify": 0.7,
|
|
460
717
|
"emmet-html": 1.4,
|
|
@@ -158,7 +158,12 @@
|
|
|
158
158
|
"files": [
|
|
159
159
|
"core/savePageCore.js"
|
|
160
160
|
],
|
|
161
|
-
"description": "Basic save function only - hyperclay.savePage()"
|
|
161
|
+
"description": "Basic save function only - hyperclay.savePage()",
|
|
162
|
+
"exports": {
|
|
163
|
+
"savePage": [
|
|
164
|
+
"hyperclay"
|
|
165
|
+
]
|
|
166
|
+
}
|
|
162
167
|
},
|
|
163
168
|
"save": {
|
|
164
169
|
"name": "Save System",
|
|
@@ -167,7 +172,27 @@
|
|
|
167
172
|
"files": [
|
|
168
173
|
"core/savePage.js"
|
|
169
174
|
],
|
|
170
|
-
"description": "Full save: save button, keyboard shortcut, auto-save, change tracking"
|
|
175
|
+
"description": "Full save: save button, keyboard shortcut, auto-save, change tracking",
|
|
176
|
+
"exports": {
|
|
177
|
+
"beforeSave": [
|
|
178
|
+
"hyperclay"
|
|
179
|
+
],
|
|
180
|
+
"savePage": [
|
|
181
|
+
"hyperclay"
|
|
182
|
+
],
|
|
183
|
+
"replacePageWith": [
|
|
184
|
+
"hyperclay"
|
|
185
|
+
],
|
|
186
|
+
"initHyperclaySaveButton": [
|
|
187
|
+
"hyperclay"
|
|
188
|
+
],
|
|
189
|
+
"initSaveKeyboardShortcut": [
|
|
190
|
+
"hyperclay"
|
|
191
|
+
],
|
|
192
|
+
"initSavePageOnChange": [
|
|
193
|
+
"hyperclay"
|
|
194
|
+
]
|
|
195
|
+
}
|
|
171
196
|
},
|
|
172
197
|
"admin": {
|
|
173
198
|
"name": "Admin Features",
|
|
@@ -180,7 +205,8 @@
|
|
|
180
205
|
"core/adminOnClick.js",
|
|
181
206
|
"core/adminResources.js"
|
|
182
207
|
],
|
|
183
|
-
"description": "Hides admin inputs, scripts, contenteditable, onclick for regular viewers"
|
|
208
|
+
"description": "Hides admin inputs, scripts, contenteditable, onclick for regular viewers",
|
|
209
|
+
"exports": {}
|
|
184
210
|
},
|
|
185
211
|
"persist": {
|
|
186
212
|
"name": "Form Persistence",
|
|
@@ -189,7 +215,12 @@
|
|
|
189
215
|
"files": [
|
|
190
216
|
"core/enablePersistentFormInputValues.js"
|
|
191
217
|
],
|
|
192
|
-
"description": "Persist form values to the DOM with [persist] attribute"
|
|
218
|
+
"description": "Persist form values to the DOM with [persist] attribute",
|
|
219
|
+
"exports": {
|
|
220
|
+
"enablePersistentFormInputValues": [
|
|
221
|
+
"hyperclay"
|
|
222
|
+
]
|
|
223
|
+
}
|
|
193
224
|
},
|
|
194
225
|
"options": {
|
|
195
226
|
"name": "Option Visibility",
|
|
@@ -198,7 +229,13 @@
|
|
|
198
229
|
"files": [
|
|
199
230
|
"core/optionVisibilityRuleGenerator.js"
|
|
200
231
|
],
|
|
201
|
-
"description": "Dynamic show/hide based on page state with option:attribute=\"value\""
|
|
232
|
+
"description": "Dynamic show/hide based on page state with option:attribute=\"value\"",
|
|
233
|
+
"exports": {
|
|
234
|
+
"optionVisibilityRuleGenerator": [
|
|
235
|
+
"window",
|
|
236
|
+
"hyperclay"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
202
239
|
},
|
|
203
240
|
"editmode": {
|
|
204
241
|
"name": "Edit Mode",
|
|
@@ -209,7 +246,18 @@
|
|
|
209
246
|
"core/editmode.js",
|
|
210
247
|
"core/setPageTypeOnDocumentElement.js"
|
|
211
248
|
],
|
|
212
|
-
"description": "Toggle edit mode on/off"
|
|
249
|
+
"description": "Toggle edit mode on/off",
|
|
250
|
+
"exports": {
|
|
251
|
+
"toggleEditMode": [
|
|
252
|
+
"hyperclay"
|
|
253
|
+
],
|
|
254
|
+
"isEditMode": [
|
|
255
|
+
"hyperclay"
|
|
256
|
+
],
|
|
257
|
+
"isOwner": [
|
|
258
|
+
"hyperclay"
|
|
259
|
+
]
|
|
260
|
+
}
|
|
213
261
|
},
|
|
214
262
|
"events": {
|
|
215
263
|
"name": "Event Attributes",
|
|
@@ -222,7 +270,8 @@
|
|
|
222
270
|
"custom-attributes/onpagemutation.js",
|
|
223
271
|
"custom-attributes/onrender.js"
|
|
224
272
|
],
|
|
225
|
-
"description": "[onclickaway], [onclone], [onpagemutation], [onrender]"
|
|
273
|
+
"description": "[onclickaway], [onclone], [onpagemutation], [onrender]",
|
|
274
|
+
"exports": {}
|
|
226
275
|
},
|
|
227
276
|
"ajax": {
|
|
228
277
|
"name": "AJAX Elements",
|
|
@@ -231,7 +280,8 @@
|
|
|
231
280
|
"files": [
|
|
232
281
|
"custom-attributes/ajaxElements.js"
|
|
233
282
|
],
|
|
234
|
-
"description": "[ajax-form], [ajax-button] for async form submissions"
|
|
283
|
+
"description": "[ajax-form], [ajax-button] for async form submissions",
|
|
284
|
+
"exports": {}
|
|
235
285
|
},
|
|
236
286
|
"sortable": {
|
|
237
287
|
"name": "Sortable",
|
|
@@ -241,7 +291,13 @@
|
|
|
241
291
|
"custom-attributes/sortable.js",
|
|
242
292
|
"vendor/Sortable.js"
|
|
243
293
|
],
|
|
244
|
-
"description": "Drag-drop sorting with [sortable] - includes Sortable.js vendor library"
|
|
294
|
+
"description": "Drag-drop sorting with [sortable] - includes Sortable.js vendor library",
|
|
295
|
+
"exports": {
|
|
296
|
+
"Sortable": [
|
|
297
|
+
"window",
|
|
298
|
+
"hyperclay"
|
|
299
|
+
]
|
|
300
|
+
}
|
|
245
301
|
},
|
|
246
302
|
"helpers": {
|
|
247
303
|
"name": "DOM Helpers",
|
|
@@ -250,7 +306,13 @@
|
|
|
250
306
|
"files": [
|
|
251
307
|
"custom-attributes/domHelpers.js"
|
|
252
308
|
],
|
|
253
|
-
"description": "el.nearest, el.val, el.text, el.exec, el.cycle"
|
|
309
|
+
"description": "el.nearest, el.val, el.text, el.exec, el.cycle",
|
|
310
|
+
"exports": {
|
|
311
|
+
"initCustomAttributes": [
|
|
312
|
+
"window",
|
|
313
|
+
"hyperclay"
|
|
314
|
+
]
|
|
315
|
+
}
|
|
254
316
|
},
|
|
255
317
|
"inputs": {
|
|
256
318
|
"name": "Input Helpers",
|
|
@@ -261,7 +323,8 @@
|
|
|
261
323
|
"custom-attributes/preventEnter.js",
|
|
262
324
|
"custom-attributes/autosize.js"
|
|
263
325
|
],
|
|
264
|
-
"description": "[prevent-enter], [autosize] for textareas"
|
|
326
|
+
"description": "[prevent-enter], [autosize] for textareas",
|
|
327
|
+
"exports": {}
|
|
265
328
|
},
|
|
266
329
|
"prompts": {
|
|
267
330
|
"name": "Dialog Functions",
|
|
@@ -270,7 +333,27 @@
|
|
|
270
333
|
"files": [
|
|
271
334
|
"ui/prompts.js"
|
|
272
335
|
],
|
|
273
|
-
"description": "ask(), consent(), tell(), snippet() functions"
|
|
336
|
+
"description": "ask(), consent(), tell(), snippet() functions",
|
|
337
|
+
"exports": {
|
|
338
|
+
"ask": [
|
|
339
|
+
"window",
|
|
340
|
+
"hyperclay"
|
|
341
|
+
],
|
|
342
|
+
"consent": [
|
|
343
|
+
"window",
|
|
344
|
+
"hyperclay"
|
|
345
|
+
],
|
|
346
|
+
"tell": [
|
|
347
|
+
"window",
|
|
348
|
+
"hyperclay"
|
|
349
|
+
],
|
|
350
|
+
"snippet": [
|
|
351
|
+
"hyperclay"
|
|
352
|
+
],
|
|
353
|
+
"showApiKey": [
|
|
354
|
+
"hyperclay"
|
|
355
|
+
]
|
|
356
|
+
}
|
|
274
357
|
},
|
|
275
358
|
"toast": {
|
|
276
359
|
"name": "Toast Notifications",
|
|
@@ -279,7 +362,13 @@
|
|
|
279
362
|
"files": [
|
|
280
363
|
"ui/toast.js"
|
|
281
364
|
],
|
|
282
|
-
"description": "Success/error message notifications - toast(msg, msgType)"
|
|
365
|
+
"description": "Success/error message notifications - toast(msg, msgType)",
|
|
366
|
+
"exports": {
|
|
367
|
+
"toast": [
|
|
368
|
+
"window",
|
|
369
|
+
"hyperclay"
|
|
370
|
+
]
|
|
371
|
+
}
|
|
283
372
|
},
|
|
284
373
|
"modals": {
|
|
285
374
|
"name": "Modal System",
|
|
@@ -288,7 +377,13 @@
|
|
|
288
377
|
"files": [
|
|
289
378
|
"ui/theModal.js"
|
|
290
379
|
],
|
|
291
|
-
"description": "Full modal window creation system - window.theModal"
|
|
380
|
+
"description": "Full modal window creation system - window.theModal",
|
|
381
|
+
"exports": {
|
|
382
|
+
"themodal": [
|
|
383
|
+
"window",
|
|
384
|
+
"hyperclay"
|
|
385
|
+
]
|
|
386
|
+
}
|
|
292
387
|
},
|
|
293
388
|
"info": {
|
|
294
389
|
"name": "Info Dialog",
|
|
@@ -297,7 +392,13 @@
|
|
|
297
392
|
"files": [
|
|
298
393
|
"ui/info.js"
|
|
299
394
|
],
|
|
300
|
-
"description": "Info dialog component"
|
|
395
|
+
"description": "Info dialog component",
|
|
396
|
+
"exports": {
|
|
397
|
+
"info": [
|
|
398
|
+
"window",
|
|
399
|
+
"hyperclay"
|
|
400
|
+
]
|
|
401
|
+
}
|
|
301
402
|
},
|
|
302
403
|
"tailwind-play": {
|
|
303
404
|
"name": "Tailwind Play",
|
|
@@ -306,7 +407,8 @@
|
|
|
306
407
|
"files": [
|
|
307
408
|
"vendor/tailwind-play.js"
|
|
308
409
|
],
|
|
309
|
-
"description": "Live Tailwind CSS editing - updates styles based on classes in your HTML"
|
|
410
|
+
"description": "Live Tailwind CSS editing - updates styles based on classes in your HTML",
|
|
411
|
+
"exports": {}
|
|
310
412
|
},
|
|
311
413
|
"mutation": {
|
|
312
414
|
"name": "Mutation Observer",
|
|
@@ -315,7 +417,13 @@
|
|
|
315
417
|
"files": [
|
|
316
418
|
"utilities/mutation.js"
|
|
317
419
|
],
|
|
318
|
-
"description": "DOM mutation observation (often auto-included)"
|
|
420
|
+
"description": "DOM mutation observation (often auto-included)",
|
|
421
|
+
"exports": {
|
|
422
|
+
"Mutation": [
|
|
423
|
+
"window",
|
|
424
|
+
"hyperclay"
|
|
425
|
+
]
|
|
426
|
+
}
|
|
319
427
|
},
|
|
320
428
|
"nearest": {
|
|
321
429
|
"name": "Nearest Element",
|
|
@@ -324,7 +432,13 @@
|
|
|
324
432
|
"files": [
|
|
325
433
|
"utilities/nearest.js"
|
|
326
434
|
],
|
|
327
|
-
"description": "Find nearest elements (often auto-included)"
|
|
435
|
+
"description": "Find nearest elements (often auto-included)",
|
|
436
|
+
"exports": {
|
|
437
|
+
"nearest": [
|
|
438
|
+
"window",
|
|
439
|
+
"hyperclay"
|
|
440
|
+
]
|
|
441
|
+
}
|
|
328
442
|
},
|
|
329
443
|
"cookie": {
|
|
330
444
|
"name": "Cookie Helper",
|
|
@@ -333,7 +447,13 @@
|
|
|
333
447
|
"files": [
|
|
334
448
|
"utilities/cookie.js"
|
|
335
449
|
],
|
|
336
|
-
"description": "Cookie management (often auto-included)"
|
|
450
|
+
"description": "Cookie management (often auto-included)",
|
|
451
|
+
"exports": {
|
|
452
|
+
"cookie": [
|
|
453
|
+
"window",
|
|
454
|
+
"hyperclay"
|
|
455
|
+
]
|
|
456
|
+
}
|
|
337
457
|
},
|
|
338
458
|
"throttle": {
|
|
339
459
|
"name": "Throttle",
|
|
@@ -342,7 +462,12 @@
|
|
|
342
462
|
"files": [
|
|
343
463
|
"utilities/throttle.js"
|
|
344
464
|
],
|
|
345
|
-
"description": "Function throttling"
|
|
465
|
+
"description": "Function throttling",
|
|
466
|
+
"exports": {
|
|
467
|
+
"throttle": [
|
|
468
|
+
"hyperclay"
|
|
469
|
+
]
|
|
470
|
+
}
|
|
346
471
|
},
|
|
347
472
|
"debounce": {
|
|
348
473
|
"name": "Debounce",
|
|
@@ -351,7 +476,12 @@
|
|
|
351
476
|
"files": [
|
|
352
477
|
"utilities/debounce.js"
|
|
353
478
|
],
|
|
354
|
-
"description": "Function debouncing"
|
|
479
|
+
"description": "Function debouncing",
|
|
480
|
+
"exports": {
|
|
481
|
+
"debounce": [
|
|
482
|
+
"hyperclay"
|
|
483
|
+
]
|
|
484
|
+
}
|
|
355
485
|
},
|
|
356
486
|
"dom-ready": {
|
|
357
487
|
"name": "DOM Ready",
|
|
@@ -360,7 +490,12 @@
|
|
|
360
490
|
"files": [
|
|
361
491
|
"dom-utilities/onDomReady.js"
|
|
362
492
|
],
|
|
363
|
-
"description": "DOM ready callback"
|
|
493
|
+
"description": "DOM ready callback",
|
|
494
|
+
"exports": {
|
|
495
|
+
"onDomReady": [
|
|
496
|
+
"hyperclay"
|
|
497
|
+
]
|
|
498
|
+
}
|
|
364
499
|
},
|
|
365
500
|
"window-load": {
|
|
366
501
|
"name": "Window Load",
|
|
@@ -369,7 +504,12 @@
|
|
|
369
504
|
"files": [
|
|
370
505
|
"dom-utilities/onLoad.js"
|
|
371
506
|
],
|
|
372
|
-
"description": "Window load callback"
|
|
507
|
+
"description": "Window load callback",
|
|
508
|
+
"exports": {
|
|
509
|
+
"onLoad": [
|
|
510
|
+
"hyperclay"
|
|
511
|
+
]
|
|
512
|
+
}
|
|
373
513
|
},
|
|
374
514
|
"jquery-like": {
|
|
375
515
|
"name": "All.js (jQuery-like)",
|
|
@@ -378,7 +518,13 @@
|
|
|
378
518
|
"files": [
|
|
379
519
|
"dom-utilities/All.js"
|
|
380
520
|
],
|
|
381
|
-
"description": "Full DOM manipulation library"
|
|
521
|
+
"description": "Full DOM manipulation library",
|
|
522
|
+
"exports": {
|
|
523
|
+
"All": [
|
|
524
|
+
"window",
|
|
525
|
+
"hyperclay"
|
|
526
|
+
]
|
|
527
|
+
}
|
|
382
528
|
},
|
|
383
529
|
"style-injection": {
|
|
384
530
|
"name": "Style Injection",
|
|
@@ -387,7 +533,28 @@
|
|
|
387
533
|
"files": [
|
|
388
534
|
"dom-utilities/insertStyleTag.js"
|
|
389
535
|
],
|
|
390
|
-
"description": "Dynamic stylesheet injection"
|
|
536
|
+
"description": "Dynamic stylesheet injection",
|
|
537
|
+
"exports": {
|
|
538
|
+
"insertStyleTag": [
|
|
539
|
+
"window",
|
|
540
|
+
"hyperclay"
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"get-data-from-form": {
|
|
545
|
+
"name": "Get Data From Form",
|
|
546
|
+
"category": "dom-utilities",
|
|
547
|
+
"size": 1.7,
|
|
548
|
+
"files": [
|
|
549
|
+
"dom-utilities/getDataFromForm.js"
|
|
550
|
+
],
|
|
551
|
+
"description": "Extract form data as an object",
|
|
552
|
+
"exports": {
|
|
553
|
+
"getDataFromForm": [
|
|
554
|
+
"window",
|
|
555
|
+
"hyperclay"
|
|
556
|
+
]
|
|
557
|
+
}
|
|
391
558
|
},
|
|
392
559
|
"dom-morphing": {
|
|
393
560
|
"name": "DOM Morphing",
|
|
@@ -396,7 +563,12 @@
|
|
|
396
563
|
"files": [
|
|
397
564
|
"vendor/idiomorph.min.js"
|
|
398
565
|
],
|
|
399
|
-
"description": "Efficient DOM updates"
|
|
566
|
+
"description": "Efficient DOM updates",
|
|
567
|
+
"exports": {
|
|
568
|
+
"Idiomorph": [
|
|
569
|
+
"hyperclay"
|
|
570
|
+
]
|
|
571
|
+
}
|
|
400
572
|
},
|
|
401
573
|
"slugify": {
|
|
402
574
|
"name": "Slugify",
|
|
@@ -405,7 +577,13 @@
|
|
|
405
577
|
"files": [
|
|
406
578
|
"string-utilities/slugify.js"
|
|
407
579
|
],
|
|
408
|
-
"description": "URL-friendly slug generator"
|
|
580
|
+
"description": "URL-friendly slug generator",
|
|
581
|
+
"exports": {
|
|
582
|
+
"slugify": [
|
|
583
|
+
"window",
|
|
584
|
+
"hyperclay"
|
|
585
|
+
]
|
|
586
|
+
}
|
|
409
587
|
},
|
|
410
588
|
"emmet-html": {
|
|
411
589
|
"name": "Emmet HTML",
|
|
@@ -414,7 +592,12 @@
|
|
|
414
592
|
"files": [
|
|
415
593
|
"string-utilities/emmet-html.js"
|
|
416
594
|
],
|
|
417
|
-
"description": "Emmet-like HTML generation"
|
|
595
|
+
"description": "Emmet-like HTML generation",
|
|
596
|
+
"exports": {
|
|
597
|
+
"emmet": [
|
|
598
|
+
"hyperclay"
|
|
599
|
+
]
|
|
600
|
+
}
|
|
418
601
|
},
|
|
419
602
|
"copy-to-clipboard": {
|
|
420
603
|
"name": "Copy to Clipboard",
|
|
@@ -423,7 +606,12 @@
|
|
|
423
606
|
"files": [
|
|
424
607
|
"string-utilities/copy-to-clipboard.js"
|
|
425
608
|
],
|
|
426
|
-
"description": "Clipboard utility"
|
|
609
|
+
"description": "Clipboard utility",
|
|
610
|
+
"exports": {
|
|
611
|
+
"copyToClipboard": [
|
|
612
|
+
"hyperclay"
|
|
613
|
+
]
|
|
614
|
+
}
|
|
427
615
|
},
|
|
428
616
|
"query-parser": {
|
|
429
617
|
"name": "URL Query Parser",
|
|
@@ -432,7 +620,13 @@
|
|
|
432
620
|
"files": [
|
|
433
621
|
"string-utilities/query.js"
|
|
434
622
|
],
|
|
435
|
-
"description": "Parse URL search params"
|
|
623
|
+
"description": "Parse URL search params",
|
|
624
|
+
"exports": {
|
|
625
|
+
"query": [
|
|
626
|
+
"window",
|
|
627
|
+
"hyperclay"
|
|
628
|
+
]
|
|
629
|
+
}
|
|
436
630
|
},
|
|
437
631
|
"behavior-collector": {
|
|
438
632
|
"name": "Behavior Collector",
|
|
@@ -441,7 +635,12 @@
|
|
|
441
635
|
"files": [
|
|
442
636
|
"communication/behaviorCollector.js"
|
|
443
637
|
],
|
|
444
|
-
"description": "Tracks user interactions (mouse, scroll, keyboard)"
|
|
638
|
+
"description": "Tracks user interactions (mouse, scroll, keyboard)",
|
|
639
|
+
"exports": {
|
|
640
|
+
"behaviorCollector": [
|
|
641
|
+
"hyperclay"
|
|
642
|
+
]
|
|
643
|
+
}
|
|
445
644
|
},
|
|
446
645
|
"send-message": {
|
|
447
646
|
"name": "Send Message to App Owner",
|
|
@@ -450,7 +649,12 @@
|
|
|
450
649
|
"files": [
|
|
451
650
|
"communication/sendMessage.js"
|
|
452
651
|
],
|
|
453
|
-
"description": "Message sending utility"
|
|
652
|
+
"description": "Message sending utility",
|
|
653
|
+
"exports": {
|
|
654
|
+
"sendMessage": [
|
|
655
|
+
"hyperclay"
|
|
656
|
+
]
|
|
657
|
+
}
|
|
454
658
|
},
|
|
455
659
|
"file-upload": {
|
|
456
660
|
"name": "File Upload to App Owner",
|
|
@@ -459,7 +663,18 @@
|
|
|
459
663
|
"files": [
|
|
460
664
|
"communication/uploadFile.js"
|
|
461
665
|
],
|
|
462
|
-
"description": "File upload with progress"
|
|
666
|
+
"description": "File upload with progress",
|
|
667
|
+
"exports": {
|
|
668
|
+
"uploadFile": [
|
|
669
|
+
"hyperclay"
|
|
670
|
+
],
|
|
671
|
+
"createFile": [
|
|
672
|
+
"hyperclay"
|
|
673
|
+
],
|
|
674
|
+
"uploadFileBasic": [
|
|
675
|
+
"hyperclay"
|
|
676
|
+
]
|
|
677
|
+
}
|
|
463
678
|
}
|
|
464
679
|
},
|
|
465
680
|
"categories": {
|
|
@@ -515,7 +730,8 @@
|
|
|
515
730
|
"dom-ready",
|
|
516
731
|
"window-load",
|
|
517
732
|
"jquery-like",
|
|
518
|
-
"style-injection"
|
|
733
|
+
"style-injection",
|
|
734
|
+
"get-data-from-form"
|
|
519
735
|
]
|
|
520
736
|
},
|
|
521
737
|
"string-utilities": {
|
|
@@ -599,6 +815,7 @@
|
|
|
599
815
|
"window-load",
|
|
600
816
|
"jquery-like",
|
|
601
817
|
"style-injection",
|
|
818
|
+
"get-data-from-form",
|
|
602
819
|
"dom-morphing",
|
|
603
820
|
"slugify",
|
|
604
821
|
"emmet-html",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyperclayjs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Modular JavaScript library for building interactive HTML applications with Hyperclay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "hyperclay.js",
|
|
@@ -41,8 +41,9 @@
|
|
|
41
41
|
"test": "jest",
|
|
42
42
|
"lint": "eslint .",
|
|
43
43
|
"format": "prettier --write .",
|
|
44
|
+
"release": "./scripts/release.sh",
|
|
44
45
|
"prepublishOnly": "npm run build && npm test",
|
|
45
|
-
"postpublish": "open http://127.0.0.1:3535/load-jsdelivr.html"
|
|
46
|
+
"postpublish": "test -n \"$SKIP_POSTPUBLISH\" || open http://127.0.0.1:3535/load-jsdelivr.html"
|
|
46
47
|
},
|
|
47
48
|
"repository": {
|
|
48
49
|
"type": "git",
|