when problem
This commit is contained in:
2
dist/sigpro.js
vendored
2
dist/sigpro.js
vendored
File diff suppressed because one or more lines are too long
@@ -25,19 +25,12 @@ bun add sigpro
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<script type="module">
|
<script type="module">
|
||||||
// Import the core
|
|
||||||
import {
|
|
||||||
$,
|
|
||||||
h,
|
|
||||||
mount,
|
|
||||||
} from "https://cdn.jsdelivr.net/npm/sigpro@latest/dist/sigpro.esm.min.js";
|
|
||||||
|
|
||||||
// For full import and assign to window
|
import { $, h, mount } from "https://cdn.jsdelivr.net/npm/sigpro@latest/dist/sigpro.esm.min.js";
|
||||||
// import * as SigPro from "./sigpro.js";
|
|
||||||
// Object.assign(window, SigPro);
|
|
||||||
|
|
||||||
const count = $(0);
|
const count = $(0);
|
||||||
mount(() => h("h1", {}, () => `Count: ${count()}`), "#app");
|
mount(() => h("h1", {}, () => `Count: ${count()}`), "#app");
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -51,7 +44,7 @@ bun add sigpro
|
|||||||
SigPro uses **lowercase** Tag Helpers (e.g., `div`, `button`) to keep the syntax close to raw HTML, while still being pure JavaScript functions.
|
SigPro uses **lowercase** Tag Helpers (e.g., `div`, `button`) to keep the syntax close to raw HTML, while still being pure JavaScript functions.
|
||||||
|
|
||||||
<div class="tabs tabs-box w-full mt-8 mb-12 bg-base-200/50 p-2 rounded-xl border border-base-300">
|
<div class="tabs tabs-box w-full mt-8 mb-12 bg-base-200/50 p-2 rounded-xl border border-base-300">
|
||||||
<input type="radio" name="quick_start_tabs" class="tab !rounded-lg" aria-label="Bundlers (ESM)" checked />
|
<input type="radio" name="quick_start_tabs" class="tab !rounded-lg" aria-label="ESM" checked />
|
||||||
<div class="tab-content bg-base-100 border-base-300 rounded-lg p-6 mt-2">
|
<div class="tab-content bg-base-100 border-base-300 rounded-lg p-6 mt-2">
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@@ -74,7 +67,7 @@ mount(App, "#app");
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="radio" name="quick_start_tabs" class="tab !rounded-lg" aria-label="Classic (Direct CDN)" />
|
<input type="radio" name="quick_start_tabs" class="tab !rounded-lg" aria-label="CDN" />
|
||||||
<div class="tab-content bg-base-100 border-base-300 rounded-lg p-6 mt-2">
|
<div class="tab-content bg-base-100 border-base-300 rounded-lg p-6 mt-2">
|
||||||
|
|
||||||
```html
|
```html
|
||||||
@@ -83,7 +76,6 @@ mount(App, "#app");
|
|||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
||||||
<!-- CDN full bundle – everything ready to use -->
|
|
||||||
<script type="module">
|
<script type="module">
|
||||||
// Import the core
|
// Import the core
|
||||||
import { $, h, mount } from "https://cdn.jsdelivr.net/npm/sigpro@latest/dist/sigpro.esm.min.js";
|
import { $, h, mount } from "https://cdn.jsdelivr.net/npm/sigpro@latest/dist/sigpro.esm.min.js";
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -204,7 +204,7 @@ export const render = rFn => {
|
|||||||
return { _rt: 1, _cnt: cnt, destroy: () => { clr(c); clnNd(cnt); cnt.remove(); } };
|
return { _rt: 1, _cnt: cnt, destroy: () => { clr(c); clnNd(cnt); cnt.remove(); } };
|
||||||
};
|
};
|
||||||
|
|
||||||
const when = (c, Y, N = null) => {
|
export const when = (c, Y, N = null) => {
|
||||||
let anc = txt(""), rt = h("div", { style: "display:contents" }, [anc]), v;
|
let anc = txt(""), rt = h("div", { style: "display:contents" }, [anc]), v;
|
||||||
watch(() => !!val(c), s => {
|
watch(() => !!val(c), s => {
|
||||||
if (v) { v.destroy(); v = null; }
|
if (v) { v.destroy(); v = null; }
|
||||||
|
|||||||
Reference in New Issue
Block a user