mono-jsx 0.3.1 → 0.3.2
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/jsx-runtime.mjs +5 -5
- package/package.json +1 -1
- package/types/render.d.ts +1 -1
package/jsx-runtime.mjs
CHANGED
|
@@ -644,10 +644,10 @@ function render(node, renderOptions = {}) {
|
|
|
644
644
|
write("<script>(()=>{" + js + "})()<\/script>");
|
|
645
645
|
}
|
|
646
646
|
if (htmx) {
|
|
647
|
-
write(`<script src="https://raw.esm.sh/htmx.org${htmx === true ? "" : "@" + htmx}/dist/htmx.min.js"><\/script>`);
|
|
648
|
-
for (const [
|
|
649
|
-
if (
|
|
650
|
-
write(`<script src="https://raw.esm.sh/${
|
|
647
|
+
write(`<script src="https://raw.esm.sh/htmx.org${htmx === true ? "" : escapeHTML("@" + htmx)}/dist/htmx.min.js"><\/script>`);
|
|
648
|
+
for (const [key, value] of Object.entries(renderOptions)) {
|
|
649
|
+
if (key.startsWith("htmx-ext-") && value) {
|
|
650
|
+
write(`<script src="https://raw.esm.sh/${key}${value === true ? "" : escapeHTML("@" + value)}"><\/script>`);
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
}
|
|
@@ -676,7 +676,7 @@ var jsx = (tag, props = /* @__PURE__ */ Object.create(null), key) => {
|
|
|
676
676
|
const renderOptions = /* @__PURE__ */ Object.create(null);
|
|
677
677
|
const optionsKeys = /* @__PURE__ */ new Set(["appState", "context", "request", "status", "headers", "rendering", "htmx"]);
|
|
678
678
|
for (const [key2, value] of Object.entries(props)) {
|
|
679
|
-
if (optionsKeys.has(key2) || key2.startsWith("
|
|
679
|
+
if (optionsKeys.has(key2) || key2.startsWith("htmx-ext-")) {
|
|
680
680
|
renderOptions[key2] = value;
|
|
681
681
|
delete props[key2];
|
|
682
682
|
}
|
package/package.json
CHANGED
package/types/render.d.ts
CHANGED