id
stringlengths
12
53
messages
listlengths
3
3
code_marketingdata-session_74063e5c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of marketingdata-session/node/index.ts from the marketingdata-session VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { method, Service, ServiceContext } from '@vtex/api'\nimport { process } from './middlewares/process'\n\ndeclare global {\n // We declare a global Context type just to avoid re-writing ServiceContext<Clients, State> in every handler and resolver\n type Context = ServiceContext\n}\n\nexport default new Service({\n routes: { \n transform: method ({\n POST: [process],\n }),\n },\n})\n\n```" } ]
code_marketingdata-session_cf304fb5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of marketingdata-session/node/middlewares/process.ts from the marketingdata-session VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { json } from 'co-body'\n\ninterface SessionField {\n value: string\n}\n\ninterface SessionNamespaceContent {\n [key: string]: SessionField\n}\n\ninterface SessionContent {\n [key: string]: SessionNamespaceContent\n}\n\nexport async function process(ctx: Context, next: () => Promise<any>) {\n ctx.set('Cache-Control', 'no-cache')\n \n // Parse request body\n //console.log(\"ResquestContent:\", await text(ctx.req))\n let sessionContent : SessionContent = await json(ctx.req)\n console.log(\"SessionContent:\", sessionContent)\n \n // Perform any content calculation and build session new content\n let sessionNewContent : SessionContent = {}\n if(!sessionContent.public?.utm_source && sessionContent.public?.gclid) {\n sessionContent.public[\"utm_source\"] = { value: \"Google\" }\n sessionNewContent[\"public\"] = { utm_source : sessionContent.public[\"utm_source\"]}\n }\n sessionNewContent[\"marketingdata\"] = sessionContent.public\n\n // Define response\n ctx.response.status = 200\n ctx.response.set('Content-Type', 'application/json')\n ctx.response.body = JSON.stringify(sessionNewContent)\n await next()\n}\n\n```" } ]
code_address-context_7483d147
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/docs/README.md from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Address Context\n\n> AddressContext is the orchestrator that is responsible for providing APIs to read and write an Address state.\n\n```" } ]
code_address-context_c57a6531
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/Utils.ts from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { Address, AddressType } from 'vtex.checkout-graphql'\n\nimport { AddressFields, AddressRules, Field } from './types'\n\nexport const validateAddress = (\n address: Address | null | undefined,\n rules: AddressRules\n) => {\n if (!address?.country || !rules[address.country]) {\n return {\n isValid: false,\n invalidFields: [\n 'number',\n 'postalCode',\n 'city',\n 'complement',\n 'reference',\n 'neighborhood',\n 'state',\n 'country',\n 'receiverName',\n 'street',\n ] as AddressFields[],\n }\n }\n\n const invalidFields = (Object.entries(rules[address.country].fields) as Array<\n [AddressFields, Field]\n >)\n .filter(([field, fieldSchema]) => {\n if (field === 'isDisposable') {\n return false\n }\n\n const fieldValue = address[field]\n\n if (fieldSchema.required && !fieldValue) {\n return true\n }\n\n if (\n fieldSchema.maxLength &&\n fieldValue &&\n fieldValue.length > fieldSchema.maxLength\n ) {\n return true\n }\n\n if (fieldSchema.pattern) {\n return fieldValue?.match(fieldSchema.pattern) === null\n }\n\n return false\n })\n .map(([field]) => field)\n\n return {\n isValid: invalidFields.length === 0,\n invalidFields,\n }\n}\n\nexport const createEmptyAddress = (disposable = false): Address => {\n return {\n addressId: null,\n addressType: 'residential' as AddressType,\n geoCoordinates: [],\n number: null,\n postalCode: null,\n city: null,\n complement: null,\n reference: null,\n neighborhood: null,\n state: null,\n country: null,\n receiverName: null,\n street: null,\n isDisposable: disposable,\n }\n}\n\nexport default { validateAddress, createEmptyAddress }\n\n```" } ]
code_address-context_9579c87e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/AddressContext.tsx from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { createContext, useContext, useState, useMemo } from 'react'\nimport { Address } from 'vtex.checkout-graphql'\n\nimport { AddressRules, AddressFields } from './types'\nimport { validateAddress, createEmptyAddress } from './Utils'\n\ntype AddressUpdate = Address | ((prevAddress: Address) => Address)\n\ninterface Context {\n countries: string[]\n address: Address\n setAddress: (address: AddressUpdate) => void\n rules: AddressRules\n isValid: boolean\n invalidFields: AddressFields[]\n}\n\ninterface AddressContextProps {\n address: Address | null\n countries: string[]\n rules: AddressRules\n}\n\nconst AddressContextContext = createContext<Context | undefined>(undefined)\n\nexport const AddressContextProvider: React.FC<AddressContextProps> = ({\n children,\n address,\n countries,\n rules = {},\n}) => {\n const [localAddress, setLocalAddress] = useState(\n () => address ?? createEmptyAddress()\n )\n\n const { invalidFields, isValid } = useMemo(\n () => validateAddress(localAddress, rules),\n [localAddress, rules]\n )\n\n const state = useMemo(\n () => ({\n countries,\n address: localAddress,\n setAddress: setLocalAddress,\n rules,\n isValid,\n invalidFields,\n }),\n [countries, localAddress, rules, isValid, invalidFields]\n )\n\n return (\n <AddressContextContext.Provider value={state}>\n {children}\n </AddressContextContext.Provider>\n )\n}\n\nexport const useAddressContext = () => {\n const context = useContext(AddressContextContext)\n if (context === undefined) {\n throw new Error(\n 'useAddressContext must be used within an AddressContextProvider'\n )\n }\n\n return context\n}\n\nexport default { AddressContextProvider, useAddressContext }\n\n```" } ]
code_address-context_ec1920e8
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/package.json from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"vtex.address-context\",\n \"private\": true,\n \"version\": \"0.6.2\",\n \"dependencies\": {\n \"react\": \"^16.8.3\",\n \"react-apollo\": \"^3.1.5\",\n \"react-dom\": \"^16.8.3\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^12.7.5\",\n \"@types/react\": \"^16.9.2\",\n \"vtex.checkout-graphql\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.checkout-graphql@0.56.1/public/@types/vtex.checkout-graphql\",\n \"vtex.country-data-settings\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.country-data-settings@0.3.0/public/@types/vtex.country-data-settings\",\n \"vtex.render-runtime\": \"http://vtex.vtexassets.com/_v/public/typings/v1/vtex.render-runtime@8.126.11/public/@types/vtex.render-runtime\"\n }\n}\n\n```" } ]
code_address-context_1ca21263
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/useAddressRules.tsx from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useMemo } from 'react'\nimport { useQuery } from 'react-apollo'\nimport {\n CountryData,\n DisplayData,\n AddressFieldsData,\n LocationSelectData,\n} from 'vtex.country-data-settings'\n\nimport addressRulesQuery from './graphql/addressRulesQuery.gql'\n\ninterface RulesQuery {\n allCountriesData: CountryData[]\n}\n\nconst useAddressRules = () => {\n const { data } = useQuery<RulesQuery>(addressRulesQuery)\n\n const addressRules = useMemo(\n () =>\n data?.allCountriesData?.reduce<\n Record<\n string,\n {\n display: DisplayData\n fields: AddressFieldsData\n locationSelect?: LocationSelectData | null\n }\n >\n >(\n (rules, countryData) => ({\n ...rules,\n [countryData.countryISO]: {\n display: countryData.display,\n fields: countryData.addressFields,\n locationSelect: countryData.locationSelect,\n },\n }),\n {}\n ),\n [data]\n )\n\n return addressRules\n}\n\nexport default useAddressRules\n\n```" } ]
code_address-context_b9372cdb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/types.tsx from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport type { Address } from 'vtex.checkout-graphql'\nimport type {\n AddressFieldsData,\n DisplayData,\n LocationSelectData,\n Field,\n} from 'vtex.country-data-settings'\n\nexport type AddressFields = keyof Omit<Address, '__typename' | 'geoCoordinates'>\n\nexport interface CountryRules {\n fields: AddressFieldsData\n display: DisplayData\n locationSelect?: LocationSelectData | null\n}\n\nexport interface AddressRules {\n [key: string]: CountryRules\n}\n\nexport { Field }\n\n```" } ]
code_address-context_e7bb4f1f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/typings/graphql.d.ts from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.gql' {\n import { DocumentNode } from 'graphql'\n\n const value: DocumentNode\n export default value\n}\n\n```" } ]
code_address-context_a1fa3dd5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/typings/vtex.styleguide.d.ts from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.styleguide' {\n import { ComponentType } from 'react'\n\n export const Input: ComponentType<InputProps>\n\n interface InputProps {\n [key: string]: any\n }\n}\n\n```" } ]
code_address-context_68e3305c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of address-context/react/graphql/addressRulesQuery.gql from the address-context VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nfragment FieldFragment on Field {\n label\n name\n hidden\n maxLength\n size\n required\n autoComplete\n options {\n label\n value\n }\n optionsCaption\n elementName\n mask\n pattern\n additionalData {\n ... on PostalCodeData {\n forgottenURL\n }\n }\n}\n\nfragment DisplayFragment on DisplayDefinition {\n name\n delimiter\n delimiterAfter\n}\n\nquery AddressRules {\n allCountriesData {\n countryISO\n addressFields {\n city {\n ...FieldFragment\n }\n complement {\n ...FieldFragment\n }\n country {\n ...FieldFragment\n }\n neighborhood {\n ...FieldFragment\n }\n number {\n ...FieldFragment\n }\n postalCode {\n ...FieldFragment\n }\n receiverName {\n ...FieldFragment\n }\n reference {\n ...FieldFragment\n }\n state {\n ...FieldFragment\n }\n street {\n ...FieldFragment\n }\n }\n display {\n minimal {\n ...DisplayFragment\n }\n compact {\n ...DisplayFragment\n }\n extended {\n ...DisplayFragment\n }\n }\n locationSelect {\n countryData\n fields {\n ...FieldFragment\n }\n }\n }\n}\n\n```" } ]
code_docs-ui_62696bf1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/messages/pt.json from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"docs-ui/renderer-github\": \"Edit this page on GitHub\",\n \"docs-ui/getting-started\": \"Getting Started\",\n \"docs-ui/getting-started.next\": \"Next article\",\n \"docs-ui/getting-started.previous\": \"Previous article\",\n \"docs-ui/recipes\": \"Recipes\",\n \"docs-ui/recipes-description\": \"Find answers to any doubt you may have on platform functionality.\",\n \"docs-ui/our-components\": \"Our components\",\n \"docs-ui/our-components-description\": \"Get to know our high quality, open-code, customizable components.\",\n \"docs-ui/concepts\": \"Concepts\",\n \"docs-ui/concepts-description\": \"Understand platform terminology and empower your knowledge about the VTEX IO universe.\",\n \"docs-ui/community\": \"Community\",\n \"docs-ui/community-description\": \"Share and obtain knowledge on the platform by working together with the VTEX IO community.\",\n \"docs-ui/latest-features\": \"Latest Releases\",\n \"docs-ui/latest-features-description\": \"Get a first hand look as the most recent platform releases:\",\n \"docs-ui/release-notes\": \"Release Notes\",\n \"docs-ui/release-notes-description\": \"See what is new in VTEX IO.\",\n \"docs-ui/apis\": \"VTEX Commerce APIs\",\n \"docs-ui/partner\": \"Become a partner\",\n \"docs-ui/visit-us\": \"visit us at www.vtex.com\",\n \"docs-ui/community-help\": \"Need help?\",\n \"docs-ui/community-join\": \"Join the discussion!\",\n \"docs-ui/empty.title\": \"Sorry :(\",\n \"docs-ui/empty-docs\": \"We could not fetch the documentation on this component right now.\",\n \"docs-ui/empty-summary\": \"We could not fetch the summary for this app.\",\n \"docs-ui/see-all\": \"See all\",\n \"docs-ui/see-previous-releases\": \"See previous releases\",\n \"docs-ui/build\": \"Develop with VTEX IO\",\n \"docs-ui/build-description\": \"Access content on VTEX IO and learn to develop on a high performance with low maintenance and development cost Software as a Service platform.\",\n \"docs-ui/create-stores\": \"Build stores with VTEX IO\",\n \"docs-ui/article-nav\": \"On this section\",\n \"docs-ui/recipes.style\": \"Style Recipes\",\n \"docs-ui/recipes.style-description\": \"Customize your store’s style and grant it its own identity.\",\n \"docs-ui/recipes.layout\": \"Layout Recipes\",\n \"docs-ui/recipes.layout-description\": \"Learn to configure the structure of your store components.\",\n \"docs-ui/recipes.templates\": \"Templates Recipes\",\n \"docs-ui/recipes.templates-description\": \"Learn to configure your store's blocks structure.\",\n \"docs-ui/recipes.development\": \"Development Recipes\",\n \"docs-ui/recipes.development-description\": \"If you are developing with VTEX IO then you are in the right place. Find all the recipes for the VTEX IO development platform below:\",\n \"docs-ui/recipes.store\": \"Store Management Recipes\",\n \"docs-ui/recipes.store-management\": \"Store Management Recipes\",\n \"docs-ui/recipes.store-description\": \"Find all the necessary information for a better management of your store’s content.\",\n \"docs-ui/recipes.store-management-description\": \"Store Management Recipes\",\n \"docs-ui/recipes.plugins\": \"Plugins Recipes\",\n \"docs-ui/recipes.plugins-description\": \"Check out the full list of available VTEX IO extension apps ready to be installed.\",\n \"docs-ui/recipes.custom-blocks\": \"Custom Blocks Recipes\",\n \"docs-ui/recipes.custom-blocks-description\": \"If your goal is to develop your own components using VTEX IO, you’ve come to the right place!\",\n \"docs-ui/recipes.all\": \"All Recipes\",\n \"docs-ui/recipes.all-description\": \"All the answers to any platform related questions can be found here! Find all the recipes for VTEX IO functionalities below:\",\n \"docs-ui/recipes.app\": \"Apps Recipes\",\n \"docs-ui/read-more\": \"Read more\",\n \"docs-ui/components.layout\": \"Layout Components\",\n \"docs-ui/components.layout-description\": \"Check out our most flexible components to add different layout elements into your store.\",\n \"docs-ui/components.layout-blocks\": \"Layout Blocks\",\n \"docs-ui/components.layout-blocks-description\": \"Check out our most flexible blocks to add different layout elements into your store.\",\n \"docs-ui/components.content-blocks\": \"Content Blocks\",\n \"docs-ui/components.content-blocks-description\": \"The entire store interface content is made up of several different blocks, aside from the ones for Layout. Explore the list of available blocks your store can already use here.\",\n \"docs-ui/components.general\": \"General Components\",\n \"docs-ui/components.general-description\": \"The entire online store interface is made up of several different components. Explore the list of available components your store can already use here.\",\n \"docs-ui/components.navigation\": \"Navigation Components\",\n \"docs-ui/components.navigation-description\": \"Check out all the components that are linked to user browsing experience.\",\n \"docs-ui/components.product-related\": \"Product Related Components\",\n \"docs-ui/components.product-related-description\": \"Find all the components responsible for rendering your store’s product data below.\",\n \"docs-ui/components.pixel\": \"Pixel Components\",\n \"docs-ui/components.pixel-description\": \"Pixel components are used to collect user data for a third-party of your choosing. Check out some of the already available implementations on our platform.\",\n \"docs-ui/components.functional\": \"Functional Apps\",\n \"docs-ui/components.functional-description\": \"In addition to the blocks that build the store's layout and interface content, we also have the apps that are not rendered by themselves, but that have important roles for the functioning of your store. Check the full list of functional apps below:\",\n \"docs-ui/components.search-related\": \"Search Related Components\",\n \"docs-ui/components.search-related-description\": \"All your search-related platform components in just one place.\",\n \"docs-ui/components.all\": \"All Components\",\n \"docs-ui/components.all-description\": \"All your store components are found here! Check out the full list below.\",\n \"docs-ui/nav.api\": \"VTEX Commerce APIs\",\n \"docs-ui/nav.partner\": \"Become a partner\",\n \"docs-ui/join-discussion\": \"Join the discussion!\",\n \"docs-ui/did-not-find-your-answer\": \"Didn't find your answer?\",\n \"docs-ui/lorem\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ligula sagittis, dignissim nisi non, interdum elit. Vivamus eget dolor egestas, hendrerit urna a, finibus enim. Phasellus mollis mollis dui ut mattis. In ut purus sem. Quisque volutpat ornare consequat.\",\n \"docs-ui/lorem-short\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod.\"\n}\n\n```" } ]
code_docs-ui_f200f48d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/messages/en.json from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"docs-ui/renderer-github\": \"Edit this page on GitHub\",\n \"docs-ui/getting-started\": \"Getting Started\",\n \"docs-ui/getting-started.next\": \"Next article\",\n \"docs-ui/getting-started.previous\": \"Previous article\",\n \"docs-ui/recipes\": \"Recipes\",\n \"docs-ui/recipes-description\": \"Find answers to any doubt you may have on platform functionality.\",\n \"docs-ui/our-components\": \"Our components\",\n \"docs-ui/our-components-description\": \"Get to know our high quality, open-code, customizable components.\",\n \"docs-ui/concepts\": \"Concepts\",\n \"docs-ui/concepts-description\": \"Understand platform terminology and empower your knowledge about the VTEX IO universe.\",\n \"docs-ui/community\": \"Community\",\n \"docs-ui/community-description\": \"Share and obtain knowledge on the platform by working together with the VTEX IO community.\",\n \"docs-ui/latest-features\": \"Latest Releases\",\n \"docs-ui/latest-features-description\": \"Get a first hand look as the most recent platform releases:\",\n \"docs-ui/release-notes\": \"Release Notes\",\n \"docs-ui/release-notes-description\": \"See what is new in VTEX IO.\",\n \"docs-ui/apis\": \"VTEX Commerce APIs\",\n \"docs-ui/partner\": \"Become a partner\",\n \"docs-ui/visit-us\": \"visit us at www.vtex.com\",\n \"docs-ui/community-help\": \"Need help?\",\n \"docs-ui/community-join\": \"Join the discussion!\",\n \"docs-ui/empty.title\": \"Sorry :(\",\n \"docs-ui/empty-docs\": \"We could not fetch the documentation on this component right now.\",\n \"docs-ui/empty-summary\": \"We could not fetch the summary for this app.\",\n \"docs-ui/see-all\": \"See all\",\n \"docs-ui/see-previous-releases\": \"See previous releases\",\n \"docs-ui/build\": \"Develop with VTEX IO\",\n \"docs-ui/build-description\": \"Access content on VTEX IO and learn to develop on a high performance with low maintenance and development cost Software as a Service platform.\",\n \"docs-ui/create-stores\": \"Build stores with VTEX IO\",\n \"docs-ui/article-nav\": \"On this section\",\n \"docs-ui/recipes.style\": \"Style Recipes\",\n \"docs-ui/recipes.style-description\": \"Customize your store’s style and grant it its own identity.\",\n \"docs-ui/recipes.layout\": \"Layout Recipes\",\n \"docs-ui/recipes.layout-description\": \"Learn to configure the structure of your store components.\",\n \"docs-ui/recipes.templates\": \"Templates Recipes\",\n \"docs-ui/recipes.templates-description\": \"Learn to configure your store's blocks structure.\",\n \"docs-ui/recipes.development\": \"Development Recipes\",\n \"docs-ui/recipes.development-description\": \"If you are developing with VTEX IO then you are in the right place. Find all the recipes for the VTEX IO development platform below:\",\n \"docs-ui/recipes.store\": \"Store Management Recipes\",\n \"docs-ui/recipes.store-management\": \"Store Management Recipes\",\n \"docs-ui/recipes.store-description\": \"Find all the necessary information for a better management of your store’s content.\",\n \"docs-ui/recipes.store-management-description\": \"Store Management Recipes\",\n \"docs-ui/recipes.plugins\": \"Plugins Recipes\",\n \"docs-ui/recipes.plugins-description\": \"Check out the full list of available VTEX IO extension apps ready to be installed.\",\n \"docs-ui/recipes.custom-blocks\": \"Custom Blocks Recipes\",\n \"docs-ui/recipes.custom-blocks-description\": \"If your goal is to develop your own components using VTEX IO, you’ve come to the right place!\",\n \"docs-ui/recipes.all\": \"All Recipes\",\n \"docs-ui/recipes.all-description\": \"All the answers to any platform related questions can be found here! Find all the recipes for VTEX IO functionalities below:\",\n \"docs-ui/recipes.app\": \"Apps Recipes\",\n \"docs-ui/read-more\": \"Read more\",\n \"docs-ui/components.layout\": \"Layout Components\",\n \"docs-ui/components.layout-description\": \"Check out our most flexible components to add different layout elements into your store.\",\n \"docs-ui/components.layout-blocks\": \"Layout Blocks\",\n \"docs-ui/components.layout-blocks-description\": \"Check out our most flexible blocks to add different layout elements into your store.\",\n \"docs-ui/components.content-blocks\": \"Content Blocks\",\n \"docs-ui/components.content-blocks-description\": \"The entire store interface content is made up of several different blocks, aside from the ones for Layout. Explore the list of available blocks your store can already use here.\",\n \"docs-ui/components.general\": \"General Components\",\n \"docs-ui/components.general-description\": \"The entire online store interface is made up of several different components. Explore the list of available components your store can already use here.\",\n \"docs-ui/components.navigation\": \"Navigation Components\",\n \"docs-ui/components.navigation-description\": \"Check out all the components that are linked to user browsing experience.\",\n \"docs-ui/components.product-related\": \"Product Related Components\",\n \"docs-ui/components.product-related-description\": \"Find all the components responsible for rendering your store’s product data below.\",\n \"docs-ui/components.pixel\": \"Pixel Components\",\n \"docs-ui/components.pixel-description\": \"Pixel components are used to collect user data for a third-party of your choosing. Check out some of the already available implementations on our platform.\",\n \"docs-ui/components.functional\": \"Functional Apps\",\n \"docs-ui/components.functional-description\": \"In addition to the blocks that build the store's layout and interface content, we also have the apps that are not rendered by themselves, but that have important roles for the functioning of your store. Check the full list of functional apps below:\",\n \"docs-ui/components.search-related\": \"Search Related Components\",\n \"docs-ui/components.search-related-description\": \"All your search-related platform components in just one place.\",\n \"docs-ui/components.all\": \"All Components\",\n \"docs-ui/components.all-description\": \"All your store components are found here! Check out the full list below.\",\n \"docs-ui/nav.api\": \"VTEX Commerce APIs\",\n \"docs-ui/nav.partner\": \"Become a partner\",\n \"docs-ui/join-discussion\": \"Join the discussion!\",\n \"docs-ui/did-not-find-your-answer\": \"Didn't find your answer?\",\n \"docs-ui/lorem\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ligula sagittis, dignissim nisi non, interdum elit. Vivamus eget dolor egestas, hendrerit urna a, finibus enim. Phasellus mollis mollis dui ut mattis. In ut purus sem. Quisque volutpat ornare consequat.\",\n \"docs-ui/lorem-short\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod.\"\n}\n\n```" } ]
code_docs-ui_c508f5cb
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/messages/context.json from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"docs-ui/renderer-github\": \"Edit this page on GitHub\",\n \"docs-ui/getting-started\": \"Getting Started\",\n \"docs-ui/getting-started.next\": \"Next article\",\n \"docs-ui/getting-started.previous\": \"Previous article\",\n \"docs-ui/recipes\": \"Recipes\",\n \"docs-ui/recipes-description\": \"Find answers to any doubt you may have on platform functionality.\",\n \"docs-ui/our-components\": \"Our components\",\n \"docs-ui/our-components-description\": \"Get to know our high quality, open-code, customizable components.\",\n \"docs-ui/concepts\": \"Concepts\",\n \"docs-ui/concepts-description\": \"Understand platform terminology and empower your knowledge about the VTEX IO universe.\",\n \"docs-ui/community\": \"Community\",\n \"docs-ui/community-description\": \"Share and obtain knowledge on the platform by working together with the VTEX IO community.\",\n \"docs-ui/latest-features\": \"Latest Releases\",\n \"docs-ui/latest-features-description\": \"Get a first hand look as the most recent platform releases:\",\n \"docs-ui/release-notes\": \"Release Notes\",\n \"docs-ui/release-notes-description\": \"See what is new in VTEX IO.\",\n \"docs-ui/apis\": \"VTEX Commerce APIs\",\n \"docs-ui/partner\": \"Become a partner\",\n \"docs-ui/visit-us\": \"visit us at www.vtex.com\",\n \"docs-ui/community-help\": \"Need help?\",\n \"docs-ui/community-join\": \"Join the discussion!\",\n \"docs-ui/empty.title\": \"Sorry :(\",\n \"docs-ui/empty-docs\": \"We could not fetch the documentation on this component right now.\",\n \"docs-ui/empty-summary\": \"We could not fetch the summary for this app.\",\n \"docs-ui/see-all\": \"See all\",\n \"docs-ui/see-previous-releases\": \"See previous releases\",\n \"docs-ui/build\": \"Develop with VTEX IO\",\n \"docs-ui/build-description\": \"Access content on VTEX IO and learn to develop on a high performance with low maintenance and development cost Software as a Service platform.\",\n \"docs-ui/create-stores\": \"Build stores with VTEX IO\",\n \"docs-ui/article-nav\": \"On this section\",\n \"docs-ui/recipes.style\": \"Style Recipes\",\n \"docs-ui/recipes.style-description\": \"Customize your store’s style and grant it its own identity.\",\n \"docs-ui/recipes.layout\": \"Layout Recipes\",\n \"docs-ui/recipes.layout-description\": \"Learn to configure the structure of your store components.\",\n \"docs-ui/recipes.templates\": \"Templates Recipes\",\n \"docs-ui/recipes.templates-description\": \"Learn to configure your store's blocks structure.\",\n \"docs-ui/recipes.development\": \"Development Recipes\",\n \"docs-ui/recipes.development-description\": \"If you are developing with VTEX IO then you are in the right place. Find all the recipes for the VTEX IO development platform below:\",\n \"docs-ui/recipes.store\": \"Store Management Recipes\",\n \"docs-ui/recipes.store-management\": \"Store Management Recipes\",\n \"docs-ui/recipes.store-description\": \"Find all the necessary information for a better management of your store’s content.\",\n \"docs-ui/recipes.store-management-description\": \"Store Management Recipes\",\n \"docs-ui/recipes.plugins\": \"Plugins Recipes\",\n \"docs-ui/recipes.plugins-description\": \"Check out the full list of available VTEX IO extension apps ready to be installed.\",\n \"docs-ui/recipes.custom-blocks\": \"Custom Blocks Recipes\",\n \"docs-ui/recipes.custom-blocks-description\": \"If your goal is to develop your own components using VTEX IO, you’ve come to the right place!\",\n \"docs-ui/recipes.all\": \"All Recipes\",\n \"docs-ui/recipes.all-description\": \"All the answers to any platform related questions can be found here! Find all the recipes for VTEX IO functionalities below:\",\n \"docs-ui/recipes.app\": \"Apps Recipes\",\n \"docs-ui/read-more\": \"Read more\",\n \"docs-ui/components.layout\": \"Layout Components\",\n \"docs-ui/components.layout-description\": \"Check out our most flexible components to add different layout elements into your store.\",\n \"docs-ui/components.layout-blocks\": \"Layout Blocks\",\n \"docs-ui/components.layout-blocks-description\": \"Check out our most flexible blocks to add different layout elements into your store.\",\n \"docs-ui/components.content-blocks\": \"Content Blocks\",\n \"docs-ui/components.content-blocks-description\": \"The entire store interface content is made up of several different blocks, aside from the ones for Layout. Explore the list of available blocks your store can already use here.\",\n \"docs-ui/components.general\": \"General Components\",\n \"docs-ui/components.general-description\": \"The entire online store interface is made up of several different components. Explore the list of available components your store can already use here.\",\n \"docs-ui/components.navigation\": \"Navigation Components\",\n \"docs-ui/components.navigation-description\": \"Check out all the components that are linked to user browsing experience.\",\n \"docs-ui/components.product-related\": \"Product Related Components\",\n \"docs-ui/components.product-related-description\": \"Find all the components responsible for rendering your store’s product data below.\",\n \"docs-ui/components.pixel\": \"Pixel Components\",\n \"docs-ui/components.pixel-description\": \"Pixel components are used to collect user data for a third-party of your choosing. Check out some of the already available implementations on our platform.\",\n \"docs-ui/components.functional\": \"Functional Apps\",\n \"docs-ui/components.functional-description\": \"In addition to the blocks that build the store's layout and interface content, we also have the apps that are not rendered by themselves, but that have important roles for the functioning of your store. Check the full list of functional apps below:\",\n \"docs-ui/components.search-related\": \"Search Related Components\",\n \"docs-ui/components.search-related-description\": \"All your search-related platform components in just one place.\",\n \"docs-ui/components.all\": \"All Components\",\n \"docs-ui/components.all-description\": \"All your store components are found here! Check out the full list below.\",\n \"docs-ui/nav.api\": \"VTEX Commerce APIs\",\n \"docs-ui/nav.partner\": \"Become a partner\",\n \"docs-ui/join-discussion\": \"Join the discussion!\",\n \"docs-ui/did-not-find-your-answer\": \"Didn't find your answer?\",\n \"docs-ui/lorem\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel ligula sagittis, dignissim nisi non, interdum elit. Vivamus eget dolor egestas, hendrerit urna a, finibus enim. Phasellus mollis mollis dui ut mattis. In ut purus sem. Quisque volutpat ornare consequat.\",\n \"docs-ui/lorem-short\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod.\"\n}\n\n```" } ]
code_docs-ui_da6f3b33
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/docs/README.md from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Docs UI\n\nThis is the UI for VTEX IO documentation at https://vtex.io/docs.\n\nTo contribute to the available content, please refer to [IO Documentation](https://github.com/vtex-apps/io-documentation).\n\n\n**Upcoming documentation:**\n\n - [Update TopNav.tsx](https://github.com/vtex-apps/docs-ui/pull/121)\n```" } ]
code_docs-ui_f3899c0b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/pages/interfaces.json from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"navigation-wrapper\": {\n \"component\": \"PageLayoutContainer\"\n },\n \"docs-ui\": {\n },\n \"docs-ui.home\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"Home\"\n },\n \"docs-ui.search\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"Search\"\n },\n \"docs-ui.app\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"AppDocs\"\n },\n \"docs-ui.construction\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"UnderConstruction\"\n },\n \"docs-ui.recipes-list\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"RecipesList\"\n },\n \"docs-ui.recipe\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"Recipe\"\n },\n \"docs-ui.components-list\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"ComponentsGrid\"\n },\n \"docs-ui.apps-list\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"ComponentsGrid\"\n },\n \"docs-ui.component\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"AppDocs\"\n },\n \"docs-ui.apps\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"AppDocs\"\n },\n \"docs-ui.concept-list\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"ConceptList\"\n },\n \"docs-ui.concept\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"Concept\"\n },\n \"docs-ui.release-notes\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"ReleaseNotes\"\n },\n \"docs-ui.release-article\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"ReleaseArticle\"\n },\n \"docs-ui.getting-started\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"GettingStartedArticle\"\n },\n \"docs-ui.introduction\": {\n \"around\": [\"navigation-wrapper\"],\n \"component\": \"IntroductionArticle\"\n }\n}\n\n```" } ]
code_docs-ui_1cff7c9d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/pages/routes.json from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"docs-ui.home\": {\n \"path\": \"/docs(/home)\"\n },\n \"docs-ui.search\": {\n \"path\": \"/docs/search\"\n },\n \"docs-ui.recipes-list\": {\n \"path\": \"/docs/recipes/:category\"\n },\n \"docs-ui.recipe\": {\n \"path\": \"/docs/recipes/:category/:recipe\"\n },\n \"docs-ui.components-list\": {\n \"path\": \"/docs/components/:category\"\n },\n \"docs-ui.apps-list\": {\n \"path\": \"/docs/apps/:category\"\n },\n \"docs-ui.component\": {\n \"path\": \"/docs/components/:category/:app(/:file)\"\n },\n \"docs-ui.apps\": {\n \"path\": \"/docs/apps/:category/:app(/:file)\"\n },\n \"docs-ui.concept-list\": {\n \"path\": \"/docs/concepts\"\n },\n \"docs-ui.concept\": {\n \"path\": \"/docs/concepts/:concept\"\n },\n \"docs-ui.release-notes\": {\n \"path\": \"/docs/releases\"\n },\n \"docs-ui.release-article\": {\n \"path\": \"/docs/releases/:week/:article\"\n },\n \"docs-ui.getting-started\": {\n \"path\": \"/docs/getting-started/:track/:article\"\n },\n \"docs-ui.introduction\": {\n \"path\": \"/docs/introduction/:article\"\n },\n \"docs-ui.app\": {\n \"path\": \"/docs/app/:app(/:file)\"\n }\n}\n\n```" } ]
code_docs-ui_14f38c61
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/GettingStartedArticle.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { Fragment, FC } from 'react'\nimport { Query, graphql } from 'react-apollo'\nimport { ApolloError } from 'apollo-client'\nimport { compose, renderNothing, branch } from 'recompose'\nimport { FormattedMessage } from 'react-intl'\nimport { withRuntimeContext, Link, InjectedRuntime } from 'vtex.render-runtime'\n\nimport { IO_DOCUMENTATION } from './modules/constantExports'\nimport DocsRenderer from './components/DocsRenderer'\nimport Skeleton from './components/Skeleton'\nimport EmptyDocs from './components/EmptyDocs'\nimport MarkdownFile from './graphql/markdownFile.graphql'\nimport GettingStartedArticles from './graphql/gettingStartedArticles.graphql'\nimport RightArrow from './components/icons/RightArrow'\nimport LeftArrow from './components/icons/LeftArrow'\n\nconst GettingStartedArticle: FC<OuterProps & InjectedRuntime> = ({\n GettingStartedArticlesQuery,\n runtime,\n}) => {\n const {\n route: {\n params: { track, article },\n },\n } = runtime\n\n const articles = GettingStartedArticlesQuery.gettingStartedArticles\n\n const currentArticle = Number.parseInt(article, 10)\n\n return (\n <div className=\"w-100 center flex flex-column\">\n <Query\n query={MarkdownFile}\n variables={{\n appName: IO_DOCUMENTATION,\n fileName: `GettingStarted/${track}/${articles[article]}`,\n locale: 'en',\n }}>\n {({\n loading,\n error,\n data,\n }: {\n loading: boolean\n error?: ApolloError\n data: { markdownFile: { markdown: string; meta: MetaData } }\n }) => {\n if (loading) return <Skeleton />\n if (error) return <EmptyDocs />\n\n const {\n markdownFile: { markdown, meta },\n } = data\n\n return (\n <Fragment>\n <DocsRenderer markdown={markdown} meta={meta} />\n <div\n className=\"flex w-100 justify-between mv6\"\n style={{ maxWidth: '680px' }}>\n {hasPrevArticle(currentArticle) && (\n <Link\n className=\"link c-emphasis no-underline t-body mr-auto flex items-center dim\"\n page=\"docs-ui.getting-started\"\n params={{\n track,\n article: `${currentArticle - 1}`,\n }}>\n <div className=\"flex flex-column flex-row-l\">\n <div className=\"dn db-l mr5\">\n <LeftArrow />\n </div>\n <FormattedMessage id=\"docs-ui/getting-started.previous\" />\n </div>\n </Link>\n )}\n {hasNextArticle(articles, currentArticle) && (\n <Link\n className=\"link c-emphasis no-underline t-body ml-auto flex items-center dim\"\n page=\"docs-ui.getting-started\"\n params={{\n track,\n article: `${currentArticle + 1}`,\n }}>\n <div className=\"flex flex-column flex-row-l\">\n <FormattedMessage id=\"docs-ui/getting-started.next\" />\n <div className=\"dn db-l ml5\">\n <RightArrow />\n </div>\n </div>\n </Link>\n )}\n </div>\n </Fragment>\n )\n }}\n </Query>\n </div>\n )\n}\n\nfunction hasNextArticle(\n articleList: Record<string, string>,\n currentArticle: number\n) {\n const numberOfArticles = Object.keys(articleList).length\n return currentArticle < numberOfArticles\n}\n\nfunction hasPrevArticle(currentArticle: number) {\n return currentArticle > 1\n}\n\ninterface OuterProps {\n GettingStartedArticlesQuery: {\n gettingStartedArticles: Record<string, string>\n loading: boolean\n error?: ApolloError\n }\n}\n\ninterface MetaData {\n title: string\n description: string\n tags: string[]\n version: string\n git: string\n}\n\nexport default compose<any, any>(\n withRuntimeContext,\n graphql(GettingStartedArticles, {\n name: 'GettingStartedArticlesQuery',\n options: (props: InjectedRuntime) => {\n const { track } = props.runtime.route.params\n return {\n variables: {\n track,\n locale: 'en',\n },\n }\n },\n }),\n branch(\n ({ GettingStartedArticlesQuery }: OuterProps) =>\n GettingStartedArticlesQuery.loading,\n renderNothing\n )\n)(GettingStartedArticle)\n\n```" } ]
code_docs-ui_56ed9ec3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/AppDocs.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Query } from 'react-apollo'\nimport { ApolloError } from 'apollo-client'\n\nimport DocsRenderer from './components/DocsRenderer'\nimport Skeleton from './components/Skeleton'\nimport EmptyDocs from './components/EmptyDocs'\nimport { useApp } from './hooks/useApp'\nimport { maybeAddMdExtension } from './modules'\nimport MarkdownFile from './graphql/markdownFile.graphql'\n\nconst AppDocs: FC = () => {\n const { appName, fileName } = useApp()\n\n return (\n <div className=\"w-100 center flex flex-column\">\n <Query\n query={MarkdownFile}\n variables={{\n appName,\n fileName: maybeAddMdExtension(fileName),\n }}>\n {({\n loading,\n error,\n data,\n }: {\n loading: boolean\n error?: ApolloError\n data: { markdownFile: { markdown: string; meta: MetaData } }\n }) => {\n if (loading) return <Skeleton />\n if (error || data.markdownFile.markdown === '') return <EmptyDocs />\n\n const {\n markdownFile: { markdown, meta },\n } = data\n\n return <DocsRenderer markdown={markdown} meta={meta} />\n }}\n </Query>\n </div>\n )\n}\n\ninterface MetaData {\n title: string\n description: string\n tags: string[]\n version: string\n git: string\n}\n\nexport default AppDocs\n\n```" } ]
code_docs-ui_b067cc94
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/ComponentsGrid.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { useQuery } from 'react-apollo'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport ComponentGridItem from './components/ComponentGridItem'\nimport EmptyDocs from './components/EmptyDocs'\nimport { slug, removeFileExtension } from './modules'\nimport { IO_DOCUMENTATION } from './modules/constantExports'\nimport ComponentList from './graphql/componentsList.graphql'\n\nconst ComponentsGrid: FC = () => {\n const {\n route: { params },\n page,\n } = useRuntime()\n\n const useAppsDirectory = page === 'docs-ui.apps-list'\n\n const { data, error, loading } = useQuery<{\n componentsList: Record<\n string,\n Array<{\n appName: string\n file: string\n title: string\n description: string\n url: string\n }>\n >\n }>(ComponentList, {\n variables: {\n appName: IO_DOCUMENTATION,\n locale: 'en',\n useAppsDirectory,\n },\n })\n\n if (loading) return null\n\n if (error || !data) {\n return <EmptyDocs />\n }\n\n const [category] = params.category.split('-')\n const shouldShowAllComponents = category === 'all'\n\n const componentsListFromCategory = shouldShowAllComponents\n ? Object.keys(data.componentsList).flatMap(\n categoryName => data.componentsList[categoryName]\n )\n : data.componentsList[category]\n\n return (\n <div className=\"w-100 center\">\n <h1 className=\"t-heading-1 center mb6\">\n <FormattedMessage id={`docs-ui/components.${params.category}`} />\n </h1>\n <p className=\"t-body c-on-base center mb8 lh-copy\">\n <FormattedMessage\n id={`docs-ui/components.${params.category}-description`}\n />\n </p>\n <div className=\"flex flex-wrap\">\n {componentsListFromCategory?.map(component => {\n const hasTitleAndDescription =\n component && !!(component.appName && component.description)\n\n return (\n hasTitleAndDescription && (\n <div key={slug(component.title)} className=\"w-50 w-third-ns\">\n <ComponentGridItem\n title={component.title}\n description={component.description}\n link={`/docs/components/${params.category}/${\n component.appName\n }/${(component.file &&\n slug(removeFileExtension(component.file))) ||\n ''}`}\n />\n </div>\n )\n )\n })}\n </div>\n </div>\n )\n}\n\nexport default ComponentsGrid\n\n```" } ]
code_docs-ui_d59021ac
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/IntroductionArticle.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Query } from 'react-apollo'\nimport { ApolloError } from 'apollo-client'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport DocsRenderer from './components/DocsRenderer'\nimport Skeleton from './components/Skeleton'\nimport EmptyDocs from './components/EmptyDocs'\nimport { IO_DOCUMENTATION } from './modules/constantExports'\nimport { maybeAddMdExtension } from './modules'\nimport MarkdownFile from './graphql/markdownFile.graphql'\n\nconst IntroductionArticle: FC = () => {\n const {\n route: { params },\n } = useRuntime()\n\n return (\n <div className=\"w-100 center flex flex-column\">\n <Query\n query={MarkdownFile}\n variables={{\n appName: IO_DOCUMENTATION,\n fileName: `Introduction/${maybeAddMdExtension(params.article)}`,\n locale: 'en',\n }}>\n {({\n loading,\n error,\n data,\n }: {\n loading: boolean\n error?: ApolloError\n data: { markdownFile: { markdown: string; meta: MetaData } }\n }) => {\n if (loading) return <Skeleton />\n if (error) return <EmptyDocs />\n\n const {\n markdownFile: { markdown, meta },\n } = data\n\n return <DocsRenderer markdown={markdown} meta={meta} />\n }}\n </Query>\n </div>\n )\n}\n\ninterface MetaData {\n title: string\n description: string\n tags: string[]\n version: string\n git: string\n}\n\nexport default IntroductionArticle\n\n```" } ]
code_docs-ui_36e81af7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/Home.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage, useIntl } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\n\nimport { slug } from './modules'\nimport LatestFeatures from './components/LatestFeatures'\nimport Community from './components/Community'\nimport Recipes from './components/icons/Recipes'\nimport Components from './components/icons/Components'\nimport RightArrow from './components/icons/RightArrow'\nimport ProductImage from './images/product.png'\n\nconst Home: FC = () => {\n const intl = useIntl()\n\n return (\n <main className=\"w-100 w-70-ns\">\n <h1\n id={slug(intl.formatMessage({ id: 'docs-ui/build' }))}\n className=\"t-heading-1 w-90 w-100-ns mb6 c-on-base\"\n style={{\n maxWidth: '680px',\n }}>\n <FormattedMessage id=\"docs-ui/build\" />\n </h1>\n <p className=\"small c-on-base w-100 mb8 lh-copy\">\n <FormattedMessage id=\"docs-ui/build-description\" />\n </p>\n <div className=\"w-100 center\">\n <Link\n to=\"/docs/getting-started/build-stores-with-store-framework/1\"\n className=\"flex-l mb8 w-100 pointer dim no-underline\"\n style={{ height: '480px' }}>\n <div className=\"w-third-l w-100 pa6 bg-emphasis flex flex-column justify-end\">\n <span className=\"t-small c-on-emphasis\">\n <div className=\"ttu fw5 pb5\">\n <FormattedMessage id=\"docs-ui/getting-started\" />\n </div>\n </span>\n <h4 className=\"t-heading-2 mv1 w-90-l ttu c-on-emphasis\">\n <FormattedMessage id=\"docs-ui/create-stores\" />\n </h4>\n </div>\n <div\n className=\"w-two-thirds-l ph5-l h5 h-auto-l bg-base\"\n style={{\n background: `no-repeat center/100% url(${ProductImage})`,\n }}\n />\n </Link>\n <div className=\"mb8 flex flex-row-l flex-column justify-around bg-base\">\n <div className=\"mv6 mv0-l w-50-l flex\">\n <div className=\"c-on-base\" style={{ minWidth: '84px' }}>\n <Recipes />\n </div>\n <div className=\"ph5\">\n <p className=\"t-heading-3 c-on-base mt0\">\n <FormattedMessage id=\"docs-ui/recipes\" />\n </p>\n <p className=\"c-on-base lh-copy\">\n <FormattedMessage id=\"docs-ui/recipes-description\" />\n </p>\n <div className=\"flex items-center dim\">\n <Link\n to=\"/docs/recipes/all\"\n className=\"link no-underline c-emphasis\">\n <span className=\"mr5\">\n <FormattedMessage id=\"docs-ui/see-all\" />\n </span>\n <RightArrow />\n </Link>\n </div>\n </div>\n </div>\n <div className=\"mh3-l mv8 mv0-l w-50-l flex\">\n <div className=\"c-on-base\" style={{ minWidth: '84px' }}>\n <Components />\n </div>\n <div className=\"ph5\">\n <p className=\"t-heading-3 c-on-base mt0\">\n <FormattedMessage id=\"docs-ui/our-components\" />\n </p>\n <p className=\"c-on-base lh-copy\">\n <FormattedMessage id=\"docs-ui/our-components-description\" />\n </p>\n <div className=\"c-emphasis flex items-center dim\">\n <Link\n to=\"/docs/components/all\"\n className=\"link no-underline c-emphasis\">\n <span className=\"mr5\">\n <FormattedMessage id=\"docs-ui/see-all\" />\n </span>\n <RightArrow />\n </Link>\n </div>\n </div>\n </div>\n </div>\n <LatestFeatures />\n <Community />\n </div>\n </main>\n )\n}\n\nexport default Home\n\n```" } ]
code_docs-ui_b748fb0f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/Search.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, Fragment } from 'react'\nimport { useQuery } from 'react-apollo'\n\nimport RightArrow from './components/icons/RightArrow'\nimport searchEngine from './graphql/search.graphql'\nimport Skeleton from './components/Skeleton'\n\ninterface Props {\n query: {\n q: string\n }\n}\n\ninterface SearchQueryResult {\n searchEngine: SearchResult[]\n}\n\ninterface SearchResult {\n title: string\n snippet: string\n link: string\n}\n\nconst isNotLastResult = (results: SearchResult[], index: number) =>\n index !== results.length - 1\n\nconst isFirstResult = (index: number) => index === 0\n\nconst removeAppVersionFromSearchResult = (url: string) => {\n // https://regex101.com/r/gbllfu/1\n const versionRegex = /@[\\d.]+/g\n const containsAppVersion = versionRegex.test(url)\n\n return containsAppVersion ? url.replace(versionRegex, '') : url\n}\n\nconst Search: FC<Props> = ({ query }) => {\n const queryString = query.q || ''\n\n const { data, loading } = useQuery<SearchQueryResult>(searchEngine, {\n variables: { searchQuery: queryString },\n })\n\n const results = data?.searchEngine ?? []\n\n return (\n <Fragment>\n {!loading ? (\n queryString && (\n <div className=\"w-100 flex flex-column\">\n <h1 className=\"t-heading-3\">\n {results.length > 0\n ? `Results for \"${queryString}\"`\n : 'No results Found'}\n </h1>\n\n {results && (\n <ul className=\"w-70-ns list pl0\">\n {results.map((result: SearchResult, index: number) => (\n <li\n key={index}\n className={`${\n isFirstResult(index) ? '' : 'mv8'\n } searchResult ${\n isNotLastResult(results, index)\n ? 'searchResultBorder'\n : ''\n }`}>\n <h2\n className=\"t-heading-2 searchTitle\"\n style={{ wordBreak: 'break-word' }}>\n {result.title}\n </h2>\n <p className=\"t-body searchSnippet\">{result.snippet}</p>\n <a\n className={`link c-emphasis no-underline t-body ml-auto\n flex items-center dim`}\n href={removeAppVersionFromSearchResult(result.link)}>\n <div className=\"flex flex-column flex-row di\">\n <span>Read More</span>\n <div className=\"ml5\">\n <RightArrow />\n </div>\n </div>\n </a>\n </li>\n ))}\n </ul>\n )}\n </div>\n )\n ) : (\n <Skeleton />\n )}\n </Fragment>\n )\n}\n\nexport default Search\n\n```" } ]
code_docs-ui_f65ac786
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/ConceptList.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { useQuery } from 'react-apollo'\nimport { Link } from 'vtex.render-runtime'\n\nimport { IO_DOCUMENTATION } from './modules/constantExports'\nimport { slug } from './modules'\nimport ConceptListQuery from './graphql/conceptList.graphql'\nimport Skeleton from './components/Skeleton'\nimport UnderConstruction from './UnderConstruction'\nimport RightArrow from './components/icons/RightArrow'\n\ninterface Concept {\n title: string\n description: string\n path: string\n}\n\ninterface QueryResults {\n conceptList: Concept[]\n}\n\nfunction getShortResourcePath(path: string) {\n // the path will always be something like: dist/vtex.docs-graphql/<locale>/Concepts/<fileName>.md\n const PATH_PREFIX = 'dist/vtex.docs-graphql/Concepts/'\n // the <locale> section will always be one of 'en/', 'pt/', 'es/'\n const LOCALE_LENGTH = 3\n const FILE_EXTENSION = '.md'\n return path.substring(\n PATH_PREFIX.length + LOCALE_LENGTH,\n path.length - FILE_EXTENSION.length\n )\n}\n\nconst ConceptList: FC = () => {\n const { data, loading, error } = useQuery<QueryResults>(ConceptListQuery, {\n variables: {\n appName: IO_DOCUMENTATION,\n locale: 'en',\n },\n })\n\n if (loading) {\n return <Skeleton />\n }\n\n if (error || data?.conceptList.length === 0) {\n return <UnderConstruction />\n }\n\n return (\n <div>\n <h1 className=\"t-heading-1 mb6\">\n <FormattedMessage id=\"docs-ui/concepts\" />\n </h1>\n <p className=\"t-body c-on-base w-70-ns\">\n <FormattedMessage id=\"docs-ui/concepts-description\" />\n </p>\n <div>\n {data?.conceptList.map((concept: Concept) => (\n <article\n key={slug(concept.description)}\n className=\"flex flex-column justify-center w-70-l mv4 no-underline\">\n <h2 className=\"t-heading-4 mb3\">{concept.title}</h2>\n <Link\n to={`/docs/concepts/${getShortResourcePath(concept.path)}`}\n className=\"flex items-center mb5 c-emphasis link no-underline dim\">\n <span className=\"mr4\">\n <FormattedMessage id=\"docs-ui/read-more\" />\n </span>\n <RightArrow />\n </Link>\n </article>\n ))}\n </div>\n </div>\n )\n}\n\nexport default ConceptList\n\n```" } ]
code_docs-ui_499bb4ea
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/ReleaseNotes.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { useQuery } from 'react-apollo'\nimport { ButtonPlain } from 'vtex.styleguide'\nimport { FormattedMessage } from 'react-intl'\n\nimport releaseNotes from './graphql/releaseNotes.graphql'\n\ninterface ReleseNotesQuery {\n releaseNotes: {\n __typename: string\n edges: Array<{\n cursor: string\n node: {\n id: string\n title: string\n description: string\n date: string\n markdown: string\n }\n }>\n pageInfo: {\n hasPreviousPage: boolean\n hasNextPage: boolean\n startCursor: string\n endCursor: string\n }\n }\n}\n\nconst isNotLastResult = (results: any[], index: number) =>\n index !== results.length - 1\n\nconst ReleaseNotes: FC = () => {\n const { data, loading, fetchMore } = useQuery<ReleseNotesQuery>(\n releaseNotes,\n {\n fetchPolicy: 'cache-and-network',\n }\n )\n\n return (\n <section className=\"w-100 flex flex-column\">\n <h1 className=\"t-heading-3\">\n <FormattedMessage id=\"docs-ui/release-notes\" />\n </h1>\n\n <p className=\"c-on-base lh-copy\">\n <FormattedMessage id=\"docs-ui/release-notes-description\" />\n </p>\n\n <ul className=\"w-50-ns pl6 mt0\">\n {data?.releaseNotes?.edges.map((edge, index) => (\n <li\n key={edge.cursor}\n className={`${\n isNotLastResult(data!.releaseNotes.edges, index) || loading\n ? 'bb b--muted-4'\n : ''\n }`}>\n <a\n className={`link c-emphasis no-underline mv4 t-body ml-auto\n flex items-center dim`}\n href={`/docs/releases/${edge.node.id}/README`}>\n {edge.node.title.replace(\n /(VTEX IO Release Notes - |VTEX IO Highlights - )/,\n ''\n )}\n </a>\n </li>\n ))}\n {loading && <ListSkeleton />}\n </ul>\n\n {data?.releaseNotes?.pageInfo.hasNextPage && (\n <div className=\"mb6\">\n <ButtonPlain\n onClick={() => {\n const after =\n data?.releaseNotes?.edges[data?.releaseNotes?.edges.length - 1]\n .cursor\n fetchMore({\n variables: {\n after,\n },\n updateQuery: (prev, { fetchMoreResult }) => {\n const newEdges = fetchMoreResult!.releaseNotes!.edges\n const { pageInfo } = fetchMoreResult!.releaseNotes!\n\n return newEdges.length\n ? {\n releaseNotes: {\n __typename: prev.releaseNotes.__typename,\n edges: [...prev.releaseNotes.edges, ...newEdges],\n pageInfo,\n },\n }\n : prev\n },\n })\n }}>\n <FormattedMessage id=\"docs-ui/see-previous-releases\" />\n </ButtonPlain>\n </div>\n )}\n </section>\n )\n}\n\nfunction SkeletonLine({ big = false }) {\n return (\n <li className=\"bb b--muted-4\">\n <span className=\"dib bg-muted-3 o-60 t-body mv4 skeleton-shimmer transparent-text\">\n {big ? 'Week 00/0000' : 'Week 00&00/0000'}\n </span>\n </li>\n )\n}\n\nfunction ListSkeleton() {\n return (\n <>\n {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((_, index) => (\n <SkeletonLine key={index} big={!!(index % 2)} />\n ))}\n </>\n )\n}\n\nexport default ReleaseNotes\n\n```" } ]
code_docs-ui_ededb0b2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/RecipesList.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { graphql } from 'react-apollo'\nimport { ApolloError } from 'apollo-client'\nimport { branch, compose, renderComponent, renderNothing } from 'recompose'\nimport { withRuntimeContext, InjectedRuntime } from 'vtex.render-runtime'\n\nimport { IO_DOCUMENTATION } from './modules/constantExports'\nimport RecipeListItem from './components/RecipeListItem'\nimport EmptyDocs from './components/EmptyAppDocs'\nimport { slug } from './modules'\nimport RecipeList from './graphql/recipesList.graphql'\n\nconst RecipesList: FC<OuterProps & InjectedRuntime> = ({\n RecipeListQuery,\n runtime,\n}) => {\n const {\n route: {\n params: { category },\n },\n } = runtime\n\n return (\n <div>\n <h1 className=\"t-heading-1 mb6\">\n <FormattedMessage id={`docs-ui/recipes.${category}`} />\n </h1>\n <p className=\"t-body c-on-base w-70-ns\">\n <FormattedMessage id={`docs-ui/recipes.${category}-description`} />\n </p>\n <div>\n {RecipeListQuery.recipeList.map((recipe: Recipe) => (\n <RecipeListItem\n key={slug(recipe.description)}\n title={recipe.title}\n description={recipe.description}\n link={`/docs/recipes/${getShortRecipePath(recipe.path)}`}\n />\n ))}\n </div>\n </div>\n )\n}\n\nfunction getShortRecipePath(path: string) {\n // the path will always be something like: dist/vtex.docs-graphql/Recipes/<locale>/<category>/<fileName>.md\n const PATH_PREFIX = 'dist/vtex.docs-graphql/Recipes/'\n // the <locale> section will always be one of 'en/', 'pt/', 'es/'\n const LOCALE_LENGTH = 3\n const FILE_EXTENSION = '.md'\n return path.substring(\n PATH_PREFIX.length + LOCALE_LENGTH,\n path.length - FILE_EXTENSION.length\n )\n}\n\ninterface Recipe {\n title: string\n description: string\n path: string\n}\n\ninterface OuterProps {\n RecipeListQuery: {\n recipeList: Recipe[]\n loading: boolean\n error?: ApolloError\n }\n}\n\nexport default compose<any, any>(\n withRuntimeContext,\n graphql(RecipeList, {\n name: 'RecipeListQuery',\n options: (props: InjectedRuntime) => {\n const {\n route: {\n params: { category },\n },\n } = props.runtime\n const shouldFetchAllRecipes = category === 'all'\n\n return {\n variables: {\n category: shouldFetchAllRecipes ? '' : category,\n appName: IO_DOCUMENTATION,\n locale: 'en',\n },\n }\n },\n }),\n branch(\n ({ RecipeListQuery }: OuterProps) => RecipeListQuery.loading,\n renderNothing\n ),\n branch(\n ({ RecipeListQuery }: OuterProps) => !!RecipeListQuery.error,\n renderComponent(EmptyDocs)\n )\n)(RecipesList)\n\n```" } ]
code_docs-ui_196695d4
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/Concept.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Query } from 'react-apollo'\nimport { ApolloError } from 'apollo-client'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport { IO_DOCUMENTATION } from './modules/constantExports'\nimport DocsRenderer from './components/DocsRenderer'\nimport Skeleton from './components/Skeleton'\nimport EmptyDocs from './components/EmptyDocs'\nimport { maybeAddMdExtension } from './modules'\nimport MarkdownFile from './graphql/markdownFile.graphql'\n\nconst Concept: FC = () => {\n const {\n route: { params },\n } = useRuntime()\n\n return (\n <div className=\"w-100 center flex flex-column\">\n <Query\n query={MarkdownFile}\n variables={{\n appName: IO_DOCUMENTATION,\n fileName: `Concepts/${maybeAddMdExtension(params.concept)}`,\n locale: 'en',\n }}>\n {({\n loading,\n error,\n data,\n }: {\n loading: boolean\n error?: ApolloError\n data: { markdownFile: { markdown: string; meta: MetaData } }\n }) => {\n if (loading) return <Skeleton />\n if (error) return <EmptyDocs />\n\n const {\n markdownFile: { markdown, meta },\n } = data\n\n return <DocsRenderer markdown={markdown} meta={meta} />\n }}\n </Query>\n </div>\n )\n}\n\ninterface MetaData {\n title: string\n description: string\n tags: string[]\n version: string\n git: string\n}\n\nexport default Concept\n\n```" } ]
code_docs-ui_f5ce29ff
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/package.json from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"name\": \"vtex.docs-ui\",\n \"version\": \"2.1.5\",\n \"scripts\": {\n \"lint\": \"tsc --noEmit && eslint --ext ts,tsx .\",\n \"lint:locales\": \"intl-equalizer\",\n \"test\": \"vtex-test-tools test\"\n },\n \"dependencies\": {\n \"@types/ramda\": \"^0.26.38\",\n \"highlight.js\": \"^9.16.2\",\n \"ramda\": \"^0.26.1\",\n \"react-anchor-link-smooth-scroll\": \"^1.0.12\",\n \"react-ga\": \"^2.5.7\",\n \"react-markdown\": \"^4.1.0\",\n \"recompose\": \"^0.30.0\",\n \"remark-emoji\": \"^2.0.2\",\n \"slugify\": \"^1.3.4\"\n },\n \"devDependencies\": {\n \"@types/graphql\": \"^0.13.3\",\n \"@types/highlight.js\": \"^9.12.3\",\n \"@types/jest\": \"^25.2.1\",\n \"@types/node\": \"^9.4.7\",\n \"@types/react\": \"^16.3.16\",\n \"@types/react-dom\": \"^16.0.5\",\n \"@types/react-helmet\": \"^5.0.5\",\n \"@types/react-intl\": \"^2.3.5\",\n \"@types/recompose\": \"^0.30.6\",\n \"@vtex/intl-equalizer\": \"^2.3.0\",\n \"@vtex/test-tools\": \"^0.3.2\",\n \"graphql\": \"^0.13.0\",\n \"react\": \"^16.8.6\",\n \"react-apollo\": \"^3.1.3\",\n \"react-dom\": \"^16.8.6\",\n \"react-intl\": \"^3.0.0\",\n \"typescript\": \"3.8.3\"\n }\n}\n\n```" } ]
code_docs-ui_86bc11d7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/ReleaseArticle.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Query } from 'react-apollo'\nimport { ApolloError } from 'apollo-client'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport DocsRenderer from './components/DocsRenderer'\nimport Skeleton from './components/Skeleton'\nimport EmptyDocs from './components/EmptyDocs'\nimport { maybeAddMdExtension } from './modules'\nimport MarkdownFile from './graphql/markdownFile.graphql'\n\nconst ReleaseArticle: FC = () => {\n const {\n route: { params },\n } = useRuntime()\n\n return (\n <div className=\"w-100 center flex flex-column\">\n <Query\n query={MarkdownFile}\n variables={{\n appName: 'vtex.io-release-notes@0.x',\n fileName: `${params.week}/${maybeAddMdExtension(params.article)}`,\n }}>\n {({\n loading,\n error,\n data,\n }: {\n loading: boolean\n error?: ApolloError\n data: { markdownFile: { markdown: string; meta: MetaData } }\n }) => {\n if (loading) return <Skeleton />\n if (error) return <EmptyDocs />\n\n const {\n markdownFile: { markdown, meta },\n } = data\n\n return <DocsRenderer markdown={markdown} meta={meta} />\n }}\n </Query>\n </div>\n )\n}\n\ninterface MetaData {\n title: string\n description: string\n tags: string[]\n version: string\n git: string\n}\n\nexport default ReleaseArticle\n\n```" } ]
code_docs-ui_1e6cdb73
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/styles.global.css from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n/* Skeleton animation */\n@keyframes shimmer-anim {\n 0% {\n transform: translate3d(0, 0, 0);\n }\n\n 100% {\n transform: translate3d(50%, 0, 0);\n }\n}\n\n/* Limits the page width */\n.wrapper {\n margin: 0 auto;\n max-width: 1100px;\n padding: 0 20px;\n}\n\n@media only screen and (min-width: 1500px) {\n .wrapper {\n max-width: 1400px;\n }\n}\n\n/* Makes the header fixed */\n.navPusher {\n left: 0;\n min-height: 100%;\n padding-top: 56px;\n position: relative;\n z-index: 99;\n}\n\n@media screen and (min-width: 1024px) {\n .navPusher {\n display: flex;\n flex-direction: column;\n min-height: calc(100vh - 56px);\n padding-top: 56px;\n }\n\n .navPusher,\n .navPusher > :first-child {\n flex-grow: 1;\n }\n}\n\n/* Sidebar */\n@media only screen and (min-width: 1024px) {\n .docsNavContainer {\n flex: 0 0 240px;\n height: calc(100vh - 50px);\n position: -webkit-sticky;\n position: sticky;\n overflow-y: auto;\n top: 50px;\n }\n}\n\n.t-body {\n line-height: 24px;\n}\n\n/* Main content */\n.mainContainer {\n flex: 1 1 0%;\n max-width: 100%;\n}\n\n.mainContainer h1:first-of-type {\n margin-top: 0;\n margin-bottom: 16px;\n}\n\n/* On Page Nav */\n@media only screen and (min-width: 1024px) {\n .onPageNav {\n align-self: flex-start;\n display: block;\n flex: 0 0 240px;\n max-height: calc(100vh - 90px);\n overflow-y: auto;\n position: -webkit-sticky;\n position: sticky;\n top: 90px;\n }\n}\n\n.shimmer {\n width: 200%;\n height: 100%;\n position: absolute;\n top: 0;\n left: -100%;\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.35),\n rgba(255, 255, 255, 0)\n );\n background-size: 50% 100%;\n animation: shimmer-anim 0.7s linear infinite;\n}\n\n/* end Skeleton animation */\n\n.alert-info {\n background-color: #edf4fa;\n border-color: rgb(54, 141, 247);\n border-radius: 4px;\n border-width: 0px 0px 0px 4px;\n border-style: solid;\n box-sizing: border-box;\n padding: 20px 16px;\n margin-bottom: 1rem;\n color: #0e4180;\n line-height: 1.5rem;\n}\n\n.alert-info a {\n color: #f71963;\n}\n\n.alert-info code {\n font-size: 0.9rem;\n background-color: #b6d7ff;\n padding: 4px 6px;\n border-radius: 5px;\n}\n\n.alert-warning {\n background-color: #fff6e0;\n border-color: rgb(255, 177, 0);\n border-radius: 4px;\n border-width: 0px 0px 0px 4px;\n border-style: solid;\n box-sizing: border-box;\n padding: 20px 16px;\n margin-bottom: 1rem;\n color: #804a0e;\n line-height: 1.5rem;\n}\n\n.alert-warning code {\n font-size: 0.9rem;\n background-color: #ffdd91;\n padding: 4px 6px;\n border-radius: 5px;\n}\n\n.alert-warning a {\n color: #f71963;\n}\n\n.alert-danger {\n background-color: #ffe6e6;\n border-color: rgb(255, 76, 76);\n border-radius: 4px;\n border-width: 0px 0px 0px 4px;\n border-style: solid;\n box-sizing: border-box;\n padding: 12px 16px;\n margin-bottom: 1rem;\n}\n\n.alert-danger a {\n color: #f71963;\n}\n\n.transparent-text {\n color: transparent;\n}\n\n.searchResult {\n padding-bottom: 35px;\n line-height: 150%;\n}\n\n.searchResultBorder {\n border-bottom: 1px solid #cacbcc;\n}\n\n.searchTitle {\n line-height: 150%;\n}\n\n.searchSnippet {\n color: #797979;\n letter-spacing: 0.015em;\n}\n\n/* Base16 Atelier Sulphurpool Light - Theme */\n/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */\n/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */\n\n/* Atelier-Sulphurpool Comment */\n.hljs-comment,\n.hljs-quote {\n color: #6b7394;\n}\n\n/* Atelier-Sulphurpool Red */\n.hljs-variable,\n.hljs-template-variable,\n.hljs-attribute,\n.hljs-tag,\n.hljs-name,\n.hljs-regexp,\n.hljs-link,\n.hljs-name,\n.hljs-selector-id,\n.hljs-selector-class {\n color: #c94922;\n}\n\n/* Atelier-Sulphurpool Orange */\n.hljs-number,\n.hljs-meta,\n.hljs-built_in,\n.hljs-builtin-name,\n.hljs-literal,\n.hljs-type,\n.hljs-params {\n color: #c76b29;\n}\n\n/* Atelier-Sulphurpool Green */\n.hljs-string,\n.hljs-symbol,\n.hljs-bullet {\n color: #ac9739;\n}\n\n/* Atelier-Sulphurpool Blue */\n.hljs-title,\n.hljs-section {\n color: #3d8fd1;\n}\n\n/* Atelier-Sulphurpool Purple */\n.hljs-keyword,\n.hljs-selector-tag {\n color: #6679cc;\n}\n\n.hljs {\n display: block;\n overflow-x: auto;\n background: #f5f7ff;\n color: #5e6687;\n padding: 1em;\n font-size: 0.9rem;\n border-radius: 4px;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n\n.hljs-addition {\n background: #dfd;\n}\n\n.hljs-deletion {\n background: #fdd;\n}\n\n```" } ]
code_docs-ui_bf04c329
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/UnderConstruction.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { EmptyState } from 'vtex.styleguide'\n\nconst UnderConstruction: FC = () => (\n <div className=\"min-vh-100 w-100 flex justify-center items-center\">\n <EmptyState title=\"Under Construction\">\n <p>This page is still being developed.</p>\n <p>Come back in a bit and something awesome should be here!</p>\n </EmptyState>\n </div>\n)\n\nexport default UnderConstruction\n\n```" } ]
code_docs-ui_c639fc61
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/Recipe.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { Query } from 'react-apollo'\nimport { ApolloError } from 'apollo-client'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport DocsRenderer from './components/DocsRenderer'\nimport Skeleton from './components/Skeleton'\nimport EmptyDocs from './components/EmptyDocs'\nimport { IO_DOCUMENTATION } from './modules/constantExports'\nimport { maybeAddMdExtension } from './modules'\nimport MarkdownFile from './graphql/markdownFile.graphql'\n\nconst Recipe: FC = () => {\n const {\n route: { params },\n } = useRuntime()\n\n return (\n <div className=\"w-100 center flex flex-column\">\n <Query\n query={MarkdownFile}\n variables={{\n appName: IO_DOCUMENTATION,\n fileName: `Recipes/${params.category}/${maybeAddMdExtension(\n params.recipe\n )}`,\n locale: 'en',\n }}>\n {({\n loading,\n error,\n data,\n }: {\n loading: boolean\n error?: ApolloError\n data: { markdownFile: { markdown: string; meta: MetaData } }\n }) => {\n if (loading) return <Skeleton />\n if (error) return <EmptyDocs />\n\n const {\n markdownFile: { markdown, meta },\n } = data\n\n return <DocsRenderer markdown={markdown} meta={meta} />\n }}\n </Query>\n </div>\n )\n}\n\ninterface MetaData {\n title: string\n description: string\n tags: string[]\n version: string\n git: string\n}\n\nexport default Recipe\n\n```" } ]
code_docs-ui_a8ab6680
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/PageLayoutContainer.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { Fragment, FC } from 'react'\nimport { Helmet } from 'vtex.render-runtime'\n\nimport Footer from './components/Footer'\nimport TopNav from './components/TopNav'\nimport favicon from './images/favicon.png'\nimport SideBar from './components/SideBar'\nimport PageView from './components/PageView'\nimport { EnhancedAppVersionProvider } from './components/AppVersionContext'\nimport { EnhancedSideBarContentProvider } from './components/SideBarContext'\n\nconst PageLayoutContainer: FC = ({ children }) => (\n <Fragment>\n <Helmet>\n <title>VTEX IO Docs</title>\n <meta name=\"theme-color\" content=\"#F71963\" />\n <meta name=\"description\" content=\"Documentation on VTEX IO\" />\n <link rel=\"icon\" href={favicon} />\n <meta\n name=\"google-site-verification\"\n content=\"ZY7HyfLauXkjLwWBR75Ff2YSVYbosRZuuk4mFk4wjig\"\n />\n </Helmet>\n <EnhancedSideBarContentProvider>\n <TopNav />\n <PageView />\n <div className=\"navPusher\">\n <div className=\"wrapper w-100 flex\">\n <div className=\"docsNavContainer\" style={{ maxWidth: '280px' }}>\n <SideBar />\n </div>\n <div\n className=\"mainContainer pt7 pl8-l\"\n style={{ scrollBehavior: 'smooth' }}>\n <main className=\"flex\">\n <EnhancedAppVersionProvider>\n {children}\n </EnhancedAppVersionProvider>\n </main>\n </div>\n </div>\n <Footer />\n </div>\n </EnhancedSideBarContentProvider>\n </Fragment>\n)\n\nexport default PageLayoutContainer\n\n```" } ]
code_docs-ui_fa731801
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/styles/configs/style.json from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"typeScale\": [3, 2.25, 1.5, 1.25, 1, 0.875, 0.75],\n \"spacing\": [0.125, 0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4, 8, 16],\n \"customMedia\": [\n {\n \"s\": 20\n },\n {\n \"ns\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"m\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"l\": {\n \"value\": 64,\n \"minWidth\": true\n }\n },\n {\n \"xl\": {\n \"value\": 80,\n \"minWidth\": true\n }\n }\n ],\n \"colors\": {\n \"black-90\": \"rgba(0,0,0,.9)\",\n \"black-80\": \"rgba(0,0,0,.8)\",\n \"black-70\": \"rgba(0,0,0,.7)\",\n \"black-60\": \"rgba(0,0,0,.6)\",\n \"black-50\": \"rgba(0,0,0,.5)\",\n \"black-40\": \"rgba(0,0,0,.4)\",\n \"black-30\": \"rgba(0,0,0,.3)\",\n \"black-20\": \"rgba(0,0,0,.2)\",\n \"black-10\": \"rgba(0,0,0,.1)\",\n \"black-05\": \"rgba(0,0,0,.05)\",\n \"black-025\": \"rgba(0,0,0,.025)\",\n \"black-0125\": \"rgba(0,0,0,.0125)\",\n \"white-90\": \"rgba(255,255,255,.9)\",\n \"white-80\": \"rgba(255,255,255,.8)\",\n \"white-70\": \"rgba(255,255,255,.7)\",\n \"white-60\": \"rgba(255,255,255,.6)\",\n \"white-50\": \"rgba(255,255,255,.5)\",\n \"white-40\": \"rgba(255,255,255,.4)\",\n \"white-30\": \"rgba(255,255,255,.3)\",\n \"white-20\": \"rgba(255,255,255,.2)\",\n \"white-10\": \"rgba(255,255,255,.1)\",\n \"white-05\": \"rgba(255,255,255,.05)\",\n \"white-025\": \"rgba(255,255,255,.025)\",\n \"white-0125\": \"rgba(255,255,255,.0125)\"\n },\n \"semanticColors\": {\n \"background\": {\n \"base\": \"#ffffff\",\n \"base--inverted\": \"#142032\",\n \"action-primary\": \"#f71963\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#f2f4f5\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-background\": {\n \"action-primary\": \"#dd1659\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-background\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"text\": {\n \"action-primary\": \"#134cd8\",\n \"action-secondary\": \"#eef3f7\",\n \"link\": \"#f71963\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#979899\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#142032\",\n \"muted-2\": \"#727273\",\n \"muted-3\": \"#979899\",\n \"muted-4\": \"#cacbcc\",\n \"muted-5\": \"#e3e4e6\"\n },\n \"visited-text\": {\n \"link\": \"#0c389f\"\n },\n \"hover-text\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"active-text\": {\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"border\": {\n \"action-primary\": \"#f71963\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#e3e4e6\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-border\": {\n \"action-primary\": \"#dd1659\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-border\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"on\": {\n \"base\": \"#3f3f40\",\n \"base--inverted\": \"#ffffff\",\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#134cd8\",\n \"emphasis\": \"#ffffff\",\n \"disabled\": \"#979899\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\",\n \"muted-1\": \"#ffffff\",\n \"muted-2\": \"#ffffff\",\n \"muted-3\": \"#3f3f40\",\n \"muted-4\": \"#3f3f40\",\n \"muted-5\": \"#3f3f40\"\n },\n \"hover-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#134cd8\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n },\n \"active-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#134cd8\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n }\n },\n \"borderWidths\": [0, 0.125, 0.25, 0.5, 1, 2],\n \"borderRadius\": [0, 0.125, 0.25, 0.5, 1],\n \"widths\": [1, 2, 4, 8, 16],\n \"maxWidths\": [1, 2, 4, 8, 16, 32, 48, 64, 96],\n \"heights\": [1, 2, 4, 8, 16],\n \"sizes\": [\n {\n \"name\": \"small\",\n \"value\": 2\n },\n {\n \"name\": \"regular\",\n \"value\": 2.5\n },\n {\n \"name\": \"large\",\n \"value\": 3\n }\n ],\n \"typography\": {\n \"measure\": [30, 34, 20],\n \"styles\": {\n \"heading-1\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"2rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-2\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-3\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.5rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-4\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-5\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-6\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"600\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"body\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"400\",\n \"fontSize\": \"16px\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"normal\"\n },\n \"small\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"400\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"mini\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"action\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--small\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--large\": {\n \"fontFamily\": \"-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"code\": {\n \"fontFamily\": \"Consolas, monaco, monospace\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.9rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n }\n }\n },\n \"opacity\": [1, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.05, 0.025, 0]\n}\n\n```" } ]
code_docs-ui_40fc412c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/__fixtures__/markdowns.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const markdownWithOneIgnoredSection = [\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n // ==========================================\n // <!-- DOCS-IGNORE:start -->\n {\n key: 'html-150-1-43',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:start -->',\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'html-174-1-54',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:end -->',\n },\n },\n // <!-- DOCS-IGNORE:end -->\n // ==========================================\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n]\n\nexport const markdownWithoutIgnoredSection = [\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n]\n\nexport const markdownWithMultipleIgnoredSections = [\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n // ==========================================\n // <!-- DOCS-IGNORE:start -->\n {\n key: 'html-150-1-43',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:start -->',\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'html-174-1-54',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:end -->',\n },\n },\n // <!-- DOCS-IGNORE:end -->\n // ==========================================\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n // ==========================================\n // <!-- DOCS-IGNORE:start -->\n {\n key: 'html-150-1-43',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:start -->',\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'html-174-1-54',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:end -->',\n },\n },\n // <!-- DOCS-IGNORE:end -->\n // ==========================================\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n]\n\nexport const markdownWithExtraIgnoreStartToken = [\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n // ==========================================\n // <!-- DOCS-IGNORE:start -->\n {\n key: 'html-150-1-43',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:start -->',\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'html-174-1-54',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:end -->',\n },\n },\n // <!-- DOCS-IGNORE:end -->\n // ==========================================\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n // ==========================================\n // <!-- DOCS-IGNORE:start -->\n {\n key: 'html-150-1-43',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:start -->',\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'html-174-1-54',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:end -->',\n },\n },\n // <!-- DOCS-IGNORE:end -->\n // ==========================================\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n // ==========================================\n // <!-- DOCS-IGNORE:start -->\n {\n key: 'html-150-1-43',\n props: {\n children: undefined,\n escapeHtml: false,\n isBlock: false,\n skipHtml: false,\n value: '<!-- DOCS-IGNORE:start -->',\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n {\n key: 'heading-1-1-0',\n props: {\n children: [\n {\n key: 'text-1-3-0',\n props: {\n children: 'VTEX Store Components',\n nodeKey: 'text-1-3-0',\n value: 'VTEX Store Components',\n },\n },\n ],\n level: 1,\n },\n },\n]\n\n```" } ]
code_docs-ui_1bcfa5f3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/jpg.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.jpg' {\n const path: string\n export default path\n}\n\n```" } ]
code_docs-ui_e0548e30
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/react-syntax-highlighter-prism.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'react-syntax-highlighter/dist/styles/prism'\n\n```" } ]
code_docs-ui_3421e6be
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/png.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.png' {\n const path: string\n export default path\n}\n\n```" } ]
code_docs-ui_16ef4b60
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/vtex.render-runtime.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\n/* eslint @typescript-eslint/no-explicit-any: 0 */\n/* Typings for `render-runtime` */\ndeclare module 'vtex.render-runtime' {\n import { Component, ReactElement } from 'react'\n\n export interface RenderContextProps {\n runtime: {\n account: string\n }\n }\n\n export interface InjectedRuntime {\n runtime: RenderRuntime\n }\n\n interface Pages {\n [name: string]: Page\n }\n\n interface Route {\n domain: string\n blockId: string\n canonicalPath?: string\n id: string\n params: Record<string, string>\n path: string\n title?: string\n }\n\n interface Culture {\n availableLocales: string[]\n locale: string\n language: string\n country: string\n currency: string\n }\n\n export interface RenderRuntime {\n account: string\n accountId: string\n appsEtag: string\n workspace: string\n disableSSR: boolean\n hints: {\n desktop: boolean\n mobile: boolean\n phone: boolean\n tablet: boolean\n }\n page: string\n route: Route\n version: string\n culture: Culture\n pages: Pages\n preview: boolean\n production: boolean\n publicEndpoint: string\n renderMajor: number\n query: {\n q?: string\n }\n start: boolean\n runtimeMeta: {\n version: string\n config?: any\n }\n settings: {\n [app: string]: any\n }\n segmentToken: string\n rootPath?: string\n workspaceCookie: string\n hasNewExtensions: boolean\n navigate: any\n }\n\n export const Link: any\n export const NoSSR: any\n export const RenderContextConsumer: ReactElement\n export const canUseDOM: boolean\n export const withRuntimeContext: any\n export const Helmet: any\n export const useRuntime: () => RenderRuntime\n}\n\n```" } ]
code_docs-ui_593d7f2f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/svg.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.svg' {\n const path: string\n export default path\n}\n\n```" } ]
code_docs-ui_7c9b01a3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/css.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.css' {\n interface Style {\n [key: string]: string\n }\n const style: Style\n export default style\n}\n\n```" } ]
code_docs-ui_fe8d272f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/graphql.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module '*.graphql' {\n import { DocumentNode } from 'graphql'\n\n const value: DocumentNode\n export default value\n}\n\n```" } ]
code_docs-ui_7c8394b9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/typings/vtex.styleguide.d.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\ndeclare module 'vtex.styleguide' {\n export const Alert\n export const Button\n export const ButtonWithIcon\n export const ButtonPlain\n export const PageBlock\n export const IconCaretDown\n export const IconCaretUp\n export const IconCaretRight\n export const IconBars\n export const IconCheck\n export const IconDeny\n export const Spinner\n export const EmptyState\n export const Card\n export const Dropdown\n export const Link\n export const InputSearch\n export const IconSearch\n}\n\n```" } ]
code_docs-ui_ccb9e390
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/EmptyAppDocs.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { EmptyState } from 'vtex.styleguide'\nimport { FormattedMessage } from 'react-intl'\n\nconst EmptyDocs: FC = () => (\n <div className=\"pa10 w-100 flex justify-center\">\n <EmptyState title=\"Sorry\">\n <p>\n <FormattedMessage id=\"docs-ui/empty-docs\" />\n </p>\n </EmptyState>\n </div>\n)\n\nexport default EmptyDocs\n\n```" } ]
code_docs-ui_e02a5091
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/EmptyDocs.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage, useIntl } from 'react-intl'\nimport { EmptyState } from 'vtex.styleguide'\n\nconst EmptyDocs: FC = () => {\n const intl = useIntl()\n\n return (\n <div className=\"pa7 w-100 flex justify-center\">\n <EmptyState title={intl.formatMessage({ id: 'docs-ui/empty.title' })}>\n <p>\n <FormattedMessage id=\"docs-ui/empty-docs\" />\n </p>\n </EmptyState>\n </div>\n )\n}\n\nexport default EmptyDocs\n\n```" } ]
code_docs-ui_73d3063e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/LatestFeatures.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, Fragment } from 'react'\nimport { useQuery } from 'react-apollo'\nimport { FormattedMessage, useIntl } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\n\nimport { slug } from '../modules'\nimport RightArrow from './icons/RightArrow'\nimport Skeleton from './Skeleton'\nimport LatestFeaturesQuery from '../graphql/storeFrameworkLatestFeatures.graphql'\n\ninterface LatestFeaturesQueryI {\n storeFrameworkLatestFeatures: LatestFeatureArticle[]\n}\n\nconst LatestFeatures: FC = () => {\n const intl = useIntl()\n const { data, loading, error } = useQuery<LatestFeaturesQueryI>(\n LatestFeaturesQuery\n )\n\n return (\n <section className=\"mv9\">\n <h2\n id={slug(intl.formatMessage({ id: 'docs-ui/latest-features' }))}\n className=\"t-heading-2 c-on-base mv4\">\n <FormattedMessage id=\"docs-ui/latest-features\" />\n </h2>\n <p className=\"c-on-base lh-copy\">\n <FormattedMessage id=\"docs-ui/latest-features-description\" />\n </p>\n <div className=\"list ml0 w-100\">\n {loading ? (\n <Skeleton />\n ) : error ? (\n <></>\n ) : (\n <Fragment>\n {data!.storeFrameworkLatestFeatures.map(\n item =>\n item.title && (\n <Link\n key={item.title}\n to={`/docs/releases/${getFileFromPath(item.path)}`}\n className=\"no-underline\">\n <h4 className=\"t-heading-4 c-on-base mv2 dim pv6 items-center bl b--muted-3 pl5\">\n {item.title}\n </h4>\n </Link>\n )\n )}\n </Fragment>\n )}\n </div>\n <div className=\"flex items-center mv5\">\n <Link\n page=\"docs-ui.release-notes\"\n className=\"link no-underline c-emphasis mv5 dim\">\n <span className=\"mr5\">\n <FormattedMessage id=\"docs-ui/see-previous-releases\" />\n </span>\n <RightArrow />\n </Link>\n </div>\n </section>\n )\n}\n\nfunction getFileFromPath(path: string) {\n const PATH_PREFIX = 'dist/vtex.docs-graphql/'\n const FILE_EXTENSION = '.md'\n return path.substring(PATH_PREFIX.length, path.length - FILE_EXTENSION.length)\n}\n\ninterface LatestFeatureArticle {\n title: string\n description: string\n path: string\n}\n\nexport default LatestFeatures\n\n```" } ]
code_docs-ui_472ec698
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/RecipeListItem.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\n\nimport RightArrow from './icons/RightArrow'\n\ninterface Props {\n title: string\n icon?: string\n description: string\n link: string\n}\n\nconst RecipeListItem: FC<Props> = ({ title, description, link }) => (\n <article className=\"flex flex-column justify-center w-70-l mv4 no-underline\">\n <h2 className=\"t-heading-2 mb2\">{title}</h2>\n <p className=\"t-body c-on-base mb4\">{description}</p>\n <Link\n to={link}\n className=\"flex items-center mb5 c-emphasis link no-underline dim\">\n <span className=\"mr4\">\n <FormattedMessage id=\"docs-ui/read-more\" />\n </span>\n <RightArrow />\n </Link>\n </article>\n)\n\nexport default RecipeListItem\n\n```" } ]
code_docs-ui_e6a68362
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/Community.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage, useIntl } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\n\nimport { slug } from '../modules'\nimport CommunityIcon from './icons/CommunityIcon'\n\nconst Community: FC = () => {\n const intl = useIntl()\n\n return (\n <section className=\"mv9\">\n <h2\n id={slug(intl.formatMessage({ id: 'docs-ui/community-help' }))}\n className=\"t-heading-2 c-on-base\">\n <FormattedMessage id=\"docs-ui/community-help\" />\n </h2>\n <Link\n target=\"_blank\"\n href=\"https://github.com/vtex-apps/store-discussion\"\n className=\"link no-underline pointer\">\n <div className=\"flex items-center\">\n <div style={{ minWidth: '84px' }}>\n <CommunityIcon />\n </div>\n <div className=\"ml6\">\n <h4 className=\"t-heading-4 c-on-base mt0 mb3 dim\">\n <FormattedMessage id=\"docs-ui/community-join\" />\n </h4>\n <p className=\"t-body c-on-base lh-copy mv0\">\n <FormattedMessage id=\"docs-ui/community-description\" />\n </p>\n </div>\n </div>\n </Link>\n </section>\n )\n}\n\nexport default Community\n\n```" } ]
code_docs-ui_c5c8f000
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/SearchBar.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, useState } from 'react'\nimport { useRuntime } from 'vtex.render-runtime'\nimport { InputSearch } from 'vtex.styleguide'\n\nconst SearchBar: FC = () => {\n const {\n navigate,\n query: { q: queryString },\n } = useRuntime()\n\n const [inputString, setInputString] = useState(queryString ?? '')\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault()\n if (inputString !== '') {\n navigate({\n page: 'docs-ui.search',\n query: `q=${inputString}`,\n fetchPage: true,\n })\n }\n }\n\n return (\n <div className=\"flex items-center\">\n <form onSubmit={(e: React.FormEvent) => handleSubmit(e)}>\n <InputSearch\n placeholder=\"Search IO Docs...\"\n value={inputString}\n onChange={(e: {\n target: { value: React.SetStateAction<string> }\n }) => {\n setInputString(e.target.value)\n }}\n onSubmit={(e: React.FormEvent) => handleSubmit(e)}\n size=\"small\"\n />\n </form>\n </div>\n )\n}\n\nexport default SearchBar\n\n```" } ]
code_docs-ui_5f207e90
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/CustomTags.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\n/* eslint-disable react/display-name */\n/* eslint @typescript-eslint/no-explicit-any: 0 */\nimport React, { Fragment } from 'react'\nimport { useRuntime } from 'vtex.render-runtime'\nimport { useDevice } from 'vtex.device-detector'\nimport { Link } from 'vtex.styleguide'\n\nimport ArticleNav from './ArticleNav'\nimport { slug } from '../modules'\nimport {\n findDocsIgnoreNodes,\n removeIgnoredNodesFromDocs,\n} from '../modules/ignoreTokens'\nimport CodeBlock from './CodeBlock'\n\nexport const CustomRenderers = {\n root: ({ children }: { children: any[] }) => {\n /* eslint-disable react-hooks/rules-of-hooks */\n const { isMobile } = useDevice()\n const { start, end } = findDocsIgnoreNodes(children)\n\n const childrenWithoutIgnoredNodes = removeIgnoredNodesFromDocs(\n start,\n end,\n children\n )\n\n if (isMobile) {\n return (\n <div className=\"flex flex-column center\" style={{ maxWidth: '95vw' }}>\n {childrenWithoutIgnoredNodes}\n </div>\n )\n }\n\n const TOCLines = childrenWithoutIgnoredNodes.reduce(\n (acc: string[], { key, props }: any) => {\n // Skip non-headings and only use H2s\n if (key.indexOf('heading') !== 0 || props.level !== 2) {\n return acc\n }\n\n const { value } = props.children[0].props\n return value ? acc.concat([`${value}`]) : acc\n },\n []\n )\n\n return (\n <div className=\"flex justify-between\">\n <div className=\"flex flex-column w-80-l\" style={{ maxWidth: '680px' }}>\n {childrenWithoutIgnoredNodes}\n </div>\n {TOCLines.length > 0 && (\n <div\n className=\"sticky h-50 bl b--muted-3 pl5\"\n style={{ top: '82px', width: '240px' }}>\n <ArticleNav headings={TOCLines} />\n </div>\n )}\n </div>\n )\n },\n break: () => <br />,\n code: CodeBlock,\n emphasis: (props: any) => <em className=\"i\">{props.children}</em>,\n heading: (props: any) => {\n const hashId = getHeadingSlug(props.children)\n const { app } = useRuntime().route.params\n const vendor = app?.split('.')[0]\n\n switch (props.level) {\n case 1:\n return (\n <Fragment>\n <h1\n id={hashId}\n className={`t-heading-1 c-on-base mt7 ${\n vendor !== 'vtex' ? 'mb3' : 'mb7'\n }`}>\n {props.children}\n </h1>\n {vendor && vendor !== 'vtex' ? (\n <p className=\"t-small c-on-base mt0 lh-copy mb6\">\n This application was created by: <strong>{vendor}</strong>\n </p>\n ) : null}\n </Fragment>\n )\n\n case 2:\n return (\n <h2 id={hashId} className=\"t-heading-2 mt4 mb5 c-on-base\">\n {props.children}\n </h2>\n )\n\n case 3:\n return (\n <h3 id={hashId} className=\"t-heading-3 mt7 c-on-base\">\n {props.children}\n </h3>\n )\n\n case 4:\n return (\n <h4 id={hashId} className=\"t-heading-4 mt7 c-on-base\">\n {props.children}\n </h4>\n )\n\n case 5:\n return (\n <h5 id={hashId} className=\"t-heading-5 mt5 mb5 c-on-base lh-copy\">\n {props.children}\n </h5>\n )\n\n case 6:\n return (\n <h6 id={hashId} className=\"t-heading-6 c-on-base mv5 lh-copy\">\n {props.children}\n </h6>\n )\n default:\n return <p className=\"c-on-base lh-copy\">{props.children}</p>\n }\n },\n image: (props: any) => (\n <div className=\"mh0\">\n <img className=\"shadow-4\" src={props.src} alt={props.alt} />\n </div>\n ),\n inlineCode: (props: any) => (\n <span\n className=\"pv1 ph2 mw6 br2 bg-muted-5 ba b--muted-3 t-code c-emphasis\"\n style={{ wordWrap: 'break-word' }}>\n {props.value}\n </span>\n ),\n link: (props: any) => {\n /* eslint-disable react-hooks/rules-of-hooks */\n const { route } = useRuntime()\n\n const isIdLink = !!props.href && props.href[0] === '#'\n const isRelativeLink = !!props.href && props.href[0] === '/'\n\n if (isIdLink && !!props.href) {\n return (\n <Link to={props.href.toLowerCase()} className=\"dim\">\n {props.children}\n </Link>\n )\n }\n\n if (isRelativeLink) {\n return (\n <Link to={`/docs/${route.params.app}${props.href}`} className=\"dim\">\n {props.children}\n </Link>\n )\n }\n\n return (\n <Link href={props.href} className=\"dim\">\n {props.children}\n </Link>\n )\n },\n list: (props: any) => {\n if (props.ordered) {\n return (\n <ol\n start={props.start}\n className=\"t-body c-on-base mt0 mb6 pl6 lh-copy\">\n {props.children}\n </ol>\n )\n }\n\n return (\n <ul className=\"t-body c-on-base mt0 mb6 pl6 lh-copy\">{props.children}</ul>\n )\n },\n listItem: (props: any) => (\n <li className=\"t-body c-on-base mb4 mt0 lh-copy\">{props.children}</li>\n ),\n paragraph: (props: any) => {\n if (props.children === '' || props.children.length === 0) return null\n return <p className=\"t-body c-on-base mt0 lh-copy mb6\">{props.children}</p>\n },\n strong: (props: any) => <strong className=\"fw7\">{props.children}</strong>,\n table: (props: any) => (\n <div className=\"overflow-x-auto\">\n <table\n style={{ borderSpacing: '0', borderCollapse: 'collapse' }}\n className=\"w-100 center mv7 bb b--gray\">\n {props.children}\n </table>\n </div>\n ),\n tableCell: (props: any) => {\n if (props.isHeader) {\n return (\n <th className=\"t-body fw5 c-muted-1 bb bw1 pa2 pb3 b--muted-3 tl\">\n {props.children}\n </th>\n )\n }\n\n return (\n <td className=\"t-body pa5 lh-copy\" style={{ minWidth: '10rem' }}>\n {props.children}\n </td>\n )\n },\n tableRow: (props: any) => (\n <tr className=\"bb b--muted-3 lh-copy\">{props.children}</tr>\n ),\n thematicBreak: () => <hr className=\"mv7\" />,\n}\n\nfunction getHeadingSlug(childNodes: any) {\n return (\n (childNodes[0].props.children && slug(childNodes[0].props.children)) || ''\n )\n}\n\n```" } ]
code_docs-ui_d52a90a7
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/PageView.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { FC, useEffect } from 'react'\nimport { initialize, pageview, ga } from 'react-ga'\n\nfunction pageView() {\n if (typeof ga() === 'undefined') {\n initialize('UA-150301985-1')\n }\n pageview(window.location.pathname + window.location.search)\n}\n\nconst PageView: FC = () => {\n useEffect(() => pageView())\n\n return null\n}\n\nexport default PageView\n\n```" } ]
code_docs-ui_0a4a2e2c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/Footer.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\n\nimport VTEXWhite from './icons/VTEXWhite'\nimport ExternalLink from './icons/ExternalLink'\n\nconst Footer: FC = () => {\n const listItemClasses = 't-body mv3 c-muted-3'\n\n return (\n <footer className=\"bg-base pt8-l pt6 ph0-l pb0-l w-100 bg-base--inverted bt b--muted-5\">\n <div className=\"pb8 ph7-l\">\n <VTEXWhite />\n </div>\n <div className=\"flex-l ph4 flex-wrap justify-between w-100 ph8-l pb8-l\">\n <div className=\"flex justify-between w-50-l w-100 pb5 pb0-l\">\n <div className=\"list\">\n <div className={listItemClasses}>\n <Link\n to=\"getting-started/what-is-vtex-io/1\"\n className=\"link no-underline c-on-base--inverted dim\">\n <FormattedMessage id=\"docs-ui/getting-started\" />\n </Link>\n </div>\n <div className={listItemClasses}>\n <Link\n to=\"recipes/all\"\n className=\"link no-underline c-on-base--inverted dim\">\n <FormattedMessage id=\"docs-ui/recipes\" />\n </Link>\n </div>\n <div className={listItemClasses}>\n <Link\n to=\"components/all\"\n className=\"link no-underline c-on-base--inverted dim\">\n <FormattedMessage id=\"docs-ui/our-components\" />\n </Link>\n </div>\n </div>\n <div className=\"list\">\n <div className={listItemClasses}>\n <Link\n to=\"https://github.com/vtex-apps/store-discussion\"\n className=\"link no-underline c-on-base--inverted dim\">\n <FormattedMessage id=\"docs-ui/community\" />\n </Link>\n </div>\n <div className={listItemClasses}>\n <Link\n to=\"https://github.com/vtex-apps/release-notes\"\n className=\"link no-underline c-on-base--inverted dim\">\n <FormattedMessage id=\"docs-ui/latest-features\" />\n </Link>\n </div>\n <div className={listItemClasses}>\n <Link\n to=\"https://help.vtex.com/developer-docs\"\n className=\"link no-underline c-on-base--inverted dim\">\n <FormattedMessage id=\"docs-ui/apis\" />\n </Link>\n </div>\n <div className={listItemClasses}>\n <Link\n to=\"https://www.vtex.com/partner/\"\n className=\"link no-underline c-on-base--inverted dim\">\n <FormattedMessage id=\"docs-ui/partner\" />\n </Link>\n </div>\n </div>\n </div>\n </div>\n <div\n className=\"flex ph4 pb6 bt b--muted-5 ph8-l\"\n style={{ height: '89px' }}>\n <Link\n to=\"https://vtex.com\"\n className=\"c-on-base--inverted link no-underline self-end dim\">\n <FormattedMessage id=\"docs-ui/visit-us\" /> <ExternalLink />\n </Link>\n </div>\n </footer>\n )\n}\n\nexport default Footer\n\n```" } ]
code_docs-ui_22399b55
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/ComponentGridItem.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\n\nimport styles from './ComponentGridItem.css'\nimport RightArrow from './icons/RightArrow'\n\ninterface Props {\n title: string\n description: string\n link: string\n}\n\nconst ComponentGridItem: FC<Props> = ({ title, description, link }) => (\n <article\n className={`flex flex-column justify-between mh3-l mb5 bt b--muted-1 ${styles.gridItem}`}>\n <div>\n <h2 className=\"t-heading-4 mv5\">{title}</h2>\n <div className=\"t-body c-on-base lh-copy\">{description}</div>\n </div>\n <Link\n to={link}\n className=\"flex items-center no-underline link c-emphasis dim\">\n <span className=\"mr4 mt3 mt5-ns mv5\">\n <FormattedMessage id=\"docs-ui/read-more\" />\n </span>\n <span className=\"dn db-ns\">\n <RightArrow />\n </span>\n </Link>\n </article>\n)\n\nexport default ComponentGridItem\n\n```" } ]
code_docs-ui_844547c3
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/ArticleNav.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, Fragment } from 'react'\nimport { FormattedMessage } from 'react-intl'\n\nimport { slug } from '../modules'\n\ninterface Props {\n headings: string[]\n}\n\nconst ArticleNav: FC<Props> = ({ headings }) => (\n <nav className=\"flex-l flex-column dn\">\n <div className=\"ttu t-small b pb3\">\n <FormattedMessage id=\"docs-ui/article-nav\" />\n </div>\n <Fragment>\n {headings.map(heading => {\n const slugifiedHeader = slug(heading)\n\n return (\n <a\n className=\"link c-muted-1 t-mini no-underline pb3 dim\"\n href={`#${slugifiedHeader}`}\n key={slugifiedHeader}>\n {heading}\n </a>\n )\n })}\n </Fragment>\n </nav>\n)\n\nexport default ArticleNav\n\n```" } ]
code_docs-ui_df97b21b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/SideBar.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { ReactElement, FC } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\n\nimport SideBarItem from './SideBarItem'\nimport { formatLink } from '../modules'\nimport { useSideBarContentState } from './SideBarContext'\nimport { IO_DOCUMENTATION } from '../modules/constantExports'\n\ninterface Chapter {\n title: string\n path?: string\n articles: [] | Chapter[]\n}\n\nconst SideBar: FC = () => {\n const { content } = useSideBarContentState()\n\n return (\n <nav className=\"w-100 fixed static-l bg-base z-2 min-h-100-l br-l b--muted-3 flex-l flex-column\">\n <div className=\"dn flex-l flex-column justify-between\" role=\"menu\">\n <div>{getArticles(content, 0, IO_DOCUMENTATION)}</div>\n <div\n className=\"bg-base sticky pa6 z3 bottom-0 w-100 bt b--muted-3\"\n style={{ maxWidth: '280px', minWidth: '215px' }}>\n <div className=\"t-small mb2\">\n <FormattedMessage id=\"docs-ui/did-not-find-your-answer\" />\n </div>\n <Link\n to=\"https://github.com/vtex-apps/store-discussion\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"t-body c-emphasis no-underline dim\">\n <FormattedMessage id=\"docs-ui/join-discussion\" />\n </Link>\n </div>\n </div>\n </nav>\n )\n}\n\nfunction getArticles(\n chapterList: Chapter[],\n depth: number,\n app?: string\n): ReactElement {\n return (\n <div\n className={`list ${depth > 0 ? 'pl0-l pr2-l pb2 mt3' : 'pv6-l pr5-l'}`}>\n {chapterList.map((chapter: Chapter) => (\n <SideBarItem\n text={chapter.title}\n link={chapter.path && formatLink(chapter.path)}\n hasArticles={chapter.articles.length > 0}\n key={chapter.title}\n depth={depth}>\n {getArticles(chapter.articles, depth + 1, app)}\n </SideBarItem>\n ))}\n </div>\n )\n}\n\nexport default SideBar\n\n```" } ]
code_docs-ui_d0f1febd
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/SideBarItem.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useState, FC } from 'react'\nimport { Link, useRuntime } from 'vtex.render-runtime'\n\nimport IconCaretDown from './icons/IconCaretDown'\nimport IconCaretRight from './icons/IconCaretRight'\nimport { slug } from '../modules'\n\ninterface Props {\n text: string\n link?: string\n appName?: string\n hasArticles?: boolean\n depth: number\n}\n\nconst SideBarItem: FC<Props> = ({\n text,\n link,\n depth,\n hasArticles,\n children,\n}) => {\n const {\n route: { path },\n } = useRuntime()\n\n // all links follow this pattern: /docs/<section>/<subsection | undefined>/<filename | undefined>\n const [linkSection, linkSubsection] = link?.split('/').slice(2) ?? ''\n const [currentSection, currentSubsection] = path.split('/').slice(2)\n const isExternalLink = !!link && link.match(/((http(s)?):\\/)|(www.)/)\n\n const isCurrentSection =\n currentSection &&\n depth === 0 &&\n (linkSection === currentSection ||\n slug(text.toLowerCase()) === currentSection)\n\n const isCurrentSubsection =\n currentSubsection && depth === 1 && linkSubsection === currentSubsection\n\n const isActive = path.includes(link!)\n\n const shouldBeOpen = isActive || isCurrentSection || isCurrentSubsection\n\n const [open, setOpen] = useState(shouldBeOpen)\n\n const ZeroDepthItem = () => <div className=\"c-on-base f5 b\">{text}</div>\n\n const NormalItem = () => <div className=\"mv3 dim f6\">{text}</div>\n\n const BaseSideBarItem = () => (\n <div\n className={`flex justify-between items-center pointer ${\n depth === 0 ? 'mt4' : ''\n }\n ${depth >= 2 ? 'pl4 bl lh-title t-small bw1 pv1' : ''} ${\n isActive ? 'b--emphasis' : 'b--muted-3'\n }`}\n onClick={() => {\n return setOpen(!open)\n }}\n onKeyPress={() => {\n return setOpen(!open)\n }}\n role=\"menuitem\"\n tabIndex={-1}>\n {depth === 0 ? (\n <ZeroDepthItem />\n ) : (\n <div className={`${isActive ? 'c-emphasis' : 'c-muted-2'}`}>\n <NormalItem />\n </div>\n )}\n <div className=\"pl3 flex items-center f5\">\n {hasArticles &&\n depth === 0 &&\n (open ? <IconCaretDown /> : <IconCaretRight />)}\n </div>\n </div>\n )\n\n return (\n <div className=\"link\">\n {link ? (\n <Link\n to={link}\n target={isExternalLink ? '_blank' : undefined}\n className={`no-underline ${isActive ? 'c-emphasis' : 'c-muted-2'}`}>\n <BaseSideBarItem />\n </Link>\n ) : (\n <BaseSideBarItem />\n )}\n {hasArticles && <div hidden={!open}>{children}</div>}\n </div>\n )\n}\n\nexport default SideBarItem\n\n```" } ]
code_docs-ui_1ea4950e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/CustomCard.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\n\nconst CustomCard: FC = ({ children }) => (\n <div\n style={{ boxShadow: '0 3px 9px 0 rgba(61, 62, 64, 0.2)' }}\n className=\"w-100 b2 br2 bg-base--inverted c-on-base pa5\">\n {children}\n </div>\n)\n\nexport default CustomCard\n\n```" } ]
code_docs-ui_4e68e8d8
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/EmptySummary.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\nimport { EmptyState } from 'vtex.styleguide'\nimport { FormattedMessage } from 'react-intl'\n\nconst EmptySummary: FC = () => (\n <div className=\"w-100 flex justify-center\">\n <EmptyState title=\"Something went wrong\">\n <p>\n <FormattedMessage id=\"docs-ui/empty-summary\" />\n </p>\n </EmptyState>\n </div>\n)\n\nexport default EmptySummary\n\n```" } ]
code_docs-ui_ce3ea35b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/DocsRenderer.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, Fragment } from 'react'\nimport ReactMarkdown from 'react-markdown'\nimport emoji from 'remark-emoji'\nimport { FormattedMessage } from 'react-intl'\nimport { Helmet } from 'vtex.render-runtime'\n\nimport { CustomRenderers } from './CustomTags'\nimport EmptyDocs from './EmptyDocs'\n\nconst DocsRenderer: FC<Props> = ({ markdown, meta }) => {\n const isEmptyDocs = markdown === ''\n\n if (isEmptyDocs) {\n return <EmptyDocs />\n }\n\n const title = markdown\n .split('# ')[1] // everything after the #\n .split('\\n')[0] // Only the headline\n .trim()\n\n return (\n <Fragment>\n <Helmet>\n <meta name=\"robots\" content=\"noindex\" />\n <title>{title}</title>\n </Helmet>\n <article className=\"min-vh-100\">\n <ReactMarkdown\n source={markdown}\n escapeHtml={false}\n renderers={CustomRenderers}\n plugins={[emoji]}\n />\n {meta.git && (\n <a href={meta.git} className=\"c-emphasis no-underline dim flex mb6\">\n <FormattedMessage id=\"docs-ui/renderer-github\" />\n </a>\n )}\n </article>\n </Fragment>\n )\n}\n\ninterface MetaData {\n title: string\n description: string\n tags: string[]\n version: string\n git: string\n}\n\ninterface Props {\n markdown: string\n meta: MetaData\n}\n\nexport default DocsRenderer\n\n```" } ]
code_docs-ui_8312c76b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/ComponentGridItem.css from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```css\n.gridItem {\n min-height: 11em;\n}\n\n@media screen and (min-width: 40em) {\n .gridItem {\n min-height: 12em;\n }\n}\n\n```" } ]
code_docs-ui_0e4fda48
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/AppVersionContext.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, {\n useContext,\n createContext,\n useReducer,\n useEffect,\n ReactNode,\n FC,\n} from 'react'\nimport { useQuery } from 'react-apollo'\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport EmptyAppDocs from './EmptyAppDocs'\nimport publishedQuery from '../graphql/published.graphql'\nimport { IO_DOCUMENTATION } from '../modules/constantExports'\n\ntype Action =\n | { type: 'updateMajor'; value: string }\n | { type: 'updateAvailableMajors'; value: string[] }\n | { type: 'updateAppName'; value: string }\n | { type: 'updateAppVersion'; value: string }\n | { type: 'updateAvailableVersions'; value: string[] }\ntype Dispatch = (action: Action) => void\ninterface State {\n appName: string\n major: string\n availableMajors: string[]\n version: string\n availableVersions: string[]\n}\n\nconst AppVersionStateContext = createContext<State | undefined>(undefined)\nconst AppVersionDispatchContext = createContext<Dispatch | undefined>(undefined)\n\nfunction appVersionReducer(state: State, action: Action) {\n switch (action.type) {\n case 'updateMajor': {\n return { ...state, major: action.value }\n }\n case 'updateAvailableMajors': {\n return { ...state, availableMajors: action.value }\n }\n case 'updateAppName': {\n return { ...state, appName: action.value }\n }\n case 'updateAppVersion': {\n return { ...state, major: action.value }\n }\n case 'updateAvailableVersions': {\n return { ...state, availableMajors: action.value }\n }\n default: {\n return state\n }\n }\n}\n\nfunction AppVersionProvider({\n children,\n publishedQueryResult,\n appName,\n appVersionFromUrl,\n}: AppVersionProviderProps) {\n const {\n appMajors: { latestMajor, publishedMajors },\n appVersions: { latestStable, publishedVersions },\n } = publishedQueryResult\n\n const hasVersion = !!appVersionFromUrl\n const majorFromQuery = `${latestMajor}.x`\n\n const [versionInfo, dispatch] = useReducer(appVersionReducer, {\n major: `${hasVersion ? appVersionFromUrl : majorFromQuery}`,\n availableMajors: publishedMajors,\n version: appVersionFromUrl || latestStable,\n availableVersions: publishedVersions,\n appName,\n })\n\n return (\n <AppVersionStateContext.Provider value={versionInfo}>\n <AppVersionDispatchContext.Provider value={dispatch}>\n {children}\n </AppVersionDispatchContext.Provider>\n </AppVersionStateContext.Provider>\n )\n}\n\nfunction useAppVersionState() {\n const context = useContext(AppVersionStateContext)\n if (context === undefined) {\n throw new Error(\n 'useAppVersionState must be used within a AppVersionProvider'\n )\n }\n return context\n}\n\nfunction useAppVersionDispatch() {\n const context = useContext(AppVersionDispatchContext)\n\n if (context === undefined) {\n throw new Error(\n 'useAppVersionDispatch must be used within a AppVersionProvider'\n )\n }\n return context\n}\n\nconst EnhancedAppVersionProvider: FC = ({ children }) => {\n const { route, navigate } = useRuntime()\n const app = route?.params?.app || IO_DOCUMENTATION\n const [appName] = app.split('@')\n const appVersionFromUrl = app?.split('@')[1]\n\n const { data, loading, error } = useQuery(publishedQuery, {\n variables: {\n appName,\n },\n })\n\n // Just a bit hacky: It always check if the url has a trailing slash, setting it if not.\n // It's useful for README's that link to other files\n useEffect(() => {\n if (!appVersionFromUrl || route.path.endsWith('/')) {\n return\n }\n navigate({\n to: `${route.path}/`,\n replace: true,\n preventRemount: true,\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [route.path])\n\n // Always set the app's version on the URL (except io-documentation)\n useEffect(() => {\n if (!app || appVersionFromUrl || !data?.appVersions?.latestStable) {\n return\n }\n const { params: currentParams } = route\n const {\n appVersions: { latestStable },\n } = data\n\n const updatedApp = `${app.split('@')[0]}@${latestStable}`\n navigate({\n page: route.id,\n params: { ...currentParams, app: updatedApp },\n replace: true,\n })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [data])\n\n if (loading) {\n return null\n }\n\n if (error) {\n return <EmptyAppDocs />\n }\n\n return (\n <AppVersionProvider\n key={appName}\n publishedQueryResult={data}\n appName={appName}\n appVersionFromUrl={appVersionFromUrl}>\n {children}\n </AppVersionProvider>\n )\n}\n\ninterface AppVersionProviderProps {\n children: ReactNode\n publishedQueryResult: PublishedQueryResponse\n appName: string\n appVersionFromUrl: string\n}\n\ninterface PublishedQueryResponse {\n appMajors: {\n latestMajor: string\n publishedMajors: string[]\n }\n appVersions: {\n latestStable: string\n publishedVersions: string[]\n }\n}\n\nexport { EnhancedAppVersionProvider, useAppVersionState, useAppVersionDispatch }\n\n```" } ]
code_docs-ui_d690b54a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/VersionSelector.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, useMemo } from 'react'\nimport { Dropdown } from 'vtex.styleguide'\n\nimport { useAppVersionState, useAppVersionDispatch } from './AppVersionContext'\n\nconst VersionSelector: FC = () => {\n const { major, availableMajors } = useAppVersionState()\n const setMajorInfo = useAppVersionDispatch()\n\n const options = useMemo(() => getDropdownOptions(availableMajors), [\n availableMajors,\n ])\n\n return (\n <div className=\"w-40 flex\">\n <Dropdown\n options={options}\n value={major[0]}\n onChange={(e: Event, value: string) => {\n setMajorInfo({ type: 'updateMajor', value })\n }}\n />\n </div>\n )\n}\n\nfunction getDropdownOptions(originalArray: string[]) {\n return originalArray.map(item => ({ value: item[0], label: `${item}.x` }))\n}\n\nexport default VersionSelector\n\n```" } ]
code_docs-ui_024c0cf6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/TopNav.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { ReactElement } from 'react'\nimport { FormattedMessage } from 'react-intl'\nimport { Link } from 'vtex.render-runtime'\nimport { Drawer } from 'vtex.store-drawer'\n\nimport { useSideBarContentState } from './SideBarContext'\nimport { IO_DOCUMENTATION } from '../modules/constantExports'\nimport VTEXPink from './icons/VTEXPink'\nimport { formatLink } from '../modules'\nimport SideBarItem from './SideBarItem'\n\nconst navLinkClass =\n 'dn flex-m items-center t-small link c-link no-underline mv3 mh5 dim'\n\nconst TopNav = () => {\n const { content } = useSideBarContentState()\n\n return (\n <nav className=\"fixed pv3 w-100 bg-base c-on-base b--muted-3 z-9999\">\n <div className=\"flex wrapper content-center justify-between\">\n <div className=\"flex items-center dn-l nl4\">\n <Drawer>\n <div className=\"flex flex-column w-90 center\" role=\"menu\">\n {getArticles(content, 0, IO_DOCUMENTATION)}\n </div>\n </Drawer>\n </div>\n\n <div className=\"flex\">\n <a\n href=\"https://help.vtex.com/developer-docs\"\n className={navLinkClass}>\n <FormattedMessage id=\"docs-ui/nav.api\" />\n </a>\n <a href=\"https://www.vtex.com/partner/\" className={navLinkClass}>\n <FormattedMessage id=\"docs-ui/nav.partner\" />\n </a>\n </div>\n </div>\n </nav>\n )\n}\n\ninterface Chapter {\n title: string\n path?: string\n articles: [] | Chapter[]\n}\n\nfunction getArticles(\n chapterList: Chapter[],\n depth: number,\n app?: string\n): ReactElement {\n return (\n <div\n className={`list ${depth > 0 ? 'pl0-l pr2-l pb2 mt3' : 'pv6-l pr5-l'}`}>\n {chapterList.map((chapter: Chapter) => {\n return (\n <SideBarItem\n text={chapter.title}\n link={chapter.path && formatLink(chapter.path)}\n hasArticles={chapter.articles.length > 0}\n key={chapter.title}\n depth={depth}>\n {getArticles(chapter.articles, depth + 1, app)}\n </SideBarItem>\n )\n })}\n </div>\n )\n}\n\nexport default TopNav\n\n```" } ]
code_docs-ui_895ea419
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/SideBarContext.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { useContext, createContext, useReducer, ReactNode } from 'react'\nimport { ApolloError } from 'apollo-client'\nimport { branch, compose, renderComponent } from 'recompose'\nimport { graphql } from 'react-apollo'\n\nimport { IO_DOCUMENTATION } from '../modules/constantExports'\nimport Skeleton from './Skeleton'\nimport EmptySummary from './EmptySummary'\nimport Summary from '../graphql/appSummary.graphql'\n\ninterface Action {\n type: 'updateContent'\n value: Chapter[]\n}\ntype Dispatch = (action: Action) => void\ninterface State {\n content: Chapter[]\n}\n\ninterface Chapter {\n title: string\n path?: string\n articles: [] | Chapter[]\n}\n\nconst SideBarStateContext = createContext<State | undefined>(undefined)\nconst SideBarDispatchContext = createContext<Dispatch | undefined>(undefined)\n\nconst DEFAULT_LOCALE = 'en'\n\nfunction SideBarContentReducer(state: State, action: Action) {\n switch (action.type) {\n case 'updateContent': {\n return { ...state, major: action.value }\n }\n default: {\n return state\n }\n }\n}\n\nfunction SideBarContentProvider({\n children,\n appSummaryQuery,\n}: SideBarContentProviderProps) {\n const [sideBarContent, dispatch] = useReducer(SideBarContentReducer, {\n content: appSummaryQuery.appSummary.chapterList,\n })\n\n return (\n <SideBarStateContext.Provider value={sideBarContent}>\n <SideBarDispatchContext.Provider value={dispatch}>\n {children}\n </SideBarDispatchContext.Provider>\n </SideBarStateContext.Provider>\n )\n}\n\nfunction useSideBarContentState() {\n const context = useContext(SideBarStateContext)\n if (context === undefined) {\n throw new Error(\n 'useSideBarContentState must be used within a SideBarContentProvider'\n )\n }\n return context\n}\n\nfunction useSideBarContentDispatch() {\n const context = useContext(SideBarDispatchContext)\n\n if (context === undefined) {\n throw new Error(\n 'useAppVersionDispatch must be used within a SideBarContentProvider'\n )\n }\n return context\n}\n\nconst EnhancedSideBarContentProvider = compose<any, any>(\n graphql(Summary, {\n name: 'appSummaryQuery',\n options: {\n variables: {\n appName: IO_DOCUMENTATION,\n locale: DEFAULT_LOCALE,\n },\n },\n }),\n branch(\n ({ appSummaryQuery }: OuterProps) => appSummaryQuery.loading,\n renderComponent(Skeleton)\n ),\n branch(\n ({ appSummaryQuery }: OuterProps) => !!appSummaryQuery.error,\n renderComponent(EmptySummary)\n )\n)(SideBarContentProvider)\n\ninterface SideBarContentProviderProps {\n children: ReactNode\n appSummaryQuery: AppSummaryQueryResponse\n}\n\ninterface AppSummaryQueryResponse {\n appSummary: {\n chapterList: Chapter[]\n }\n}\n\ninterface OuterProps {\n appSummaryQuery: {\n data: AppSummaryQueryResponse\n loading: boolean\n error?: ApolloError\n }\n}\n\nexport {\n EnhancedSideBarContentProvider,\n useSideBarContentState,\n useSideBarContentDispatch,\n}\n\n```" } ]
code_docs-ui_e3ef9437
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/Skeleton.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\nimport '../styles.global.css'\n\nconst baseSkeletonPiece = 'pa3 br2 relative overflow-hidden'\n\nconst TitleLine = () => (\n <div\n className={`${baseSkeletonPiece} bg-muted-3 w-70 mb7`}\n style={{ height: `${32}px` }}>\n <div className=\"skeleton-shimmer\" />\n </div>\n)\n\nconst LineOne = () => (\n <div\n className={`${baseSkeletonPiece} bg-muted-3 mv3 w-100 o-80`}\n style={{ height: `${20}px` }}>\n <div className=\"skeleton-shimmer\" />\n </div>\n)\n\nconst LineTwo = () => (\n <div\n className={`${baseSkeletonPiece} bg-muted-3 mv3 w-80 o-60`}\n style={{ height: `${20}px` }}>\n <div className=\"skeleton-shimmer\" />\n </div>\n)\n\nconst Skeleton = () => {\n return (\n <div className=\"w-100 w-80-l\" style={{ maxWidth: '680px' }}>\n <TitleLine />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n\n <LineOne />\n <LineTwo />\n </div>\n )\n}\n\nexport default Skeleton\n\n```" } ]
code_docs-ui_c67d1858
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/CodeBlock.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC, useRef, useEffect } from 'react'\nimport hljs from 'highlight.js'\n\ninterface Props {\n language: string\n value: string\n}\n\nconst CodeBlock: FC<Props> = ({ language, value }) => {\n const codeBlockRef = useRef<HTMLPreElement>(null)\n useEffect(() => {\n if (codeBlockRef?.current) {\n hljs.highlightBlock(codeBlockRef.current)\n }\n }, [codeBlockRef])\n\n // highlight.js does not support `.jsonc` files\n const codeBlockLanguage = language === 'jsonc' ? 'json' : language\n\n return (\n <pre>\n <code ref={codeBlockRef} className={`language-${codeBlockLanguage}`}>\n {value}\n </code>\n </pre>\n )\n}\n\nexport default CodeBlock\n\n```" } ]
code_docs-ui_e96c4de9
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/__tests__/modules.test.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport {\n markdownWithoutIgnoredSection,\n markdownWithOneIgnoredSection,\n markdownWithMultipleIgnoredSections,\n markdownWithExtraIgnoreStartToken,\n} from '../__fixtures__/markdowns'\nimport {\n findDocsIgnoreNodes,\n removeIgnoredNodesFromDocs,\n} from '../modules/ignoreTokens'\n\ndescribe('ignoreTokens module', () => {\n describe('findDocsIgnoreNodes function', () => {\n it('should return empty arrays when the markdown does not have ignore tokens', () => {\n const output = findDocsIgnoreNodes(markdownWithoutIgnoredSection)\n\n expect(output).toEqual({ start: [], end: [] })\n })\n\n it('should return expected start and end arrays in documentation with a single ignored section.', () => {\n const expected = {\n start: [4],\n end: [7],\n }\n const output = findDocsIgnoreNodes(markdownWithOneIgnoredSection)\n expect(output).toEqual(expected)\n })\n\n it('should return expected start and end arrays in documentation with multiple ignored sections.', () => {\n const expected = {\n start: [4, 10],\n end: [7, 13],\n }\n\n const output = findDocsIgnoreNodes(markdownWithMultipleIgnoredSections)\n\n expect(output).toEqual(expected)\n })\n })\n\n describe('removeIgnoredNodesFromDocs function', () => {\n it('should return original nodes if there are no DOCS_IGNORE_START nodes.', () => {\n const expected = markdownWithoutIgnoredSection\n\n const output = removeIgnoredNodesFromDocs(\n [],\n [],\n markdownWithoutIgnoredSection\n )\n\n expect(output).toEqual(expected)\n })\n\n it('should return nodes that were not ignored when startNodes and endNodes have one element each.', () => {\n const output = removeIgnoredNodesFromDocs(\n [4],\n [7],\n markdownWithOneIgnoredSection\n )\n\n expect(output).toHaveLength(6)\n })\n\n it('should return nodes that were not ignored when startNodes and endNodes have multiple elements.', () => {\n const output = removeIgnoredNodesFromDocs(\n [4, 10],\n [7, 13],\n markdownWithMultipleIgnoredSections\n )\n\n expect(output).toHaveLength(9)\n })\n\n it('should return expected nodes when startNodes has more elements than endNodes.', () => {\n const output = removeIgnoredNodesFromDocs(\n [4, 10, 15],\n [7, 13],\n markdownWithExtraIgnoreStartToken\n )\n\n expect(output).toHaveLength(7)\n })\n })\n})\n\n```" } ]
code_docs-ui_3e3f9a0f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/__tests__/index.test.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\ndescribe('Placeholder test', () => {\n it('should work', () => {\n expect(1).toBe(1)\n })\n})\n\n```" } ]
code_docs-ui_6f14161c
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/appSummary.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery appSummary($appName: String, $locale: String) {\n appSummary(appName: $appName, locale: $locale) {\n markdown\n chapterList {\n path\n title\n articles {\n path\n title\n articles {\n path\n title\n articles {\n path\n title\n articles {\n path\n }\n }\n }\n }\n }\n }\n}\n\n```" } ]
code_docs-ui_3bf337ec
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/releaseNotes.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery ReleaseNotes($after: String) {\n releaseNotes(first: 10, after: $after) {\n edges {\n cursor\n node {\n id\n title\n description\n date\n git\n markdown\n }\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n}\n\n```" } ]
code_docs-ui_6d48b523
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/recipesList.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery recipeList($appName: String, $category: String, $locale: String) {\n recipeList(appName: $appName, category: $category, locale: $locale) {\n title\n description\n path\n }\n}\n\n```" } ]
code_docs-ui_a85dd462
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/published.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery published($appName: String) {\n appMajors(appName: $appName) {\n latestMajor\n publishedMajors\n }\n appVersions(appName: $appName) {\n latestStable\n publishedVersions\n }\n}\n\n```" } ]
code_docs-ui_89810e8a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/componentsList.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery componentsList(\n $appName: String\n $locale: String\n $useAppsDirectory: Boolean\n) {\n componentsList(\n appName: $appName\n locale: $locale\n useAppsDirectory: $useAppsDirectory\n ) {\n layout {\n appName\n file\n title\n description\n url\n }\n general {\n appName\n file\n title\n description\n url\n }\n content {\n appName\n file\n title\n description\n url\n }\n navigation {\n appName\n file\n title\n description\n url\n }\n product {\n appName\n file\n title\n description\n url\n }\n pixel {\n appName\n file\n title\n description\n url\n }\n functional {\n appName\n file\n title\n description\n url\n }\n search {\n appName\n file\n title\n description\n url\n }\n }\n}\n\n```" } ]
code_docs-ui_c447ffbc
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/resourcesList.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery resourcesList($appName: String, $category: String, $locale: String) {\n resourcesList(appName: $appName, category: $category, locale: $locale) {\n title\n description\n path\n }\n}\n\n```" } ]
code_docs-ui_fd2fd743
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/conceptList.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery conceptList($appName: String, $category: String, $locale: String) {\n conceptList(appName: $appName, category: $category, locale: $locale) {\n title\n description\n path\n }\n}\n\n```" } ]
code_docs-ui_faf4858b
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/search.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery searchEngine($searchQuery: String) {\n searchEngine(searchQuery: $searchQuery) {\n title\n link\n snippet\n }\n}\n\n```" } ]
code_docs-ui_ed12b42d
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/gettingStartedArticles.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery GettingStartedArticles($track: String, $locale: String) {\n gettingStartedArticles(track: $track, locale: $locale)\n}\n\n```" } ]
code_docs-ui_c8e3a29a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/appReadMe.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery appReadMe($appName: String, $locale: String) {\n appReadMe(appName: $appName, locale: $locale) {\n meta {\n title\n description\n version\n tags\n git\n date\n }\n markdown\n }\n}\n\n```" } ]
code_docs-ui_d2d0dd1a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/markdownFile.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery markdownFile($appName: String, $fileName: String, $locale: String) {\n markdownFile(appName: $appName, fileName: $fileName, locale: $locale) {\n meta {\n title\n description\n tags\n version\n git\n }\n markdown\n }\n}\n\n```" } ]
code_docs-ui_924585b1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/graphql/storeFrameworkLatestFeatures.graphql from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```graphql\nquery StoreFrameworkLatestFeatures($week: String, $locale: String) {\n storeFrameworkLatestFeatures(week: $week, locale: $locale) {\n title\n description\n path\n }\n}\n\n```" } ]
code_docs-ui_bf702af5
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/hooks/useApp.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport { useRuntime } from 'vtex.render-runtime'\n\nimport { useAppVersionState } from '../components/AppVersionContext'\n\nexport function useApp() {\n const {\n route: { params },\n } = useRuntime()\n\n const { file } = params\n const { appName, major } = useAppVersionState()\n const fileName = file ? slugToPascal(file) : 'README'\n\n const finalAppName = `${appName}@${major}`\n\n return { appName: finalAppName, fileName }\n}\n\nfunction slugToPascal(slug: string) {\n const result = slug\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join('')\n\n return result\n}\n\n```" } ]
code_docs-ui_3a7743a1
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/modules/ignoreTokens.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport { DOCS_IGNORE_END, DOCS_IGNORE_START } from './constantExports'\n\nexport function findDocsIgnoreNodes(childNodes: any[]) {\n const ignoreStartIndexes = []\n const ignoreEndIndexes = []\n\n for (let idx = 0; idx < childNodes.length; idx++) {\n const currNode = childNodes[idx]\n\n const isHTMLNode = currNode.key.includes('html')\n\n const isDocsIgnoreStart =\n isHTMLNode && currNode.props.value === DOCS_IGNORE_START\n const isDocsIgnoreEnd =\n isHTMLNode && currNode.props.value === DOCS_IGNORE_END\n\n if (isDocsIgnoreStart) {\n ignoreStartIndexes.push(idx)\n }\n\n if (isDocsIgnoreEnd) {\n ignoreEndIndexes.push(idx)\n }\n }\n\n return {\n start: ignoreStartIndexes,\n end: ignoreEndIndexes,\n }\n}\n\nexport function removeIgnoredNodesFromDocs(\n startNodes: number[],\n endNodes: number[],\n children: any[]\n) {\n let activeIntervalIdx = 0\n let [activeIntervalStart] = startNodes\n let [activeIntervalEnd] = endNodes\n\n if (startNodes.length === 0) {\n return children\n }\n\n return children.filter((_, idx) => {\n if (idx < activeIntervalStart || idx > activeIntervalEnd) {\n return true\n }\n\n if (idx === activeIntervalEnd) {\n activeIntervalIdx++\n\n activeIntervalStart =\n activeIntervalIdx > startNodes.length - 1\n ? children.length\n : startNodes[activeIntervalIdx]\n activeIntervalEnd =\n activeIntervalIdx > endNodes.length - 1\n ? children.length\n : endNodes[activeIntervalIdx]\n }\n\n return false\n })\n}\n\n```" } ]
code_docs-ui_88338354
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/modules/constantExports.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nexport const IO_DOCUMENTATION = 'vtex.io-documentation@0.x'\nexport const CSE_CX = '017314625344810072686:u6y7vlxadyu'\nexport const CSE_KEY = 'AIzaSyBgix5AaPDcyu6QbboYdAYjQPsOJtZLOdw'\nexport const DOCS_IGNORE_START = '<!-- DOCS-IGNORE:start -->'\nexport const DOCS_IGNORE_END = '<!-- DOCS-IGNORE:end -->'\n\n```" } ]
code_docs-ui_180cd86a
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/modules/index.ts from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```typescript\nimport slugify from 'slugify'\n\nconst MARKDOWN_EXTENSION = '.md'\n\nfunction slug(str: string) {\n const replaced =\n (typeof str === 'string' && str.replace(/[*+~.()'\"!:@&[\\]]/g, '')) || ''\n const slugified = slugify(replaced, { lower: true }) || ''\n return slugified\n}\n\nfunction formatLink(path: string) {\n const isExternalLink = !!path && path.match(/((http(s)?):\\/)|(www.)/)\n // There is an issue during the parsing of Summary.md at `docs-graphql`\n const PROTOCOL_PREFIX = 'https:/'\n const linkUrl = isExternalLink\n ? `https://${path.substring(PROTOCOL_PREFIX.length)}`\n : `/docs/${removeFileExtension(path)}`\n\n return linkUrl\n}\n\nfunction removeFileExtension(fileName: string) {\n const hasExtension = fileName.endsWith(MARKDOWN_EXTENSION)\n\n return !hasExtension\n ? fileName\n : fileName.substring(0, fileName.length - MARKDOWN_EXTENSION.length)\n}\n\nfunction maybeAddMdExtension(fileName: string) {\n return fileName.endsWith(MARKDOWN_EXTENSION)\n ? fileName\n : `${fileName}${MARKDOWN_EXTENSION}`\n}\n\nexport { slug, formatLink, removeFileExtension, maybeAddMdExtension }\n\n```" } ]
code_docs-ui_ac03cb8e
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/VTEXWhite.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst VTEXWhite = () => (\n <svg\n width=\"115\"\n height=\"58\"\n viewBox=\"0 0 115 58\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M48.2904 13.4951H20.8256C18.6959 13.4951 17.3322 15.7303 18.3287 17.5885L21.076 22.7244H16.0956C15.7802 22.7245 15.4701 22.805 15.1955 22.9581C14.9209 23.1112 14.6909 23.3318 14.528 23.5984C14.3651 23.865 14.2746 24.1686 14.2654 24.4799C14.2562 24.7911 14.3286 25.0994 14.4756 25.375L23.3121 41.8868C23.4679 42.1772 23.7009 42.4202 23.986 42.5897C24.2712 42.7592 24.5977 42.8488 24.9306 42.8488C25.2635 42.8488 25.59 42.7592 25.8752 42.5897C26.1603 42.4202 26.3933 42.1772 26.5491 41.8868L28.949 37.4266L31.9598 43.0541C33.0195 45.0333 35.8901 45.037 36.9535 43.0599L50.7197 17.4848C51.6927 15.6759 50.365 13.4951 48.2904 13.4951ZM35.9533 24.4223L30.0175 35.4525C29.9137 35.6456 29.7587 35.8072 29.5689 35.9198C29.3792 36.0325 29.162 36.0921 28.9405 36.0921C28.7191 36.0921 28.5019 36.0325 28.3122 35.9198C28.1224 35.8072 27.9674 35.6456 27.8636 35.4525L21.9851 24.4687C21.8868 24.2856 21.8382 24.0805 21.8437 23.8734C21.8493 23.6662 21.909 23.464 22.017 23.2863C22.125 23.1085 22.2776 22.9614 22.4601 22.859C22.6426 22.7566 22.8488 22.7025 23.0587 22.7019H34.9061C35.1107 22.7019 35.3119 22.7542 35.49 22.8537C35.6682 22.9532 35.8172 23.0965 35.9226 23.2697C36.028 23.4429 36.0862 23.64 36.0916 23.842C36.097 24.044 36.0493 24.2439 35.9533 24.4223Z\"\n fill=\"#FFFFFF\"\n />\n <path\n d=\"M77.5031 25.3597H74.4988V35.5249C74.4986 35.6176 74.4613 35.7063 74.3949 35.7718C74.3286 35.8373 74.2387 35.8742 74.1448 35.8744H71.8279C71.7341 35.8742 71.6442 35.8373 71.5779 35.7718C71.5115 35.7063 71.4742 35.6176 71.474 35.5249V25.3597H68.4521C68.4066 25.3616 68.3612 25.3544 68.3186 25.3385C68.2759 25.3227 68.2369 25.2986 68.2039 25.2677C68.1709 25.2367 68.1445 25.1995 68.1264 25.1583C68.1082 25.117 68.0986 25.0726 68.0981 25.0277V23.2297C68.0986 23.1847 68.1082 23.1403 68.1264 23.0991C68.1445 23.0578 68.1709 23.0206 68.2039 22.9897C68.2369 22.9587 68.2759 22.9346 68.3186 22.9188C68.3612 22.903 68.4066 22.8958 68.4521 22.8976H77.5023C77.5961 22.8933 77.6879 22.9257 77.7575 22.988C77.8271 23.0502 77.869 23.1371 77.8739 23.2297V25.0284C77.8688 25.1207 77.827 25.2073 77.7575 25.2693C77.6881 25.3314 77.5966 25.3639 77.5031 25.3597Z\"\n fill=\"#FFFFFF\"\n />\n <path\n d=\"M87.1474 35.8013C86.5284 35.8883 85.487 36.0283 83.577 36.0283C81.2953 36.0283 79.2795 35.4519 79.2795 32.2742V26.4742C79.2795 23.2965 81.3137 22.7375 83.5946 22.7375C85.5039 22.7375 86.5284 22.8775 87.1474 22.9645C87.3949 22.9993 87.5014 23.087 87.5014 23.3139V24.9401C87.5012 25.0327 87.4638 25.1215 87.3975 25.187C87.3312 25.2525 87.2412 25.2894 87.1474 25.2896H83.4184C82.5871 25.2896 82.2867 25.5687 82.2867 26.4771V28.0663H87.0064C87.1002 28.0665 87.1902 28.1034 87.2565 28.1689C87.3228 28.2344 87.3602 28.3231 87.3604 28.4158V30.0746C87.3602 30.1672 87.3228 30.2559 87.2565 30.3214C87.1902 30.3869 87.1002 30.4238 87.0064 30.424H82.2867V32.2749C82.2867 33.1826 82.5871 33.4625 83.4184 33.4625H87.1474C87.2412 33.4627 87.3312 33.4995 87.3975 33.565C87.4638 33.6305 87.5012 33.7193 87.5014 33.8119V35.4359C87.5014 35.6614 87.3949 35.7665 87.1474 35.8013Z\"\n fill=\"#FFFFFF\"\n />\n <path\n d=\"M100.491 35.8709H97.6795C97.4497 35.8709 97.3432 35.7984 97.2198 35.6091L94.7818 31.7877L92.5728 35.525C92.4487 35.7346 92.3253 35.8745 92.1322 35.8745H89.515C89.338 35.8745 89.2499 35.7694 89.2499 35.6476C89.2533 35.6048 89.2653 35.5632 89.2851 35.525L93.1162 29.2175L89.2455 23.2283C89.2258 23.1963 89.2138 23.1604 89.2102 23.1232C89.2165 23.059 89.2476 22.9997 89.2969 22.9575C89.3462 22.9153 89.4101 22.8933 89.4753 22.8963H92.3224C92.517 22.8963 92.6587 23.071 92.763 23.2283L95.0256 26.7554L97.2154 23.2283C97.3035 23.071 97.4629 22.8963 97.656 22.8963H100.273C100.338 22.8933 100.402 22.9153 100.452 22.9575C100.501 22.9997 100.532 23.059 100.538 23.1232C100.535 23.1604 100.523 23.1963 100.503 23.2283L96.6514 29.2545L100.668 35.525C100.7 35.5783 100.718 35.6382 100.721 35.6998C100.722 35.8013 100.633 35.8709 100.491 35.8709Z\"\n fill=\"#FFFFFF\"\n />\n <path\n d=\"M63.8595 22.9324C63.7964 22.9325 63.7352 22.9543 63.6865 22.9939C63.6377 23.0336 63.6044 23.0887 63.5922 23.1499L61.0249 32.5306C60.9896 32.7228 60.9368 32.7924 60.7774 32.7924C60.6181 32.7924 60.5652 32.7199 60.5299 32.5306L57.9597 23.1477C57.9475 23.0865 57.9142 23.0314 57.8654 22.9918C57.8167 22.9521 57.7555 22.9303 57.6924 22.9302H55.1655C55.1244 22.9302 55.0838 22.9394 55.0468 22.9571C55.0098 22.9747 54.9773 23.0004 54.9518 23.0322C54.9262 23.064 54.9083 23.101 54.8993 23.1406C54.8902 23.1802 54.8904 23.2213 54.8996 23.2608C54.8996 23.2608 58.0353 34.0191 58.0698 34.1249C58.4884 35.4067 59.504 36.0193 60.7965 36.0193C62.0273 36.0193 63.1017 35.3777 63.5217 34.1285C63.5716 33.9835 66.6376 23.2601 66.6376 23.2601C66.6467 23.2206 66.6468 23.1796 66.6377 23.1401C66.6286 23.1006 66.6106 23.0636 66.5851 23.032C66.5595 23.0003 66.5271 22.9747 66.4902 22.957C66.4532 22.9394 66.4128 22.9302 66.3717 22.9302L63.8595 22.9324Z\"\n fill=\"#FFFFFF\"\n />\n <path\n d=\"M48.2904 13.4951H20.8256C18.6959 13.4951 17.3322 15.7303 18.3287 17.5885L21.076 22.7244H16.0956C15.7802 22.7245 15.4701 22.805 15.1955 22.9581C14.9209 23.1112 14.6909 23.3318 14.528 23.5984C14.3651 23.865 14.2746 24.1686 14.2654 24.4799C14.2562 24.7911 14.3286 25.0994 14.4756 25.375L23.3121 41.8868C23.4679 42.1772 23.7009 42.4202 23.986 42.5897C24.2712 42.7592 24.5977 42.8488 24.9306 42.8488C25.2635 42.8488 25.59 42.7592 25.8752 42.5897C26.1603 42.4202 26.3933 42.1772 26.5491 41.8868L28.949 37.4266L31.9598 43.0541C33.0195 45.0333 35.8901 45.037 36.9535 43.0599L50.7197 17.4848C51.6927 15.6759 50.365 13.4951 48.2904 13.4951ZM35.9533 24.4223L30.0175 35.4525C29.9137 35.6456 29.7587 35.8072 29.5689 35.9198C29.3792 36.0325 29.162 36.0921 28.9405 36.0921C28.7191 36.0921 28.5019 36.0325 28.3122 35.9198C28.1224 35.8072 27.9674 35.6456 27.8636 35.4525L21.9851 24.4687C21.8868 24.2856 21.8382 24.0805 21.8437 23.8734C21.8493 23.6662 21.909 23.464 22.017 23.2863C22.125 23.1085 22.2776 22.9614 22.4601 22.859C22.6426 22.7566 22.8488 22.7025 23.0587 22.7019H34.9061C35.1107 22.7019 35.3119 22.7542 35.49 22.8537C35.6682 22.9532 35.8172 23.0965 35.9226 23.2697C36.028 23.4429 36.0862 23.64 36.0916 23.842C36.097 24.044 36.0493 24.2439 35.9533 24.4223Z\"\n fill=\"#FFFFFF\"\n />\n </svg>\n)\n\nexport default VTEXWhite\n\n```" } ]
code_docs-ui_f7888eb4
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/ExternalLink.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst ExternalLink = () => (\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 10 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M9.375 0H5V1.25H7.875L3.9375 5.1875L4.8125 6.0625L8.75 2.125V5H10V0.625C10 0.25 9.75 0 9.375 0Z\"\n fill=\"#797979\"\n />\n <path\n d=\"M8.75 10H0.625C0.25 10 0 9.75 0 9.375V1.25C0 0.875 0.25 0.625 0.625 0.625H3.125V1.875H1.25V8.75H8.125V6.875H9.375V9.375C9.375 9.75 9.125 10 8.75 10Z\"\n fill=\"#797979\"\n />\n </svg>\n)\n\nexport default ExternalLink\n\n```" } ]
code_docs-ui_854f3e07
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/SearchIcon.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React, { FC } from 'react'\n\ninterface Props {\n fill: string\n}\n\nconst WhiteSearchIcon: FC<Props> = ({ fill }) => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M15.707 13.293L13 10.586C13.63 9.536 14 8.311 14 7C14 3.14 10.859 0 7 0C3.141 0 0 3.14 0 7C0 10.86 3.141 14 7 14C8.312 14 9.536 13.631 10.586 13L13.293 15.707C13.488 15.902 13.744 16 14 16C14.256 16 14.512 15.902 14.707 15.707L15.707 14.707C16.098 14.316 16.098 13.684 15.707 13.293ZM7 12C4.239 12 2 9.761 2 7C2 4.239 4.239 2 7 2C9.761 2 12 4.239 12 7C12 9.761 9.761 12 7 12Z\"\n fill={fill}\n />\n </svg>\n)\n\nexport default WhiteSearchIcon\n\n```" } ]
code_docs-ui_3750f865
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/IconCaretRight.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst IconCaretRight = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\">\n <path\n fill=\"#3f3f40\"\n className=\"0\"\n d=\"M5.108 16.41L3.59 15.108 9.683 8 3.59.892 5.108-.41l6.651 7.76a1 1 0 010 1.301L5.108 16.41z\"\n />\n </svg>\n)\n\nexport default IconCaretRight\n\n```" } ]
code_docs-ui_642f262f
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/VTEXPink.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst VTEXPink = () => (\n <svg\n height=\"40\"\n viewBox=\"0 0 115 58\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M48.2904 13.4951H20.8256C18.6959 13.4951 17.3322 15.7303 18.3287 17.5885L21.076 22.7244H16.0956C15.7802 22.7245 15.4701 22.805 15.1955 22.9581C14.9209 23.1112 14.6909 23.3318 14.528 23.5984C14.3651 23.865 14.2746 24.1686 14.2654 24.4799C14.2562 24.7911 14.3286 25.0994 14.4756 25.375L23.3121 41.8868C23.4679 42.1772 23.7009 42.4202 23.986 42.5897C24.2712 42.7592 24.5977 42.8488 24.9306 42.8488C25.2635 42.8488 25.59 42.7592 25.8752 42.5897C26.1603 42.4202 26.3933 42.1772 26.5491 41.8868L28.949 37.4266L31.9598 43.0541C33.0195 45.0333 35.8901 45.037 36.9535 43.0599L50.7197 17.4848C51.6927 15.6759 50.365 13.4951 48.2904 13.4951ZM35.9533 24.4223L30.0175 35.4525C29.9137 35.6456 29.7587 35.8072 29.5689 35.9198C29.3792 36.0325 29.162 36.0921 28.9405 36.0921C28.7191 36.0921 28.5019 36.0325 28.3122 35.9198C28.1224 35.8072 27.9674 35.6456 27.8636 35.4525L21.9851 24.4687C21.8868 24.2856 21.8382 24.0805 21.8437 23.8734C21.8493 23.6662 21.909 23.464 22.017 23.2863C22.125 23.1085 22.2776 22.9614 22.4601 22.859C22.6426 22.7566 22.8488 22.7025 23.0587 22.7019H34.9061C35.1107 22.7019 35.3119 22.7542 35.49 22.8537C35.6682 22.9532 35.8172 23.0965 35.9226 23.2697C36.028 23.4429 36.0862 23.64 36.0916 23.842C36.097 24.044 36.0493 24.2439 35.9533 24.4223Z\"\n fill=\"#F71963\"\n />\n <path\n d=\"M77.5031 25.3597H74.4988V35.5249C74.4986 35.6176 74.4613 35.7063 74.3949 35.7718C74.3286 35.8373 74.2387 35.8742 74.1448 35.8744H71.8279C71.7341 35.8742 71.6442 35.8373 71.5779 35.7718C71.5115 35.7063 71.4742 35.6176 71.474 35.5249V25.3597H68.4521C68.4066 25.3616 68.3612 25.3544 68.3186 25.3385C68.2759 25.3227 68.2369 25.2986 68.2039 25.2677C68.1709 25.2367 68.1445 25.1995 68.1264 25.1583C68.1082 25.117 68.0986 25.0726 68.0981 25.0277V23.2297C68.0986 23.1847 68.1082 23.1403 68.1264 23.0991C68.1445 23.0578 68.1709 23.0206 68.2039 22.9897C68.2369 22.9587 68.2759 22.9346 68.3186 22.9188C68.3612 22.903 68.4066 22.8958 68.4521 22.8976H77.5023C77.5961 22.8933 77.6879 22.9257 77.7575 22.988C77.8271 23.0502 77.869 23.1371 77.8739 23.2297V25.0284C77.8688 25.1207 77.827 25.2073 77.7575 25.2693C77.6881 25.3314 77.5966 25.3639 77.5031 25.3597Z\"\n fill=\"#F71963\"\n />\n <path\n d=\"M87.1474 35.8013C86.5284 35.8883 85.487 36.0283 83.577 36.0283C81.2953 36.0283 79.2795 35.4519 79.2795 32.2742V26.4742C79.2795 23.2965 81.3137 22.7375 83.5946 22.7375C85.5039 22.7375 86.5284 22.8775 87.1474 22.9645C87.3949 22.9993 87.5014 23.087 87.5014 23.3139V24.9401C87.5012 25.0327 87.4638 25.1215 87.3975 25.187C87.3312 25.2525 87.2412 25.2894 87.1474 25.2896H83.4184C82.5871 25.2896 82.2867 25.5687 82.2867 26.4771V28.0663H87.0064C87.1002 28.0665 87.1902 28.1034 87.2565 28.1689C87.3228 28.2344 87.3602 28.3231 87.3604 28.4158V30.0746C87.3602 30.1672 87.3228 30.2559 87.2565 30.3214C87.1902 30.3869 87.1002 30.4238 87.0064 30.424H82.2867V32.2749C82.2867 33.1826 82.5871 33.4625 83.4184 33.4625H87.1474C87.2412 33.4627 87.3312 33.4995 87.3975 33.565C87.4638 33.6305 87.5012 33.7193 87.5014 33.8119V35.4359C87.5014 35.6614 87.3949 35.7665 87.1474 35.8013Z\"\n fill=\"#F71963\"\n />\n <path\n d=\"M100.491 35.8709H97.6795C97.4497 35.8709 97.3432 35.7984 97.2198 35.6091L94.7818 31.7877L92.5728 35.525C92.4487 35.7346 92.3253 35.8745 92.1322 35.8745H89.515C89.338 35.8745 89.2499 35.7694 89.2499 35.6476C89.2533 35.6048 89.2653 35.5632 89.2851 35.525L93.1162 29.2175L89.2455 23.2283C89.2258 23.1963 89.2138 23.1604 89.2102 23.1232C89.2165 23.059 89.2476 22.9997 89.2969 22.9575C89.3462 22.9153 89.4101 22.8933 89.4753 22.8963H92.3224C92.517 22.8963 92.6587 23.071 92.763 23.2283L95.0256 26.7554L97.2154 23.2283C97.3035 23.071 97.4629 22.8963 97.656 22.8963H100.273C100.338 22.8933 100.402 22.9153 100.452 22.9575C100.501 22.9997 100.532 23.059 100.538 23.1232C100.535 23.1604 100.523 23.1963 100.503 23.2283L96.6514 29.2545L100.668 35.525C100.7 35.5783 100.718 35.6382 100.721 35.6998C100.722 35.8013 100.633 35.8709 100.491 35.8709Z\"\n fill=\"#F71963\"\n />\n <path\n d=\"M63.8595 22.9324C63.7964 22.9325 63.7352 22.9543 63.6865 22.9939C63.6377 23.0336 63.6044 23.0887 63.5922 23.1499L61.0249 32.5306C60.9896 32.7228 60.9368 32.7924 60.7774 32.7924C60.6181 32.7924 60.5652 32.7199 60.5299 32.5306L57.9597 23.1477C57.9475 23.0865 57.9142 23.0314 57.8654 22.9918C57.8167 22.9521 57.7555 22.9303 57.6924 22.9302H55.1655C55.1244 22.9302 55.0838 22.9394 55.0468 22.9571C55.0098 22.9747 54.9773 23.0004 54.9518 23.0322C54.9262 23.064 54.9083 23.101 54.8993 23.1406C54.8902 23.1802 54.8904 23.2213 54.8996 23.2608C54.8996 23.2608 58.0353 34.0191 58.0698 34.1249C58.4884 35.4067 59.504 36.0193 60.7965 36.0193C62.0273 36.0193 63.1017 35.3777 63.5217 34.1285C63.5716 33.9835 66.6376 23.2601 66.6376 23.2601C66.6467 23.2206 66.6468 23.1796 66.6377 23.1401C66.6286 23.1006 66.6106 23.0636 66.5851 23.032C66.5595 23.0003 66.5271 22.9747 66.4902 22.957C66.4532 22.9394 66.4128 22.9302 66.3717 22.9302L63.8595 22.9324Z\"\n fill=\"#F71963\"\n />\n <path\n d=\"M48.2904 13.4951H20.8256C18.6959 13.4951 17.3322 15.7303 18.3287 17.5885L21.076 22.7244H16.0956C15.7802 22.7245 15.4701 22.805 15.1955 22.9581C14.9209 23.1112 14.6909 23.3318 14.528 23.5984C14.3651 23.865 14.2746 24.1686 14.2654 24.4799C14.2562 24.7911 14.3286 25.0994 14.4756 25.375L23.3121 41.8868C23.4679 42.1772 23.7009 42.4202 23.986 42.5897C24.2712 42.7592 24.5977 42.8488 24.9306 42.8488C25.2635 42.8488 25.59 42.7592 25.8752 42.5897C26.1603 42.4202 26.3933 42.1772 26.5491 41.8868L28.949 37.4266L31.9598 43.0541C33.0195 45.0333 35.8901 45.037 36.9535 43.0599L50.7197 17.4848C51.6927 15.6759 50.365 13.4951 48.2904 13.4951ZM35.9533 24.4223L30.0175 35.4525C29.9137 35.6456 29.7587 35.8072 29.5689 35.9198C29.3792 36.0325 29.162 36.0921 28.9405 36.0921C28.7191 36.0921 28.5019 36.0325 28.3122 35.9198C28.1224 35.8072 27.9674 35.6456 27.8636 35.4525L21.9851 24.4687C21.8868 24.2856 21.8382 24.0805 21.8437 23.8734C21.8493 23.6662 21.909 23.464 22.017 23.2863C22.125 23.1085 22.2776 22.9614 22.4601 22.859C22.6426 22.7566 22.8488 22.7025 23.0587 22.7019H34.9061C35.1107 22.7019 35.3119 22.7542 35.49 22.8537C35.6682 22.9532 35.8172 23.0965 35.9226 23.2697C36.028 23.4429 36.0862 23.64 36.0916 23.842C36.097 24.044 36.0493 24.2439 35.9533 24.4223Z\"\n fill=\"#F71963\"\n />\n </svg>\n)\n\nexport default VTEXPink\n\n```" } ]
code_docs-ui_963282f6
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/RightArrow.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst RightArrow = () => (\n <svg\n width=\"59\"\n height=\"14\"\n viewBox=\"0 0 59 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0 7H57\" stroke=\"#F71963\" />\n <path d=\"M49 1L57.5 7L49 13\" stroke=\"#F71963\" />\n </svg>\n)\n\nexport default RightArrow\n\n```" } ]
code_docs-ui_262e3322
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/LeftArrow.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst LeftArrow = () => (\n <svg\n width=\"59\"\n height=\"14\"\n viewBox=\"0 0 59 14\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path stroke=\"#F71963\" d=\"M58.5 7h-57M9.5 13L1 7l8.5-6\" />\n </svg>\n)\n\nexport default LeftArrow\n\n```" } ]
code_docs-ui_74686282
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/Recipes.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nfunction Recipes() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 48 48\">\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M14 12h2M22 12h12M14 20h2M22 20h12M14 28h2M22 28h12M14 36h10\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M30 46V34h12\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M30 46H6V2h36v32L30 46z\"\n />\n </svg>\n )\n}\n\nexport default Recipes\n\n```" } ]
code_docs-ui_41c5a9ad
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/Resources.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nfunction Resources() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 48 48\">\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"2\"\n d=\"M2 32h12M14 32h12M31.509 32.107l11.893-1.598\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"2\"\n d=\"M14 4H2v40h12V4z\"\n />\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"2\"\n d=\"M8 10v10\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"2\"\n d=\"M26 4H14v40h12V4z\"\n />\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"2\"\n d=\"M20 10v10\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"2\"\n d=\"M39.675 2.76L27.782 4.357 33.106 44l11.893-1.597L39.675 2.76z\"\n />\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"2\"\n d=\"M34.527 9.504l1.331 9.911\"\n />\n </svg>\n )\n}\n\nexport default Resources\n\n```" } ]
code_docs-ui_cd010834
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/Components.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nfunction Components() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 48 48\">\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M20 2H5v25h15V2z\"\n />\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M20 33H5v13h15V33zM43 2H26v13h17V2z\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M43 21H26v25h17V21z\"\n />\n </svg>\n )\n}\n\nexport default Components\n\n```" } ]
code_docs-ui_43e4dfe2
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/IconCaretDown.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nconst IconCaretDown = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\">\n <path\n fill=\"#3f3f40\"\n className=\"0\"\n d=\"M8 12a.997.997 0 01-.651-.241L-.41 5.109.892 3.59 8 9.683l7.108-6.093 1.302 1.519-7.759 6.65A.997.997 0 018 12z\"\n />\n </svg>\n)\n\nexport default IconCaretDown\n\n```" } ]
code_docs-ui_d7a9a508
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of docs-ui/react/components/icons/CommunityIcon.tsx from the docs-ui VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```tsx\nimport React from 'react'\n\nfunction CommunityIcon() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 60 60\">\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M25.066 35.807l6.507 16.122a5.158 5.158 0 01-2.855 6.701v0a5.157 5.157 0 01-6.7-2.855l-9.765-24.04\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M48.5 43.009c5.8 0 10.5-9.404 10.5-21.005C59 10.404 54.3 1 48.5 1 42.703 1 38 10.404 38 22.004c0 11.6 4.702 21.005 10.5 21.005z\"\n />\n <path\n stroke=\"#142032\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M46.293 1.466L6.807 14.541c-3.595 1.166-5.8 3.6-5.8 7.552a7.855 7.855 0 005.8 7.913l39.744 12.64\"\n />\n <path\n stroke=\"#F71963\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeMiterlimit=\"10\"\n strokeWidth=\"1.5\"\n d=\"M45.001 15.003a7 7 0 017 7.001 7.002 7.002 0 01-7 7.002\"\n />\n </svg>\n )\n}\n\nexport default CommunityIcon\n\n```" } ]
code_minimum-boilerplate-theme_02194d49
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of minimum-boilerplate-theme/docs/README.md from the minimum-boilerplate-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```markdown\n# Minimum Boilerplate Theme\n\nThe minimum Boilerplate Theme is basic store front model based on the VTEX IO Store Framework.\n\nIt should be used only when you want to start a new store theme without any pre-set configurations, as is the case with [Store Theme](https://github.com/vtex-apps/store-theme). \n\nWhile Store Theme gives developers a ready-to-go default store front structure, the Minimum Boilerplate Theme will enable you to build you store freely from scratch.\n\n## Configuration\n\n### Step 1 - Basic setup\n\nAccess the VTEX IO [basic setup guide](https://developers.vtex.com/docs/guides/vtex-io-documentation-1-basicsetup) and follow all the given steps. \n\nBy the end of the setup, you should have the VTEX command line interface (Toolbelt) installed along with a developer workspace you can work in.\n\n### Step 2 - Cloning the Minimum Boilerplate Theme repository\n\n[Clone](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) this repository to your local files to be able to effectively start working on it.\n\nThen, access the repository's directory using your terminal. \n\n### Step 3 - Editing the `Manifest.json`\n\nOnce in the repository directory, it is time to edit the Minimum Boilerplate `manifest.json` file. \n\nOnce you are in the file, you must replace the `vendor` and `account` values. `vendor` is the account name you are working on and `account` is anything you want to name your theme. For example:\n\n```json\n{\n \"vendor\": \"storecomponents\",\n \"name\": \"my-test-theme\",\n}\n```\n\n### Step 4 - Installing required apps\n\nIn order to use Store Framework and work on your store theme, it is needed to have both `vtex.store-sitemap` and `vtex.store` installed.\n\nRun `vtex list` and check whether those apps are already installed. \n\nIf they aren't, run the following command to install them: `vtex install vtex.store-sitemap vtex.store -f`\n\n### Step 5 - Uninstalling any existing theme\n\nBy running `vtex list`, you can verify if any theme is installed.\n\nIt is common to already have a `vtex.store-theme` installed when you start the store's front development process. \n\nTherefore, if you find it in the app's list, copy its name and use it together with the command `vtex uninstall`. For example:\n\n```json\nvtex uninstall vtex.store-theme\n```\n\n### Step 6- Run and preview your store\n\nThen time has come to upload all the changes you made in your local files to the platform. For that, use the `vtex link` command. \n\nIf the process runs without any errors, the following message will be displayed: `App linked successfully`. Then, run the `vtex browse` command to open a browser window having your linked store in it.\n\nThis will enable you to see the applied changes in real time, through the account and workspace in which you are working.\n\n```" } ]
code_minimum-boilerplate-theme_695b5960
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of minimum-boilerplate-theme/styles/configs/style.json from the minimum-boilerplate-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"typeScale\": [\n 3,\n 2.25,\n 1.5,\n 1.25,\n 1,\n 0.875,\n 0.75\n ],\n \"spacing\": [\n 0.125,\n 0.25,\n 0.5,\n 0.75,\n 1,\n 1.5,\n 2,\n 3,\n 4,\n 8,\n 16\n ],\n \"customMedia\": [\n {\n \"s\": 20\n },\n {\n \"ns\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"m\": {\n \"value\": 40,\n \"minWidth\": true\n }\n },\n {\n \"l\": {\n \"value\": 64,\n \"minWidth\": true\n }\n },\n {\n \"xl\": {\n \"value\": 80,\n \"minWidth\": true\n }\n }\n ],\n \"colors\": {\n \"black-90\": \"rgba(0,0,0,.9)\",\n \"black-80\": \"rgba(0,0,0,.8)\",\n \"black-70\": \"rgba(0,0,0,.7)\",\n \"black-60\": \"rgba(0,0,0,.6)\",\n \"black-50\": \"rgba(0,0,0,.5)\",\n \"black-40\": \"rgba(0,0,0,.4)\",\n \"black-30\": \"rgba(0,0,0,.3)\",\n \"black-20\": \"rgba(0,0,0,.2)\",\n \"black-10\": \"rgba(0,0,0,.1)\",\n \"black-05\": \"rgba(0,0,0,.05)\",\n \"black-025\": \"rgba(0,0,0,.025)\",\n \"black-0125\": \"rgba(0,0,0,.0125)\",\n \"white-90\": \"rgba(255,255,255,.9)\",\n \"white-80\": \"rgba(255,255,255,.8)\",\n \"white-70\": \"rgba(255,255,255,.7)\",\n \"white-60\": \"rgba(255,255,255,.6)\",\n \"white-50\": \"rgba(255,255,255,.5)\",\n \"white-40\": \"rgba(255,255,255,.4)\",\n \"white-30\": \"rgba(255,255,255,.3)\",\n \"white-20\": \"rgba(255,255,255,.2)\",\n \"white-10\": \"rgba(255,255,255,.1)\",\n \"white-05\": \"rgba(255,255,255,.05)\",\n \"white-025\": \"rgba(255,255,255,.025)\",\n \"white-0125\": \"rgba(255,255,255,.0125)\"\n },\n \"semanticColors\": {\n \"background\": {\n \"base\": \"#ffffff\",\n \"base--inverted\": \"#03044e\",\n \"action-primary\": \"#0F3E99\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#f2f4f5\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-background\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-background\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"text\": {\n \"action-primary\": \"#0F3E99\",\n \"action-secondary\": \"#eef3f7\",\n \"link\": \"#0F3E99\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#979899\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"visited-text\": {\n \"link\": \"#0c389f\"\n },\n \"hover-text\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"active-text\": {\n \"link\": \"#0c389f\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\"\n },\n \"border\": {\n \"action-primary\": \"#0F3E99\",\n \"action-secondary\": \"#eef3f7\",\n \"emphasis\": \"#f71963\",\n \"disabled\": \"#e3e4e6\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"hover-border\": {\n \"action-primary\": \"#072c75\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#e13232\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"active-border\": {\n \"action-primary\": \"#0c389f\",\n \"action-secondary\": \"#dbe9fd\",\n \"emphasis\": \"#dd1659\",\n \"success\": \"#8bc34a\",\n \"success--faded\": \"#eafce3\",\n \"danger\": \"#ff4c4c\",\n \"danger--faded\": \"#ffe6e6\",\n \"warning\": \"#ffb100\",\n \"warning--faded\": \"#fff6e0\",\n \"muted-1\": \"#727273\",\n \"muted-2\": \"#979899\",\n \"muted-3\": \"#cacbcc\",\n \"muted-4\": \"#e3e4e6\",\n \"muted-5\": \"#f2f4f5\"\n },\n \"on\": {\n \"base\": \"#3f3f40\",\n \"base--inverted\": \"#ffffff\",\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"disabled\": \"#979899\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\",\n \"muted-1\": \"#ffffff\",\n \"muted-2\": \"#ffffff\",\n \"muted-3\": \"#3f3f40\",\n \"muted-4\": \"#3f3f40\",\n \"muted-5\": \"#3f3f40\"\n },\n \"hover-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n },\n \"active-on\": {\n \"action-primary\": \"#ffffff\",\n \"action-secondary\": \"#0F3E99\",\n \"emphasis\": \"#ffffff\",\n \"success\": \"#ffffff\",\n \"success--faded\": \"#3f3f40\",\n \"danger\": \"#ffffff\",\n \"danger--faded\": \"#3f3f40\",\n \"warning\": \"#ffffff\",\n \"warning--faded\": \"#1a1a1a\"\n }\n },\n \"borderWidths\": [\n 0,\n 0.125,\n 0.25,\n 0.5,\n 1,\n 2\n ],\n \"borderRadius\": [\n 0,\n 0.125,\n 0.25,\n 0.5,\n 1\n ],\n \"widths\": [\n 1,\n 2,\n 4,\n 8,\n 16\n ],\n \"maxWidths\": [\n 1,\n 2,\n 4,\n 8,\n 16,\n 32,\n 48,\n 64,\n 96\n ],\n \"heights\": [\n 1,\n 2,\n 4,\n 8,\n 16\n ],\n \"sizes\": [\n {\n \"name\": \"small\",\n \"value\": 2\n },\n {\n \"name\": \"regular\",\n \"value\": 2.5\n },\n {\n \"name\": \"large\",\n \"value\": 3\n }\n ],\n \"typography\": {\n \"measure\": [\n 30,\n 34,\n 20\n ],\n \"styles\": {\n \"heading-1\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"3rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-2\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"2.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-3\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"700\",\n \"fontSize\": \"1.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-4\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.5rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-5\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"heading-6\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"body\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"small\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"mini\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"0.75rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n },\n \"action\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--small\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"0.875rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"action--large\": {\n \"fontFamily\": \"Fabriga, -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, ubuntu, roboto, noto, segoe ui, arial, sans-serif\",\n \"fontWeight\": \"500\",\n \"fontSize\": \"1.25rem\",\n \"textTransform\": \"uppercase\",\n \"letterSpacing\": \"0\"\n },\n \"code\": {\n \"fontFamily\": \"Consolas, monaco, monospace\",\n \"fontWeight\": \"normal\",\n \"fontSize\": \"1rem\",\n \"textTransform\": \"initial\",\n \"letterSpacing\": \"0\"\n }\n }\n },\n \"opacity\": [\n 1,\n 0.9,\n 0.8,\n 0.7,\n 0.6,\n 0.5,\n 0.4,\n 0.3,\n 0.2,\n 0.1,\n 0.05,\n 0.025,\n 0\n ]\n}\n\n```" } ]
code_minimum-boilerplate-theme_66882572
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of minimum-boilerplate-theme/store/blocks/default.jsonc from the minimum-boilerplate-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"store.orderplaced\": {\n \"blocks\": [\"order-placed\"]\n },\n\n \"store.account\": {\n \"blocks\": [\"my-account\"],\n \"parent\": {\n \"challenge\": \"challenge.profile\"\n }\n },\n\n \"store.login\": {\n \"blocks\": [\"login-content#default\"]\n },\n\n \"login-content#default\": {\n \"props\": {\n \"isInitialScreenOptionOnly\": false,\n \"defaultOption\": 1,\n \"showPasswordVerificationIntoTooltip\": true\n }\n },\n\n \"product-summary.shelf\": {\n \"children\": [\n \"product-summary-add-to-list-button\",\n \"product-summary-name\",\n \"product-rating-inline\",\n \"product-summary-space\",\n \"product-summary-price\",\n \"product-identifier.summary\",\n \"add-to-cart-button\"\n ]\n }\n}\n\n```" } ]
code_minimum-boilerplate-theme_a982a694
[ { "role": "system", "content": "You are an expert VTEX IO developer. You specialize in building VTEX Store Framework apps, React components, GraphQL APIs, and Node.js services for e-commerce platforms." }, { "role": "user", "content": "Show me the implementation of minimum-boilerplate-theme/store/blocks/footer.jsonc from the minimum-boilerplate-theme VTEX app." }, { "role": "assistant", "content": "Here's the implementation:\n\n```json\n{\n \"footer\": {\n \"blocks\": [\"footer-layout.desktop\", \"footer-layout.mobile\"]\n },\n \"footer-layout.desktop\": { \n \"children\": [\n \"flex-layout.row#footer\"\n ]\n },\n \"footer-layout.mobile\": { \n \"children\": [\n \"flex-layout.row#footer\"\n ]\n },\n \"flex-layout.row#footer\": { \n \"children\": [\n \"image\"\n ]\n },\n \"image\": {\n \"props\": {\n \"width\": 100,\n \"src\": \"https://brand.vtex.com/static/media/VTEX_pink_RGB.751a9fb5.svg\"\n }\n }\n}\n```" } ]