@open-pioneer/notifier 4.4.0-dev-notifier-offsets.20260120104813 → 4.4.0-dev.20260121102820
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 +6 -8
- package/NotificationServiceImpl.js +0 -15
- package/NotificationServiceImpl.js.map +1 -1
- package/Notifier.d.ts +1 -9
- package/Notifier.js +4 -7
- package/Notifier.js.map +1 -1
- package/README.md +0 -7
- package/api.d.ts +0 -15
- package/package.json +5 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# @open-pioneer/notifier
|
|
2
2
|
|
|
3
|
-
## 4.4.0-dev
|
|
3
|
+
## 4.4.0-dev.20260121102820
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
These are properties that will be applied to the notifier's root div.
|
|
9
|
-
- 8076701: Allow configuration of the gap between the first notification and the screen edge(s) via the new `offsets` package property.
|
|
7
|
+
- b28d6bc: Update to chakra 3.31.0
|
|
10
8
|
|
|
11
9
|
### Patch Changes
|
|
12
10
|
|
|
@@ -14,14 +12,14 @@
|
|
|
14
12
|
- 554d58e: Use `workspace:*` instead of `workspace:^` for local package references as default. This ensures that trails packages from this repository are always referenced with their exact version to avoid potential issues with version mismatches. If a project specifically wants to use other versions for some trails packages, a pnpm override can be used to force other versions.
|
|
15
13
|
- Updated dependencies [f9aaf46]
|
|
16
14
|
- Updated dependencies [7087ea7]
|
|
15
|
+
- Updated dependencies [b28d6bc]
|
|
17
16
|
- Updated dependencies [554d58e]
|
|
18
17
|
- Updated dependencies [1cc3415]
|
|
19
18
|
- Updated dependencies [1872a6d]
|
|
20
19
|
- Updated dependencies [84068f2]
|
|
21
|
-
-
|
|
22
|
-
- @open-pioneer/
|
|
23
|
-
- @open-pioneer/
|
|
24
|
-
- @open-pioneer/runtime@4.4.0-dev-notifier-offsets.20260120104813
|
|
20
|
+
- @open-pioneer/core@4.4.0-dev.20260121102820
|
|
21
|
+
- @open-pioneer/react-utils@4.4.0-dev.20260121102820
|
|
22
|
+
- @open-pioneer/runtime@4.4.0-dev.20260121102820
|
|
25
23
|
|
|
26
24
|
## 4.3.0
|
|
27
25
|
|
|
@@ -12,7 +12,6 @@ class NotificationServiceImpl {
|
|
|
12
12
|
const typedProperties = properties;
|
|
13
13
|
this.toaster = createToaster({
|
|
14
14
|
placement: getPlacement(typedProperties.position),
|
|
15
|
-
offsets: getOffsets(typedProperties.offsets),
|
|
16
15
|
pauseOnPageIdle: true
|
|
17
16
|
});
|
|
18
17
|
if (import.meta.env.DEV && !import.meta.env.VITEST) {
|
|
@@ -110,20 +109,6 @@ function getPlacement(configPosition = "top-right") {
|
|
|
110
109
|
return "top-end";
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
|
-
function getOffsets(offsetsConfig) {
|
|
114
|
-
if (!offsetsConfig) {
|
|
115
|
-
return void 0;
|
|
116
|
-
}
|
|
117
|
-
if (typeof offsetsConfig === "string") {
|
|
118
|
-
return {
|
|
119
|
-
left: offsetsConfig,
|
|
120
|
-
top: offsetsConfig,
|
|
121
|
-
right: offsetsConfig,
|
|
122
|
-
bottom: offsetsConfig
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return offsetsConfig;
|
|
126
|
-
}
|
|
127
112
|
|
|
128
113
|
export { NotificationServiceImpl };
|
|
129
114
|
//# sourceMappingURL=NotificationServiceImpl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationServiceImpl.js","sources":["NotificationServiceImpl.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { createToaster, CreateToasterProps, CreateToasterReturn } from \"@chakra-ui/react\";\nimport type {\n NotificationLevel,\n NotificationOptions,\n NotificationService,\n NotifierProperties,\n
|
|
1
|
+
{"version":3,"file":"NotificationServiceImpl.js","sources":["NotificationServiceImpl.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { createToaster, CreateToasterProps, CreateToasterReturn } from \"@chakra-ui/react\";\nimport type {\n NotificationLevel,\n NotificationOptions,\n NotificationService,\n NotifierProperties,\n SimpleNotificationOptions\n} from \"./api\";\nimport { Resource, createLogger } from \"@open-pioneer/core\";\nimport { ApplicationContext, ServiceOptions } from \"@open-pioneer/runtime\";\nconst LOG = createLogger(\"notifier:NotificationService\");\n\nexport type ToasterObject = CreateToasterReturn;\n\nexport interface ToastMeta {\n closable: boolean;\n}\n\nexport interface InternalNotificationAPI extends NotificationService {\n // Toasts in here carry `ToastMeta` metadata\n readonly toaster: ToasterObject;\n registerUI(): Resource | undefined;\n}\n\ninterface References {\n appCtx: ApplicationContext;\n}\n\n// 7 days. Needed because there is no \"indefinite\" timeout for tooltips in current chakra.\nconst PERSISTENT_TIMEOUT = 7 * 24 * 60 * 60 * 1000;\n\nexport class NotificationServiceImpl implements InternalNotificationAPI {\n #uiPresent = false;\n #uiCheckTimeoutId: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n readonly toaster: ToasterObject;\n\n constructor({ properties }: ServiceOptions<References>) {\n const typedProperties = properties as NotifierProperties;\n\n this.toaster = createToaster({\n placement: getPlacement(typedProperties.position),\n pauseOnPageIdle: true\n });\n\n if (import.meta.env.DEV && !import.meta.env.VITEST) {\n this.#uiCheckTimeoutId = setTimeout(() => {\n this.#checkUiNotification();\n this.#uiCheckTimeoutId = undefined;\n }, 5000);\n }\n }\n\n destroy() {\n clearTimeout(this.#uiCheckTimeoutId);\n this.#uiCheckTimeoutId = undefined;\n }\n\n notify(options: NotificationOptions): void {\n // Slightly delay the create call.\n // `toaster.create` currently calls `React.flushSync` somewhere deep inside zag-js.\n // This causes warnings when calling `notify()` in a useEffect().\n queueMicrotask(() => {\n this.toaster.create({\n type: options.level ?? \"info\",\n title: options.title,\n description: options.message,\n\n // Chakra currently has no concept of persistent toasts (other than type \"loading\"),\n // so we just use a very long timeout instead.\n // Note: MAX_VALUE or Infinity does not work either (probably too big for some computations made internally).\n duration: options.displayDuration ?? PERSISTENT_TIMEOUT,\n\n // Additional data for the toast (can be arbitrary)\n meta: {\n closable: true\n } satisfies ToastMeta\n });\n });\n }\n\n success(options: SimpleNotificationOptions): void {\n this.#sendSimpleNotification(\"success\", options);\n }\n\n info(options: SimpleNotificationOptions): void {\n this.#sendSimpleNotification(\"info\", options);\n }\n\n warning(options: SimpleNotificationOptions): void {\n this.#sendSimpleNotification(\"warning\", options);\n }\n\n error(options: SimpleNotificationOptions): void {\n this.#sendSimpleNotification(\"error\", options);\n }\n\n #sendSimpleNotification(level: NotificationLevel, options: SimpleNotificationOptions): void {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.notify({ ...options, level });\n }\n\n closeAll(): void {\n this.toaster.dismiss();\n }\n\n registerUI(): Resource | undefined {\n // We only support exactly one handler.\n if (this.#uiPresent) {\n LOG.warn(\n \"A notifier UI has already been registered; this new component will be ignored.\\n\" +\n \"The <Notifier /> component has likely been used twice in your application.\"\n );\n return undefined;\n }\n\n this.#uiPresent = true;\n let destroyed = false;\n return {\n destroy: () => {\n if (destroyed) {\n return;\n }\n\n destroyed = true;\n this.#uiPresent = false;\n }\n };\n }\n\n #checkUiNotification() {\n if (!this.#uiPresent) {\n LOG.warn(\n `No notifier UI has been registered: notifications will not be visible.\\n` +\n `Make sure that your app contains the <Notifier /> component.`\n );\n }\n }\n}\n\n// Map to chakra placement\nfunction getPlacement(\n configPosition: NotifierProperties[\"position\"] = \"top-right\"\n): CreateToasterProps[\"placement\"] {\n switch (configPosition) {\n case \"top\":\n return \"top\";\n case \"top-left\":\n return \"top-start\";\n case \"top-right\":\n return \"top-end\";\n case \"bottom\":\n return \"bottom\";\n case \"bottom-left\":\n return \"bottom-start\";\n case \"bottom-right\":\n return \"bottom-end\";\n default:\n return \"top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AAAA,EAEA,oBAAA,GAAuB;AACnB,IAAA,IAAI,CAAC,KAAK,UAAA,EAAY;AAClB,MAAA,GAAA,CAAI,IAAA;AAAA,QACA,CAAA;AAAA,4DAAA;AAAA,OAEJ;AAAA,IACJ;AAAA,EACJ;AACJ;AAGA,SAAS,YAAA,CACL,iBAAiD,WAAA,EAClB;AAC/B,EAAA,QAAQ,cAAA;AAAgB,IACpB,KAAK,KAAA;AACD,MAAA,OAAO,KAAA;AAAA,IACX,KAAK,UAAA;AACD,MAAA,OAAO,WAAA;AAAA,IACX,KAAK,WAAA;AACD,MAAA,OAAO,SAAA;AAAA,IACX,KAAK,QAAA;AACD,MAAA,OAAO,QAAA;AAAA,IACX,KAAK,aAAA;AACD,MAAA,OAAO,cAAA;AAAA,IACX,KAAK,cAAA;AACD,MAAA,OAAO,YAAA;AAAA,IACX;AACI,MAAA,OAAO,SAAA;AAAA;AAEnB;;;;"}
|
package/Notifier.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { BoxProps } from "@chakra-ui/react";
|
|
2
1
|
/** Props supported by the {@link Notifier} component. */
|
|
3
2
|
export interface NotifierProps {
|
|
4
|
-
/**
|
|
5
|
-
* Props to be added to the notifier's root container.
|
|
6
|
-
*
|
|
7
|
-
* NOTE: Chakra's toaster currently hard codes many style properties using element styles.
|
|
8
|
-
* These styles cannot be easily overwritten, unless one uses `!important`.
|
|
9
|
-
**/
|
|
10
|
-
rootProps?: BoxProps;
|
|
11
3
|
}
|
|
12
4
|
/**
|
|
13
5
|
* Shows notifications sent via the `NotificationService`.
|
|
@@ -28,4 +20,4 @@ export interface NotifierProps {
|
|
|
28
20
|
* }
|
|
29
21
|
* ```
|
|
30
22
|
*/
|
|
31
|
-
export declare function Notifier(
|
|
23
|
+
export declare function Notifier(_props: NotifierProps): false | import("react/jsx-runtime").JSX.Element;
|
package/Notifier.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useIntl, useService } from './_virtual/hooks.js';
|
|
|
4
4
|
import { memo, useState, useEffect } from 'react';
|
|
5
5
|
import { LuTriangleAlert, LuCircleAlert, LuCircleCheck, LuInfo } from 'react-icons/lu';
|
|
6
6
|
|
|
7
|
-
function Notifier(
|
|
7
|
+
function Notifier(_props) {
|
|
8
8
|
const notificationService = useService(
|
|
9
9
|
"notifier.NotificationService"
|
|
10
10
|
);
|
|
@@ -20,22 +20,19 @@ function Notifier(props) {
|
|
|
20
20
|
handle.destroy();
|
|
21
21
|
};
|
|
22
22
|
}, [notificationService]);
|
|
23
|
-
return active && /* @__PURE__ */ jsx(Toaster, {
|
|
23
|
+
return active && /* @__PURE__ */ jsx(Toaster, { toaster: notificationService.toaster });
|
|
24
24
|
}
|
|
25
25
|
const Toaster = memo(function Toaster2(props) {
|
|
26
|
-
const { rootProps, toaster } = props;
|
|
27
26
|
const intl = useIntl();
|
|
28
27
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
|
|
29
28
|
Toaster$1,
|
|
30
29
|
{
|
|
30
|
+
toaster: props.toaster,
|
|
31
31
|
insetInline: { mdDown: "4" },
|
|
32
32
|
"aria-label": intl.formatMessage({
|
|
33
33
|
id: "regionLabel"
|
|
34
34
|
}),
|
|
35
|
-
|
|
36
|
-
...rootProps,
|
|
37
|
-
toaster,
|
|
38
|
-
children: (toast) => /* @__PURE__ */ jsxs(Toast.Root, { className: "notifier-toast", width: { md: "sm" }, alignItems: "center", children: [
|
|
35
|
+
children: (toast) => /* @__PURE__ */ jsxs(Toast.Root, { width: { md: "sm" }, alignItems: "center", children: [
|
|
39
36
|
toast.type === "loading" ? /* @__PURE__ */ jsx(Spinner, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ jsx(ToastIndicator, { type: toast.type ?? "" }),
|
|
40
37
|
/* @__PURE__ */ jsxs(Stack, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
|
41
38
|
toast.title && /* @__PURE__ */ jsx(Toast.Title, { children: toast.title }),
|
package/Notifier.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifier.js","sources":["Notifier.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport {\n
|
|
1
|
+
{"version":3,"file":"Notifier.js","sources":["Notifier.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport {\n Toaster as ChakraToaster,\n Icon,\n Portal,\n Spinner,\n Stack,\n Toast,\n useToastStyles\n} from \"@chakra-ui/react\";\nimport { useIntl, useService } from \"open-pioneer:react-hooks\";\nimport { memo, useEffect, useState } from \"react\";\nimport { LuTriangleAlert, LuInfo, LuCircleCheck, LuCircleAlert } from \"react-icons/lu\";\nimport { InternalNotificationAPI, ToasterObject } from \"./NotificationServiceImpl\";\n\n/** Props supported by the {@link Notifier} component. */\nexport interface NotifierProps {}\n\n/**\n * Shows notifications sent via the `NotificationService`.\n *\n * Only one instance of `<Notifier />` should be present in the application.\n * It currently does not matter where the Notifier is located in the react tree.\n *\n * ```ts\n * import { Notifier } from \"@open-pioneer/notifier\";\n *\n * export function AppUI() {\n * return (\n * <>\n * <Notifier />\n * <h1>Your application</h1>\n * </>\n * );\n * }\n * ```\n */\nexport function Notifier(_props: NotifierProps) {\n const notificationService = useService(\n \"notifier.NotificationService\"\n ) as InternalNotificationAPI;\n const [active, setActive] = useState(false);\n\n useEffect(() => {\n const handle = notificationService.registerUI();\n if (!handle) {\n return;\n }\n\n setActive(true);\n return () => {\n setActive(false);\n handle.destroy();\n };\n }, [notificationService]);\n\n return active && <Toaster toaster={notificationService.toaster} />;\n}\n\nconst Toaster = memo(function Toaster(props: { toaster: ToasterObject }) {\n const intl = useIntl();\n return (\n <Portal>\n <ChakraToaster\n toaster={props.toaster}\n insetInline={{ mdDown: \"4\" }}\n aria-label={intl.formatMessage({\n id: \"regionLabel\"\n })}\n >\n {(toast) => (\n <Toast.Root width={{ md: \"sm\" }} alignItems=\"center\">\n {toast.type === \"loading\" ? (\n <Spinner size=\"sm\" color=\"blue.solid\" />\n ) : (\n <ToastIndicator type={toast.type ?? \"\"} />\n )}\n <Stack gap=\"1\" flex=\"1\" maxWidth=\"100%\">\n {toast.title && <Toast.Title>{toast.title}</Toast.Title>}\n {toast.description && (\n <Toast.Description>{toast.description}</Toast.Description>\n )}\n </Stack>\n {toast.action && (\n <Toast.ActionTrigger>{toast.action.label}</Toast.ActionTrigger>\n )}\n {toast.meta?.closable && (\n <Toast.CloseTrigger\n cursor=\"pointer\"\n aria-label={intl.formatMessage({\n id: \"notification.close\"\n })}\n />\n )}\n </Toast.Root>\n )}\n </ChakraToaster>\n </Portal>\n );\n});\n\nconst icons: Record<string, React.ElementType> = {\n info: LuInfo,\n success: LuCircleCheck,\n warning: LuCircleAlert,\n error: LuTriangleAlert\n};\n\nfunction ToastIndicator(props: { type: string }) {\n const styles = useToastStyles();\n\n const Component = icons[props.type];\n if (!Component) return null;\n\n return (\n <Icon css={styles.indicator}>\n <span>\n <Component style={{ width: \"100%\", height: \"100%\" }} />\n </span>\n </Icon>\n );\n}\n"],"names":["Toaster","ChakraToaster"],"mappings":";;;;;;AAsCO,SAAS,SAAS,MAAA,EAAuB;AAC5C,EAAA,MAAM,mBAAA,GAAsB,UAAA;AAAA,IACxB;AAAA,GACJ;AACA,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAI,SAAS,KAAK,CAAA;AAE1C,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,MAAM,MAAA,GAAS,oBAAoB,UAAA,EAAW;AAC9C,IAAA,IAAI,CAAC,MAAA,EAAQ;AACT,MAAA;AAAA,IACJ;AAEA,IAAA,SAAA,CAAU,IAAI,CAAA;AACd,IAAA,OAAO,MAAM;AACT,MAAA,SAAA,CAAU,KAAK,CAAA;AACf,MAAA,MAAA,CAAO,OAAA,EAAQ;AAAA,IACnB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AAAA,QACC,KAAA,CAAM,0BACH,GAAA,CAAC,KAAA,CAAM,eAAN,EAAqB,QAAA,EAAA,KAAA,CAAM,OAAO,KAAA,EAAM,CAAA;AAAA,QAE5C,KAAA,CAAM,MAAM,QAAA,oBACT,GAAA;AAAA,UAAC,KAAA,CAAM,YAAA;AAAA,UAAN;AAAA,YACG,MAAA,EAAO,SAAA;AAAA,YACP,YAAA,EAAY,KAAK,aAAA,CAAc;AAAA,cAC3B,EAAA,EAAI;AAAA,aACP;AAAA;AAAA;AACL,OAAA,EAER;AAAA;AAAA,GAER,EACJ,CAAA;AAER,CAAC,CAAA;AAED,MAAM,KAAA,GAA2C;AAAA,EAC7C,IAAA,EAAM,MAAA;AAAA,EACN,OAAA,EAAS,aAAA;AAAA,EACT,OAAA,EAAS,aAAA;AAAA,EACT,KAAA,EAAO;AACX,CAAA;AAEA,SAAS,eAAe,KAAA,EAAyB;AAC7C,EAAA,MAAM,SAAS,cAAA,EAAe;AAE9B,EAAA,MAAM,SAAA,GAAY,KAAA,CAAM,KAAA,CAAM,IAAI,CAAA;AAClC,EAAA,IAAI,CAAC,WAAW,OAAO,IAAA;AAEvB,EAAA,2BACK,IAAA,EAAA,EAAK,GAAA,EAAK,MAAA,CAAO,SAAA,EACd,8BAAC,MAAA,EAAA,EACG,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,KAAA,EAAO,EAAE,KAAA,EAAO,MAAA,EAAQ,QAAQ,MAAA,EAAO,EAAG,GACzD,CAAA,EACJ,CAAA;AAER;;;;"}
|
package/README.md
CHANGED
|
@@ -37,13 +37,6 @@ export interface NotifierProperties {
|
|
|
37
37
|
* @default "top-right"
|
|
38
38
|
*/
|
|
39
39
|
position?: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right";
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Offset from the edge of the screen.
|
|
43
|
-
*
|
|
44
|
-
* See also https://chakra-ui.com/docs/components/toast#offset.
|
|
45
|
-
*/
|
|
46
|
-
offsets?: string | OffsetsObject | null;
|
|
47
40
|
}
|
|
48
41
|
```
|
|
49
42
|
|
package/api.d.ts
CHANGED
|
@@ -58,15 +58,6 @@ export interface NotificationService extends DeclaredService<"notifier.Notificat
|
|
|
58
58
|
/** Closes all active notifications. */
|
|
59
59
|
closeAll(): void;
|
|
60
60
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Offsets from the edge of the screen; one css value for each edge.
|
|
63
|
-
*/
|
|
64
|
-
export interface OffsetsObject {
|
|
65
|
-
left: string;
|
|
66
|
-
top: string;
|
|
67
|
-
right: string;
|
|
68
|
-
bottom: string;
|
|
69
|
-
}
|
|
70
61
|
/**
|
|
71
62
|
* Properties supported by this package.
|
|
72
63
|
*/
|
|
@@ -77,10 +68,4 @@ export interface NotifierProperties {
|
|
|
77
68
|
* @default "top-right"
|
|
78
69
|
*/
|
|
79
70
|
position?: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right";
|
|
80
|
-
/**
|
|
81
|
-
* Offset from the edge of the screen.
|
|
82
|
-
*
|
|
83
|
-
* See also https://chakra-ui.com/docs/components/toast#offset.
|
|
84
|
-
*/
|
|
85
|
-
offsets?: string | OffsetsObject | null;
|
|
86
71
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/notifier",
|
|
4
|
-
"version": "4.4.0-dev
|
|
4
|
+
"version": "4.4.0-dev.20260121102820",
|
|
5
5
|
"description": "Provides support for application-wide notifications.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"directory": "src/packages/notifier"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@chakra-ui/react": "^3.
|
|
17
|
+
"@chakra-ui/react": "^3.31.0",
|
|
18
18
|
"react-icons": "^5.5.0",
|
|
19
19
|
"react": "^19.2.3",
|
|
20
|
-
"@open-pioneer/
|
|
21
|
-
"@open-pioneer/
|
|
22
|
-
"@open-pioneer/
|
|
20
|
+
"@open-pioneer/core": "4.4.0-dev.20260121102820",
|
|
21
|
+
"@open-pioneer/react-utils": "4.4.0-dev.20260121102820",
|
|
22
|
+
"@open-pioneer/runtime": "4.4.0-dev.20260121102820"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"./package.json": "./package.json",
|
|
@@ -64,11 +64,6 @@
|
|
|
64
64
|
"propertyName": "position",
|
|
65
65
|
"defaultValue": "top-right",
|
|
66
66
|
"required": false
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"propertyName": "offsets",
|
|
70
|
-
"defaultValue": null,
|
|
71
|
-
"required": false
|
|
72
67
|
}
|
|
73
68
|
],
|
|
74
69
|
"packageFormatVersion": "1.0.0"
|