@my-games/sudoku-react 0.0.0-stage → 0.0.0
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/LICENSE +21 -0
- package/README.md +24 -2
- package/dist/GameSudoku.d.ts +5 -0
- package/dist/GameSudoku.d.ts.map +1 -0
- package/dist/index.css +18 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/package.json +76 -3
- package/src/GameSudoku.tsx +15 -0
- package/src/index.ts +4 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 xyj2156
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @my-games/sudoku-react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> 数独的 React 18/19 组件适配器。**当前为 `0.0.0` 占位版本**,`GameSudoku` 仅渲染占位文案。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pnpm add @my-games/sudoku-react react react-dom
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { GameSudoku } from '@my-games/sudoku-react';
|
|
11
|
+
import '@my-games/sudoku-react/style.css';
|
|
12
|
+
|
|
13
|
+
export function Demo() {
|
|
14
|
+
return <GameSudoku title="Sudoku" />;
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**样式需显式引入**:vite lib build 把内部 CSS import 抽到 `dist/index.css`。
|
|
19
|
+
真实棋盘组件、`forwardRef` 句柄与 `useGame()` hook 随引擎后续提交补入。
|
|
20
|
+
|
|
21
|
+
完整说明见仓库根 README:<https://github.com/my-gam/sudoku#readme>
|
|
22
|
+
|
|
23
|
+
## License
|
|
24
|
+
|
|
25
|
+
MIT.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GameSudoku.d.ts","sourceRoot":"","sources":["../src/GameSudoku.tsx"],"names":[],"mappings":"AAEA,OAAO,iCAAiC,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,UAAU,CAAC,EAAE,KAAgB,EAAE,EAAE,eAAe,+BAM/D"}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @my-games/sudoku-core —— 0.0.0 占位样式表(单数命名 ./style.css)。
|
|
3
|
+
*
|
|
4
|
+
* 空骨架阶段只放最小基类,保证三包各自构建能产出非空 dist/index.css
|
|
5
|
+
* (verify:dist 守卫要求 vue/react 的 index.css 存在且非 0 字节)。
|
|
6
|
+
* 真实棋盘样式(3×3 宫格布局、题面/用户/冲突配色、铅笔笔记迷你格)随引擎补入。
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.game-sudoku {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: 8px;
|
|
13
|
+
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
14
|
+
color: #1f2d3d;
|
|
15
|
+
user-select: none;
|
|
16
|
+
-webkit-tap-highlight-color: transparent;
|
|
17
|
+
}
|
|
18
|
+
/*$vite$:1*/
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAO,MAAM,cAAc,EAAG,cAAuB,CAAC;AACtD,eAAO,MAAM,YAAY,EAAG,OAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
// src/GameSudoku.tsx
|
|
3
|
+
function GameSudoku({ title = "Sudoku" }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: "game-sudoku",
|
|
6
|
+
children: /* @__PURE__ */ jsxs("p", { children: [title, " · React 占位组件(0.0.0)。真实棋盘随引擎后续提交补入。"] })
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
// src/index.ts
|
|
10
|
+
var SUDOKU_PACKAGE = "sudoku-react";
|
|
11
|
+
var SUDOKU_STAGE = "0.0.0";
|
|
12
|
+
export { GameSudoku, SUDOKU_PACKAGE, SUDOKU_STAGE };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/GameSudoku.tsx","../src/index.ts"],"sourcesContent":["// 0.0.0 空骨架占位组件:仅 import core 样式以让 vite lib build 抽出非空\n// dist/index.css(verify:dist 守卫要求)。真实棋盘/输入/提示 UI 随引擎补入。\nimport '@my-games/sudoku-core/style.css';\n\nexport interface GameSudokuProps {\n title?: string;\n}\n\nexport function GameSudoku({ title = 'Sudoku' }: GameSudokuProps) {\n return (\n <div className=\"game-sudoku\">\n <p>{title} · React 占位组件(0.0.0)。真实棋盘随引擎后续提交补入。</p>\n </div>\n );\n}\n","export { GameSudoku, type GameSudokuProps } from './GameSudoku';\n\nexport const SUDOKU_PACKAGE = 'sudoku-react' as const;\nexport const SUDOKU_STAGE = '0.0.0' as const;\n"],"mappings":";;AAQA,SAAgB,WAAW,EAAE,QAAQ,YAA6B;CAChE,OACE,oBAAC,OAAD;EAAK,WAAU;EACb,UAAA,qBAAC,KAAD,EAAA,UAAA,CAAI,OAAM,qCAAsC,EAAA,CAAA;CAC7C,CAAA;AAET;;ACZA,IAAa,iBAAiB;AAC9B,IAAa,eAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,79 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@my-games/sudoku-react",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "React 18/19 component adapter for @my-games/sudoku-core — function component + hooks + forwardRef, mobile-ready. 数独的 React 组件适配器。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./style.css": "./dist/index.css",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
25
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@my-games/sudoku-core": "0.0.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/react": "^19.3.0",
|
|
32
|
+
"@types/react-dom": "^19.3.0",
|
|
33
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
34
|
+
"react": "^19.3.1",
|
|
35
|
+
"react-dom": "^19.3.1",
|
|
36
|
+
"typescript": "^7.0.2",
|
|
37
|
+
"vite": "^8.3.5",
|
|
38
|
+
"vite-plugin-dts": "^5.1.2"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"sudoku",
|
|
45
|
+
"react",
|
|
46
|
+
"react18",
|
|
47
|
+
"react19",
|
|
48
|
+
"react-component",
|
|
49
|
+
"hooks",
|
|
50
|
+
"forwardref",
|
|
51
|
+
"game",
|
|
52
|
+
"puzzle",
|
|
53
|
+
"h5",
|
|
54
|
+
"mobile-web",
|
|
55
|
+
"solver",
|
|
56
|
+
"generator"
|
|
57
|
+
],
|
|
58
|
+
"license": "MIT",
|
|
59
|
+
"author": {
|
|
60
|
+
"name": "xyj2156"
|
|
61
|
+
},
|
|
62
|
+
"repository": {
|
|
63
|
+
"type": "git",
|
|
64
|
+
"url": "git+https://github.com/my-gam/sudoku.git",
|
|
65
|
+
"directory": "packages/react"
|
|
66
|
+
},
|
|
67
|
+
"homepage": "https://github.com/my-gam/sudoku/tree/main/packages/react#readme",
|
|
68
|
+
"bugs": {
|
|
69
|
+
"url": "https://github.com/my-gam/sudoku/issues"
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public"
|
|
73
|
+
},
|
|
74
|
+
"scripts": {
|
|
75
|
+
"build": "vite build --mode lib",
|
|
76
|
+
"dev": "vite build --mode lib --watch",
|
|
77
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
78
|
+
}
|
|
6
79
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// 0.0.0 空骨架占位组件:仅 import core 样式以让 vite lib build 抽出非空
|
|
2
|
+
// dist/index.css(verify:dist 守卫要求)。真实棋盘/输入/提示 UI 随引擎补入。
|
|
3
|
+
import '@my-games/sudoku-core/style.css';
|
|
4
|
+
|
|
5
|
+
export interface GameSudokuProps {
|
|
6
|
+
title?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function GameSudoku({ title = 'Sudoku' }: GameSudokuProps) {
|
|
10
|
+
return (
|
|
11
|
+
<div className="game-sudoku">
|
|
12
|
+
<p>{title} · React 占位组件(0.0.0)。真实棋盘随引擎后续提交补入。</p>
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
package/src/index.ts
ADDED