@robot-admin/naive-ui-components 0.13.0 → 0.13.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +33 -0
  3. package/README_EN.md +33 -0
  4. package/dist/C_Guide.css +123 -0
  5. package/dist/C_Guide.d.cts +2 -2
  6. package/dist/C_Guide.d.ts +2 -2
  7. package/dist/C_Guide2.cjs +1 -1
  8. package/dist/C_Guide2.js +1 -1
  9. package/dist/constants.d.cts +4 -4
  10. package/dist/constants.d.ts +4 -4
  11. package/dist/constants2.d.cts +4 -4
  12. package/dist/constants2.d.ts +4 -4
  13. package/dist/constants3.d.cts +4 -4
  14. package/dist/constants3.d.ts +4 -4
  15. package/dist/constants4.d.cts +6 -6
  16. package/dist/constants4.d.ts +6 -6
  17. package/dist/constants5.d.cts +4 -4
  18. package/dist/constants5.d.ts +4 -4
  19. package/dist/data.d.cts +10 -10
  20. package/dist/data.d.ts +10 -10
  21. package/dist/index.d.cts +2 -2
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.vue.d.cts +7 -7
  24. package/dist/index.vue.d.ts +7 -7
  25. package/dist/index10.vue.d.cts +3 -3
  26. package/dist/index10.vue.d.ts +4 -4
  27. package/dist/index11.vue.d.cts +4 -4
  28. package/dist/index11.vue.d.ts +6 -6
  29. package/dist/index12.vue.d.cts +6 -6
  30. package/dist/index12.vue.d.ts +2 -2
  31. package/dist/index13.vue.d.cts +2 -2
  32. package/dist/index13.vue.d.ts +35 -9
  33. package/dist/index14.vue.d.cts +35 -9
  34. package/dist/index14.vue.d.ts +7 -7
  35. package/dist/index15.vue.d.cts +7 -7
  36. package/dist/index15.vue.d.ts +2 -2
  37. package/dist/index16.vue.d.cts +2 -2
  38. package/dist/index17.vue.d.ts +5 -5
  39. package/dist/index18.vue.d.cts +5 -5
  40. package/dist/index19.vue.d.cts +2 -2
  41. package/dist/index19.vue.d.ts +2 -2
  42. package/dist/index2.vue.d.cts +2 -2
  43. package/dist/index2.vue.d.ts +2 -2
  44. package/dist/index20.vue.d.cts +2 -2
  45. package/dist/index20.vue.d.ts +2 -2
  46. package/dist/index21.vue.d.cts +2 -2
  47. package/dist/index21.vue.d.ts +2 -2
  48. package/dist/index22.vue.d.cts +1 -1
  49. package/dist/index22.vue.d.ts +1 -1
  50. package/dist/index24.vue.d.cts +4 -4
  51. package/dist/index24.vue.d.ts +4 -4
  52. package/dist/index25.vue.d.cts +1 -1
  53. package/dist/index25.vue.d.ts +1 -1
  54. package/dist/index26.vue.d.cts +4 -4
  55. package/dist/index26.vue.d.ts +4 -4
  56. package/dist/index27.vue.d.cts +4 -4
  57. package/dist/index27.vue.d.ts +4 -4
  58. package/dist/index3.vue.d.cts +6 -6
  59. package/dist/index3.vue.d.ts +6 -6
  60. package/dist/index5.vue.d.ts +2 -2
  61. package/dist/index6.vue.d.cts +2 -2
  62. package/dist/index6.vue.d.ts +1 -1
  63. package/dist/index7.vue.d.cts +1 -1
  64. package/dist/index7.vue.d.ts +2 -2
  65. package/dist/index8.vue.d.cts +2 -2
  66. package/dist/index8.vue.d.ts +3 -3
  67. package/dist/index9.vue.d.cts +3 -3
  68. package/dist/index9.vue.d.ts +3 -3
  69. package/dist/mapUtils.d.cts +4 -4
  70. package/dist/mapUtils.d.ts +4 -4
  71. package/dist/presets.d.cts +1 -1
  72. package/dist/presets.d.ts +1 -1
  73. package/dist/style.css +125 -0
  74. package/dist/useCollapsePanel.d.cts +6 -6
  75. package/dist/useCollapsePanel.d.ts +6 -6
  76. package/dist/useCropperCore.d.cts +9 -9
  77. package/dist/useCropperCore.d.ts +9 -9
  78. package/dist/useDraggableLayout.d.cts +4 -4
  79. package/dist/useDraggableLayout.d.ts +4 -4
  80. package/dist/useDynamicFormState.d.cts +2 -2
  81. package/dist/useDynamicFormState.d.ts +2 -2
  82. package/dist/useEdgeInteraction.d.cts +3 -3
  83. package/dist/useEdgeInteraction.d.ts +3 -3
  84. package/dist/useInfiniteScroll.d.cts +3 -3
  85. package/dist/useInfiniteScroll.d.ts +3 -3
  86. package/dist/useQRCode.d.cts +3 -3
  87. package/dist/useQRCode.d.ts +3 -3
  88. package/dist/useSearchState.d.cts +6 -6
  89. package/dist/useSearchState.d.ts +6 -6
  90. package/dist/useSignatureHistory.d.cts +7 -7
  91. package/dist/useSignatureHistory.d.ts +7 -7
  92. package/dist/useSplitResize.d.cts +7 -7
  93. package/dist/useSplitResize.d.ts +7 -7
  94. package/dist/useTableQuery.d.cts +1 -1
  95. package/dist/useTableQuery.d.ts +1 -1
  96. package/dist/useTimeSelection.d.cts +5 -5
  97. package/dist/useTimeSelection.d.ts +5 -5
  98. package/dist/useTreeOperations.d.cts +4 -4
  99. package/dist/useTreeOperations.d.ts +4 -4
  100. package/dist/useWorkflowValidation.d.cts +7 -7
  101. package/dist/useWorkflowValidation.d.ts +7 -7
  102. package/dist/verification.d.cts +3 -3
  103. package/dist/verification.d.ts +3 -3
  104. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @robot-admin/naive-ui-components
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 303f3b6: 完善 C_Guide:引擎在用户打开时加载,统一图文弹层随 Naive UI 主题变化,自动跳过缺失或不可见目标,支持动态目标和停止 API。增加可配置的“跳过引导”按钮及 skip 事件,补充概览、通知、全屏、语言、主题和布局等通用示意图。修复完成事件、完成持久化及步骤离开回调,补齐首帧前退出的清理,防止动画期间快速切换残留高亮,并取消卸载或配置变化后的待启动任务。跳过不记录为完成,用户可随时重新查看。通用组件不依赖宿主路由、菜单或业务 Store。
8
+
3
9
  ## 0.13.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -105,6 +105,37 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
105
105
  // 完整模式也可显式使用 C_Form/full.css、C_Table/full.css
106
106
  ```
107
107
 
108
+ ### C_Guide 配置引导
109
+
110
+ 项目只需要提供目标和步骤,组件内置主题、可选 SVG 示意图及退出清理,不依赖项目的路由或 Store:
111
+
112
+ ```vue
113
+ <script setup lang="ts">
114
+ import {
115
+ C_Guide,
116
+ type GuideStep,
117
+ } from '@robot-admin/naive-ui-components/C_Guide'
118
+ import '@robot-admin/naive-ui-components/C_Guide/style.css'
119
+
120
+ const steps: GuideStep[] = [
121
+ {
122
+ element: '[data-guide="search"]',
123
+ popover: {
124
+ title: '搜索',
125
+ description: '快速查找功能。',
126
+ illustration: 'search',
127
+ },
128
+ },
129
+ ]
130
+ </script>
131
+
132
+ <template>
133
+ <C_Guide :steps="steps" />
134
+ </template>
135
+ ```
136
+
137
+ 在 `NConfigProvider` 内会自动跟随亮暗主题和主色。目标支持选择器、元素或解析函数;默认跳过不可见目标,不传目标可展示居中步骤。引擎在打开时加载。启用 `persistence` 后,只有完成引导才记住状态;点击入口仍可重看。每一步默认显示“跳过引导”,跳过会发出 `skip` 和 `close` 事件,不记录为完成;可用 `showSkipButton` 和 `skipBtnText` 控制入口与文案。通过 `GuideExpose` 可调用 `startGuide(force?)`、`stopGuide()`、`isCompleted()` 和 `resetCompleted()`,宿主可在路由切换时主动停止。
138
+
108
139
  ### C_Form / C_Table 推荐用法
109
140
 
110
141
  推荐使用类型助手和绑定助手:业务模型只声明一次,字段路径、字段值、列 key、保存回调和实例方法即可保持同一套类型推导。字段支持 `profile.name`、`contacts.0.email` 这类嵌套路径。
@@ -630,6 +661,8 @@ bun run verify # 发布前完整验证
630
661
  bun run release # 发布 Changesets 中待发布版本
631
662
  ```
632
663
 
664
+ 本仓库的 GitHub 变更日志生成器要求在执行 `bun run version` 时提供 `GITHUB_TOKEN`,不要将令牌写入仓库。Windows 下如果 `bun run release` 在 npm 的 `prepublishOnly` 重复验证阶段停滞,可先单独确认 `bun run verify` 成功,再在 PowerShell 中用 `$env:npm_config_ignore_scripts='true'; bun run release` 发布;该设置仅跳过已手动完成的重复生命周期验证,不应省略前一步。
665
+
633
666
  ## 📄 许可证
634
667
 
635
668
  MIT License
package/README_EN.md CHANGED
@@ -105,6 +105,37 @@ import '@robot-admin/naive-ui-components/C_Table/base.css'
105
105
  // Full mode is also available as C_Form/full.css and C_Table/full.css.
106
106
  ```
107
107
 
108
+ ### Configure C_Guide
109
+
110
+ Provide targets and steps; the component owns its theme, optional SVG illustrations, and cleanup without depending on a host router or store:
111
+
112
+ ```vue
113
+ <script setup lang="ts">
114
+ import {
115
+ C_Guide,
116
+ type GuideStep,
117
+ } from '@robot-admin/naive-ui-components/C_Guide'
118
+ import '@robot-admin/naive-ui-components/C_Guide/style.css'
119
+
120
+ const steps: GuideStep[] = [
121
+ {
122
+ element: '[data-guide="search"]',
123
+ popover: {
124
+ title: 'Search',
125
+ description: 'Find a feature.',
126
+ illustration: 'search',
127
+ },
128
+ },
129
+ ]
130
+ </script>
131
+
132
+ <template>
133
+ <C_Guide :steps="steps" />
134
+ </template>
135
+ ```
136
+
137
+ Inside `NConfigProvider`, the popover follows its light/dark theme and primary color. Targets accept selectors, elements, or resolver functions; invisible targets are skipped by default and omitting a target creates a centered step. The engine loads when opened. With `persistence` enabled, only completion is remembered; the trigger always allows replay. Every step shows a skip button by default. Skipping emits `skip` and `close` without recording completion; configure it with `showSkipButton` and `skipBtnText`. `GuideExpose` provides `startGuide(force?)`, `stopGuide()`, `isCompleted()`, and `resetCompleted()` for host lifecycle integration.
138
+
108
139
  ### Recommended C_Form / C_Table setup
109
140
 
110
141
  Declare the business model once and keep nested field paths, values, column keys, callbacks, and exposed methods type-safe:
@@ -570,6 +601,8 @@ bun run verify # Run all pre-publish checks
570
601
  bun run release # Publish pending Changesets releases
571
602
  ```
572
603
 
604
+ The GitHub changelog generator requires `GITHUB_TOKEN` for `bun run version`; never commit the token. On Windows, if `bun run release` stalls while npm repeats `prepublishOnly`, first confirm `bun run verify` succeeds, then publish from PowerShell with `$env:npm_config_ignore_scripts='true'; bun run release`. This skips only the repeated lifecycle check, not the prerequisite verification.
605
+
573
606
  ## 📄 License
574
607
 
575
608
  MIT License
package/dist/C_Guide.css CHANGED
@@ -58,3 +58,126 @@
58
58
  }
59
59
 
60
60
  .driver-popover{all:unset;font-family:var(--driver-popover-font-family,"Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif);box-sizing:border-box;color:#2d2d2d;z-index:1000000000;background-color:#fff;border-radius:5px;min-width:250px;max-width:300px;margin:0;padding:15px;position:fixed;top:0;right:0;box-shadow:0 1px 10px #0006}.driver-popover-title{zoom:1;margin:0;font-size:19px;font-weight:700;line-height:1.5;display:block;position:relative}.driver-popover-close-btn{all:unset;cursor:pointer;color:#d2d2d2;z-index:1;text-align:center;width:32px;height:28px;font-size:18px;font-weight:500;transition:color .2s;position:absolute;top:0;right:0}.driver-popover-close-btn:hover,.driver-popover-close-btn:focus{color:#2d2d2d}.driver-popover-title[style*=block]+.driver-popover-description{margin-top:5px}.driver-popover-description{zoom:1;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.5}.driver-popover-footer{text-align:right;zoom:1;justify-content:space-between;align-items:center;margin-top:15px;display:flex}.driver-popover-progress-text{color:#727272;zoom:1;font-size:13px;font-weight:400}.driver-popover-footer-btn{all:unset;box-sizing:border-box;color:#2d2d2d;cursor:pointer;zoom:1;background-color:#fff;border:1px solid #ccc;border-radius:3px;outline:0;padding:3px 7px;font-size:12px;line-height:1.3;text-decoration:none;display:inline-block}.driver-popover-footer .driver-popover-btn-disabled{opacity:.5;pointer-events:none}.driver-popover-footer-btn:hover,.driver-popover-footer-btn:focus{background-color:#f7f7f7}.driver-popover-navigation-btns{flex-grow:1;justify-content:flex-end;display:flex}.driver-popover-navigation-btns button+button{margin-left:4px}.driver-popover-arrow{content:"";border:5px solid #fff;position:absolute}.driver-popover-arrow-side-over{display:none}.driver-popover-arrow-side-left{border-top-color:#0000;border-bottom-color:#0000;border-right-color:#0000;left:100%}.driver-popover-arrow-side-right{border-top-color:#0000;border-bottom-color:#0000;border-left-color:#0000;right:100%}.driver-popover-arrow-side-top{border-bottom-color:#0000;border-left-color:#0000;border-right-color:#0000;top:100%}.driver-popover-arrow-side-bottom{border-top-color:#0000;border-left-color:#0000;border-right-color:#0000;bottom:100%}.driver-popover-arrow-side-center,.driver-popover-arrow-none{display:none}.driver-active .driver-overlay{pointer-events:none}.driver-active.driver-no-scroll{overflow:hidden}.driver-active *{pointer-events:none}.driver-active .driver-active-element,.driver-active .driver-active-element *,.driver-popover,.driver-popover *{pointer-events:auto}@keyframes animate-fade-in{0%{opacity:0}to{opacity:1}}.driver-fade .driver-overlay{animation:animate-fade-in var(--driver-animation-duration,.4s) ease-in-out}.driver-fade .driver-popover{animation:animate-fade-in var(--driver-animation-duration,.4s)}.driver-active-element-parent-no-scroll{overflow:hidden!important}.driver-no-interaction,.driver-no-interaction *{pointer-events:none!important}
61
+
62
+ /* unplugin-vue-components disabled *//*
63
+ * @Author: ChenYu ycyplus@gmail.com
64
+ * @Date: 2026-10-04
65
+ * @Description: 引导入口键盘焦点样式,不依赖宿主样式
66
+ * Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
67
+ */
68
+ [data-v-1dcaf6fa] .n-button:focus-visible {
69
+ outline: 2px solid var(--c-primary, #2080f0);
70
+ outline-offset: 4px;
71
+ border-radius: 4px;
72
+ }
73
+ /* unplugin-vue-components disabled *//*
74
+ * @Author: ChenYu ycyplus@gmail.com
75
+ * @Date: 2026-10-04
76
+ * @FilePath: \naive-ui-components\src\components\C_Guide\popover.scss
77
+ * @Description: 组件库通用引导主题,弹层由 Driver.js 挂载到 body
78
+ * Copyright (c) 2026 by CHENY, All Rights Reserved 😎.
79
+ */
80
+ .driver-popover.c-guide-popover {
81
+ box-sizing: border-box;
82
+ width: 328px;
83
+ min-width: 0;
84
+ max-width: calc(100vw - 24px);
85
+ padding: 20px;
86
+ color: var(--c-guide-text, var(--c-text-1, #262626));
87
+ background: var(--c-guide-bg, var(--c-bg-surface, #fff));
88
+ border: 1px solid var(--c-guide-border, var(--c-border, #e5e7eb));
89
+ border-radius: var(--c-guide-radius, 14px);
90
+ box-shadow: var(--c-shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.2));
91
+ font-family: inherit;
92
+ }
93
+ .driver-popover.c-guide-popover .driver-popover-title {
94
+ padding-right: 20px;
95
+ color: var(--c-guide-text, var(--c-text-1, #262626));
96
+ font-size: 18px;
97
+ font-weight: 650;
98
+ line-height: 1.5;
99
+ }
100
+ .driver-popover.c-guide-popover .driver-popover-description {
101
+ color: var(--c-guide-text-secondary, var(--c-text-2, #525252));
102
+ font-size: 13px;
103
+ line-height: 1.7;
104
+ }
105
+ .driver-popover.c-guide-popover .c-guide-figure {
106
+ padding: 4px 0;
107
+ color: var(--c-guide-primary, var(--c-primary, #2080f0));
108
+ background: color-mix(in srgb, var(--c-guide-primary, var(--c-primary, #2080f0)) 8%, var(--c-guide-bg, var(--c-bg-surface, #fff)));
109
+ border-radius: 9px;
110
+ }
111
+ .driver-popover.c-guide-popover .c-guide-figure svg {
112
+ display: block;
113
+ width: 100%;
114
+ height: 96px;
115
+ }
116
+ .driver-popover.c-guide-popover .c-guide-copy {
117
+ margin: 14px 0 0;
118
+ }
119
+ .driver-popover.c-guide-popover .driver-popover-footer {
120
+ margin-top: 18px;
121
+ padding: 0;
122
+ gap: 8px;
123
+ }
124
+ .driver-popover.c-guide-popover .driver-popover-footer .c-guide-skip-btn {
125
+ flex-shrink: 0;
126
+ padding: 5px 0;
127
+ color: var(--c-guide-text-muted, #767676);
128
+ background: transparent;
129
+ border: none;
130
+ }
131
+ .driver-popover.c-guide-popover .driver-popover-footer .c-guide-skip-btn:hover {
132
+ color: var(--c-guide-primary, #2080f0);
133
+ background: transparent;
134
+ }
135
+ .driver-popover.c-guide-popover .driver-popover-footer button {
136
+ min-height: 32px;
137
+ padding: 5px 12px;
138
+ color: var(--c-guide-text, var(--c-text-1, #262626));
139
+ background: var(--c-guide-bg, var(--c-bg-surface, #fff));
140
+ border: 1px solid var(--c-guide-border, var(--c-border, #e5e7eb));
141
+ border-radius: 7px;
142
+ font-size: 12px;
143
+ text-shadow: none;
144
+ }
145
+ .driver-popover.c-guide-popover .driver-popover-footer button:disabled {
146
+ opacity: 0.5;
147
+ pointer-events: none;
148
+ }
149
+ .driver-popover.c-guide-popover .driver-popover-footer button:hover {
150
+ background: color-mix(in srgb, var(--c-guide-primary, #2080f0) 8%, var(--c-guide-bg, #fff));
151
+ }
152
+ .driver-popover.c-guide-popover .driver-popover-footer button:focus-visible {
153
+ outline: 2px solid var(--c-guide-primary, var(--c-primary, #2080f0));
154
+ outline-offset: 2px;
155
+ }
156
+ .driver-popover.c-guide-popover .driver-popover-footer .driver-popover-next-btn {
157
+ color: #fff;
158
+ background: var(--c-guide-primary, var(--c-primary, #2080f0));
159
+ border-color: var(--c-guide-primary, var(--c-primary, #2080f0));
160
+ }
161
+ .driver-popover.c-guide-popover .driver-popover-footer .driver-popover-next-btn:hover {
162
+ background: var(--c-guide-primary-hover, #4098fc);
163
+ }
164
+ .driver-popover.c-guide-popover .driver-popover-close-btn {
165
+ top: 14px;
166
+ right: 12px;
167
+ color: var(--c-guide-text-muted, var(--c-text-3, #a3a3a3));
168
+ }
169
+ .driver-popover.c-guide-popover .driver-popover-close-btn:hover, .driver-popover.c-guide-popover .driver-popover-close-btn:focus {
170
+ color: var(--c-guide-text, var(--c-text-1, #262626));
171
+ }
172
+ .driver-popover.c-guide-popover .driver-popover-arrow-side-left {
173
+ border-left-color: var(--c-guide-bg, var(--c-bg-surface, #fff));
174
+ }
175
+ .driver-popover.c-guide-popover .driver-popover-arrow-side-right {
176
+ border-right-color: var(--c-guide-bg, var(--c-bg-surface, #fff));
177
+ }
178
+ .driver-popover.c-guide-popover .driver-popover-arrow-side-top {
179
+ border-top-color: var(--c-guide-bg, var(--c-bg-surface, #fff));
180
+ }
181
+ .driver-popover.c-guide-popover .driver-popover-arrow-side-bottom {
182
+ border-bottom-color: var(--c-guide-bg, var(--c-bg-surface, #fff));
183
+ }
@@ -1,2 +1,2 @@
1
- import { a as GuideTheme, i as GuideStep, n as GuidePersistence, r as GuideProps, t as _default } from "./index14.vue.cjs";
2
- export { _default as C_Guide, type GuidePersistence, type GuideProps, type GuideStep, type GuideTheme };
1
+ import { a as GuideProps, c as GuideTheme, i as GuidePersistence, n as GuideExpose, o as GuideStep, r as GuideIllustration, s as GuideTarget, t as _default } from "./index14.vue.cjs";
2
+ export { _default as C_Guide, type GuideExpose, type GuideIllustration, type GuidePersistence, type GuideProps, type GuideStep, type GuideTarget, type GuideTheme };
package/dist/C_Guide.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as GuideTheme, i as GuideStep, n as GuidePersistence, r as GuideProps, t as _default } from "./index13.vue.js";
2
- export { _default as C_Guide, type GuidePersistence, type GuideProps, type GuideStep, type GuideTheme };
1
+ import { a as GuideProps, c as GuideTheme, i as GuidePersistence, n as GuideExpose, o as GuideStep, r as GuideIllustration, s as GuideTarget, t as _default } from "./index13.vue.js";
2
+ export { _default as C_Guide, type GuideExpose, type GuideIllustration, type GuidePersistence, type GuideProps, type GuideStep, type GuideTarget, type GuideTheme };
package/dist/C_Guide2.cjs CHANGED
@@ -1 +1 @@
1
- require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`);let t=require(`vue`),n=require(`naive-ui`),r=require(`driver.js`);const i=(0,t.defineComponent)({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`step-change`],setup(i,{expose:a,emit:o}){let s=i,c=o,l=null,u=(0,t.computed)(()=>`${s.persistence?.keyPrefix??`c_guide`}_completed`),d=()=>{if(!s.persistence?.enabled)return!1;try{return localStorage.getItem(u.value)===`true`}catch{return!1}},f=()=>{if(s.persistence?.enabled)try{localStorage.setItem(u.value,`true`)}catch{}},p=()=>{try{localStorage.removeItem(u.value)}catch{}},m=()=>s.steps.filter(e=>!e.skipIf?.()),h=()=>s.popoverClass||``,g=(e=!1)=>{if(!e&&d())return;let t=m();if(!t.length){console.warn(`[C_Guide] 未提供引导步骤(steps),请通过 :steps prop 传入。`);return}l?.destroy();let n=0,i=!1,a=s.theme?.overlayOpacity===void 0?{}:{overlayOpacity:s.theme.overlayOpacity},o=(0,r.driver)({popoverClass:h(),animate:s.animate,showProgress:s.showProgress,allowClose:s.allowClose,allowKeyboardControl:s.keyboard,...a,doneBtnText:s.doneBtnText,nextBtnText:s.nextBtnText,prevBtnText:s.prevBtnText,steps:t.map(e=>({element:e.element,popover:e.popover})),onPopoverRender:e=>{s.theme?.popoverBgColor&&(e.wrapper.style.backgroundColor=s.theme.popoverBgColor),s.theme?.popoverTextColor&&(e.wrapper.style.color=s.theme.popoverTextColor),s.theme?.borderRadius&&(e.wrapper.style.borderRadius=s.theme.borderRadius),s.theme?.primaryColor&&(e.nextButton.style.backgroundColor=s.theme.primaryColor,e.nextButton.style.borderColor=s.theme.primaryColor)},onHighlightStarted:(e,r,{state:i})=>{n=i.activeIndex??n;let a=t[n];a&&(a.onHighlightStarted?.(e,a),c(`step-change`,n,a))},onDeselected:e=>{let r=t[n];r?.onDeselected?.(e,r)},onNextClick:()=>{o.isLastStep()?(i=!0,o.destroy()):o.moveNext()},onDestroyStarted:()=>{i?(f(),c(`complete`)):c(`close`,n),l=null,o.destroy()}});c(`start`),l=o,o.drive()};return(0,t.onBeforeUnmount)(()=>{l?.destroy(),l=null}),a({startGuide:g,resetCompleted:p,isCompleted:d}),(r,i)=>s.showTrigger?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(n.NTooltip),{key:0,placement:`bottom`,trigger:`hover`},{trigger:(0,t.withCtx)(()=>[(0,t.createVNode)((0,t.unref)(n.NButton),{text:``,onClick:i[0]||=e=>g()},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(e.t,{name:s.triggerIcon,size:18},null,8,[`name`])]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(s.triggerTooltip),1)]),_:1})):(0,t.createCommentVNode)(`v-if`,!0)}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
1
+ require(`./chunk.cjs`);const e=require(`./C_Icon2.cjs`),t=require(`./export-helper.cjs`);let n=require(`vue`),r=require(`naive-ui`);const i={navigation:`<rect x="34" y="12" width="56" height="72" rx="6" fill="currentColor" opacity=".12"/><path d="M46 30h30M46 48h30M46 66h20"/><rect x="108" y="12" width="118" height="72" rx="6" fill="currentColor" opacity=".07"/><path d="M122 32h64M122 48h90M122 64h74"/>`,search:`<rect x="28" y="26" width="204" height="44" rx="10" fill="currentColor" opacity=".09"/><circle cx="56" cy="46" r="8"/><path d="m62 52 6 6M86 44h104M86 55h70"/>`,tabs:`<rect x="28" y="24" width="204" height="56" rx="6" fill="currentColor" opacity=".07"/><rect x="40" y="16" width="58" height="26" rx="6" fill="currentColor" opacity=".2"/><path d="M50 29h25m10-3 6 6m0-6-6 6M112 29h38M166 29h38M44 56h100M44 67h144"/>`,account:`<circle cx="60" cy="48" r="22" fill="currentColor" opacity=".12"/><circle cx="60" cy="41" r="6"/><path d="M49 60c0-13 22-13 22 0M94 40h40m-8-6 8 6-8 6M94 58h40m-32-6-8 6 8 6"/><rect x="154" y="20" width="62" height="56" rx="6" fill="currentColor" opacity=".09"/><path d="M168 36h34M168 48h34M168 60h22"/>`,overview:`<rect x="28" y="14" width="204" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M42 30h76M42 42h52"/><rect x="42" y="54" width="48" height="16" rx="4"/><rect x="106" y="54" width="48" height="16" rx="4"/><rect x="170" y="54" width="48" height="16" rx="4"/>`,notification:`<circle cx="130" cy="48" r="36" fill="currentColor" opacity=".07"/><path d="M109 63h42l-6-10V40a15 15 0 0 0-30 0v13l-6 10ZM124 71h12"/><circle cx="150" cy="26" r="8" fill="currentColor" opacity=".3"/>`,fullscreen:`<rect x="50" y="14" width="160" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M66 40V28h20M174 28h20v12M66 56v12h20M174 68h20V56"/><rect x="106" y="34" width="48" height="28" rx="4"/>`,language:`<rect x="54" y="18" width="72" height="54" rx="8" fill="currentColor" opacity=".1"/><rect x="134" y="24" width="72" height="54" rx="8" fill="currentColor" opacity=".07"/><path d="M70 34h40M90 27v7M79 34c2 15 9 22 27 28M101 34c-3 15-13 24-28 29M151 64l16-27 16 27M158 53h18"/>`,theme:`<circle cx="78" cy="48" r="15" fill="currentColor" opacity=".12"/><path d="M78 24v-6M78 78v-6M54 48h-6M108 48h-6M61 31l-5-5M100 70l-5-5M61 65l-5 5M100 26l-5 5M168 22a26 26 0 1 0 28 42 26 26 0 0 1-28-42Z"/>`,settings:`<rect x="44" y="14" width="172" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M62 31h136M62 48h136M62 65h136"/><circle cx="94" cy="31" r="5" fill="currentColor"/><circle cx="168" cy="48" r="5" fill="currentColor"/><circle cx="124" cy="65" r="5" fill="currentColor"/>`};function a(e){return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<window.innerWidth&&e.top<window.innerHeight}function o(e){if(!(!e||typeof document>`u`))return(typeof e==`string`?Array.from(document.querySelectorAll(e)):[typeof e==`function`?e():e]).find(e=>{if(!e?.isConnected)return!1;let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView?.getComputedStyle(e);return a(t)&&n?.visibility!==`hidden`})}function s(e){let{illustration:t}=e.popover,n=t&&i[t];return n?`<div class="c-guide-figure"><svg viewBox="0 0 260 96" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">${n}</svg></div><div class="c-guide-copy">${e.popover.description}</div>`:e.popover.description}const c=(0,n.defineComponent)({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showSkipButton:{type:Boolean,default:!0},skipBtnText:{default:`跳过引导`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},skipMissingElements:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`skip`,`step-change`,`error`],setup(t,{expose:i,emit:a}){let c=t,l=a,u=(0,r.useThemeVars)(),d=(0,n.ref)(!1),f=(0,n.computed)(()=>`${c.persistence?.keyPrefix??`c_guide`}_completed`),p=null,m,h=0,g=()=>{if(!c.persistence?.enabled)return!1;try{return localStorage.getItem(f.value)===`true`}catch{return!1}},_=()=>{if(c.persistence?.enabled)try{localStorage.setItem(f.value,`true`)}catch{}},v=()=>{try{localStorage.removeItem(f.value)}catch{}},y=()=>{h++,d.value=!1;let e=m;m=void 0,e?.()},b=e=>{let t=c.theme??{},n={"--c-guide-bg":t.popoverBgColor??u.value.popoverColor,"--c-guide-text":t.popoverTextColor??u.value.textColor1,"--c-guide-text-secondary":t.popoverTextColor??u.value.textColor2,"--c-guide-text-muted":u.value.textColor3,"--c-guide-primary":t.primaryColor??u.value.primaryColor,"--c-guide-primary-hover":t.primaryColor??u.value.primaryColorHover,"--c-guide-border":u.value.borderColor,"--c-guide-radius":t.borderRadius??`14px`};for(let[t,r]of Object.entries(n))e.wrapper.style.setProperty(t,r)},x=()=>c.theme?.overlayOpacity===void 0?{}:{overlayOpacity:c.theme.overlayOpacity},S=e=>d.value||!e&&g(),C=async(e=!1)=>{if(S(e))return;y();let t=h;d.value=!0;try{let{driver:e}=await import(`driver.js`);if(t!==h)return;let n=c.steps.filter(e=>!e.skipIf?.()&&(!c.skipMissingElements||!e.element||o(e.element)));if(!n.length)return;let r=`close`,i=0,a=!1,u=!1,d=e=>{e.nextButton.disabled=u,e.previousButton.disabled=u},f=()=>{a||(a=!0,p===S&&(p=null,m=void 0),r===`complete`?(_(),l(`complete`)):r!==`dispose`&&(r===`skip`&&l(`skip`,i),l(`close`,i)))},g=()=>{S.destroy(),f()},v=()=>{u||(S.isLastStep()?(r=`complete`,g()):S.moveNext())},y=x(),S=e({popoverClass:`c-guide-popover ${c.popoverClass}`.trim(),animate:c.animate&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,showProgress:c.showProgress,progressText:`{{current}} / {{total}}`,allowClose:c.allowClose,allowKeyboardControl:c.keyboard,skipMissingElement:c.skipMissingElements,...y,doneBtnText:c.doneBtnText,nextBtnText:c.nextBtnText,prevBtnText:c.prevBtnText,steps:n.map(e=>({element:e.element?()=>o(e.element):void 0,popover:{...e.popover,description:s(e)},onHighlightStarted:(t,n,{state:r})=>{u=!0,i=r.activeIndex??i,e.onHighlightStarted?.(t,e),l(`step-change`,i,e)},onHighlighted:()=>{u=!1;let{popover:e}=S.getState();e&&d(e)},onDeselected:t=>e.onDeselected?.(t,e)})),onPopoverRender:e=>{if(b(e),d(e),c.showSkipButton&&c.allowClose){let t=document.createElement(`button`);t.type=`button`,t.className=`c-guide-skip-btn`,t.textContent=c.skipBtnText,t.addEventListener(`click`,()=>{r=`skip`,g()}),e.footer.prepend(t)}},onNextClick:v,onPrevClick:()=>{u||S.movePrevious()},onDestroyStarted:g,onDestroyed:f});p=S,m=()=>{r=`dispose`,g()},l(`start`),t===h&&S.drive()}catch(e){t===h&&(y(),l(`error`,e))}finally{t===h&&(d.value=!1)}};return(0,n.onBeforeUnmount)(y),(0,n.watch)(()=>c.steps,y),(0,n.watch)([u,()=>c.theme],()=>{let e=p?.getState().popover;e&&b(e)},{deep:!0}),i({startGuide:C,stopGuide:y,resetCompleted:v,isCompleted:g}),(t,i)=>c.showTrigger?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(r.NTooltip),{key:0,placement:`bottom`,trigger:`hover`},{trigger:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(r.NButton),{text:``,loading:d.value,"aria-label":c.triggerTooltip,onClick:i[0]||=e=>C(!0)},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(e.t,{name:c.triggerIcon,size:18},null,8,[`name`])]),_:1},8,[`loading`,`aria-label`])]),default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`span`,null,(0,n.toDisplayString)(c.triggerTooltip),1)]),_:1})):(0,n.createCommentVNode)(`v-if`,!0)}});var l=t.t(c,[[`__scopeId`,`data-v-1dcaf6fa`]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
package/dist/C_Guide2.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./C_Icon2.js";import{computed as t,createBlock as n,createCommentVNode as r,createElementVNode as i,createVNode as a,defineComponent as o,onBeforeUnmount as s,openBlock as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{NButton as f,NTooltip as p}from"naive-ui";import{driver as m}from"driver.js";const h=o({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`step-change`],setup(o,{expose:h,emit:g}){let _=o,v=g,y=null,b=t(()=>`${_.persistence?.keyPrefix??`c_guide`}_completed`),x=()=>{if(!_.persistence?.enabled)return!1;try{return localStorage.getItem(b.value)===`true`}catch{return!1}},S=()=>{if(_.persistence?.enabled)try{localStorage.setItem(b.value,`true`)}catch{}},C=()=>{try{localStorage.removeItem(b.value)}catch{}},w=()=>_.steps.filter(e=>!e.skipIf?.()),T=()=>_.popoverClass||``,E=(e=!1)=>{if(!e&&x())return;let t=w();if(!t.length){console.warn(`[C_Guide] 未提供引导步骤(steps),请通过 :steps prop 传入。`);return}y?.destroy();let n=0,r=!1,i=_.theme?.overlayOpacity===void 0?{}:{overlayOpacity:_.theme.overlayOpacity},a=m({popoverClass:T(),animate:_.animate,showProgress:_.showProgress,allowClose:_.allowClose,allowKeyboardControl:_.keyboard,...i,doneBtnText:_.doneBtnText,nextBtnText:_.nextBtnText,prevBtnText:_.prevBtnText,steps:t.map(e=>({element:e.element,popover:e.popover})),onPopoverRender:e=>{_.theme?.popoverBgColor&&(e.wrapper.style.backgroundColor=_.theme.popoverBgColor),_.theme?.popoverTextColor&&(e.wrapper.style.color=_.theme.popoverTextColor),_.theme?.borderRadius&&(e.wrapper.style.borderRadius=_.theme.borderRadius),_.theme?.primaryColor&&(e.nextButton.style.backgroundColor=_.theme.primaryColor,e.nextButton.style.borderColor=_.theme.primaryColor)},onHighlightStarted:(e,r,{state:i})=>{n=i.activeIndex??n;let a=t[n];a&&(a.onHighlightStarted?.(e,a),v(`step-change`,n,a))},onDeselected:e=>{let r=t[n];r?.onDeselected?.(e,r)},onNextClick:()=>{a.isLastStep()?(r=!0,a.destroy()):a.moveNext()},onDestroyStarted:()=>{r?(S(),v(`complete`)):v(`close`,n),y=null,a.destroy()}});v(`start`),y=a,a.drive()};return s(()=>{y?.destroy(),y=null}),h({startGuide:E,resetCompleted:C,isCompleted:x}),(t,o)=>_.showTrigger?(c(),n(u(p),{key:0,placement:`bottom`,trigger:`hover`},{trigger:d(()=>[a(u(f),{text:``,onClick:o[0]||=e=>E()},{default:d(()=>[a(e,{name:_.triggerIcon,size:18},null,8,[`name`])]),_:1})]),default:d(()=>[i(`span`,null,l(_.triggerTooltip),1)]),_:1})):r(`v-if`,!0)}});export{h as t};
1
+ import{t as e}from"./C_Icon2.js";import{t}from"./export-helper.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementVNode as a,createVNode as o,defineComponent as s,onBeforeUnmount as c,openBlock as l,ref as u,toDisplayString as d,unref as f,watch as p,withCtx as m}from"vue";import{NButton as h,NTooltip as g,useThemeVars as _}from"naive-ui";const v={navigation:`<rect x="34" y="12" width="56" height="72" rx="6" fill="currentColor" opacity=".12"/><path d="M46 30h30M46 48h30M46 66h20"/><rect x="108" y="12" width="118" height="72" rx="6" fill="currentColor" opacity=".07"/><path d="M122 32h64M122 48h90M122 64h74"/>`,search:`<rect x="28" y="26" width="204" height="44" rx="10" fill="currentColor" opacity=".09"/><circle cx="56" cy="46" r="8"/><path d="m62 52 6 6M86 44h104M86 55h70"/>`,tabs:`<rect x="28" y="24" width="204" height="56" rx="6" fill="currentColor" opacity=".07"/><rect x="40" y="16" width="58" height="26" rx="6" fill="currentColor" opacity=".2"/><path d="M50 29h25m10-3 6 6m0-6-6 6M112 29h38M166 29h38M44 56h100M44 67h144"/>`,account:`<circle cx="60" cy="48" r="22" fill="currentColor" opacity=".12"/><circle cx="60" cy="41" r="6"/><path d="M49 60c0-13 22-13 22 0M94 40h40m-8-6 8 6-8 6M94 58h40m-32-6-8 6 8 6"/><rect x="154" y="20" width="62" height="56" rx="6" fill="currentColor" opacity=".09"/><path d="M168 36h34M168 48h34M168 60h22"/>`,overview:`<rect x="28" y="14" width="204" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M42 30h76M42 42h52"/><rect x="42" y="54" width="48" height="16" rx="4"/><rect x="106" y="54" width="48" height="16" rx="4"/><rect x="170" y="54" width="48" height="16" rx="4"/>`,notification:`<circle cx="130" cy="48" r="36" fill="currentColor" opacity=".07"/><path d="M109 63h42l-6-10V40a15 15 0 0 0-30 0v13l-6 10ZM124 71h12"/><circle cx="150" cy="26" r="8" fill="currentColor" opacity=".3"/>`,fullscreen:`<rect x="50" y="14" width="160" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M66 40V28h20M174 28h20v12M66 56v12h20M174 68h20V56"/><rect x="106" y="34" width="48" height="28" rx="4"/>`,language:`<rect x="54" y="18" width="72" height="54" rx="8" fill="currentColor" opacity=".1"/><rect x="134" y="24" width="72" height="54" rx="8" fill="currentColor" opacity=".07"/><path d="M70 34h40M90 27v7M79 34c2 15 9 22 27 28M101 34c-3 15-13 24-28 29M151 64l16-27 16 27M158 53h18"/>`,theme:`<circle cx="78" cy="48" r="15" fill="currentColor" opacity=".12"/><path d="M78 24v-6M78 78v-6M54 48h-6M108 48h-6M61 31l-5-5M100 70l-5-5M61 65l-5 5M100 26l-5 5M168 22a26 26 0 1 0 28 42 26 26 0 0 1-28-42Z"/>`,settings:`<rect x="44" y="14" width="172" height="68" rx="8" fill="currentColor" opacity=".07"/><path d="M62 31h136M62 48h136M62 65h136"/><circle cx="94" cy="31" r="5" fill="currentColor"/><circle cx="168" cy="48" r="5" fill="currentColor"/><circle cx="124" cy="65" r="5" fill="currentColor"/>`};function y(e){return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<window.innerWidth&&e.top<window.innerHeight}function b(e){if(!(!e||typeof document>`u`))return(typeof e==`string`?Array.from(document.querySelectorAll(e)):[typeof e==`function`?e():e]).find(e=>{if(!e?.isConnected)return!1;let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView?.getComputedStyle(e);return y(t)&&n?.visibility!==`hidden`})}function x(e){let{illustration:t}=e.popover,n=t&&v[t];return n?`<div class="c-guide-figure"><svg viewBox="0 0 260 96" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">${n}</svg></div><div class="c-guide-copy">${e.popover.description}</div>`:e.popover.description}var S=t(s({name:`C_Guide`,__name:`index`,props:{steps:{default:()=>[]},doneBtnText:{default:`完成`},nextBtnText:{default:`下一步`},prevBtnText:{default:`上一步`},showSkipButton:{type:Boolean,default:!0},skipBtnText:{default:`跳过引导`},showProgress:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},allowClose:{type:Boolean,default:!0},skipMissingElements:{type:Boolean,default:!0},theme:{},persistence:{},popoverClass:{default:`driverjs-theme`},showTrigger:{type:Boolean,default:!0},triggerTooltip:{default:`功能引导`},triggerIcon:{default:`mdi:sign-routes`}},emits:[`start`,`complete`,`close`,`skip`,`step-change`,`error`],setup(t,{expose:s,emit:v}){let y=t,S=v,C=_(),w=u(!1),T=n(()=>`${y.persistence?.keyPrefix??`c_guide`}_completed`),E=null,D,O=0,k=()=>{if(!y.persistence?.enabled)return!1;try{return localStorage.getItem(T.value)===`true`}catch{return!1}},A=()=>{if(y.persistence?.enabled)try{localStorage.setItem(T.value,`true`)}catch{}},j=()=>{try{localStorage.removeItem(T.value)}catch{}},M=()=>{O++,w.value=!1;let e=D;D=void 0,e?.()},N=e=>{let t=y.theme??{},n={"--c-guide-bg":t.popoverBgColor??C.value.popoverColor,"--c-guide-text":t.popoverTextColor??C.value.textColor1,"--c-guide-text-secondary":t.popoverTextColor??C.value.textColor2,"--c-guide-text-muted":C.value.textColor3,"--c-guide-primary":t.primaryColor??C.value.primaryColor,"--c-guide-primary-hover":t.primaryColor??C.value.primaryColorHover,"--c-guide-border":C.value.borderColor,"--c-guide-radius":t.borderRadius??`14px`};for(let[t,r]of Object.entries(n))e.wrapper.style.setProperty(t,r)},P=()=>y.theme?.overlayOpacity===void 0?{}:{overlayOpacity:y.theme.overlayOpacity},F=e=>w.value||!e&&k(),I=async(e=!1)=>{if(F(e))return;M();let t=O;w.value=!0;try{let{driver:e}=await import(`driver.js`);if(t!==O)return;let n=y.steps.filter(e=>!e.skipIf?.()&&(!y.skipMissingElements||!e.element||b(e.element)));if(!n.length)return;let r=`close`,i=0,a=!1,o=!1,s=e=>{e.nextButton.disabled=o,e.previousButton.disabled=o},c=()=>{a||(a=!0,E===f&&(E=null,D=void 0),r===`complete`?(A(),S(`complete`)):r!==`dispose`&&(r===`skip`&&S(`skip`,i),S(`close`,i)))},l=()=>{f.destroy(),c()},u=()=>{o||(f.isLastStep()?(r=`complete`,l()):f.moveNext())},d=P(),f=e({popoverClass:`c-guide-popover ${y.popoverClass}`.trim(),animate:y.animate&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,showProgress:y.showProgress,progressText:`{{current}} / {{total}}`,allowClose:y.allowClose,allowKeyboardControl:y.keyboard,skipMissingElement:y.skipMissingElements,...d,doneBtnText:y.doneBtnText,nextBtnText:y.nextBtnText,prevBtnText:y.prevBtnText,steps:n.map(e=>({element:e.element?()=>b(e.element):void 0,popover:{...e.popover,description:x(e)},onHighlightStarted:(t,n,{state:r})=>{o=!0,i=r.activeIndex??i,e.onHighlightStarted?.(t,e),S(`step-change`,i,e)},onHighlighted:()=>{o=!1;let{popover:e}=f.getState();e&&s(e)},onDeselected:t=>e.onDeselected?.(t,e)})),onPopoverRender:e=>{if(N(e),s(e),y.showSkipButton&&y.allowClose){let t=document.createElement(`button`);t.type=`button`,t.className=`c-guide-skip-btn`,t.textContent=y.skipBtnText,t.addEventListener(`click`,()=>{r=`skip`,l()}),e.footer.prepend(t)}},onNextClick:u,onPrevClick:()=>{o||f.movePrevious()},onDestroyStarted:l,onDestroyed:c});E=f,D=()=>{r=`dispose`,l()},S(`start`),t===O&&f.drive()}catch(e){t===O&&(M(),S(`error`,e))}finally{t===O&&(w.value=!1)}};return c(M),p(()=>y.steps,M),p([C,()=>y.theme],()=>{let e=E?.getState().popover;e&&N(e)},{deep:!0}),s({startGuide:I,stopGuide:M,resetCompleted:j,isCompleted:k}),(t,n)=>y.showTrigger?(l(),r(f(g),{key:0,placement:`bottom`,trigger:`hover`},{trigger:m(()=>[o(f(h),{text:``,loading:w.value,"aria-label":y.triggerTooltip,onClick:n[0]||=e=>I(!0)},{default:m(()=>[o(e,{name:y.triggerIcon,size:18},null,8,[`name`])]),_:1},8,[`loading`,`aria-label`])]),default:m(()=>[a(`span`,null,d(y.triggerTooltip),1)]),_:1})):i(`v-if`,!0)}}),[[`__scopeId`,`data-v-1dcaf6fa`]]);export{S as t};
@@ -110,21 +110,21 @@ declare const __VLS_export: vue.DefineComponent<CronProps, {
110
110
  reset: typeof handleReset;
111
111
  validate: () => CronValidation;
112
112
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
113
- "update:modelValue": (value: string) => any;
114
113
  change: (value: string) => any;
114
+ "update:modelValue": (value: string) => any;
115
115
  "validation-change": (result: CronValidation) => any;
116
116
  }, string, vue.PublicProps, Readonly<CronProps> & Readonly<{
117
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
118
117
  onChange?: ((value: string) => any) | undefined;
118
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
119
119
  "onValidation-change"?: ((result: CronValidation) => any) | undefined;
120
120
  }>, {
121
121
  modelValue: string;
122
- height: string | number;
123
122
  disabled: boolean;
124
- showPreview: boolean;
125
123
  previewCount: number;
126
124
  showTemplates: boolean;
125
+ showPreview: boolean;
127
126
  showSecond: boolean;
127
+ height: string | number;
128
128
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
129
129
  declare const _default: typeof __VLS_export;
130
130
  //#endregion
@@ -110,21 +110,21 @@ declare const __VLS_export: vue.DefineComponent<CronProps, {
110
110
  reset: typeof handleReset;
111
111
  validate: () => CronValidation;
112
112
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
113
- "update:modelValue": (value: string) => any;
114
113
  change: (value: string) => any;
114
+ "update:modelValue": (value: string) => any;
115
115
  "validation-change": (result: CronValidation) => any;
116
116
  }, string, vue.PublicProps, Readonly<CronProps> & Readonly<{
117
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
118
117
  onChange?: ((value: string) => any) | undefined;
118
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
119
119
  "onValidation-change"?: ((result: CronValidation) => any) | undefined;
120
120
  }>, {
121
121
  modelValue: string;
122
- height: string | number;
123
122
  disabled: boolean;
124
- showPreview: boolean;
125
123
  previewCount: number;
126
124
  showTemplates: boolean;
125
+ showPreview: boolean;
127
126
  showSecond: boolean;
127
+ height: string | number;
128
128
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
129
129
  declare const _default: typeof __VLS_export;
130
130
  //#endregion
@@ -112,19 +112,19 @@ interface FormulaEditorExpose {
112
112
  //#endregion
113
113
  //#region src/components/C_FormulaEditor/index.vue.d.ts
114
114
  declare const __VLS_export: vue.DefineComponent<FormulaEditorProps, FormulaEditorExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
115
- "update:modelValue": (value: string) => any;
116
115
  change: (value: string) => any;
116
+ "update:modelValue": (value: string) => any;
117
117
  "validation-change": (result: FormulaValidation) => any;
118
118
  }, string, vue.PublicProps, Readonly<FormulaEditorProps> & Readonly<{
119
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
120
119
  onChange?: ((value: string) => any) | undefined;
120
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
121
121
  "onValidation-change"?: ((result: FormulaValidation) => any) | undefined;
122
122
  }>, {
123
+ placeholder: string;
123
124
  modelValue: string;
124
- height: string | number;
125
125
  disabled: boolean;
126
- placeholder: string;
127
126
  showPreview: boolean;
127
+ height: string | number;
128
128
  variables: FormulaVariable[];
129
129
  functions: FormulaFunction[];
130
130
  sampleData: Record<string, number | string | boolean>;
@@ -112,19 +112,19 @@ interface FormulaEditorExpose {
112
112
  //#endregion
113
113
  //#region src/components/C_FormulaEditor/index.vue.d.ts
114
114
  declare const __VLS_export: vue.DefineComponent<FormulaEditorProps, FormulaEditorExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
115
- "update:modelValue": (value: string) => any;
116
115
  change: (value: string) => any;
116
+ "update:modelValue": (value: string) => any;
117
117
  "validation-change": (result: FormulaValidation) => any;
118
118
  }, string, vue.PublicProps, Readonly<FormulaEditorProps> & Readonly<{
119
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
120
119
  onChange?: ((value: string) => any) | undefined;
120
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
121
121
  "onValidation-change"?: ((result: FormulaValidation) => any) | undefined;
122
122
  }>, {
123
+ placeholder: string;
123
124
  modelValue: string;
124
- height: string | number;
125
125
  disabled: boolean;
126
- placeholder: string;
127
126
  showPreview: boolean;
127
+ height: string | number;
128
128
  variables: FormulaVariable[];
129
129
  functions: FormulaFunction[];
130
130
  sampleData: Record<string, number | string | boolean>;
@@ -155,8 +155,8 @@ interface NotificationCenterExpose {
155
155
  //#region src/components/C_NotificationCenter/index.vue.d.ts
156
156
  declare const __VLS_export: vue.DefineComponent<NotificationCenterProps, NotificationCenterExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
157
157
  delete: (ids: string[]) => any;
158
- itemClick: (message: NotificationMessage) => any;
159
158
  read: (ids: string[]) => any;
159
+ itemClick: (message: NotificationMessage) => any;
160
160
  allRead: (category?: NotificationCategory | undefined) => any;
161
161
  unreadChange: (count: number) => any;
162
162
  wsStatusChange: (status: WSConnectionStatus) => any;
@@ -164,19 +164,19 @@ declare const __VLS_export: vue.DefineComponent<NotificationCenterProps, Notific
164
164
  navigate: (url: string) => any;
165
165
  }, string, vue.PublicProps, Readonly<NotificationCenterProps> & Readonly<{
166
166
  onDelete?: ((ids: string[]) => any) | undefined;
167
- onItemClick?: ((message: NotificationMessage) => any) | undefined;
168
167
  onRead?: ((ids: string[]) => any) | undefined;
168
+ onItemClick?: ((message: NotificationMessage) => any) | undefined;
169
169
  onAllRead?: ((category?: NotificationCategory | undefined) => any) | undefined;
170
170
  onUnreadChange?: ((count: number) => any) | undefined;
171
171
  onWsStatusChange?: ((status: WSConnectionStatus) => any) | undefined;
172
172
  onNewMessage?: ((message: NotificationMessage) => any) | undefined;
173
173
  onNavigate?: ((url: string) => any) | undefined;
174
174
  }>, {
175
- storageKey: string;
176
- pageSize: number;
177
175
  desktopNotification: boolean;
178
176
  maxBadgeCount: number;
179
177
  pollingInterval: number;
178
+ pageSize: number;
179
+ storageKey: string;
180
180
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
181
181
  declare const _default: typeof __VLS_export;
182
182
  //#endregion
@@ -155,8 +155,8 @@ interface NotificationCenterExpose {
155
155
  //#region src/components/C_NotificationCenter/index.vue.d.ts
156
156
  declare const __VLS_export: vue.DefineComponent<NotificationCenterProps, NotificationCenterExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
157
157
  delete: (ids: string[]) => any;
158
- itemClick: (message: NotificationMessage) => any;
159
158
  read: (ids: string[]) => any;
159
+ itemClick: (message: NotificationMessage) => any;
160
160
  allRead: (category?: NotificationCategory | undefined) => any;
161
161
  unreadChange: (count: number) => any;
162
162
  wsStatusChange: (status: WSConnectionStatus) => any;
@@ -164,19 +164,19 @@ declare const __VLS_export: vue.DefineComponent<NotificationCenterProps, Notific
164
164
  navigate: (url: string) => any;
165
165
  }, string, vue.PublicProps, Readonly<NotificationCenterProps> & Readonly<{
166
166
  onDelete?: ((ids: string[]) => any) | undefined;
167
- onItemClick?: ((message: NotificationMessage) => any) | undefined;
168
167
  onRead?: ((ids: string[]) => any) | undefined;
168
+ onItemClick?: ((message: NotificationMessage) => any) | undefined;
169
169
  onAllRead?: ((category?: NotificationCategory | undefined) => any) | undefined;
170
170
  onUnreadChange?: ((count: number) => any) | undefined;
171
171
  onWsStatusChange?: ((status: WSConnectionStatus) => any) | undefined;
172
172
  onNewMessage?: ((message: NotificationMessage) => any) | undefined;
173
173
  onNavigate?: ((url: string) => any) | undefined;
174
174
  }>, {
175
- storageKey: string;
176
- pageSize: number;
177
175
  desktopNotification: boolean;
178
176
  maxBadgeCount: number;
179
177
  pollingInterval: number;
178
+ pageSize: number;
179
+ storageKey: string;
180
180
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
181
181
  declare const _default: typeof __VLS_export;
182
182
  //#endregion
@@ -196,29 +196,29 @@ type __VLS_Slots = {} & {
196
196
  area?: (props: typeof __VLS_11) => any;
197
197
  };
198
198
  declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
199
- error: (file: UploadFileItem, error: Error) => any;
200
199
  change: (fileList: UploadFileItem[]) => any;
201
- success: (file: UploadFileItem, response: unknown) => any;
202
200
  progress: (file: UploadFileItem, percent: number) => any;
201
+ error: (file: UploadFileItem, error: Error) => any;
202
+ success: (file: UploadFileItem, response: unknown) => any;
203
203
  remove: (file: UploadFileItem) => any;
204
204
  finish: (fileList: UploadFileItem[]) => any;
205
205
  exceed: (files: File[], fileList: UploadFileItem[]) => any;
206
206
  }, string, vue.PublicProps, Readonly<UploadProps> & Readonly<{
207
- onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
208
207
  onChange?: ((fileList: UploadFileItem[]) => any) | undefined;
209
- onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
210
208
  onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
209
+ onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
210
+ onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
211
211
  onRemove?: ((file: UploadFileItem) => any) | undefined;
212
212
  onFinish?: ((fileList: UploadFileItem[]) => any) | undefined;
213
213
  onExceed?: ((files: File[], fileList: UploadFileItem[]) => any) | undefined;
214
214
  }>, {
215
- data: Record<string, unknown>;
216
215
  disabled: boolean;
217
216
  draggable: boolean;
218
- multiple: boolean;
219
217
  action: string;
218
+ data: Record<string, unknown>;
220
219
  maxSize: number;
221
220
  headers: Record<string, string>;
221
+ multiple: boolean;
222
222
  directory: boolean;
223
223
  accept: string;
224
224
  maxCount: number;
@@ -196,29 +196,29 @@ type __VLS_Slots = {} & {
196
196
  area?: (props: typeof __VLS_11) => any;
197
197
  };
198
198
  declare const __VLS_base: vue.DefineComponent<UploadProps, UploadExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
199
- error: (file: UploadFileItem, error: Error) => any;
200
199
  change: (fileList: UploadFileItem[]) => any;
201
- success: (file: UploadFileItem, response: unknown) => any;
202
200
  progress: (file: UploadFileItem, percent: number) => any;
201
+ error: (file: UploadFileItem, error: Error) => any;
202
+ success: (file: UploadFileItem, response: unknown) => any;
203
203
  remove: (file: UploadFileItem) => any;
204
204
  finish: (fileList: UploadFileItem[]) => any;
205
205
  exceed: (files: File[], fileList: UploadFileItem[]) => any;
206
206
  }, string, vue.PublicProps, Readonly<UploadProps> & Readonly<{
207
- onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
208
207
  onChange?: ((fileList: UploadFileItem[]) => any) | undefined;
209
- onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
210
208
  onProgress?: ((file: UploadFileItem, percent: number) => any) | undefined;
209
+ onError?: ((file: UploadFileItem, error: Error) => any) | undefined;
210
+ onSuccess?: ((file: UploadFileItem, response: unknown) => any) | undefined;
211
211
  onRemove?: ((file: UploadFileItem) => any) | undefined;
212
212
  onFinish?: ((fileList: UploadFileItem[]) => any) | undefined;
213
213
  onExceed?: ((files: File[], fileList: UploadFileItem[]) => any) | undefined;
214
214
  }>, {
215
- data: Record<string, unknown>;
216
215
  disabled: boolean;
217
216
  draggable: boolean;
218
- multiple: boolean;
219
217
  action: string;
218
+ data: Record<string, unknown>;
220
219
  maxSize: number;
221
220
  headers: Record<string, string>;
221
+ multiple: boolean;
222
222
  directory: boolean;
223
223
  accept: string;
224
224
  maxCount: number;
@@ -258,11 +258,11 @@ type PlayerInstance = InstanceType<typeof xgplayer.default>;
258
258
  //#endregion
259
259
  //#region src/components/C_VideoPlayer/index.vue.d.ts
260
260
  declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
261
- ended: () => any;
262
- error: (error: Error) => any;
263
261
  ready: () => any;
262
+ error: (error: Error) => any;
264
263
  stateChange: (state: PlayerState) => any;
265
264
  timeUpdate: (currentTime: number, duration: number) => any;
265
+ ended: () => any;
266
266
  qualityChange: (quality: QualityLevel) => any;
267
267
  rateChange: (rate: number) => any;
268
268
  fullscreenChange: (isFullscreen: boolean) => any;
@@ -271,11 +271,11 @@ declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExp
271
271
  chapterChange: (chapter: Chapter) => any;
272
272
  progressUpdate: (data: ProgressData) => any;
273
273
  }, string, vue.PublicProps, Readonly<VideoPlayerProps> & Readonly<{
274
- onEnded?: (() => any) | undefined;
275
- onError?: ((error: Error) => any) | undefined;
276
274
  onReady?: (() => any) | undefined;
275
+ onError?: ((error: Error) => any) | undefined;
277
276
  onStateChange?: ((state: PlayerState) => any) | undefined;
278
277
  onTimeUpdate?: ((currentTime: number, duration: number) => any) | undefined;
278
+ onEnded?: (() => any) | undefined;
279
279
  onQualityChange?: ((quality: QualityLevel) => any) | undefined;
280
280
  onRateChange?: ((rate: number) => any) | undefined;
281
281
  onFullscreenChange?: ((isFullscreen: boolean) => any) | undefined;
@@ -258,11 +258,11 @@ type PlayerInstance = InstanceType<typeof xgplayer.default>;
258
258
  //#endregion
259
259
  //#region src/components/C_VideoPlayer/index.vue.d.ts
260
260
  declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
261
- ended: () => any;
262
- error: (error: Error) => any;
263
261
  ready: () => any;
262
+ error: (error: Error) => any;
264
263
  stateChange: (state: PlayerState) => any;
265
264
  timeUpdate: (currentTime: number, duration: number) => any;
265
+ ended: () => any;
266
266
  qualityChange: (quality: QualityLevel) => any;
267
267
  rateChange: (rate: number) => any;
268
268
  fullscreenChange: (isFullscreen: boolean) => any;
@@ -271,11 +271,11 @@ declare const __VLS_export: vue.DefineComponent<VideoPlayerProps, VideoPlayerExp
271
271
  chapterChange: (chapter: Chapter) => any;
272
272
  progressUpdate: (data: ProgressData) => any;
273
273
  }, string, vue.PublicProps, Readonly<VideoPlayerProps> & Readonly<{
274
- onEnded?: (() => any) | undefined;
275
- onError?: ((error: Error) => any) | undefined;
276
274
  onReady?: (() => any) | undefined;
275
+ onError?: ((error: Error) => any) | undefined;
277
276
  onStateChange?: ((state: PlayerState) => any) | undefined;
278
277
  onTimeUpdate?: ((currentTime: number, duration: number) => any) | undefined;
278
+ onEnded?: (() => any) | undefined;
279
279
  onQualityChange?: ((quality: QualityLevel) => any) | undefined;
280
280
  onRateChange?: ((rate: number) => any) | undefined;
281
281
  onFullscreenChange?: ((isFullscreen: boolean) => any) | undefined;