@remirror/core-utils
Advanced tools
Comparing version 2.0.0-beta.16 to 2.0.0-beta.17
@@ -105,2 +105,9 @@ import type { AttributesProps, CommandFunction, CommandFunctionProps, FromToProps, MakeNullable, MarkType, MarkTypeProps, NodeType, NodeTypeProps, PrimitiveSelection, ProsemirrorAttributes, RangeProps, Selection, Transaction } from '@remirror/core-types'; | ||
/** | ||
* Taken from https://stackoverflow.com/a/4900484 | ||
* | ||
* Check that the browser is safari. Supports passing a minimum version to check | ||
* that it is a greater than or equal to this version. | ||
*/ | ||
export declare function isSafari(minVersion?: number): boolean; | ||
/** | ||
* Checks the selection for the current state and updates the active transaction | ||
@@ -107,0 +114,0 @@ * to a selection that is consistent with the initial selection. |
export type { RemoveMarkProps, ReplaceTextProps, ToggleBlockItemProps, UpdateMarkProps, } from './command-utils'; | ||
export { isChrome, lift, preserveSelection, removeMark, replaceText, setBlockType, toggleBlockItem, toggleWrap, updateMark, wrapIn, } from './command-utils'; | ||
export { isChrome, isSafari, lift, preserveSelection, removeMark, replaceText, setBlockType, toggleBlockItem, toggleWrap, updateMark, wrapIn, } from './command-utils'; | ||
export type { CreateDocumentNodeProps, CustomDocumentProps, FragmentStringHandlerOptions, GetMarkRange, InvalidContentBlock, InvalidContentHandler, InvalidContentHandlerProps, NamedStringHandlers, NodeStringHandlerOptions, StringHandler, StringHandlerOptions, StringHandlerProps, } from './core-utils'; | ||
@@ -4,0 +4,0 @@ export { areSchemasCompatible, areStatesEqual, atDocEnd, atDocStart, canInsertNode, createDocumentNode, endPositionOfParent, getChangedNodeRanges, getChangedRanges, getCursor, getDefaultBlockNode, getDefaultDocNode, getDocRange, getDocument, getInvalidContent, getMarkAttributes, getMarkRange, getMarkRanges, getMarkType, getMatchString, getNodeType, getRemirrorJSON, getSelectedGroup, getSelectedWord, getTextContentFromSlice, getTextSelection, htmlToProsemirrorNode, isAllSelection, isDefaultBlockNode, isDefaultDocNode, isDocNode, isDocNodeEmpty, isEditorSchema, isEditorState, isEmptyBlockNode, isEndOfTextBlock, isIdentifierOfType, isMarkActive, isMarkType, isNodeSelection, isNodeType, isProsemirrorFragment, isProsemirrorMark, isProsemirrorNode, isRemirrorJSON, isRemirrorType, isResolvedPos, isSelection, isStartOfDoc, isStartOfTextBlock, isTextSelection, isTransaction, joinStyles, omitExtraAttributes, prosemirrorNodeToDom, prosemirrorNodeToHtml, rangeHasMark, shouldUseDomEnvironment, startPositionOfParent, textBetween, } from './core-utils'; |
@@ -1314,2 +1314,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { | ||
} | ||
function isSafari(minVersion = 0) { | ||
const isMac = navigator.userAgent.match(/Mac/); | ||
const parsedAgent = navigator.userAgent.match(/Safari\/(\d+)\./); | ||
return isMac && !isChrome() && parsedAgent ? Number.parseInt(assertGet2(parsedAgent, 2), 10) >= minVersion : false; | ||
} | ||
function preserveSelection(selection, tr) { | ||
@@ -1868,2 +1873,3 @@ let { head, empty, anchor } = selection; | ||
isResolvedPos, | ||
isSafari, | ||
isSelection, | ||
@@ -1870,0 +1876,0 @@ isSelectionEmpty, |
{ | ||
"name": "@remirror/core-utils", | ||
"version": "2.0.0-beta.16", | ||
"version": "2.0.0-beta.17", | ||
"description": "Core utilities for dealing with the dom and prosemirror within remirror", | ||
@@ -34,6 +34,6 @@ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/remirror__core-utils", | ||
"@babel/runtime": "^7.13.10", | ||
"@remirror/core-constants": "^2.0.0-beta.16", | ||
"@remirror/core-helpers": "^2.0.0-beta.16", | ||
"@remirror/core-types": "^2.0.0-beta.16", | ||
"@remirror/messages": "^2.0.0-beta.16", | ||
"@remirror/core-constants": "^2.0.0-beta.17", | ||
"@remirror/core-helpers": "^2.0.0-beta.17", | ||
"@remirror/core-types": "^2.0.0-beta.17", | ||
"@remirror/messages": "^2.0.0-beta.17", | ||
"@types/min-document": "^2.19.0", | ||
@@ -45,3 +45,3 @@ "css-in-js-utils": "^3.1.0", | ||
"devDependencies": { | ||
"@remirror/pm": "^2.0.0-beta.16", | ||
"@remirror/pm": "^2.0.0-beta.17", | ||
"@types/jsdom": "^16.2.13", | ||
@@ -52,3 +52,3 @@ "@types/node": "^16.3.3", | ||
"peerDependencies": { | ||
"@remirror/pm": "^2.0.0-beta.16", | ||
"@remirror/pm": "^2.0.0-beta.17", | ||
"@types/node": "*", | ||
@@ -55,0 +55,0 @@ "jsdom": "*" |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
590969
5538