fika-editor 3.0.14 → 3.0.16

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.
@@ -1,5 +1,7 @@
1
1
  import 'prosemirror-view/style/prosemirror.css';
2
2
  import 'animate.css';
3
+ import 'mathlive/static.css';
4
+ import 'mathlive/fonts.css';
3
5
  import '../assets/styles/prosemirror.scss';
4
6
  import '../assets/styles/global.scss';
5
7
  import '../assets/styles/font.scss';
@@ -1,5 +1,9 @@
1
1
  /** True when a string carries math delimiters the math parser should handle. */
2
2
  export declare function containsMath(source: string): boolean;
3
+ /** Delimited math or any TeX control sequence in the source. */
4
+ export declare function containsTexSource(source: string): boolean;
5
+ /** The whole string is a TeX formula MathLive can typeset as-is. */
6
+ export declare function isTexFormulaSource(source: string): boolean;
3
7
  /**
4
8
  * A run of either plain text or a single math span, in source order. `raw` is
5
9
  * the exact source slice (delimiters included for math); `value` is the inner
@@ -87,4 +87,12 @@ export declare function measureLatexElement(latex: string): Promise<{
87
87
  }>;
88
88
  /** True when an HTML string already contains rendered/wrapped math. */
89
89
  export declare function htmlContainsMath(html: string): boolean;
90
+ /** True when a stored deck needs MathLive CSS to paint stacked fractions. */
91
+ export declare function deckHasMath(slides: ReadonlyArray<{
92
+ elements?: ReadonlyArray<unknown>;
93
+ }>): boolean;
94
+ /** Load MathLive CSS/fonts when the deck already has typeset math. */
95
+ export declare function ensureMathStylesForSlides(slides: ReadonlyArray<{
96
+ elements?: ReadonlyArray<unknown>;
97
+ }>): void;
90
98
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fika-editor",
3
- "version": "3.0.14",
3
+ "version": "3.0.16",
4
4
  "description": "Fika presentation editor embed bundle with a typed agentic bridge.",
5
5
  "type": "module",
6
6
  "main": "dist/embed/fika-embed.js",
@@ -108,7 +108,7 @@
108
108
  "lucide-react": "^1.33.0",
109
109
  "markdown-it": "^15.0.0",
110
110
  "markdown-it-texmath": "^1.0.0",
111
- "mathlive": "npm:@lofcz/mathlive@^0.110.2",
111
+ "mathlive": "npm:@lofcz/mathlive@^0.110.6",
112
112
  "mathml2omml-plus": "^0.6.4",
113
113
  "mermaid": "^11.17.0",
114
114
  "mitt": "^3.0.1",
@@ -1 +0,0 @@
1
- @font-face{font-display:"swap";font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_AMS-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_Caligraphic-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Caligraphic-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_Fraktur-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Fraktur-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/static/font/fonts/KaTeX_Main-BoldItalic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_Main-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/static/font/fonts/KaTeX_Main-Italic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Main-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/static/font/fonts/KaTeX_Math-BoldItalic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/static/font/fonts/KaTeX_Math-Italic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_SansSerif-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/static/font/fonts/KaTeX_SansSerif-Italic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_SansSerif-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Script-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size1-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size2-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size3-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size4-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Typewriter-Regular.woff2)format("woff2")}:root{--ML__static-fonts:true}
@@ -1 +0,0 @@
1
- export const __rspack_esm_id=360;export const __rspack_esm_ids=[360];export const __webpack_modules__={63083(_,s,e){e.r(s)}};
@@ -1 +0,0 @@
1
- @font-face{font-display:"swap";font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_AMS-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_Caligraphic-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Caligraphic-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_Fraktur-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Fraktur-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/static/font/fonts/KaTeX_Main-BoldItalic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_Main-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/static/font/fonts/KaTeX_Main-Italic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Main-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/static/font/fonts/KaTeX_Math-BoldItalic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/static/font/fonts/KaTeX_Math-Italic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/static/font/fonts/KaTeX_SansSerif-Bold.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/static/font/fonts/KaTeX_SansSerif-Italic.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_SansSerif-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Script-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size1-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size2-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size3-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Size4-Regular.woff2)format("woff2")}@font-face{font-display:"swap";font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/static/font/fonts/KaTeX_Typewriter-Regular.woff2)format("woff2")}:root{--ML__static-fonts:true}.ML__container{--_hue:var(--hue,212);--_placeholder-color:var(--placeholder-color,hsl(var(--_hue),40%,49%));--_placeholder-opacity:var(--placeholder-opacity,.4);--_text-font-family:var(--text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);min-height:auto!important}.ML__sr-only{clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.ML__base,.ML__is-inline{display:inline-block}.ML__base{box-sizing:content-box;cursor:text;font-family:inherit;font-style:inherit;font-weight:inherit;vertical-align:baseline;visibility:inherit;border:0;outline:0;width:min-content;margin:0;padding:0;text-decoration:none;position:relative}.ML__strut,.ML__strut--bottom{min-height:.5em;display:inline-block}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--_text-font-family);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.ML__mathbfit,.lcGreek.ML__mathbf{font-family:KaTeX_Math}.ML__mathbfit{font-style:italic;font-weight:700}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:50%}.ML__series_ec{font-stretch:62.5%}.ML__series_c{font-stretch:75%}.ML__series_sc{font-stretch:87.5%}.ML__series_sx{font-stretch:112.5%}.ML__series_x{font-stretch:125%}.ML__series_ex{font-stretch:150%}.ML__series_ux{font-stretch:200%}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:#0000}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{color:#007cb2;background:#edd1b0}.ML__center{text-align:center}.ML__left{text-align:left}.ML__right{text-align:right}.ML__label_padding{padding:0 .5em}.ML__newline{display:block}.ML__frac-line{width:100%;min-height:1px}.ML__frac-line:after{box-sizing:content-box;content:"";forced-color-adjust:preserve-parent-color;-webkit-print-color-adjust:exact;print-color-adjust:exact;background:currentColor;min-height:max(1px,.04em);margin-top:max(-1px,-.04em);display:block;transform:translate(0)}@media (forced-colors:active){.ML__frac-line{min-height:0}}.ML__sqrt,.ML__sqrt-sign{display:inline-block}.ML__sqrt-sign{position:relative}.ML__sqrt-line{width:100%;height:max(1px,.04em);display:inline-block}.ML__sqrt-line:before{content:"";forced-color-adjust:preserve-parent-color;-webkit-print-color-adjust:exact;print-color-adjust:exact;background:currentColor;min-height:max(1px,.04em);margin-top:min(-1px,-.04em);display:block;transform:translate(0)}@media (forced-colors:active){.ML__sqrt-line:after{background:#fff!important}}.ML__sqrt-line:after{content:" ";border-bottom-width:1px;margin-top:-.1em;display:block}.ML__sqrt-index{margin-left:.277778em;margin-right:-.555556em}.ML__delim-size1{font-family:KaTeX_Size1}.ML__delim-size2{font-family:KaTeX_Size2}.ML__delim-size3{font-family:KaTeX_Size3}.ML__delim-size4{font-family:KaTeX_Size4}.ML__delim-mult .delim-size1>span{font-family:KaTeX_Size1}.ML__delim-mult .delim-size4>span{font-family:KaTeX_Size4}.ML__accent-body{font-family:KaTeX_Main}.ML__accent-combining-char{position:relative;left:.24em}.ML__latex{font-size-adjust:none;letter-spacing:normal;text-align:left;text-indent:0;text-rendering:auto;word-wrap:normal;forced-color-adjust:preserve-parent-color;text-shadow:none;-webkit-user-select:none;user-select:none;white-space:nowrap;word-spacing:normal;direction:ltr;width:min-content;font-family:inherit;font-style:normal;font-variant-caps:normal;font-stretch:100%;line-height:1.2;display:inline-block}.ML__latex .style-wrap{position:relative}.ML__latex .ML__left-right,.ML__latex .ML__mfrac{display:inline-block}.ML__latex .ML__vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.ML__latex .ML__vlist-r{display:table-row}.ML__latex .ML__vlist{vertical-align:bottom;display:table-cell;position:relative}.ML__latex .ML__vlist>span{height:0;display:block;position:relative}.ML__latex .ML__vlist>span>span{display:inline-block}.ML__latex .ML__vlist>span>.ML__pstrut{width:0;overflow:hidden}.ML__latex .ML__vlist-t2{margin-right:-2px}.ML__latex .ML__vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.ML__latex .ML__msubsup{text-align:left}.ML__latex .ML__negativethinspace{height:.71em;margin-left:-.16667em;display:inline-block}.ML__latex .ML__thinspace{width:.16667em;height:.71em;display:inline-block}.ML__latex .ML__mediumspace{width:.22222em;height:.71em;display:inline-block}.ML__latex .ML__thickspace{width:.27778em;height:.71em;display:inline-block}.ML__latex .ML__enspace{width:.5em;height:.71em;display:inline-block}.ML__latex .ML__quad{width:1em;height:.71em;display:inline-block}.ML__latex .ML__qquad{width:2em;height:.71em;display:inline-block}.ML__latex .ML__llap,.ML__latex .ML__rlap{width:0;display:inline-block;position:relative}.ML__latex .ML__llap>.ML__inner,.ML__latex .ML__rlap>.ML__inner{position:absolute}.ML__latex .ML__llap>.ML__fix,.ML__latex .ML__rlap>.ML__fix{display:inline-block}.ML__latex .ML__llap>.ML__inner{right:0}.ML__latex .ML__rlap>.ML__inner{left:0}.ML__latex .ML__rule{box-sizing:border-box;border:0 solid;display:inline-block;position:relative}.ML__latex .overline .overline-line,.ML__latex .underline .underline-line{width:100%}.ML__latex .overline .overline-line:before,.ML__latex .underline .underline-line:before{content:"";-webkit-print-color-adjust:exact;print-color-adjust:exact;border-bottom-style:solid;border-bottom-width:max(1px,.04em);display:block}.ML__latex .overline .overline-line:after,.ML__latex .underline .underline-line:after{content:"";-webkit-print-color-adjust:exact;print-color-adjust:exact;border-bottom-style:solid;border-bottom-width:max(1px,.04em);margin-top:-1px;display:block}.ML__latex .ML__stretchy{width:100%;display:block;position:absolute;left:0;overflow:hidden}.ML__latex .ML__stretchy:after,.ML__latex .ML__stretchy:before{content:""}.ML__latex .ML__stretchy svg{fill:currentColor;fill-opacity:1;fill-rule:nonzero;height:inherit;stroke:currentColor;stroke-dasharray:none;stroke-dashoffset:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-width:1px;width:100%;display:block;position:absolute}.ML__latex .slice-1-of-2{left:0}.ML__latex .slice-1-of-2,.ML__latex .slice-2-of-2{width:50.2%;display:inline-flex;position:absolute;overflow:hidden}.ML__latex .slice-2-of-2{right:0}.ML__latex .slice-1-of-3{width:25.1%;left:0}.ML__latex .slice-1-of-3,.ML__latex .slice-2-of-3{display:inline-flex;position:absolute;overflow:hidden}.ML__latex .slice-2-of-3{width:50%;left:25%}.ML__latex .slice-3-of-3{width:25.1%;right:0}.ML__latex .slice-1-of-1,.ML__latex .slice-3-of-3{display:inline-flex;position:absolute;overflow:hidden}.ML__latex .slice-1-of-1{width:100%;left:0}.ML__latex .ML__nulldelimiter,.ML__latex .ML__op-group{display:inline-block}.ML__latex .ML__op-symbol{position:relative}.ML__latex .ML__op-symbol.ML__small-op{font-family:KaTeX_Size1}.ML__latex .ML__op-symbol.ML__large-op{font-family:KaTeX_Size2}:is(.ML__latex:has(.ML__align_environment),.ML__latex:has(.ML__center_environment),.ML__latex:has(.ML__eqnarray_environment),.ML__latex:has(.ML__gather_environment),.ML__latex:has(.ML__multiline_environment)){width:100%}.ML__latex .ML__multiline_environment{width:100%;display:inline-flex}.ML__latex .ML__center_environment{justify-content:center;width:100%;display:inline-flex}.ML__latex .ML__align_environment,.ML__latex .ML__eqnarray_environment,.ML__latex .ML__gather_environment{display:inline-block}.ML__latex .ML__mtable .ML__vertical-separator{box-sizing:border-box;min-width:1px;display:inline-block}.ML__latex .ML__mtable .ML__arraycolsep{display:inline-block}.ML__latex .ML__mtable .col-align-m>.ML__vlist-t,.ML__latex .ML__mtable .col-align-c>.ML__vlist-t{text-align:center}.ML__latex .ML__mtable .col-align-l>.ML__vlist-t{text-align:left}.ML__latex .ML__mtable .col-align-r>.ML__vlist-t{text-align:right}[data-href]{cursor:pointer}.ML__error{background-color:#cc00411a;background-image:radial-gradient(#cc0041,#0000 70%);background-position:0 100%;background-repeat:repeat-x;background-size:3px 3px;padding-bottom:3px;display:inline-block}.ML__error>.ML__error{background:0 0;padding:0}.ML__placeholder{color:var(--_placeholder-color);opacity:var(--_placeholder-opacity);padding-left:.4ex;padding-right:.4ex;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.ML__notation{box-sizing:border-box;line-height:0;position:absolute}.ML__tooltip-container{position:relative;transform:scale(0)}.ML__tooltip-container .ML__tooltip-content{background:var(--_tooltip-background-color);border:var(--_tooltip-border);border-radius:var(--_tooltip-border-radius);visibility:hidden;z-index:2;--_selection-color:var(--_tooltip-color);width:max-content;max-width:400px;box-shadow:var(--_tooltip-box-shadow);color:var(--_tooltip-color);opacity:0;padding:12px;transition:opacity .15s cubic-bezier(.4,0,1,1);display:inline-table;position:fixed}.ML__tooltip-container .ML__tooltip-content .ML__text{white-space:normal}.ML__tooltip-container .ML__tooltip-content .ML__base{display:contents}.ML__tooltip-container:hover .ML__tooltip-content{opacity:1;visibility:visible;font-size:.75em;transform:scale(1)translateY(3em)}.ML__bg{background-color:#0000!important}.ML__bg:before{background-color:var(--bg-color);box-sizing:border-box;content:"";z-index:-1;position:absolute;inset:0}
@@ -1 +0,0 @@
1
- export const __rspack_esm_id=4632;export const __rspack_esm_ids=[4632];export const __webpack_modules__={10315(_,s,e){e.r(s)}};