@noya-app/noya-designsystem 0.1.28 → 0.1.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noya-app/noya-designsystem",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -1,6 +1,9 @@
1
- import { useDesignSystemTheme } from "@noya-app/noya-designsystem";
1
+ import {
2
+ DesignSystemThemeProvider,
3
+ useDesignSystemTheme,
4
+ } from "@noya-app/noya-designsystem";
2
5
  import { useKeyboardShortcuts } from "@noya-app/noya-keymap";
3
- import React, { forwardRef, useImperativeHandle, useRef } from "react";
6
+ import React, { forwardRef, memo, useImperativeHandle, useRef } from "react";
4
7
  import {
5
8
  ImperativePanelGroupHandle,
6
9
  ImperativePanelHandle,
@@ -54,7 +57,7 @@ export type IWorkspaceLayout = {
54
57
  toggleRightSidebar: () => void;
55
58
  };
56
59
 
57
- export const WorkspaceLayout = forwardRef(function WorkspaceLayout(
60
+ const WorkspaceLayoutWithTheme = forwardRef(function WorkspaceLayoutWithTheme(
58
61
  {
59
62
  autoSavePrefix,
60
63
  leftSidebarContent: leftPanelContent,
@@ -260,3 +263,11 @@ export const WorkspaceLayout = forwardRef(function WorkspaceLayout(
260
263
  </div>
261
264
  );
262
265
  });
266
+
267
+ export const WorkspaceLayout = memo(function WorkspaceLayout(props: Props) {
268
+ return (
269
+ <DesignSystemThemeProvider>
270
+ <WorkspaceLayoutWithTheme {...props} />
271
+ </DesignSystemThemeProvider>
272
+ );
273
+ });