Skip to content

Commit fde3c41

Browse files
committed
merge from main
2 parents db9e7ca + 916dcad commit fde3c41

258 files changed

Lines changed: 8985 additions & 10630 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

web/.storybook/main.ts

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1-
import { resolve } from "path";
1+
// This file has been automatically migrated to valid ESM format by Storybook.
2+
import { fileURLToPath } from "node:url";
3+
import { resolve, dirname } from "path";
24

35
import type { StorybookConfig } from "@storybook/react-vite";
46
import { mergeConfig } from "vite";
57

8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
611
const config: StorybookConfig = {
712
stories: ["../src/**/*.stories.@(js|ts|tsx|mdx)"],
8-
addons: ["@storybook/addon-essentials", "@storybook/addon-styling"],
13+
addons: [
14+
"@storybook/addon-onboarding",
15+
"@storybook/addon-a11y",
16+
"@storybook/addon-themes",
17+
"@chromatic-com/storybook",
18+
"@storybook/addon-docs",
19+
],
20+
921
framework: {
1022
name: "@storybook/react-vite",
1123
options: {},
1224
},
25+
1326
core: {
1427
disableTelemetry: true,
1528
},
29+
1630
staticDirs: ["./public"],
31+
1732
viteFinal(config, { configType }) {
1833
return mergeConfig(config, {
1934
define: {
@@ -46,7 +61,29 @@ const config: StorybookConfig = {
4661
find: "@reearth/core",
4762
replacement: resolve(__dirname, "..", "node_modules/@reearth/core"),
4863
},
49-
// quickjs-emscripten
64+
// cesium-mvt-imagery-provider: force resolution to the JS bundle, not the .d.ts types file
65+
{
66+
find: "cesium-mvt-imagery-provider",
67+
replacement: resolve(
68+
__dirname,
69+
"..",
70+
"node_modules/cesium-mvt-imagery-provider/dist/cesium-mvt-imagery-provider.mjs",
71+
),
72+
},
73+
// quickjs-emscripten: force resolution to the JS bundle, not the .d.ts types file
74+
{
75+
find: "quickjs-emscripten-sync",
76+
replacement: resolve(
77+
__dirname,
78+
"..",
79+
"node_modules/quickjs-emscripten-sync/dist/quickjs-emscripten-sync.mjs",
80+
),
81+
},
82+
// react-align: force resolution to the JS bundle, not the .d.ts types file
83+
{
84+
find: "react-align",
85+
replacement: resolve(__dirname, "..", "node_modules/react-align/dist/react-align.mjs"),
86+
},
5087
{
5188
find: "@reearth",
5289
replacement: resolve(__dirname, "..", "src"),
@@ -57,6 +94,10 @@ const config: StorybookConfig = {
5794
},
5895
],
5996
},
97+
optimizeDeps: {
98+
include: ["quickjs-emscripten-sync", "prop-types", "hoist-non-react-statics", "react-is"],
99+
exclude: ["react-align"],
100+
},
60101
server: {
61102
watch: {
62103
// https://github.com/storybookjs/storybook/issues/22253#issuecomment-1673229400
@@ -65,8 +106,11 @@ const config: StorybookConfig = {
65106
},
66107
});
67108
},
68-
docs: {
69-
autodocs: true,
109+
110+
docs: {},
111+
112+
typescript: {
113+
reactDocgen: "react-docgen-typescript",
70114
},
71115
};
72-
module.exports = config;
116+
export default config;

web/.storybook/manager.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

web/.storybook/preview.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
Observable,
88
} from "@apollo/client";
99
import { ThemeProvider } from "@emotion/react";
10-
import { withThemeFromJSXProvider } from "@storybook/addon-styling";
11-
import type { Preview, ReactRenderer } from "@storybook/react";
10+
import { withThemeFromJSXProvider } from "@storybook/addon-themes";
11+
import type { Preview, ReactRenderer } from "@storybook/react-vite";
1212
import React from "react";
1313

1414
import classicDarkTheme from "../src/classic/theme/reearthTheme/darkTheme"; // temp classic imports
@@ -33,18 +33,18 @@ const mockClient = new ApolloClient({
3333
const preview: Preview = {
3434
parameters: {
3535
backgrounds: {
36-
values: [
37-
{ name: "Light", value: "lightGrey" },
38-
{ name: "Dark", value: "ash" },
39-
],
36+
options: {
37+
light: { name: "Light", value: "lightGrey" },
38+
dark: { name: "Dark", value: "ash" },
39+
},
4040
},
4141
layout: "fullscreen",
4242
controls: { expanded: true },
43-
actions: { argTypesRegex: "^on.*" },
4443
docs: {
4544
theme,
4645
},
4746
},
47+
4848
decorators: [
4949
withThemeFromJSXProvider<ReactRenderer>({
5050
themes: {
@@ -73,6 +73,8 @@ const preview: Preview = {
7373
);
7474
},
7575
],
76+
77+
tags: ["autodocs"],
7678
};
7779

7880
export default preview;

web/.storybook/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { create } from "@storybook/theming";
1+
import { create } from "storybook/theming";
22

33
export default create({
44
base: "dark",

web/.yarn/install-state.gz

-361 KB
Binary file not shown.

web/package.json

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}": "eslint --fix"
4545
},
4646
"devDependencies": {
47+
"@chromatic-com/storybook": "5.2.1",
4748
"@emotion/jest": "11.11.0",
4849
"@graphql-codegen/cli": "6.1.0",
4950
"@graphql-codegen/client-preset": "5.2.0",
@@ -54,13 +55,11 @@
5455
"@graphql-codegen/typescript-react-apollo": "4.3.3",
5556
"@playwright/test": "1.55.1",
5657
"@rollup/plugin-yaml": "4.1.2",
57-
"@storybook/addon-essentials": "7.5.2",
58-
"@storybook/addon-styling": "1.3.7",
59-
"@storybook/addons": "7.5.2",
60-
"@storybook/manager-api": "7.5.2",
61-
"@storybook/react": "7.5.2",
62-
"@storybook/react-vite": "7.5.2",
63-
"@storybook/theming": "7.5.2",
58+
"@storybook/addon-a11y": "10.4.0",
59+
"@storybook/addon-docs": "10.4.0",
60+
"@storybook/addon-onboarding": "10.4.0",
61+
"@storybook/addon-themes": "10.4.0",
62+
"@storybook/react-vite": "10.4.0",
6463
"@testing-library/jest-dom": "6.1.4",
6564
"@testing-library/react": "14.0.0",
6665
"@testing-library/user-event": "14.5.1",
@@ -81,35 +80,35 @@
8180
"@types/react-leaflet": "2.8.2",
8281
"@types/styled-components": "5.1.29",
8382
"@types/tinycolor2": "1.4.5",
84-
"@types/uuid": "11.0.0",
85-
"@vitejs/plugin-react-swc": "4.3.1",
86-
"@vitest/coverage-v8": "4.1.6",
83+
"@types/uuid": "9.0.6",
84+
"@vitejs/plugin-react-swc": "3.7.1",
85+
"@vitest/coverage-v8": "4.0.14",
8786
"@welldone-software/why-did-you-render": "7.0.1",
8887
"del-cli": "5.1.0",
8988
"dotenv": "16.3.1",
9089
"eslint": "8.40.0",
9190
"eslint-config-reearth": "0.2.2",
9291
"eslint-plugin-playwright": "0.12.0",
93-
"eslint-plugin-storybook": "0.6.15",
92+
"eslint-plugin-storybook": "10.4.0",
9493
"husky": "8.0.3",
9594
"i18next-parser": "9.3.0",
9695
"jsdom": "22.1.0",
9796
"lint-staged": "13.2.2",
9897
"npm-run-all": "4.1.5",
9998
"prettier": "2.8.8",
10099
"read-env": "2.0.0",
101-
"rollup": "4.60.4",
102-
"rollup-plugin-visualizer": "7.0.1",
103-
"storybook": "7.5.2",
100+
"rollup": "4.22.4",
101+
"rollup-plugin-visualizer": "6.0.3",
102+
"storybook": "10.4.0",
104103
"ts-node": "10.9.1",
105104
"type-fest": "4.6.0",
106-
"typescript": "6.0.3",
105+
"typescript": "5.0.4",
107106
"typescript-styled-plugin": "0.18.3",
108-
"vite": "8.0.13",
107+
"vite": "5.4.21",
109108
"vite-plugin-cesium": "1.2.23",
110-
"vite-plugin-svgr": "5.2.0",
111-
"vite-tsconfig-paths": "6.1.1",
112-
"vitest": "4.1.6",
109+
"vite-plugin-svgr": "4.5.0",
110+
"vite-tsconfig-paths": "5.1.4",
111+
"vitest": "4.0.14",
113112
"web-streams-polyfill": "3.2.1"
114113
},
115114
"dependencies": {
@@ -130,7 +129,7 @@
130129
"@rot1024/use-transition": "1.0.0",
131130
"@sentry/browser": "7.119.1",
132131
"@seznam/compose-react-refs": "1.0.6",
133-
"@turf/turf": "6.5.0",
132+
"@turf/turf": "7.3.5",
134133
"@types/d3": "7.4.3",
135134
"@types/escape-string-regexp": "2.0.1",
136135
"@ungap/event-target": "0.2.4",
@@ -139,7 +138,7 @@
139138
"apollo-upload-client": "17.0.0",
140139
"array-move": "4.0.0",
141140
"aws-amplify": "6.15.8",
142-
"axios": "1.16.1",
141+
"axios": "1.12.0",
143142
"cesium": "1.116.0",
144143
"cesium-dnd": "1.1.0",
145144
"cesium-mvt-imagery-provider": "1.4.0",
@@ -151,7 +150,7 @@
151150
"dayjs": "1.11.10",
152151
"detect-browser": "5.3.0",
153152
"escape-string-regexp": "5.0.0",
154-
"fast-xml-parser": "5.7.0",
153+
"fast-xml-parser": "4.3.2",
155154
"formik": "2.4.5",
156155
"framer-motion": "10.18.0",
157156
"github-markdown-css": "5.4.0",
@@ -169,7 +168,7 @@
169168
"leaflet": "1.9.4",
170169
"lexical": "0.12.2",
171170
"localforage": "1.10.0",
172-
"lodash-es": "4.18.1",
171+
"lodash-es": "4.17.21",
173172
"lru-cache": "8.0.4",
174173
"mini-svg-data-uri": "1.4.4",
175174
"moment-timezone": "0.5.43",
@@ -181,7 +180,7 @@
181180
"rc-slider": "9.7.5",
182181
"react": "18.3.1",
183182
"react-accessible-accordion": "5.0.0",
184-
"react-align": "2.2.2",
183+
"react-align": "2.2.3",
185184
"react-beautiful-dnd": "13.1.1",
186185
"react-colorful": "5.6.1",
187186
"react-dnd": "16.0.1",
@@ -210,7 +209,7 @@
210209
"use-callback-ref": "1.3.0",
211210
"use-custom-compare": "1.4.0",
212211
"use-file-input": "1.0.0",
213-
"uuid": "14.0.0",
212+
"uuid": "9.0.1",
214213
"xstate": "4.38.2"
215214
},
216215
"packageManager": "yarn@4.10.2"

web/src/beta/components/Accordion/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/react-vite";
22

33
import Accordion from ".";
44

web/src/beta/components/Avatar/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/react-vite";
22

33
import Avatar from ".";
44

web/src/beta/components/Button/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/react-vite";
22

33
import Button from ".";
44

web/src/beta/components/CatalogCard/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, StoryObj } from "@storybook/react";
1+
import { Meta, StoryObj } from "@storybook/react-vite";
22

33
import PopoverMenuContent from "@reearth/beta/components/PopoverMenuContent";
44

0 commit comments

Comments
 (0)