@xylabs/react-pixel-debugger 2.12.21 → 2.12.24

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/docs.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "id": 0,
3
+ "name": "@xylabs/react-pixel-debugger",
4
+ "kind": 1,
5
+ "flags": {},
6
+ "originalName": ""
7
+ }
package/package.json CHANGED
@@ -13,22 +13,22 @@
13
13
  "packages/*"
14
14
  ],
15
15
  "dependencies": {
16
- "@emotion/react": "^11.9.0",
17
- "@emotion/styled": "^11.8.1",
16
+ "@emotion/react": "^11.9.3",
17
+ "@emotion/styled": "^11.9.3",
18
18
  "@mui/material": "^5.8.3",
19
19
  "@xylabs/pixel": "^1.3.9",
20
- "@xylabs/react-button": "^2.12.21",
21
- "@xylabs/react-common": "^2.12.21",
22
- "@xylabs/react-flexbox": "^2.12.21",
23
- "@xylabs/react-pixel": "^2.12.21",
24
- "@xylabs/react-shared": "^2.12.21"
20
+ "@xylabs/react-button": "^2.12.24",
21
+ "@xylabs/react-common": "^2.12.24",
22
+ "@xylabs/react-flexbox": "^2.12.24",
23
+ "@xylabs/react-pixel": "^2.12.24",
24
+ "@xylabs/react-shared": "^2.12.24"
25
25
  },
26
26
  "description": "Common React library for all XY Labs projects that use React",
27
27
  "devDependencies": {
28
- "@babel/core": "^7.18.2",
28
+ "@babel/core": "^7.18.5",
29
29
  "@babel/preset-env": "^7.18.2",
30
- "@storybook/react": "^6.5.8",
31
- "@storybook/testing-library": "^0.0.11",
30
+ "@storybook/react": "^6.5.9",
31
+ "@storybook/testing-library": "^0.0.13",
32
32
  "@types/react": "^18.0.12",
33
33
  "@xylabs/eslint-config-react": "^2.1.5",
34
34
  "@xylabs/ts-scripts": "^1.0.66",
@@ -83,6 +83,6 @@
83
83
  },
84
84
  "sideEffects": false,
85
85
  "types": "dist/esm/index.d.ts",
86
- "version": "2.12.21",
86
+ "version": "2.12.24",
87
87
  "packageManager": "yarn@3.1.1"
88
88
  }
@@ -1,6 +1,6 @@
1
1
  import { ComponentMeta, ComponentStory } from '@storybook/react'
2
2
  import { PixelApi, XyPixel } from '@xylabs/pixel'
3
- import { useEffect } from 'react'
3
+ import { useEffect, useState } from 'react'
4
4
 
5
5
  import { PixelDebugger, PixelDebuggerToggle } from './index'
6
6
  import { PixelDebuggerProvider } from './PixelDebuggerProvider'
@@ -13,19 +13,22 @@ const StorybookEntry = {
13
13
  page: null,
14
14
  },
15
15
  },
16
- title: 'Components/PixelDebuggerToggle',
16
+ title: 'pixel-debugger/PixelDebuggerToggle',
17
17
  } as ComponentMeta<typeof PixelDebuggerToggle>
18
18
 
19
19
  const Template: ComponentStory<typeof PixelDebuggerToggle> = (args) => {
20
+ const [pixel, setPixel] = useState<XyPixel>()
20
21
  useEffect(() => {
21
22
  XyPixel.selectApi(new PixelApi('local'))
22
- XyPixel.init('storybookPixel')
23
+ setPixel(XyPixel.init('storybookPixel'))
23
24
  }, [])
24
- return (
25
+ return pixel ? (
25
26
  <PixelDebuggerProvider>
26
27
  <PixelDebuggerToggle {...args} />
27
28
  <PixelDebugger />
28
29
  </PixelDebuggerProvider>
30
+ ) : (
31
+ <></>
29
32
  )
30
33
  }
31
34