@almadar/shell-web 0.0.0-stage → 1.0.0
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/bundling.d.mts +18 -0
- package/bundling.mjs +28 -0
- package/dist/ArbitraryClassCompiler-CO_iASBn.d.ts +195 -0
- package/dist/AvlGlyph-EPJKFEO3.js +6 -0
- package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
- package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
- package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
- package/dist/BehaviorView-YS5G4GNB.js +11 -0
- package/dist/Canvas3DHost-BkZQB5l2.d.ts +552 -0
- package/dist/EventBusProvider-BFFHfN4O.d.ts +296 -0
- package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
- package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
- package/dist/FlowCanvas-AUMTWMNG.js +26 -0
- package/dist/GameAudioProvider-ceM_n0ey.d.ts +90 -0
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/KernelEngineContext-CcxGYtlr.d.ts +33 -0
- package/dist/LayersPanel-M2LHWUFF.js +6 -0
- package/dist/ModuleCard-QHDGK5XK.js +7 -0
- package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
- package/dist/OrbInspector-QCPEPUPH.js +26 -0
- package/dist/Select-B-iDdnvE.d.ts +185 -0
- package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
- package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
- package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
- package/dist/UISlotRenderer-C7WWOK43.js +26 -0
- package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
- package/dist/auth/browser/index.d.ts +2 -0
- package/dist/auth/browser/index.js +2 -0
- package/dist/auth/react/index.d.ts +56 -0
- package/dist/auth/react/index.js +157 -0
- package/dist/avl/index.css +1756 -0
- package/dist/avl/index.d.ts +2248 -0
- package/dist/avl/index.js +2693 -0
- package/dist/avl-3d-context-BycmO6tG.d.ts +201 -0
- package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
- package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
- package/dist/chunk-3BBUBJFF.js +339 -0
- package/dist/chunk-3S54FWRC.js +131 -0
- package/dist/chunk-3VZ36ZKO.js +775 -0
- package/dist/chunk-4T3P43NS.js +1133 -0
- package/dist/chunk-4YXBKHHM.js +11488 -0
- package/dist/chunk-57DC34LY.js +525 -0
- package/dist/chunk-5QTYQTPS.js +15 -0
- package/dist/chunk-A2LR6VQQ.js +349 -0
- package/dist/chunk-AB3X7QTE.js +505 -0
- package/dist/chunk-AE7VCQB6.js +561 -0
- package/dist/chunk-AGXD77SL.js +98 -0
- package/dist/chunk-AU7O65OX.js +66 -0
- package/dist/chunk-CPLN6NBQ.js +701 -0
- package/dist/chunk-DZBQA2OW.js +176 -0
- package/dist/chunk-E6KA4J6N.js +227 -0
- package/dist/chunk-EOWMARUB.js +16 -0
- package/dist/chunk-G7DCAZ22.js +19 -0
- package/dist/chunk-GFXCPUMX.js +1334 -0
- package/dist/chunk-HH5KSMH5.js +311 -0
- package/dist/chunk-ILQXJ2AR.js +280 -0
- package/dist/chunk-ILZ7ORX7.js +432 -0
- package/dist/chunk-K4MOPSEL.js +674 -0
- package/dist/chunk-LHP2TK7O.js +47587 -0
- package/dist/chunk-P4ZFUQFF.js +93 -0
- package/dist/chunk-PCR37T3U.js +296 -0
- package/dist/chunk-PRXQGGCO.js +580 -0
- package/dist/chunk-REXYVBUO.js +191 -0
- package/dist/chunk-ROICKAU7.js +24 -0
- package/dist/chunk-SP5CDJ6K.js +338 -0
- package/dist/chunk-TUPZWTRE.js +1051 -0
- package/dist/chunk-TXAUOLWZ.js +490 -0
- package/dist/chunk-TZZBINQY.js +82 -0
- package/dist/chunk-UTDC2NEA.js +14 -0
- package/dist/chunk-UU57VNS2.js +1053 -0
- package/dist/chunk-UXLE3IPR.js +421 -0
- package/dist/chunk-VO2TTLS5.js +94 -0
- package/dist/chunk-X3DMMX27.js +11 -0
- package/dist/chunk-YHMRX6YA.js +455 -0
- package/dist/components/index.css +1756 -0
- package/dist/components/index.d.ts +11299 -0
- package/dist/components/index.js +1110 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.js +8 -0
- package/dist/core.d.ts +2599 -0
- package/dist/core.js +3 -0
- package/dist/design-classes/index.cjs +431 -0
- package/dist/design-classes/index.d.cts +165 -0
- package/dist/design-classes/index.d.ts +165 -0
- package/dist/design-classes/index.js +399 -0
- package/dist/emojiItems-QGSNAABW.js +20 -0
- package/dist/fx-CmQjnHmT.d.ts +371 -0
- package/dist/hooks/index.d.ts +971 -0
- package/dist/hooks/index.js +8 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +178 -0
- package/dist/katexPlugin-FA7NX4PE.css +1161 -0
- package/dist/katexPlugin-NCDKOOQY.js +2 -0
- package/dist/kernel-client-TZKGHJRY.js +516 -0
- package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
- package/dist/lib/index.d.ts +602 -0
- package/dist/lib/index.js +1289 -0
- package/dist/paintDispatch-CuJLsr9Y.d.ts +688 -0
- package/dist/parseLessonSegments-GpCeMrb2.d.ts +334 -0
- package/dist/perf-CKiBKbkw.d.ts +22 -0
- package/dist/perf-Dr28-AgT.d.ts +57 -0
- package/dist/prism-X5YWKXO5.js +136 -0
- package/dist/providers/index.css +1756 -0
- package/dist/providers/index.d.ts +355 -0
- package/dist/providers/index.js +29 -0
- package/dist/renderer/index.d.ts +465 -0
- package/dist/renderer/index.js +4 -0
- package/dist/runtime/index.css +1756 -0
- package/dist/runtime/index.d.ts +239 -0
- package/dist/runtime/index.js +28 -0
- package/dist/slot-host-CPzrxLo9.d.ts +48 -0
- package/dist/ssr/index.cjs +9739 -0
- package/dist/ssr/index.d.cts +464 -0
- package/dist/ssr/index.d.ts +464 -0
- package/dist/ssr/index.js +9703 -0
- package/dist/storage/browser/index.d.ts +1 -0
- package/dist/storage/browser/index.js +2 -0
- package/dist/test-support.d.ts +42 -0
- package/dist/test-support.js +181 -0
- package/dist/themeTokens-CRd8AEDF.d.ts +125 -0
- package/dist/three/index.css +503 -0
- package/dist/three/index.d.ts +1185 -0
- package/dist/three/index.js +3908 -0
- package/dist/useUISlots-CiobNFGb.d.ts +211 -0
- package/dist/verification-C5pTeMJv.d.ts +66 -0
- package/dist/verificationRegistry-CVrcxG1s.d.ts +122 -0
- package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
- package/index.css +199 -0
- package/package.json +273 -3
- package/src/core/lib/band-shapes.json +7 -0
- package/src/core/locales/ar.json +1276 -0
- package/src/core/locales/en.json +1276 -0
- package/src/core/locales/index.ts +54 -0
- package/src/core/locales/sl.json +1276 -0
- package/src/core/tokens/native-tokens.json +369 -0
- package/tailwind-compile.cjs +29 -0
- package/tailwind-preset.cjs +1020 -0
- package/themes/_base.css +451 -0
- package/themes/_contract.md +307 -0
- package/themes/_fonts-kenney.css +11 -0
- package/themes/_fonts.css +12 -0
- package/themes/_foundation.css +105 -0
- package/themes/_head.css +22 -0
- package/themes/_presets.css +67 -0
- package/themes/almadar-heritage.css +455 -0
- package/themes/almadar-website.css +269 -0
- package/themes/almadar.css +269 -0
- package/themes/aqua.css +455 -0
- package/themes/arabesque.css +459 -0
- package/themes/art-deco.css +457 -0
- package/themes/art-nouveau.css +459 -0
- package/themes/atelier.css +463 -0
- package/themes/bauhaus.css +461 -0
- package/themes/bloomberg-dense.css +463 -0
- package/themes/blueprint.css +457 -0
- package/themes/clay.css +449 -0
- package/themes/comic.css +453 -0
- package/themes/constructivist.css +457 -0
- package/themes/corporate.css +449 -0
- package/themes/cyberpunk.css +453 -0
- package/themes/frutiger-aero.css +458 -0
- package/themes/game-adventure.css +201 -0
- package/themes/game-rpg.css +203 -0
- package/themes/game-sci-fi.css +201 -0
- package/themes/game-ui-pack.css +200 -0
- package/themes/gazette.css +449 -0
- package/themes/glass.css +457 -0
- package/themes/gothic.css +453 -0
- package/themes/index.css +21 -0
- package/themes/ink-wash.css +459 -0
- package/themes/kawaii.css +459 -0
- package/themes/kflow.css +310 -0
- package/themes/kiosk.css +449 -0
- package/themes/linear-clean.css +463 -0
- package/themes/luxury.css +451 -0
- package/themes/mac-classic.css +455 -0
- package/themes/material.css +463 -0
- package/themes/memphis.css +453 -0
- package/themes/mid-century.css +455 -0
- package/themes/minimalist.css +449 -0
- package/themes/mudcloth.css +459 -0
- package/themes/nata.css +310 -0
- package/themes/neon.css +453 -0
- package/themes/neumorphic.css +451 -0
- package/themes/newsprint.css +455 -0
- package/themes/notion-editorial.css +463 -0
- package/themes/orb.css +465 -0
- package/themes/pixel.css +449 -0
- package/themes/prism.css +309 -0
- package/themes/rawi.css +310 -0
- package/themes/retro.css +452 -0
- package/themes/risograph.css +463 -0
- package/themes/scandi.css +469 -0
- package/themes/sketch.css +455 -0
- package/themes/solarpunk.css +469 -0
- package/themes/steampunk.css +451 -0
- package/themes/swiss.css +455 -0
- package/themes/terminal.css +466 -0
- package/themes/trait-wars.css +487 -0
- package/themes/ukiyo-e.css +459 -0
- package/themes/vaporwave.css +455 -0
- package/themes/victorian.css +453 -0
- package/themes/wabi-sabi.css +459 -0
- package/themes/win95.css +455 -0
- package/themes/wireframe.css +439 -0
- package/themes/zine.css +455 -0
- package/README.md +0 -3
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { OrbitalSchema, A11yProps, EventEmit } from '@almadar/core';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type AnnotationKind = 'question' | 'note';
|
|
5
|
+
interface ContentAnnotation {
|
|
6
|
+
/** Unique id, echoed in the click event payload */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Exact passage to highlight (first occurrence in the rendered text) */
|
|
9
|
+
text: string;
|
|
10
|
+
/** Highlight colour: `question` or `note` */
|
|
11
|
+
kind: AnnotationKind;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Pure vim-flavored editor motion module. No DOM — `CodeBlock.tsx` drives a
|
|
16
|
+
* real `<textarea>` selection through this (Almadar Studio V4 §14 plan, P1
|
|
17
|
+
* E2); this module only computes offsets and text.
|
|
18
|
+
*
|
|
19
|
+
* Caret convention: an integer offset in `[0, text.length]`, a gap position
|
|
20
|
+
* (matches `textarea.selectionStart`) — except `word-end`, `line-end` and
|
|
21
|
+
* `match-bracket`, which land ON the index of their target character (vim's
|
|
22
|
+
* `e`/`$`/`%` block-cursor convention), so `motionRange` widens those by one
|
|
23
|
+
* to make an operator's range inclusive of that char.
|
|
24
|
+
*
|
|
25
|
+
* `EDITOR_MOTIONS` / `EDITOR_OPERATORS` are the single source of truth for
|
|
26
|
+
* the closed vocabularies — `CodeBlock.tsx`'s `motions`/`operators` prop
|
|
27
|
+
* defaults must list the same members (kept as JSON literals there for the
|
|
28
|
+
* pattern-registry parser; `test/CodeBlock.editable.test.tsx` asserts they
|
|
29
|
+
* stay in sync).
|
|
30
|
+
*/
|
|
31
|
+
declare const EDITOR_MOTIONS: readonly ["left", "right", "up", "down", "word-forward", "word-back", "word-end", "line-start", "line-end", "first-nonblank", "doc-start", "doc-end", "paragraph-forward", "paragraph-back", "line", "selection", "match-bracket"];
|
|
32
|
+
type EditorMotion = (typeof EDITOR_MOTIONS)[number];
|
|
33
|
+
declare const EDITOR_OPERATORS: readonly ["delete", "yank", "change", "put", "put-before", "undo", "redo", "join", "toggle-case", "indent", "dedent", "replace"];
|
|
34
|
+
type EditorOperator = (typeof EDITOR_OPERATORS)[number];
|
|
35
|
+
declare function isEditorMotion(value: string): value is EditorMotion;
|
|
36
|
+
declare function isEditorOperator(value: string): value is EditorOperator;
|
|
37
|
+
/** Fixed indent unit for the `indent`/`dedent` operators (two spaces). */
|
|
38
|
+
declare const INDENT_UNIT = " ";
|
|
39
|
+
/** New caret offset after applying `motion` `count` times. `line`/`selection` are range-only — caret is unchanged. */
|
|
40
|
+
declare function applyMotion(text: string, caret: number, motion: EditorMotion, count: number): number;
|
|
41
|
+
/** The `[start, end)` range an operator acts on for `motion`. */
|
|
42
|
+
declare function motionRange(text: string, caret: number, motion: EditorMotion, count: number, selection?: [number, number]): [number, number];
|
|
43
|
+
interface ApplyOperatorInput {
|
|
44
|
+
text: string;
|
|
45
|
+
/** `textarea.selectionStart` at the time the operator fired — the anchor for caret-based operators (put/put-before/join) that don't act over `range`. */
|
|
46
|
+
caret: number;
|
|
47
|
+
/** The `[start, end)` range from `motionRange` — the anchor for range-based operators (delete/yank/change/toggle-case/indent/dedent/replace). */
|
|
48
|
+
range: [number, number];
|
|
49
|
+
operator: EditorOperator;
|
|
50
|
+
/** The motion paired with this operator. `change` special-cases `line`; delete/yank/change use it to set the returned `registerLinewise`. */
|
|
51
|
+
motion: EditorMotion;
|
|
52
|
+
count: number;
|
|
53
|
+
register: string;
|
|
54
|
+
registerLinewise: boolean;
|
|
55
|
+
}
|
|
56
|
+
interface ApplyOperatorResult {
|
|
57
|
+
text: string;
|
|
58
|
+
caret: number;
|
|
59
|
+
register: string;
|
|
60
|
+
registerLinewise: boolean;
|
|
61
|
+
}
|
|
62
|
+
/** Apply `operator`. `undo`/`redo` never reach here — they're history-stack operations handled by `useEditorCapabilities`. */
|
|
63
|
+
declare function applyOperator(input: ApplyOperatorInput): ApplyOperatorResult;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Content Segment Parsing Utilities
|
|
67
|
+
*
|
|
68
|
+
* Parses rich content with code blocks and quiz tags into structured
|
|
69
|
+
* segments for rendering. Detects orbital schemas in JSON code blocks
|
|
70
|
+
* and marks them for JazariStateMachine rendering.
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/** Segment types for content rendering */
|
|
74
|
+
type ContentSegment = {
|
|
75
|
+
type: 'markdown';
|
|
76
|
+
content: string;
|
|
77
|
+
} | {
|
|
78
|
+
type: 'code';
|
|
79
|
+
language: string;
|
|
80
|
+
content: string;
|
|
81
|
+
} | {
|
|
82
|
+
type: 'orbital';
|
|
83
|
+
language: string;
|
|
84
|
+
content: string;
|
|
85
|
+
schema: OrbitalSchema;
|
|
86
|
+
} | {
|
|
87
|
+
type: 'quiz';
|
|
88
|
+
question: string;
|
|
89
|
+
answer: string;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Parse markdown content to extract code blocks.
|
|
93
|
+
*
|
|
94
|
+
* Splits markdown into segments of plain markdown and fenced code blocks.
|
|
95
|
+
* JSON/orb code blocks containing orbital schemas are tagged as 'orbital'.
|
|
96
|
+
*/
|
|
97
|
+
declare function parseMarkdownWithCodeBlocks(content: string | undefined | null): ContentSegment[];
|
|
98
|
+
/**
|
|
99
|
+
* Parse content to extract all segments including quiz tags and code blocks.
|
|
100
|
+
*
|
|
101
|
+
* Supported tags:
|
|
102
|
+
* - <question>q</question><answer>a</answer> — Quiz Q&A
|
|
103
|
+
*
|
|
104
|
+
* Also handles fenced code blocks (```language...```) with orbital detection.
|
|
105
|
+
*/
|
|
106
|
+
declare function parseContentSegments(content: string | undefined | null): ContentSegment[];
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* BloomQuizBlock Molecule Component
|
|
110
|
+
*
|
|
111
|
+
* Practice Q&A with Bloom's Taxonomy level badge. Emits `UI:ANSWER_BLOOM { index, level }`.
|
|
112
|
+
*
|
|
113
|
+
* Event Contract:
|
|
114
|
+
* - Emits: UI:ANSWER_BLOOM { index, level }
|
|
115
|
+
* - entityAware: false
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
type BloomLevel = 'remember' | 'understand' | 'apply' | 'analyze' | 'evaluate' | 'create';
|
|
119
|
+
interface BloomQuizBlockProps extends A11yProps {
|
|
120
|
+
level: BloomLevel;
|
|
121
|
+
question: string;
|
|
122
|
+
answer: string;
|
|
123
|
+
/** Zero-based index (used in the emitted event payload) */
|
|
124
|
+
index?: number;
|
|
125
|
+
/** Whether the learner has already answered */
|
|
126
|
+
isAnswered?: boolean;
|
|
127
|
+
/** Event name emitted on first reveal (as `UI:<answerEvent>`). Defaults to 'ANSWER_BLOOM'. */
|
|
128
|
+
answerEvent?: string;
|
|
129
|
+
/** Additional CSS classes */
|
|
130
|
+
className?: string;
|
|
131
|
+
}
|
|
132
|
+
declare const BloomQuizBlock: React__default.FC<BloomQuizBlockProps>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* CodeRunnerPanel Organism Component
|
|
136
|
+
*
|
|
137
|
+
* Editable code block with Run/Reset buttons and a terminal output pane.
|
|
138
|
+
* Running is the program's job: Run emits the declared `runEvent` request and the
|
|
139
|
+
* program binds the result back through `output` / `running` / `error`.
|
|
140
|
+
*
|
|
141
|
+
* Event Contract:
|
|
142
|
+
* - Emits: UI:<runEvent> { code, language, runId? } on Run
|
|
143
|
+
* - Emits: UI:<resetEvent> { runId? } on Reset (when declared)
|
|
144
|
+
* - Emits: UI:COPY_CODE { language, success } on Copy
|
|
145
|
+
* - entityAware: false
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
interface CodeSimulationOutput {
|
|
149
|
+
stdout: string;
|
|
150
|
+
stderr: string;
|
|
151
|
+
exitCode: number;
|
|
152
|
+
testResults: Array<{
|
|
153
|
+
input: string;
|
|
154
|
+
expectedOutput: string;
|
|
155
|
+
actualOutput: string;
|
|
156
|
+
passed: boolean;
|
|
157
|
+
}>;
|
|
158
|
+
}
|
|
159
|
+
interface CodeRunnerPanelProps extends Omit<React__default.AriaAttributes, keyof A11yProps>, A11yProps {
|
|
160
|
+
/** Initial code content */
|
|
161
|
+
code: string;
|
|
162
|
+
/** Programming language for syntax highlighting */
|
|
163
|
+
language: string;
|
|
164
|
+
/** Whether the panel is editable and runnable (default false = read-only code block) */
|
|
165
|
+
runnable?: boolean;
|
|
166
|
+
/** Event emitted on Run as `UI:<runEvent>` with `{ code, language, runId }`. Defaults to 'RUN_CODE'. */
|
|
167
|
+
runEvent?: EventEmit<{
|
|
168
|
+
code: string;
|
|
169
|
+
language: string;
|
|
170
|
+
runId: string;
|
|
171
|
+
}>;
|
|
172
|
+
/** Event emitted on Reset as `UI:<resetEvent>` with `{ runId }`; Reset only restores the code when absent. */
|
|
173
|
+
resetEvent?: EventEmit<{
|
|
174
|
+
runId: string;
|
|
175
|
+
}>;
|
|
176
|
+
/** Identifies this panel in its run/reset payloads (e.g. a lesson segment); empty when one panel stands alone. */
|
|
177
|
+
runId?: string;
|
|
178
|
+
/** The program's result for the last run, bound back into the panel. */
|
|
179
|
+
output?: CodeSimulationOutput | null;
|
|
180
|
+
/** True while the program is running the code. */
|
|
181
|
+
running?: boolean;
|
|
182
|
+
/** A run failure message from the program; replaces the output body. */
|
|
183
|
+
error?: string | null;
|
|
184
|
+
/** Additional CSS classes */
|
|
185
|
+
className?: string;
|
|
186
|
+
}
|
|
187
|
+
declare const CodeRunnerPanel: React__default.FC<CodeRunnerPanelProps>;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* SegmentRenderer Organism Component
|
|
191
|
+
*
|
|
192
|
+
* Renders a parsed array of LessonSegments — markdown, code, quizzes,
|
|
193
|
+
* activation prompts, connections, reflections, Bloom questions.
|
|
194
|
+
* The `visualization` segment type is passed through as a no-op unless the
|
|
195
|
+
* caller provides `onRenderVisualization` (future extensibility hook).
|
|
196
|
+
*
|
|
197
|
+
* Event Contract:
|
|
198
|
+
* - Delegates to child molecules: UI:{activationSaveEvent|SAVE_ACTIVATION}, UI:{reflectionSaveEvent|SAVE_REFLECTION}, UI:{bloomAnswerEvent|ANSWER_BLOOM}
|
|
199
|
+
* - Emits (selection / highlights): UI:{askEvent} { selectedText }, UI:{noteEvent} { selectedText }, UI:{annotationEvent} { annotationId }
|
|
200
|
+
* - entityAware: false
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
type InteractiveOrbitalType = 'algorithms' | 'math' | 'physics' | 'biology' | 'chemistry' | 'probability';
|
|
204
|
+
type LessonSegment = {
|
|
205
|
+
type: 'markdown';
|
|
206
|
+
content: string;
|
|
207
|
+
} | {
|
|
208
|
+
type: 'code';
|
|
209
|
+
language: string;
|
|
210
|
+
content: string;
|
|
211
|
+
runnable?: boolean;
|
|
212
|
+
} | {
|
|
213
|
+
type: 'quiz';
|
|
214
|
+
question: string;
|
|
215
|
+
answer: string;
|
|
216
|
+
} | {
|
|
217
|
+
type: 'activate';
|
|
218
|
+
question: string;
|
|
219
|
+
} | {
|
|
220
|
+
type: 'connect';
|
|
221
|
+
content: string;
|
|
222
|
+
} | {
|
|
223
|
+
type: 'reflect';
|
|
224
|
+
prompt: string;
|
|
225
|
+
} | {
|
|
226
|
+
type: 'bloom';
|
|
227
|
+
level: BloomLevel;
|
|
228
|
+
question: string;
|
|
229
|
+
answer: string;
|
|
230
|
+
} | {
|
|
231
|
+
type: 'visualization';
|
|
232
|
+
visualizationType: InteractiveOrbitalType;
|
|
233
|
+
description: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* User progress state passed into SegmentRenderer. Declared here (rather than
|
|
237
|
+
* alongside `LessonSegment` in `lib/parseLessonSegments.ts`) so the
|
|
238
|
+
* pattern-sync scanner — which only indexes types under `components/**` —
|
|
239
|
+
* can resolve it to a concrete `.lolo` object shape instead of `json`.
|
|
240
|
+
*/
|
|
241
|
+
interface LessonUserProgress {
|
|
242
|
+
activationResponse?: string;
|
|
243
|
+
reflectionNotes?: string[];
|
|
244
|
+
bloomAnswered?: Record<number, boolean>;
|
|
245
|
+
}
|
|
246
|
+
interface SegmentRendererProps extends Omit<React__default.AriaAttributes, keyof A11yProps>, A11yProps {
|
|
247
|
+
/** Parsed lesson segments (see `parseLessonSegments`). Ignored when `lesson` is given. */
|
|
248
|
+
segments?: LessonSegment[];
|
|
249
|
+
/** Raw lesson markdown with learning tags; parsed with `parseLessonSegments` and rendered */
|
|
250
|
+
lesson?: string;
|
|
251
|
+
/** Event emitted when the activation prompt is saved or skipped (as `UI:<activationSaveEvent>`) */
|
|
252
|
+
activationSaveEvent?: EventEmit<{
|
|
253
|
+
response: string;
|
|
254
|
+
}>;
|
|
255
|
+
/** Event emitted when a reflection note is saved (as `UI:<reflectionSaveEvent>`) */
|
|
256
|
+
reflectionSaveEvent?: EventEmit<{
|
|
257
|
+
index: number;
|
|
258
|
+
note: string;
|
|
259
|
+
}>;
|
|
260
|
+
/** Event emitted on the first reveal of a Bloom question (as `UI:<bloomAnswerEvent>`) */
|
|
261
|
+
bloomAnswerEvent?: EventEmit<{
|
|
262
|
+
index: number;
|
|
263
|
+
level: BloomLevel;
|
|
264
|
+
}>;
|
|
265
|
+
/** Event emitted when the reader picks Ask on selected text (as `UI:<askEvent>`) */
|
|
266
|
+
askEvent?: EventEmit<{
|
|
267
|
+
selectedText: string;
|
|
268
|
+
}>;
|
|
269
|
+
/** Event emitted when the reader picks Note on selected text (as `UI:<noteEvent>`) */
|
|
270
|
+
noteEvent?: EventEmit<{
|
|
271
|
+
selectedText: string;
|
|
272
|
+
}>;
|
|
273
|
+
/** Ask action label (default: translated) */
|
|
274
|
+
askLabel?: string;
|
|
275
|
+
/** Note action label (default: translated) */
|
|
276
|
+
noteLabel?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Passages to highlight. Each `text` is matched exactly against the markdown
|
|
279
|
+
* segments, first segment whose source contains it, first occurrence inside one
|
|
280
|
+
* rendered text node (outside code); one that spans formatting is not highlighted.
|
|
281
|
+
*/
|
|
282
|
+
annotations?: ContentAnnotation[];
|
|
283
|
+
/** Event emitted when a highlighted passage is clicked (as `UI:<annotationEvent>`) */
|
|
284
|
+
annotationEvent?: EventEmit<{
|
|
285
|
+
annotationId?: string;
|
|
286
|
+
}>;
|
|
287
|
+
/** Additional CSS classes for the root container */
|
|
288
|
+
className?: string;
|
|
289
|
+
/** CSS classes for the outer wrapping div */
|
|
290
|
+
containerClassName?: string;
|
|
291
|
+
/** User progress for restoring activation/reflection state */
|
|
292
|
+
userProgress?: LessonUserProgress;
|
|
293
|
+
/**
|
|
294
|
+
* Event a runnable code block emits on Run (`{ code, language, runId }`, runId = the segment
|
|
295
|
+
* index). Omit to render runnable blocks read-only.
|
|
296
|
+
*/
|
|
297
|
+
runCodeEvent?: EventEmit<{
|
|
298
|
+
code: string;
|
|
299
|
+
language: string;
|
|
300
|
+
runId: string;
|
|
301
|
+
}>;
|
|
302
|
+
/** Event a runnable code block emits on Reset (`{ runId }`). */
|
|
303
|
+
resetCodeEvent?: EventEmit<{
|
|
304
|
+
runId: string;
|
|
305
|
+
}>;
|
|
306
|
+
/** The program's run results, keyed by segment runId. */
|
|
307
|
+
codeOutputs?: Record<string, CodeSimulationOutput>;
|
|
308
|
+
/** The runId the program is currently running. */
|
|
309
|
+
runningCode?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Optional render slot for `visualization` segment types. When not provided,
|
|
312
|
+
* visualization segments are silently skipped. Callers can wire this to any
|
|
313
|
+
* custom component or orbital generator.
|
|
314
|
+
*/
|
|
315
|
+
onRenderVisualization?: (type: InteractiveOrbitalType, description: string, index: number) => React__default.ReactNode;
|
|
316
|
+
}
|
|
317
|
+
declare const SegmentRenderer: React__default.FC<SegmentRendererProps>;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* parseLessonSegments — parses lesson markdown with embedded learning-science
|
|
321
|
+
* XML-style tags into a typed Segment array.
|
|
322
|
+
*
|
|
323
|
+
* Supported tags: <activate>, <connect>, <reflect>, <bloom level="...">,
|
|
324
|
+
* <question>/<answer>, <visualize type="..." description="..." />.
|
|
325
|
+
*
|
|
326
|
+
* Tags may be open (unclosed) — the parser falls back to consuming content
|
|
327
|
+
* until the next recognised tag, a section heading (`\n\n#`), or end-of-input.
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
/** Parse a lesson string into typed segments. Returns `[]` when input is empty. */
|
|
331
|
+
declare function parseLessonSegments(lesson: string | undefined): LessonSegment[];
|
|
332
|
+
|
|
333
|
+
export { EDITOR_MOTIONS as E, INDENT_UNIT as I, SegmentRenderer as S, EDITOR_OPERATORS as b, applyMotion as e, applyOperator as f, isEditorOperator as g, parseLessonSegments as h, isEditorMotion as i, parseMarkdownWithCodeBlocks as j, BloomQuizBlock as l, motionRange as m, CodeRunnerPanel as o, parseContentSegments as p };
|
|
334
|
+
export type { ApplyOperatorInput as A, BloomLevel as B, ContentSegment as C, LessonSegment as L, ApplyOperatorResult as a, EditorMotion as c, EditorOperator as d, ContentAnnotation as k, BloomQuizBlockProps as n, CodeRunnerPanelProps as q, CodeSimulationOutput as r, LessonUserProgress as s, SegmentRendererProps as t };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ProfilerOnRenderCallback } from 'react';
|
|
2
|
+
import { P as PerfEntry } from './perf-Dr28-AgT.js';
|
|
3
|
+
import './verification-C5pTeMJv.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @almadar/ui/runtime — perf instrumentation
|
|
7
|
+
*
|
|
8
|
+
* React-specific consumption layer on top of the renderer-agnostic perf ring
|
|
9
|
+
* now living in `@almadar/runtime/ui/perf`. Re-exports the framework-free
|
|
10
|
+
* timing primitives and adds `useSyncExternalStore` / `React.Profiler` hooks.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* React hook: returns the current perf ring snapshot, re-renders on push.
|
|
15
|
+
*/
|
|
16
|
+
declare function usePerfBuffer(): readonly PerfEntry[];
|
|
17
|
+
/**
|
|
18
|
+
* React.Profiler `onRender` callback. Records `actualDuration` per commit.
|
|
19
|
+
*/
|
|
20
|
+
declare const profilerOnRender: ProfilerOnRenderCallback;
|
|
21
|
+
|
|
22
|
+
export { profilerOnRender as p, usePerfBuffer as u };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renderer-agnostic perf instrumentation.
|
|
3
|
+
*
|
|
4
|
+
* Contains the timing ring + mark/measure primitives used by runtime-side
|
|
5
|
+
* schema prep and other framework-free work. React-specific consumption hooks
|
|
6
|
+
* stay in `@almadar/ui/lib/perf` and read this shared ring.
|
|
7
|
+
*
|
|
8
|
+
* Gated behind `createLogger('almadar:perf:canvas')` so production builds
|
|
9
|
+
* (LOG_LEVEL >= WARN) skip the work.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
declare const PERF_NAMESPACE = "almadar:perf:canvas";
|
|
14
|
+
/**
|
|
15
|
+
* Perf metadata values are local instrumentation scalars. There is no
|
|
16
|
+
* corresponding @almadar/core concept, so this local fallback type replaces
|
|
17
|
+
* the previous Record<string, unknown> while keeping the surface concrete.
|
|
18
|
+
*/
|
|
19
|
+
type PerfDetailValue = string | number | boolean | null | undefined;
|
|
20
|
+
interface PerfDetail {
|
|
21
|
+
readonly [key: string]: PerfDetailValue;
|
|
22
|
+
}
|
|
23
|
+
interface PerfEntry {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly durationMs: number;
|
|
26
|
+
readonly ts: number;
|
|
27
|
+
readonly detail?: Readonly<PerfDetail>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Start a phase. Returns an opaque token; pass to {@link perfEnd}.
|
|
31
|
+
* Returns -1 when the namespace is gated off.
|
|
32
|
+
*/
|
|
33
|
+
declare function perfStart(name: string): number;
|
|
34
|
+
declare function perfEnd(name: string, startToken: number, detail?: PerfDetail): void;
|
|
35
|
+
/** Synchronous wrapper that times a fn end-to-end. */
|
|
36
|
+
declare function perfTime<T>(name: string, fn: () => T, detail?: PerfDetail): T;
|
|
37
|
+
/** Async wrapper — the tick/effect paths are async end-to-end. */
|
|
38
|
+
declare function perfTimeAsync<T>(name: string, fn: () => Promise<T> | T): Promise<T>;
|
|
39
|
+
/** Record a non-duration scalar (queue depth, entries/pass) into the summary. */
|
|
40
|
+
declare function perfGauge(name: string, value: number): void;
|
|
41
|
+
declare function getSnapshot(): readonly PerfEntry[];
|
|
42
|
+
declare function subscribe(fn: () => void): () => void;
|
|
43
|
+
/** Push a pre-computed entry (e.g. React.Profiler callback). */
|
|
44
|
+
declare function pushPerfEntry(entry: PerfEntry): void;
|
|
45
|
+
/** Clear the ring and notify subscribers. */
|
|
46
|
+
declare function clearPerf(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Primitives a renderer-specific hook (e.g. React's `useSyncExternalStore`)
|
|
49
|
+
* uses to consume the perf ring.
|
|
50
|
+
*/
|
|
51
|
+
declare const perfStore: {
|
|
52
|
+
subscribe: typeof subscribe;
|
|
53
|
+
getSnapshot: typeof getSnapshot;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { PERF_NAMESPACE as a, perfStart as b, clearPerf as c, perfTime as d, perfGauge as g, perfStore as h, perfTimeAsync as i, pushPerfEntry as j, perfEnd as p };
|
|
57
|
+
export type { PerfEntry as P, PerfDetail as e, PerfDetailValue as f };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import './chunk-G7DCAZ22.js';
|
|
2
|
+
import SyntaxHighlighter from 'react-syntax-highlighter/dist/esm/prism-light.js';
|
|
3
|
+
import createHighlightElement from 'react-syntax-highlighter/dist/esm/create-element.js';
|
|
4
|
+
import dark from 'react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js';
|
|
5
|
+
import light from 'react-syntax-highlighter/dist/esm/styles/prism/vs.js';
|
|
6
|
+
import { orbLanguage, loloLanguage } from '@almadar/syntax';
|
|
7
|
+
import langJson from 'react-syntax-highlighter/dist/esm/languages/prism/json.js';
|
|
8
|
+
import langJavascript from 'react-syntax-highlighter/dist/esm/languages/prism/javascript.js';
|
|
9
|
+
import langTypescript from 'react-syntax-highlighter/dist/esm/languages/prism/typescript.js';
|
|
10
|
+
import langJsx from 'react-syntax-highlighter/dist/esm/languages/prism/jsx.js';
|
|
11
|
+
import langTsx from 'react-syntax-highlighter/dist/esm/languages/prism/tsx.js';
|
|
12
|
+
import langCss from 'react-syntax-highlighter/dist/esm/languages/prism/css.js';
|
|
13
|
+
import langMarkdown from 'react-syntax-highlighter/dist/esm/languages/prism/markdown.js';
|
|
14
|
+
import langBash from 'react-syntax-highlighter/dist/esm/languages/prism/bash.js';
|
|
15
|
+
import langYaml from 'react-syntax-highlighter/dist/esm/languages/prism/yaml.js';
|
|
16
|
+
import langRust from 'react-syntax-highlighter/dist/esm/languages/prism/rust.js';
|
|
17
|
+
import langPython from 'react-syntax-highlighter/dist/esm/languages/prism/python.js';
|
|
18
|
+
import langSql from 'react-syntax-highlighter/dist/esm/languages/prism/sql.js';
|
|
19
|
+
import langDiff from 'react-syntax-highlighter/dist/esm/languages/prism/diff.js';
|
|
20
|
+
import langToml from 'react-syntax-highlighter/dist/esm/languages/prism/toml.js';
|
|
21
|
+
import langGo from 'react-syntax-highlighter/dist/esm/languages/prism/go.js';
|
|
22
|
+
import langGraphql from 'react-syntax-highlighter/dist/esm/languages/prism/graphql.js';
|
|
23
|
+
import langClojure from 'react-syntax-highlighter/dist/esm/languages/prism/clojure.js';
|
|
24
|
+
import langHaskell from 'react-syntax-highlighter/dist/esm/languages/prism/haskell.js';
|
|
25
|
+
import langLisp from 'react-syntax-highlighter/dist/esm/languages/prism/lisp.js';
|
|
26
|
+
import langScheme from 'react-syntax-highlighter/dist/esm/languages/prism/scheme.js';
|
|
27
|
+
import langScala from 'react-syntax-highlighter/dist/esm/languages/prism/scala.js';
|
|
28
|
+
import langElixir from 'react-syntax-highlighter/dist/esm/languages/prism/elixir.js';
|
|
29
|
+
import langErlang from 'react-syntax-highlighter/dist/esm/languages/prism/erlang.js';
|
|
30
|
+
import langElm from 'react-syntax-highlighter/dist/esm/languages/prism/elm.js';
|
|
31
|
+
import langFsharp from 'react-syntax-highlighter/dist/esm/languages/prism/fsharp.js';
|
|
32
|
+
import langOcaml from 'react-syntax-highlighter/dist/esm/languages/prism/ocaml.js';
|
|
33
|
+
import langJava from 'react-syntax-highlighter/dist/esm/languages/prism/java.js';
|
|
34
|
+
import langC from 'react-syntax-highlighter/dist/esm/languages/prism/c.js';
|
|
35
|
+
import langCpp from 'react-syntax-highlighter/dist/esm/languages/prism/cpp.js';
|
|
36
|
+
import langCsharp from 'react-syntax-highlighter/dist/esm/languages/prism/csharp.js';
|
|
37
|
+
import langObjectivec from 'react-syntax-highlighter/dist/esm/languages/prism/objectivec.js';
|
|
38
|
+
import langPhp from 'react-syntax-highlighter/dist/esm/languages/prism/php.js';
|
|
39
|
+
import langRuby from 'react-syntax-highlighter/dist/esm/languages/prism/ruby.js';
|
|
40
|
+
import langSwift from 'react-syntax-highlighter/dist/esm/languages/prism/swift.js';
|
|
41
|
+
import langKotlin from 'react-syntax-highlighter/dist/esm/languages/prism/kotlin.js';
|
|
42
|
+
import langLua from 'react-syntax-highlighter/dist/esm/languages/prism/lua.js';
|
|
43
|
+
import langR from 'react-syntax-highlighter/dist/esm/languages/prism/r.js';
|
|
44
|
+
import langDart from 'react-syntax-highlighter/dist/esm/languages/prism/dart.js';
|
|
45
|
+
import langJulia from 'react-syntax-highlighter/dist/esm/languages/prism/julia.js';
|
|
46
|
+
import langFortran from 'react-syntax-highlighter/dist/esm/languages/prism/fortran.js';
|
|
47
|
+
import langPerl from 'react-syntax-highlighter/dist/esm/languages/prism/perl.js';
|
|
48
|
+
import langPowershell from 'react-syntax-highlighter/dist/esm/languages/prism/powershell.js';
|
|
49
|
+
import langMakefile from 'react-syntax-highlighter/dist/esm/languages/prism/makefile.js';
|
|
50
|
+
import langNginx from 'react-syntax-highlighter/dist/esm/languages/prism/nginx.js';
|
|
51
|
+
import langIni from 'react-syntax-highlighter/dist/esm/languages/prism/ini.js';
|
|
52
|
+
import langClike from 'react-syntax-highlighter/dist/esm/languages/prism/clike.js';
|
|
53
|
+
|
|
54
|
+
SyntaxHighlighter.registerLanguage("json", langJson);
|
|
55
|
+
SyntaxHighlighter.registerLanguage("javascript", langJavascript);
|
|
56
|
+
SyntaxHighlighter.registerLanguage("js", langJavascript);
|
|
57
|
+
SyntaxHighlighter.registerLanguage("typescript", langTypescript);
|
|
58
|
+
SyntaxHighlighter.registerLanguage("ts", langTypescript);
|
|
59
|
+
SyntaxHighlighter.registerLanguage("jsx", langJsx);
|
|
60
|
+
SyntaxHighlighter.registerLanguage("tsx", langTsx);
|
|
61
|
+
SyntaxHighlighter.registerLanguage("css", langCss);
|
|
62
|
+
SyntaxHighlighter.registerLanguage("markdown", langMarkdown);
|
|
63
|
+
SyntaxHighlighter.registerLanguage("md", langMarkdown);
|
|
64
|
+
SyntaxHighlighter.registerLanguage("bash", langBash);
|
|
65
|
+
SyntaxHighlighter.registerLanguage("shell", langBash);
|
|
66
|
+
SyntaxHighlighter.registerLanguage("sh", langBash);
|
|
67
|
+
SyntaxHighlighter.registerLanguage("yaml", langYaml);
|
|
68
|
+
SyntaxHighlighter.registerLanguage("yml", langYaml);
|
|
69
|
+
SyntaxHighlighter.registerLanguage("rust", langRust);
|
|
70
|
+
SyntaxHighlighter.registerLanguage("python", langPython);
|
|
71
|
+
SyntaxHighlighter.registerLanguage("py", langPython);
|
|
72
|
+
SyntaxHighlighter.registerLanguage("sql", langSql);
|
|
73
|
+
SyntaxHighlighter.registerLanguage("diff", langDiff);
|
|
74
|
+
SyntaxHighlighter.registerLanguage("toml", langToml);
|
|
75
|
+
SyntaxHighlighter.registerLanguage("go", langGo);
|
|
76
|
+
SyntaxHighlighter.registerLanguage("graphql", langGraphql);
|
|
77
|
+
SyntaxHighlighter.registerLanguage("clojure", langClojure);
|
|
78
|
+
SyntaxHighlighter.registerLanguage("clj", langClojure);
|
|
79
|
+
SyntaxHighlighter.registerLanguage("edn", langClojure);
|
|
80
|
+
SyntaxHighlighter.registerLanguage("haskell", langHaskell);
|
|
81
|
+
SyntaxHighlighter.registerLanguage("hs", langHaskell);
|
|
82
|
+
SyntaxHighlighter.registerLanguage("lisp", langLisp);
|
|
83
|
+
SyntaxHighlighter.registerLanguage("scheme", langScheme);
|
|
84
|
+
SyntaxHighlighter.registerLanguage("scala", langScala);
|
|
85
|
+
SyntaxHighlighter.registerLanguage("elixir", langElixir);
|
|
86
|
+
SyntaxHighlighter.registerLanguage("ex", langElixir);
|
|
87
|
+
SyntaxHighlighter.registerLanguage("exs", langElixir);
|
|
88
|
+
SyntaxHighlighter.registerLanguage("erlang", langErlang);
|
|
89
|
+
SyntaxHighlighter.registerLanguage("erl", langErlang);
|
|
90
|
+
SyntaxHighlighter.registerLanguage("elm", langElm);
|
|
91
|
+
SyntaxHighlighter.registerLanguage("fsharp", langFsharp);
|
|
92
|
+
SyntaxHighlighter.registerLanguage("fs", langFsharp);
|
|
93
|
+
SyntaxHighlighter.registerLanguage("fsx", langFsharp);
|
|
94
|
+
SyntaxHighlighter.registerLanguage("ocaml", langOcaml);
|
|
95
|
+
SyntaxHighlighter.registerLanguage("ml", langOcaml);
|
|
96
|
+
SyntaxHighlighter.registerLanguage("java", langJava);
|
|
97
|
+
SyntaxHighlighter.registerLanguage("c", langC);
|
|
98
|
+
SyntaxHighlighter.registerLanguage("cpp", langCpp);
|
|
99
|
+
SyntaxHighlighter.registerLanguage("c++", langCpp);
|
|
100
|
+
SyntaxHighlighter.registerLanguage("cc", langCpp);
|
|
101
|
+
SyntaxHighlighter.registerLanguage("cxx", langCpp);
|
|
102
|
+
SyntaxHighlighter.registerLanguage("hpp", langCpp);
|
|
103
|
+
SyntaxHighlighter.registerLanguage("h", langCpp);
|
|
104
|
+
SyntaxHighlighter.registerLanguage("csharp", langCsharp);
|
|
105
|
+
SyntaxHighlighter.registerLanguage("cs", langCsharp);
|
|
106
|
+
SyntaxHighlighter.registerLanguage("objectivec", langObjectivec);
|
|
107
|
+
SyntaxHighlighter.registerLanguage("objc", langObjectivec);
|
|
108
|
+
SyntaxHighlighter.registerLanguage("php", langPhp);
|
|
109
|
+
SyntaxHighlighter.registerLanguage("ruby", langRuby);
|
|
110
|
+
SyntaxHighlighter.registerLanguage("rb", langRuby);
|
|
111
|
+
SyntaxHighlighter.registerLanguage("swift", langSwift);
|
|
112
|
+
SyntaxHighlighter.registerLanguage("kotlin", langKotlin);
|
|
113
|
+
SyntaxHighlighter.registerLanguage("kt", langKotlin);
|
|
114
|
+
SyntaxHighlighter.registerLanguage("lua", langLua);
|
|
115
|
+
SyntaxHighlighter.registerLanguage("r", langR);
|
|
116
|
+
SyntaxHighlighter.registerLanguage("dart", langDart);
|
|
117
|
+
SyntaxHighlighter.registerLanguage("julia", langJulia);
|
|
118
|
+
SyntaxHighlighter.registerLanguage("fortran", langFortran);
|
|
119
|
+
SyntaxHighlighter.registerLanguage("f90", langFortran);
|
|
120
|
+
SyntaxHighlighter.registerLanguage("f95", langFortran);
|
|
121
|
+
SyntaxHighlighter.registerLanguage("perl", langPerl);
|
|
122
|
+
SyntaxHighlighter.registerLanguage("pl", langPerl);
|
|
123
|
+
SyntaxHighlighter.registerLanguage("powershell", langPowershell);
|
|
124
|
+
SyntaxHighlighter.registerLanguage("ps1", langPowershell);
|
|
125
|
+
SyntaxHighlighter.registerLanguage("makefile", langMakefile);
|
|
126
|
+
SyntaxHighlighter.registerLanguage("make", langMakefile);
|
|
127
|
+
SyntaxHighlighter.registerLanguage("nginx", langNginx);
|
|
128
|
+
SyntaxHighlighter.registerLanguage("ini", langIni);
|
|
129
|
+
SyntaxHighlighter.registerLanguage("clike", langClike);
|
|
130
|
+
function registerProgramLanguages() {
|
|
131
|
+
SyntaxHighlighter.registerLanguage("orb", orbLanguage);
|
|
132
|
+
SyntaxHighlighter.registerLanguage("lolo", loloLanguage);
|
|
133
|
+
}
|
|
134
|
+
var prism = { SyntaxHighlighter, createHighlightElement, dark, light, clike: langClike };
|
|
135
|
+
|
|
136
|
+
export { prism, registerProgramLanguages };
|