New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

shepherd.js

Package Overview
Dependencies
Maintainers
2
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shepherd.js - npm Package Compare versions

Comparing version 12.0.0-alpha.2 to 12.0.0-alpha.3

dist/floating-ui-DYf6tUHO.js

2

dist/evented.js

@@ -1,2 +0,2 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */

@@ -3,0 +3,0 @@ import { isUndefined } from './utils/type-check.js';

@@ -1,27 +0,20 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */
import { S as Step } from './step-CG9jN0WB.js';
import { Shepherd, Tour } from './tour.js';
import './floating-ui-rpFK6I5d.js';
import './utils/general.js';
import { NoOp } from './utils/general.js';
import { S as Step } from './step-CN7Aelwc.js';
import './evented.js';
import './utils/type-check.js';
import './evented.js';
import './utils/auto-bind.js';
import './utils/bind.js';
import './utils/cleanup.js';
import './utils/datarequest.js';
import './utils/overlay-path.js';
import './floating-ui-DYf6tUHO.js';
import './utils/bind.js';
const isServerSide = typeof window === 'undefined';
class NoOp {
constructor() { }
}
if (isServerSide) {
Object.assign(Shepherd, { Tour: NoOp, Step: NoOp });
}
else {
Object.assign(Shepherd, { Tour, Step });
}
Shepherd.Step = isServerSide ? NoOp : Step;
Shepherd.Tour = isServerSide ? NoOp : Tour;
export { Shepherd as default };
//# sourceMappingURL=shepherd.js.map
import { Evented } from './evented';
import { Tour } from './tour';
import { type Tour } from './tour';
/**

@@ -225,3 +225,3 @@ * The options for the step

* Returns the tour for the step
* @return {Tour} The tour instance
* @return The tour instance
*/

@@ -228,0 +228,0 @@ getTour(): Tour;

@@ -1,4 +0,4 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */
import './floating-ui-rpFK6I5d.js';
import './floating-ui-DYf6tUHO.js';
import './evented.js';

@@ -9,3 +9,3 @@ import './utils/auto-bind.js';

import './utils/general.js';
export { S as Step } from './step-CG9jN0WB.js';
export { S as Step } from './step-CN7Aelwc.js';
//# sourceMappingURL=step.js.map

@@ -5,2 +5,3 @@ import { Evented } from './evented';

import ShepherdModal from './components/shepherd-modal.svelte';
import type { NoOp } from './utils/general';
/**

@@ -69,6 +70,7 @@ * The options for the tour

dataRequester?: DataRequest;
Step: NoOp | Step;
Tour: NoOp | Tour;
init(apiKey?: string, apiPath?: string): void;
createNewActor(): Promise<void>;
}
declare const Shepherd: ShepherdPro;
/**

@@ -189,3 +191,4 @@ * Class representing the site tour

}
declare const Shepherd: ShepherdPro;
export { Shepherd };
//# sourceMappingURL=tour.d.ts.map

@@ -1,5 +0,5 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */
import { Evented } from './evented.js';
import { a as SvelteComponent, i as init, s as safe_not_equal, b as svg_element, c as attr, d as insert, e as append, l as listen, n as noop, f as detach, g as binding_callbacks, S as Step } from './step-CG9jN0WB.js';
import { a as SvelteComponent, i as init, s as safe_not_equal, b as svg_element, c as attr, d as insert, e as append, l as listen, n as noop, f as detach, g as binding_callbacks, S as Step } from './step-CN7Aelwc.js';
import autoBind from './utils/auto-bind.js';

@@ -11,3 +11,3 @@ import { isUndefined, isFunction, isString, isHTMLElement } from './utils/type-check.js';

import { makeOverlayPath } from './utils/overlay-path.js';
import './floating-ui-rpFK6I5d.js';
import './floating-ui-DYf6tUHO.js';
import './utils/bind.js';

@@ -327,3 +327,2 @@

}
const Shepherd = new ShepherdPro();
/**

@@ -375,6 +374,20 @@ * Class representing the site tour

const { id, steps } = tour;
let position;
if (event !== 'active') {
const { step: currentStep } = opts;
if (currentStep) {
position =
steps.findIndex((step) => step.id === currentStep.id) + 1;
}
}
const data = {
currentUserId: this.currentUserId,
eventType: event,
tour: { id, numberOfSteps: steps.length }
journeyData: {
id,
currentStep: position,
numberOfSteps: steps.length,
steps,
tourOptions: tour.options
}
};

@@ -649,4 +662,5 @@ this.dataRequester?.sendEvents({ data });

}
const Shepherd = new ShepherdPro();
export { Shepherd, ShepherdPro, Tour };
//# sourceMappingURL=tour.js.map

@@ -1,2 +0,2 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */

@@ -3,0 +3,0 @@ import { isUndefined } from './type-check.js';

@@ -1,2 +0,2 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */

@@ -3,0 +3,0 @@ import { isHTMLElement } from './type-check.js';

@@ -1,2 +0,2 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */

@@ -3,0 +3,0 @@ class DataRequest {

@@ -1,6 +0,6 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */
export { d as destroyTooltip, g as getFloatingUIOptions, m as mergeTooltipConfig, s as setupTooltip } from '../floating-ui-rpFK6I5d.js';
export { d as destroyTooltip, g as getFloatingUIOptions, m as mergeTooltipConfig, s as setupTooltip } from '../floating-ui-DYf6tUHO.js';
import './general.js';
import './type-check.js';
//# sourceMappingURL=floating-ui.js.map
import { type StepOptionsAttachTo, type Step } from '../step';
export declare class NoOp {
constructor();
}
/**

@@ -3,0 +6,0 @@ * Ensure class prefix ends in `-`

@@ -1,5 +0,8 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */
import { isString, isFunction } from './type-check.js';
class NoOp {
constructor() { }
}
/**

@@ -68,3 +71,3 @@ * Ensure class prefix ends in `-`

export { normalizePrefix, parseAttachTo, shouldCenterStep, uuid };
export { NoOp, normalizePrefix, parseAttachTo, shouldCenterStep, uuid };
//# sourceMappingURL=general.js.map

@@ -1,2 +0,2 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

/*! shepherd.js 12.0.0-alpha.2 */
/*! shepherd.js 12.0.0-alpha.3 */

@@ -3,0 +3,0 @@ /**

{
"name": "shepherd.js",
"version": "12.0.0-alpha.2",
"version": "12.0.0-alpha.3",
"description": "Guide your users through a tour of your app.",

@@ -23,2 +23,3 @@ "keywords": [

".": {
"types": "./dist/shepherd.d.ts",
"default": "./dist/shepherd.js"

@@ -79,3 +80,3 @@ },

"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-license": "^3.2.0",
"rollup-plugin-license": "^3.3.1",
"rollup-plugin-livereload": "^2.0.5",

@@ -88,3 +89,3 @@ "rollup-plugin-postcss": "^4.0.2",

"svelte-preprocess": "^5.1.3",
"typescript": "^5.3.3"
"typescript": "^5.4.2"
},

@@ -91,0 +92,0 @@ "packageManager": "pnpm@8.15.4",

@@ -0,16 +1,10 @@

import { Shepherd, Tour } from './tour';
import { NoOp } from './utils/general';
import { Step } from './step';
import { Shepherd, Tour } from './tour';
const isServerSide = typeof window === 'undefined';
class NoOp {
constructor() {}
}
Shepherd.Step = isServerSide ? NoOp : Step;
Shepherd.Tour = isServerSide ? NoOp : Tour;
if (isServerSide) {
Object.assign(Shepherd, { Tour: NoOp, Step: NoOp });
} else {
Object.assign(Shepherd, { Tour, Step });
}
export default Shepherd;

@@ -19,3 +19,3 @@ import { deepmerge } from 'deepmerge-ts';

import ShepherdElement from './components/shepherd-element.svelte';
import { Tour } from './tour';
import { type Tour } from './tour';

@@ -344,3 +344,3 @@ /**

* Returns the tour for the step
* @return {Tour} The tour instance
* @return The tour instance
*/

@@ -347,0 +347,0 @@ getTour() {

@@ -15,2 +15,3 @@ import { Evented } from './evented';

import ShepherdModal from './components/shepherd-modal.svelte';
import type { NoOp } from './utils/general';

@@ -21,2 +22,8 @@ interface Actor {

interface EventOptions {
previous?: Step | null;
step?: Step | null;
tour: Tour;
}
/**

@@ -93,2 +100,4 @@ * The options for the tour

dataRequester?: DataRequest;
declare Step: NoOp | Step;
declare Tour: NoOp | Tour;

@@ -128,4 +137,2 @@ init(apiKey?: string, apiPath?: string) {

const Shepherd = new ShepherdPro();
/**

@@ -194,10 +201,26 @@ * Class representing the site tour

this.trackedEvents.forEach((event) =>
this.on(event, (opts: Record<string, unknown>) => {
this.on(event, (opts: EventOptions) => {
const { tour } = opts;
const { id, steps } = tour as Tour;
const { id, steps } = tour;
let position;
if (event !== 'active') {
const { step: currentStep } = opts;
if (currentStep) {
position =
steps.findIndex((step) => step.id === currentStep.id) + 1;
}
}
const data = {
currentUserId: this.currentUserId,
eventType: event,
tour: { id, numberOfSteps: steps.length }
journeyData: {
id,
currentStep: position,
numberOfSteps: steps.length,
steps,
tourOptions: tour.options
}
};

@@ -523,2 +546,4 @@ this.dataRequester?.sendEvents({ data });

const Shepherd = new ShepherdPro();
export { Shepherd };
import { type StepOptionsAttachTo, type Step } from '../step';
import { isFunction, isString } from './type-check';
export class NoOp {
constructor() {}
}
/**

@@ -37,3 +41,5 @@ * Ensure class prefix ends in `-`

try {
returnOpts.element = document.querySelector(returnOpts.element) as HTMLElement;
returnOpts.element = document.querySelector(
returnOpts.element
) as HTMLElement;
} catch (e) {

@@ -40,0 +46,0 @@ // TODO

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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