@difizen/libro-toc 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.
Files changed (41) hide show
  1. package/es/cell-toc-provider.d.ts +1 -1
  2. package/es/cell-toc-provider.d.ts.map +1 -1
  3. package/es/cell-toc-provider.js +2 -2
  4. package/es/libro-toc-color-registry.d.ts +2 -2
  5. package/es/libro-toc-color-registry.d.ts.map +1 -1
  6. package/es/libro-toc-color-registry.js +2 -2
  7. package/es/module.d.ts +1 -1
  8. package/es/module.d.ts.map +1 -1
  9. package/es/module.js +1 -1
  10. package/es/provider/markdown-toc-provider.js +1 -1
  11. package/es/provider/output-toc-provider.js +2 -2
  12. package/es/toc-collapse-service.js +2 -2
  13. package/es/toc-configuration.d.ts +2 -2
  14. package/es/toc-configuration.d.ts.map +1 -1
  15. package/es/toc-configuration.js +3 -3
  16. package/es/toc-contribution.d.ts +1 -1
  17. package/es/toc-contribution.d.ts.map +1 -1
  18. package/es/toc-contribution.js +2 -2
  19. package/es/toc-manager.js +1 -1
  20. package/es/toc-protocol.d.ts +4 -4
  21. package/es/toc-protocol.d.ts.map +1 -1
  22. package/es/toc-protocol.js +2 -2
  23. package/es/toc-provider.d.ts +2 -2
  24. package/es/toc-provider.d.ts.map +1 -1
  25. package/es/toc-provider.js +2 -2
  26. package/es/toc-view.d.ts +2 -2
  27. package/es/toc-view.d.ts.map +1 -1
  28. package/es/toc-view.js +5 -5
  29. package/package.json +5 -7
  30. package/src/cell-toc-provider.ts +3 -3
  31. package/src/libro-toc-color-registry.ts +3 -3
  32. package/src/module.ts +1 -1
  33. package/src/provider/markdown-toc-provider.ts +1 -1
  34. package/src/provider/output-toc-provider.ts +2 -2
  35. package/src/toc-collapse-service.ts +2 -2
  36. package/src/toc-configuration.ts +4 -4
  37. package/src/toc-contribution.ts +2 -2
  38. package/src/toc-manager.ts +1 -1
  39. package/src/toc-protocol.ts +4 -4
  40. package/src/toc-provider.ts +3 -3
  41. package/src/toc-view.tsx +5 -5
@@ -1,5 +1,5 @@
1
1
  import type { CellView } from '@difizen/libro-core';
2
- import type { Contribution } from '@difizen/mana-app';
2
+ import type { Contribution } from '@difizen/libro-common/app';
3
3
  import { CellTOCProviderContribution } from './toc-protocol.js';
4
4
  export declare class LibroCellTOCProvider {
5
5
  protected providerContribution: Contribution.Provider<CellTOCProviderContribution>;
@@ -1 +1 @@
1
- {"version":3,"file":"cell-toc-provider.d.ts","sourceRoot":"","sources":["../src/cell-toc-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,qBACa,oBAAoB;IAE/B,SAAS,CAAC,oBAAoB,EAAE,YAAY,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IAEnF,qBAAqB,CAAC,IAAI,EAAE,QAAQ;IAQpC,SAAS,CAAC,+BAA+B,CACvC,IAAI,EAAE,QAAQ,GACb,2BAA2B,GAAG,SAAS;CAQ3C"}
1
+ {"version":3,"file":"cell-toc-provider.d.ts","sourceRoot":"","sources":["../src/cell-toc-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,qBACa,oBAAoB;IAE/B,SAAS,CAAC,oBAAoB,EAAE,YAAY,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;IAEnF,qBAAqB,CAAC,IAAI,EAAE,QAAQ;IAQpC,SAAS,CAAC,+BAA+B,CACvC,IAAI,EAAE,QAAQ,GACb,2BAA2B,GAAG,SAAS;CAQ3C"}
@@ -8,8 +8,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
8
8
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
9
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
10
10
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
11
- import { Priority } from '@difizen/mana-app';
12
- import { contrib, singleton } from '@difizen/mana-app';
11
+ import { Priority } from '@difizen/libro-common/app';
12
+ import { contrib, singleton } from '@difizen/libro-common/app';
13
13
  import { CellTOCProviderContribution } from "./toc-protocol.js";
14
14
  export var LibroCellTOCProvider = (_dec = singleton(), _dec2 = contrib(CellTOCProviderContribution), _dec(_class = (_class2 = /*#__PURE__*/function () {
15
15
  function LibroCellTOCProvider() {
@@ -1,5 +1,5 @@
1
- import type { ColorRegistry } from '@difizen/mana-app';
2
- import { ColorContribution } from '@difizen/mana-app';
1
+ import type { ColorRegistry } from '@difizen/libro-common/app';
2
+ import { ColorContribution } from '@difizen/libro-common/app';
3
3
  export declare class LibroTocColorRegistry implements ColorContribution {
4
4
  registerColors(colors: ColorRegistry): void;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"libro-toc-color-registry.d.ts","sourceRoot":"","sources":["../src/libro-toc-color-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAS,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,qBACa,qBAAsB,YAAW,iBAAiB;IAC7D,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;CAoB5C"}
1
+ {"version":3,"file":"libro-toc-color-registry.d.ts","sourceRoot":"","sources":["../src/libro-toc-color-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAS,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,qBACa,qBAAsB,YAAW,iBAAiB;IAC7D,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;CAoB5C"}
@@ -5,8 +5,8 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
5
5
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- import { Color, ColorContribution } from '@difizen/mana-app';
9
- import { singleton } from '@difizen/mana-app';
8
+ import { Color, ColorContribution } from '@difizen/libro-common/app';
9
+ import { singleton } from '@difizen/libro-common/app';
10
10
  export var LibroTocColorRegistry = (_dec = singleton({
11
11
  contrib: ColorContribution
12
12
  }), _dec(_class = /*#__PURE__*/function () {
package/es/module.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ManaModule } from '@difizen/mana-app';
1
+ import { ManaModule } from '@difizen/libro-common/app';
2
2
  /**
3
3
  * 不带output支持
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAc/C;;GAEG;AACH,eAAO,MAAM,kBAAkB,YAyBJ,CAAC;AAC5B;;GAEG;AACH,eAAO,MAAM,cAAc,YAE2B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,uBAAuB,YAEnC,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAcvD;;GAEG;AACH,eAAO,MAAM,kBAAkB,YAyBJ,CAAC;AAC5B;;GAEG;AACH,eAAO,MAAM,cAAc,YAE2B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,uBAAuB,YAEnC,CAAC"}
package/es/module.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { MarkdownModule } from '@difizen/libro-markdown';
2
2
  import { LibroRenderMimeModule } from '@difizen/libro-rendermime';
3
- import { ManaModule } from '@difizen/mana-app';
3
+ import { ManaModule } from '@difizen/libro-common/app';
4
4
  import { LibroCellTOCProvider } from "./cell-toc-provider.js";
5
5
  import { LibroTocColorRegistry } from "./libro-toc-color-registry.js";
6
6
  import { MarkDownCellTOCProvider } from "./provider/markdown-toc-provider.js";
@@ -7,7 +7,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
8
  import { LibroMarkdownCellModel } from '@difizen/libro-core';
9
9
  import { MarkdownParser } from '@difizen/libro-markdown';
10
- import { inject, singleton, watch } from '@difizen/mana-app';
10
+ import { inject, singleton, watch } from '@difizen/libro-common/app';
11
11
  import { HeadingType, CellTOCProviderContribution } from "../toc-protocol.js";
12
12
  import { getHTMLHeadings } from "./html.js";
13
13
  export var MarkDownCellTOCProvider = (_dec = singleton({
@@ -11,8 +11,8 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
11
11
  import { concatMultilineString } from '@difizen/libro-common';
12
12
  import { ExecutableCellView } from '@difizen/libro-core';
13
13
  import { RenderMimeRegistry } from '@difizen/libro-rendermime';
14
- import { inject, singleton } from '@difizen/mana-app';
15
- import { watch } from '@difizen/mana-app';
14
+ import { inject, singleton } from '@difizen/libro-common/app';
15
+ import { watch } from '@difizen/libro-common/app';
16
16
  import { CellTOCProviderContribution } from "../toc-protocol.js";
17
17
  import { getHTMLHeadings } from "./html.js";
18
18
  import { isMarkdown, MarkdownMimeType } from "./markdown.js";
@@ -25,8 +25,8 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
25
25
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
26
26
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
27
27
  import { CellCollapsible, DefaultCollapseService, CollapseService } from '@difizen/libro-core';
28
- import { prop } from '@difizen/mana-app';
29
- import { inject, transient } from '@difizen/mana-app';
28
+ import { prop } from '@difizen/libro-common/app';
29
+ import { inject, transient } from '@difizen/libro-common/app';
30
30
  import { LibroTOCManager } from "./toc-manager.js";
31
31
  import { HeadingType } from "./toc-protocol.js";
32
32
  export var TOCCollapseService = (_dec = transient({
@@ -1,5 +1,5 @@
1
- import type { ConfigurationNode } from '@difizen/mana-app';
2
- import { ConfigurationContribution } from '@difizen/mana-app';
1
+ import type { ConfigurationNode } from '@difizen/libro-common/app';
2
+ import { ConfigurationContribution } from '@difizen/libro-common/app';
3
3
  export declare const TOCVisible: ConfigurationNode<boolean>;
4
4
  export declare class TOCSettingContribution implements ConfigurationContribution {
5
5
  registerConfigurations(): ConfigurationNode<boolean>[];
@@ -1 +1 @@
1
- {"version":3,"file":"toc-configuration.d.ts","sourceRoot":"","sources":["../src/toc-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAI9D,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,CASjD,CAAC;AAEF,qBACa,sBAAuB,YAAW,yBAAyB;IACtE,sBAAsB;CAGvB"}
1
+ {"version":3,"file":"toc-configuration.d.ts","sourceRoot":"","sources":["../src/toc-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAItE,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,OAAO,CASjD,CAAC;AAEF,qBACa,sBAAuB,YAAW,yBAAyB;IACtE,sBAAsB;CAGvB"}
@@ -5,9 +5,9 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
5
5
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- import { ConfigurationContribution } from '@difizen/mana-app';
9
- import { singleton } from '@difizen/mana-app';
10
- import { l10n } from '@difizen/mana-l10n';
8
+ import { ConfigurationContribution } from '@difizen/libro-common/app';
9
+ import { singleton } from '@difizen/libro-common/app';
10
+ import { l10n } from '@difizen/libro-common/l10n';
11
11
  export var TOCVisible = {
12
12
  id: 'libro.toc.visible',
13
13
  description: l10n.t('是否显示侧边的TOC'),
@@ -1,6 +1,6 @@
1
1
  import type { LibroExtensionSlotFactory, LibroSlot } from '@difizen/libro-core';
2
2
  import { LibroExtensionSlotContribution } from '@difizen/libro-core';
3
- import { ViewManager } from '@difizen/mana-app';
3
+ import { ViewManager } from '@difizen/libro-common/app';
4
4
  import { TOCView } from './toc-view.js';
5
5
  export declare class LibroTocSlotContribution implements LibroExtensionSlotContribution {
6
6
  viewManager: ViewManager;
@@ -1 +1 @@
1
- {"version":3,"file":"toc-contribution.d.ts","sourceRoot":"","sources":["../src/toc-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,yBAAyB,EACzB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,qBACa,wBAAyB,YAAW,8BAA8B;IACxD,WAAW,EAAE,WAAW,CAAC;IAC9C,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAEpD,SAAgB,IAAI,EAAE,SAAS,CAAW;IAE1C,OAAO,EAAE,yBAAyB,CAUhC;CAKH"}
1
+ {"version":3,"file":"toc-contribution.d.ts","sourceRoot":"","sources":["../src/toc-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,yBAAyB,EACzB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,qBACa,wBAAyB,YAAW,8BAA8B;IACxD,WAAW,EAAE,WAAW,CAAC;IAC9C,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAa;IAEpD,SAAgB,IAAI,EAAE,SAAS,CAAW;IAE1C,OAAO,EAAE,yBAAyB,CAUhC;CAKH"}
@@ -12,8 +12,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
12
12
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
13
13
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
14
14
  import { LibroExtensionSlotContribution } from '@difizen/libro-core';
15
- import { ViewManager } from '@difizen/mana-app';
16
- import { inject, singleton } from '@difizen/mana-app';
15
+ import { ViewManager } from '@difizen/libro-common/app';
16
+ import { inject, singleton } from '@difizen/libro-common/app';
17
17
  import { TOCView } from "./toc-view.js";
18
18
  export var LibroTocSlotContribution = (_dec = singleton({
19
19
  contrib: [LibroExtensionSlotContribution]
package/es/toc-manager.js CHANGED
@@ -5,7 +5,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
5
5
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- import { inject, singleton } from '@difizen/mana-app';
8
+ import { inject, singleton } from '@difizen/libro-common/app';
9
9
  import { LibroTOCProviderFactory } from "./toc-provider.js";
10
10
  export var LibroTOCManager = (_dec = singleton(), _dec(_class = /*#__PURE__*/function () {
11
11
  function LibroTOCManager(libroTOCProviderFactory) {
@@ -1,7 +1,7 @@
1
1
  import type { CellView } from '@difizen/libro-core';
2
- import type { View } from '@difizen/mana-app';
3
- import type { Disposable } from '@difizen/mana-app';
4
- import { Syringe } from '@difizen/mana-app';
2
+ import type { View } from '@difizen/libro-common/app';
3
+ import type { Disposable } from '@difizen/libro-common/app';
4
+ import { Syringe } from '@difizen/libro-common/app';
5
5
  /**
6
6
  * Table of Contents configuration
7
7
  *
@@ -37,7 +37,7 @@ export interface TOCOptions {
37
37
  /**
38
38
  * Default table of content configuration
39
39
  */
40
- export declare const defaultConfig: TOCOptions;
40
+ export declare const defaultTocConfig: TOCOptions;
41
41
  /**
42
42
  * Interface describing a heading.
43
43
  */
@@ -1 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b;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,QAAQ,IAAA;CACT;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,QAAQ,EAAE,CAAC;IAC9B,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,UAAU,CAAC;CAC/C;AAED,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,MAAM,CAAC;IACtC,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,eAAe,CAAC;CAC9C;AAED,eAAO,MAAM,2BAA2B,sBAEvC,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ;AACD,eAAO,MAAM,iBAAiB,eAA8B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Syringe } from '@difizen/mana-app';
1
+ import { Syringe } from '@difizen/libro-common/app';
2
2
 
3
3
  /**
4
4
  * Table of Contents configuration
@@ -10,7 +10,7 @@ import { Syringe } from '@difizen/mana-app';
10
10
  /**
11
11
  * Default table of content configuration
12
12
  */
13
- export var defaultConfig = {
13
+ export var defaultTocConfig = {
14
14
  baseNumbering: 1,
15
15
  maximalDepth: 4,
16
16
  numberingH1: true,
@@ -1,6 +1,6 @@
1
1
  import type { LibroView } from '@difizen/libro-core';
2
- import type { Disposable, Event } from '@difizen/mana-app';
3
- import { Emitter, DisposableCollection } from '@difizen/mana-app';
2
+ import type { Disposable, Event } from '@difizen/libro-common/app';
3
+ import { Emitter, DisposableCollection } from '@difizen/libro-common/app';
4
4
  import { LibroCellTOCProvider } from './cell-toc-provider.js';
5
5
  import type { CellTOCProvider, IHeading } from './toc-protocol.js';
6
6
  import { TOCProviderOption } from './toc-protocol.js';
@@ -1 +1 @@
1
- {"version":3,"file":"toc-provider.d.ts","sourceRoot":"","sources":["../src/toc-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,iBAAiB,KAAK,gBAAgB,CAAC;AACtF,eAAO,MAAM,uBAAuB,eAAoC,CAAC;AAEzE,qBACa,gBAAiB,YAAW,UAAU;IACjD,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAE7C,SAAS,CAAC,WAAW,+BAAsC;IAE3D,QAAQ,EAAE,QAAQ,EAAE,CAAM;IAGlC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC;IAE1B,SAAS,CAAC,SAAS,uBAA8B;IACjD,SAAS,CAAC,gBAAgB,uBAA8B;IAExD,QAAQ,UAAS;IAEjB,SAAS,CAAC,uBAAuB,oBAA2B;IAE5D,IAAI,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,CAEtC;gBAG4B,MAAM,EA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D,SAAS,CAAC,gBAAgB,uBAA8B;IAExD,QAAQ,UAAS;IAEjB,SAAS,CAAC,uBAAuB,oBAA2B;IAE5D,IAAI,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,CAEtC;gBAG4B,MAAM,EAAE,iBAAiB,EACtB,oBAAoB,EAAE,oBAAoB;IAS1E,SAAS,CAAC,eAAe;IAQzB,SAAS,CAAC,mBAAmB;IAQ7B,SAAS,CAAC,sBAAsB,aAK9B;IAEF,SAAS,CAAC,SAAS,aAEjB;IAEF,SAAS,CAAC,mBAAmB,aAE3B;IAEF,SAAS,CAAC,cAAc,aAGtB;IAEF,SAAS,CAAC,gBAAgB,aAExB;IAEF,sBAAsB;;;;IAoBtB,SAAS,CAAC,mBAAmB;IAM7B,SAAS,CAAC,WAAW;IAiBrB,mBAAmB,CAAC,OAAO,EAAE,QAAQ;IAWrC,qBAAqB,CAAC,KAAK,EAAE,MAAM;IAKnC,OAAO;CASR"}
@@ -11,8 +11,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
11
11
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
12
  function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
13
13
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
14
- import { inject, notEmpty, prop, transient, watch } from '@difizen/mana-app';
15
- import { Emitter, DisposableCollection } from '@difizen/mana-app';
14
+ import { inject, notEmpty, prop, transient, watch } from '@difizen/libro-common/app';
15
+ import { Emitter, DisposableCollection } from '@difizen/libro-common/app';
16
16
  import { LibroCellTOCProvider } from "./cell-toc-provider.js";
17
17
  import { TOCProviderOption } from "./toc-protocol.js";
18
18
  export var LibroTOCProviderFactory = Symbol('LibroTOCProviderFactory');
package/es/toc-view.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { DisplayView, LibroView } from '@difizen/libro-core';
2
- import { ConfigurationService } from '@difizen/mana-app';
3
- import { BaseView } from '@difizen/mana-app';
2
+ import { ConfigurationService } from '@difizen/libro-common/app';
3
+ import { BaseView } from '@difizen/libro-common/app';
4
4
  import { LibroTOCManager } from './toc-manager.js';
5
5
  import type { IHeading } from './toc-protocol.js';
6
6
  import type { LibroTOCProvider } from './toc-provider.js';
@@ -1 +1 @@
1
- {"version":3,"file":"toc-view.d.ts","sourceRoot":"","sources":["../src/toc-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAsB,MAAM,mBAAmB,CAAC;AAMjE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,cAAc,CAAC;AAEtB,UAAU,cAAe,SAAQ,QAAQ;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AA6DD,eAAO,MAAM,SAAS,+CA+BrB,CAA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AC1D,OAAO,cAAc,CAAC;AAEtB,UAAU,cAAe,SAAQ,QAAQ;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AA6DD,eAAO,MAAM,SAAS,+CA+BrB,CAAC;AAEF,qBAEa,OAAQ,SAAQ,QAAS,YAAW,WAAW;IAC1D,MAAM,EAAE,SAAS,GAAG,SAAS,CAAa;IAC1C,SAAS,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAE5C,IAAI,gDAAa;IAG1B,SAAS,EAAE,OAAO,CAAC;IAGnB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAG/B,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAC;IAEpC,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAG3C,QAAQ,EAAE,MAAM,CAAgB;IAGhC,oBAAoB,uBAA8B;gBAGvB,eAAe,EAAE,eAAe,EAC3B,oBAAoB,EAAE,oBAAoB;IAgB1E,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIlC,WAAW;IAgBpB,kBAAkB,IAAI,cAAc,EAAE;IAYtC,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IAoB7E,kBAAkB,CAAC,OAAO,EAAE,QAAQ;IAIpC,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;IAU/D,OAAO;CAGjB"}
package/es/toc-view.js CHANGED
@@ -20,11 +20,11 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
20
20
  function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
21
21
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
22
22
  import { ArrowDown, ArrowRight } from '@difizen/libro-core';
23
- import { ConfigurationService } from '@difizen/mana-app';
24
- import { getOrigin, prop, useInject } from '@difizen/mana-app';
25
- import { BaseView, view, ViewInstance } from '@difizen/mana-app';
26
- import { inject, transient } from '@difizen/mana-app';
27
- import { l10n } from '@difizen/mana-l10n';
23
+ import { ConfigurationService } from '@difizen/libro-common/app';
24
+ import { getOrigin, prop, useInject } from '@difizen/libro-common/app';
25
+ import { BaseView, view, ViewInstance } from '@difizen/libro-common/app';
26
+ import { inject, transient } from '@difizen/libro-common/app';
27
+ import { l10n } from '@difizen/libro-common/l10n';
28
28
  import React, { useRef } from 'react';
29
29
  import { TOCVisible } from "./toc-configuration.js";
30
30
  import { LibroTOCManager } from "./toc-manager.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difizen/libro-toc",
3
- "version": "0.3.16",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "libro",
@@ -33,12 +33,10 @@
33
33
  "src"
34
34
  ],
35
35
  "dependencies": {
36
- "@difizen/libro-common": "^0.3.16",
37
- "@difizen/libro-core": "^0.3.16",
38
- "@difizen/libro-markdown": "^0.3.16",
39
- "@difizen/libro-rendermime": "^0.3.16",
40
- "@difizen/mana-app": "latest",
41
- "@difizen/mana-l10n": "latest"
36
+ "@difizen/libro-common": "^1.0.1",
37
+ "@difizen/libro-core": "^1.0.1",
38
+ "@difizen/libro-markdown": "^1.0.1",
39
+ "@difizen/libro-rendermime": "^1.0.1"
42
40
  },
43
41
  "peerDependencies": {
44
42
  "react": ">=16"
@@ -1,7 +1,7 @@
1
1
  import type { CellView } from '@difizen/libro-core';
2
- import type { Contribution } from '@difizen/mana-app';
3
- import { Priority } from '@difizen/mana-app';
4
- import { contrib, singleton } from '@difizen/mana-app';
2
+ import type { Contribution } from '@difizen/libro-common/app';
3
+ import { Priority } from '@difizen/libro-common/app';
4
+ import { contrib, singleton } from '@difizen/libro-common/app';
5
5
 
6
6
  import { CellTOCProviderContribution } from './toc-protocol.js';
7
7
 
@@ -1,6 +1,6 @@
1
- import type { ColorRegistry } from '@difizen/mana-app';
2
- import { Color, ColorContribution } from '@difizen/mana-app';
3
- import { singleton } from '@difizen/mana-app';
1
+ import type { ColorRegistry } from '@difizen/libro-common/app';
2
+ import { Color, ColorContribution } from '@difizen/libro-common/app';
3
+ import { singleton } from '@difizen/libro-common/app';
4
4
 
5
5
  @singleton({ contrib: ColorContribution })
6
6
  export class LibroTocColorRegistry implements ColorContribution {
package/src/module.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { MarkdownModule } from '@difizen/libro-markdown';
2
2
  import { LibroRenderMimeModule } from '@difizen/libro-rendermime';
3
- import { ManaModule } from '@difizen/mana-app';
3
+ import { ManaModule } from '@difizen/libro-common/app';
4
4
 
5
5
  import { LibroCellTOCProvider } from './cell-toc-provider.js';
6
6
  import { LibroTocColorRegistry } from './libro-toc-color-registry.js';
@@ -1,7 +1,7 @@
1
1
  import { LibroMarkdownCellModel } from '@difizen/libro-core';
2
2
  import type { CellView } from '@difizen/libro-core';
3
3
  import { MarkdownParser } from '@difizen/libro-markdown';
4
- import { inject, singleton, watch } from '@difizen/mana-app';
4
+ import { inject, singleton, watch } from '@difizen/libro-common/app';
5
5
 
6
6
  import type { CellTOCProvider } from '../toc-protocol.js';
7
7
  import { HeadingType, CellTOCProviderContribution } from '../toc-protocol.js';
@@ -3,8 +3,8 @@ import { concatMultilineString } from '@difizen/libro-common';
3
3
  import type { CellView } from '@difizen/libro-core';
4
4
  import { ExecutableCellView } from '@difizen/libro-core';
5
5
  import { RenderMimeRegistry } from '@difizen/libro-rendermime';
6
- import { inject, singleton } from '@difizen/mana-app';
7
- import { watch } from '@difizen/mana-app';
6
+ import { inject, singleton } from '@difizen/libro-common/app';
7
+ import { watch } from '@difizen/libro-common/app';
8
8
 
9
9
  import type { CellTOCProvider } from '../toc-protocol.js';
10
10
  import { CellTOCProviderContribution } from '../toc-protocol.js';
@@ -4,8 +4,8 @@ import {
4
4
  DefaultCollapseService,
5
5
  CollapseService,
6
6
  } from '@difizen/libro-core';
7
- import { prop } from '@difizen/mana-app';
8
- import { inject, transient } from '@difizen/mana-app';
7
+ import { prop } from '@difizen/libro-common/app';
8
+ import { inject, transient } from '@difizen/libro-common/app';
9
9
 
10
10
  import { LibroTOCManager } from './toc-manager.js';
11
11
  import { HeadingType } from './toc-protocol.js';
@@ -1,7 +1,7 @@
1
- import type { ConfigurationNode } from '@difizen/mana-app';
2
- import { ConfigurationContribution } from '@difizen/mana-app';
3
- import { singleton } from '@difizen/mana-app';
4
- import { l10n } from '@difizen/mana-l10n';
1
+ import type { ConfigurationNode } from '@difizen/libro-common/app';
2
+ import { ConfigurationContribution } from '@difizen/libro-common/app';
3
+ import { singleton } from '@difizen/libro-common/app';
4
+ import { l10n } from '@difizen/libro-common/l10n';
5
5
 
6
6
  export const TOCVisible: ConfigurationNode<boolean> = {
7
7
  id: 'libro.toc.visible',
@@ -4,8 +4,8 @@ import type {
4
4
  LibroSlot,
5
5
  } from '@difizen/libro-core';
6
6
  import { LibroExtensionSlotContribution } from '@difizen/libro-core';
7
- import { ViewManager } from '@difizen/mana-app';
8
- import { inject, singleton } from '@difizen/mana-app';
7
+ import { ViewManager } from '@difizen/libro-common/app';
8
+ import { inject, singleton } from '@difizen/libro-common/app';
9
9
 
10
10
  import { TOCView } from './toc-view.js';
11
11
 
@@ -1,5 +1,5 @@
1
1
  import type { LibroView } from '@difizen/libro-core';
2
- import { inject, singleton } from '@difizen/mana-app';
2
+ import { inject, singleton } from '@difizen/libro-common/app';
3
3
 
4
4
  import type { LibroTOCProvider } from './toc-provider.js';
5
5
  import { LibroTOCProviderFactory } from './toc-provider.js';
@@ -1,7 +1,7 @@
1
1
  import type { CellView } from '@difizen/libro-core';
2
- import type { View } from '@difizen/mana-app';
3
- import type { Disposable } from '@difizen/mana-app';
4
- import { Syringe } from '@difizen/mana-app';
2
+ import type { View } from '@difizen/libro-common/app';
3
+ import type { Disposable } from '@difizen/libro-common/app';
4
+ import { Syringe } from '@difizen/libro-common/app';
5
5
 
6
6
  /**
7
7
  * Table of Contents configuration
@@ -39,7 +39,7 @@ export interface TOCOptions {
39
39
  /**
40
40
  * Default table of content configuration
41
41
  */
42
- export const defaultConfig: TOCOptions = {
42
+ export const defaultTocConfig: TOCOptions = {
43
43
  baseNumbering: 1,
44
44
  maximalDepth: 4,
45
45
  numberingH1: true,
@@ -1,7 +1,7 @@
1
1
  import type { LibroView } from '@difizen/libro-core';
2
- import type { Disposable, Event } from '@difizen/mana-app';
3
- import { inject, notEmpty, prop, transient, watch } from '@difizen/mana-app';
4
- import { Emitter, DisposableCollection } from '@difizen/mana-app';
2
+ import type { Disposable, Event } from '@difizen/libro-common/app';
3
+ import { inject, notEmpty, prop, transient, watch } from '@difizen/libro-common/app';
4
+ import { Emitter, DisposableCollection } from '@difizen/libro-common/app';
5
5
 
6
6
  import { LibroCellTOCProvider } from './cell-toc-provider.js';
7
7
  import type { CellTOCProvider, IHeading } from './toc-protocol.js';
package/src/toc-view.tsx CHANGED
@@ -1,11 +1,11 @@
1
1
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
2
  import { ArrowDown, ArrowRight } from '@difizen/libro-core';
3
3
  import type { DisplayView, LibroView } from '@difizen/libro-core';
4
- import { ConfigurationService } from '@difizen/mana-app';
5
- import { getOrigin, prop, useInject } from '@difizen/mana-app';
6
- import { BaseView, view, ViewInstance } from '@difizen/mana-app';
7
- import { inject, transient } from '@difizen/mana-app';
8
- import { l10n } from '@difizen/mana-l10n';
4
+ import { ConfigurationService } from '@difizen/libro-common/app';
5
+ import { getOrigin, prop, useInject } from '@difizen/libro-common/app';
6
+ import { BaseView, view, ViewInstance } from '@difizen/libro-common/app';
7
+ import { inject, transient } from '@difizen/libro-common/app';
8
+ import { l10n } from '@difizen/libro-common/l10n';
9
9
  import React, { useRef } from 'react';
10
10
 
11
11
  import { TOCVisible } from './toc-configuration.js';