Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rad-reveal

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rad-reveal - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

8

build/functionRunner.js

@@ -133,7 +133,7 @@ /*!

RadReveal.on('data-rad-functionrunner-load', 'load', runner);
RadReveal.on('data-rad-functionrunner-shown', 'shown', runner);
RadReveal.on('data-rad-functionrunner-hidden', 'hidden', runner);
RadReveal.on('data-rad-functionrunner-show', 'show', runner);
RadReveal.on('data-rad-functionrunner-hide', 'hide', runner);
RadReveal.on('data-rad-functionrunner-fragment-load', 'load', runner);
RadReveal.on('data-rad-functionrunner-fragment-shown', 'shown', runner);
RadReveal.on('data-rad-functionrunner-fragment-hidden', 'hidden', runner);
RadReveal.on('data-rad-functionrunner-fragment-show', 'show', runner);
RadReveal.on('data-rad-functionrunner-fragment-hide', 'hide', runner);
}());

@@ -8,2 +8,2 @@ /*!

*/
!function(){"use strict";function n(n,o){t=n||{},t.fillSlides&&Object.keys(t.fillSlides).forEach(function(n){var r="data-rad-functionrunner-"+n,e=t.fillSlides[n];"string"!=typeof e&&(e=JSON.stringify(e)),o.forEach(function(n){n.element.hasAttribute(r)||n.element.setAttribute(r,e)})})}function o(n,o,r,t){try{var e=JSON.parse(n);if(!e)return;var a=window;if(e.root&&(a=window[e.root]),e.module&&(a=require(e.module),"object"!=typeof a))return void console.log("Module "+e.module+" not found");var i=a[e.func];if("function"!=typeof i)return void console.log("Function "+e.func+" not found");e.args=(e.args||[]).concat([o,r,t]),i.apply(a,e.args)}catch(d){console.log(d)}}var r=require("rad-reveal"),t=null;r.register("functionRunner",n),r.on("data-rad-functionrunner-load","load",o),r.on("data-rad-functionrunner-shown","shown",o),r.on("data-rad-functionrunner-hidden","hidden",o),r.on("data-rad-functionrunner-fragment-load","load",o),r.on("data-rad-functionrunner-fragment-shown","shown",o),r.on("data-rad-functionrunner-fragment-hidden","hidden",o)}();
!function(){"use strict";function n(n,o){t=n||{},t.fillSlides&&Object.keys(t.fillSlides).forEach(function(n){var r="data-rad-functionrunner-"+n,e=t.fillSlides[n];"string"!=typeof e&&(e=JSON.stringify(e)),o.forEach(function(n){n.element.hasAttribute(r)||n.element.setAttribute(r,e)})})}function o(n,o,r,t){try{var e=JSON.parse(n);if(!e)return;var a=window;if(e.root&&(a=window[e.root]),e.module&&(a=require(e.module),"object"!=typeof a))return void console.log("Module "+e.module+" not found");var i=a[e.func];if("function"!=typeof i)return void console.log("Function "+e.func+" not found");e.args=(e.args||[]).concat([o,r,t]),i.apply(a,e.args)}catch(u){console.log(u)}}var r=require("rad-reveal"),t=null;r.register("functionRunner",n),r.on("data-rad-functionrunner-load","load",o),r.on("data-rad-functionrunner-show","show",o),r.on("data-rad-functionrunner-hide","hide",o),r.on("data-rad-functionrunner-fragment-load","load",o),r.on("data-rad-functionrunner-fragment-show","show",o),r.on("data-rad-functionrunner-fragment-hide","hide",o)}();

@@ -85,3 +85,3 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"rad-reveal":[function(require,module,exports){

//add shown to element's onShown list
if(eventName == 'shown') {
if(eventName == 'show') {
eleObj.onShown.push(handlerClosure(handler, attrVal, eleObj, eventName));

@@ -91,3 +91,3 @@ }

//add hidden to element's onShown list
if(eventName == 'hidden') {
if(eventName == 'hide') {
eleObj.onHidden.push(handlerClosure(handler, attrVal, eleObj, eventName));

@@ -94,0 +94,0 @@ }

@@ -8,2 +8,2 @@ require=function e(n,t,r){function i(d,o){if(!t[d]){if(!n[d]){var l="function"==typeof require&&require;if(!o&&l)return l(d,!0);if(a)return a(d,!0);var f=new Error("Cannot find module '"+d+"'");throw f.code="MODULE_NOT_FOUND",f}var u=t[d]={exports:{}};n[d][0].call(u.exports,function(e){var t=n[d][1][e];return i(t?t:e)},u,u.exports,e,n,t,r)}return t[d].exports}for(var a="function"==typeof require&&require,d=0;d<r.length;d++)i(r[d]);return i}({"rad-reveal":[function(e,n){/*!

*/
"use strict";function t(e,n){for(var t=0,r=g.dependencies.length;r>t;t++)g.dependencies[t].radName==e&&n(g.dependencies[t].radConfig,h)}function r(e,n,t){"string"==typeof n&&(n=n.split(","));var r=Array.prototype.slice.apply(document.querySelectorAll("section["+e+"]")),a=Array.prototype.slice.apply(document.querySelectorAll(".fragment["+e+"]")),d=r.concat(a);d.forEach(function(r){var a,d;if("SECTION"==r.tagName)a="data-rad-main-slide-index",d="slide";else{if(!(r.className.indexOf("fragment")>-1))return void console.log(e+" attached to non-section, non-fragment element; ignored");a="data-rad-main-fragment-index",d="fragment"}var o,l=parseInt(r.getAttribute(a));if("slide"==d)o=h[l];else{var f=parseInt(r.getAttribute("data-rad-main-fragment-slide"));o=h[f].fragObjs[l]}var u=r.getAttribute(e);n.forEach(function(e){e=e.trim(),"load"==e&&t(u,o,{type:"rad"},e),"shown"==e&&o.onShown.push(i(t,u,o,e)),"hidden"==e&&o.onHidden.push(i(t,u,o,e))})})}function i(e,n,t,r){return function(i){e(n,t,i,r)}}function a(e,n){var t=n?h[n-1]:null,r={index:n,element:e,nextSlideObj:null,prevSlideObj:t,lastSlideObj:null,onShown:[],onHidden:[],data:{}};e.setAttribute("data-rad-main-slide-index",n+""),t&&(t.nextSlideObj=r),h.push(r),r.fragElements=Array.prototype.slice.apply(e.querySelectorAll(".fragment")),r.fragObjs=[],r.fragElements.forEach(function(e,n){d(r,e,n)})}function d(e,n,t){var r=t?e.fragObjs[t-1]:null,i={index:t,element:n,slideObj:e,nextFragObj:null,prevFragObj:r,onShown:[],onHidden:[],data:{}};n.setAttribute("data-rad-main-fragment-index",t+""),n.setAttribute("data-rad-main-fragment-slide",e.index+""),r&&(r.nextFragObj=i),e.fragObjs.push(i)}function o(e){var n=e.currentSlide,t=parseInt(n.getAttribute("data-rad-main-slide-index"));if(h[t]!=v){e.direction=null,v&&(e.direction=v.indexh<e.indexh?"left":v.indexh>e.indexh?"right":v.indexv<e.indexv?"down":v.indexv>e.indexv?"up":"unknown"),h[t].lastSlideObj=v;var r,i;if(v)for(r=0,i=v.onHidden.length;i>r;r++)v.onHidden[r](e);for(v=h[t],v.indexh=e.indexh,v.indexv=e.indexv,r=0,i=v.onShown.length;i>r;r++)v.onShown[r](e);m=null}}function l(e,n){for(var t=n.fragment,r=parseInt(t.getAttribute("data-rad-main-fragment-index")),i=v.fragObjs[r],a=0,d=i[e].length;d>a;a++)i[e][a](n)}function f(e){l("onShown",e)}function u(e){l("onHidden",e)}function s(){g=Reveal.getConfig(),Reveal.addEventListener("ready",o),Reveal.addEventListener("slidechanged",o),Reveal.addEventListener("fragmentshown",f),Reveal.addEventListener("fragmenthidden",u)}function c(){return h.concat([])}var g,p,v,m,h=[];p=Array.prototype.slice.apply(document.querySelectorAll(".reveal section")),p.forEach(a),n.exports={register:t,on:r,initialize:s,getSlideObjects:c}},{}]},{},["rad-reveal"]);
"use strict";function t(e,n){for(var t=0,r=g.dependencies.length;r>t;t++)g.dependencies[t].radName==e&&n(g.dependencies[t].radConfig,h)}function r(e,n,t){"string"==typeof n&&(n=n.split(","));var r=Array.prototype.slice.apply(document.querySelectorAll("section["+e+"]")),a=Array.prototype.slice.apply(document.querySelectorAll(".fragment["+e+"]")),d=r.concat(a);d.forEach(function(r){var a,d;if("SECTION"==r.tagName)a="data-rad-main-slide-index",d="slide";else{if(!(r.className.indexOf("fragment")>-1))return void console.log(e+" attached to non-section, non-fragment element; ignored");a="data-rad-main-fragment-index",d="fragment"}var o,l=parseInt(r.getAttribute(a));if("slide"==d)o=h[l];else{var f=parseInt(r.getAttribute("data-rad-main-fragment-slide"));o=h[f].fragObjs[l]}var u=r.getAttribute(e);n.forEach(function(e){e=e.trim(),"load"==e&&t(u,o,{type:"rad"},e),"show"==e&&o.onShown.push(i(t,u,o,e)),"hide"==e&&o.onHidden.push(i(t,u,o,e))})})}function i(e,n,t,r){return function(i){e(n,t,i,r)}}function a(e,n){var t=n?h[n-1]:null,r={index:n,element:e,nextSlideObj:null,prevSlideObj:t,lastSlideObj:null,onShown:[],onHidden:[],data:{}};e.setAttribute("data-rad-main-slide-index",n+""),t&&(t.nextSlideObj=r),h.push(r),r.fragElements=Array.prototype.slice.apply(e.querySelectorAll(".fragment")),r.fragObjs=[],r.fragElements.forEach(function(e,n){d(r,e,n)})}function d(e,n,t){var r=t?e.fragObjs[t-1]:null,i={index:t,element:n,slideObj:e,nextFragObj:null,prevFragObj:r,onShown:[],onHidden:[],data:{}};n.setAttribute("data-rad-main-fragment-index",t+""),n.setAttribute("data-rad-main-fragment-slide",e.index+""),r&&(r.nextFragObj=i),e.fragObjs.push(i)}function o(e){var n=e.currentSlide,t=parseInt(n.getAttribute("data-rad-main-slide-index"));if(h[t]!=v){e.direction=null,v&&(e.direction=v.indexh<e.indexh?"left":v.indexh>e.indexh?"right":v.indexv<e.indexv?"down":v.indexv>e.indexv?"up":"unknown"),h[t].lastSlideObj=v;var r,i;if(v)for(r=0,i=v.onHidden.length;i>r;r++)v.onHidden[r](e);for(v=h[t],v.indexh=e.indexh,v.indexv=e.indexv,r=0,i=v.onShown.length;i>r;r++)v.onShown[r](e);m=null}}function l(e,n){for(var t=n.fragment,r=parseInt(t.getAttribute("data-rad-main-fragment-index")),i=v.fragObjs[r],a=0,d=i[e].length;d>a;a++)i[e][a](n)}function f(e){l("onShown",e)}function u(e){l("onHidden",e)}function s(){g=Reveal.getConfig(),Reveal.addEventListener("ready",o),Reveal.addEventListener("slidechanged",o),Reveal.addEventListener("fragmentshown",f),Reveal.addEventListener("fragmenthidden",u)}function c(){return h.concat([])}var g,p,v,m,h=[];p=Array.prototype.slice.apply(document.querySelectorAll(".reveal section")),p.forEach(a),n.exports={register:t,on:r,initialize:s,getSlideObjects:c}},{}]},{},["rad-reveal"]);
{
"name": "rad-reveal",
"version": "0.0.5",
"version": "0.0.6",
"description": "A JavaScript library to help you extend Reveal.js, the HTML Presentation Framework",

@@ -5,0 +5,0 @@ "main": "build/radReveal",

@@ -71,3 +71,3 @@ #RadReveal [![Build Status](https://travis-ci.org/joelarson4/radReveal.svg)](https://travis-ci.org/joelarson4/radReveal)

<script src="node_modules/rad-reveal/build/radReveal.min.js"></script>
```
```javascript

@@ -158,4 +158,4 @@ Reveal.initialize({

```javascript
RadReveal.on('data-rad-example', 'show', anotherFunction);
RadReveal.on('data-rad-example', 'hide', andAnotherFunction);
RadReveal.on('data-rad-example', 'shown', anotherFunction);
RadReveal.on('data-rad-example', 'hidden', andAnotherFunction);
```

@@ -162,0 +162,0 @@

@@ -133,7 +133,7 @@ /*!

RadReveal.on('data-rad-functionrunner-load', 'load', runner);
RadReveal.on('data-rad-functionrunner-shown', 'shown', runner);
RadReveal.on('data-rad-functionrunner-hidden', 'hidden', runner);
RadReveal.on('data-rad-functionrunner-show', 'show', runner);
RadReveal.on('data-rad-functionrunner-hide', 'hide', runner);
RadReveal.on('data-rad-functionrunner-fragment-load', 'load', runner);
RadReveal.on('data-rad-functionrunner-fragment-shown', 'shown', runner);
RadReveal.on('data-rad-functionrunner-fragment-hidden', 'hidden', runner);
RadReveal.on('data-rad-functionrunner-fragment-show', 'show', runner);
RadReveal.on('data-rad-functionrunner-fragment-hide', 'hide', runner);
}());

@@ -84,3 +84,3 @@ /*!

//add shown to element's onShown list
if(eventName == 'shown') {
if(eventName == 'show') {
eleObj.onShown.push(handlerClosure(handler, attrVal, eleObj, eventName));

@@ -90,3 +90,3 @@ }

//add hidden to element's onShown list
if(eventName == 'hidden') {
if(eventName == 'hide') {
eleObj.onHidden.push(handlerClosure(handler, attrVal, eleObj, eventName));

@@ -93,0 +93,0 @@ }

@@ -80,6 +80,6 @@ /**

describe('data-rad-functionrunner-shown modifies HTML properly', function() {
describe('data-rad-functionrunner-show modifies HTML properly', function() {
this.timeout(3000);
var slide = document.querySelector('[data-rad-functionrunner-shown]');
var attrVal = JSON.parse(slide.getAttribute('data-rad-functionrunner-shown'));
var slide = document.querySelector('[data-rad-functionrunner-show]');
var attrVal = JSON.parse(slide.getAttribute('data-rad-functionrunner-show'));
var slideOriginalHtml = slide.innerHTML;

@@ -91,3 +91,3 @@

assert.notEqual(slide.innerHTML, slideOriginalHtml);
assert.isTrue(elementContains(slide, 'shown'));
assert.isTrue(elementContains(slide, 'show'));
assert.isTrue(elementContains(slide, attrVal.args[0]));

@@ -97,6 +97,6 @@ });

describe('data-rad-functionrunner-hidden modifies HTML properly', function() {
describe('data-rad-functionrunner-hide modifies HTML properly', function() {
this.timeout(3000);
var slide = document.querySelector('[data-rad-functionrunner-hidden]');
var attrVal = JSON.parse(slide.getAttribute('data-rad-functionrunner-hidden'));
var slide = document.querySelector('[data-rad-functionrunner-hide]');
var attrVal = JSON.parse(slide.getAttribute('data-rad-functionrunner-hide'));
var slideIndex = Number(slide.getAttribute('data-rad-main-slide-index'));

@@ -108,3 +108,3 @@ var nextSlide = document.querySelector('[data-rad-main-slide-index="' + (slideIndex + 1) + '"]');

it('working', function() {
assert.isTrue(elementContains(slide, 'hidden'));
assert.isTrue(elementContains(slide, 'hide'));
assert.isTrue(elementContains(slide, attrVal.args[0]));

@@ -125,7 +125,7 @@ });

describe('data-rad-functionrunner-fragment-shown modifies HTML properly', function() {
describe('data-rad-functionrunner-fragment-show modifies HTML properly', function() {
this.timeout(3000);
var frag = document.querySelector('.fragment[data-rad-functionrunner-fragment-shown]');
var frag = document.querySelector('.fragment[data-rad-functionrunner-fragment-show]');
var attrVal = JSON.parse(frag.getAttribute('data-rad-functionrunner-fragment-shown'));
var attrVal = JSON.parse(frag.getAttribute('data-rad-functionrunner-fragment-show'));

@@ -135,3 +135,3 @@ navigateTo(frag);

it('working', function() {
assert.isTrue(elementContains(frag, 'shown'));
assert.isTrue(elementContains(frag, 'show'));
assert.isTrue(elementContains(frag, attrVal.args[0]));

@@ -141,7 +141,7 @@ });

describe('data-rad-functionrunner-fragment-hidden modifies HTML properly', function() {
describe('data-rad-functionrunner-fragment-hide modifies HTML properly', function() {
this.timeout(3000);
var frag = document.querySelector('.fragment[data-rad-functionrunner-fragment-hidden]');
var frag = document.querySelector('.fragment[data-rad-functionrunner-fragment-hide]');
var attrVal = JSON.parse(frag.getAttribute('data-rad-functionrunner-fragment-hidden'));
var attrVal = JSON.parse(frag.getAttribute('data-rad-functionrunner-fragment-hide'));

@@ -153,5 +153,5 @@ navigateTo(frag, function() {

it('working', function() {
assert.isTrue(elementContains(frag, 'hidden'));
assert.isTrue(elementContains(frag, 'hide'));
assert.isTrue(elementContains(frag, attrVal.args[0]));
});
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc