@reblu/site-blocks 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +16 -0
- package/dist/index.cjs +38 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13190,6 +13190,14 @@ function authorAttributes(el) {
|
|
|
13190
13190
|
}
|
|
13191
13191
|
return preserved;
|
|
13192
13192
|
}
|
|
13193
|
+
var CELL_ALIGN_CLASSES = {
|
|
13194
|
+
left: "text-left",
|
|
13195
|
+
center: "text-center",
|
|
13196
|
+
right: "text-right"
|
|
13197
|
+
};
|
|
13198
|
+
function cellAlignClass(align) {
|
|
13199
|
+
return align ? CELL_ALIGN_CLASSES[align.toLowerCase()] : void 0;
|
|
13200
|
+
}
|
|
13193
13201
|
function isExternalHref(href) {
|
|
13194
13202
|
return !!href && /^(https?:)?\/\//.test(href);
|
|
13195
13203
|
}
|
|
@@ -13323,6 +13331,36 @@ function buildOptions(headingOffset, images) {
|
|
|
13323
13331
|
className: "absolute inset-0 h-full w-full border-0"
|
|
13324
13332
|
}
|
|
13325
13333
|
) });
|
|
13334
|
+
// GFM tables (a cookie policy's cookie list, a price table). The table scrolls
|
|
13335
|
+
// inside its own wrapper so a wide one never pushes the page sideways on a phone.
|
|
13336
|
+
case "table":
|
|
13337
|
+
return /* @__PURE__ */ jsx("div", { className: "my-6 w-full overflow-x-auto", children: /* @__PURE__ */ jsx("table", { ...author, className: "w-full border-collapse text-sm", children: children2() }) });
|
|
13338
|
+
case "thead":
|
|
13339
|
+
return /* @__PURE__ */ jsx("thead", { ...author, className: "bg-muted", children: children2() });
|
|
13340
|
+
case "tbody":
|
|
13341
|
+
return /* @__PURE__ */ jsx("tbody", { ...author, children: children2() });
|
|
13342
|
+
case "tr":
|
|
13343
|
+
return /* @__PURE__ */ jsx("tr", { ...author, children: children2() });
|
|
13344
|
+
case "th":
|
|
13345
|
+
return /* @__PURE__ */ jsx(
|
|
13346
|
+
"th",
|
|
13347
|
+
{
|
|
13348
|
+
...author,
|
|
13349
|
+
className: `border border-border px-3 py-2 font-semibold text-foreground ${cellAlignClass(attribs.align) ?? "text-left"}`,
|
|
13350
|
+
children: children2()
|
|
13351
|
+
}
|
|
13352
|
+
);
|
|
13353
|
+
case "td": {
|
|
13354
|
+
const align = cellAlignClass(attribs.align);
|
|
13355
|
+
return /* @__PURE__ */ jsx(
|
|
13356
|
+
"td",
|
|
13357
|
+
{
|
|
13358
|
+
...author,
|
|
13359
|
+
className: `border border-border px-3 py-2 align-top text-foreground/90${align ? ` ${align}` : ""}`,
|
|
13360
|
+
children: children2()
|
|
13361
|
+
}
|
|
13362
|
+
);
|
|
13363
|
+
}
|
|
13326
13364
|
case "hr":
|
|
13327
13365
|
return /* @__PURE__ */ jsx("hr", { ...author, className: "my-8 border-muted-foreground/30" });
|
|
13328
13366
|
case "strong":
|