From 3600f2ae3f7e2899178e26f80e54967e9112eeb1 Mon Sep 17 00:00:00 2001 From: riccardoperra Date: Sat, 8 Oct 2022 15:17:38 +0200 Subject: [PATCH] build(ui): fix bundle script --- packages/ui/package.json | 9 +- packages/ui/rollup.config.js | 89 ----- packages/ui/rollup.config.ts | 37 ++ .../primitives/ColorPicker/ColorPicker.tsx | 26 -- .../ColorPicker/ColorPickerPopover.tsx | 2 +- .../ColorPicker/ColorPickerPresetItem.tsx | 30 ++ packages/ui/tools/build.ts | 56 +++ packages/ui/tools/with-solid.ts | 354 ++++++++++++++++++ packages/ui/tsconfig.json | 4 +- pnpm-lock.yaml | 229 ++++++++++- 10 files changed, 703 insertions(+), 133 deletions(-) delete mode 100644 packages/ui/rollup.config.js create mode 100644 packages/ui/rollup.config.ts create mode 100644 packages/ui/src/lib/primitives/ColorPicker/ColorPickerPresetItem.tsx create mode 100644 packages/ui/tools/build.ts create mode 100644 packages/ui/tools/with-solid.ts diff --git a/packages/ui/package.json b/packages/ui/package.json index 73fc5133e..e77694b32 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -30,7 +30,7 @@ }, "scripts": { "dev": "vite serve ./dev --host", - "build": "rollup -c", + "build": "tsx ./tools/build.ts", "build:vite": "vite build", "build:watch": "vite build --watch", "pre-commit": "lint-staged --relative", @@ -91,9 +91,16 @@ "solid-use": "^0.5.0" }, "devDependencies": { + "@rollup/plugin-babel": "6.0.0", + "@rollup/plugin-node-resolve": "14.1.0", "@types/node": "^18.7.13", + "@vanilla-extract/rollup-plugin": "1.2.0", + "chalk": "4.1.2", + "merge-anything": "5.0.4", + "pretty-ms": "8.0.0", "rimraf": "^3.0.2", "rollup": "^2.78.1", + "rollup-plugin-terser": "7.0.2", "rollup-preset-solid": "^1.4.0", "solid-js": "^1.5.2", "tiny-glob": "^0.2.9", diff --git a/packages/ui/rollup.config.js b/packages/ui/rollup.config.js deleted file mode 100644 index 37de08d03..000000000 --- a/packages/ui/rollup.config.js +++ /dev/null @@ -1,89 +0,0 @@ -import withSolid from 'rollup-preset-solid'; -import ts from 'typescript'; -import {dependencies, peerDependencies} from './package.json'; - -const externals = [ - ...Object.keys(peerDependencies), - ...Object.keys(dependencies), - 'solid-js/web', - 'solid-js/store', - '@vanilla-extract/recipes/createRuntimeFn', -]; - -/** - * - * @param {import('rollup').ModuleFormat} format - */ -function buildOutput(format) { - return { - preserveModules: true, - preserveModulesRoot: 'src', - assetFileNames({name}) { - return name.replace(/^src\//, ''); - }, - exports: 'named', - dir: `./dist/${format}`, - format: format, - }; -} - -/** @type {import('rollup').RollupOptions} */ -const solidConfig = withSolid({ - // TODO: refactor withSolid - input: { - index: 'src/index.tsx', - 'lightTheme.css': './src/lib/themes/light-theme.css.ts', - 'darkTheme.css': './src/lib/themes/dark-theme.css.ts', - }, - targets: ['esm', 'cjs'], - external: externals, - output: [buildOutput('esm'), buildOutput('cjs')], -}); - -/** @type {import('rollup').Plugin} */ -const customTsPlugin = { - name: 'ts', - buildEnd() { - const currentDir = process.cwd(); - const configFile = ts.findConfigFile( - currentDir, - ts.sys.fileExists, - 'tsconfig.json', - ); - if (!configFile) throw Error('tsconfig.json not found'); - const {config} = ts.readConfigFile(configFile, ts.sys.readFile); - - const {options, fileNames, errors} = ts.parseJsonConfigFileContent( - config, - ts.sys, - currentDir, - ); - - const program = ts.createProgram({ - options: { - ...options, - target: ts.ScriptTarget.ESNext, - module: ts.ModuleKind.ESNext, - moduleResolution: ts.ModuleResolutionKind.NodeJs, - jsx: ts.JsxEmit.Preserve, - jsxImportSource: 'solid-js', - declarationMap: false, - outDir: `dist/source`, - declarationDir: 'dist/types', - }, - rootNames: fileNames, - configFileParsingDiagnostics: errors, - }); - - program.emit(); - }, -}; - -solidConfig.plugins = (solidConfig.plugins || []).map(plugin => { - if (plugin && plugin.name === 'ts') { - return customTsPlugin; - } - return plugin; -}); - -export default solidConfig; diff --git a/packages/ui/rollup.config.ts b/packages/ui/rollup.config.ts new file mode 100644 index 000000000..3881b6657 --- /dev/null +++ b/packages/ui/rollup.config.ts @@ -0,0 +1,37 @@ +import {defineConfig, ModuleFormat, OutputOptions, RollupOptions} from 'rollup'; +import {dependencies, peerDependencies} from './package.json'; +import withSolid from './tools/with-solid'; + +const externals = [ + ...Object.keys(peerDependencies), + ...Object.keys(dependencies), + 'solid-js/web', + 'solid-js/store', + '@vanilla-extract/recipes/createRuntimeFn', +]; + +function buildOutput(format: ModuleFormat): OutputOptions { + return { + preserveModules: true, + preserveModulesRoot: 'src', + assetFileNames({name}) { + return name!.replace(/^src\//, ''); + }, + exports: 'named', + dir: `./dist/${format}`, + format: format, + }; +} + +const solidConfig = withSolid({ + input: { + index: 'src/index.tsx', + 'lightTheme.css': './src/lib/themes/light-theme.css.ts', + 'darkTheme.css': './src/lib/themes/dark-theme.css.ts', + }, + targets: ['esm', 'cjs'], + external: externals, + output: [buildOutput('esm'), buildOutput('cjs')], +}); + +export default defineConfig(solidConfig as RollupOptions); diff --git a/packages/ui/src/lib/primitives/ColorPicker/ColorPicker.tsx b/packages/ui/src/lib/primitives/ColorPicker/ColorPicker.tsx index 1ea20dd96..df4691c16 100644 --- a/packages/ui/src/lib/primitives/ColorPicker/ColorPicker.tsx +++ b/packages/ui/src/lib/primitives/ColorPicker/ColorPicker.tsx @@ -5,11 +5,9 @@ import {assignInlineVars} from '@vanilla-extract/dynamic'; import {PropsWithChildren, Show} from 'solid-js'; import {useFloating} from '../../hooks'; import {backgroundColorVar} from '../../theme'; -import {Box} from '../Box'; import {Popover} from '../Popover'; import {createPopoverPortal} from '../Popover/create-popover-portal'; import * as styles from './ColorPicker.css'; -import {ColorPickerColorItemProps} from './ColorPicker.css'; import {ColorPickerPopover} from './ColorPickerPopover'; export interface ColorPickerProps { @@ -100,27 +98,3 @@ export function ColorPicker(props: PropsWithChildren) { ); } - -type ColorPickerPresetItemProps = { - title: string; - color: string; - onClick: (color: string) => void; - active: boolean; -} & ColorPickerColorItemProps; - -export function ColorPickerPresetItem( - props: PropsWithChildren, -) { - return ( - props.onClick(props.color)} - /> - ); -} diff --git a/packages/ui/src/lib/primitives/ColorPicker/ColorPickerPopover.tsx b/packages/ui/src/lib/primitives/ColorPicker/ColorPickerPopover.tsx index 9c3cd97e0..d9ed5b86d 100644 --- a/packages/ui/src/lib/primitives/ColorPicker/ColorPickerPopover.tsx +++ b/packages/ui/src/lib/primitives/ColorPicker/ColorPickerPopover.tsx @@ -14,8 +14,8 @@ import {VStack} from '../Box'; import {FlexField} from '../Field'; import {SegmentedField, SegmentedFieldItem} from '../SegmentedField'; import {TextField} from '../TextField'; -import {ColorPickerPresetItem} from './ColorPicker'; import * as styles from './ColorPicker.css'; +import {ColorPickerPresetItem} from './ColorPickerPresetItem'; enum ColorPickerSelectionMode { gradient = 'gradient', diff --git a/packages/ui/src/lib/primitives/ColorPicker/ColorPickerPresetItem.tsx b/packages/ui/src/lib/primitives/ColorPicker/ColorPickerPresetItem.tsx new file mode 100644 index 000000000..0ec858f00 --- /dev/null +++ b/packages/ui/src/lib/primitives/ColorPicker/ColorPickerPresetItem.tsx @@ -0,0 +1,30 @@ +import {assignInlineVars} from '@vanilla-extract/dynamic'; +import {PropsWithChildren} from 'solid-js'; +import {backgroundColorVar} from '../../theme'; +import {Box} from '../Box'; +import * as styles from './ColorPicker.css'; +import {ColorPickerColorItemProps} from './ColorPicker.css'; + +type ColorPickerPresetItemProps = { + title: string; + color: string; + onClick: (color: string) => void; + active: boolean; +} & ColorPickerColorItemProps; + +export function ColorPickerPresetItem( + props: PropsWithChildren, +) { + return ( + props.onClick(props.color)} + /> + ); +} diff --git a/packages/ui/tools/build.ts b/packages/ui/tools/build.ts new file mode 100644 index 000000000..8e87246d9 --- /dev/null +++ b/packages/ui/tools/build.ts @@ -0,0 +1,56 @@ +import chalk from 'chalk'; +import {isAbsolute, resolve} from 'path'; +import ms from 'pretty-ms'; +import {OutputOptions, rollup, RollupOptions} from 'rollup'; +import rollupConfig from '../rollup.config'; + +const log = chalk; +const outputOptions = rollupConfig.output as OutputOptions[]; + +build(); + +function relativeId(id: string): string { + if (!isAbsolute(id)) return id; + return resolve(id); +} + +async function build() { + let bundle; + const start = Date.now(); + let buildFailed = false; + try { + // create a bundle + const files = outputOptions.map(t => relativeId(t.file! || t.dir!)); + let inputFiles: string | undefined; + if (typeof rollupConfig.input === 'string') { + inputFiles = rollupConfig.input; + } else if (rollupConfig.input instanceof Array) { + inputFiles = rollupConfig.input.join(', '); + } else if ( + typeof rollupConfig.input === 'object' && + rollupConfig.input !== null + ) { + inputFiles = Object.values(rollupConfig.input).join(', '); + } + console.log( + log.cyan(`\n${log.bold(inputFiles!)} → ${log.bold(files.join(', '))}...`), + ); + bundle = await rollup(rollupConfig); + await Promise.all((outputOptions as RollupOptions[]).map(bundle.write)); + console.log( + log.green( + `created ${log.bold(files.join(', '))} in ${chalk.bold( + ms(Date.now() - start), + )}`, + ), + ); + } catch (error) { + buildFailed = true; + console.error(error); + } + if (bundle) { + // closes the bundle + await bundle.close(); + } + process.exit(buildFailed ? 1 : 0); +} diff --git a/packages/ui/tools/with-solid.ts b/packages/ui/tools/with-solid.ts new file mode 100644 index 000000000..9ba27e519 --- /dev/null +++ b/packages/ui/tools/with-solid.ts @@ -0,0 +1,354 @@ +/** + * Portions of this file are based on code from rollu-preset-solid. + * MIT Licensed, Copyright (c) 2022 Alexandre. + * + * Credits to the SolidJS Community team and Alexandre: + * https://github.com/solidjs-community/rollup-preset-solid + */ +import {babel, RollupBabelInputPluginOptions} from '@rollup/plugin-babel'; +import {nodeResolve} from '@rollup/plugin-node-resolve'; +import {rmSync, writeFileSync} from 'fs'; +import {mergeAndConcat} from 'merge-anything'; +import {dirname, parse, resolve} from 'path'; +import {ModuleFormat, OutputOptions, RollupOptions} from 'rollup'; +import {terser} from 'rollup-plugin-terser'; +import ts from 'typescript'; + +function findClosestPackageJson(start = process.cwd(), level = 0): any { + try { + const path = resolve(start, 'package.json'); + return require(path); + } catch { + return level >= 10 ? {} : findClosestPackageJson(dirname(start), level + 1); + } +} + +function getMainSrc(input: {[entryAlias: string]: string} | string) { + if (typeof input === 'object') { + return input.index; + } + return input; +} + +function resolveInput(input: {[entryAlias: string]: string} | string) { + if (typeof input === 'object') { + return Object.fromEntries( + Object.entries(input).map(([module, path]) => [module, resolve(path)]), + ); + } else { + return resolve(input); + } +} + +function processOptions(options: Options, asSubPackage = true): RollupOptions { + const { + targets: buildTargets, + writePackageJson, + printInstructions, + babelOptions, + solidOptions, + mappingName, + ...rollupOptions + } = options; + const currentDir = process.cwd(); + const targets = buildTargets || ['esm']; + const pkg = findClosestPackageJson(currentDir); + const extensions = ['.js', '.ts', '.jsx', '.tsx']; + + const src = options.input || pkg.source; + const indexSrc = getMainSrc(src); + + if (!indexSrc) { + throw new Error( + 'No input was provided. Please provide an input via the "input" option or via "source" in the package.json', + ); + } + + const {name: srcName} = parse(indexSrc); + const name = mappingName || srcName; + + const external = [ + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.peerDependencies || {}), + ]; + + const babelTargets = pkg.browserslist || 'last 2 years'; + + if (!src) { + throw new Error( + 'No input source found. You can add it to the `source` property in your `package.json` or feed it into the `input` option in the `withConfig` function.', + ); + } + + const outputs: OutputOptions[] = [ + { + format: 'cjs', + file: asSubPackage ? resolve(`dist/${name}/index.common.js`) : undefined, + dir: asSubPackage ? undefined : resolve('dist/cjs'), + sourcemap: true, + }, + { + format: 'esm', + file: asSubPackage ? resolve(`dist/${name}/index.module.js`) : undefined, + dir: asSubPackage ? undefined : resolve('dist/esm'), + sourcemap: true, + }, + { + name, + format: 'umd', + file: asSubPackage ? resolve(`dist/${name}/index.umd.js`) : undefined, + dir: asSubPackage ? undefined : resolve('dist/umd'), + sourcemap: true, + plugins: [terser()], + }, + ]; + + const output: OutputOptions[] | OutputOptions = + rollupOptions.output || + outputs.filter(({format}) => targets.includes(format as ModuleFormat)); + + const defaultOptions: Options = { + input: resolveInput(src), + external: ['solid-js', 'solid-js/web', 'solid-js/store', ...external], + output, + plugins: [ + babel({ + extensions, + babelHelpers: 'bundled', + presets: [ + ['babel-preset-solid', solidOptions || {}], + '@babel/preset-typescript', + ['@babel/preset-env', {bugfixes: true, targets: babelTargets}], + ], + ...babelOptions, + }), + nodeResolve({extensions}), + { + name: 'ts', + buildEnd() { + const currentDir = process.cwd(); + const configFile = ts.findConfigFile( + currentDir, + ts.sys.fileExists, + 'tsconfig.json', + ); + if (!configFile) throw Error('tsconfig.json not found'); + const {config} = ts.readConfigFile(configFile, ts.sys.readFile); + + const {options, fileNames, errors} = ts.parseJsonConfigFileContent( + config, + ts.sys, + currentDir, + ); + + const program = ts.createProgram({ + options: { + ...options, + target: ts.ScriptTarget.ESNext, + module: ts.ModuleKind.ESNext, + moduleResolution: ts.ModuleResolutionKind.NodeJs, + jsx: ts.JsxEmit.Preserve, + jsxImportSource: 'solid-js', + declarationMap: false, + outDir: `dist/source`, + declarationDir: 'dist/types', + }, + rootNames: fileNames, + configFileParsingDiagnostics: errors, + }); + + program.emit(); + }, + }, + { + name: 'instructions', + buildEnd() { + if (!printInstructions) return; + + const example = { + files: ['dist'], + main: asSubPackage + ? `dist/${name}/index.common.js` + : `dist/cjs/${name}.js`, + module: asSubPackage + ? `dist/${name}/index.module.js` + : `dist/esm/${name}.js`, + types: asSubPackage + ? `dist/${name}/${name}.d.ts` + : `dist/types/${name}.d.ts`, + exports: { + '.': { + solid: asSubPackage + ? `./dist/${name}/${name}.jsx` + : `./dist/source/${name}.jsx`, + import: asSubPackage + ? `./dist/${name}/index.module.js` + : `./dist/esm/${name}.js`, + browser: asSubPackage + ? `./dist/${name}/index.umd.js` + : `./dist/umd/${name}.js`, + require: asSubPackage + ? `./dist/${name}/index.common.js` + : `./dist/cjs/${name}.js`, + node: asSubPackage + ? `./dist/${name}/index.common.js` + : `./dist/cjs/${name}.js`, + }, + }, + }; + + const hasFormat = (formats: ModuleFormat[]) => { + return Array.isArray(output) + ? output.find(({format}) => + formats.includes(format as ModuleFormat), + ) + : formats.includes(output.format as ModuleFormat); + }; + + if (!hasFormat(['cjs', 'commonjs'])) { + example.main = example.module; + example.exports['.'].require = example.exports['.'].import; + example.exports['.'].node = example.exports['.'].import; + } + + if (!hasFormat(['umd'])) { + example.exports['.'].browser = example.exports['.'].import; + } + }, + }, + { + name: 'generate', + buildEnd() { + if (!writePackageJson) return; + + const build = { + main: `index.common.js`, + module: `index.module.js`, + types: `${name}.d.ts`, + exports: { + '.': { + solid: `./${name}.jsx`, + import: `./index.module.js`, + browser: `./index.umd.js`, + require: `./index.common.js`, + node: `./index.common.js`, + }, + }, + }; + + writeFileSync( + resolve(currentDir, 'dist', name, 'package.json'), + JSON.stringify(build, null, 2), + {encoding: 'utf8'}, + ); + }, + }, + ], + }; + + return mergeAndConcat(rollupOptions, defaultOptions) as RollupOptions; +} + +export default function withSolid(options: Options | Options[] = {}) { + rmSync(resolve(process.cwd(), 'dist'), { + force: true, + recursive: true, + }); + + return Array.isArray(options) + ? options.map(option => processOptions(option, true)) + : processOptions(options, false); +} + +export interface Options extends RollupOptions { + /** + * Defines which target you want + * @default ['esm'] + */ + targets?: ModuleFormat[]; + /** + * Whether to generate a package.json or not + * This is useful for sub packages + * @default false + */ + writePackageJson?: boolean; + /** + * Whether to hint what to put in your package.json or not + * @default false + */ + printInstructions?: boolean; + /** + * This can be used to override the default babel options + * The targets can be set in the "browserslist" field in your `package.json`. + * Beware the options are only merged at the top level. + * If you add babel presets you'll need to add the default one back (as you see fit). + * @default { + * extensions, + * babelHelpers: "bundled", + * presets: ["babel-preset-solid", "@babel/preset-typescript", ['@babel/preset-env', { bugfixes: true, targets: "last 2 years" }]], + * } + */ + babelOptions?: RollupBabelInputPluginOptions; + solidOptions?: SolidOptions; + /** + * TODO: Document this + */ + mappingName?: string; +} + +interface SolidOptions { + /** + * The name of the runtime module to import the methods from. + * + * @default "solid-js/web" + */ + moduleName?: string; + + /** + * The output mode of the compiler. + * Can be: + * - "dom" is standard output + * - "ssr" is for server side rendering of strings. + * + * @default "dom" + */ + generate?: 'ssr' | 'dom'; + + /** + * Indicate whether the output should contain hydratable markers. + * + * @default false + */ + hydratable?: boolean; + + /** + * Boolean to indicate whether to enable automatic event delegation on camelCase. + * + * @default true + */ + delegateEvents?: boolean; + + /** + * Boolean indicates whether smart conditional detection should be used. + * This optimizes simple boolean expressions and ternaries in JSX. + * + * @default true + */ + wrapConditionals?: boolean; + + /** + * Boolean indicates whether to set current render context on Custom Elements and slots. + * Useful for seemless Context API with Web Components. + * + * @default true + */ + contextToCustomElements?: boolean; + + /** + * Array of Component exports from module, that aren't included by default with the library. + * This plugin will automatically import them if it comes across them in the JSX. + * + * @default ["For","Show","Switch","Match","Suspense","SuspenseList","Portal","Index","Dynamic","ErrorBoundary"] + */ + builtIns?: string[]; +} diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index 5f023d5db..fe7b0e8ab 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -11,7 +11,5 @@ "@types/node" ] }, - "include": [ - "./src" - ] + "include": ["src/**/*", "tools/**/*"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca5b19767..94cc620d4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -215,7 +215,7 @@ importers: '@codeimage/highlight': link:../../packages/highlight '@codeimage/locale': link:../../packages/locale '@codeimage/prisma-models': link:../../packages/prisma-models - '@codeimage/ui': link:../../packages/ui + '@codeimage/ui': link:../../packages/ui/dist/source '@codeimage/vanilla-extract': link:../../packages/vanilla-extract '@codemirror/autocomplete': 6.1.0 '@codemirror/commands': 6.1.0 @@ -434,7 +434,7 @@ importers: '@lezer/highlight': 1.0.0 '@primer/primitives': 7.9.0 devDependencies: - '@codeimage/ui': link:../ui + '@codeimage/ui': link:../ui/dist/source '@codeimage/vanilla-extract': link:../vanilla-extract '@codemirror/lang-javascript': 6.1.0 '@rollup/plugin-typescript': 8.4.0_gmqy3ybotxdm4nbudwrtswpjbi @@ -490,6 +490,8 @@ importers: '@floating-ui/core': ^1.0.1 '@floating-ui/dom': ^1.0.1 '@motionone/solid': ^10.14.1 + '@rollup/plugin-babel': 6.0.0 + '@rollup/plugin-node-resolve': 14.1.0 '@solid-aria/button': ^0.1.3 '@solid-aria/collection': ^0.2.0 '@solid-aria/dialog': ^0.1.4 @@ -511,11 +513,16 @@ importers: '@vanilla-extract/dynamic': ^2.0.2 '@vanilla-extract/private': ^1.0.3 '@vanilla-extract/recipes': ^0.2.5 + '@vanilla-extract/rollup-plugin': 1.2.0 '@vanilla-extract/sprinkles': ^1.5.0 + chalk: 4.1.2 clsx: ^1.2.1 csstype: ^3.1.0 + merge-anything: 5.0.4 + pretty-ms: 8.0.0 rimraf: ^3.0.2 rollup: ^2.78.1 + rollup-plugin-terser: 7.0.2 rollup-preset-solid: ^1.4.0 solid-headless: ^0.11.1 solid-js: ^1.5.2 @@ -559,9 +566,16 @@ importers: solid-toast: 0.3.4_solid-js@1.5.2 solid-use: 0.5.0_solid-js@1.5.2 devDependencies: + '@rollup/plugin-babel': 6.0.0_rollup@2.78.1 + '@rollup/plugin-node-resolve': 14.1.0_rollup@2.78.1 '@types/node': 18.7.13 + '@vanilla-extract/rollup-plugin': 1.2.0_rollup@2.78.1 + chalk: 4.1.2 + merge-anything: 5.0.4 + pretty-ms: 8.0.0 rimraf: 3.0.2 rollup: 2.78.1 + rollup-plugin-terser: 7.0.2_rollup@2.78.1 rollup-preset-solid: 1.4.0 solid-js: 1.5.2 tiny-glob: 0.2.9 @@ -570,6 +584,107 @@ importers: vite-plugin-dts: 1.4.1_vite@3.0.9 vite-plugin-solid: 2.3.0_solid-js@1.5.2+vite@3.0.9 + packages/ui/dist/source: + specifiers: + '@codeimage/locale': workspace:* + '@codeimage/vanilla-extract': workspace:* + '@floating-ui/core': ^1.0.1 + '@floating-ui/dom': ^1.0.1 + '@motionone/solid': ^10.14.1 + '@rollup/plugin-babel': 6.0.0 + '@rollup/plugin-node-resolve': 14.1.0 + '@solid-aria/button': ^0.1.3 + '@solid-aria/collection': ^0.2.0 + '@solid-aria/dialog': ^0.1.4 + '@solid-aria/focus': ^0.1.4 + '@solid-aria/i18n': ^0.2.0 + '@solid-aria/interactions': ^0.1.4 + '@solid-aria/menu': ^0.2.0 + '@solid-aria/overlays': ^0.1.3 + '@solid-aria/radio': ^0.1.3 + '@solid-aria/textfield': ^0.0.1 + '@solid-aria/tree': ^0.1.4 + '@solid-aria/types': ^0.1.4 + '@solid-aria/utils': ^0.2.1 + '@solid-primitives/props': ^2.2.1 + '@solid-primitives/refs': ^0.3.1 + '@solid-primitives/utils': ^3.0.1 + '@types/node': ^18.7.13 + '@vanilla-extract/css': ^1.9.1 + '@vanilla-extract/dynamic': ^2.0.2 + '@vanilla-extract/private': ^1.0.3 + '@vanilla-extract/recipes': ^0.2.5 + '@vanilla-extract/rollup-plugin': 1.2.0 + '@vanilla-extract/sprinkles': ^1.5.0 + chalk: 4.1.2 + clsx: ^1.2.1 + csstype: ^3.1.0 + merge-anything: 5.0.4 + pretty-ms: 8.0.0 + rimraf: ^3.0.2 + rollup: ^2.78.1 + rollup-plugin-terser: 7.0.2 + rollup-preset-solid: ^1.4.0 + solid-headless: ^0.11.1 + solid-js: ^1.5.2 + solid-toast: ^0.3.4 + solid-use: ^0.5.0 + tiny-glob: ^0.2.9 + typescript: ^4.8.4 + vite: ^3.0.9 + vite-plugin-dts: ^1.4.1 + vite-plugin-solid: ^2.3.0 + dependencies: + '@codeimage/locale': link:../../../locale + '@codeimage/vanilla-extract': link:../../../vanilla-extract + '@floating-ui/core': 1.0.1 + '@floating-ui/dom': 1.0.1 + '@motionone/solid': 10.14.1_solid-js@1.5.2 + '@solid-aria/button': 0.1.3_solid-js@1.5.2 + '@solid-aria/collection': 0.2.0_solid-js@1.5.2 + '@solid-aria/dialog': 0.1.4_solid-js@1.5.2 + '@solid-aria/focus': 0.1.4_solid-js@1.5.2 + '@solid-aria/i18n': 0.2.0_solid-js@1.5.2 + '@solid-aria/interactions': 0.1.4_solid-js@1.5.2 + '@solid-aria/menu': 0.2.0_solid-js@1.5.2 + '@solid-aria/overlays': 0.1.3_solid-js@1.5.2 + '@solid-aria/radio': 0.1.3_solid-js@1.5.2 + '@solid-aria/textfield': 0.0.1_solid-js@1.5.2 + '@solid-aria/tree': 0.1.4_solid-js@1.5.2 + '@solid-aria/types': 0.1.4_solid-js@1.5.2 + '@solid-aria/utils': 0.2.1_solid-js@1.5.2 + '@solid-primitives/props': 2.2.1_solid-js@1.5.2 + '@solid-primitives/refs': 0.3.1_solid-js@1.5.2 + '@solid-primitives/utils': 3.0.1_solid-js@1.5.2 + '@vanilla-extract/css': 1.9.1 + '@vanilla-extract/dynamic': 2.0.2 + '@vanilla-extract/private': 1.0.3 + '@vanilla-extract/recipes': 0.2.5_@vanilla-extract+css@1.9.1 + '@vanilla-extract/sprinkles': 1.5.0_@vanilla-extract+css@1.9.1 + clsx: 1.2.1 + csstype: 3.1.0 + solid-headless: 0.11.1_solid-js@1.5.2 + solid-toast: 0.3.4_solid-js@1.5.2 + solid-use: 0.5.0_solid-js@1.5.2 + devDependencies: + '@rollup/plugin-babel': 6.0.0_rollup@2.78.1 + '@rollup/plugin-node-resolve': 14.1.0_rollup@2.78.1 + '@types/node': 18.7.18 + '@vanilla-extract/rollup-plugin': 1.2.0_rollup@2.78.1 + chalk: 4.1.2 + merge-anything: 5.0.4 + pretty-ms: 8.0.0 + rimraf: 3.0.2 + rollup: 2.78.1 + rollup-plugin-terser: 7.0.2_rollup@2.78.1 + rollup-preset-solid: 1.4.0 + solid-js: 1.5.2 + tiny-glob: 0.2.9 + typescript: 4.8.4 + vite: 3.1.4 + vite-plugin-dts: 1.4.1_vite@3.1.4 + vite-plugin-solid: 2.3.9_solid-js@1.5.2+vite@3.1.4 + packages/vanilla-extract: specifiers: '@rollup/plugin-typescript': ^8.3.3 @@ -3631,6 +3746,24 @@ packages: rollup: 2.77.0 dev: true + /@rollup/plugin-babel/6.0.0_rollup@2.78.1: + resolution: {integrity: sha512-qM8YIt/2fVxw5O0wUgAeglyC+qx9mg3UtCCLoSqetmQOKipmnQ/X3I0L2sjjb6BswaYpv2tun25lHViU7JPxLQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@types/babel__core': ^7.1.9 + rollup: ^1.20.0||^2.0.0||^3.0.0 + peerDependenciesMeta: + '@types/babel__core': + optional: true + rollup: + optional: true + dependencies: + '@babel/helper-module-imports': 7.18.6 + '@rollup/pluginutils': 4.2.1 + rollup: 2.78.1 + dev: true + /@rollup/plugin-node-resolve/11.2.1_rollup@2.77.0: resolution: {integrity: sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==} engines: {node: '>= 10.0.0'} @@ -3661,6 +3794,21 @@ packages: rollup: 2.78.1 dev: true + /@rollup/plugin-node-resolve/14.1.0_rollup@2.78.1: + resolution: {integrity: sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==} + engines: {node: '>= 10.0.0'} + peerDependencies: + rollup: ^2.78.0 + dependencies: + '@rollup/pluginutils': 3.1.0_rollup@2.78.1 + '@types/resolve': 1.17.1 + deepmerge: 4.2.2 + is-builtin-module: 3.1.0 + is-module: 1.0.0 + resolve: 1.22.1 + rollup: 2.78.1 + dev: true + /@rollup/plugin-replace/2.4.2_rollup@2.77.0: resolution: {integrity: sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==} peerDependencies: @@ -3741,6 +3889,14 @@ packages: rollup: 2.78.1 dev: true + /@rollup/pluginutils/4.2.1: + resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} + engines: {node: '>= 8.0.0'} + dependencies: + estree-walker: 2.0.2 + picomatch: 2.3.1 + dev: true + /@rushstack/node-core-library/3.45.4: resolution: {integrity: sha512-FMoEQWjK7nWAO2uFgV1eVpVhY9ZDGOdIIomi9zTej64cKJ+8/Nvu+ny0xKaUDEjw/ALftN2D2ml7L0RDpW/Z9g==} dependencies: @@ -4299,7 +4455,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.7.13 + '@types/node': 18.7.18 dev: true /@types/semver/6.2.3: @@ -4472,7 +4628,6 @@ packages: '@babel/core': 7.18.9 transitivePeerDependencies: - supports-color - dev: false /@vanilla-extract/css/1.9.1: resolution: {integrity: sha512-pu2SFiff5jRhPwvGoj8cM5l/qIyLvigOmy22ss5DGjwV5pJYezRjDLxWumi2luIwioMWvh9EozCjyfH8nq+7fQ==} @@ -4509,7 +4664,6 @@ packages: outdent: 0.8.0 transitivePeerDependencies: - supports-color - dev: false /@vanilla-extract/private/1.0.3: resolution: {integrity: sha512-17kVyLq3ePTKOkveHxXuIJZtGYs+cSoev7BlP+Lf4916qfDhk/HBjvlYDe8egrea7LNPHKwSZJK/bzZC+Q6AwQ==} @@ -4522,6 +4676,17 @@ packages: '@vanilla-extract/css': 1.9.1 dev: false + /@vanilla-extract/rollup-plugin/1.2.0_rollup@2.78.1: + resolution: {integrity: sha512-ighzVzMyGEmTw+3ZygTwJukjmmVNLCft4NF6VEjElUJM93u3n5Z6O18rqVNBvwGSy2zvEfoSpl9Ven3RHuJgew==} + peerDependencies: + rollup: ^2.0.0 + dependencies: + '@vanilla-extract/integration': 6.0.0 + rollup: 2.78.1 + transitivePeerDependencies: + - supports-color + dev: true + /@vanilla-extract/sprinkles/1.5.0_@vanilla-extract+css@1.9.1: resolution: {integrity: sha512-W58f2Rzz5lLmk0jbhgStVlZl5wEiPB1Ur3fRvUaBM+MrifZ3qskmFq/CiH//fEYeG5Dh9vF1qRviMMH46cX9Nw==} peerDependencies: @@ -6352,7 +6517,6 @@ packages: resolution: {integrity: sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==} hasBin: true requiresBuild: true - dev: false /esbuild/0.14.49: resolution: {integrity: sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==} @@ -6627,6 +6791,10 @@ packages: resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} dev: true + /estree-walker/2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils/2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -6641,7 +6809,6 @@ packages: engines: {node: '>= 0.8'} dependencies: require-like: 0.1.2 - dev: false /event-target-shim/5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} @@ -7860,13 +8027,12 @@ packages: /javascript-stringify/2.1.0: resolution: {integrity: sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==} - dev: false /jest-worker/26.6.2: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 18.7.13 + '@types/node': 18.7.18 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -8374,6 +8540,14 @@ packages: ts-toolbelt: 9.6.0 dev: true + /merge-anything/5.0.4: + resolution: {integrity: sha512-YFsDeY5A9SLXhL21Qn15wCWewRUW6wMTxQF4SuPe9bNdr1wsjiE44Rp8FQUTCtwO0WLdlKiFzhAVE5tlf857Tg==} + engines: {node: '>=12.13'} + dependencies: + is-what: 4.1.7 + ts-toolbelt: 9.6.0 + dev: true + /merge-descriptors/1.0.1: resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} dev: true @@ -8932,6 +9106,11 @@ packages: engines: {node: '>=6'} dev: true + /parse-ms/3.0.0: + resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==} + engines: {node: '>=12'} + dev: true + /parseurl/1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -9187,6 +9366,13 @@ packages: parse-ms: 2.1.0 dev: true + /pretty-ms/8.0.0: + resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==} + engines: {node: '>=14.16'} + dependencies: + parse-ms: 3.0.0 + dev: true + /printable-characters/1.0.42: resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} dev: true @@ -9458,7 +9644,6 @@ packages: /require-like/0.1.2: resolution: {integrity: sha512-oyrU88skkMtDdauHDuKVrgR+zuItqr6/c//FXzvmxRGMexSDc6hNvJInGW3LL46n+8b50RykrvwSUIIQH2LQ5A==} - dev: false /require-main-filename/2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} @@ -9560,7 +9745,7 @@ packages: peerDependencies: rollup: ^2.0.0 dependencies: - '@babel/code-frame': 7.16.7 + '@babel/code-frame': 7.18.6 jest-worker: 26.6.2 rollup: 2.77.0 serialize-javascript: 4.0.0 @@ -9572,7 +9757,7 @@ packages: peerDependencies: rollup: ^2.0.0 dependencies: - '@babel/code-frame': 7.16.7 + '@babel/code-frame': 7.18.6 jest-worker: 26.6.2 rollup: 2.78.1 serialize-javascript: 4.0.0 @@ -10833,6 +11018,24 @@ packages: - supports-color dev: true + /vite-plugin-dts/1.4.1_vite@3.1.4: + resolution: {integrity: sha512-jo7E4ZeheD2o48oGiI3EygPbej7ZkGFHg3GVTt7Wuo6NgzThLvuzGGuduaFpnhJOGi1piDFsu6oui/wDKIIORQ==} + engines: {node: '>=12.0.0'} + peerDependencies: + vite: '>=2.4.4' + dependencies: + '@microsoft/api-extractor': 7.23.0 + '@rushstack/node-core-library': 3.45.4 + chalk: 4.1.2 + debug: 4.3.4 + fast-glob: 3.2.11 + fs-extra: 10.1.0 + ts-morph: 14.0.0 + vite: 3.1.4 + transitivePeerDependencies: + - supports-color + dev: true + /vite-plugin-pwa/0.12.3_vite@3.0.9: resolution: {integrity: sha512-gmYdIVXpmBuNjzbJFPZFzxWYrX4lHqwMAlOtjmXBbxApiHjx9QPXKQPJjSpeTeosLKvVbNcKSAAhfxMda0QVNQ==} peerDependencies: @@ -10876,7 +11079,7 @@ packages: '@babel/core': 7.18.9 '@babel/preset-typescript': 7.18.6_@babel+core@7.18.9 babel-preset-solid: 1.4.8_@babel+core@7.18.9 - merge-anything: 5.0.2 + merge-anything: 5.0.4 solid-js: 1.5.2 solid-refresh: 0.4.1_solid-js@1.5.2 vite: 3.1.4