@panphora/hyper-cms 0.7.2 → 0.8.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/LICENSE CHANGED
@@ -1,14 +1,16 @@
1
- BSD Zero Clause License
1
+ MIT No Attribution
2
2
 
3
3
  Copyright (c) 2026 David Miranda
4
4
 
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
6
+ software and associated documentation files (the "Software"), to deal in the Software
7
+ without restriction, including without limitation the rights to use, copy, modify,
8
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so.
7
10
 
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
15
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
16
+ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -176,7 +176,11 @@ Use it for: tags, keywords, badge lists — short repeated values where a full r
176
176
 
177
177
  Selected automatically for `@src` rules; forced anywhere else with `data-hcms-component="image"` on the page element — e.g. a logo URL stored in a `data-icon` attribute, where the suffix can't be inferred.
178
178
 
179
- An "Upload image" button (`accept="image/*"`) sends the file through the host uploader (`window.hyperclay.uploadFileBasic` in a hyperclay app) and writes the served URL into the page's `img src`; the field shows a thumbnail with an × that clears it. Standalone (no host uploader) the widget still works with a temporary `blob:` preview — deliberately non-persistent. Upload errors render inline in the field and fire `hcms:error`; closing the editor mid-upload aborts cleanly.
179
+ An "Upload image" button (`accept="image/*"`) sends the file to the host (`clay.upload`, or `window.hyperclay.uploadFileBasic` on an older client) and writes the served URL into the page's `img src`; the field shows a thumbnail with an × that clears it, and a progress bar while the bytes are in flight.
180
+
181
+ A host that does not store files is not a failure. Standalone, or on any host that has not announced the upload capability, the file is embedded in the page as a `data:` URL instead, which is the right answer when nobody is serving the file. A host that *would* store it but not for this account (`payment-required`) also embeds, and says so in the field. A file the host actively refused, for size or type, writes nothing at all: embedding that one is what puts a two-megabyte photo in every future save.
182
+
183
+ Upload errors render inline in the field and fire `hcms:error`; closing the editor mid-upload aborts the request.
180
184
 
181
185
  **Crop on upload:** add `data-hcms-crop` to the page element and the picked image routes through [quickcrop](https://github.com/panphora/quickcrop) (`window.hyperclay.quickcrop`, bundled in hyperclayjs's `smooth-sailing`/`everything` presets) before uploading. Values: `"1:1"`, `"16:9"` (any `W:H`), or `"free"` for an unconstrained crop. Cancelling the crop aborts the upload. Output is webp, longest edge capped at 2048px. Without quickcrop on the page the file uploads uncropped — the attribute never blocks.
182
186
 
@@ -384,4 +388,5 @@ Tests run against jsdom. Test helpers stub `window.hyperclay.Mutation` so the ha
384
388
 
385
389
  ## License
386
390
 
387
- 0BSD.
391
+ MIT-0 (MIT No Attribution): use it, remix it, ship it, no attribution needed.
392
+ The vendored src/vendor/mirk.vendor.js is our own mirk-interface library, also MIT-0.