@deepseek-ai/dsh-client-ui-schedule 0.2.1-rc.5 → 0.2.2-alpha.3

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 (39) hide show
  1. package/README.i18n.yaml +19 -19
  2. package/README.md +28 -36
  3. package/README.zh.md +26 -34
  4. package/lib/client.js +15570 -3670
  5. package/lib/types/client/ClockPicker.d.ts +3 -3
  6. package/lib/types/client/DeleteToast.d.ts +26 -11
  7. package/lib/types/client/DeliveryHistory.d.ts +12 -6
  8. package/lib/types/client/NewSessionLimit.d.ts +12 -0
  9. package/lib/types/client/RuleSelectRow.d.ts +22 -0
  10. package/lib/types/client/ScheduleCatalogAction.d.ts +9 -4
  11. package/lib/types/client/ScheduleEmptyIllustration.d.ts +12 -0
  12. package/lib/types/client/ScheduleTaskTab.d.ts +2 -1
  13. package/lib/types/client/TaskDetail.d.ts +71 -96
  14. package/lib/types/client/TaskEditorFields.d.ts +54 -0
  15. package/lib/types/client/TaskManagerPage.d.ts +18 -4
  16. package/lib/types/client/TaskMenu.d.ts +3 -2
  17. package/lib/types/client/TaskRuleControls.d.ts +50 -0
  18. package/lib/types/client/catalog-source.d.ts +5 -2
  19. package/lib/types/client/clear-ended.d.ts +33 -0
  20. package/lib/types/client/editor-store.d.ts +32 -0
  21. package/lib/types/client/editor-timing.d.ts +47 -0
  22. package/lib/types/client/frequency-locales.d.ts +386 -2
  23. package/lib/types/client/index.d.ts +4 -4
  24. package/lib/types/client/locales.d.ts +490 -10
  25. package/lib/types/client/relative-clock.d.ts +8 -2
  26. package/lib/types/client/schedule-format.d.ts +16 -5
  27. package/lib/types/client/session-link.d.ts +1 -22
  28. package/lib/types/client/session-schedule-state.d.ts +13 -29
  29. package/lib/types/client/task-cron.d.ts +0 -65
  30. package/lib/types/client/task-manager-locales.d.ts +1386 -51
  31. package/lib/types/client/task-record.d.ts +30 -0
  32. package/locale/de.json +6 -0
  33. package/locale/es.json +6 -0
  34. package/locale/fr.json +6 -0
  35. package/locale/ja.json +6 -0
  36. package/locale/pt.json +6 -0
  37. package/locale/ru.json +6 -0
  38. package/package.json +25 -22
  39. package/lib/types/client/task-timing.d.ts +0 -96
@@ -1,31 +1,15 @@
1
1
  /**
2
- * One Session's scheduled-task state for the ambient surfaces: the Sidebar
3
- * row mark and the row hover-card task section.
2
+ * One Session's scheduled-task state for its header, Sidebar row mark, and hover card.
4
3
  *
5
- * Both project the ONE Host catalog the page already owns — `schedule/catalog()`
6
- * returns active and ended tasks with their originating `sessionId` — so N
4
+ * These views project the Host catalog the page already owns — `schedule/catalog()`
5
+ * returns every Host task with its target and involved Sessions — so N
7
6
  * visible rows share one Remote read and follow one `schedule/changed`
8
- * invalidation instead of issuing a query per row. The Session-header catalog
9
- * keeps its own per-Session `schedule/list` source because it also lists the
10
- * open Session's tasks.
7
+ * invalidation instead of issuing a query per row or header.
11
8
  */
12
- import type { Context as ClientContext } from '@deepseek-ai/cordis';
13
9
  import type { HostObservable, SnapshotSelectorHook } from '@deepseek-ai/dsh-client-ui-slots';
14
- import type { ScheduleCatalogEntry } from '@deepseek-ai/dsh-schedule/client';
15
10
  import type { SessionId } from '@deepseek-ai/dsh-session/types';
16
- import { type CatalogInjected, type CatalogSnapshot } from './catalog-source.ts';
17
- /** Per-Session source factory handed to the Session-header catalog occupant. */
18
- export type SessionScheduleSourceFactory = (sessionId: SessionId) => CatalogInjected;
19
- /**
20
- * Create the durable reminder source for one Session.
21
- *
22
- * The stored read is `schedule/list`, which admits only tasks whose durable
23
- * status is active; loading and error reads carry no authoritative answer.
24
- * @param ctx - client context carrying the Remote schedule face.
25
- * @param sessionId - Session whose tasks are read; reading never activates it.
26
- * @returns observable catalog plus its mutation callbacks.
27
- */
28
- export declare function createSessionScheduleSource(ctx: ClientContext, sessionId: SessionId): CatalogInjected;
11
+ import type { ScheduleCatalogEntry } from '@deepseek-ai/dsh-schedule/client';
12
+ import type { CatalogSnapshot } from './catalog-source.ts';
29
13
  /** Selector hook the renderer binds from a slot's `hooks.catalog` observable. */
30
14
  export type SessionScheduleCatalogHook = SnapshotSelectorHook<CatalogSnapshot<ScheduleCatalogEntry>>;
31
15
  /** Shared Host catalog observable an ambient surface injects through its slot. */
@@ -40,13 +24,13 @@ export interface SessionScheduleFacts {
40
24
  /**
41
25
  * Project the shared Host catalog onto one Session's active tasks.
42
26
  *
43
- * `schedule/catalog()` returns active and ended tasks for every Session, so
44
- * both facts come from this one snapshot filtered by `sessionId` and
45
- * `status === 'active'`. A read that never settled answers no active task; a
46
- * refresh republishes `loading` over the records of the last successful read, and
47
- * the Host emits `schedule/changed` after every delivery, so following `status`
48
- * here would blank a Session's mark for each roundtrip. An ended-only Session
49
- * lists nothing.
27
+ * `schedule/catalog()` returns every Host task in every lifecycle state, so
28
+ * both facts come from this one snapshot filtered to the tasks that target or
29
+ * involve the Session with `status === 'active'`. A read that never settled
30
+ * answers no active task; a refresh republishes `loading` over the records of
31
+ * the last successful read, and the Host emits `schedule/changed` after every
32
+ * delivery, so following `status` here would blank a Session's mark for each
33
+ * roundtrip. A Session whose tasks are all paused or ended lists nothing.
50
34
  * @param snapshot - shared Host catalog snapshot.
51
35
  * @param sessionId - Session whose facts are selected.
52
36
  * @returns this Session's active-task facts.
@@ -47,70 +47,5 @@ export declare function parseCronExpression(expression: string): ParsedCron | un
47
47
  * @returns localized sentence, for example `Mon–Fri at 09:00` or `Every 15 minutes`.
48
48
  */
49
49
  export declare function cronPreview(parsed: ParsedCron, t: CronDescriptionTranslator, locale: string): string;
50
- /** One structured cron shape the Run time card's builder edits as rows. */
51
- export type CronBuilderState = {
52
- /** Runs every `step` minutes of every hour and day. */
53
- readonly kind: 'minutely';
54
- /** Whole minutes between runs, 1 through 59. */
55
- readonly step: number;
56
- } | {
57
- /** Runs at one minute of every `step` hours, every day. */
58
- readonly kind: 'hourly';
59
- /** Whole hours between runs, 1 through 23. */
60
- readonly step: number;
61
- /** Minute of each matched hour, 0 through 59. */
62
- readonly minute: number;
63
- } | {
64
- /** Runs once a day at one wall-clock time. */
65
- readonly kind: 'daily';
66
- /** Hour of that time, 0 through 23. */
67
- readonly hour: number;
68
- /** Minute of that hour, 0 through 59. */
69
- readonly minute: number;
70
- } | {
71
- /** Runs on chosen weekdays at one wall-clock time. */
72
- readonly kind: 'weekly';
73
- /** ISO weekdays, Monday 1 through Sunday 7; never empty. */
74
- readonly weekdays: readonly number[];
75
- /** Hour of that time, 0 through 23. */
76
- readonly hour: number;
77
- /** Minute of that hour, 0 through 59. */
78
- readonly minute: number;
79
- } | {
80
- /** Runs on chosen days of every month at one wall-clock time. */
81
- readonly kind: 'monthly';
82
- /** Days of the month, 1 through 31, ascending; never empty. */
83
- readonly days: readonly number[];
84
- /** Hour of that time, 0 through 23. */
85
- readonly hour: number;
86
- /** Minute of that hour, 0 through 59. */
87
- readonly minute: number;
88
- };
89
- /**
90
- * Recognize the structured shape one parsed expression states, when one does.
91
- *
92
- * Every shape requires an unrestricted month. Exactly one of the two day fields
93
- * may restrict: a restricted weekday beside a star day-of-month is a weekly
94
- * rule, a restricted day-of-month beside a star weekday is a monthly rule, and
95
- * both restricting is unrecognized because each restriction matches
96
- * independently under the Host's Vixie union rule. Only a literal star states a
97
- * day field with no restriction: a written-out full set such as `0-6` or `1-31`
98
- * stays a weekly or monthly rule with every value selected, so toggling the
99
- * last pill on never collapses its row. Stepped shapes accept any uniform
100
- * full-range step on the clock, spelled with a star or written out, since both
101
- * match the same minutes or hours.
102
- * @param parsed - parsed cron expression.
103
- * @returns the shape the builder can edit, or undefined for the raw-expression fallback.
104
- */
105
- export declare function recognizeCronShape(parsed: ParsedCron): CronBuilderState | undefined;
106
- /**
107
- * Spell one builder shape as the five-field expression a save submits.
108
- *
109
- * `recognizeCronShape` recognizes every expression this returns as the same
110
- * shape, so a builder edit never falls back to the raw-expression row.
111
- * @param state - builder shape to spell.
112
- * @returns the expression stating that shape.
113
- */
114
- export declare function cronShapeExpression(state: CronBuilderState): string;
115
50
  export {};
116
51
  //# sourceMappingURL=task-cron.d.ts.map