@measured/puck-plugin-heading-analyzer 0.17.0-canary.fe9321f → 0.17.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/dist/index.js CHANGED
@@ -1478,7 +1478,7 @@ init_react_import();
1478
1478
 
1479
1479
  // src/HeadingAnalyzer.tsx
1480
1480
  init_react_import();
1481
- var import_react8 = require("react");
1481
+ var import_react9 = require("react");
1482
1482
 
1483
1483
  // css-module:/home/runner/work/puck/puck/packages/plugin-heading-analyzer/src/HeadingAnalyzer.module.css#css-module
1484
1484
  init_react_import();
@@ -1549,6 +1549,17 @@ init_react_import();
1549
1549
 
1550
1550
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
1551
1551
  init_react_import();
1552
+ var import_react3 = require("react");
1553
+
1554
+ // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
1555
+ init_react_import();
1556
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1557
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
1558
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
1559
+ }).join(" ").trim();
1560
+
1561
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
1562
+ init_react_import();
1552
1563
  var import_react2 = require("react");
1553
1564
 
1554
1565
  // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
@@ -1565,28 +1576,55 @@ var defaultAttributes = {
1565
1576
  strokeLinejoin: "round"
1566
1577
  };
1567
1578
 
1579
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
1580
+ var Icon = (0, import_react2.forwardRef)(
1581
+ (_a, ref) => {
1582
+ var _b = _a, {
1583
+ color = "currentColor",
1584
+ size = 24,
1585
+ strokeWidth = 2,
1586
+ absoluteStrokeWidth,
1587
+ className = "",
1588
+ children,
1589
+ iconNode
1590
+ } = _b, rest = __objRest(_b, [
1591
+ "color",
1592
+ "size",
1593
+ "strokeWidth",
1594
+ "absoluteStrokeWidth",
1595
+ "className",
1596
+ "children",
1597
+ "iconNode"
1598
+ ]);
1599
+ return (0, import_react2.createElement)(
1600
+ "svg",
1601
+ __spreadValues(__spreadProps(__spreadValues({
1602
+ ref
1603
+ }, defaultAttributes), {
1604
+ width: size,
1605
+ height: size,
1606
+ stroke: color,
1607
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
1608
+ className: mergeClasses("lucide", className)
1609
+ }), rest),
1610
+ [
1611
+ ...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
1612
+ ...Array.isArray(children) ? children : [children]
1613
+ ]
1614
+ );
1615
+ }
1616
+ );
1617
+
1568
1618
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
1569
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
1570
1619
  var createLucideIcon = (iconName, iconNode) => {
1571
- const Component = (0, import_react2.forwardRef)(
1620
+ const Component = (0, import_react3.forwardRef)(
1572
1621
  (_a, ref) => {
1573
- var _b = _a, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
1574
- return (0, import_react2.createElement)(
1575
- "svg",
1576
- __spreadValues(__spreadProps(__spreadValues({
1577
- ref
1578
- }, defaultAttributes), {
1579
- width: size,
1580
- height: size,
1581
- stroke: color,
1582
- strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
1583
- className: ["lucide", `lucide-${toKebabCase(iconName)}`, className].join(" ")
1584
- }), rest),
1585
- [
1586
- ...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
1587
- ...Array.isArray(children) ? children : [children]
1588
- ]
1589
- );
1622
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1623
+ return (0, import_react3.createElement)(Icon, __spreadValues({
1624
+ ref,
1625
+ iconNode,
1626
+ className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className)
1627
+ }, props));
1590
1628
  }
1591
1629
  );
1592
1630
  Component.displayName = `${iconName}`;
@@ -1601,11 +1639,11 @@ var ChevronRight = createLucideIcon("ChevronRight", [
1601
1639
 
1602
1640
  // ../core/lib/use-breadcrumbs.ts
1603
1641
  init_react_import();
1604
- var import_react7 = require("react");
1642
+ var import_react8 = require("react");
1605
1643
 
1606
1644
  // ../core/components/DropZone/context.tsx
1607
1645
  init_react_import();
1608
- var import_react3 = require("react");
1646
+ var import_react4 = require("react");
1609
1647
 
1610
1648
  // ../core/lib/get-item.ts
1611
1649
  init_react_import();
@@ -1631,11 +1669,11 @@ var getZoneId = (zoneCompound) => {
1631
1669
 
1632
1670
  // ../core/components/DropZone/context.tsx
1633
1671
  var import_jsx_runtime2 = require("react/jsx-runtime");
1634
- var dropZoneContext = (0, import_react3.createContext)(null);
1672
+ var dropZoneContext = (0, import_react4.createContext)(null);
1635
1673
 
1636
1674
  // ../core/components/Puck/context.tsx
1637
1675
  init_react_import();
1638
- var import_react6 = require("react");
1676
+ var import_react7 = require("react");
1639
1677
 
1640
1678
  // ../core/components/ViewportControls/default-viewports.ts
1641
1679
  init_react_import();
@@ -1650,7 +1688,7 @@ var import_ua_parser_js = __toESM(require_ua_parser());
1650
1688
 
1651
1689
  // ../core/lib/use-resolved-permissions.ts
1652
1690
  init_react_import();
1653
- var import_react4 = require("react");
1691
+ var import_react5 = require("react");
1654
1692
 
1655
1693
  // ../core/lib/flatten-data.ts
1656
1694
  init_react_import();
@@ -1660,7 +1698,7 @@ init_react_import();
1660
1698
 
1661
1699
  // ../core/lib/use-resolved-data.ts
1662
1700
  init_react_import();
1663
- var import_react5 = require("react");
1701
+ var import_react6 = require("react");
1664
1702
 
1665
1703
  // ../core/lib/resolve-component-data.ts
1666
1704
  init_react_import();
@@ -1720,9 +1758,9 @@ var defaultContext = {
1720
1758
  getPermissions: () => ({}),
1721
1759
  refreshPermissions: () => null
1722
1760
  };
1723
- var appContext = (0, import_react6.createContext)(defaultContext);
1761
+ var appContext = (0, import_react7.createContext)(defaultContext);
1724
1762
  function useAppContext() {
1725
- const mainContext = (0, import_react6.useContext)(appContext);
1763
+ const mainContext = (0, import_react7.useContext)(appContext);
1726
1764
  return __spreadProps(__spreadValues({}, mainContext), {
1727
1765
  // Helpers
1728
1766
  setUi: (ui, recordHistory) => {
@@ -1785,8 +1823,8 @@ var useBreadcrumbs = (renderCount) => {
1785
1823
  state: { data },
1786
1824
  selectedItem
1787
1825
  } = useAppContext();
1788
- const dzContext = (0, import_react7.useContext)(dropZoneContext);
1789
- return (0, import_react7.useMemo)(() => {
1826
+ const dzContext = (0, import_react8.useContext)(dropZoneContext);
1827
+ return (0, import_react8.useMemo)(() => {
1790
1828
  const breadcrumbs = convertPathDataToBreadcrumbs(
1791
1829
  selectedItem,
1792
1830
  dzContext == null ? void 0 : dzContext.pathData,
@@ -1996,9 +2034,9 @@ function buildHierarchy(frame) {
1996
2034
  }
1997
2035
  var HeadingAnalyzer = () => {
1998
2036
  const { appState } = (0, import_puck.usePuck)();
1999
- const [hierarchy, setHierarchy] = (0, import_react8.useState)([]);
2000
- const [firstRender, setFirstRender] = (0, import_react8.useState)(true);
2001
- (0, import_react8.useEffect)(() => {
2037
+ const [hierarchy, setHierarchy] = (0, import_react9.useState)([]);
2038
+ const [firstRender, setFirstRender] = (0, import_react9.useState)(true);
2039
+ (0, import_react9.useEffect)(() => {
2002
2040
  const frame = getFrame();
2003
2041
  if (!frame) return;
2004
2042
  if (firstRender) {
@@ -2110,9 +2148,25 @@ classnames/index.js:
2110
2148
  http://jedwatson.github.io/classnames
2111
2149
  *)
2112
2150
 
2151
+ lucide-react/dist/esm/shared/src/utils.js:
2152
+ (**
2153
+ * @license lucide-react v0.468.0 - ISC
2154
+ *
2155
+ * This source code is licensed under the ISC license.
2156
+ * See the LICENSE file in the root directory of this source tree.
2157
+ *)
2158
+
2113
2159
  lucide-react/dist/esm/defaultAttributes.js:
2114
2160
  (**
2115
- * @license lucide-react v0.298.0 - ISC
2161
+ * @license lucide-react v0.468.0 - ISC
2162
+ *
2163
+ * This source code is licensed under the ISC license.
2164
+ * See the LICENSE file in the root directory of this source tree.
2165
+ *)
2166
+
2167
+ lucide-react/dist/esm/Icon.js:
2168
+ (**
2169
+ * @license lucide-react v0.468.0 - ISC
2116
2170
  *
2117
2171
  * This source code is licensed under the ISC license.
2118
2172
  * See the LICENSE file in the root directory of this source tree.
@@ -2120,7 +2174,7 @@ lucide-react/dist/esm/defaultAttributes.js:
2120
2174
 
2121
2175
  lucide-react/dist/esm/createLucideIcon.js:
2122
2176
  (**
2123
- * @license lucide-react v0.298.0 - ISC
2177
+ * @license lucide-react v0.468.0 - ISC
2124
2178
  *
2125
2179
  * This source code is licensed under the ISC license.
2126
2180
  * See the LICENSE file in the root directory of this source tree.
@@ -2128,7 +2182,7 @@ lucide-react/dist/esm/createLucideIcon.js:
2128
2182
 
2129
2183
  lucide-react/dist/esm/icons/chevron-right.js:
2130
2184
  (**
2131
- * @license lucide-react v0.298.0 - ISC
2185
+ * @license lucide-react v0.468.0 - ISC
2132
2186
  *
2133
2187
  * This source code is licensed under the ISC license.
2134
2188
  * See the LICENSE file in the root directory of this source tree.
@@ -2136,7 +2190,7 @@ lucide-react/dist/esm/icons/chevron-right.js:
2136
2190
 
2137
2191
  lucide-react/dist/esm/lucide-react.js:
2138
2192
  (**
2139
- * @license lucide-react v0.298.0 - ISC
2193
+ * @license lucide-react v0.468.0 - ISC
2140
2194
  *
2141
2195
  * This source code is licensed under the ISC license.
2142
2196
  * See the LICENSE file in the root directory of this source tree.
package/dist/index.mjs CHANGED
@@ -1537,6 +1537,17 @@ init_react_import();
1537
1537
 
1538
1538
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
1539
1539
  init_react_import();
1540
+ import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
1541
+
1542
+ // ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
1543
+ init_react_import();
1544
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1545
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
1546
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
1547
+ }).join(" ").trim();
1548
+
1549
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
1550
+ init_react_import();
1540
1551
  import { forwardRef, createElement } from "react";
1541
1552
 
1542
1553
  // ../../node_modules/lucide-react/dist/esm/defaultAttributes.js
@@ -1553,28 +1564,55 @@ var defaultAttributes = {
1553
1564
  strokeLinejoin: "round"
1554
1565
  };
1555
1566
 
1567
+ // ../../node_modules/lucide-react/dist/esm/Icon.js
1568
+ var Icon = forwardRef(
1569
+ (_a, ref) => {
1570
+ var _b = _a, {
1571
+ color = "currentColor",
1572
+ size = 24,
1573
+ strokeWidth = 2,
1574
+ absoluteStrokeWidth,
1575
+ className = "",
1576
+ children,
1577
+ iconNode
1578
+ } = _b, rest = __objRest(_b, [
1579
+ "color",
1580
+ "size",
1581
+ "strokeWidth",
1582
+ "absoluteStrokeWidth",
1583
+ "className",
1584
+ "children",
1585
+ "iconNode"
1586
+ ]);
1587
+ return createElement(
1588
+ "svg",
1589
+ __spreadValues(__spreadProps(__spreadValues({
1590
+ ref
1591
+ }, defaultAttributes), {
1592
+ width: size,
1593
+ height: size,
1594
+ stroke: color,
1595
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
1596
+ className: mergeClasses("lucide", className)
1597
+ }), rest),
1598
+ [
1599
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
1600
+ ...Array.isArray(children) ? children : [children]
1601
+ ]
1602
+ );
1603
+ }
1604
+ );
1605
+
1556
1606
  // ../../node_modules/lucide-react/dist/esm/createLucideIcon.js
1557
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
1558
1607
  var createLucideIcon = (iconName, iconNode) => {
1559
- const Component = forwardRef(
1608
+ const Component = forwardRef2(
1560
1609
  (_a, ref) => {
1561
- var _b = _a, { color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children } = _b, rest = __objRest(_b, ["color", "size", "strokeWidth", "absoluteStrokeWidth", "className", "children"]);
1562
- return createElement(
1563
- "svg",
1564
- __spreadValues(__spreadProps(__spreadValues({
1565
- ref
1566
- }, defaultAttributes), {
1567
- width: size,
1568
- height: size,
1569
- stroke: color,
1570
- strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
1571
- className: ["lucide", `lucide-${toKebabCase(iconName)}`, className].join(" ")
1572
- }), rest),
1573
- [
1574
- ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
1575
- ...Array.isArray(children) ? children : [children]
1576
- ]
1577
- );
1610
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1611
+ return createElement2(Icon, __spreadValues({
1612
+ ref,
1613
+ iconNode,
1614
+ className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className)
1615
+ }, props));
1578
1616
  }
1579
1617
  );
1580
1618
  Component.displayName = `${iconName}`;
@@ -2110,9 +2148,25 @@ classnames/index.js:
2110
2148
  http://jedwatson.github.io/classnames
2111
2149
  *)
2112
2150
 
2151
+ lucide-react/dist/esm/shared/src/utils.js:
2152
+ (**
2153
+ * @license lucide-react v0.468.0 - ISC
2154
+ *
2155
+ * This source code is licensed under the ISC license.
2156
+ * See the LICENSE file in the root directory of this source tree.
2157
+ *)
2158
+
2113
2159
  lucide-react/dist/esm/defaultAttributes.js:
2114
2160
  (**
2115
- * @license lucide-react v0.298.0 - ISC
2161
+ * @license lucide-react v0.468.0 - ISC
2162
+ *
2163
+ * This source code is licensed under the ISC license.
2164
+ * See the LICENSE file in the root directory of this source tree.
2165
+ *)
2166
+
2167
+ lucide-react/dist/esm/Icon.js:
2168
+ (**
2169
+ * @license lucide-react v0.468.0 - ISC
2116
2170
  *
2117
2171
  * This source code is licensed under the ISC license.
2118
2172
  * See the LICENSE file in the root directory of this source tree.
@@ -2120,7 +2174,7 @@ lucide-react/dist/esm/defaultAttributes.js:
2120
2174
 
2121
2175
  lucide-react/dist/esm/createLucideIcon.js:
2122
2176
  (**
2123
- * @license lucide-react v0.298.0 - ISC
2177
+ * @license lucide-react v0.468.0 - ISC
2124
2178
  *
2125
2179
  * This source code is licensed under the ISC license.
2126
2180
  * See the LICENSE file in the root directory of this source tree.
@@ -2128,7 +2182,7 @@ lucide-react/dist/esm/createLucideIcon.js:
2128
2182
 
2129
2183
  lucide-react/dist/esm/icons/chevron-right.js:
2130
2184
  (**
2131
- * @license lucide-react v0.298.0 - ISC
2185
+ * @license lucide-react v0.468.0 - ISC
2132
2186
  *
2133
2187
  * This source code is licensed under the ISC license.
2134
2188
  * See the LICENSE file in the root directory of this source tree.
@@ -2136,7 +2190,7 @@ lucide-react/dist/esm/icons/chevron-right.js:
2136
2190
 
2137
2191
  lucide-react/dist/esm/lucide-react.js:
2138
2192
  (**
2139
- * @license lucide-react v0.298.0 - ISC
2193
+ * @license lucide-react v0.468.0 - ISC
2140
2194
  *
2141
2195
  * This source code is licensed under the ISC license.
2142
2196
  * See the LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-heading-analyzer",
3
- "version": "0.17.0-canary.fe9321f",
3
+ "version": "0.17.0",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",
@@ -25,9 +25,9 @@
25
25
  "dist"
26
26
  ],
27
27
  "devDependencies": {
28
- "@measured/puck": "^0.17.0-canary.fe9321f",
29
- "@types/react": "^18.2.0",
30
- "@types/react-dom": "^18.2.0",
28
+ "@measured/puck": "^0.17.0",
29
+ "@types/react": "^19.0.1",
30
+ "@types/react-dom": "^19.0.2",
31
31
  "eslint": "^7.32.0",
32
32
  "eslint-config-custom": "*",
33
33
  "tsconfig": "*",