diff --git a/.bazelignore b/.bazelignore index d14d2a937..9f346824b 100644 --- a/.bazelignore +++ b/.bazelignore @@ -62,4 +62,7 @@ plugins/reference-assets/core/node_modules plugins/reference-assets/react/node_modules plugins/shared-constants/core/node_modules plugins/stage-revert-data/core/node_modules -tools/asset-testing-library/core/node_modules \ No newline at end of file +tools/asset-testing-library/core/node_modules +docs/storybook/node_modules +tools/storybook/node_modules +plugins/reference-assets/mocks/node_modules \ No newline at end of file diff --git a/BUILD.bazel b/BUILD.bazel index 5e72556fc..1f5bee2f2 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -77,7 +77,10 @@ js_library( js_library( name = "typings", - srcs = ["tsconfig.build.json"] + glob(["typings/*"]), + srcs = [ + "tsconfig.build.json", + "tsconfig.json", + ] + glob(["typings/*"]), visibility = ["//visibility:public"], ) # PlayerUI(deps = []) diff --git a/MODULE.bazel b/MODULE.bazel index 70ca38d95..ad6ccae47 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -2,15 +2,15 @@ module(name = "player", version = "1.0") bazel_dep(name = "rules_player") -git_override( - remote = "https://github.com/player-ui/rules_player.git", - commit = "a1626024afabb38b9aca9981cc0e76b704d4fd77", - module_name = "rules_player", -) -# local_path_override(module_name = "rules_player", path = "../rules_player") +# git_override( +# remote = "https://github.com/player-ui/rules_player.git", +# commit = "a1626024afabb38b9aca9981cc0e76b704d4fd77", +# module_name = "rules_player", +# ) +local_path_override(module_name = "rules_player", path = "../rules_player") bazel_dep(name = "aspect_bazel_lib", version = "1.32.0") -bazel_dep(name = "aspect_rules_js", version = "1.34.0") +bazel_dep(name = "aspect_rules_js", version = "1.34.1") bazel_dep(name = "bazel_skylib", version = "1.4.1") bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "aspect_rules_ts", version = "2.1.0") @@ -21,7 +21,6 @@ node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") node.toolchain(node_version = "18.18.0") ################################# - # iOS bazel_dep(name = "rules_swift", version = "1.13.0", repo_name = "build_bazel_rules_swift") @@ -45,7 +44,7 @@ use_repo( swift_deps, "swiftpkg_swift_hooks", "swiftpkg_viewinspector", - "swiftpkg_eyes_xcui_swift_package" + "swiftpkg_eyes_xcui_swift_package", ) # end iOS diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index fae7a7fc8..000000000 --- a/babel.config.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = (api) => ({ - // extensions: [], - presets: [ - ['@babel/preset-env', { modules: api.env('module') ? false : 'auto' }], - require.resolve('@babel/preset-typescript'), - require.resolve('@babel/preset-react'), - ], - plugins: [ - [ - '@babel/plugin-transform-runtime', - { - regenerator: true, - version: '7.15.4', - }, - ], - ], -}); diff --git a/core/player/package.json b/core/player/package.json index b90e026e7..e2e9e3a6f 100644 --- a/core/player/package.json +++ b/core/player/package.json @@ -6,8 +6,5 @@ "@player-ui/partial-match-registry": "workspace:*", "@player-ui/make-flow": "workspace:*", "@player-ui/types": "workspace:*" - }, - "devDependencies": { - "@player-ui/common-types-plugin": "workspace:*" } } diff --git a/docs/site/components/Navigation.tsx b/docs/site/components/Navigation.tsx index ce0dd465c..024ec2fd9 100644 --- a/docs/site/components/Navigation.tsx +++ b/docs/site/components/Navigation.tsx @@ -1,6 +1,6 @@ -import React from 'react'; -import Link from 'next/link'; -import { useRouter } from 'next/router'; +import React from "react"; +import Link from "next/link"; +import { useRouter } from "next/router"; import { Flex, Image, @@ -22,17 +22,17 @@ import { AlertTitle, AlertDescription, Select, -} from '@chakra-ui/react'; -import { FaReact, FaApple, FaAndroid, FaPuzzlePiece } from 'react-icons/fa'; -import { HamburgerIcon } from '@chakra-ui/icons'; -import type { Route } from '../config/navigation'; -import NAV, { PATH_TO_NAV, Platform } from '../config/navigation'; -import { ColorSchemeSwitch } from './ColorSchemeSwitch'; -import { DOCS_BASE_URL, GITHUB_URL } from '../config/constants'; -import { withBasePrefix } from './Image'; -import { SearchInput } from './Search'; -import { GithubIcon } from './gh-icon'; -import { WarningBanner } from './SiteBanner'; +} from "@chakra-ui/react"; +import { FaReact, FaApple, FaAndroid, FaPuzzlePiece } from "react-icons/fa"; +import { HamburgerIcon } from "@chakra-ui/icons"; +import type { Route } from "../config/navigation"; +import NAV, { PATH_TO_NAV, Platform } from "../config/navigation"; +import { ColorSchemeSwitch } from "./ColorSchemeSwitch"; +import { DOCS_BASE_URL, GITHUB_URL } from "../config/constants"; +import { withBasePrefix } from "./Image"; +import { SearchInput } from "./Search"; +import { GithubIcon } from "./gh-icon"; +import { WarningBanner } from "./SiteBanner"; const getPathFromRoute = (route: Route): string => { if (route.path) { @@ -48,7 +48,7 @@ const getPathFromRoute = (route: Route): string => { } } - return ''; + return ""; }; const PlatformIcon = (props: any) => { @@ -72,7 +72,7 @@ const NavTitleOrLink = (props: { route: Route }) => { const { pathname } = useRouter(); const router = useRouter(); const langpref = router.query.lang; - const selectedButtonColor = useColorModeValue('blue.800', 'blue.600'); + const selectedButtonColor = useColorModeValue("blue.800", "blue.600"); if (route.path) { return ( @@ -89,7 +89,7 @@ const NavTitleOrLink = (props: { route: Route }) => { size="sm" variant="ghost" mx="3" - colorScheme={pathname === route.path ? 'blue' : 'gray'} + colorScheme={pathname === route.path ? "blue" : "gray"} color={pathname === route.path ? selectedButtonColor : undefined} > @@ -181,12 +181,12 @@ const useGetReleasedVersions = () => { React.useEffect(() => { const send = async () => { const response = await fetch( - 'https://api.github.com/repos/player-ui/player-ui.github.io/contents/' + "https://api.github.com/repos/player-ui/player-ui.github.io/contents/", ); const data = await response.json(); const versions = data - .filter((d) => d.type === 'dir' && d.name.match(/^v\d/)) + .filter((d) => d.type === "dir" && d.name.match(/^v\d/)) .map((d) => ({ label: d.name, path: d.name, @@ -210,11 +210,11 @@ export const VersionSelector = () => { aria-label="Select the version of the Player docs you with to see" variant="unstyled" rootProps={{ - width: 'auto', - display: 'flex', - flexShrink: '0', + width: "auto", + display: "flex", + flexShrink: "0", }} - value={router.basePath || 'latest'} + value={router.basePath || "latest"} onChange={(e) => { router.push(`${DOCS_BASE_URL}/${e.target.value}`); }} @@ -236,21 +236,21 @@ export const TopNavigation = () => { const mobileNavDisclosure = useDisclosure(); const currentTopLevelRoute = NAV.routes.find( - (r) => r.title === subRoutes?.[0] + (r) => r.title === subRoutes?.[0], ); const logoSrc = useBreakpointValue({ base: useColorModeValue( - withBasePrefix('/logo/logo-light-small.png'), - withBasePrefix('/logo/logo-dark-small.png') + withBasePrefix("/logo/logo-light-small.png"), + withBasePrefix("/logo/logo-dark-small.png"), ), lg: useColorModeValue( - withBasePrefix('/logo/logo-light-large.png'), - withBasePrefix('/logo/logo-dark-large.png') + withBasePrefix("/logo/logo-light-large.png"), + withBasePrefix("/logo/logo-dark-large.png"), ), }); - const selectedButtonColor = useColorModeValue('blue.800', 'blue.600'); + const selectedButtonColor = useColorModeValue("blue.800", "blue.600"); return ( @@ -259,15 +259,15 @@ export const TopNavigation = () => { } - display={{ base: 'flex', md: 'none' }} + display={{ base: "flex", md: "none" }} aria-label="Open Side Navigation Menu" onClick={mobileNavDisclosure.onOpen} /> @@ -278,7 +278,7 @@ export const TopNavigation = () => { - + {NAV.routes.map((topRoute) => { @@ -290,7 +290,7 @@ export const TopNavigation = () => {