@measured/puck 0.19.3 → 0.19.4-canary.a884c672
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 +24 -20
- package/dist/index.js +9 -2
- package/dist/index.mjs +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
<br /><br /><br />
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</a>
|
|
12
|
-
<a aria-label="Join the community on Discord" href="https://discord.gg/D9e4E3MQVZ">
|
|
13
|
-
<img alt="" src="https://img.shields.io/badge/Join%20the%20Discord-blueviolet.svg?style=for-the-badge&logo=Discord&labelColor=000000&logoWidth=20">
|
|
14
|
-
</a>
|
|
15
|
-
<a aria-label="Browse the awesome-puck community repo" href="https://github.com/measuredco/awesome-puck">
|
|
16
|
-
<img alt="" src="https://img.shields.io/badge/repo-awesome--puck-fc60a8.svg?style=for-the-badge&labelColor=000000&logoWidth=20">
|
|
17
|
-
</a>
|
|
18
|
-
</p>
|
|
5
|
+
<a href="https://puckeditor.com">
|
|
6
|
+
<picture>
|
|
7
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://res.cloudinary.com/die3nptcg/image/upload/Puck_Logo_White_RGB_j2rwgg.svg" height="100px" aria-label="Puck logo">
|
|
8
|
+
<img src="https://res.cloudinary.com/die3nptcg/image/upload/Puck_Logo_Black_RGB_dqsjag.svg" height="100px" aria-label="Puck logo">
|
|
9
|
+
</picture>
|
|
10
|
+
</a>
|
|
19
11
|
|
|
20
|
-
|
|
12
|
+
_The visual editor for React_
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
[Documentation](https://puckeditor.com/docs) • [Demo](https://demo.puckeditor.com/edit) • [Discord](https://discord.gg/V9mDAhuxyZ) • [Contributing](https://github.com/puckeditor/puck/blob/main/CONTRIBUTING.md)
|
|
23
15
|
|
|
24
|
-
|
|
16
|
+
⭐️ Enjoying Puck? Please [leave a star](https://github.com/puckeditor/puck)!
|
|
25
17
|
|
|
26
|
-
|
|
18
|
+
<br />
|
|
19
|
+
|
|
20
|
+
[](https://demo.puckeditor.com/edit)
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
## What is Puck?
|
|
25
|
+
|
|
26
|
+
Puck is a modular, open-source visual editor for React.js. You can use Puck to build custom drag-and-drop experiences with your own application and React components.
|
|
27
|
+
|
|
28
|
+
Because Puck is just a React component, it plays well with all React.js environments, including Next.js. You own your data and there’s no vendor lock-in.
|
|
29
|
+
|
|
30
|
+
Puck is also [licensed under MIT](https://github.com/puckeditor/puck?tab=MIT-1-ov-file#readme), making it suitable for both internal systems and commercial applications.
|
|
27
31
|
|
|
28
32
|
## Quick start
|
|
29
33
|
|
package/dist/index.js
CHANGED
|
@@ -7187,7 +7187,14 @@ var styleSelector = 'style, link[rel="stylesheet"]';
|
|
|
7187
7187
|
var collectStyles = (doc) => {
|
|
7188
7188
|
const collected = [];
|
|
7189
7189
|
doc.querySelectorAll(styleSelector).forEach((style) => {
|
|
7190
|
-
|
|
7190
|
+
if (style.tagName === "STYLE") {
|
|
7191
|
+
const hasContent = !!style.innerHTML.trim();
|
|
7192
|
+
if (hasContent) {
|
|
7193
|
+
collected.push(style);
|
|
7194
|
+
}
|
|
7195
|
+
} else {
|
|
7196
|
+
collected.push(style);
|
|
7197
|
+
}
|
|
7191
7198
|
});
|
|
7192
7199
|
return collected;
|
|
7193
7200
|
};
|
|
@@ -7200,7 +7207,7 @@ var getStyleSheet = (el) => {
|
|
|
7200
7207
|
var getStyles = (styleSheet) => {
|
|
7201
7208
|
if (styleSheet) {
|
|
7202
7209
|
try {
|
|
7203
|
-
return [...styleSheet.cssRules].map((rule) => rule.cssText).join("");
|
|
7210
|
+
return [...Array.from(styleSheet.cssRules)].map((rule) => rule.cssText).join("");
|
|
7204
7211
|
} catch (e) {
|
|
7205
7212
|
console.warn(
|
|
7206
7213
|
"Access to stylesheet %s is denied. Ignoring\u2026",
|
package/dist/index.mjs
CHANGED
|
@@ -6351,7 +6351,14 @@ var styleSelector = 'style, link[rel="stylesheet"]';
|
|
|
6351
6351
|
var collectStyles = (doc) => {
|
|
6352
6352
|
const collected = [];
|
|
6353
6353
|
doc.querySelectorAll(styleSelector).forEach((style) => {
|
|
6354
|
-
|
|
6354
|
+
if (style.tagName === "STYLE") {
|
|
6355
|
+
const hasContent = !!style.innerHTML.trim();
|
|
6356
|
+
if (hasContent) {
|
|
6357
|
+
collected.push(style);
|
|
6358
|
+
}
|
|
6359
|
+
} else {
|
|
6360
|
+
collected.push(style);
|
|
6361
|
+
}
|
|
6355
6362
|
});
|
|
6356
6363
|
return collected;
|
|
6357
6364
|
};
|
|
@@ -6364,7 +6371,7 @@ var getStyleSheet = (el) => {
|
|
|
6364
6371
|
var getStyles = (styleSheet) => {
|
|
6365
6372
|
if (styleSheet) {
|
|
6366
6373
|
try {
|
|
6367
|
-
return [...styleSheet.cssRules].map((rule) => rule.cssText).join("");
|
|
6374
|
+
return [...Array.from(styleSheet.cssRules)].map((rule) => rule.cssText).join("");
|
|
6368
6375
|
} catch (e) {
|
|
6369
6376
|
console.warn(
|
|
6370
6377
|
"Access to stylesheet %s is denied. Ignoring\u2026",
|