@livepreso/content-react 0.4.3 → 0.5.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/CHANGELOG.json +12 -0
- package/CHANGELOG.md +8 -1
- package/lib/hooks/use-root-slide.js +15 -0
- package/lib/hooks/use-slide.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livepreso/content-react",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.5.0",
|
|
6
|
+
"tag": "@livepreso/content-react_v0.5.0",
|
|
7
|
+
"date": "Tue, 26 Nov 2024 03:54:55 GMT",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"comment": "Add internal presentation slide key to useSlide()"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.4.3",
|
|
6
18
|
"tag": "@livepreso/content-react_v0.4.3",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @livepreso/content-react
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 26 Nov 2024 03:54:55 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.5.0
|
|
6
|
+
Tue, 26 Nov 2024 03:54:55 GMT
|
|
7
|
+
|
|
8
|
+
### Minor changes
|
|
9
|
+
|
|
10
|
+
- Add internal presentation slide key to useSlide()
|
|
4
11
|
|
|
5
12
|
## 0.4.3
|
|
6
13
|
Thu, 21 Nov 2024 01:14:47 GMT
|
|
@@ -24,6 +24,7 @@ export function useRootSlide(article) {
|
|
|
24
24
|
const { isRemote, isClient, isMaster } = useModes();
|
|
25
25
|
const slideID = article.attr("id");
|
|
26
26
|
const key = article.data("slide-key");
|
|
27
|
+
const presentationKey = article.data("presentation-key") || slideID;
|
|
27
28
|
const isCurrent = article.closest(".presoSlide").hasClass("current");
|
|
28
29
|
const [synced, setSynced] = useState(!isRemote);
|
|
29
30
|
const [internalSlideState, setInternalSlideState] = useAsyncReference({});
|
|
@@ -140,8 +141,22 @@ export function useRootSlide(article) {
|
|
|
140
141
|
return {
|
|
141
142
|
isSlideReady: slideReady,
|
|
142
143
|
transitions,
|
|
144
|
+
|
|
145
|
+
// This is the ID of the article. You'll generally only use this
|
|
146
|
+
// if you're trying to access editables manually
|
|
143
147
|
slideID,
|
|
148
|
+
|
|
149
|
+
// This is the data-slide-key on the article. This is useful
|
|
150
|
+
// to get the key for the slide/template as it was written in
|
|
151
|
+
// the project file.
|
|
144
152
|
slideKey: key,
|
|
153
|
+
|
|
154
|
+
// This is the data-presentation-key on the article. This will be the
|
|
155
|
+
// slide key as used by presenter. This should be used for any kind of
|
|
156
|
+
// path look-ups in presenter, ie bridge commands that require a path.
|
|
157
|
+
// If for whatever reason this isn't in the dom, we fall back to the ID.
|
|
158
|
+
presentationKey,
|
|
159
|
+
|
|
145
160
|
isCurrentSlide: isCurrent,
|
|
146
161
|
doneRegister,
|
|
147
162
|
rootElement: article.get(0),
|
package/lib/hooks/use-slide.js
CHANGED
|
@@ -5,6 +5,7 @@ export function useSlide() {
|
|
|
5
5
|
const {
|
|
6
6
|
slideID,
|
|
7
7
|
slideKey,
|
|
8
|
+
presentationKey,
|
|
8
9
|
isSlideReady,
|
|
9
10
|
doneRegister,
|
|
10
11
|
isCurrentSlide,
|
|
@@ -18,6 +19,7 @@ export function useSlide() {
|
|
|
18
19
|
return {
|
|
19
20
|
slideID,
|
|
20
21
|
slideKey,
|
|
22
|
+
presentationKey,
|
|
21
23
|
isSlideReady,
|
|
22
24
|
doneRegister,
|
|
23
25
|
isCurrentSlide,
|