@mooncellwiki/prts-design-vue 0.1.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.
Files changed (138) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist/components/Accordion/AkCollapse.vue.d.ts +31 -0
  4. package/dist/components/Accordion/AkCollapseItem.vue.d.ts +27 -0
  5. package/dist/components/Accordion/context.d.ts +7 -0
  6. package/dist/components/Archive/AkArchive.vue.d.ts +35 -0
  7. package/dist/components/Archive/AkArchivePlay.vue.d.ts +18 -0
  8. package/dist/components/Attrs/AkAttr.vue.d.ts +26 -0
  9. package/dist/components/Attrs/AkAttrs.vue.d.ts +18 -0
  10. package/dist/components/Avatar/AkAvatar.vue.d.ts +30 -0
  11. package/dist/components/Avatar/AkAvatarGroup.vue.d.ts +35 -0
  12. package/dist/components/Avatar/context.d.ts +6 -0
  13. package/dist/components/Badge/AkBadge.vue.d.ts +35 -0
  14. package/dist/components/Breadcrumb/AkBreadcrumb.vue.d.ts +25 -0
  15. package/dist/components/Breadcrumb/AkBreadcrumbItem.vue.d.ts +20 -0
  16. package/dist/components/Button/AkButton.vue.d.ts +47 -0
  17. package/dist/components/Button/AkButtonGroup.vue.d.ts +21 -0
  18. package/dist/components/Button/context.d.ts +7 -0
  19. package/dist/components/Camp/AkCamp.vue.d.ts +18 -0
  20. package/dist/components/Card/AkCard.vue.d.ts +54 -0
  21. package/dist/components/Card/AkCardGrid.vue.d.ts +13 -0
  22. package/dist/components/Cbox/AkCbox.vue.d.ts +33 -0
  23. package/dist/components/Checkbox/AkCheckbox.vue.d.ts +39 -0
  24. package/dist/components/Checkbox/AkCheckboxGroup.vue.d.ts +43 -0
  25. package/dist/components/Checkbox/context.d.ts +15 -0
  26. package/dist/components/Chip/AkChip.vue.d.ts +35 -0
  27. package/dist/components/Dialog/AkDialog.vue.d.ts +57 -0
  28. package/dist/components/Dialogue/AkDialogue.vue.d.ts +14 -0
  29. package/dist/components/Dialogue/AkDialogueLine.vue.d.ts +20 -0
  30. package/dist/components/Divider/AkDivider.vue.d.ts +21 -0
  31. package/dist/components/Dossier/AkDossier.vue.d.ts +28 -0
  32. package/dist/components/Dossier/AkRedacted.vue.d.ts +21 -0
  33. package/dist/components/Dropdown/AkDropdown.vue.d.ts +47 -0
  34. package/dist/components/Dropdown/MenuItem.vue.d.ts +14 -0
  35. package/dist/components/Dropdown/types.d.ts +27 -0
  36. package/dist/components/Elite/AkElite.vue.d.ts +33 -0
  37. package/dist/components/Empty/AkEmpty.vue.d.ts +37 -0
  38. package/dist/components/Enemy/AkEnemy.vue.d.ts +34 -0
  39. package/dist/components/Event/AkCountdown.vue.d.ts +25 -0
  40. package/dist/components/Event/AkEvent.vue.d.ts +34 -0
  41. package/dist/components/Fab/AkBackTop.vue.d.ts +36 -0
  42. package/dist/components/Field/AkField.vue.d.ts +35 -0
  43. package/dist/components/Field/context.d.ts +48 -0
  44. package/dist/components/Heading/AkHeading.vue.d.ts +35 -0
  45. package/dist/components/Hero/AkHero.vue.d.ts +41 -0
  46. package/dist/components/Icon/AkIcon.vue.d.ts +15 -0
  47. package/dist/components/Input/AkInput.vue.d.ts +54 -0
  48. package/dist/components/Input/AkInputGroup.vue.d.ts +19 -0
  49. package/dist/components/Input/context.d.ts +6 -0
  50. package/dist/components/InputNumber/AkInputNumber.vue.d.ts +37 -0
  51. package/dist/components/Item/AkItem.vue.d.ts +47 -0
  52. package/dist/components/Item/AkItemList.vue.d.ts +19 -0
  53. package/dist/components/Item/context.d.ts +6 -0
  54. package/dist/components/Kbd/AkKbd.vue.d.ts +14 -0
  55. package/dist/components/Kv/AkKv.vue.d.ts +23 -0
  56. package/dist/components/Kv/AkKvItem.vue.d.ts +20 -0
  57. package/dist/components/Kv/context.d.ts +5 -0
  58. package/dist/components/Level/AkLevel.vue.d.ts +11 -0
  59. package/dist/components/Materials/AkMaterials.vue.d.ts +17 -0
  60. package/dist/components/Materials/AkMaterialsDivider.vue.d.ts +14 -0
  61. package/dist/components/Materials/AkMaterialsRow.vue.d.ts +19 -0
  62. package/dist/components/Message/AkMessage.vue.d.ts +52 -0
  63. package/dist/components/Module/AkModule.vue.d.ts +62 -0
  64. package/dist/components/Module/AkModuleStage.vue.d.ts +22 -0
  65. package/dist/components/Module/AkModuleUnlock.vue.d.ts +20 -0
  66. package/dist/components/News/AkNews.vue.d.ts +25 -0
  67. package/dist/components/OpCard/AkOpCard.vue.d.ts +52 -0
  68. package/dist/components/OpCard/AkOpGrid.vue.d.ts +13 -0
  69. package/dist/components/OpRow/AkOpRow.vue.d.ts +33 -0
  70. package/dist/components/Pagination/AkPagination.vue.d.ts +51 -0
  71. package/dist/components/Panel/AkPanel.vue.d.ts +43 -0
  72. package/dist/components/PhaseTabs/AkPhaseTabs.vue.d.ts +28 -0
  73. package/dist/components/PotList/AkPot.vue.d.ts +27 -0
  74. package/dist/components/PotList/AkPotList.vue.d.ts +18 -0
  75. package/dist/components/PotList/context.d.ts +5 -0
  76. package/dist/components/Potential/AkPotential.vue.d.ts +16 -0
  77. package/dist/components/Potential/AkSpecialization.vue.d.ts +16 -0
  78. package/dist/components/Profession/AkProfession.vue.d.ts +22 -0
  79. package/dist/components/Profession/AkProfessionLabel.vue.d.ts +28 -0
  80. package/dist/components/Progress/AkProgress.vue.d.ts +40 -0
  81. package/dist/components/Radio/AkRadio.vue.d.ts +39 -0
  82. package/dist/components/Radio/AkRadioButton.vue.d.ts +33 -0
  83. package/dist/components/Radio/AkRadioGroup.vue.d.ts +40 -0
  84. package/dist/components/Radio/context.d.ts +12 -0
  85. package/dist/components/Range/AkRange.vue.d.ts +19 -0
  86. package/dist/components/Rarity/AkRarity.vue.d.ts +24 -0
  87. package/dist/components/RichText/AkRichText.vue.d.ts +40 -0
  88. package/dist/components/RichText/parse.d.ts +33 -0
  89. package/dist/components/Scope/AkScope.vue.d.ts +27 -0
  90. package/dist/components/Search/AkSearch.vue.d.ts +31 -0
  91. package/dist/components/Select/AkSelect.vue.d.ts +46 -0
  92. package/dist/components/Skeleton/AkSkeleton.vue.d.ts +21 -0
  93. package/dist/components/Skill/AkSkill.vue.d.ts +65 -0
  94. package/dist/components/Skill/LevelLabel.vue.d.ts +15 -0
  95. package/dist/components/SkillLevels/AkSkillLevels.vue.d.ts +26 -0
  96. package/dist/components/SkillMatrix/AkSkillMatrix.vue.d.ts +58 -0
  97. package/dist/components/SkillSheet/AkSkillSheet.vue.d.ts +50 -0
  98. package/dist/components/Slider/AkSlider.vue.d.ts +36 -0
  99. package/dist/components/Sp/AkSp.vue.d.ts +23 -0
  100. package/dist/components/Sp/AkSpTrigger.vue.d.ts +21 -0
  101. package/dist/components/Sp/AkSpValue.vue.d.ts +25 -0
  102. package/dist/components/Sp/sp.d.ts +19 -0
  103. package/dist/components/Spinner/AkSpinner.vue.d.ts +33 -0
  104. package/dist/components/Stage/AkSanity.vue.d.ts +10 -0
  105. package/dist/components/Stage/AkStage.vue.d.ts +36 -0
  106. package/dist/components/Stage/AkStageCode.vue.d.ts +22 -0
  107. package/dist/components/Stat/AkStat.vue.d.ts +36 -0
  108. package/dist/components/Stat/AkStatRow.vue.d.ts +14 -0
  109. package/dist/components/Stepper/AkStep.vue.d.ts +24 -0
  110. package/dist/components/Stepper/AkSteps.vue.d.ts +25 -0
  111. package/dist/components/Switch/AkSwitch.vue.d.ts +37 -0
  112. package/dist/components/Table/AkDataTable.vue.d.ts +48 -0
  113. package/dist/components/Table/types.d.ts +21 -0
  114. package/dist/components/Tabs/AkTab.vue.d.ts +25 -0
  115. package/dist/components/Tabs/AkTabPane.vue.d.ts +29 -0
  116. package/dist/components/Tabs/AkTabs.vue.d.ts +36 -0
  117. package/dist/components/Tag/AkTag.vue.d.ts +35 -0
  118. package/dist/components/Talent/AkTalent.vue.d.ts +28 -0
  119. package/dist/components/TalentTable/AkCalc.vue.d.ts +8 -0
  120. package/dist/components/TalentTable/AkTalentTable.vue.d.ts +66 -0
  121. package/dist/components/Timeline/AkTimeline.vue.d.ts +17 -0
  122. package/dist/components/Timeline/AkTimelineItem.vue.d.ts +32 -0
  123. package/dist/components/Toast/AkToastProvider.vue.d.ts +35 -0
  124. package/dist/components/Toast/useToast.d.ts +39 -0
  125. package/dist/components/Tooltip/AkPopover.vue.d.ts +52 -0
  126. package/dist/components/Tooltip/AkTooltip.vue.d.ts +48 -0
  127. package/dist/components/Tooltip/trigger.d.ts +13 -0
  128. package/dist/components/Tooltip/usePopover.d.ts +25 -0
  129. package/dist/components/Trust/AkTrust.vue.d.ts +11 -0
  130. package/dist/components/Voice/AkVoice.vue.d.ts +23 -0
  131. package/dist/components/Voice/AkVoiceList.vue.d.ts +36 -0
  132. package/dist/components/Voice/context.d.ts +19 -0
  133. package/dist/components/Voice/player.d.ts +8 -0
  134. package/dist/icons.d.ts +50 -0
  135. package/dist/index.d.ts +135 -0
  136. package/dist/index.js +6455 -0
  137. package/dist/index.js.map +1 -0
  138. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present MooncellWiki
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 ADDED
@@ -0,0 +1,21 @@
1
+ # @mooncellwiki/prts-design-vue
2
+
3
+ PRTS Design(明日方舟网页设计系统)的 Vue 3 实现,≈ primer/react。组件输出与 CSS 实现相同的 `.ak-*` 结构,自带状态(`v-model`)、键盘操作与可访问性属性;**不带样式**,样式按宿主来:
4
+
5
+ | 宿主 | 样式 |
6
+ |---|---|
7
+ | prts.wiki · Arknights 皮肤(Skin:Arknights) | 皮肤已加载全套,直接用 |
8
+ | prts.wiki · 其它皮肤(Vector 2022 …) | 挂载前 `await mw.loader.using(["skins.arknights.components"])`(Arknights 皮肤上是空操作) |
9
+ | 站外 | `import "@mooncellwiki/prts-design-css"`(可选 peer 依赖;不含字体与游戏素材) |
10
+
11
+ widget 的根节点包一层 `<AkScope>`(= `class="ak-scope"`):排版基线挂在这里、不靠宿主的 body,三种宿主上看起来一样;`<AkScope theme="dark|light">` 让这一块局部固定走终端 / 档案配色。
12
+
13
+ ```ts
14
+ import { AkButton, AkScope, AkTabPane, AkTabs } from "@mooncellwiki/prts-design-vue";
15
+ ```
16
+
17
+ API 参考 Naive UI(主状态统一用默认 `v-model`,外观用 `variant`,`label` 只作可访问名)。游戏素材(道具图、头像)的地址由调用方传入。
18
+
19
+ 许可:MIT。
20
+
21
+ 文档:https://mooncellwiki.github.io/prts-design/guide/vue · Storybook:https://mooncellwiki.github.io/prts-design/storybook/
@@ -0,0 +1,31 @@
1
+ import { type CollapseName } from "./context";
2
+ /**
3
+ * 折叠面板组(= Naive 的 NCollapse;CSS 叫 Accordion / .ak-details):放若干 AkCollapseItem,每项是一个原生 <details>。
4
+ * 本身不输出类名,只是个容器;开合状态收在 v-model 里,accordion 时同一时间只开一项。
5
+ */
6
+ type __VLS_Props = {
7
+ /** 手风琴:同一时间只展开一项(展开一项时收起其他) */
8
+ accordion?: boolean;
9
+ };
10
+ type __VLS_Slots = {
11
+ /** 若干 AkCollapseItem */
12
+ default?: () => unknown;
13
+ };
14
+ type __VLS_ModelProps = {
15
+ /** 展开项的 name 数组 */
16
+ modelValue?: CollapseName[];
17
+ };
18
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
19
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "update:modelValue": (value: CollapseName[]) => any;
21
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
+ "onUpdate:modelValue"?: ((value: CollapseName[]) => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,27 @@
1
+ import { type CollapseName } from "./context";
2
+ /**
3
+ * 折叠面板的一项(= Naive 的 NCollapseItem):原生 <details class="ak-details"> + <summary> + .ak-details__body。
4
+ * 开合交给浏览器(点击 / Enter / 空格,页内查找命中时自动展开),toggle 事件里同步回 AkCollapse 的 v-model;
5
+ * <summary> 自带按钮语义与展开状态,不另加 aria-expanded。单独用(不放在 AkCollapse 里)时自己记开合。
6
+ */
7
+ type __VLS_Props = {
8
+ /** 标识,= AkCollapse 的 v-model 数组里的值;不写时自动生成(只能靠点击开合) */
9
+ name?: CollapseName;
10
+ /** 标题;要放图标 / 标签时改用 #header 插槽 */
11
+ title?: string;
12
+ };
13
+ type __VLS_Slots = {
14
+ /** 标题(代替 title) */
15
+ header?: () => unknown;
16
+ /** 展开后的内容(正文排版照常生效) */
17
+ default?: () => unknown;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,7 @@
1
+ import type { InjectionKey } from "vue";
2
+ export type CollapseName = string | number;
3
+ /** AkCollapse 给 AkCollapseItem 的展开状态(同 Naive 的 NCollapse:子项只需要父组件的状态,走 provide / inject) */
4
+ export declare const collapseKey: InjectionKey<{
5
+ isOpen: (name: CollapseName) => boolean;
6
+ set: (name: CollapseName, open: boolean) => void;
7
+ }>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * 档案类卡片(干员密录 / 悖论模拟 / 未获得时档案)——现网那几张「————xx」折叠 wikitable 的替身。
3
+ * 结构同 Naive 的 NCard:头(小标 + 标题 + 右侧解锁条件)+ 体 + #footer 页脚(阅读 / 关卡 / 首通奖励);与 AkDossier 同一张脸。
4
+ */
5
+ type __VLS_Props = {
6
+ /** 标题(h4) */
7
+ title: string;
8
+ /** 标题前的小标(Record · 密录 1 / Paradox · 悖论模拟) */
9
+ kicker?: string;
10
+ /** 解锁条件(纯文本);要放精英 / 信赖 / 关卡号时改用 #unlock 插槽 */
11
+ unlock?: string;
12
+ /** 解锁条件前的小标 */
13
+ unlockLabel?: string;
14
+ };
15
+ type __VLS_Slots = {
16
+ /** 正文:若干 <p>(保留换行) */
17
+ default?: () => unknown;
18
+ /** 解锁条件(代替 unlock) */
19
+ unlock?: () => unknown;
20
+ /** 页脚:AkArchivePlay「阅读密录」、关卡、首通奖励 … */
21
+ footer?: () => unknown;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
24
+ unlock: string;
25
+ kicker: string;
26
+ unlockLabel: string;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,18 @@
1
+ /** 档案卡页脚的「阅读 / 播放」块:黑底 + 播放三角 + 文字,悬停变主色。有 href 是链接(去密录页),没有是按钮(发 click) */
2
+ type __VLS_Props = {
3
+ /** 链接地址(陈/干员密录/1);不写就渲染成 <button> */
4
+ href?: string;
5
+ };
6
+ type __VLS_Slots = {
7
+ /** 文字(阅读密录 · 一鼓作气) */
8
+ default?: () => unknown;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,26 @@
1
+ /** 属性表的一格(思路同 Naive 的 NStatistic:小标签 + 大数值 + 单位),放在 AkAttrs 里 */
2
+ type __VLS_Props = {
3
+ /** 属性名:英文缩写(HP / ATK …,Bender 大写小字)或直接写中文(物理强度) */
4
+ name: string;
5
+ /** 中文名:跟在英文缩写后,正文字体(生命上限) */
6
+ zh?: string;
7
+ /** 数值;要上色或放别的内容时改用默认插槽 */
8
+ value?: string | number;
9
+ /** 单位:数值后的小号灰字(s) */
10
+ unit?: string;
11
+ /** 强调:顶部 2px 主色线(面板里的四维用,部署类属性不用) */
12
+ accent?: boolean;
13
+ };
14
+ type __VLS_Slots = {
15
+ /** 数值(代替 value) */
16
+ default?: () => unknown;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
+ declare const _default: typeof __VLS_export;
21
+ export default _default;
22
+ type __VLS_WithSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,18 @@
1
+ /** 属性表:若干 AkAttr 排成等宽网格(每格最窄 140px,放不下换行),格间 1px 缝线 */
2
+ type __VLS_Props = {
3
+ /** 紧凑:名 / 值左右排开、数值缩到正文字号(档案里的综合体检、侧栏读数) */
4
+ compact?: boolean;
5
+ };
6
+ type __VLS_Slots = {
7
+ /** 若干 AkAttr */
8
+ default?: () => unknown;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,30 @@
1
+ import { type AvatarSize } from "./context";
2
+ type __VLS_Props = {
3
+ /** 图片地址(干员头像等);不写或加载失败时显示默认插槽的文字 */
4
+ src?: string;
5
+ /** 图片替代文本:旁边已经写了名字时留空(默认),头像单独出现时写人名 */
6
+ alt?: string;
7
+ /** 尺寸:xs 24 · sm 32 · md 40 · lg 56 · xl 80(px);不写时跟 AkAvatarGroup,再不然是 md */
8
+ size?: AvatarSize;
9
+ /** 圆形(系统默认直角,只给用户头像这类确需时用) */
10
+ round?: boolean;
11
+ /** 右下角绿色状态点(在线 / 可用):纯视觉,含义要在旁边的文字里说出来 */
12
+ status?: boolean;
13
+ };
14
+ type __VLS_Slots = {
15
+ /** 没有图片时显示的文字(缩写、「+9」) */
16
+ default?: () => unknown;
17
+ };
18
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
+ size: AvatarSize;
20
+ src: string;
21
+ alt: string;
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,35 @@
1
+ import { type AvatarSize } from "./context";
2
+ export interface AvatarOption {
3
+ /** 图片地址 */
4
+ src: string;
5
+ /** 替代文本(人名);组有意义时每枚都写 */
6
+ alt?: string;
7
+ }
8
+ type __VLS_Props = {
9
+ /** 头像列表(同 Naive 的 options);不写就用默认插槽里的 AkAvatar */
10
+ options?: AvatarOption[];
11
+ /** 最多画几枚,其余收成一枚「+N」(只对 options 生效) */
12
+ max?: number;
13
+ /** 组内头像的尺寸(头像自己写了 size 以头像为准) */
14
+ size?: AvatarSize;
15
+ /** 读屏用的组名(「参与干员」) */
16
+ label?: string;
17
+ };
18
+ type __VLS_Slots = {
19
+ /** 若干 AkAvatar(不用 options 时) */
20
+ default?: () => unknown;
21
+ };
22
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
23
+ size: AvatarSize;
24
+ label: string;
25
+ max: number;
26
+ options: AvatarOption[];
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,6 @@
1
+ import type { InjectionKey } from "vue";
2
+ export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
3
+ /** AkAvatarGroup 给组内 AkAvatar 的默认尺寸(同 Naive 的 NAvatarGroup size) */
4
+ export declare const avatarGroupKey: InjectionKey<{
5
+ size?: AvatarSize;
6
+ }>;
@@ -0,0 +1,35 @@
1
+ type __VLS_Props = {
2
+ /** 数字或短串;数字为 0 时默认不显示(见 showZero) */
3
+ value?: number | string;
4
+ /** 封顶:value 按数字大于它时显示「max+」(99+) */
5
+ max?: number;
6
+ /** 圆点:不显示数字,只提示「有新的」 */
7
+ dot?: boolean;
8
+ /** 是否显示徽标(同 Naive);false 时只剩包住的内容 */
9
+ show?: boolean;
10
+ /** value 为 0 时也显示 */
11
+ showZero?: boolean;
12
+ /** 颜色:default 黄(未读计数 / 点)· accent 主色 · danger 红(只给回退 / 权限变更这类 alerts) */
13
+ variant?: "default" | "accent" | "danger";
14
+ /** 读屏文本(「3 条未读通知」):写了就把数字对读屏隐藏、改念这句;圆点徽标一定要写 */
15
+ label?: string;
16
+ };
17
+ type __VLS_Slots = {
18
+ /** 被标记的内容(头像、图标按钮…):徽标骑在它右上角;不写就是独立的行内徽标 */
19
+ default?: () => unknown;
20
+ };
21
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
22
+ label: string;
23
+ variant: "default" | "accent" | "danger";
24
+ show: boolean;
25
+ value: number | string;
26
+ max: number;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,25 @@
1
+ import { type VNode } from "vue";
2
+ /**
3
+ * 面包屑(= Naive 的 NBreadcrumb):<nav> 地标里一条 <ol class="ak-breadcrumb">,里面放 AkBreadcrumbItem。
4
+ * 分隔符是 CSS 画的斜角(li + li::before),不能换字符。外层标 ak-not-prose:正文的列表缩进 / 项目符号不进来。
5
+ * 没有哪一项写了 current 时,最后一项自动标成当前页(aria-current="page",加粗)——所以这里要读子组件 vnode(同 AkTabs)。
6
+ */
7
+ type __VLS_Props = {
8
+ /** 导航地标的可访问名(nav 的 aria-label) */
9
+ label?: string;
10
+ };
11
+ type __VLS_Slots = {
12
+ /** 若干 AkBreadcrumbItem,从上级到当前页 */
13
+ default?: () => VNode[];
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
+ label: string;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,20 @@
1
+ /** 面包屑的一项(= Naive 的 NBreadcrumbItem),只能放在 AkBreadcrumb 里 */
2
+ type __VLS_Props = {
3
+ /** 链接地址;不写就是纯文字(当前页一般不写) */
4
+ href?: string;
5
+ /** 当前页:aria-current="page" + 加粗。一项都没写时 AkBreadcrumb 自动把最后一项当作当前页 */
6
+ current?: boolean;
7
+ };
8
+ type __VLS_Slots = {
9
+ /** 文字;要用路由链接(RouterLink)时整个写在这里、不写 href */
10
+ default?: () => unknown;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,47 @@
1
+ import type { IconName } from "../../icons";
2
+ import { type ButtonSize, type ButtonVariant } from "./context";
3
+ type __VLS_Props = {
4
+ /** 外观:primary = 主色实底(一处一枚)· contrast = 黑白反转(游戏内 btn_on)· outline 描边 · ghost 幽灵 · danger 危险 · link 链接样式 */
5
+ variant?: ButtonVariant;
6
+ /** 尺寸:xs 24 · sm 30 · md 36 · lg 44 · xl 56(px 高);不写时跟 AkButtonGroup,再不然是 md */
7
+ size?: ButtonSize;
8
+ /** 图标;没有文字(不写默认插槽)时是方形的图标按钮,这时 label 必填 */
9
+ icon?: IconName;
10
+ /** 图标在文字左边还是右边(同 Naive 的 icon-placement) */
11
+ iconPlacement?: "left" | "right";
12
+ /** 可访问名(aria-label;图标按钮同时作 title)——只有图标的按钮必填,有文字的一般不写 */
13
+ label?: string;
14
+ /** 占满容器宽度 */
15
+ block?: boolean;
16
+ /** 胶囊圆角(系统默认直角,只在确需时用) */
17
+ pill?: boolean;
18
+ /** 危险按钮叠斜纹(只配 variant="danger") */
19
+ stripes?: boolean;
20
+ /** 加载中:文字隐去,居中转圈,不可点 */
21
+ loading?: boolean;
22
+ disabled?: boolean;
23
+ /** 有 href 时渲染成 <a>(禁用时 aria-disabled) */
24
+ href?: string;
25
+ type?: "button" | "submit" | "reset";
26
+ };
27
+ type __VLS_Slots = {
28
+ /** 按钮文字;不写就是图标按钮 */
29
+ default?: () => unknown;
30
+ };
31
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
32
+ type: "button" | "submit" | "reset";
33
+ size: ButtonSize;
34
+ label: string;
35
+ variant: ButtonVariant;
36
+ icon: IconName;
37
+ iconPlacement: "left" | "right";
38
+ href: string;
39
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
40
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
+ declare const _default: typeof __VLS_export;
42
+ export default _default;
43
+ type __VLS_WithSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,21 @@
1
+ import { type ButtonSize } from "./context";
2
+ /** 一排贴在一起的按钮(同 Naive 的 NButtonGroup,纯容器);多选一的分段控件用单选组,不用它 */
3
+ type __VLS_Props = {
4
+ /** 组内按钮的默认尺寸(按钮自己写了 size 以按钮为准) */
5
+ size?: ButtonSize;
6
+ /** 读屏用的组名:一组有意义的动作时写 */
7
+ label?: string;
8
+ };
9
+ type __VLS_Slots = {
10
+ /** 若干 AkButton */
11
+ default?: () => unknown;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_WithSlots<T, S> = T & {
18
+ new (): {
19
+ $slots: S;
20
+ };
21
+ };
@@ -0,0 +1,7 @@
1
+ import type { InjectionKey } from "vue";
2
+ export type ButtonVariant = "default" | "primary" | "contrast" | "outline" | "ghost" | "danger" | "link";
3
+ export type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
4
+ /** AkButtonGroup 给组内 AkButton 的默认尺寸(同 Naive 的 NButtonGroup) */
5
+ export declare const buttonGroupKey: InjectionKey<{
6
+ size?: ButtonSize;
7
+ }>;
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ /** 势力徽标(游戏 spritepack/ui_camp_logo 的白色线稿,亮色下由 CSS 反相成黑) */
3
+ src: string;
4
+ /** 势力名:显示在徽标右侧;logoOnly 时作图片 alt 和悬停提示 */
5
+ name: string;
6
+ /** 徽标高度:md 28 · lg 48(px) */
7
+ size?: "md" | "lg";
8
+ /** 外观:default 线稿跟主题反相 · box 深底方块、原色白线稿(两套主题下都一样) */
9
+ variant?: "default" | "box";
10
+ /** 只显示徽标(名字进 alt 与悬停提示) */
11
+ logoOnly?: boolean;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ size: "md" | "lg";
15
+ variant: "default" | "box";
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,54 @@
1
+ type TitleTag = "div" | "h2" | "h3" | "h4" | "h5" | "h6";
2
+ type __VLS_Props = {
3
+ /** 标题(也可用 #header 插槽) */
4
+ title?: string;
5
+ /** 标题上方的灰色小字(Bender 大写:「Side Story」「01 · Foundations」) */
6
+ eyebrow?: string;
7
+ /** 标题元素:默认 div;卡片是页面大纲里的一节时用 h2–h6 */
8
+ titleTag?: TitleTag;
9
+ /** 标题独立成栏、下面一道分隔线(同 Naive 的 segmented);写了 #header-extra 时自动成栏 */
10
+ segmented?: boolean;
11
+ /** 封面图地址:16:9 裁切铺满顶部;horizontal 时在左边占 40%。要自定义用 #cover */
12
+ cover?: string;
13
+ /** 外观:default 表面色 + 1px 边 · flat 无边、表面 2 底 · inset 凹陷底 */
14
+ variant?: "default" | "flat" | "inset";
15
+ /** 主色色条:top 顶部 3px · left 左侧 4px(公告 / 提示 / 天赋条目) */
16
+ accent?: "top" | "left";
17
+ /** 悬停时主色描边 + 投影 + 上移 2px(同 Naive 的 hoverable);整卡可点时用 */
18
+ hoverable?: boolean;
19
+ /** 选中:主色内描边 + 左上角三角角标(源自游戏内技能选中框) */
20
+ selected?: boolean;
21
+ /** 横排:封面在左、正文在右 */
22
+ horizontal?: boolean;
23
+ /** 整张卡是一个链接:渲染成 <a>(带 ak-not-prose,正文链接色 / 下划线不进来);这时正文里别再放链接 */
24
+ href?: string;
25
+ };
26
+ type __VLS_Slots = {
27
+ /** 正文 */
28
+ default?: () => unknown;
29
+ /** 标题内容(代替 title) */
30
+ header?: () => unknown;
31
+ /** 标题栏右侧(标签、按钮);写了它标题自动成栏 */
32
+ "header-extra"?: () => unknown;
33
+ /** 页脚(日期 + 操作):表面 2 底、上面一道线 */
34
+ footer?: () => unknown;
35
+ /** 自定义封面(代替 cover);图片自己加 class="ak-card__media" */
36
+ cover?: () => unknown;
37
+ };
38
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
39
+ title: string;
40
+ variant: "default" | "flat" | "inset";
41
+ href: string;
42
+ accent: "top" | "left";
43
+ eyebrow: string;
44
+ titleTag: TitleTag;
45
+ cover: string;
46
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
48
+ declare const _default: typeof __VLS_export;
49
+ export default _default;
50
+ type __VLS_WithSlots<T, S> = T & {
51
+ new (): {
52
+ $slots: S;
53
+ };
54
+ };
@@ -0,0 +1,13 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ type __VLS_WithSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
@@ -0,0 +1,33 @@
1
+ import type { IconName } from "../../icons";
2
+ export type CboxLevel = "tip" | "info" | "warning" | "danger" | "neutral";
3
+ type __VLS_Props = {
4
+ /** 等级(= 现网 {{Cbox2}} 的 lv):tip = lv0 绿「另见 / 提示」· info = lv1 蓝(默认)· warning = lv2 / lv3 · danger = lv4 · neutral 灰 */
5
+ level?: CboxLevel;
6
+ /** 加粗的标题行(等级色) */
7
+ title?: string;
8
+ /** 图标井里的图标;默认按等级:tip → arrow-ne,info / neutral → info,warning / danger → warn */
9
+ icon?: IconName;
10
+ /** 最宽 640px(= 模板 narrow=) */
11
+ narrow?: boolean;
12
+ };
13
+ declare var __VLS_1: {}, __VLS_8: {}, __VLS_10: {};
14
+ type __VLS_Slots = {} & {
15
+ icon?: (props: typeof __VLS_1) => any;
16
+ } & {
17
+ title?: (props: typeof __VLS_8) => any;
18
+ } & {
19
+ default?: (props: typeof __VLS_10) => any;
20
+ };
21
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
22
+ title: string;
23
+ icon: IconName;
24
+ level: CboxLevel;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
29
+ type __VLS_WithSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,39 @@
1
+ import { type CheckSize, type CheckValue } from "./context";
2
+ type __VLS_Props = {
3
+ /** 在 AkCheckboxGroup 里的取值:勾上时进组的 v-model 数组 */
4
+ value?: CheckValue;
5
+ /** 半选(一横):「全选」框在部分子项勾上时用。只管外观与读屏的「部分选中」,点击照常切换 */
6
+ indeterminate?: boolean;
7
+ /** 禁用 */
8
+ disabled?: boolean;
9
+ /** 尺寸:sm 16px 框(表头里的开关)· md 18px;不写时跟 AkCheckboxGroup */
10
+ size?: CheckSize;
11
+ /** 可访问名(aria-label):不写文字(默认插槽)时必填 */
12
+ label?: string;
13
+ };
14
+ type __VLS_Slots = {
15
+ /** 文字 */
16
+ default?: () => unknown;
17
+ };
18
+ type __VLS_ModelProps = {
19
+ /** 单独用时是否勾上;放在 AkCheckboxGroup 里时由组的 v-model 决定,不用绑 */
20
+ modelValue?: boolean;
21
+ };
22
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
23
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "update:modelValue": (value: boolean) => any;
25
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
26
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
27
+ }>, {
28
+ size: CheckSize;
29
+ label: string;
30
+ value: CheckValue;
31
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
35
+ type __VLS_WithSlots<T, S> = T & {
36
+ new (): {
37
+ $slots: S;
38
+ };
39
+ };