hyper-scheduler 1.1.0 → 1.1.2

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 (35) hide show
  1. package/README.md +1 -1
  2. package/dist/{devtools-ByJU-Gv1.js → devtools-B029_YOS.js} +99 -67
  3. package/dist/devtools-CRTqUH_8.cjs +1 -0
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/index.umd.cjs +1 -1
  7. package/package.json +2 -2
  8. package/public/logo.svg +54 -0
  9. package/dist/devtools-Bxtz0rO_.cjs +0 -1
  10. package/docs/.vitepress/cache/deps/_metadata.json +0 -31
  11. package/docs/.vitepress/cache/deps/chunk-EKBJ2FPM.js +0 -12798
  12. package/docs/.vitepress/cache/deps/chunk-EKBJ2FPM.js.map +0 -7
  13. package/docs/.vitepress/cache/deps/package.json +0 -3
  14. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4505
  15. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
  16. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -9731
  17. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
  18. package/docs/.vitepress/cache/deps/vue.js +0 -347
  19. package/docs/.vitepress/cache/deps/vue.js.map +0 -7
  20. package/docs/.vitepress/config.ts +0 -56
  21. package/docs/.vitepress/theme/components/DemoFrame.vue +0 -111
  22. package/docs/.vitepress/theme/custom.css +0 -6
  23. package/docs/.vitepress/theme/index.ts +0 -10
  24. package/docs/README.md +0 -120
  25. package/docs/api/devtools.md +0 -245
  26. package/docs/api/index.md +0 -178
  27. package/docs/api/scheduler.md +0 -342
  28. package/docs/api/task.md +0 -439
  29. package/docs/api/types.md +0 -365
  30. package/docs/examples/index.md +0 -342
  31. package/docs/guide/best-practices.md +0 -436
  32. package/docs/guide/core-concepts.md +0 -363
  33. package/docs/guide/getting-started.md +0 -176
  34. package/docs/index.md +0 -33
  35. /package/{docs/public → dist}/logo.svg +0 -0
@@ -1,347 +0,0 @@
1
- import {
2
- BaseTransition,
3
- BaseTransitionPropsValidators,
4
- Comment,
5
- DeprecationTypes,
6
- EffectScope,
7
- ErrorCodes,
8
- ErrorTypeStrings,
9
- Fragment,
10
- KeepAlive,
11
- ReactiveEffect,
12
- Static,
13
- Suspense,
14
- Teleport,
15
- Text,
16
- TrackOpTypes,
17
- Transition,
18
- TransitionGroup,
19
- TriggerOpTypes,
20
- VueElement,
21
- assertNumber,
22
- callWithAsyncErrorHandling,
23
- callWithErrorHandling,
24
- camelize,
25
- capitalize,
26
- cloneVNode,
27
- compatUtils,
28
- compile,
29
- computed,
30
- createApp,
31
- createBaseVNode,
32
- createBlock,
33
- createCommentVNode,
34
- createElementBlock,
35
- createHydrationRenderer,
36
- createPropsRestProxy,
37
- createRenderer,
38
- createSSRApp,
39
- createSlots,
40
- createStaticVNode,
41
- createTextVNode,
42
- createVNode,
43
- customRef,
44
- defineAsyncComponent,
45
- defineComponent,
46
- defineCustomElement,
47
- defineEmits,
48
- defineExpose,
49
- defineModel,
50
- defineOptions,
51
- defineProps,
52
- defineSSRCustomElement,
53
- defineSlots,
54
- devtools,
55
- effect,
56
- effectScope,
57
- getCurrentInstance,
58
- getCurrentScope,
59
- getCurrentWatcher,
60
- getTransitionRawChildren,
61
- guardReactiveProps,
62
- h,
63
- handleError,
64
- hasInjectionContext,
65
- hydrate,
66
- hydrateOnIdle,
67
- hydrateOnInteraction,
68
- hydrateOnMediaQuery,
69
- hydrateOnVisible,
70
- initCustomFormatter,
71
- initDirectivesForSSR,
72
- inject,
73
- isMemoSame,
74
- isProxy,
75
- isReactive,
76
- isReadonly,
77
- isRef,
78
- isRuntimeOnly,
79
- isShallow,
80
- isVNode,
81
- markRaw,
82
- mergeDefaults,
83
- mergeModels,
84
- mergeProps,
85
- nextTick,
86
- nodeOps,
87
- normalizeClass,
88
- normalizeProps,
89
- normalizeStyle,
90
- onActivated,
91
- onBeforeMount,
92
- onBeforeUnmount,
93
- onBeforeUpdate,
94
- onDeactivated,
95
- onErrorCaptured,
96
- onMounted,
97
- onRenderTracked,
98
- onRenderTriggered,
99
- onScopeDispose,
100
- onServerPrefetch,
101
- onUnmounted,
102
- onUpdated,
103
- onWatcherCleanup,
104
- openBlock,
105
- patchProp,
106
- popScopeId,
107
- provide,
108
- proxyRefs,
109
- pushScopeId,
110
- queuePostFlushCb,
111
- reactive,
112
- readonly,
113
- ref,
114
- registerRuntimeCompiler,
115
- render,
116
- renderList,
117
- renderSlot,
118
- resolveComponent,
119
- resolveDirective,
120
- resolveDynamicComponent,
121
- resolveFilter,
122
- resolveTransitionHooks,
123
- setBlockTracking,
124
- setDevtoolsHook,
125
- setTransitionHooks,
126
- shallowReactive,
127
- shallowReadonly,
128
- shallowRef,
129
- ssrContextKey,
130
- ssrUtils,
131
- stop,
132
- toDisplayString,
133
- toHandlerKey,
134
- toHandlers,
135
- toRaw,
136
- toRef,
137
- toRefs,
138
- toValue,
139
- transformVNodeArgs,
140
- triggerRef,
141
- unref,
142
- useAttrs,
143
- useCssModule,
144
- useCssVars,
145
- useHost,
146
- useId,
147
- useModel,
148
- useSSRContext,
149
- useShadowRoot,
150
- useSlots,
151
- useTemplateRef,
152
- useTransitionState,
153
- vModelCheckbox,
154
- vModelDynamic,
155
- vModelRadio,
156
- vModelSelect,
157
- vModelText,
158
- vShow,
159
- version,
160
- warn,
161
- watch,
162
- watchEffect,
163
- watchPostEffect,
164
- watchSyncEffect,
165
- withAsyncContext,
166
- withCtx,
167
- withDefaults,
168
- withDirectives,
169
- withKeys,
170
- withMemo,
171
- withModifiers,
172
- withScopeId
173
- } from "./chunk-EKBJ2FPM.js";
174
- export {
175
- BaseTransition,
176
- BaseTransitionPropsValidators,
177
- Comment,
178
- DeprecationTypes,
179
- EffectScope,
180
- ErrorCodes,
181
- ErrorTypeStrings,
182
- Fragment,
183
- KeepAlive,
184
- ReactiveEffect,
185
- Static,
186
- Suspense,
187
- Teleport,
188
- Text,
189
- TrackOpTypes,
190
- Transition,
191
- TransitionGroup,
192
- TriggerOpTypes,
193
- VueElement,
194
- assertNumber,
195
- callWithAsyncErrorHandling,
196
- callWithErrorHandling,
197
- camelize,
198
- capitalize,
199
- cloneVNode,
200
- compatUtils,
201
- compile,
202
- computed,
203
- createApp,
204
- createBlock,
205
- createCommentVNode,
206
- createElementBlock,
207
- createBaseVNode as createElementVNode,
208
- createHydrationRenderer,
209
- createPropsRestProxy,
210
- createRenderer,
211
- createSSRApp,
212
- createSlots,
213
- createStaticVNode,
214
- createTextVNode,
215
- createVNode,
216
- customRef,
217
- defineAsyncComponent,
218
- defineComponent,
219
- defineCustomElement,
220
- defineEmits,
221
- defineExpose,
222
- defineModel,
223
- defineOptions,
224
- defineProps,
225
- defineSSRCustomElement,
226
- defineSlots,
227
- devtools,
228
- effect,
229
- effectScope,
230
- getCurrentInstance,
231
- getCurrentScope,
232
- getCurrentWatcher,
233
- getTransitionRawChildren,
234
- guardReactiveProps,
235
- h,
236
- handleError,
237
- hasInjectionContext,
238
- hydrate,
239
- hydrateOnIdle,
240
- hydrateOnInteraction,
241
- hydrateOnMediaQuery,
242
- hydrateOnVisible,
243
- initCustomFormatter,
244
- initDirectivesForSSR,
245
- inject,
246
- isMemoSame,
247
- isProxy,
248
- isReactive,
249
- isReadonly,
250
- isRef,
251
- isRuntimeOnly,
252
- isShallow,
253
- isVNode,
254
- markRaw,
255
- mergeDefaults,
256
- mergeModels,
257
- mergeProps,
258
- nextTick,
259
- nodeOps,
260
- normalizeClass,
261
- normalizeProps,
262
- normalizeStyle,
263
- onActivated,
264
- onBeforeMount,
265
- onBeforeUnmount,
266
- onBeforeUpdate,
267
- onDeactivated,
268
- onErrorCaptured,
269
- onMounted,
270
- onRenderTracked,
271
- onRenderTriggered,
272
- onScopeDispose,
273
- onServerPrefetch,
274
- onUnmounted,
275
- onUpdated,
276
- onWatcherCleanup,
277
- openBlock,
278
- patchProp,
279
- popScopeId,
280
- provide,
281
- proxyRefs,
282
- pushScopeId,
283
- queuePostFlushCb,
284
- reactive,
285
- readonly,
286
- ref,
287
- registerRuntimeCompiler,
288
- render,
289
- renderList,
290
- renderSlot,
291
- resolveComponent,
292
- resolveDirective,
293
- resolveDynamicComponent,
294
- resolveFilter,
295
- resolveTransitionHooks,
296
- setBlockTracking,
297
- setDevtoolsHook,
298
- setTransitionHooks,
299
- shallowReactive,
300
- shallowReadonly,
301
- shallowRef,
302
- ssrContextKey,
303
- ssrUtils,
304
- stop,
305
- toDisplayString,
306
- toHandlerKey,
307
- toHandlers,
308
- toRaw,
309
- toRef,
310
- toRefs,
311
- toValue,
312
- transformVNodeArgs,
313
- triggerRef,
314
- unref,
315
- useAttrs,
316
- useCssModule,
317
- useCssVars,
318
- useHost,
319
- useId,
320
- useModel,
321
- useSSRContext,
322
- useShadowRoot,
323
- useSlots,
324
- useTemplateRef,
325
- useTransitionState,
326
- vModelCheckbox,
327
- vModelDynamic,
328
- vModelRadio,
329
- vModelSelect,
330
- vModelText,
331
- vShow,
332
- version,
333
- warn,
334
- watch,
335
- watchEffect,
336
- watchPostEffect,
337
- watchSyncEffect,
338
- withAsyncContext,
339
- withCtx,
340
- withDefaults,
341
- withDirectives,
342
- withKeys,
343
- withMemo,
344
- withModifiers,
345
- withScopeId
346
- };
347
- //# sourceMappingURL=vue.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [],
5
- "mappings": "",
6
- "names": []
7
- }
@@ -1,56 +0,0 @@
1
- import { defineConfig } from 'vitepress';
2
-
3
- export default defineConfig({
4
- base: '/hyper-scheduler/', // 设置 GitHub Pages 的基础路径
5
- lang: 'zh-CN', // 设置语言为中文
6
- title: 'Hyper Scheduler', // 更新标题
7
- description: '轻量级全局任务调度 JavaScript 库。', // 更新描述
8
- head: [
9
- ['link', { rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }]
10
- ],
11
- themeConfig: {
12
- logo: '/logo.svg',
13
- socialLinks: [
14
- { icon: 'github', link: 'https://github.com/CrazyMrYan/hyper-scheduler' }
15
- ],
16
- nav: [
17
- { text: '指南', link: '/guide/getting-started' }, // 更新导航文本
18
- { text: 'API 参考', link: '/api/scheduler' }, // 更新导航文本
19
- { text: '示例演示', link: '/examples/' },
20
- // 多版本导航占位符 - 实际实现可能需要自定义组件或更复杂的配置
21
- {
22
- text: '版本',
23
- items: [
24
- { text: 'v1.0.0 (最新)', link: '/' },
25
- // { text: 'v0.9.0', link: '/v0.9.0/' } // 示例历史版本
26
- ]
27
- }
28
- ],
29
- sidebar: [
30
- {
31
- text: '指南',
32
- items: [
33
- { text: '快速开始', link: '/guide/getting-started' },
34
- { text: '核心概念', link: '/guide/core-concepts' },
35
- { text: '最佳实践', link: '/guide/best-practices' }
36
- ]
37
- },
38
- {
39
- text: '示例演示',
40
- items: [
41
- { text: '双线程心跳监控', link: '/examples/' }
42
- ]
43
- },
44
- {
45
- text: 'API 参考',
46
- items: [
47
- { text: '总览', link: '/api/' },
48
- { text: 'Scheduler', link: '/api/scheduler' },
49
- { text: 'Task', link: '/api/task' },
50
- { text: 'DevTools', link: '/api/devtools' },
51
- { text: '类型定义', link: '/api/types' }
52
- ]
53
- }
54
- ]
55
- }
56
- });
@@ -1,111 +0,0 @@
1
- <script setup>
2
- import { defineProps, computed, ref, onMounted } from 'vue';
3
- import { useData } from 'vitepress';
4
-
5
- const { site } = useData();
6
-
7
- const props = defineProps({
8
- path: {
9
- type: String,
10
- required: true
11
- },
12
- devPort: {
13
- type: Number,
14
- default: null
15
- },
16
- devPath: {
17
- type: String,
18
- default: '/'
19
- },
20
- title: {
21
- type: String,
22
- default: 'Demo'
23
- }
24
- });
25
-
26
- const src = computed(() => {
27
- const isDev = import.meta.env.DEV;
28
-
29
- // 如果在本地开发环境,且指定了端口,则使用 localhost
30
- if (isDev && props.devPort) {
31
- return `http://localhost:${props.devPort}${props.devPath}`;
32
- }
33
-
34
- // 否则(生产环境构建或未指定端口),使用相对路径,并加上 base
35
- const base = site.value.base || '/';
36
- // 移除 path 开头的 /,避免双重斜杠或绝对路径问题
37
- const cleanPath = props.path.startsWith('/') ? props.path.slice(1) : props.path;
38
- // 确保 base 以 / 结尾
39
- const cleanBase = base.endsWith('/') ? base : `${base}/`;
40
-
41
- return `${cleanBase}${cleanPath}`;
42
- });
43
- </script>
44
-
45
- <template>
46
- <div class="demo-frame-container">
47
- <div class="demo-header">
48
- <span class="dot red"></span>
49
- <span class="dot yellow"></span>
50
- <span class="dot green"></span>
51
- <span class="title">{{ title }}</span>
52
- <a :href="src" target="_blank" class="open-btn" title="在新窗口打开">↗</a>
53
- </div>
54
- <iframe :src="src" class="demo-frame"></iframe>
55
- </div>
56
- </template>
57
-
58
- <style scoped>
59
- .demo-frame-container {
60
- border: 1px solid var(--vp-c-divider);
61
- border-radius: 8px;
62
- overflow: hidden;
63
- margin: 16px 0;
64
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
65
- background: var(--vp-c-bg);
66
- }
67
-
68
- .demo-header {
69
- background: var(--vp-c-bg-soft);
70
- padding: 8px 12px;
71
- display: flex;
72
- align-items: center;
73
- border-bottom: 1px solid var(--vp-c-divider);
74
- }
75
-
76
- .dot {
77
- width: 10px;
78
- height: 10px;
79
- border-radius: 50%;
80
- margin-right: 6px;
81
- }
82
-
83
- .red { background-color: #ff5f56; }
84
- .yellow { background-color: #ffbd2e; }
85
- .green { background-color: #27c93f; }
86
-
87
- .title {
88
- margin-left: 8px;
89
- font-size: 12px;
90
- color: var(--vp-c-text-2);
91
- font-family: monospace;
92
- flex: 1;
93
- }
94
-
95
- .open-btn {
96
- text-decoration: none;
97
- color: var(--vp-c-text-2);
98
- font-size: 14px;
99
- }
100
-
101
- .open-btn:hover {
102
- color: var(--vp-c-brand);
103
- }
104
-
105
- .demo-frame {
106
- width: 100%;
107
- height: 500px;
108
- border: none;
109
- display: block;
110
- }
111
- </style>
@@ -1,6 +0,0 @@
1
- /* 自定义样式 */
2
- :root {
3
- --vp-c-brand: #3b82f6;
4
- --vp-c-brand-light: #60a5fa;
5
- --vp-c-brand-dark: #2563eb;
6
- }
@@ -1,10 +0,0 @@
1
- import DefaultTheme from 'vitepress/theme';
2
- import DemoFrame from './components/DemoFrame.vue';
3
- import './custom.css';
4
-
5
- export default {
6
- extends: DefaultTheme,
7
- enhanceApp({ app }) {
8
- app.component('DemoFrame', DemoFrame);
9
- }
10
- };
package/docs/README.md DELETED
@@ -1,120 +0,0 @@
1
- # Hyper Scheduler 文档
2
-
3
- ## 文档结构
4
-
5
- ```
6
- docs/
7
- ├── index.md # 首页
8
- ├── guide/ # 指南
9
- │ ├── getting-started.md # 快速开始
10
- │ ├── core-concepts.md # 核心概念
11
- │ └── best-practices.md # 最佳实践
12
- └── api/ # API 参考
13
- ├── index.md # API 总览
14
- ├── scheduler.md # Scheduler API
15
- ├── task.md # Task API
16
- ├── devtools.md # DevTools API
17
- └── types.md # 类型定义
18
- ```
19
-
20
- ## 文档说明
21
-
22
- ### 指南 (Guide)
23
-
24
- 面向用户的教程和概念说明:
25
-
26
- - **快速开始** - 安装、基础用法、完整示例
27
- - **核心概念** - 调度器、任务、状态、事件系统等核心概念
28
- - **最佳实践** - 任务设计、错误处理、性能优化等实践建议
29
-
30
- ### API 参考 (API Reference)
31
-
32
- 详细的 API 文档:
33
-
34
- - **API 总览** - 快速查找和索引
35
- - **Scheduler** - 调度器类的所有方法和配置
36
- - **Task** - 任务定义、选项和运行时状态
37
- - **DevTools** - 调试工具配置和使用
38
- - **类型定义** - 完整的 TypeScript 类型
39
-
40
- ## 文档特点
41
-
42
- ### 1. 模块化组织
43
-
44
- - 按功能模块拆分文档
45
- - 每个 API 独立成页
46
- - 便于维护和查找
47
-
48
- ### 2. 清晰的层次结构
49
-
50
- - 指南:从简单到复杂
51
- - API:按类和功能分组
52
- - 类型:集中管理类型定义
53
-
54
- ### 3. 丰富的示例
55
-
56
- - 每个 API 都有使用示例
57
- - 包含常见模式和最佳实践
58
- - 提供完整的代码片段
59
-
60
- ### 4. 交叉引用
61
-
62
- - 相关文档之间互相链接
63
- - 便于深入学习和查找
64
-
65
- ## 本地预览
66
-
67
- ```bash
68
- # 启动文档开发服务器
69
- npm run docs:dev
70
-
71
- # 构建文档
72
- npm run docs:build
73
- ```
74
-
75
- ## 贡献指南
76
-
77
- ### 添加新文档
78
-
79
- 1. 在相应目录创建 Markdown 文件
80
- 2. 在 `.vitepress/config.ts` 中添加导航/侧边栏配置
81
- 3. 添加交叉引用链接
82
-
83
- ### 文档规范
84
-
85
- - 使用清晰的标题层次
86
- - 提供代码示例
87
- - 添加参数说明表格
88
- - 包含相关链接
89
-
90
- ### 示例格式
91
-
92
- ```markdown
93
- # API 名称
94
-
95
- 简短描述。
96
-
97
- ## 方法名
98
-
99
- 详细说明。
100
-
101
- \`\`\`typescript
102
- // 代码示例
103
- \`\`\`
104
-
105
- ### 参数
106
-
107
- | 参数 | 类型 | 说明 |
108
- |------|------|------|
109
- | ... | ... | ... |
110
-
111
- ### 示例
112
-
113
- \`\`\`typescript
114
- // 使用示例
115
- \`\`\`
116
-
117
- ## 相关链接
118
-
119
- - [相关文档](./link.md)
120
- ```