Socket
Socket
Sign inDemoInstall

roosterjs-content-model-dom

Package Overview
Dependencies
2
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.18.0 to 0.19.0

2

lib-amd/domToModel/processors/delimiterProcessor.d.ts

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

* @param group
* @param element
* @param node
* @param context
*/
export declare const delimiterProcessor: ElementProcessor<Node>;

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

define(["require", "exports", "tslib", "../utils/getRegularSelectionOffsets", "./childProcessor"], function (require, exports, tslib_1, getRegularSelectionOffsets_1, childProcessor_1) {
define(["require", "exports", "../utils/addSelectionMarker"], function (require, exports, addSelectionMarker_1) {
"use strict";

@@ -8,14 +8,20 @@ Object.defineProperty(exports, "__esModule", { value: true });

* @param group
* @param element
* @param node
* @param context
*/
var delimiterProcessor = function (group, element, context) {
var index = 0;
var _a = (0, tslib_1.__read)((0, getRegularSelectionOffsets_1.getRegularSelectionOffsets)(context, element), 2), nodeStartOffset = _a[0], nodeEndOffset = _a[1];
for (var child = element.firstChild; child; child = child.nextSibling) {
(0, childProcessor_1.handleRegularSelection)(index, context, group, nodeStartOffset, nodeEndOffset);
(0, exports.delimiterProcessor)(group, child, context);
index++;
var delimiterProcessor = function (group, node, context) {
var _a, _b;
var range = ((_a = context.selection) === null || _a === void 0 ? void 0 : _a.type) == 'range' ? context.selection.range : null;
if (range) {
if (node.contains(range.startContainer)) {
context.isInSelection = true;
(0, addSelectionMarker_1.addSelectionMarker)(group, context);
}
if (((_b = context.selection) === null || _b === void 0 ? void 0 : _b.type) == 'range' && node.contains(range.endContainer)) {
if (!context.selection.range.collapsed) {
(0, addSelectionMarker_1.addSelectionMarker)(group, context);
}
context.isInSelection = false;
}
}
(0, childProcessor_1.handleRegularSelection)(index, context, group, nodeStartOffset, nodeEndOffset);
};

@@ -22,0 +28,0 @@ exports.delimiterProcessor = delimiterProcessor;

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

* @param group
* @param element
* @param node
* @param context
*/
export declare const delimiterProcessor: ElementProcessor<Node>;

@@ -1,20 +0,24 @@

import { __read } from "tslib";
import { getRegularSelectionOffsets } from '../utils/getRegularSelectionOffsets';
import { handleRegularSelection } from './childProcessor';
import { addSelectionMarker } from '../utils/addSelectionMarker';
/**
* @internal
* @param group
* @param element
* @param node
* @param context
*/
export var delimiterProcessor = function (group, element, context) {
var index = 0;
var _a = __read(getRegularSelectionOffsets(context, element), 2), nodeStartOffset = _a[0], nodeEndOffset = _a[1];
for (var child = element.firstChild; child; child = child.nextSibling) {
handleRegularSelection(index, context, group, nodeStartOffset, nodeEndOffset);
delimiterProcessor(group, child, context);
index++;
export var delimiterProcessor = function (group, node, context) {
var _a, _b;
var range = ((_a = context.selection) === null || _a === void 0 ? void 0 : _a.type) == 'range' ? context.selection.range : null;
if (range) {
if (node.contains(range.startContainer)) {
context.isInSelection = true;
addSelectionMarker(group, context);
}
if (((_b = context.selection) === null || _b === void 0 ? void 0 : _b.type) == 'range' && node.contains(range.endContainer)) {
if (!context.selection.range.collapsed) {
addSelectionMarker(group, context);
}
context.isInSelection = false;
}
}
handleRegularSelection(index, context, group, nodeStartOffset, nodeEndOffset);
};
//# sourceMappingURL=delimiterProcessor.js.map

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

* @param group
* @param element
* @param node
* @param context
*/
export declare const delimiterProcessor: ElementProcessor<Node>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.delimiterProcessor = void 0;
var tslib_1 = require("tslib");
var getRegularSelectionOffsets_1 = require("../utils/getRegularSelectionOffsets");
var childProcessor_1 = require("./childProcessor");
var addSelectionMarker_1 = require("../utils/addSelectionMarker");
/**
* @internal
* @param group
* @param element
* @param node
* @param context
*/
var delimiterProcessor = function (group, element, context) {
var index = 0;
var _a = (0, tslib_1.__read)((0, getRegularSelectionOffsets_1.getRegularSelectionOffsets)(context, element), 2), nodeStartOffset = _a[0], nodeEndOffset = _a[1];
for (var child = element.firstChild; child; child = child.nextSibling) {
(0, childProcessor_1.handleRegularSelection)(index, context, group, nodeStartOffset, nodeEndOffset);
(0, exports.delimiterProcessor)(group, child, context);
index++;
var delimiterProcessor = function (group, node, context) {
var _a, _b;
var range = ((_a = context.selection) === null || _a === void 0 ? void 0 : _a.type) == 'range' ? context.selection.range : null;
if (range) {
if (node.contains(range.startContainer)) {
context.isInSelection = true;
(0, addSelectionMarker_1.addSelectionMarker)(group, context);
}
if (((_b = context.selection) === null || _b === void 0 ? void 0 : _b.type) == 'range' && node.contains(range.endContainer)) {
if (!context.selection.range.collapsed) {
(0, addSelectionMarker_1.addSelectionMarker)(group, context);
}
context.isInSelection = false;
}
}
(0, childProcessor_1.handleRegularSelection)(index, context, group, nodeStartOffset, nodeEndOffset);
};
exports.delimiterProcessor = delimiterProcessor;
//# sourceMappingURL=delimiterProcessor.js.map

@@ -6,5 +6,5 @@ {

"tslib": "^2.3.1",
"roosterjs-content-model-types": "^0.18.0"
"roosterjs-content-model-types": "^0.19.0"
},
"version": "0.18.0",
"version": "0.19.0",
"main": "./lib/index.js",

@@ -11,0 +11,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

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