@cntrl-site/sdk-nextjs 0.11.1 → 0.12.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/.idea/inspectionProfiles/Project_Default.xml +4 -9
- package/.idea/workspace.xml +427 -0
- package/cntrl-site-sdk-nextjs-0.11.0.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.12.0.tgz +0 -0
- package/lib/common/useKeyframeValue.js +10 -10
- package/lib/components/Article.js +1 -1
- package/lib/components/Item.js +6 -15
- package/lib/components/Section.js +4 -1
- package/lib/components/items/ImageItem.js +3 -3
- package/lib/components/items/RectangleItem.js +3 -3
- package/lib/components/items/RichTextItem.js +2 -2
- package/lib/components/items/VideoItem.js +3 -3
- package/lib/components/items/VimeoEmbed.js +3 -3
- package/lib/components/items/YoutubeEmbed.js +3 -3
- package/lib/components/items/useEmbedVideoItem.js +2 -2
- package/lib/components/items/useFileItem.js +5 -5
- package/lib/components/items/useItemSticky.js +5 -5
- package/lib/components/items/useRectangleItem.js +5 -5
- package/lib/components/useItemAngle.js +2 -2
- package/lib/components/useItemDimensions.js +2 -2
- package/lib/components/useItemPosition.js +2 -2
- package/lib/components/useItemScale.js +2 -2
- package/lib/utils/ArticleRectManager/ArticleRectObserver.js +36 -18
- package/lib/utils/ArticleRectManager/useArticleRectObserver.js +1 -1
- package/lib/utils/ArticleRectManager/useSectionRegistry.js +14 -0
- package/lib/utils/StickyManager/StickyManager.js +2 -2
- package/package.json +1 -1
- package/src/common/useKeyframeValue.ts +10 -9
- package/src/components/Article.tsx +1 -1
- package/src/components/Item.tsx +8 -17
- package/src/components/Section.tsx +5 -1
- package/src/components/items/ImageItem.tsx +3 -3
- package/src/components/items/RectangleItem.tsx +3 -3
- package/src/components/items/RichTextItem.tsx +2 -2
- package/src/components/items/VideoItem.tsx +3 -3
- package/src/components/items/VimeoEmbed.tsx +3 -3
- package/src/components/items/YoutubeEmbed.tsx +3 -3
- package/src/components/items/useEmbedVideoItem.ts +2 -1
- package/src/components/items/useFileItem.ts +7 -3
- package/src/components/items/useItemSticky.ts +5 -6
- package/src/components/items/useRectangleItem.ts +6 -2
- package/src/components/useItemAngle.ts +3 -2
- package/src/components/useItemDimensions.ts +2 -1
- package/src/components/useItemPosition.ts +2 -1
- package/src/components/useItemScale.ts +3 -2
- package/src/utils/ArticleRectManager/ArticleRectObserver.ts +32 -15
- package/src/utils/ArticleRectManager/useArticleRectObserver.ts +1 -1
- package/src/utils/ArticleRectManager/useSectionRegistry.ts +11 -0
- package/src/utils/StickyManager/StickyManager.ts +2 -2
- package/cntrl-site-sdk-nextjs-0.10.2.tgz +0 -0
- package/cntrl-site-sdk-nextjs-0.11.1.tgz +0 -0
- package/lib/utils/castObject.js +0 -10
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
<component name="InspectionProjectProfileManager">
|
|
2
2
|
<profile version="1.0">
|
|
3
3
|
<option name="myName" value="Project Default" />
|
|
4
|
-
<inspection_tool class="
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
<item index="0" class="java.lang.String" itemvalue="jsx" />
|
|
9
|
-
</list>
|
|
10
|
-
</value>
|
|
11
|
-
</option>
|
|
12
|
-
<option name="myCustomValuesEnabled" value="true" />
|
|
4
|
+
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
|
5
|
+
<Languages>
|
|
6
|
+
<language minSize="304" name="TypeScript" />
|
|
7
|
+
</Languages>
|
|
13
8
|
</inspection_tool>
|
|
14
9
|
</profile>
|
|
15
10
|
</component>
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="AutoImportSettings">
|
|
4
|
+
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="ChangeListManager">
|
|
7
|
+
<list default="true" id="daade3cc-2214-4d1b-a6ad-012b8ae407bf" name="Changes" comment="CNTRL-1039: code fix" />
|
|
8
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
9
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
11
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="Git.Settings">
|
|
14
|
+
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
|
15
|
+
<map>
|
|
16
|
+
<entry key="$PROJECT_DIR$" value="main" />
|
|
17
|
+
</map>
|
|
18
|
+
</option>
|
|
19
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
20
|
+
</component>
|
|
21
|
+
<component name="MarkdownSettingsMigration">
|
|
22
|
+
<option name="stateVersion" value="1" />
|
|
23
|
+
</component>
|
|
24
|
+
<component name="ProjectId" id="2H4nx2LrD2TTrbJMopYKifu02PK" />
|
|
25
|
+
<component name="ProjectViewState">
|
|
26
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
|
27
|
+
<option name="showLibraryContents" value="true" />
|
|
28
|
+
</component>
|
|
29
|
+
<component name="PropertiesComponent">{
|
|
30
|
+
"keyToString": {
|
|
31
|
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
32
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
33
|
+
"WebServerToolWindowFactoryState": "false",
|
|
34
|
+
"last_opened_file_path": "/Users/admin/Documents/CNTRL/sdk-nextjs",
|
|
35
|
+
"node.js.detected.package.eslint": "true",
|
|
36
|
+
"node.js.detected.package.tslint": "true",
|
|
37
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
38
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
39
|
+
"nodejs_package_manager_path": "npm",
|
|
40
|
+
"ts.external.directory.path": "/Users/admin/Documents/CNTRL/sdk-nextjs/node_modules/typescript/lib",
|
|
41
|
+
"vue.rearranger.settings.migration": "true"
|
|
42
|
+
}
|
|
43
|
+
}</component>
|
|
44
|
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
45
|
+
<component name="TaskManager">
|
|
46
|
+
<task active="true" id="Default" summary="Default task">
|
|
47
|
+
<changelist id="daade3cc-2214-4d1b-a6ad-012b8ae407bf" name="Changes" comment="" />
|
|
48
|
+
<created>1667553465933</created>
|
|
49
|
+
<option name="number" value="Default" />
|
|
50
|
+
<option name="presentableId" value="Default" />
|
|
51
|
+
<updated>1667553465933</updated>
|
|
52
|
+
<workItem from="1667553467855" duration="59000" />
|
|
53
|
+
<workItem from="1667577252000" duration="8061000" />
|
|
54
|
+
<workItem from="1667926766782" duration="2182000" />
|
|
55
|
+
<workItem from="1668162212487" duration="28710000" />
|
|
56
|
+
<workItem from="1669397663981" duration="8121000" />
|
|
57
|
+
<workItem from="1669630429786" duration="5568000" />
|
|
58
|
+
<workItem from="1669712625667" duration="100000" />
|
|
59
|
+
<workItem from="1670846885306" duration="14667000" />
|
|
60
|
+
<workItem from="1670922174491" duration="24668000" />
|
|
61
|
+
<workItem from="1683273070032" duration="33669000" />
|
|
62
|
+
<workItem from="1685023468162" duration="174000" />
|
|
63
|
+
<workItem from="1685024252092" duration="9689000" />
|
|
64
|
+
<workItem from="1685346557713" duration="1029000" />
|
|
65
|
+
<workItem from="1685951123113" duration="73662000" />
|
|
66
|
+
</task>
|
|
67
|
+
<task id="LOCAL-00001" summary="CNTRL-484 - added embed vimeo video">
|
|
68
|
+
<created>1667586762678</created>
|
|
69
|
+
<option name="number" value="00001" />
|
|
70
|
+
<option name="presentableId" value="LOCAL-00001" />
|
|
71
|
+
<option name="project" value="LOCAL" />
|
|
72
|
+
<updated>1667586762678</updated>
|
|
73
|
+
</task>
|
|
74
|
+
<task id="LOCAL-00002" summary="CNTRL-484 - problem fix">
|
|
75
|
+
<created>1667587045426</created>
|
|
76
|
+
<option name="number" value="00002" />
|
|
77
|
+
<option name="presentableId" value="LOCAL-00002" />
|
|
78
|
+
<option name="project" value="LOCAL" />
|
|
79
|
+
<updated>1667587045426</updated>
|
|
80
|
+
</task>
|
|
81
|
+
<task id="LOCAL-00003" summary="CNTRL-484 - version bump">
|
|
82
|
+
<created>1667587257510</created>
|
|
83
|
+
<option name="number" value="00003" />
|
|
84
|
+
<option name="presentableId" value="LOCAL-00003" />
|
|
85
|
+
<option name="project" value="LOCAL" />
|
|
86
|
+
<updated>1667587257510</updated>
|
|
87
|
+
</task>
|
|
88
|
+
<task id="LOCAL-00004" summary="CNTRL-486 - added youtube item">
|
|
89
|
+
<created>1668184730139</created>
|
|
90
|
+
<option name="number" value="00004" />
|
|
91
|
+
<option name="presentableId" value="LOCAL-00004" />
|
|
92
|
+
<option name="project" value="LOCAL" />
|
|
93
|
+
<updated>1668184730139</updated>
|
|
94
|
+
</task>
|
|
95
|
+
<task id="LOCAL-00005" summary="CNTRL-486 - added youtube type">
|
|
96
|
+
<created>1668185842201</created>
|
|
97
|
+
<option name="number" value="00005" />
|
|
98
|
+
<option name="presentableId" value="LOCAL-00005" />
|
|
99
|
+
<option name="project" value="LOCAL" />
|
|
100
|
+
<updated>1668185842201</updated>
|
|
101
|
+
</task>
|
|
102
|
+
<task id="LOCAL-00006" summary="CNTRL-486 - youtube fixes">
|
|
103
|
+
<created>1668193338566</created>
|
|
104
|
+
<option name="number" value="00006" />
|
|
105
|
+
<option name="presentableId" value="LOCAL-00006" />
|
|
106
|
+
<option name="project" value="LOCAL" />
|
|
107
|
+
<updated>1668193338566</updated>
|
|
108
|
+
</task>
|
|
109
|
+
<task id="LOCAL-00007" summary="CNTRL-486 - added mute to video when autoplay On">
|
|
110
|
+
<created>1668504184323</created>
|
|
111
|
+
<option name="number" value="00007" />
|
|
112
|
+
<option name="presentableId" value="LOCAL-00007" />
|
|
113
|
+
<option name="project" value="LOCAL" />
|
|
114
|
+
<updated>1668504184323</updated>
|
|
115
|
+
</task>
|
|
116
|
+
<task id="LOCAL-00008" summary="CNTRL-486 - added search params to Url">
|
|
117
|
+
<created>1668506131079</created>
|
|
118
|
+
<option name="number" value="00008" />
|
|
119
|
+
<option name="presentableId" value="LOCAL-00008" />
|
|
120
|
+
<option name="project" value="LOCAL" />
|
|
121
|
+
<updated>1668506131079</updated>
|
|
122
|
+
</task>
|
|
123
|
+
<task id="LOCAL-00009" summary="CNTRL-486 - version update">
|
|
124
|
+
<created>1668508864371</created>
|
|
125
|
+
<option name="number" value="00009" />
|
|
126
|
+
<option name="presentableId" value="LOCAL-00009" />
|
|
127
|
+
<option name="project" value="LOCAL" />
|
|
128
|
+
<updated>1668508864371</updated>
|
|
129
|
+
</task>
|
|
130
|
+
<task id="LOCAL-00010" summary="CNTRL-486 - version bump">
|
|
131
|
+
<created>1668509275485</created>
|
|
132
|
+
<option name="number" value="00010" />
|
|
133
|
+
<option name="presentableId" value="LOCAL-00010" />
|
|
134
|
+
<option name="project" value="LOCAL" />
|
|
135
|
+
<updated>1668509275485</updated>
|
|
136
|
+
</task>
|
|
137
|
+
<task id="LOCAL-00011" summary="CNTRL-486 - version bump">
|
|
138
|
+
<created>1668509525445</created>
|
|
139
|
+
<option name="number" value="00011" />
|
|
140
|
+
<option name="presentableId" value="LOCAL-00011" />
|
|
141
|
+
<option name="project" value="LOCAL" />
|
|
142
|
+
<updated>1668509525445</updated>
|
|
143
|
+
</task>
|
|
144
|
+
<task id="LOCAL-00012" summary="CNTRL-486 - fixes">
|
|
145
|
+
<created>1669397733023</created>
|
|
146
|
+
<option name="number" value="00012" />
|
|
147
|
+
<option name="presentableId" value="LOCAL-00012" />
|
|
148
|
+
<option name="project" value="LOCAL" />
|
|
149
|
+
<updated>1669397733023</updated>
|
|
150
|
+
</task>
|
|
151
|
+
<task id="LOCAL-00013" summary="CNTRL-486 - fixes">
|
|
152
|
+
<created>1669402876183</created>
|
|
153
|
+
<option name="number" value="00013" />
|
|
154
|
+
<option name="presentableId" value="LOCAL-00013" />
|
|
155
|
+
<option name="project" value="LOCAL" />
|
|
156
|
+
<updated>1669402876183</updated>
|
|
157
|
+
</task>
|
|
158
|
+
<task id="LOCAL-00014" summary="CNTRL-486 - fixes">
|
|
159
|
+
<created>1669402893251</created>
|
|
160
|
+
<option name="number" value="00014" />
|
|
161
|
+
<option name="presentableId" value="LOCAL-00014" />
|
|
162
|
+
<option name="project" value="LOCAL" />
|
|
163
|
+
<updated>1669402893251</updated>
|
|
164
|
+
</task>
|
|
165
|
+
<task id="LOCAL-00015" summary="CNTRL-486 - fixes">
|
|
166
|
+
<created>1669405389296</created>
|
|
167
|
+
<option name="number" value="00015" />
|
|
168
|
+
<option name="presentableId" value="LOCAL-00015" />
|
|
169
|
+
<option name="project" value="LOCAL" />
|
|
170
|
+
<updated>1669405389296</updated>
|
|
171
|
+
</task>
|
|
172
|
+
<task id="LOCAL-00016" summary="CNTRL-486 - fixes">
|
|
173
|
+
<created>1669405966077</created>
|
|
174
|
+
<option name="number" value="00016" />
|
|
175
|
+
<option name="presentableId" value="LOCAL-00016" />
|
|
176
|
+
<option name="project" value="LOCAL" />
|
|
177
|
+
<updated>1669405966077</updated>
|
|
178
|
+
</task>
|
|
179
|
+
<task id="LOCAL-00017" summary="CNTRL-486 - version bump">
|
|
180
|
+
<created>1669408571358</created>
|
|
181
|
+
<option name="number" value="00017" />
|
|
182
|
+
<option name="presentableId" value="LOCAL-00017" />
|
|
183
|
+
<option name="project" value="LOCAL" />
|
|
184
|
+
<updated>1669408571358</updated>
|
|
185
|
+
</task>
|
|
186
|
+
<task id="LOCAL-00018" summary="CNTRL-617 Youtube anf vimeo videos Url update">
|
|
187
|
+
<created>1669635492235</created>
|
|
188
|
+
<option name="number" value="00018" />
|
|
189
|
+
<option name="presentableId" value="LOCAL-00018" />
|
|
190
|
+
<option name="project" value="LOCAL" />
|
|
191
|
+
<updated>1669635492235</updated>
|
|
192
|
+
</task>
|
|
193
|
+
<task id="LOCAL-00019" summary="CNTRL-617 Version bump">
|
|
194
|
+
<created>1669635593460</created>
|
|
195
|
+
<option name="number" value="00019" />
|
|
196
|
+
<option name="presentableId" value="LOCAL-00019" />
|
|
197
|
+
<option name="project" value="LOCAL" />
|
|
198
|
+
<updated>1669635593460</updated>
|
|
199
|
+
</task>
|
|
200
|
+
<task id="LOCAL-00020" summary="CNTRL-694 added valid url builder">
|
|
201
|
+
<created>1670861002829</created>
|
|
202
|
+
<option name="number" value="00020" />
|
|
203
|
+
<option name="presentableId" value="LOCAL-00020" />
|
|
204
|
+
<option name="project" value="LOCAL" />
|
|
205
|
+
<updated>1670861002829</updated>
|
|
206
|
+
</task>
|
|
207
|
+
<task id="LOCAL-00021" summary="CNTRL-694 added code styling and version bump">
|
|
208
|
+
<created>1670862883753</created>
|
|
209
|
+
<option name="number" value="00021" />
|
|
210
|
+
<option name="presentableId" value="LOCAL-00021" />
|
|
211
|
+
<option name="project" value="LOCAL" />
|
|
212
|
+
<updated>1670862883753</updated>
|
|
213
|
+
</task>
|
|
214
|
+
<task id="LOCAL-00022" summary="CNTRL-694 comments fix">
|
|
215
|
+
<created>1670864771128</created>
|
|
216
|
+
<option name="number" value="00022" />
|
|
217
|
+
<option name="presentableId" value="LOCAL-00022" />
|
|
218
|
+
<option name="project" value="LOCAL" />
|
|
219
|
+
<updated>1670864771128</updated>
|
|
220
|
+
</task>
|
|
221
|
+
<task id="LOCAL-00023" summary="CNTRL-694 undefined url fix">
|
|
222
|
+
<created>1670947749514</created>
|
|
223
|
+
<option name="number" value="00023" />
|
|
224
|
+
<option name="presentableId" value="LOCAL-00023" />
|
|
225
|
+
<option name="project" value="LOCAL" />
|
|
226
|
+
<updated>1670947749514</updated>
|
|
227
|
+
</task>
|
|
228
|
+
<task id="LOCAL-00024" summary="CNTRL-694 version bump">
|
|
229
|
+
<created>1670948708761</created>
|
|
230
|
+
<option name="number" value="00024" />
|
|
231
|
+
<option name="presentableId" value="LOCAL-00024" />
|
|
232
|
+
<option name="project" value="LOCAL" />
|
|
233
|
+
<updated>1670948708762</updated>
|
|
234
|
+
</task>
|
|
235
|
+
<task id="LOCAL-00025" summary="CNTRL-427: changed Item w and h params">
|
|
236
|
+
<created>1670952164829</created>
|
|
237
|
+
<option name="number" value="00025" />
|
|
238
|
+
<option name="presentableId" value="LOCAL-00025" />
|
|
239
|
+
<option name="project" value="LOCAL" />
|
|
240
|
+
<updated>1670952164829</updated>
|
|
241
|
+
</task>
|
|
242
|
+
<task id="LOCAL-00026" summary="CNTRL-427: changed white-space prop to normal for all text aligns">
|
|
243
|
+
<created>1671017859114</created>
|
|
244
|
+
<option name="number" value="00026" />
|
|
245
|
+
<option name="presentableId" value="LOCAL-00026" />
|
|
246
|
+
<option name="project" value="LOCAL" />
|
|
247
|
+
<updated>1671017859114</updated>
|
|
248
|
+
</task>
|
|
249
|
+
<task id="LOCAL-00027" summary="CNTRL-427: deleted unused import">
|
|
250
|
+
<created>1671017914825</created>
|
|
251
|
+
<option name="number" value="00027" />
|
|
252
|
+
<option name="presentableId" value="LOCAL-00027" />
|
|
253
|
+
<option name="project" value="LOCAL" />
|
|
254
|
+
<updated>1671017914825</updated>
|
|
255
|
+
</task>
|
|
256
|
+
<task id="LOCAL-00028" summary="CNTRL-427: version bump">
|
|
257
|
+
<created>1671097766100</created>
|
|
258
|
+
<option name="number" value="00028" />
|
|
259
|
+
<option name="presentableId" value="LOCAL-00028" />
|
|
260
|
+
<option name="project" value="LOCAL" />
|
|
261
|
+
<updated>1671097766100</updated>
|
|
262
|
+
</task>
|
|
263
|
+
<task id="LOCAL-00029" summary="CNTRL-861: added scale for item">
|
|
264
|
+
<created>1683462977817</created>
|
|
265
|
+
<option name="number" value="00029" />
|
|
266
|
+
<option name="presentableId" value="LOCAL-00029" />
|
|
267
|
+
<option name="project" value="LOCAL" />
|
|
268
|
+
<updated>1683462977817</updated>
|
|
269
|
+
</task>
|
|
270
|
+
<task id="LOCAL-00030" summary="CNTRL-861: added scale to cover div">
|
|
271
|
+
<created>1683464547773</created>
|
|
272
|
+
<option name="number" value="00030" />
|
|
273
|
+
<option name="presentableId" value="LOCAL-00030" />
|
|
274
|
+
<option name="project" value="LOCAL" />
|
|
275
|
+
<updated>1683464547774</updated>
|
|
276
|
+
</task>
|
|
277
|
+
<task id="LOCAL-00031" summary="CNTRL-861: fixes">
|
|
278
|
+
<created>1683464779856</created>
|
|
279
|
+
<option name="number" value="00031" />
|
|
280
|
+
<option name="presentableId" value="LOCAL-00031" />
|
|
281
|
+
<option name="project" value="LOCAL" />
|
|
282
|
+
<updated>1683464779856</updated>
|
|
283
|
+
</task>
|
|
284
|
+
<task id="LOCAL-00032" summary="CNTRL-861: added rotate to items">
|
|
285
|
+
<created>1683474659610</created>
|
|
286
|
+
<option name="number" value="00032" />
|
|
287
|
+
<option name="presentableId" value="LOCAL-00032" />
|
|
288
|
+
<option name="project" value="LOCAL" />
|
|
289
|
+
<updated>1683474659610</updated>
|
|
290
|
+
</task>
|
|
291
|
+
<task id="LOCAL-00033" summary="CNTRL-861: fixes">
|
|
292
|
+
<created>1683474875208</created>
|
|
293
|
+
<option name="number" value="00033" />
|
|
294
|
+
<option name="presentableId" value="LOCAL-00033" />
|
|
295
|
+
<option name="project" value="LOCAL" />
|
|
296
|
+
<updated>1683474875208</updated>
|
|
297
|
+
</task>
|
|
298
|
+
<task id="LOCAL-00034" summary="CNTRL-861: fixes">
|
|
299
|
+
<created>1683474899380</created>
|
|
300
|
+
<option name="number" value="00034" />
|
|
301
|
+
<option name="presentableId" value="LOCAL-00034" />
|
|
302
|
+
<option name="project" value="LOCAL" />
|
|
303
|
+
<updated>1683474899380</updated>
|
|
304
|
+
</task>
|
|
305
|
+
<task id="LOCAL-00035" summary="CNTRL-861: fixe">
|
|
306
|
+
<created>1683476057882</created>
|
|
307
|
+
<option name="number" value="00035" />
|
|
308
|
+
<option name="presentableId" value="LOCAL-00035" />
|
|
309
|
+
<option name="project" value="LOCAL" />
|
|
310
|
+
<updated>1683476057882</updated>
|
|
311
|
+
</task>
|
|
312
|
+
<task id="LOCAL-00036" summary="CNTRL-861: comment fix">
|
|
313
|
+
<created>1683477122292</created>
|
|
314
|
+
<option name="number" value="00036" />
|
|
315
|
+
<option name="presentableId" value="LOCAL-00036" />
|
|
316
|
+
<option name="project" value="LOCAL" />
|
|
317
|
+
<updated>1683477122292</updated>
|
|
318
|
+
</task>
|
|
319
|
+
<task id="LOCAL-00037" summary="CNTRL-1039: sdk version bump">
|
|
320
|
+
<created>1685957591389</created>
|
|
321
|
+
<option name="number" value="00037" />
|
|
322
|
+
<option name="presentableId" value="LOCAL-00037" />
|
|
323
|
+
<option name="project" value="LOCAL" />
|
|
324
|
+
<updated>1685957591389</updated>
|
|
325
|
+
</task>
|
|
326
|
+
<task id="LOCAL-00038" summary="CNTRL-1039: WIP: added section registry class and changed article rect observer">
|
|
327
|
+
<created>1686058816825</created>
|
|
328
|
+
<option name="number" value="00038" />
|
|
329
|
+
<option name="presentableId" value="LOCAL-00038" />
|
|
330
|
+
<option name="project" value="LOCAL" />
|
|
331
|
+
<updated>1686058816826</updated>
|
|
332
|
+
</task>
|
|
333
|
+
<task id="LOCAL-00039" summary="CNTRL-1039: added section base animations and sticky">
|
|
334
|
+
<created>1686240635490</created>
|
|
335
|
+
<option name="number" value="00039" />
|
|
336
|
+
<option name="presentableId" value="LOCAL-00039" />
|
|
337
|
+
<option name="project" value="LOCAL" />
|
|
338
|
+
<updated>1686240635490</updated>
|
|
339
|
+
</task>
|
|
340
|
+
<task id="LOCAL-00040" summary="CNTRL-1039: code fix">
|
|
341
|
+
<created>1686240730070</created>
|
|
342
|
+
<option name="number" value="00040" />
|
|
343
|
+
<option name="presentableId" value="LOCAL-00040" />
|
|
344
|
+
<option name="project" value="LOCAL" />
|
|
345
|
+
<updated>1686240730070</updated>
|
|
346
|
+
</task>
|
|
347
|
+
<task id="LOCAL-00041" summary="CNTRL-1039: code fix">
|
|
348
|
+
<created>1686298003197</created>
|
|
349
|
+
<option name="number" value="00041" />
|
|
350
|
+
<option name="presentableId" value="LOCAL-00041" />
|
|
351
|
+
<option name="project" value="LOCAL" />
|
|
352
|
+
<updated>1686298003197</updated>
|
|
353
|
+
</task>
|
|
354
|
+
<task id="LOCAL-00042" summary="CNTRL-1039: sdk version bump">
|
|
355
|
+
<created>1686299892024</created>
|
|
356
|
+
<option name="number" value="00042" />
|
|
357
|
+
<option name="presentableId" value="LOCAL-00042" />
|
|
358
|
+
<option name="project" value="LOCAL" />
|
|
359
|
+
<updated>1686299892024</updated>
|
|
360
|
+
</task>
|
|
361
|
+
<task id="LOCAL-00043" summary="CNTRL-1039: sdk version bump">
|
|
362
|
+
<created>1686301611042</created>
|
|
363
|
+
<option name="number" value="00043" />
|
|
364
|
+
<option name="presentableId" value="LOCAL-00043" />
|
|
365
|
+
<option name="project" value="LOCAL" />
|
|
366
|
+
<updated>1686301611042</updated>
|
|
367
|
+
</task>
|
|
368
|
+
<task id="LOCAL-00044" summary="CNTRL-1039: removed section geometry service">
|
|
369
|
+
<created>1686302079828</created>
|
|
370
|
+
<option name="number" value="00044" />
|
|
371
|
+
<option name="presentableId" value="LOCAL-00044" />
|
|
372
|
+
<option name="project" value="LOCAL" />
|
|
373
|
+
<updated>1686302079828</updated>
|
|
374
|
+
</task>
|
|
375
|
+
<task id="LOCAL-00045" summary="CNTRL-1039: code fix">
|
|
376
|
+
<created>1686302624003</created>
|
|
377
|
+
<option name="number" value="00045" />
|
|
378
|
+
<option name="presentableId" value="LOCAL-00045" />
|
|
379
|
+
<option name="project" value="LOCAL" />
|
|
380
|
+
<updated>1686302624004</updated>
|
|
381
|
+
</task>
|
|
382
|
+
<option name="localTasksCounter" value="46" />
|
|
383
|
+
<servers />
|
|
384
|
+
</component>
|
|
385
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
386
|
+
<option name="version" value="3" />
|
|
387
|
+
</component>
|
|
388
|
+
<component name="Vcs.Log.Tabs.Properties">
|
|
389
|
+
<option name="TAB_STATES">
|
|
390
|
+
<map>
|
|
391
|
+
<entry key="MAIN">
|
|
392
|
+
<value>
|
|
393
|
+
<State />
|
|
394
|
+
</value>
|
|
395
|
+
</entry>
|
|
396
|
+
</map>
|
|
397
|
+
</option>
|
|
398
|
+
</component>
|
|
399
|
+
<component name="VcsManagerConfiguration">
|
|
400
|
+
<MESSAGE value="CNTRL-486 - version update" />
|
|
401
|
+
<MESSAGE value="CNTRL-486 - fixes" />
|
|
402
|
+
<MESSAGE value="CNTRL-486 - version bump" />
|
|
403
|
+
<MESSAGE value="CNTRL-617 Youtube anf vimeo videos Url update" />
|
|
404
|
+
<MESSAGE value="CNTRL-617 Version bump" />
|
|
405
|
+
<MESSAGE value="CNTRL-694 added valid url builder" />
|
|
406
|
+
<MESSAGE value="CNTRL-694 added code styling and version bump" />
|
|
407
|
+
<MESSAGE value="CNTRL-694 comments fix" />
|
|
408
|
+
<MESSAGE value="CNTRL-694 undefined url fix" />
|
|
409
|
+
<MESSAGE value="CNTRL-694 version bump" />
|
|
410
|
+
<MESSAGE value="CNTRL-427: changed Item w and h params" />
|
|
411
|
+
<MESSAGE value="CNTRL-427: changed white-space prop to normal for all text aligns" />
|
|
412
|
+
<MESSAGE value="CNTRL-427: deleted unused import" />
|
|
413
|
+
<MESSAGE value="CNTRL-427: version bump" />
|
|
414
|
+
<MESSAGE value="CNTRL-861: added scale for item" />
|
|
415
|
+
<MESSAGE value="CNTRL-861: added scale to cover div" />
|
|
416
|
+
<MESSAGE value="CNTRL-861: added rotate to items" />
|
|
417
|
+
<MESSAGE value="CNTRL-861: fixes" />
|
|
418
|
+
<MESSAGE value="CNTRL-861: fixe" />
|
|
419
|
+
<MESSAGE value="CNTRL-861: comment fix" />
|
|
420
|
+
<MESSAGE value="CNTRL-1039: WIP: added section registry class and changed article rect observer" />
|
|
421
|
+
<MESSAGE value="CNTRL-1039: added section base animations and sticky" />
|
|
422
|
+
<MESSAGE value="CNTRL-1039: sdk version bump" />
|
|
423
|
+
<MESSAGE value="CNTRL-1039: removed section geometry service" />
|
|
424
|
+
<MESSAGE value="CNTRL-1039: code fix" />
|
|
425
|
+
<option name="LAST_COMMIT_MESSAGE" value="CNTRL-1039: code fix" />
|
|
426
|
+
</component>
|
|
427
|
+
</project>
|
|
Binary file
|
|
Binary file
|
|
@@ -11,7 +11,7 @@ const useCurrentLayout_1 = require("./useCurrentLayout");
|
|
|
11
11
|
const KeyframesContext_1 = require("../provider/KeyframesContext");
|
|
12
12
|
const Animator_1 = require("../utils/Animator/Animator");
|
|
13
13
|
const emptyDeps = [];
|
|
14
|
-
const useKeyframeValue = (item, itemParamsGetter, animatorGetter, deps = emptyDeps) => {
|
|
14
|
+
const useKeyframeValue = (item, itemParamsGetter, animatorGetter, sectionId, deps = emptyDeps) => {
|
|
15
15
|
const animatorGetterRef = (0, react_1.useRef)(animatorGetter);
|
|
16
16
|
const itemParamsGetterRef = (0, react_1.useRef)(itemParamsGetter);
|
|
17
17
|
animatorGetterRef.current = animatorGetter;
|
|
@@ -50,27 +50,27 @@ const useKeyframeValue = (item, itemParamsGetter, animatorGetter, deps = emptyDe
|
|
|
50
50
|
setAdjustedValue(paramValue);
|
|
51
51
|
}, [paramValue]);
|
|
52
52
|
(0, react_1.useEffect)(() => {
|
|
53
|
-
if (!articleRectObserver)
|
|
53
|
+
if (!articleRectObserver || !animator)
|
|
54
54
|
return;
|
|
55
|
-
const scroll = articleRectObserver.
|
|
55
|
+
const scroll = articleRectObserver.getSectionScroll(sectionId);
|
|
56
56
|
handleKeyframeValue(scroll);
|
|
57
|
-
}, [articleRectObserver, handleKeyframeValue]);
|
|
57
|
+
}, [articleRectObserver, handleKeyframeValue, animator]);
|
|
58
58
|
(0, react_1.useEffect)(() => {
|
|
59
|
-
if (!articleRectObserver)
|
|
59
|
+
if (!articleRectObserver || !animator)
|
|
60
60
|
return;
|
|
61
61
|
return articleRectObserver.on('resize', () => {
|
|
62
|
-
const scroll = articleRectObserver.
|
|
62
|
+
const scroll = articleRectObserver.getSectionScroll(sectionId);
|
|
63
63
|
handleKeyframeValue(scroll);
|
|
64
64
|
});
|
|
65
|
-
}, [handleKeyframeValue, articleRectObserver]);
|
|
65
|
+
}, [handleKeyframeValue, articleRectObserver, animator]);
|
|
66
66
|
(0, react_1.useEffect)(() => {
|
|
67
|
-
if (!articleRectObserver)
|
|
67
|
+
if (!articleRectObserver || !animator)
|
|
68
68
|
return;
|
|
69
69
|
return articleRectObserver.on('scroll', () => {
|
|
70
|
-
const scroll = articleRectObserver.
|
|
70
|
+
const scroll = articleRectObserver.getSectionScroll(sectionId);
|
|
71
71
|
handleKeyframeValue(scroll);
|
|
72
72
|
});
|
|
73
|
-
}, [handleKeyframeValue, articleRectObserver]);
|
|
73
|
+
}, [handleKeyframeValue, articleRectObserver, animator]);
|
|
74
74
|
return adjustedValue;
|
|
75
75
|
};
|
|
76
76
|
exports.useKeyframeValue = useKeyframeValue;
|
|
@@ -17,7 +17,7 @@ const Article = ({ article, sectionData }) => {
|
|
|
17
17
|
const id = (0, react_1.useId)();
|
|
18
18
|
return ((0, jsx_runtime_1.jsxs)(ArticleRectContext_1.ArticleRectContext.Provider, { value: articleRectObserver, children: [(0, jsx_runtime_1.jsx)("div", { className: "article", ref: articleRef, children: article.sections.map((section, i) => {
|
|
19
19
|
const data = section.name ? sectionData[section.name] : {};
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(Section_1.Section, { section: section, data: data, children: article.sections[i].items.map(item => ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item }, item.id))) }, section.id));
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(Section_1.Section, { section: section, data: data, children: article.sections[i].items.map(item => ((0, jsx_runtime_1.jsx)(Item_1.Item, { item: item, sectionId: section.id }, item.id))) }, section.id));
|
|
21
21
|
}) }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
22
22
|
.article {
|
|
23
23
|
position: relative;
|
package/lib/components/Item.js
CHANGED
|
@@ -19,7 +19,6 @@ const useCntrlContext_1 = require("../provider/useCntrlContext");
|
|
|
19
19
|
const useItemPosition_1 = require("./useItemPosition");
|
|
20
20
|
const useItemDimensions_1 = require("./useItemDimensions");
|
|
21
21
|
const useItemSticky_1 = require("./items/useItemSticky");
|
|
22
|
-
const castObject_1 = require("../utils/castObject");
|
|
23
22
|
const useCurrentLayout_1 = require("../common/useCurrentLayout");
|
|
24
23
|
const useItemScale_1 = require("./useItemScale");
|
|
25
24
|
const ScaleAnchorMap_1 = require("../utils/ScaleAnchorMap");
|
|
@@ -33,16 +32,14 @@ const itemsMap = {
|
|
|
33
32
|
[sdk_1.ArticleItemType.Custom]: CustomItem_1.CustomItem
|
|
34
33
|
};
|
|
35
34
|
const noop = () => null;
|
|
36
|
-
const Item = ({ item }) => {
|
|
35
|
+
const Item = ({ item, sectionId }) => {
|
|
37
36
|
const id = (0, react_1.useId)();
|
|
38
37
|
const { layouts } = (0, useCntrlContext_1.useCntrlContext)();
|
|
39
|
-
const { scale, scaleAnchor } = (0, useItemScale_1.useItemScale)(item);
|
|
40
|
-
const position = (0, useItemPosition_1.useItemPosition)(item);
|
|
38
|
+
const { scale, scaleAnchor } = (0, useItemScale_1.useItemScale)(item, sectionId);
|
|
39
|
+
const position = (0, useItemPosition_1.useItemPosition)(item, sectionId);
|
|
41
40
|
const layout = (0, useCurrentLayout_1.useCurrentLayout)();
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const { top, isFixed } = (0, useItemSticky_1.useItemSticky)(position.top, parentOffsetTop, item);
|
|
45
|
-
const { width, height } = (0, useItemDimensions_1.useItemDimensions)(item);
|
|
41
|
+
const { top, isFixed } = (0, useItemSticky_1.useItemSticky)(position.top, item, sectionId);
|
|
42
|
+
const { width, height } = (0, useItemDimensions_1.useItemDimensions)(item, sectionId);
|
|
46
43
|
const layoutValues = [item.area];
|
|
47
44
|
const isInitialRef = (0, react_1.useRef)(true);
|
|
48
45
|
if (item.layoutParams) {
|
|
@@ -56,12 +53,6 @@ const Item = ({ item }) => {
|
|
|
56
53
|
(0, react_1.useEffect)(() => {
|
|
57
54
|
isInitialRef.current = false;
|
|
58
55
|
}, []);
|
|
59
|
-
(0, react_1.useEffect)(() => {
|
|
60
|
-
if (!ref)
|
|
61
|
-
return;
|
|
62
|
-
const offsetParent = (0, castObject_1.castObject)(ref.offsetParent, HTMLElement);
|
|
63
|
-
setParentOffsetTop(offsetParent.offsetTop / window.innerWidth);
|
|
64
|
-
}, [ref]);
|
|
65
56
|
const styles = {
|
|
66
57
|
transform: `scale(${scale})`,
|
|
67
58
|
transformOrigin: ScaleAnchorMap_1.ScaleAnchorMap[scaleAnchor],
|
|
@@ -70,7 +61,7 @@ const Item = ({ item }) => {
|
|
|
70
61
|
height: `${sizingAxis.y === sdk_1.ArticleItemSizingType.Manual ? `${height * 100}vw` : 'unset'}`,
|
|
71
62
|
top
|
|
72
63
|
};
|
|
73
|
-
return ((0, jsx_runtime_1.jsxs)("div", { suppressHydrationWarning: true, className: `item-${item.id}`,
|
|
64
|
+
return ((0, jsx_runtime_1.jsxs)("div", { suppressHydrationWarning: true, className: `item-${item.id}`, style: isInitialRef.current ? {} : { ...styles, position: isFixed ? 'fixed' : 'absolute' }, children: [(0, jsx_runtime_1.jsx)(ItemComponent, { item: item, sectionId: sectionId }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
74
65
|
${(0, sdk_1.getLayoutStyles)(layouts, layoutValues, ([area, layoutParams]) => {
|
|
75
66
|
const sizingAxis = parseSizing(layoutParams.sizing);
|
|
76
67
|
return (`
|
|
@@ -10,11 +10,14 @@ const style_1 = __importDefault(require("styled-jsx/style"));
|
|
|
10
10
|
const sdk_1 = require("@cntrl-site/sdk");
|
|
11
11
|
const useCntrlContext_1 = require("../provider/useCntrlContext");
|
|
12
12
|
const useSectionColor_1 = require("./useSectionColor");
|
|
13
|
+
const useSectionRegistry_1 = require("../utils/ArticleRectManager/useSectionRegistry");
|
|
13
14
|
const Section = ({ section, data, children }) => {
|
|
14
15
|
const id = (0, react_1.useId)();
|
|
16
|
+
const sectionRef = (0, react_1.useRef)(null);
|
|
15
17
|
const { layouts, customSections } = (0, useCntrlContext_1.useCntrlContext)();
|
|
16
18
|
const backgroundColor = (0, useSectionColor_1.useSectionColor)(section.color);
|
|
17
19
|
const SectionComponent = section.name ? customSections.getComponent(section.name) : undefined;
|
|
20
|
+
(0, useSectionRegistry_1.useSectionRegistry)(section.id, sectionRef.current);
|
|
18
21
|
const getSectionVisibilityStyles = () => {
|
|
19
22
|
return layouts
|
|
20
23
|
.sort((a, b) => a.startsWith - b.startsWith)
|
|
@@ -33,7 +36,7 @@ const Section = ({ section, data, children }) => {
|
|
|
33
36
|
return (0, jsx_runtime_1.jsx)(SectionComponent, { data: data, children: children });
|
|
34
37
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `section-${section.id}`, id: section.name, style: {
|
|
35
38
|
backgroundColor: backgroundColor
|
|
36
|
-
}, children: children }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
39
|
+
}, ref: sectionRef, children: children }), (0, jsx_runtime_1.jsx)(style_1.default, { id: id, children: `
|
|
37
40
|
${(0, sdk_1.getLayoutStyles)(layouts, [section.height], ([height]) => (`
|
|
38
41
|
.section-${section.id} {
|
|
39
42
|
height: ${getSectionHeight(height)};
|
|
@@ -11,10 +11,10 @@ const sdk_1 = require("@cntrl-site/sdk");
|
|
|
11
11
|
const LinkWrapper_1 = require("../LinkWrapper");
|
|
12
12
|
const useFileItem_1 = require("./useFileItem");
|
|
13
13
|
const useItemAngle_1 = require("../useItemAngle");
|
|
14
|
-
const ImageItem = ({ item }) => {
|
|
14
|
+
const ImageItem = ({ item, sectionId }) => {
|
|
15
15
|
const id = (0, react_1.useId)();
|
|
16
|
-
const { radius, strokeWidth, opacity, strokeColor } = (0, useFileItem_1.useFileItem)(item);
|
|
17
|
-
const angle = (0, useItemAngle_1.useItemAngle)(item);
|
|
16
|
+
const { radius, strokeWidth, opacity, strokeColor } = (0, useFileItem_1.useFileItem)(item, sectionId);
|
|
17
|
+
const angle = (0, useItemAngle_1.useItemAngle)(item, sectionId);
|
|
18
18
|
const borderColor = (0, react_1.useMemo)(() => sdk_1.CntrlColor.parse(strokeColor).toCss(), [strokeColor]);
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: item.link?.url, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `image-wrapper-${item.id}`, style: {
|
|
20
20
|
borderRadius: `${radius * 100}vw`,
|
|
@@ -11,10 +11,10 @@ const sdk_1 = require("@cntrl-site/sdk");
|
|
|
11
11
|
const LinkWrapper_1 = require("../LinkWrapper");
|
|
12
12
|
const useRectangleItem_1 = require("./useRectangleItem");
|
|
13
13
|
const useItemAngle_1 = require("../useItemAngle");
|
|
14
|
-
const RectangleItem = ({ item }) => {
|
|
14
|
+
const RectangleItem = ({ item, sectionId }) => {
|
|
15
15
|
const id = (0, react_1.useId)();
|
|
16
|
-
const { fillColor, radius, strokeWidth, strokeColor } = (0, useRectangleItem_1.useRectangleItem)(item);
|
|
17
|
-
const angle = (0, useItemAngle_1.useItemAngle)(item);
|
|
16
|
+
const { fillColor, radius, strokeWidth, strokeColor } = (0, useRectangleItem_1.useRectangleItem)(item, sectionId);
|
|
17
|
+
const angle = (0, useItemAngle_1.useItemAngle)(item, sectionId);
|
|
18
18
|
const backgroundColor = (0, react_1.useMemo)(() => sdk_1.CntrlColor.parse(fillColor).toCss(), [fillColor]);
|
|
19
19
|
const borderColor = (0, react_1.useMemo)(() => sdk_1.CntrlColor.parse(strokeColor).toCss(), [strokeColor]);
|
|
20
20
|
return ((0, jsx_runtime_1.jsx)(LinkWrapper_1.LinkWrapper, { url: item.link?.url, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: `rectangle-${item.id}`, style: {
|
|
@@ -8,9 +8,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const style_1 = __importDefault(require("styled-jsx/style"));
|
|
9
9
|
const useRichTextItem_1 = require("./useRichTextItem");
|
|
10
10
|
const useItemAngle_1 = require("../useItemAngle");
|
|
11
|
-
const RichTextItem = ({ item }) => {
|
|
11
|
+
const RichTextItem = ({ item, sectionId }) => {
|
|
12
12
|
const [content, styles, preset] = (0, useRichTextItem_1.useRichTextItem)(item);
|
|
13
|
-
const angle = (0, useItemAngle_1.useItemAngle)(item);
|
|
13
|
+
const angle = (0, useItemAngle_1.useItemAngle)(item, sectionId);
|
|
14
14
|
const className = preset ? `cntrl-preset-${preset.id}` : undefined;
|
|
15
15
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: className, style: {
|
|
16
16
|
transform: `rotate(${angle}deg)`
|