@luna_ui/luna 0.1.5 → 0.1.6

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # @mizchi/luna
1
+ # @luna_ui/luna
2
2
 
3
- A lightweight reactive UI library with SolidJS-compatible API. Implemented in MoonBit.
3
+ A lightweight reactive UI library with SolidJS-Like API. Implemented in MoonBit.
4
4
 
5
5
  ## Documentation
6
6
 
@@ -10,7 +10,7 @@ A lightweight reactive UI library with SolidJS-compatible API. Implemented in Mo
10
10
  ## Installation
11
11
 
12
12
  ```bash
13
- npm install @mizchi/luna
13
+ npm install @luna_ui/luna
14
14
  ```
15
15
 
16
16
  ## Setup
@@ -19,13 +19,13 @@ npm install @mizchi/luna
19
19
 
20
20
  **tsconfig.json:**
21
21
 
22
- Set `"jsxImportSource": "@mizchi/luna"`
22
+ Set `"jsxImportSource": "@luna_ui/luna"`
23
23
 
24
24
  ```json
25
25
  {
26
26
  "compilerOptions": {
27
27
  //...
28
- "jsxImportSource": "@mizchi/luna",
28
+ "jsxImportSource": "@luna_ui/luna",
29
29
  }
30
30
  }
31
31
  ```
@@ -41,7 +41,7 @@ export default defineConfig({});
41
41
  ## Basic Usage
42
42
 
43
43
  ```tsx
44
- import { createSignal, createMemo, render } from '@mizchi/luna';
44
+ import { createSignal, createMemo, render } from '@luna_ui/luna';
45
45
 
46
46
  function Counter() {
47
47
  const [count, setCount] = createSignal(0);
@@ -66,7 +66,7 @@ render(document.getElementById('app')!, <Counter />);
66
66
  ### Signal
67
67
 
68
68
  ```tsx
69
- import { createSignal, createMemo, createEffect } from '@mizchi/luna';
69
+ import { createSignal, createMemo, createEffect } from '@luna_ui/luna';
70
70
 
71
71
  // Signal: reactive value
72
72
  const [count, setCount] = createSignal(0);
@@ -86,7 +86,7 @@ createEffect(() => {
86
86
  ### Components
87
87
 
88
88
  ```tsx
89
- import { For, Show } from '@mizchi/luna';
89
+ import { For, Show } from '@luna_ui/luna';
90
90
 
91
91
  // For: list rendering
92
92
  <For each={items}>
@@ -1 +1 @@
1
- import{T as e,bt as t,xt as n}from"./src-C-OpUndy.js";function r(e){return typeof e==`string`?e:typeof e!=`object`||!e?``:Object.entries(e).map(([e,t])=>`${e.replace(/([A-Z])/g,`-$1`).toLowerCase()}: ${t}`).join(`; `)}function i(e){if(!e)return[];let t=[];for(let[n,i]of Object.entries(e)){if(n===`children`)continue;let e=n,a;if(n===`className`&&(e=`class`),n===`style`){a={$tag:0,_0:r(i)},t.push({_0:e,_1:a});continue}if(n.startsWith(`on`)&&typeof i==`function`){e=n.slice(2).toLowerCase(),a={$tag:2,_0:i},t.push({_0:e,_1:a});continue}a=typeof i==`function`?{$tag:1,_0:i}:{$tag:0,_0:String(i)},t.push({_0:e,_1:a})}return t}function a(e){if(!e)return[];let r;return r=Array.isArray(e)?e:[e],r.flat().map(e=>typeof e==`string`?t(e):typeof e==`number`?t(String(e)):typeof e==`function`&&e.length===0?n(()=>String(e())):e).filter(Boolean)}function o(t,n){let{children:r,...o}=n||{},s=i(o),c=a(r);if(typeof t==`string`)return e(t,s,c);if(typeof t==`function`)return t({...o,children:r});throw Error(`Invalid JSX type: ${t}`)}const s=o;function c({children:e}){return a(e)}const l=o;export{c as Fragment,o as jsx,l as jsxDEV,s as jsxs};
1
+ import{T as e,bt as t,xt as n}from"./src-C-OpUndy.js";function r(e){return typeof e==`string`?e:typeof e!=`object`||!e?``:Object.entries(e).map(([e,t])=>`${e.replace(/([A-Z])/g,`-$1`).toLowerCase()}: ${t}`).join(`; `)}function i(e){if(!e)return[];let t=[];for(let[n,i]of Object.entries(e)){if(n===`children`)continue;let e=n,a;if(n===`className`&&(e=`class`),n===`style`){a={$tag:0,_0:r(i)},t.push({_0:e,_1:a});continue}if(n===`ref`&&typeof i==`function`){e=`__ref`,a={$tag:2,_0:i},t.push({_0:e,_1:a});continue}if(n.startsWith(`on`)&&typeof i==`function`){e=n.slice(2).toLowerCase(),a={$tag:2,_0:i},t.push({_0:e,_1:a});continue}a=typeof i==`function`?{$tag:1,_0:i}:{$tag:0,_0:String(i)},t.push({_0:e,_1:a})}return t}function a(e){if(!e)return[];let r;return r=Array.isArray(e)?e:[e],r.flat().map(e=>typeof e==`string`?t(e):typeof e==`number`?t(String(e)):typeof e==`function`&&e.length===0?n(()=>String(e())):e).filter(Boolean)}function o(t,n){let{children:r,...o}=n||{},s=i(o),c=a(r);if(typeof t==`string`)return e(t,s,c);if(typeof t==`function`)return t({...o,children:r});throw Error(`Invalid JSX type: ${t}`)}const s=o;function c({children:e}){return a(e)}const l=o;export{c as Fragment,o as jsx,l as jsxDEV,s as jsxs};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna_ui/luna",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Fine-grained reactive UI library for Moonbit/JS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,12 +19,6 @@
19
19
  "import": "./dist/jsx-dev-runtime.js"
20
20
  }
21
21
  },
22
- "scripts": {
23
- "prepublishOnly": "pnpm build",
24
- "build": "tsdown",
25
- "test": "vitest run",
26
- "build:examples": "vite build examples"
27
- },
28
22
  "devDependencies": {
29
23
  "global-jsdom": "^27.0.0",
30
24
  "jsdom": "^27.3.0",
@@ -37,5 +31,10 @@
37
31
  },
38
32
  "files": [
39
33
  "dist"
40
- ]
41
- }
34
+ ],
35
+ "scripts": {
36
+ "build": "tsdown",
37
+ "test": "vitest run",
38
+ "build:examples": "vite build examples"
39
+ }
40
+ }