@moneko/solid 1.8.0 → 1.9.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/base.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "target": "ESNext",
20
20
  "module": "ESNext",
21
21
  "declaration": true,
22
- "emitDeclarationOnly": true,
22
+ "noEmit": true,
23
23
  "removeComments": false,
24
24
  "preserveConstEnums": true,
25
25
  "sourceMap": false,
package/lib/entry.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/entry.tsx"],"sourcesContent":["import { createRoot, getOwner } from 'solid-js';\nimport { render, hydrate } from 'solid-js/web';\nimport info from '@app/info';\nimport { Router as BrowserRouter, HashRouter } from '@solidjs/router';\nimport routeDefinition from '@app/routes';\nimport type { RenderAppProps } from './index.js';\n\nconst isHashRouter = info.routerMode === 'hash';\nconst Router = isHashRouter ? HashRouter : BrowserRouter;\n\nconst root = info.ssr ? hydrate : render;\n\nexport function App(props: RenderAppProps) {\n return <Router base={props.basename}>{routeDefinition}</Router>;\n}\n\nfunction renderApp(props: RenderAppProps = {}) {\n const { container, basename = info.base, fallback, language, ...args } = props;\n const _container = (container?.querySelector('#root') ||\n document.getElementById('root')) as HTMLElement;\n\n if (info.type === 'micro' && window) {\n window.mainApp = {\n ...args,\n container: _container as HTMLElement,\n };\n }\n return createRoot(() => root(() => <App basename={basename} />, _container), getOwner());\n}\n\nexport default renderApp;\n"],"names":["createRoot","getOwner","render","hydrate","info","Router","BrowserRouter","HashRouter","routeDefinition","isHashRouter","routerMode","root","ssr","App","props","basename","container","base","fallback","language","args","_container","querySelector","document","getElementById","type","window","mainApp"],"rangeMappings":"","mappings":"8CAAA,QAASA,cAAAA,CAAU,CAAEC,YAAAA,CAAQ,KAAQ,UAAW,AAChD,QAASC,UAAAA,CAAM,CAAEC,WAAAA,CAAO,KAAQ,cAAe,AAC/C,QAAOC,MAAU,WAAY,AAC7B,QAASC,UAAUC,CAAa,CAAEC,cAAAA,CAAU,KAAQ,iBAAkB,AACtE,QAAOC,MAAqB,aAAc,CAI1C,IAAMH,EAASI,AADML,AAAoB,SAApBA,EAAKM,UAAU,CACNH,EAAaD,EAErCK,EAAOP,EAAKQ,GAAG,CAAGT,EAAUD,CAElC,QAAO,SAASW,IAAIC,CAAqB,EACvC,SAAQT,qBAAaS,EAAMC,QAAQ,WAAGP,GACxC,CAgBA,eAdA,SAAmBM,EAAwB,CAAC,CAAC,EAC3C,GAAM,CAAEE,UAAAA,CAAS,CAAED,SAAAA,EAAWX,EAAKa,IAAI,CAAEC,SAAAA,CAAQ,CAAEC,SAAAA,CAAQ,CAAE,GAAGC,EAAM,CAAGN,EACnEO,EAAcL,GAAWM,cAAc,UAC3CC,SAASC,cAAc,CAAC,QAQ1B,MANkB,UAAdpB,EAAKqB,IAAI,EAAgBC,QAC3BA,CAAAA,OAAOC,OAAO,CAAG,CACf,GAAGP,CAAI,CACPJ,UAAWK,CACb,CAAA,EAEKrB,EAAW,IAAMW,EAAK,MAAOE,cAAcE,IAAcM,GAAapB,IAC/E"}
1
+ {"version":3,"sources":["../src/entry.tsx"],"sourcesContent":["import { createRoot, getOwner } from 'solid-js';\nimport { render, hydrate } from 'solid-js/web';\nimport info from '@app/info';\nimport { Router as BrowserRouter, HashRouter } from '@solidjs/router';\nimport routeDefinition from '@app/routes';\nimport type { RenderAppProps } from './index.js';\n\nconst isHashRouter = info.routerMode === 'hash';\nconst Router = isHashRouter ? HashRouter : BrowserRouter;\n\nconst root = info.ssr ? hydrate : render;\n\nexport function App(props: RenderAppProps) {\n return <Router base={props.basename}>{routeDefinition}</Router>;\n}\n\nfunction renderApp(props: RenderAppProps = {}) {\n const { container, basename = info.base, fallback, language, ...args } = props;\n const _container = (container?.querySelector('#root') ||\n document.getElementById('root')) as HTMLElement;\n\n if (info.type === 'micro' && window) {\n window.mainApp = {\n ...args,\n container: _container as HTMLElement,\n };\n }\n return createRoot(() => root(() => <App basename={basename} />, _container), getOwner());\n}\n\nexport default renderApp;\n"],"names":["createRoot","getOwner","render","hydrate","info","Router","BrowserRouter","HashRouter","routeDefinition","isHashRouter","routerMode","root","ssr","App","props","basename","container","base","fallback","language","args","_container","querySelector","document","getElementById","type","window","mainApp"],"mappings":"8CAAA,QAASA,cAAAA,CAAU,CAAEC,YAAAA,CAAQ,KAAQ,UAAW,AAChD,QAASC,UAAAA,CAAM,CAAEC,WAAAA,CAAO,KAAQ,cAAe,AAC/C,QAAOC,MAAU,WAAY,AAC7B,QAASC,UAAUC,CAAa,CAAEC,cAAAA,CAAU,KAAQ,iBAAkB,AACtE,QAAOC,MAAqB,aAAc,CAI1C,IAAMH,EAASI,AADML,AAAoB,SAApBA,EAAKM,UAAU,CACNH,EAAaD,EAErCK,EAAOP,EAAKQ,GAAG,CAAGT,EAAUD,CAElC,QAAO,SAASW,IAAIC,CAAqB,EACvC,SAAQT,qBAAaS,EAAMC,QAAQ,WAAGP,GACxC,CAgBA,eAdA,SAAmBM,EAAwB,CAAC,CAAC,EAC3C,GAAM,CAAEE,UAAAA,CAAS,CAAED,SAAAA,EAAWX,EAAKa,IAAI,CAAEC,SAAAA,CAAQ,CAAEC,SAAAA,CAAQ,CAAE,GAAGC,EAAM,CAAGN,EACnEO,EAAcL,GAAWM,cAAc,UAC3CC,SAASC,cAAc,CAAC,QAQ1B,MANkB,UAAdpB,EAAKqB,IAAI,EAAgBC,QAC3BA,CAAAA,OAAOC,OAAO,CAAG,CACf,GAAGP,CAAI,CACPJ,UAAWK,CACb,CAAA,EAEKrB,EAAW,IAAMW,EAAK,MAAOE,cAAcE,IAAcM,GAAapB,IAC/E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/get-pathname.ts"],"sourcesContent":["import type { Location } from '@solidjs/router';\nimport app from '@app/info';\n\nconst len = app.base.length;\nconst prefix = len > 1 ? (app.base.endsWith('/') ? len : len + 1) : len;\n\nfunction getPathName(location: Location) {\n return location.pathname.substring(prefix);\n}\n\nexport default getPathName;\n"],"names":["app","len","base","length","prefix","endsWith","location","pathname","substring"],"rangeMappings":"","mappings":"AACA,OAAOA,MAAS,WAAY,CAE5B,IAAMC,EAAMD,EAAIE,IAAI,CAACC,MAAM,CACrBC,EAASH,EAAM,EAAKD,EAAIE,IAAI,CAACG,QAAQ,CAAC,KAAOJ,EAAMA,EAAM,EAAKA,CAMpE,gBAJA,SAAqBK,CAAkB,EACrC,OAAOA,EAASC,QAAQ,CAACC,SAAS,CAACJ,EACrC"}
1
+ {"version":3,"sources":["../src/get-pathname.ts"],"sourcesContent":["import type { Location } from '@solidjs/router';\nimport app from '@app/info';\n\nconst len = app.base.length;\nconst prefix = len > 1 ? (app.base.endsWith('/') ? len : len + 1) : len;\n\nfunction getPathName(location: Location) {\n return location.pathname.substring(prefix);\n}\n\nexport default getPathName;\n"],"names":["app","len","base","length","prefix","endsWith","location","pathname","substring"],"mappings":"AACA,OAAOA,MAAS,WAAY,CAE5B,IAAMC,EAAMD,EAAIE,IAAI,CAACC,MAAM,CACrBC,EAASH,EAAM,EAAKD,EAAIE,IAAI,CAACG,QAAQ,CAAC,KAAOJ,EAAMA,EAAM,EAAKA,CAMpE,gBAJA,SAAqBK,CAAkB,EACrC,OAAOA,EAASC,QAAQ,CAACC,SAAS,CAACJ,EACrC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSXElement } from 'solid-js';\n\nexport * from '@solidjs/router';\nexport { default as getPathName } from './get-pathname.js';\nexport { default as renderApp, App } from './entry.js';\n\nexport type RenderAppProps = {\n container?: HTMLElement;\n basename?: string;\n fallback?: JSXElement;\n language?: string;\n};\n"],"names":["default","getPathName","renderApp","App"],"rangeMappings":"","mappings":"AAEA,WAAc,iBAAkB,AAChC,QAASA,WAAWC,WAAW,KAAQ,mBAAoB,AAC3D,QAASD,WAAWE,SAAS,CAAEC,GAAG,KAAQ,YAAa"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { JSXElement } from 'solid-js';\n\nexport * from '@solidjs/router';\nexport { default as getPathName } from './get-pathname.js';\nexport { default as renderApp, App } from './entry.js';\n\nexport type RenderAppProps = {\n container?: HTMLElement;\n basename?: string;\n fallback?: JSXElement;\n language?: string;\n};\n"],"names":["default","getPathName","renderApp","App"],"mappings":"AAEA,WAAc,iBAAkB,AAChC,QAASA,WAAWC,WAAW,KAAQ,mBAAoB,AAC3D,QAASD,WAAWE,SAAS,CAAEC,GAAG,KAAQ,YAAa"}
package/lib/ssr.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ssr.tsx"],"sourcesContent":["import { HydrationScript, renderToStream } from 'solid-js/web';\nimport { App } from './entry.js';\n\nconst send = (_: Request, resp: Response & { write(): void }) => {\n renderToStream(() => {\n return (\n <html lang=\"en\">\n <head>\n <title>🔥 Solid SSR 🔥</title>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <HydrationScript />\n </head>\n <body>\n <div id=\"app\">\n <App />\n </div>\n </body>\n </html>\n );\n }).pipe(resp);\n};\n\nexport default send;\n"],"names":["renderToStream","App","_","resp","pipe"],"rangeMappings":"","mappings":"mTAAA,QAA0BA,kBAAAA,CAAc,KAAQ,cAAe,AAC/D,QAASC,OAAAA,CAAG,KAAQ,YAAa,AAsBjC,eApBa,CAAA,CAACC,EAAYC,KACxBH,EAAe,uDAWJC,cAKRG,IAAI,CAACD,EACV,CAAA,CAEoB"}
1
+ {"version":3,"sources":["../src/ssr.tsx"],"sourcesContent":["import { HydrationScript, renderToStream } from 'solid-js/web';\nimport { App } from './entry.js';\n\nconst send = (_: Request, resp: Response & { write(): void }) => {\n renderToStream(() => {\n return (\n <html lang=\"en\">\n <head>\n <title>🔥 Solid SSR 🔥</title>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <HydrationScript />\n </head>\n <body>\n <div id=\"app\">\n <App />\n </div>\n </body>\n </html>\n );\n }).pipe(resp);\n};\n\nexport default send;\n"],"names":["renderToStream","App","_","resp","pipe"],"mappings":"mTAAA,QAA0BA,kBAAAA,CAAc,KAAQ,cAAe,AAC/D,QAASC,OAAAA,CAAG,KAAQ,YAAa,AAsBjC,eApBa,CAAA,CAACC,EAAYC,KACxBH,EAAe,uDAWJC,cAKRG,IAAI,CAACD,EACV,CAAA,CAEoB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/solid",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "description": "Solid js",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -12,16 +12,16 @@
12
12
  "type": "module",
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@moneko/jsx-dom-expressions": "0.5.0",
15
+ "@moneko/jsx-dom-expressions": "0.6.0",
16
16
  "@solidjs/router": "0.10.8",
17
17
  "solid-refresh": "0.7.5"
18
18
  },
19
19
  "devDependencies": {
20
- "@moneko/transform-imports": "0.5.1",
21
- "@swc/cli": "0.3.12",
22
- "@swc/core": "1.5.7",
23
- "solid-js": "1.8.17",
24
- "typescript": "5.4.5"
20
+ "@moneko/transform-imports": "0.6.0",
21
+ "@swc/cli": "0.4.0",
22
+ "@swc/core": "1.6.13",
23
+ "solid-js": "1.8.18",
24
+ "typescript": "5.5.3"
25
25
  },
26
26
  "files": [
27
27
  "lib",
package/lib/entry.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import type { RenderAppProps } from './index.js';
2
- export declare function App(props: RenderAppProps): import("solid-js").JSX.Element;
3
- declare function renderApp(props?: RenderAppProps): () => void;
4
- export default renderApp;
@@ -1,3 +0,0 @@
1
- import type { Location } from '@solidjs/router';
2
- declare function getPathName(location: Location): string;
3
- export default getPathName;
package/lib/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { JSXElement } from 'solid-js';
2
- export * from '@solidjs/router';
3
- export { default as getPathName } from './get-pathname.js';
4
- export { default as renderApp, App } from './entry.js';
5
- export type RenderAppProps = {
6
- container?: HTMLElement;
7
- basename?: string;
8
- fallback?: JSXElement;
9
- language?: string;
10
- };
package/lib/ssr.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare const send: (_: Request, resp: Response & {
2
- write(): void;
3
- }) => void;
4
- export default send;