Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions scripts/lib/runnerConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ export const qfbk: ExpressionRunnerShorthandConfig = {
explanationsVisibility: 'visible'
}

export const zynf: ExpressionRunnerShorthandConfig = {
runner: 'simple',
initialExpressionContainer: initialExpressionContainers.lqti,
initialState: 'showFuncBound',
showAllShowSteps: true,
showPriorities: true,
highlightOverrides: {
c: 'active'
},
highlightOverrideActiveAfterStart: true
}

export const yfwd: ExpressionRunnerShorthandConfig = {
runner: 'simple',
initialExpressionContainer: initialExpressionContainers.lqti,
Expand Down
19 changes: 10 additions & 9 deletions src/components/H.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ interface HProps {
includeTwitter?: boolean
}
| { name: 'pressNext' }
| { name: 'yesNoQuiz'; postfix?: string }
| { name: 'yesNoQuiz'; postfix?: string; lowerCase?: true }
| { name: 'yesNoQuizCorrect' }
| { name: 'yesNoQuizIncorrect' }
| { name: 'yesNoQuizYes'; hideText?: boolean }
| { name: 'yesNoQuizNo'; hideText?: boolean }
| { name: 'yesNoQuizCorrectPostfix' }
| { name: 'yesNoQuizIncorrectPostfix'; isYes: boolean }
| {
name: 'bentoBoxPuzzle'
name: 'lunchBoxPuzzle'
capitalize?: true
indefinite?: true
postfix?: string
Expand Down Expand Up @@ -102,7 +102,7 @@ interface HProps {
| { name: 'pageUnderConstructionTitle' }
| { name: 'question' }
| { name: 'whatHappensAtTheEndQuestion' }
| { name: 'lookAtThisBentoBox'; lowerCase?: true }
| { name: 'lookAtThisLunchBox'; lowerCase?: true }
| {
name: 'pressRun'
skipColon?: boolean
Expand Down Expand Up @@ -136,7 +136,7 @@ interface HProps {
type: 'condition' | 'trueCase' | 'falseCase'
capitalize?: true
}
| { name: 'lookAtThisBentoBoxPuzzle' }
| { name: 'lookAtThisLunchBoxPuzzle' }
| { name: 'convertToMathbox'; lowerCase?: true }
| { name: 'undoConvertToMathbox' }
| { name: 'doneConvertToMathbox' }
Expand Down Expand Up @@ -276,7 +276,8 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => {
if (locale === 'en') {
return (
<>
<Emoji>👍</Emoji> Yes / <Emoji>👎</Emoji> No Quiz{args.postfix}
<Emoji>👍</Emoji> Yes / <Emoji>👎</Emoji> No{' '}
{args.lowerCase ? 'q' : 'Q'}uiz{args.postfix}
</>
)
} else {
Expand Down Expand Up @@ -384,7 +385,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => {
)
}
}
if (args.name === 'bentoBoxPuzzle') {
if (args.name === 'lunchBoxPuzzle') {
if (locale === 'en') {
return (
<>
Expand Down Expand Up @@ -831,7 +832,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => {
)
}
}
if (args.name === 'lookAtThisBentoBox') {
if (args.name === 'lookAtThisLunchBox') {
if (locale === 'en') {
return <>{args.lowerCase ? 't' : 'T'}ake a look at this lunchbox</>
} else {
Expand Down Expand Up @@ -1335,7 +1336,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => {
}
}
}
if (args.name === 'lookAtThisBentoBoxPuzzle') {
if (args.name === 'lookAtThisLunchBoxPuzzle') {
if (locale === 'en') {
return (
<>
Expand All @@ -1346,7 +1347,7 @@ const H = ({ args, highlightType, episodeNumberOverrides }: HProps) => {
return (
<>
こちらの
<H args={{ name: 'bentoBoxPuzzle' }} />
<H args={{ name: 'lunchBoxPuzzle' }} />
をご覧ください
</>
)
Expand Down
12 changes: 12 additions & 0 deletions src/components/Runners/Zynf.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import ExpressionRunnerPrecomputed from 'src/components/ExpressionRunnerPrecomputed'
import config from 'src/lib/runners/zynf.json'

const Zynf = ({ children }: { children?: React.ReactNode }) => (
// @ts-ignore
<ExpressionRunnerPrecomputed {...config}>
{children}
</ExpressionRunnerPrecomputed>
)

export default Zynf
1 change: 1 addition & 0 deletions src/components/Runners/fakeIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export { default as Qwzy } from 'src/components/FakeRunner'
export { default as Igrl } from 'src/components/FakeRunner'
export { default as Uppk } from 'src/components/FakeRunner'
export { default as Qfbk } from 'src/components/FakeRunner'
export { default as Zynf } from 'src/components/FakeRunner'
export { default as Yfwd } from 'src/components/FakeRunner'
export { default as Wcer } from 'src/components/FakeRunner'
export { default as Dhzf } from 'src/components/FakeRunner'
Expand Down
1 change: 1 addition & 0 deletions src/components/Runners/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export { default as Qwzy } from 'src/components/Runners/Qwzy'
export { default as Igrl } from 'src/components/Runners/Igrl'
export { default as Uppk } from 'src/components/Runners/Uppk'
export { default as Qfbk } from 'src/components/Runners/Qfbk'
export { default as Zynf } from 'src/components/Runners/Zynf'
export { default as Yfwd } from 'src/components/Runners/Yfwd'
export { default as Wcer } from 'src/components/Runners/Wcer'
export { default as Dhzf } from 'src/components/Runners/Dhzf'
Expand Down
2 changes: 1 addition & 1 deletion src/contents/11.en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ export default () => (
<P>
I’ll show you another example. This one’s going to be a{' '}
<Bold>
<H args={{ name: 'yesNoQuiz' }} />
<H args={{ name: 'yesNoQuiz', lowerCase: true }} />
</Bold>
.{' '}
</P>
Expand Down
4 changes: 2 additions & 2 deletions src/contents/16.jp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export default () => (
</HighlightBold>
<Highlight>
ラムダ計算の記述式は見た目が複雑なので、
<H args={{ name: 'bentoBoxPuzzle' }} />
<H args={{ name: 'lunchBoxPuzzle' }} />
という形で教えることで、とっつきやすくしていた
</Highlight>
というわけですね。
Expand All @@ -592,7 +592,7 @@ export default () => (
<br />
ラムダ計算の記述式は見た目が複雑なので、
<br />
<H args={{ name: 'bentoBoxPuzzle' }} />
<H args={{ name: 'lunchBoxPuzzle' }} />
という形で教える
<br />
ことで、とっつきやすくしていた。
Expand Down
2 changes: 1 addition & 1 deletion src/contents/2.en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default () => (
<Bold>
We’ll start this page with a{' '}
<Highlight>
<H args={{ name: 'yesNoQuiz' }} />
<H args={{ name: 'yesNoQuiz', lowerCase: true }} />
</Highlight>
.
</Bold>{' '}
Expand Down
30 changes: 16 additions & 14 deletions src/contents/3.en.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export default () => (
<>
<H
args={{
name: 'bentoBoxPuzzle',
name: 'lunchBoxPuzzle',
capitalize: true
}}
/>
Expand All @@ -310,7 +310,7 @@ export default () => (
<P>
The puzzle you’ll be solving is called{' '}
<HighlightBold>
<H args={{ name: 'bentoBoxPuzzle' }} />
<H args={{ name: 'lunchBoxPuzzle' }} />
</HighlightBold>
.
</P>
Expand Down Expand Up @@ -376,7 +376,7 @@ export default () => (
<P>
Now, take a look at this below. This is an example of{' '}
<HighlightBold>
<H args={{ name: 'bentoBoxPuzzle' }} />
<H args={{ name: 'lunchBoxPuzzle' }} />
</HighlightBold>
.
</P>
Expand All @@ -388,7 +388,7 @@ export default () => (
<R.Ilpo>
<H
args={{
name: 'bentoBoxPuzzle',
name: 'lunchBoxPuzzle',
capitalize: true,
indefinite: true
}}
Expand Down Expand Up @@ -420,7 +420,7 @@ export default () => (
<P>
Yes. It’s called{' '}
<HighlightBold>
<H args={{ name: 'bentoBoxPuzzle' }} />
<H args={{ name: 'lunchBoxPuzzle' }} />
</HighlightBold>{' '}
because it looks like a Japanese lunchbox.
</P>
Expand Down Expand Up @@ -488,7 +488,7 @@ export default () => (
Now, let’s talk about how we can{' '}
<H args={{ name: 'run', lowerCase: true }} />{' '}
<H
args={{ name: 'bentoBoxPuzzle', indefinite: true }}
args={{ name: 'lunchBoxPuzzle', indefinite: true }}
/>
.
</P>
Expand All @@ -510,7 +510,7 @@ export default () => (
<>
<P>
We can <H args={{ name: 'run', lowerCase: true }} />{' '}
<H args={{ name: 'bentoBoxPuzzle', indefinite: true }} />, just
<H args={{ name: 'lunchBoxPuzzle', indefinite: true }} />, just
like how we can run a mathbox.{' '}
<H args={{ name: 'pressPlay', capitalize: true }} /> below:
</P>
Expand Down Expand Up @@ -573,7 +573,7 @@ export default () => (
<Highlight>
There’s a specific set of rules for
<br />
<H args={{ name: 'bentoBoxPuzzle' }} />.
<H args={{ name: 'lunchBoxPuzzle' }} />.
<br />
Your task is to figure out what that is!
</Highlight>
Expand Down Expand Up @@ -609,14 +609,14 @@ export default () => (
{
title: (
<>
More examples of <H args={{ name: 'bentoBoxPuzzle' }} />
More examples of <H args={{ name: 'lunchBoxPuzzle' }} />
</>
),
content: (
<>
<P>
Let’s take a look at more examples of{' '}
<H args={{ name: 'bentoBoxPuzzle' }} />.
<H args={{ name: 'lunchBoxPuzzle' }} />.
</P>
<Hr />
<P>
Expand Down Expand Up @@ -771,7 +771,9 @@ export default () => (
<P>
Alright.{' '}
<Highlight>
Let’s do a <H args={{ name: 'yesNoQuiz' }} /> then.
Let’s do a{' '}
<H args={{ name: 'yesNoQuiz', lowerCase: true }} />{' '}
then.
</Highlight>
</P>
<P>
Expand Down Expand Up @@ -813,7 +815,7 @@ export default () => (
/>
<P>
<H args={{ name: 'question' }} />{' '}
<H args={{ name: 'lookAtThisBentoBoxPuzzle' }} />:
<H args={{ name: 'lookAtThisLunchBoxPuzzle' }} />:
</P>
<R.Loai />
<P>
Expand All @@ -838,7 +840,7 @@ export default () => (
<>
<P>
<H args={{ name: 'question' }} />{' '}
<H args={{ name: 'lookAtThisBentoBoxPuzzle' }} />:
<H args={{ name: 'lookAtThisLunchBoxPuzzle' }} />:
</P>
<R.Uvmv />
<P>
Expand Down Expand Up @@ -884,7 +886,7 @@ export default () => (
<>
<P>
We’ll talk about the patterns of{' '}
<H args={{ name: 'bentoBoxPuzzle' }} /> on the next page!
<H args={{ name: 'lunchBoxPuzzle' }} /> on the next page!
</P>
<EmojiSeparator
emojis={['🤔', '🍱', '😈']}
Expand Down
Loading