hyperclayjs 1.0.2 → 1.1.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/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 (~614.6KB)
137
+ ### Everything (~616.3KB)
137
138
  All available features
138
139
 
139
140
  Includes all available modules across all categories.
package/hyperclay.js CHANGED
@@ -77,7 +77,9 @@
77
77
  },
78
78
  "ajax": {
79
79
  "path": "./custom-attributes/ajaxElements.js",
80
- "dependencies": []
80
+ "dependencies": [
81
+ "get-data-from-form"
82
+ ]
81
83
  },
82
84
  "sortable": {
83
85
  "path": "./custom-attributes/sortable.js",
@@ -161,6 +163,10 @@
161
163
  "path": "./dom-utilities/insertStyleTag.js",
162
164
  "dependencies": []
163
165
  },
166
+ "get-data-from-form": {
167
+ "path": "./dom-utilities/getDataFromForm.js",
168
+ "dependencies": []
169
+ },
164
170
  "dom-morphing": {
165
171
  "path": "./vendor/idiomorph.min.js",
166
172
  "dependencies": []
@@ -189,6 +195,7 @@
189
195
  "path": "./communication/sendMessage.js",
190
196
  "dependencies": [
191
197
  "behavior-collector",
198
+ "get-data-from-form",
192
199
  "toast"
193
200
  ]
194
201
  },
@@ -257,6 +264,7 @@
257
264
  "window-load",
258
265
  "jquery-like",
259
266
  "style-injection",
267
+ "get-data-from-form",
260
268
  "dom-morphing",
261
269
  "slugify",
262
270
  "emmet-html",
@@ -455,6 +463,7 @@
455
463
  "window-load": 0.2,
456
464
  "jquery-like": 13.8,
457
465
  "style-injection": 0.8,
466
+ "get-data-from-form": 1.7,
458
467
  "dom-morphing": 7.9,
459
468
  "slugify": 0.7,
460
469
  "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.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Modular JavaScript library for building interactive HTML applications with Hyperclay",
5
5
  "type": "module",
6
6
  "main": "hyperclay.js",
@@ -41,6 +41,7 @@
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
46
  "postpublish": "open http://127.0.0.1:3535/load-jsdelivr.html"
46
47
  },