= {
featureId?: string;
@@ -24,6 +25,7 @@ export type InfoboxBlock = {
extensionId?: string;
property?: P;
propertyId?: string;
+ pluginBlockPropertyItems?: Item[];
};
export type InfoboxBlockProps
= {
diff --git a/web/src/beta/features/Visualizer/Crust/Plugins/plugin_types.ts b/web/src/beta/features/Visualizer/Crust/Plugins/plugin_types.ts
index f92bc7667a..cd1656c073 100644
--- a/web/src/beta/features/Visualizer/Crust/Plugins/plugin_types.ts
+++ b/web/src/beta/features/Visualizer/Crust/Plugins/plugin_types.ts
@@ -33,7 +33,6 @@ import {
ScreenSpaceCameraControllerOptions,
} from "@reearth/core";
-import { InfoboxBlock as Block } from "../Infobox/types";
import { InteractionModeType } from "../types";
import { Widget } from "../Widgets";
@@ -112,7 +111,7 @@ export type Reearth = {
>;
readonly layer?: LazyLayer;
readonly widget?: Widget;
- readonly block?: Block;
+ readonly block?: CommonBlock;
readonly scene: Undefinable;
readonly viewport?: Viewport;
readonly clientStorage: ClientStorage;
@@ -131,6 +130,15 @@ export type Reearth = {
) => void;
};
+export type CommonBlock = {
+ id: string;
+ name?: string | null;
+ pluginId: string;
+ extensionId: string;
+ propertyId?: string;
+ property?: any;
+};
+
export type Scene = {
readonly inEditor: boolean;
readonly built: boolean;
diff --git a/web/src/beta/features/Visualizer/Crust/StoryPanel/Block/index.tsx b/web/src/beta/features/Visualizer/Crust/StoryPanel/Block/index.tsx
index c8a5cd9858..052a74bc70 100644
--- a/web/src/beta/features/Visualizer/Crust/StoryPanel/Block/index.tsx
+++ b/web/src/beta/features/Visualizer/Crust/StoryPanel/Block/index.tsx
@@ -2,8 +2,8 @@ import { useCallback, type ComponentType, type ReactNode } from "react";
import type { CommonBlockProps, BlockProps } from "@reearth/beta/features/Visualizer/shared/types";
import type { Layer } from "@reearth/core";
-import { styled } from "@reearth/services/theme";
+import BlockWrapper from "../../../shared/components/BlockWrapper";
import { StoryBlock } from "../types";
import builtin, { isBuiltinStoryBlock } from "./builtin";
@@ -31,17 +31,17 @@ export default function StoryBlockComponent({
return Builtin ? (
) : props.block ? (
-
+
{renderBlock?.({ block: props.block, layer: props.layer, onClick: props.onClick })}
-
+