diff --git a/.eslintrc.js b/.eslintrc.js
index 5ff4cfbe8..95391bb7f 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,3 +1,5 @@
+const path = require('path');
+
// Workaround for https://github.com/import-js/eslint-plugin-import/issues/1810
const noUnresolved = ['error', { ignore: ['@linaria/*'] }];
@@ -147,7 +149,7 @@ module.exports = {
'plugin:import/typescript',
],
parserOptions: {
- project: './tsconfig.eslint.json',
+ project: path.resolve(__dirname, './tsconfig.eslint.json'),
},
rules: {
'import/extensions': 0,
diff --git a/.gitignore b/.gitignore
index 8ba9648c6..26bbece40 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,6 +68,9 @@ esm/
types/
dist/
build/
-tsconfig.tsbuildinfo
+*.tsbuildinfo
.linaria-cache
+
+# IntelliJ IDEA
+.idea
diff --git a/README.md b/README.md
index a1d288f15..0a14de892 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,7 @@ Zero-runtime CSS in JS library.
- Use **JavaScript for logic**, no CSS preprocessor needed
- Optionally use any **CSS preprocessor** such as Sass or PostCSS
- Supports **atomic styles** with `@linaria/atomic`
+- Supports [solidjs](https://solidjs.com/) with `@linaria/sollid`
**[Why use Linaria](/docs/BENEFITS.md)**
diff --git a/babel.config.js b/babel.config.js
index 16d769b4f..c9460c15a 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -76,12 +76,5 @@ module.exports = {
},
},
},
- {
- /**
- * we have to transpile JSX in tests
- */
- test: /\/(__tests__|__fixtures__|packages\/teskit\/src)\//,
- presets: ['@babel/preset-react'],
- },
],
};
diff --git a/examples/solid/.gitignore b/examples/solid/.gitignore
new file mode 100644
index 000000000..76add878f
--- /dev/null
+++ b/examples/solid/.gitignore
@@ -0,0 +1,2 @@
+node_modules
+dist
\ No newline at end of file
diff --git a/examples/solid/.linariarc.mjs b/examples/solid/.linariarc.mjs
new file mode 100644
index 000000000..392fa02dd
--- /dev/null
+++ b/examples/solid/.linariarc.mjs
@@ -0,0 +1,21 @@
+module.exports = {
+ rules: [
+ {
+ action: require.resolve('@linaria/shaker'),
+ },
+ {
+ test: /\/node_modules\//,
+ action: 'ignore',
+ },
+ {
+ test: (filename, code) => {
+ if (!/\/node_modules\//.test(filename)) {
+ return false;
+ }
+
+ return /(?:^|\n|;)\s*(?:export|import)\s+/.test(code);
+ },
+ action: require.resolve('@linaria/shaker'),
+ },
+ ],
+};
diff --git a/examples/solid/README.md b/examples/solid/README.md
new file mode 100644
index 000000000..434f7bb9d
--- /dev/null
+++ b/examples/solid/README.md
@@ -0,0 +1,34 @@
+## Usage
+
+Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`.
+
+This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely be removed once you clone a template.
+
+```bash
+$ npm install # or pnpm install or yarn install
+```
+
+### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs)
+
+## Available Scripts
+
+In the project directory, you can run:
+
+### `npm dev` or `npm start`
+
+Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
+
+The page will reload if you make edits.
+
+### `npm run build`
+
+Builds the app for production to the `dist` folder.
+It correctly bundles Solid in production mode and optimizes the build for the best performance.
+
+The build is minified and the filenames include the hashes.
+Your app is ready to be deployed!
+
+## Deployment
+
+You can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.)
diff --git a/examples/solid/index.html b/examples/solid/index.html
new file mode 100644
index 000000000..48c59fc12
--- /dev/null
+++ b/examples/solid/index.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+ Solid App
+
+
+ You need to enable JavaScript to run this app.
+
+
+
+
+
diff --git a/examples/solid/package.json b/examples/solid/package.json
new file mode 100644
index 000000000..2a1b1d3c1
--- /dev/null
+++ b/examples/solid/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "vite-template-solid",
+ "version": "0.0.0",
+ "description": "",
+ "scripts": {
+ "start": "vite",
+ "dev": "vite",
+ "build": "vite build",
+ "serve": "vite preview"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "@babel/core": "^7.20.2",
+ "@linaria/shaker": "workspace:^",
+ "@linaria/vite": "workspace:^",
+ "babel-preset-solid": "^1.6.2",
+ "babel-preset-typescript": "7.0.0-alpha.19",
+ "vite": "3.1.8",
+ "vite-plugin-solid": "^2.4.0"
+ },
+ "dependencies": {
+ "@linaria/core": "workspace:^",
+ "@linaria/solid": "workspace:^",
+ "solid-js": "^1.6.2"
+ }
+}
diff --git a/examples/solid/src/App.tsx b/examples/solid/src/App.tsx
new file mode 100644
index 000000000..b1efe4788
--- /dev/null
+++ b/examples/solid/src/App.tsx
@@ -0,0 +1,76 @@
+import type { Component } from 'solid-js';
+
+import logo from './logo.svg';
+import { styled } from '@linaria/solid';
+import {css} from '@linaria/core'
+
+const globals = css`
+ :global() {
+ body {
+ margin: 0;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ }
+
+ code {
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
+ }
+ }
+`;
+
+const AppStyled = styled.div`
+ text-align: center;
+`
+
+const HeaderStyled = styled.header`
+ background-color: #282c34;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ font-size: calc(10px + 2vmin);
+ color: white;
+`
+
+const LogoStyled = styled.img`
+ animation: logo-spin infinite 20s linear;
+ height: 40vmin;
+ pointer-events: none;
+
+ @keyframes logo-spin {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+ }
+`
+
+const LinkStyled = styled.a`
+ color: #b318f0;
+`
+
+const App: Component = () => {
+ return (
+
+
+
+
+ Edit src/App.tsx
and save to reload.
+
+
+ Learn Solid
+
+
+
+ );
+};
+
+export default App;
diff --git a/examples/solid/src/assets/favicon.ico b/examples/solid/src/assets/favicon.ico
new file mode 100644
index 000000000..b836b2bcc
Binary files /dev/null and b/examples/solid/src/assets/favicon.ico differ
diff --git a/examples/solid/src/index.tsx b/examples/solid/src/index.tsx
new file mode 100644
index 000000000..2006c751b
--- /dev/null
+++ b/examples/solid/src/index.tsx
@@ -0,0 +1,6 @@
+/* @refresh reload */
+import { render } from 'solid-js/web';
+
+import App from './App';
+
+render(() => , document.getElementById('root') as HTMLElement);
diff --git a/examples/solid/src/logo.svg b/examples/solid/src/logo.svg
new file mode 100644
index 000000000..025aa303c
--- /dev/null
+++ b/examples/solid/src/logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/examples/solid/tsconfig.json b/examples/solid/tsconfig.json
new file mode 100644
index 000000000..249b2732a
--- /dev/null
+++ b/examples/solid/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "compilerOptions": {
+ "strict": true,
+ "target": "ESNext",
+ "module": "ESNext",
+ "moduleResolution": "node",
+ "allowSyntheticDefaultImports": true,
+ "esModuleInterop": true,
+ "jsx": "preserve",
+ "jsxImportSource": "solid-js",
+ "types": ["vite/client"],
+ "noEmit": true,
+ "isolatedModules": true
+ }
+}
diff --git a/examples/solid/vite.config.ts b/examples/solid/vite.config.ts
new file mode 100644
index 000000000..2d5796d29
--- /dev/null
+++ b/examples/solid/vite.config.ts
@@ -0,0 +1,29 @@
+import { defineConfig } from 'vite';
+import solidPlugin from 'vite-plugin-solid';
+import linaria from '@linaria/vite';
+
+export default defineConfig({
+ plugins: [
+ {
+ ...linaria({
+ include: ['./src/**/*.tsx'],
+ babelOptions: {
+ overrides: [
+ {
+ test: ['./src/**/*.tsx'],
+ presets: ['typescript', 'solid'],
+ },
+ ],
+ },
+ }),
+ enforce: 'pre'
+ },
+ solidPlugin(),
+ ],
+ server: {
+ port: 3000,
+ },
+ build: {
+ target: 'esnext',
+ },
+});
diff --git a/package.json b/package.json
index 4923606d6..47f1a274e 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
+ "eslint-plugin-expect-type": "^0.2.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
diff --git a/packages/babel/src/index.ts b/packages/babel/src/index.ts
index c8d7450ab..0bbca479b 100644
--- a/packages/babel/src/index.ts
+++ b/packages/babel/src/index.ts
@@ -18,7 +18,7 @@ export * from './utils/collectTemplateDependencies';
export { default as collectTemplateDependencies } from './utils/collectTemplateDependencies';
export { default as withLinariaMetadata } from './utils/withLinariaMetadata';
export { default as Module } from './module';
-export { default as transform } from './transform';
+export { default as transform, transformSync } from './transform';
export * from './types';
export { default as loadLinariaOptions } from './transform-stages/helpers/loadLinariaOptions';
export type { PluginOptions } from './transform-stages/helpers/loadLinariaOptions';
diff --git a/packages/react/babel.config.js b/packages/react/babel.config.js
index c9ad680b1..04587ccff 100644
--- a/packages/react/babel.config.js
+++ b/packages/react/babel.config.js
@@ -1,3 +1,9 @@
-const config = require('../../babel.config');
-
-module.exports = config;
+module.exports = {
+ extends: '../../babel.config',
+ overrides: [
+ {
+ test: ['__tests__/**/*.tsx'],
+ presets: ['@babel/preset-react'],
+ },
+ ],
+};
diff --git a/packages/solid/.eslintrc.json b/packages/solid/.eslintrc.json
new file mode 100644
index 000000000..506747316
--- /dev/null
+++ b/packages/solid/.eslintrc.json
@@ -0,0 +1,12 @@
+{
+ "extends": ["../../.eslintrc.js"],
+ "overrides": [
+ {
+ "files": ["__dtslint__/**/*.tsx", "__dtslint__/**/*.ts"],
+ "plugins": ["expect-type"],
+ "extends": [
+ "plugin:eslint-plugin-expect-type/recommended"
+ ]
+ }
+ ]
+}
diff --git a/packages/solid/README.md b/packages/solid/README.md
new file mode 100644
index 000000000..19a7da862
--- /dev/null
+++ b/packages/solid/README.md
@@ -0,0 +1,46 @@
+
+
+
+
+
+Zero-runtime CSS in JS library.
+
+
+---
+
+# @linaria/solid
+
+### 📖 Please refer to the [GitHub](https://github.com/callstack/linaria#readme) for full documentation.
+
+**[Why use Linaria](../../docs/BENEFITS.md)**
+
+## Features
+
+- supports a subset of `styled-components` syntax (`styled.div`, `styled(Component)`, property interpolations)
+
+## Limitations
+
+- does not support theming through arguments to property interpolations (yet)
+
+## Installation
+
+```sh
+npm install @linaria/babel-preset @linaria/solid babel-preset-solid
+```
+
+or
+
+```sh
+yarn install @linaria/babel-preset @linaria/solid babel-preset-solid
+```
+
+## Configuration
+
+For the time of this writing, `@linaria/solid` supports configuration only via babel configuration.
+Just add `solid` to the `"presets"` section in your `babel.config.js` _after_ `"@linaria"`:
+
+```json
+{
+ "presets": ["@linaria", "solid"]
+}
+```
diff --git a/packages/solid/__dtslint__/typings.tsx b/packages/solid/__dtslint__/typings.tsx
new file mode 100644
index 000000000..4dc564c56
--- /dev/null
+++ b/packages/solid/__dtslint__/typings.tsx
@@ -0,0 +1,89 @@
+/* eslint-disable @typescript-eslint/no-unused-vars */
+import type { ComponentProps, JSX } from 'solid-js';
+import { type Component } from 'solid-js';
+
+import { styled } from '../src';
+
+type Extends = A extends B ? true : false;
+declare function isAssignable(): Source extends Target
+ ? true
+ : false;
+declare function isEqual(): [Source, Target] extends [
+ Target,
+ Source
+]
+ ? true
+ : false;
+
+{
+ // returns tag component taking only html props
+ const C = styled.div`
+ ${(props) => {
+ // $ExpectType true
+ isEqual>();
+ return undefined;
+ }}
+ `;
+ // $ExpectType true
+ isAssignable>>();
+ // $ExpectType false
+ isAssignable<{ foo: string }, ComponentProps>();
+}
+
+{
+ // allows adding extra props
+ interface ExtraProps {
+ readonly foo: string;
+ }
+ const C = styled.div`
+ ${(props) => {
+ // $ExpectType true
+ isEqual & ExtraProps>();
+ return undefined;
+ }}
+ `;
+ // $ExpectType true
+ isAssignable<
+ typeof C,
+ Component & ExtraProps>
+ >();
+ type Props = ComponentProps;
+ // $ExpectType false
+ isAssignable>();
+ // $ExpectType true
+ isAssignable();
+ // $ExpectType false
+ isAssignable();
+}
+
+{
+ // allows styled component interpolation
+ const A = styled.div``;
+ const B = styled.div`
+ // show not raise error
+ ${A} {
+ }
+ `;
+}
+
+((/* Issue #872 */) => {
+ interface BaseProps {
+ readonly class?: string;
+ readonly style?: JSX.CSSProperties;
+ }
+
+ interface ResultProps extends BaseProps {
+ title: string;
+ }
+
+ const Flow = (Cmp: Component) =>
+ styled(Cmp)`
+ display: flow;
+ `;
+
+ const Component: Component = (props) =>
;
+
+ const Implementation = Flow(Component);
+
+ (() => )();
+})();
diff --git a/packages/solid/babel.config.js b/packages/solid/babel.config.js
new file mode 100644
index 000000000..d0ad97f16
--- /dev/null
+++ b/packages/solid/babel.config.js
@@ -0,0 +1,9 @@
+module.exports = {
+ extends: '../../babel.config',
+ overrides: [
+ {
+ test: /\/(__tests__)\//,
+ presets: ['solid'],
+ },
+ ],
+};
diff --git a/packages/solid/package.json b/packages/solid/package.json
new file mode 100644
index 000000000..28d8cc011
--- /dev/null
+++ b/packages/solid/package.json
@@ -0,0 +1,96 @@
+{
+ "name": "@linaria/solid",
+ "description": "Blazing fast zero-runtime CSS in JS library for SolidJS",
+ "version": "4.3.0",
+ "bugs": "https://github.com/callstack/linaria/issues",
+ "contributors": [
+ {
+ "name": "Kirill Agalakov",
+ "email": "raveclassic@gmail.com",
+ "url": "https://github.com/raveclassic"
+ }
+ ],
+ "dependencies": {
+ "@linaria/core": "workspace:^",
+ "@linaria/tags": "workspace:^"
+ },
+ "devDependencies": {
+ "@babel/types": "^7.20.2",
+ "@types/node": "^17.0.39",
+ "solid-js": "^1.6.2"
+ },
+ "engines": {
+ "node": "^12.16.0 || >=13.7.0"
+ },
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "types": "./types/index.d.ts",
+ "import": "./dist/index.mjs",
+ "default": "./dist/index.js"
+ },
+ "./*": {
+ "types": "./types/*.d.ts",
+ "import": "./dist/*.mjs",
+ "default": "./dist/*.js"
+ }
+ },
+ "files": [
+ "esm/",
+ "lib/",
+ "processors/",
+ "types/",
+ "linaria.config.js"
+ ],
+ "homepage": "https://github.com/callstack/linaria#readme",
+ "keywords": [
+ "css",
+ "css-in-js",
+ "linaria",
+ "solid",
+ "styled-components"
+ ],
+ "license": "MIT",
+ "linaria": {
+ "tags": {
+ "styled": "./dist/processors/styled.js"
+ }
+ },
+ "main": "dist/index.js",
+ "module": "dist/index.mjs",
+ "peerDependencies": {
+ "solid-js": "^1.6.0"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": "git@github.com:callstack/linaria.git",
+ "scripts": {
+ "build": "pnpm build:dist && pnpm build:declarations",
+ "build:corejs-test": "cross-env NODE_ENV=legacy babel src --out-dir lib --extensions '.js,.jsx,.ts,.tsx' --ignore \"src/processors/**/*\"",
+ "build:declarations": "tsc -p tsconfig.lib.json --emitDeclarationOnly --noEmit false --outDir types",
+ "build:dist": "tsup --format cjs,esm",
+ "test": "jest --passWithNoTests --config ../../jest.config.js --rootDir .",
+ "typecheck": "tsc -b tsconfig.spec.json",
+ "watch": "pnpm build:dist --watch & pnpm build:declarations --watch"
+ },
+ "sideEffects": false,
+ "tsup": {
+ "entry": [
+ "src/index.ts",
+ "src/processors/styled.ts"
+ ],
+ "splitting": false,
+ "sourcemap": true,
+ "clean": true,
+ "tsconfig": "./tsconfig.lib.json"
+ },
+ "types": "types/index.d.ts",
+ "typesVersions": {
+ "*": {
+ "processors/*": [
+ "./types/processors/*.d.ts"
+ ]
+ }
+ }
+}
diff --git a/packages/solid/processors/styled.js b/packages/solid/processors/styled.js
new file mode 100644
index 000000000..885faefaf
--- /dev/null
+++ b/packages/solid/processors/styled.js
@@ -0,0 +1,5 @@
+Object.defineProperty(exports, '__esModule', {
+ value: true,
+});
+
+exports.default = require('../dist/processors/styled').default;
diff --git a/packages/solid/src/index.ts b/packages/solid/src/index.ts
new file mode 100644
index 000000000..2740fb3df
--- /dev/null
+++ b/packages/solid/src/index.ts
@@ -0,0 +1,6 @@
+export {
+ styled,
+ type Styled,
+ type StyledTag,
+ type StyledComponent,
+} from './styled';
diff --git a/packages/solid/src/processors/styled.ts b/packages/solid/src/processors/styled.ts
new file mode 100644
index 000000000..9ebb81926
--- /dev/null
+++ b/packages/solid/src/processors/styled.ts
@@ -0,0 +1,297 @@
+import type {
+ Expression,
+ Identifier,
+ ObjectExpression,
+ ReturnStatement,
+ SourceLocation,
+ Statement,
+ VariableDeclaration,
+} from '@babel/types';
+
+import {
+ type IInterpolation,
+ hasMeta,
+ type Params,
+ type Rules,
+ TaggedTemplateProcessor,
+ type TailProcessorParams,
+ validateParams,
+ type ValueCache,
+ type WrappedNode,
+ ValueType,
+} from '@linaria/tags';
+
+export default class StyledProcessor extends TaggedTemplateProcessor {
+ public component: WrappedNode;
+
+ #variableIdx = 0;
+
+ #variablesCache = new Map();
+
+ constructor(params: Params, ...args: TailProcessorParams) {
+ validateParams(
+ params,
+ ['tag', ['call', 'member'], ['template', 'call']],
+ 'Invalid usage of `styled` tag'
+ );
+
+ const [tag, tagOp, template] = params;
+
+ super([tag, template[0] === 'call' ? ['template', []] : template], ...args);
+
+ let component: WrappedNode | undefined;
+ if (tagOp[0] === 'call' && tagOp.length === 2) {
+ const value = tagOp[1];
+ if (value.kind === ValueType.CONST) {
+ component = typeof value.value === 'string' ? value.value : undefined;
+ } else {
+ component = {
+ node: value.ex,
+ source: value.source,
+ };
+ }
+
+ this.dependencies.push(value);
+ }
+
+ if (tagOp[0] === 'member') {
+ [, component] = tagOp;
+ }
+
+ if (!component) {
+ throw new Error('Invalid usage of `styled` tag');
+ }
+
+ this.component = component;
+ }
+
+ public override addInterpolation(
+ node: Expression,
+ precedingCss: string,
+ source: string,
+ unit = ''
+ ): string {
+ const id = this.getVariableId(source + unit);
+
+ this.interpolations.push({
+ id,
+ node,
+ source,
+ unit,
+ });
+
+ return id;
+ }
+
+ public override doEvaltimeReplacement(): void {
+ this.replacer(this.value, false);
+ }
+
+ public override doRuntimeReplacement(): void {
+ const t = this.astService;
+
+ const statements: Statement[] = [
+ this.getClassNameConstantDeclaration(),
+ this.getStyleConstantDeclaration(),
+ ];
+ if (typeof this.component === 'string') {
+ // tag
+ statements.push(this.getComponentReturnStatement(this.component));
+ } else {
+ // component or anonymous function
+ statements.push(
+ this.getComponentConstantDeclaration(this.component.node, 'Component'),
+ this.getComponentReturnStatement('Component')
+ );
+ }
+ const body = t.arrowFunctionExpression(
+ [t.identifier('props')],
+ t.blockStatement(statements)
+ );
+ this.replacer(body, false);
+ }
+
+ public override extractRules(
+ valueCache: ValueCache,
+ cssText: string,
+ loc?: SourceLocation | null
+ ): Rules {
+ const rules: Rules = {};
+
+ let selector = `.${this.className}`;
+
+ // If `styled` wraps another component and not a primitive,
+ // get its class name to create a more specific selector
+ // it'll ensure that styles are overridden properly
+ let value =
+ typeof this.component === 'string'
+ ? null
+ : valueCache.get(this.component.node.name);
+ while (hasMeta(value)) {
+ selector += `.${value.__linaria.className}`;
+ value = value.__linaria.extends;
+ }
+
+ rules[selector] = {
+ cssText,
+ className: this.className,
+ displayName: this.displayName,
+ start: loc?.start ?? null,
+ };
+
+ return rules;
+ }
+
+ public override get asSelector(): string {
+ return `.${this.className}`;
+ }
+
+ public override get value(): ObjectExpression {
+ const t = this.astService;
+ const extendsNode =
+ typeof this.component === 'string' ? null : this.component.node.name;
+
+ return t.objectExpression([
+ t.objectProperty(
+ t.stringLiteral('displayName'),
+ t.stringLiteral(this.displayName)
+ ),
+ t.objectProperty(
+ t.stringLiteral('__linaria'),
+ t.objectExpression([
+ t.objectProperty(
+ t.stringLiteral('className'),
+ t.stringLiteral(this.className)
+ ),
+ t.objectProperty(
+ t.stringLiteral('extends'),
+ extendsNode
+ ? t.callExpression(t.identifier(extendsNode), [])
+ : t.nullLiteral()
+ ),
+ ])
+ ),
+ ]);
+ }
+
+ public override toString(): string {
+ if (typeof this.component === 'string') {
+ return `${this.tagSourceCode()}('${this.component}')\`…\``;
+ }
+
+ return `${this.tagSourceCode()}('${this.component.source}')\`…\``;
+ }
+
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ protected getVariableId(value: string): string {
+ if (!this.#variablesCache.has(value)) {
+ // make the variable unique to this styled component
+ // eslint-disable-next-line no-plusplus
+ this.#variablesCache.set(value, `${this.slug}-${this.#variableIdx++}`);
+ }
+
+ return this.#variablesCache.get(value)!;
+ }
+
+ private getClassNameConstantDeclaration(): VariableDeclaration {
+ const t = this.astService;
+ return t.variableDeclaration('const', [
+ t.variableDeclarator(
+ t.identifier('className'),
+ t.binaryExpression(
+ '+',
+ t.stringLiteral(this.className),
+ t.conditionalExpression(
+ t.memberExpression(t.identifier('props'), t.identifier('class')),
+ t.binaryExpression(
+ '+',
+ t.stringLiteral(' '),
+ t.memberExpression(t.identifier('props'), t.identifier('class'))
+ ),
+ t.stringLiteral('')
+ )
+ )
+ ),
+ ]);
+ }
+
+ private getComponentConstantDeclaration(
+ node: Identifier,
+ constantName: string
+ ): VariableDeclaration {
+ const t = this.astService;
+
+ return t.variableDeclaration('const', [
+ t.variableDeclarator(
+ t.identifier(constantName),
+ t.callExpression(node, [])
+ ),
+ ]);
+ }
+
+ private getComponentReturnStatement(componentName: string): ReturnStatement {
+ const t = this.astService;
+ return t.returnStatement(
+ t.jsxElement(
+ t.jsxOpeningElement(
+ t.jsxIdentifier(componentName),
+ [
+ t.jsxSpreadAttribute(t.identifier('props')),
+ t.jsxAttribute(
+ t.jsxIdentifier('class'),
+ t.jsxExpressionContainer(t.identifier('className'))
+ ),
+ t.jsxAttribute(
+ t.jsxIdentifier('style'),
+ t.jsxExpressionContainer(t.identifier('style'))
+ ),
+ ],
+ true
+ ),
+ undefined,
+ []
+ )
+ );
+ }
+
+ private getStyleConstantDeclaration(): VariableDeclaration {
+ const t = this.astService;
+
+ return t.variableDeclaration('const', [
+ t.variableDeclarator(
+ t.identifier('style'),
+ this.getStyleConstantValueExpression()
+ ),
+ ]);
+ }
+
+ private getStyleConstantValueExpression(): Expression {
+ const t = this.astService;
+
+ if (this.interpolations.length === 0) {
+ return t.memberExpression(t.identifier('props'), t.identifier('style'));
+ }
+ const vars: Record = {};
+ this.interpolations.forEach((interpolation) => {
+ vars[`--${interpolation.id}`] = this.getVarExpression(interpolation);
+ });
+ const wrapped = Object.entries(vars).map(([id, expression]) =>
+ t.objectProperty(t.stringLiteral(id), expression)
+ );
+ return t.objectExpression([
+ ...wrapped,
+ t.spreadElement(
+ t.memberExpression(t.identifier('props'), t.identifier('style'))
+ ),
+ ]);
+ }
+
+ private getVarExpression(interpolation: IInterpolation): Expression {
+ const t = this.astService;
+ const { node, unit } = interpolation;
+ const call = t.callExpression(t.callExpression(node, []), [
+ t.identifier('props'),
+ ]);
+ return unit ? t.binaryExpression('+', call, t.stringLiteral(unit)) : call;
+ }
+}
diff --git a/packages/solid/src/styled.ts b/packages/solid/src/styled.ts
new file mode 100644
index 000000000..cca436123
--- /dev/null
+++ b/packages/solid/src/styled.ts
@@ -0,0 +1,46 @@
+import type { JSX, Component } from 'solid-js';
+
+import type { CSSProperties } from '@linaria/core';
+import type { StyledMeta } from '@linaria/tags';
+
+type TagExpression =
+ | string
+ | number
+ | CSSProperties
+ | StyledMeta
+ | (Props extends { readonly style?: JSX.CSSProperties | string }
+ ? (props: Props) => string | number | undefined
+ : (props: 'The target component must have a style prop') => unknown);
+
+export interface StyledComponent extends StyledMeta, Component {}
+
+export interface StyledTag {
+ (
+ strings: TemplateStringsArray,
+ ...expressions: readonly TagExpression[]
+ ): StyledComponent;
+ >(
+ strings: TemplateStringsArray,
+ ...expressions: readonly TagExpression[]
+ ): StyledComponent;
+}
+export interface Styled {
+ (componentWithStyle: () => unknown): (
+ error: 'The target component must have a class prop'
+ ) => void;
+ (
+ component: Component
+ ): StyledTag;
+}
+
+type StyledJSXIntrinsics = {
+ readonly [TagName in keyof JSX.IntrinsicElements]: StyledTag<
+ JSX.IntrinsicElements[TagName]
+ >;
+};
+
+export const styled: Styled & StyledJSXIntrinsics = (() => {
+ throw new Error(
+ 'Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup'
+ );
+}) as never;
diff --git a/packages/solid/tsconfig.json b/packages/solid/tsconfig.json
new file mode 100644
index 000000000..0ff9a27f8
--- /dev/null
+++ b/packages/solid/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "paths": {},
+ "types": [],
+ "noEmit": true,
+ "composite": false,
+ "jsx": "preserve",
+ "jsxImportSource": "solid-js"
+ },
+ "files": [],
+ "include": [],
+ "exclude": [],
+ "references": [
+// { "path": "../core" },
+ { "path": "./tsconfig.lib.json" },
+ { "path": "./tsconfig.spec.json" }
+ ]
+}
diff --git a/packages/solid/tsconfig.lib.json b/packages/solid/tsconfig.lib.json
new file mode 100644
index 000000000..b0448a482
--- /dev/null
+++ b/packages/solid/tsconfig.lib.json
@@ -0,0 +1,9 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "rootDir": "src/",
+ "types": ["node"]
+ },
+ "include": ["**/*.ts", "**/*.tsx"],
+ "exclude": ["__tests__", "__dtslint__", "types", "esm", "lib", ".turbo", "tmp"]
+}
diff --git a/packages/solid/tsconfig.spec.json b/packages/solid/tsconfig.spec.json
new file mode 100644
index 000000000..3924dbf42
--- /dev/null
+++ b/packages/solid/tsconfig.spec.json
@@ -0,0 +1,9 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "noEmit": true,
+ "types": ["jest", "node"]
+ },
+ "include": ["__tests__", "__dtslint__"],
+ "exclude": ["types", "esm", "lib", ".turbo", "tmp"]
+}
diff --git a/packages/testkit/babel.config.js b/packages/testkit/babel.config.js
new file mode 100644
index 000000000..2eb1f97fb
--- /dev/null
+++ b/packages/testkit/babel.config.js
@@ -0,0 +1,9 @@
+module.exports = {
+ extends: '../../babel.config',
+ overrides: [
+ {
+ test: 'src',
+ presets: ['@babel/preset-react'],
+ },
+ ],
+};
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5925ae176..ca1c0c9ec 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -32,6 +32,7 @@ importers:
eslint-config-airbnb: ^19.0.4
eslint-config-airbnb-typescript: ^17.0.0
eslint-config-prettier: ^8.5.0
+ eslint-plugin-expect-type: ^0.2.1
eslint-plugin-import: ^2.26.0
eslint-plugin-jsx-a11y: ^6.5.1
eslint-plugin-prettier: ^4.0.0
@@ -73,6 +74,7 @@ importers:
eslint-config-airbnb: 19.0.4_dwfgiixbwetqupsqmiuv57rzoi
eslint-config-airbnb-typescript: 17.0.0_2hiyrae7qweshky5h3gt7obpny
eslint-config-prettier: 8.5.0_eslint@8.16.0
+ eslint-plugin-expect-type: 0.2.1_vjep2yp2sits3sqnodefgcbnfi
eslint-plugin-import: 2.26.0_bkngvi3wcdllq54uhhavdagiee
eslint-plugin-jsx-a11y: 6.5.1_eslint@8.16.0
eslint-plugin-prettier: 4.0.0_6edyqcvmz3ta2ebn7rq2nny6ci
@@ -145,6 +147,31 @@ importers:
rollup: 2.76.0
rollup-plugin-css-only: 3.1.0_rollup@2.76.0
+ examples/solid:
+ specifiers:
+ '@babel/core': ^7.20.2
+ '@linaria/core': workspace:^
+ '@linaria/shaker': workspace:^
+ '@linaria/solid': workspace:^
+ '@linaria/vite': workspace:^
+ babel-preset-solid: ^1.6.2
+ babel-preset-typescript: 7.0.0-alpha.19
+ solid-js: ^1.6.2
+ vite: 3.1.8
+ vite-plugin-solid: ^2.4.0
+ dependencies:
+ '@linaria/core': link:../../packages/core
+ '@linaria/solid': link:../../packages/solid
+ solid-js: 1.6.2
+ devDependencies:
+ '@babel/core': 7.20.2
+ '@linaria/shaker': link:../../packages/shaker
+ '@linaria/vite': link:../../packages/vite
+ babel-preset-solid: 1.6.2_@babel+core@7.20.2
+ babel-preset-typescript: 7.0.0-alpha.19
+ vite: 3.1.8
+ vite-plugin-solid: 2.4.0_solid-js@1.6.2+vite@3.1.8
+
examples/vite:
specifiers:
'@linaria/shaker': workspace:^
@@ -536,6 +563,21 @@ importers:
ts-jest: 28.0.4_7im4dvioa2uvrabfr5amyoxi3e
typescript: 4.7.4
+ packages/solid:
+ specifiers:
+ '@babel/types': ^7.20.2
+ '@linaria/core': workspace:^
+ '@linaria/tags': workspace:^
+ '@types/node': ^17.0.39
+ solid-js: ^1.6.2
+ dependencies:
+ '@linaria/core': link:../core
+ '@linaria/tags': link:../tags
+ devDependencies:
+ '@babel/types': 7.20.2
+ '@types/node': 17.0.39
+ solid-js: 1.6.2
+
packages/stylelint:
specifiers:
'@linaria/babel-preset': workspace:^
@@ -2605,15 +2647,6 @@ packages:
resolution: {integrity: sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA==}
dev: false
- /@esbuild/android-arm/0.15.11:
- resolution: {integrity: sha512-PzMcQLazLBkwDEkrNPi9AbjFt6+3I7HKbiYF2XtWQ7wItrHvEOeO3T8Am434zAozWtVP7lrTue1bEfc2nYWeCA==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [android]
- requiresBuild: true
- dev: true
- optional: true
-
/@esbuild/android-arm/0.15.12:
resolution: {integrity: sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA==}
engines: {node: '>=12'}
@@ -2623,15 +2656,6 @@ packages:
dev: true
optional: true
- /@esbuild/linux-loong64/0.15.11:
- resolution: {integrity: sha512-geWp637tUhNmhL3Xgy4Bj703yXB9dqiLJe05lCUfjSFDrQf9C/8pArusyPUbUbPwlC/EAUjBw32sxuIl/11dZw==}
- engines: {node: '>=12'}
- cpu: [loong64]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/@esbuild/linux-loong64/0.15.12:
resolution: {integrity: sha512-tZEowDjvU7O7I04GYvWQOS4yyP9E/7YlsB0jjw1Ycukgr2ycEzKyIk5tms5WnLBymaewc6VmRKnn5IJWgK4eFw==}
engines: {node: '>=12'}
@@ -4610,10 +4634,24 @@ packages:
transitivePeerDependencies:
- supports-color
+ /babel-plugin-syntax-object-rest-spread/7.0.0-alpha.19:
+ resolution: {integrity: sha512-Jo9wXmU9AtufOFPdQpedc+j7Ck5okGYsK0zkk2NZNae61SAtuMF5M3aRUeZusrssPqWC32pOiBokbApIFHdlXw==}
+ dev: true
+
+ /babel-plugin-syntax-typescript/7.0.0-alpha.19:
+ resolution: {integrity: sha512-jLuaWfoQsVr8/hmZtWB+86tZ5jYmOYV6kq70EkSUT7RR+gfeYOExS0FjObbbp+WExZNpBaRZvlyikNk3hCQGeQ==}
+ dev: true
+
/babel-plugin-transform-react-remove-prop-types/0.4.24:
resolution: {integrity: sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA==}
dev: false
+ /babel-plugin-transform-typescript/7.0.0-alpha.19:
+ resolution: {integrity: sha512-OtkOYcYRffmC38/UjDZn2cvM2qarqDT748TbSJtVpNb7EvDLQcfPn9+0adk8oqmhc0lk+Ldy/2daGMNMxW0vuQ==}
+ dependencies:
+ babel-plugin-syntax-typescript: 7.0.0-alpha.19
+ dev: true
+
/babel-polyfill/6.26.0:
resolution: {integrity: sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ==}
dependencies:
@@ -4662,6 +4700,13 @@ packages:
babel-plugin-jsx-dom-expressions: 0.35.4_@babel+core@7.20.2
dev: true
+ /babel-preset-typescript/7.0.0-alpha.19:
+ resolution: {integrity: sha512-2VGIgn58ohmVXhc+qAx0OsihQHQm5R+Y1Mu7bu98HbCJtR/CzEdZs8qCtPb1XmYKF8XRNvZQge44dPTVimI2/w==}
+ dependencies:
+ babel-plugin-syntax-object-rest-spread: 7.0.0-alpha.19
+ babel-plugin-transform-typescript: 7.0.0-alpha.19
+ dev: true
+
/babel-runtime/6.26.0:
resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==}
dependencies:
@@ -6092,15 +6137,6 @@ packages:
dev: true
optional: true
- /esbuild-android-64/0.15.11:
- resolution: {integrity: sha512-rrwoXEiuI1kaw4k475NJpexs8GfJqQUKcD08VR8sKHmuW9RUuTR2VxcupVvHdiGh9ihxL9m3lpqB1kju92Ialw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [android]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-android-64/0.15.12:
resolution: {integrity: sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q==}
engines: {node: '>=12'}
@@ -6119,15 +6155,6 @@ packages:
dev: true
optional: true
- /esbuild-android-arm64/0.15.11:
- resolution: {integrity: sha512-/hDubOg7BHOhUUsT8KUIU7GfZm5bihqssvqK5PfO4apag7YuObZRZSzViyEKcFn2tPeHx7RKbSBXvAopSHDZJQ==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-android-arm64/0.15.12:
resolution: {integrity: sha512-Hc9SEcZbIMhhLcvhr1DH+lrrec9SFTiRzfJ7EGSBZiiw994gfkVV6vG0sLWqQQ6DD7V4+OggB+Hn0IRUdDUqvA==}
engines: {node: '>=12'}
@@ -6146,15 +6173,6 @@ packages:
dev: true
optional: true
- /esbuild-darwin-64/0.15.11:
- resolution: {integrity: sha512-1DqHD0ms3AhiwkKnjRUzmiW7JnaJJr5FKrPiR7xuyMwnjDqvNWDdMq4rKSD9OC0piFNK6n0LghsglNMe2MwJtA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [darwin]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-darwin-64/0.15.12:
resolution: {integrity: sha512-qkmqrTVYPFiePt5qFjP8w/S+GIUMbt6k8qmiPraECUWfPptaPJUGkCKrWEfYFRWB7bY23FV95rhvPyh/KARP8Q==}
engines: {node: '>=12'}
@@ -6173,15 +6191,6 @@ packages:
dev: true
optional: true
- /esbuild-darwin-arm64/0.15.11:
- resolution: {integrity: sha512-OMzhxSbS0lwwrW40HHjRCeVIJTURdXFA8c3GU30MlHKuPCcvWNUIKVucVBtNpJySXmbkQMDJdJNrXzNDyvoqvQ==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-darwin-arm64/0.15.12:
resolution: {integrity: sha512-z4zPX02tQ41kcXMyN3c/GfZpIjKoI/BzHrdKUwhC/Ki5BAhWv59A9M8H+iqaRbwpzYrYidTybBwiZAIWCLJAkw==}
engines: {node: '>=12'}
@@ -6200,15 +6209,6 @@ packages:
dev: true
optional: true
- /esbuild-freebsd-64/0.15.11:
- resolution: {integrity: sha512-8dKP26r0/Qyez8nTCwpq60QbuYKOeBygdgOAWGCRalunyeqWRoSZj9TQjPDnTTI9joxd3QYw3UhVZTKxO9QdRg==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [freebsd]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-freebsd-64/0.15.12:
resolution: {integrity: sha512-XFL7gKMCKXLDiAiBjhLG0XECliXaRLTZh6hsyzqUqPUf/PY4C6EJDTKIeqqPKXaVJ8+fzNek88285krSz1QECw==}
engines: {node: '>=12'}
@@ -6227,15 +6227,6 @@ packages:
dev: true
optional: true
- /esbuild-freebsd-arm64/0.15.11:
- resolution: {integrity: sha512-aSGiODiukLGGnSg/O9+cGO2QxEacrdCtCawehkWYTt5VX1ni2b9KoxpHCT9h9Y6wGqNHmXFnB47RRJ8BIqZgmQ==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-freebsd-arm64/0.15.12:
resolution: {integrity: sha512-jwEIu5UCUk6TjiG1X+KQnCGISI+ILnXzIzt9yDVrhjug2fkYzlLbl0K43q96Q3KB66v6N1UFF0r5Ks4Xo7i72g==}
engines: {node: '>=12'}
@@ -6254,15 +6245,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-32/0.15.11:
- resolution: {integrity: sha512-lsrAfdyJBGx+6aHIQmgqUonEzKYeBnyfJPkT6N2dOf1RoXYYV1BkWB6G02tjsrz1d5wZzaTc3cF+TKmuTo/ZwA==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-32/0.15.12:
resolution: {integrity: sha512-uSQuSEyF1kVzGzuIr4XM+v7TPKxHjBnLcwv2yPyCz8riV8VUCnO/C4BF3w5dHiVpCd5Z1cebBtZJNlC4anWpwA==}
engines: {node: '>=12'}
@@ -6281,15 +6263,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-64/0.15.11:
- resolution: {integrity: sha512-Y2Rh+PcyVhQqXKBTacPCltINN3uIw2xC+dsvLANJ1SpK5NJUtxv8+rqWpjmBgaNWKQT1/uGpMmA9olALy9PLVA==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-64/0.15.12:
resolution: {integrity: sha512-QcgCKb7zfJxqT9o5z9ZUeGH1k8N6iX1Y7VNsEi5F9+HzN1OIx7ESxtQXDN9jbeUSPiRH1n9cw6gFT3H4qbdvcA==}
engines: {node: '>=12'}
@@ -6308,15 +6281,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-arm/0.15.11:
- resolution: {integrity: sha512-TJllTVk5aSyqPFvvcHTvf6Wu1ZKhWpJ/qNmZO8LL/XeB+LXCclm7HQHNEIz6MT7IX8PmlC1BZYrOiw2sXSB95A==}
- engines: {node: '>=12'}
- cpu: [arm]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-arm/0.15.12:
resolution: {integrity: sha512-Wf7T0aNylGcLu7hBnzMvsTfEXdEdJY/hY3u36Vla21aY66xR0MS5I1Hw8nVquXjTN0A6fk/vnr32tkC/C2lb0A==}
engines: {node: '>=12'}
@@ -6335,15 +6299,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-arm64/0.15.11:
- resolution: {integrity: sha512-uhcXiTwTmD4OpxJu3xC5TzAAw6Wzf9O1XGWL448EE9bqGjgV1j+oK3lIHAfsHnuIn8K4nDW8yjX0Sv5S++oRuw==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-arm64/0.15.12:
resolution: {integrity: sha512-HtNq5xm8fUpZKwWKS2/YGwSfTF+339L4aIA8yphNKYJckd5hVdhfdl6GM2P3HwLSCORS++++7++//ApEwXEuAQ==}
engines: {node: '>=12'}
@@ -6362,15 +6317,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-mips64le/0.15.11:
- resolution: {integrity: sha512-WD61y/R1M4BLe4gxXRypoQ0Ci+Vjf714QYzcPNkiYv5I8K8WDz2ZR8Bm6cqKxd6rD+e/rZgPDbhQ9PCf7TMHmA==}
- engines: {node: '>=12'}
- cpu: [mips64el]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-mips64le/0.15.12:
resolution: {integrity: sha512-Qol3+AvivngUZkTVFgLpb0H6DT+N5/zM3V1YgTkryPYFeUvuT5JFNDR3ZiS6LxhyF8EE+fiNtzwlPqMDqVcc6A==}
engines: {node: '>=12'}
@@ -6389,15 +6335,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-ppc64le/0.15.11:
- resolution: {integrity: sha512-JVleZS9oPVLTlBhPTWgOwxFWU/wMUdlBwTbGA4GF8c38sLbS13cupj+C8bLq929jU7EMWry4SaL+tKGIaTlqKg==}
- engines: {node: '>=12'}
- cpu: [ppc64]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-ppc64le/0.15.12:
resolution: {integrity: sha512-4D8qUCo+CFKaR0cGXtGyVsOI7w7k93Qxb3KFXWr75An0DHamYzq8lt7TNZKoOq/Gh8c40/aKaxvcZnTgQ0TJNg==}
engines: {node: '>=12'}
@@ -6416,15 +6353,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-riscv64/0.15.11:
- resolution: {integrity: sha512-9aLIalZ2HFHIOZpmVU11sEAS9F8TnHw49daEjcgMpBXHFF57VuT9f9/9LKJhw781Gda0P9jDkuCWJ0tFbErvJw==}
- engines: {node: '>=12'}
- cpu: [riscv64]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-riscv64/0.15.12:
resolution: {integrity: sha512-G9w6NcuuCI6TUUxe6ka0enjZHDnSVK8bO+1qDhMOCtl7Tr78CcZilJj8SGLN00zO5iIlwNRZKHjdMpfFgNn1VA==}
engines: {node: '>=12'}
@@ -6443,15 +6371,6 @@ packages:
dev: true
optional: true
- /esbuild-linux-s390x/0.15.11:
- resolution: {integrity: sha512-sZHtiXXOKsLI3XGBGoYO4qKBzJlb8xNsWmvFiwFMHFzA4AXgDP1KDp7Dawe9C2pavTRBDvl+Ok4n/DHQ59oaTg==}
- engines: {node: '>=12'}
- cpu: [s390x]
- os: [linux]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-linux-s390x/0.15.12:
resolution: {integrity: sha512-Lt6BDnuXbXeqSlVuuUM5z18GkJAZf3ERskGZbAWjrQoi9xbEIsj/hEzVnSAFLtkfLuy2DE4RwTcX02tZFunXww==}
engines: {node: '>=12'}
@@ -6470,15 +6389,6 @@ packages:
dev: true
optional: true
- /esbuild-netbsd-64/0.15.11:
- resolution: {integrity: sha512-hUC9yN06K9sg7ju4Vgu9ChAPdsEgtcrcLfyNT5IKwKyfpLvKUwCMZSdF+gRD3WpyZelgTQfJ+pDx5XFbXTlB0A==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [netbsd]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-netbsd-64/0.15.12:
resolution: {integrity: sha512-jlUxCiHO1dsqoURZDQts+HK100o0hXfi4t54MNRMCAqKGAV33JCVvMplLAa2FwviSojT/5ZG5HUfG3gstwAG8w==}
engines: {node: '>=12'}
@@ -6497,15 +6407,6 @@ packages:
dev: true
optional: true
- /esbuild-openbsd-64/0.15.11:
- resolution: {integrity: sha512-0bBo9SQR4t66Wd91LGMAqmWorzO0TTzVjYiifwoFtel8luFeXuPThQnEm5ztN4g0fnvcp7AnUPPzS/Depf17wQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [openbsd]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-openbsd-64/0.15.12:
resolution: {integrity: sha512-1o1uAfRTMIWNOmpf8v7iudND0L6zRBYSH45sofCZywrcf7NcZA+c7aFsS1YryU+yN7aRppTqdUK1PgbZVaB1Dw==}
engines: {node: '>=12'}
@@ -6524,15 +6425,6 @@ packages:
dev: true
optional: true
- /esbuild-sunos-64/0.15.11:
- resolution: {integrity: sha512-EuBdTGlsMTjEl1sQnBX2jfygy7iR6CKfvOzi+gEOfhDqbHXsmY1dcpbVtcwHAg9/2yUZSfMJHMAgf1z8M4yyyw==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [sunos]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-sunos-64/0.15.12:
resolution: {integrity: sha512-nkl251DpoWoBO9Eq9aFdoIt2yYmp4I3kvQjba3jFKlMXuqQ9A4q+JaqdkCouG3DHgAGnzshzaGu6xofGcXyPXg==}
engines: {node: '>=12'}
@@ -6551,15 +6443,6 @@ packages:
dev: true
optional: true
- /esbuild-windows-32/0.15.11:
- resolution: {integrity: sha512-O0/Wo1Wk6dc0rZSxkvGpmTNIycEznHmkObTFz2VHBhjPsO4ZpCgfGxNkCpz4AdAIeMczpTXt/8d5vdJNKEGC+Q==}
- engines: {node: '>=12'}
- cpu: [ia32]
- os: [win32]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-windows-32/0.15.12:
resolution: {integrity: sha512-WlGeBZHgPC00O08luIp5B2SP4cNCp/PcS+3Pcg31kdcJPopHxLkdCXtadLU9J82LCfw4TVls21A6lilQ9mzHrw==}
engines: {node: '>=12'}
@@ -6578,15 +6461,6 @@ packages:
dev: true
optional: true
- /esbuild-windows-64/0.15.11:
- resolution: {integrity: sha512-x977Q4HhNjnHx00b4XLAnTtj5vfbdEvkxaQwC1Zh5AN8g5EX+izgZ6e5QgqJgpzyRNJqh4hkgIJF1pyy1be0mQ==}
- engines: {node: '>=12'}
- cpu: [x64]
- os: [win32]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-windows-64/0.15.12:
resolution: {integrity: sha512-VActO3WnWZSN//xjSfbiGOSyC+wkZtI8I4KlgrTo5oHJM6z3MZZBCuFaZHd8hzf/W9KPhF0lY8OqlmWC9HO5AA==}
engines: {node: '>=12'}
@@ -6605,15 +6479,6 @@ packages:
dev: true
optional: true
- /esbuild-windows-arm64/0.15.11:
- resolution: {integrity: sha512-VwUHFACuBahrvntdcMKZteUZ9HaYrBRODoKe4tIWxguQRvvYoYb7iu5LrcRS/FQx8KPZNaa72zuqwVtHeXsITw==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
- requiresBuild: true
- dev: true
- optional: true
-
/esbuild-windows-arm64/0.15.12:
resolution: {integrity: sha512-Of3MIacva1OK/m4zCNIvBfz8VVROBmQT+gRX6pFTLPngFYcj6TFH/12VveAqq1k9VB2l28EoVMNMUCcmsfwyuA==}
engines: {node: '>=12'}
@@ -6657,36 +6522,6 @@ packages:
esbuild-windows-arm64: 0.14.48
dev: true
- /esbuild/0.15.11:
- resolution: {integrity: sha512-OgHGuhlfZ//mToxjte1D5iiiQgWfJ2GByVMwEC/IuoXsBGkuyK1+KrjYu0laSpnN/L1UmLUCv0s25vObdc1bVg==}
- engines: {node: '>=12'}
- hasBin: true
- requiresBuild: true
- optionalDependencies:
- '@esbuild/android-arm': 0.15.11
- '@esbuild/linux-loong64': 0.15.11
- esbuild-android-64: 0.15.11
- esbuild-android-arm64: 0.15.11
- esbuild-darwin-64: 0.15.11
- esbuild-darwin-arm64: 0.15.11
- esbuild-freebsd-64: 0.15.11
- esbuild-freebsd-arm64: 0.15.11
- esbuild-linux-32: 0.15.11
- esbuild-linux-64: 0.15.11
- esbuild-linux-arm: 0.15.11
- esbuild-linux-arm64: 0.15.11
- esbuild-linux-mips64le: 0.15.11
- esbuild-linux-ppc64le: 0.15.11
- esbuild-linux-riscv64: 0.15.11
- esbuild-linux-s390x: 0.15.11
- esbuild-netbsd-64: 0.15.11
- esbuild-openbsd-64: 0.15.11
- esbuild-sunos-64: 0.15.11
- esbuild-windows-32: 0.15.11
- esbuild-windows-64: 0.15.11
- esbuild-windows-arm64: 0.15.11
- dev: true
-
/esbuild/0.15.12:
resolution: {integrity: sha512-PcT+/wyDqJQsRVhaE9uX/Oq4XLrFh0ce/bs2TJh4CSaw9xuvI+xFrH2nAYOADbhQjUgAhNWC5LKoUsakm4dxng==}
engines: {node: '>=12'}
@@ -6806,7 +6641,7 @@ packages:
resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==}
dependencies:
debug: 3.2.7
- resolve: 1.22.0
+ resolve: 1.22.1
transitivePeerDependencies:
- supports-color
dev: true
@@ -6837,6 +6672,21 @@ packages:
- supports-color
dev: true
+ /eslint-plugin-expect-type/0.2.1_vjep2yp2sits3sqnodefgcbnfi:
+ resolution: {integrity: sha512-NotHqw3eH4ne6/Q3D79PiFvtNZLRrQ2DczcPHmfPxhP3fEGZf843ganEXRbkIbR8CjitBv94oU2k52DM0Amo3g==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0
+ typescript: '>=3.7.5'
+ dependencies:
+ '@typescript-eslint/utils': 5.30.7_vjep2yp2sits3sqnodefgcbnfi
+ eslint: 8.16.0
+ fs-extra: 10.1.0
+ typescript: 4.7.4
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/eslint-plugin-import/2.26.0_bkngvi3wcdllq54uhhavdagiee:
resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
engines: {node: '>=4'}
@@ -8450,6 +8300,7 @@ packages:
resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==}
dependencies:
has: 1.0.3
+ dev: true
/is-date-object/1.0.5:
resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==}
@@ -8716,6 +8567,11 @@ packages:
call-bind: 1.0.2
dev: true
+ /is-what/4.1.7:
+ resolution: {integrity: sha512-DBVOQNiPKnGMxRMLIYSwERAS5MVY1B7xYiGnpgctsOFvVDz9f9PFXXxMcTOHuoqYp4NK9qFYQaIC1NRRxLMpBQ==}
+ engines: {node: '>=12.13'}
+ dev: true
+
/is-windows/1.0.2:
resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==}
engines: {node: '>=0.10.0'}
@@ -10139,6 +9995,13 @@ packages:
type-fest: 0.18.1
yargs-parser: 20.2.9
+ /merge-anything/5.1.3:
+ resolution: {integrity: sha512-pMb85+QShjqye+99Dkrg9m6EbTjDXwZFQbPysx/lNkuwjT+UJZlQvpnOy0P8kgGXzUx8iWSoNQel5QJjoyWHmQ==}
+ engines: {node: '>=12.13'}
+ dependencies:
+ is-what: 4.1.7
+ dev: true
+
/merge-descriptors/1.0.1:
resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==}
dev: true
@@ -10705,7 +10568,7 @@ packages:
resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==}
dependencies:
hosted-git-info: 2.8.9
- resolve: 1.22.0
+ resolve: 1.22.1
semver: 5.7.1
validate-npm-package-license: 3.0.4
@@ -12091,6 +11954,7 @@ packages:
is-core-module: 2.9.0
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
+ dev: true
/resolve/1.22.1:
resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==}
@@ -12574,6 +12438,16 @@ packages:
resolution: {integrity: sha512-AZBsj+Yn1xliniTTeuQKG9V7VQVkQ8lZmSKvBjpcVSoZeF7nvt/N5f7Kcsx6QSufioa2YgvBjkIiA0cM0qhotw==}
dependencies:
csstype: 3.1.0
+
+ /solid-refresh/0.4.1_solid-js@1.6.2:
+ resolution: {integrity: sha512-v3tD/OXQcUyXLrWjPW1dXZyeWwP7/+GQNs8YTL09GBq+5FguA6IejJWUvJDrLIA4M0ho9/5zK2e9n+uy+4488g==}
+ peerDependencies:
+ solid-js: ^1.3
+ dependencies:
+ '@babel/generator': 7.20.4
+ '@babel/helper-module-imports': 7.18.6
+ '@babel/types': 7.20.2
+ solid-js: 1.6.2
dev: true
/sort-keys/1.1.2:
@@ -13209,7 +13083,7 @@ packages:
schema-utils: 3.1.1
serialize-javascript: 6.0.0
terser: 5.14.0
- webpack: 5.73.0_webpack-cli@4.9.2
+ webpack: 5.73.0
dev: true
/terser-webpack-plugin/5.3.6_webpack@5.75.0:
@@ -13965,7 +13839,7 @@ packages:
engines: {node: '>= 0.8'}
/verror/1.10.0:
- resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==}
+ resolution: {integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=}
engines: {'0': node >=0.6.0}
dependencies:
assert-plus: 1.0.0
@@ -14014,6 +13888,24 @@ packages:
- supports-color
dev: true
+ /vite-plugin-solid/2.4.0_solid-js@1.6.2+vite@3.1.8:
+ resolution: {integrity: sha512-Rr+t2sr9TWIvH16yzBZzx6O9YSpYAvcwKUMPqbi/4iU3mRumXQ4O10i1XGtQIynC7U3XwJsMzAJigDFGbiJBiw==}
+ peerDependencies:
+ solid-js: ^1.3.17
+ vite: ^3.0.0
+ dependencies:
+ '@babel/core': 7.20.2
+ '@babel/preset-typescript': 7.18.6_@babel+core@7.20.2
+ babel-preset-solid: 1.6.2_@babel+core@7.20.2
+ merge-anything: 5.1.3
+ solid-js: 1.6.2
+ solid-refresh: 0.4.1_solid-js@1.6.2
+ vite: 3.1.8
+ vitefu: 0.1.1_vite@3.1.8
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/vite/3.1.8:
resolution: {integrity: sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==}
engines: {node: ^14.18.0 || >=16.0.0}
@@ -14033,8 +13925,8 @@ packages:
terser:
optional: true
dependencies:
- esbuild: 0.15.11
- postcss: 8.4.16
+ esbuild: 0.15.12
+ postcss: 8.4.19
resolve: 1.22.1
rollup: 2.78.1
optionalDependencies:
@@ -14074,6 +13966,17 @@ packages:
fsevents: 2.3.2
dev: true
+ /vitefu/0.1.1_vite@3.1.8:
+ resolution: {integrity: sha512-HClD14fjMJ+NQgXBqT3dC3RdO/+Chayil+cCPYZKY3kT+KcJomKzrdgzfCHJkIL2L0OAY+VPvrSW615iPtc7ag==}
+ peerDependencies:
+ vite: ^3.0.0
+ peerDependenciesMeta:
+ vite:
+ optional: true
+ dependencies:
+ vite: 3.1.8
+ dev: true
+
/vitefu/0.2.1_vite@3.2.4:
resolution: {integrity: sha512-clkvXTAeUf+XQKm3bhWUhT4pye+3acm6YCTGaWhxxIvZZ/QjnA3JA8Zud+z/mO5y5XYvJJhevs5Sjkv/FI8nRw==}
peerDependencies:
@@ -14532,7 +14435,7 @@ packages:
/wide-align/1.1.5:
resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==}
dependencies:
- string-width: 1.0.2
+ string-width: 4.2.3
dev: true
optional: true