@storybook/addon-links
Advanced tools
Comparing version 7.0.24 to 8.0.0-alpha.10
@@ -1,3 +0,2 @@ | ||
import * as lib_preview_api_dist_storybook_channel_mock_a19cd233 from '@storybook/preview-api/dist/storybook-channel-mock-a19cd233'; | ||
import { ComponentTitle, StoryName, StoryId, StoryKind } from '@storybook/types'; | ||
import { C as ComponentTitle, a as StoryName, b as StoryId, S as StoryKind } from './index.d-3adcfc00.js'; | ||
@@ -16,9 +15,4 @@ interface ParamsId { | ||
declare const linkTo: (idOrTitle: string | ((...args: any[]) => string), nameInput?: string | ((...args: any[]) => string) | undefined) => (...args: any[]) => void; | ||
declare const withLinks: lib_preview_api_dist_storybook_channel_mock_a19cd233.M; | ||
declare const withLinks: (...args: any) => any; | ||
/** | ||
* @deprecated please import this specific function from @storybook/addon-links/react | ||
*/ | ||
declare function LinkTo(): null; | ||
export { LinkTo, hrefTo, linkTo, navigate, withLinks }; | ||
export { hrefTo, linkTo, navigate, withLinks }; |
@@ -1,1 +0,3 @@ | ||
"use strict";var import_manager_api=require("@storybook/manager-api");var ADDON_ID="storybook/links";var constants_default={NAVIGATE:`${ADDON_ID}/navigate`,REQUEST:`${ADDON_ID}/request`,RECEIVE:`${ADDON_ID}/receive`};import_manager_api.addons.register(ADDON_ID,api=>{import_manager_api.addons.getChannel().on(constants_default.REQUEST,({kind,name})=>{let id=api.storyId(kind,name);api.emit(constants_default.RECEIVE,id)})}); | ||
import { addons } from '@storybook/manager-api'; | ||
var ADDON_ID="storybook/links";var constants_default={NAVIGATE:`${ADDON_ID}/navigate`,REQUEST:`${ADDON_ID}/request`,RECEIVE:`${ADDON_ID}/receive`};addons.register(ADDON_ID,api=>{api.on(constants_default.REQUEST,({kind,name})=>{let id=api.storyId(kind,name);api.emit(constants_default.RECEIVE,id);});}); |
@@ -1,1 +0,8 @@ | ||
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preview_exports={};__export(preview_exports,{decorators:()=>decorators});module.exports=__toCommonJS(preview_exports);var import_ts_dedent=require("ts-dedent");var import_global=require("@storybook/global"),import_preview_api=require("@storybook/preview-api"),import_core_events=require("@storybook/core-events"),import_csf=require("@storybook/csf");var ADDON_ID="storybook/links",PARAM_KEY="links",constants_default={NAVIGATE:`${ADDON_ID}/navigate`,REQUEST:`${ADDON_ID}/request`,RECEIVE:`${ADDON_ID}/receive`};var{document,HTMLElement}=import_global.global;var navigate=params=>import_preview_api.addons.getChannel().emit(import_core_events.SELECT_STORY,params);var linksListener=e=>{let{target}=e;if(!(target instanceof HTMLElement))return;let element=target,{sbKind:kind,sbStory:story}=element.dataset;(kind||story)&&(e.preventDefault(),navigate({kind,story}))},hasListener=!1,on=()=>{hasListener||(hasListener=!0,document.addEventListener("click",linksListener))},off=()=>{hasListener&&(hasListener=!1,document.removeEventListener("click",linksListener))},withLinks=(0,import_preview_api.makeDecorator)({name:"withLinks",parameterName:PARAM_KEY,wrapper:(getStory,context)=>(on(),import_preview_api.addons.getChannel().once(import_core_events.STORY_CHANGED,off),getStory(context))});var decorators=[withLinks];0&&(module.exports={decorators}); | ||
import { global } from '@storybook/global'; | ||
import { makeDecorator, addons } from '@storybook/preview-api'; | ||
import { STORY_CHANGED, SELECT_STORY } from '@storybook/core-events'; | ||
import '@storybook/csf'; | ||
var PARAM_KEY="links";var{document,HTMLElement}=global;var navigate=params=>addons.getChannel().emit(SELECT_STORY,params);var linksListener=e=>{let{target}=e;if(!(target instanceof HTMLElement))return;let element=target,{sbKind:kind,sbStory:story}=element.dataset;(kind||story)&&(e.preventDefault(),navigate({kind,story}));},hasListener=!1,on=()=>{hasListener||(hasListener=!0,document.addEventListener("click",linksListener));},off=()=>{hasListener&&(hasListener=!1,document.removeEventListener("click",linksListener));},withLinks=makeDecorator({name:"withLinks",parameterName:PARAM_KEY,wrapper:(getStory,context)=>(on(),addons.getChannel().once(STORY_CHANGED,off),getStory(context))});var decorators=[withLinks]; | ||
export { decorators }; |
@@ -1,3 +0,3 @@ | ||
import { StoryKind, ComponentTitle, StoryName } from '@storybook/types'; | ||
import { PureComponent, ReactNode } from 'react'; | ||
import { S as StoryKind, C as ComponentTitle, a as StoryName } from '../index.d-3adcfc00.js'; | ||
import React, { PureComponent, ReactNode } from 'react'; | ||
@@ -21,5 +21,5 @@ interface Props { | ||
handleClick: () => void; | ||
render(): JSX.Element; | ||
render(): React.JSX.Element; | ||
} | ||
export { LinkTo as default }; |
{ | ||
"name": "@storybook/addon-links", | ||
"version": "7.0.24", | ||
"version": "8.0.0-alpha.10", | ||
"description": "Link stories together to build demos and prototypes with your UI components", | ||
@@ -31,12 +31,2 @@ "keywords": [ | ||
}, | ||
"./manager": { | ||
"types": "./dist/manager.d.ts", | ||
"require": "./dist/manager.js", | ||
"import": "./dist/manager.mjs" | ||
}, | ||
"./preview": { | ||
"types": "./dist/preview.d.ts", | ||
"require": "./dist/preview.js", | ||
"import": "./dist/preview.mjs" | ||
}, | ||
"./react": { | ||
@@ -47,7 +37,5 @@ "types": "./dist/react/index.d.ts", | ||
}, | ||
"./register": { | ||
"types": "./dist/manager.d.ts", | ||
"require": "./dist/manager.js", | ||
"import": "./dist/manager.mjs" | ||
}, | ||
"./manager": "./dist/manager.js", | ||
"./preview": "./dist/preview.js", | ||
"./register": "./dist/manager.js", | ||
"./package.json": "./package.json" | ||
@@ -63,8 +51,2 @@ }, | ||
], | ||
"manager": [ | ||
"dist/manager.d.ts" | ||
], | ||
"preview": [ | ||
"dist/preview.d.ts" | ||
], | ||
"react": [ | ||
@@ -79,27 +61,26 @@ "dist/react/index.d.ts" | ||
"*.js", | ||
"*.d.ts" | ||
"*.d.ts", | ||
"!src/**/*" | ||
], | ||
"scripts": { | ||
"check": "../../../scripts/node_modules/.bin/tsc --noEmit", | ||
"prep": "../../../scripts/prepare/bundle.ts" | ||
"check": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/check.ts", | ||
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/addon-bundle.ts" | ||
}, | ||
"dependencies": { | ||
"@storybook/client-logger": "7.0.24", | ||
"@storybook/core-events": "7.0.24", | ||
"@storybook/csf": "^0.1.0", | ||
"@storybook/csf": "^0.1.2", | ||
"@storybook/global": "^5.0.0", | ||
"@storybook/manager-api": "7.0.24", | ||
"@storybook/preview-api": "7.0.24", | ||
"@storybook/router": "7.0.24", | ||
"@storybook/types": "7.0.24", | ||
"prop-types": "^15.7.2", | ||
"ts-dedent": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@storybook/client-logger": "8.0.0-alpha.10", | ||
"@storybook/core-events": "8.0.0-alpha.10", | ||
"@storybook/manager-api": "8.0.0-alpha.10", | ||
"@storybook/preview-api": "8.0.0-alpha.10", | ||
"@storybook/router": "8.0.0-alpha.10", | ||
"@storybook/types": "8.0.0-alpha.10", | ||
"fs-extra": "^11.1.0", | ||
"typescript": "~4.9.3" | ||
"typescript": "^5.3.2" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0", | ||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" | ||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0" | ||
}, | ||
@@ -109,5 +90,2 @@ "peerDependenciesMeta": { | ||
"optional": true | ||
}, | ||
"react-dom": { | ||
"optional": true | ||
} | ||
@@ -119,11 +97,15 @@ }, | ||
"bundler": { | ||
"entries": [ | ||
"./src/index.ts", | ||
"./src/manager.ts", | ||
"./src/preview.ts", | ||
"./src/react/index.ts" | ||
"exportEntries": [ | ||
"./src/react/index.ts", | ||
"./src/index.ts" | ||
], | ||
"managerEntries": [ | ||
"./src/manager.ts" | ||
], | ||
"previewEntries": [ | ||
"./src/preview.ts" | ||
], | ||
"post": "./scripts/fix-preview-api-reference.ts" | ||
}, | ||
"gitHead": "9fb2573aa274f3f69d3358050e8df9c903e8245f", | ||
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae17", | ||
"storybook": { | ||
@@ -130,0 +112,0 @@ "displayName": "Links", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
577161
4
2299
3
8
16
18
24
- Removed@storybook/client-logger@7.0.24
- Removed@storybook/core-events@7.0.24
- Removed@storybook/manager-api@7.0.24
- Removed@storybook/preview-api@7.0.24
- Removed@storybook/router@7.0.24
- Removed@storybook/types@7.0.24
- Removedprop-types@^15.7.2
- Removed@babel/helper-string-parser@7.25.9(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@babel/parser@7.26.1(transitive)
- Removed@babel/types@7.26.0(transitive)
- Removed@emotion/use-insertion-effect-with-fallbacks@1.1.0(transitive)
- Removed@storybook/channel-postmessage@7.0.24(transitive)
- Removed@storybook/channels@7.0.24(transitive)
- Removed@storybook/client-logger@7.0.24(transitive)
- Removed@storybook/core-events@7.0.24(transitive)
- Removed@storybook/manager-api@7.0.24(transitive)
- Removed@storybook/preview-api@7.0.24(transitive)
- Removed@storybook/router@7.0.24(transitive)
- Removed@storybook/theming@7.0.24(transitive)
- Removed@storybook/types@7.0.24(transitive)
- Removed@types/babel__core@7.20.5(transitive)
- Removed@types/babel__generator@7.6.8(transitive)
- Removed@types/babel__template@7.4.4(transitive)
- Removed@types/babel__traverse@7.20.6(transitive)
- Removed@types/body-parser@1.19.5(transitive)
- Removed@types/connect@3.4.38(transitive)
- Removed@types/express@4.17.21(transitive)
- Removed@types/express-serve-static-core@4.19.6(transitive)
- Removed@types/http-errors@2.0.4(transitive)
- Removed@types/mime@1.3.5(transitive)
- Removed@types/node@22.8.4(transitive)
- Removed@types/qs@6.9.16(transitive)
- Removed@types/range-parser@1.2.7(transitive)
- Removed@types/send@0.17.4(transitive)
- Removed@types/serve-static@1.15.7(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddequal@2.0.3(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedfile-system-cache@2.3.0(transitive)
- Removedfs-extra@11.1.1(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhasown@2.0.2(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmap-or-similar@1.5.0(transitive)
- Removedmemoizerific@1.11.3(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedobject-inspect@1.13.2(transitive)
- Removedprop-types@15.8.1(transitive)
- Removedqs@6.13.0(transitive)
- Removedramda@0.29.0(transitive)
- Removedreact-dom@18.3.1(transitive)
- Removedreact-is@16.13.1(transitive)
- Removedscheduler@0.23.2(transitive)
- Removedsemver@7.6.3(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedside-channel@1.0.6(transitive)
- Removedstore2@2.14.3(transitive)
- Removedsynchronous-promise@2.0.17(transitive)
- Removedtelejson@7.2.0(transitive)
- Removedundici-types@6.19.8(transitive)
- Removeduniversalify@2.0.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
Updated@storybook/csf@^0.1.2