From a47c871fe98c9f4f99cac328ec53d25e84684985 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 17 Sep 2019 21:24:35 -0500 Subject: [PATCH 01/15] Create demo page --- pages/demo.tsx | 6 ++++ src/components/DemoCardList.tsx | 38 +++++++++++++++++++++++++ src/components/EpisodeCardList.tsx | 8 ++++-- src/components/EpisodeHero.tsx | 41 ++++++++++++++++++++------- src/components/EpisodePage.tsx | 24 +++++++++++++--- src/components/EpisodePageWrapper.tsx | 8 ++++-- src/components/H.tsx | 8 ++++++ src/components/NotFoundCardList.tsx | 2 +- src/components/Toc.tsx | 32 ++++++++++++++++++++- 9 files changed, 147 insertions(+), 20 deletions(-) create mode 100644 pages/demo.tsx create mode 100644 src/components/DemoCardList.tsx diff --git a/pages/demo.tsx b/pages/demo.tsx new file mode 100644 index 000000000..77b804371 --- /dev/null +++ b/pages/demo.tsx @@ -0,0 +1,6 @@ +import React from 'react' +import EpisodePageWrapper from 'src/components/EpisodePageWrapper' + +const Index = () => + +export default Index diff --git a/src/components/DemoCardList.tsx b/src/components/DemoCardList.tsx new file mode 100644 index 000000000..ca3e6d581 --- /dev/null +++ b/src/components/DemoCardList.tsx @@ -0,0 +1,38 @@ +/** @jsx jsx */ +import { css, jsx } from '@emotion/core' +import { P } from 'src/components/ContentTags' +import EpisodeCardList from 'src/components/EpisodeCardList' +import Toc from 'src/components/Toc' +import H from 'src/components/H' + +const DemoCardList = () => ( + + + + ), + content: ( + <> +

+ +

+ + + ) + } + ]} + /> +) + +export default DemoCardList diff --git a/src/components/EpisodeCardList.tsx b/src/components/EpisodeCardList.tsx index c953f00ca..934152d67 100644 --- a/src/components/EpisodeCardList.tsx +++ b/src/components/EpisodeCardList.tsx @@ -33,10 +33,12 @@ export type EpisodeCardListType = readonly EpisodeCardType[] const EpisodeCardList = ({ cards, notFound, + demo, underConstruction }: { cards: EpisodeCardListType notFound: boolean + demo: boolean underConstruction?: boolean }) => { const { episodeNumber } = useContext(EpisodeContext) @@ -46,7 +48,7 @@ const EpisodeCardList = ({ return ( <> - + <> {underConstruction && ( { +const EpisodeHero = ({ + demo, + notFound +}: { + demo: boolean + notFound: boolean +}) => { const { episodeTitle, episodeNumber } = useContext(EpisodeContext) return (
{ `} > <> - {episodeTitle ? ( + {episodeTitle || demo || notFound ? ( <>

{ ` ]} > - {episodeTitle} + {notFound ? ( + + ) : demo ? ( + + ) : ( + episodeTitle + )}

) : ( @@ -99,17 +111,26 @@ const EpisodeHero = () => { - emoji === '🔲' ? ( - - ) : ( - {emoji} - ) + nodes={(demo + ? ['🍱', '▶️', '🔲'] + : notFound + ? ['❓', '😭', '❓'] + : episodeEmojis[episodeNumber as keyof typeof episodeEmojis] + ).map(emoji => + emoji === '🔲' ? ( + + ) : ( + {emoji} + ) )} />
) } +EpisodeHero.defaultProps = { + demo: false, + notFound: false +} + export default EpisodeHero diff --git a/src/components/EpisodePage.tsx b/src/components/EpisodePage.tsx index 0db43c6ce..5759cf9a6 100644 --- a/src/components/EpisodePage.tsx +++ b/src/components/EpisodePage.tsx @@ -12,6 +12,7 @@ import Page from 'src/components/Page' import TocModal from 'src/components/TocModal' import episodeEmojis from 'src/lib/episodeEmojis' import NotFoundCardList from 'src/components/NotFoundCardList' +import DemoCardList from 'src/components/DemoCardList' import { ogUrl } from 'src/lib/meta' import locale from 'src/lib/locale' @@ -21,6 +22,7 @@ export interface EpisodePageProps { episodeTitleString?: React.ReactNode episodeNumber: number notFound: boolean + demo: boolean contentName: ContentProps['name'] } @@ -30,6 +32,7 @@ const EpisodePage = ({ episodeTitleString, episodeNumber, notFound, + demo, contentName }: EpisodePageProps) => { const title = `${ @@ -52,7 +55,7 @@ const EpisodePage = ({ {modalVisible && } - {!notFound ? ( + {!notFound && !demo ? ( - {notFound ? : } + {notFound ? ( + + ) : demo ? ( + + ) : ( + + )} - {!notFound && ( + {!notFound && !demo ? ( + ) : ( +
)} @@ -89,7 +104,8 @@ const EpisodePage = ({ } EpisodePage.defaultProps = { - notFound: false + notFound: false, + demo: false } export default EpisodePage diff --git a/src/components/EpisodePageWrapper.tsx b/src/components/EpisodePageWrapper.tsx index b274ea610..1cb6df4d2 100644 --- a/src/components/EpisodePageWrapper.tsx +++ b/src/components/EpisodePageWrapper.tsx @@ -7,11 +7,13 @@ import H from 'src/components/H' interface EpisodePageWrapperProps { episodeNumber: number notFound: boolean + demo: boolean } const EpisodePageWrapper = ({ episodeNumber, - notFound + notFound, + demo }: EpisodePageWrapperProps) => ( ) EpisodePageWrapper.defaultProps = { - notFound: false + notFound: false, + demo: false } export default EpisodePageWrapper diff --git a/src/components/H.tsx b/src/components/H.tsx index cc952f3fa..f2f1a0ffe 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -153,6 +153,7 @@ interface HProps { | { name: 'testimonialsTitle' } | { name: 'testimonialsContent' } | { name: 'goToOtherPage' } + | { name: 'demoTitle' } } const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { @@ -1355,6 +1356,13 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { ) } } + if (args.name === 'demoTitle') { + if (locale === 'en') { + return <>Demo Page + } else { + return <>デモページ + } + } throw new Error() } diff --git a/src/components/NotFoundCardList.tsx b/src/components/NotFoundCardList.tsx index 74af10f75..6fb92ff2f 100644 --- a/src/components/NotFoundCardList.tsx +++ b/src/components/NotFoundCardList.tsx @@ -27,7 +27,7 @@ const NotFoundCardList = () => ( >

- + ) } diff --git a/src/components/Toc.tsx b/src/components/Toc.tsx index b747d1bf6..ee052f1aa 100644 --- a/src/components/Toc.tsx +++ b/src/components/Toc.tsx @@ -3,10 +3,11 @@ import { jsx, css } from '@emotion/core' import { numEpisodesExceptFirstAndLast } from 'src/lib/episodeCategories' import { spaces, colors } from 'src/lib/theme' import { InternalLink } from 'src/components/ContentTags/Links' +import { lessonTitle } from 'src/lib/titles' import H from 'src/components/H' import { episodeTitles } from 'src/lib/titles' -const Toc = () => ( +const Toc = ({ includeFirstPage }: { includeFirstPage: boolean }) => (
    ( padding: 0; `} > + {includeFirstPage && ( +
  • + + + {lessonTitle} + +
  • + )} {[...Array(numEpisodesExceptFirstAndLast).keys()].map(i => { const episodeNumber = i + 1 return ( @@ -72,4 +98,8 @@ const Toc = () => (
) +Toc.defaultProps = { + includeFirstPage: false +} + export default Toc From 6ea1816aaacb563595d7089b73a0884cc93f7859 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 17 Sep 2019 22:12:43 -0500 Subject: [PATCH 02/15] Polish demo page --- pages/demo.tsx | 4 ++-- src/components/DemoCardList.tsx | 40 +++++---------------------------- src/components/EpisodePage.tsx | 7 +++--- src/components/H.tsx | 11 ++++++++- src/contents/demo.en.tsx | 26 +++++++++++++++++++++ src/contents/demo.jp.tsx | 23 +++++++++++++++++++ src/lib/meta.ts | 2 ++ 7 files changed, 72 insertions(+), 41 deletions(-) create mode 100644 src/contents/demo.en.tsx create mode 100644 src/contents/demo.jp.tsx diff --git a/pages/demo.tsx b/pages/demo.tsx index 77b804371..f8c9687ab 100644 --- a/pages/demo.tsx +++ b/pages/demo.tsx @@ -1,6 +1,6 @@ import React from 'react' import EpisodePageWrapper from 'src/components/EpisodePageWrapper' -const Index = () => +const Demo = () => -export default Index +export default Demo diff --git a/src/components/DemoCardList.tsx b/src/components/DemoCardList.tsx index ca3e6d581..64f12a534 100644 --- a/src/components/DemoCardList.tsx +++ b/src/components/DemoCardList.tsx @@ -1,38 +1,8 @@ -/** @jsx jsx */ -import { css, jsx } from '@emotion/core' -import { P } from 'src/components/ContentTags' -import EpisodeCardList from 'src/components/EpisodeCardList' -import Toc from 'src/components/Toc' -import H from 'src/components/H' +import React from 'react' +import DemoJp from 'src/contents/demo.jp' +import DemoEn from 'src/contents/demo.en' +import locale from 'src/lib/locale' -const DemoCardList = () => ( - - - - ), - content: ( - <> -

- -

- - - ) - } - ]} - /> -) +const DemoCardList = () => (locale === 'en' ? : ) export default DemoCardList diff --git a/src/components/EpisodePage.tsx b/src/components/EpisodePage.tsx index 5759cf9a6..95c3f3081 100644 --- a/src/components/EpisodePage.tsx +++ b/src/components/EpisodePage.tsx @@ -13,7 +13,7 @@ import TocModal from 'src/components/TocModal' import episodeEmojis from 'src/lib/episodeEmojis' import NotFoundCardList from 'src/components/NotFoundCardList' import DemoCardList from 'src/components/DemoCardList' -import { ogUrl } from 'src/lib/meta' +import { ogUrl, demoUrl } from 'src/lib/meta' import locale from 'src/lib/locale' export interface EpisodePageProps { @@ -45,14 +45,15 @@ const EpisodePage = ({ const [modalVisible, setModalVisible] = useState(false) const hideModal = () => setModalVisible(false) const showModal = () => setModalVisible(true) + const url = demo ? demoUrl : ogUrl(episodeNumber) return ( {title} - - + + {modalVisible && } {!notFound && !demo ? ( diff --git a/src/components/H.tsx b/src/components/H.tsx index f2f1a0ffe..38c7ba91b 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -154,6 +154,8 @@ interface HProps { | { name: 'testimonialsContent' } | { name: 'goToOtherPage' } | { name: 'demoTitle' } + | { name: 'demoFirstCardTitle' } + | { name: 'demoFirstCardContent' } } const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { @@ -807,7 +809,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'lookAtToc') { if (locale === 'en') { - return <>Take a look at the table of contents: + return <>Here’s table of contents: } else { return <>目次はこちらです: } @@ -1363,6 +1365,13 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { return <>デモページ } } + if (args.name === 'demoFirstCardTitle') { + if (locale === 'en') { + return <>This is a demo page + } else { + return <>これはデモページです + } + } throw new Error() } diff --git a/src/contents/demo.en.tsx b/src/contents/demo.en.tsx new file mode 100644 index 000000000..95e3684e0 --- /dev/null +++ b/src/contents/demo.en.tsx @@ -0,0 +1,26 @@ +import React from 'react' +import { P, Strong } from 'src/components/ContentTags' +import EpisodeCardList from 'src/components/EpisodeCardList' + +const DemoCardList = () => ( + This is a demo page, + content: ( + <> +

+ I use this page when demonstrating materials from this course to + someone in person. So there won’t be any + explanations written on this page. +

+ + ) + } + ]} + /> +) + +export default DemoCardList diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx new file mode 100644 index 000000000..f5a695758 --- /dev/null +++ b/src/contents/demo.jp.tsx @@ -0,0 +1,23 @@ +import React from 'react' +import { P } from 'src/components/ContentTags' +import EpisodeCardList from 'src/components/EpisodeCardList' + +const DemoCardList = () => ( + これはデモページです, + content: ( + <> +

+ このページはデモ用に作ったページです。わたしが人前で解説しながらこのページを使うので、説明は一切書いていません。 +

+ + ) + } + ]} + /> +) + +export default DemoCardList diff --git a/src/lib/meta.ts b/src/lib/meta.ts index de81bab0b..2cc2a453c 100644 --- a/src/lib/meta.ts +++ b/src/lib/meta.ts @@ -9,3 +9,5 @@ export const ogImageUrl = `${baseUrl}/static/images/og-image-${locale}-v5.png` export const ogUrl = (episodeNumber: number) => `${baseUrl}${episodeNumber > 0 ? `/${episodeNumber}/` : ''}` + +export const demoUrl = `${baseUrl}/demo/` From 04fff22fc4f7d4ebeee05a908235d0349a87bd96 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Tue, 17 Sep 2019 22:47:10 -0500 Subject: [PATCH 03/15] Continue with demo --- scripts/lib/runnerConfigs.ts | 3 +- src/contents/demo.en.tsx | 1 + src/contents/demo.jp.tsx | 74 +++++++++++++++++++++++++++++++++++- src/lib/runners/pgxb.json | 2 +- 4 files changed, 75 insertions(+), 5 deletions(-) diff --git a/scripts/lib/runnerConfigs.ts b/scripts/lib/runnerConfigs.ts index e2ace60be..85f7b395b 100644 --- a/scripts/lib/runnerConfigs.ts +++ b/scripts/lib/runnerConfigs.ts @@ -967,8 +967,7 @@ export const pgxb: ExpressionRunnerShorthandConfig = { initialExpressionContainers: [ initialExpressionContainers.bmar, initialExpressionContainers.ilbg - ], - variableSize: 'md' + ] } export const ednv: ExpressionRunnerShorthandConfig = { diff --git a/src/contents/demo.en.tsx b/src/contents/demo.en.tsx index 95e3684e0..d196c3e6b 100644 --- a/src/contents/demo.en.tsx +++ b/src/contents/demo.en.tsx @@ -8,6 +8,7 @@ const DemoCardList = () => ( cards={[ { t8d: true, + type: 'summary', title: <>This is a demo page, content: ( <> diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index f5a695758..9d92b35fb 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -1,20 +1,90 @@ import React from 'react' -import { P } from 'src/components/ContentTags' +import { P, Hr } from 'src/components/ContentTags' import EpisodeCardList from 'src/components/EpisodeCardList' +import ExpressionRunnerSeparator from 'src/components/ExpressionRunnerSeparator' +import H from 'src/components/H' +import * as R from 'src/components/Runners' const DemoCardList = () => ( これはデモページです, content: ( <>

- このページはデモ用に作ったページです。わたしが人前で解説しながらこのページを使うので、説明は一切書いていません。 + このページはデモ用に作ったページです。わたしがデモを行いながらこのページを使うので、説明は一切書いていません。

) + }, + { + title: ( + <> + 計算箱の「 + 」 + + ), + content: ( + <> + + + + ) + }, + { + title: ( + <> + 計算箱の「 + 」 + + ), + content: ( + <> + + + ) + }, + { + title: ( + <> + 「 + + 」と「 + + 」を複数使う + + ), + content: ( + <> + + + + ) + }, + { + title: ( + <> + 計算箱の「 + 」 + + ), + content: ( + <> + + +
+ + + +
+ + + + + ) } ]} /> diff --git a/src/lib/runners/pgxb.json b/src/lib/runners/pgxb.json index 4311e7324..2619082b2 100644 --- a/src/lib/runners/pgxb.json +++ b/src/lib/runners/pgxb.json @@ -62,7 +62,7 @@ "hideControls": false, "explanationsVisibility": "hiddenInitialPausedOnly", "hidePriorities": true, - "variableSize": "md", + "variableSize": "lg", "containerSize": "xxs", "hidePlayButton": false, "hideBottomRightBadges": false, From e150fc81dd661c0edfbb6300292f2a8c2f3db8bc Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 09:38:41 -0700 Subject: [PATCH 04/15] Continue with demo page --- src/contents/demo.jp.tsx | 75 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index 9d92b35fb..d9d1d73ec 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -2,8 +2,13 @@ import React from 'react' import { P, Hr } from 'src/components/ContentTags' import EpisodeCardList from 'src/components/EpisodeCardList' import ExpressionRunnerSeparator from 'src/components/ExpressionRunnerSeparator' +import EmojiSeparator from 'src/components/EmojiSeparator' +import Emoji from 'src/components/Emoji' +import CustomEmoji from 'src/components/CustomEmoji' import H from 'src/components/H' import * as R from 'src/components/Runners' +import { BasicRules, Unmatched } from 'src/contents/4.jp' +import { ThreeRowRules, Beginner5Rules } from 'src/contents/5.jp' const DemoCardList = () => ( ( ) }, + { + title: <>パート1: 計算箱の説明, + content: ( + <> + , + , + + ]} + description={<>計算箱} + /> + + ) + }, { title: ( <> @@ -85,6 +105,61 @@ const DemoCardList = () => ( ) + }, + { + title: <>パート2: 弁当箱の説明, + content: ( + <> + 🍱, 🍱, 🍱]} + description={<>弁当箱} + /> + + ) + }, + { + title: <>2段の弁当箱, + content: ( + <> + + + + + + ) + }, + { + title: <>弁当箱の法則, + type: 'summary', + content: ( + <> + +
+ + + ) + }, + { + title: <>3段の弁当箱, + content: ( + <> + + + + + + ) + }, + { + type: 'summary', + title: <>3段の弁当箱の法則, + content: ( + <> + +
+ + + ) } ]} /> From dee8f954748c94a593d264be6cad5ea202f2b72b Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 10:15:36 -0700 Subject: [PATCH 05/15] Continue with 6 --- src/components/H.tsx | 14 +++++++++ src/contents/6.jp.tsx | 4 +-- src/contents/demo.jp.tsx | 68 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 82 insertions(+), 4 deletions(-) diff --git a/src/components/H.tsx b/src/components/H.tsx index 38c7ba91b..8bd1f314a 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -156,6 +156,7 @@ interface HProps { | { name: 'demoTitle' } | { name: 'demoFirstCardTitle' } | { name: 'demoFirstCardContent' } + | { name: 'whatTheNumberIsCaption' } } const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { @@ -1372,6 +1373,19 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { return <>これはデモページです } } + if (args.name === 'whatTheNumberIsCaption') { + if (locale === 'en') { + return <> + } else { + return ( + <> + 右下にある 🅰️ がついた料理の数が、 +
+ 変換後の計算箱の数字 + + ) + } + } throw new Error() } diff --git a/src/contents/6.jp.tsx b/src/contents/6.jp.tsx index 2e12f67f6..1bd023c68 100644 --- a/src/contents/6.jp.tsx +++ b/src/contents/6.jp.tsx @@ -717,9 +717,7 @@ export default () => ( ]} /> - 右下にある 🅰️ がついた料理の数が、 -
- 変換後の計算箱の数字 +
( demo cards={[ { - type: 'summary', + type: 'meta', title: <>これはデモページです, content: ( <> @@ -26,6 +26,7 @@ const DemoCardList = () => ( ) }, { + type: 'sideNote', title: <>パート1: 計算箱の説明, content: ( <> @@ -160,6 +161,71 @@ const DemoCardList = () => ( ) + }, + { + type: 'sideNote', + title: <>パート3: 弁当箱を計算箱に変換, + content: ( + <> + , + , + + ]} + description={<>計算箱} + /> + + ) + }, + { + title: <>弁当箱を計算箱に変換, + content: ( + <> + + + + + + ) + }, + { + title: <>計算箱に変換できる法則, + type: 'summary', + content: ( + <> + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + ) } ]} /> From 128bbf2c38bd7ea0ca291175bdd8115b9e3427f6 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 11:46:20 -0700 Subject: [PATCH 06/15] Run and convert --- src/contents/demo.jp.tsx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index f353fc2e9..1829bd503 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -226,6 +226,36 @@ const DemoCardList = () => ( ) + }, + { + title: <>実行してから変換, + content: ( + <> + +
+ +
+ + + + + +
+ +
+ +
+ + + + + + + ) } ]} /> From 5c6af9e956a326f265d4c649f30ce0ec9b332837 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 16:42:25 -0700 Subject: [PATCH 07/15] :pencil: --- src/contents/demo.jp.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index 1829bd503..48ab01904 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -256,6 +256,24 @@ const DemoCardList = () => ( ) + }, + { + title: <>パート4: 1を足す, + content: ( + <> + + + +
+ + + ) } ]} /> From f14ce0b1170777a18cf5ef3a94b75ebfcf7ab08b Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 17:11:25 -0700 Subject: [PATCH 08/15] Continue with demo --- scripts/lib/runnerConfigs.ts | 8 + src/components/Runners/Rjzw.tsx | 12 + src/components/Runners/index.ts | 1 + src/contents/demo.jp.tsx | 61 +- src/lib/runners/rjzw.json | 2903 +++++++++++++++++++++++++++++++ 5 files changed, 2983 insertions(+), 2 deletions(-) create mode 100644 src/components/Runners/Rjzw.tsx create mode 100644 src/lib/runners/rjzw.json diff --git a/scripts/lib/runnerConfigs.ts b/scripts/lib/runnerConfigs.ts index 85f7b395b..570e3e3ad 100644 --- a/scripts/lib/runnerConfigs.ts +++ b/scripts/lib/runnerConfigs.ts @@ -1329,6 +1329,14 @@ export const plde: ExpressionRunnerShorthandConfig = { variableSize: 'md' } +export const rjzw: ExpressionRunnerShorthandConfig = { + runner: 'playButtonOnly', + initialExpressionContainer: initialExpressionContainers.uqth, + showPriorities: true, + variableSize: 'md', + skipToTheEnd: false +} + export const jsvg: ExpressionRunnerShorthandConfig = { runner: 'playButtonOnly', initialExpressionContainer: initialExpressionContainers.uqth, diff --git a/src/components/Runners/Rjzw.tsx b/src/components/Runners/Rjzw.tsx new file mode 100644 index 000000000..f39138f63 --- /dev/null +++ b/src/components/Runners/Rjzw.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import ExpressionRunnerPrecomputed from 'src/components/ExpressionRunnerPrecomputed' +import config from 'src/lib/runners/rjzw.json' + +const Rjzw = ({ children }: { children?: React.ReactNode }) => ( + // @ts-ignore + + {children} + +) + +export default Rjzw diff --git a/src/components/Runners/index.ts b/src/components/Runners/index.ts index 4591b6d5a..bcb1e164c 100644 --- a/src/components/Runners/index.ts +++ b/src/components/Runners/index.ts @@ -195,6 +195,7 @@ export { default as Fhrd } from 'src/components/Runners/Fhrd' export { default as Bgxi } from 'src/components/Runners/Bgxi' export { default as Qrfw } from 'src/components/Runners/Qrfw' export { default as Plde } from 'src/components/Runners/Plde' +export { default as Rjzw } from 'src/components/Runners/Rjzw' export { default as Jsvg } from 'src/components/Runners/Jsvg' export { default as Uexo } from 'src/components/Runners/Uexo' export { default as Hdhy } from 'src/components/Runners/Hdhy' diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index 48ab01904..1ae1c52da 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -5,6 +5,7 @@ import ExpressionRunnerSeparator from 'src/components/ExpressionRunnerSeparator' import EmojiSeparator from 'src/components/EmojiSeparator' import Emoji from 'src/components/Emoji' import CustomEmoji from 'src/components/CustomEmoji' +import EmojiNumber from 'src/components/EmojiNumber' import H from 'src/components/H' import * as R from 'src/components/Runners' import { BasicRules, Unmatched } from 'src/contents/4.jp' @@ -108,6 +109,7 @@ const DemoCardList = () => ( ) }, { + type: 'sideNote', title: <>パート2: 弁当箱の説明, content: ( <> @@ -169,8 +171,8 @@ const DemoCardList = () => ( <> , - , + 🍱, + , ]} description={<>計算箱} @@ -259,6 +261,55 @@ const DemoCardList = () => ( }, { title: <>パート4: 1を足す, + type: 'sideNote', + content: ( + <> + , + , + + ]} + /> + + ) + }, + { + title: ( + <> + {' '} + を計算 + + ), + content: ( + <> + + + +
+ +
+ + + + + ) + }, + { + title: ( + <> + {' '} + を計算 + + ), content: ( <> @@ -272,6 +323,12 @@ const DemoCardList = () => (
+
+ + + ) } diff --git a/src/lib/runners/rjzw.json b/src/lib/runners/rjzw.json new file mode 100644 index 000000000..85d09f585 --- /dev/null +++ b/src/lib/runners/rjzw.json @@ -0,0 +1,2903 @@ +{ + "expressionContainers": [ + { + "containerState": "ready", + "previouslyChangedExpressionState": "default", + "expression": { + "arg": { + "arg": { + "name": "d", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "func": { + "arg": { + "name": "a", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "a", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "type": "function" + }, + "state": "default", + "type": "call", + "priority": 1 + } + }, + { + "expression": { + "arg": { + "arg": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "func": { + "arg": { + "name": "a", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "a", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "type": "function" + }, + "state": "active", + "type": "call", + "priority": 1 + }, + "previouslyChangedExpressionState": "active", + "activePriority": 1, + "containerState": "stepped" + }, + { + "expression": { + "arg": { + "arg": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "func": { + "arg": { + "name": "a", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "a", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "type": "function" + }, + "state": "showFuncUnbound", + "type": "call", + "priority": 1 + }, + "previouslyChangedExpressionState": "showFuncUnbound", + "activePriority": 1, + "containerState": "stepped" + }, + { + "expression": { + "arg": { + "arg": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "func": { + "arg": { + "name": "a", + "highlightType": "highlighted", + "topLeftBadgeType": "match", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "highlighted", + "topLeftBadgeType": "unmatch", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "highlighted", + "topLeftBadgeType": "unmatch", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "a", + "highlightType": "highlighted", + "topLeftBadgeType": "match", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "highlighted", + "topLeftBadgeType": "unmatch", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "type": "function" + }, + "state": "betaReducePreviewBefore", + "type": "call", + "priority": 1 + }, + "previouslyChangedExpressionState": "betaReducePreviewBefore", + "matchExists": true, + "activePriority": 1, + "containerState": "stepped" + }, + { + "expression": { + "arg": { + "arg": { + "name": "d", + "highlightType": "betaReduceCallArgHighlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "betaReduceCallArgHighlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "betaReduceCallArgHighlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "betaReduceCallArgHighlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "func": { + "arg": { + "name": "a", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "highlighted", + "topLeftBadgeType": "betaReduced", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "highlighted", + "topLeftBadgeType": "betaReduced", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "highlighted", + "topLeftBadgeType": "betaReduced", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "highlighted", + "topLeftBadgeType": "betaReduced", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "type": "function" + }, + "state": "betaReducePreviewAfter", + "type": "call", + "priority": 1 + }, + "previouslyChangedExpressionState": "betaReducePreviewAfter", + "activePriority": 1, + "containerState": "stepped" + }, + { + "expression": { + "arg": { + "arg": { + "name": "d", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "func": { + "arg": { + "name": "a", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "type": "function" + }, + "state": "betaReducePreviewCrossed", + "type": "call", + "priority": 1 + }, + "previouslyChangedExpressionState": "betaReducePreviewCrossed", + "activePriority": 1, + "containerState": "stepped" + }, + { + "containerState": "ready", + "previouslyChangedExpressionState": "default", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + } + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "active", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "active", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "showFuncUnbound", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "showFuncUnbound", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "betaReducePreviewBefore", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "highlighted", + "topLeftBadgeType": "match", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "highlighted", + "topLeftBadgeType": "unmatch", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "d", + "highlightType": "highlighted", + "topLeftBadgeType": "match", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "betaReducePreviewBefore", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "matchExists": true, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "betaReducePreviewAfter", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "betaReduceCallArgHighlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcUnbound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "highlighted", + "topLeftBadgeType": "betaReduced", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "betaReducePreviewAfter", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "betaReducePreviewCrossed", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 3 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "b", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "d", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2, + 3 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "state": "betaReducePreviewCrossed", + "type": "call", + "priority": 2 + }, + "state": "default", + "type": "call", + "priority": 3 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "ready", + "previouslyChangedExpressionState": "default", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "arg": { + "name": "e", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2 + ], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + } + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "active", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "state": "active", + "type": "call", + "priority": 2 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "showFuncBound", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1, + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "state": "showFuncBound", + "type": "call", + "priority": 2 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "betaReducePreviewBefore", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1, + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "e", + "highlightType": "highlighted", + "topLeftBadgeType": "match", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "e", + "highlightType": "highlighted", + "topLeftBadgeType": "match", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "highlighted", + "topLeftBadgeType": "unmatch", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "state": "betaReducePreviewBefore", + "type": "call", + "priority": 2 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "matchExists": true, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "betaReducePreviewAfter", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "betaReduceCallArgHighlighted", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1, + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "e", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "highlighted", + "topLeftBadgeType": "betaReduced", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcBound", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "state": "betaReducePreviewAfter", + "type": "call", + "priority": 2 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "stepped", + "previouslyChangedExpressionState": "betaReducePreviewCrossed", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "callArg", + "type": "variable", + "argPriorityAgg": [ + 1, + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": true, + "bound": true + }, + "func": { + "arg": { + "name": "e", + "highlightType": "removed", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "funcArg", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2 + ], + "emphasizePriority": true, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "active", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "state": "betaReducePreviewCrossed", + "type": "call", + "priority": 2 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + }, + "activePriority": 2 + }, + { + "containerState": "done", + "previouslyChangedExpressionState": "default", + "expression": { + "arg": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": false + }, + "body": { + "arg": { + "arg": { + "name": "c", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1, + 2 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 2 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 2 + }, + "func": { + "name": "b", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true + }, + "state": "default", + "type": "call", + "priority": 1 + }, + "type": "function" + }, + "type": "function" + } + } + ], + "speed": 1, + "hideControls": false, + "explanationsVisibility": "hiddenInitialPausedOnly", + "hidePriorities": false, + "variableSize": "md", + "containerSize": "xxs", + "hidePlayButton": false, + "hideBottomRightBadges": false, + "skipToTheEnd": false, + "hideFuncUnboundBadgeOnExplanation": true, + "highlightOverridesCallArgAndFuncUnboundOnly": false, + "bottomRightBadgeOverrides": {}, + "highlightOverrides": {}, + "highlightOverrideActiveAfterStart": false, + "highlightFunctions": false +} From 783745e3eadb56c449b0bb5137979477b903bc9c Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 18:55:14 -0700 Subject: [PATCH 09/15] Finish JP demo --- scripts/lib/initialExpressionContainers.ts | 9 ++ scripts/lib/runnerConfigs.ts | 5 ++ src/components/Runners/Gnwm.tsx | 12 +++ src/components/Runners/index.ts | 1 + src/contents/demo.jp.tsx | 98 ++++------------------ src/lib/runners/gnwm.json | 56 +++++++++++++ 6 files changed, 98 insertions(+), 83 deletions(-) create mode 100644 src/components/Runners/Gnwm.tsx create mode 100644 src/lib/runners/gnwm.json diff --git a/scripts/lib/initialExpressionContainers.ts b/scripts/lib/initialExpressionContainers.ts index ad1e35484..67e83cb56 100644 --- a/scripts/lib/initialExpressionContainers.ts +++ b/scripts/lib/initialExpressionContainers.ts @@ -358,6 +358,15 @@ export const vibe = initializeExpressionContainer([ } ]) +export const lbkw = initializeExpressionContainer([ + { + shorthandFunc: 'add' + }, + { + shorthandNumber: 2 + } +]) + export const kfwf = initializeExpressionContainer([ { shorthandFunc: 'add' diff --git a/scripts/lib/runnerConfigs.ts b/scripts/lib/runnerConfigs.ts index 570e3e3ad..722cb30c8 100644 --- a/scripts/lib/runnerConfigs.ts +++ b/scripts/lib/runnerConfigs.ts @@ -875,6 +875,11 @@ export const lizi: ExpressionRunnerShorthandConfig = { initialExpressionContainer: initialExpressionContainers.vibe } +export const gnwm: ExpressionRunnerShorthandConfig = { + runner: 'simple', + initialExpressionContainer: initialExpressionContainers.lbkw +} + export const mcug: ExpressionRunnerShorthandConfig = { runner: 'playButtonOnly', initialExpressionContainer: initialExpressionContainers.vibe diff --git a/src/components/Runners/Gnwm.tsx b/src/components/Runners/Gnwm.tsx new file mode 100644 index 000000000..8609e54bd --- /dev/null +++ b/src/components/Runners/Gnwm.tsx @@ -0,0 +1,12 @@ +import React from 'react' +import ExpressionRunnerPrecomputed from 'src/components/ExpressionRunnerPrecomputed' +import config from 'src/lib/runners/gnwm.json' + +const Gnwm = ({ children }: { children?: React.ReactNode }) => ( + // @ts-ignore + + {children} + +) + +export default Gnwm diff --git a/src/components/Runners/index.ts b/src/components/Runners/index.ts index bcb1e164c..3494669b0 100644 --- a/src/components/Runners/index.ts +++ b/src/components/Runners/index.ts @@ -124,6 +124,7 @@ export { default as Zwpj } from 'src/components/Runners/Zwpj' export { default as Zzxj } from 'src/components/Runners/Zzxj' export { default as Zzyu } from 'src/components/Runners/Zzyu' export { default as Lizi } from 'src/components/Runners/Lizi' +export { default as Gnwm } from 'src/components/Runners/Gnwm' export { default as Mcug } from 'src/components/Runners/Mcug' export { default as Aovj } from 'src/components/Runners/Aovj' export { default as Rviy } from 'src/components/Runners/Rviy' diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index 1ae1c52da..f5196f844 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -56,58 +56,6 @@ const DemoCardList = () => ( ) }, - { - title: ( - <> - 計算箱の「 - 」 - - ), - content: ( - <> - - - ) - }, - { - title: ( - <> - 「 - - 」と「 - - 」を複数使う - - ), - content: ( - <> - - - - ) - }, - { - title: ( - <> - 計算箱の「 - 」 - - ), - content: ( - <> - - -
- - - -
- - - - - ) - }, { type: 'sideNote', title: <>パート2: 弁当箱の説明, @@ -192,7 +140,7 @@ const DemoCardList = () => ( ) }, { - title: <>計算箱に変換できる法則, + title: <>計算箱に変換する法則, type: 'summary', content: ( <> @@ -229,36 +177,6 @@ const DemoCardList = () => ( ) }, - { - title: <>実行してから変換, - content: ( - <> - -
- -
- - - - - -
- -
- -
- - - - - - - ) - }, { title: <>パート4: 1を足す, type: 'sideNote', @@ -331,6 +249,20 @@ const DemoCardList = () => ( ) + }, + { + title: <>計算箱は弁当箱で再現できる, + content: ( + <> + + + +
+ + + + + ) } ]} /> diff --git a/src/lib/runners/gnwm.json b/src/lib/runners/gnwm.json new file mode 100644 index 000000000..f7f589faa --- /dev/null +++ b/src/lib/runners/gnwm.json @@ -0,0 +1,56 @@ +{ + "expressionContainers": [ + { + "containerState": "ready", + "previouslyChangedExpressionState": "default", + "expression": { + "arg": { + "name": "shorthandNumber", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [ + 1 + ], + "funcPriorityAgg": [], + "emphasizePriority": false, + "bound": true, + "shorthandNumber": 2 + }, + "func": { + "name": "shorthandFunc", + "highlightType": "default", + "topLeftBadgeType": "none", + "bottomRightBadgeType": "none", + "type": "variable", + "argPriorityAgg": [], + "funcPriorityAgg": [ + 1 + ], + "emphasizePriority": false, + "bound": true, + "shorthandFunc": "add" + }, + "state": "default", + "type": "call", + "priority": 1 + } + } + ], + "speed": 1, + "hideControls": true, + "explanationsVisibility": "hidden", + "hidePriorities": true, + "variableSize": "lg", + "containerSize": "xxs", + "hidePlayButton": false, + "hideBottomRightBadges": false, + "skipToTheEnd": false, + "hideFuncUnboundBadgeOnExplanation": false, + "highlightOverridesCallArgAndFuncUnboundOnly": false, + "bottomRightBadgeOverrides": {}, + "highlightOverrides": {}, + "highlightOverrideActiveAfterStart": false, + "highlightFunctions": false +} From 39177602bf484125201ce5f9cc7396739b98a4c1 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 20:17:08 -0700 Subject: [PATCH 10/15] Continue with demo --- src/components/ExpressionRunnerControls.tsx | 10 +- .../ExpressionRunnerPrecomputed.tsx | 4 +- src/components/H.tsx | 29 +- src/contents/1.en.tsx | 6 +- src/contents/demo.en.tsx | 263 +++++++++++++++++- src/contents/demo.jp.tsx | 1 - src/lib/titles.ts | 2 +- 7 files changed, 301 insertions(+), 14 deletions(-) diff --git a/src/components/ExpressionRunnerControls.tsx b/src/components/ExpressionRunnerControls.tsx index a300c2693..a13fa6dca 100644 --- a/src/components/ExpressionRunnerControls.tsx +++ b/src/components/ExpressionRunnerControls.tsx @@ -1,10 +1,11 @@ /** @jsx jsx */ import { css, jsx } from '@emotion/core' import H from 'src/components/H' -import { colors, spaces } from 'src/lib/theme' +import { colors, spaces, fontSizes } from 'src/lib/theme' import Emoji from 'src/components/Emoji' import { ExpressionRunnerProps } from 'src/types/ExpressionRunnerTypes' import ExpressionRunnerButton from 'src/components/ExpressionRunnerButton' +import locale from 'src/lib/locale' interface ExpressionRunnerControlsProps { canStepForward: boolean @@ -62,7 +63,7 @@ const ExpressionRunnerControls = ({ skipToTheEnd, convert }: ExpressionRunnerControlsProps) => { - const centerButtonWidth = convert ? 60 : 44 + const centerButtonWidth = convert ? 66 : 44 const sideButtonsWidth = (100 - centerButtonWidth) / 2 - 2 return (
diff --git a/src/components/ExpressionRunnerPrecomputed.tsx b/src/components/ExpressionRunnerPrecomputed.tsx index c22ac6011..a9c97f75a 100644 --- a/src/components/ExpressionRunnerPrecomputed.tsx +++ b/src/components/ExpressionRunnerPrecomputed.tsx @@ -186,7 +186,7 @@ const ExpressionRunnerPrecomputed = ({ horizontalPadding={0} > {explanationsVisible && ( - + )} {children && !explanationsVisible && !isPlaying && ( - + {children} )} diff --git a/src/components/H.tsx b/src/components/H.tsx index 8bd1f314a..3f97936ac 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -1096,7 +1096,13 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'convertToMathbox') { if (locale === 'en') { - return <>? + return ( + <> + + Convert to Mathbox 🐶 + + + ) } else { return ( @@ -1131,7 +1137,11 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'undoConvertToMathbox') { if (locale === 'en') { - return <>? + return ( + + 🍱 Back to Lunchbox + + ) } else { return ( @@ -1142,7 +1152,14 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'doneConvertToMathbox') { if (locale === 'en') { - return <>? + return ( + <> + + Converted to Mathbox!{' '} + 🐶 + + + ) } else { return ( <> @@ -1317,7 +1334,11 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'plusOneFeature') { if (locale === 'en') { - return <> + return ( + <> + “Add 1” feature + + ) } else { return ( <> diff --git a/src/contents/1.en.tsx b/src/contents/1.en.tsx index b222b4f68..f74a1c5b2 100644 --- a/src/contents/1.en.tsx +++ b/src/contents/1.en.tsx @@ -28,8 +28,8 @@ export default () => ( <>

In this course, we’ll learn about Y Combinator through a short - story. Let’s first talk about “math boxes”, one - of the key items of this story. + story. Let’s first talk about “mathboxes”, one of + the key items of this story.

( , ]} - description={<>This is the icon for math boxes.} + description={<>This is the icon for mathboxes.} /> ) diff --git a/src/contents/demo.en.tsx b/src/contents/demo.en.tsx index d196c3e6b..75e58760d 100644 --- a/src/contents/demo.en.tsx +++ b/src/contents/demo.en.tsx @@ -1,6 +1,15 @@ import React from 'react' -import { P, Strong } from 'src/components/ContentTags' +import { P, Hr, Strong } from 'src/components/ContentTags' import EpisodeCardList from 'src/components/EpisodeCardList' +import ExpressionRunnerSeparator from 'src/components/ExpressionRunnerSeparator' +import EmojiSeparator from 'src/components/EmojiSeparator' +import Emoji from 'src/components/Emoji' +import CustomEmoji from 'src/components/CustomEmoji' +import EmojiNumber from 'src/components/EmojiNumber' +import H from 'src/components/H' +import * as R from 'src/components/Runners' +import { BasicRules, Unmatched } from 'src/contents/4.jp' +import { ThreeRowRules, Beginner5Rules } from 'src/contents/5.jp' const DemoCardList = () => ( (

) + }, + { + type: 'sideNote', + t8d: true, + title: <>Part 1: Mathbox Basics, + content: ( + <> + , + , + + ]} + description={<>Mathboxes} + /> + + ) + }, + { + t8d: true, + title: ( + <> + + + ), + content: ( + <> + + + + ) + }, + { + t8d: true, + type: 'sideNote', + title: <>Part 2: Lunchbox Basics, + content: ( + <> + 🍱, 🍱, 🍱]} + description={<>Lunchboxes} + /> + + ) + }, + { + t8d: true, + title: <>Lunchboxes with 2 Rows, + content: ( + <> + + + + + + ) + }, + { + t8d: true, + title: <>弁当箱の法則, + type: 'summary', + content: ( + <> + +
+ + + ) + }, + { + t8d: true, + title: <>Lunchbox with 3 Rows, + content: ( + <> + + + + + + ) + }, + { + t8d: true, + type: 'summary', + title: <>3段の弁当箱の法則, + content: ( + <> + +
+ + + ) + }, + { + t8d: true, + type: 'sideNote', + title: <>Part 3: Converting Lunchboxes to Mathboxes, + content: ( + <> + 🍱, + , + + ]} + /> + + ) + }, + { + t8d: true, + title: <>Converting Lunchboxes to Mathboxes, + content: ( + <> + + + + + + ) + }, + { + t8d: true, + title: <>Rules for Converting to Mathboxes, + type: 'summary', + content: ( + <> + + + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + ) + }, + { + t8d: true, + title: <>Part 4: Adding 1, + type: 'sideNote', + content: ( + <> + , + , + + ]} + /> + + ) + }, + { + t8d: true, + title: ( + <> + Calculating {' '} + + + ), + content: ( + <> + + + +
+ +
+ + + + + ) + }, + { + t8d: true, + title: ( + <> + Calculating {' '} + + + ), + content: ( + <> + + + +
+ +
+ + + + + ) + }, + { + t8d: true, + title: <>Mathboxes can be replicated by Lunchboxes, + content: ( + <> + + + +
+ + + + + ) } ]} /> diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index f5196f844..c71385d3a 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -123,7 +123,6 @@ const DemoCardList = () => ( , ]} - description={<>計算箱} /> ) diff --git a/src/lib/titles.ts b/src/lib/titles.ts index 1acda21bc..4f3068625 100644 --- a/src/lib/titles.ts +++ b/src/lib/titles.ts @@ -16,7 +16,7 @@ export const description = { export const episodeTitles = { en: { - 1: 'Math Boxes', + 1: 'Mathboxes', 2: '?', 3: '?', 4: '?', From 36b4ca807dd8c056b8ec3a6d2e918c15bdf763ac Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 20:25:32 -0700 Subject: [PATCH 11/15] :pencil: --- src/components/H.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/H.tsx b/src/components/H.tsx index 3f97936ac..cdd851e40 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -1249,7 +1249,15 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'canBeConvertedCaption') { if (locale === 'en') { - return <>? + return ( + <> + There are {' '} + + ’s labeled as 🅰️ +
+ → Can be converted to + + ) } else { return ( <> From e2ce500a63023a357082c49a81cae844006f0c22 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 21:16:28 -0700 Subject: [PATCH 12/15] Add more translations --- .../ExpressionRunnerExplanation.tsx | 12 ++- src/components/H.tsx | 38 ++++++-- src/components/VariableExpressionBox.tsx | 87 +++++++++++++------ 3 files changed, 103 insertions(+), 34 deletions(-) diff --git a/src/components/ExpressionRunnerExplanation.tsx b/src/components/ExpressionRunnerExplanation.tsx index f43d58105..c36b126d3 100644 --- a/src/components/ExpressionRunnerExplanation.tsx +++ b/src/components/ExpressionRunnerExplanation.tsx @@ -65,14 +65,22 @@ const Explanation = ({ switch (state) { case 'default': { if (locale === 'en') { - return <>… + return <>Next! } else { return <>次に進みます! } } case 'active': { if (locale === 'en') { - return <>… + return ( + <> + Look at the pair of{' '} + + {activePriority} + + ’s + + ) } else { return ( <> diff --git a/src/components/H.tsx b/src/components/H.tsx index cdd851e40..4c3ace65e 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -1009,7 +1009,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'AmultTop') { if (locale === 'en') { - return <>? + return <>Some } else { return ( <> @@ -1020,14 +1020,18 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'AmultBottom') { if (locale === 'en') { - return <>? + return ( + <> + 🅰️’s + + ) } else { return <>いくつか } } if (args.name === 'BsingleTop') { if (locale === 'en') { - return <>? + return <>One } else { return ( <> @@ -1038,7 +1042,11 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'BsingleBottom') { if (locale === 'en') { - return <>? + return ( + <> + 🅱️ + + ) } else { return <>ひとつ } @@ -1233,7 +1241,19 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'convertiblePatternCaption') { if (locale === 'en') { - return <>? + return ( + <> + Let the leftmost dish be 🅰️ and +
+ the center dish be 🅱️. +
+ There needs to be one 🅱️ +
+ on the top right and some 🅰️’s +
+ on the bottom right + + ) } else { return ( <> @@ -1404,7 +1424,13 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'whatTheNumberIsCaption') { if (locale === 'en') { - return <> + return ( + <> + The number of 🅰️’s on the +
+ bottom right is the number after conversion + + ) } else { return ( <> diff --git a/src/components/VariableExpressionBox.tsx b/src/components/VariableExpressionBox.tsx index b81c8a3d7..f98665acc 100644 --- a/src/components/VariableExpressionBox.tsx +++ b/src/components/VariableExpressionBox.tsx @@ -15,6 +15,7 @@ import { VariableExpression } from 'src/types/ExpressionTypes' import H from 'src/components/H' import { ExpressionRunnerContextProps } from 'src/types/ExpressionRunnerTypes' import CustomEmoji, { customEmojiToComponent } from 'src/components/CustomEmoji' +import locale from 'src/lib/locale' interface VariableExpressionBoxProps { expression: VariableExpression @@ -162,23 +163,40 @@ const VariableEmoji = ({ expression }: VariableExpressionBoxProps) => { return (
@@ -188,23 +206,40 @@ const VariableEmoji = ({ expression }: VariableExpressionBoxProps) => { return (
From 63dfc22d3f1d6fac44e12ffb9b278b750d2971ae Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 22:06:05 -0700 Subject: [PATCH 13/15] Update basic rules --- src/components/H.tsx | 2 +- src/contents/4.en.tsx | 53 ++++++++++++++++++++-------------------- src/contents/demo.en.tsx | 6 ++--- 3 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/components/H.tsx b/src/components/H.tsx index 4c3ace65e..4449f28c8 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -369,7 +369,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { if (locale === 'en') { return ( - {`“bento box${args.plural ? 'es' : ''}”`} 🍱 + {`“lunchbox${args.plural ? 'es' : ''}”`} 🍱 ) } else { diff --git a/src/contents/4.en.tsx b/src/contents/4.en.tsx index a8bf75dea..01cddeef1 100644 --- a/src/contents/4.en.tsx +++ b/src/contents/4.en.tsx @@ -18,8 +18,8 @@ export const BasicRules = ({ includeFuncUnbound?: boolean }) => ( <> -

- 1. 印をつける:{' '} +

+ 1. Add labels:{' '} {' '} {' '} {includeFuncUnbound && ( @@ -30,7 +30,7 @@ export const BasicRules = ({

- 印をつける:{' '} + Add labels:{' '} {' '} {' '} {includeFuncUnbound && ( @@ -40,37 +40,37 @@ export const BasicRules = ({ )} -

- 2. 一致チェック:{' '} +

+ 2. Find matches:{' '} {' '} {' '}

- 一致チェック:{' '} + Find matches:{' '} {' '} {' '} -

- 3. コピーする:{' '} +

+ 3. Copy:{' '} {' '} ↘️{' '}

- コピーする:{' '} + Copy:{' '} {' '} ↘️{' '} -

- 4. 消す: 💥{' '} +

+ 4. Remove: 💥{' '} {' '}

- 消す: 💥{' '} + Remove: 💥{' '} {' '} @@ -81,27 +81,28 @@ export const BasicRules = ({ export const Unmatched = () => ( <> -

- と{' '} - {' '} - が一致しなかった場合、 +

+ If none of + ’s and + ’s match,{' '} - コピーはせずに、ただ{' '} - と{' '} - を消す + don’t do the copy step and simply remove{' '} + + ’s and + ’s - 。 + .

- と{' '} - {' '} - が一致しなかった場合… + If none of + ’s and + ’s match… - コピーはせずに、ただ{' '} - と - を消す + Simply remove + ’s and + ’s ) diff --git a/src/contents/demo.en.tsx b/src/contents/demo.en.tsx index 75e58760d..48664d53a 100644 --- a/src/contents/demo.en.tsx +++ b/src/contents/demo.en.tsx @@ -8,8 +8,8 @@ import CustomEmoji from 'src/components/CustomEmoji' import EmojiNumber from 'src/components/EmojiNumber' import H from 'src/components/H' import * as R from 'src/components/Runners' -import { BasicRules, Unmatched } from 'src/contents/4.jp' -import { ThreeRowRules, Beginner5Rules } from 'src/contents/5.jp' +import { BasicRules, Unmatched } from 'src/contents/4.en' +import { ThreeRowRules, Beginner5Rules } from 'src/contents/5.en' const DemoCardList = () => ( ( }, { t8d: true, - title: <>弁当箱の法則, + title: <>Lunchbox Rules, type: 'summary', content: ( <> From f2b40e62e42648f9f32c19b891333859a68e31d7 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 22:27:00 -0700 Subject: [PATCH 14/15] Done with demo page --- src/components/H.tsx | 28 ++++++++++++++--- src/contents/5.en.tsx | 68 +++++++++++++++++++++------------------- src/contents/demo.en.tsx | 2 +- src/contents/demo.jp.tsx | 2 +- 4 files changed, 61 insertions(+), 39 deletions(-) diff --git a/src/components/H.tsx b/src/components/H.tsx index 4449f28c8..08165d192 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -1210,7 +1210,20 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'startWithTwoCaption') { if (locale === 'en') { - return <>? + return ( + <> + If you can’t start with{' '} + 1’s because +
+ there’s only one item on the bottom row, +
+ + start with the pair of{' '} + 2 + ’s. + + + ) } else { return ( <> @@ -1226,7 +1239,14 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { } if (args.name === 'startWithLeftMostOneCaption') { if (locale === 'en') { - return <>? + return ( + <> + If there are multiple pairs of{' '} + 1’s, +
+ start with the leftmost pair. + + ) } else { return ( <> @@ -1243,9 +1263,9 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { if (locale === 'en') { return ( <> - Let the leftmost dish be 🅰️ and + Let the leftmost item be 🅰️ and
- the center dish be 🅱️. + the center item be 🅱️.
There needs to be one 🅱️
diff --git a/src/contents/5.en.tsx b/src/contents/5.en.tsx index f02d11084..33703a767 100644 --- a/src/contents/5.en.tsx +++ b/src/contents/5.en.tsx @@ -27,70 +27,72 @@ import NextLessonButton from 'src/components/NextLessonButton' export const ThreeRowRules = () => ( <> -

- 3段以上の弁当箱は、以下のように解きます。 +

+ + Here’s how to solve a lunchbox puzzle with at least 3 rows. +

-
    +
      - まず先に 1{' '} - のペアからはじめる。 + First, start with the pair of{' '} + 1’s. - 下段の真ん中にある料理には{' '} - {' '} - をつける。 - {' '} - は、いったん無視して構わない。 + Label the center item on the bottom row as{' '} + , and + you can ignore this for the rest of the iteration. - 1 のペアが終わると、 - 2 が{' '} - 1{' '} - になるので、また繰り返す。 + After finishing the pair of{' '} + 1’s, + 2 will become{' '} + 1. Then, repeat.
    - 3段の弁当箱 + Lunchbox with 3 rows ) export const Beginner5Rules = () => ( <> -

    - 細かい法則1:{' '} - 1{' '} - のペアが左右ふたつ以上ある場合は、 - 一番左のペアからはじめます。 +

    + Additional Rule 1: If there are multiple + pairs of 1’s,{' '} + start with the leftmost pair.

    -

    - 補足:{' '} +

    + Note:{' '} - 1{' '} - のペアが弁当箱の左端にない場合は、内側の{' '} - 1 のペアからはじめる。 + If there’s no 1’s on the + leftmost edge of a lunchbox, then start with the inner pair of{' '} + 1’s.

    - 1{' '} - のペアが弁当箱の左端にない場合は、 + If there’s no 1 on the
    - 内側の 1 のペアからはじめる + leftmost edge of a lunchbox, then start with +
    + the inner pair of + 1’s

    -

    - 細かい法則2: 下段にひとつの料理しかなく、 - 1{' '} - のペアからはじめられない場合、 +

    + Additional Rule 2: If you can’t start with{' '} + 1’s because there’s only + one item on the bottom row,{' '} - 2 のペアからはじめます。 + start with the pair of 2 + ’s.

    diff --git a/src/contents/demo.en.tsx b/src/contents/demo.en.tsx index 48664d53a..e8c704fb5 100644 --- a/src/contents/demo.en.tsx +++ b/src/contents/demo.en.tsx @@ -114,7 +114,7 @@ const DemoCardList = () => ( { t8d: true, type: 'summary', - title: <>3段の弁当箱の法則, + title: <>Rules for Lunchboxes with 3+ Rows, content: ( <> diff --git a/src/contents/demo.jp.tsx b/src/contents/demo.jp.tsx index c71385d3a..aa6c68cc8 100644 --- a/src/contents/demo.jp.tsx +++ b/src/contents/demo.jp.tsx @@ -103,7 +103,7 @@ const DemoCardList = () => ( }, { type: 'summary', - title: <>3段の弁当箱の法則, + title: <>3段以上の弁当箱の法則, content: ( <> From fb9e19587b870f9bfa2e7193fdb1d2580009048c Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Wed, 18 Sep 2019 22:36:41 -0700 Subject: [PATCH 15/15] Remove unused strings --- src/components/H.tsx | 9 --------- src/components/VariableExpressionBox.tsx | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/components/H.tsx b/src/components/H.tsx index 08165d192..3b0ae8f87 100644 --- a/src/components/H.tsx +++ b/src/components/H.tsx @@ -154,8 +154,6 @@ interface HProps { | { name: 'testimonialsContent' } | { name: 'goToOtherPage' } | { name: 'demoTitle' } - | { name: 'demoFirstCardTitle' } - | { name: 'demoFirstCardContent' } | { name: 'whatTheNumberIsCaption' } } @@ -1435,13 +1433,6 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => { return <>デモページ } } - if (args.name === 'demoFirstCardTitle') { - if (locale === 'en') { - return <>This is a demo page - } else { - return <>これはデモページです - } - } if (args.name === 'whatTheNumberIsCaption') { if (locale === 'en') { return ( diff --git a/src/components/VariableExpressionBox.tsx b/src/components/VariableExpressionBox.tsx index f98665acc..607d426e1 100644 --- a/src/components/VariableExpressionBox.tsx +++ b/src/components/VariableExpressionBox.tsx @@ -215,7 +215,7 @@ const VariableEmoji = ({ expression }: VariableExpressionBoxProps) => { locale === 'en' ? css` font-size: 0.45em; - background: ${colors('deepPurple50')}; + background: ${colors('pink50')}; ` : css` font-size: 0.6em; @@ -237,7 +237,7 @@ const VariableEmoji = ({ expression }: VariableExpressionBoxProps) => { ` : css` font-size: 0.45em; - background: ${colors('deepPurple50')}; + background: ${colors('pink50')}; ` ]} >