@forge/react 11.8.3-next.0 → 11.9.0-next.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @forge/react
2
2
 
3
+ ## 11.9.0-next.1
4
+
5
+ ### Minor Changes
6
+
7
+ - 92c8fe8: Added useTheme hook to access the current theme and subscribe to theme updates
8
+
3
9
  ## 11.8.3-next.0
4
10
 
5
11
  ### Patch Changes
@@ -2,23 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const listeners = new Map();
6
- const simpleBridgeEvents = {
7
- on: (event, callback) => {
8
- if (!listeners.has(event)) {
9
- listeners.set(event, []);
10
- }
11
- listeners.get(event)?.push(callback);
12
- },
13
- emit: (event, data) => {
14
- if (listeners.has(event)) {
15
- listeners.get(event)?.forEach((callback) => callback(data));
16
- }
17
- },
18
- clearListeners: (event) => {
19
- listeners.delete(event);
20
- }
21
- };
5
+ const utils_1 = require("./utils");
22
6
  // defining mock function above import so it is initialised before jest.mock runs
23
7
  const mockGetContext = jest.fn(async () => null);
24
8
  const react_1 = tslib_1.__importStar(require("react"));
@@ -29,7 +13,7 @@ jest.mock('@forge/bridge', () => ({
29
13
  view: {
30
14
  getContext: mockGetContext
31
15
  },
32
- events: simpleBridgeEvents
16
+ events: utils_1.simpleBridgeEvents
33
17
  }));
34
18
  const MOCK_CONFIG = {
35
19
  value: 1
@@ -59,7 +43,7 @@ const renderTest = async () => {
59
43
  };
60
44
  describe('useConfig', () => {
61
45
  beforeAll(() => (0, testUtils_1.setupBridge)());
62
- beforeEach(() => simpleBridgeEvents.clearListeners('FORGE_CORE_MACRO_CONFIG_CHANGED'));
46
+ beforeEach(() => utils_1.simpleBridgeEvents.clearListeners('FORGE_CORE_MACRO_CONFIG_CHANGED'));
63
47
  afterEach(() => jest.clearAllMocks());
64
48
  it('correctly outputs a given config', async () => {
65
49
  mockGetContext.mockResolvedValue(MOCK_CONTEXT_WITH_CONFIG);
@@ -78,7 +62,7 @@ describe('useConfig', () => {
78
62
  await renderTest();
79
63
  expect(mockGetContext).toHaveBeenCalledTimes(1);
80
64
  const newConfig = { value: 2 };
81
- simpleBridgeEvents.emit('FORGE_CORE_MACRO_CONFIG_CHANGED', newConfig);
65
+ utils_1.simpleBridgeEvents.emit('FORGE_CORE_MACRO_CONFIG_CHANGED', newConfig);
82
66
  expect(mockGetContext).toHaveBeenCalledTimes(2);
83
67
  });
84
68
  });
@@ -17,6 +17,7 @@ const mockGetMetadata = jest.fn();
17
17
  const reconcilerTestRenderer_1 = tslib_1.__importDefault(require("../../__test__/reconcilerTestRenderer"));
18
18
  const testUtils_1 = require("../../__test__/testUtils");
19
19
  const useObjectStore_1 = require("../useObjectStore");
20
+ const utils_1 = require("./utils");
20
21
  // Mock @forge/bridge
21
22
  jest.mock('@forge/bridge', () => ({
22
23
  objectStore: {
@@ -170,7 +171,7 @@ describe('useObjectStore', () => {
170
171
  objects: [MOCK_BLOB]
171
172
  });
172
173
  // Give a tick for state to update
173
- await new Promise((resolve) => setTimeout(resolve, 0));
174
+ await (0, utils_1.sleep)();
174
175
  // Should have temp object with isUploading: true
175
176
  expect(hookResult.objectStates).toHaveLength(1);
176
177
  expect(hookResult.objectStates[0].isUploading).toBe(true);
@@ -278,7 +279,7 @@ describe('useObjectStore', () => {
278
279
  keys: [MOCK_OBJECT_KEY_1]
279
280
  });
280
281
  // Give a tick for state to update
281
- await new Promise((resolve) => setTimeout(resolve, 0));
282
+ await (0, utils_1.sleep)();
282
283
  // Should have isDeleting: true
283
284
  expect(hookResult.objectStates[0].isDeleting).toBe(true);
284
285
  // Resolve delete
@@ -361,7 +362,7 @@ describe('useObjectStore', () => {
361
362
  keys: [MOCK_OBJECT_KEY_1, MOCK_OBJECT_KEY_2]
362
363
  });
363
364
  // Give a tick for state to update
364
- await new Promise((resolve) => setTimeout(resolve, 0));
365
+ await (0, utils_1.sleep)();
365
366
  // Both should have isDeleting: true
366
367
  expect(hookResult.objectStates[0].isDeleting).toBe(true);
367
368
  expect(hookResult.objectStates[1].isDeleting).toBe(true);
@@ -418,7 +419,7 @@ describe('useObjectStore', () => {
418
419
  keys: [MOCK_OBJECT_KEY_1]
419
420
  });
420
421
  // Give a tick for state to update
421
- await new Promise((resolve) => setTimeout(resolve, 0));
422
+ await (0, utils_1.sleep)();
422
423
  // Should have isDownloading: true
423
424
  expect(hookResult.objectStates[0].isDownloading).toBe(true);
424
425
  // Resolve download
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useTheme.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.test.d.ts","sourceRoot":"","sources":["../../../src/hooks/__test__/useTheme.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const utils_1 = require("./utils");
6
+ // defining mock function above import so it is initialised before jest.mock runs
7
+ const mockGetContext = jest.fn(async () => null);
8
+ const react_1 = tslib_1.__importStar(require("react"));
9
+ const reconcilerTestRenderer_1 = tslib_1.__importDefault(require("../../__test__/reconcilerTestRenderer"));
10
+ const useTheme_1 = require("../useTheme");
11
+ const testUtils_1 = require("../../__test__/testUtils");
12
+ jest.mock('@forge/bridge', () => ({
13
+ view: {
14
+ getContext: mockGetContext
15
+ },
16
+ events: utils_1.simpleBridgeEvents
17
+ }));
18
+ const MOCK_THEME = {
19
+ colorMode: 'dark',
20
+ colorScheme: 'blue'
21
+ };
22
+ const MOCK_CONTEXT_WITH_THEME = {
23
+ theme: MOCK_THEME
24
+ };
25
+ const MOCK_CONTEXT_NO_THEME = {
26
+ extension: {}
27
+ };
28
+ const themeListener = jest.fn();
29
+ // react app fragment to load useTheme hook
30
+ const renderTest = async () => {
31
+ const Test = () => {
32
+ const theme = (0, useTheme_1.useTheme)();
33
+ (0, react_1.useEffect)(() => themeListener(theme), [theme]);
34
+ return (0, jsx_runtime_1.jsx)(react_1.default.Fragment, {});
35
+ };
36
+ const { update } = await reconcilerTestRenderer_1.default.create((0, jsx_runtime_1.jsx)(Test, {}));
37
+ return {
38
+ update: async () => {
39
+ await update((0, jsx_runtime_1.jsx)(Test, {}));
40
+ }
41
+ };
42
+ };
43
+ describe('useTheme', () => {
44
+ beforeAll(() => (0, testUtils_1.setupBridge)());
45
+ beforeEach(() => {
46
+ utils_1.simpleBridgeEvents.clearListeners('FORGE_CORE_THEME_CHANGED');
47
+ themeListener.mockClear();
48
+ });
49
+ afterEach(() => jest.clearAllMocks());
50
+ it('correctly outputs a given theme', async () => {
51
+ mockGetContext.mockResolvedValue(MOCK_CONTEXT_WITH_THEME);
52
+ await renderTest();
53
+ expect(themeListener).toHaveBeenCalledWith(expect.objectContaining(MOCK_THEME));
54
+ });
55
+ it('when there is no theme, outputs null', async () => {
56
+ mockGetContext.mockResolvedValue(MOCK_CONTEXT_NO_THEME);
57
+ await renderTest();
58
+ expect(themeListener).toHaveBeenCalledWith(null);
59
+ });
60
+ it('when theme is updated via event, outputs new theme', async () => {
61
+ mockGetContext.mockResolvedValue(MOCK_CONTEXT_WITH_THEME);
62
+ await renderTest();
63
+ expect(themeListener).toHaveBeenCalledWith(expect.objectContaining(MOCK_THEME));
64
+ const newTheme = { colorMode: 'light', colorScheme: 'red' };
65
+ utils_1.simpleBridgeEvents.emit('FORGE_CORE_THEME_CHANGED', { theme: newTheme });
66
+ await (0, utils_1.sleep)();
67
+ expect(themeListener).toHaveBeenCalledWith(expect.objectContaining(newTheme));
68
+ });
69
+ it('does not cause re-render when theme content is the same', async () => {
70
+ mockGetContext.mockResolvedValue(MOCK_CONTEXT_WITH_THEME);
71
+ await renderTest();
72
+ expect(themeListener).toHaveBeenCalledTimes(2); // undefined, then theme
73
+ // Emit same theme content but different object reference
74
+ utils_1.simpleBridgeEvents.emit('FORGE_CORE_THEME_CHANGED', {
75
+ theme: { ...MOCK_THEME } // New object, same content
76
+ });
77
+ // Should not trigger re-render due to isEqual check
78
+ expect(themeListener).toHaveBeenCalledTimes(2);
79
+ });
80
+ it('handles event firing before getContext completes', async () => {
81
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
82
+ let resolveGetContext = () => { };
83
+ const getContextPromise = new Promise((resolve) => {
84
+ resolveGetContext = resolve;
85
+ });
86
+ mockGetContext.mockReturnValue(getContextPromise);
87
+ const renderPromise = renderTest();
88
+ // Fire event before getContext resolves
89
+ const eventTheme = { colorMode: 'light', colorScheme: 'green' };
90
+ utils_1.simpleBridgeEvents.emit('FORGE_CORE_THEME_CHANGED', { theme: eventTheme });
91
+ // Now resolve getContext
92
+ resolveGetContext?.(MOCK_CONTEXT_WITH_THEME);
93
+ await renderPromise;
94
+ // Should have the event theme, not the getContext theme
95
+ expect(themeListener).toHaveBeenCalledWith(expect.objectContaining(eventTheme));
96
+ });
97
+ });
@@ -0,0 +1,9 @@
1
+ export declare const simpleBridgeEvents: {
2
+ on: (event: string, callback: Function) => Promise<{
3
+ unsubscribe: () => void;
4
+ }>;
5
+ emit: (event: string, data?: unknown) => void;
6
+ clearListeners: (event: string) => void;
7
+ };
8
+ export declare const sleep: () => Promise<unknown>;
9
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/hooks/__test__/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;gBACjB,MAAM,YAAY,QAAQ;;;kBAiBxB,MAAM,SAAS,OAAO;4BAKZ,MAAM;CAG/B,CAAC;AAGF,eAAO,MAAM,KAAK,wBAAyD,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sleep = exports.simpleBridgeEvents = void 0;
4
+ const listeners = new Map();
5
+ exports.simpleBridgeEvents = {
6
+ on: (event, callback) => {
7
+ if (!listeners.has(event)) {
8
+ listeners.set(event, []);
9
+ }
10
+ listeners.get(event)?.push(callback);
11
+ return Promise.resolve({
12
+ unsubscribe: () => {
13
+ const eventListeners = listeners.get(event);
14
+ if (eventListeners) {
15
+ const index = eventListeners.indexOf(callback);
16
+ if (index > -1) {
17
+ eventListeners.splice(index, 1);
18
+ }
19
+ }
20
+ }
21
+ });
22
+ },
23
+ emit: (event, data) => {
24
+ if (listeners.has(event)) {
25
+ listeners.get(event)?.forEach((callback) => callback(data));
26
+ }
27
+ },
28
+ clearListeners: (event) => {
29
+ listeners.delete(event);
30
+ }
31
+ };
32
+ // Give a tick for state to update
33
+ const sleep = () => new Promise((resolve) => setTimeout(resolve, 0));
34
+ exports.sleep = sleep;
@@ -0,0 +1,5 @@
1
+ import { type FullContext } from '@forge/bridge';
2
+ declare type Theme = FullContext['theme'];
3
+ export declare const useTheme: () => Theme | null;
4
+ export {};
5
+ //# sourceMappingURL=useTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,WAAW,EAAQ,MAAM,eAAe,CAAC;AAG/D,aAAK,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;AAElC,eAAO,MAAM,QAAQ,QAAO,KAAK,GAAG,IAgCnC,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useTheme = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = require("react");
6
+ const bridge_1 = require("@forge/bridge");
7
+ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
8
+ const useTheme = () => {
9
+ const [theme, setTheme] = (0, react_1.useState)(null);
10
+ const themeLoadedRef = (0, react_1.useRef)(false);
11
+ (0, react_1.useEffect)(() => {
12
+ void (async () => {
13
+ if (!themeLoadedRef.current) {
14
+ const context = await bridge_1.view.getContext();
15
+ if (context?.theme && !themeLoadedRef.current) {
16
+ setTheme((currentTheme) => {
17
+ return (0, isEqual_1.default)(currentTheme, context.theme) ? currentTheme : context.theme;
18
+ });
19
+ themeLoadedRef.current = true;
20
+ }
21
+ }
22
+ })();
23
+ }, []);
24
+ (0, react_1.useEffect)(() => {
25
+ const sub = bridge_1.events.on('FORGE_CORE_THEME_CHANGED', ({ theme: updatedTheme }) => {
26
+ themeLoadedRef.current = true;
27
+ setTheme((currentTheme) => {
28
+ return (0, isEqual_1.default)(currentTheme, updatedTheme) ? currentTheme : updatedTheme;
29
+ });
30
+ });
31
+ return () => {
32
+ void sub.then((subscription) => subscription.unsubscribe());
33
+ };
34
+ }, []);
35
+ return theme;
36
+ };
37
+ exports.useTheme = useTheme;
package/out/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { XCSSObject } from './package-types';
2
2
  export declare const xcss: (style: XCSSObject) => XCSSObject;
3
3
  export { useProductContext } from './hooks/useProductContext';
4
4
  export { useConfig } from './hooks/useConfig';
5
+ export { useTheme } from './hooks/useTheme';
5
6
  export { usePermissions, type Permissions, type PermissionRequirements, type MissingPermissions, type PermissionCheckResult } from './hooks/usePermissions';
6
7
  export { ForgeReconciler as default } from './reconciler';
7
8
  export * from './components';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,eAAO,MAAM,IAAI,UAAW,UAAU,KAAG,UAAmB,CAAC;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,qBAA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EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAClE,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,UAAU,EACV,eAAe,EACf,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,UAAU,EACV,UAAU,EACV,yBAAyB,EACzB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,SAAS,EACT,aAAa,EACb,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,WAAW,EACX,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,4BAA4B,EAC5B,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,aAAa,EACb,gBAAgB,EACjB,MAAM,6BAA6B,CAAC"}
package/out/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useObjectStore = exports.useForm = exports.replaceUnsupportedDocumentNodes = exports.I18nProvider = exports.useTranslation = exports.useIssueProperty = exports.useSpaceProperty = exports.useContentProperty = exports.default = exports.usePermissions = exports.useConfig = exports.useProductContext = exports.xcss = void 0;
3
+ exports.useObjectStore = exports.useForm = exports.replaceUnsupportedDocumentNodes = exports.I18nProvider = exports.useTranslation = exports.useIssueProperty = exports.useSpaceProperty = exports.useContentProperty = exports.default = exports.usePermissions = exports.useTheme = exports.useConfig = exports.useProductContext = exports.xcss = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const xcss = (style) => style;
6
6
  exports.xcss = xcss;
@@ -8,6 +8,8 @@ var useProductContext_1 = require("./hooks/useProductContext");
8
8
  Object.defineProperty(exports, "useProductContext", { enumerable: true, get: function () { return useProductContext_1.useProductContext; } });
9
9
  var useConfig_1 = require("./hooks/useConfig");
10
10
  Object.defineProperty(exports, "useConfig", { enumerable: true, get: function () { return useConfig_1.useConfig; } });
11
+ var useTheme_1 = require("./hooks/useTheme");
12
+ Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return useTheme_1.useTheme; } });
11
13
  var usePermissions_1 = require("./hooks/usePermissions");
12
14
  Object.defineProperty(exports, "usePermissions", { enumerable: true, get: function () { return usePermissions_1.usePermissions; } });
13
15
  var reconciler_1 = require("./reconciler");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/react",
3
- "version": "11.8.3-next.0",
3
+ "version": "11.9.0-next.1",
4
4
  "description": "Forge React reconciler",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",