lumina-slides 9.0.2 → 9.0.3
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/dist/lumina-slides.js +29 -9
- package/dist/lumina-slides.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/site/SiteDocs.vue +93 -72
- package/src/core/Lumina.ts +30 -8
- package/src/core/elementResolver.ts +7 -1
- package/src/core/types.ts +3 -2
- package/src/index.ts +1 -1
package/dist/lumina-slides.js
CHANGED
|
@@ -10099,7 +10099,7 @@ function jt(t, e, n) {
|
|
|
10099
10099
|
if (i != null && typeof i == "object" && typeof i.id == "string")
|
|
10100
10100
|
return i.id;
|
|
10101
10101
|
const o = aT(n);
|
|
10102
|
-
return o && ((s = r == null ? void 0 : r.ids) != null && s[o]) ? r.ids[o] : Sg(e, ...n);
|
|
10102
|
+
return o && ((s = r == null ? void 0 : r.ids) != null && s[o]) ? r.ids[o] : (r == null ? void 0 : r.id) != null && r.id !== "" ? `${r.id}-${n.map(String).join("-")}` : Sg(e, ...n);
|
|
10103
10103
|
}
|
|
10104
10104
|
const lT = {
|
|
10105
10105
|
statement: () => [["tag"], ["title"], ["subtitle"]],
|
|
@@ -47719,28 +47719,48 @@ class Zee {
|
|
|
47719
47719
|
}
|
|
47720
47720
|
return mw(this.store, this, e);
|
|
47721
47721
|
}
|
|
47722
|
+
/**
|
|
47723
|
+
* Returns the element at the given path on the current slide. Shorthand for
|
|
47724
|
+
* engine.element(engine.currentSlideIndex, path). Use when you don't need the slide index.
|
|
47725
|
+
*
|
|
47726
|
+
* @param path - Logical path (e.g. "title", "features.0", ["elements", 0, "elements", 1]).
|
|
47727
|
+
* @returns ElementController for that element.
|
|
47728
|
+
*
|
|
47729
|
+
* @example
|
|
47730
|
+
* engine.elementInCurrent("title").show();
|
|
47731
|
+
* engine.elementInCurrent("features.0").animate({ from: { opacity: 0 }, to: { opacity: 1 }, duration: 0.5 });
|
|
47732
|
+
*
|
|
47733
|
+
* @see element
|
|
47734
|
+
* @see elements
|
|
47735
|
+
*/
|
|
47736
|
+
elementInCurrent(e) {
|
|
47737
|
+
const n = this.store.state.currentIndex ?? 0;
|
|
47738
|
+
return this.element(n, e);
|
|
47739
|
+
}
|
|
47722
47740
|
/**
|
|
47723
47741
|
* Returns all element ids for a slide. Use to discover which ids exist (e.g. for
|
|
47724
47742
|
* meta.initialElementState, or to iterate and control elements). Each id can be passed to
|
|
47725
47743
|
* engine.element(id). Uses the same path→id logic as element(slideIndex, path); ids follow
|
|
47726
|
-
* resolveId (explicit id, slide.ids, or elemId(slideIndex, ...path)).
|
|
47744
|
+
* resolveId (explicit id, slide.ids, or slide.id / elemId(slideIndex, ...path) as fallback).
|
|
47727
47745
|
*
|
|
47728
|
-
* @param slideIndex - Zero-based slide index. If out of range or deck not loaded, returns [].
|
|
47729
|
-
* @returns Array of id strings (e.g. ["s0-slide","s0-tag","s0-title","s0-subtitle"]
|
|
47746
|
+
* @param slideIndex - Zero-based slide index. Omit to use the current slide. If out of range or deck not loaded, returns [].
|
|
47747
|
+
* @returns Array of id strings (e.g. ["s0-slide","s0-tag","s0-title","s0-subtitle"] or ["intro-slide","intro-tag",...] when slide.id is set).
|
|
47730
47748
|
*
|
|
47731
47749
|
* @example
|
|
47732
|
-
*
|
|
47733
|
-
*
|
|
47750
|
+
* engine.elements(); // current slide
|
|
47751
|
+
* engine.elements(0);
|
|
47752
|
+
* engine.elements().forEach(id => { if (id.endsWith('-title')) engine.element(id).hide(); });
|
|
47734
47753
|
*
|
|
47735
47754
|
* @see element
|
|
47755
|
+
* @see elementInCurrent
|
|
47736
47756
|
* @see getElementIds
|
|
47737
47757
|
* @see resolveId
|
|
47738
47758
|
* @see DeckMeta.initialElementState
|
|
47739
47759
|
*/
|
|
47740
47760
|
elements(e) {
|
|
47741
|
-
var
|
|
47742
|
-
const n =
|
|
47743
|
-
return
|
|
47761
|
+
var i;
|
|
47762
|
+
const n = e ?? this.store.state.currentIndex ?? 0, r = (i = this.store.state.deck) == null ? void 0 : i.slides[n];
|
|
47763
|
+
return r ? Eg(r, n) : [];
|
|
47744
47764
|
}
|
|
47745
47765
|
/**
|
|
47746
47766
|
* Hides all controlled elements of a slide. Use for blank-slide or reset-before-reveal flows.
|