quoin-editor 0.3.0 → 0.4.0
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/README.md +12 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1478,12 +1478,12 @@ function FileBlockEditor({ data, onChange }) {
|
|
|
1478
1478
|
// src/blocks/previews.tsx
|
|
1479
1479
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1480
1480
|
var HINT = "text-sm text-muted-foreground";
|
|
1481
|
-
var
|
|
1482
|
-
info: "border-
|
|
1483
|
-
tip: "border-
|
|
1484
|
-
warning: "border-
|
|
1485
|
-
success: "border-
|
|
1486
|
-
danger: "border-destructive"
|
|
1481
|
+
var TONE = {
|
|
1482
|
+
info: "border-info bg-info/15",
|
|
1483
|
+
tip: "border-primary bg-primary/15",
|
|
1484
|
+
warning: "border-warning bg-warning/15",
|
|
1485
|
+
success: "border-success bg-success/15",
|
|
1486
|
+
danger: "border-destructive bg-destructive/15"
|
|
1487
1487
|
};
|
|
1488
1488
|
function MarkdownPreview({ data }) {
|
|
1489
1489
|
const markdown = str(data.markdown);
|
|
@@ -1510,8 +1510,8 @@ function CalloutPreview({ data }) {
|
|
|
1510
1510
|
const body = str(data.body);
|
|
1511
1511
|
if (body.trim() === "") return /* @__PURE__ */ jsx18("p", { className: HINT, children: "Empty callout" });
|
|
1512
1512
|
const tone = str(data.tone) || "info";
|
|
1513
|
-
const
|
|
1514
|
-
return /* @__PURE__ */ jsx18("div", { "data-tone": tone, className: `rounded-md border-l-4 ${
|
|
1513
|
+
const paint = TONE[tone] ?? "border-border bg-muted/50";
|
|
1514
|
+
return /* @__PURE__ */ jsx18("div", { "data-tone": tone, className: `rounded-md border-l-4 ${paint} p-3 text-sm`, children: body });
|
|
1515
1515
|
}
|
|
1516
1516
|
|
|
1517
1517
|
// src/blocks/core.ts
|