@rainbow-robotics/plugin-ui 0.1.2-dev.54 → 0.1.2-dev.55
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/react.d.ts +4 -4
- package/package.json +2 -1
- package/src/host.tsx +10 -6
package/dist/react.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ interface RippleOption {
|
|
|
65
65
|
declare const labelButtonSizes: readonly ["3xs", "2xs", "xs", "xs2", "sm", "md"];
|
|
66
66
|
type LabelButtonSizeType = (typeof labelButtonSizes)[number];
|
|
67
67
|
declare const labelButtonVariants: (props?: {
|
|
68
|
-
size?: "
|
|
68
|
+
size?: "xs" | "xs2" | "sm" | "md" | "3xs" | "2xs";
|
|
69
69
|
variant?: "transparent" | "outlined" | "soft" | "solid" | "inverse" | "inverseSoft" | "brand" | "brandSoft" | "danger" | "dangerSoft" | "success" | "successSoft";
|
|
70
70
|
disabled?: boolean;
|
|
71
71
|
} & class_variance_authority_types.ClassProp) => string;
|
|
@@ -136,7 +136,7 @@ declare const RBLabelButton: React$1.ForwardRefExoticComponent<Omit<Omit<React$1
|
|
|
136
136
|
declare const iconButtonSizes: readonly ["3xs", "2xs", "xs", "xs2", "sm", "md"];
|
|
137
137
|
type IconButtonSizeType = (typeof iconButtonSizes)[number];
|
|
138
138
|
declare const iconButtonVariants: (props?: {
|
|
139
|
-
size?: "
|
|
139
|
+
size?: "xs" | "xs2" | "sm" | "md" | "3xs" | "2xs";
|
|
140
140
|
variant?: "circle" | "transparent" | "outlined" | "soft" | "solid" | "inverse" | "inverseSoft" | "brand";
|
|
141
141
|
disabled?: boolean;
|
|
142
142
|
} & class_variance_authority_types.ClassProp) => string;
|
|
@@ -293,7 +293,7 @@ declare function RBInlineLabelButton({ className, size, variant, type, leadingIc
|
|
|
293
293
|
declare const accordionTypes: readonly ["fill", "transparent"];
|
|
294
294
|
type AccordionType = (typeof accordionTypes)[number];
|
|
295
295
|
declare const accordionVariants: (props?: {
|
|
296
|
-
type?: "
|
|
296
|
+
type?: "fill" | "transparent";
|
|
297
297
|
} & class_variance_authority_types.ClassProp) => string;
|
|
298
298
|
type AccordionVariantProps = VariantProps<typeof accordionVariants>;
|
|
299
299
|
|
|
@@ -2279,7 +2279,7 @@ interface PropsType$3 {
|
|
|
2279
2279
|
declare function RBSwitchField({ children, className, controlPlacement, description, descriptionClassName, invalid, label, labelClassName, size, type, }: PropsType$3): react_jsx_runtime.JSX.Element;
|
|
2280
2280
|
|
|
2281
2281
|
declare const toggleRootVariants: (props?: {
|
|
2282
|
-
size?: "sm" | "
|
|
2282
|
+
size?: "sm" | "lg" | "default";
|
|
2283
2283
|
variant?: "default" | "outline";
|
|
2284
2284
|
} & class_variance_authority_types.ClassProp) => string;
|
|
2285
2285
|
type ToggleVariantProps = VariantProps<typeof toggleRootVariants>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainbow-robotics/plugin-ui",
|
|
3
|
-
"version": "0.1.2-dev.
|
|
3
|
+
"version": "0.1.2-dev.55",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"build-dist.mjs"
|
|
45
45
|
],
|
|
46
46
|
"scripts": {
|
|
47
|
+
"build": "node build-dist.mjs",
|
|
47
48
|
"build-plugin-ui": "node build-dist.mjs",
|
|
48
49
|
"lint": "node ../../node_modules/eslint/bin/eslint.js .",
|
|
49
50
|
"check-types": "tsc --noEmit"
|
package/src/host.tsx
CHANGED
|
@@ -21,12 +21,16 @@ import {
|
|
|
21
21
|
useState,
|
|
22
22
|
type ComponentType,
|
|
23
23
|
} from "react";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
24
|
+
// Import shared modules via the package specifier, NOT relative paths. This
|
|
25
|
+
// file ships as source (exports "./host" -> src/host.tsx), while /sdk, /ws,
|
|
26
|
+
// /host-ui ship as dist/*.js. A relative "./sdk" would bundle src/sdk.ts,
|
|
27
|
+
// whereas the plugin (and nexus's pluginShared) load dist/sdk.js via the
|
|
28
|
+
// import map — two RbContext instances, so the host's <RbContext.Provider>
|
|
29
|
+
// and the plugin's useRb() would read different contexts and every rb.* call
|
|
30
|
+
// would hit the no-op "outside of a host context" fallback.
|
|
31
|
+
import type { RbSdk } from "@rainbow-robotics/plugin-ui/sdk";
|
|
32
|
+
import { RbContext } from "@rainbow-robotics/plugin-ui/sdk";
|
|
33
|
+
import { RbWs, createLazyRbSdk } from "@rainbow-robotics/plugin-ui/ws";
|
|
30
34
|
import { getHostServices } from "@rainbow-robotics/plugin-ui/host-ui";
|
|
31
35
|
import { usePluginData, type PluginModuleSource } from "./pluginData";
|
|
32
36
|
|