@univerjs/docs-toc-ui 1.0.0
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/LICENSE +176 -0
- package/README.md +43 -0
- package/lib/cjs/index.js +735 -0
- package/lib/cjs/locale/ar-SA.js +32 -0
- package/lib/cjs/locale/ca-ES.js +32 -0
- package/lib/cjs/locale/de-DE.js +32 -0
- package/lib/cjs/locale/en-US.js +47 -0
- package/lib/cjs/locale/es-ES.js +32 -0
- package/lib/cjs/locale/fa-IR.js +32 -0
- package/lib/cjs/locale/fr-FR.js +32 -0
- package/lib/cjs/locale/id-ID.js +32 -0
- package/lib/cjs/locale/it-IT.js +32 -0
- package/lib/cjs/locale/ja-JP.js +32 -0
- package/lib/cjs/locale/ko-KR.js +32 -0
- package/lib/cjs/locale/pl-PL.js +32 -0
- package/lib/cjs/locale/pt-BR.js +32 -0
- package/lib/cjs/locale/ru-RU.js +32 -0
- package/lib/cjs/locale/sk-SK.js +32 -0
- package/lib/cjs/locale/vi-VN.js +32 -0
- package/lib/cjs/locale/zh-CN.js +32 -0
- package/lib/cjs/locale/zh-HK.js +32 -0
- package/lib/cjs/locale/zh-TW.js +32 -0
- package/lib/es/index.js +728 -0
- package/lib/es/locale/ar-SA.js +32 -0
- package/lib/es/locale/ca-ES.js +32 -0
- package/lib/es/locale/de-DE.js +32 -0
- package/lib/es/locale/en-US.js +47 -0
- package/lib/es/locale/es-ES.js +32 -0
- package/lib/es/locale/fa-IR.js +32 -0
- package/lib/es/locale/fr-FR.js +32 -0
- package/lib/es/locale/id-ID.js +32 -0
- package/lib/es/locale/it-IT.js +32 -0
- package/lib/es/locale/ja-JP.js +32 -0
- package/lib/es/locale/ko-KR.js +32 -0
- package/lib/es/locale/pl-PL.js +32 -0
- package/lib/es/locale/pt-BR.js +32 -0
- package/lib/es/locale/ru-RU.js +32 -0
- package/lib/es/locale/sk-SK.js +32 -0
- package/lib/es/locale/vi-VN.js +32 -0
- package/lib/es/locale/zh-CN.js +32 -0
- package/lib/es/locale/zh-HK.js +32 -0
- package/lib/es/locale/zh-TW.js +32 -0
- package/lib/index.css +156 -0
- package/lib/index.js +728 -0
- package/lib/locale/ar-SA.js +32 -0
- package/lib/locale/ca-ES.js +32 -0
- package/lib/locale/de-DE.js +32 -0
- package/lib/locale/en-US.js +47 -0
- package/lib/locale/es-ES.js +32 -0
- package/lib/locale/fa-IR.js +32 -0
- package/lib/locale/fr-FR.js +32 -0
- package/lib/locale/id-ID.js +32 -0
- package/lib/locale/it-IT.js +32 -0
- package/lib/locale/ja-JP.js +32 -0
- package/lib/locale/ko-KR.js +32 -0
- package/lib/locale/pl-PL.js +32 -0
- package/lib/locale/pt-BR.js +32 -0
- package/lib/locale/ru-RU.js +32 -0
- package/lib/locale/sk-SK.js +32 -0
- package/lib/locale/vi-VN.js +32 -0
- package/lib/locale/zh-CN.js +32 -0
- package/lib/locale/zh-HK.js +32 -0
- package/lib/locale/zh-TW.js +32 -0
- package/lib/types/commands/table-of-contents-dialog.operation.d.ts +21 -0
- package/lib/types/config/config.d.ts +22 -0
- package/lib/types/controllers/components.controller.d.ts +20 -0
- package/lib/types/controllers/table-of-contents-highlight.render-controller.d.ts +33 -0
- package/lib/types/controllers/table-of-contents-ribbon.controller.d.ts +27 -0
- package/lib/types/controllers/ui.controller.d.ts +20 -0
- package/lib/types/index.d.ts +18 -0
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/ca-ES.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +48 -0
- package/lib/types/locale/es-ES.d.ts +18 -0
- package/lib/types/locale/fa-IR.d.ts +18 -0
- package/lib/types/locale/fr-FR.d.ts +18 -0
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/ja-JP.d.ts +18 -0
- package/lib/types/locale/ko-KR.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/ru-RU.d.ts +18 -0
- package/lib/types/locale/sk-SK.d.ts +18 -0
- package/lib/types/locale/types.d.ts +18 -0
- package/lib/types/locale/vi-VN.d.ts +18 -0
- package/lib/types/locale/zh-CN.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/locale/zh-TW.d.ts +18 -0
- package/lib/types/menu/menu.d.ts +22 -0
- package/lib/types/menu/schema.d.ts +19 -0
- package/lib/types/plugin.d.ts +32 -0
- package/lib/types/views/InsertTableOfContentsDialog.d.ts +29 -0
- package/lib/types/views/TableOfContentsDialog.d.ts +21 -0
- package/lib/umd/index.js +4 -0
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IUniverDocsTocUIConfig } from './config/config';
|
|
17
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
18
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
|
+
export declare class UniverDocsTocUIPlugin extends Plugin {
|
|
20
|
+
private readonly _config;
|
|
21
|
+
protected _injector: Injector;
|
|
22
|
+
private readonly _configService;
|
|
23
|
+
private readonly _renderManagerService;
|
|
24
|
+
static pluginName: string;
|
|
25
|
+
static packageName: string;
|
|
26
|
+
static version: string;
|
|
27
|
+
static type: UniverInstanceType;
|
|
28
|
+
constructor(_config: IUniverDocsTocUIConfig | undefined, _injector: Injector, _configService: IConfigService, _renderManagerService: IRenderManagerService);
|
|
29
|
+
onStarting(): void;
|
|
30
|
+
onReady(): void;
|
|
31
|
+
onRendered(): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { TableOfContentsFormat, TableOfContentsTabLeader } from '@univerjs/docs-toc';
|
|
17
|
+
export declare const INSERT_TABLE_OF_CONTENTS_DIALOG_COMPONENT = "doc.insert-table-of-contents-dialog";
|
|
18
|
+
export interface IInsertTableOfContentsDialogValue {
|
|
19
|
+
levels: number;
|
|
20
|
+
showPageNumbers: boolean;
|
|
21
|
+
rightAlignPageNumbers: boolean;
|
|
22
|
+
tabLeader: TableOfContentsTabLeader;
|
|
23
|
+
format: TableOfContentsFormat;
|
|
24
|
+
}
|
|
25
|
+
export interface IInsertTableOfContentsDialogProps {
|
|
26
|
+
options: IInsertTableOfContentsDialogValue;
|
|
27
|
+
onChange: (value: IInsertTableOfContentsDialogValue) => void;
|
|
28
|
+
}
|
|
29
|
+
export declare function InsertTableOfContentsDialog(props: IInsertTableOfContentsDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TABLE_OF_CONTENTS_DIALOG_COMPONENT = "doc.table-of-contents-dialog";
|
|
17
|
+
export interface ITableOfContentsDialogProps {
|
|
18
|
+
mode: 'pageNumbersOnly' | 'entireTable';
|
|
19
|
+
onModeChange: (mode: ITableOfContentsDialogProps['mode']) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function TableOfContentsDialog(props: ITableOfContentsDialogProps): import("react").JSX.Element;
|
package/lib/umd/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@univerjs/docs-toc"),require("@univerjs/ui"),require("@univerjs/core"),require("@univerjs/design"),require("@univerjs/docs"),require("react"),require("react/jsx-runtime"),require("@univerjs/docs-ui"),require("@univerjs/protocol"),require("rxjs"),require("@univerjs/engine-render")):typeof define==`function`&&define.amd?define([`exports`,`@univerjs/docs-toc`,`@univerjs/ui`,`@univerjs/core`,`@univerjs/design`,`@univerjs/docs`,`react`,`react/jsx-runtime`,`@univerjs/docs-ui`,`@univerjs/protocol`,`rxjs`,`@univerjs/engine-render`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverDocsTocUi={},e.UniverDocsToc,e.UniverUi,e.UniverCore,e.UniverDesign,e.UniverDocs,e.React,e.React,e.UniverDocsUi,e.UniverProtocol,e.rxjs,e.UniverEngineRender))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let f=`doc.insert-table-of-contents-dialog`,p=[[`fromTemplate`,`docs-toc-ui.tableOfContents.formatFromTemplate`],[`classic`,`docs-toc-ui.tableOfContents.formatClassic`],[`modern`,`docs-toc-ui.tableOfContents.formatModern`],[`simple`,`docs-toc-ui.tableOfContents.formatSimple`]],m=[[`none`,`docs-toc-ui.tableOfContents.leaderNone`],[`dots`,`docs-toc-ui.tableOfContents.leaderDots`],[`dashes`,`docs-toc-ui.tableOfContents.leaderDashes`],[`underline`,`docs-toc-ui.tableOfContents.leaderUnderline`]];function h(e){let t=(0,n.useDependency)(r.LocaleService),[i,a]=(0,o.useState)(e.options),c=t=>{let n={...i,...t};a(n),e.onChange(n)},l=i.tabLeader===`dots`?`··········`:i.tabLeader===`dashes`?`----------`:i.tabLeader===`underline`?`__________`:``;return(0,s.jsxs)(`div`,{className:`univer-grid univer-gap-4 univer-py-2`,"data-testid":`table-of-contents-insert-dialog`,children:[(0,s.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-3`,children:[(0,s.jsxs)(`label`,{className:`univer-grid univer-gap-1 univer-text-sm`,children:[(0,s.jsx)(`span`,{children:t.t(`docs-toc-ui.tableOfContents.levels`)}),(0,s.jsx)(`select`,{className:`univer-h-8 univer-rounded-md univer-border univer-bg-transparent univer-px-2`,value:i.levels,onChange:e=>c({levels:Number(e.target.value)}),children:Array.from({length:9},(e,t)=>t+1).map(e=>(0,s.jsx)(`option`,{value:e,children:e},e))})]}),(0,s.jsxs)(`label`,{className:`univer-grid univer-gap-1 univer-text-sm`,children:[(0,s.jsx)(`span`,{children:t.t(`docs-toc-ui.tableOfContents.format`)}),(0,s.jsx)(`select`,{className:`univer-h-8 univer-rounded-md univer-border univer-bg-transparent univer-px-2`,value:i.format,onChange:e=>c({format:e.target.value}),children:p.map(([e,n])=>(0,s.jsx)(`option`,{value:e,children:t.t(n)},e))})]})]}),(0,s.jsxs)(`div`,{className:`univer-grid univer-gap-2 univer-text-sm`,children:[(0,s.jsxs)(`label`,{className:`univer-flex univer-items-center univer-gap-2`,children:[(0,s.jsx)(`input`,{type:`checkbox`,checked:i.showPageNumbers,onChange:e=>c({showPageNumbers:e.target.checked,rightAlignPageNumbers:e.target.checked&&i.rightAlignPageNumbers})}),(0,s.jsx)(`span`,{children:t.t(`docs-toc-ui.tableOfContents.showPageNumbers`)})]}),(0,s.jsxs)(`label`,{className:`univer-flex univer-items-center univer-gap-2`,children:[(0,s.jsx)(`input`,{type:`checkbox`,checked:i.rightAlignPageNumbers,disabled:!i.showPageNumbers,onChange:e=>c({rightAlignPageNumbers:e.target.checked})}),(0,s.jsx)(`span`,{children:t.t(`docs-toc-ui.tableOfContents.rightAlignPageNumbers`)})]}),(0,s.jsxs)(`label`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-3`,children:[(0,s.jsx)(`span`,{children:t.t(`docs-toc-ui.tableOfContents.tabLeader`)}),(0,s.jsx)(`select`,{className:`univer-h-8 univer-min-w-40 univer-rounded-md univer-border univer-bg-transparent univer-px-2`,value:i.tabLeader,disabled:!i.showPageNumbers||!i.rightAlignPageNumbers,onChange:e=>c({tabLeader:e.target.value}),children:m.map(([e,n])=>(0,s.jsx)(`option`,{value:e,children:t.t(n)},e))})]})]}),(0,s.jsxs)(`section`,{className:`univer-rounded-lg univer-border univer-bg-gray-50 univer-p-4 dark:univer-bg-gray-900`,children:[(0,s.jsx)(`div`,{className:`univer-mb-3 univer-text-xs univer-font-medium univer-text-gray-500`,children:t.t(`docs-toc-ui.tableOfContents.preview`)}),Array.from({length:Math.min(i.levels,3)},(e,t)=>t).map(e=>(0,s.jsxs)(`div`,{className:`
|
|
2
|
+
univer-flex univer-items-baseline univer-text-sm
|
|
3
|
+
${i.format===`modern`?`univer-mb-2`:`univer-mb-1`}
|
|
4
|
+
`,style:{marginInlineStart:`${e*(i.format===`simple`?12:i.format===`classic`?14:i.format===`modern`?20:18)}px`},children:[(0,s.jsxs)(`span`,{children:[t.t(`docs-toc-ui.tableOfContents.previewHeading`),` `,e+1]}),i.showPageNumbers&&i.rightAlignPageNumbers&&(0,s.jsx)(`span`,{className:`univer-mx-2 univer-flex-1 univer-overflow-hidden univer-whitespace-nowrap univer-text-gray-400`,children:l}),i.showPageNumbers&&(0,s.jsx)(`span`,{className:i.rightAlignPageNumbers?``:`univer-ml-2`,children:e+1})]},e))]})]})}let g=`doc.table-of-contents-dialog`;function _(e){let t=(0,n.useDependency)(r.LocaleService),[i,a]=(0,o.useState)(e.mode);return(0,s.jsxs)(`div`,{className:`univer-grid univer-gap-4 univer-py-2`,"data-testid":`table-of-contents-update-dialog`,children:[(0,s.jsx)(`p`,{className:`univer-m-0 univer-text-sm`,children:t.t(`docs-toc-ui.tableOfContents.updateHint`)}),(0,s.jsx)(`fieldset`,{className:`univer-grid univer-gap-3 univer-border-0 univer-p-0`,children:[[`pageNumbersOnly`,`docs-toc-ui.tableOfContents.updatePageNumbersOnly`],[`entireTable`,`docs-toc-ui.tableOfContents.updateEntireTable`]].map(([n,r])=>(0,s.jsxs)(`label`,{className:`univer-flex univer-gap-3 univer-rounded-lg univer-border univer-p-3`,children:[(0,s.jsx)(`input`,{type:`radio`,name:`toc-update-mode`,value:n,checked:i===n,onChange:()=>{a(n),e.onModeChange(n)}}),(0,s.jsx)(`span`,{className:`univer-text-sm`,children:t.t(r)})]},n))})]})}let v=`doc.dialog.update-table-of-contents`,y=`doc.dialog.insert-table-of-contents`,b={levels:3,showPageNumbers:!0,rightAlignPageNumbers:!0,tabLeader:`dots`,format:`fromTemplate`};function x(e){e.get(n.IMessageService).show({type:i.MessageType.Warning,content:e.get(r.LocaleService).t(`docs-toc-ui.tableOfContents.noHeadings`)})}async function S(e,n,i){let a=e.get(r.IUniverInstanceService).getCurrentUnitOfType(r.UniverInstanceType.UNIVER_DOC);return!a||(0,t.countTableOfContentsHeadings)(a.getBody(),n.levels)===0?(x(e),!1):!!await e.get(r.ICommandService).executeCommand(t.InsertTableOfContentsCommand.id,{unitId:a.getUnitId(),...n,title:i})}let C={id:`doc.operation.insert-table-of-contents`,type:r.CommandType.OPERATION,async handler(e,t){if((t==null?void 0:t.mode)===`automatic`){let t=e.get(r.LocaleService).t(`docs-toc-ui.tableOfContents.contentsTitle`);return S(e,b,t)}if((t==null?void 0:t.mode)!==`custom`||!e.get(r.IUniverInstanceService).getCurrentUnitOfType(r.UniverInstanceType.UNIVER_DOC))return!1;let n=e.get(r.IConfirmService),i=e.get(r.LocaleService),a={options:{...b}};return await n.open({id:y,width:520,title:{title:i.t(`docs-toc-ui.tableOfContents.customTitle`)},children:{label:{name:f,props:{options:a.options,onChange:e=>{a.options=e}}}},onConfirm:async()=>{await S(e,a.options)&&n.close(y)},onClose:()=>n.close(y)}),!0}},w={id:`doc.operation.open-table-of-contents-dialog`,type:r.CommandType.OPERATION,async handler(e){var n;let i=e.get(r.IUniverInstanceService).getCurrentUnitOfType(r.UniverInstanceType.UNIVER_DOC),o=e.get(a.DocSelectionManagerService).getActiveTextRange(),s=(0,t.findTableOfContentsAtOffset)(i==null?void 0:i.getBody(),o==null?void 0:o.startOffset);if(!i||!s||((n=s.properties)==null?void 0:n.locked)===r.BooleanNumber.TRUE)return!1;let c=e.get(r.IConfirmService),l=e.get(r.ICommandService),u=e.get(r.LocaleService),d={mode:`pageNumbersOnly`};return await c.open({id:v,width:420,title:{title:u.t(`docs-toc-ui.tableOfContents.updateTitle`)},children:{label:{name:g,props:{mode:d.mode,onModeChange:e=>{d.mode=e}}}},onConfirm:async()=>{try{await l.executeCommand(t.UpdateTableOfContentsCommand.id,{unitId:i.getUnitId(),rangeId:s.rangeId,mode:d.mode})}finally{c.close(v)}},onClose:()=>c.close(v)}),!0}},T=`doc.menu.insert-table-of-contents`;function E(e){let n=e.get(a.DocSelectionManagerService),i=e.get(r.IUniverInstanceService);return new u.Observable(o=>{let s=()=>{let e=i.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_DOC),a=n.getActiveTextRange();o.next(a!=null&&a.segmentId?void 0:(0,t.findTableOfContentsAtOffset)(e==null?void 0:e.getBody(),a==null?void 0:a.startOffset))};s();let c=n.textSelection$.subscribe(s),l=i.getCurrentTypeOfUnit$(r.UniverInstanceType.UNIVER_DOC).subscribe(s),u=e.get(a.DocStateChangeManagerService).docStateChange$.subscribe(s);return()=>{c.unsubscribe(),l.unsubscribe(),u.unsubscribe()}})}function D(e){let n=e.get(a.DocSelectionManagerService),i=e.get(r.IUniverInstanceService);return new u.Observable(e=>{let a=()=>{let a=i.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_DOC),o=n.getActiveTextRange();e.next(!o||o.startOffset!==o.endOffset||!!o.segmentId||!!(0,t.findTableOfContentsAtOffset)(a==null?void 0:a.getBody(),o.startOffset))};a();let o=n.textSelection$.subscribe(a),s=i.getCurrentTypeOfUnit$(r.UniverInstanceType.UNIVER_DOC).subscribe(a);return()=>{o.unsubscribe(),s.unsubscribe()}})}function O(e){let t=(0,c.disableMenuWithoutDocumentUnitPermission)(e,l.UnitAction.Edit);return{id:T,type:n.MenuItemType.SUBITEMS,icon:`UnorderIcon`,title:`docs-toc-ui.tableOfContents.insertTitle`,selectionsCommandId:C.id,selections:[{value:`automatic`,label:`docs-toc-ui.tableOfContents.automaticTitle`,icon:`UnorderIcon`,params:{mode:`automatic`}},{value:`custom`,label:`docs-toc-ui.tableOfContents.customTitle`,icon:`DocSettingIcon`,params:{mode:`custom`}}],disabled$:(0,u.combineLatest)([t,D(e)]).pipe((0,u.map)(([e,t])=>e||t)),hidden$:(0,n.getMenuHiddenObservable)(e,r.UniverInstanceType.UNIVER_DOC)}}function k(e){return{id:w.id,commandId:w.id,type:n.MenuItemType.BUTTON,icon:`UnorderIcon`,title:`docs-toc-ui.tableOfContents.updateTitle`,disabled$:(0,u.combineLatest)([(0,c.disableMenuWithoutDocumentUnitPermission)(e,l.UnitAction.Edit),E(e)]).pipe((0,u.map)(([e,t])=>{var n;return e||!t||((n=t.properties)==null?void 0:n.locked)===r.BooleanNumber.TRUE})),hidden$:(0,u.combineLatest)([(0,n.getMenuHiddenObservable)(e,r.UniverInstanceType.UNIVER_DOC),E(e)]).pipe((0,u.map)(([e,t])=>e||!t))}}function A(e){return{id:t.DeleteTableOfContentsCommand.id,commandId:t.DeleteTableOfContentsCommand.id,type:n.MenuItemType.BUTTON,icon:`DeleteIcon`,title:`docs-toc-ui.tableOfContents.removeTitle`,disabled$:(0,c.disableMenuWithoutDocumentUnitPermission)(e,l.UnitAction.Edit),hidden$:(0,u.combineLatest)([(0,n.getMenuHiddenObservable)(e,r.UniverInstanceType.UNIVER_DOC),E(e)]).pipe((0,u.map)(([e,t])=>e||!t))}}let j=`ribbon.table-of-contents`,M={[n.MenuManagerPosition.RIBBON]:{[j]:{order:100,title:`docs-toc-ui.tableOfContents.title`,contextual:!0,"ribbon.table-of-contents.manage":{order:0,[w.id]:{order:0,gridLayout:{row:1,column:1,rowSpan:2,showLabel:!0},menuItemFactory:k},[t.DeleteTableOfContentsCommand.id]:{order:1,gridLayout:{row:1,column:2,rowSpan:2,showLabel:!0},menuItemFactory:A}}}}},N={[n.RibbonInsertGroup.CELL]:{[T]:{order:7,gridLayout:{row:1,column:1,showLabel:!0},menuItemFactory:O}},[n.ContextMenuPosition.MAIN_AREA]:{[n.ContextMenuGroup.LAYOUT]:{[w.id]:{order:-1,menuItemFactory:k},[t.DeleteTableOfContentsCommand.id]:{order:-.5,menuItemFactory:A}}}};var P=`@univerjs/docs-toc-ui`,F=`1.0.0`;let I={};function L(e,t){return function(n,r){t(n,r,e)}}function R(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let z=class extends r.Disposable{constructor(e){super(),this.disposeWithMe(e.register(g,_)),this.disposeWithMe(e.register(f,h))}};z=R([L(0,(0,r.Inject)(n.ComponentManager))],z);function B(e){"@babel/helpers - typeof";return B=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},B(e)}function V(e,t){if(B(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(B(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function H(e){var t=V(e,`string`);return B(t)==`symbol`?t:t+``}function U(e,t,n){return(t=H(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let W=class extends r.RxDisposable{constructor(e,t,n,i,a){super(),this._context=e,this._instanceService=t,this._selectionManager=n,this._skeletonManager=i,this._themeService=a,U(this,`_range`,null),U(this,`_outline`,null),U(this,`_rangeId`,null),this._selectionManager.textSelection$.pipe((0,u.takeUntil)(this.dispose$)).subscribe(()=>this._update()),this._skeletonManager.currentSkeleton$.pipe((0,u.takeUntil)(this.dispose$)).subscribe(()=>this._update(!0)),this._instanceService.getCurrentTypeOfUnit$(r.UniverInstanceType.UNIVER_DOC).pipe((0,u.takeUntil)(this.dispose$)).subscribe(()=>this._update()),this._update()}_update(e=!1){let n=this._instanceService.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_DOC),i=this._selectionManager.getActiveTextRange(),a=(n==null?void 0:n.getUnitId())===this._context.unitId&&!(i!=null&&i.segmentId)?(0,t.findTableOfContentsAtOffset)(this._context.unit.getBody(),i==null?void 0:i.startOffset):void 0;if(!a){this._clear();return}if(!e&&a.rangeId===this._rangeId)return;this._clear();let o=this._context.mainComponent,s=Math.max(a.startIndex+1,a.endIndex-1);if(!o)return;let l=this._themeService.getColorFromTheme(`primary.600`),u=this._skeletonManager.getSkeleton(),f=u.findNodePositionByCharIndex(a.startIndex+1,!0,``,-1),p=u.findNodePositionByCharIndex(s,!0,``,-1);if(!f||!p)return;let m=o.getOffsetConfig(),{borderBoxPointGroup:h}=new c.NodePositionConvertToCursor(m,u).getRangePointData(f,p),g=G(h);if(!g)return;let _=new d.RegularPolygon(`__DocTocFill__${(0,r.generateRandomId)()}`,{pointsGroup:h,left:m.docsLeft,top:m.docsTop,fill:new r.ColorKit(l).setAlpha(.08).toRgbString(),evented:!1,debounceParentDirty:!1}),v=new d.Rect(`__DocTocRange__${a.rangeId}`,{left:g.left+m.docsLeft-4,top:g.top+m.docsTop-4,width:g.width+8,height:g.height+8,radius:2,fill:`rgba(0, 0, 0, 0)`,stroke:new r.ColorKit(l).setAlpha(.8).toRgbString(),strokeWidth:1,evented:!1,debounceParentDirty:!1});this._context.scene.addObject(_,c.TEXT_RANGE_LAYER_INDEX),this._context.scene.addObject(v,c.TEXT_RANGE_LAYER_INDEX),this._range=_,this._outline=v,this._rangeId=a.rangeId,this._context.scene.makeDirty()}_clear(){var e,t;if(!this._range&&!this._outline){this._rangeId=null;return}(e=this._range)==null||e.dispose(),(t=this._outline)==null||t.dispose(),this._range=null,this._outline=null,this._rangeId=null,this._context.scene.makeDirty()}dispose(){this._clear(),super.dispose()}};W=R([L(1,r.IUniverInstanceService),L(2,(0,r.Inject)(a.DocSelectionManagerService)),L(3,(0,r.Inject)(a.DocSkeletonManagerService)),L(4,(0,r.Inject)(r.ThemeService))],W);function G(e){let t=e.flat();if(!t.length)return null;let n=Math.min(...t.map(e=>e.x)),r=Math.min(...t.map(e=>e.y)),i=Math.max(...t.map(e=>e.x)),a=Math.max(...t.map(e=>e.y));return{left:n,top:r,width:i-n,height:a-r}}let K=class extends r.Disposable{constructor(e,t,n){super(),this._instanceService=e,this._selectionManager=t,this._ribbonService=n,U(this,`_visible`,!1),this.disposeWithMe(this._selectionManager.textSelection$.subscribe(()=>this._update())),this.disposeWithMe(this._instanceService.getCurrentTypeOfUnit$(r.UniverInstanceType.UNIVER_DOC).subscribe(()=>this._update())),this._update()}_update(){let e=this._instanceService.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_DOC),n=this._selectionManager.getActiveTextRange(),i=!!(e&&n&&!n.segmentId&&(0,t.findTableOfContentsAtOffset)(e.getBody(),n.startOffset));i!==this._visible&&(this._visible=i,i?this._ribbonService.showContextualTab(j,{activate:!0}):this._ribbonService.hideContextualTab(j))}dispose(){this._visible&&this._ribbonService.hideContextualTab(j),super.dispose()}};K=R([L(0,r.IUniverInstanceService),L(1,(0,r.Inject)(a.DocSelectionManagerService)),L(2,n.IRibbonService)],K);let q=class extends r.Disposable{constructor(e,t){super(),this.disposeWithMe(e.registerCommand(w)),this.disposeWithMe(e.registerCommand(C)),t.appendRootMenu(M),t.mergeMenu(N)}};q=R([L(0,r.ICommandService),L(1,n.IMenuManagerService)],q);let J=class extends r.Plugin{constructor(e=I,t,n,i){super(),this._config=e,this._injector=t,this._configService=n,this._renderManagerService=i;let{menu:a,...o}=(0,r.merge)({},I,this._config);a&&this._configService.setConfig(`menu`,a,{merge:!0}),this._configService.setConfig(`docs-toc-ui.config`,o)}onStarting(){[[z],[q],[K]].forEach(e=>this._injector.add(e)),this._injector.get(z),this._injector.get(q)}onReady(){this._injector.get(K)}onRendered(){this.disposeWithMe(this._renderManagerService.registerRenderModule(r.UniverInstanceType.UNIVER_DOC,[W]))}};U(J,`pluginName`,`DOCS_TOC_UI_PLUGIN`),U(J,`packageName`,P),U(J,`version`,F),U(J,`type`,r.UniverInstanceType.UNIVER_DOC),J=R([(0,r.DependentOn)(a.UniverDocsPlugin,d.UniverRenderEnginePlugin,t.UniverDocsTocPlugin,c.UniverDocsUIPlugin),L(1,(0,r.Inject)(r.Injector)),L(2,r.IConfigService),L(3,d.IRenderManagerService)],J),e.DocsTocUIMenuSchema=N,Object.defineProperty(e,"UniverDocsTocUIPlugin",{enumerable:!0,get:function(){return J}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiArSA=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`جدول المحتويات`,insertTitle:`جدول المحتويات`,automaticTitle:`جدول تلقائي`,customTitle:`جدول محتويات مخصص…`,contentsTitle:`المحتويات`,levels:`إظهار المستويات`,showPageNumbers:`إظهار أرقام الصفحات`,rightAlignPageNumbers:`محاذاة أرقام الصفحات إلى اليمين`,tabLeader:`حرف تعبئة علامات الجدولة`,leaderNone:`بلا`,leaderDots:`نقاط`,leaderDashes:`شرطات`,leaderUnderline:`تسطير`,format:`التنسيقات`,formatFromTemplate:`من القالب`,formatClassic:`كلاسيكي`,formatModern:`حديث`,formatSimple:`بسيط`,preview:`معاينة الطباعة`,previewHeading:`عنوان`,noHeadings:`لم يتم العثور على عناوين. طبّق أنماط العنوان 1–3 أو اختر المستويات المطابقة.`,updateTitle:`تحديث جدول المحتويات`,removeTitle:`إزالة جدول المحتويات`,updatePageNumbersOnly:`تحديث أرقام الصفحات فقط`,updateEntireTable:`تحديث الجدول بالكامل`,updateHint:`اختر كيفية تحديث جدول المحتويات هذا.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiCaES=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Taula de continguts`,insertTitle:`Taula de continguts`,automaticTitle:`Taula automàtica`,customTitle:`Taula de continguts personalitzada…`,contentsTitle:`Continguts`,levels:`Mostra els nivells`,showPageNumbers:`Mostra els números de pàgina`,rightAlignPageNumbers:`Alinea els números de pàgina a la dreta`,tabLeader:`Caràcter de farciment`,leaderNone:`Cap`,leaderDots:`Punts`,leaderDashes:`Guions`,leaderUnderline:`Subratllat`,format:`Formats`,formatFromTemplate:`De la plantilla`,formatClassic:`Clàssic`,formatModern:`Modern`,formatSimple:`Simple`,preview:`Visualització prèvia d'impressió`,previewHeading:`Títol`,noHeadings:`No s'ha trobat cap títol. Apliqueu els estils Títol 1–3 o trieu els nivells corresponents.`,updateTitle:`Actualitza la taula de continguts`,removeTitle:`Elimina la taula de continguts`,updatePageNumbersOnly:`Actualitza només els números de pàgina`,updateEntireTable:`Actualitza tota la taula`,updateHint:`Trieu com voleu actualitzar aquesta taula de continguts.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiDeDE=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Inhaltsverzeichnis`,insertTitle:`Inhaltsverzeichnis`,automaticTitle:`Automatisches Verzeichnis`,customTitle:`Benutzerdefiniertes Inhaltsverzeichnis…`,contentsTitle:`Inhalt`,levels:`Ebenen anzeigen`,showPageNumbers:`Seitenzahlen anzeigen`,rightAlignPageNumbers:`Seitenzahlen rechtsbündig`,tabLeader:`Füllzeichen`,leaderNone:`Keine`,leaderDots:`Punkte`,leaderDashes:`Striche`,leaderUnderline:`Unterstrich`,format:`Formate`,formatFromTemplate:`Von Vorlage`,formatClassic:`Klassisch`,formatModern:`Modern`,formatSimple:`Einfach`,preview:`Druckvorschau`,previewHeading:`Überschrift`,noHeadings:`Keine Überschriften gefunden. Wenden Sie Überschrift 1–3 an oder wählen Sie passende Ebenen.`,updateTitle:`Inhaltsverzeichnis aktualisieren`,removeTitle:`Inhaltsverzeichnis entfernen`,updatePageNumbersOnly:`Nur Seitenzahlen aktualisieren`,updateEntireTable:`Gesamtes Verzeichnis aktualisieren`,updateHint:`Wählen Sie die Aktualisierungsmethode.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiEnUS=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Table of contents`,insertTitle:`Table of contents`,automaticTitle:`Automatic table`,customTitle:`Custom table of contents…`,contentsTitle:`Contents`,levels:`Show levels`,showPageNumbers:`Show page numbers`,rightAlignPageNumbers:`Right align page numbers`,tabLeader:`Tab leader`,leaderNone:`None`,leaderDots:`Dots`,leaderDashes:`Dashes`,leaderUnderline:`Underline`,format:`Formats`,formatFromTemplate:`From template`,formatClassic:`Classic`,formatModern:`Modern`,formatSimple:`Simple`,preview:`Print preview`,previewHeading:`Heading`,noHeadings:`No headings were found. Apply Heading 1–3 styles first, or choose matching levels.`,updateTitle:`Update table of contents`,removeTitle:`Remove table of contents`,updatePageNumbersOnly:`Update page numbers only`,updateEntireTable:`Update entire table`,updateHint:`Choose how Univer should refresh this table of contents.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiEsES=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Tabla de contenido`,insertTitle:`Tabla de contenido`,automaticTitle:`Tabla automática`,customTitle:`Tabla de contenido personalizada…`,contentsTitle:`Contenido`,levels:`Mostrar niveles`,showPageNumbers:`Mostrar números de página`,rightAlignPageNumbers:`Alinear números de página a la derecha`,tabLeader:`Carácter de relleno`,leaderNone:`Ninguno`,leaderDots:`Puntos`,leaderDashes:`Guiones`,leaderUnderline:`Subrayado`,format:`Formatos`,formatFromTemplate:`De la plantilla`,formatClassic:`Clásico`,formatModern:`Moderno`,formatSimple:`Sencillo`,preview:`Vista previa de impresión`,previewHeading:`Título`,noHeadings:`No se encontraron títulos. Aplique los estilos Título 1–3 o elija los niveles correspondientes.`,updateTitle:`Actualizar tabla de contenido`,removeTitle:`Quitar tabla de contenido`,updatePageNumbersOnly:`Actualizar solo los números de página`,updateEntireTable:`Actualizar toda la tabla`,updateHint:`Elija cómo actualizar esta tabla de contenido.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiFaIR=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`فهرست مطالب`,insertTitle:`فهرست مطالب`,automaticTitle:`فهرست خودکار`,customTitle:`فهرست مطالب سفارشی…`,contentsTitle:`مطالب`,levels:`نمایش سطوح`,showPageNumbers:`نمایش شماره صفحات`,rightAlignPageNumbers:`تراز شماره صفحات به راست`,tabLeader:`نویسهٔ راهنمای تب`,leaderNone:`هیچکدام`,leaderDots:`نقطه`,leaderDashes:`خط تیره`,leaderUnderline:`زیرخط`,format:`قالبها`,formatFromTemplate:`از الگو`,formatClassic:`کلاسیک`,formatModern:`مدرن`,formatSimple:`ساده`,preview:`پیشنمایش چاپ`,previewHeading:`عنوان`,noHeadings:`عنوانی یافت نشد. سبکهای عنوان ۱ تا ۳ را اعمال کنید یا سطوح منطبق را انتخاب کنید.`,updateTitle:`بهروزرسانی فهرست مطالب`,removeTitle:`حذف فهرست مطالب`,updatePageNumbersOnly:`فقط بهروزرسانی شماره صفحات`,updateEntireTable:`بهروزرسانی کل فهرست`,updateHint:`روش بهروزرسانی این فهرست مطالب را انتخاب کنید.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiFrFR=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Table des matières`,insertTitle:`Table des matières`,automaticTitle:`Table automatique`,customTitle:`Table des matières personnalisée…`,contentsTitle:`Sommaire`,levels:`Afficher les niveaux`,showPageNumbers:`Afficher les numéros de page`,rightAlignPageNumbers:`Aligner les numéros de page à droite`,tabLeader:`Caractères de suite`,leaderNone:`Aucun`,leaderDots:`Points`,leaderDashes:`Tirets`,leaderUnderline:`Soulignement`,format:`Formats`,formatFromTemplate:`Depuis le modèle`,formatClassic:`Classique`,formatModern:`Moderne`,formatSimple:`Simple`,preview:`Aperçu avant impression`,previewHeading:`Titre`,noHeadings:`Aucun titre trouvé. Appliquez les styles Titre 1–3 ou choisissez les niveaux correspondants.`,updateTitle:`Mettre à jour la table des matières`,removeTitle:`Supprimer la table des matières`,updatePageNumbersOnly:`Mettre à jour uniquement les numéros de page`,updateEntireTable:`Mettre à jour toute la table`,updateHint:`Choisissez comment mettre à jour cette table des matières.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiIdID=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Daftar isi`,insertTitle:`Daftar isi`,automaticTitle:`Daftar otomatis`,customTitle:`Daftar isi kustom…`,contentsTitle:`Daftar isi`,levels:`Tampilkan tingkat`,showPageNumbers:`Tampilkan nomor halaman`,rightAlignPageNumbers:`Ratakan nomor halaman ke kanan`,tabLeader:`Pengisi tab`,leaderNone:`Tidak ada`,leaderDots:`Titik`,leaderDashes:`Garis putus-putus`,leaderUnderline:`Garis bawah`,format:`Format`,formatFromTemplate:`Dari templat`,formatClassic:`Klasik`,formatModern:`Modern`,formatSimple:`Sederhana`,preview:`Pratinjau cetak`,previewHeading:`Judul`,noHeadings:`Tidak ada judul yang ditemukan. Terapkan gaya Judul 1–3 atau pilih tingkat yang sesuai.`,updateTitle:`Perbarui daftar isi`,removeTitle:`Hapus daftar isi`,updatePageNumbersOnly:`Perbarui nomor halaman saja`,updateEntireTable:`Perbarui seluruh daftar`,updateHint:`Pilih cara memperbarui daftar isi ini.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiItIT=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Sommario`,insertTitle:`Sommario`,automaticTitle:`Sommario automatico`,customTitle:`Sommario personalizzato…`,contentsTitle:`Sommario`,levels:`Mostra livelli`,showPageNumbers:`Mostra numeri di pagina`,rightAlignPageNumbers:`Allinea i numeri di pagina a destra`,tabLeader:`Carattere di riempimento`,leaderNone:`Nessuno`,leaderDots:`Punti`,leaderDashes:`Trattini`,leaderUnderline:`Sottolineatura`,format:`Formati`,formatFromTemplate:`Da modello`,formatClassic:`Classico`,formatModern:`Moderno`,formatSimple:`Semplice`,preview:`Anteprima di stampa`,previewHeading:`Titolo`,noHeadings:`Nessun titolo trovato. Applica gli stili Titolo 1–3 o scegli i livelli corrispondenti.`,updateTitle:`Aggiorna sommario`,removeTitle:`Rimuovi sommario`,updatePageNumbersOnly:`Aggiorna solo i numeri di pagina`,updateEntireTable:`Aggiorna intero sommario`,updateHint:`Scegli come aggiornare questo sommario.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiJaJP=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`目次`,insertTitle:`目次`,automaticTitle:`自動作成の目次`,customTitle:`ユーザー設定の目次…`,contentsTitle:`目次`,levels:`表示するレベル`,showPageNumbers:`ページ番号を表示する`,rightAlignPageNumbers:`ページ番号を右揃えにする`,tabLeader:`タブリーダー`,leaderNone:`なし`,leaderDots:`点線`,leaderDashes:`破線`,leaderUnderline:`下線`,format:`書式`,formatFromTemplate:`テンプレートから`,formatClassic:`クラシック`,formatModern:`モダン`,formatSimple:`シンプル`,preview:`印刷プレビュー`,previewHeading:`見出し`,noHeadings:`見出しが見つかりません。見出し 1~3 のスタイルを適用するか、対応するレベルを選択してください。`,updateTitle:`目次の更新`,removeTitle:`目次の削除`,updatePageNumbersOnly:`ページ番号だけを更新する`,updateEntireTable:`目次をすべて更新する`,updateHint:`この目次の更新方法を選択してください。`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiKoKR=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`목차`,insertTitle:`목차`,automaticTitle:`자동 목차`,customTitle:`사용자 지정 목차…`,contentsTitle:`목차`,levels:`표시할 수준`,showPageNumbers:`페이지 번호 표시`,rightAlignPageNumbers:`페이지 번호 오른쪽 맞춤`,tabLeader:`탭 채움선`,leaderNone:`없음`,leaderDots:`점선`,leaderDashes:`파선`,leaderUnderline:`밑줄`,format:`서식`,formatFromTemplate:`서식 파일에서`,formatClassic:`클래식`,formatModern:`모던`,formatSimple:`간단`,preview:`인쇄 미리 보기`,previewHeading:`제목`,noHeadings:`제목을 찾을 수 없습니다. 제목 1–3 스타일을 적용하거나 해당 수준을 선택하세요.`,updateTitle:`목차 업데이트`,removeTitle:`목차 제거`,updatePageNumbersOnly:`페이지 번호만 업데이트`,updateEntireTable:`목차 전체 업데이트`,updateHint:`이 목차를 업데이트할 방법을 선택하세요.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiPlPL=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Spis treści`,insertTitle:`Spis treści`,automaticTitle:`Automatyczny spis treści`,customTitle:`Niestandardowy spis treści…`,contentsTitle:`Spis treści`,levels:`Pokaż poziomy`,showPageNumbers:`Pokaż numery stron`,rightAlignPageNumbers:`Wyrównaj numery stron do prawej`,tabLeader:`Znak wiodący`,leaderNone:`Brak`,leaderDots:`Kropki`,leaderDashes:`Kreski`,leaderUnderline:`Podkreślenie`,format:`Formaty`,formatFromTemplate:`Z szablonu`,formatClassic:`Klasyczny`,formatModern:`Nowoczesny`,formatSimple:`Prosty`,preview:`Podgląd wydruku`,previewHeading:`Nagłówek`,noHeadings:`Nie znaleziono nagłówków. Zastosuj style Nagłówek 1–3 lub wybierz odpowiednie poziomy.`,updateTitle:`Aktualizuj spis treści`,removeTitle:`Usuń spis treści`,updatePageNumbersOnly:`Aktualizuj tylko numery stron`,updateEntireTable:`Aktualizuj cały spis`,updateHint:`Wybierz sposób aktualizacji tego spisu treści.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiPtBR=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Sumário`,insertTitle:`Sumário`,automaticTitle:`Sumário automático`,customTitle:`Sumário personalizado…`,contentsTitle:`Sumário`,levels:`Mostrar níveis`,showPageNumbers:`Mostrar números de página`,rightAlignPageNumbers:`Alinhar números de página à direita`,tabLeader:`Preenchimento de tabulação`,leaderNone:`Nenhum`,leaderDots:`Pontos`,leaderDashes:`Traços`,leaderUnderline:`Sublinhado`,format:`Formatos`,formatFromTemplate:`Do modelo`,formatClassic:`Clássico`,formatModern:`Moderno`,formatSimple:`Simples`,preview:`Visualização de impressão`,previewHeading:`Título`,noHeadings:`Nenhum título encontrado. Aplique os estilos Título 1–3 ou escolha os níveis correspondentes.`,updateTitle:`Atualizar sumário`,removeTitle:`Remover sumário`,updatePageNumbersOnly:`Atualizar apenas os números de página`,updateEntireTable:`Atualizar o sumário inteiro`,updateHint:`Escolha como atualizar este sumário.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiRuRU=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Оглавление`,insertTitle:`Оглавление`,automaticTitle:`Автособираемое оглавление`,customTitle:`Настраиваемое оглавление…`,contentsTitle:`Содержание`,levels:`Показать уровни`,showPageNumbers:`Показать номера страниц`,rightAlignPageNumbers:`Номера страниц по правому краю`,tabLeader:`Заполнитель`,leaderNone:`Нет`,leaderDots:`Точки`,leaderDashes:`Тире`,leaderUnderline:`Подчёркивание`,format:`Форматы`,formatFromTemplate:`Из шаблона`,formatClassic:`Классический`,formatModern:`Современный`,formatSimple:`Простой`,preview:`Предварительный просмотр`,previewHeading:`Заголовок`,noHeadings:`Заголовки не найдены. Примените стили «Заголовок 1–3» или выберите соответствующие уровни.`,updateTitle:`Обновить оглавление`,removeTitle:`Удалить оглавление`,updatePageNumbersOnly:`Обновить только номера страниц`,updateEntireTable:`Обновить целиком`,updateHint:`Выберите способ обновления оглавления.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiSkSK=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Obsah`,insertTitle:`Obsah`,automaticTitle:`Automatický obsah`,customTitle:`Vlastný obsah…`,contentsTitle:`Obsah`,levels:`Zobraziť úrovne`,showPageNumbers:`Zobraziť čísla strán`,rightAlignPageNumbers:`Zarovnať čísla strán doprava`,tabLeader:`Vodiaci znak`,leaderNone:`Žiadny`,leaderDots:`Bodky`,leaderDashes:`Pomlčky`,leaderUnderline:`Podčiarknutie`,format:`Formáty`,formatFromTemplate:`Zo šablóny`,formatClassic:`Klasický`,formatModern:`Moderný`,formatSimple:`Jednoduchý`,preview:`Ukážka pred tlačou`,previewHeading:`Nadpis`,noHeadings:`Nenašli sa žiadne nadpisy. Použite štýly Nadpis 1–3 alebo vyberte zodpovedajúce úrovne.`,updateTitle:`Aktualizovať obsah`,removeTitle:`Odstrániť obsah`,updatePageNumbersOnly:`Aktualizovať iba čísla strán`,updateEntireTable:`Aktualizovať celý obsah`,updateHint:`Vyberte spôsob aktualizácie tohto obsahu.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiViVN=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`Mục lục`,insertTitle:`Mục lục`,automaticTitle:`Mục lục tự động`,customTitle:`Mục lục tùy chỉnh…`,contentsTitle:`Mục lục`,levels:`Hiển thị cấp độ`,showPageNumbers:`Hiển thị số trang`,rightAlignPageNumbers:`Căn phải số trang`,tabLeader:`Ký tự dẫn tab`,leaderNone:`Không có`,leaderDots:`Dấu chấm`,leaderDashes:`Dấu gạch ngang`,leaderUnderline:`Gạch dưới`,format:`Định dạng`,formatFromTemplate:`Từ mẫu`,formatClassic:`Cổ điển`,formatModern:`Hiện đại`,formatSimple:`Đơn giản`,preview:`Xem trước khi in`,previewHeading:`Tiêu đề`,noHeadings:`Không tìm thấy tiêu đề. Hãy áp dụng kiểu Tiêu đề 1–3 hoặc chọn cấp độ phù hợp.`,updateTitle:`Cập nhật mục lục`,removeTitle:`Xóa mục lục`,updatePageNumbersOnly:`Chỉ cập nhật số trang`,updateEntireTable:`Cập nhật toàn bộ mục lục`,updateHint:`Chọn cách cập nhật mục lục này.`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiZhCN=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`目录`,insertTitle:`插入目录`,automaticTitle:`自动目录`,customTitle:`自定义目录…`,contentsTitle:`目录`,levels:`显示级别`,showPageNumbers:`显示页码`,rightAlignPageNumbers:`页码右对齐`,tabLeader:`制表符前导符`,leaderNone:`无`,leaderDots:`点线`,leaderDashes:`短划线`,leaderUnderline:`下划线`,format:`格式`,formatFromTemplate:`来自模板`,formatClassic:`经典`,formatModern:`现代`,formatSimple:`简洁`,preview:`打印预览`,previewHeading:`标题`,noHeadings:`未找到标题。请先应用标题 1–3 样式,或选择匹配的标题级别。`,updateTitle:`更新目录`,removeTitle:`删除目录`,updatePageNumbersOnly:`只更新页码`,updateEntireTable:`更新整个目录`,updateHint:`请选择 Univer 更新此目录的方式。`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiZhHK=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`目錄`,insertTitle:`插入目錄`,automaticTitle:`自動目錄`,customTitle:`自訂目錄…`,contentsTitle:`目錄`,levels:`顯示級別`,showPageNumbers:`顯示頁碼`,rightAlignPageNumbers:`頁碼靠右對齊`,tabLeader:`定位點前置字元`,leaderNone:`無`,leaderDots:`點線`,leaderDashes:`短劃線`,leaderUnderline:`底線`,format:`格式`,formatFromTemplate:`來自範本`,formatClassic:`傳統`,formatModern:`現代`,formatSimple:`簡潔`,preview:`預覽列印`,previewHeading:`標題`,noHeadings:`找不到標題。請先套用標題 1–3 樣式,或選擇相符的標題級別。`,updateTitle:`更新目錄`,removeTitle:`刪除目錄`,updatePageNumbersOnly:`只更新頁碼`,updateEntireTable:`更新整個目錄`,updateHint:`請選擇 Univer 更新此目錄的方式。`}}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.UniverDocsTocUiZhTW=t())})(this,function(){return{"docs-toc-ui":{tableOfContents:{title:`目錄`,insertTitle:`目錄`,automaticTitle:`自動目錄`,customTitle:`自訂目錄…`,contentsTitle:`目錄`,levels:`顯示階層`,showPageNumbers:`顯示頁碼`,rightAlignPageNumbers:`頁碼靠右對齊`,tabLeader:`定位點前置字元`,leaderNone:`無`,leaderDots:`點線`,leaderDashes:`虛線`,leaderUnderline:`底線`,format:`格式`,formatFromTemplate:`來自範本`,formatClassic:`傳統`,formatModern:`現代`,formatSimple:`簡單`,preview:`預覽列印`,previewHeading:`標題`,noHeadings:`找不到標題。請先套用標題 1–3 樣式,或選擇相符的階層。`,updateTitle:`更新目錄`,removeTitle:`移除目錄`,updatePageNumbersOnly:`只更新頁碼`,updateEntireTable:`更新整個目錄`,updateHint:`選擇此目錄的更新方式。`}}}});
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@univerjs/docs-toc-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Table of contents UI for Univer Docs.",
|
|
6
|
+
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
7
|
+
"license": "Apache-2.0",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "opencollective",
|
|
10
|
+
"url": "https://opencollective.com/univer"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://univer.ai",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/dream-num/univer"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/dream-num/univer/issues"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"univer",
|
|
22
|
+
"docs",
|
|
23
|
+
"table-of-contents",
|
|
24
|
+
"toc",
|
|
25
|
+
"ui"
|
|
26
|
+
],
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"import": "./lib/es/index.js",
|
|
30
|
+
"require": "./lib/cjs/index.js",
|
|
31
|
+
"types": "./lib/types/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./*": {
|
|
34
|
+
"import": "./lib/es/*",
|
|
35
|
+
"require": "./lib/cjs/*",
|
|
36
|
+
"types": "./lib/types/index.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./locale/*": {
|
|
39
|
+
"import": "./lib/es/locale/*.js",
|
|
40
|
+
"require": "./lib/cjs/locale/*.js",
|
|
41
|
+
"types": "./lib/types/locale/*.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./lib/*": "./lib/*"
|
|
44
|
+
},
|
|
45
|
+
"main": "./lib/es/index.js",
|
|
46
|
+
"types": "./lib/types/index.d.ts",
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"directories": {
|
|
51
|
+
"lib": "lib"
|
|
52
|
+
},
|
|
53
|
+
"files": [
|
|
54
|
+
"lib"
|
|
55
|
+
],
|
|
56
|
+
"peerDependencies": {
|
|
57
|
+
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
58
|
+
"rxjs": ">=7.0.0"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@univerjs/core": "1.0.0",
|
|
62
|
+
"@univerjs/design": "1.0.0",
|
|
63
|
+
"@univerjs/docs": "1.0.0",
|
|
64
|
+
"@univerjs/docs-toc": "1.0.0",
|
|
65
|
+
"@univerjs/docs-ui": "1.0.0",
|
|
66
|
+
"@univerjs/engine-render": "1.0.0",
|
|
67
|
+
"@univerjs/protocol": "1.0.0",
|
|
68
|
+
"@univerjs/ui": "1.0.0"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@univerjs-infra/shared": "1.0.0",
|
|
72
|
+
"postcss": "^8.5.26",
|
|
73
|
+
"react": "18.3.1",
|
|
74
|
+
"react-dom": "18.3.1",
|
|
75
|
+
"rxjs": "^7.8.2",
|
|
76
|
+
"tailwindcss": "3.4.18",
|
|
77
|
+
"typescript": "^6.0.3",
|
|
78
|
+
"vitest": "^5.0.0"
|
|
79
|
+
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"test": "vitest run",
|
|
82
|
+
"test:watch": "vitest",
|
|
83
|
+
"coverage": "vitest run --coverage",
|
|
84
|
+
"typecheck": "tsc --noEmit",
|
|
85
|
+
"build:bundle": "univer-cli build",
|
|
86
|
+
"build:types": "tsc -p tsconfig.node.json",
|
|
87
|
+
"build": "pnpm run build:bundle && pnpm run build:types"
|
|
88
|
+
},
|
|
89
|
+
"module": "./lib/es/index.js"
|
|
90
|
+
}
|