@portabletext/to-html
Advanced tools
@@ -11,4 +11,4 @@ "use strict"; | ||
| 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); } | ||
| function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; } | ||
| function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; } | ||
| function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; } | ||
| function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; } | ||
| Object.defineProperty(exports, "__esModule", { | ||
@@ -224,4 +224,3 @@ value: !0 | ||
| index, | ||
| isInline: !1, | ||
| renderNode | ||
| isInline: !1 | ||
| }); | ||
@@ -243,4 +242,3 @@ } | ||
| index: childIndex, | ||
| isInline: !1, | ||
| renderNode | ||
| isInline: !1 | ||
| })), | ||
@@ -274,4 +272,3 @@ component = components.list, | ||
| index: childIndex, | ||
| isInline: !0, | ||
| renderNode | ||
| isInline: !0 | ||
| })); | ||
@@ -278,0 +275,0 @@ return span === components.unknownMark && handleMissingComponent(unknownMarkWarning(markType), { |
@@ -9,4 +9,4 @@ const _excluded = ["block", "list", "listItem", "marks", "types"], | ||
| 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); } | ||
| function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; } | ||
| function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; } | ||
| function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; } | ||
| function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; } | ||
| import { nestLists, isPortableTextToolkitList, isPortableTextListItemBlock, isPortableTextToolkitSpan, isPortableTextBlock, isPortableTextToolkitTextNode, spanToPlainText, buildMarksTree } from "@portabletext/toolkit"; | ||
@@ -219,4 +219,3 @@ const allowedProtocols = ["http", "https", "mailto", "tel"], | ||
| index, | ||
| isInline: !1, | ||
| renderNode | ||
| isInline: !1 | ||
| }); | ||
@@ -238,4 +237,3 @@ } | ||
| index: childIndex, | ||
| isInline: !1, | ||
| renderNode | ||
| isInline: !1 | ||
| })), | ||
@@ -269,4 +267,3 @@ component = components.list, | ||
| index: childIndex, | ||
| isInline: !0, | ||
| renderNode | ||
| isInline: !0 | ||
| })); | ||
@@ -273,0 +270,0 @@ return span === components.unknownMark && handleMissingComponent(unknownMarkWarning(markType), { |
+20
-31
| { | ||
| "name": "@portabletext/to-html", | ||
| "version": "2.0.16", | ||
| "version": "2.0.17", | ||
| "description": "Render Portable Text to HTML", | ||
@@ -38,17 +38,7 @@ "keywords": [ | ||
| ], | ||
| "lint-staged": { | ||
| "*": [ | ||
| "prettier --write --cache --ignore-unknown" | ||
| ] | ||
| }, | ||
| "browserslist": "extends @sanity/browserslist-config", | ||
| "prettier": { | ||
| "bracketSpacing": false, | ||
| "plugins": [ | ||
| "prettier-plugin-packagejson" | ||
| ], | ||
| "printWidth": 100, | ||
| "semi": false, | ||
| "singleQuote": true | ||
| }, | ||
| "browserslist": [ | ||
| "extends @sanity/browserslist-config", | ||
| "node 14" | ||
| ], | ||
| "prettier": "@sanity/prettier-config", | ||
| "eslintConfig": { | ||
@@ -72,3 +62,3 @@ "parserOptions": { | ||
| "tap": { | ||
| "check-coverage": false, | ||
| "allow-incomplete-coverage": true, | ||
| "node-arg": [ | ||
@@ -80,27 +70,26 @@ "-r", | ||
| "dependencies": { | ||
| "@portabletext/toolkit": "^2.0.17", | ||
| "@portabletext/types": "^2.0.13" | ||
| "@portabletext/toolkit": "^2.0.18", | ||
| "@portabletext/types": "^2.0.15" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^7.24.6", | ||
| "@babel/core": "^7.28.3", | ||
| "@babel/plugin-proposal-object-rest-spread": "^7.20.7", | ||
| "@changesets/changelog-github": "^0.5.1", | ||
| "@changesets/cli": "^2.29.6", | ||
| "@sanity/pkg-utils": "^6.8.18", | ||
| "@types/tap": "^15.0.11", | ||
| "@sanity/browserslist-config": "^1.0.5", | ||
| "@sanity/pkg-utils": "^8.0.3", | ||
| "@sanity/prettier-config": "^2.0.1", | ||
| "@typescript-eslint/eslint-plugin": "^7.11.0", | ||
| "@typescript-eslint/parser": "^7.11.0", | ||
| "esbuild": "^0.25.0", | ||
| "esbuild-register": "^3.5.0", | ||
| "esbuild": "^0.25.9", | ||
| "esbuild-register": "^3.6.0", | ||
| "eslint": "^8.57.0", | ||
| "eslint-config-prettier": "^9.1.0", | ||
| "eslint-config-sanity": "^7.1.2", | ||
| "husky": "^8.0.3", | ||
| "npm-run-all2": "^5.0.2", | ||
| "prettier": "^3.2.5", | ||
| "prettier-plugin-packagejson": "^2.5.0", | ||
| "npm-run-all2": "^8.0.4", | ||
| "prettier": "^3.6.2", | ||
| "rimraf": "^4.4.1", | ||
| "tap": "^16.3.10", | ||
| "typedoc": "^0.25.13", | ||
| "typescript": "^5.4.5" | ||
| "tap": "^21.1.0", | ||
| "typedoc": "^0.28.10", | ||
| "typescript": "5.9.2" | ||
| }, | ||
@@ -107,0 +96,0 @@ "engines": { |
@@ -18,8 +18,8 @@ import type {TypedObject} from '@portabletext/types' | ||
| export const defaultMarks: Record<string, PortableTextMarkComponent | undefined> = { | ||
| em: ({children}) => `<em>${children}</em>`, | ||
| strong: ({children}) => `<strong>${children}</strong>`, | ||
| code: ({children}) => `<code>${children}</code>`, | ||
| underline: ({children}) => `<span style="text-decoration:underline">${children}</span>`, | ||
| 'em': ({children}) => `<em>${children}</em>`, | ||
| 'strong': ({children}) => `<strong>${children}</strong>`, | ||
| 'code': ({children}) => `<code>${children}</code>`, | ||
| 'underline': ({children}) => `<span style="text-decoration:underline">${children}</span>`, | ||
| 'strike-through': ({children}) => `<del>${children}</del>`, | ||
| link, | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
20
-4.76%138153
-0.27%1646
-0.36%Updated