dsh-mobile 0.3.14 → 0.3.16
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.
- package/CHANGELOG.md +31 -0
- package/README.en.md +12 -9
- package/README.md +12 -9
- package/SECURITY.md +1 -1
- package/docs/DSH_0.1.5_LAN.md +27 -0
- package/lib/cli.js.map +1 -1
- package/lib/client.js +41 -8
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +13 -0
- package/lib/index.mjs +209 -27
- package/lib/index.mjs.map +1 -1
- package/lib/mobile-layout.js +193 -33
- package/lib/mobile-layout.js.map +1 -1
- package/package.json +14 -12
package/lib/mobile-layout.js
CHANGED
|
@@ -22,15 +22,58 @@ window.__ModuleLoader__.load({
|
|
|
22
22
|
});
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/mobile-layout.ts
|
|
25
|
+
/** Whether an optional service value supports the public right-Sidebar controls. */
|
|
26
|
+
function isSidebarRightControl(value) {
|
|
27
|
+
if (typeof value !== "object" || value === null) return false;
|
|
28
|
+
const candidate = value;
|
|
29
|
+
return typeof candidate.isExpanded === "function" && typeof candidate.toggleExpanded === "function";
|
|
30
|
+
}
|
|
25
31
|
/**
|
|
26
32
|
* Viewport width at which the dedicated layout treats the sidebar as a
|
|
27
33
|
* persistent desktop panel instead of an overlay drawer. Narrow screens
|
|
28
34
|
* keep the overlay behavior byte-for-byte.
|
|
29
35
|
*/
|
|
30
36
|
const WIDE_LAYOUT_MIN_WIDTH_PX = 900;
|
|
37
|
+
const RIGHTBAR_MIN_WIDTH_PX = 300;
|
|
38
|
+
const RIGHTBAR_MAX_WIDTH_PX = 460;
|
|
39
|
+
const RIGHTBAR_CENTER_MIN_WIDTH_PX = 400;
|
|
40
|
+
const RIGHTBAR_DEFAULT_RATIO = .45;
|
|
41
|
+
const SIDEBAR_EXPANDED_WIDTH_PX = 340;
|
|
42
|
+
const SIDEBAR_COLLAPSED_WIDTH_PX = 56;
|
|
31
43
|
function isWideViewportLayout(viewportWidth) {
|
|
32
44
|
return viewportWidth >= 900;
|
|
33
45
|
}
|
|
46
|
+
/** Preserve a readable conversation width before turning a requested right track into a docked column. */
|
|
47
|
+
function resolveMobileRightbarLayout(viewportWidth, sidebarOpen, track, fullscreen) {
|
|
48
|
+
const overlayWidth = Math.min(viewportWidth * .94, RIGHTBAR_MAX_WIDTH_PX);
|
|
49
|
+
if (!track || fullscreen || !isWideViewportLayout(viewportWidth) && sidebarOpen) return Object.freeze({
|
|
50
|
+
docked: false,
|
|
51
|
+
width: overlayWidth
|
|
52
|
+
});
|
|
53
|
+
const sidebarWidth = isWideViewportLayout(viewportWidth) && sidebarOpen ? SIDEBAR_EXPANDED_WIDTH_PX : SIDEBAR_COLLAPSED_WIDTH_PX;
|
|
54
|
+
const available = Math.floor(viewportWidth - sidebarWidth - RIGHTBAR_CENTER_MIN_WIDTH_PX);
|
|
55
|
+
if (available < RIGHTBAR_MIN_WIDTH_PX) return Object.freeze({
|
|
56
|
+
docked: false,
|
|
57
|
+
width: overlayWidth
|
|
58
|
+
});
|
|
59
|
+
const preferred = Math.min(RIGHTBAR_MAX_WIDTH_PX, Math.max(RIGHTBAR_MIN_WIDTH_PX, Math.round(viewportWidth * RIGHTBAR_DEFAULT_RATIO)));
|
|
60
|
+
return Object.freeze({
|
|
61
|
+
docked: true,
|
|
62
|
+
width: Math.min(preferred, available)
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/** Whether an overlay drawer needs the modal scrim without dimming a docked desktop panel. */
|
|
66
|
+
function isMobileScrimOpen(sidebarOpen, detailsModalOpen, wideViewport) {
|
|
67
|
+
return !wideViewport && sidebarOpen || detailsModalOpen;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Close the details drawer from its scrim, collapsing the DSH 0.1.5 right
|
|
71
|
+
* Sidebar first when that optional service owns the visible content.
|
|
72
|
+
*/
|
|
73
|
+
function closeDetailsFromScrim(sidebarRight, closeDetails) {
|
|
74
|
+
if (isSidebarRightControl(sidebarRight) && sidebarRight.isExpanded()) sidebarRight.toggleExpanded();
|
|
75
|
+
closeDetails();
|
|
76
|
+
}
|
|
34
77
|
/** Reads the live viewport; unknown environments (SSR, tests) stay narrow. */
|
|
35
78
|
function viewportIsWide() {
|
|
36
79
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
@@ -43,9 +86,14 @@ window.__ModuleLoader__.load({
|
|
|
43
86
|
var MobileLayoutController = class {
|
|
44
87
|
snapshot = Object.freeze({
|
|
45
88
|
sidebarOpen: viewportIsWide(),
|
|
46
|
-
detailsOpen: false
|
|
89
|
+
detailsOpen: false,
|
|
90
|
+
rightbarTrack: false,
|
|
91
|
+
rightbarFullscreen: false,
|
|
92
|
+
panelInfo: Object.freeze({ activePanelId: null })
|
|
47
93
|
});
|
|
48
94
|
listeners = /* @__PURE__ */ new Set();
|
|
95
|
+
hasMainPanel;
|
|
96
|
+
navigation = new AbortController();
|
|
49
97
|
subscribe = (listener) => {
|
|
50
98
|
this.listeners.add(listener);
|
|
51
99
|
return () => {
|
|
@@ -60,17 +108,73 @@ window.__ModuleLoader__.load({
|
|
|
60
108
|
this.update({ detailsOpen: true });
|
|
61
109
|
}
|
|
62
110
|
closeDetails() {
|
|
63
|
-
this.update({
|
|
111
|
+
this.update({
|
|
112
|
+
detailsOpen: false,
|
|
113
|
+
rightbarTrack: false,
|
|
114
|
+
rightbarFullscreen: false
|
|
115
|
+
});
|
|
64
116
|
}
|
|
65
117
|
closeSidebar() {
|
|
66
118
|
this.update({ sidebarOpen: false });
|
|
67
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Invalidate the previous navigation and hand back a fresh signal. The
|
|
122
|
+
* workspace controller wraps this around "open a workspace" and "fork a
|
|
123
|
+
* session" (dsh-client-ui-workspace) — the path behind the sidebar's
|
|
124
|
+
* new-session button. Without it startSession throws inside a
|
|
125
|
+
* `.catch(reason => console.warn('new session failed:', reason))`, so the
|
|
126
|
+
* button silently did nothing.
|
|
127
|
+
*/
|
|
128
|
+
beginNavigation() {
|
|
129
|
+
this.navigation.abort();
|
|
130
|
+
this.navigation = new AbortController();
|
|
131
|
+
return this.navigation.signal;
|
|
132
|
+
}
|
|
133
|
+
/** Invalidate pending navigations when this layout unloads. */
|
|
134
|
+
dispose() {
|
|
135
|
+
this.navigation.abort();
|
|
136
|
+
}
|
|
137
|
+
/** Bind panel validation to the live slot registry owned by this application. */
|
|
138
|
+
bindMainPanelRegistry(hasMainPanel) {
|
|
139
|
+
this.hasMainPanel = hasMainPanel;
|
|
140
|
+
return () => {
|
|
141
|
+
if (this.hasMainPanel === hasMainPanel) this.hasMainPanel = void 0;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/** Preserve the native seat's distinction between a docked track and fullscreen. */
|
|
145
|
+
openRightbar(track = true, fullscreen = false) {
|
|
146
|
+
this.update({
|
|
147
|
+
detailsOpen: true,
|
|
148
|
+
rightbarTrack: track,
|
|
149
|
+
rightbarFullscreen: fullscreen
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/** Hide the right panel. */
|
|
153
|
+
closeRightbar() {
|
|
154
|
+
this.closeDetails();
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Select the main panel rendered in the center column; null means the
|
|
158
|
+
* conversation. Mirrors the official LayoutController so the `panelInfo`
|
|
159
|
+
* root hook stays truthful.
|
|
160
|
+
*/
|
|
161
|
+
selectPanel(panelId) {
|
|
162
|
+
if (panelId !== null && this.hasMainPanel?.(panelId) !== true) throw new Error(`layout.selectPanel: main panel "${panelId}" is not registered`);
|
|
163
|
+
this.navigation.abort();
|
|
164
|
+
if (this.snapshot.panelInfo.activePanelId === panelId) return;
|
|
165
|
+
this.update({ panelInfo: Object.freeze({ activePanelId: panelId }) });
|
|
166
|
+
}
|
|
167
|
+
/** Drop a selected panel once no main-slot entry declares it. */
|
|
168
|
+
retainMainPanels(panelIds) {
|
|
169
|
+
const active = this.snapshot.panelInfo.activePanelId;
|
|
170
|
+
if (active !== null && !panelIds.includes(active)) this.update({ panelInfo: Object.freeze({ activePanelId: null }) });
|
|
171
|
+
}
|
|
68
172
|
update(next) {
|
|
69
173
|
const snapshot = Object.freeze({
|
|
70
174
|
...this.snapshot,
|
|
71
175
|
...next
|
|
72
176
|
});
|
|
73
|
-
if (snapshot.sidebarOpen === this.snapshot.sidebarOpen && snapshot.detailsOpen === this.snapshot.detailsOpen) return;
|
|
177
|
+
if (snapshot.sidebarOpen === this.snapshot.sidebarOpen && snapshot.detailsOpen === this.snapshot.detailsOpen && snapshot.rightbarTrack === this.snapshot.rightbarTrack && snapshot.rightbarFullscreen === this.snapshot.rightbarFullscreen && snapshot.panelInfo === this.snapshot.panelInfo) return;
|
|
74
178
|
this.snapshot = snapshot;
|
|
75
179
|
for (const listener of this.listeners) listener();
|
|
76
180
|
}
|
|
@@ -104,7 +208,12 @@ window.__ModuleLoader__.load({
|
|
|
104
208
|
const MOBILE_LAYOUT_STYLES = `
|
|
105
209
|
html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
106
210
|
.dshm-shell{position:relative;display:grid;width:100%;height:100dvh;min-width:0;overflow:hidden;background:var(--dsw-alias-bg-base,#fff)}
|
|
107
|
-
.dshm-main{grid-area:1/1;min-width:0;min-height:0;overflow:hidden}
|
|
211
|
+
.dshm-main{grid-area:1/1;position:relative;min-width:0;min-height:0;margin-right:0;overflow:hidden;transition:margin-right var(--ds-transition-duration-slow,190ms) var(--ds-ease-in-out,ease)}
|
|
212
|
+
.dshm-shell[data-rightbar-docked=true] .dshm-main{margin-right:var(--dshm-rightbar-width)}
|
|
213
|
+
.dshm-shell[data-rightbar-docked=true] .dshm-details{position:absolute;width:var(--dshm-rightbar-width);box-shadow:none;padding-top:0}
|
|
214
|
+
/* Draw above the native absolute panel without consuming its width or
|
|
215
|
+
intercepting controls; only docked mode needs this column separator. */
|
|
216
|
+
.dshm-shell[data-rightbar-docked=true] .dshm-details::after{content:"";position:absolute;inset:0 auto 0 0;width:.5px;background:var(--dsw-alias-border-l4);z-index:11;pointer-events:none}
|
|
108
217
|
.dshm-main>*,.dshm-main>*>*{min-width:0}
|
|
109
218
|
.dshm-drawer{position:fixed;z-index:70;inset:0 auto 0 0;box-sizing:border-box;width:56px;max-width:100%;padding-top:env(safe-area-inset-top);overflow:hidden;background:var(--dsw-alias-bg-layer-1,#f8fafc);box-shadow:none;will-change:width;transition:width 240ms cubic-bezier(.22,1,.36,1),box-shadow 240ms ease}
|
|
110
219
|
.dshm-drawer[data-open=true]{width:min(88vw,340px);box-shadow:18px 0 46px rgb(15 23 42 / 18%)}
|
|
@@ -112,6 +221,8 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
112
221
|
.dshm-drawer>*{width:100%!important;height:100%!important;transform:translateX(-6px);opacity:.94;transition:transform 220ms cubic-bezier(.22,1,.36,1),opacity 160ms ease-out}
|
|
113
222
|
.dshm-drawer[data-open=true]>*{transform:translateX(0);opacity:1}
|
|
114
223
|
.dshm-drawer[data-open=false]>*{width:56px!important}
|
|
224
|
+
/* display:none also suppresses fixed descendants installed by the phone adapter. */
|
|
225
|
+
.dshm-drawer[data-right-modal=true]{display:none!important}
|
|
115
226
|
.dshm-details{position:fixed;z-index:80;inset:0 0 0 auto;box-sizing:border-box;width:min(94vw,460px);max-width:100%;padding-top:env(safe-area-inset-top);overflow:hidden;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:-18px 0 46px rgb(15 23 42 / 18%);transform:translateX(104%);transition:transform 190ms cubic-bezier(.22,1,.36,1)}
|
|
116
227
|
.dshm-details[data-open=true]{transform:translateX(0)}
|
|
117
228
|
.dshm-details[data-open=false]{pointer-events:none;visibility:hidden;transition:transform 190ms cubic-bezier(.22,1,.36,1),visibility 0s linear 190ms}
|
|
@@ -127,11 +238,11 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
127
238
|
.dshm-shell [data-disclosure-row]>*{min-width:0;overflow-wrap:anywhere}
|
|
128
239
|
.dshm-shell [data-context-fields]>*{min-width:0}
|
|
129
240
|
.dshm-shell [class*="_body"]{max-width:100%;overflow-wrap:anywhere}
|
|
241
|
+
@media(max-width:420px){.dshm-shell [data-context-fields]>*{display:grid;grid-template-columns:1fr!important;gap:4px}.dshm-shell [class*="_ioSection"]{grid-template-columns:1fr!important}}
|
|
242
|
+
@media(max-width:600px){
|
|
130
243
|
.dshm-shell [data-question-key],.dshm-shell [data-plan-review-key]{box-sizing:border-box;width:100%;height:auto!important;min-width:0;flex:none!important;align-self:flex-end;padding:6px max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right))!important}
|
|
131
244
|
.dshm-shell [data-question-key]>section,.dshm-shell [data-plan-review-key]>section{width:100%;height:auto!important;min-height:0!important;max-width:none!important;max-height:min(68dvh,520px)!important;border-radius:16px!important}
|
|
132
245
|
.dshm-shell [data-question-scroll],.dshm-shell [data-plan-review-scroll]{flex:0 1 auto!important;min-height:0!important;max-height:min(42dvh,360px)!important;overscroll-behavior:contain;scroll-padding-bottom:12px}
|
|
133
|
-
@media(max-width:420px){.dshm-shell [data-context-fields]>*{display:grid;grid-template-columns:1fr!important;gap:4px}.dshm-shell [class*="_ioSection"]{grid-template-columns:1fr!important}}
|
|
134
|
-
@media(max-width:600px){
|
|
135
246
|
.dshm-shell [data-question-key]>section>header{display:flex!important;visibility:visible!important;flex:none!important;gap:8px!important;padding:12px 8px 4px 14px!important}
|
|
136
247
|
.dshm-shell [data-question-key]>section>header h2{min-width:0;overflow-wrap:anywhere;font-size:16px!important;line-height:22px!important}
|
|
137
248
|
.dshm-shell [data-question-key]>section>header button{min-width:40px;min-height:40px}
|
|
@@ -151,32 +262,39 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
151
262
|
.dshm-drawer[data-open=true]{width:340px;box-shadow:none}
|
|
152
263
|
.dshm-drawer[data-open=false]{width:56px}
|
|
153
264
|
}
|
|
154
|
-
@media(prefers-reduced-motion:reduce){.dshm-drawer,.dshm-details,.dshm-scrim,.dshm-drawer
|
|
265
|
+
@media(prefers-reduced-motion:reduce){.dshm-drawer,.dshm-details,.dshm-scrim,.dshm-drawer>*,.dshm-main{transition:none!important}}
|
|
155
266
|
`;
|
|
156
267
|
function MobileAppFrame(props) {
|
|
157
268
|
const state = (0, react.useSyncExternalStore)(props.controller.subscribe, props.controller.getSnapshot);
|
|
158
269
|
const suppressKeyboardUntil = (0, react.useRef)(0);
|
|
159
|
-
const [
|
|
270
|
+
const [viewportWidth, setViewportWidth] = (0, react.useState)(window.innerWidth);
|
|
271
|
+
(0, react.useEffect)(() => {
|
|
272
|
+
let frame;
|
|
273
|
+
const resize = () => {
|
|
274
|
+
if (frame !== void 0) return;
|
|
275
|
+
frame = window.requestAnimationFrame(() => {
|
|
276
|
+
frame = void 0;
|
|
277
|
+
setViewportWidth(window.innerWidth);
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
window.addEventListener("resize", resize);
|
|
281
|
+
return () => {
|
|
282
|
+
window.removeEventListener("resize", resize);
|
|
283
|
+
if (frame !== void 0) window.cancelAnimationFrame(frame);
|
|
284
|
+
};
|
|
285
|
+
}, []);
|
|
286
|
+
const wideViewport = isWideViewportLayout(viewportWidth);
|
|
287
|
+
const rightbar = resolveMobileRightbarLayout(viewportWidth, state.sidebarOpen, state.rightbarTrack, state.rightbarFullscreen);
|
|
288
|
+
const rightbarDocked = state.detailsOpen && rightbar.docked;
|
|
160
289
|
const [documentLanguage, setDocumentLanguage] = (0, react.useState)(document.documentElement.lang);
|
|
161
290
|
const language = resolveMobileLayoutLanguage(documentLanguage, navigator.languages.length > 0 ? navigator.languages : [navigator.language]);
|
|
162
291
|
const messages = MOBILE_LAYOUT_MESSAGES[language];
|
|
292
|
+
const scrimOpen = isMobileScrimOpen(state.sidebarOpen, state.detailsOpen && !rightbarDocked, wideViewport);
|
|
163
293
|
const activeSessionId = props.useSessions((session) => {
|
|
164
294
|
const current = session.current;
|
|
165
295
|
return current !== void 0 && session.byId[current]?.blank === false ? current : void 0;
|
|
166
296
|
});
|
|
167
297
|
const hasSession = activeSessionId !== void 0;
|
|
168
|
-
(0, react.useEffect)(() => {
|
|
169
|
-
if (typeof window.matchMedia !== "function") return;
|
|
170
|
-
const query = window.matchMedia(`(min-width: 900px)`);
|
|
171
|
-
const syncViewport = () => {
|
|
172
|
-
setWideViewport(query.matches);
|
|
173
|
-
};
|
|
174
|
-
syncViewport();
|
|
175
|
-
query.addEventListener("change", syncViewport);
|
|
176
|
-
return () => {
|
|
177
|
-
query.removeEventListener("change", syncViewport);
|
|
178
|
-
};
|
|
179
|
-
}, []);
|
|
180
298
|
(0, react.useEffect)(() => {
|
|
181
299
|
const observer = new MutationObserver(() => {
|
|
182
300
|
setDocumentLanguage(document.documentElement.lang);
|
|
@@ -253,23 +371,38 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
253
371
|
};
|
|
254
372
|
return (0, react.createElement)("div", {
|
|
255
373
|
className: "dshm-shell",
|
|
256
|
-
lang: language
|
|
374
|
+
lang: language,
|
|
375
|
+
"data-rightbar-docked": rightbarDocked,
|
|
376
|
+
style: { "--dshm-rightbar-width": `${rightbar.width}px` }
|
|
257
377
|
}, (0, react.createElement)("main", {
|
|
258
378
|
className: "dshm-main",
|
|
259
|
-
"data-dsh-mobile-session": activeSessionId
|
|
260
|
-
|
|
379
|
+
"data-dsh-mobile-session": activeSessionId,
|
|
380
|
+
"data-pane": "conversation"
|
|
381
|
+
}, props.renderSlot("main", {}, {
|
|
382
|
+
entryKey: state.panelInfo.activePanelId ?? "conversation",
|
|
383
|
+
fallback: props.renderSlot("conversation", {})
|
|
384
|
+
})), (0, react.createElement)("button", {
|
|
261
385
|
"aria-label": messages.closePanels,
|
|
262
386
|
className: "dshm-scrim",
|
|
263
|
-
"data-open":
|
|
387
|
+
"data-open": scrimOpen,
|
|
388
|
+
"aria-hidden": !scrimOpen,
|
|
264
389
|
onClick: () => {
|
|
265
|
-
|
|
390
|
+
if (!scrimOpen) return;
|
|
391
|
+
state.detailsOpen ? props.requestDetailsClose() : props.controller.closeSidebar();
|
|
266
392
|
},
|
|
267
|
-
tabIndex:
|
|
393
|
+
tabIndex: scrimOpen ? 0 : -1,
|
|
268
394
|
type: "button"
|
|
269
395
|
}), (0, react.createElement)("aside", {
|
|
270
396
|
"aria-label": messages.workspaceNavigation,
|
|
271
397
|
className: "dshm-drawer",
|
|
398
|
+
"data-pane": "sidebar",
|
|
272
399
|
"data-open": state.sidebarOpen,
|
|
400
|
+
"data-right-modal": state.detailsOpen && !rightbarDocked,
|
|
401
|
+
...state.detailsOpen && !rightbarDocked ? {
|
|
402
|
+
inert: "",
|
|
403
|
+
"aria-hidden": true
|
|
404
|
+
} : {},
|
|
405
|
+
...state.sidebarOpen ? {} : { "data-sidebar-collapsed": "" },
|
|
273
406
|
onClickCapture: closeDrawerAfterSessionAction
|
|
274
407
|
}, props.renderSlot("sidebar", {
|
|
275
408
|
collapsed: !state.sidebarOpen,
|
|
@@ -279,11 +412,11 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
279
412
|
className: "dshm-details",
|
|
280
413
|
"data-open": state.detailsOpen,
|
|
281
414
|
...state.detailsOpen ? {} : { inert: "" }
|
|
282
|
-
}, hasSession ?
|
|
283
|
-
width:
|
|
284
|
-
viewportWidth
|
|
285
|
-
canShow:
|
|
286
|
-
})]
|
|
415
|
+
}, [hasSession ? props.renderSlot("details", {}) : void 0, props.renderSlot("rightbar", {
|
|
416
|
+
width: rightbar.width,
|
|
417
|
+
viewportWidth,
|
|
418
|
+
canShow: true
|
|
419
|
+
})]), (0, react.createElement)("div", {
|
|
287
420
|
className: "dshm-overlay",
|
|
288
421
|
"data-shell-overlay": true
|
|
289
422
|
}, props.renderSlot("shell.overlay", {})));
|
|
@@ -298,7 +431,12 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
298
431
|
style.dataset.plugin = "dsh-mobile-layout";
|
|
299
432
|
style.textContent = MOBILE_LAYOUT_STYLES;
|
|
300
433
|
document.head.append(style);
|
|
434
|
+
const disposeMainPanelRegistry = controller.bindMainPanelRegistry((id) => ctx.slots.entries("main").some((entry) => entry.options.key === id));
|
|
301
435
|
const disposeService = ctx.reflect.provide("layout", controller);
|
|
436
|
+
const disposePanelInfo = typeof ctx.slots.provideRoot === "function" ? ctx.slots.provideRoot({ hooks: { panelInfo: {
|
|
437
|
+
getSnapshot: () => controller.getSnapshot().panelInfo,
|
|
438
|
+
subscribe: (listener) => controller.subscribe(listener)
|
|
439
|
+
} } }) : () => {};
|
|
302
440
|
const disposeRoot = ctx.slots.register({
|
|
303
441
|
name: "root",
|
|
304
442
|
children: {
|
|
@@ -310,9 +448,13 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
310
448
|
kind: "single",
|
|
311
449
|
scope: "session-maybe"
|
|
312
450
|
},
|
|
451
|
+
main: {
|
|
452
|
+
kind: "keyed",
|
|
453
|
+
scope: "root"
|
|
454
|
+
},
|
|
313
455
|
rightbar: {
|
|
314
456
|
kind: "single",
|
|
315
|
-
scope: "
|
|
457
|
+
scope: "root"
|
|
316
458
|
},
|
|
317
459
|
details: {
|
|
318
460
|
kind: "single",
|
|
@@ -325,11 +467,25 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
325
467
|
}
|
|
326
468
|
}, (props) => (0, react.createElement)(MobileAppFrame, {
|
|
327
469
|
...props,
|
|
328
|
-
controller
|
|
470
|
+
controller,
|
|
471
|
+
requestDetailsClose: () => {
|
|
472
|
+
closeDetailsFromScrim(ctx.get("sidebarRight"), () => {
|
|
473
|
+
controller.closeDetails();
|
|
474
|
+
});
|
|
475
|
+
}
|
|
329
476
|
}));
|
|
477
|
+
const retainMainPanels = () => {
|
|
478
|
+
controller.retainMainPanels(ctx.slots.entries("main").flatMap((entry) => entry.options.key === void 0 ? [] : [entry.options.key]));
|
|
479
|
+
};
|
|
480
|
+
const disposePanels = ctx.slots.subscribe("main", retainMainPanels);
|
|
481
|
+
retainMainPanels();
|
|
330
482
|
return () => {
|
|
483
|
+
controller.dispose();
|
|
484
|
+
disposePanels();
|
|
331
485
|
disposeRoot();
|
|
486
|
+
disposePanelInfo();
|
|
332
487
|
disposeService();
|
|
488
|
+
disposeMainPanelRegistry();
|
|
333
489
|
style.remove();
|
|
334
490
|
};
|
|
335
491
|
}, "dsh-mobile: dedicated root layout");
|
|
@@ -352,9 +508,13 @@ html,body,#root{width:100%;height:100%;overflow:hidden}
|
|
|
352
508
|
exports.MOBILE_LAYOUT_STYLES = MOBILE_LAYOUT_STYLES;
|
|
353
509
|
exports.WIDE_LAYOUT_MIN_WIDTH_PX = WIDE_LAYOUT_MIN_WIDTH_PX;
|
|
354
510
|
exports.apply = apply;
|
|
511
|
+
exports.closeDetailsFromScrim = closeDetailsFromScrim;
|
|
355
512
|
exports.inject = inject;
|
|
513
|
+
exports.isMobileScrimOpen = isMobileScrimOpen;
|
|
514
|
+
exports.isSidebarRightControl = isSidebarRightControl;
|
|
356
515
|
exports.isWideViewportLayout = isWideViewportLayout;
|
|
357
516
|
exports.resolveMobileLayoutLanguage = resolveMobileLayoutLanguage;
|
|
517
|
+
exports.resolveMobileRightbarLayout = resolveMobileRightbarLayout;
|
|
358
518
|
return module.exports;
|
|
359
519
|
}
|
|
360
520
|
});
|
package/lib/mobile-layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-layout.js","names":["useSyncExternalStore","useRef","useState","createElement"],"sources":["../src/mobile-layout-messages.ts","../src/mobile-layout.ts"],"sourcesContent":["export type MobileLayoutLanguage = 'it' | 'en' | 'zh'\n\nexport const MOBILE_LAYOUT_MESSAGES = Object.freeze({\n it: Object.freeze({ closePanels: 'Chiudi pannelli', workspaceNavigation: 'Navigazione area di lavoro e sessioni' }),\n en: Object.freeze({ closePanels: 'Close panels', workspaceNavigation: 'Workspace and session navigation' }),\n zh: Object.freeze({ closePanels: '关闭浮层', workspaceNavigation: '工作区与会话导航' }),\n})\n","import { createElement, useEffect, useRef, useState, useSyncExternalStore } from 'react'\nimport type { ReactNode } from 'react'\nimport { MOBILE_LAYOUT_MESSAGES, type MobileLayoutLanguage } from './mobile-layout-messages.js'\n\nexport { MOBILE_LAYOUT_MESSAGES } from './mobile-layout-messages.js'\nexport type { MobileLayoutLanguage } from './mobile-layout-messages.js'\n\ninterface SessionState {\n readonly current?: string\n readonly byId: Readonly<Record<string, { readonly blank?: boolean; readonly title?: string } | undefined>>\n}\n\ninterface MobileRootProps {\n readonly renderSlot: (name: string, owner: Record<string, unknown>) => ReactNode\n readonly useSessions: <T>(selector: (state: SessionState) => T) => T\n}\n\ninterface MobileClientContext {\n readonly effect: (effect: () => void | (() => void), label?: string) => void\n readonly on: (event: string, listener: (value: ThemeSnapshot) => void) => () => void\n readonly reflect: { provide: (name: string, value: unknown) => () => void | Promise<void> }\n readonly slots: {\n register: (options: Record<string, unknown>, component: (props: MobileRootProps) => ReactNode) => () => void\n }\n readonly theme: { getTheme: () => ThemeSnapshot }\n}\n\ninterface ThemeSnapshot {\n readonly active: {\n readonly colorScheme: 'dark' | 'light'\n readonly tokens: Readonly<Record<string, string>>\n }\n}\n\ninterface LayoutSnapshot {\n readonly sidebarOpen: boolean\n readonly detailsOpen: boolean\n}\n\n/**\n * Viewport width at which the dedicated layout treats the sidebar as a\n * persistent desktop panel instead of an overlay drawer. Narrow screens\n * keep the overlay behavior byte-for-byte.\n */\nexport const WIDE_LAYOUT_MIN_WIDTH_PX = 900\n\nexport function isWideViewportLayout(viewportWidth: number): boolean {\n return viewportWidth >= WIDE_LAYOUT_MIN_WIDTH_PX\n}\n\n/** Reads the live viewport; unknown environments (SSR, tests) stay narrow. */\nfunction viewportIsWide(): boolean {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false\n return window.matchMedia(`(min-width: ${WIDE_LAYOUT_MIN_WIDTH_PX}px)`).matches\n}\n\n/** Resolve the supported language used by the dedicated mobile layout. */\nexport function resolveMobileLayoutLanguage(\n documentLanguage: string,\n browserLanguages: readonly string[],\n): MobileLayoutLanguage {\n return [documentLanguage, ...browserLanguages]\n .map(value => value.trim().toLowerCase().split(/[-_]/u)[0])\n .find((value): value is MobileLayoutLanguage => value === 'it' || value === 'en' || value === 'zh') ?? 'en'\n}\n\nclass MobileLayoutController {\n // Wide viewports start with the persistent sidebar open; applying the\n // layout again (reconnect, refocus) reuses the module singleton below,\n // so an explicit user collapse is never reset.\n private snapshot: LayoutSnapshot = Object.freeze({ sidebarOpen: viewportIsWide(), detailsOpen: false })\n private readonly listeners = new Set<() => void>()\n\n readonly subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener)\n return () => { this.listeners.delete(listener) }\n }\n\n readonly getSnapshot = (): LayoutSnapshot => this.snapshot\n\n toggleSidebar(): void {\n this.update({ sidebarOpen: !this.snapshot.sidebarOpen })\n }\n\n openDetails(): void {\n this.update({ detailsOpen: true })\n }\n\n closeDetails(): void {\n this.update({ detailsOpen: false })\n }\n\n closeSidebar(): void {\n this.update({ sidebarOpen: false })\n }\n\n private update(next: Partial<LayoutSnapshot>): void {\n const snapshot = Object.freeze({ ...this.snapshot, ...next })\n if (snapshot.sidebarOpen === this.snapshot.sidebarOpen && snapshot.detailsOpen === this.snapshot.detailsOpen) return\n this.snapshot = snapshot\n for (const listener of this.listeners) listener()\n }\n}\n\nclass ThemePresenter {\n private appliedTokens: string[] = []\n private readonly meta = document.createElement('meta')\n\n constructor() {\n this.meta.name = 'theme-color'\n }\n\n apply(snapshot: ThemeSnapshot): void {\n const scheme = snapshot.active.colorScheme\n document.documentElement.style.colorScheme = scheme\n document.body.toggleAttribute('data-ds-dark-theme', scheme === 'dark')\n for (const name of this.appliedTokens) document.body.style.removeProperty(name)\n this.appliedTokens = []\n for (const [name, value] of Object.entries(snapshot.active.tokens)) {\n document.body.style.setProperty(name, value)\n this.appliedTokens.push(name)\n }\n this.meta.content = getComputedStyle(document.body).backgroundColor\n if (!this.meta.isConnected) document.head.append(this.meta)\n }\n\n dispose(): void {\n document.documentElement.style.removeProperty('color-scheme')\n document.body.removeAttribute('data-ds-dark-theme')\n for (const name of this.appliedTokens) document.body.style.removeProperty(name)\n this.meta.remove()\n }\n}\n\nexport const MOBILE_LAYOUT_STYLES = `\nhtml,body,#root{width:100%;height:100%;overflow:hidden}\n.dshm-shell{position:relative;display:grid;width:100%;height:100dvh;min-width:0;overflow:hidden;background:var(--dsw-alias-bg-base,#fff)}\n.dshm-main{grid-area:1/1;min-width:0;min-height:0;overflow:hidden}\n.dshm-main>*,.dshm-main>*>*{min-width:0}\n.dshm-drawer{position:fixed;z-index:70;inset:0 auto 0 0;box-sizing:border-box;width:56px;max-width:100%;padding-top:env(safe-area-inset-top);overflow:hidden;background:var(--dsw-alias-bg-layer-1,#f8fafc);box-shadow:none;will-change:width;transition:width 240ms cubic-bezier(.22,1,.36,1),box-shadow 240ms ease}\n.dshm-drawer[data-open=true]{width:min(88vw,340px);box-shadow:18px 0 46px rgb(15 23 42 / 18%)}\n.dshm-drawer[data-open=false]{pointer-events:auto;visibility:visible}\n.dshm-drawer>*{width:100%!important;height:100%!important;transform:translateX(-6px);opacity:.94;transition:transform 220ms cubic-bezier(.22,1,.36,1),opacity 160ms ease-out}\n.dshm-drawer[data-open=true]>*{transform:translateX(0);opacity:1}\n.dshm-drawer[data-open=false]>*{width:56px!important}\n.dshm-details{position:fixed;z-index:80;inset:0 0 0 auto;box-sizing:border-box;width:min(94vw,460px);max-width:100%;padding-top:env(safe-area-inset-top);overflow:hidden;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:-18px 0 46px rgb(15 23 42 / 18%);transform:translateX(104%);transition:transform 190ms cubic-bezier(.22,1,.36,1)}\n.dshm-details[data-open=true]{transform:translateX(0)}\n.dshm-details[data-open=false]{pointer-events:none;visibility:hidden;transition:transform 190ms cubic-bezier(.22,1,.36,1),visibility 0s linear 190ms}\n.dshm-scrim{position:fixed;z-index:65;inset:0;border:0;background:rgb(15 23 42 / 40%);opacity:0;pointer-events:none;transition:opacity 180ms ease-out}\n.dshm-scrim[data-open=true]{opacity:1;pointer-events:auto}\n.dshm-overlay{position:fixed;z-index:90;inset:0;pointer-events:none}.dshm-overlay>*{pointer-events:auto}\n.dshm-shell header{min-width:0;padding-left:52px}\n.dshm-shell textarea{font-size:16px}\n.dshm-shell table{display:block;max-width:100%;overflow-x:auto}\n.dshm-shell pre{max-width:100%;overflow-x:auto}\n.dshm-shell img,.dshm-shell video,.dshm-shell canvas,.dshm-shell svg{max-width:100%}\n.dshm-shell [data-disclosure-row]{min-width:0;max-width:100%}\n.dshm-shell [data-disclosure-row]>*{min-width:0;overflow-wrap:anywhere}\n.dshm-shell [data-context-fields]>*{min-width:0}\n.dshm-shell [class*=\"_body\"]{max-width:100%;overflow-wrap:anywhere}\n.dshm-shell [data-question-key],.dshm-shell [data-plan-review-key]{box-sizing:border-box;width:100%;height:auto!important;min-width:0;flex:none!important;align-self:flex-end;padding:6px max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right))!important}\n.dshm-shell [data-question-key]>section,.dshm-shell [data-plan-review-key]>section{width:100%;height:auto!important;min-height:0!important;max-width:none!important;max-height:min(68dvh,520px)!important;border-radius:16px!important}\n.dshm-shell [data-question-scroll],.dshm-shell [data-plan-review-scroll]{flex:0 1 auto!important;min-height:0!important;max-height:min(42dvh,360px)!important;overscroll-behavior:contain;scroll-padding-bottom:12px}\n@media(max-width:420px){.dshm-shell [data-context-fields]>*{display:grid;grid-template-columns:1fr!important;gap:4px}.dshm-shell [class*=\"_ioSection\"]{grid-template-columns:1fr!important}}\n@media(max-width:600px){\n.dshm-shell [data-question-key]>section>header{display:flex!important;visibility:visible!important;flex:none!important;gap:8px!important;padding:12px 8px 4px 14px!important}\n.dshm-shell [data-question-key]>section>header h2{min-width:0;overflow-wrap:anywhere;font-size:16px!important;line-height:22px!important}\n.dshm-shell [data-question-key]>section>header button{min-width:40px;min-height:40px}\n.dshm-shell [data-question-key] [role=radio],.dshm-shell [data-question-key] [role=checkbox]{min-height:48px!important;touch-action:manipulation}\n.dshm-shell [data-question-key]>section>footer{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center!important;flex:none!important;gap:6px 8px!important;margin-top:4px!important;padding:6px 10px 10px!important}\n.dshm-shell [data-question-key]>section>footer>:last-child{grid-column:1/-1;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px!important}\n.dshm-shell [data-question-key]>section>footer>:last-child button{width:100%;min-height:44px}\n.dshm-shell [data-plan-review-key]>section>div:last-child{display:grid!important;grid-template-columns:1fr;gap:8px!important;padding:8px 12px 10px!important}\n.dshm-shell [data-plan-review-key]>section>div:last-child>div:last-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px!important}\n.dshm-shell [data-plan-review-key]>section>div:last-child>div:last-child>button:first-child{grid-column:1/-1}\n.dshm-shell [data-plan-review-key]>section>div:last-child button{width:100%;min-height:44px}\n}\n@media(min-width:900px){\n.dshm-shell{grid-template-columns:auto minmax(0,1fr)}\n.dshm-main{grid-area:1/2}\n.dshm-drawer{position:static;grid-area:1/1;box-shadow:none}\n.dshm-drawer[data-open=true]{width:340px;box-shadow:none}\n.dshm-drawer[data-open=false]{width:56px}\n}\n@media(prefers-reduced-motion:reduce){.dshm-drawer,.dshm-details,.dshm-scrim,.dshm-drawer>*{transition:none!important}}\n`\n\nfunction MobileAppFrame(props: MobileRootProps & { readonly controller: MobileLayoutController }): ReactNode {\n const state = useSyncExternalStore(props.controller.subscribe, props.controller.getSnapshot)\n const suppressKeyboardUntil = useRef(0)\n const [wideViewport, setWideViewport] = useState(viewportIsWide)\n const [documentLanguage, setDocumentLanguage] = useState(document.documentElement.lang)\n const browserLanguages = navigator.languages.length > 0 ? navigator.languages : [navigator.language]\n const language = resolveMobileLayoutLanguage(documentLanguage, browserLanguages)\n const messages = MOBILE_LAYOUT_MESSAGES[language]\n const activeSessionId = props.useSessions(session => {\n const current = session.current\n return current !== undefined && session.byId[current]?.blank === false ? current : undefined\n })\n const hasSession = activeSessionId !== undefined\n\n useEffect(() => {\n if (typeof window.matchMedia !== 'function') return\n const query = window.matchMedia(`(min-width: ${WIDE_LAYOUT_MIN_WIDTH_PX}px)`)\n const syncViewport = (): void => { setWideViewport(query.matches) }\n syncViewport()\n query.addEventListener('change', syncViewport)\n return () => { query.removeEventListener('change', syncViewport) }\n }, [])\n\n useEffect(() => {\n const observer = new MutationObserver(() => { setDocumentLanguage(document.documentElement.lang) })\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] })\n return () => { observer.disconnect() }\n }, [])\n\n useEffect(() => {\n if (!hasSession) props.controller.closeDetails()\n }, [hasSession, props.controller])\n\n // Mirror the stock layout: project the current session title into the\n // browser tab, restoring the product title when no session is selected.\n const sessionTitle = props.useSessions(session =>\n session.current === undefined ? undefined : session.byId[session.current]?.title,\n )\n useEffect(() => {\n const productTitle = document.title\n if (sessionTitle !== undefined) document.title = `${sessionTitle} — ${productTitle}`\n return () => { document.title = productTitle }\n }, [sessionTitle])\n\n useEffect(() => {\n const suppressAutofocus = (event: FocusEvent): void => {\n if (performance.now() >= suppressKeyboardUntil.current) return\n const target = event.target\n if (target instanceof HTMLElement && (target.matches('input,textarea') || target.isContentEditable)) target.blur()\n }\n const suppressBranchAutofocus = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const branch = event.target.closest('button[aria-label*=\"分支\"],button[aria-label*=\"Branch\"],button[aria-label*=\"branch\"],button[aria-label*=\"Ramo\"],button[aria-label*=\"ramo\"]')\n if (branch === null || branch.hasAttribute('disabled') || branch.getAttribute('aria-disabled') === 'true') return\n suppressKeyboardUntil.current = performance.now() + 700\n window.setTimeout(() => {\n const active = document.activeElement\n if (active instanceof HTMLElement && (active.matches('input,textarea') || active.isContentEditable)) active.blur()\n }, 0)\n }\n const suppressCommandAutofocus = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const commandButton = event.target.closest('button[aria-haspopup=\"listbox\"]')\n if (commandButton === null) return\n // The native composer deliberately preserves editor focus on mousedown;\n // mobile command menus should open without summoning the soft keyboard.\n suppressKeyboardUntil.current = performance.now() + 700\n event.preventDefault()\n event.stopPropagation()\n window.setTimeout(() => {\n const active = document.activeElement\n if (active instanceof HTMLElement && (active.matches('input,textarea') || active.isContentEditable)) active.blur()\n }, 0)\n }\n document.addEventListener('focusin', suppressAutofocus, true)\n document.addEventListener('click', suppressBranchAutofocus, true)\n document.addEventListener('mousedown', suppressCommandAutofocus, true)\n return () => {\n document.removeEventListener('focusin', suppressAutofocus, true)\n document.removeEventListener('click', suppressBranchAutofocus, true)\n document.removeEventListener('mousedown', suppressCommandAutofocus, true)\n }\n }, [])\n\n // A persistent wide sidebar stays put: selecting a session only dismisses\n // the narrow overlay drawer (and its soft-keyboard suppression).\n const closeDrawerAfterSessionAction = (event: { readonly target: EventTarget | null }): void => {\n if (viewportIsWide()) return\n if (!(event.target instanceof Element)) return\n const row = event.target.closest<HTMLElement>('[role=\"treeitem\"][aria-selected]')\n const action = event.target.closest('button,[role=\"button\"]')\n const startsSession = action?.matches('button[class*=\"_newSession\"],button[class*=\"_brand\"]')\n || /新建会话|新会话|new session|new conversation|nuova sessione|nuova conversazione/i.test(action?.getAttribute('aria-label') ?? '')\n if (row === null && !startsSession) return\n if (row !== null && action !== null && action !== row) return\n suppressKeyboardUntil.current = performance.now() + 500\n // Let the session row finish its own click handler before unmounting the drawer.\n window.setTimeout(() => {\n props.controller.closeSidebar()\n const active = document.activeElement\n if (active instanceof HTMLInputElement || active instanceof HTMLTextAreaElement) active.blur()\n }, 0)\n }\n\n return createElement('div', { className: 'dshm-shell', lang: language },\n createElement('main', { className: 'dshm-main', 'data-dsh-mobile-session': activeSessionId }, props.renderSlot('conversation', {})),\n createElement('button', {\n 'aria-label': messages.closePanels,\n className: 'dshm-scrim',\n // A persistent wide sidebar needs no dimming; the scrim only covers\n // the narrow overlay drawer and the details panel.\n 'data-open': state.detailsOpen || (state.sidebarOpen && !wideViewport),\n onClick: () => { state.detailsOpen ? props.controller.closeDetails() : props.controller.closeSidebar() },\n tabIndex: state.sidebarOpen || state.detailsOpen ? 0 : -1,\n type: 'button',\n }),\n createElement('aside', {\n 'aria-label': messages.workspaceNavigation,\n className: 'dshm-drawer',\n 'data-open': state.sidebarOpen,\n onClickCapture: closeDrawerAfterSessionAction,\n }, props.renderSlot('sidebar', {\n collapsed: !state.sidebarOpen,\n width: state.sidebarOpen ? 340 : 56,\n })),\n createElement('aside', {\n 'aria-hidden': !state.detailsOpen,\n className: 'dshm-details',\n 'data-open': state.detailsOpen,\n ...(state.detailsOpen ? {} : { inert: '' }),\n }, hasSession ? [\n // Dual right-seat rendering across harness generations: 0.1.3-alpha.2\n // and earlier expose the `details` seat (empty owner share); the master\n // layout line renamed it `rightbar` with resolved column geometry.\n // Each host mounts content for exactly one of the two names, so the\n // other slot renders empty without error.\n props.renderSlot('details', {}),\n props.renderSlot('rightbar', {\n width: Math.min(window.innerWidth * 0.94, 460),\n viewportWidth: window.innerWidth,\n // Right track needs ~300px next to a ~400px center; below that the\n // column cannot show and narrow phones see the drawer overlay instead.\n canShow: window.innerWidth >= 720,\n }),\n ] : undefined),\n createElement('div', { className: 'dshm-overlay', 'data-shell-overlay': true }, props.renderSlot('shell.overlay', {})),\n )\n}\n\n// One controller per document: re-applying the layout (reconnect, tab\n// refocus) must not reset the user's explicit sidebar toggle.\nlet sharedController: MobileLayoutController | undefined\n\n/** Replace the desktop layout module on the authenticated mobile surface. */\nexport function apply(ctx: MobileClientContext): void {\n sharedController ??= new MobileLayoutController()\n const controller = sharedController\n ctx.effect(() => {\n const style = document.createElement('style')\n style.dataset.plugin = 'dsh-mobile-layout'\n style.textContent = MOBILE_LAYOUT_STYLES\n document.head.append(style)\n const disposeService = ctx.reflect.provide('layout', controller)\n const disposeRoot = ctx.slots.register({\n name: 'root',\n children: {\n sidebar: { kind: 'single', scope: 'root' },\n conversation: { kind: 'single', scope: 'session-maybe' },\n rightbar: { kind: 'single', scope: 'session' },\n details: { kind: 'single', scope: 'session' },\n 'shell.overlay': { kind: 'list', scope: 'root' },\n },\n }, props => createElement(MobileAppFrame, { ...props, controller }))\n return () => {\n disposeRoot()\n void disposeService()\n style.remove()\n }\n }, 'dsh-mobile: dedicated root layout')\n\n ctx.effect(() => {\n const presenter = new ThemePresenter()\n presenter.apply(ctx.theme.getTheme())\n const off = ctx.on('theme/change', snapshot => { presenter.apply(snapshot) })\n return () => { off(); presenter.dispose() }\n }, 'dsh-mobile: theme presenter')\n}\n\n/** Preserve the official layout module's dependency ordering. */\nexport const inject: readonly string[] = ['slots', 'theme']\n"],"mappings":";;;;;;;;EAEA,MAAa,yBAAyB,OAAO,OAAO;GAClD,IAAI,OAAO,OAAO;IAAE,aAAa;IAAmB,qBAAqB;GAAwC,CAAC;GAClH,IAAI,OAAO,OAAO;IAAE,aAAa;IAAgB,qBAAqB;GAAmC,CAAC;GAC1G,IAAI,OAAO,OAAO;IAAE,aAAa;IAAQ,qBAAqB;GAAW,CAAC;EAC5E,CAAC;;;;;;;;ECsCD,MAAa,2BAA2B;EAExC,SAAgB,qBAAqB,eAAgC;GACnE,OAAO,iBAAA;EACT;;EAGA,SAAS,iBAA0B;GACjC,IAAI,OAAO,WAAW,eAAe,OAAO,OAAO,eAAe,YAAY,OAAO;GACrF,OAAO,OAAO,WAAW,oBAA4C,CAAC,CAAC;EACzE;;EAGA,SAAgB,4BACd,kBACA,kBACsB;GACtB,OAAO,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,CAC3C,KAAI,UAAS,MAAM,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,CAC1D,MAAM,UAAyC,UAAU,QAAQ,UAAU,QAAQ,UAAU,IAAI,KAAK;EAC3G;EAEA,IAAM,yBAAN,MAA6B;GAI3B,WAAmC,OAAO,OAAO;IAAE,aAAa,eAAe;IAAG,aAAa;GAAM,CAAC;GACtG,4BAA6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AI,uBAAuB;GAChD,MAAM,aAAa;GACnB,IAAI,aAAa;IACf,MAAM,QAAQ,SAAS,cAAc,OAAO;IAC5C,MAAM,QAAQ,SAAS;IACvB,MAAM,cAAc;IACpB,SAAS,KAAK,OAAO,KAAK;IAC1B,MAAM,iBAAiB,IAAI,QAAQ,QAAQ,UAAU,UAAU;IAC/D,MAAM,cAAc,IAAI,MAAM,SAAS;KACrC,MAAM;KACN,UAAU;MACR,SAAS;OAAE,MAAM;OAAU,OAAO;MAAO;MACzC,cAAc;OAAE,MAAM;OAAU,OAAO;MAAgB;MACvD,UAAU;OAAE,MAAM;OAAU,OAAO;MAAU;MAC7C,SAAS;OAAE,MAAM;OAAU,OAAO;MAAU;MAC5C,iBAAiB;OAAE,MAAM;OAAQ,OAAO;MAAO;KACjD;IACF,IAAG,WAAA,GAASA,MAAAA,cAAAA,CAAc,gBAAgB;KAAE,GAAG;KAAO;IAAW,CAAC,CAAC;IACnE,aAAa;KACX,YAAY;KACZ,eAAoB;KACpB,MAAM,OAAO;IACf;GACF,GAAG,mCAAmC;GAEtC,IAAI,aAAa;IACf,MAAM,YAAY,IAAI,eAAe;IACrC,UAAU,MAAM,IAAI,MAAM,SAAS,CAAC;IACpC,MAAM,MAAM,IAAI,GAAG,iBAAgB,aAAY;KAAE,UAAU,MAAM,QAAQ;IAAE,CAAC;IAC5E,aAAa;KAAE,IAAI;KAAG,UAAU,QAAQ;IAAE;GAC5C,GAAG,6BAA6B;EAClC;;EAGA,MAAa,SAA4B,CAAC,SAAS,OAAO"}
|
|
1
|
+
{"version":3,"file":"mobile-layout.js","names":["useSyncExternalStore","useRef","useState","createElement"],"sources":["../src/mobile-layout-messages.ts","../src/mobile-layout.ts"],"sourcesContent":["export type MobileLayoutLanguage = 'it' | 'en' | 'zh'\n\nexport const MOBILE_LAYOUT_MESSAGES = Object.freeze({\n it: Object.freeze({ closePanels: 'Chiudi pannelli', workspaceNavigation: 'Navigazione area di lavoro e sessioni' }),\n en: Object.freeze({ closePanels: 'Close panels', workspaceNavigation: 'Workspace and session navigation' }),\n zh: Object.freeze({ closePanels: '关闭浮层', workspaceNavigation: '工作区与会话导航' }),\n})\n","import { createElement, useEffect, useRef, useState, useSyncExternalStore } from 'react'\nimport type { ReactNode } from 'react'\nimport { MOBILE_LAYOUT_MESSAGES, type MobileLayoutLanguage } from './mobile-layout-messages.js'\n\nexport { MOBILE_LAYOUT_MESSAGES } from './mobile-layout-messages.js'\nexport type { MobileLayoutLanguage } from './mobile-layout-messages.js'\n\ninterface SessionState {\n readonly current?: string\n readonly byId: Readonly<Record<string, { readonly blank?: boolean; readonly title?: string } | undefined>>\n}\n\ninterface MobileRootProps {\n readonly renderSlot: (\n name: string,\n owner: Record<string, unknown>,\n options?: { readonly entryKey?: string | null; readonly fallback?: ReactNode },\n ) => ReactNode\n readonly useSessions: <T>(selector: (state: SessionState) => T) => T\n}\n\n/** Root contribution carrying one observable hook into the standard kit. */\ninterface RootHookContribution {\n readonly hooks: Readonly<Record<string, {\n readonly getSnapshot: () => unknown\n readonly subscribe: (listener: () => void) => () => void\n }>>\n}\n\ninterface MobileClientContext {\n readonly effect: (effect: () => void | (() => void), label?: string) => void\n readonly get: (name: string) => unknown\n readonly on: (event: string, listener: (value: ThemeSnapshot) => void) => () => void\n readonly reflect: { provide: (name: string, value: unknown) => () => void | Promise<void> }\n readonly slots: {\n register: (options: Record<string, unknown>, component: (props: MobileRootProps) => ReactNode) => () => void\n entries: (name: string) => readonly { readonly options: { readonly key?: string } }[]\n subscribe: (name: string, listener: () => void) => () => void\n /**\n * Publish a root standard hook. The official layout owns `panelInfo`, so\n * replacing that module means replacing the owner too.\n */\n provideRoot?: (contribution: RootHookContribution) => () => void\n }\n readonly theme: { getTheme: () => ThemeSnapshot }\n}\n\ninterface ThemeSnapshot {\n readonly active: {\n readonly colorScheme: 'dark' | 'light'\n readonly tokens: Readonly<Record<string, string>>\n }\n}\n\ninterface LayoutSnapshot {\n readonly sidebarOpen: boolean\n readonly detailsOpen: boolean\n readonly rightbarTrack: boolean\n readonly rightbarFullscreen: boolean\n readonly panelInfo: PanelInfoSnapshot\n}\n\n/**\n * Panel selection as the standard `usePanelInfo` hook reports it: a null\n * `activePanelId` means the conversation owns the center column.\n */\ninterface PanelInfoSnapshot {\n readonly activePanelId: string | null\n}\n\n/** Optional DSH 0.1.5 right-Sidebar controls used by a Mobile close gesture. */\nexport interface SidebarRightControl {\n isExpanded(): boolean\n toggleExpanded(): void\n}\n\n/** Whether an optional service value supports the public right-Sidebar controls. */\nexport function isSidebarRightControl(value: unknown): value is SidebarRightControl {\n if (typeof value !== 'object' || value === null) return false\n const candidate = value as Partial<SidebarRightControl>\n return typeof candidate.isExpanded === 'function' && typeof candidate.toggleExpanded === 'function'\n}\n\n/**\n * Viewport width at which the dedicated layout treats the sidebar as a\n * persistent desktop panel instead of an overlay drawer. Narrow screens\n * keep the overlay behavior byte-for-byte.\n */\nexport const WIDE_LAYOUT_MIN_WIDTH_PX = 900\nconst RIGHTBAR_MIN_WIDTH_PX = 300\nconst RIGHTBAR_MAX_WIDTH_PX = 460\nconst RIGHTBAR_CENTER_MIN_WIDTH_PX = 400\nconst RIGHTBAR_DEFAULT_RATIO = 0.45\nconst SIDEBAR_EXPANDED_WIDTH_PX = 340\nconst SIDEBAR_COLLAPSED_WIDTH_PX = 56\n\nexport function isWideViewportLayout(viewportWidth: number): boolean {\n return viewportWidth >= WIDE_LAYOUT_MIN_WIDTH_PX\n}\n\n/** Resolved right-panel presentation for the dedicated responsive layout. */\nexport interface MobileRightbarLayout {\n readonly docked: boolean\n readonly width: number\n}\n\n/** Preserve a readable conversation width before turning a requested right track into a docked column. */\nexport function resolveMobileRightbarLayout(\n viewportWidth: number,\n sidebarOpen: boolean,\n track: boolean,\n fullscreen: boolean,\n): MobileRightbarLayout {\n const overlayWidth = Math.min(viewportWidth * 0.94, RIGHTBAR_MAX_WIDTH_PX)\n if (!track || fullscreen || (!isWideViewportLayout(viewportWidth) && sidebarOpen)) {\n return Object.freeze({ docked: false, width: overlayWidth })\n }\n const sidebarWidth = isWideViewportLayout(viewportWidth) && sidebarOpen\n ? SIDEBAR_EXPANDED_WIDTH_PX\n : SIDEBAR_COLLAPSED_WIDTH_PX\n const available = Math.floor(viewportWidth - sidebarWidth - RIGHTBAR_CENTER_MIN_WIDTH_PX)\n if (available < RIGHTBAR_MIN_WIDTH_PX) return Object.freeze({ docked: false, width: overlayWidth })\n const preferred = Math.min(\n RIGHTBAR_MAX_WIDTH_PX,\n Math.max(RIGHTBAR_MIN_WIDTH_PX, Math.round(viewportWidth * RIGHTBAR_DEFAULT_RATIO)),\n )\n return Object.freeze({ docked: true, width: Math.min(preferred, available) })\n}\n\n/** Whether an overlay drawer needs the modal scrim without dimming a docked desktop panel. */\nexport function isMobileScrimOpen(\n sidebarOpen: boolean,\n detailsModalOpen: boolean,\n wideViewport: boolean,\n): boolean {\n return (!wideViewport && sidebarOpen) || detailsModalOpen\n}\n\n/**\n * Close the details drawer from its scrim, collapsing the DSH 0.1.5 right\n * Sidebar first when that optional service owns the visible content.\n */\nexport function closeDetailsFromScrim(sidebarRight: unknown, closeDetails: () => void): void {\n if (isSidebarRightControl(sidebarRight) && sidebarRight.isExpanded()) {\n sidebarRight.toggleExpanded()\n }\n closeDetails()\n}\n\n/** Reads the live viewport; unknown environments (SSR, tests) stay narrow. */\nfunction viewportIsWide(): boolean {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false\n return window.matchMedia(`(min-width: ${WIDE_LAYOUT_MIN_WIDTH_PX}px)`).matches\n}\n\n/** Resolve the supported language used by the dedicated mobile layout. */\nexport function resolveMobileLayoutLanguage(\n documentLanguage: string,\n browserLanguages: readonly string[],\n): MobileLayoutLanguage {\n return [documentLanguage, ...browserLanguages]\n .map(value => value.trim().toLowerCase().split(/[-_]/u)[0])\n .find((value): value is MobileLayoutLanguage => value === 'it' || value === 'en' || value === 'zh') ?? 'en'\n}\n\nclass MobileLayoutController {\n // Wide viewports start with the persistent sidebar open; applying the\n // layout again (reconnect, refocus) reuses the module singleton below,\n // so an explicit user collapse is never reset.\n private snapshot: LayoutSnapshot = Object.freeze({\n sidebarOpen: viewportIsWide(),\n detailsOpen: false,\n rightbarTrack: false,\n rightbarFullscreen: false,\n panelInfo: Object.freeze({ activePanelId: null }),\n })\n private readonly listeners = new Set<() => void>()\n private hasMainPanel: ((id: string) => boolean) | undefined\n // Pending workspace/session navigation, cancelled whenever a newer one\n // starts. Mirrors the official LayoutController's navigation controller.\n private navigation = new AbortController()\n\n readonly subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener)\n return () => { this.listeners.delete(listener) }\n }\n\n readonly getSnapshot = (): LayoutSnapshot => this.snapshot\n\n toggleSidebar(): void {\n this.update({ sidebarOpen: !this.snapshot.sidebarOpen })\n }\n\n openDetails(): void {\n this.update({ detailsOpen: true })\n }\n\n closeDetails(): void {\n this.update({ detailsOpen: false, rightbarTrack: false, rightbarFullscreen: false })\n }\n\n closeSidebar(): void {\n this.update({ sidebarOpen: false })\n }\n\n /**\n * Invalidate the previous navigation and hand back a fresh signal. The\n * workspace controller wraps this around \"open a workspace\" and \"fork a\n * session\" (dsh-client-ui-workspace) — the path behind the sidebar's\n * new-session button. Without it startSession throws inside a\n * `.catch(reason => console.warn('new session failed:', reason))`, so the\n * button silently did nothing.\n */\n beginNavigation(): AbortSignal {\n this.navigation.abort()\n this.navigation = new AbortController()\n return this.navigation.signal\n }\n\n /** Invalidate pending navigations when this layout unloads. */\n dispose(): void {\n this.navigation.abort()\n }\n\n /** Bind panel validation to the live slot registry owned by this application. */\n bindMainPanelRegistry(hasMainPanel: (id: string) => boolean): () => void {\n this.hasMainPanel = hasMainPanel\n return () => {\n if (this.hasMainPanel === hasMainPanel) this.hasMainPanel = undefined\n }\n }\n\n /** Preserve the native seat's distinction between a docked track and fullscreen. */\n openRightbar(track = true, fullscreen = false): void {\n this.update({ detailsOpen: true, rightbarTrack: track, rightbarFullscreen: fullscreen })\n }\n\n /** Hide the right panel. */\n closeRightbar(): void {\n this.closeDetails()\n }\n\n /**\n * Select the main panel rendered in the center column; null means the\n * conversation. Mirrors the official LayoutController so the `panelInfo`\n * root hook stays truthful.\n */\n selectPanel(panelId: string | null): void {\n if (panelId !== null && this.hasMainPanel?.(panelId) !== true) {\n throw new Error(`layout.selectPanel: main panel \"${panelId}\" is not registered`)\n }\n this.navigation.abort()\n if (this.snapshot.panelInfo.activePanelId === panelId) return\n this.update({ panelInfo: Object.freeze({ activePanelId: panelId }) })\n }\n\n /** Drop a selected panel once no main-slot entry declares it. */\n retainMainPanels(panelIds: readonly string[]): void {\n const active = this.snapshot.panelInfo.activePanelId\n if (active !== null && !panelIds.includes(active)) {\n this.update({ panelInfo: Object.freeze({ activePanelId: null }) })\n }\n }\n\n private update(next: Partial<LayoutSnapshot>): void {\n const snapshot = Object.freeze({ ...this.snapshot, ...next })\n if (\n snapshot.sidebarOpen === this.snapshot.sidebarOpen\n && snapshot.detailsOpen === this.snapshot.detailsOpen\n && snapshot.rightbarTrack === this.snapshot.rightbarTrack\n && snapshot.rightbarFullscreen === this.snapshot.rightbarFullscreen\n && snapshot.panelInfo === this.snapshot.panelInfo\n ) return\n this.snapshot = snapshot\n for (const listener of this.listeners) listener()\n }\n}\n\nclass ThemePresenter {\n private appliedTokens: string[] = []\n private readonly meta = document.createElement('meta')\n\n constructor() {\n this.meta.name = 'theme-color'\n }\n\n apply(snapshot: ThemeSnapshot): void {\n const scheme = snapshot.active.colorScheme\n document.documentElement.style.colorScheme = scheme\n document.body.toggleAttribute('data-ds-dark-theme', scheme === 'dark')\n for (const name of this.appliedTokens) document.body.style.removeProperty(name)\n this.appliedTokens = []\n for (const [name, value] of Object.entries(snapshot.active.tokens)) {\n document.body.style.setProperty(name, value)\n this.appliedTokens.push(name)\n }\n this.meta.content = getComputedStyle(document.body).backgroundColor\n if (!this.meta.isConnected) document.head.append(this.meta)\n }\n\n dispose(): void {\n document.documentElement.style.removeProperty('color-scheme')\n document.body.removeAttribute('data-ds-dark-theme')\n for (const name of this.appliedTokens) document.body.style.removeProperty(name)\n this.meta.remove()\n }\n}\n\nexport const MOBILE_LAYOUT_STYLES = `\nhtml,body,#root{width:100%;height:100%;overflow:hidden}\n.dshm-shell{position:relative;display:grid;width:100%;height:100dvh;min-width:0;overflow:hidden;background:var(--dsw-alias-bg-base,#fff)}\n.dshm-main{grid-area:1/1;position:relative;min-width:0;min-height:0;margin-right:0;overflow:hidden;transition:margin-right var(--ds-transition-duration-slow,190ms) var(--ds-ease-in-out,ease)}\n.dshm-shell[data-rightbar-docked=true] .dshm-main{margin-right:var(--dshm-rightbar-width)}\n.dshm-shell[data-rightbar-docked=true] .dshm-details{position:absolute;width:var(--dshm-rightbar-width);box-shadow:none;padding-top:0}\n/* Draw above the native absolute panel without consuming its width or\n intercepting controls; only docked mode needs this column separator. */\n.dshm-shell[data-rightbar-docked=true] .dshm-details::after{content:\"\";position:absolute;inset:0 auto 0 0;width:.5px;background:var(--dsw-alias-border-l4);z-index:11;pointer-events:none}\n.dshm-main>*,.dshm-main>*>*{min-width:0}\n.dshm-drawer{position:fixed;z-index:70;inset:0 auto 0 0;box-sizing:border-box;width:56px;max-width:100%;padding-top:env(safe-area-inset-top);overflow:hidden;background:var(--dsw-alias-bg-layer-1,#f8fafc);box-shadow:none;will-change:width;transition:width 240ms cubic-bezier(.22,1,.36,1),box-shadow 240ms ease}\n.dshm-drawer[data-open=true]{width:min(88vw,340px);box-shadow:18px 0 46px rgb(15 23 42 / 18%)}\n.dshm-drawer[data-open=false]{pointer-events:auto;visibility:visible}\n.dshm-drawer>*{width:100%!important;height:100%!important;transform:translateX(-6px);opacity:.94;transition:transform 220ms cubic-bezier(.22,1,.36,1),opacity 160ms ease-out}\n.dshm-drawer[data-open=true]>*{transform:translateX(0);opacity:1}\n.dshm-drawer[data-open=false]>*{width:56px!important}\n/* display:none also suppresses fixed descendants installed by the phone adapter. */\n.dshm-drawer[data-right-modal=true]{display:none!important}\n.dshm-details{position:fixed;z-index:80;inset:0 0 0 auto;box-sizing:border-box;width:min(94vw,460px);max-width:100%;padding-top:env(safe-area-inset-top);overflow:hidden;background:var(--dsw-alias-bg-layer-1,#fff);box-shadow:-18px 0 46px rgb(15 23 42 / 18%);transform:translateX(104%);transition:transform 190ms cubic-bezier(.22,1,.36,1)}\n.dshm-details[data-open=true]{transform:translateX(0)}\n.dshm-details[data-open=false]{pointer-events:none;visibility:hidden;transition:transform 190ms cubic-bezier(.22,1,.36,1),visibility 0s linear 190ms}\n.dshm-scrim{position:fixed;z-index:65;inset:0;border:0;background:rgb(15 23 42 / 40%);opacity:0;pointer-events:none;transition:opacity 180ms ease-out}\n.dshm-scrim[data-open=true]{opacity:1;pointer-events:auto}\n.dshm-overlay{position:fixed;z-index:90;inset:0;pointer-events:none}.dshm-overlay>*{pointer-events:auto}\n.dshm-shell header{min-width:0;padding-left:52px}\n.dshm-shell textarea{font-size:16px}\n.dshm-shell table{display:block;max-width:100%;overflow-x:auto}\n.dshm-shell pre{max-width:100%;overflow-x:auto}\n.dshm-shell img,.dshm-shell video,.dshm-shell canvas,.dshm-shell svg{max-width:100%}\n.dshm-shell [data-disclosure-row]{min-width:0;max-width:100%}\n.dshm-shell [data-disclosure-row]>*{min-width:0;overflow-wrap:anywhere}\n.dshm-shell [data-context-fields]>*{min-width:0}\n.dshm-shell [class*=\"_body\"]{max-width:100%;overflow-wrap:anywhere}\n@media(max-width:420px){.dshm-shell [data-context-fields]>*{display:grid;grid-template-columns:1fr!important;gap:4px}.dshm-shell [class*=\"_ioSection\"]{grid-template-columns:1fr!important}}\n@media(max-width:600px){\n.dshm-shell [data-question-key],.dshm-shell [data-plan-review-key]{box-sizing:border-box;width:100%;height:auto!important;min-width:0;flex:none!important;align-self:flex-end;padding:6px max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right))!important}\n.dshm-shell [data-question-key]>section,.dshm-shell [data-plan-review-key]>section{width:100%;height:auto!important;min-height:0!important;max-width:none!important;max-height:min(68dvh,520px)!important;border-radius:16px!important}\n.dshm-shell [data-question-scroll],.dshm-shell [data-plan-review-scroll]{flex:0 1 auto!important;min-height:0!important;max-height:min(42dvh,360px)!important;overscroll-behavior:contain;scroll-padding-bottom:12px}\n.dshm-shell [data-question-key]>section>header{display:flex!important;visibility:visible!important;flex:none!important;gap:8px!important;padding:12px 8px 4px 14px!important}\n.dshm-shell [data-question-key]>section>header h2{min-width:0;overflow-wrap:anywhere;font-size:16px!important;line-height:22px!important}\n.dshm-shell [data-question-key]>section>header button{min-width:40px;min-height:40px}\n.dshm-shell [data-question-key] [role=radio],.dshm-shell [data-question-key] [role=checkbox]{min-height:48px!important;touch-action:manipulation}\n.dshm-shell [data-question-key]>section>footer{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center!important;flex:none!important;gap:6px 8px!important;margin-top:4px!important;padding:6px 10px 10px!important}\n.dshm-shell [data-question-key]>section>footer>:last-child{grid-column:1/-1;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px!important}\n.dshm-shell [data-question-key]>section>footer>:last-child button{width:100%;min-height:44px}\n.dshm-shell [data-plan-review-key]>section>div:last-child{display:grid!important;grid-template-columns:1fr;gap:8px!important;padding:8px 12px 10px!important}\n.dshm-shell [data-plan-review-key]>section>div:last-child>div:last-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px!important}\n.dshm-shell [data-plan-review-key]>section>div:last-child>div:last-child>button:first-child{grid-column:1/-1}\n.dshm-shell [data-plan-review-key]>section>div:last-child button{width:100%;min-height:44px}\n}\n@media(min-width:900px){\n.dshm-shell{grid-template-columns:auto minmax(0,1fr)}\n.dshm-main{grid-area:1/2}\n.dshm-drawer{position:static;grid-area:1/1;box-shadow:none}\n.dshm-drawer[data-open=true]{width:340px;box-shadow:none}\n.dshm-drawer[data-open=false]{width:56px}\n}\n@media(prefers-reduced-motion:reduce){.dshm-drawer,.dshm-details,.dshm-scrim,.dshm-drawer>*,.dshm-main{transition:none!important}}\n`\n\nfunction MobileAppFrame(props: MobileRootProps & {\n readonly controller: MobileLayoutController\n readonly requestDetailsClose: () => void\n}): ReactNode {\n const state = useSyncExternalStore(props.controller.subscribe, props.controller.getSnapshot)\n const suppressKeyboardUntil = useRef(0)\n const [viewportWidth, setViewportWidth] = useState(window.innerWidth)\n useEffect(() => {\n let frame: number | undefined\n const resize = (): void => {\n if (frame !== undefined) return\n frame = window.requestAnimationFrame(() => {\n frame = undefined\n setViewportWidth(window.innerWidth)\n })\n }\n window.addEventListener('resize', resize)\n return () => {\n window.removeEventListener('resize', resize)\n if (frame !== undefined) window.cancelAnimationFrame(frame)\n }\n }, [])\n const wideViewport = isWideViewportLayout(viewportWidth)\n const rightbar = resolveMobileRightbarLayout(\n viewportWidth,\n state.sidebarOpen,\n state.rightbarTrack,\n state.rightbarFullscreen,\n )\n const rightbarDocked = state.detailsOpen && rightbar.docked\n const [documentLanguage, setDocumentLanguage] = useState(document.documentElement.lang)\n const browserLanguages = navigator.languages.length > 0 ? navigator.languages : [navigator.language]\n const language = resolveMobileLayoutLanguage(documentLanguage, browserLanguages)\n const messages = MOBILE_LAYOUT_MESSAGES[language]\n const scrimOpen = isMobileScrimOpen(state.sidebarOpen, state.detailsOpen && !rightbarDocked, wideViewport)\n const activeSessionId = props.useSessions(session => {\n const current = session.current\n return current !== undefined && session.byId[current]?.blank === false ? current : undefined\n })\n const hasSession = activeSessionId !== undefined\n\n useEffect(() => {\n const observer = new MutationObserver(() => { setDocumentLanguage(document.documentElement.lang) })\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] })\n return () => { observer.disconnect() }\n }, [])\n\n useEffect(() => {\n if (!hasSession) props.controller.closeDetails()\n }, [hasSession, props.controller])\n\n // Mirror the stock layout: project the current session title into the\n // browser tab, restoring the product title when no session is selected.\n const sessionTitle = props.useSessions(session =>\n session.current === undefined ? undefined : session.byId[session.current]?.title,\n )\n useEffect(() => {\n const productTitle = document.title\n if (sessionTitle !== undefined) document.title = `${sessionTitle} — ${productTitle}`\n return () => { document.title = productTitle }\n }, [sessionTitle])\n\n useEffect(() => {\n const suppressAutofocus = (event: FocusEvent): void => {\n if (performance.now() >= suppressKeyboardUntil.current) return\n const target = event.target\n if (target instanceof HTMLElement && (target.matches('input,textarea') || target.isContentEditable)) target.blur()\n }\n const suppressBranchAutofocus = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const branch = event.target.closest('button[aria-label*=\"分支\"],button[aria-label*=\"Branch\"],button[aria-label*=\"branch\"],button[aria-label*=\"Ramo\"],button[aria-label*=\"ramo\"]')\n if (branch === null || branch.hasAttribute('disabled') || branch.getAttribute('aria-disabled') === 'true') return\n suppressKeyboardUntil.current = performance.now() + 700\n window.setTimeout(() => {\n const active = document.activeElement\n if (active instanceof HTMLElement && (active.matches('input,textarea') || active.isContentEditable)) active.blur()\n }, 0)\n }\n const suppressCommandAutofocus = (event: MouseEvent): void => {\n if (!(event.target instanceof Element)) return\n const commandButton = event.target.closest('button[aria-haspopup=\"listbox\"]')\n if (commandButton === null) return\n // The native composer deliberately preserves editor focus on mousedown;\n // mobile command menus should open without summoning the soft keyboard.\n suppressKeyboardUntil.current = performance.now() + 700\n event.preventDefault()\n event.stopPropagation()\n window.setTimeout(() => {\n const active = document.activeElement\n if (active instanceof HTMLElement && (active.matches('input,textarea') || active.isContentEditable)) active.blur()\n }, 0)\n }\n document.addEventListener('focusin', suppressAutofocus, true)\n document.addEventListener('click', suppressBranchAutofocus, true)\n document.addEventListener('mousedown', suppressCommandAutofocus, true)\n return () => {\n document.removeEventListener('focusin', suppressAutofocus, true)\n document.removeEventListener('click', suppressBranchAutofocus, true)\n document.removeEventListener('mousedown', suppressCommandAutofocus, true)\n }\n }, [])\n\n // A persistent wide sidebar stays put: selecting a session only dismisses\n // the narrow overlay drawer (and its soft-keyboard suppression).\n const closeDrawerAfterSessionAction = (event: { readonly target: EventTarget | null }): void => {\n if (viewportIsWide()) return\n if (!(event.target instanceof Element)) return\n const row = event.target.closest<HTMLElement>('[role=\"treeitem\"][aria-selected]')\n const action = event.target.closest('button,[role=\"button\"]')\n const startsSession = action?.matches('button[class*=\"_newSession\"],button[class*=\"_brand\"]')\n || /新建会话|新会话|new session|new conversation|nuova sessione|nuova conversazione/i.test(action?.getAttribute('aria-label') ?? '')\n if (row === null && !startsSession) return\n if (row !== null && action !== null && action !== row) return\n suppressKeyboardUntil.current = performance.now() + 500\n // Let the session row finish its own click handler before unmounting the drawer.\n window.setTimeout(() => {\n props.controller.closeSidebar()\n const active = document.activeElement\n if (active instanceof HTMLInputElement || active instanceof HTMLTextAreaElement) active.blur()\n }, 0)\n }\n\n return createElement('div', {\n className: 'dshm-shell', lang: language,\n 'data-rightbar-docked': rightbarDocked,\n style: { '--dshm-rightbar-width': `${rightbar.width}px` },\n },\n createElement('main', {\n className: 'dshm-main',\n 'data-dsh-mobile-session': activeSessionId,\n // Legacy dsh-web community plugins use semantic pane attributes as their\n // compatibility path when the stock CSS-module column names are absent.\n 'data-pane': 'conversation',\n },\n props.renderSlot('main', {}, {\n entryKey: state.panelInfo.activePanelId ?? 'conversation',\n fallback: props.renderSlot('conversation', {}),\n })),\n createElement('button', {\n 'aria-label': messages.closePanels,\n className: 'dshm-scrim',\n // A persistent wide sidebar needs no dimming; the scrim only covers\n // the narrow overlay drawer and the details panel.\n 'data-open': scrimOpen,\n 'aria-hidden': !scrimOpen,\n onClick: () => {\n if (!scrimOpen) return\n state.detailsOpen ? props.requestDetailsClose() : props.controller.closeSidebar()\n },\n tabIndex: scrimOpen ? 0 : -1,\n type: 'button',\n }),\n createElement('aside', {\n 'aria-label': messages.workspaceNavigation,\n className: 'dshm-drawer',\n 'data-pane': 'sidebar',\n 'data-open': state.sidebarOpen,\n // The phone adapter promotes the whale toggle to a fixed high layer.\n // Remove that entire navigation surface while the right modal owns focus.\n 'data-right-modal': state.detailsOpen && !rightbarDocked,\n ...(state.detailsOpen && !rightbarDocked ? { inert: '', 'aria-hidden': true } : {}),\n // Community rows collapse their label when an ancestor carries this marker.\n ...(state.sidebarOpen ? {} : { 'data-sidebar-collapsed': '' }),\n onClickCapture: closeDrawerAfterSessionAction,\n }, props.renderSlot('sidebar', {\n collapsed: !state.sidebarOpen,\n width: state.sidebarOpen ? 340 : 56,\n })),\n createElement('aside', {\n 'aria-hidden': !state.detailsOpen,\n className: 'dshm-details',\n 'data-open': state.detailsOpen,\n ...(state.detailsOpen ? {} : { inert: '' }),\n }, [\n // DSH 0.1.3 and earlier bind details to a Session. Newer DSH owns the\n // Session decision inside its root-scoped rightbar occupant, so that\n // occupant must stay mounted even while no Session is selected.\n hasSession ? props.renderSlot('details', {}) : undefined,\n props.renderSlot('rightbar', {\n width: rightbar.width,\n viewportWidth,\n // The official frame reports whether a persistent column still fits\n // (normal.rightbar > 0); this layout renders the right panel in the\n // details overlay, which needs no column space. Reporting false would\n // make RightbarSeat force the surface closed immediately after opening\n // it (ui-sidebar-right: `shown && !fullscreen && !canShow` ->\n // actions.setExpanded(false)), so the panel could never stay open on a\n // phone-width viewport.\n canShow: true,\n }),\n ]),\n createElement('div', { className: 'dshm-overlay', 'data-shell-overlay': true }, props.renderSlot('shell.overlay', {})),\n )\n}\n\n// One controller per document: re-applying the layout (reconnect, tab\n// refocus) must not reset the user's explicit sidebar toggle.\nlet sharedController: MobileLayoutController | undefined\n\n/** Replace the desktop layout module on the authenticated mobile surface. */\nexport function apply(ctx: MobileClientContext): void {\n sharedController ??= new MobileLayoutController()\n const controller = sharedController\n ctx.effect(() => {\n const style = document.createElement('style')\n style.dataset.plugin = 'dsh-mobile-layout'\n style.textContent = MOBILE_LAYOUT_STYLES\n document.head.append(style)\n const disposeMainPanelRegistry = controller.bindMainPanelRegistry(id =>\n ctx.slots.entries('main').some(entry => entry.options.key === id))\n const disposeService = ctx.reflect.provide('layout', controller)\n // The official layout owns the root `panelInfo` hook; replacing the layout\n // module means replacing that owner. Without it every registration that\n // declares the standard `usePanelInfo` prop fails assembly\n // (\"strict standard hook 'panelInfo' has no source\") and renders as a dead\n // cell — the workspace sidebar's session list lives exactly there.\n const disposePanelInfo = typeof ctx.slots.provideRoot === 'function'\n ? ctx.slots.provideRoot({ hooks: { panelInfo: {\n getSnapshot: () => controller.getSnapshot().panelInfo,\n subscribe: (listener: () => void) => controller.subscribe(listener),\n } } })\n : () => {}\n const disposeRoot = ctx.slots.register({\n name: 'root',\n children: {\n sidebar: { kind: 'single', scope: 'root' },\n conversation: { kind: 'single', scope: 'session-maybe' },\n // The conversation panel moved into this keyed slot in DSH 0.1.5;\n // without the declaration the center column stays blank.\n main: { kind: 'keyed', scope: 'root' },\n rightbar: { kind: 'single', scope: 'root' },\n details: { kind: 'single', scope: 'session' },\n 'shell.overlay': { kind: 'list', scope: 'root' },\n },\n }, props => createElement(MobileAppFrame, {\n ...props,\n controller,\n // sidebarRight is registered after the layout it depends on, so resolve\n // the optional service at gesture time rather than caching it at boot.\n requestDetailsClose: () => {\n closeDetailsFromScrim(ctx.get('sidebarRight'), () => { controller.closeDetails() })\n },\n }))\n const retainMainPanels = (): void => {\n controller.retainMainPanels(ctx.slots.entries('main').flatMap(entry =>\n entry.options.key === undefined ? [] : [entry.options.key]))\n }\n const disposePanels = ctx.slots.subscribe('main', retainMainPanels)\n retainMainPanels()\n return () => {\n controller.dispose()\n disposePanels()\n disposeRoot()\n disposePanelInfo()\n void disposeService()\n disposeMainPanelRegistry()\n style.remove()\n }\n }, 'dsh-mobile: dedicated root layout')\n\n ctx.effect(() => {\n const presenter = new ThemePresenter()\n presenter.apply(ctx.theme.getTheme())\n const off = ctx.on('theme/change', snapshot => { presenter.apply(snapshot) })\n return () => { off(); presenter.dispose() }\n }, 'dsh-mobile: theme presenter')\n}\n\n/** Preserve the official layout module's dependency ordering. */\nexport const inject: readonly string[] = ['slots', 'theme']\n"],"mappings":";;;;;;;;EAEA,MAAa,yBAAyB,OAAO,OAAO;GAClD,IAAI,OAAO,OAAO;IAAE,aAAa;IAAmB,qBAAqB;GAAwC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AY,IAAI,eAAe;IACrC,UAAU,MAAM,IAAI,MAAM,SAAS,CAAC;IACpC,MAAM,MAAM,IAAI,GAAG,iBAAgB,aAAY;KAAE,UAAU,MAAM,QAAQ;IAAE,CAAC;IAC5E,aAAa;KAAE,IAAI;KAAG,UAAU,QAAQ;IAAE;GAC5C,GAAG,6BAA6B;EAClC;;EAGA,MAAa,SAA4B,CAAC,SAAS,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mobile",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "DeepSeek Harness 移动端适配与安全访问插件,支持局域网、远程连接、Android App 和手机浏览器。",
|
|
6
6
|
"type": "module",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"README.md",
|
|
32
32
|
"README.en.md",
|
|
33
33
|
"CHANGELOG.md",
|
|
34
|
+
"docs/DSH_0.1.5_LAN.md",
|
|
34
35
|
"docs/SELF_HOSTED_FRP.md",
|
|
35
36
|
"LICENSE",
|
|
36
37
|
"FUNNEL_THIRD_PARTY_LICENSES.txt",
|
|
@@ -100,10 +101,10 @@
|
|
|
100
101
|
"license": "Apache-2.0",
|
|
101
102
|
"peerDependencies": {
|
|
102
103
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
103
|
-
"@deepseek-ai/dsh-client-connection": "^0.1.0-rc.5 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0",
|
|
104
|
-
"@deepseek-ai/dsh-commands": "^0.1.0-rc.6 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0",
|
|
105
|
-
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.5 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0",
|
|
106
|
-
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0",
|
|
104
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.0-rc.5 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0 || ^0.1.5-0",
|
|
105
|
+
"@deepseek-ai/dsh-commands": "^0.1.0-rc.6 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0 || ^0.1.5-0",
|
|
106
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.0-rc.5 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0 || ^0.1.5-0",
|
|
107
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6 || ^0.1.1-0 || ^0.1.2-0 || ^0.1.3-0 || ^0.1.5-0",
|
|
107
108
|
"react": "^18.2.0"
|
|
108
109
|
},
|
|
109
110
|
"peerDependenciesMeta": {
|
|
@@ -133,17 +134,18 @@
|
|
|
133
134
|
"selfsigned": "^5.5.0"
|
|
134
135
|
},
|
|
135
136
|
"devDependencies": {
|
|
136
|
-
"@deepseek-ai/cordis": "4.0.
|
|
137
|
-
"@deepseek-ai/cordis-plugin-include": "1.0.
|
|
138
|
-
"@deepseek-ai/cordis-plugin-loader": "1.0.
|
|
139
|
-
"@deepseek-ai/dsh-
|
|
140
|
-
"@deepseek-ai/dsh-
|
|
141
|
-
"@deepseek-ai/dsh-
|
|
137
|
+
"@deepseek-ai/cordis": "4.0.2",
|
|
138
|
+
"@deepseek-ai/cordis-plugin-include": "1.0.7",
|
|
139
|
+
"@deepseek-ai/cordis-plugin-loader": "1.0.3",
|
|
140
|
+
"@deepseek-ai/dsh-client-connection": "0.1.5-rc.2",
|
|
141
|
+
"@deepseek-ai/dsh-commands": "0.1.5-rc.2",
|
|
142
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.5-rc.2",
|
|
143
|
+
"@deepseek-ai/dsh-llm": "0.1.5-rc.2",
|
|
142
144
|
"@types/js-yaml": "^4.0.9",
|
|
143
145
|
"@types/node": "^24.3.0",
|
|
144
146
|
"@types/qrcode": "^1.5.5",
|
|
145
147
|
"@types/react": "~18.3.1",
|
|
146
|
-
"js-yaml": "^4.3.
|
|
148
|
+
"js-yaml": "^4.3.2",
|
|
147
149
|
"react": "^18.2.0",
|
|
148
150
|
"tsdown": "^0.22.14",
|
|
149
151
|
"typescript": "^6.0.3",
|