dsh-ponlay-erp 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/client.js +7 -25
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -41,7 +41,6 @@ window.__ModuleLoader__.load({
41
41
  'status.loading': 'Connecting…',
42
42
  'action.retry': 'Retry',
43
43
  'action.openExternal': 'Open in new tab',
44
- 'action.expandSidebar': 'Expand sidebar',
45
44
  'error.proxyTitle': 'Embedded mode is unavailable',
46
45
  'error.proxyBody': 'The local ERP proxy did not start, so the system cannot be embedded here. You can still open the original site in a new tab.',
47
46
  'error.httpsTitle': 'Embedded mode needs the local http address',
@@ -69,7 +68,6 @@ window.__ModuleLoader__.load({
69
68
  'status.loading': '正在连接…',
70
69
  'action.retry': '重试',
71
70
  'action.openExternal': '在新窗口打开',
72
- 'action.expandSidebar': '展开侧边栏',
73
71
  'error.proxyTitle': '内嵌模式不可用',
74
72
  'error.proxyBody': '本地 ERP 代理未启动,无法在此页面内嵌;你仍然可以在新窗口打开原站。',
75
73
  'error.httpsTitle': '内嵌模式需要本地 http 地址',
@@ -102,7 +100,6 @@ window.__ModuleLoader__.load({
102
100
  'M6.5 12.5v3M10 12.5v2M13.5 12.5v3M17 12.5v2',
103
101
  ],
104
102
  alert: ['M12 3.2 2.9 19.8h18.2L12 3.2Z', 'M12 9.4v4.4', 'M12 16.6v.2'],
105
- panelLeft: ['M3.5 5.5h17a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1h-17a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1Z', 'M9 5.5v13'],
106
103
  }
107
104
 
108
105
  function Icon({ name, size = 16 }) {
@@ -207,7 +204,7 @@ window.__ModuleLoader__.load({
207
204
  // Persistent ERP surface
208
205
  // ---------------------------------------------------------------
209
206
 
210
- function ErpSurface({ t, localeFace, store, usePanelInfo, layout }) {
207
+ function ErpSurface({ t, localeFace, store, usePanelInfo }) {
211
208
  const active = usePanelInfo((info) => info.activePanelId === PANEL_KEY)
212
209
  const rect = useSyncExternalStore(store.subscribe, store.getRect, store.getRect)
213
210
  useSyncExternalStore(localeFace.subscribe, localeFace.getSnapshot, localeFace.getSnapshot)
@@ -306,7 +303,6 @@ window.__ModuleLoader__.load({
306
303
  const targetPath = judged && !loggedIn ? `/_ponlay/reset?ponlay_lang=${lang}` : '/'
307
304
  const src = ready && judged ? `http://${PROXY_HOST}:${proxy.port}${targetPath}` : ''
308
305
  const visible = active && Boolean(rect) && rect.width > 0 && rect.height > 0
309
- const collapsed = Boolean(rect) && rect.left < 120
310
306
  const style = {
311
307
  top: `${rect ? rect.top : 0}px`,
312
308
  left: `${rect ? rect.left : 0}px`,
@@ -354,30 +350,17 @@ window.__ModuleLoader__.load({
354
350
  'div',
355
351
  { className: 'erp-surface', style, 'data-hidden': visible ? 'false' : 'true' },
356
352
  face,
357
- visible && collapsed
358
- ? h(
359
- 'button',
360
- {
361
- type: 'button',
362
- className: 'erp-expand',
363
- title: t('action.expandSidebar'),
364
- 'aria-label': t('action.expandSidebar'),
365
- onClick: () => layout?.toggleSidebar(),
366
- },
367
- h(Icon, { name: 'panelLeft', size: 16 }),
368
- )
369
- : null,
370
353
  showLoading
371
354
  ? h('div', { className: 'erp-loading', 'aria-hidden': true }, h('span', { className: 'erp-spinner' }), t('status.loading'))
372
355
  : null,
373
356
  )
374
357
  }
375
358
 
376
- function ErpSurfaceHost({ t, localeFace, store, usePanelInfo, layout }) {
359
+ function ErpSurfaceHost({ t, localeFace, store, usePanelInfo }) {
377
360
  // A slot entry that throws blanks its registration; degrade to "off"
378
361
  // instead if the standard kit ever stops providing the panel hook.
379
362
  if (typeof usePanelInfo !== 'function') return null
380
- return h(ErpSurface, { t, localeFace, store, usePanelInfo, layout })
363
+ return h(ErpSurface, { t, localeFace, store, usePanelInfo })
381
364
  }
382
365
 
383
366
  // ---------------------------------------------------------------
@@ -547,6 +530,10 @@ window.__ModuleLoader__.load({
547
530
  // ---------------------------------------------------------------
548
531
 
549
532
  const CSS = `
533
+ /* DSH 0.2.2-rc.1 mounts the collapsed-sidebar reopen/New Session controls in
534
+ the leading seat (z-index 15), beneath shell.overlay (z-index 20). The ERP
535
+ surface lives in that overlay, so lift the native seat above it. */
536
+ [data-shell-leading]{z-index:25!important}
550
537
  .erp-anchor{width:100%;height:100%;min-height:0;background:var(--dsw-alias-bg-base)}
551
538
  .erp-surface{position:fixed;z-index:6;display:flex;flex-direction:column;overflow:hidden;background:var(--dsw-alias-bg-layer-1)}
552
539
  .erp-surface[data-hidden="true"]{visibility:hidden;pointer-events:none}
@@ -583,9 +570,6 @@ window.__ModuleLoader__.load({
583
570
  .erp-cfg-notice-pending{border-color:color-mix(in srgb,var(--dsw-alias-state-warn-primary) 45%,transparent);color:var(--dsw-alias-state-warn-primary)}
584
571
  .erp-cfg-notice-error{border-color:color-mix(in srgb,var(--dsw-alias-state-error-primary) 45%,transparent);color:var(--dsw-alias-state-error-primary)}
585
572
  .erp-cfg-summary{font-size:12px;line-height:1.6;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere}
586
- .erp-expand{position:absolute;top:calc(var(--dsh-frame-top-clearance,0px) + 10px);left:12px;z-index:5;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid var(--dsw-alias-border-l1);border-radius:9px;background:var(--dsw-alias-bg-overlay);color:var(--dsw-alias-label-secondary);box-shadow:0 6px 18px color-mix(in srgb,var(--dsw-alias-label-primary) 16%,transparent);cursor:pointer;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
587
- .erp-expand:hover{background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary)}
588
- .erp-expand:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
589
573
  @keyframes erp-spin{to{transform:rotate(360deg)}}
590
574
  @media (prefers-reduced-motion:reduce){.erp-spinner{animation-duration:1.6s}}
591
575
  `
@@ -599,7 +583,6 @@ window.__ModuleLoader__.load({
599
583
  inject: ['slots', 'locale'],
600
584
  apply(ctx) {
601
585
  const locale = ctx.get('locale')
602
- const layout = ctx.get('layout')
603
586
  const store = createRectStore()
604
587
  const dicts = [locale.register('ponlay-erp', 'en', EN), locale.register('ponlay-erp', 'zh', ZH)]
605
588
  ctx.effect(() => () => {
@@ -634,7 +617,6 @@ window.__ModuleLoader__.load({
634
617
  t,
635
618
  localeFace,
636
619
  store,
637
- layout,
638
620
  usePanelInfo: props.usePanelInfo,
639
621
  }),
640
622
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ponlay-erp",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Ponlay ERP system embedded in DeepSeek Harness: the ERP login page or signed-in layout fills the main area, with a configurable system address.",
5
5
  "type": "module",
6
6
  "license": "MIT",