@manuscripts/body-editor 2.0.38 → 2.0.39
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.
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildPluginState = exports.sectionCategoryKey = void 0;
|
|
4
|
+
const style_guide_1 = require("@manuscripts/style-guide");
|
|
4
5
|
const transform_1 = require("@manuscripts/transform");
|
|
5
6
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
6
7
|
const prosemirror_view_1 = require("prosemirror-view");
|
|
7
|
-
const
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const server_1 = require("react-dom/server");
|
|
8
10
|
const popper_1 = require("../../lib/popper");
|
|
9
11
|
const section_categories_1 = require("../../lib/section-categories");
|
|
10
12
|
const utils_1 = require("../../lib/utils");
|
|
@@ -43,7 +45,7 @@ function createButton(view, props, node, pos, category, canEdit = true) {
|
|
|
43
45
|
const arrow = document.createElement('div');
|
|
44
46
|
arrow.className = 'section-category popper-arrow';
|
|
45
47
|
const button = document.createElement('button');
|
|
46
|
-
button.innerHTML =
|
|
48
|
+
button.innerHTML = (0, server_1.renderToStaticMarkup)((0, react_1.createElement)(style_guide_1.SectionCategoryIcon));
|
|
47
49
|
button.className = `section-category-button ${category && 'assigned'}`;
|
|
48
50
|
if (canEdit) {
|
|
49
51
|
button.addEventListener('mousedown', () => {
|
package/dist/cjs/versions.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { SectionCategoryIcon } from '@manuscripts/style-guide';
|
|
1
2
|
import { isSectionNode, schema } from '@manuscripts/transform';
|
|
2
3
|
import { PluginKey } from 'prosemirror-state';
|
|
3
4
|
import { Decoration, DecorationSet } from 'prosemirror-view';
|
|
4
|
-
import {
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
5
7
|
import { PopperManager } from '../../lib/popper';
|
|
6
8
|
import { getCategoryName, isBackMatterSection, isEditableSectionCategoryID, isUnique, } from '../../lib/section-categories';
|
|
7
9
|
import { isChildOfNodeTypes } from '../../lib/utils';
|
|
@@ -40,7 +42,7 @@ function createButton(view, props, node, pos, category, canEdit = true) {
|
|
|
40
42
|
const arrow = document.createElement('div');
|
|
41
43
|
arrow.className = 'section-category popper-arrow';
|
|
42
44
|
const button = document.createElement('button');
|
|
43
|
-
button.innerHTML =
|
|
45
|
+
button.innerHTML = renderToStaticMarkup(createElement(SectionCategoryIcon));
|
|
44
46
|
button.className = `section-category-button ${category && 'assigned'}`;
|
|
45
47
|
if (canEdit) {
|
|
46
48
|
button.addEventListener('mousedown', () => {
|
package/dist/es/versions.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.0.
|
|
1
|
+
export const VERSION = '2.0.39';
|
|
2
2
|
export const MATHJAX_VERSION = '3.2.2';
|
package/dist/types/versions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.
|
|
1
|
+
export declare const VERSION = "2.0.39";
|
|
2
2
|
export declare const MATHJAX_VERSION = "3.2.2";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manuscripts/body-editor",
|
|
3
3
|
"description": "Prosemirror components for editing and viewing manuscripts",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.39",
|
|
5
5
|
"repository": "github:Atypon-OpenSource/manuscripts-body-editor",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "dist/cjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@iarna/word-count": "^1.1.2",
|
|
33
33
|
"@manuscripts/json-schema": "2.2.11",
|
|
34
34
|
"@manuscripts/library": "1.3.11",
|
|
35
|
-
"@manuscripts/style-guide": "2.0.
|
|
35
|
+
"@manuscripts/style-guide": "2.0.15",
|
|
36
36
|
"@manuscripts/track-changes-plugin": "1.7.17",
|
|
37
37
|
"@manuscripts/transform": "2.3.30",
|
|
38
38
|
"@popperjs/core": "^2.11.8",
|