Unverified Commit fdfa3c7b authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

feat(next-swc): Update swc crates (#35395)

* Update crates

* fixup

* fix type

* Update test refs

* Update css crates

* Update test refs

* Update test refs

* Update test refs

* SourceMap

* Fix?

* Update crates

* Fix

* Update test refs

* Update test refs

* Update error reporter

* Update snapshots

* Update snapshots

* Bug?

* Fix

* Fix lint

* Update swc again

* fixup

* Update test refs

* Fix
Co-authored-by: 's avatarMaia Teegarden <dev@padmaia.rocks>
parent 9f9214ab
This diff is collapsed.
......@@ -6,5 +6,8 @@ members = [
"crates/wasm"
]
[profile.dev.package.swc_css_prefixer]
opt-level = 2
[profile.release]
lto = true
\ No newline at end of file
......@@ -19,20 +19,20 @@ radix_fmt = "1"
regex = "1.5"
serde = "1"
serde_json = "1"
styled_components = "0.19.0"
swc = "0.150.1"
swc_atoms = "0.2.9"
swc_common = {version = "0.17.15", features = ["concurrent", "sourcemap"]}
swc_css = "0.100.0"
swc_ecma_loader = {version = "0.29.0", features = ["node", "lru"]}
swc_ecmascript = {version = "0.132.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"]}
styled_components = "0.23.0"
swc = "0.161.1"
swc_atoms = "0.2.11"
swc_common = { version = "0.17.18", features = ["concurrent", "sourcemap"] }
swc_css = "0.103.0"
swc_ecma_loader = { version = "0.29.0", features = ["node", "lru"] }
swc_ecmascript = { version = "0.140.0", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_node_base = "0.5.1"
swc_stylis = "0.96.1"
swc_cached = "0.1.1"
swc_css_prefixer = "0.99.3"
tracing = {version = "0.1.28", features = ["release_max_level_off"]}
handlebars = "4.2.1"
[dev-dependencies]
swc_ecma_transforms_testing = "0.69.0"
testing = "0.18.1"
swc_ecma_transforms_testing = "0.75.0"
testing = "0.19.1"
walkdir = "2.3.2"
......@@ -307,8 +307,7 @@ impl<C: Comments> EmotionTransformer<C> {
if index % 2 == 0 {
if let Some(q) = tagged_tpl.quasis.get_mut(i) {
let q = q.take();
let minified =
minify_css_string(&q.raw.value, index == 0, index == args_len - 1);
let minified = minify_css_string(&q.raw, index == 0, index == args_len - 1);
// Compress one more spaces into one space
if minified.replace(' ', "").is_empty() {
if index != 0 && index != args_len - 1 {
......
......@@ -6,7 +6,7 @@ use swc_common::{FileName, DUMMY_SP};
use swc_ecmascript::ast::{
ArrayLit, ArrowExpr, BinExpr, BinaryOp, BlockStmtOrExpr, Bool, CallExpr, Callee, Expr,
ExprOrSpread, Ident, ImportDecl, ImportSpecifier, KeyValueProp, Lit, MemberExpr, MemberProp,
Null, ObjectLit, Prop, PropName, PropOrSpread, Str, StrKind,
Null, ObjectLit, Prop, PropName, PropOrSpread, Str,
};
use swc_ecmascript::utils::ExprFactory;
use swc_ecmascript::utils::{
......@@ -148,8 +148,7 @@ impl Fold for NextDynamicPatcher {
)
.into(),
span: DUMMY_SP,
kind: StrKind::Synthesized {},
has_escape: false,
raw: None,
}))),
right: Box::new(Expr::Lit(Lit::Str(Str {
value: self
......@@ -159,10 +158,7 @@ impl Fold for NextDynamicPatcher {
.clone()
.into(),
span: DUMMY_SP,
kind: StrKind::Normal {
contains_quote: false,
},
has_escape: false,
raw: None,
}))),
})),
spread: None,
......@@ -202,8 +198,7 @@ impl Fold for NextDynamicPatcher {
.clone()
.into(),
span: DUMMY_SP,
kind: StrKind::Synthesized {},
has_escape: false,
raw: None,
}))),
spread: None,
}],
......
......@@ -54,8 +54,7 @@ impl Fold for PageConfig {
init: Some(Box::new(Expr::Lit(Lit::Str(Str {
value: format!("{} {}", STRING_LITERAL_DROP_BUNDLE, timestamp).into(),
span: DUMMY_SP,
kind: StrKind::Synthesized {},
has_escape: false,
raw: None,
})))),
span: DUMMY_SP,
definite: false,
......
......@@ -43,7 +43,7 @@ fn pull_first_operation_name_from_tpl(tpl: &TaggedTpl) -> Option<String> {
static OPERATION_REGEX: Lazy<Regex> =
Lazy::new(|| Regex::new(r"(fragment|mutation|query|subscription) (\w+)").unwrap());
let capture_group = OPERATION_REGEX.captures_iter(&quasis.raw.value).next();
let capture_group = OPERATION_REGEX.captures_iter(&quasis.raw).next();
capture_group.map(|capture_group| capture_group[2].to_string())
})
......@@ -56,8 +56,7 @@ fn build_require_expr_from_path(path: &str) -> Expr {
args: vec![Lit::Str(Str {
span: Default::default(),
value: JsWord::from(path),
has_escape: false,
kind: Default::default(),
raw: None,
})
.as_arg()],
type_args: None,
......
......@@ -475,8 +475,8 @@ impl StyledJSXTransformer {
expr,
) => {
if exprs.is_empty() {
hasher.write(quasis[0].raw.value.as_bytes());
css = quasis[0].raw.value.to_string();
hasher.write(quasis[0].raw.as_bytes());
css = quasis[0].raw.to_string();
css_span = *span;
is_dynamic = false;
} else {
......@@ -488,7 +488,7 @@ impl StyledJSXTransformer {
} else {
format!("__styled-jsx-placeholder-{}__", i)
};
s = format!("{}{}{}", s, quasis[i].raw.value, placeholder)
s = format!("{}{}{}", s, quasis[i].raw, placeholder)
}
css = s;
css_span = *span;
......
......@@ -12,10 +12,10 @@ use swc_css::codegen::{
use swc_css::parser::parser::input::ParserInput;
use swc_css::parser::{parse_str, parse_tokens, parser::ParserConfig};
use swc_css::visit::{VisitMut, VisitMutWith};
use swc_ecmascript::ast::{Expr, Str, StrKind, Tpl, TplElement};
use swc_css_prefixer::prefixer;
use swc_ecmascript::ast::{Expr, Tpl, TplElement};
use swc_ecmascript::parser::StringInput;
use swc_ecmascript::utils::HANDLER;
use swc_stylis::prefixer::prefixer;
use tracing::{debug, trace};
use super::{hash_string, string_literal_expr, LocalStyle};
......@@ -97,12 +97,7 @@ pub fn transform_css(
.map(|quasi| {
TplElement {
cooked: None, // ? Do we need cooked as well
raw: Str {
value: (*quasi).into(),
span: DUMMY_SP,
has_escape: false,
kind: StrKind::Synthesized {},
},
raw: quasi.replace('`', "\\`").into(),
span: DUMMY_SP,
tail: false,
}
......
......@@ -7,12 +7,7 @@ use super::{ExternalStyle, JSXStyle, LocalStyle};
fn tpl_element(value: &str) -> TplElement {
TplElement {
raw: Str {
value: value.into(),
span: DUMMY_SP,
kind: StrKind::Synthesized,
has_escape: false,
},
raw: value.into(),
cooked: None,
span: DUMMY_SP,
tail: false,
......@@ -314,10 +309,9 @@ pub fn styled_jsx_import_decl(style_import_name: &str) -> ModuleItem {
span: DUMMY_SP,
})],
src: Str {
has_escape: false,
kind: StrKind::Synthesized {},
span: DUMMY_SP,
value: "styled-jsx/style".into(),
raw: None,
},
}))
}
......@@ -335,8 +329,7 @@ pub fn string_literal_expr(str: &str) -> Expr {
Expr::Lit(Lit::Str(Str {
value: str.into(),
span: DUMMY_SP,
has_escape: false,
kind: StrKind::Synthesized {},
raw: None,
}))
}
......
error: next/dynamic requires at least one argument
--> input.js:3:26
|
3 | const DynamicComponent = dynamic()
| ^^^^^^^
x next/dynamic requires at least one argument
,-[input.js:3:1]
3 | const DynamicComponent = dynamic()
: ^^^^^^^
`----
error: next/dynamic options must be an object literal.
Read more: https://nextjs.org/docs/messages/invalid-dynamic-options-type
--> input.js:4:43
|
4 | const DynamicComponentWithCustomLoading = dynamic(
| ^^^^^^^
x next/dynamic options must be an object literal.
| Read more: https://nextjs.org/docs/messages/invalid-dynamic-options-type
,-[input.js:4:1]
4 | const DynamicComponentWithCustomLoading = dynamic(
: ^^^^^^^
`----
error: next/dynamic only accepts 2 arguments
--> input.js:3:43
|
3 | const DynamicComponentWithCustomLoading = dynamic(
| ^^^^^^^
x next/dynamic only accepts 2 arguments
,-[input.js:3:1]
3 | const DynamicComponentWithCustomLoading = dynamic(
: ^^^^^^^
`----
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
--> input.js:2:14
|
2 | export const getServerSideProps = function getServerSideProps() {}
| ^^^^^^^^^^^^^^^^^^
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
,-[input.js:2:1]
2 | export const getServerSideProps = function getServerSideProps() {}
: ^^^^^^^^^^^^^^^^^^
`----
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
--> input.js:2:15
|
2 | export { a as getServerSideProps }
| ^^^^^^^^^^^^^^^^^^
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
,-[input.js:2:1]
2 | export { a as getServerSideProps }
: ^^^^^^^^^^^^^^^^^^
`----
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
--> input.js:2:10
|
2 | export { getStaticPaths } from 'a'
| ^^^^^^^^^^^^^^
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
,-[input.js:2:1]
2 | export { getStaticPaths } from 'a'
: ^^^^^^^^^^^^^^
`----
error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
--> input.js:1:26
|
1 | export { getStaticProps, getServerSideProps }
| ^^^^^^^^^^^^^^^^^^
x You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps
,-[input.js:1:1]
1 | export { getStaticProps, getServerSideProps }
: ^^^^^^^^^^^^^^^^^^
`----
error: Using `export * from '...'` in a page is disallowed. Please use `export { default } from '...'` instead.
Read more: https://nextjs.org/docs/messages/export-all-in-page
--> input.js:1:1
|
1 | export * from './other-page'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
x Using `export * from '...'` in a page is disallowed. Please use `export { default } from '...'` instead.
| Read more: https://nextjs.org/docs/messages/export-all-in-page
,-[input.js:1:1]
1 | export * from './other-page'
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
export { default, getStaticProps, getStaticPaths } from "./other-page";
export { default, getStaticProps, getStaticPaths } from './other-page';
error: Expected one child under JSX style tag, but got 0.
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
--> input.js:3:5
|
3 | / <style jsx>
4 | | </style>
| |____________^
x Expected one child under JSX style tag, but got 0.
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
,-[input.js:3:5]
3 | ,-> <style jsx>
4 | `-> </style>
`----
error: /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so that the jsx injected by `css.resolve` will be transformed.
x /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so that the jsx injected by `css.resolve` will be transformed.
error: Expected one child under JSX style tag, but got 2.
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
--> input.js:3:5
|
3 | / <style jsx>
4 | | {`.p {}`}
5 | | {`.p {}`}
6 | | </style>
| |____________^
x Expected one child under JSX style tag, but got 2.
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
,-[input.js:3:5]
3 | ,-> <style jsx>
4 | | {`.p {}`}
5 | | {`.p {}`}
6 | `-> </style>
`----
error: Expected a single child of type JSXExpressionContainer under JSX Style tag.
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
--> input.js:3:5
|
3 | / <style jsx>
4 | | 10
5 | | </style>
| |____________^
x Expected a single child of type JSXExpressionContainer under JSX Style tag.
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
,-[input.js:3:5]
3 | ,-> <style jsx>
4 | | 10
5 | `-> </style>
`----
error: Expected a template literal, string or identifier inside the JSXExpressionContainer.
Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
--> input.js:3:5
|
3 | / <style jsx>
4 | | {[]}
5 | | </style>
| |____________^
x Expected a template literal, string or identifier inside the JSXExpressionContainer.
| Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children
,-[input.js:3:5]
3 | ,-> <style jsx>
4 | | {[]}
5 | `-> </style>
`----
import { css } from "@emotion/react";
import styled from "@emotion/styled";
const unitNormal = "1rem";
const unitLarge = "2rem";
import { css } from '@emotion/react';
import styled from '@emotion/styled';
const unitNormal = '1rem';
const unitLarge = '2rem';
const Example = /*#__PURE__*/ styled("div", {
target: "ekie5mj0",
label: "Example"
......@@ -11,12 +11,12 @@ export const Animated = /*#__PURE__*/ styled("div", {
label: "Animated"
})("& code{background-color:linen;}animation:", ({ animation })=>animation
, " 0.2s infinite ease-in-out alternate;", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHMiLCJzb3VyY2VzIjpbImlucHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmNvbnN0IHVuaXROb3JtYWwgPSAnMXJlbSdcbmNvbnN0IHVuaXRMYXJnZSA9ICcycmVtJ1xuXG5jb25zdCBFeGFtcGxlID0gc3R5bGVkLmRpdmBcbiAgbWFyZ2luOiAke3VuaXROb3JtYWx9ICR7dW5pdExhcmdlfTtcbmBcblxuZXhwb3J0IGNvbnN0IEFuaW1hdGVkID0gc3R5bGVkLmRpdmBcbiAgJiBjb2RlIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiBsaW5lbjtcbiAgfVxuICBhbmltYXRpb246ICR7KHsgYW5pbWF0aW9uIH0pID0+IGFuaW1hdGlvbn0gMC4ycyBpbmZpbml0ZSBlYXNlLWluLW91dCBhbHRlcm5hdGU7XG5gXG5cbmNvbnN0IHNoYWRvd0JvcmRlciA9ICh7IHdpZHRoID0gJzFweCcsIGNvbG9yIH0pID0+XG4gIGNzc2BcbiAgICBib3gtc2hhZG93OiBpbnNldCAwcHggMHB4IDBweCAke3dpZHRofSAke2NvbG9yfTtcbiAgYFxuXG5jb25zdCBTdHlsZWRJbnB1dCA9IHN0eWxlZC5pbnB1dGBcbiAgJHtzaGFkb3dCb3JkZXIoeyBjb2xvcjogJ3JlZCcsIHdpZHRoOiAnNHB4JyB9KX1cbmBcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVd0IifQ== */");
const shadowBorder = ({ width ="1px" , color })=>/*#__PURE__*/ css("box-shadow:inset 0px 0px 0px ", width, " ", color, ";", "shadowBorder", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHMiLCJzb3VyY2VzIjpbImlucHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmNvbnN0IHVuaXROb3JtYWwgPSAnMXJlbSdcbmNvbnN0IHVuaXRMYXJnZSA9ICcycmVtJ1xuXG5jb25zdCBFeGFtcGxlID0gc3R5bGVkLmRpdmBcbiAgbWFyZ2luOiAke3VuaXROb3JtYWx9ICR7dW5pdExhcmdlfTtcbmBcblxuZXhwb3J0IGNvbnN0IEFuaW1hdGVkID0gc3R5bGVkLmRpdmBcbiAgJiBjb2RlIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiBsaW5lbjtcbiAgfVxuICBhbmltYXRpb246ICR7KHsgYW5pbWF0aW9uIH0pID0+IGFuaW1hdGlvbn0gMC4ycyBpbmZpbml0ZSBlYXNlLWluLW91dCBhbHRlcm5hdGU7XG5gXG5cbmNvbnN0IHNoYWRvd0JvcmRlciA9ICh7IHdpZHRoID0gJzFweCcsIGNvbG9yIH0pID0+XG4gIGNzc2BcbiAgICBib3gtc2hhZG93OiBpbnNldCAwcHggMHB4IDBweCAke3dpZHRofSAke2NvbG9yfTtcbiAgYFxuXG5jb25zdCBTdHlsZWRJbnB1dCA9IHN0eWxlZC5pbnB1dGBcbiAgJHtzaGFkb3dCb3JkZXIoeyBjb2xvcjogJ3JlZCcsIHdpZHRoOiAnNHB4JyB9KX1cbmBcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQkUifQ== */")
const shadowBorder = ({ width ='1px' , color })=>/*#__PURE__*/ css("box-shadow:inset 0px 0px 0px ", width, " ", color, ";", "shadowBorder", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHMiLCJzb3VyY2VzIjpbImlucHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmNvbnN0IHVuaXROb3JtYWwgPSAnMXJlbSdcbmNvbnN0IHVuaXRMYXJnZSA9ICcycmVtJ1xuXG5jb25zdCBFeGFtcGxlID0gc3R5bGVkLmRpdmBcbiAgbWFyZ2luOiAke3VuaXROb3JtYWx9ICR7dW5pdExhcmdlfTtcbmBcblxuZXhwb3J0IGNvbnN0IEFuaW1hdGVkID0gc3R5bGVkLmRpdmBcbiAgJiBjb2RlIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiBsaW5lbjtcbiAgfVxuICBhbmltYXRpb246ICR7KHsgYW5pbWF0aW9uIH0pID0+IGFuaW1hdGlvbn0gMC4ycyBpbmZpbml0ZSBlYXNlLWluLW91dCBhbHRlcm5hdGU7XG5gXG5cbmNvbnN0IHNoYWRvd0JvcmRlciA9ICh7IHdpZHRoID0gJzFweCcsIGNvbG9yIH0pID0+XG4gIGNzc2BcbiAgICBib3gtc2hhZG93OiBpbnNldCAwcHggMHB4IDBweCAke3dpZHRofSAke2NvbG9yfTtcbiAgYFxuXG5jb25zdCBTdHlsZWRJbnB1dCA9IHN0eWxlZC5pbnB1dGBcbiAgJHtzaGFkb3dCb3JkZXIoeyBjb2xvcjogJ3JlZCcsIHdpZHRoOiAnNHB4JyB9KX1cbmBcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrQkUifQ== */")
;
const StyledInput = /*#__PURE__*/ styled("input", {
target: "ekie5mj2",
label: "StyledInput"
})(shadowBorder({
color: "red",
width: "4px"
color: 'red',
width: '4px'
}), "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHMiLCJzb3VyY2VzIjpbImlucHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmNvbnN0IHVuaXROb3JtYWwgPSAnMXJlbSdcbmNvbnN0IHVuaXRMYXJnZSA9ICcycmVtJ1xuXG5jb25zdCBFeGFtcGxlID0gc3R5bGVkLmRpdmBcbiAgbWFyZ2luOiAke3VuaXROb3JtYWx9ICR7dW5pdExhcmdlfTtcbmBcblxuZXhwb3J0IGNvbnN0IEFuaW1hdGVkID0gc3R5bGVkLmRpdmBcbiAgJiBjb2RlIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiBsaW5lbjtcbiAgfVxuICBhbmltYXRpb246ICR7KHsgYW5pbWF0aW9uIH0pID0+IGFuaW1hdGlvbn0gMC4ycyBpbmZpbml0ZSBlYXNlLWluLW91dCBhbHRlcm5hdGU7XG5gXG5cbmNvbnN0IHNoYWRvd0JvcmRlciA9ICh7IHdpZHRoID0gJzFweCcsIGNvbG9yIH0pID0+XG4gIGNzc2BcbiAgICBib3gtc2hhZG93OiBpbnNldCAwcHggMHB4IDBweCAke3dpZHRofSAke2NvbG9yfTtcbiAgYFxuXG5jb25zdCBTdHlsZWRJbnB1dCA9IHN0eWxlZC5pbnB1dGBcbiAgJHtzaGFkb3dCb3JkZXIoeyBjb2xvcjogJ3JlZCcsIHdpZHRoOiAnNHB4JyB9KX1cbmBcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFzQm9CIn0= */");
import { jsx as _jsx } from "react/jsx-runtime";
import * as emotionReact from "@emotion/react";
import { PureComponent } from "react";
import ReactDOM from "react-dom";
import * as emotionReact from '@emotion/react';
import { PureComponent } from 'react';
import ReactDOM from 'react-dom';
const stylesInCallback = (props: any)=>/*#__PURE__*/ emotionReact.css({
color: "red",
background: "yellow",
color: 'red',
background: 'yellow',
width: `${props.scale * 100}px`
}, "label:stylesInCallback", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHMiLCJzb3VyY2VzIjpbImlucHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGVtb3Rpb25SZWFjdCBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IFB1cmVDb21wb25lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCBSZWFjdERPTSBmcm9tICdyZWFjdC1kb20nXG5cbmNvbnN0IHN0eWxlc0luQ2FsbGJhY2sgPSAocHJvcHM6IGFueSkgPT5cbiAgZW1vdGlvblJlYWN0LmNzcyh7XG4gICAgY29sb3I6ICdyZWQnLFxuICAgIGJhY2tncm91bmQ6ICd5ZWxsb3cnLFxuICAgIHdpZHRoOiBgJHtwcm9wcy5zY2FsZSAqIDEwMH1weGAsXG4gIH0pXG5cbmNvbnN0IHN0eWxlcyA9IGVtb3Rpb25SZWFjdC5jc3Moe1xuICBjb2xvcjogJ3JlZCcsXG4gIHdpZHRoOiAnMjBweCcsXG59KVxuXG5jb25zdCBzdHlsZXMyID0gZW1vdGlvblJlYWN0LmNzc2BcbiAgY29sb3I6IHJlZDtcbiAgd2lkdGg6IDIwcHg7XG5gXG5cbmV4cG9ydCBjbGFzcyBTaW1wbGVDb21wb25lbnQgZXh0ZW5kcyBQdXJlQ29tcG9uZW50IHtcbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiAoXG4gICAgICA8ZGl2IGNsYXNzTmFtZT17c3R5bGVzfT5cbiAgICAgICAgPHNwYW4+aGVsbG88L3NwYW4+XG4gICAgICA8L2Rpdj5cbiAgICApXG4gIH1cbn1cblxuUmVhY3RET00ucmVuZGVyKDxTaW1wbGVDb21wb25lbnQgLz4sIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhcHAnKSlcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLRSJ9 */")
;
const styles = /*#__PURE__*/ emotionReact.css({
color: "red",
width: "20px"
color: 'red',
width: '20px'
}, "label:styles", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHMiLCJzb3VyY2VzIjpbImlucHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGVtb3Rpb25SZWFjdCBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IFB1cmVDb21wb25lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCBSZWFjdERPTSBmcm9tICdyZWFjdC1kb20nXG5cbmNvbnN0IHN0eWxlc0luQ2FsbGJhY2sgPSAocHJvcHM6IGFueSkgPT5cbiAgZW1vdGlvblJlYWN0LmNzcyh7XG4gICAgY29sb3I6ICdyZWQnLFxuICAgIGJhY2tncm91bmQ6ICd5ZWxsb3cnLFxuICAgIHdpZHRoOiBgJHtwcm9wcy5zY2FsZSAqIDEwMH1weGAsXG4gIH0pXG5cbmNvbnN0IHN0eWxlcyA9IGVtb3Rpb25SZWFjdC5jc3Moe1xuICBjb2xvcjogJ3JlZCcsXG4gIHdpZHRoOiAnMjBweCcsXG59KVxuXG5jb25zdCBzdHlsZXMyID0gZW1vdGlvblJlYWN0LmNzc2BcbiAgY29sb3I6IHJlZDtcbiAgd2lkdGg6IDIwcHg7XG5gXG5cbmV4cG9ydCBjbGFzcyBTaW1wbGVDb21wb25lbnQgZXh0ZW5kcyBQdXJlQ29tcG9uZW50IHtcbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiAoXG4gICAgICA8ZGl2IGNsYXNzTmFtZT17c3R5bGVzfT5cbiAgICAgICAgPHNwYW4+aGVsbG88L3NwYW4+XG4gICAgICA8L2Rpdj5cbiAgICApXG4gIH1cbn1cblxuUmVhY3RET00ucmVuZGVyKDxTaW1wbGVDb21wb25lbnQgLz4sIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhcHAnKSlcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXZSJ9 */");
const styles2 = /*#__PURE__*/ emotionReact.css("color:red;width:20px;", "label:styles2", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQudHMiLCJzb3VyY2VzIjpbImlucHV0LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGVtb3Rpb25SZWFjdCBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IFB1cmVDb21wb25lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCBSZWFjdERPTSBmcm9tICdyZWFjdC1kb20nXG5cbmNvbnN0IHN0eWxlc0luQ2FsbGJhY2sgPSAocHJvcHM6IGFueSkgPT5cbiAgZW1vdGlvblJlYWN0LmNzcyh7XG4gICAgY29sb3I6ICdyZWQnLFxuICAgIGJhY2tncm91bmQ6ICd5ZWxsb3cnLFxuICAgIHdpZHRoOiBgJHtwcm9wcy5zY2FsZSAqIDEwMH1weGAsXG4gIH0pXG5cbmNvbnN0IHN0eWxlcyA9IGVtb3Rpb25SZWFjdC5jc3Moe1xuICBjb2xvcjogJ3JlZCcsXG4gIHdpZHRoOiAnMjBweCcsXG59KVxuXG5jb25zdCBzdHlsZXMyID0gZW1vdGlvblJlYWN0LmNzc2BcbiAgY29sb3I6IHJlZDtcbiAgd2lkdGg6IDIwcHg7XG5gXG5cbmV4cG9ydCBjbGFzcyBTaW1wbGVDb21wb25lbnQgZXh0ZW5kcyBQdXJlQ29tcG9uZW50IHtcbiAgcmVuZGVyKCkge1xuICAgIHJldHVybiAoXG4gICAgICA8ZGl2IGNsYXNzTmFtZT17c3R5bGVzfT5cbiAgICAgICAgPHNwYW4+aGVsbG88L3NwYW4+XG4gICAgICA8L2Rpdj5cbiAgICApXG4gIH1cbn1cblxuUmVhY3RET00ucmVuZGVyKDxTaW1wbGVDb21wb25lbnQgLz4sIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhcHAnKSlcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQmdCIn0= */");
export class SimpleComponent extends PureComponent {
......@@ -23,4 +23,4 @@ export class SimpleComponent extends PureComponent {
});
}
}
ReactDOM.render(/*#__PURE__*/ _jsx(SimpleComponent, {}), document.querySelector("#app"));
ReactDOM.render(/*#__PURE__*/ _jsx(SimpleComponent, {}), document.querySelector('#app'));
import MyModule from 'my-library/MyModule';
import App from 'my-library/components/App';
import Header from 'my-library/components/App/Header';
import Footer from 'my-library/components/App/Footer';
import MyModule from "my-library/MyModule";
import App from "my-library/components/App";
import Header from "my-library/components/App/Header";
import Footer from "my-library/components/App/Footer";
import Grid from "react-bootstrap/lib/Grid";
import Row from "react-bootstrap/lib/Row";
import Col1 from "react-bootstrap/lib/Col";
import { MyModule } from 'my-library-2/myModule';
import { Widget } from 'my-library-2/widget';
import { MyModule } from "my-library-2/myModule";
import { Widget } from "my-library-2/widget";
import dynamic1 from 'next/dynamic'
import dynamic2 from 'next/dynamic'
const DynamicComponent1 = dynamic1(() => import('../components/hello1'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello1'],
},
})
const DynamicComponent2 = dynamic2(() => import('../components/hello2'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello2'],
},
})
import dynamic1 from 'next/dynamic';
import dynamic2 from 'next/dynamic';
const DynamicComponent1 = dynamic1(()=>import('../components/hello1')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello1"
]
}
});
const DynamicComponent2 = dynamic2(()=>import('../components/hello2')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello2"
]
}
});
import dynamic1 from 'next/dynamic'
import dynamic2 from 'next/dynamic'
const DynamicComponent1 = dynamic1(() => import('../components/hello1'), {
loadableGenerated: {
webpack: () => [require.resolveWeak('../components/hello1')],
},
})
const DynamicComponent2 = dynamic2(() => import('../components/hello2'), {
loadableGenerated: {
webpack: () => [require.resolveWeak('../components/hello2')],
},
})
import dynamic1 from 'next/dynamic';
import dynamic2 from 'next/dynamic';
const DynamicComponent1 = dynamic1(()=>import('../components/hello1')
, {
loadableGenerated: {
webpack: ()=>[
require.resolveWeak("../components/hello1")
]
}
});
const DynamicComponent2 = dynamic2(()=>import('../components/hello2')
, {
loadableGenerated: {
webpack: ()=>[
require.resolveWeak("../components/hello2")
]
}
});
import dynamic1 from 'next/dynamic'
import dynamic2 from 'next/dynamic'
const DynamicComponent1 = dynamic1(() => import('../components/hello1'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello1'],
},
})
const DynamicComponent2 = dynamic2(() => import('../components/hello2'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello2'],
},
})
import dynamic1 from 'next/dynamic';
import dynamic2 from 'next/dynamic';
const DynamicComponent1 = dynamic1(()=>import('../components/hello1')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello1"
]
}
});
const DynamicComponent2 = dynamic2(()=>import('../components/hello2')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello2"
]
}
});
import dynamic from 'next/dynamic'
import somethingElse from 'something-else'
const DynamicComponent = dynamic(() => import('../components/hello'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello'],
},
})
somethingElse.dynamic('should not be transformed')
import dynamic from 'next/dynamic';
import somethingElse from 'something-else';
const DynamicComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello"
]
}
});
somethingElse.dynamic('should not be transformed');
import dynamic from 'next/dynamic'
import somethingElse from 'something-else'
const DynamicComponent = dynamic(() => import('../components/hello'), {
loadableGenerated: {
webpack: () => [require.resolveWeak('../components/hello')],
},
})
somethingElse.dynamic('should not be transformed')
import dynamic from 'next/dynamic';
import somethingElse from 'something-else';
const DynamicComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
webpack: ()=>[
require.resolveWeak("../components/hello")
]
}
});
somethingElse.dynamic('should not be transformed');
import dynamic from 'next/dynamic'
import somethingElse from 'something-else'
const DynamicComponent = dynamic(() => import('../components/hello'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello'],
},
})
somethingElse.dynamic('should not be transformed')
import dynamic from 'next/dynamic';
import somethingElse from 'something-else';
const DynamicComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello"
]
}
});
somethingElse.dynamic('should not be transformed');
import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('../components/hello'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello'],
},
})
import dynamic from 'next/dynamic';
const DynamicComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello"
]
}
});
import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('../components/hello'), {
loadableGenerated: {
webpack: () => [require.resolveWeak('../components/hello')],
},
})
import dynamic from 'next/dynamic';
const DynamicComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
webpack: ()=>[
require.resolveWeak("../components/hello")
]
}
});
import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('../components/hello'), {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello'],
},
})
import dynamic from 'next/dynamic';
const DynamicComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello"
]
}
});
import dynamic from "next/dynamic";
const DynamicComponentWithCustomLoading = dynamic(()=>import("../components/hello")
import dynamic from 'next/dynamic';
const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
modules: [
......@@ -8,7 +8,7 @@ const DynamicComponentWithCustomLoading = dynamic(()=>import("../components/hell
},
loading: ()=><p >...</p>
});
const DynamicClientOnlyComponent = dynamic(()=>import("../components/hello")
const DynamicClientOnlyComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
modules: [
......@@ -16,4 +16,4 @@ const DynamicClientOnlyComponent = dynamic(()=>import("../components/hello")
]
},
ssr: false
});
\ No newline at end of file
});
import dynamic from "next/dynamic";
const DynamicComponentWithCustomLoading = dynamic(()=>import("../components/hello")
import dynamic from 'next/dynamic';
const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
webpack: ()=>[
......@@ -8,7 +8,7 @@ const DynamicComponentWithCustomLoading = dynamic(()=>import("../components/hell
},
loading: ()=><p >...</p>
});
const DynamicClientOnlyComponent = dynamic(()=>import("../components/hello")
const DynamicClientOnlyComponent = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
webpack: ()=>[
......@@ -16,4 +16,4 @@ const DynamicClientOnlyComponent = dynamic(()=>import("../components/hello")
]
},
ssr: false
});
\ No newline at end of file
});
import dynamic from 'next/dynamic'
const DynamicComponentWithCustomLoading = dynamic(
() => import('../components/hello'),
{
import dynamic from 'next/dynamic';
const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello')
, {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello'],
modules: [
"some-file.js -> " + "../components/hello"
]
},
loading: () => <p>...</p>,
}
)
loading: ()=><p >...</p>
});
const DynamicClientOnlyComponent = dynamic(null, {
loadableGenerated: {
modules: ['some-file.js -> ' + '../components/hello'],
},
ssr: false,
})
loadableGenerated: {
modules: [
"some-file.js -> " + "../components/hello"
]
},
ssr: false
});
import dynamic from "next/dynamic";
const DynamicComponent = dynamic(()=>handleImport(import("./components/hello"))
import dynamic from 'next/dynamic';
const DynamicComponent = dynamic(()=>handleImport(import('./components/hello'))
, {
loadableGenerated: {
modules: [
......@@ -9,4 +9,4 @@ const DynamicComponent = dynamic(()=>handleImport(import("./components/hello"))
loading: ()=>null
,
ssr: false
});
\ No newline at end of file
});
import dynamic from "next/dynamic";
const DynamicComponent = dynamic(()=>handleImport(import("./components/hello"))
import dynamic from 'next/dynamic';
const DynamicComponent = dynamic(()=>handleImport(import('./components/hello'))
, {
loadableGenerated: {
webpack: ()=>[
......@@ -9,4 +9,4 @@ const DynamicComponent = dynamic(()=>handleImport(import("./components/hello"))
loading: ()=>null
,
ssr: false
});
\ No newline at end of file
});
import dynamic from "next/dynamic";
import dynamic from 'next/dynamic';
const DynamicComponent = dynamic(null, {
loadableGenerated: {
modules: [
......@@ -8,4 +8,4 @@ const DynamicComponent = dynamic(null, {
loading: ()=>null
,
ssr: false
});
\ No newline at end of file
});
export const config = {
amp: "hybrid"
amp: 'hybrid'
};
function About(props) {
return <h3 >My AMP About Page!</h3>;
return <h3 >My AMP About Page!</h3>;
}
export default About;
\ No newline at end of file
export default About;
let shouldBeKept = "should be kept";
let shouldBeKept = 'should be kept';
export default function shouldBeKept() {
console.log(shouldBeKept);
}
\ No newline at end of file
};
let shouldBeKept = "should be kept";
let shouldBeKept = 'should be kept';
export async function keep() {
console.log(shouldBeKept);
}
export let keep1 = "should be kept";
export let keep2 = "should be kept";
let keep3 = "should be kept";
let asKeep = "should be kept";
export { keep3, asKeep as keep4 };
\ No newline at end of file
export let keep1 = 'should be kept';
export let keep2 = 'should be kept';
let keep3 = 'should be kept';
let asKeep = 'should be kept';
export { keep3, asKeep as keep4 };
import other from "other";
import other from 'other';
const [foo] = other;
export var __N_SSP = true;
export default function Home() {
return __jsx("div", null);
}
};
import other from 'other'
const [foo] = other
export var __N_SSG = true
import other from 'other';
const [foo] = other;
export var __N_SSG = true;
export default function Home() {
return __jsx('div', null)
}
return __jsx("div", null);
};
import other from 'other'
const { a, cat: bar } = other
export var __N_SSG = true
import other from 'other';
const { a , cat: bar } = other;
export var __N_SSG = true;
export default function Home() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export class MyClass {}
export default function Test() {
return __jsx('div', null)
export var __N_SSG = true;
export class MyClass {
}
export default function Test() {
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export function Noop() {}
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export const foo = 2
export var __N_SSG = true;
export const foo = 2;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
import { useState, useEffect } from "react";
import { Root, Children, JSXMemberExpression, AttributeValue, AttributeJSX, ValueInRender, ValueInEffect } from "../";
import { useState, useEffect } from 'react';
import { Root, Children, JSXMemberExpression, AttributeValue, AttributeJSX, ValueInRender, ValueInEffect } from '../';
export var __N_SSG = true;
export default function Test() {
const [x, setX] = useState(ValueInRender.value);
useEffect(() => {
useEffect(()=>{
setX(ValueInEffect.value);
}, [])
}, []);
return __jsx(Root, {
x: x
}, __jsx('div', null, __jsx(Children, {
attr: AttributeValue,
jsx: __jsx(AttributeJSX, null)
x: x
}, __jsx("div", null, __jsx(Children, {
attr: AttributeValue,
jsx: __jsx(AttributeJSX, null)
}), __jsx(JSXMemberExpression.Deep.Property, null)));
}
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export { foo, bar as baz } from '.'
export var __N_SSG = true;
export { foo, bar as baz } from '.';
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
import keep_me from 'hello'
import { keep_me2 } from 'hello2'
import * as keep_me3 from 'hello3'
import { but_not_me } from 'bar'
var leave_me_alone = 1
import keep_me from 'hello';
import { keep_me2 } from 'hello2';
import * as keep_me3 from 'hello3';
import { but_not_me } from 'bar';
var leave_me_alone = 1;
function dont_bug_me_either() {}
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
const a = 2
export var __N_SSG = true
const a = 2;
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Test() {
return __jsx('div', null)
}
return __jsx("div", null);
};
export var __N_SSG = true
export var __N_SSG = true;
export default function Home() {
return __jsx('div', null)
}
return __jsx("div", null);
};
class Test extends React.Component {
render() {
return __jsx('div', null)
}
render() {
return __jsx("div", null);
}
}
export var __N_SSG = true
export default Test
export var __N_SSG = true;
export default Test;
export var __N_SSG = true
export var __N_SSG = true;
export default class Test extends React.Component {
render() {
return __jsx('div', null)
}
}
render() {
return __jsx("div", null);
}
};
class El extends React.Component {
render() {
return __jsx('div', null)
}
render() {
return __jsx("div", null);
}
}
const a = 5
export var __N_SSG = true
export { El as default, a }
const a = 5;
export var __N_SSG = true;
export { El as default, a };
function El() {
return __jsx('div', null)
return __jsx("div", null);
}
const a = 5
export var __N_SSG = true
export { El as default, a }
const a = 5;
export var __N_SSG = true;
export { El as default, a };
function El() {
return __jsx('div', null)
return __jsx("div", null);
}
export var __N_SSG = true
export { El as default }
export var __N_SSG = true;
export { El as default };
const a = ()=><div >
<p >hi</p>
<style >{"woot"}</style>
<style >{'woot'}</style>
</div>
;
\ No newline at end of file
;
import _JSXStyle from "styled-jsx/style";
export default (()=>{
const Element = "div";
const Element = 'div';
return <div className={"jsx-abb4c2202db1a207"}>
<div {...test.test} className={"jsx-abb4c2202db1a207" + " " + (test.test && test.test.className != null && test.test.className || "test")}/>
......@@ -11,28 +11,28 @@ export default (()=>{
<div data-test="test" className={"jsx-abb4c2202db1a207"}/>
<div className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
<div className={"jsx-abb4c2202db1a207" + " " + `test`}/>
<div className={"jsx-abb4c2202db1a207" + " " + `test${true ? " test2" : ""}`}/>
<div className={"jsx-abb4c2202db1a207" + " " + `test${true ? ' test2' : ''}`}/>
<div className={"jsx-abb4c2202db1a207" + " " + ("test " + test || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + ('test ' + test || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + ([
"test",
"test2"
].join(" ") || "")}/>
'test',
'test2'
].join(' ') || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (true && "test" || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (true && 'test' || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + ((test ? "test" : null) || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + ((test ? 'test' : null) || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (test || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (test && "test" || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (test && 'test' || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (test && test("test") || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (test && test('test') || "")}/>
<div className={"jsx-abb4c2202db1a207" + " " + (undefined || "")}/>
......@@ -40,29 +40,29 @@ export default (()=>{
<div className={"jsx-abb4c2202db1a207" + " " + (false || "")}/>
<div data-test className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div data-test className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
<div data-test className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div data-test className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
<div data-test="test" className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div data-test="test" className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "test")}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || 'test')}/>
<div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "test")}/>
<div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || 'test')}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || `test ${test ? "test" : ""}`)}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || `test ${test ? 'test' : ''}`)}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test("test") || "")}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') || "")}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test("test") && "test" || "")}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') && 'test' || "")}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test("test") && test2("test") || "")}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || test && test('test') && test2('test') || "")}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
<div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + 'test'}/>
<div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || "test")}/>
<div {...props} {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || 'test')}/>
<div {...props} className={"jsx-abb4c2202db1a207" + " " + (props && props.className != null && props.className || "")}/>
......@@ -70,27 +70,27 @@ export default (()=>{
<div {...props} data-foo {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || props && props.className != null && props.className || "")}/>
<div {...props} data-foo {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || "test")}/>
<div {...props} data-foo {...rest} className={"jsx-abb4c2202db1a207" + " " + (rest && rest.className != null && rest.className || 'test')}/>
<div {...{
id: "foo"
id: 'foo'
}} className={"jsx-abb4c2202db1a207"}/>
<div className={"jsx-abb4c2202db1a207" + " " + "foo"}/>
<div className={"jsx-abb4c2202db1a207" + " " + 'foo'}/>
<div {...{
className: "foo"
className: 'foo'
}} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div className="test" className={"jsx-abb4c2202db1a207" + " " + "foo"}/>
<div className="test" className={"jsx-abb4c2202db1a207" + " " + 'foo'}/>
<div {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || "foo")}/>
<div {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || 'foo')}/>
<div {...{
className: "foo"
className: 'foo'
}} {...bar} className={"jsx-abb4c2202db1a207" + " " + "test"}/>
<div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || "foo")}/>
<div className="test" {...bar} className={"jsx-abb4c2202db1a207" + " " + (bar && bar.className != null && bar.className || 'foo')}/>
<div className="test" className={"jsx-abb4c2202db1a207" + " " + (props.className || "")}/>
......
import _JSXStyle from "styled-jsx/style";
import styles from "./styles";
const styles2 = require("./styles2");
import styles from './styles';
const styles2 = require('./styles2');
// external only
export const Test1 = ()=><div className={`jsx-${styles2.__hash} jsx-${styles.__hash}`}>
......@@ -26,7 +26,7 @@ export const Test2 = ()=><div className={"jsx-81a68341e430a972 " + `jsx-${styles
// external and dynamic
export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([
[
"332b21af86b0ec6",
"accb2339a5faf0f2",
[
color
]
......@@ -35,14 +35,14 @@ export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " "
<p className={`jsx-${styles.__hash}` + " " + _JSXStyle.dynamic([
[
"332b21af86b0ec6",
"accb2339a5faf0f2",
[
color
]
]
])}>external and dynamic</p>
<_JSXStyle id={"332b21af86b0ec6"} dynamic={[
<_JSXStyle id={"accb2339a5faf0f2"} dynamic={[
color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
......@@ -53,7 +53,7 @@ export const Test3 = ({ color })=><div className={`jsx-${styles.__hash}` + " "
// external, static and dynamic
export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[
"ec8f36d08fa7aa2c",
"8e6465b81c401982",
[
color
]
......@@ -62,7 +62,7 @@ export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " js
<p className={`jsx-${styles.__hash}` + " jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[
"ec8f36d08fa7aa2c",
"8e6465b81c401982",
[
color
]
......@@ -71,7 +71,7 @@ export const Test4 = ({ color })=><div className={`jsx-${styles.__hash}` + " js
<_JSXStyle id={"ceba8c9ce34e3d0c"}>{"p.jsx-ceba8c9ce34e3d0c{display:inline-block}"}</_JSXStyle>
<_JSXStyle id={"ec8f36d08fa7aa2c"} dynamic={[
<_JSXStyle id={"8e6465b81c401982"} dynamic={[
color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
......@@ -93,7 +93,7 @@ export const Test5 = ()=><div className={"jsx-df0159ebd3f9fb6f"}>
// static and dynamic
export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[
"ec8f36d08fa7aa2c",
"8e6465b81c401982",
[
color
]
......@@ -102,7 +102,7 @@ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JS
<p className={"jsx-ceba8c9ce34e3d0c " + _JSXStyle.dynamic([
[
"ec8f36d08fa7aa2c",
"8e6465b81c401982",
[
color
]
......@@ -111,7 +111,7 @@ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JS
<_JSXStyle id={"ceba8c9ce34e3d0c"}>{"p.jsx-ceba8c9ce34e3d0c{display:inline-block}"}</_JSXStyle>
<_JSXStyle id={"ec8f36d08fa7aa2c"} dynamic={[
<_JSXStyle id={"8e6465b81c401982"} dynamic={[
color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
......@@ -120,7 +120,7 @@ export const Test6 = ({ color })=><div className={"jsx-ceba8c9ce34e3d0c " + _JS
// dynamic only
export const Test7 = ({ color })=><div className={_JSXStyle.dynamic([
[
"332b21af86b0ec6",
"accb2339a5faf0f2",
[
color
]
......@@ -129,14 +129,14 @@ export const Test7 = ({ color })=><div className={_JSXStyle.dynamic([
<p className={_JSXStyle.dynamic([
[
"332b21af86b0ec6",
"accb2339a5faf0f2",
[
color
]
]
])}>dynamic only</p>
<_JSXStyle id={"332b21af86b0ec6"} dynamic={[
<_JSXStyle id={"accb2339a5faf0f2"} dynamic={[
color
]}>{`p.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
......@@ -150,7 +150,7 @@ export const Test8 = ({ color })=>{
};
return <div className={_JSXStyle.dynamic([
[
"c37e7ca12a9fbc5b",
"3b89706ab84e735b",
[
innerProps.color
]
......@@ -159,14 +159,14 @@ export const Test8 = ({ color })=>{
<p className={_JSXStyle.dynamic([
[
"c37e7ca12a9fbc5b",
"3b89706ab84e735b",
[
innerProps.color
]
]
])}>dynamic with scoped compound variable</p>
<_JSXStyle id={"c37e7ca12a9fbc5b"} dynamic={[
<_JSXStyle id={"3b89706ab84e735b"} dynamic={[
innerProps.color
]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color}}`}</_JSXStyle>
......@@ -180,7 +180,7 @@ export const Test9 = ({ color })=>{
};
return <div className={_JSXStyle.dynamic([
[
"59d22b990ceca2d7",
"65329f5bf03a1958",
[
innerProps.color
]
......@@ -189,26 +189,26 @@ export const Test9 = ({ color })=>{
<p className={_JSXStyle.dynamic([
[
"59d22b990ceca2d7",
"65329f5bf03a1958",
[
innerProps.color
]
]
])}>dynamic with compound variable</p>
<_JSXStyle id={"59d22b990ceca2d7"} dynamic={[
<_JSXStyle id={"65329f5bf03a1958"} dynamic={[
innerProps.color
]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color}}`}</_JSXStyle>
</div>;
};
const foo = "red";
const foo = 'red';
// dynamic with constant variable
export const Test10 = ()=><div className={"jsx-64eb0b4e09da0dd3"}>
export const Test10 = ()=><div className={"jsx-cbdf2f44af4108bd"}>
<p className={"jsx-64eb0b4e09da0dd3"}>dynamic with constant variable</p>
<p className={"jsx-cbdf2f44af4108bd"}>dynamic with constant variable</p>
<_JSXStyle id={"64eb0b4e09da0dd3"}>{`p.jsx-64eb0b4e09da0dd3{color:${foo}}`}</_JSXStyle>
<_JSXStyle id={"cbdf2f44af4108bd"}>{`p.jsx-cbdf2f44af4108bd{color:${foo}}`}</_JSXStyle>
</div>
;
......@@ -218,14 +218,14 @@ export const Test11 = ({ color })=>{
length: 5
}).map((item, i)=><li key={i} className={_JSXStyle.dynamic([
[
"93933d24284432d0",
"79c618068313f86e",
[
color
]
]
]) + " " + "item"}>
<_JSXStyle id={"93933d24284432d0"} dynamic={[
<_JSXStyle id={"79c618068313f86e"} dynamic={[
color
]}>{`.item.__jsx-style-dynamic-selector{color:${color}}`}</_JSXStyle>
......
......@@ -2,9 +2,9 @@ import _JSXStyle from "styled-jsx/style";
function NavigationItem({ active , className , }) {
return <span className={"jsx-2342aae4628612c6" + " " + (cn({
active
}, className, "navigation-item") || "")}>
}, className, 'navigation-item') || "")}>
<_JSXStyle id={"2342aae4628612c6"}>{".navigation-item.jsx-2342aae4628612c6 a::after{content:attr(data-text);content:attr(data-text)/\"\"}"}</_JSXStyle>
<_JSXStyle id={"2342aae4628612c6"}>{'.navigation-item.jsx-2342aae4628612c6 a::after{content:attr(data-text);content:attr(data-text)/""}'}</_JSXStyle>
</span>;
}
......
import _JSXStyle from "styled-jsx/style";
const color = "red";
const otherColor = "green";
const A = ()=><div className={"jsx-319ecfcffea32bfb"}>
const color = 'red';
const otherColor = 'green';
const A = ()=><div className={"jsx-498d4e86e548e679"}>
<p className={"jsx-319ecfcffea32bfb"}>test</p>
<p className={"jsx-498d4e86e548e679"}>test</p>
<_JSXStyle id={"319ecfcffea32bfb"}>{`p.jsx-319ecfcffea32bfb{color:${color}}`}</_JSXStyle>
<_JSXStyle id={"498d4e86e548e679"}>{`p.jsx-498d4e86e548e679{color:${color}}`}</_JSXStyle>
</div>
;
const B = ()=><div className={"jsx-8a19b9bd65b986e0"}>
const B = ()=><div className={"jsx-d051a1c8140076ed"}>
<p className={"jsx-8a19b9bd65b986e0"}>test</p>
<p className={"jsx-d051a1c8140076ed"}>test</p>
<_JSXStyle id={"8a19b9bd65b986e0"}>{`p.jsx-8a19b9bd65b986e0{color:${otherColor}}`}</_JSXStyle>
<_JSXStyle id={"d051a1c8140076ed"}>{`p.jsx-d051a1c8140076ed{color:${otherColor}}`}</_JSXStyle>
</div>
;
......
import _JSXStyle from "styled-jsx/style";
export default class {
render() {
const Element = "div";
const Element = 'div';
return <Element className={"jsx-f825b24bbab5b83b" + " " + "root"}>
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
......@@ -11,7 +11,7 @@ export default class {
</Element>;
}
};
const Element2 = "div";
const Element2 = 'div';
export const Test2 = class {
render() {
return <Element2 className="root">
......
import _JSXStyle from "styled-jsx/style";
import styles from "./styles2";
import styles from './styles2';
export default (({ level =1 })=>{
const Element = `h${level}`;
return <Element className={`jsx-${styles.__hash}` + " " + "root"}>
<p className={`jsx-${styles.__hash}`}>dynamic element</p>
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
</Element>;
});
\ No newline at end of file
});
......@@ -19,7 +19,7 @@ export const TestLowerCase = ({ level =1 })=>{
</element>;
};
const Element2 = "div";
const Element2 = 'div';
export const Test2 = ()=>{
return <Element2 className="root">
......@@ -29,7 +29,7 @@ export const Test2 = ()=>{
</Element2>;
};
export const Test3 = ({ Component ="div" })=>{
export const Test3 = ({ Component ='div' })=>{
return <Component className={"jsx-f825b24bbab5b83b"}>
<p className={"jsx-f825b24bbab5b83b"}>dynamic element</p>
......
import _JSXStyle from "styled-jsx/style";
const darken = (c)=>c
;
const color = "red";
const otherColor = "green";
const mediumScreen = "680px";
const animationDuration = "200ms";
const animationName = "my-cool-animation";
const color = 'red';
const otherColor = 'green';
const mediumScreen = '680px';
const animationDuration = '200ms';
const animationName = 'my-cool-animation';
const obj = {
display: "block"
display: 'block'
};
export default (({ display })=><div className={"jsx-1ada4ad4dab7822f " + _JSXStyle.dynamic([
export default (({ display })=><div className={"jsx-ee922fe7eac00c5e " + _JSXStyle.dynamic([
[
"183a75aa3877c18a",
"374046f7d83960f0",
[
display ? "block" : "none"
display ? 'block' : 'none'
]
],
[
"f07deae908c9294f",
"b29f0adf1035840b",
[
darken(color) + 2
]
],
[
"50021e09364b96c8",
"f03bb8922a3e69b1",
[
darken(color)
]
]
])}>
<p className={"jsx-1ada4ad4dab7822f " + _JSXStyle.dynamic([
<p className={"jsx-ee922fe7eac00c5e " + _JSXStyle.dynamic([
[
"183a75aa3877c18a",
"374046f7d83960f0",
[
display ? "block" : "none"
display ? 'block' : 'none'
]
],
[
"f07deae908c9294f",
"b29f0adf1035840b",
[
darken(color) + 2
]
],
[
"50021e09364b96c8",
"f03bb8922a3e69b1",
[
darken(color)
]
]
])}>test</p>
<_JSXStyle id={"6116059e04f3bff7"}>{`p.${color}.jsx-1ada4ad4dab7822f{color:${otherColor};display:${obj.display}}`}</_JSXStyle>
<_JSXStyle id={"a8107430c6c528d0"}>{`p.${color}.jsx-ee922fe7eac00c5e{color:${otherColor};display:${obj.display}}`}</_JSXStyle>
<_JSXStyle id={"94239b6d6b42c9b5"}>{"p.jsx-1ada4ad4dab7822f{color:red}"}</_JSXStyle>
<_JSXStyle id={"94239b6d6b42c9b5"}>{"p.jsx-ee922fe7eac00c5e{color:red}"}</_JSXStyle>
<_JSXStyle id={"171303fb0d7f788b"}>{`body{background:${color}}`}</_JSXStyle>
<_JSXStyle id={"f0a3b803e45f3568"}>{`body{background:${color}}`}</_JSXStyle>
<_JSXStyle id={"171303fb0d7f788b"}>{`body{background:${color}}`}</_JSXStyle>
<_JSXStyle id={"f0a3b803e45f3568"}>{`body{background:${color}}`}</_JSXStyle>
// TODO: the next two should have the same hash
<_JSXStyle id={"332b21af86b0ec6"}>{`p.jsx-1ada4ad4dab7822f{color:${color}}`}</_JSXStyle>
<_JSXStyle id={"accb2339a5faf0f2"}>{`p.jsx-ee922fe7eac00c5e{color:${color}}`}</_JSXStyle>
<_JSXStyle id={"332b21af86b0ec6"}>{`p.jsx-1ada4ad4dab7822f{color:${color}}`}</_JSXStyle>
<_JSXStyle id={"accb2339a5faf0f2"}>{`p.jsx-ee922fe7eac00c5e{color:${color}}`}</_JSXStyle>
<_JSXStyle id={"50021e09364b96c8"} dynamic={[
<_JSXStyle id={"f03bb8922a3e69b1"} dynamic={[
darken(color)
]}>{`p.__jsx-style-dynamic-selector{color:${darken(color)}}`}</_JSXStyle>
<_JSXStyle id={"f07deae908c9294f"} dynamic={[
<_JSXStyle id={"b29f0adf1035840b"} dynamic={[
darken(color) + 2
]}>{`p.__jsx-style-dynamic-selector{color:${darken(color) + 2}}`}</_JSXStyle>
<_JSXStyle id={"4e4be2da62837c76"}>{`@media(min-width:${mediumScreen}){p.jsx-1ada4ad4dab7822f{color:green}p.jsx-1ada4ad4dab7822f{color:${`red`}}}p.jsx-1ada4ad4dab7822f{color:red}`}</_JSXStyle>
<_JSXStyle id={"d7df5b0be4ac2e3b"}>{`@media(min-width:${mediumScreen}){p.jsx-ee922fe7eac00c5e{color:green}p.jsx-ee922fe7eac00c5e{color:${`red`}}}p.jsx-ee922fe7eac00c5e{color:red}`}</_JSXStyle>
<_JSXStyle id={"27040f0829fb73d4"}>{`p.jsx-1ada4ad4dab7822f{-webkit-animation-duration:${animationDuration};-moz-animation-duration:${animationDuration};-o-animation-duration:${animationDuration};animation-duration:${animationDuration}}`}</_JSXStyle>
<_JSXStyle id={"ff76c479bb5bf1a9"}>{`p.jsx-ee922fe7eac00c5e{-webkit-animation-duration:${animationDuration};-moz-animation-duration:${animationDuration};-o-animation-duration:${animationDuration};animation-duration:${animationDuration}}`}</_JSXStyle>
<_JSXStyle id={"3e72d735e703a530"}>{`p.jsx-1ada4ad4dab7822f{-webkit-animation:${animationDuration} forwards ${animationName};-moz-animation:${animationDuration} forwards ${animationName};-o-animation:${animationDuration} forwards ${animationName};animation:${animationDuration} forwards ${animationName}}div.jsx-1ada4ad4dab7822f{background:${color}}`}</_JSXStyle>
<_JSXStyle id={"f4ba3ad133457656"}>{`p.jsx-ee922fe7eac00c5e{-webkit-animation:${animationDuration} forwards ${animationName};-moz-animation:${animationDuration} forwards ${animationName};-o-animation:${animationDuration} forwards ${animationName};animation:${animationDuration} forwards ${animationName}}div.jsx-ee922fe7eac00c5e{background:${color}}`}</_JSXStyle>
<_JSXStyle id={"183a75aa3877c18a"} dynamic={[
display ? "block" : "none"
]}>{`span.__jsx-style-dynamic-selector{display:${display ? "block" : "none"}}`}</_JSXStyle>
<_JSXStyle id={"374046f7d83960f0"} dynamic={[
display ? 'block' : 'none'
]}>{`span.__jsx-style-dynamic-selector{display:${display ? 'block' : 'none'}}`}</_JSXStyle>
// TODO: causes bad syntax
......
import _JSXStyle from "styled-jsx/style";
import styles, { foo as styles3 } from "./styles";
const styles2 = require("./styles2");
import styles, { foo as styles3 } from './styles';
const styles2 = require('./styles2');
export default (()=><div >
<p >test</p>
<div >woot</div>
<p >woot</p>
<_JSXStyle id={styles2.__hash}>{styles2}</_JSXStyle>
<_JSXStyle id={styles3.__hash}>{styles3}</_JSXStyle>
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
</div>
);
\ No newline at end of file
);
import _JSXStyle from "styled-jsx/style";
import styles from "./styles";
import styles from './styles';
export default (()=><div className={`jsx-${styles.__hash}`}>
<p className={`jsx-${styles.__hash}`}>test</p>
<_JSXStyle id={styles.__hash}>{styles}</_JSXStyle>
</div>
);
\ No newline at end of file
);
import _JSXStyle from "styled-jsx/style";
import styles from "./styles";
const styles2 = require("./styles2");
import { foo as styles3 } from "./styles";
import styles from './styles';
const styles2 = require('./styles2');
import { foo as styles3 } from './styles';
export default (()=><div className={"jsx-bee92b62eadf8a14 " + `jsx-${styles.__hash} jsx-${styles3.__hash}`}>
<p className={"jsx-bee92b62eadf8a14 " + `jsx-${styles.__hash} jsx-${styles3.__hash}` + " " + "foo"}>test</p>
......
import _JSXStyle from "styled-jsx/style";
import React from "react";
import React from 'react';
export default (()=><>
<p className={"jsx-6dd5f97e085c0297"}>Testing!!!</p>
......
import _JSXStyle from "styled-jsx/style";
export default (({ breakPoint })=><div className={_JSXStyle.dynamic([
[
"42a6f8ca08e1a043",
"1568e0a11702cf40",
[
breakPoint
]
]
])}>
<_JSXStyle id={"42a6f8ca08e1a043"} dynamic={[
<_JSXStyle id={"1568e0a11702cf40"} dynamic={[
breakPoint
]}>{`@media(${breakPoint}){}`}</_JSXStyle>
......
......@@ -3,7 +3,7 @@ export default class {
render() {
return <div className={_JSXStyle.dynamic([
[
"5bbb77b0f67942dc",
"ac0c5daa02b1aeac",
[
Typography.base.size.default,
Typography.base.lineHeight,
......@@ -17,7 +17,7 @@ export default class {
<p className={_JSXStyle.dynamic([
[
"5bbb77b0f67942dc",
"ac0c5daa02b1aeac",
[
Typography.base.size.default,
Typography.base.lineHeight,
......@@ -29,7 +29,7 @@ export default class {
]
])}>test</p>
<_JSXStyle id={"5bbb77b0f67942dc"} dynamic={[
<_JSXStyle id={"ac0c5daa02b1aeac"} dynamic={[
Typography.base.size.default,
Typography.base.lineHeight,
Target.mediumPlus,
......
import _JSXStyle from "styled-jsx/style";
const attrs = {
id: "test"
id: 'test'
};
const Test1 = ()=><div className={"jsx-a9535d7d5f32c3c4"}>
......
import css from "hell";
const color = "red";
import css from 'hell';
const color = 'red';
const bar = css`
div {
font-size: 3em;
......@@ -21,4 +21,4 @@ const Title = styled.h1`
`;
const AnotherTitle = Title.extend`color: blue;`;
export const Component = ()=><AnotherTitle >My page</AnotherTitle>
;
\ No newline at end of file
;
import _JSXStyle from "styled-jsx/style";
import Link from "next/link";
export default function IndexPage() {
return <div className={"jsx-b642661fd6426842"}>
return <div className={"jsx-2339e3d61ab4470c"}>
Hello World.{" "}
<Link href="/about">
<a className={"jsx-b642661fd6426842"}>Abound</a>
<a className={"jsx-2339e3d61ab4470c"}>Abound</a>
</Link>
<_JSXStyle id={"b642661fd6426842"}>{`a.jsx-b642661fd6426842{color:${"#abcdef"}12}`}</_JSXStyle>
<_JSXStyle id={"2339e3d61ab4470c"}>{`a.jsx-2339e3d61ab4470c{color:${"#abcdef"}12}`}</_JSXStyle>
</div>;
};
import _JSXStyle from "styled-jsx/style";
import colors, { size } from "./constants";
const color = "red";
import colors, { size } from './constants';
const color = 'red';
const bar = new String("div.jsx-aaed0341accea8f{font-size:3em}");
bar.__hash = "aaed0341accea8f";
const baz = new String("div{font-size:3em}");
baz.__hash = "aaed0341accea8f";
const a = new String(`div{font-size:${size}em}`);
a.__hash = "5ba1fcb8b8f3d807";
a.__hash = "3066b487d298d78f";
export const uh = bar;
export const foo = new String(`div.jsx-945eaa83250ed332{color:${color}}`);
foo.__hash = "945eaa83250ed332";
export const foo = new String(`div.jsx-67354fc16554bdab{color:${color}}`);
foo.__hash = "67354fc16554bdab";
({
styles: <_JSXStyle id={"c107a919a5b2943d"}>{`div.jsx-c107a919a5b2943d{color:${colors.green.light}}a.jsx-c107a919a5b2943d{color:red}`}</_JSXStyle>,
className: "jsx-c107a919a5b2943d"
styles: <_JSXStyle id={"ef44b0e76b4e59a2"}>{`div.jsx-ef44b0e76b4e59a2{color:${colors.green.light}}a.jsx-ef44b0e76b4e59a2{color:red}`}</_JSXStyle>,
className: "jsx-ef44b0e76b4e59a2"
});
const b = {
styles: <_JSXStyle id={"c107a919a5b2943d"}>{`div.jsx-c107a919a5b2943d{color:${colors.green.light}}a.jsx-c107a919a5b2943d{color:red}`}</_JSXStyle>,
className: "jsx-c107a919a5b2943d"
styles: <_JSXStyle id={"ef44b0e76b4e59a2"}>{`div.jsx-ef44b0e76b4e59a2{color:${colors.green.light}}a.jsx-ef44b0e76b4e59a2{color:red}`}</_JSXStyle>,
className: "jsx-ef44b0e76b4e59a2"
};
const dynamic = (colors1)=>{
const b = {
styles: <_JSXStyle id={"60132422fc87f1d1"} dynamic={[
styles: <_JSXStyle id={"d1249fb76dde6727"} dynamic={[
colors1.green.light
]}>{`div.__jsx-style-dynamic-selector{color:${colors1.green.light}}a.__jsx-style-dynamic-selector{color:red}`}</_JSXStyle>,
className: _JSXStyle.dynamic([
[
"60132422fc87f1d1",
"d1249fb76dde6727",
[
colors1.green.light
]
......@@ -34,6 +34,6 @@ const dynamic = (colors1)=>{
};
};
export default {
styles: <_JSXStyle id={"e5da8dd7ff5c7f39"}>{`div.jsx-e5da8dd7ff5c7f39{font-size:3em}p.jsx-e5da8dd7ff5c7f39{color:${color}}`}</_JSXStyle>,
className: "jsx-e5da8dd7ff5c7f39"
styles: <_JSXStyle id={"d85f88350ca31aae"}>{`div.jsx-d85f88350ca31aae{font-size:3em}p.jsx-d85f88350ca31aae{color:${color}}`}</_JSXStyle>,
className: "jsx-d85f88350ca31aae"
};
import _JSXStyle from "styled-jsx/style";
export const Red = ({ Component ="button" , })=>{
export const Red = ({ Component ='button' , })=>{
return <Component className={_JSXStyle.dynamic([
[
"ca900d186ad0e495",
"6c7c8cee856673a7",
[
e1,
e2,
......@@ -27,7 +27,7 @@ export const Red = ({ Component ="button" , })=>{
{}
<_JSXStyle id={"ca900d186ad0e495"} dynamic={[
<_JSXStyle id={"6c7c8cee856673a7"} dynamic={[
e1,
e2,
e3,
......
......@@ -5,7 +5,7 @@ export default class {
<p className={"jsx-1f6cef12199c3a8f"}>test</p>
<_JSXStyle id={"1f6cef12199c3a8f"}>{"p.jsx-1f6cef12199c3a8f{content:\"`\"}"}</_JSXStyle>
<_JSXStyle id={"1f6cef12199c3a8f"}>{'p.jsx-1f6cef12199c3a8f{content:"`"}'}</_JSXStyle>
</div>;
}
......
......@@ -2,14 +2,14 @@ import _JSXStyle from "styled-jsx/style";
export default function Home({ fontFamily }) {
return <div className={_JSXStyle.dynamic([
[
"f804e2f486b6ac13",
"ae6b96ca586fe51a",
[
fontFamily
]
]
])}>
<_JSXStyle id={"f804e2f486b6ac13"} dynamic={[
<_JSXStyle id={"ae6b96ca586fe51a"} dynamic={[
fontFamily
]}>{`body{font-family:${fontFamily}}code:before,code:after{content:"\`"}`}</_JSXStyle>
......
......@@ -3,25 +3,25 @@ export default class {
render() {
return <div className={_JSXStyle.dynamic([
[
"e359801ddd3b3cb6",
"e1b0d3df4c8dcbf0",
[
inputSize ? "height: calc(2 * var(--a)) !important;" : ""
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
]
]
])}>
<p className={_JSXStyle.dynamic([
[
"e359801ddd3b3cb6",
"e1b0d3df4c8dcbf0",
[
inputSize ? "height: calc(2 * var(--a)) !important;" : ""
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
]
]
])}>test</p>
<_JSXStyle id={"e359801ddd3b3cb6"} dynamic={[
inputSize ? "height: calc(2 * var(--a)) !important;" : ""
]}>{`@media only screen{a.__jsx-style-dynamic-selector{${inputSize ? "height: calc(2 * var(--a)) !important;" : ""}
<_JSXStyle id={"e1b0d3df4c8dcbf0"} dynamic={[
inputSize ? 'height: calc(2 * var(--a)) !important;' : ''
]}>{`@media only screen{a.__jsx-style-dynamic-selector{${inputSize ? 'height: calc(2 * var(--a)) !important;' : ''}
}}`}</_JSXStyle>
</div>;
......
......@@ -3,7 +3,7 @@ export default class {
render() {
return <div className={_JSXStyle.dynamic([
[
"1a799d9370a3a386",
"cdb278181c7e83cf",
[
a[b],
-1 * (c || 0),
......@@ -14,7 +14,7 @@ export default class {
<p className={_JSXStyle.dynamic([
[
"1a799d9370a3a386",
"cdb278181c7e83cf",
[
a[b],
-1 * (c || 0),
......@@ -23,7 +23,7 @@ export default class {
]
])}>test</p>
<_JSXStyle id={"1a799d9370a3a386"} dynamic={[
<_JSXStyle id={"cdb278181c7e83cf"} dynamic={[
a[b],
-1 * (c || 0),
d
......
......@@ -3,7 +3,7 @@ export default class {
render() {
return <div className={_JSXStyle.dynamic([
[
"4ca4ef3595473f53",
"b249ec2f79615bbf",
[
a
]
......@@ -12,14 +12,14 @@ export default class {
<p className={_JSXStyle.dynamic([
[
"4ca4ef3595473f53",
"b249ec2f79615bbf",
[
a
]
]
])}>test</p>
<_JSXStyle id={"4ca4ef3595473f53"} dynamic={[
<_JSXStyle id={"b249ec2f79615bbf"} dynamic={[
a
]}>{`@media only screen{a.__jsx-style-dynamic-selector{color:${a}}}`}</_JSXStyle>
......
......@@ -3,28 +3,28 @@ export default class {
render() {
return <div className={_JSXStyle.dynamic([
[
"97886c1e9511aafa",
"6021be0687550489",
[
a || "var(--c)",
b || "inherit"
a || 'var(--c)',
b || 'inherit'
]
]
])}>
<p className={_JSXStyle.dynamic([
[
"97886c1e9511aafa",
"6021be0687550489",
[
a || "var(--c)",
b || "inherit"
a || 'var(--c)',
b || 'inherit'
]
]
])}>test</p>
<_JSXStyle id={"97886c1e9511aafa"} dynamic={[
a || "var(--c)",
b || "inherit"
]}>{`.a:hover .b.__jsx-style-dynamic-selector{display:inline-block;padding:0 ${a || "var(--c)"};color:${b || "inherit"}}`}</_JSXStyle>
<_JSXStyle id={"6021be0687550489"} dynamic={[
a || 'var(--c)',
b || 'inherit'
]}>{`.a:hover .b.__jsx-style-dynamic-selector{display:inline-block;padding:0 ${a || 'var(--c)'};color:${b || 'inherit'}}`}</_JSXStyle>
</div>;
}
......
......@@ -3,28 +3,28 @@ export default class {
render() {
return <div className={_JSXStyle.dynamic([
[
"bcc606c168bcd197",
"e2cf1d088389269b",
[
a ? "100%" : "200px",
b ? "0" : "8px 20px"
a ? '100%' : '200px',
b ? '0' : '8px 20px'
]
]
])}>
<p className={_JSXStyle.dynamic([
[
"bcc606c168bcd197",
"e2cf1d088389269b",
[
a ? "100%" : "200px",
b ? "0" : "8px 20px"
a ? '100%' : '200px',
b ? '0' : '8px 20px'
]
]
])}>test</p>
<_JSXStyle id={"bcc606c168bcd197"} dynamic={[
a ? "100%" : "200px",
b ? "0" : "8px 20px"
]}>{`.item.__jsx-style-dynamic-selector{max-width:${a ? "100%" : "200px"};padding:${b ? "0" : "8px 20px"}}`}</_JSXStyle>
<_JSXStyle id={"e2cf1d088389269b"} dynamic={[
a ? '100%' : '200px',
b ? '0' : '8px 20px'
]}>{`.item.__jsx-style-dynamic-selector{max-width:${a ? '100%' : '200px'};padding:${b ? '0' : '8px 20px'}}`}</_JSXStyle>
</div>;
}
......
......@@ -3,7 +3,7 @@ export default (()=><div className={"jsx-53fd644ab080300c"}>
<p className={"jsx-53fd644ab080300c"}>test</p>
<_JSXStyle id={"53fd644ab080300c"}>{"html.jsx-53fd644ab080300c{background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:blue}p{color:blue}p,a.jsx-53fd644ab080300c{color:blue}.foo+a{color:red}body{font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Helvetica,Arial,sans-serif}"}</_JSXStyle>
<_JSXStyle id={"53fd644ab080300c"}>{'html.jsx-53fd644ab080300c{background-image:-webkit-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-moz-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:-o-linear-gradient(bottom,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg);background-image:linear-gradient(0deg,rgba(255,255,255,.8),rgba(255,255,255,.8)),url(/static/background.svg)}p{color:blue}p{color:blue}p,a.jsx-53fd644ab080300c{color:blue}.foo+a{color:red}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif}'}</_JSXStyle>
</div>
);
......@@ -3,7 +3,7 @@ export default (()=><div className={"jsx-1f7963ae04c6466a"}>
<p className={"jsx-1f7963ae04c6466a"}>test</p>
<_JSXStyle id={"1f7963ae04c6466a"}>{"@media(min-width:1px)and (max-width:768px){[class*=\"grid__col--\"].jsx-1f7963ae04c6466a{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-1f7963ae04c6466a{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-1f7963ae04c6466a{margin-bottom:2rem}}}"}</_JSXStyle>
<_JSXStyle id={"1f7963ae04c6466a"}>{'@media(min-width:1px)and (max-width:768px){[class*="grid__col--"].jsx-1f7963ae04c6466a{margin-top:12px;margin-bottom:12px}}@media(max-width:64em){.test.jsx-1f7963ae04c6466a{margin-bottom:1em}@supports(-moz-appearance:none)and (display:contents){.test.jsx-1f7963ae04c6466a{margin-bottom:2rem}}}'}</_JSXStyle>
</div>
);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment