@czxingyu/xycomponents 0.1.2 → 0.1.4
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 +22 -29
- package/README.zh-CN.md +15 -12
- package/dist/cli.js +0 -0
- package/dist/index.esm.js +3 -3
- package/dist/index.lite.esm.js +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/package.js +1 -1
- package/dist/table/table.js +1 -1
- package/dist/table/table.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/xycomponents.css +1 -1
- package/package.json +36 -36
- package/skills/README.md +64 -0
- package/skills/xycomponents-cli/SKILL.md +101 -0
- package/skills/xycomponents-contribute/SKILL.md +109 -0
- package/skills/xycomponents-maintainer/SKILL.md +118 -0
- package/skills/xycomponents-shared/SKILL.md +100 -0
package/README.md
CHANGED
|
@@ -98,41 +98,34 @@ pnpm run docs:preview
|
|
|
98
98
|
pnpm run type-check
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
## CLI for AI-assisted usage
|
|
101
|
+
## CLI and Skills for AI-assisted usage
|
|
102
102
|
|
|
103
|
-
The
|
|
104
|
-
|
|
103
|
+
The `xycomponents` CLI ships inside `@czxingyu/xycomponents` and **always matches
|
|
104
|
+
the installed package version**. Install the library in your app and invoke the
|
|
105
|
+
CLI locally—do not install the CLI globally.
|
|
105
106
|
|
|
106
107
|
```bash
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
xycomponents components --
|
|
110
|
-
xycomponents component button --json
|
|
111
|
-
xycomponents snippet button --example primary
|
|
112
|
-
xycomponents migrate link --json
|
|
113
|
-
xycomponents
|
|
114
|
-
xycomponents package --json
|
|
108
|
+
pnpm add @czxingyu/xycomponents
|
|
109
|
+
pnpm exec xycomponents doctor --json
|
|
110
|
+
pnpm exec xycomponents components --json
|
|
111
|
+
pnpm exec xycomponents component button --json
|
|
112
|
+
pnpm exec xycomponents snippet button --example primary
|
|
113
|
+
pnpm exec xycomponents migrate link --json
|
|
114
|
+
pnpm exec xycomponents package --json
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
Re-run `pnpm add @czxingyu/xycomponents@<version>` when upgrading; the CLI
|
|
118
|
+
updates with the package.
|
|
119
|
+
|
|
120
|
+
Cursor Agent Skills live in [`skills/`](./skills/) (`xycomponents-shared`,
|
|
121
|
+
`xycomponents-cli`). Copy them into a consumer project's `.cursor/skills/` or
|
|
122
|
+
from `node_modules/@czxingyu/xycomponents/skills/` after install. See
|
|
123
|
+
[`skills/README.md`](./skills/README.md).
|
|
124
|
+
|
|
117
125
|
The CLI catalog covers every documented component with detailed props, events,
|
|
118
|
-
slots, examples, and AI hints.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
[`generated-components.ts`](./cli/metadata/generated-components.ts); replace
|
|
122
|
-
that placeholder contract while implementing the component, and move mature
|
|
123
|
-
metadata into the appropriate domain module when useful. All metadata modules
|
|
124
|
-
are composed by [`cli/metadata.ts`](./cli/metadata.ts), and the component audit
|
|
125
|
-
rejects catalog-only fallbacks. The same audit normalizes Vue bindings and
|
|
126
|
-
kebab-case names, then verifies every Props, Events, and Slots identifier is
|
|
127
|
-
present in its component documentation.
|
|
128
|
-
Schema v3 also publishes a lifecycle record for every active component and
|
|
129
|
-
keeps retired-component tombstones. Use `migrate <name> --json` before replacing
|
|
130
|
-
deprecated APIs or when an old component is no longer present in the runtime;
|
|
131
|
-
the result contains the reason, removal timeline, migration instructions, and
|
|
132
|
-
guide path.
|
|
133
|
-
The release gate also installs the packed tarball into an isolated consumer,
|
|
134
|
-
type-checks its TypeScript and Vue SFC public entries, and executes the
|
|
135
|
-
installed CLI binary before publishing.
|
|
126
|
+
slots, examples, and AI hints. Use `pnpm exec xycomponents migrate <name> --json`
|
|
127
|
+
before replacing deprecated APIs. The release gate installs the packed tarball
|
|
128
|
+
into an isolated consumer and executes the project-local CLI before publishing.
|
|
136
129
|
|
|
137
130
|
## Global component types
|
|
138
131
|
|
package/README.zh-CN.md
CHANGED
|
@@ -100,24 +100,27 @@ pnpm run docs:preview
|
|
|
100
100
|
pnpm run type-check
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
## 面向 AI 使用的 CLI
|
|
103
|
+
## 面向 AI 使用的 CLI 与 Skills
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
CLI 随 `@czxingyu/xycomponents` 发布,**版本与 npm 包一致**。业务项目在本地安装后通过 `pnpm exec` 调用;升级库时重新 `pnpm add` 即可同步 CLI。
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
xycomponents components --
|
|
111
|
-
xycomponents component button --json
|
|
112
|
-
xycomponents snippet button --example primary
|
|
113
|
-
xycomponents migrate link --json
|
|
114
|
-
xycomponents
|
|
115
|
-
xycomponents package --json
|
|
108
|
+
pnpm add @czxingyu/xycomponents
|
|
109
|
+
pnpm exec xycomponents doctor --json
|
|
110
|
+
pnpm exec xycomponents components --json
|
|
111
|
+
pnpm exec xycomponents component button --json
|
|
112
|
+
pnpm exec xycomponents snippet button --example primary
|
|
113
|
+
pnpm exec xycomponents migrate link --json
|
|
114
|
+
pnpm exec xycomponents package --json
|
|
116
115
|
```
|
|
117
116
|
|
|
118
|
-
CLI
|
|
117
|
+
**不要**全局安装 CLI,避免 AI 查到与项目 `package.json` 不一致的 API。
|
|
118
|
+
|
|
119
|
+
### Cursor Skills
|
|
120
|
+
|
|
121
|
+
[`skills/`](./skills/) 提供 `xycomponents-shared`(安装与接入)和 `xycomponents-cli`(命令与 JSON 工作流)。业务项目复制到 `.cursor/skills/` 或从 `node_modules/@czxingyu/xycomponents/skills/` 复制;详见 [`skills/README.md`](./skills/README.md)。本仓库维护者已在 [`.cursor/skills/`](./.cursor/skills/) 启用同名 Skill。
|
|
119
122
|
|
|
120
|
-
Schema v3
|
|
123
|
+
CLI 以详细级元数据覆盖全部已文档化组件。统一组件清单位于 [`component-groups.ts`](./docs/src/pages/components/component-groups.ts)。组件生成器会原子写入 [`generated-components.ts`](./cli/metadata/generated-components.ts) 的详细元数据基线;成熟后可移入 [`cli/metadata/`](./cli/metadata/)。Schema v3 提供生命周期记录与 retired tombstone;改 deprecated/retired API 前先 `pnpm exec xycomponents migrate <name> --json`。
|
|
121
124
|
|
|
122
125
|
## 全局组件类型
|
|
123
126
|
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/index.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ var qe = Object.create, Je = Object.defineProperty, Ye = Object.getOwnPropertyDe
|
|
|
12
12
|
}, tt = (e, t, n) => (n = e == null ? {} : qe(Ze(e)), et(t || !e || !e.__esModule ? Je(n, "default", {
|
|
13
13
|
value: e,
|
|
14
14
|
enumerable: !0
|
|
15
|
-
}) : n, e)), nt = "0.1.
|
|
15
|
+
}) : n, e)), nt = "0.1.4";
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region components/shared/install.ts
|
|
18
18
|
function X(e) {
|
|
@@ -25426,7 +25426,7 @@ var ip = ["aria-busy"], ap = { key: 0 }, op = { key: 0 }, sp = ["colspan"], cp =
|
|
|
25426
25426
|
record: e
|
|
25427
25427
|
}))), ve = s(() => Xf(ge.value, r.rowKey, M.value ? r.tree : void 0, de.value)), ye = s(() => Math.max(1, Math.ceil(me.value.total / me.value.pageSize))), be = s(() => new Set(ue.value)), xe = s(() => ve.value.filter((e) => !it(e.record)).map((e) => e.key)), Se = s(() => xe.value.length > 0 && xe.value.every((e) => be.value.has(e))), Ce = s(() => xe.value.some((e) => be.value.has(e))), we = s(() => !!r.pagination && (!r.pagination || !r.pagination.hideOnSinglePage || me.value.total > me.value.pageSize)), Te = s(() => (P.value ? Wp : 0) + S.value.reduce((e, t) => e + Re(t), 0)), Ee = s(() => ze(Kp) + _e.value.reduce((e, t) => e + ze(t.key), 0)), De = s(() => [P.value ? `${Wp}px` : "", ...S.value.map((e) => `${Re(e)}px`)].filter(Boolean).join(" ")), Oe = s(() => ({
|
|
25428
25428
|
maxHeight: r.autoHeight ? void 0 : Uf(r.scroll?.y),
|
|
25429
|
-
overflowX: r.scroll?.x ? "auto" : void 0,
|
|
25429
|
+
overflowX: j.value ? "hidden" : r.scroll?.x ? "auto" : void 0,
|
|
25430
25430
|
overflowY: r.autoHeight || !r.scroll?.y ? void 0 : "auto",
|
|
25431
25431
|
...Ne.value.container
|
|
25432
25432
|
})), ke = s(() => w.value ? {
|
|
@@ -26347,7 +26347,7 @@ var ip = ["aria-busy"], ap = { key: 0 }, op = { key: 0 }, sp = ["colspan"], cp =
|
|
|
26347
26347
|
"total"
|
|
26348
26348
|
])) : l("", !0)], 14, ip));
|
|
26349
26349
|
}
|
|
26350
|
-
}), [["__scopeId", "data-v-
|
|
26350
|
+
}), [["__scopeId", "data-v-e1a0865c"]])), Jp = ["aria-label", "aria-orientation"], Yp = [
|
|
26351
26351
|
"data-tab-key",
|
|
26352
26352
|
"id",
|
|
26353
26353
|
"aria-controls",
|
package/dist/index.lite.esm.js
CHANGED
|
@@ -9,7 +9,7 @@ import qe from "dayjs/plugin/quarterOfYear.js";
|
|
|
9
9
|
import Je from "dayjs/plugin/weekOfYear.js";
|
|
10
10
|
import Ye from "dayjs/plugin/weekYear.js";
|
|
11
11
|
//#region package.json
|
|
12
|
-
var Xe = "0.1.
|
|
12
|
+
var Xe = "0.1.4";
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region components/shared/install.ts
|
|
15
15
|
function Z(e) {
|