Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@saltcorn/markup

Package Overview
Dependencies
Maintainers
1
Versions
409
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saltcorn/markup - npm Package Compare versions

Comparing version 0.0.9 to 0.1.0

26

layout.js
const { contract, is } = require("contractis");
const { div, span, h6, text } = require("./tags");
const { div, a, span, h6, text, img } = require("./tags");
const { alert } = require("./layout_utils");

@@ -51,4 +51,22 @@

if (segment.type === "blank") {
return wrap(segment, isTop, ix, segment.contents);
return wrap(segment, isTop, ix, segment.contents || "");
}
if (segment.type === "view") {
return wrap(segment, isTop, ix, segment.contents || "");
}
if (segment.type === "image") {
return wrap(
segment,
isTop,
ix,
img({
class: "w-100",
alt: segment.alt,
src: `/files/serve/${segment.fileid}`
})
);
}
if (segment.type === "link") {
return wrap(segment, isTop, ix, a({ href: segment.url }, segment.text));
}
if (segment.type === "card")

@@ -107,3 +125,5 @@ return wrap(

role: is.maybe(is.posint),
alerts: is.maybe(is.array(is.obj({ type: is.str, msg: is.or(is.str, is.array(is.str)) })))
alerts: is.maybe(
is.array(is.obj({ type: is.str, msg: is.or(is.str, is.array(is.str)) }))
)
}),

@@ -110,0 +130,0 @@ is.str

6

package.json
{
"name": "@saltcorn/markup",
"version": "0.0.9",
"version": "0.1.0",
"description": "Markup for Saltcorn, open-source no-code platform",

@@ -13,3 +13,3 @@ "homepage": "https://saltcorn.com",

"dependencies": {
"contractis": "^0.0.9",
"contractis": "^0.0.10",
"escape-html": "^1.0.3",

@@ -28,3 +28,3 @@ "xss": "^1.0.6"

},
"gitHead": "2a088e28b3df98fb79b91d891ae0c2bff9811300"
"gitHead": "41e0daca8dffe1dfcf9c2419dd84aae41fa72d30"
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc