@difizen/libro-core 0.3.16 → 1.0.1
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/es/add-cell/libro-add-cell-module.d.ts +1 -1
- package/es/add-cell/libro-add-cell-module.d.ts.map +1 -1
- package/es/add-cell/libro-add-cell-module.js +1 -1
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts +1 -1
- package/es/add-cell/libro-add-cell-slot-contribution.d.ts.map +1 -1
- package/es/add-cell/libro-add-cell-slot-contribution.js +2 -2
- package/es/add-cell/libro-add-cell-view.d.ts +1 -1
- package/es/add-cell/libro-add-cell-view.d.ts.map +1 -1
- package/es/add-cell/libro-add-cell-view.js +1 -1
- package/es/cell/libro-cell-contribution.js +1 -1
- package/es/cell/libro-cell-model.d.ts +1 -1
- package/es/cell/libro-cell-model.d.ts.map +1 -1
- package/es/cell/libro-cell-model.js +2 -2
- package/es/cell/libro-cell-module.d.ts +1 -1
- package/es/cell/libro-cell-module.d.ts.map +1 -1
- package/es/cell/libro-cell-module.js +1 -1
- package/es/cell/libro-cell-protocol.d.ts +2 -2
- package/es/cell/libro-cell-protocol.d.ts.map +1 -1
- package/es/cell/libro-cell-protocol.js +1 -1
- package/es/cell/libro-cell-service.d.ts +2 -2
- package/es/cell/libro-cell-service.d.ts.map +1 -1
- package/es/cell/libro-cell-service.js +3 -3
- package/es/cell/libro-cell-view.d.ts +4 -4
- package/es/cell/libro-cell-view.d.ts.map +1 -1
- package/es/cell/libro-cell-view.js +6 -6
- package/es/cell/libro-edit-cell-view.d.ts +1 -1
- package/es/cell/libro-edit-cell-view.d.ts.map +1 -1
- package/es/cell/libro-edit-cell-view.js +1 -1
- package/es/cell/libro-executable-cell-model.d.ts +1 -1
- package/es/cell/libro-executable-cell-model.d.ts.map +1 -1
- package/es/cell/libro-executable-cell-view.js +3 -3
- package/es/collapse-service.js +1 -1
- package/es/command/document-commands.d.ts +1 -1
- package/es/command/document-commands.d.ts.map +1 -1
- package/es/command/kernel-command.d.ts +1 -1
- package/es/command/kernel-command.d.ts.map +1 -1
- package/es/command/kernel-command.js +1 -1
- package/es/command/libro-command-contribution.d.ts +2 -2
- package/es/command/libro-command-contribution.d.ts.map +1 -1
- package/es/command/libro-command-contribution.js +2 -2
- package/es/command/libro-command-register.d.ts +1 -1
- package/es/command/libro-command-register.d.ts.map +1 -1
- package/es/command/libro-command-register.js +1 -1
- package/es/command/module.d.ts +1 -1
- package/es/command/module.d.ts.map +1 -1
- package/es/command/module.js +1 -1
- package/es/command/notebook-commands.d.ts +1 -1
- package/es/command/notebook-commands.d.ts.map +1 -1
- package/es/command/notebook-commands.js +1 -1
- package/es/components/dnd-cell-item-render.js +2 -2
- package/es/components/dnd-component/default-dnd-content.js +2 -2
- package/es/components/dnd-component/dnd-list.d.ts.map +1 -1
- package/es/components/dnd-component/dnd-list.js +1 -1
- package/es/components/dnd-component/virtualized-manager.js +1 -1
- package/es/components/libro-component.js +2 -2
- package/es/components/libro-side-toolbar-menu.js +2 -2
- package/es/components/libro-view-header.js +1 -1
- package/es/content/libro-content-contribution.js +1 -1
- package/es/content/libro-content-module.d.ts +1 -1
- package/es/content/libro-content-module.d.ts.map +1 -1
- package/es/content/libro-content-module.js +1 -1
- package/es/content/libro-content-protocol.d.ts +1 -1
- package/es/content/libro-content-protocol.d.ts.map +1 -1
- package/es/content/libro-content-protocol.js +1 -1
- package/es/content/libro-content-service.d.ts +1 -1
- package/es/content/libro-content-service.d.ts.map +1 -1
- package/es/content/libro-content-service.js +1 -1
- package/es/content/libro-save-content-contribution.js +1 -1
- package/es/formatter/libro-formatter-json-contribution.js +1 -1
- package/es/formatter/libro-formatter-manager.d.ts +1 -1
- package/es/formatter/libro-formatter-manager.d.ts.map +1 -1
- package/es/formatter/libro-formatter-manager.js +1 -1
- package/es/formatter/libro-formatter-module.d.ts +1 -1
- package/es/formatter/libro-formatter-module.d.ts.map +1 -1
- package/es/formatter/libro-formatter-module.js +1 -1
- package/es/formatter/libro-formatter-protocol.d.ts +1 -1
- package/es/formatter/libro-formatter-protocol.d.ts.map +1 -1
- package/es/formatter/libro-formatter-protocol.js +1 -1
- package/es/formatter/libro-formatter-string-contribution.js +1 -1
- package/es/formatter/libro-formatter-trans-default-contribution.js +1 -1
- package/es/index.d.ts +2 -0
- package/es/index.d.ts.map +1 -1
- package/es/index.js +2 -0
- package/es/libro-context-key.d.ts +3 -3
- package/es/libro-context-key.d.ts.map +1 -1
- package/es/libro-context-key.js +2 -2
- package/es/libro-keybind-registry.d.ts +1 -1
- package/es/libro-keybind-registry.d.ts.map +1 -1
- package/es/libro-keybind-registry.js +2 -2
- package/es/libro-model.d.ts +9 -9
- package/es/libro-model.d.ts.map +1 -1
- package/es/libro-model.js +4 -4
- package/es/libro-protocol.d.ts +2 -2
- package/es/libro-protocol.d.ts.map +1 -1
- package/es/libro-service.d.ts +14 -14
- package/es/libro-service.d.ts.map +1 -1
- package/es/libro-service.js +19 -8
- package/es/libro-setting-contribution.d.ts +2 -2
- package/es/libro-setting-contribution.d.ts.map +1 -1
- package/es/libro-setting-contribution.js +1 -1
- package/es/libro-setting.d.ts +1 -1
- package/es/libro-setting.d.ts.map +1 -1
- package/es/libro-setting.js +1 -1
- package/es/libro-view-tracker.d.ts +4 -2
- package/es/libro-view-tracker.d.ts.map +1 -1
- package/es/libro-view-tracker.js +4 -2
- package/es/libro-view.d.ts +9 -9
- package/es/libro-view.d.ts.map +1 -1
- package/es/libro-view.js +11 -2
- package/es/libro-workspace-service.d.ts +1 -1
- package/es/libro-workspace-service.d.ts.map +1 -1
- package/es/libro-workspace-service.js +2 -2
- package/es/module.d.ts +1 -1
- package/es/module.d.ts.map +1 -1
- package/es/module.js +2 -2
- package/es/output/output-area.d.ts +4 -4
- package/es/output/output-area.d.ts.map +1 -1
- package/es/output/output-area.js +2 -2
- package/es/output/output-contribution.d.ts +1 -1
- package/es/output/output-contribution.d.ts.map +1 -1
- package/es/output/output-contribution.js +1 -1
- package/es/output/output-model.d.ts +1 -1
- package/es/output/output-model.d.ts.map +1 -1
- package/es/output/output-model.js +2 -2
- package/es/output/output-module.d.ts +1 -1
- package/es/output/output-module.d.ts.map +1 -1
- package/es/output/output-module.js +1 -1
- package/es/output/output-protocol.d.ts +3 -3
- package/es/output/output-protocol.d.ts.map +1 -1
- package/es/output/output-protocol.js +1 -1
- package/es/settings/module.d.ts +1 -1
- package/es/settings/module.d.ts.map +1 -1
- package/es/settings/module.js +1 -1
- package/es/settings/setting-editor/configuration-panel-view.d.ts +2 -2
- package/es/settings/setting-editor/configuration-panel-view.d.ts.map +1 -1
- package/es/settings/setting-editor/configuration-panel-view.js +1 -1
- package/es/settings/setting-editor/configuration-render-contribution.d.ts +2 -2
- package/es/settings/setting-editor/configuration-render-contribution.d.ts.map +1 -1
- package/es/settings/setting-editor/configuration-render-contribution.js +1 -1
- package/es/settings/setting-editor/default-node-render.d.ts +1 -1
- package/es/settings/setting-editor/default-node-render.d.ts.map +1 -1
- package/es/settings/setting-editor/default-node-render.js +1 -1
- package/es/settings/setting-editor/module.d.ts +1 -1
- package/es/settings/setting-editor/module.d.ts.map +1 -1
- package/es/settings/setting-editor/module.js +1 -1
- package/es/settings/setting-editor/setting-editor-view.d.ts +1 -1
- package/es/settings/setting-editor/setting-editor-view.d.ts.map +1 -1
- package/es/settings/setting-editor/setting-editor-view.js +2 -2
- package/es/settings/setting-editor/setting-tree-service.d.ts +3 -3
- package/es/settings/setting-editor/setting-tree-service.d.ts.map +1 -1
- package/es/settings/setting-editor/setting-tree-service.js +2 -2
- package/es/settings/setting-editor/setting-tree-view.d.ts +2 -2
- package/es/settings/setting-editor/setting-tree-view.d.ts.map +1 -1
- package/es/settings/setting-editor/setting-tree-view.js +2 -2
- package/es/settings/settings-contribution.d.ts +3 -3
- package/es/settings/settings-contribution.d.ts.map +1 -1
- package/es/settings/settings-contribution.js +2 -2
- package/es/settings/settings-modal.d.ts +1 -1
- package/es/settings/settings-modal.d.ts.map +1 -1
- package/es/settings/settings-modal.js +3 -3
- package/es/settings/settings-protocol.d.ts +1 -1
- package/es/settings/settings-protocol.d.ts.map +1 -1
- package/es/slot/libro-slot-manager.d.ts +2 -2
- package/es/slot/libro-slot-manager.d.ts.map +1 -1
- package/es/slot/libro-slot-manager.js +2 -2
- package/es/slot/libro-slot-protocol.d.ts +2 -2
- package/es/slot/libro-slot-protocol.d.ts.map +1 -1
- package/es/slot/libro-slot-protocol.js +1 -1
- package/es/slot/libro-slot-view.d.ts +2 -2
- package/es/slot/libro-slot-view.d.ts.map +1 -1
- package/es/slot/libro-slot-view.js +3 -3
- package/es/slot/module.d.ts +1 -1
- package/es/slot/module.d.ts.map +1 -1
- package/es/slot/module.js +1 -1
- package/es/theme/libro-color-registry.d.ts +2 -2
- package/es/theme/libro-color-registry.d.ts.map +1 -1
- package/es/theme/libro-color-registry.js +2 -2
- package/es/toolbar/all-outputs-scroll-icon.js +1 -1
- package/es/toolbar/change-cell-to-selector.js +1 -1
- package/es/toolbar/hide-all-selector.js +2 -2
- package/es/toolbar/libro-toolbar.d.ts +2 -2
- package/es/toolbar/libro-toolbar.d.ts.map +1 -1
- package/es/toolbar/libro-toolbar.js +3 -3
- package/es/toolbar/module.d.ts +1 -1
- package/es/toolbar/module.d.ts.map +1 -1
- package/es/toolbar/module.js +1 -1
- package/es/toolbar/restart-clear-outputs-contribution.d.ts +2 -2
- package/es/toolbar/restart-clear-outputs-contribution.d.ts.map +1 -1
- package/es/toolbar/restart-clear-outputs-contribution.js +1 -1
- package/es/toolbar/restart-clear-outputs-modal.d.ts +1 -1
- package/es/toolbar/restart-clear-outputs-modal.d.ts.map +1 -1
- package/es/toolbar/restart-clear-outputs-modal.js +1 -1
- package/es/toolbar/save-icon.js +1 -1
- package/es/toolbar/shutdown-contribution.d.ts +2 -2
- package/es/toolbar/shutdown-contribution.d.ts.map +1 -1
- package/es/toolbar/shutdown-contribution.js +1 -1
- package/es/toolbar/shutdown-modal.d.ts +1 -1
- package/es/toolbar/shutdown-modal.d.ts.map +1 -1
- package/es/toolbar/side-toolar-more-select.js +4 -4
- package/es/utils/index.js +1 -1
- package/es/virtualized-manager-helper.js +1 -1
- package/es/virtualized-manager.js +1 -1
- package/package.json +5 -8
- package/src/add-cell/libro-add-cell-module.ts +1 -1
- package/src/add-cell/libro-add-cell-slot-contribution.ts +2 -2
- package/src/add-cell/libro-add-cell-view.tsx +1 -1
- package/src/cell/libro-cell-contribution.ts +1 -1
- package/src/cell/libro-cell-model.ts +2 -2
- package/src/cell/libro-cell-module.ts +1 -1
- package/src/cell/libro-cell-protocol.ts +2 -2
- package/src/cell/libro-cell-service.ts +4 -4
- package/src/cell/libro-cell-view.tsx +7 -7
- package/src/cell/libro-edit-cell-view.tsx +1 -1
- package/src/cell/libro-executable-cell-model.ts +1 -1
- package/src/cell/libro-executable-cell-view.ts +3 -3
- package/src/collapse-service.ts +1 -1
- package/src/command/document-commands.ts +1 -1
- package/src/command/kernel-command.ts +2 -2
- package/src/command/libro-command-contribution.ts +3 -3
- package/src/command/libro-command-register.ts +2 -2
- package/src/command/module.ts +1 -1
- package/src/command/notebook-commands.ts +2 -2
- package/src/components/dnd-cell-item-render.tsx +2 -2
- package/src/components/dnd-component/default-dnd-content.tsx +2 -2
- package/src/components/dnd-component/dnd-list.tsx +6 -1
- package/src/components/dnd-component/virtualized-manager.ts +1 -1
- package/src/components/libro-component.tsx +2 -2
- package/src/components/libro-side-toolbar-menu.tsx +3 -3
- package/src/components/libro-view-header.tsx +1 -1
- package/src/content/libro-content-contribution.ts +1 -1
- package/src/content/libro-content-module.ts +1 -1
- package/src/content/libro-content-protocol.ts +1 -1
- package/src/content/libro-content-service.ts +2 -2
- package/src/content/libro-save-content-contribution.ts +1 -1
- package/src/formatter/libro-formatter-json-contribution.ts +1 -1
- package/src/formatter/libro-formatter-manager.ts +2 -2
- package/src/formatter/libro-formatter-module.ts +1 -1
- package/src/formatter/libro-formatter-protocol.ts +1 -1
- package/src/formatter/libro-formatter-string-contribution.ts +1 -1
- package/src/formatter/libro-formatter-trans-default-contribution.ts +1 -1
- package/src/index.tsx +3 -0
- package/src/libro-context-key.ts +4 -4
- package/src/libro-keybind-registry.ts +2 -2
- package/src/libro-model.ts +4 -4
- package/src/libro-protocol.ts +2 -2
- package/src/libro-service.ts +11 -5
- package/src/libro-setting-contribution.ts +1 -1
- package/src/libro-setting.ts +2 -2
- package/src/libro-view-tracker.ts +3 -1
- package/src/libro-view.tsx +17 -2
- package/src/libro-workspace-service.ts +2 -2
- package/src/module.ts +2 -2
- package/src/output/output-area.tsx +3 -3
- package/src/output/output-contribution.ts +1 -1
- package/src/output/output-model.tsx +2 -2
- package/src/output/output-module.ts +1 -1
- package/src/output/output-protocol.ts +3 -3
- package/src/settings/module.ts +1 -1
- package/src/settings/setting-editor/configuration-panel-view.tsx +2 -2
- package/src/settings/setting-editor/configuration-render-contribution.ts +2 -2
- package/src/settings/setting-editor/default-node-render.tsx +2 -2
- package/src/settings/setting-editor/module.ts +1 -1
- package/src/settings/setting-editor/setting-editor-view.tsx +2 -2
- package/src/settings/setting-editor/setting-tree-service.ts +3 -3
- package/src/settings/setting-editor/setting-tree-view.tsx +3 -3
- package/src/settings/settings-contribution.tsx +7 -3
- package/src/settings/settings-modal.tsx +4 -4
- package/src/settings/settings-protocol.ts +1 -1
- package/src/slot/libro-slot-manager.ts +3 -3
- package/src/slot/libro-slot-protocol.ts +2 -2
- package/src/slot/libro-slot-view.tsx +9 -4
- package/src/slot/module.ts +1 -1
- package/src/theme/libro-color-registry.ts +3 -3
- package/src/toolbar/all-outputs-scroll-icon.tsx +1 -1
- package/src/toolbar/change-cell-to-selector.tsx +2 -2
- package/src/toolbar/hide-all-selector.tsx +3 -3
- package/src/toolbar/libro-toolbar.tsx +4 -4
- package/src/toolbar/module.ts +1 -1
- package/src/toolbar/restart-clear-outputs-contribution.tsx +1 -1
- package/src/toolbar/restart-clear-outputs-modal.tsx +2 -2
- package/src/toolbar/save-icon.tsx +2 -2
- package/src/toolbar/shutdown-contribution.tsx +1 -1
- package/src/toolbar/shutdown-modal.tsx +1 -1
- package/src/toolbar/side-toolar-more-select.tsx +5 -5
- package/src/utils/index.ts +1 -1
- package/src/virtualized-manager-helper.ts +1 -1
- package/src/virtualized-manager.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ICodeCell } from '@difizen/libro-common';
|
|
2
|
-
import { watch } from '@difizen/
|
|
3
|
-
import { ViewOption } from '@difizen/
|
|
4
|
-
import { inject } from '@difizen/
|
|
2
|
+
import { watch } from '@difizen/libro-common/app';
|
|
3
|
+
import { ViewOption } from '@difizen/libro-common/app';
|
|
4
|
+
import { inject } from '@difizen/libro-common/app';
|
|
5
5
|
|
|
6
6
|
import type { CellModel } from '../libro-protocol.js';
|
|
7
7
|
import type { CellViewOptions } from '../libro-protocol.js';
|
package/src/collapse-service.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Command } from '@difizen/
|
|
2
|
-
import { l10n } from '@difizen/
|
|
1
|
+
import type { Command } from '@difizen/libro-common/app';
|
|
2
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
3
3
|
|
|
4
4
|
export const KernelCommands: Record<string, Command & { keybind?: string }> = {
|
|
5
5
|
//#region libro command
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { MIME } from '@difizen/libro-common';
|
|
2
|
-
import type { CommandRegistry } from '@difizen/
|
|
2
|
+
import type { CommandRegistry } from '@difizen/libro-common/app';
|
|
3
3
|
import {
|
|
4
4
|
inject,
|
|
5
5
|
ModalService,
|
|
6
6
|
singleton,
|
|
7
7
|
CommandContribution,
|
|
8
|
-
} from '@difizen/
|
|
9
|
-
import { equals } from '@difizen/
|
|
8
|
+
} from '@difizen/libro-common/app';
|
|
9
|
+
import { equals } from '@difizen/libro-common/app';
|
|
10
10
|
import { v4 } from 'uuid';
|
|
11
11
|
|
|
12
12
|
import {
|
|
@@ -4,8 +4,8 @@ import type {
|
|
|
4
4
|
CommandHandlerWithContext,
|
|
5
5
|
CommandRegistry,
|
|
6
6
|
KeybindingRegistry,
|
|
7
|
-
} from '@difizen/
|
|
8
|
-
import { inject, singleton } from '@difizen/
|
|
7
|
+
} from '@difizen/libro-common/app';
|
|
8
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
9
9
|
|
|
10
10
|
import type { CellView, NotebookView } from '../libro-protocol.js';
|
|
11
11
|
import { LibroContextKeys } from '../libro-protocol.js';
|
package/src/command/module.ts
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
// ReloadOutlined,
|
|
10
10
|
PoweroffOutlined,
|
|
11
11
|
} from '@ant-design/icons';
|
|
12
|
-
import type { Command } from '@difizen/
|
|
13
|
-
import { l10n } from '@difizen/
|
|
12
|
+
import type { Command } from '@difizen/libro-common/app';
|
|
13
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
16
|
Undo,
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
useObserve,
|
|
9
9
|
ViewInstance,
|
|
10
10
|
ViewRender,
|
|
11
|
-
} from '@difizen/
|
|
12
|
-
import { l10n } from '@difizen/
|
|
11
|
+
} from '@difizen/libro-common/app';
|
|
12
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
13
13
|
import { Tooltip } from 'antd';
|
|
14
14
|
import classnames from 'classnames';
|
|
15
15
|
import type { FC } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
|
-
import { getOrigin, useInject, ViewInstance } from '@difizen/
|
|
3
|
-
import { useConfigurationValue } from '@difizen/
|
|
2
|
+
import { getOrigin, useInject, ViewInstance } from '@difizen/libro-common/app';
|
|
3
|
+
import { useConfigurationValue } from '@difizen/libro-common/app';
|
|
4
4
|
import { Button } from 'antd';
|
|
5
5
|
import React, {
|
|
6
6
|
useCallback,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
getOrigin,
|
|
3
|
+
useInject,
|
|
4
|
+
useObserve,
|
|
5
|
+
ViewInstance,
|
|
6
|
+
} from '@difizen/libro-common/app';
|
|
2
7
|
import classNames from 'classnames';
|
|
3
8
|
import { throttle } from 'lodash';
|
|
4
9
|
import type { FC, ReactNode } from 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ViewRender } from '@difizen/
|
|
2
|
-
import { useInject } from '@difizen/
|
|
1
|
+
import { ViewRender } from '@difizen/libro-common/app';
|
|
2
|
+
import { useInject } from '@difizen/libro-common/app';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
|
|
5
5
|
import type { NotebookOption, NotebookView } from '../libro-protocol.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Menu, MenuContext } from '@difizen/libro-common/react';
|
|
2
|
+
import type { Toolbar } from '@difizen/libro-common/app';
|
|
2
3
|
import {
|
|
3
4
|
CommandRegistry,
|
|
4
5
|
getOrigin,
|
|
5
6
|
ToolbarInstance,
|
|
6
7
|
useInject,
|
|
7
|
-
} from '@difizen/
|
|
8
|
-
import { Menu, MenuContext } from '@difizen/mana-react';
|
|
8
|
+
} from '@difizen/libro-common/app';
|
|
9
9
|
import type { ReactNode } from 'react';
|
|
10
10
|
|
|
11
11
|
import type { LibroToolbarArags } from '../toolbar/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
|
-
import { ToolbarRender, useInject, ViewInstance } from '@difizen/
|
|
2
|
+
import { ToolbarRender, useInject, ViewInstance } from '@difizen/libro-common/app';
|
|
3
3
|
import type { FC } from 'react';
|
|
4
4
|
import { useMemo } from 'react';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { INotebookContent } from '@difizen/libro-common';
|
|
2
|
-
import { Syringe } from '@difizen/
|
|
2
|
+
import { Syringe } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
export const ContentContribution = Syringe.defineToken('ContentContribution');
|
|
5
5
|
export interface ContentContribution {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Contribution } from '@difizen/
|
|
2
|
-
import { contrib, Priority, singleton } from '@difizen/
|
|
1
|
+
import type { Contribution } from '@difizen/libro-common/app';
|
|
2
|
+
import { contrib, Priority, singleton } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
ContentContribution,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Contribution } from '@difizen/
|
|
2
|
-
import { contrib, Priority, singleton } from '@difizen/
|
|
1
|
+
import type { Contribution } from '@difizen/libro-common/app';
|
|
2
|
+
import { contrib, Priority, singleton } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import { CellModelContribution } from '../cell/index.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
import { concatMultilineString } from '@difizen/libro-common';
|
|
3
|
-
import { singleton } from '@difizen/
|
|
3
|
+
import { singleton } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
import type { DefaultEncodedFormatter } from './libro-formatter-protocol.js';
|
|
6
6
|
import {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
import { singleton } from '@difizen/
|
|
2
|
+
import { singleton } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import type { DefaultDecodedFormatter } from './libro-formatter-protocol.js';
|
|
5
5
|
import { FormatterTransContribution } from './libro-formatter-protocol.js';
|
package/src/index.tsx
CHANGED
package/src/libro-context-key.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Disposable } from '@difizen/
|
|
2
|
-
import type { IContextKey } from '@difizen/
|
|
3
|
-
import { ContextKeyService } from '@difizen/
|
|
4
|
-
import { inject, singleton } from '@difizen/
|
|
1
|
+
import type { Disposable } from '@difizen/libro-common/app';
|
|
2
|
+
import type { IContextKey } from '@difizen/libro-common/app';
|
|
3
|
+
import { ContextKeyService } from '@difizen/libro-common/app';
|
|
4
|
+
import { inject, singleton } from '@difizen/libro-common/app';
|
|
5
5
|
|
|
6
6
|
import { LibroContextKeys } from './libro-protocol.js';
|
|
7
7
|
import { LibroService } from './libro-service.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KeybindingRegistry, KeyCode } from '@difizen/
|
|
2
|
-
import { singleton } from '@difizen/
|
|
1
|
+
import { KeybindingRegistry, KeyCode } from '@difizen/libro-common/app';
|
|
2
|
+
import { singleton } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
@singleton({ token: KeybindingRegistry })
|
|
5
5
|
export class LibroKeybindRegistry extends KeybindingRegistry {
|
package/src/libro-model.ts
CHANGED
|
@@ -10,10 +10,10 @@ import type {
|
|
|
10
10
|
NotebookChange,
|
|
11
11
|
} from '@difizen/libro-shared-model';
|
|
12
12
|
import { createMutex, YNotebook } from '@difizen/libro-shared-model';
|
|
13
|
-
import { getOrigin, ConfigurationService } from '@difizen/
|
|
14
|
-
import { Emitter } from '@difizen/
|
|
15
|
-
import { prop } from '@difizen/
|
|
16
|
-
import { inject, transient } from '@difizen/
|
|
13
|
+
import { getOrigin, ConfigurationService } from '@difizen/libro-common/app';
|
|
14
|
+
import { Emitter } from '@difizen/libro-common/app';
|
|
15
|
+
import { prop } from '@difizen/libro-common/app';
|
|
16
|
+
import { inject, transient } from '@difizen/libro-common/app';
|
|
17
17
|
import { v4 } from 'uuid';
|
|
18
18
|
|
|
19
19
|
import { LibroContentService } from './content/index.js';
|
package/src/libro-protocol.ts
CHANGED
|
@@ -8,8 +8,8 @@ import type {
|
|
|
8
8
|
INotebookMetadata,
|
|
9
9
|
} from '@difizen/libro-common';
|
|
10
10
|
import type { ISharedNotebook } from '@difizen/libro-shared-model';
|
|
11
|
-
import type { Disposable, Event } from '@difizen/
|
|
12
|
-
import type { View } from '@difizen/
|
|
11
|
+
import type { Disposable, Event } from '@difizen/libro-common/app';
|
|
12
|
+
import type { View } from '@difizen/libro-common/app';
|
|
13
13
|
|
|
14
14
|
import type { LibroCell } from './cell/index.js';
|
|
15
15
|
import type { LibroView } from './libro-view.js';
|
package/src/libro-service.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Disposable } from '@difizen/
|
|
2
|
-
import { DisposableCollection, Emitter } from '@difizen/
|
|
3
|
-
import { ThemeService, ViewManager } from '@difizen/
|
|
4
|
-
import { inject, singleton, ConfigurationService } from '@difizen/
|
|
5
|
-
import { prop } from '@difizen/
|
|
1
|
+
import type { Disposable } from '@difizen/libro-common/app';
|
|
2
|
+
import { DisposableCollection, Emitter } from '@difizen/libro-common/app';
|
|
3
|
+
import { ThemeService, ViewManager } from '@difizen/libro-common/app';
|
|
4
|
+
import { inject, singleton, ConfigurationService } from '@difizen/libro-common/app';
|
|
5
|
+
import { prop } from '@difizen/libro-common/app';
|
|
6
6
|
|
|
7
7
|
import type {
|
|
8
8
|
CellView,
|
|
@@ -144,6 +144,12 @@ export class LibroService implements NotebookService, Disposable {
|
|
|
144
144
|
return model;
|
|
145
145
|
}
|
|
146
146
|
async getOrCreateView(options: NotebookOption): Promise<NotebookView> {
|
|
147
|
+
if (options.id) {
|
|
148
|
+
const exist = this.libroViewTracker.viewCache.get(options.id);
|
|
149
|
+
if (exist) {
|
|
150
|
+
return exist;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
147
153
|
const notebookViewPromise = this.viewManager.getOrCreateView<NotebookView>(
|
|
148
154
|
notebookViewFactoryId,
|
|
149
155
|
{
|
package/src/libro-setting.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ConfigurationNode } from '@difizen/
|
|
2
|
-
import { l10n } from '@difizen/
|
|
1
|
+
import type { ConfigurationNode } from '@difizen/libro-common/app';
|
|
2
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
3
3
|
|
|
4
4
|
export const HeaderToolbarVisible: ConfigurationNode<boolean> = {
|
|
5
5
|
id: 'libro.header.toolbar',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { singleton, Emitter } from '@difizen/
|
|
1
|
+
import { singleton, Emitter } from '@difizen/libro-common/app';
|
|
2
2
|
import { v4 } from 'uuid';
|
|
3
3
|
|
|
4
4
|
import type {
|
|
@@ -53,6 +53,7 @@ export class FpsTracker implements ITracker {
|
|
|
53
53
|
avgFPS: number;
|
|
54
54
|
maxFrameTime: number;
|
|
55
55
|
totalDropped: number;
|
|
56
|
+
cellsCount: number;
|
|
56
57
|
|
|
57
58
|
constructor(id?: string, extra?: any) {
|
|
58
59
|
this.id = id || v4();
|
|
@@ -66,6 +67,7 @@ export class FpsTracker implements ITracker {
|
|
|
66
67
|
maxFrameTime: this.maxFrameTime,
|
|
67
68
|
totalDropped: this.totalDropped,
|
|
68
69
|
extra: this.extra,
|
|
70
|
+
cellsCount: this.cellsCount,
|
|
69
71
|
};
|
|
70
72
|
return result;
|
|
71
73
|
}
|
package/src/libro-view.tsx
CHANGED
|
@@ -25,8 +25,9 @@ import {
|
|
|
25
25
|
watch,
|
|
26
26
|
ConfigurationService,
|
|
27
27
|
useConfigurationValue,
|
|
28
|
-
} from '@difizen/
|
|
29
|
-
import {
|
|
28
|
+
} from '@difizen/libro-common/app';
|
|
29
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
30
|
+
import { FloatButton, Button, Spin, message } from 'antd';
|
|
30
31
|
import type { FC, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
31
32
|
import { forwardRef, memo, useCallback, useEffect, useRef } from 'react';
|
|
32
33
|
import { v4 } from 'uuid';
|
|
@@ -479,11 +480,25 @@ export class LibroView extends BaseView implements NotebookView {
|
|
|
479
480
|
override onViewMount = () => {
|
|
480
481
|
this.libroService.active = this;
|
|
481
482
|
this.libroSlotManager.setup(this);
|
|
483
|
+
|
|
482
484
|
if (this.libroViewTracker.isEnabledSpmReporter) {
|
|
483
485
|
this.libroViewTracker.getOrCreateTrackers({
|
|
484
486
|
id: this.options.modelId || this.options.id,
|
|
485
487
|
});
|
|
486
488
|
}
|
|
489
|
+
if (
|
|
490
|
+
this.model.cells.length > 30 ||
|
|
491
|
+
(this.options['fileSize'] || 0) / (1024 * 1024) >= 5
|
|
492
|
+
) {
|
|
493
|
+
message.warning(
|
|
494
|
+
<div>
|
|
495
|
+
{l10n.t(
|
|
496
|
+
'即将打开的文件(内容过大 / cell 过多),可能会导致操作卡顿,请耐心等待~',
|
|
497
|
+
)}
|
|
498
|
+
<Button type="link">{l10n.t('我知道了')}</Button>
|
|
499
|
+
</div>,
|
|
500
|
+
);
|
|
501
|
+
}
|
|
487
502
|
// this.libroService.libroPerformanceStatistics.setRenderEnd(new Date());
|
|
488
503
|
|
|
489
504
|
// console.log(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Deferred, URI } from '@difizen/
|
|
2
|
-
import { singleton } from '@difizen/
|
|
1
|
+
import { Deferred, URI } from '@difizen/libro-common/app';
|
|
2
|
+
import { singleton } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import type { NotebookView } from './libro-protocol.js';
|
|
5
5
|
|
package/src/module.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CodeEditorModule } from '@difizen/libro-code-editor';
|
|
2
|
-
import { ConfigurationModule, ManaAppPreset } from '@difizen/
|
|
3
|
-
import { ManaModule } from '@difizen/
|
|
2
|
+
import { ConfigurationModule, ManaAppPreset } from '@difizen/libro-common/app';
|
|
3
|
+
import { ManaModule } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
import { LibroCellModule } from './cell/libro-cell-module.js';
|
|
6
6
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IOutput } from '@difizen/libro-common';
|
|
2
2
|
import { isError, isStream } from '@difizen/libro-common';
|
|
3
|
-
import type { ViewComponent, Contribution } from '@difizen/
|
|
3
|
+
import type { ViewComponent, Contribution } from '@difizen/libro-common/app';
|
|
4
4
|
import {
|
|
5
5
|
ViewOption,
|
|
6
6
|
getOrigin,
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
useInject,
|
|
11
11
|
view,
|
|
12
12
|
ViewInstance,
|
|
13
|
-
} from '@difizen/
|
|
14
|
-
import { Emitter, prop, contrib, inject, transient } from '@difizen/
|
|
13
|
+
} from '@difizen/libro-common/app';
|
|
14
|
+
import { Emitter, prop, contrib, inject, transient } from '@difizen/libro-common/app';
|
|
15
15
|
import { useEffect, forwardRef } from 'react';
|
|
16
16
|
import { v4 } from 'uuid';
|
|
17
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IOutput, JSONObject, PartialJSONObject } from '@difizen/libro-common';
|
|
2
|
-
import { BaseView, prop, view, ViewOption } from '@difizen/
|
|
3
|
-
import { inject, transient } from '@difizen/
|
|
2
|
+
import { BaseView, prop, view, ViewOption } from '@difizen/libro-common/app';
|
|
3
|
+
import { inject, transient } from '@difizen/libro-common/app';
|
|
4
4
|
import type { FC } from 'react';
|
|
5
5
|
import { v4 } from 'uuid';
|
|
6
6
|
|
|
@@ -3,9 +3,9 @@ import type {
|
|
|
3
3
|
ReadonlyPartialJSONObject,
|
|
4
4
|
JSONObject,
|
|
5
5
|
} from '@difizen/libro-common';
|
|
6
|
-
import type { Event } from '@difizen/
|
|
7
|
-
import type { View } from '@difizen/
|
|
8
|
-
import { Syringe } from '@difizen/
|
|
6
|
+
import type { Event } from '@difizen/libro-common/app';
|
|
7
|
+
import type { View } from '@difizen/libro-common/app';
|
|
8
|
+
import { Syringe } from '@difizen/libro-common/app';
|
|
9
9
|
|
|
10
10
|
import type { CellView } from '../libro-protocol.js';
|
|
11
11
|
|
package/src/settings/module.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConfigurationNode } from '@difizen/
|
|
1
|
+
import type { ConfigurationNode } from '@difizen/libro-common/app';
|
|
2
2
|
import {
|
|
3
3
|
BaseView,
|
|
4
4
|
prop,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ConfigurationRenderRegistry,
|
|
10
10
|
useConfigurationValue,
|
|
11
11
|
SchemaValidator,
|
|
12
|
-
} from '@difizen/
|
|
12
|
+
} from '@difizen/libro-common/app';
|
|
13
13
|
import { Form } from 'antd';
|
|
14
14
|
import React from 'react';
|
|
15
15
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ConfigurationRender } from '@difizen/
|
|
2
|
-
import { singleton, ConfigurationRenderContribution } from '@difizen/
|
|
1
|
+
import type { ConfigurationRender } from '@difizen/libro-common/app';
|
|
2
|
+
import { singleton, ConfigurationRenderContribution } from '@difizen/libro-common/app';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
DefaultCheckbox,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RenderProps } from '@difizen/
|
|
2
|
-
import { l10n } from '@difizen/
|
|
1
|
+
import type { RenderProps } from '@difizen/libro-common/app';
|
|
2
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
3
3
|
import { Checkbox, DatePicker, Input, InputNumber, Select, Switch } from 'antd';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ManaModule, ConfigurationModule } from '@difizen/
|
|
1
|
+
import { ManaModule, ConfigurationModule } from '@difizen/libro-common/app';
|
|
2
2
|
|
|
3
3
|
import { ConfigurationPanelView } from './configuration-panel-view.js';
|
|
4
4
|
import { DefaultConfigurationRenderContribution } from './configuration-render-contribution.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SplitPanel } from '@difizen/libro-common/react';
|
|
1
2
|
import {
|
|
2
3
|
BaseView,
|
|
3
4
|
view,
|
|
@@ -10,8 +11,7 @@ import {
|
|
|
10
11
|
prop,
|
|
11
12
|
URI,
|
|
12
13
|
ConfigurationRegistry,
|
|
13
|
-
} from '@difizen/
|
|
14
|
-
import { SplitPanel } from '@difizen/mana-react';
|
|
14
|
+
} from '@difizen/libro-common/app';
|
|
15
15
|
import { useEffect, useState } from 'react';
|
|
16
16
|
|
|
17
17
|
import { ConfigurationPanelView } from './configuration-panel-view.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { inject, ConfigurationRegistry, URI } from '@difizen/
|
|
2
|
-
import { FileService, singleton } from '@difizen/
|
|
3
|
-
import type { FileStatWithMetadata } from '@difizen/
|
|
1
|
+
import { inject, ConfigurationRegistry, URI } from '@difizen/libro-common/app';
|
|
2
|
+
import { FileService, singleton } from '@difizen/libro-common/app';
|
|
3
|
+
import type { FileStatWithMetadata } from '@difizen/libro-common/app';
|
|
4
4
|
|
|
5
5
|
const defaultFileMeta = {
|
|
6
6
|
mtime: 0,
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
TreeViewComponent,
|
|
14
14
|
TreeViewDecorator,
|
|
15
15
|
view,
|
|
16
|
-
} from '@difizen/
|
|
17
|
-
import type { TreeNode } from '@difizen/
|
|
18
|
-
import { l10n } from '@difizen/
|
|
16
|
+
} from '@difizen/libro-common/app';
|
|
17
|
+
import type { TreeNode } from '@difizen/libro-common/app';
|
|
18
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
19
19
|
import React, { forwardRef } from 'react';
|
|
20
20
|
import './index.less';
|
|
21
21
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
ModalContribution,
|
|
3
|
+
singleton,
|
|
4
|
+
ToolbarContribution,
|
|
5
|
+
} from '@difizen/libro-common/app';
|
|
6
|
+
import type { ToolbarRegistry } from '@difizen/libro-common/app';
|
|
7
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
4
8
|
|
|
5
9
|
import { DocumentCommands } from '../command/document-commands.js';
|
|
6
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ModalItem, ModalItemProps } from '@difizen/
|
|
2
|
-
import { ConfigurationRegistry } from '@difizen/
|
|
3
|
-
import { useInject, ViewManager, ViewRender } from '@difizen/
|
|
4
|
-
import { l10n } from '@difizen/
|
|
1
|
+
import type { ModalItem, ModalItemProps } from '@difizen/libro-common/app';
|
|
2
|
+
import { ConfigurationRegistry } from '@difizen/libro-common/app';
|
|
3
|
+
import { useInject, ViewManager, ViewRender } from '@difizen/libro-common/app';
|
|
4
|
+
import { l10n } from '@difizen/libro-common/l10n';
|
|
5
5
|
import { Modal } from 'antd';
|
|
6
6
|
import { useEffect, useState } from 'react';
|
|
7
7
|
|