@dsmm/dsmm 0.1.5 → 0.1.6

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.
@@ -1,5 +1,12 @@
1
1
  import { isProfileId } from "../profile-remote.js";
2
2
  import { editStructuredPath, moveFallback } from "./structured.js";
3
+ function modelSelectionWatermark(window) {
4
+ let watermark = -1;
5
+ for (const entry of window.entries)
6
+ if (entry.type === "event" && entry.event.type === "model/selection")
7
+ watermark = Math.max(watermark, Number(entry.event.seq));
8
+ return watermark;
9
+ }
3
10
  const NEW_EDITOR = "";
4
11
  export const NEW_PROFILE_CONTENT = '{\n "version": 1,\n "id": "new-profile",\n "label": "New profile",\n "settings": {\n // Runtime overlay only. Omitted fields inherit the deployment baseline.\n "defaultActive": true\n }\n}\n';
5
12
  /** A valid external CAS conflict is reconcilable; corruption is never reset implicitly. */
@@ -19,6 +26,21 @@ export class ProfilesController {
19
26
  sessionGeneration = 0;
20
27
  catalogGeneration = 0;
21
28
  catalogRemote = null;
29
+ modelSelectorGeneration = 0;
30
+ modelSelector = null;
31
+ modelSelectionSource = null;
32
+ modelSelectionSessionId = null;
33
+ modelSelectionGeneration = 0;
34
+ stopModelSelection = null;
35
+ modelEvents = null;
36
+ modelEventsSessionId = null;
37
+ modelEventsGeneration = 0;
38
+ modelEventsWatermark = -1;
39
+ stopModelEvents = null;
40
+ modelInteraction = null;
41
+ modelInteractionSessionId = null;
42
+ modelInteractionGeneration = 0;
43
+ stopModelInteraction = null;
22
44
  store = {
23
45
  getSnapshot: () => this.current,
24
46
  subscribe: (listener) => {
@@ -36,7 +58,7 @@ export class ProfilesController {
36
58
  refreshCatalog: () => this.refreshCatalog(), refreshSession: () => this.refreshSession(),
37
59
  chooseSessionProfile: (id) => { if (!this.disposed && this.current.sessionBusy === null && this.current.busy === null && !this.current.dirty)
38
60
  this.publish({ sessionChoice: id, sessionNotice: null }); },
39
- applySession: () => this.selectSession(false), resetSession: () => this.selectSession(true),
61
+ applySession: (options) => this.selectSession(false, options), resetSession: () => this.selectSession(true),
40
62
  setFieldInvalid: (field, invalid) => {
41
63
  if (this.disposed)
42
64
  return;
@@ -50,7 +72,54 @@ export class ProfilesController {
50
72
  constructor(remote) {
51
73
  this.remote = remote;
52
74
  }
53
- dispose() { this.disposed = true; this.generation += 1; this.sessionGeneration += 1; this.catalogGeneration += 1; this.catalogRemote = null; this.listeners.clear(); }
75
+ dispose() { this.disposed = true; this.generation += 1; this.sessionGeneration += 1; this.catalogGeneration += 1; this.modelSelectorGeneration += 1; this.modelSelectionGeneration += 1; this.stopModelSelection?.(); this.stopModelEvents?.(); this.stopModelInteraction?.(); this.stopModelSelection = null; this.stopModelEvents = null; this.stopModelInteraction = null; this.modelSelectionSource = null; this.modelEvents = null; this.modelInteraction = null; this.catalogRemote = null; this.modelSelector = null; this.listeners.clear(); }
76
+ attachModelSelector(remote) {
77
+ if (this.disposed)
78
+ return;
79
+ this.modelSelectorGeneration += 1;
80
+ this.modelSelector = remote;
81
+ }
82
+ attachModelSelectionSource(sessionId, source) {
83
+ if (this.disposed || (sessionId === this.modelSelectionSessionId && source === this.modelSelectionSource))
84
+ return;
85
+ this.modelSelectionGeneration += 1;
86
+ this.stopModelSelection?.();
87
+ this.modelSelectionSessionId = sessionId;
88
+ this.modelSelectionSource = source;
89
+ this.stopModelSelection = source?.subscribe(() => { this.modelSelectionGeneration += 1; }) ?? null;
90
+ }
91
+ attachModelEventSource(sessionId, source) {
92
+ if (this.disposed || (sessionId === this.modelEventsSessionId && source === this.modelEvents))
93
+ return;
94
+ this.modelEventsGeneration += 1;
95
+ this.stopModelEvents?.();
96
+ this.modelEventsSessionId = sessionId;
97
+ this.modelEvents = source;
98
+ this.modelEventsWatermark = source === null ? -1 : modelSelectionWatermark(source.getSnapshot());
99
+ this.stopModelEvents = source?.subscribe(() => {
100
+ const window = source.getSnapshot(), change = window.change;
101
+ if (change.kind === "settle-assistant")
102
+ return;
103
+ let watermark = change.kind === "replace" ? -1 : this.modelEventsWatermark;
104
+ for (const entry of change.entries)
105
+ if (entry.type === "event" && entry.event.type === "model/selection")
106
+ watermark = Math.max(watermark, Number(entry.event.seq));
107
+ if (watermark !== this.modelEventsWatermark) {
108
+ this.modelEventsWatermark = watermark;
109
+ this.modelEventsGeneration += 1;
110
+ }
111
+ }) ?? null;
112
+ }
113
+ attachModelInteractionSource(sessionId, source) {
114
+ if (this.disposed || (sessionId === this.modelInteractionSessionId && source === this.modelInteraction))
115
+ return;
116
+ this.modelInteractionGeneration += 1;
117
+ this.stopModelInteraction?.();
118
+ this.modelInteractionSessionId = sessionId;
119
+ this.modelInteraction = source;
120
+ this.stopModelInteraction = source?.subscribe(() => { if (source.getSnapshot().status === "selecting")
121
+ this.modelInteractionGeneration += 1; }) ?? null;
122
+ }
54
123
  attachCatalog(remote) {
55
124
  if (this.disposed)
56
125
  return;
@@ -64,6 +133,12 @@ export class ProfilesController {
64
133
  if (this.disposed || id === this.current.currentSessionId)
65
134
  return;
66
135
  this.sessionGeneration += 1;
136
+ if (id !== this.modelSelectionSessionId)
137
+ this.attachModelSelectionSource(null, null);
138
+ if (id !== this.modelEventsSessionId)
139
+ this.attachModelEventSource(null, null);
140
+ if (id !== this.modelInteractionSessionId)
141
+ this.attachModelInteractionSource(null, null);
67
142
  this.publish({ currentSessionId: id, session: null, sessionChoice: null, sessionBusy: null, sessionIssue: null, sessionNotice: null });
68
143
  if (id !== null)
69
144
  void this.refreshSession();
@@ -110,7 +185,7 @@ export class ProfilesController {
110
185
  this.publish({ sessionBusy: null });
111
186
  }
112
187
  }
113
- async selectSession(reset) {
188
+ async selectSession(reset, options) {
114
189
  const { currentSessionId: id, session, sessionChoice, snapshot } = this.current;
115
190
  if (this.disposed || id === null || session === null || !session.switchAllowed || this.current.sessionBusy !== null
116
191
  || this.current.busy !== null || this.current.dirty || this.current.pendingEditor !== null)
@@ -120,7 +195,16 @@ export class ProfilesController {
120
195
  if (selectedId !== null && revision == null)
121
196
  return;
122
197
  const generation = ++this.sessionGeneration;
198
+ const useProfileModel = !reset && options?.useProfileModel === true;
199
+ const selector = this.modelSelector, selectorGeneration = this.modelSelectorGeneration;
200
+ const modelSource = this.modelSelectionSource, modelGeneration = this.modelSelectionGeneration;
201
+ const modelSnapshot = modelSource?.getSnapshot();
202
+ const eventSource = this.modelEvents, eventGeneration = this.modelEventsGeneration;
203
+ const eventWatermark = eventSource === null ? -1 : modelSelectionWatermark(eventSource.getSnapshot());
204
+ const interaction = this.modelInteraction, interactionGeneration = this.modelInteractionGeneration;
205
+ const pendingNativeChoice = interaction?.getSnapshot().status === "selecting";
123
206
  const live = () => !this.disposed && generation === this.sessionGeneration && id === this.current.currentSessionId;
207
+ const selectorLive = () => live() && selector !== null && selector === this.modelSelector && selectorGeneration === this.modelSelectorGeneration;
124
208
  this.publish({ sessionBusy: reset ? "reset" : "apply", sessionIssue: null, sessionNotice: null });
125
209
  try {
126
210
  const accepted = await this.unwrap(this.remote.selectSession(id, {
@@ -129,8 +213,53 @@ export class ProfilesController {
129
213
  }));
130
214
  if (accepted.sessionId !== id)
131
215
  throw { kind: "assembly", code: "unavailable" };
132
- if (live())
133
- this.publish({ session: accepted, sessionChoice: accepted.selection.selectedId, sessionNotice: reset ? "reset" : "applied" });
216
+ if (!live())
217
+ return;
218
+ this.publish({ session: accepted, sessionChoice: accepted.selection.selectedId, sessionNotice: useProfileModel ? null : reset ? "reset" : "applied" });
219
+ if (!useProfileModel || !live())
220
+ return;
221
+ if (accepted.profileModel === undefined) {
222
+ this.publish({ sessionIssue: { kind: "assembly", code: "model-unconfigured", source: "profile-model" } });
223
+ return;
224
+ }
225
+ if (!selectorLive()) {
226
+ this.publish({ sessionIssue: { kind: "assembly", code: "model-service-unavailable", source: "profile-model" } });
227
+ return;
228
+ }
229
+ if (modelSource === null || modelSnapshot === undefined || this.modelSelectionSessionId !== id || modelSource !== this.modelSelectionSource || modelSource.getSnapshot() === undefined) {
230
+ this.publish({ sessionIssue: { kind: "assembly", code: "model-observation-unavailable", source: "profile-model" } });
231
+ return;
232
+ }
233
+ // Projection fences cover observed view changes, including a frame whose
234
+ // notification has not fired. The raw sequence fence below covers deduped intent.
235
+ if (modelGeneration !== this.modelSelectionGeneration || !Object.is(modelSnapshot, modelSource.getSnapshot())) {
236
+ this.publish({ sessionIssue: { kind: "assembly", code: "model-choice-changed", source: "profile-model" } });
237
+ return;
238
+ }
239
+ if (eventSource === null || eventSource !== this.modelEvents || this.modelEventsSessionId !== id
240
+ || interaction === null || interaction !== this.modelInteraction || this.modelInteractionSessionId !== id) {
241
+ this.publish({ sessionIssue: { kind: "assembly", code: "model-observation-unavailable", source: "profile-model" } });
242
+ return;
243
+ }
244
+ if (eventGeneration !== this.modelEventsGeneration || eventWatermark !== modelSelectionWatermark(eventSource.getSnapshot())
245
+ || interactionGeneration !== this.modelInteractionGeneration || pendingNativeChoice || interaction.getSnapshot().status === "selecting") {
246
+ this.publish({ sessionIssue: { kind: "assembly", code: "model-choice-changed", source: "profile-model" } });
247
+ return;
248
+ }
249
+ try {
250
+ // The accepted DTO and current native view have the same validated ID;
251
+ // native strict codecs remain authoritative for its branded wire type.
252
+ await this.unwrap(selector.selectModel({ sessionId: id, ...accepted.profileModel }));
253
+ // Never echo the returned model locally: native projections own the
254
+ // actual picker, and a later native Models-tab selection must win.
255
+ if (live())
256
+ this.publish(selectorLive() && modelSource === this.modelSelectionSource && this.modelSelectionSessionId === id ? { sessionNotice: "applied-with-model" }
257
+ : { sessionIssue: { kind: "assembly", code: "model-service-unavailable", source: "profile-model" } });
258
+ }
259
+ catch {
260
+ if (live())
261
+ this.publish({ sessionIssue: { kind: "assembly", code: selectorLive() ? "model-selection-failed" : "model-service-unavailable", source: "profile-model" } });
262
+ }
134
263
  }
135
264
  catch (error) {
136
265
  if (live())
@@ -1,6 +1,6 @@
1
1
  import type { Context } from "@deepseek-ai/cordis";
2
2
  export { ProfilesController, NEW_PROFILE_CONTENT } from "./controller.js";
3
- export type { ProfilesActions, ProfilesViewSnapshot, ProfilesIssue } from "./controller.js";
3
+ export type { ProfilesActions, ProfilesViewSnapshot, ProfilesIssue, SessionApplyOptions, ProfileModelSelectorRemote } from "./controller.js";
4
4
  export { ProfilesSection } from "./ProfilesSection.js";
5
5
  export type { ProfilesSectionProps, ProfilesInjected } from "./ProfilesSection.js";
6
6
  export { NS, en, zh } from "./locales.js";
@@ -35,14 +35,41 @@ export async function apply(ctx) {
35
35
  // make sessionless Settings depend on a Conversation/session provider.
36
36
  void profileCtx.inject(["remote.session"], (catalogCtx) => {
37
37
  controller.attachCatalog(catalogCtx.remote.session);
38
- catalogCtx.effect(() => () => controller.attachCatalog(null), "dsmm: native catalog lifetime");
38
+ controller.attachModelSelector(catalogCtx.remote.session);
39
+ catalogCtx.effect(() => () => { controller.attachModelSelector(null); controller.attachCatalog(null); }, "dsmm: native catalog/selector lifetime");
39
40
  });
40
- void profileCtx.inject(["uiSession"], (sessionCtx) => {
41
+ void profileCtx.inject(["uiSession", "sessions"], (sessionCtx) => {
41
42
  const source = sessionCtx.uiSession.adapter.current;
42
- const update = () => controller.setSession(source.getSnapshot().key ?? null);
43
+ // This adapter compiles with both Host and Client Cordis declarations;
44
+ // the injected browser service has the public Client Sessions face.
45
+ const nativeSessions = sessionCtx.sessions;
46
+ const update = () => {
47
+ const binding = source.getSnapshot();
48
+ controller.setSession(binding.key ?? null);
49
+ controller.attachModelSelectionSource(binding.key ?? null, binding.key === undefined ? null : binding.keyedHooks.projection?.("modelSelection") ?? null);
50
+ controller.attachModelEventSource(binding.key ?? null, binding.key === undefined ? null : nativeSessions.binding(binding.key)?.eventSource ?? null);
51
+ };
43
52
  update();
44
53
  sessionCtx.effect(() => source.subscribe(update), "dsmm: current native session");
45
- sessionCtx.effect(() => () => controller.setSession(null), "dsmm: native session withdrawal");
54
+ sessionCtx.effect(() => () => { controller.attachModelSelectionSource(null, null); controller.attachModelEventSource(null, null); controller.attachModelInteractionSource(null, null); controller.setSession(null); }, "dsmm: native session withdrawal");
55
+ void sessionCtx.inject(["modelDirectories", "remote.session"], (modelCtx) => {
56
+ const updateInteraction = () => {
57
+ const id = source.getSnapshot().key;
58
+ if (id === undefined || nativeSessions.binding(id) === undefined) {
59
+ controller.attachModelInteractionSource(null, null);
60
+ return;
61
+ }
62
+ try {
63
+ controller.attachModelInteractionSource(id, modelCtx.modelDirectories.directoryFor(id).store);
64
+ }
65
+ catch {
66
+ controller.attachModelInteractionSource(null, null);
67
+ } // An ended native scope fails closed for the optional model stage.
68
+ };
69
+ updateInteraction();
70
+ modelCtx.effect(() => source.subscribe(updateInteraction), "dsmm: native model interaction binding");
71
+ modelCtx.effect(() => () => controller.attachModelInteractionSource(null, null), "dsmm: native model interaction withdrawal");
72
+ });
46
73
  sessionCtx.slots.inject("conversation.session.header.utilities", () => sessionCtx.slots.register({
47
74
  name: "conversation.session.header.utilities", id: "dsmm-session-profiles", order: 30, locale: NS,
48
75
  inject: () => ({ hooks: { profiles: controller.store }, ...controller.actions }),
@@ -49,6 +49,25 @@ export declare const en: {
49
49
  sessionScope: string;
50
50
  sessionSelect: string;
51
51
  globalActionHint: string;
52
+ headerProfile: string;
53
+ headerProfileLabel: string;
54
+ headerCaptured: string;
55
+ headerSavedUnavailable: string;
56
+ headerLoading: string;
57
+ headerApplying: string;
58
+ headerApplied: string;
59
+ headerBusy: string;
60
+ headerUnavailable: string;
61
+ headerDraft: string;
62
+ headerConflict: string;
63
+ headerRefused: string;
64
+ headerKeepModelGroup: string;
65
+ headerUseModelGroup: string;
66
+ headerModelDefaultHint: string;
67
+ headerNoProfileModel: string;
68
+ headerModelUnconfirmed: string;
69
+ headerAppliedWithModel: string;
70
+ headerModelChoiceChanged: string;
52
71
  noSession: string;
53
72
  sessionUnavailable: string;
54
73
  sessionBusy: string;
@@ -65,6 +84,7 @@ export declare const en: {
65
84
  sessionRefresh: string;
66
85
  sessionApplied: string;
67
86
  sessionResetDone: string;
87
+ sessionAppliedWithModel: string;
68
88
  sessionDirty: string;
69
89
  roleState: string;
70
90
  catalogTitle: string;
@@ -23,6 +23,11 @@ export const en = {
23
23
  invalidProfile: "Unavailable profile: {id}", details: "Host diagnostic", retry: "Resolve the diagnostic, refresh profiles, then retry.",
24
24
  globalScope: "Global default for future sessions", sessionScope: "Current native session", sessionSelect: "Current-session profile",
25
25
  globalActionHint: "Apply saved profile below changes the global default for future unscoped sessions only. It does not apply to the current session.",
26
+ headerProfile: "Profile", headerProfileLabel: "Current-session profile (header)", headerCaptured: "captured global default", headerSavedUnavailable: "saved profile unavailable",
27
+ headerLoading: "Loading profile…", headerApplying: "Applying profile…", headerApplied: "Profile applied.", headerBusy: "Session is busy.", headerUnavailable: "Profile unavailable.", headerDraft: "Save or discard the draft in Settings.", headerConflict: "Profile changed elsewhere. Refresh in Settings.", headerRefused: "Profile change unconfirmed. Check Settings.",
28
+ headerKeepModelGroup: "Switch profile — keep current model", headerUseModelGroup: "Switch and use profile model", headerModelDefaultHint: "Normal switching preserves the current model. Explicit switch-and-use-model also saves the native model default, like the Models tab.",
29
+ headerNoProfileModel: "Profile applied; no main model configured. Current model kept.", headerModelUnconfirmed: "Profile applied; model change unconfirmed. Check Models/Settings.", headerAppliedWithModel: "Profile and native model applied.",
30
+ headerModelChoiceChanged: "Profile applied; newer native model choice kept.",
26
31
  noSession: "No native session is selected. Session Apply is disabled; global defaults and drafts remain editable.",
27
32
  sessionUnavailable: "The current session could not be confirmed. Refresh its state before retrying; the prior policy is kept.",
28
33
  sessionBusy: "Switching is unavailable: {reason}. The Host must reserve a truly idle ordinary session before applying.",
@@ -32,6 +37,7 @@ export const en = {
32
37
  sessionConflict: "The session selection or admission epoch changed elsewhere. The prior display and draft are kept. Refresh current-session state before applying again.",
33
38
  sessionApply: "Apply profile to current session", sessionApplying: "Applying current-session profile…", sessionReset: "Pin baseline for current session", sessionResetting: "Pinning current-session baseline…", sessionRefresh: "Refresh current-session state",
34
39
  sessionApplied: "Applied the saved revision to this session only. Global default and existing children were not changed.", sessionResetDone: "Pinned the deployment baseline for this session only. Global default was not changed.",
40
+ sessionAppliedWithModel: "Applied this session profile and explicitly selected its native main model. Native model-default persistence follows the Models tab; the global profile default was not changed.",
35
41
  sessionDirty: "Save or explicitly discard the editor draft before applying a current-session choice.",
36
42
  roleState: "Admitted route {route}; strategy {strategy}; retries {retries}; rate-limit failures {failures}; switches {switches}; total delay {delay} ms.",
37
43
  catalogTitle: "Native model catalog", catalogHint: "Catalog listings are advisory, not network or account health checks. Unlisted/manual routes stay editable; refresh never changes the draft or native model default.",
@@ -71,11 +77,16 @@ export const zh = {
71
77
  invalidProfile: "不可用配置档:{id}", details: "Host 诊断", retry: "请解决诊断问题,刷新配置档后重试。",
72
78
  globalScope: "未来会话的全局默认值", sessionScope: "当前原生会话", sessionSelect: "当前会话配置档",
73
79
  globalActionHint: "下方应用已保存配置档仅改变未来没有独立选择的会话的全局默认值,不会应用到当前会话。",
80
+ headerProfile: "配置档", headerProfileLabel: "当前会话配置档(会话栏)", headerCaptured: "已捕获的全局默认值", headerSavedUnavailable: "保存的配置档不可用",
81
+ headerLoading: "加载配置档…", headerApplying: "应用配置档…", headerApplied: "配置档已应用。", headerBusy: "会话忙碌。", headerUnavailable: "配置档不可用。", headerDraft: "请在设置中保存或丢弃草稿。", headerConflict: "配置档已在其他位置改变,请在设置中刷新。", headerRefused: "未确认配置档更改,请检查设置。",
82
+ headerKeepModelGroup: "切换配置档 — 保留当前模型", headerUseModelGroup: "切换并使用配置档模型", headerModelDefaultHint: "普通切换保留当前模型。明确切换并使用模型还会像模型页一样保存原生模型默认值。", headerNoProfileModel: "配置档已应用,未配置主模型。当前模型已保留。", headerModelUnconfirmed: "配置档已应用,模型更改未确认。请检查模型或设置页。", headerAppliedWithModel: "配置档和原生模型已应用。",
83
+ headerModelChoiceChanged: "配置档已应用,已保留更新的原生模型选择。",
74
84
  noSession: "未选择原生会话。会话应用已禁用;仍可编辑全局默认值和草稿。", sessionUnavailable: "无法确认当前会话。重试前请刷新状态;原策略已保留。", sessionBusy: "暂不可切换:{reason}。Host 必须先保留真正空闲的普通会话。", sessionState: "会话 {id}:{profile};范围 {scope};准入代次 {epoch}。", sessionBaseline: "部署基线",
75
85
  sessionGlobalCaptured: "已捕获的全局默认值(没有明确会话覆盖)",
76
86
  sessionAdmittedProfile: "{id}(修订 {revision})", sessionFutureDefault: "未来没有独立选择的会话的全局默认值:{profile}。这不会改变当前会话的准入。",
77
87
  sessionConflict: "会话选择或准入代次已在其他位置改变。原显示和草稿已保留。再次应用前请刷新当前会话状态。",
78
88
  sessionApply: "应用配置档到当前会话", sessionApplying: "正在应用当前会话配置档…", sessionReset: "为当前会话固定基线", sessionResetting: "正在固定当前会话基线…", sessionRefresh: "刷新当前会话状态", sessionApplied: "已仅对此会话应用保存的修订。全局默认值和已有子会话未改变。", sessionResetDone: "已仅对此会话固定部署基线。全局默认值未改变。", sessionDirty: "应用当前会话选择之前,请保存或明确丢弃编辑器草稿。",
89
+ sessionAppliedWithModel: "已应用此会话配置档,并明确选择其原生主模型。模型默认值像模型页一样保存;全局配置档默认值未改变。",
79
90
  roleState: "准入路由 {route};策略 {strategy};重试 {retries};限流失败 {failures};切换 {switches};累计延迟 {delay} 毫秒。",
80
91
  catalogTitle: "原生模型目录", catalogHint: "目录仅供参考,不是网络或账户健康检查。未列出或手动路由仍可编辑;刷新不会改变草稿或原生模型默认值。", catalogUnavailable: "原生模型目录不可用。仍可使用手动提供商、模型、强度字段和高级 JSONC。", catalogRefresh: "刷新模型目录", catalogRefreshing: "正在刷新模型目录…", catalogFailure: "提供商目录不可用:{name}({id})。",
81
92
  profileLabel: "配置档显示名称", defaultActive: "默认 Deepwork 模式", activeHint: "此默认值不会抹除已明确保存的会话模式。", enabled: "启用", disabled: "禁用", inherit: "继承部署基线", profileDefaults: "配置档运行时默认值", roleSelect: "要编辑的 Agent 角色", rolesUnavailable: "原生角色列表不可用,请使用高级 JSONC", roleEnabled: "原生部署中已启用", roleDisabled: "原生部署中已禁用",
@@ -1,3 +1,3 @@
1
1
  /** Geometry and theme aliases extracted in dsmm/DESIGN.md; scoped to this section. */
2
- export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles h3,.dsmm-profiles legend{margin:0;font-size:14px;font-weight:500;line-height:22px}\n.dsmm-profiles :is(label,legend,summary){min-width:0;max-width:100%;overflow-wrap:anywhere}\n.dsmm-profiles :is(.dsmm-structured,.dsmm-session-scope,.dsmm-catalog,.dsmm-policy-fields){min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles fieldset{min-width:0;margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles .dsmm-route-fields{display:flex;flex-wrap:wrap;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-route-fields>.dsmm-field{flex:1 1 240px;max-width:100%}\n.dsmm-profiles .dsmm-route-fields select{width:100%}\n.dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}\n.dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}\n.dsmm-header-profiles{width:auto;max-width:760px}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
2
+ export declare const PROFILE_STYLES = "\n.dsmm-profiles{width:100%;max-width:760px;min-width:0;display:flex;flex-direction:column;gap:12px;font-family:var(--dsw-font-family);font-size:14px;line-height:22px;color:var(--dsw-alias-label-primary)}\n.dsmm-profiles h2{margin:0;font-size:18px;font-weight:600}\n.dsmm-profiles h3,.dsmm-profiles legend{margin:0;font-size:14px;font-weight:500;line-height:22px}\n.dsmm-profiles :is(label,legend,summary){min-width:0;max-width:100%;overflow-wrap:anywhere}\n.dsmm-profiles :is(.dsmm-structured,.dsmm-session-scope,.dsmm-catalog,.dsmm-policy-fields){min-width:0;display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles fieldset{min-width:0;margin:0;padding:12px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);display:flex;flex-direction:column;gap:12px}\n.dsmm-profiles .dsmm-route-fields{display:flex;flex-wrap:wrap;gap:12px;min-width:0}\n.dsmm-profiles .dsmm-route-fields>.dsmm-field{flex:1 1 240px;max-width:100%}\n.dsmm-profiles .dsmm-route-fields select{width:100%}\n.dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}\n.dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}\n.dsmm-profiles.dsmm-header-profiles{width:auto;max-width:min(100%,max(0px,calc(100cqw - 24px)));flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles.dsmm-header-profiles select{width:240px;max-width:100%;flex:1 1 0}\n.dsmm-header-profiles span{min-width:0;max-width:100%;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles p{margin:0;overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}\n.dsmm-profiles .dsmm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}\n.dsmm-profiles button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:36px;height:auto}\n.dsmm-profiles .dsmm-input{width:100%;min-width:0;box-sizing:border-box;border-color:var(--dsw-alias-label-secondary)}\n.dsmm-profiles .dsmm-input input{width:100%;min-width:0;font:inherit;color:inherit}\n.dsmm-profiles select,.dsmm-profiles textarea{box-sizing:border-box;min-width:0;max-width:100%;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-label-secondary);border-radius:var(--dsw-radius-md)}\n.dsmm-profiles select{width:240px;height:32px;padding:0 10px;text-overflow:ellipsis}\n.dsmm-profiles textarea{width:100%;padding:12px;font-family:var(--ds-font-family-code);resize:vertical;overflow:auto;white-space:pre;}\n.dsmm-profiles select:hover:not(:disabled),.dsmm-profiles textarea:hover:not(:disabled){border-color:var(--dsw-alias-label-primary)}\n.dsmm-profiles select:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}\n.dsmm-profiles :is(select,textarea,button):focus-visible,.dsmm-profiles .dsmm-input:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsmm-profiles :is(select,textarea):disabled{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);cursor:not-allowed}\n.dsmm-profiles .dsmm-editor,.dsmm-profiles .dsmm-confirm{min-width:0;display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform)}\n.dsmm-profiles .dsmm-issue{padding:12px;border-left:4px solid var(--dsw-alias-state-error-primary);color:var(--dsw-alias-label-primary);overflow-wrap:anywhere}\n.dsmm-profiles .dsmm-issue p+p{margin-top:8px}\n.dsmm-profiles .dsmm-status{min-height:22px}\n@media(prefers-reduced-motion:reduce){.dsmm-profiles *{transition:none!important;animation:none!important}}\n";
3
3
  //# sourceMappingURL=styles.d.ts.map
@@ -12,7 +12,9 @@ export const PROFILE_STYLES = `
12
12
  .dsmm-profiles summary{cursor:pointer;color:var(--dsw-alias-label-primary);min-height:32px;line-height:32px}
13
13
  .dsmm-profiles summary:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}
14
14
  .dsmm-profiles .dsmm-advanced[open]>div{margin-top:8px}
15
- .dsmm-header-profiles{width:auto;max-width:760px}
15
+ .dsmm-profiles.dsmm-header-profiles{width:auto;max-width:min(100%,max(0px,calc(100cqw - 24px)));flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px}
16
+ .dsmm-profiles.dsmm-header-profiles select{width:240px;max-width:100%;flex:1 1 0}
17
+ .dsmm-header-profiles span{min-width:0;max-width:100%;overflow-wrap:anywhere;color:var(--dsw-alias-label-secondary)}
16
18
  .dsmm-profiles p{margin:0;overflow-wrap:anywhere}
17
19
  .dsmm-profiles .dsmm-hint{color:var(--dsw-alias-label-secondary)}
18
20
  .dsmm-profiles .dsmm-field{min-width:0;display:flex;flex-direction:column;gap:6px}