Skip to content

armgit / pdfcn

Public Imported from GitHub
0

Beautiful pdf components, built on Takumi and Forme. 100% Free, Zero config, one command setup.

style(registry): align lesson plan layout to a consistent grid

Marcos Paulo Diniz10ef74a96c35
diff --git a/apps/web/content/docs/blocks/forme/lesson-plan.mdx b/apps/web/content/docs/blocks/forme/lesson-plan.mdx
index 77a3078..ab498ef 100644
--- a/apps/web/content/docs/blocks/forme/lesson-plan.mdx
+++ b/apps/web/content/docs/blocks/forme/lesson-plan.mdx
@@ -160,7 +160,7 @@ import { LessonPlanDocument } from "@/components/pdf/lesson-plan";
## Props
-| Prop | Type | Description |
-| ------- | ---------------- | ----------------------- |
-| `data` | `LessonPlanData` | Lesson plan content |
-| `theme` | `PdfcnTheme` | Optional theme override |
+| Prop | Type | Description |
+| ------- | ----------------- | ----------------------- |
+| `data` | `LessonPlanProps` | Lesson plan content |
+| `theme` | `PdfcnTheme` | Optional theme override |
diff --git a/apps/web/content/docs/blocks/takumi/lesson-plan.mdx b/apps/web/content/docs/blocks/takumi/lesson-plan.mdx
index 020b948..803c393 100644
--- a/apps/web/content/docs/blocks/takumi/lesson-plan.mdx
+++ b/apps/web/content/docs/blocks/takumi/lesson-plan.mdx
@@ -178,7 +178,7 @@ import { LessonPlanDocument } from "@/components/pdf/lesson-plan";
## Props
-| Prop | Type | Description |
-| ------- | ---------------- | ----------------------- |
-| `data` | `LessonPlanData` | Lesson plan content |
-| `theme` | `PdfcnTheme` | Optional theme override |
+| Prop | Type | Description |
+| ------- | ----------------- | ----------------------- |
+| `data` | `LessonPlanProps` | Lesson plan content |
+| `theme` | `PdfcnTheme` | Optional theme override |
diff --git a/apps/web/public/r/forme/lesson-plan.json b/apps/web/public/r/forme/lesson-plan.json
index 9c91e7e..63a35a3 100644
--- a/apps/web/public/r/forme/lesson-plan.json
+++ b/apps/web/public/r/forme/lesson-plan.json
@@ -9,7 +9,6 @@
],
"registryDependencies": [
"@pdfcn/forme/utils",
- "@pdfcn/forme/list",
"@pdfcn/forme/page-footer",
"@pdfcn/forme/page-header",
"@pdfcn/forme/section",
@@ -19,13 +18,13 @@
"files": [
{
"path": "registry/bases/forme/blocks/lesson-plan/lesson-plan.tsx",
- "content": "import { Document, Page, StyleSheet, View } from \"@formepdf/react\";\n\nimport { PdfList } from \"@/registry/bases/forme/components/list/list\";\nimport { PageFooter } from \"@/registry/bases/forme/components/page-footer/page-footer\";\nimport { PageHeader } from \"@/registry/bases/forme/components/page-header/page-header\";\nimport { Section } from \"@/registry/bases/forme/components/section/section\";\nimport {\n Table,\n TableBody,\n TableCell,\n TableHeader,\n TableRow,\n} from \"@/registry/bases/forme/components/table/table\";\nimport { Text } from \"@/registry/bases/forme/components/text/text\";\nimport {\n PdfcnThemeProvider,\n usePdfcnTheme,\n} from \"@/registry/bases/forme/components/theme-provider\";\nimport type { PdfcnTheme } from \"@/registry/types/pdf-themes\";\n\nimport type { LessonPlanData } from \"./lesson-plan.types\";\n\n// Sample data — replace with your own props or data source\nconst sampleData: LessonPlanData = {\n accentColor: \"#7c3aed\",\n assessment: {\n formative: [\"Exit ticket\", \"Observation\", \"Guided practice responses\"],\n summative: [\"Chapter quiz\", \"Unit assessment\"],\n },\n date: \"September 15, 2026\",\n differentiation: [\n \"Provide equation mats for visual learners\",\n \"Allow calculator use for students with processing difficulties\",\n \"Offer extension problems for advanced learners\",\n ],\n duration: \"50 minutes\",\n essentialQuestion:\n \"How can we represent real-world relationships using linear equations?\",\n gradeLevel: \"8th Grade\",\n homework: \"Complete worksheet problems 11-20\",\n lessonTitle: \"Introduction to Linear Equations\",\n materials: [\"Graph paper\", \"Rulers\", \"Calculator\", \"Whiteboard markers\"],\n objectives: [\n \"Define linear equations\",\n \"Graph linear equations on a coordinate plane\",\n \"Solve simple linear equations\",\n ],\n reflection:\n \"Note student misconceptions during independent practice and adjust the warm-up for the next lesson.\",\n sequence: [\n {\n activity: \"Warm-up\",\n description: \"Review solving one-step equations\",\n notes: \"5 problems on the board\",\n time: \"5 min\",\n },\n {\n activity: \"Introduction\",\n description: \"Define linear equations, show examples\",\n notes: \"Use real-world context\",\n time: \"10 min\",\n },\n {\n activity: \"Guided Practice\",\n description: \"Work through 3 examples together\",\n notes: \"Check for understanding\",\n time: \"15 min\",\n },\n {\n activity: \"Independent Practice\",\n description: \"Complete worksheet problems 1-10\",\n notes: \"Circulate and support\",\n time: \"15 min\",\n },\n {\n activity: \"Closure\",\n description: \"Exit ticket: solve one linear equation\",\n notes: \"Collect before dismissal\",\n time: \"5 min\",\n },\n ],\n standards: [\"CCSS.MATH.8.EE.B.6\", \"CCSS.MATH.8.EE.C.7\"],\n subject: \"Mathematics\",\n teacherName: \"Ms. Johnson\",\n topic: \"Linear Equations\",\n};\n\nconst LessonPlanContent = ({ data }: { data: LessonPlanData }) => {\n const theme = usePdfcnTheme();\n\n const styles = StyleSheet.create({\n col: {\n flex: 1,\n paddingRight: 10,\n },\n label: {\n fontSize: 9,\n fontWeight: \"bold\",\n marginBottom: 2,\n },\n page: {\n backgroundColor: theme.colors.background,\n },\n row: {\n flexDirection: \"row\",\n },\n section: {\n marginBottom: theme.spacing.componentGap,\n },\n });\n\n return (\n <Document title={`${data.lessonTitle} — Lesson Plan`}>\n <Page\n margin={{\n bottom: theme.spacing.page.marginBottom,\n left: theme.spacing.page.marginLeft,\n right: theme.spacing.page.marginRight,\n top: theme.spacing.page.marginTop,\n }}\n size=\"A4\"\n >\n <PageFooter\n leftText={`${data.subject} — ${data.lessonTitle}`}\n rightText=\"Page 1 of 2\"\n sticky\n pagePadding={25}\n />\n <View style={styles.page as never}>\n <PageHeader\n title={data.lessonTitle}\n subtitle={`${data.subject} \\u2022 ${data.gradeLevel}`}\n rightText={`Teacher: ${data.teacherName}`}\n rightSubText={`Date: ${data.date}`}\n style={styles.section}\n />\n\n <Section\n noWrap\n spacing=\"none\"\n style={{ ...styles.row, ...styles.section }}\n >\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Duration\n </Text>\n <Text noMargin variant=\"xs\">\n {data.duration}\n </Text>\n </View>\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Topic\n </Text>\n <Text noMargin variant=\"xs\">\n {data.topic}\n </Text>\n </View>\n {data.essentialQuestion ? (\n <View style={{ flex: 2 }}>\n <Section\n variant=\"highlight\"\n accentColor={data.accentColor}\n spacing=\"sm\"\n style={{ margin: 0 }}\n >\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Essential Question\n </Text>\n <Text noMargin variant=\"xs\">\n {data.essentialQuestion}\n </Text>\n </Section>\n </View>\n ) : null}\n </Section>\n\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Objectives\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.objectives.map((o) => ({ text: `SWBAT ${o}` }))}\n />\n </Section>\n\n {data.standards ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Standards\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.standards.map((s) => ({ text: s }))}\n />\n </Section>\n ) : null}\n\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Materials\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.materials.map((m) => ({ text: m }))}\n />\n </Section>\n </View>\n </Page>\n\n <Page\n margin={{\n bottom: theme.spacing.page.marginBottom,\n left: theme.spacing.page.marginLeft,\n right: theme.spacing.page.marginRight,\n top: theme.spacing.page.marginTop,\n }}\n size=\"A4\"\n >\n <PageFooter\n leftText={`${data.teacherName}`}\n rightText=\"Page 2 of 2\"\n sticky\n pagePadding={25}\n />\n <View style={styles.page as never}>\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Lesson Sequence\n </Text>\n <Table variant=\"grid\" zebraStripe>\n <TableHeader>\n <TableRow header>\n <TableCell>Time</TableCell>\n <TableCell>Activity</TableCell>\n <TableCell>Description</TableCell>\n <TableCell>Notes</TableCell>\n </TableRow>\n </TableHeader>\n <TableBody>\n {data.sequence.map((item, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: sequence items have no stable id\n <TableRow key={index}>\n <TableCell>{item.time}</TableCell>\n <TableCell>{item.activity}</TableCell>\n <TableCell>{item.description}</TableCell>\n <TableCell>{item.notes ?? \"\"}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </Section>\n\n {data.differentiation ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Differentiation\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.differentiation.map((d) => ({ text: d }))}\n />\n </Section>\n ) : null}\n\n <Section\n noWrap\n spacing=\"none\"\n style={{ ...styles.row, ...styles.section }}\n >\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Formative Assessment\n </Text>\n {data.assessment.formative ? (\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.assessment.formative.map((a) => ({ text: a }))}\n />\n ) : (\n <Text noMargin variant=\"xs\" color=\"mutedForeground\">\n None\n </Text>\n )}\n </View>\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Summative Assessment\n </Text>\n {data.assessment.summative ? (\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.assessment.summative.map((a) => ({ text: a }))}\n />\n ) : (\n <Text noMargin variant=\"xs\" color=\"mutedForeground\">\n None\n </Text>\n )}\n </View>\n </Section>\n\n {data.homework ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Homework\n </Text>\n <Text noMargin variant=\"xs\">\n {data.homework}\n </Text>\n </Section>\n ) : null}\n\n {data.reflection ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Reflection Notes\n </Text>\n <Text noMargin variant=\"xs\">\n {data.reflection}\n </Text>\n </Section>\n ) : null}\n </View>\n </Page>\n </Document>\n );\n};\n\nexport const LessonPlanDocument = ({\n theme,\n data = sampleData,\n}: {\n theme?: PdfcnTheme;\n data?: LessonPlanData;\n}) => (\n <PdfcnThemeProvider theme={theme}>\n <LessonPlanContent data={data} />\n </PdfcnThemeProvider>\n);\n",
+ "content": "import { Document, Page, StyleSheet, View } from \"@formepdf/react\";\n\nimport { PageFooter } from \"@/registry/bases/forme/components/page-footer/page-footer\";\nimport { PageHeader } from \"@/registry/bases/forme/components/page-header/page-header\";\nimport { Section } from \"@/registry/bases/forme/components/section/section\";\nimport {\n Table,\n TableBody,\n TableCell,\n TableHeader,\n TableRow,\n} from \"@/registry/bases/forme/components/table/table\";\nimport { Text } from \"@/registry/bases/forme/components/text/text\";\nimport {\n PdfcnThemeProvider,\n usePdfcnTheme,\n} from \"@/registry/bases/forme/components/theme-provider\";\nimport type { PdfcnTheme } from \"@/registry/types/pdf-themes\";\n\nimport type { LessonPlanProps } from \"./lesson-plan.types\";\n\n// Sample data — replace with your own props or data source\nconst sampleData: LessonPlanProps = {\n accentColor: \"#7c3aed\",\n assessment: {\n formative: [\"Exit ticket\", \"Observation during guided practice\"],\n summative: [\"Chapter quiz\"],\n },\n date: \"September 15, 2026\",\n differentiation: [\n \"Provide equation mats for visual learners\",\n \"Allow calculator use for students with processing difficulties\",\n \"Offer extension problems for advanced learners\",\n ],\n duration: \"50 minutes\",\n essentialQuestion:\n \"How can we represent real-world relationships using linear equations?\",\n gradeLevel: \"8th Grade\",\n homework: \"Complete worksheet problems 11-20\",\n lessonTitle: \"Introduction to Linear Equations\",\n materials: [\"Graph paper\", \"Rulers\", \"Calculator\", \"Whiteboard markers\"],\n objectives: [\n \"Define linear equations\",\n \"Graph linear equations on a coordinate plane\",\n \"Solve simple linear equations\",\n ],\n sequence: [\n {\n activity: \"Warm-up\",\n description: \"Review solving one-step equations\",\n notes: \"5 problems on the board\",\n time: \"5 min\",\n },\n {\n activity: \"Introduction\",\n description: \"Define linear equations, show examples\",\n notes: \"Use real-world context\",\n time: \"10 min\",\n },\n {\n activity: \"Guided Practice\",\n description: \"Work through 3 examples together\",\n notes: \"Check for understanding\",\n time: \"15 min\",\n },\n {\n activity: \"Independent Practice\",\n description: \"Complete worksheet problems 1-10\",\n notes: \"Circulate and support\",\n time: \"15 min\",\n },\n {\n activity: \"Closure\",\n description: \"Exit ticket: solve one linear equation\",\n notes: \"Collect before dismissal\",\n time: \"5 min\",\n },\n ],\n standards: [\"CCSS.MATH.8.EE.B.6\", \"CCSS.MATH.8.EE.C.7\"],\n subject: \"Mathematics\",\n teacherName: \"Ms. Johnson\",\n topic: \"Linear Equations\",\n};\n\nconst REFLECTION_LINE_KEYS = Array.from(\n { length: 8 },\n (_, line) => `reflection-line-${line}`\n);\n\nconst COLUMN_WIDTHS = { activity: 104, notes: 140, time: 56 };\n\nconst LessonPlanContent = ({ data }: { data: LessonPlanProps }) => {\n const theme = usePdfcnTheme();\n const rule = {\n borderBottomColor: theme.colors.border,\n borderBottomStyle: \"solid\" as const,\n borderBottomWidth: 1,\n };\n\n const styles = StyleSheet.create({\n block: {\n marginBottom: 16,\n },\n colHalf: {\n flex: 2,\n paddingRight: 20,\n },\n colQuarter: {\n flex: 1,\n paddingRight: 10,\n },\n infoRow: {\n ...rule,\n flexDirection: \"row\",\n marginBottom: 16,\n paddingBottom: 12,\n },\n intro: {\n marginBottom: 3,\n },\n label: {\n fontSize: 9,\n fontWeight: \"bold\",\n marginBottom: 4,\n },\n listMarker: {\n width: 12,\n },\n listRow: {\n flexDirection: \"row\",\n marginBottom: 3,\n },\n listText: {\n flex: 1,\n },\n page: {\n backgroundColor: theme.colors.background,\n },\n reflectionLine: {\n ...rule,\n height: 24,\n },\n row: {\n flexDirection: \"row\",\n },\n });\n\n const pageMargin = {\n bottom: theme.spacing.page.marginBottom,\n left: theme.spacing.page.marginLeft,\n right: theme.spacing.page.marginRight,\n top: theme.spacing.page.marginTop,\n };\n\n const renderLabel = (label: string) => (\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n {label}\n </Text>\n );\n\n const renderList = (items: string[] = [], numbered = false) =>\n items.length > 0 ? (\n items.map((item, index) => (\n <View key={item} style={styles.listRow}>\n <View style={styles.listMarker}>\n <Text variant=\"xs\" color=\"mutedForeground\" noMargin>\n {numbered ? `${index + 1}.` : \"•\"}\n </Text>\n </View>\n <View style={styles.listText}>\n <Text variant=\"xs\" noMargin>\n {item}\n </Text>\n </View>\n </View>\n ))\n ) : (\n <Text variant=\"xs\" color=\"mutedForeground\" noMargin>\n —\n </Text>\n );\n\n const info = [\n { label: \"Subject\", value: data.subject },\n { label: \"Grade Level\", value: data.gradeLevel },\n { label: \"Teacher\", value: data.teacherName },\n { label: \"Duration\", value: data.duration },\n ];\n\n const footerText = `${data.subject} · ${data.gradeLevel} · ${data.lessonTitle}`;\n\n return (\n <Document title={`Lesson Plan — ${data.lessonTitle}`}>\n <Page margin={pageMargin} size=\"A4\">\n <PageFooter\n leftText={footerText}\n rightText=\"Page 1 of 2\"\n sticky\n pagePadding={25}\n />\n <View style={styles.page as never}>\n <PageHeader\n variant=\"simple\"\n title={data.lessonTitle}\n subtitle={\n data.topic ? `Lesson Plan · ${data.topic}` : \"Lesson Plan\"\n }\n rightText={data.date}\n marginBottom={16}\n />\n\n <View style={styles.infoRow}>\n {info.map((item) => (\n <View key={item.label} style={styles.colQuarter}>\n {renderLabel(item.label)}\n <Text variant=\"xs\" weight=\"medium\" noMargin>\n {item.value}\n </Text>\n </View>\n ))}\n </View>\n\n {data.essentialQuestion ? (\n <Section\n variant=\"highlight\"\n accentColor={data.accentColor}\n spacing=\"none\"\n padding=\"sm\"\n style={styles.block}\n >\n {renderLabel(\"Essential Question\")}\n <Text variant=\"sm\" weight=\"medium\" noMargin>\n {data.essentialQuestion}\n </Text>\n </Section>\n ) : null}\n\n <View style={{ ...styles.row, ...styles.block }}>\n <View style={styles.colHalf}>\n {renderLabel(\"Objectives\")}\n <Text\n variant=\"xs\"\n color=\"mutedForeground\"\n style={styles.intro}\n noMargin\n >\n Students will be able to (SWBAT):\n </Text>\n {renderList(data.objectives, true)}\n </View>\n {data.standards?.length ? (\n <View style={styles.colQuarter}>\n {renderLabel(\"Standards\")}\n {renderList(data.standards)}\n </View>\n ) : null}\n <View style={styles.colQuarter}>\n {renderLabel(\"Materials\")}\n {renderList(data.materials)}\n </View>\n </View>\n\n <View>\n {renderLabel(\"Lesson Sequence\")}\n <Table variant=\"grid\" zebraStripe>\n <TableHeader>\n <TableRow header>\n <TableCell width={COLUMN_WIDTHS.time}>Time</TableCell>\n <TableCell width={COLUMN_WIDTHS.activity}>Activity</TableCell>\n <TableCell>Description</TableCell>\n <TableCell width={COLUMN_WIDTHS.notes}>Notes</TableCell>\n </TableRow>\n </TableHeader>\n <TableBody>\n {data.sequence.map((item) => (\n <TableRow key={`${item.time}-${item.activity}`}>\n <TableCell width={COLUMN_WIDTHS.time}>\n {item.time}\n </TableCell>\n <TableCell width={COLUMN_WIDTHS.activity}>\n {item.activity}\n </TableCell>\n <TableCell>{item.description}</TableCell>\n <TableCell width={COLUMN_WIDTHS.notes}>\n {item.notes ?? \"—\"}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </View>\n </View>\n </Page>\n\n <Page margin={pageMargin} size=\"A4\">\n <PageFooter\n leftText={footerText}\n rightText=\"Page 2 of 2\"\n sticky\n pagePadding={25}\n />\n <View style={styles.page as never}>\n {data.differentiation?.length ? (\n <View style={styles.block}>\n {renderLabel(\"Differentiation\")}\n {renderList(data.differentiation)}\n </View>\n ) : null}\n\n <View style={{ ...styles.row, ...styles.block }}>\n <View style={styles.colHalf}>\n {renderLabel(\"Formative Assessment\")}\n {renderList(data.assessment.formative)}\n </View>\n <View style={styles.colHalf}>\n {renderLabel(\"Summative Assessment\")}\n {renderList(data.assessment.summative)}\n </View>\n </View>\n\n {data.homework ? (\n <View style={styles.block}>\n {renderLabel(\"Homework\")}\n <Text variant=\"xs\" noMargin>\n {data.homework}\n </Text>\n </View>\n ) : null}\n\n <View>\n {renderLabel(\"Teacher Reflection\")}\n {data.reflection ? (\n <Text variant=\"xs\" noMargin>\n {data.reflection}\n </Text>\n ) : null}\n {REFLECTION_LINE_KEYS.map((key) => (\n <View key={key} style={styles.reflectionLine} />\n ))}\n </View>\n </View>\n </Page>\n </Document>\n );\n};\n\nexport const LessonPlanDocument = ({\n theme,\n data,\n ...props\n}: {\n theme?: PdfcnTheme;\n data?: LessonPlanProps;\n} & Partial<LessonPlanProps>) => (\n <PdfcnThemeProvider theme={theme}>\n <LessonPlanContent data={{ ...sampleData, ...data, ...props }} />\n </PdfcnThemeProvider>\n);\n",
"type": "registry:block",
"target": "components/pdf/blocks/lesson-plan/lesson-plan.tsx"
},
{
"path": "registry/bases/forme/blocks/lesson-plan/lesson-plan.types.ts",
- "content": "export interface LessonPlanSequenceItem {\n time: string;\n activity: string;\n description: string;\n notes?: string;\n}\n\nexport interface LessonPlanAssessment {\n formative?: string[];\n summative?: string[];\n}\n\nexport interface LessonPlanData {\n subject: string;\n gradeLevel: string;\n lessonTitle: string;\n date: string;\n teacherName: string;\n duration: string;\n topic: string;\n essentialQuestion?: string;\n objectives: string[];\n standards?: string[];\n materials: string[];\n sequence: LessonPlanSequenceItem[];\n differentiation?: string[];\n assessment: LessonPlanAssessment;\n homework?: string;\n reflection?: string;\n accentColor?: string;\n renderingBase?: \"takumi\" | \"forme\";\n}\n",
+ "content": "export interface LessonPlanSequenceItem {\n time: string;\n activity: string;\n description: string;\n notes?: string;\n}\n\nexport interface LessonPlanAssessment {\n formative?: string[];\n summative?: string[];\n}\n\nexport interface LessonPlanProps {\n subject: string;\n gradeLevel: string;\n lessonTitle: string;\n date: string;\n teacherName: string;\n duration: string;\n topic?: string;\n essentialQuestion?: string;\n objectives: string[];\n standards?: string[];\n materials: string[];\n sequence: LessonPlanSequenceItem[];\n differentiation?: string[];\n assessment: LessonPlanAssessment;\n homework?: string;\n reflection?: string;\n accentColor?: string;\n renderingBase?: \"takumi\" | \"forme\";\n}\n",
"type": "registry:block",
"target": "components/pdf/blocks/lesson-plan/lesson-plan.types.ts"
}
diff --git a/apps/web/public/r/registry.json b/apps/web/public/r/registry.json
index e2997fa..75dc377 100644
--- a/apps/web/public/r/registry.json
+++ b/apps/web/public/r/registry.json
@@ -1006,6 +1006,33 @@
"title": "Work Order",
"type": "registry:block"
},
+ {
+ "dependencies": ["takumi-pdf", "@takumi-rs/helpers"],
+ "description": "Lesson Plan PDF block (takumi)",
+ "files": [
+ {
+ "path": "registry/bases/takumi/blocks/lesson-plan/lesson-plan.tsx",
+ "type": "registry:block",
+ "target": "components/pdf/blocks/lesson-plan/lesson-plan.tsx"
+ },
+ {
+ "path": "registry/bases/takumi/blocks/lesson-plan/lesson-plan.types.ts",
+ "type": "registry:block",
+ "target": "components/pdf/blocks/lesson-plan/lesson-plan.types.ts"
+ }
+ ],
+ "name": "takumi/lesson-plan",
+ "registryDependencies": [
+ "@pdfcn/takumi/utils",
+ "@pdfcn/takumi/page-footer",
+ "@pdfcn/takumi/page-header",
+ "@pdfcn/takumi/section",
+ "@pdfcn/takumi/table",
+ "@pdfcn/takumi/text"
+ ],
+ "title": "Lesson Plan",
+ "type": "registry:block"
+ },
{
"description": "professional theme tokens",
"files": [
@@ -2264,6 +2291,33 @@
],
"title": "Work Order",
"type": "registry:block"
+ },
+ {
+ "dependencies": ["@formepdf/react", "@formepdf/core"],
+ "description": "Lesson Plan PDF block (forme)",
+ "files": [
+ {
+ "path": "registry/bases/forme/blocks/lesson-plan/lesson-plan.tsx",
+ "type": "registry:block",
+ "target": "components/pdf/blocks/lesson-plan/lesson-plan.tsx"
+ },
+ {
+ "path": "registry/bases/forme/blocks/lesson-plan/lesson-plan.types.ts",
+ "type": "registry:block",
+ "target": "components/pdf/blocks/lesson-plan/lesson-plan.types.ts"
+ }
+ ],
+ "name": "forme/lesson-plan",
+ "registryDependencies": [
+ "@pdfcn/forme/utils",
+ "@pdfcn/forme/page-footer",
+ "@pdfcn/forme/page-header",
+ "@pdfcn/forme/section",
+ "@pdfcn/forme/table",
+ "@pdfcn/forme/text"
+ ],
+ "title": "Lesson Plan",
+ "type": "registry:block"
}
],
"name": "pdfcn"
diff --git a/apps/web/public/r/takumi/lesson-plan.json b/apps/web/public/r/takumi/lesson-plan.json
index 68911e9..7110f4d 100644
--- a/apps/web/public/r/takumi/lesson-plan.json
+++ b/apps/web/public/r/takumi/lesson-plan.json
@@ -9,7 +9,6 @@
],
"registryDependencies": [
"@pdfcn/takumi/utils",
- "@pdfcn/takumi/list",
"@pdfcn/takumi/page-footer",
"@pdfcn/takumi/page-header",
"@pdfcn/takumi/section",
@@ -19,13 +18,13 @@
"files": [
{
"path": "registry/bases/takumi/blocks/lesson-plan/lesson-plan.tsx",
- "content": "import { PdfList } from \"@/registry/bases/takumi/components/list/list\";\nimport { PageFooter } from \"@/registry/bases/takumi/components/page-footer/page-footer\";\nimport { PageHeader } from \"@/registry/bases/takumi/components/page-header/page-header\";\nimport { Section } from \"@/registry/bases/takumi/components/section/section\";\nimport {\n Table,\n TableBody,\n TableCell,\n TableHeader,\n TableRow,\n} from \"@/registry/bases/takumi/components/table/table\";\nimport { Text } from \"@/registry/bases/takumi/components/text/text\";\nimport {\n PdfcnThemeProvider,\n usePdfcnTheme,\n} from \"@/registry/bases/takumi/components/theme-provider\";\nimport {\n Document,\n Page,\n StyleSheet,\n View,\n} from \"@/registry/bases/takumi/lib/pdf-primitives\";\nimport type { PdfcnTheme } from \"@/registry/types/pdf-themes\";\n\nimport type { LessonPlanData } from \"./lesson-plan.types\";\n\n// Sample data — replace with your own props or data source\nconst sampleData: LessonPlanData = {\n accentColor: \"#7c3aed\",\n assessment: {\n formative: [\"Exit ticket\", \"Observation\", \"Guided practice responses\"],\n summative: [\"Chapter quiz\", \"Unit assessment\"],\n },\n date: \"September 15, 2026\",\n differentiation: [\n \"Provide equation mats for visual learners\",\n \"Allow calculator use for students with processing difficulties\",\n \"Offer extension problems for advanced learners\",\n ],\n duration: \"50 minutes\",\n essentialQuestion:\n \"How can we represent real-world relationships using linear equations?\",\n gradeLevel: \"8th Grade\",\n homework: \"Complete worksheet problems 11-20\",\n lessonTitle: \"Introduction to Linear Equations\",\n materials: [\"Graph paper\", \"Rulers\", \"Calculator\", \"Whiteboard markers\"],\n objectives: [\n \"Define linear equations\",\n \"Graph linear equations on a coordinate plane\",\n \"Solve simple linear equations\",\n ],\n reflection:\n \"Note student misconceptions during independent practice and adjust the warm-up for the next lesson.\",\n sequence: [\n {\n activity: \"Warm-up\",\n description: \"Review solving one-step equations\",\n notes: \"5 problems on the board\",\n time: \"5 min\",\n },\n {\n activity: \"Introduction\",\n description: \"Define linear equations, show examples\",\n notes: \"Use real-world context\",\n time: \"10 min\",\n },\n {\n activity: \"Guided Practice\",\n description: \"Work through 3 examples together\",\n notes: \"Check for understanding\",\n time: \"15 min\",\n },\n {\n activity: \"Independent Practice\",\n description: \"Complete worksheet problems 1-10\",\n notes: \"Circulate and support\",\n time: \"15 min\",\n },\n {\n activity: \"Closure\",\n description: \"Exit ticket: solve one linear equation\",\n notes: \"Collect before dismissal\",\n time: \"5 min\",\n },\n ],\n standards: [\"CCSS.MATH.8.EE.B.6\", \"CCSS.MATH.8.EE.C.7\"],\n subject: \"Mathematics\",\n teacherName: \"Ms. Johnson\",\n topic: \"Linear Equations\",\n};\n\nconst LessonPlanContent = ({ data }: { data: LessonPlanData }) => {\n const theme = usePdfcnTheme();\n\n const styles = StyleSheet.create({\n col: {\n flex: 1,\n paddingRight: 10,\n },\n label: {\n fontSize: 9,\n fontWeight: \"bold\",\n marginBottom: 2,\n },\n page: {\n backgroundColor: theme.colors.background,\n boxSizing: \"border-box\",\n minHeight: 841,\n padding: theme.spacing.page.marginTop,\n paddingBottom: theme.spacing.page.marginBottom,\n position: \"relative\",\n },\n row: {\n flexDirection: \"row\",\n },\n section: {\n marginBottom: theme.spacing.componentGap,\n },\n });\n\n return (\n <Document title={`${data.lessonTitle} — Lesson Plan`}>\n <Page size=\"A4\" style={styles.page}>\n <PageHeader\n title={data.lessonTitle}\n subtitle={`${data.subject} \\u2022 ${data.gradeLevel}`}\n rightText={`Teacher: ${data.teacherName}`}\n rightSubText={`Date: ${data.date}`}\n style={styles.section}\n />\n\n <Section spacing=\"none\" style={{ ...styles.row, ...styles.section }}>\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Duration\n </Text>\n <Text noMargin variant=\"xs\">\n {data.duration}\n </Text>\n </View>\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Topic\n </Text>\n <Text noMargin variant=\"xs\">\n {data.topic}\n </Text>\n </View>\n {data.essentialQuestion ? (\n <View style={{ flex: 2 }}>\n <Section\n variant=\"highlight\"\n accentColor={data.accentColor}\n spacing=\"sm\"\n style={{ margin: 0 }}\n >\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Essential Question\n </Text>\n <Text noMargin variant=\"xs\">\n {data.essentialQuestion}\n </Text>\n </Section>\n </View>\n ) : null}\n </Section>\n\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Objectives\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.objectives.map((o) => ({ text: `SWBAT ${o}` }))}\n />\n </Section>\n\n {data.standards ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Standards\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.standards.map((s) => ({ text: s }))}\n />\n </Section>\n ) : null}\n\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Materials\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.materials.map((m) => ({ text: m }))}\n />\n </Section>\n\n <PageFooter\n leftText={`${data.subject} — ${data.lessonTitle}`}\n rightText=\"Page 1 of 2\"\n sticky\n pagePadding={25}\n />\n </Page>\n\n <Page size=\"A4\" style={styles.page}>\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Lesson Sequence\n </Text>\n <Table variant=\"grid\" zebraStripe>\n <TableHeader>\n <TableRow header>\n <TableCell>Time</TableCell>\n <TableCell>Activity</TableCell>\n <TableCell>Description</TableCell>\n <TableCell>Notes</TableCell>\n </TableRow>\n </TableHeader>\n <TableBody>\n {data.sequence.map((item, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: sequence items have no stable id\n <TableRow key={index}>\n <TableCell>{item.time}</TableCell>\n <TableCell>{item.activity}</TableCell>\n <TableCell>{item.description}</TableCell>\n <TableCell>{item.notes ?? \"\"}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </Section>\n\n {data.differentiation ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Differentiation\n </Text>\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.differentiation.map((d) => ({ text: d }))}\n />\n </Section>\n ) : null}\n\n <Section\n noWrap\n spacing=\"none\"\n style={{ ...styles.row, ...styles.section }}\n >\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Formative Assessment\n </Text>\n {data.assessment.formative ? (\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.assessment.formative.map((a) => ({ text: a }))}\n />\n ) : (\n <Text noMargin variant=\"xs\" color=\"mutedForeground\">\n None\n </Text>\n )}\n </View>\n <View style={styles.col}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Summative Assessment\n </Text>\n {data.assessment.summative ? (\n <PdfList\n variant=\"bullet\"\n gap=\"xs\"\n items={data.assessment.summative.map((a) => ({ text: a }))}\n />\n ) : (\n <Text noMargin variant=\"xs\" color=\"mutedForeground\">\n None\n </Text>\n )}\n </View>\n </Section>\n\n {data.homework ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Homework\n </Text>\n <Text noMargin variant=\"xs\">\n {data.homework}\n </Text>\n </Section>\n ) : null}\n\n {data.reflection ? (\n <Section spacing=\"none\" style={styles.section}>\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n Reflection Notes\n </Text>\n <Text noMargin variant=\"xs\">\n {data.reflection}\n </Text>\n </Section>\n ) : null}\n\n <PageFooter\n leftText={`${data.teacherName}`}\n rightText=\"Page 2 of 2\"\n sticky\n pagePadding={25}\n />\n </Page>\n </Document>\n );\n};\n\nexport const LessonPlanDocument = ({\n theme,\n data = sampleData,\n}: {\n theme?: PdfcnTheme;\n data?: LessonPlanData;\n}) => (\n <PdfcnThemeProvider theme={theme}>\n <LessonPlanContent data={data} />\n </PdfcnThemeProvider>\n);\n",
+ "content": "import { PageFooter } from \"@/registry/bases/takumi/components/page-footer/page-footer\";\nimport { PageHeader } from \"@/registry/bases/takumi/components/page-header/page-header\";\nimport { Section } from \"@/registry/bases/takumi/components/section/section\";\nimport {\n Table,\n TableBody,\n TableCell,\n TableHeader,\n TableRow,\n} from \"@/registry/bases/takumi/components/table/table\";\nimport { Text } from \"@/registry/bases/takumi/components/text/text\";\nimport {\n PdfcnThemeProvider,\n usePdfcnTheme,\n} from \"@/registry/bases/takumi/components/theme-provider\";\nimport {\n Document,\n Page,\n StyleSheet,\n View,\n} from \"@/registry/bases/takumi/lib/pdf-primitives\";\nimport type { PdfcnTheme } from \"@/registry/types/pdf-themes\";\n\nimport type { LessonPlanProps } from \"./lesson-plan.types\";\n\n// Sample data — replace with your own props or data source\nconst sampleData: LessonPlanProps = {\n accentColor: \"#7c3aed\",\n assessment: {\n formative: [\"Exit ticket\", \"Observation during guided practice\"],\n summative: [\"Chapter quiz\"],\n },\n date: \"September 15, 2026\",\n differentiation: [\n \"Provide equation mats for visual learners\",\n \"Allow calculator use for students with processing difficulties\",\n \"Offer extension problems for advanced learners\",\n ],\n duration: \"50 minutes\",\n essentialQuestion:\n \"How can we represent real-world relationships using linear equations?\",\n gradeLevel: \"8th Grade\",\n homework: \"Complete worksheet problems 11-20\",\n lessonTitle: \"Introduction to Linear Equations\",\n materials: [\"Graph paper\", \"Rulers\", \"Calculator\", \"Whiteboard markers\"],\n objectives: [\n \"Define linear equations\",\n \"Graph linear equations on a coordinate plane\",\n \"Solve simple linear equations\",\n ],\n sequence: [\n {\n activity: \"Warm-up\",\n description: \"Review solving one-step equations\",\n notes: \"5 problems on the board\",\n time: \"5 min\",\n },\n {\n activity: \"Introduction\",\n description: \"Define linear equations, show examples\",\n notes: \"Use real-world context\",\n time: \"10 min\",\n },\n {\n activity: \"Guided Practice\",\n description: \"Work through 3 examples together\",\n notes: \"Check for understanding\",\n time: \"15 min\",\n },\n {\n activity: \"Independent Practice\",\n description: \"Complete worksheet problems 1-10\",\n notes: \"Circulate and support\",\n time: \"15 min\",\n },\n {\n activity: \"Closure\",\n description: \"Exit ticket: solve one linear equation\",\n notes: \"Collect before dismissal\",\n time: \"5 min\",\n },\n ],\n standards: [\"CCSS.MATH.8.EE.B.6\", \"CCSS.MATH.8.EE.C.7\"],\n subject: \"Mathematics\",\n teacherName: \"Ms. Johnson\",\n topic: \"Linear Equations\",\n};\n\nconst REFLECTION_LINE_KEYS = Array.from(\n { length: 8 },\n (_, line) => `reflection-line-${line}`\n);\n\nconst COLUMN_WIDTHS = { activity: 104, notes: 140, time: 56 };\n\nconst LessonPlanContent = ({ data }: { data: LessonPlanProps }) => {\n const theme = usePdfcnTheme();\n const rule = {\n borderBottomColor: theme.colors.border,\n borderBottomStyle: \"solid\",\n borderBottomWidth: 1,\n };\n\n const styles = StyleSheet.create({\n block: {\n marginBottom: 16,\n },\n colHalf: {\n flex: 2,\n paddingRight: 20,\n },\n colQuarter: {\n flex: 1,\n paddingRight: 10,\n },\n infoRow: {\n ...rule,\n flexDirection: \"row\",\n marginBottom: 16,\n paddingBottom: 12,\n },\n intro: {\n marginBottom: 3,\n },\n label: {\n fontSize: 9,\n fontWeight: \"bold\",\n marginBottom: 4,\n },\n listMarker: {\n width: 12,\n },\n listRow: {\n flexDirection: \"row\",\n marginBottom: 3,\n },\n listText: {\n flex: 1,\n },\n page: {\n backgroundColor: theme.colors.background,\n boxSizing: \"border-box\",\n minHeight: 841,\n padding: theme.spacing.page.marginTop,\n paddingBottom: theme.spacing.page.marginBottom,\n position: \"relative\",\n },\n reflectionLine: {\n ...rule,\n height: 24,\n },\n row: {\n flexDirection: \"row\",\n },\n });\n\n const renderLabel = (label: string) => (\n <Text\n style={styles.label}\n color=\"mutedForeground\"\n transform=\"uppercase\"\n noMargin\n >\n {label}\n </Text>\n );\n\n const renderList = (items: string[] = [], numbered = false) =>\n items.length > 0 ? (\n items.map((item, index) => (\n <View key={item} style={styles.listRow}>\n <View style={styles.listMarker}>\n <Text variant=\"xs\" color=\"mutedForeground\" noMargin>\n {numbered ? `${index + 1}.` : \"•\"}\n </Text>\n </View>\n <View style={styles.listText}>\n <Text variant=\"xs\" noMargin>\n {item}\n </Text>\n </View>\n </View>\n ))\n ) : (\n <Text variant=\"xs\" color=\"mutedForeground\" noMargin>\n —\n </Text>\n );\n\n const info = [\n { label: \"Subject\", value: data.subject },\n { label: \"Grade Level\", value: data.gradeLevel },\n { label: \"Teacher\", value: data.teacherName },\n { label: \"Duration\", value: data.duration },\n ];\n\n const footerText = `${data.subject} · ${data.gradeLevel} · ${data.lessonTitle}`;\n\n return (\n <Document title={`Lesson Plan — ${data.lessonTitle}`}>\n <Page size=\"A4\" style={styles.page}>\n <PageHeader\n variant=\"simple\"\n title={data.lessonTitle}\n subtitle={data.topic ? `Lesson Plan · ${data.topic}` : \"Lesson Plan\"}\n rightText={data.date}\n marginBottom={16}\n />\n\n <View style={styles.infoRow}>\n {info.map((item) => (\n <View key={item.label} style={styles.colQuarter}>\n {renderLabel(item.label)}\n <Text variant=\"xs\" weight=\"medium\" noMargin>\n {item.value}\n </Text>\n </View>\n ))}\n </View>\n\n {data.essentialQuestion ? (\n <Section\n variant=\"highlight\"\n accentColor={data.accentColor}\n spacing=\"none\"\n padding=\"sm\"\n style={styles.block}\n >\n {renderLabel(\"Essential Question\")}\n <Text variant=\"sm\" weight=\"medium\" noMargin>\n {data.essentialQuestion}\n </Text>\n </Section>\n ) : null}\n\n <View style={{ ...styles.row, ...styles.block }}>\n <View style={styles.colHalf}>\n {renderLabel(\"Objectives\")}\n <Text\n variant=\"xs\"\n color=\"mutedForeground\"\n style={styles.intro}\n noMargin\n >\n Students will be able to (SWBAT):\n </Text>\n {renderList(data.objectives, true)}\n </View>\n {data.standards?.length ? (\n <View style={styles.colQuarter}>\n {renderLabel(\"Standards\")}\n {renderList(data.standards)}\n </View>\n ) : null}\n <View style={styles.colQuarter}>\n {renderLabel(\"Materials\")}\n {renderList(data.materials)}\n </View>\n </View>\n\n <View>\n {renderLabel(\"Lesson Sequence\")}\n <Table variant=\"grid\" zebraStripe>\n <TableHeader>\n <TableRow header>\n <TableCell width={COLUMN_WIDTHS.time}>Time</TableCell>\n <TableCell width={COLUMN_WIDTHS.activity}>Activity</TableCell>\n <TableCell>Description</TableCell>\n <TableCell width={COLUMN_WIDTHS.notes}>Notes</TableCell>\n </TableRow>\n </TableHeader>\n <TableBody>\n {data.sequence.map((item) => (\n <TableRow key={`${item.time}-${item.activity}`}>\n <TableCell width={COLUMN_WIDTHS.time}>{item.time}</TableCell>\n <TableCell width={COLUMN_WIDTHS.activity}>\n {item.activity}\n </TableCell>\n <TableCell>{item.description}</TableCell>\n <TableCell width={COLUMN_WIDTHS.notes}>\n {item.notes ?? \"—\"}\n </TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </View>\n\n <PageFooter\n leftText={footerText}\n rightText=\"Page 1 of 2\"\n sticky\n pagePadding={25}\n />\n </Page>\n\n <Page size=\"A4\" style={styles.page}>\n {data.differentiation?.length ? (\n <View style={styles.block}>\n {renderLabel(\"Differentiation\")}\n {renderList(data.differentiation)}\n </View>\n ) : null}\n\n <View style={{ ...styles.row, ...styles.block }}>\n <View style={styles.colHalf}>\n {renderLabel(\"Formative Assessment\")}\n {renderList(data.assessment.formative)}\n </View>\n <View style={styles.colHalf}>\n {renderLabel(\"Summative Assessment\")}\n {renderList(data.assessment.summative)}\n </View>\n </View>\n\n {data.homework ? (\n <View style={styles.block}>\n {renderLabel(\"Homework\")}\n <Text variant=\"xs\" noMargin>\n {data.homework}\n </Text>\n </View>\n ) : null}\n\n <View>\n {renderLabel(\"Teacher Reflection\")}\n {data.reflection ? (\n <Text variant=\"xs\" noMargin>\n {data.reflection}\n </Text>\n ) : null}\n {REFLECTION_LINE_KEYS.map((key) => (\n <View key={key} style={styles.reflectionLine} />\n ))}\n </View>\n\n <PageFooter\n leftText={footerText}\n rightText=\"Page 2 of 2\"\n sticky\n pagePadding={25}\n />\n </Page>\n </Document>\n );\n};\n\nexport const LessonPlanDocument = ({\n theme,\n data,\n ...props\n}: {\n theme?: PdfcnTheme;\n data?: LessonPlanProps;\n} & Partial<LessonPlanProps>) => (\n <PdfcnThemeProvider theme={theme}>\n <LessonPlanContent data={{ ...sampleData, ...data, ...props }} />\n </PdfcnThemeProvider>\n);\n",
"type": "registry:block",
"target": "components/pdf/blocks/lesson-plan/lesson-plan.tsx"
},
{
"path": "registry/bases/takumi/blocks/lesson-plan/lesson-plan.types.ts",
- "content": "export interface LessonPlanSequenceItem {\n time: string;\n activity: string;\n description: string;\n notes?: string;\n}\n\nexport interface LessonPlanAssessment {\n formative?: string[];\n summative?: string[];\n}\n\nexport interface LessonPlanData {\n subject: string;\n gradeLevel: string;\n lessonTitle: string;\n date: string;\n teacherName: string;\n duration: string;\n topic: string;\n essentialQuestion?: string;\n objectives: string[];\n standards?: string[];\n materials: string[];\n sequence: LessonPlanSequenceItem[];\n differentiation?: string[];\n assessment: LessonPlanAssessment;\n homework?: string;\n reflection?: string;\n accentColor?: string;\n renderingBase?: \"takumi\" | \"forme\";\n}\n",
+ "content": "export interface LessonPlanSequenceItem {\n time: string;\n activity: string;\n description: string;\n notes?: string;\n}\n\nexport interface LessonPlanAssessment {\n formative?: string[];\n summative?: string[];\n}\n\nexport interface LessonPlanProps {\n subject: string;\n gradeLevel: string;\n lessonTitle: string;\n date: string;\n teacherName: string;\n duration: string;\n topic?: string;\n essentialQuestion?: string;\n objectives: string[];\n standards?: string[];\n materials: string[];\n sequence: LessonPlanSequenceItem[];\n differentiation?: string[];\n assessment: LessonPlanAssessment;\n homework?: string;\n reflection?: string;\n accentColor?: string;\n renderingBase?: \"takumi\" | \"forme\";\n}\n",
"type": "registry:block",
"target": "components/pdf/blocks/lesson-plan/lesson-plan.types.ts"
}
diff --git a/apps/web/registry.json b/apps/web/registry.json
index db2d727..75dc377 100644
--- a/apps/web/registry.json
+++ b/apps/web/registry.json
@@ -1024,7 +1024,6 @@
"name": "takumi/lesson-plan",
"registryDependencies": [
"@pdfcn/takumi/utils",
- "@pdfcn/takumi/list",
"@pdfcn/takumi/page-footer",
"@pdfcn/takumi/page-header",
"@pdfcn/takumi/section",
@@ -2311,7 +2310,6 @@
"name": "forme/lesson-plan",
"registryDependencies": [
"@pdfcn/forme/utils",
- "@pdfcn/forme/list",
"@pdfcn/forme/page-footer",
"@pdfcn/forme/page-header",
"@pdfcn/forme/section",
diff --git a/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.tsx b/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.tsx
index d9c7339..584c82d 100644
--- a/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.tsx
+++ b/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.tsx
@@ -1,6 +1,5 @@
import { Document, Page, StyleSheet, View } from "@formepdf/react";
-import { PdfList } from "@/registry/bases/forme/components/list/list";
import { PageFooter } from "@/registry/bases/forme/components/page-footer/page-footer";
import { PageHeader } from "@/registry/bases/forme/components/page-header/page-header";
import { Section } from "@/registry/bases/forme/components/section/section";
@@ -18,14 +17,14 @@ import {
} from "@/registry/bases/forme/components/theme-provider";
import type { PdfcnTheme } from "@/registry/types/pdf-themes";
-import type { LessonPlanData } from "./lesson-plan.types";
+import type { LessonPlanProps } from "./lesson-plan.types";
// Sample data — replace with your own props or data source
-const sampleData: LessonPlanData = {
+const sampleData: LessonPlanProps = {
accentColor: "#7c3aed",
assessment: {
- formative: ["Exit ticket", "Observation", "Guided practice responses"],
- summative: ["Chapter quiz", "Unit assessment"],
+ formative: ["Exit ticket", "Observation during guided practice"],
+ summative: ["Chapter quiz"],
},
date: "September 15, 2026",
differentiation: [
@@ -45,8 +44,6 @@ const sampleData: LessonPlanData = {
"Graph linear equations on a coordinate plane",
"Solve simple linear equations",
],
- reflection:
- "Note student misconceptions during independent practice and adjust the warm-up for the next lesson.",
sequence: [
{
activity: "Warm-up",
@@ -85,309 +82,267 @@ const sampleData: LessonPlanData = {
topic: "Linear Equations",
};
-const LessonPlanContent = ({ data }: { data: LessonPlanData }) => {
+const REFLECTION_LINE_KEYS = Array.from(
+ { length: 8 },
+ (_, line) => `reflection-line-${line}`
+);
+
+const COLUMN_WIDTHS = { activity: 104, notes: 140, time: 56 };
+
+const LessonPlanContent = ({ data }: { data: LessonPlanProps }) => {
const theme = usePdfcnTheme();
+ const rule = {
+ borderBottomColor: theme.colors.border,
+ borderBottomStyle: "solid" as const,
+ borderBottomWidth: 1,
+ };
const styles = StyleSheet.create({
- col: {
+ block: {
+ marginBottom: 16,
+ },
+ colHalf: {
+ flex: 2,
+ paddingRight: 20,
+ },
+ colQuarter: {
flex: 1,
paddingRight: 10,
},
+ infoRow: {
+ ...rule,
+ flexDirection: "row",
+ marginBottom: 16,
+ paddingBottom: 12,
+ },
+ intro: {
+ marginBottom: 3,
+ },
label: {
fontSize: 9,
fontWeight: "bold",
- marginBottom: 2,
+ marginBottom: 4,
+ },
+ listMarker: {
+ width: 12,
+ },
+ listRow: {
+ flexDirection: "row",
+ marginBottom: 3,
+ },
+ listText: {
+ flex: 1,
},
page: {
backgroundColor: theme.colors.background,
},
+ reflectionLine: {
+ ...rule,
+ height: 24,
+ },
row: {
flexDirection: "row",
},
- section: {
- marginBottom: theme.spacing.componentGap,
- },
});
+ const pageMargin = {
+ bottom: theme.spacing.page.marginBottom,
+ left: theme.spacing.page.marginLeft,
+ right: theme.spacing.page.marginRight,
+ top: theme.spacing.page.marginTop,
+ };
+
+ const renderLabel = (label: string) => (
+ <Text
+ style={styles.label}
+ color="mutedForeground"
+ transform="uppercase"
+ noMargin
+ >
+ {label}
+ </Text>
+ );
+
+ const renderList = (items: string[] = [], numbered = false) =>
+ items.length > 0 ? (
+ items.map((item, index) => (
+ <View key={item} style={styles.listRow}>
+ <View style={styles.listMarker}>
+ <Text variant="xs" color="mutedForeground" noMargin>
+ {numbered ? `${index + 1}.` : "•"}
+ </Text>
+ </View>
+ <View style={styles.listText}>
+ <Text variant="xs" noMargin>
+ {item}
+ </Text>
+ </View>
+ </View>
+ ))
+ ) : (
+ <Text variant="xs" color="mutedForeground" noMargin>
+ —
+ </Text>
+ );
+
+ const info = [
+ { label: "Subject", value: data.subject },
+ { label: "Grade Level", value: data.gradeLevel },
+ { label: "Teacher", value: data.teacherName },
+ { label: "Duration", value: data.duration },
+ ];
+
+ const footerText = `${data.subject} · ${data.gradeLevel} · ${data.lessonTitle}`;
+
return (
- <Document title={`${data.lessonTitle} — Lesson Plan`}>
- <Page
- margin={{
- bottom: theme.spacing.page.marginBottom,
- left: theme.spacing.page.marginLeft,
- right: theme.spacing.page.marginRight,
- top: theme.spacing.page.marginTop,
- }}
- size="A4"
- >
+ <Document title={`Lesson Plan — ${data.lessonTitle}`}>
+ <Page margin={pageMargin} size="A4">
<PageFooter
- leftText={`${data.subject} — ${data.lessonTitle}`}
+ leftText={footerText}
rightText="Page 1 of 2"
sticky
pagePadding={25}
/>
<View style={styles.page as never}>
<PageHeader
+ variant="simple"
title={data.lessonTitle}
- subtitle={`${data.subject} \u2022 ${data.gradeLevel}`}
- rightText={`Teacher: ${data.teacherName}`}
- rightSubText={`Date: ${data.date}`}
- style={styles.section}
+ subtitle={
+ data.topic ? `Lesson Plan · ${data.topic}` : "Lesson Plan"
+ }
+ rightText={data.date}
+ marginBottom={16}
/>
- <Section
- noWrap
- spacing="none"
- style={{ ...styles.row, ...styles.section }}
- >
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Duration
- </Text>
- <Text noMargin variant="xs">
- {data.duration}
- </Text>
- </View>
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Topic
- </Text>
- <Text noMargin variant="xs">
- {data.topic}
- </Text>
- </View>
- {data.essentialQuestion ? (
- <View style={{ flex: 2 }}>
- <Section
- variant="highlight"
- accentColor={data.accentColor}
- spacing="sm"
- style={{ margin: 0 }}
- >
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Essential Question
- </Text>
- <Text noMargin variant="xs">
- {data.essentialQuestion}
- </Text>
- </Section>
+ <View style={styles.infoRow}>
+ {info.map((item) => (
+ <View key={item.label} style={styles.colQuarter}>
+ {renderLabel(item.label)}
+ <Text variant="xs" weight="medium" noMargin>
+ {item.value}
+ </Text>
</View>
- ) : null}
- </Section>
+ ))}
+ </View>
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
+ {data.essentialQuestion ? (
+ <Section
+ variant="highlight"
+ accentColor={data.accentColor}
+ spacing="none"
+ padding="sm"
+ style={styles.block}
>
- Objectives
- </Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.objectives.map((o) => ({ text: `SWBAT ${o}` }))}
- />
- </Section>
+ {renderLabel("Essential Question")}
+ <Text variant="sm" weight="medium" noMargin>
+ {data.essentialQuestion}
+ </Text>
+ </Section>
+ ) : null}
- {data.standards ? (
- <Section spacing="none" style={styles.section}>
+ <View style={{ ...styles.row, ...styles.block }}>
+ <View style={styles.colHalf}>
+ {renderLabel("Objectives")}
<Text
- style={styles.label}
+ variant="xs"
color="mutedForeground"
- transform="uppercase"
+ style={styles.intro}
noMargin
>
- Standards
+ Students will be able to (SWBAT):
</Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.standards.map((s) => ({ text: s }))}
- />
- </Section>
- ) : null}
-
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Materials
- </Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.materials.map((m) => ({ text: m }))}
- />
- </Section>
- </View>
- </Page>
+ {renderList(data.objectives, true)}
+ </View>
+ {data.standards?.length ? (
+ <View style={styles.colQuarter}>
+ {renderLabel("Standards")}
+ {renderList(data.standards)}
+ </View>
+ ) : null}
+ <View style={styles.colQuarter}>
+ {renderLabel("Materials")}
+ {renderList(data.materials)}
+ </View>
+ </View>
- <Page
- margin={{
- bottom: theme.spacing.page.marginBottom,
- left: theme.spacing.page.marginLeft,
- right: theme.spacing.page.marginRight,
- top: theme.spacing.page.marginTop,
- }}
- size="A4"
- >
- <PageFooter
- leftText={`${data.teacherName}`}
- rightText="Page 2 of 2"
- sticky
- pagePadding={25}
- />
- <View style={styles.page as never}>
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Lesson Sequence
- </Text>
+ <View>
+ {renderLabel("Lesson Sequence")}
<Table variant="grid" zebraStripe>
<TableHeader>
<TableRow header>
- <TableCell>Time</TableCell>
- <TableCell>Activity</TableCell>
+ <TableCell width={COLUMN_WIDTHS.time}>Time</TableCell>
+ <TableCell width={COLUMN_WIDTHS.activity}>Activity</TableCell>
<TableCell>Description</TableCell>
- <TableCell>Notes</TableCell>
+ <TableCell width={COLUMN_WIDTHS.notes}>Notes</TableCell>
</TableRow>
</TableHeader>
<TableBody>
- {data.sequence.map((item, index) => (
- // biome-ignore lint/suspicious/noArrayIndexKey: sequence items have no stable id
- <TableRow key={index}>
- <TableCell>{item.time}</TableCell>
- <TableCell>{item.activity}</TableCell>
+ {data.sequence.map((item) => (
+ <TableRow key={`${item.time}-${item.activity}`}>
+ <TableCell width={COLUMN_WIDTHS.time}>
+ {item.time}
+ </TableCell>
+ <TableCell width={COLUMN_WIDTHS.activity}>
+ {item.activity}
+ </TableCell>
<TableCell>{item.description}</TableCell>
- <TableCell>{item.notes ?? ""}</TableCell>
+ <TableCell width={COLUMN_WIDTHS.notes}>
+ {item.notes ?? "—"}
+ </TableCell>
</TableRow>
))}
</TableBody>
</Table>
- </Section>
+ </View>
+ </View>
+ </Page>
- {data.differentiation ? (
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Differentiation
- </Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.differentiation.map((d) => ({ text: d }))}
- />
- </Section>
+ <Page margin={pageMargin} size="A4">
+ <PageFooter
+ leftText={footerText}
+ rightText="Page 2 of 2"
+ sticky
+ pagePadding={25}
+ />
+ <View style={styles.page as never}>
+ {data.differentiation?.length ? (
+ <View style={styles.block}>
+ {renderLabel("Differentiation")}
+ {renderList(data.differentiation)}
+ </View>
) : null}
- <Section
- noWrap
- spacing="none"
- style={{ ...styles.row, ...styles.section }}
- >
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Formative Assessment
- </Text>
- {data.assessment.formative ? (
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.assessment.formative.map((a) => ({ text: a }))}
- />
- ) : (
- <Text noMargin variant="xs" color="mutedForeground">
- None
- </Text>
- )}
+ <View style={{ ...styles.row, ...styles.block }}>
+ <View style={styles.colHalf}>
+ {renderLabel("Formative Assessment")}
+ {renderList(data.assessment.formative)}
</View>
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Summative Assessment
- </Text>
- {data.assessment.summative ? (
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.assessment.summative.map((a) => ({ text: a }))}
- />
- ) : (
- <Text noMargin variant="xs" color="mutedForeground">
- None
- </Text>
- )}
+ <View style={styles.colHalf}>
+ {renderLabel("Summative Assessment")}
+ {renderList(data.assessment.summative)}
</View>
- </Section>
+ </View>
{data.homework ? (
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Homework
- </Text>
- <Text noMargin variant="xs">
+ <View style={styles.block}>
+ {renderLabel("Homework")}
+ <Text variant="xs" noMargin>
{data.homework}
</Text>
- </Section>
+ </View>
) : null}
- {data.reflection ? (
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Reflection Notes
- </Text>
- <Text noMargin variant="xs">
+ <View>
+ {renderLabel("Teacher Reflection")}
+ {data.reflection ? (
+ <Text variant="xs" noMargin>
{data.reflection}
</Text>
- </Section>
- ) : null}
+ ) : null}
+ {REFLECTION_LINE_KEYS.map((key) => (
+ <View key={key} style={styles.reflectionLine} />
+ ))}
+ </View>
</View>
</Page>
</Document>
@@ -396,12 +351,13 @@ const LessonPlanContent = ({ data }: { data: LessonPlanData }) => {
export const LessonPlanDocument = ({
theme,
- data = sampleData,
+ data,
+ ...props
}: {
theme?: PdfcnTheme;
- data?: LessonPlanData;
-}) => (
+ data?: LessonPlanProps;
+} & Partial<LessonPlanProps>) => (
<PdfcnThemeProvider theme={theme}>
- <LessonPlanContent data={data} />
+ <LessonPlanContent data={{ ...sampleData, ...data, ...props }} />
</PdfcnThemeProvider>
);
diff --git a/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.types.ts b/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.types.ts
index cccc71c..d1233da 100644
--- a/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.types.ts
+++ b/apps/web/registry/bases/forme/blocks/lesson-plan/lesson-plan.types.ts
@@ -10,14 +10,14 @@ export interface LessonPlanAssessment {
summative?: string[];
}
-export interface LessonPlanData {
+export interface LessonPlanProps {
subject: string;
gradeLevel: string;
lessonTitle: string;
date: string;
teacherName: string;
duration: string;
- topic: string;
+ topic?: string;
essentialQuestion?: string;
objectives: string[];
standards?: string[];
diff --git a/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.tsx b/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.tsx
index d61e66f..27d8531 100644
--- a/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.tsx
+++ b/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.tsx
@@ -1,4 +1,3 @@
-import { PdfList } from "@/registry/bases/takumi/components/list/list";
import { PageFooter } from "@/registry/bases/takumi/components/page-footer/page-footer";
import { PageHeader } from "@/registry/bases/takumi/components/page-header/page-header";
import { Section } from "@/registry/bases/takumi/components/section/section";
@@ -22,14 +21,14 @@ import {
} from "@/registry/bases/takumi/lib/pdf-primitives";
import type { PdfcnTheme } from "@/registry/types/pdf-themes";
-import type { LessonPlanData } from "./lesson-plan.types";
+import type { LessonPlanProps } from "./lesson-plan.types";
// Sample data — replace with your own props or data source
-const sampleData: LessonPlanData = {
+const sampleData: LessonPlanProps = {
accentColor: "#7c3aed",
assessment: {
- formative: ["Exit ticket", "Observation", "Guided practice responses"],
- summative: ["Chapter quiz", "Unit assessment"],
+ formative: ["Exit ticket", "Observation during guided practice"],
+ summative: ["Chapter quiz"],
},
date: "September 15, 2026",
differentiation: [
@@ -49,8 +48,6 @@ const sampleData: LessonPlanData = {
"Graph linear equations on a coordinate plane",
"Solve simple linear equations",
],
- reflection:
- "Note student misconceptions during independent practice and adjust the warm-up for the next lesson.",
sequence: [
{
activity: "Warm-up",
@@ -89,18 +86,56 @@ const sampleData: LessonPlanData = {
topic: "Linear Equations",
};
-const LessonPlanContent = ({ data }: { data: LessonPlanData }) => {
+const REFLECTION_LINE_KEYS = Array.from(
+ { length: 8 },
+ (_, line) => `reflection-line-${line}`
+);
+
+const COLUMN_WIDTHS = { activity: 104, notes: 140, time: 56 };
+
+const LessonPlanContent = ({ data }: { data: LessonPlanProps }) => {
const theme = usePdfcnTheme();
+ const rule = {
+ borderBottomColor: theme.colors.border,
+ borderBottomStyle: "solid",
+ borderBottomWidth: 1,
+ };
const styles = StyleSheet.create({
- col: {
+ block: {
+ marginBottom: 16,
+ },
+ colHalf: {
+ flex: 2,
+ paddingRight: 20,
+ },
+ colQuarter: {
flex: 1,
paddingRight: 10,
},
+ infoRow: {
+ ...rule,
+ flexDirection: "row",
+ marginBottom: 16,
+ paddingBottom: 12,
+ },
+ intro: {
+ marginBottom: 3,
+ },
label: {
fontSize: 9,
fontWeight: "bold",
- marginBottom: 2,
+ marginBottom: 4,
+ },
+ listMarker: {
+ width: 12,
+ },
+ listRow: {
+ flexDirection: "row",
+ marginBottom: 3,
+ },
+ listText: {
+ flex: 1,
},
page: {
backgroundColor: theme.colors.background,
@@ -110,268 +145,197 @@ const LessonPlanContent = ({ data }: { data: LessonPlanData }) => {
paddingBottom: theme.spacing.page.marginBottom,
position: "relative",
},
+ reflectionLine: {
+ ...rule,
+ height: 24,
+ },
row: {
flexDirection: "row",
},
- section: {
- marginBottom: theme.spacing.componentGap,
- },
});
+ const renderLabel = (label: string) => (
+ <Text
+ style={styles.label}
+ color="mutedForeground"
+ transform="uppercase"
+ noMargin
+ >
+ {label}
+ </Text>
+ );
+
+ const renderList = (items: string[] = [], numbered = false) =>
+ items.length > 0 ? (
+ items.map((item, index) => (
+ <View key={item} style={styles.listRow}>
+ <View style={styles.listMarker}>
+ <Text variant="xs" color="mutedForeground" noMargin>
+ {numbered ? `${index + 1}.` : "•"}
+ </Text>
+ </View>
+ <View style={styles.listText}>
+ <Text variant="xs" noMargin>
+ {item}
+ </Text>
+ </View>
+ </View>
+ ))
+ ) : (
+ <Text variant="xs" color="mutedForeground" noMargin>
+ —
+ </Text>
+ );
+
+ const info = [
+ { label: "Subject", value: data.subject },
+ { label: "Grade Level", value: data.gradeLevel },
+ { label: "Teacher", value: data.teacherName },
+ { label: "Duration", value: data.duration },
+ ];
+
+ const footerText = `${data.subject} · ${data.gradeLevel} · ${data.lessonTitle}`;
+
return (
- <Document title={`${data.lessonTitle} — Lesson Plan`}>
+ <Document title={`Lesson Plan — ${data.lessonTitle}`}>
<Page size="A4" style={styles.page}>
<PageHeader
+ variant="simple"
title={data.lessonTitle}
- subtitle={`${data.subject} \u2022 ${data.gradeLevel}`}
- rightText={`Teacher: ${data.teacherName}`}
- rightSubText={`Date: ${data.date}`}
- style={styles.section}
+ subtitle={data.topic ? `Lesson Plan · ${data.topic}` : "Lesson Plan"}
+ rightText={data.date}
+ marginBottom={16}
/>
- <Section spacing="none" style={{ ...styles.row, ...styles.section }}>
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Duration
- </Text>
- <Text noMargin variant="xs">
- {data.duration}
- </Text>
- </View>
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Topic
- </Text>
- <Text noMargin variant="xs">
- {data.topic}
- </Text>
- </View>
- {data.essentialQuestion ? (
- <View style={{ flex: 2 }}>
- <Section
- variant="highlight"
- accentColor={data.accentColor}
- spacing="sm"
- style={{ margin: 0 }}
- >
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Essential Question
- </Text>
- <Text noMargin variant="xs">
- {data.essentialQuestion}
- </Text>
- </Section>
+ <View style={styles.infoRow}>
+ {info.map((item) => (
+ <View key={item.label} style={styles.colQuarter}>
+ {renderLabel(item.label)}
+ <Text variant="xs" weight="medium" noMargin>
+ {item.value}
+ </Text>
</View>
- ) : null}
- </Section>
+ ))}
+ </View>
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
+ {data.essentialQuestion ? (
+ <Section
+ variant="highlight"
+ accentColor={data.accentColor}
+ spacing="none"
+ padding="sm"
+ style={styles.block}
>
- Objectives
- </Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.objectives.map((o) => ({ text: `SWBAT ${o}` }))}
- />
- </Section>
+ {renderLabel("Essential Question")}
+ <Text variant="sm" weight="medium" noMargin>
+ {data.essentialQuestion}
+ </Text>
+ </Section>
+ ) : null}
- {data.standards ? (
- <Section spacing="none" style={styles.section}>
+ <View style={{ ...styles.row, ...styles.block }}>
+ <View style={styles.colHalf}>
+ {renderLabel("Objectives")}
<Text
- style={styles.label}
+ variant="xs"
color="mutedForeground"
- transform="uppercase"
+ style={styles.intro}
noMargin
>
- Standards
+ Students will be able to (SWBAT):
</Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.standards.map((s) => ({ text: s }))}
- />
- </Section>
- ) : null}
-
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Materials
- </Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.materials.map((m) => ({ text: m }))}
- />
- </Section>
-
- <PageFooter
- leftText={`${data.subject} — ${data.lessonTitle}`}
- rightText="Page 1 of 2"
- sticky
- pagePadding={25}
- />
- </Page>
+ {renderList(data.objectives, true)}
+ </View>
+ {data.standards?.length ? (
+ <View style={styles.colQuarter}>
+ {renderLabel("Standards")}
+ {renderList(data.standards)}
+ </View>
+ ) : null}
+ <View style={styles.colQuarter}>
+ {renderLabel("Materials")}
+ {renderList(data.materials)}
+ </View>
+ </View>
- <Page size="A4" style={styles.page}>
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Lesson Sequence
- </Text>
+ <View>
+ {renderLabel("Lesson Sequence")}
<Table variant="grid" zebraStripe>
<TableHeader>
<TableRow header>
- <TableCell>Time</TableCell>
- <TableCell>Activity</TableCell>
+ <TableCell width={COLUMN_WIDTHS.time}>Time</TableCell>
+ <TableCell width={COLUMN_WIDTHS.activity}>Activity</TableCell>
<TableCell>Description</TableCell>
- <TableCell>Notes</TableCell>
+ <TableCell width={COLUMN_WIDTHS.notes}>Notes</TableCell>
</TableRow>
</TableHeader>
<TableBody>
- {data.sequence.map((item, index) => (
- // biome-ignore lint/suspicious/noArrayIndexKey: sequence items have no stable id
- <TableRow key={index}>
- <TableCell>{item.time}</TableCell>
- <TableCell>{item.activity}</TableCell>
+ {data.sequence.map((item) => (
+ <TableRow key={`${item.time}-${item.activity}`}>
+ <TableCell width={COLUMN_WIDTHS.time}>{item.time}</TableCell>
+ <TableCell width={COLUMN_WIDTHS.activity}>
+ {item.activity}
+ </TableCell>
<TableCell>{item.description}</TableCell>
- <TableCell>{item.notes ?? ""}</TableCell>
+ <TableCell width={COLUMN_WIDTHS.notes}>
+ {item.notes ?? "—"}
+ </TableCell>
</TableRow>
))}
</TableBody>
</Table>
- </Section>
+ </View>
- {data.differentiation ? (
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Differentiation
- </Text>
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.differentiation.map((d) => ({ text: d }))}
- />
- </Section>
+ <PageFooter
+ leftText={footerText}
+ rightText="Page 1 of 2"
+ sticky
+ pagePadding={25}
+ />
+ </Page>
+
+ <Page size="A4" style={styles.page}>
+ {data.differentiation?.length ? (
+ <View style={styles.block}>
+ {renderLabel("Differentiation")}
+ {renderList(data.differentiation)}
+ </View>
) : null}
- <Section
- noWrap
- spacing="none"
- style={{ ...styles.row, ...styles.section }}
- >
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Formative Assessment
- </Text>
- {data.assessment.formative ? (
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.assessment.formative.map((a) => ({ text: a }))}
- />
- ) : (
- <Text noMargin variant="xs" color="mutedForeground">
- None
- </Text>
- )}
+ <View style={{ ...styles.row, ...styles.block }}>
+ <View style={styles.colHalf}>
+ {renderLabel("Formative Assessment")}
+ {renderList(data.assessment.formative)}
</View>
- <View style={styles.col}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Summative Assessment
- </Text>
- {data.assessment.summative ? (
- <PdfList
- variant="bullet"
- gap="xs"
- items={data.assessment.summative.map((a) => ({ text: a }))}
- />
- ) : (
- <Text noMargin variant="xs" color="mutedForeground">
- None
- </Text>
- )}
+ <View style={styles.colHalf}>
+ {renderLabel("Summative Assessment")}
+ {renderList(data.assessment.summative)}
</View>
- </Section>
+ </View>
{data.homework ? (
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Homework
- </Text>
- <Text noMargin variant="xs">
+ <View style={styles.block}>
+ {renderLabel("Homework")}
+ <Text variant="xs" noMargin>
{data.homework}
</Text>
- </Section>
+ </View>
) : null}
- {data.reflection ? (
- <Section spacing="none" style={styles.section}>
- <Text
- style={styles.label}
- color="mutedForeground"
- transform="uppercase"
- noMargin
- >
- Reflection Notes
- </Text>
- <Text noMargin variant="xs">
+ <View>
+ {renderLabel("Teacher Reflection")}
+ {data.reflection ? (
+ <Text variant="xs" noMargin>
{data.reflection}
</Text>
- </Section>
- ) : null}
+ ) : null}
+ {REFLECTION_LINE_KEYS.map((key) => (
+ <View key={key} style={styles.reflectionLine} />
+ ))}
+ </View>
<PageFooter
- leftText={`${data.teacherName}`}
+ leftText={footerText}
rightText="Page 2 of 2"
sticky
pagePadding={25}
@@ -383,12 +347,13 @@ const LessonPlanContent = ({ data }: { data: LessonPlanData }) => {
export const LessonPlanDocument = ({
theme,
- data = sampleData,
+ data,
+ ...props
}: {
theme?: PdfcnTheme;
- data?: LessonPlanData;
-}) => (
+ data?: LessonPlanProps;
+} & Partial<LessonPlanProps>) => (
<PdfcnThemeProvider theme={theme}>
- <LessonPlanContent data={data} />
+ <LessonPlanContent data={{ ...sampleData, ...data, ...props }} />
</PdfcnThemeProvider>
);
diff --git a/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.types.ts b/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.types.ts
index cccc71c..d1233da 100644
--- a/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.types.ts
+++ b/apps/web/registry/bases/takumi/blocks/lesson-plan/lesson-plan.types.ts
@@ -10,14 +10,14 @@ export interface LessonPlanAssessment {
summative?: string[];
}
-export interface LessonPlanData {
+export interface LessonPlanProps {
subject: string;
gradeLevel: string;
lessonTitle: string;
date: string;
teacherName: string;
duration: string;
- topic: string;
+ topic?: string;
essentialQuestion?: string;
objectives: string[];
standards?: string[];