@rainbow-robotics/plugin-ui 0.1.2-dev.53 → 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 +13 -7
- package/package.json +2 -1
- package/src/host.tsx +10 -6
package/dist/react.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { ReactNode, MouseEvent, InputHTMLAttributes, MouseEventHandler, ReactElement, ChangeEvent, CSSProperties, TextareaHTMLAttributes, ComponentProps, Dispatch, SetStateAction, HTMLInputAutoCompleteAttribute, RefObject } from 'react';
|
|
6
|
+
import { Matcher, DayPicker } from 'react-day-picker';
|
|
6
7
|
import * as ShadDialogPrimitive from '@radix-ui/react-dialog';
|
|
7
8
|
import { Command } from 'cmdk';
|
|
8
9
|
import { Drawer } from 'vaul';
|
|
@@ -16,7 +17,6 @@ import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
|
16
17
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
17
18
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
18
19
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
19
|
-
import { DayPicker } from 'react-day-picker';
|
|
20
20
|
|
|
21
21
|
declare const batteryStatuses: readonly ["empty", "critical", "low", "normal", "full"];
|
|
22
22
|
type BatteryStatus = (typeof batteryStatuses)[number];
|
|
@@ -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
|
|
|
@@ -633,6 +633,10 @@ type Props$c = {
|
|
|
633
633
|
* 비활성화 여부
|
|
634
634
|
*/
|
|
635
635
|
disabled?: boolean;
|
|
636
|
+
/**
|
|
637
|
+
* 선택 불가능한 날짜 조건
|
|
638
|
+
*/
|
|
639
|
+
disabledDates?: Matcher | Matcher[];
|
|
636
640
|
/**
|
|
637
641
|
* 읽기 전용 여부
|
|
638
642
|
*/
|
|
@@ -663,7 +667,7 @@ type RangePresetKey = "last-24-hours" | "last-3-days" | "last-week" | "last-mont
|
|
|
663
667
|
/**
|
|
664
668
|
* 범위 날짜 입력 컴포넌트 입니다.
|
|
665
669
|
*/
|
|
666
|
-
declare const RangeDateInput: ({ className, calendarPanelClassName, showType, value, name, min, max, placeholder, disabled, readOnly, size, variant, error, showPresets, showFooter, handleChange, presets, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
670
|
+
declare const RangeDateInput: ({ className, calendarPanelClassName, showType, value, name, min, max, placeholder, disabled, disabledDates, readOnly, size, variant, error, showPresets, showFooter, handleChange, presets, }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
667
671
|
|
|
668
672
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
669
673
|
|
|
@@ -1245,10 +1249,12 @@ interface Props$6 extends Pick<React.InputHTMLAttributes<HTMLInputElement>, "cla
|
|
|
1245
1249
|
disableLongPress?: boolean;
|
|
1246
1250
|
/** 소수점 자리수 고정 (trailing zero 유지, 예: 0.10 → "0.10") */
|
|
1247
1251
|
fixedDigit?: number;
|
|
1248
|
-
/** 롱프레스 시작 딜레이 ms (기본
|
|
1252
|
+
/** 롱프레스 시작 딜레이 ms (기본 300) */
|
|
1249
1253
|
initialLongPressDelay?: number;
|
|
1250
1254
|
/** ArrowUp/Down 키로 값 조정 허용 여부 */
|
|
1251
1255
|
enableArrowKeys?: boolean;
|
|
1256
|
+
/** 마우스 휠로 값 조정 허용 여부 */
|
|
1257
|
+
enableWheel?: boolean;
|
|
1252
1258
|
/** ripple 옵션 */
|
|
1253
1259
|
notAllowedEmptyValue?: boolean;
|
|
1254
1260
|
onButtonPointerUp?: (type: "up" | "down", e?: MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -2273,7 +2279,7 @@ interface PropsType$3 {
|
|
|
2273
2279
|
declare function RBSwitchField({ children, className, controlPlacement, description, descriptionClassName, invalid, label, labelClassName, size, type, }: PropsType$3): react_jsx_runtime.JSX.Element;
|
|
2274
2280
|
|
|
2275
2281
|
declare const toggleRootVariants: (props?: {
|
|
2276
|
-
size?: "sm" | "
|
|
2282
|
+
size?: "sm" | "lg" | "default";
|
|
2277
2283
|
variant?: "default" | "outline";
|
|
2278
2284
|
} & class_variance_authority_types.ClassProp) => string;
|
|
2279
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
|
|