@thanh01.pmt/presentation-kit 0.2.16 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/index.cjs +49 -229
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +3 -2
- package/dist/ai/index.d.ts +3 -2
- package/dist/ai/index.js +2 -229
- package/dist/ai/index.js.map +1 -1
- package/dist/chunk-6R6L6KSC.cjs +601 -0
- package/dist/chunk-6R6L6KSC.cjs.map +1 -0
- package/dist/chunk-BHJXQCVE.js +588 -0
- package/dist/chunk-BHJXQCVE.js.map +1 -0
- package/dist/{click-css-CktIYP3H.d.ts → click-css-B2s9B_uP.d.ts} +2 -2
- package/dist/{click-css-Ch_jyWaw.d.cts → click-css-Bcc1CkTN.d.cts} +2 -2
- package/dist/index.cjs +45 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/{presets-Bkh6NzWf.d.cts → presets-BYvgAAkJ.d.cts} +2 -2
- package/dist/{presets-BUzebXzj.d.ts → presets-D_hfPJX9.d.ts} +2 -2
- package/dist/react/index.d.cts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/skills/index.cjs +52 -0
- package/dist/skills/index.cjs.map +1 -0
- package/dist/skills/index.d.cts +142 -0
- package/dist/skills/index.d.ts +142 -0
- package/dist/skills/index.js +3 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/{types-8AVYoEUn.d.cts → types-C3d04zzP.d.cts} +1 -1
- package/dist/{types-8AVYoEUn.d.ts → types-C3d04zzP.d.ts} +1 -1
- package/package.json +7 -1
package/dist/ai/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunk6R6L6KSC_cjs = require('../chunk-6R6L6KSC.cjs');
|
|
3
4
|
var chunkJNTRKKJX_cjs = require('../chunk-JNTRKKJX.cjs');
|
|
4
5
|
var zod = require('zod');
|
|
5
6
|
|
|
@@ -770,234 +771,6 @@ var createHtmlSlideSchema = zod.z.object({
|
|
|
770
771
|
notes: zod.z.string().optional().describe("Speaker talk track or question prompts")
|
|
771
772
|
});
|
|
772
773
|
|
|
773
|
-
// src/ai/html/prompt.ts
|
|
774
|
-
var SLIDE_HTML_PROMPT_CONTRACT = `
|
|
775
|
-
# \u{1F3A8} HTML SLIDE ENGINE \u2014 AGENT GENERATION CONTRACT
|
|
776
|
-
|
|
777
|
-
You are an expert Presentation Designer and Curriculum Architect producing professional, high-impact slide decks.
|
|
778
|
-
Instead of generating free-form HTML or brittle Markdown hacks, you MUST fill structured content into pre-tested **Layout Presets**.
|
|
779
|
-
|
|
780
|
-
## Available Layout Presets & Required Slots:
|
|
781
|
-
|
|
782
|
-
1. **hero-cover** (Cover / Title Slide)
|
|
783
|
-
- \`tag\` (string): e.g. "Unit 01 \xB7 Lesson 02"
|
|
784
|
-
- \`title\` (string): Main bold headline
|
|
785
|
-
- \`subtitle\` (string): Subtitle or 1-sentence learning objective
|
|
786
|
-
- \`author\` (string): Instructor / Organization
|
|
787
|
-
- \`date\` (string): Course term or date
|
|
788
|
-
|
|
789
|
-
2. **split-concept-code** (Theory + Code Snippet)
|
|
790
|
-
- \`tag\` (string): Section topic tag
|
|
791
|
-
- \`title\` (string): Topic heading
|
|
792
|
-
- \`points\` (string[]): 3 to 4 concise bullet takeaways
|
|
793
|
-
- \`code\` (string): Executable source code
|
|
794
|
-
- \`language\` (string): Language name (e.g. "python", "typescript", "swift")
|
|
795
|
-
- \`codeNote\` (string, optional): One-line hint or execution output
|
|
796
|
-
|
|
797
|
-
3. **two-columns-compare** (Comparison / Pros vs Cons)
|
|
798
|
-
- \`tag\` (string): Topic tag
|
|
799
|
-
- \`title\` (string): Headline
|
|
800
|
-
- \`col1Title\` (string): e.g. "Synchronous I/O"
|
|
801
|
-
- \`col1Items\` (string[]): 3 to 4 points
|
|
802
|
-
- \`col2Title\` (string): e.g. "Asynchronous I/O"
|
|
803
|
-
- \`col2Items\` (string[]): 3 to 4 points
|
|
804
|
-
|
|
805
|
-
4. **three-cards-grid** (3 Core Pillars / Architecture)
|
|
806
|
-
- \`tag\` (string): e.g. "Core Principles"
|
|
807
|
-
- \`title\` (string): Overview headline
|
|
808
|
-
- \`cards\` (array of objects): Exactly 3 cards:
|
|
809
|
-
- \`badge\`: e.g. "01", "LAYER 1"
|
|
810
|
-
- \`title\`: Card headline
|
|
811
|
-
- \`desc\`: 1-2 sentence description
|
|
812
|
-
- \`footer\` (optional): Key takeaway
|
|
813
|
-
|
|
814
|
-
5. **timeline-steps** (Algorithm / Execution Pipeline)
|
|
815
|
-
- \`tag\` (string): e.g. "Workflow"
|
|
816
|
-
- \`title\` (string): Headline
|
|
817
|
-
- \`steps\` (array of objects): 3 to 5 steps:
|
|
818
|
-
- \`stepNum\` (number/string): 1, 2, 3...
|
|
819
|
-
- \`title\`: Step name
|
|
820
|
-
- \`desc\`: What happens at this step
|
|
821
|
-
|
|
822
|
-
6. **metric-callout** (Key Theorem / Benchmark Statistic)
|
|
823
|
-
- \`tag\` (string): e.g. "Time Complexity"
|
|
824
|
-
- \`metric\` (string): Big stat (e.g. "O(log N)", "99.99%", "10x")
|
|
825
|
-
- \`metricLabel\` (string): e.g. "Lookup Efficiency"
|
|
826
|
-
- \`title\` (string): Main takeaway
|
|
827
|
-
- \`desc\` (string): Contextual explanation
|
|
828
|
-
|
|
829
|
-
7. **checkpoint-quiz** (Interactive Checkpoint)
|
|
830
|
-
- \`tag\` (string): e.g. "Quick Knowledge Check"
|
|
831
|
-
- \`question\` (string): Clear question prompt
|
|
832
|
-
- \`options\` (array of objects): 2 to 4 options:
|
|
833
|
-
- \`label\`: "A", "B", "C", "D"
|
|
834
|
-
- \`text\`: Option text
|
|
835
|
-
- \`explanation\` (string): Explanatory rationale
|
|
836
|
-
|
|
837
|
-
8. **summary-takeaways** (Wrap-Up / Next Steps)
|
|
838
|
-
- \`tag\` (string): e.g. "Recap"
|
|
839
|
-
- \`title\` (string): Wrap-up headline
|
|
840
|
-
- \`takeaways\` (string[]): 3 to 4 memorable bullet points
|
|
841
|
-
- \`nextStep\` (string): Teaser for the next lesson or project
|
|
842
|
-
|
|
843
|
-
## Aesthetic & Quality Invariants ("Anti-AI-Slop"):
|
|
844
|
-
- **Brevity is King (Zero-Scroll Invariant):** Each slide is calibrated for a 1920\xD71080 canvas. Maximum **35\u201340 words** per card or column; maximum **15 words** per bullet item. Never write dense multi-sentence paragraphs that cause vertical scrolling.
|
|
845
|
-
- **Pedagogical Pacing:** Start with \`hero-cover\`, alternate between \`split-concept-code\`, \`two-columns-compare\` and \`three-cards-grid\`, insert a \`checkpoint-quiz\` midway, and finish with \`summary-takeaways\`.
|
|
846
|
-
- **Theme Selection:**
|
|
847
|
-
- \`blue-professional\`: General academic, clean engineering, trustworthy.
|
|
848
|
-
- \`cobalt-grid\`: Advanced tech, algorithms, robotics, cybersecurity.
|
|
849
|
-
- \`editorial-forest\`: Thoughtful design, literature, ethics, science.
|
|
850
|
-
- \`studio\`: Minimalist product design, modern software.
|
|
851
|
-
- \`monochrome\`: Pure high-contrast dark mode.
|
|
852
|
-
|
|
853
|
-
## \u{1FA84} Step Reveal & Progressive Disclosure:
|
|
854
|
-
- The presentation shell supports sequential step reveal via mouse click or Space/Arrow keys.
|
|
855
|
-
- Bullet lists (\`points\`, \`col1Items\`, \`col2Items\`), cards in \`three-cards-grid\`, and steps in \`timeline-steps\` reveal progressively one by one before navigating to the next slide.
|
|
856
|
-
- In custom HTML slots, you can attach \`class="step-reveal"\`, \`data-step\`, \`data-reveal\`, or \`data-auto-reveal="true"\` on parent containers to enable click-by-click stepped appearance.
|
|
857
|
-
|
|
858
|
-
## \u{1F399}\uFE0F Mandatory 3-Part Presenter Notes Contract:
|
|
859
|
-
Every single slide MUST include the \`notes\` property structured with these 3 explicit components:
|
|
860
|
-
1. **Talk Track:** 2-3 sentences of exact conversational speaking script for the teacher/presenter.
|
|
861
|
-
2. **Cold-Call Check Question:** 1 diagnostic question to check understanding with a named student or attendee.
|
|
862
|
-
3. **Scaffolding Tip:** 1 intuitive analogy or troubleshooting hint in case learners struggle with the concept.
|
|
863
|
-
|
|
864
|
-
Example Notes:
|
|
865
|
-
\`\`\`markdown
|
|
866
|
-
Talk Track: Here we contrast synchronous blocking I/O with asynchronous event-driven handling. Notice how threads remain idle while waiting for network responses.
|
|
867
|
-
Cold-Call: "Jordan, looking at the left column, what happens to thread pool throughput when network latency quadruples?"
|
|
868
|
-
Scaffolding Tip: Compare it to ordering coffee at a counter (async buzzer) versus waiting at the register until the cup is brewed (sync blocking).
|
|
869
|
-
\`\`\`
|
|
870
|
-
|
|
871
|
-
## \u{1F9F1} MANDATORY JSON DECK OUTPUT STRUCTURE & SCHEMA:
|
|
872
|
-
You MUST output a single valid JSON object.
|
|
873
|
-
CRITICAL: All layout data MUST be placed inside the \`slots\` object of each slide. Never put raw unstructured strings like \`content: "..."\`!
|
|
874
|
-
|
|
875
|
-
\`\`\`json
|
|
876
|
-
{
|
|
877
|
-
"title": "Full Lesson Presentation Title",
|
|
878
|
-
"theme": "blue-professional",
|
|
879
|
-
"slides": [
|
|
880
|
-
{
|
|
881
|
-
"id": 1,
|
|
882
|
-
"layoutId": "hero-cover",
|
|
883
|
-
"slots": {
|
|
884
|
-
"tag": "Unit 01 \xB7 Lesson 01",
|
|
885
|
-
"title": "macOS & Xcode Environment Setup",
|
|
886
|
-
"subtitle": "Master the Apple developer toolchain and build your first SwiftUI application lifecycle",
|
|
887
|
-
"author": "Curriculum OS",
|
|
888
|
-
"date": "2026"
|
|
889
|
-
},
|
|
890
|
-
"notes": "Talk Track: Welcome everyone. Today we establish our core iOS development environment...\\nCold-Call: 'Alex, why do we need Xcode Command Line Tools?'\\nScaffolding Tip: Think of Xcode as the full workshop and the SDK as the raw materials."
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
"id": 2,
|
|
894
|
-
"layoutId": "split-concept-code",
|
|
895
|
-
"slots": {
|
|
896
|
-
"tag": "Architecture & Syntax",
|
|
897
|
-
"title": "SwiftUI App Entry Point",
|
|
898
|
-
"points": [
|
|
899
|
-
"@main attribute designates the entry point of the app",
|
|
900
|
-
"App protocol defines the structure and scene hierarchy",
|
|
901
|
-
"WindowGroup manages the root view lifecycle across platforms"
|
|
902
|
-
],
|
|
903
|
-
"code": "import SwiftUI\\n\\n@main\\nstruct MyApp: App {\\n var body: some Scene {\\n WindowGroup {\\n ContentView()\\n }\\n }\\n}",
|
|
904
|
-
"language": "swift",
|
|
905
|
-
"codeNote": "Notice how Scene encapsulates WindowGroup automatically"
|
|
906
|
-
},
|
|
907
|
-
"notes": "Talk Track: ...\\nCold-Call: ...\\nScaffolding Tip: ..."
|
|
908
|
-
},
|
|
909
|
-
{
|
|
910
|
-
"id": 3,
|
|
911
|
-
"layoutId": "three-cards-grid",
|
|
912
|
-
"slots": {
|
|
913
|
-
"tag": "Core Pillars",
|
|
914
|
-
"title": "Three Pillars of App State",
|
|
915
|
-
"cards": [
|
|
916
|
-
{ "badge": "01", "title": "Active State", "desc": "App is in foreground and responding to user events directly." },
|
|
917
|
-
{ "badge": "02", "title": "Inactive State", "desc": "App is transitioning, interrupted by system dialogs or Control Center." },
|
|
918
|
-
{ "badge": "03", "title": "Background State", "desc": "Executing background tasks or preparing for memory suspension." }
|
|
919
|
-
]
|
|
920
|
-
},
|
|
921
|
-
"notes": "Talk Track: ...\\nCold-Call: ...\\nScaffolding Tip: ..."
|
|
922
|
-
},
|
|
923
|
-
{
|
|
924
|
-
"id": 4,
|
|
925
|
-
"layoutId": "timeline-steps",
|
|
926
|
-
"slots": {
|
|
927
|
-
"tag": "Step-by-Step",
|
|
928
|
-
"title": "Xcode Setup Workflow",
|
|
929
|
-
"steps": [
|
|
930
|
-
{ "stepNum": 1, "title": "Download Xcode", "desc": "Install latest Xcode from the Mac App Store" },
|
|
931
|
-
{ "stepNum": 2, "title": "Command Line Tools", "desc": "Run xcode-select --install in Terminal" },
|
|
932
|
-
{ "stepNum": 3, "title": "Select Simulators", "desc": "Download iOS 18+ runtime simulators" },
|
|
933
|
-
{ "stepNum": 4, "title": "Verify Build", "desc": "Create a new SwiftUI project and press Cmd+R" }
|
|
934
|
-
]
|
|
935
|
-
},
|
|
936
|
-
"notes": "Talk Track: ...\\nCold-Call: ...\\nScaffolding Tip: ..."
|
|
937
|
-
},
|
|
938
|
-
{
|
|
939
|
-
"id": 5,
|
|
940
|
-
"layoutId": "two-columns-compare",
|
|
941
|
-
"slots": {
|
|
942
|
-
"tag": "Comparison",
|
|
943
|
-
"title": "SwiftUI vs UIKit Architecture",
|
|
944
|
-
"col1Title": "SwiftUI (Declarative)",
|
|
945
|
-
"col1Items": [
|
|
946
|
-
"State drives the UI automatically",
|
|
947
|
-
"Lightweight immutable structs",
|
|
948
|
-
"Cross-platform unified API"
|
|
949
|
-
],
|
|
950
|
-
"col2Title": "UIKit (Imperative)",
|
|
951
|
-
"col2Items": [
|
|
952
|
-
"Manual view controller manipulation",
|
|
953
|
-
"Heavyweight class hierarchies",
|
|
954
|
-
"Explicit event-driven updates"
|
|
955
|
-
]
|
|
956
|
-
},
|
|
957
|
-
"notes": "Talk Track: ...\\nCold-Call: ...\\nScaffolding Tip: ..."
|
|
958
|
-
},
|
|
959
|
-
{
|
|
960
|
-
"id": 6,
|
|
961
|
-
"layoutId": "checkpoint-quiz",
|
|
962
|
-
"slots": {
|
|
963
|
-
"tag": "Knowledge Check",
|
|
964
|
-
"question": "Which SwiftUI modifier is used to observe external observable state objects?",
|
|
965
|
-
"options": [
|
|
966
|
-
{ "label": "A", "text": "@State" },
|
|
967
|
-
{ "label": "B", "text": "@StateObject / @ObservedObject" },
|
|
968
|
-
{ "label": "C", "text": "@Binding" },
|
|
969
|
-
{ "label": "D", "text": "@Environment" }
|
|
970
|
-
],
|
|
971
|
-
"explanation": "@StateObject manages the lifecycle of reference-type ObservableObjects, while @State is for value types."
|
|
972
|
-
},
|
|
973
|
-
"notes": "Talk Track: ...\\nCold-Call: ...\\nScaffolding Tip: ..."
|
|
974
|
-
},
|
|
975
|
-
{
|
|
976
|
-
"id": 7,
|
|
977
|
-
"layoutId": "summary-takeaways",
|
|
978
|
-
"slots": {
|
|
979
|
-
"tag": "Recap & Next",
|
|
980
|
-
"title": "Lesson Summary & Key Takeaways",
|
|
981
|
-
"takeaways": [
|
|
982
|
-
"Configured complete developer toolchain with Xcode 16+",
|
|
983
|
-
"Understood SwiftUI declarative lifecycle and @main entry point",
|
|
984
|
-
"Mastered App State transitions between active, inactive, and background"
|
|
985
|
-
],
|
|
986
|
-
"nextStep": "Lesson 02: State Management & Reactive Data Flow with @State and @Binding"
|
|
987
|
-
},
|
|
988
|
-
"notes": "Talk Track: ...\\nCold-Call: ...\\nScaffolding Tip: ..."
|
|
989
|
-
}
|
|
990
|
-
]
|
|
991
|
-
}
|
|
992
|
-
\`\`\`
|
|
993
|
-
|
|
994
|
-
## \u{1F6AB} STRICT ANTI-SLOP CONSTRAINTS:
|
|
995
|
-
1. NEVER output a raw unstructured string like \`content: "..."\` or \`content: "Concept: ... Code snippet: ..."\`. All slide content MUST be placed inside the \`slots\` object with its specific keys (\`points\`, \`code\`, \`cards\`, \`steps\`, \`options\`, \`takeaways\`).
|
|
996
|
-
2. NEVER use ellipsis \`...\` or placeholder comments in \`code\`. Every code snippet MUST be real, fully typed, syntax-valid, and pedagogical.
|
|
997
|
-
3. NEVER leave \`slots\` empty \`{}\`.
|
|
998
|
-
4. Output 6 to 8 substantive, rich slides covering the lesson plan thoroughly.
|
|
999
|
-
`;
|
|
1000
|
-
|
|
1001
774
|
// src/ai/html/tools.ts
|
|
1002
775
|
function handleListHtmlSlidePresets(input) {
|
|
1003
776
|
const category = input.category || "all";
|
|
@@ -1058,8 +831,55 @@ var executeListHtmlSlidePresets = handleListHtmlSlidePresets;
|
|
|
1058
831
|
var executeGenerateHtmlDeck = handleGenerateHtmlDeck;
|
|
1059
832
|
var executeCreateHtmlSlide = handleCreateHtmlSlide;
|
|
1060
833
|
|
|
834
|
+
Object.defineProperty(exports, "FRONTEND_SLIDES_CORE_RULES", {
|
|
835
|
+
enumerable: true,
|
|
836
|
+
get: function () { return chunk6R6L6KSC_cjs.FRONTEND_SLIDES_CORE_RULES; }
|
|
837
|
+
});
|
|
838
|
+
Object.defineProperty(exports, "SLIDE_HTML_PROMPT_CONTRACT", {
|
|
839
|
+
enumerable: true,
|
|
840
|
+
get: function () { return chunk6R6L6KSC_cjs.SLIDE_HTML_PROMPT_CONTRACT; }
|
|
841
|
+
});
|
|
842
|
+
Object.defineProperty(exports, "STYLE_PRESETS", {
|
|
843
|
+
enumerable: true,
|
|
844
|
+
get: function () { return chunk6R6L6KSC_cjs.STYLE_PRESETS; }
|
|
845
|
+
});
|
|
846
|
+
Object.defineProperty(exports, "TEMPLATES_CATALOG", {
|
|
847
|
+
enumerable: true,
|
|
848
|
+
get: function () { return chunk6R6L6KSC_cjs.TEMPLATES_CATALOG; }
|
|
849
|
+
});
|
|
850
|
+
Object.defineProperty(exports, "VIEWPORT_BASE_CSS", {
|
|
851
|
+
enumerable: true,
|
|
852
|
+
get: function () { return chunk6R6L6KSC_cjs.VIEWPORT_BASE_CSS; }
|
|
853
|
+
});
|
|
854
|
+
Object.defineProperty(exports, "frontendSlidesTools", {
|
|
855
|
+
enumerable: true,
|
|
856
|
+
get: function () { return chunk6R6L6KSC_cjs.frontendSlidesTools; }
|
|
857
|
+
});
|
|
858
|
+
Object.defineProperty(exports, "getFrontendSlidesSkillPrompt", {
|
|
859
|
+
enumerable: true,
|
|
860
|
+
get: function () { return chunk6R6L6KSC_cjs.getFrontendSlidesSkillPrompt; }
|
|
861
|
+
});
|
|
862
|
+
Object.defineProperty(exports, "getSlideStylePresetSchema", {
|
|
863
|
+
enumerable: true,
|
|
864
|
+
get: function () { return chunk6R6L6KSC_cjs.getSlideStylePresetSchema; }
|
|
865
|
+
});
|
|
866
|
+
Object.defineProperty(exports, "getStylePreset", {
|
|
867
|
+
enumerable: true,
|
|
868
|
+
get: function () { return chunk6R6L6KSC_cjs.getStylePreset; }
|
|
869
|
+
});
|
|
870
|
+
Object.defineProperty(exports, "getTemplatesCatalog", {
|
|
871
|
+
enumerable: true,
|
|
872
|
+
get: function () { return chunk6R6L6KSC_cjs.getTemplatesCatalog; }
|
|
873
|
+
});
|
|
874
|
+
Object.defineProperty(exports, "querySlideTemplatesSchema", {
|
|
875
|
+
enumerable: true,
|
|
876
|
+
get: function () { return chunk6R6L6KSC_cjs.querySlideTemplatesSchema; }
|
|
877
|
+
});
|
|
878
|
+
Object.defineProperty(exports, "searchTemplates", {
|
|
879
|
+
enumerable: true,
|
|
880
|
+
get: function () { return chunk6R6L6KSC_cjs.searchTemplates; }
|
|
881
|
+
});
|
|
1061
882
|
exports.SLIDE_DESIGN_PROMPT_CONTRACT = SLIDE_DESIGN_PROMPT_CONTRACT;
|
|
1062
|
-
exports.SLIDE_HTML_PROMPT_CONTRACT = SLIDE_HTML_PROMPT_CONTRACT;
|
|
1063
883
|
exports.applySlideLayoutSchema = applySlideLayoutSchema;
|
|
1064
884
|
exports.createHtmlSlideSchema = createHtmlSlideSchema;
|
|
1065
885
|
exports.createSlideFromPresetSchema = createSlideFromPresetSchema;
|