presently 0.10.0 → 0.11.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '058a674f7402cbe385bfb6db06e28f84b3bbbc0cb352512b00b1ca56f2a046ad'
4
- data.tar.gz: 41568d05c2ade4e9a3611a750dba065c1c6217830d3d99b9703adaf621cdc9d0
3
+ metadata.gz: 4d9c48a214f82231e41cf7466a9cacae0b613d966df0ba2e2ed3ec0a5e770fd6
4
+ data.tar.gz: 5adf796d7508e530e7bcd29158db6090f48020987e17cf708f788fa2cfeafbcb
5
5
  SHA512:
6
- metadata.gz: 2b0b6ab7a6a2db77db8ddddcb72c3afa1dcf7b94a8cbc8ff70caa2bcb4c4fca354f3549ef1065eae6a80ec2a427348125eb79e65bddc7f53d15fd9f842bd1054
7
- data.tar.gz: 01d217946531862c5e735587a4f9463bd0fcb157c3c4b6adc2fca3054fcf6181a9a38b23736abed0022da1b4bcfc80424c9791e7a4938e7de957a349310b70e4
6
+ metadata.gz: 33dc185804e859fee50a41d7169f12c8c7a0921789c9a561db4d03fb0ac172c51680a41f07e59df01232b9d1221a3cc50587c7731ce987e87ba6c858bb79e552
7
+ data.tar.gz: a36e22c1b6919eb78795364eb251107913e334b90dc60cdb874b6ca10aef71b6639a51d17c4453893da21cc687882d01649acdc7517ff69692d7c93e32272f1b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -5,5 +5,5 @@
5
5
 
6
6
  # @namespace
7
7
  module Presently
8
- VERSION = "0.10.0"
8
+ VERSION = "0.11.0"
9
9
  end
data/public/slide.js CHANGED
@@ -168,6 +168,13 @@ export class SlideContext {
168
168
  this.#elapsed = elapsed;
169
169
  }
170
170
 
171
+ // The slide body element.
172
+ // Delegates to the parent Slide.
173
+ // @returns [HTMLElement]
174
+ get element() {
175
+ return this.#slide.element;
176
+ }
177
+
171
178
  // Find elements within the slide matching the given CSS selector.
172
179
  // Delegates to the parent Slide.
173
180
  // @parameter selector [String] A CSS selector scoped to the slide body.
@@ -206,11 +213,17 @@ export class SlideContext {
206
213
  // The scripting context passed to each slide's javascript block.
207
214
  // Scopes element queries to the slide body.
208
215
  export class Slide {
209
- #container;
216
+ #element;
210
217
  #timeouts = [];
211
218
 
212
- constructor(container) {
213
- this.#container = container;
219
+ constructor(element) {
220
+ this.#element = element;
221
+ }
222
+
223
+ // The slide body element.
224
+ // @returns [HTMLElement]
225
+ get element() {
226
+ return this.#element;
214
227
  }
215
228
 
216
229
  // Find elements within this slide matching the given CSS selector.
@@ -218,7 +231,7 @@ export class Slide {
218
231
  // @parameter selector [String] A CSS selector scoped to the slide body.
219
232
  // @returns [SlideElements]
220
233
  find(selector) {
221
- const elements = Array.from(this.#container.querySelectorAll(selector));
234
+ const elements = Array.from(this.#element.querySelectorAll(selector));
222
235
  return new SlideElements(this, elements);
223
236
  }
224
237
 
data/readme.md CHANGED
@@ -29,6 +29,10 @@ Please see the [project documentation](https://socketry.github.io/presently/) fo
29
29
 
30
30
  Please see the [project releases](https://socketry.github.io/presently/releases/index) for all releases.
31
31
 
32
+ ### v0.11.0
33
+
34
+ - Add `Slide#element` and `SlideContext#element` getters — expose the slide body DOM element directly for cases where `find()` is not sufficient, such as measuring dimensions, attaching event listeners, or integrating third-party libraries.
35
+
32
36
  ### v0.10.0
33
37
 
34
38
  - Replace internal `SlideChain` with an exported `SlideContext` class. `SlideContext` accumulates elapsed time across `after()` calls exactly as `SlideChain` did, but also exposes `find()`, `setTimeout()`, and a `get elapsed()` getter. `Slide#after()` now returns a `SlideContext` — existing slide scripts are unaffected.
@@ -86,17 +90,6 @@ Please see the [project releases](https://socketry.github.io/presently/releases/
86
90
  - Use the last `---` hrule in the AST as the presenter notes separator, so earlier `---` dividers in slide content are preserved correctly.
87
91
  - Add support for Mermaid diagrams in slides.
88
92
 
89
- ### v0.1.0
90
-
91
- - Initial release.
92
- - Slide files are Markdown with YAML front matter for metadata (`template`, `duration`, `title`, `skip`, `marker`, `transition`, `focus`).
93
- - Slide content is split into named sections by top-level headings, rendered to HTML via Markly.
94
- - Presenter notes are separated from slide content by a `---` divider.
95
- - Magic move transitions between slides.
96
- - Navigation control in the presenter view.
97
- - Code highlighting with line-range focus support.
98
- - Live state synchronisation between display and presenter views over WebSockets.
99
-
100
93
  ## See Also
101
94
 
102
95
  - [lively](https://github.com/socketry/lively) — The real-time application framework that powers Presently.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.11.0
4
+
5
+ - Add `Slide#element` and `SlideContext#element` getters — expose the slide body DOM element directly for cases where `find()` is not sufficient, such as measuring dimensions, attaching event listeners, or integrating third-party libraries.
6
+
3
7
  ## v0.10.0
4
8
 
5
9
  - Replace internal `SlideChain` with an exported `SlideContext` class. `SlideContext` accumulates elapsed time across `after()` calls exactly as `SlideChain` did, but also exposes `find()`, `setTimeout()`, and a `get elapsed()` getter. `Slide#after()` now returns a `SlideContext` — existing slide scripts are unaffected.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: presently
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file