Socket
Socket
Sign inDemoInstall

roosterjs-content-model-api

Package Overview
Dependencies
6
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.20.0 to 0.21.0

4

lib-amd/modelApi/common/retrieveModelFormatState.js

@@ -1,2 +0,2 @@

define(["require", "exports", "../../publicApi/segment/toggleBold", "roosterjs-content-model-core"], function (require, exports, toggleBold_1, roosterjs_content_model_core_1) {
define(["require", "exports", "roosterjs-content-model-core"], function (require, exports, roosterjs_content_model_core_1) {
"use strict";

@@ -90,3 +90,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var superOrSubscript = (_b = (_a = mergedFormat.superOrSubScriptSequence) === null || _a === void 0 ? void 0 : _a.split(' ')) === null || _b === void 0 ? void 0 : _b.pop();
mergeValue(result, 'isBold', (0, toggleBold_1.isBold)(mergedFormat.fontWeight), isFirst);
mergeValue(result, 'isBold', (0, roosterjs_content_model_core_1.isBold)(mergedFormat.fontWeight), isFirst);
mergeValue(result, 'isItalic', mergedFormat.italic, isFirst);

@@ -93,0 +93,0 @@ mergeValue(result, 'isUnderline', mergedFormat.underline, isFirst);

@@ -7,5 +7,1 @@ import type { IStandaloneEditor } from 'roosterjs-content-model-types';

export default function toggleBold(editor: IStandaloneEditor): void;
/**
* @internal
*/
export declare function isBold(boldStyle?: string): boolean;

@@ -1,5 +0,4 @@

define(["require", "exports", "../utils/formatSegmentWithContentModel"], function (require, exports, formatSegmentWithContentModel_1) {
define(["require", "exports", "../utils/formatSegmentWithContentModel", "roosterjs-content-model-core"], function (require, exports, formatSegmentWithContentModel_1, roosterjs_content_model_core_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBold = void 0;
/**

@@ -15,3 +14,3 @@ * Toggle bold style

var _a;
return isBold(typeof format.fontWeight == 'undefined'
return (0, roosterjs_content_model_core_1.isBold)(typeof format.fontWeight == 'undefined'
? (_a = paragraph === null || paragraph === void 0 ? void 0 : paragraph.decorator) === null || _a === void 0 ? void 0 : _a.format.fontWeight

@@ -22,10 +21,3 @@ : format.fontWeight);

exports.default = toggleBold;
/**
* @internal
*/
function isBold(boldStyle) {
return (!!boldStyle && (boldStyle == 'bold' || boldStyle == 'bolder' || parseInt(boldStyle) >= 600));
}
exports.isBold = isBold;
});
//# sourceMappingURL=toggleBold.js.map

@@ -1,3 +0,2 @@

import { isBold } from '../../publicApi/segment/toggleBold';
import { extractBorderValues, getClosestAncestorBlockGroupIndex, iterateSelections, updateTableMetadata, } from 'roosterjs-content-model-core';
import { extractBorderValues, getClosestAncestorBlockGroupIndex, isBold, iterateSelections, updateTableMetadata, } from 'roosterjs-content-model-core';
/**

@@ -4,0 +3,0 @@ * @internal

@@ -7,5 +7,1 @@ import type { IStandaloneEditor } from 'roosterjs-content-model-types';

export default function toggleBold(editor: IStandaloneEditor): void;
/**
* @internal
*/
export declare function isBold(boldStyle?: string): boolean;
import { formatSegmentWithContentModel } from '../utils/formatSegmentWithContentModel';
import { isBold } from 'roosterjs-content-model-core';
/**

@@ -17,8 +18,2 @@ * Toggle bold style

}
/**
* @internal
*/
export function isBold(boldStyle) {
return (!!boldStyle && (boldStyle == 'bold' || boldStyle == 'bolder' || parseInt(boldStyle) >= 600));
}
//# sourceMappingURL=toggleBold.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.retrieveModelFormatState = void 0;
var toggleBold_1 = require("../../publicApi/segment/toggleBold");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");

@@ -91,3 +90,3 @@ /**

var superOrSubscript = (_b = (_a = mergedFormat.superOrSubScriptSequence) === null || _a === void 0 ? void 0 : _a.split(' ')) === null || _b === void 0 ? void 0 : _b.pop();
mergeValue(result, 'isBold', (0, toggleBold_1.isBold)(mergedFormat.fontWeight), isFirst);
mergeValue(result, 'isBold', (0, roosterjs_content_model_core_1.isBold)(mergedFormat.fontWeight), isFirst);
mergeValue(result, 'isItalic', mergedFormat.italic, isFirst);

@@ -94,0 +93,0 @@ mergeValue(result, 'isUnderline', mergedFormat.underline, isFirst);

@@ -7,5 +7,1 @@ import type { IStandaloneEditor } from 'roosterjs-content-model-types';

export default function toggleBold(editor: IStandaloneEditor): void;
/**
* @internal
*/
export declare function isBold(boldStyle?: string): boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isBold = void 0;
var formatSegmentWithContentModel_1 = require("../utils/formatSegmentWithContentModel");
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
/**

@@ -15,3 +15,3 @@ * Toggle bold style

var _a;
return isBold(typeof format.fontWeight == 'undefined'
return (0, roosterjs_content_model_core_1.isBold)(typeof format.fontWeight == 'undefined'
? (_a = paragraph === null || paragraph === void 0 ? void 0 : paragraph.decorator) === null || _a === void 0 ? void 0 : _a.format.fontWeight

@@ -22,9 +22,2 @@ : format.fontWeight);

exports.default = toggleBold;
/**
* @internal
*/
function isBold(boldStyle) {
return (!!boldStyle && (boldStyle == 'bold' || boldStyle == 'bolder' || parseInt(boldStyle) >= 600));
}
exports.isBold = isBold;
//# sourceMappingURL=toggleBold.js.map

@@ -8,7 +8,7 @@ {

"roosterjs-editor-dom": "^8.59.0",
"roosterjs-content-model-core": "^0.20.0",
"roosterjs-content-model-dom": "^0.20.0",
"roosterjs-content-model-types": "^0.20.0"
"roosterjs-content-model-core": "^0.21.0",
"roosterjs-content-model-dom": "^0.21.0",
"roosterjs-content-model-types": "^0.21.0"
},
"version": "0.20.0",
"version": "0.21.0",
"main": "./lib/index.js",

@@ -15,0 +15,0 @@ "typings": "./lib/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc