sinho 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/.github/workflows/ci.yml +7 -5
- package/.github/workflows/deploy-docs.yml +2 -2
- package/dist/bundle.d.ts +12 -9
- package/dist/bundle.js +2 -0
- package/dist/bundle.min.js +1 -1
- package/dist/component.d.ts +1 -1
- package/dist/intrinsic/For.d.ts +3 -3
- package/dist/jsx-runtime/mod.d.ts +2 -2
- package/dist/scope.d.ts +4 -2
- package/dist/scope.js +2 -0
- package/dist/scope.js.map +1 -1
- package/package.json +18 -6
- package/web/docusaurus.config.ts +0 -18
- package/web/package-lock.json +8165 -4481
- package/web/package.json +5 -7
- package/web/src/components/monacoEditor.tsx +1 -1
- package/web/src/components/playground.tsx +1 -1
- package/web/src/pages/index.tsx +1 -3
- package/web/static/dist/bundle.d.ts +36 -15
- package/web/static/dist/bundle.min.js +1 -1
- package/dist/intrinsic/Dynamic.d.ts +0 -33
- package/dist/intrinsic/Dynamic.js +0 -53
- package/dist/intrinsic/Dynamic.js.map +0 -1
- package/dist/intrinsic/ErrorBoundary.d.ts +0 -14
- package/dist/intrinsic/ErrorBoundary.js +0 -36
- package/dist/intrinsic/ErrorBoundary.js.map +0 -1
- package/web/dist/shingo.min.d.ts +0 -1131
- package/web/dist/shingo.min.js +0 -1
package/.github/workflows/ci.yml
CHANGED
|
@@ -5,20 +5,22 @@ name: CI
|
|
|
5
5
|
|
|
6
6
|
on:
|
|
7
7
|
push:
|
|
8
|
-
branches:
|
|
8
|
+
branches: main
|
|
9
9
|
pull_request:
|
|
10
|
-
branches:
|
|
10
|
+
branches: main
|
|
11
11
|
|
|
12
12
|
jobs:
|
|
13
13
|
build:
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
|
-
-
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v6
|
|
18
19
|
- name: Use Node.js
|
|
19
|
-
uses: actions/setup-node@
|
|
20
|
+
uses: actions/setup-node@v6
|
|
20
21
|
with:
|
|
21
|
-
|
|
22
|
+
node-version: 24
|
|
22
23
|
- run: npm ci
|
|
23
24
|
- run: npm run build
|
|
25
|
+
- run: npm run build-samples
|
|
24
26
|
- run: npm test
|
|
@@ -31,7 +31,7 @@ jobs:
|
|
|
31
31
|
runs-on: ubuntu-latest
|
|
32
32
|
steps:
|
|
33
33
|
- name: Checkout
|
|
34
|
-
uses: actions/checkout@
|
|
34
|
+
uses: actions/checkout@v6
|
|
35
35
|
- name: Install Dependencies
|
|
36
36
|
run: npm install && cd ./web && npm install
|
|
37
37
|
- name: Build
|
|
@@ -39,7 +39,7 @@ jobs:
|
|
|
39
39
|
- name: Setup Pages
|
|
40
40
|
uses: actions/configure-pages@v5
|
|
41
41
|
- name: Upload Artifact
|
|
42
|
-
uses: actions/upload-pages-artifact@
|
|
42
|
+
uses: actions/upload-pages-artifact@v4
|
|
43
43
|
with:
|
|
44
44
|
path: ./web/build
|
|
45
45
|
- name: Deploy to GitHub Pages
|
package/dist/bundle.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ interface SubscopeOptions {
|
|
|
46
46
|
details?: object;
|
|
47
47
|
}
|
|
48
48
|
interface Effect {
|
|
49
|
+
readonly _fn: Function;
|
|
49
50
|
_scope: Scope;
|
|
50
51
|
_pure: boolean;
|
|
51
52
|
_clean?: Cleanup;
|
|
@@ -57,6 +58,7 @@ interface Effect {
|
|
|
57
58
|
*/
|
|
58
59
|
type Cleanup = (() => void) | void | undefined | null;
|
|
59
60
|
interface Scope<out T = {}> {
|
|
61
|
+
_fn?: Function;
|
|
60
62
|
readonly _parent?: Scope;
|
|
61
63
|
_effects: Effect[];
|
|
62
64
|
_subscopes: Scope[];
|
|
@@ -131,11 +133,11 @@ declare const MaybeSignal: {
|
|
|
131
133
|
/**
|
|
132
134
|
* Gets the value of the given {@link MaybeSignal}.
|
|
133
135
|
*/
|
|
134
|
-
get: <
|
|
136
|
+
get: <T>(signal: MaybeSignal<T>) => T;
|
|
135
137
|
/**
|
|
136
138
|
* Accesses the value of the given {@link MaybeSignal} without tracking.
|
|
137
139
|
*/
|
|
138
|
-
peek<
|
|
140
|
+
peek<T>(signal: MaybeSignal<T>): T;
|
|
139
141
|
};
|
|
140
142
|
|
|
141
143
|
interface DomIntrinsicElements {
|
|
@@ -1000,7 +1002,7 @@ declare const Component: ((tagName: string) => ComponentConstructor<{}>) & (<con
|
|
|
1000
1002
|
* Determines whether the given value is a component created by
|
|
1001
1003
|
* extending {@link ComponentConstructor}.
|
|
1002
1004
|
*/
|
|
1003
|
-
declare const isComponent: (value: any) => value is ComponentConstructor
|
|
1005
|
+
declare const isComponent: (value: any) => value is ComponentConstructor | Component;
|
|
1004
1006
|
/**
|
|
1005
1007
|
* Represents a functional component.
|
|
1006
1008
|
*
|
|
@@ -1086,9 +1088,9 @@ declare const h: typeof createElement & {
|
|
|
1086
1088
|
* `For` is a component that can be used to render a list of items.
|
|
1087
1089
|
*/
|
|
1088
1090
|
declare const For: <T>(props: {
|
|
1089
|
-
each?: MaybeSignal<readonly T[]
|
|
1090
|
-
key?: (
|
|
1091
|
-
children?: (
|
|
1091
|
+
each?: MaybeSignal<readonly T[]>;
|
|
1092
|
+
key?: (item: T, index: number) => string | number;
|
|
1093
|
+
children?: (item: Signal<T>, index: Signal<number>, arr: SignalLike<readonly T[]>) => Template;
|
|
1092
1094
|
}) => Template;
|
|
1093
1095
|
|
|
1094
1096
|
/**
|
|
@@ -1125,9 +1127,9 @@ declare const Style: FunctionalComponent<{
|
|
|
1125
1127
|
declare const css: (strings: TemplateStringsArray, ...values: MaybeSignal<string | number>[]) => MaybeSignal<string>;
|
|
1126
1128
|
|
|
1127
1129
|
/** @ignore */
|
|
1128
|
-
declare const jsx: (type: any, props?:
|
|
1130
|
+
declare const jsx: (type: any, props?: object & {
|
|
1129
1131
|
key?: unknown;
|
|
1130
|
-
}
|
|
1132
|
+
}, key?: unknown) => Template;
|
|
1131
1133
|
/** @ignore */
|
|
1132
1134
|
declare namespace JSX {
|
|
1133
1135
|
type Element = Template;
|
|
@@ -1143,4 +1145,5 @@ declare namespace JSX {
|
|
|
1143
1145
|
}
|
|
1144
1146
|
}
|
|
1145
1147
|
|
|
1146
|
-
export {
|
|
1148
|
+
export { Component, Else, ElseIf, For, Fragment, If, JSX, MaybeSignal, Portal, Style, TemplateNodes, createContext, createElement, css, defineComponents, event, flushBatch, h, isComponent, jsx, jsx as jsxDEV, jsx as jsxs, prop, useBatch, useContext, useMountEffect as useEffect, useMemo, useRef, useSignal, useSubscope };
|
|
1149
|
+
export type { AttributeOptions, Children, Cleanup, ComponentConstructor, ComponentOptions, Context, DangerousHtml, EventConstructor, FunctionalComponent, Metadata, PropOptions, RefSignal, RefSignalSetter, SetSignalOptions, Signal, SignalLike, SignalSetter, Styles, SubscopeOptions, Template };
|
package/dist/bundle.js
CHANGED
|
@@ -8,6 +8,7 @@ const createScope = (parent) => {
|
|
|
8
8
|
const prevScope = currScope;
|
|
9
9
|
currScope = this;
|
|
10
10
|
try {
|
|
11
|
+
this._fn = fn;
|
|
11
12
|
return fn();
|
|
12
13
|
}
|
|
13
14
|
finally {
|
|
@@ -136,6 +137,7 @@ let pureEffectFlag = false;
|
|
|
136
137
|
const useEffect = (fn, deps) => {
|
|
137
138
|
const untracked = !!deps;
|
|
138
139
|
const effect = {
|
|
140
|
+
_fn: fn,
|
|
139
141
|
_scope: currScope,
|
|
140
142
|
_pure: pureEffectFlag,
|
|
141
143
|
_deps: new Set(),
|
package/dist/bundle.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=t=>({t:t,o:[],i:[],l:{...t?.l},u(t){const n=o;o=this;try{return t()}finally{o=n}},
|
|
1
|
+
const t=t=>({t:t,o:[],i:[],l:{...t?.l},u(t){const n=o;o=this;try{return this.h=t,t()}finally{o=n}},_(){for(let t=this.i.length-1;t>=0;t--)this.i[t]._();this.i=[];for(let t=this.o.length-1;t>=0;t--){const n=this.o[t];n.p?.(),n.u=()=>{},n.m.forEach(t=>t.o.delete(n)),n.m.clear()}this.o=[]}});let n,e,o=t(),s=!1;const r=()=>o,c=(t,o)=>{const r=()=>(!s&&n&&(n.m.add(r),r.o.add(n)),r.peek());r.o=new Set,r.peek=()=>t;const c=(n,s)=>{const l={...o,...s};if(l.equals??=(t,n)=>t===n,e){const o="function"==typeof n?n(r.peek()):n;!l?.force&&l.equals(o,r.peek())||(l?.force?t=o:e.v.push(()=>t=o),l?.silent||r.o.forEach(t=>{t.S?e.M.add(t):e.o.add(t)}))}else i(()=>c(n,l))};return[r,c]},i=t=>{if(e)return t();e={v:[],o:new Set,M:new Set};try{const n=t();return l(),n}finally{e=void 0}},l=()=>{for(;e&&e.v.length+e.o.size+e.M.size>0;){e.o.forEach(t=>t.p?.()),e.v.forEach(t=>t()),e.v=[];const t=e.M.values().next().value??e.o.values().next().value;t&&(t.u(),e.M.delete(t),e.o.delete(t))}};let u=!1;const f=(t,e)=>{const r=!!e,c={h:t,k:o,S:u,m:new Set,u(){const o=n,c=s;n=this;try{this.m.forEach(t=>t.o.delete(this)),this.m.clear(),e&&(s=!1,e.forEach(t=>t())),s=r,this.p?.();const n=this.k.u(()=>i(t));this.p=n?()=>{this.k.u(()=>i(n)),this.p=null}:null}finally{n=o,s=c}}};o.o.push(c),c.u(),c.m.size||c.p||o.o.pop()},a=(t,n)=>{const[e,o]=c(void 0,n);let s=!0;u=!0;try{f(()=>{o(t,s?{force:!0}:{}),s=!1})}finally{u=!1}return e},d=(n,s)=>{const r=e;e=void 0;const c=o,i=t(c);Object.assign(i.l,s?.details);try{c.i.push(i);return[i.u(n),()=>{const t=c.i.indexOf(i);t>=0&&c.i.splice(t,1),i._()}]}finally{e=r}},h=(t,n)=>{const[e,o]=c(t,n);return e.set=o,e},_={upgrade:t=>()=>_.get(t),get:t=>"function"==typeof t?t():t,peek(t){const n=s;s=!0;try{return this.get(t)}finally{s=n}}},p=(t={})=>({C:[],N(t){return this.j?.next().value??t()},...t}),y=()=>{const t=r();return t.l.A??=p()},m=(t,n)=>{const e=y(),o=p({...e,...t}),[s,r]=d(n,{details:{A:o}});return f(()=>r),s},w=t=>(t[0]??"").toLowerCase()+t.slice(1).replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),b=t=>t.startsWith("on:")?t.slice(3):w(t.slice(2)),v=Symbol(),g=(t,n)=>({[v]:Math.random().toString(36).slice(2),H:t,L:n}),x=t=>!!t?.[v],S=(t,n,e)=>{n.addEventListener(t[v],t=>{const n=_.get(e);void 0!==n&&(t.stopPropagation(),t.detail(n))})},M=t=>{const n=y();return a(()=>{let e=t.H;return n.T?.dispatchEvent(new CustomEvent(t[v],{detail:t=>e=t,bubbles:!0,composed:!0})),e})};var k;!function(t){t.forEach=(n,e)=>n.forEach(n=>Array.isArray(n)?t.forEach(n,e):e(n)),t.last=(n,e=n.length-1)=>{if(n.length)for(let o=e;o>=0;o--){const e=n[o];if(!Array.isArray(e))return e;const s=t.last(e);if(s)return s}}}(k||(k={}));const C=t=>({build(){const n=t();return n.build?.()??n}}),E=(t,n)=>({O:"p",D:t,...n}),N=(t=CustomEvent)=>({O:"e",I:t}),j=Symbol();let A;const H=(t,n)=>{A?A.push([t,n]):f(t,n)},L=(t,n={},e={})=>{const o=[],s=new Map;for(const t in n){const e=n[t];if("p"==e.O&&e.attribute){"function"==typeof e.attribute&&(e.attribute={transform:e.attribute});const n=e.attribute={name:w(t),static:!1,transform:t=>t,...e.attribute};s.set(n.name,{name:t,meta:e}),n.static||o.push(n.name)}}e.shadow??={mode:"open"};class i extends HTMLElement{static[j]={$:t};static observedAttributes=o;props={};events={};[j]={};constructor(){super();for(const t in n){const e=n[t];if("p"==e.O){const n=x(e.D)?e.D:null,[o,s]=c(n?void 0:e.D);this.props[t]=o,n&&S(n,this,o),Object.defineProperty(this,t,{get:o.peek,set:t=>s(()=>t,{force:!0})})}else if("e"==e.O&&t.startsWith("on")){const n=b(t);this.events[t]=t=>this.dispatchEvent(new e.I(n,t))}}}connectedCallback(){const t=(n=this,e.shadow?n.shadowRoot??n.attachShadow(e.shadow):n);var n;this[j].P=d(()=>m({V:!1,T:this,j:t.childNodes.values()},()=>{this[j].k=r();const n=A;A=[];try{k.forEach(this.render().build(),n=>{t.append(n)}),A.forEach(([t,n])=>f(t,n))}finally{A=n}}))[1]}disconnectedCallback(){this[j].P?.()}attributeChangedCallback(t,n,e){const o=s.get(t);o&&(this[o.name]=null!=e?o.meta.attribute.transform.call(this,e):x(o.meta.D)?void 0:o.meta.D)}}return i},T=t=>!!t?.[j],O=(...t)=>{const[n,e]="string"==typeof t[0]?[t[0],t.slice(1)]:["",t];for(const t of e)customElements.define(n+t[j].$,t)},D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,I=(t,n,e)=>{"-"==n[0]?t.style.setProperty(n,""+e):t.style[n]=null==e?"":"number"!=typeof e||D.test(n)?""+e:e+"px"},$=(t,n,e,o)=>{const s=null==e||!1===e&&!n.includes("-");if(n.startsWith("prop:"))t[n.slice(5)]=e;else if(n.startsWith("attr:"))n=n.slice(5),s?t.removeAttribute(n):t.setAttribute(n,e);else if(!["innerHTML","outerHTML"].includes(n)){if(!["tabIndex","role",...o?["width","height","href","list","form","download","rowSpan","colSpan"]:[]].includes(n)&&n in t)try{return void(t[n]=e)}catch(t){}"function"==typeof e||(s?t.removeAttribute(n):t.setAttribute(n,e))}},z=({text:t,marker:n})=>C(()=>{const e=y(),o=n&&e.N(()=>document.createComment("")),s=e.N(()=>document.createTextNode(""));return f(()=>{const n=""+(_.get(t)??"");s.textContent!=n&&(s.textContent=n)}),o?[o,s]:[s]}),P=({children:t})=>C(()=>Array.isArray(t)?t.flatMap(t=>P({children:t}).build()):null==t?[]:["object"==typeof t?t.build():z({text:t}).build()]),V=(t,n,e,o)=>{const{ref:s,style:c,children:l,dangerouslySetInnerHTML:u,...a}=e;for(const n in c??{}){const e=c[n];f(()=>{I(t,n,_.get(e))})}for(const n in a){const e=a[n];if(n.startsWith("on")){const o=r(),s=t=>{o.u(()=>i(()=>e(t)))},c=b(n);f(()=>(t.addEventListener(c,s),()=>t.removeEventListener(c,s)))}else f(()=>{$(t,n,_.get(e),o)})}return u&&f(()=>{const n=_.get(u).__html;t.innerHTML!=n&&(t.innerHTML=n)}),s&&f(()=>(s.set(t),()=>s.set(void 0))),null!=e.children&&k.forEach(m({V:n,j:t.childNodes.values()},()=>P({children:e.children}).build()),n=>t.append(n)),t},Z=(t,n={},e)=>(null!=e&&(n.children=e),T(t)?((t,n)=>C(()=>{const e=y().N(()=>new t);return customElements.upgrade(e),V(e,!1,n),[e]}))(t,n):"function"==typeof t?C(()=>t(n)):((t,n={})=>C(()=>{const e=y(),o="svg"==t||!!e.V;return[V(e.N(()=>o?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t)),o,n,!0)]}))(t,n)),q=new Proxy(Z,{get:(t,n)=>(e,o)=>t(n,e,o)}),B=(t,n)=>{const[e,o]=c({Z:[],q:new Map},{force:!0});let s=new Map;return f(()=>{const e=[],r=s,c=((t,n)=>{const e=new Map;for(let o=0;o<t.length;o++){const s=n(t[o],o);if(e.has(s))throw Error(`Duplicate key '${s}'`);e.set(s,o)}return e})(t(),n),i=(t=NaN)=>e.map(t=>"r"==t.B?n=>n<t.F?n:n==t.F?NaN:n-1:"a"==t.B?n=>n<t.F?n:n+1:"m"==t.B?n=>t.G<=n&&n<t.J?n+1:n==t.J?t.G:n:t=>t).reduce((t,n)=>n(t),t);for(const t of r.keys()){const n=i(r.get(t));c.has(t)||e.push({B:"r",K:t,F:n})}for(let o=0;o<t().length;o++){const s=n(t()[o],o),c=i(r.get(s));isNaN(c)?e.push({B:"a",K:s,F:o}):c!=o&&e.push({B:"m",K:s,J:c,G:o})}e.length>0&&o({Z:e,q:c}),s=c}),e},F=t=>C(()=>{const n=y(),e=_.upgrade(t.each??[]),o=n.N(()=>document.createComment("")),s=t.key??((t,n)=>n),r=[o,[]],i=new Map,l=B(e,s),u=t=>k.last(r[1],t-1)??o;return f(()=>{for(const n of l().Z)if("r"==n.B){const{R:t,P:e}=i.get(n.K)??{};e?.(),r[1].splice(n.F,1),k.forEach(t??[],t=>t.parentNode?.removeChild(t)),i.delete(n.K)}else if("a"==n.B){let o;const[,s]=d(()=>{const[s,i]=c(n.F),[a,d]=c(e()[n.F]);f(()=>{0<=s()&&s()<e().length&&d(()=>e()[s()])}),f(()=>{const t=l().q.get(n.K);null!=t&&i(t)}),o=t.children?.(a,s,e).build()??[],r[1].splice(n.F,0,o);let h=u(n.F);k.forEach(o,t=>{h.parentNode?.insertBefore(t,h.nextSibling),h=t})});i.set(n.K,{R:o,P:s})}else if("m"==n.B){const{R:t}=i.get(n.K)??{};r[1].splice(n.J,1),r[1].splice(n.G,0,t??[]);let e=u(n.G);k.forEach(t??[],t=>{e.parentNode?.insertBefore(t,e.nextSibling),e=t})}},[l]),r}),G=t=>(y().C=[],J({condition:t.condition,children:t.children})),J=t=>{const n=y(),e=n.C,o=_.upgrade(t.condition),s=a(()=>e.every(t=>!t())&&o());return n.C=[...e,o],C(()=>m({C:[]},()=>{const e=n.N(()=>document.createComment("")),o=[e,[]],r=a(()=>s()?P({children:t.children}):null);let c=[];return f(()=>{k.forEach(c,t=>t.parentNode?.removeChild(t)),o[1]=[];const[,t]=d(()=>{c=r()?.build()??[],o[1]=c;let t=e;k.forEach(c,n=>{t.parentNode?.insertBefore(n,t.nextSibling),t=n})});return t},[r]),o}))},K=({children:t})=>J({condition:!0,children:t}),Q=({mount:t,children:n})=>C(()=>m({j:void 0},()=>{const e=P({children:n}).build();return f(()=>(k.forEach(e,n=>t.appendChild(n)),()=>{k.forEach(e,t=>t.parentNode?.removeChild(t))}),[]),[]})),R=Symbol(),U=new Map,W=t=>{const n=t.children;if("function"==typeof n){const e=Z("style",{},z({text:n,marker:!1}));return t.light?Q({mount:document.head,children:e}):e}if(n){const o=y(),s=t.light?document:o.T?.shadowRoot??document,r=((t,n,e)=>{if(!U.has(n)){const t=new CSSStyleSheet;t.replaceSync(n),U.set(n,{U:t,W:0})}const o=U.get(n);o.W++,t.has(n)||t.set(n,{U:o.U,W:0});const s=t.get(n);return s.W++,f(()=>()=>{--s.W||(t.delete(n),e()),--o.W||U.delete(n)}),s.U})((e=s,e[R]??=new Map),n,()=>{s.adoptedStyleSheets=s.adoptedStyleSheets.filter(t=>t!=r)});s.adoptedStyleSheets.push(r)}var e;return P({})},X=(t,...n)=>{const e=()=>t.reduce((t,e,o)=>t+e+(_.get(n[o])??""),"");return n.some(t=>"function"==typeof t)?e:e()},Y=(t,n,e)=>(n&&null!=e&&(n.key=e),Z(t,n));export{L as Component,K as Else,J as ElseIf,F as For,P as Fragment,G as If,_ as MaybeSignal,Q as Portal,W as Style,k as TemplateNodes,g as createContext,Z as createElement,X as css,O as defineComponents,N as event,l as flushBatch,q as h,T as isComponent,Y as jsx,Y as jsxDEV,Y as jsxs,E as prop,i as useBatch,M as useContext,H as useEffect,a as useMemo,h as useRef,c as useSignal,d as useSubscope};
|
package/dist/component.d.ts
CHANGED
|
@@ -230,7 +230,7 @@ export declare const Component: ((tagName: string) => ComponentConstructor<{}>)
|
|
|
230
230
|
* Determines whether the given value is a component created by
|
|
231
231
|
* extending {@link ComponentConstructor}.
|
|
232
232
|
*/
|
|
233
|
-
export declare const isComponent: (value: any) => value is ComponentConstructor
|
|
233
|
+
export declare const isComponent: (value: any) => value is ComponentConstructor | Component;
|
|
234
234
|
/**
|
|
235
235
|
* Represents a functional component.
|
|
236
236
|
*
|
package/dist/intrinsic/For.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Template } from "../template.js";
|
|
|
4
4
|
* `For` is a component that can be used to render a list of items.
|
|
5
5
|
*/
|
|
6
6
|
export declare const For: <T>(props: {
|
|
7
|
-
each?: MaybeSignal<readonly T[]
|
|
8
|
-
key?: (
|
|
9
|
-
children?: (
|
|
7
|
+
each?: MaybeSignal<readonly T[]>;
|
|
8
|
+
key?: (item: T, index: number) => string | number;
|
|
9
|
+
children?: (item: Signal<T>, index: Signal<number>, arr: SignalLike<readonly T[]>) => Template;
|
|
10
10
|
}) => Template;
|
|
@@ -2,9 +2,9 @@ import type { Template } from "../template.js";
|
|
|
2
2
|
import type { DomEventProps, DomIntrinsicElements, DomProps } from "../dom.js";
|
|
3
3
|
import type { jsxPropsSym } from "../component.js";
|
|
4
4
|
/** @ignore */
|
|
5
|
-
export declare const jsx: (type: any, props?:
|
|
5
|
+
export declare const jsx: (type: any, props?: object & {
|
|
6
6
|
key?: unknown;
|
|
7
|
-
}
|
|
7
|
+
}, key?: unknown) => Template;
|
|
8
8
|
/** @ignore */
|
|
9
9
|
export declare namespace JSX {
|
|
10
10
|
type Element = Template;
|
package/dist/scope.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export interface SubscopeOptions {
|
|
|
46
46
|
details?: object;
|
|
47
47
|
}
|
|
48
48
|
interface Effect {
|
|
49
|
+
readonly _fn: Function;
|
|
49
50
|
_scope: Scope;
|
|
50
51
|
_pure: boolean;
|
|
51
52
|
_clean?: Cleanup;
|
|
@@ -57,6 +58,7 @@ interface Effect {
|
|
|
57
58
|
*/
|
|
58
59
|
export type Cleanup = (() => void) | void | undefined | null;
|
|
59
60
|
export interface Scope<out T = {}> {
|
|
61
|
+
_fn?: Function;
|
|
60
62
|
readonly _parent?: Scope;
|
|
61
63
|
_effects: Effect[];
|
|
62
64
|
_subscopes: Scope[];
|
|
@@ -137,10 +139,10 @@ export declare const MaybeSignal: {
|
|
|
137
139
|
/**
|
|
138
140
|
* Gets the value of the given {@link MaybeSignal}.
|
|
139
141
|
*/
|
|
140
|
-
get: <
|
|
142
|
+
get: <T>(signal: MaybeSignal<T>) => T;
|
|
141
143
|
/**
|
|
142
144
|
* Accesses the value of the given {@link MaybeSignal} without tracking.
|
|
143
145
|
*/
|
|
144
|
-
peek<
|
|
146
|
+
peek<T>(signal: MaybeSignal<T>): T;
|
|
145
147
|
};
|
|
146
148
|
export {};
|
package/dist/scope.js
CHANGED
|
@@ -8,6 +8,7 @@ const createScope = (parent) => {
|
|
|
8
8
|
const prevScope = currScope;
|
|
9
9
|
currScope = this;
|
|
10
10
|
try {
|
|
11
|
+
this._fn = fn;
|
|
11
12
|
return fn();
|
|
12
13
|
}
|
|
13
14
|
finally {
|
|
@@ -136,6 +137,7 @@ let pureEffectFlag = false;
|
|
|
136
137
|
export const useEffect = (fn, deps) => {
|
|
137
138
|
const untracked = !!deps;
|
|
138
139
|
const effect = {
|
|
140
|
+
_fn: fn,
|
|
139
141
|
_scope: currScope,
|
|
140
142
|
_pure: pureEffectFlag,
|
|
141
143
|
_deps: new Set(),
|
package/dist/scope.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAgFA,MAAM,WAAW,GAAG,CAAC,MAAc,EAAS,EAAE;IAC5C,OAAO;QACL,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAE;QAEjC,IAAI,CAAI,EAAW;YACjB,MAAM,SAAS,GAAG,SAAS,CAAC;YAC5B,SAAS,GAAG,IAAI,CAAC;YAEjB,IAAI,CAAC;gBACH,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;gBACd,OAAO,EAAE,EAAE,CAAC;YACd,CAAC;oBAAS,CAAC;gBACT,SAAS,GAAG,SAAS,CAAC;YACxB,CAAC;QACH,CAAC;QAED,QAAQ;YACN,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;gBACrD,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,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AAmC,CAAC,GAAG,GAAG,MAAM,CAAC;IAClD,OAAO,MAAiD,CAAC;AAC3D,CAAC,CAAQ,CAAC;AASV;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;;OAEG;IACH,OAAO,EACL,CAAI,MAAsB,EAAiB,EAAE,CAC7C,GAAG,EAAE,CACH,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC;IAE3B;;OAEG;IACH,GAAG,EAAE,CAAI,MAAsB,EAAK,EAAE,CACpC,OAAO,MAAM,IAAI,UAAU,CAAC,CAAC,CAAE,MAAwB,EAAE,CAAC,CAAC,CAAC,MAAM;IAEpE;;OAEG;IACH,IAAI,CAAI,MAAsB;QAC5B,MAAM,aAAa,GAAG,aAAa,CAAC;QACpC,aAAa,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;gBAAS,CAAC;YACT,aAAa,GAAG,aAAa,CAAC;QAChC,CAAC;IACH,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sinho",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "A lightweight signal-based library for building web components with a React-like API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
"default": "./dist/jsx-runtime/mod.js"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
+
"./jsx-dev-runtime": {
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./dist/jsx-runtime/mod.d.ts",
|
|
38
|
+
"default": "./dist/jsx-runtime/mod.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
35
41
|
"./min": {
|
|
36
42
|
"import": {
|
|
37
43
|
"types": "./dist/mod.d.ts",
|
|
@@ -43,6 +49,12 @@
|
|
|
43
49
|
"types": "./dist/mod.d.ts",
|
|
44
50
|
"default": "./dist/bundle.min.js"
|
|
45
51
|
}
|
|
52
|
+
},
|
|
53
|
+
"./min/jsx-dev-runtime": {
|
|
54
|
+
"import": {
|
|
55
|
+
"types": "./dist/mod.d.ts",
|
|
56
|
+
"default": "./dist/bundle.min.js"
|
|
57
|
+
}
|
|
46
58
|
}
|
|
47
59
|
},
|
|
48
60
|
"scripts": {
|
|
@@ -51,21 +63,21 @@
|
|
|
51
63
|
"build": "tsc && npm run bundle && npm run minify",
|
|
52
64
|
"bundle": "rollup ./dist/mod.js --file ./dist/bundle.js --format es --plugin @rollup/plugin-node-resolve && rollup ./dist/mod.d.ts --file ./dist/bundle.d.ts --format es --plugin rollup-plugin-dts",
|
|
53
65
|
"minify": "terser ./dist/bundle.js --output ./dist/bundle.min.js --config-file ./terser.config.json",
|
|
54
|
-
"test": "node --
|
|
66
|
+
"test": "node --experimental-test-coverage --test \"./dist/**/*.test.js\"",
|
|
55
67
|
"build-test": "npm run build && npm test",
|
|
56
68
|
"check-size": "node ./ci/check-size.js",
|
|
57
69
|
"build-samples": "tsc --project ./samples/tsconfig.json && rollup ./samples/dist/counter/mod.js --file ./samples/dist/counter/bundle.js --format es --plugin @rollup/plugin-node-resolve && rollup ./samples/dist/theme/mod.js --file ./samples/dist/theme/bundle.js --format es --plugin @rollup/plugin-node-resolve && rollup ./samples/dist/todo/mod.js --file ./samples/dist/todo/bundle.js --format es --plugin @rollup/plugin-node-resolve"
|
|
58
70
|
},
|
|
59
71
|
"devDependencies": {
|
|
60
|
-
"@happy-dom/global-registrator": "^
|
|
61
|
-
"@rollup/plugin-node-resolve": "^
|
|
62
|
-
"@types/node": "^
|
|
72
|
+
"@happy-dom/global-registrator": "^20.8.7",
|
|
73
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
74
|
+
"@types/node": "^24.12.0",
|
|
63
75
|
"copyfiles": "^2.4.1",
|
|
64
76
|
"prettier": "^3.2.5",
|
|
65
77
|
"rollup": "^4.13.0",
|
|
66
78
|
"rollup-plugin-dts": "^6.1.0",
|
|
67
79
|
"serve": "^14.2.1",
|
|
68
80
|
"terser": "^5.29.2",
|
|
69
|
-
"typescript": "^
|
|
81
|
+
"typescript": "^6.0.2"
|
|
70
82
|
}
|
|
71
83
|
}
|
package/web/docusaurus.config.ts
CHANGED
|
@@ -88,11 +88,6 @@ const config: Config = {
|
|
|
88
88
|
position: "left",
|
|
89
89
|
label: "Documentation",
|
|
90
90
|
},
|
|
91
|
-
{
|
|
92
|
-
to: "api",
|
|
93
|
-
label: "API",
|
|
94
|
-
position: "left",
|
|
95
|
-
},
|
|
96
91
|
{
|
|
97
92
|
to: "playground",
|
|
98
93
|
label: "Playground",
|
|
@@ -122,19 +117,6 @@ const config: Config = {
|
|
|
122
117
|
} satisfies Preset.ThemeConfig,
|
|
123
118
|
|
|
124
119
|
plugins: [
|
|
125
|
-
[
|
|
126
|
-
"docusaurus-plugin-typedoc-api",
|
|
127
|
-
{
|
|
128
|
-
projectRoot: path.join(__dirname, ".."),
|
|
129
|
-
packages: [
|
|
130
|
-
{
|
|
131
|
-
path: "./",
|
|
132
|
-
entry: "./src/mod.ts",
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
minimal: true,
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
120
|
() => ({
|
|
139
121
|
name: "monaco",
|
|
140
122
|
configureWebpack: () => ({
|