@livepreso/content-react 0.4.2 → 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 CHANGED
@@ -1,6 +1,30 @@
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
+ },
16
+ {
17
+ "version": "0.4.3",
18
+ "tag": "@livepreso/content-react_v0.4.3",
19
+ "date": "Thu, 21 Nov 2024 01:14:47 GMT",
20
+ "comments": {
21
+ "patch": [
22
+ {
23
+ "comment": "Move CWE Editables far below content"
24
+ }
25
+ ]
26
+ }
27
+ },
4
28
  {
5
29
  "version": "0.4.2",
6
30
  "tag": "@livepreso/content-react_v0.4.2",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log - @livepreso/content-react
2
2
 
3
- This log was last generated on Thu, 21 Nov 2024 00:05:45 GMT and should not be manually modified.
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()
11
+
12
+ ## 0.4.3
13
+ Thu, 21 Nov 2024 01:14:47 GMT
14
+
15
+ ### Patches
16
+
17
+ - Move CWE Editables far below content
4
18
 
5
19
  ## 0.4.2
6
20
  Thu, 21 Nov 2024 00:05:45 GMT
@@ -52,8 +52,8 @@ export function CompanywideJSON({ children }) {
52
52
  tabIndex={-1}
53
53
  style={{
54
54
  position: "absolute",
55
- top: -1000,
56
- left: -1000,
55
+ top: 9999,
56
+ right: 9999,
57
57
  }}
58
58
  />
59
59
  )}
@@ -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),
@@ -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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livepreso/content-react",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {