@yudaocode/univer-docs-ui 1.6.217 → 1.6.218

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/lib/index.css CHANGED
@@ -344,3 +344,206 @@
344
344
  border-color: #2c53f1;
345
345
  background: #ffffff;
346
346
  }
347
+
348
+ /* Slash `/` Quick-Insert Trigger & Floating Palette */
349
+ .yudao-doc-slash-trigger-btn {
350
+ position: fixed;
351
+ right: 24px;
352
+ top: 96px;
353
+ z-index: 9985;
354
+ border: 1px solid #d2dafa;
355
+ background: #ffffff;
356
+ color: #2c53f1;
357
+ border-radius: 999px;
358
+ padding: 5px 12px;
359
+ font-size: 11.5px;
360
+ font-weight: 600;
361
+ cursor: pointer;
362
+ box-shadow: 0 4px 12px rgba(44, 83, 241, 0.12);
363
+ transition: all 0.14s ease;
364
+ }
365
+
366
+ .yudao-doc-slash-trigger-btn:hover {
367
+ background: #f3f5ff;
368
+ border-color: #2c53f1;
369
+ }
370
+
371
+ .yudao-doc-slash-menu {
372
+ position: fixed;
373
+ z-index: 9993;
374
+ width: 304px;
375
+ max-height: 360px;
376
+ background: #ffffff;
377
+ border: 1px solid #e3e5ea;
378
+ border-radius: 10px;
379
+ box-shadow: 0 12px 32px rgba(27, 28, 31, 0.16);
380
+ display: flex;
381
+ flex-direction: column;
382
+ overflow: hidden;
383
+ font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
384
+ }
385
+
386
+ .yudao-doc-slash-search-wrap {
387
+ display: flex;
388
+ align-items: center;
389
+ gap: 6px;
390
+ padding: 8px 10px;
391
+ border-bottom: 1px solid #eeeff1;
392
+ background: #f9fafb;
393
+ }
394
+
395
+ .yudao-doc-slash-prefix {
396
+ font-size: 13px;
397
+ font-weight: 700;
398
+ color: #2c53f1;
399
+ padding: 0 2px;
400
+ }
401
+
402
+ .yudao-doc-slash-search {
403
+ flex: 1;
404
+ border: none;
405
+ background: transparent;
406
+ outline: none;
407
+ font-size: 12px;
408
+ color: #1b1c1f;
409
+ }
410
+
411
+ .yudao-doc-slash-list {
412
+ flex: 1;
413
+ overflow-y: auto;
414
+ padding: 4px;
415
+ display: flex;
416
+ flex-direction: column;
417
+ gap: 2px;
418
+ }
419
+
420
+ .yudao-doc-slash-item {
421
+ display: flex;
422
+ align-items: center;
423
+ gap: 8px;
424
+ width: 100%;
425
+ border: none;
426
+ background: transparent;
427
+ padding: 6px 8px;
428
+ border-radius: 6px;
429
+ cursor: pointer;
430
+ text-align: left;
431
+ transition: background 0.12s ease;
432
+ }
433
+
434
+ .yudao-doc-slash-item:hover,
435
+ .yudao-doc-slash-item.is-active {
436
+ background: #f3f5ff;
437
+ }
438
+
439
+ .yudao-doc-slash-badge {
440
+ min-width: 30px;
441
+ height: 22px;
442
+ border-radius: 5px;
443
+ background: #eff2f8;
444
+ color: #2c53f1;
445
+ font-size: 10.5px;
446
+ font-weight: 700;
447
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
448
+ display: inline-flex;
449
+ align-items: center;
450
+ justify-content: center;
451
+ flex-shrink: 0;
452
+ }
453
+
454
+ .yudao-doc-slash-meta {
455
+ display: flex;
456
+ flex-direction: column;
457
+ min-width: 0;
458
+ }
459
+
460
+ .yudao-doc-slash-label {
461
+ font-size: 12px;
462
+ font-weight: 600;
463
+ color: #1b1c1f;
464
+ }
465
+
466
+ .yudao-doc-slash-desc {
467
+ font-size: 10.5px;
468
+ color: #6b7280;
469
+ white-space: nowrap;
470
+ overflow: hidden;
471
+ text-overflow: ellipsis;
472
+ }
473
+
474
+ /* Live Rich Block Companion Dock */
475
+ .yudao-doc-companion-dock {
476
+ position: fixed;
477
+ right: 24px;
478
+ top: 134px;
479
+ z-index: 9980;
480
+ width: 316px;
481
+ max-height: calc(100vh - 240px);
482
+ background: rgba(255, 255, 255, 0.98);
483
+ border: 1px solid #e3e5ea;
484
+ border-radius: 10px;
485
+ box-shadow: 0 10px 28px rgba(27, 28, 31, 0.12);
486
+ display: flex;
487
+ flex-direction: column;
488
+ overflow: hidden;
489
+ font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
490
+ }
491
+
492
+ .yudao-doc-companion-header {
493
+ padding: 8px 10px;
494
+ background: #f9fafb;
495
+ border-bottom: 1px solid #eeeff1;
496
+ display: flex;
497
+ align-items: center;
498
+ justify-content: space-between;
499
+ }
500
+
501
+ .yudao-doc-companion-body {
502
+ flex: 1;
503
+ overflow-y: auto;
504
+ padding: 8px 10px;
505
+ display: flex;
506
+ flex-direction: column;
507
+ gap: 8px;
508
+ }
509
+
510
+ /* Collapsible Page-Bottom Footnotes & Endnotes Strip */
511
+ .yudao-doc-footnote-strip {
512
+ position: fixed;
513
+ left: 236px;
514
+ right: 24px;
515
+ bottom: 8px;
516
+ z-index: 9978;
517
+ max-height: 170px;
518
+ background: rgba(255, 255, 255, 0.97);
519
+ border: 1px solid #e3e5ea;
520
+ border-radius: 8px;
521
+ box-shadow: 0 -4px 16px rgba(27, 28, 31, 0.08);
522
+ display: flex;
523
+ flex-direction: column;
524
+ overflow: hidden;
525
+ font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
526
+ }
527
+
528
+ .yudao-doc-footnote-header {
529
+ padding: 5px 10px;
530
+ background: #f8fafc;
531
+ border-bottom: 1px solid #edf2f7;
532
+ display: flex;
533
+ align-items: center;
534
+ justify-content: space-between;
535
+ }
536
+
537
+ .yudao-doc-footnote-items {
538
+ overflow-y: auto;
539
+ padding: 6px 10px;
540
+ display: flex;
541
+ flex-direction: column;
542
+ gap: 5px;
543
+ }
544
+
545
+ .yudao-doc-footnote-item {
546
+ display: flex;
547
+ align-items: center;
548
+ gap: 6px;
549
+ }
@@ -93,6 +93,9 @@ interface IDocsUIFeatureService {
93
93
  readonly modalOpen$: Observable<boolean>;
94
94
  readonly modalTab$: Observable<DocModalTabMode>;
95
95
  readonly ioModal$: Observable<IDocIoModalConfig | undefined>;
96
+ readonly editingChartId$: Observable<string | null>;
97
+ readonly editingMiniSheetId$: Observable<string | null>;
98
+ readonly slashMenuOpen$: Observable<boolean>;
96
99
  getFeatures(): IResolvedDocsUIFeatures;
97
100
  setFeatures(features: IUniverDocsUIFeatures): void;
98
101
  patchFeatures(patch: Partial<IResolvedDocsUIFeatures>): void;
@@ -103,6 +106,15 @@ interface IDocsUIFeatureService {
103
106
  openModal(tab?: DocModalTabMode | string, ioModal?: IDocIoModalConfig): void;
104
107
  closeModal(): void;
105
108
  setModalTab(tab: DocModalTabMode): void;
109
+ getEditingChartId(): string | null;
110
+ openChartEditor(chartId: string): void;
111
+ closeChartEditor(): void;
112
+ getEditingMiniSheetId(): string | null;
113
+ openMiniSheetEditor(sheetId: string): void;
114
+ closeMiniSheetEditor(): void;
115
+ isSlashMenuOpen(): boolean;
116
+ openSlashMenu(): void;
117
+ closeSlashMenu(): void;
106
118
  }
107
119
  declare const IDocsUIFeatureService: _univerjs_core.IdentifierDecorator<IDocsUIFeatureService>;
108
120
  declare class DocsUIFeatureService extends Disposable implements IDocsUIFeatureService {
@@ -110,11 +122,17 @@ declare class DocsUIFeatureService extends Disposable implements IDocsUIFeatureS
110
122
  private readonly _modalOpen$;
111
123
  private readonly _modalTab$;
112
124
  private readonly _ioModal$;
125
+ private readonly _editingChartId$;
126
+ private readonly _editingMiniSheetId$;
127
+ private readonly _slashMenuOpen$;
113
128
  private _baseIoModal?;
114
129
  readonly features$: Observable<IResolvedDocsUIFeatures>;
115
130
  readonly modalOpen$: Observable<boolean>;
116
131
  readonly modalTab$: Observable<DocModalTabMode>;
117
132
  readonly ioModal$: Observable<IDocIoModalConfig | undefined>;
133
+ readonly editingChartId$: Observable<string | null>;
134
+ readonly editingMiniSheetId$: Observable<string | null>;
135
+ readonly slashMenuOpen$: Observable<boolean>;
118
136
  constructor(initial?: IUniverDocsUIFeatures, initialIoModal?: IDocIoModalConfig);
119
137
  private _mergeIoModal;
120
138
  private _resolveValidTab;
@@ -128,6 +146,15 @@ declare class DocsUIFeatureService extends Disposable implements IDocsUIFeatureS
128
146
  openModal(tab?: DocModalTabMode | string, ioModal?: IDocIoModalConfig): void;
129
147
  closeModal(): void;
130
148
  setModalTab(tab: DocModalTabMode): void;
149
+ getEditingChartId(): string | null;
150
+ openChartEditor(chartId: string): void;
151
+ closeChartEditor(): void;
152
+ getEditingMiniSheetId(): string | null;
153
+ openMiniSheetEditor(sheetId: string): void;
154
+ closeMiniSheetEditor(): void;
155
+ isSlashMenuOpen(): boolean;
156
+ openSlashMenu(): void;
157
+ closeSlashMenu(): void;
131
158
  }
132
159
 
133
160
  interface IUniverDocsExtUIConfig {
@@ -258,4 +285,29 @@ declare const DocPreviewAndIoModal: React.FC;
258
285
 
259
286
  declare const DocSdtCanvasPopupHost: React.FC;
260
287
 
261
- export { DOC_IMPORT_ACCEPT_EXTENSIONS, DOC_INSPECTOR_COMPONENT_KEY, DOC_INSPECTOR_SIDEBAR_ID, DocInspectorPanel, type DocIoModalTabKey, DocLeftSidebar, type DocModalTabMode, DocPreviewAndIoModal, DocSdtCanvasPopupHost, DocsExtUIController, DocsUIFeatureService, FillDocSampleDatasetOperation, type IDocIoModalConfig, IDocsUIFeatureService, type IIoErrorState, type IOpenDocModalOperationParams, type IPendingImportState, type IResolvedDocsUIFeatures, type IUniverDocsExtUIConfig, type IUniverDocsUIFeatures, ImportDocFileOperation, OpenDocModalOperation, PrintDocOperation, QuickInsertDocSdtOperation, ToggleDocInspectorOperation, UNIVER_DOCS_EXT_UI_PLUGIN_NAME, UniverDocsExtUIPlugin, UpdateDocsUIFeaturesOperation, YUDAO_DOC_FIELD_DND_MIME, confirmStagedDocImport, isDocSdtKindAllowed, openDocInspectorSidebar, resolveDocsUIFeatures, resolveEffectiveSdtDatasetBinding, runGuardedStagedImport };
288
+ declare const DocCanvasEnhancementsHost: React.FC;
289
+
290
+ declare const DocChartEditorModal: React.FC;
291
+
292
+ declare const DocMiniSheetModal: React.FC;
293
+
294
+ interface ISlashCommandItem {
295
+ id: string;
296
+ badge: string;
297
+ label: string;
298
+ desc: string;
299
+ keywords: string;
300
+ action: () => void;
301
+ }
302
+ interface IDocSlashMenuProps {
303
+ open: boolean;
304
+ anchorPos?: {
305
+ x: number;
306
+ y: number;
307
+ } | null;
308
+ stripLeadingSlashOnExecute?: boolean;
309
+ onClose: () => void;
310
+ }
311
+ declare const DocSlashMenu: React.FC<IDocSlashMenuProps>;
312
+
313
+ export { DOC_IMPORT_ACCEPT_EXTENSIONS, DOC_INSPECTOR_COMPONENT_KEY, DOC_INSPECTOR_SIDEBAR_ID, DocCanvasEnhancementsHost, DocChartEditorModal, DocInspectorPanel, type DocIoModalTabKey, DocLeftSidebar, DocMiniSheetModal, type DocModalTabMode, DocPreviewAndIoModal, DocSdtCanvasPopupHost, DocSlashMenu, DocsExtUIController, DocsUIFeatureService, FillDocSampleDatasetOperation, type IDocIoModalConfig, type IDocSlashMenuProps, IDocsUIFeatureService, type IIoErrorState, type IOpenDocModalOperationParams, type IPendingImportState, type IResolvedDocsUIFeatures, type ISlashCommandItem, type IUniverDocsExtUIConfig, type IUniverDocsUIFeatures, ImportDocFileOperation, OpenDocModalOperation, PrintDocOperation, QuickInsertDocSdtOperation, ToggleDocInspectorOperation, UNIVER_DOCS_EXT_UI_PLUGIN_NAME, UniverDocsExtUIPlugin, UpdateDocsUIFeaturesOperation, YUDAO_DOC_FIELD_DND_MIME, confirmStagedDocImport, isDocSdtKindAllowed, openDocInspectorSidebar, resolveDocsUIFeatures, resolveEffectiveSdtDatasetBinding, runGuardedStagedImport };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yudaocode/univer-docs-ui",
3
- "version": "1.6.217",
3
+ "version": "1.6.218",
4
4
  "description": "Univer Docs UI enhancement plugin: on-demand SDT structured controls, table row loop binding, per-instance canvas popups, and DOCX/HTML/PDF IO modal",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/yudaocode/yudao-univer#readme",
@@ -62,7 +62,7 @@
62
62
  "react": ">=18.0.0",
63
63
  "react-dom": ">=18.0.0",
64
64
  "rxjs": ">=7.0.0",
65
- "@yudaocode/univer-docs": "^1.6.217"
65
+ "@yudaocode/univer-docs": "^1.6.218"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@univerjs/core": "1.6.2",
@@ -75,7 +75,7 @@
75
75
  "react": "^18.3.1",
76
76
  "react-dom": "^18.3.1",
77
77
  "rxjs": "^7.8.2",
78
- "@yudaocode/univer-docs": "1.6.217"
78
+ "@yudaocode/univer-docs": "1.6.218"
79
79
  },
80
80
  "scripts": {
81
81
  "build": "tsup",