From e296b3a9597832fe2e8149410664f6dd74ad0b49 Mon Sep 17 00:00:00 2001 From: Ketan Reddy Date: Thu, 24 Oct 2024 13:49:49 -0700 Subject: [PATCH 1/3] fix version selector on the index page --- docs/site/src/components/tools/VersionSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/site/src/components/tools/VersionSelector.tsx b/docs/site/src/components/tools/VersionSelector.tsx index 98da4d13e..d9c75c407 100644 --- a/docs/site/src/components/tools/VersionSelector.tsx +++ b/docs/site/src/components/tools/VersionSelector.tsx @@ -35,7 +35,7 @@ const useGetReleasedVersions = () => { return releasedVersions; }; const VersionSelector = (props: VersionSelectorProps) => { - const location = props.route; + const location = props.route ?? ""; const released = useGetReleasedVersions(); return ( From 4e2f9f51024af6aad7390e9ddbdefe6ecb8c5b13 Mon Sep 17 00:00:00 2001 From: Ketan Reddy Date: Thu, 24 Oct 2024 14:32:50 -0700 Subject: [PATCH 2/3] Fix next/latest path linking --- docs/site/BUILD | 1 + docs/site/astro.config.mjs | 30 +++++++++++++++++++++- docs/site/src/content/docs/index.mdx | 4 +-- package.json | 1 + pnpm-lock.yaml | 37 +++++++++++++++------------- 5 files changed, 53 insertions(+), 20 deletions(-) diff --git a/docs/site/BUILD b/docs/site/BUILD index 1083053d9..63dbe8029 100644 --- a/docs/site/BUILD +++ b/docs/site/BUILD @@ -36,6 +36,7 @@ build_deps = [ "//:node_modules/@player-tools/dsl", "//:node_modules/@astrojs/starlight-docsearch", "//:node_modules/dlv", + "//:node_modules/unist-util-visit", ":node_modules/@player-ui/player", ":node_modules/@player-ui/react", ":node_modules/@player-ui/reference-assets-plugin-components", diff --git a/docs/site/astro.config.mjs b/docs/site/astro.config.mjs index ff3a88711..a0a1fdc0e 100644 --- a/docs/site/astro.config.mjs +++ b/docs/site/astro.config.mjs @@ -4,6 +4,31 @@ import starlight from "@astrojs/starlight"; import rehypeMermaid from "rehype-mermaid"; import react from "@astrojs/react"; import starlightDocSearch from "@astrojs/starlight-docsearch"; +import { visit } from "unist-util-visit"; + +export const rehypeLinks = (options) => { + let base = options?.base; + + return (ast, file) => { + if (typeof base !== "string") return; + if (!base.startsWith("/")) base = "/" + base; + if (base.length > 1 && base[base.length - 1] === "/") + base = base.slice(0, -1); + + visit(ast, "element", function (node, index, parent) { + if (node.tagName === "a") { + const href = node.properties.href; + if ( + typeof href === "string" && + href.startsWith("/") && + !href.startsWith(base) + ) { + node.properties.href = base + href; + } + } + }); + }; +}; export const BASE_PREFIX = process.env.NODE_ENV === "production" ? "DOCS_BASE_PATH" : undefined; @@ -127,6 +152,9 @@ export default defineConfig({ }, }, markdown: { - rehypePlugins: [[rehypeMermaid, { strategy: "img-svg", dark: true }]], + rehypePlugins: [ + [rehypeMermaid, { strategy: "img-svg", dark: true }], + [rehypeLinks, { base: BASE_PREFIX }], + ], }, }); diff --git a/docs/site/src/content/docs/index.mdx b/docs/site/src/content/docs/index.mdx index 46fc9f2f7..d15929ca8 100644 --- a/docs/site/src/content/docs/index.mdx +++ b/docs/site/src/content/docs/index.mdx @@ -8,10 +8,10 @@ hero: file: ../../assets/logo/logo-dark-small.png actions: - text: Learn More - link: /player/about + link: ./player/about icon: information - text: Get Started - link: /guides/getting-started/ + link: ./guides/getting-started/ icon: right-arrow variant: minimal --- diff --git a/package.json b/package.json index e1a3f22d4..8d2001568 100644 --- a/package.json +++ b/package.json @@ -191,6 +191,7 @@ "tslib": "^2.6.2", "tsup": "^8.0.1", "typescript": "5.5.3", + "unist-util-visit": "^5.0.0", "uuid": "^8.3.2", "vite": "^4.0.0", "vitest": "^1.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16f67800e..e15629b28 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -546,6 +546,9 @@ importers: typescript: specifier: 5.5.3 version: 5.5.3 + unist-util-visit: + specifier: ^5.0.0 + version: 5.0.0 uuid: specifier: ^8.3.2 version: 8.3.2 @@ -2349,12 +2352,12 @@ packages: '@chakra-ui/react-children-utils@2.0.6': resolution: {integrity: sha512-QVR2RC7QsOsbWwEnq9YduhpqSFnZGvjjGREV8ygKi8ADhXh93C8azLECCUVgRJF2Wc+So1fgxmjLcbZfY2VmBA==, tarball: https://registry.npmjs.org/@chakra-ui/react-children-utils/-/react-children-utils-2.0.6.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-context@2.1.0': resolution: {integrity: sha512-iahyStvzQ4AOwKwdPReLGfDesGG+vWJfEsn0X/NoGph/SkN+HXtv2sCfYFFR9k7bb+Kvc6YfpLlSuLvKMHi2+w==, tarball: https://registry.npmjs.org/@chakra-ui/react-context/-/react-context-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-env@3.1.0': resolution: {integrity: sha512-Vr96GV2LNBth3+IKzr/rq1IcnkXv+MLmwjQH6C8BRtn3sNskgDFD5vLkVXcEhagzZMCh8FR3V/bzZPojBOyNhw==, tarball: https://registry.npmjs.org/@chakra-ui/react-env/-/react-env-3.1.0.tgz} @@ -2364,7 +2367,7 @@ packages: '@chakra-ui/react-types@2.0.7': resolution: {integrity: sha512-12zv2qIZ8EHwiytggtGvo4iLT0APris7T0qaAWqzpUGS0cdUtR8W+V1BJ5Ocq+7tA6dzQ/7+w5hmXih61TuhWQ==, tarball: https://registry.npmjs.org/@chakra-ui/react-types/-/react-types-2.0.7.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-use-animation-state@2.1.0': resolution: {integrity: sha512-CFZkQU3gmDBwhqy0vC1ryf90BVHxVN8cTLpSyCpdmExUEtSEInSCGMydj2fvn7QXsz/za8JNdO2xxgJwxpLMtg==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-animation-state/-/react-use-animation-state-2.1.0.tgz} @@ -2374,12 +2377,12 @@ packages: '@chakra-ui/react-use-callback-ref@2.1.0': resolution: {integrity: sha512-efnJrBtGDa4YaxDzDE90EnKD3Vkh5a1t3w7PhnRQmsphLy3g2UieasoKTlT2Hn118TwDjIv5ZjHJW6HbzXA9wQ==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-callback-ref/-/react-use-callback-ref-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-use-controllable-state@2.1.0': resolution: {integrity: sha512-QR/8fKNokxZUs4PfxjXuwl0fj/d71WPrmLJvEpCTkHjnzu7LnYvzoe2wB867IdooQJL0G1zBxl0Dq+6W1P3jpg==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-controllable-state/-/react-use-controllable-state-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-use-disclosure@2.1.0': resolution: {integrity: sha512-Ax4pmxA9LBGMyEZJhhUZobg9C0t3qFE4jVF1tGBsrLDcdBeLR9fwOogIPY9Hf0/wqSlAryAimICbr5hkpa5GSw==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-disclosure/-/react-use-disclosure-2.1.0.tgz} @@ -2389,7 +2392,7 @@ packages: '@chakra-ui/react-use-event-listener@2.1.0': resolution: {integrity: sha512-U5greryDLS8ISP69DKDsYcsXRtAdnTQT+jjIlRYZ49K/XhUR/AqVZCK5BkR1spTDmO9H8SPhgeNKI70ODuDU/Q==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-event-listener/-/react-use-event-listener-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-use-focus-effect@2.1.0': resolution: {integrity: sha512-xzVboNy7J64xveLcxTIJ3jv+lUJKDwRM7Szwn9tNzUIPD94O3qwjV7DDCUzN2490nSYDF4OBMt/wuDBtaR3kUQ==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-focus-effect/-/react-use-focus-effect-2.1.0.tgz} @@ -2399,7 +2402,7 @@ packages: '@chakra-ui/react-use-focus-on-pointer-down@2.1.0': resolution: {integrity: sha512-2jzrUZ+aiCG/cfanrolsnSMDykCAbv9EK/4iUyZno6BYb3vziucmvgKuoXbMPAzWNtwUwtuMhkby8rc61Ue+Lg==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-focus-on-pointer-down/-/react-use-focus-on-pointer-down-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-use-interval@2.1.0': resolution: {integrity: sha512-8iWj+I/+A0J08pgEXP1J1flcvhLBHkk0ln7ZvGIyXiEyM6XagOTJpwNhiu+Bmk59t3HoV/VyvyJTa+44sEApuw==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-interval/-/react-use-interval-2.1.0.tgz} @@ -2414,7 +2417,7 @@ packages: '@chakra-ui/react-use-merge-refs@2.1.0': resolution: {integrity: sha512-lERa6AWF1cjEtWSGjxWTaSMvneccnAVH4V4ozh8SYiN9fSPZLlSG3kNxfNzdFvMEhM7dnP60vynF7WjGdTgQbQ==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-merge-refs/-/react-use-merge-refs-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-use-outside-click@2.2.0': resolution: {integrity: sha512-PNX+s/JEaMneijbgAM4iFL+f3m1ga9+6QK0E5Yh4s8KZJQ/bLwZzdhMz8J/+mL+XEXQ5J0N8ivZN28B82N1kNw==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-outside-click/-/react-use-outside-click-2.2.0.tgz} @@ -2434,7 +2437,7 @@ packages: '@chakra-ui/react-use-safe-layout-effect@2.1.0': resolution: {integrity: sha512-Knbrrx/bcPwVS1TorFdzrK/zWA8yuU/eaXDkNj24IrKoRlQrSBFarcgAEzlCHtzuhufP3OULPkELTzz91b0tCw==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-use-size@2.1.0': resolution: {integrity: sha512-tbLqrQhbnqOjzTaMlYytp7wY8BW1JpL78iG7Ru1DlV4EWGiAmXFGvtnEt9HftU0NJ0aJyjgymkxfVGI55/1Z4A==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-size/-/react-use-size-2.1.0.tgz} @@ -2449,7 +2452,7 @@ packages: '@chakra-ui/react-use-update-effect@2.1.0': resolution: {integrity: sha512-ND4Q23tETaR2Qd3zwCKYOOS1dfssojPLJMLvUtUbW5M9uW1ejYWgGUobeAiOVfSplownG8QYMmHTP86p/v0lbA==, tarball: https://registry.npmjs.org/@chakra-ui/react-use-update-effect/-/react-use-update-effect-2.1.0.tgz} peerDependencies: - react: '>=18' + react: ^18.2.0 '@chakra-ui/react-utils@2.0.12': resolution: {integrity: sha512-GbSfVb283+YA3kA8w8xWmzbjNWk14uhNpntnipHCftBibl0lxtQ9YqMFQLwuFOO0U2gYVocszqqDWX+XNKq9hw==, tarball: https://registry.npmjs.org/@chakra-ui/react-utils/-/react-utils-2.0.12.tgz} @@ -2462,8 +2465,8 @@ packages: '@emotion/react': ^11.0.0 '@emotion/styled': ^11.0.0 framer-motion: '>=4.0.0' - react: '>=18' - react-dom: '>=18' + react: ^18.2.0 + react-dom: ^18.2.0 '@chakra-ui/select@2.1.2': resolution: {integrity: sha512-ZwCb7LqKCVLJhru3DXvKXpZ7Pbu1TDZ7N0PdQ0Zj1oyVLJyrpef1u9HR5u0amOpqcH++Ugt0f5JSmirjNlctjA==, tarball: https://registry.npmjs.org/@chakra-ui/select/-/select-2.1.2.tgz} @@ -2525,7 +2528,7 @@ packages: peerDependencies: '@emotion/react': ^11.0.0 '@emotion/styled': ^11.0.0 - react: '>=18' + react: ^18.2.0 '@chakra-ui/table@2.1.0': resolution: {integrity: sha512-o5OrjoHCh5uCLdiUb0Oc0vq9rIAeHSIRScc2ExTC9Qg/uVZl2ygLrjToCaKfaaKl1oQexIeAcZDKvPG8tVkHyQ==, tarball: https://registry.npmjs.org/@chakra-ui/table/-/table-2.1.0.tgz} @@ -2611,8 +2614,8 @@ packages: resolution: {integrity: sha512-Y/d2Zzr+JJfN6u1gbuBUb1ufBuLMJJRZQk+dRmw8GaTpqKx5uf7cGUYGTwN02dIb3I+Tf+cW8jcGBTRiFxdYFg==, tarball: https://registry.npmjs.org/@design-systems/utils/-/utils-2.12.0.tgz} peerDependencies: '@types/react': '*' - react: '>= 16.8.6' - react-dom: '>= 16.8.6' + react: ^18.2.0 + react-dom: ^18.2.0 '@devtools-ds/table@1.2.1': resolution: {integrity: sha512-wib8YqZIVU9Y74/jCh6PRPYHQQJl0jrECgxA0hnnfEp4NXCWXcND58RFNKWdr3/QSyMaVjitHy2n34YjxfBNJw==, tarball: https://registry.npmjs.org/@devtools-ds/table/-/table-1.2.1.tgz} @@ -3780,7 +3783,7 @@ packages: '@reduxjs/toolkit@1.9.7': resolution: {integrity: sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ==, tarball: https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-1.9.7.tgz} peerDependencies: - react: ^16.9.0 || ^17.0.0 || ^18 + react: ^18.2.0 react-redux: ^7.2.1 || ^8.0.2 peerDependenciesMeta: react: @@ -15318,7 +15321,7 @@ snapshots: dependencies: '@oclif/errors': 1.3.6 '@oclif/parser': 3.8.17 - debug: 4.3.6 + debug: 4.3.7 globby: 11.1.0 is-wsl: 2.2.0 tslib: 2.6.2 From 2ad655c72e9a9df411769804ea34a0532ecc3a92 Mon Sep 17 00:00:00 2001 From: Ketan Reddy Date: Thu, 24 Oct 2024 16:10:49 -0700 Subject: [PATCH 3/3] fix platform tabs for js references --- docs/site/BUILD | 1 + .../src/content/docs/guides/getting-started.mdx | 15 +++------------ .../docs/plugins/core/common-expressions.mdx | 5 ++--- .../content/docs/plugins/core/common-types.mdx | 5 ++--- .../docs/plugins/multiplatform/asset-provider.mdx | 5 ++--- .../docs/plugins/multiplatform/check-path.mdx | 10 +++------- .../plugins/multiplatform/external-action.mdx | 5 ++--- docs/site/src/content/docs/tools/storybook.mdx | 5 ++--- docs/site/src/content/docs/xlr/usage.mdx | 12 ++++++------ package.json | 1 + pnpm-lock.yaml | 15 +++++++++++++++ 11 files changed, 39 insertions(+), 40 deletions(-) diff --git a/docs/site/BUILD b/docs/site/BUILD index 63dbe8029..ef44819e7 100644 --- a/docs/site/BUILD +++ b/docs/site/BUILD @@ -37,6 +37,7 @@ build_deps = [ "//:node_modules/@astrojs/starlight-docsearch", "//:node_modules/dlv", "//:node_modules/unist-util-visit", + "//:node_modules/starlight-package-managers", ":node_modules/@player-ui/player", ":node_modules/@player-ui/react", ":node_modules/@player-ui/reference-assets-plugin-components", diff --git a/docs/site/src/content/docs/guides/getting-started.mdx b/docs/site/src/content/docs/guides/getting-started.mdx index dee681351..bb7f2b418 100644 --- a/docs/site/src/content/docs/guides/getting-started.mdx +++ b/docs/site/src/content/docs/guides/getting-started.mdx @@ -3,6 +3,7 @@ title: "Getting Started" --- import PlatformTabs from "../../../components/PlatformTabs.astro"; +import { PackageManagers } from 'starlight-package-managers' Getting started with Player is simple. @@ -13,19 +14,9 @@ The first dependency you'll need to pull in is the Player itself. Additionally, -You can do this by running +You can do this by installing the React Player and Reference Assets Packages -```bash -yarn add @player-ui/react -yarn add @player-ui/reference-assets-plugin-react -``` - -or - -```bash -npm install @player-ui/react -npm install @player-ui/reference-assets-plugin-react -``` + diff --git a/docs/site/src/content/docs/plugins/core/common-expressions.mdx b/docs/site/src/content/docs/plugins/core/common-expressions.mdx index 501bfaee8..167501052 100644 --- a/docs/site/src/content/docs/plugins/core/common-expressions.mdx +++ b/docs/site/src/content/docs/plugins/core/common-expressions.mdx @@ -3,6 +3,7 @@ title: Common Expressions --- import PlatformTabs from "../../../../components/PlatformTabs.astro"; +import { PackageManagers } from 'starlight-package-managers' This plugin exposes some basic expressions into Player content. @@ -15,9 +16,7 @@ It also serves as a good reference to adding your own custom expressions into Pl Install the plugin: -```bash -yarn add @player-ui/common-types-plugin -``` + Add it to Player: diff --git a/docs/site/src/content/docs/plugins/core/common-types.mdx b/docs/site/src/content/docs/plugins/core/common-types.mdx index f99bd2f9e..e809ffc51 100644 --- a/docs/site/src/content/docs/plugins/core/common-types.mdx +++ b/docs/site/src/content/docs/plugins/core/common-types.mdx @@ -3,6 +3,7 @@ title: Common Types --- import PlatformTabs from "../../../../components/PlatformTabs.astro"; +import { PackageManagers } from 'starlight-package-managers' This plugin exposes some basic `DataTypes`, `validations`, and `formats` into Player content. @@ -15,9 +16,7 @@ It also serves as a good reference to adding your own custom types into Player. Install the plugin: -```bash -yarn add @player-ui/common-types-plugin -``` + Add it to Player: diff --git a/docs/site/src/content/docs/plugins/multiplatform/asset-provider.mdx b/docs/site/src/content/docs/plugins/multiplatform/asset-provider.mdx index 7f712be50..3cb3a6dc0 100644 --- a/docs/site/src/content/docs/plugins/multiplatform/asset-provider.mdx +++ b/docs/site/src/content/docs/plugins/multiplatform/asset-provider.mdx @@ -4,6 +4,7 @@ title: Asset Provider Plugin import PlatformTabs from "../../../../components/PlatformTabs.astro"; import ContentTabs from "../../../../components/ContentTabs.astro"; +import { PackageManagers } from 'starlight-package-managers' The Asset Provider Plugin enables users to easily register UI components to render their assets. It's used internally by the [Reference Assets](/assets/reference). The matches follow the same rules as asset transforms (more specific matches take priority). @@ -16,9 +17,7 @@ The Asset Provider Plugin enables users to easily register UI components to rend Install the plugin: -```bash -yarn add @player-ui/asset-provider-plugin-react -``` + Create an instance, and add it to your Player instance. The API is similar to the JavaScript `Map`, and takes a list of `[match, Component]` tuples. diff --git a/docs/site/src/content/docs/plugins/multiplatform/check-path.mdx b/docs/site/src/content/docs/plugins/multiplatform/check-path.mdx index 7f98c78f8..5e939056b 100644 --- a/docs/site/src/content/docs/plugins/multiplatform/check-path.mdx +++ b/docs/site/src/content/docs/plugins/multiplatform/check-path.mdx @@ -3,6 +3,7 @@ title: Check Path Plugin --- import PlatformTabs from "../../../../components/PlatformTabs.astro"; +import { PackageManagers } from 'starlight-package-managers' The Check Path Plugin enables users to query segments of the view tree for contextual rendering or behavior. This is best suited to be referenced during the UI rendering phase, where one can make decisions about the rendering of an asset based on where it lies in the tree. @@ -14,9 +15,7 @@ This is best suited to be referenced during the UI rendering phase, where one ca Install the plugin: -```bash -yarn add @player-ui/check-path-plugin -``` + Add it to Player: @@ -44,11 +43,8 @@ const isCustomThing = checkPathPlugin.hasParentContext("my-asset-id", [ Install the plugin: -```bash -yarn add @player-ui/check-path-plugin-react -``` + -6474792156 Add it to Player: ```js diff --git a/docs/site/src/content/docs/plugins/multiplatform/external-action.mdx b/docs/site/src/content/docs/plugins/multiplatform/external-action.mdx index 58e24c276..33b8b2466 100644 --- a/docs/site/src/content/docs/plugins/multiplatform/external-action.mdx +++ b/docs/site/src/content/docs/plugins/multiplatform/external-action.mdx @@ -3,6 +3,7 @@ title: External Action --- import PlatformTabs from "../../../../components/PlatformTabs.astro"; +import { PackageManagers } from 'starlight-package-managers' The External Action Plugin is an easy way to handle External states from the navigation of a Player flow. @@ -13,9 +14,7 @@ The External Action Plugin is an easy way to handle External states from the nav Install the plugin: -```bash -yarn add @player-ui/external-action-plugin -``` + Create a handler for external actions: diff --git a/docs/site/src/content/docs/tools/storybook.mdx b/docs/site/src/content/docs/tools/storybook.mdx index 237e664d8..f40d227cf 100644 --- a/docs/site/src/content/docs/tools/storybook.mdx +++ b/docs/site/src/content/docs/tools/storybook.mdx @@ -7,6 +7,7 @@ import eventsAddonGif from "../../../assets/tools/storybook/events-addon.gif"; import flowAddonGif from "../../../assets/tools/storybook/flow-addon.gif"; import docsAddonGif from "../../../assets/tools/storybook/docs-addon.gif"; import flowResetGif from "../../../assets/tools/storybook/flow-reset.gif"; +import { PackageManagers } from 'starlight-package-managers' ## Reference Assets @@ -22,9 +23,7 @@ There are a few different parts required to integrate with storybook. Start by installing `@player-ui/storybook`: -```bash -yarn add @player-ui/storybook -``` + Next, add `@player-ui/storybook` to the `addons` section in `.storybook/main.js` diff --git a/docs/site/src/content/docs/xlr/usage.mdx b/docs/site/src/content/docs/xlr/usage.mdx index fa6970d72..e17572ce1 100644 --- a/docs/site/src/content/docs/xlr/usage.mdx +++ b/docs/site/src/content/docs/xlr/usage.mdx @@ -2,13 +2,15 @@ title: Using XLR --- +import { PackageManagers } from 'starlight-package-managers' + + # Part 1 - Creating XLRs XLR creation is done through the Player CLI which can be added to your project like so: -```bash -yarn install @player-tools/cli -``` + + ## Exporting Base Type Definitions @@ -43,9 +45,7 @@ player xlr compile -m plugin To start using the XLR SDK you'll need to install the SDK package -```bash -yarn install @player-tools/xlr-sdk -``` + Next, import the SDK diff --git a/package.json b/package.json index 8d2001568..c498233fd 100644 --- a/package.json +++ b/package.json @@ -171,6 +171,7 @@ "signale": "^1.4.0", "sorted-array": "^2.0.4", "source-map-js": "^1.0.2", + "starlight-package-managers": "^0.7.0", "std-mocks": "^1.0.1", "storybook": "^7.6.10", "storybook-dark-mode": "3.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e15629b28..d11e89c01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -486,6 +486,9 @@ importers: source-map-js: specifier: ^1.0.2 version: 1.2.0 + starlight-package-managers: + specifier: ^0.7.0 + version: 0.7.0(@astrojs/starlight@0.28.3(astro@4.16.7(@types/node@18.19.33)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.3)))(astro@4.16.7(@types/node@18.19.33)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.3)) std-mocks: specifier: ^1.0.1 version: 1.0.1 @@ -10319,6 +10322,13 @@ packages: stackframe@1.3.4: resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==, tarball: https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz} + starlight-package-managers@0.7.0: + resolution: {integrity: sha512-7T0Wd4OhtyTxr7yxplO1gt1B0Ped4dxRQ0T3uOp7qM+5UmQiyQE6PMxwmN+4hVuaVQ1zpDdZR6nQrptewS+m9g==, tarball: https://registry.npmjs.org/starlight-package-managers/-/starlight-package-managers-0.7.0.tgz} + engines: {node: '>=18.14.1'} + peerDependencies: + '@astrojs/starlight': '>=0.22.0' + astro: '>=4.2.7' + state-local@1.0.7: resolution: {integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w==, tarball: https://registry.npmjs.org/state-local/-/state-local-1.0.7.tgz} @@ -24532,6 +24542,11 @@ snapshots: stackframe@1.3.4: {} + starlight-package-managers@0.7.0(@astrojs/starlight@0.28.3(astro@4.16.7(@types/node@18.19.33)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.3)))(astro@4.16.7(@types/node@18.19.33)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.3)): + dependencies: + '@astrojs/starlight': 0.28.3(astro@4.16.7(@types/node@18.19.33)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.3)) + astro: 4.16.7(@types/node@18.19.33)(rollup@4.21.2)(terser@5.31.0)(typescript@5.5.3) + state-local@1.0.7: {} state-toggle@1.0.3: {}