@storybook/addon-styling
Advanced tools
Comparing version 0.3.1 to 1.0.0-canary.8.d1e461a.0
@@ -8,3 +8,3 @@ "use strict"; | ||
var _addons = require("@storybook/addons"); | ||
var _previewApi = require("@storybook/preview-api"); | ||
@@ -38,3 +38,3 @@ var _helpers = require("./helpers"); | ||
var selected = (0, _helpers.pluckThemeFromContext)(context); | ||
(0, _addons.useEffect)(function () { | ||
(0, _previewApi.useEffect)(function () { | ||
var selectedThemeName = themeOverride || selected || defaultTheme; | ||
@@ -41,0 +41,0 @@ var parentElement = document.querySelector(parentSelector); |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _addons = require("@storybook/addons"); | ||
var _previewApi = require("@storybook/preview-api"); | ||
@@ -29,3 +29,3 @@ var _helpers = require("./helpers"); | ||
var selected = (0, _helpers.pluckThemeFromContext)(context); | ||
(0, _addons.useEffect)(function () { | ||
(0, _previewApi.useEffect)(function () { | ||
var parentElement = document.querySelector(parentSelector); | ||
@@ -32,0 +32,0 @@ var themeKey = themeOverride || selected || defaultTheme; |
@@ -10,3 +10,3 @@ "use strict"; | ||
var _addons = require("@storybook/addons"); | ||
var _previewApi = require("@storybook/preview-api"); | ||
@@ -26,7 +26,7 @@ var _constants = require("../constants"); | ||
function useThemeParameters() { | ||
return (0, _addons.useParameter)(_constants.PARAM_KEY, _constants.DEFAULT_THEME_PARAMETERS); | ||
return (0, _previewApi.useParameter)(_constants.PARAM_KEY, _constants.DEFAULT_THEME_PARAMETERS); | ||
} | ||
function initializeThemeState(themeNames, defaultTheme) { | ||
_addons.addons.getChannel().emit(_constants.THEMING_EVENTS.REGISTER_THEMES, { | ||
_previewApi.addons.getChannel().emit(_constants.THEMING_EVENTS.REGISTER_THEMES, { | ||
defaultTheme: defaultTheme, | ||
@@ -33,0 +33,0 @@ themes: themeNames |
@@ -10,3 +10,3 @@ "use strict"; | ||
var _addons = require("@storybook/addons"); | ||
var _previewApi = require("@storybook/preview-api"); | ||
@@ -50,3 +50,3 @@ var _helpers = require("./helpers"); | ||
var selected = (0, _helpers.pluckThemeFromContext)(context); | ||
var theme = (0, _addons.useMemo)(function () { | ||
var theme = (0, _previewApi.useMemo)(function () { | ||
var selectedThemeName = themeOverride || selected || defaultTheme; | ||
@@ -53,0 +53,0 @@ var pairs = Object.entries(themes); |
@@ -23,3 +23,5 @@ "use strict"; | ||
// @ts-expect-error | ||
if (module && module.hot && module.hot.decline) { | ||
// @ts-expect-error | ||
module.hot.decline(); | ||
@@ -26,0 +28,0 @@ } // make it work with --isolatedModules |
@@ -13,3 +13,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
import { useEffect } from "@storybook/addons"; | ||
import { useEffect } from "@storybook/preview-api"; | ||
import { initializeThemeState, pluckThemeFromContext, useThemeParameters } from "./helpers"; | ||
@@ -16,0 +16,0 @@ var DEFAULT_ELEMENT_SELECTOR = "html"; |
@@ -1,2 +0,2 @@ | ||
import { useEffect } from "@storybook/addons"; | ||
import { useEffect } from "@storybook/preview-api"; | ||
import { initializeThemeState, pluckThemeFromContext, useThemeParameters } from "./helpers"; | ||
@@ -3,0 +3,0 @@ var DEFAULT_ELEMENT_SELECTOR = "html"; |
@@ -1,2 +0,2 @@ | ||
import { addons, useParameter } from "@storybook/addons"; | ||
import { addons, useParameter } from "@storybook/preview-api"; | ||
import { GLOBAL_KEY, PARAM_KEY, THEMING_EVENTS, DEFAULT_THEME_PARAMETERS } from "../constants"; | ||
@@ -3,0 +3,0 @@ /** |
@@ -14,3 +14,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
import React from "react"; | ||
import { useMemo } from "@storybook/addons"; | ||
import { useMemo } from "@storybook/preview-api"; | ||
import { initializeThemeState, pluckThemeFromContext, useThemeParameters } from "./helpers"; | ||
@@ -17,0 +17,0 @@ |
@@ -0,2 +1,4 @@ | ||
// @ts-expect-error | ||
if (module && module.hot && module.hot.decline) { | ||
// @ts-expect-error | ||
module.hot.decline(); | ||
@@ -3,0 +5,0 @@ } // make it work with --isolatedModules |
@@ -1,2 +0,2 @@ | ||
import { DecoratorFunction } from "@storybook/addons"; | ||
import type { DecoratorFunction } from "@storybook/types"; | ||
export interface ClassNameStrategyConfiguration { | ||
@@ -3,0 +3,0 @@ themes: Record<string, string>; |
@@ -1,2 +0,2 @@ | ||
import { DecoratorFunction } from "@storybook/addons"; | ||
import type { DecoratorFunction } from "@storybook/types"; | ||
export interface DataAttributeStrategyConfiguration { | ||
@@ -3,0 +3,0 @@ themes: Record<string, string>; |
@@ -1,2 +0,2 @@ | ||
import { StoryContext } from "@storybook/addons"; | ||
import type { StoryContext } from "@storybook/types"; | ||
import { ThemeParameters } from "../constants"; | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { DecoratorFunction } from "@storybook/addons"; | ||
import type { DecoratorFunction } from "@storybook/types"; | ||
declare type Theme = Record<string, any>; | ||
@@ -3,0 +3,0 @@ declare type ThemeMap = Record<string, Theme>; |
{ | ||
"name": "@storybook/addon-styling", | ||
"version": "0.3.1", | ||
"version": "1.0.0-canary.8.d1e461a.0", | ||
"description": "A base addon for configuring popular styling tools", | ||
@@ -40,8 +40,18 @@ "keywords": [ | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"storybook": "start-storybook -p 6006", | ||
"start": "concurrently \"yarn build:watch\" \"yarn storybook -- --no-manager-cache --quiet\"", | ||
"build-storybook": "build-storybook", | ||
"storybook": "storybook dev -p 6006", | ||
"start": "concurrently \"yarn build:watch\" \"yarn storybook -- --quiet\"", | ||
"build-storybook": "storybook build", | ||
"prerelease": "zx scripts/prepublish-checks.mjs", | ||
"release": "yarn build && auto shipit" | ||
}, | ||
"dependencies": { | ||
"@storybook/addons": "^7.0.0-rc.3", | ||
"@storybook/api": "^7.0.0-rc.3", | ||
"@storybook/components": "^7.0.0-rc.3", | ||
"@storybook/core-events": "^7.0.0-rc.3", | ||
"@storybook/manager-api": "^7.0.0-rc.3", | ||
"@storybook/preview-api": "^7.0.0-rc.3", | ||
"@storybook/theming": "^7.0.0-rc.3", | ||
"@storybook/types": "^7.0.0-rc.3" | ||
}, | ||
"devDependencies": { | ||
@@ -53,4 +63,5 @@ "@babel/cli": "^7.12.1", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@storybook/addon-essentials": "^6.5.8", | ||
"@storybook/react": "^6.5.8", | ||
"@storybook/addon-essentials": "^7.0.0-rc.3", | ||
"@storybook/react": "^7.0.0-rc.3", | ||
"@storybook/react-webpack5": "^7.0.0-rc.3", | ||
"auto": "^10.3.0", | ||
@@ -66,2 +77,3 @@ "babel-loader": "^8.1.0", | ||
"rimraf": "^3.0.2", | ||
"storybook": "^7.0.0-rc.3", | ||
"typescript": "^4.2.4", | ||
@@ -71,8 +83,2 @@ "zx": "^1.14.1" | ||
"peerDependencies": { | ||
"@storybook/addons": "^6.5.8", | ||
"@storybook/api": "^6.5.8", | ||
"@storybook/components": "^6.5.8", | ||
"@storybook/core-events": "^6.5.8", | ||
"@storybook/manager-api": "^7.0.0-beta.56", | ||
"@storybook/theming": "^6.5.8", | ||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0", | ||
@@ -79,0 +85,0 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", |
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
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
1089
70756
12
21
49
+ Added@storybook/api@^7.0.0-rc.3
+ Added@storybook/types@^7.0.0-rc.3
+ Added@babel/runtime@7.26.0(transitive)
+ Added@floating-ui/core@1.6.8(transitive)
+ Added@floating-ui/dom@1.6.12(transitive)
+ Added@floating-ui/react-dom@2.1.2(transitive)
+ Added@floating-ui/utils@0.2.8(transitive)
+ Added@juggle/resize-observer@3.4.0(transitive)
+ Added@radix-ui/number@1.0.1(transitive)
+ Added@radix-ui/primitive@1.0.11.1.0(transitive)
+ Added@radix-ui/react-arrow@1.0.3(transitive)
+ Added@radix-ui/react-collection@1.0.31.1.0(transitive)
+ Added@radix-ui/react-compose-refs@1.0.11.1.0(transitive)
+ Added@radix-ui/react-context@1.0.11.1.0(transitive)
+ Added@radix-ui/react-direction@1.0.11.1.0(transitive)
+ Added@radix-ui/react-dismissable-layer@1.0.4(transitive)
+ Added@radix-ui/react-focus-guards@1.0.1(transitive)
+ Added@radix-ui/react-focus-scope@1.0.3(transitive)
+ Added@radix-ui/react-id@1.0.11.1.0(transitive)
+ Added@radix-ui/react-popper@1.1.2(transitive)
+ Added@radix-ui/react-portal@1.0.3(transitive)
+ Added@radix-ui/react-primitive@1.0.32.0.0(transitive)
+ Added@radix-ui/react-roving-focus@1.1.0(transitive)
+ Added@radix-ui/react-select@1.2.2(transitive)
+ Added@radix-ui/react-separator@1.1.0(transitive)
+ Added@radix-ui/react-slot@1.0.21.1.0(transitive)
+ Added@radix-ui/react-toggle@1.1.0(transitive)
+ Added@radix-ui/react-toggle-group@1.1.0(transitive)
+ Added@radix-ui/react-toolbar@1.1.0(transitive)
+ Added@radix-ui/react-use-callback-ref@1.0.11.1.0(transitive)
+ Added@radix-ui/react-use-controllable-state@1.0.11.1.0(transitive)
+ Added@radix-ui/react-use-escape-keydown@1.0.3(transitive)
+ Added@radix-ui/react-use-layout-effect@1.0.11.1.0(transitive)
+ Added@radix-ui/react-use-previous@1.0.1(transitive)
+ Added@radix-ui/react-use-rect@1.0.1(transitive)
+ Added@radix-ui/react-use-size@1.0.1(transitive)
+ Added@radix-ui/react-visually-hidden@1.0.3(transitive)
+ Added@radix-ui/rect@1.0.1(transitive)
+ Added@storybook/addons@7.6.20(transitive)
+ Added@storybook/api@7.6.20(transitive)
+ Added@storybook/components@7.6.20(transitive)
+ Added@storybook/preview-api@7.6.20(transitive)
+ Addedaria-hidden@1.2.4(transitive)
+ Addeddetect-node-es@1.1.0(transitive)
+ Addedget-nonce@1.0.1(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedreact-remove-scroll@2.5.5(transitive)
+ Addedreact-remove-scroll-bar@2.3.6(transitive)
+ Addedreact-style-singleton@2.2.1(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedsynchronous-promise@2.0.17(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addeduse-callback-ref@1.3.2(transitive)
+ Addeduse-resize-observer@9.1.0(transitive)
+ Addeduse-sidecar@1.1.2(transitive)
- Removed@storybook/addons@6.5.16(transitive)
- Removed@storybook/api@6.5.16(transitive)
- Removed@storybook/channels@6.5.16(transitive)
- Removed@storybook/client-logger@6.5.16(transitive)
- Removed@storybook/components@6.5.16(transitive)
- Removed@storybook/core-events@6.5.16(transitive)
- Removed@storybook/csf@0.0.2--canary.4566f4d.1(transitive)
- Removed@storybook/router@6.5.16(transitive)
- Removed@storybook/semver@7.3.2(transitive)
- Removed@storybook/theming@6.5.16(transitive)
- Removed@types/is-function@1.0.3(transitive)
- Removed@types/webpack-env@1.18.5(transitive)
- Removedcore-js@3.39.0(transitive)
- Removeddom-walk@0.1.2(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedglobal@4.4.0(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedis-function@1.0.2(transitive)
- Removedis-regex@1.2.0(transitive)
- Removedis-symbol@1.1.0(transitive)
- Removedisobject@4.0.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedmin-document@2.19.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedprocess@0.11.10(transitive)
- Removedregenerator-runtime@0.13.11(transitive)
- Removedsafe-regex-test@1.0.3(transitive)
- Removedtelejson@6.0.8(transitive)