@measured/puck-plugin-heading-analyzer 0.12.0-canary.39005a4 → 0.12.0-canary.3f8ebc0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.css CHANGED
@@ -1,53 +1,56 @@
1
1
  /* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
2
- ._SidebarSection_r7dv3_1 {
2
+ ._SidebarSection_1uyg2_1 {
3
3
  display: flex;
4
4
  position: relative;
5
5
  flex-direction: column;
6
6
  color: black;
7
7
  }
8
- ._SidebarSection_r7dv3_1:last-of-type {
8
+ ._SidebarSection_1uyg2_1:last-of-type {
9
9
  flex-grow: 1;
10
10
  }
11
- ._SidebarSection-title_r7dv3_12 {
11
+ ._SidebarSection-title_1uyg2_12 {
12
12
  background: white;
13
13
  padding: 16px;
14
14
  border-bottom: 1px solid var(--puck-color-grey-8);
15
15
  overflow-x: auto;
16
16
  }
17
- ._SidebarSection-content_r7dv3_19 {
17
+ ._SidebarSection-content_1uyg2_19 {
18
18
  border-bottom: 1px solid var(--puck-color-grey-8);
19
19
  padding: 16px;
20
20
  }
21
- ._SidebarSection--noPadding_r7dv3_24 ._SidebarSection-content_r7dv3_19 {
21
+ ._SidebarSection--noPadding_1uyg2_24 ._SidebarSection-content_1uyg2_19 {
22
22
  padding: 0px;
23
23
  }
24
- ._SidebarSection_r7dv3_1:last-of-type ._SidebarSection-content_r7dv3_19 {
24
+ ._SidebarSection--noPadding_1uyg2_24 ._SidebarSection-content_1uyg2_19:last-child {
25
+ padding-bottom: 4px;
26
+ }
27
+ ._SidebarSection_1uyg2_1:last-of-type ._SidebarSection-content_1uyg2_19 {
25
28
  border-bottom: none;
26
29
  flex-grow: 1;
27
30
  }
28
- ._SidebarSection-breadcrumbLabel_r7dv3_33 {
31
+ ._SidebarSection-breadcrumbLabel_1uyg2_37 {
29
32
  color: var(--puck-color-azure-3);
30
33
  flex-shrink: 0;
31
34
  }
32
- ._SidebarSection-breadcrumbLabel_r7dv3_33:hover {
35
+ ._SidebarSection-breadcrumbLabel_1uyg2_37:hover {
33
36
  color: var(--puck-color-azure-4);
34
37
  cursor: pointer;
35
38
  text-decoration: underline;
36
39
  }
37
- ._SidebarSection-breadcrumbs_r7dv3_44 {
40
+ ._SidebarSection-breadcrumbs_1uyg2_48 {
38
41
  align-items: center;
39
42
  display: flex;
40
43
  gap: 4px;
41
44
  }
42
- ._SidebarSection-breadcrumb_r7dv3_33 {
45
+ ._SidebarSection-breadcrumb_1uyg2_37 {
43
46
  align-items: center;
44
47
  display: flex;
45
48
  gap: 4px;
46
49
  }
47
- ._SidebarSection-heading_r7dv3_56 {
50
+ ._SidebarSection-heading_1uyg2_60 {
48
51
  padding-right: 16px;
49
52
  }
50
- ._SidebarSection-loadingOverlay_r7dv3_60 {
53
+ ._SidebarSection-loadingOverlay_1uyg2_64 {
51
54
  background: white;
52
55
  display: flex;
53
56
  justify-content: center;
@@ -101,16 +104,15 @@
101
104
  }
102
105
 
103
106
  /* css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css/#css-module-data */
104
- ._OutlineList_pnv2s_1 {
107
+ ._OutlineList_1nwoz_1 {
105
108
  color: var(--puck-color-grey-2);
106
109
  font-family: var(--puck-font-stack);
107
110
  margin: 0;
108
- margin-left: 16px;
109
111
  padding-left: 16px;
110
112
  position: relative;
111
113
  list-style: none;
112
114
  }
113
- ._OutlineList_pnv2s_1::before {
115
+ ._OutlineList_1nwoz_1::before {
114
116
  background: var(--puck-color-grey-7);
115
117
  position: absolute;
116
118
  left: -1px;
@@ -119,11 +121,11 @@
119
121
  height: calc(100% - 9px);
120
122
  content: "";
121
123
  }
122
- ._OutlineListItem_pnv2s_21 {
124
+ ._OutlineListItem_1nwoz_20 {
123
125
  position: relative;
124
126
  margin-bottom: 4px;
125
127
  }
126
- ._OutlineListItem_pnv2s_21::before {
128
+ ._OutlineListItem_1nwoz_20::before {
127
129
  background: var(--puck-color-grey-7);
128
130
  position: absolute;
129
131
  left: -17px;
@@ -132,10 +134,10 @@
132
134
  height: 1px;
133
135
  content: "";
134
136
  }
135
- ._OutlineListItem--clickable_pnv2s_36:hover {
137
+ ._OutlineListItem--clickable_1nwoz_35:hover {
136
138
  color: var(--puck-color-blue);
137
139
  cursor: pointer;
138
140
  }
139
- ._OutlineListItem_pnv2s_21 > ._OutlineList_pnv2s_1 {
140
- margin: 8px;
141
+ ._OutlineListItem_1nwoz_20 > ._OutlineList_1nwoz_1 {
142
+ margin: 8px 0;
141
143
  }
package/dist/index.d.ts CHANGED
@@ -50,7 +50,7 @@ type SetDataAction = {
50
50
  };
51
51
  type SetAction = {
52
52
  type: "set";
53
- state: Partial<AppState>;
53
+ state: Partial<AppState> | ((previous: AppState) => Partial<AppState>);
54
54
  };
55
55
  type RegisterZoneAction = {
56
56
  type: "registerZone";
@@ -103,7 +103,7 @@ type Data<Props extends DefaultComponentProps = DefaultComponentProps, RootProps
103
103
  };
104
104
  type ItemWithId = {
105
105
  _arrayId: string;
106
- data: any;
106
+ _originalIndex: number;
107
107
  };
108
108
  type ArrayState = {
109
109
  items: ItemWithId[];
@@ -111,6 +111,7 @@ type ArrayState = {
111
111
  };
112
112
  type UiState = {
113
113
  leftSideBarVisible: boolean;
114
+ rightSideBarVisible: boolean;
114
115
  itemSelector: ItemSelector | null;
115
116
  arrayState: Record<string, ArrayState | undefined>;
116
117
  componentList: Record<string, {
package/dist/index.js CHANGED
@@ -1084,7 +1084,7 @@ init_react_import();
1084
1084
 
1085
1085
  // css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
1086
1086
  init_react_import();
1087
- var styles_module_default = { "SidebarSection": "_SidebarSection_r7dv3_1", "SidebarSection-title": "_SidebarSection-title_r7dv3_12", "SidebarSection-content": "_SidebarSection-content_r7dv3_19", "SidebarSection--noPadding": "_SidebarSection--noPadding_r7dv3_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_r7dv3_33", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_r7dv3_44", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_r7dv3_33", "SidebarSection-heading": "_SidebarSection-heading_r7dv3_56", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_r7dv3_60" };
1087
+ var styles_module_default = { "SidebarSection": "_SidebarSection_1uyg2_1", "SidebarSection-title": "_SidebarSection-title_1uyg2_12", "SidebarSection-content": "_SidebarSection-content_1uyg2_19", "SidebarSection--noPadding": "_SidebarSection--noPadding_1uyg2_24", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_1uyg2_37", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_1uyg2_48", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_1uyg2_37", "SidebarSection-heading": "_SidebarSection-heading_1uyg2_60", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_1uyg2_64" };
1088
1088
 
1089
1089
  // ../core/lib/get-class-name-factory.ts
1090
1090
  init_react_import();
@@ -1274,6 +1274,7 @@ var defaultAppState = {
1274
1274
  data: { content: [], root: { title: "" } },
1275
1275
  ui: {
1276
1276
  leftSideBarVisible: true,
1277
+ rightSideBarVisible: true,
1277
1278
  arrayState: {},
1278
1279
  itemSelector: null,
1279
1280
  componentList: {}
@@ -1513,7 +1514,7 @@ init_react_import();
1513
1514
 
1514
1515
  // css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
1515
1516
  init_react_import();
1516
- var styles_module_default3 = { "OutlineList": "_OutlineList_pnv2s_1", "OutlineListItem": "_OutlineListItem_pnv2s_21", "OutlineListItem--clickable": "_OutlineListItem--clickable_pnv2s_36" };
1517
+ var styles_module_default3 = { "OutlineList": "_OutlineList_1nwoz_1", "OutlineListItem": "_OutlineListItem_1nwoz_20", "OutlineListItem--clickable": "_OutlineListItem--clickable_1nwoz_35" };
1517
1518
 
1518
1519
  // ../core/components/OutlineList/index.tsx
1519
1520
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -1555,7 +1556,7 @@ var dataAttr = "data-puck-heading-analyzer-id";
1555
1556
  var getOutline = ({
1556
1557
  addDataAttr = false
1557
1558
  } = {}) => {
1558
- const headings = window.document.querySelector(".puck-root").querySelectorAll("h1,h2,h3,h4,h5,h6");
1559
+ const headings = window.document.querySelector("#puck-frame").querySelectorAll("h1,h2,h3,h4,h5,h6");
1559
1560
  const _outline = [];
1560
1561
  headings.forEach((item, i) => {
1561
1562
  if (addDataAttr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-heading-analyzer",
3
- "version": "0.12.0-canary.39005a4",
3
+ "version": "0.12.0-canary.3f8ebc0",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "dist"
15
15
  ],
16
16
  "devDependencies": {
17
- "@measured/puck": "^0.12.0-canary.39005a4",
17
+ "@measured/puck": "^0.12.0-canary.3f8ebc0",
18
18
  "@types/react": "^18.2.0",
19
19
  "@types/react-dom": "^18.2.0",
20
20
  "eslint": "^7.32.0",