@mohou/panel 1.0.20

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 (113) hide show
  1. package/README.md +8 -0
  2. package/lib/types/chrome/hue.d.ts +3 -0
  3. package/lib/types/chrome/hue.d.ts.map +1 -0
  4. package/lib/types/gallery/card-style.d.ts +8 -0
  5. package/lib/types/gallery/card-style.d.ts.map +1 -0
  6. package/lib/types/gallery/client.d.ts +20 -0
  7. package/lib/types/gallery/client.d.ts.map +1 -0
  8. package/lib/types/gallery/desk.d.ts +16 -0
  9. package/lib/types/gallery/desk.d.ts.map +1 -0
  10. package/lib/types/gallery/list.d.ts +37 -0
  11. package/lib/types/gallery/list.d.ts.map +1 -0
  12. package/lib/types/gallery/sort.d.ts +24 -0
  13. package/lib/types/gallery/sort.d.ts.map +1 -0
  14. package/lib/types/gallery/state.d.ts +90 -0
  15. package/lib/types/gallery/state.d.ts.map +1 -0
  16. package/lib/types/gallery/tabs.d.ts +45 -0
  17. package/lib/types/gallery/tabs.d.ts.map +1 -0
  18. package/lib/types/gallery/view.d.ts +57 -0
  19. package/lib/types/gallery/view.d.ts.map +1 -0
  20. package/lib/types/history/client.d.ts +25 -0
  21. package/lib/types/history/client.d.ts.map +1 -0
  22. package/lib/types/history/state.d.ts +39 -0
  23. package/lib/types/history/state.d.ts.map +1 -0
  24. package/lib/types/history/view.d.ts +15 -0
  25. package/lib/types/history/view.d.ts.map +1 -0
  26. package/lib/types/index.d.ts +24 -0
  27. package/lib/types/index.d.ts.map +1 -0
  28. package/lib/types/labels.d.ts +267 -0
  29. package/lib/types/labels.d.ts.map +1 -0
  30. package/lib/types/settings/author-mcp-view.d.ts +15 -0
  31. package/lib/types/settings/author-mcp-view.d.ts.map +1 -0
  32. package/lib/types/settings/author-mcp.d.ts +4 -0
  33. package/lib/types/settings/author-mcp.d.ts.map +1 -0
  34. package/lib/types/settings/client.d.ts +198 -0
  35. package/lib/types/settings/client.d.ts.map +1 -0
  36. package/lib/types/settings/credentials-view.d.ts +15 -0
  37. package/lib/types/settings/credentials-view.d.ts.map +1 -0
  38. package/lib/types/settings/form.d.ts +27 -0
  39. package/lib/types/settings/form.d.ts.map +1 -0
  40. package/lib/types/settings/install-row.d.ts +10 -0
  41. package/lib/types/settings/install-row.d.ts.map +1 -0
  42. package/lib/types/settings/mcp-view.d.ts +14 -0
  43. package/lib/types/settings/mcp-view.d.ts.map +1 -0
  44. package/lib/types/settings/skill-dirs.d.ts +6 -0
  45. package/lib/types/settings/skill-dirs.d.ts.map +1 -0
  46. package/lib/types/settings/skill-install.d.ts +13 -0
  47. package/lib/types/settings/skill-install.d.ts.map +1 -0
  48. package/lib/types/settings/state.d.ts +94 -0
  49. package/lib/types/settings/state.d.ts.map +1 -0
  50. package/lib/types/settings/update-dialog.d.ts +56 -0
  51. package/lib/types/settings/update-dialog.d.ts.map +1 -0
  52. package/lib/types/settings/view.d.ts +26 -0
  53. package/lib/types/settings/view.d.ts.map +1 -0
  54. package/lib/types/storage/client.d.ts +15 -0
  55. package/lib/types/storage/client.d.ts.map +1 -0
  56. package/lib/types/storage/state.d.ts +42 -0
  57. package/lib/types/storage/state.d.ts.map +1 -0
  58. package/lib/types/storage/view.d.ts +16 -0
  59. package/lib/types/storage/view.d.ts.map +1 -0
  60. package/lib/types/surface/state.d.ts +42 -0
  61. package/lib/types/surface/state.d.ts.map +1 -0
  62. package/lib/types/surface/view.d.ts +34 -0
  63. package/lib/types/surface/view.d.ts.map +1 -0
  64. package/lib/types/theme/client.d.ts +45 -0
  65. package/lib/types/theme/client.d.ts.map +1 -0
  66. package/lib/types/theme/menu.d.ts +25 -0
  67. package/lib/types/theme/menu.d.ts.map +1 -0
  68. package/lib/types/theme/state.d.ts +46 -0
  69. package/lib/types/theme/state.d.ts.map +1 -0
  70. package/lib/types/theme/view.d.ts +16 -0
  71. package/lib/types/theme/view.d.ts.map +1 -0
  72. package/lib/types/ui/dialog.d.ts +12 -0
  73. package/lib/types/ui/dialog.d.ts.map +1 -0
  74. package/lib/types/ui/tooltip.d.ts +12 -0
  75. package/lib/types/ui/tooltip.d.ts.map +1 -0
  76. package/package.json +38 -0
  77. package/src/chrome/hue.ts +6 -0
  78. package/src/gallery/card-style.ts +27 -0
  79. package/src/gallery/client.ts +26 -0
  80. package/src/gallery/desk.tsx +54 -0
  81. package/src/gallery/list.ts +54 -0
  82. package/src/gallery/sort.ts +72 -0
  83. package/src/gallery/state.ts +229 -0
  84. package/src/gallery/tabs.ts +85 -0
  85. package/src/gallery/view.tsx +501 -0
  86. package/src/history/client.ts +27 -0
  87. package/src/history/state.ts +90 -0
  88. package/src/history/view.tsx +131 -0
  89. package/src/index.ts +61 -0
  90. package/src/labels.ts +536 -0
  91. package/src/settings/author-mcp-view.tsx +154 -0
  92. package/src/settings/author-mcp.ts +24 -0
  93. package/src/settings/client.ts +205 -0
  94. package/src/settings/credentials-view.tsx +195 -0
  95. package/src/settings/form.ts +27 -0
  96. package/src/settings/install-row.tsx +35 -0
  97. package/src/settings/mcp-view.tsx +793 -0
  98. package/src/settings/skill-dirs.ts +41 -0
  99. package/src/settings/skill-install.tsx +134 -0
  100. package/src/settings/state.ts +225 -0
  101. package/src/settings/update-dialog.tsx +207 -0
  102. package/src/settings/view.tsx +722 -0
  103. package/src/storage/client.ts +16 -0
  104. package/src/storage/state.ts +94 -0
  105. package/src/storage/view.tsx +190 -0
  106. package/src/surface/state.ts +72 -0
  107. package/src/surface/view.tsx +255 -0
  108. package/src/theme/client.ts +34 -0
  109. package/src/theme/menu.tsx +286 -0
  110. package/src/theme/state.ts +113 -0
  111. package/src/theme/view.tsx +73 -0
  112. package/src/ui/dialog.tsx +25 -0
  113. package/src/ui/tooltip.tsx +19 -0
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ ---
2
+ status: locked
3
+ updated: 2026-09-18
4
+ ---
5
+
6
+ Role: `consumer`.
7
+
8
+ Chrome strings, local state transitions, and the gallery view. The chrome stylesheet lives in this package and is not the author kit. The view calls an injected client. It does not name a host route and does not import Host. Product behavior: [docs/product/features.md](../../docs/product/features.md).
@@ -0,0 +1,3 @@
1
+ /** Stable hue from an app id. Used by gallery card art. */
2
+ export declare function galleryHue(id: string): number;
3
+ //# sourceMappingURL=hue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hue.d.ts","sourceRoot":"","sources":["../../../src/chrome/hue.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAI7C"}
@@ -0,0 +1,8 @@
1
+ import { type GalleryCardStyle } from './list.ts';
2
+ /** Fallback when nothing is stored. Not a host field. */
3
+ export declare const defaultCardStyle: GalleryCardStyle;
4
+ /** Last card style chosen in this browser. Not a host field. */
5
+ export declare function readCardStyle(): GalleryCardStyle;
6
+ /** Remember the choice across panel reloads. */
7
+ export declare function writeCardStyle(style: GalleryCardStyle): void;
8
+ //# sourceMappingURL=card-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-style.d.ts","sourceRoot":"","sources":["../../../src/gallery/card-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAIpE,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,EAAE,gBAA0B,CAAA;AAEzD,gEAAgE;AAChE,wBAAgB,aAAa,IAAI,gBAAgB,CAShD;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAM5D"}
@@ -0,0 +1,20 @@
1
+ import type { GalleryApp } from './list.ts';
2
+ /** Host calls the view may make. No route string lives here. */
3
+ export interface PanelClient {
4
+ list(): Promise<readonly GalleryApp[]>;
5
+ open(appId: string, title?: string): Promise<void>;
6
+ deleteApp(appId: string): Promise<void>;
7
+ reload?(appId: string): Promise<void>;
8
+ listTrash?(): Promise<readonly GalleryApp[]>;
9
+ undeleteApp?(appId: string): Promise<void>;
10
+ }
11
+ /** A client failure the view can tell from an empty list. */
12
+ export declare class PanelClientError extends Error {
13
+ readonly code: 'unreachable' | 'failed';
14
+ /**
15
+ * @param code - `unreachable` is not an empty gallery
16
+ * @param message - human text
17
+ */
18
+ constructor(code: 'unreachable' | 'failed', message: string);
19
+ }
20
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/gallery/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,gEAAgE;AAChE,MAAM,WAAW,WAAW;IAC1B,IAAI,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAA;IACtC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAClD,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,SAAS,CAAC,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAA;IAC5C,WAAW,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3C;AAED,6DAA6D;AAC7D,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,QAAQ,CAAA;IAEvC;;;OAGG;gBACS,IAAI,EAAE,aAAa,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM;CAK5D"}
@@ -0,0 +1,16 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface DeskChoice {
3
+ readonly id: string;
4
+ readonly name: string;
5
+ readonly icon?: 'library';
6
+ readonly mark?: string;
7
+ }
8
+ /** Glass switch for the home slot. It does not write the stored id. */
9
+ export declare function DeskBar(props: {
10
+ readonly label: string;
11
+ readonly choices: readonly DeskChoice[];
12
+ readonly selected: string;
13
+ readonly fit?: boolean;
14
+ onSelect(id: string): void;
15
+ }): ReactNode;
16
+ //# sourceMappingURL=desk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk.d.ts","sourceRoot":"","sources":["../../../src/gallery/desk.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEzE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,uEAAuE;AACvE,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAA;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B,GAAG,SAAS,CAoCZ"}
@@ -0,0 +1,37 @@
1
+ /** Card styles. Panel-local. Not a host field. */
2
+ export declare const galleryCardStyles: readonly ["glass", "stamp", "etch", "hero", "pulse", "list"];
3
+ export type GalleryCardStyle = (typeof galleryCardStyles)[number];
4
+ export interface GalleryApp {
5
+ readonly id: string;
6
+ readonly name: string;
7
+ readonly description: string;
8
+ readonly version: string;
9
+ readonly acronym: string;
10
+ readonly tags?: readonly string[];
11
+ readonly createdAt?: string;
12
+ readonly updatedAt?: string;
13
+ readonly activity?: {
14
+ readonly openCount: number;
15
+ readonly lastOpenedAt: string;
16
+ };
17
+ readonly kind?: 'workbench';
18
+ }
19
+ export type GalleryKind = 'unreachable' | 'failed' | 'empty' | 'none' | 'ready';
20
+ /**
21
+ * Search the visible card fields. An empty query returns the list unchanged.
22
+ * @param apps - host list
23
+ * @param query - panel-local search
24
+ */
25
+ export declare function filterGallery(apps: readonly GalleryApp[], query: string): GalleryApp[];
26
+ /**
27
+ * Host unreachable is not an empty gallery. An empty ready list is the empty state.
28
+ * @param input - the list call outcome
29
+ */
30
+ export declare function galleryKind(input: {
31
+ readonly reachable: boolean;
32
+ readonly failed?: string;
33
+ readonly apps: readonly GalleryApp[];
34
+ readonly query?: string;
35
+ }): GalleryKind;
36
+ export declare function isGalleryCardStyle(value: string): value is GalleryCardStyle;
37
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/gallery/list.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,eAAO,MAAM,iBAAiB,8DAA+D,CAAA;AAE7F,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAA;IACjF,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAC5B;AAED,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAE/E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,EAAE,CAQtF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,CAAA;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,WAAW,CAKd;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAE3E"}
@@ -0,0 +1,24 @@
1
+ import type { GalleryApp } from './list.ts';
2
+ /** Built-in orders for the workbench app list. */
3
+ export declare const appSortings: {
4
+ readonly createdTime: "created-time";
5
+ readonly updatedTime: "updated-time";
6
+ readonly heat: "heat";
7
+ };
8
+ export type AppSorting = typeof appSortings[keyof typeof appSortings];
9
+ export type SortDirection = 'asc' | 'desc';
10
+ /** The heat fields this sort reads. An id that is absent counts as zero opens. */
11
+ export interface SortHeat {
12
+ readonly lastOpenedAt: string;
13
+ readonly openCount: number;
14
+ }
15
+ /**
16
+ * Return a new array. Does not write the source.
17
+ * Heat uses `openCount`, then `lastOpenedAt`. A missing time sorts last in both directions.
18
+ * @param apps - the list to order
19
+ * @param sorting - created time, updated time, or heat
20
+ * @param direction - `asc` or `desc`
21
+ * @param heat - heat snapshot; ignored by the time sorts
22
+ */
23
+ export declare function sortApps(apps: readonly GalleryApp[], sorting: AppSorting, direction: SortDirection, heat: Readonly<Record<string, SortHeat>>): GalleryApp[];
24
+ //# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../src/gallery/sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,kDAAkD;AAClD,eAAO,MAAM,WAAW;;;;CAId,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,OAAO,WAAW,CAAC,MAAM,OAAO,WAAW,CAAC,CAAA;AAErE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAA;AAE1C,kFAAkF;AAClF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,SAAS,UAAU,EAAE,EAC3B,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,GACvC,UAAU,EAAE,CAOd"}
@@ -0,0 +1,90 @@
1
+ import type { PanelClient } from './client.ts';
2
+ import { type GalleryApp, type GalleryCardStyle, type GalleryKind } from './list.ts';
3
+ import { type PanelTabs, type DeletePrompt } from './tabs.ts';
4
+ export type PanelShell = 'standalone' | 'overlay';
5
+ export interface GalleryState {
6
+ readonly shell: PanelShell;
7
+ readonly cardStyle: GalleryCardStyle;
8
+ readonly query: string;
9
+ readonly reachable: boolean;
10
+ readonly failed?: string;
11
+ readonly apps: readonly GalleryApp[];
12
+ readonly tabs: PanelTabs;
13
+ readonly deletePrompt: DeletePrompt;
14
+ readonly deleteError?: string;
15
+ readonly openError?: string;
16
+ readonly pendingDeleteId?: string;
17
+ readonly trash: readonly GalleryApp[];
18
+ readonly trashFailed: boolean;
19
+ readonly frameError?: string;
20
+ }
21
+ export type GalleryAction = {
22
+ readonly type: 'unreachable';
23
+ } | {
24
+ readonly type: 'list-failed';
25
+ readonly message: string;
26
+ } | {
27
+ readonly type: 'listed';
28
+ readonly apps: readonly GalleryApp[];
29
+ } | {
30
+ readonly type: 'search';
31
+ readonly query: string;
32
+ } | {
33
+ readonly type: 'open';
34
+ readonly appId: string;
35
+ readonly title?: string;
36
+ } | {
37
+ readonly type: 'open-failed';
38
+ readonly message?: string;
39
+ } | {
40
+ readonly type: 'drop-app';
41
+ readonly appId: string;
42
+ } | {
43
+ readonly type: 'switch';
44
+ readonly index: number;
45
+ } | {
46
+ readonly type: 'close';
47
+ readonly index: number;
48
+ } | {
49
+ readonly type: 'ask-delete';
50
+ readonly appId: string;
51
+ } | {
52
+ readonly type: 'cancel-delete';
53
+ } | {
54
+ readonly type: 'delete-failed';
55
+ readonly message?: string;
56
+ } | {
57
+ readonly type: 'deleted';
58
+ readonly appId: string;
59
+ } | {
60
+ readonly type: 'card';
61
+ readonly cardStyle: GalleryCardStyle;
62
+ } | {
63
+ readonly type: 'trash';
64
+ readonly apps: readonly GalleryApp[];
65
+ } | {
66
+ readonly type: 'trash-failed';
67
+ } | {
68
+ readonly type: 'undeleted';
69
+ readonly appId: string;
70
+ } | {
71
+ readonly type: 'frame-error';
72
+ readonly message: string;
73
+ };
74
+ /** First view state. The gallery tab is open. */
75
+ export declare function galleryState(shell: PanelShell): GalleryState;
76
+ /**
77
+ * Panel view transition. Search, tabs, and delete confirmation stay in the existing functions.
78
+ * @param state - current view
79
+ * @param action - one user or client result
80
+ */
81
+ export declare function reduceGallery(state: GalleryState, action: GalleryAction): GalleryState;
82
+ /** Cards the gallery should show. Search does not change the host list. */
83
+ export declare function visibleApps(state: GalleryState): GalleryApp[];
84
+ /** Gallery chrome state. Unreachable is not empty. */
85
+ export declare function viewKind(state: GalleryState): GalleryKind;
86
+ /** Load the gallery. A thrown unreachable error is not an empty list. */
87
+ export declare function loadGallery(client: PanelClient, dispatch: (action: GalleryAction) => void): Promise<void>;
88
+ /** Load trash when the client can list it. */
89
+ export declare function loadTrash(client: PanelClient, dispatch: (action: GalleryAction) => void): Promise<void>;
90
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/gallery/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,aAAa,CAAA;AAChE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAEjB,MAAM,WAAW,CAAA;AAElB,OAAO,EAML,KAAK,SAAS,EAEd,KAAK,YAAY,EAClB,MAAM,WAAW,CAAA;AAElB,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,SAAS,CAAA;AAEjD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAA;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,CAAA;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAA;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;IACrC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,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 export interface GalleryTab {
7
+ readonly kind: 'gallery';
8
+ }
9
+ export type PanelTab = GalleryTab | AppTab;
10
+ export interface PanelTabs {
11
+ readonly tabs: readonly PanelTab[];
12
+ readonly active: number;
13
+ }
14
+ export interface TabChange {
15
+ readonly tabs: PanelTabs;
16
+ /** Tab switch never reloads the document. Opening an already open tab does not either. */
17
+ readonly reload: false;
18
+ }
19
+ /** The gallery tab is always present and is not closable. */
20
+ export declare function initialTabs(): PanelTabs;
21
+ /**
22
+ * Open or focus an app tab. Does not reload a document that is already open.
23
+ * @param state - current tabs
24
+ * @param appId - app to show
25
+ * @param title - optional tab title
26
+ */
27
+ export declare function openAppTab(state: PanelTabs, appId: string, title?: string): TabChange;
28
+ /**
29
+ * Switch tabs. This never reloads the document.
30
+ * @param state - current tabs
31
+ * @param index - tab index
32
+ */
33
+ export declare function switchTab(state: PanelTabs, index: number): TabChange;
34
+ /** Remove one app tab after a failed open. The gallery tab stays. */
35
+ export declare function dropAppTab(state: PanelTabs, appId: string): PanelTabs;
36
+ /**
37
+ * Close an app tab. The gallery tab stays.
38
+ * @param state - current tabs
39
+ * @param index - tab index
40
+ */
41
+ export declare function closeTab(state: PanelTabs, index: number): PanelTabs;
42
+ export type DeletePrompt = 'idle' | 'confirm' | 'failed';
43
+ /** Delete asks before the operation. Cancel returns to idle. A failure stays visible. */
44
+ export declare function deletePrompt(current: DeletePrompt, action: 'ask' | 'cancel' | 'fail'): DeletePrompt;
45
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/gallery/tabs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CACzB;AAED,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAA;AAE1C,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAA;CACvB;AAED,6DAA6D;AAC7D,wBAAgB,WAAW,IAAI,SAAS,CAEvC;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAUrF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAGpE;AAED,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAIrE;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAMnE;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;AAExD,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,YAAY,CAKnG"}
@@ -0,0 +1,57 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { PanelLabelMode, PanelLocale } from '../labels.ts';
3
+ import type { PanelClient } from './client.ts';
4
+ import { type GalleryCardStyle } from './list.ts';
5
+ import { type GalleryAction, type PanelShell, type GalleryState } from './state.ts';
6
+ /** What settings needs from the gallery. Card style is panel-local. */
7
+ export interface GalleryChrome {
8
+ readonly cardStyle: GalleryCardStyle;
9
+ setCard(style: GalleryCardStyle): void;
10
+ }
11
+ export type ThemeSlot = ReactNode | ((app: {
12
+ readonly id: string;
13
+ readonly title: string;
14
+ } | undefined) => ReactNode);
15
+ /**
16
+ * Gallery and tabs. The frame contents are injected. This package does not name a host route.
17
+ * @param props - client, chrome locale, and who embeds the panel
18
+ */
19
+ export declare function PanelGallery(props: {
20
+ readonly client: PanelClient;
21
+ readonly locale: PanelLocale;
22
+ readonly mode: PanelLabelMode;
23
+ readonly shell: PanelShell;
24
+ readonly frame?: (appId: string) => ReactNode;
25
+ readonly focus?: {
26
+ readonly appId: string;
27
+ readonly title?: string;
28
+ };
29
+ readonly onClosePanel?: () => void;
30
+ readonly tools?: ReactNode;
31
+ readonly themeOpen?: boolean;
32
+ readonly onToggleTheme?: () => void;
33
+ readonly theme?: ThemeSlot;
34
+ readonly onToggleSettings?: () => void;
35
+ readonly overlay?: (chrome: GalleryChrome) => ReactNode;
36
+ readonly defaultWorkbenchId?: string;
37
+ readonly onSetDefaultWorkbench?: (id: string) => void;
38
+ }): ReactNode;
39
+ /** Render one view state. Tests pass a state instead of waiting for an effect. */
40
+ export declare function GalleryBody(props: {
41
+ readonly state: GalleryState;
42
+ readonly dispatch: (action: GalleryAction) => void;
43
+ readonly client: PanelClient;
44
+ readonly locale: PanelLocale;
45
+ readonly mode: PanelLabelMode;
46
+ readonly frame?: (appId: string) => ReactNode;
47
+ readonly onClosePanel?: () => void;
48
+ readonly tools?: ReactNode;
49
+ readonly themeOpen?: boolean;
50
+ readonly onToggleTheme?: () => void;
51
+ readonly theme?: ThemeSlot;
52
+ readonly onToggleSettings?: () => void;
53
+ readonly overlay?: ReactNode;
54
+ readonly defaultWorkbenchId?: string;
55
+ readonly onSetDefaultWorkbench?: (id: string) => void;
56
+ }): ReactNode;
57
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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AAC,OAAO,CAAC,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IACpC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACtD,GAAG,SAAS,CAoQZ"}
@@ -0,0 +1,25 @@
1
+ /** One commit the history view can list. No route string lives here. */
2
+ export interface HistoryCommit {
3
+ readonly id: string;
4
+ readonly message: string;
5
+ readonly time: string;
6
+ readonly parentIds: readonly string[];
7
+ }
8
+ export interface HistoryFile {
9
+ readonly path: string;
10
+ readonly add: number;
11
+ readonly del: number;
12
+ readonly preview: string;
13
+ }
14
+ export interface HistoryDetail {
15
+ readonly message: string;
16
+ readonly time: string;
17
+ readonly parentIds: readonly string[];
18
+ readonly files: readonly HistoryFile[];
19
+ }
20
+ /** History reads. Absent means the control is hidden. */
21
+ export interface HistoryClient {
22
+ readHistory(appId: string): Promise<readonly HistoryCommit[]>;
23
+ readCommit(appId: string, commitId: string): Promise<HistoryDetail>;
24
+ }
25
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/history/client.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CACtC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAA;CACvC;AAED,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC,CAAA;IAC7D,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;CACpE"}
@@ -0,0 +1,39 @@
1
+ import type { HistoryClient, HistoryCommit, HistoryDetail } from './client.ts';
2
+ export interface HistoryState {
3
+ readonly commits: readonly HistoryCommit[];
4
+ readonly failed: boolean;
5
+ readonly selected?: string;
6
+ readonly detail?: HistoryDetail;
7
+ readonly detailFailed: boolean;
8
+ readonly error?: string;
9
+ readonly detailError?: string;
10
+ }
11
+ export type HistoryAction = {
12
+ readonly type: 'loaded';
13
+ readonly commits: readonly HistoryCommit[];
14
+ } | {
15
+ readonly type: 'failed';
16
+ readonly message?: string;
17
+ } | {
18
+ readonly type: 'select';
19
+ readonly commitId: string;
20
+ } | {
21
+ readonly type: 'detail';
22
+ readonly detail: HistoryDetail;
23
+ } | {
24
+ readonly type: 'detail-failed';
25
+ readonly message?: string;
26
+ };
27
+ /** Empty history before the load. */
28
+ export declare function historyState(): HistoryState;
29
+ /**
30
+ * History view transition. Read-only. Reset is not a panel action.
31
+ * @param state - current history
32
+ * @param action - one client result
33
+ */
34
+ export declare function reduceHistory(state: HistoryState, action: HistoryAction): HistoryState;
35
+ /** Load the commit list. A thrown error is a failed pane, not an empty history. */
36
+ export declare function loadHistory(client: HistoryClient, appId: string, dispatch: (action: HistoryAction) => void): Promise<void>;
37
+ /** Load one commit preview. */
38
+ export declare function loadCommit(client: HistoryClient, appId: string, commitId: string, dispatch: (action: HistoryAction) => void): Promise<void>;
39
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/history/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE9E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAA;IAC1C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,GACvE;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjE,qCAAqC;AACrC,wBAAgB,YAAY,IAAI,YAAY,CAE3C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,YAAY,CAetF;AAED,mFAAmF;AACnF,wBAAsB,WAAW,CAC/B,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GACxC,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,+BAA+B;AAC/B,wBAAsB,UAAU,CAC9B,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,GACxC,OAAO,CAAC,IAAI,CAAC,CAOf"}
@@ -0,0 +1,15 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type PanelLabelMode, type PanelLocale } from '../labels.ts';
3
+ import type { HistoryClient } from './client.ts';
4
+ /**
5
+ * Read-only history. Hidden when Host exposes no history client. No route string lives here.
6
+ * @param props - client, app, chrome locale, and the pane close control
7
+ */
8
+ export declare function PanelHistory(props: {
9
+ readonly client?: HistoryClient;
10
+ readonly appId: string;
11
+ readonly locale: PanelLocale;
12
+ readonly mode: PanelLabelMode;
13
+ readonly onClose?: () => void;
14
+ }): ReactNode;
15
+ //# sourceMappingURL=view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/history/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE7D,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/E,OAAO,KAAK,EAAE,aAAa,EAA8B,MAAM,aAAa,CAAA;AAI5E;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B,GAAG,SAAS,CAiDZ"}
@@ -0,0 +1,24 @@
1
+ /** Panel chrome labels. Not the app's own strings. @module @mohou/panel */
2
+ export declare const packageId: "@mohou/panel";
3
+ export { isPanelLocale, panelLocales, panelText, type PanelLabelKey, type PanelLabelMode, type PanelLocale, } from './labels.ts';
4
+ export { admitPanelPort, panelLanguageFields, panelPortBound, type PanelPortResult } from './settings/form.ts';
5
+ export { filterGallery, galleryCardStyles, galleryKind, isGalleryCardStyle, type GalleryApp, type GalleryCardStyle, type GalleryKind, } from './gallery/list.ts';
6
+ export { closeTab, deletePrompt, initialTabs, openAppTab, switchTab, type AppTab, type DeletePrompt, type PanelTab, type PanelTabs, type TabChange, } from './gallery/tabs.ts';
7
+ export { PanelClientError, type PanelClient } from './gallery/client.ts';
8
+ export { loadGallery, loadTrash, galleryState, reduceGallery, viewKind, visibleApps, type GalleryAction, type PanelShell, type GalleryState, } from './gallery/state.ts';
9
+ export { PanelGallery } from './gallery/view.tsx';
10
+ export { panelUpdateFailureCodes, type McpCheckResult, type McpServerDraft, type PanelAbout, type PanelCredential, type PanelCredentials, type PanelMcpFailure, type PanelMcpList, type PanelAuthorMcpAgent, type PanelAuthorMcpStatus, type PanelPolicy, type PanelPolicyWrite, type PanelProbe, type PanelRuntime, type PanelSettingsClient, type PanelSkillAgent, type PanelSkillStatus, type PanelUpdateAttempt, type PanelUpdateCheck, type PanelUpdateFailureCode } from './settings/client.ts';
11
+ export { loadSettings, reduceSettings, settingsDraft, settingsState, type SettingsAction, type SettingsState } from './settings/state.ts';
12
+ export { PanelSettings } from './settings/view.tsx';
13
+ export type { HistoryClient, HistoryCommit, HistoryDetail, HistoryFile } from './history/client.ts';
14
+ export { historyState, loadCommit, loadHistory, reduceHistory, type HistoryAction, type HistoryState } from './history/state.ts';
15
+ export { PanelHistory } from './history/view.tsx';
16
+ export type { StorageClient, StorageSummary, StorageTable } from './storage/client.ts';
17
+ export { loadStorage, loadTable, reduceStorage, storageState, type StorageAction, type StorageState } from './storage/state.ts';
18
+ export { PanelStorage } from './storage/view.tsx';
19
+ export type { IgnoredPalette, PaletteChip, ThemeClient, ThemePin } from './theme/client.ts';
20
+ export { loadPalettes, reduceTheme, savePin, themeState, type ThemeAction, type ThemeState } from './theme/state.ts';
21
+ export { PanelTheme } from './theme/view.tsx';
22
+ export { reduceSurface, surfaceState, panelSections, type PanelSection, type SurfaceAction, type SurfaceState } from './surface/state.ts';
23
+ export { PanelSurface, type PanelControls } from './surface/view.tsx';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,eAAO,MAAM,SAAS,EAAG,cAAuB,CAAA;AAEhD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,WAAW,GACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC9G,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,UAAU,EACV,SAAS,EACT,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,gBAAgB,EAA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