activeadmin_mitosis_editor 0.1.10 → 0.1.11
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/CLAUDE.md +1 -1
- data/lib/activeadmin_mitosis_editor/version.rb +1 -1
- data/package.json +1 -1
- data/vendor/assets/javascripts/mitosis-editor.js +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0215c82f9b05562996243b79ecf17568a84a062618a0259bd9f7a6923ac8d4b8
|
|
4
|
+
data.tar.gz: a443bcc33413b8f4f5c9ce44f9771e298b1ea9770fc781b8b54396c5214a2dfb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a3dca5947d3526bdb9c513dfaea52677fa97ce62bfc7f4a3fc6aa914fb89ccbff745d855080461f7f0018a3872a6131d3166a6d8f791a21ff842cc9409eef9e
|
|
7
|
+
data.tar.gz: 1dd23e7ca5f6951d523415fd2850b4a2dafdbce0e298eaec6bd03cd96ec002ebfaeaba707e5640cc350ccd990a26ef303ad4fd1b36b1df8e347c1e273dd1f398
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.11](https://github.com/codxse/mitosis-active-admin/compare/v0.1.10...v0.1.11) (2026-03-07)
|
|
6
|
+
|
|
5
7
|
### [0.1.10](https://github.com/codxse/mitosis-active-admin/compare/v0.1.9...v0.1.10) (2026-02-22)
|
|
6
8
|
|
|
7
9
|
### [0.1.9](https://github.com/codxse/mitosis-active-admin/compare/v0.1.5...v0.1.9) (2026-02-18)
|
data/CLAUDE.md
CHANGED
|
@@ -8,7 +8,7 @@ This is a Ruby gem called `activeadmin_mitosis_editor` that provides a split-vie
|
|
|
8
8
|
|
|
9
9
|
1. **Main Gem** (`/lib`): The Ruby gem with Formtastic input class and Railtie for asset pipeline integration.
|
|
10
10
|
2. **Demo App** (`/demo`): A Rails 8.1 application demonstrating the gem's usage and system tests.
|
|
11
|
-
3. **Assets** (`/vendor/assets`): Pre-compiled mitosis-js and Prism syntax highlighter bundles. Downloaded from https://www.npmjs.com/package/@codxse/mitosis-js v1.7.
|
|
11
|
+
3. **Assets** (`/vendor/assets`): Pre-compiled mitosis-js and Prism syntax highlighter bundles. Downloaded from https://www.npmjs.com/package/@codxse/mitosis-js v1.7.1
|
|
12
12
|
|
|
13
13
|
- The gem bundles pre-compiled CSS/JS assets in `/vendor/assets`
|
|
14
14
|
- No database migrations required - stores markdown as plain strings
|
data/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";var MitosisEditor=(()=>{var O=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var He=Object.prototype.hasOwnProperty;var Me=(n,e)=>{for(var t in e)O(n,t,{get:e[t],enumerable:!0})},De=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ie(e))!He.call(n,r)&&r!==t&&O(n,r,{get:()=>e[r],enumerable:!(s=_e(e,r))||s.enumerable});return n};var Be=n=>De(O({},"__esModule",{value:!0}),n);var Mt={};Me(Mt,{Editor:()=>E,EditorPane:()=>$,PreviewPane:()=>P,TwoPanelLayout:()=>C,createEditor:()=>Ht,highlightMarkdown:()=>H,parseMarkdownToHTML:()=>T});function H(n){return qe(n)}function qe(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var Qe=`<figure>
|
|
2
|
-
<img src="" alt="">
|
|
2
|
+
<img style="margin: 0 auto;text-align:center;" src="" alt="">
|
|
3
3
|
<figcaption></figcaption>
|
|
4
4
|
</figure>`,Ne=[{key:"b",syntax:{prefix:"**",suffix:"**"}},{key:"i",syntax:{prefix:"*",suffix:"*"}},{key:"k",syntax:{prefix:"[",suffix:"](url)"}},{key:"e",syntax:{prefix:"`",suffix:"`"}},{key:"s",shiftKey:!0,syntax:{prefix:"~~",suffix:"~~"}},{key:"m",syntax:Qe,cursorOffset:21}],$=class{textarea;highlightOverlay;container;onUpdate;onScroll;constructor(e){this.onUpdate=e.onUpdate??(()=>{}),this.onScroll=e.onScroll??(()=>{}),this.container=document.createElement("div"),this.container.className="mitosis-editor-container",this.textarea=document.createElement("textarea"),this.textarea.className="mitosis-textarea",this.textarea.placeholder="Write markdown here...",this.highlightOverlay=document.createElement("div"),this.highlightOverlay.className="mitosis-highlight",this.textarea.addEventListener("input",()=>this.handleInput()),this.textarea.addEventListener("scroll",()=>this.handleScroll()),this.textarea.addEventListener("keydown",t=>this.handleKeyDown(t)),this.container.appendChild(this.highlightOverlay),this.container.appendChild(this.textarea),e.container.appendChild(this.container)}handleInput(){let e=this.textarea.value;this.highlightOverlay.innerHTML=H(e)+`
|
|
5
|
-
`,this.onUpdate(e)}handleScroll(){let{scrollTop:e,scrollHeight:t,clientHeight:s}=this.textarea;this.highlightOverlay.scrollTop=e;let r=t-s;this.onScroll(r>0?e/r:0)}handleKeyDown(e){if(e.key==="Tab"){e.preventDefault(),this.insertText(" ");return}for(let t of Ne)if(e.key===t.key&&(e.metaKey||e.ctrlKey)&&e.shiftKey===(t.shiftKey??!1)){e.preventDefault(),typeof t.syntax=="string"?this.insertText(t.syntax,t.cursorOffset):this.wrapSelection(t.syntax.prefix,t.syntax.suffix);return}}insertText(e,t){let s=this.textarea.selectionStart,r=this.textarea.selectionEnd,l=this.textarea.value;this.textarea.value=l.substring(0,s)+e+l.substring(r);let i=t!==void 0?s+t:s+e.length;this.textarea.selectionStart=this.textarea.selectionEnd=i,this.textarea.focus(),this.handleInput()}wrapSelection(e,t){let s=this.textarea.selectionStart,r=this.textarea.selectionEnd,l=this.textarea.value,i=l.substring(s,r),o=e+i+t;this.textarea.value=l.substring(0,s)+o+l.substring(r),this.setCursorAfterWrap(i,s,e,o),this.textarea.focus(),this.handleInput()}setCursorAfterWrap(e,t,s,r){e.length===0?this.textarea.selectionStart=this.textarea.selectionEnd=t+s.length:(this.textarea.selectionStart=t,this.textarea.selectionEnd=t+r.length)}setContent(e){this.textarea.value=e,this.handleInput()}getContent(){return this.textarea.value}destroy(){this.textarea.removeEventListener("input",()=>this.handleInput()),this.textarea.removeEventListener("scroll",()=>this.handleScroll()),this.textarea.removeEventListener("keydown",e=>this.handleKeyDown(e)),this.container.remove()}};function K(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var v=K();function pe(n){v=n}var S={exec:()=>null};function p(n,e=""){let t=typeof n=="string"?n:n.source,s={replace:(r,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),t=t.replace(r,i),s},getRegex:()=>new RegExp(t,e)};return s}var Ze=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
|
|
6
|
-
]`).replace("lheading",ge).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ke=/^( {2,}|\\)\n(?!\s*$)/,nt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,Y=/[\s\p{P}\p{S}]/u,fe=/[^\s\p{P}\p{S}]/u,st=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Y).getRegex(),xe=/(?!~)[\p{P}\p{S}]/u,it=/(?!~)[\s\p{P}\p{S}]/u,lt=/(?:[^\s\p{P}\p{S}]|~)/u,me=/(?![*_])[\p{P}\p{S}]/u,at=/(?![*_])[\s\p{P}\p{S}]/u,ot=/(?:[^\s\p{P}\p{S}]|[*_])/u,ht=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ze?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),we=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ct=p(we,"u").replace(/punct/g,N).getRegex(),pt=p(we,"u").replace(/punct/g,xe).getRegex(),be="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ut=p(be,"gu").replace(/notPunctSpace/g,fe).replace(/punctSpace/g,Y).replace(/punct/g,N).getRegex(),gt=p(be,"gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,it).replace(/punct/g,xe).getRegex(),dt=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fe).replace(/punctSpace/g,Y).replace(/punct/g,N).getRegex(),kt=p(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,me).getRegex(),ft="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",xt=p(ft,"gu").replace(/notPunctSpace/g,ot).replace(/punctSpace/g,at).replace(/punct/g,me).getRegex(),mt=p(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),wt=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bt=p(V).replace("(?:-->|$)","-->").getRegex(),yt=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,St=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]
|
|
5
|
+
`,this.onUpdate(e)}handleScroll(){let{scrollTop:e,scrollHeight:t,clientHeight:s}=this.textarea;this.highlightOverlay.scrollTop=e;let r=t-s;this.onScroll(r>0?e/r:0)}handleKeyDown(e){if(e.key==="Tab"){e.preventDefault(),this.insertText(" ");return}for(let t of Ne)if(e.key===t.key&&(e.metaKey||e.ctrlKey)&&e.shiftKey===(t.shiftKey??!1)){e.preventDefault(),typeof t.syntax=="string"?this.insertText(t.syntax,t.cursorOffset):this.wrapSelection(t.syntax.prefix,t.syntax.suffix);return}}insertText(e,t){let s=this.textarea.selectionStart,r=this.textarea.selectionEnd,l=this.textarea.value;this.textarea.value=l.substring(0,s)+e+l.substring(r);let i=t!==void 0?s+t:s+e.length;this.textarea.selectionStart=this.textarea.selectionEnd=i,this.textarea.focus(),this.handleInput()}wrapSelection(e,t){let s=this.textarea.selectionStart,r=this.textarea.selectionEnd,l=this.textarea.value,i=l.substring(s,r),o=e+i+t;this.textarea.value=l.substring(0,s)+o+l.substring(r),this.setCursorAfterWrap(i,s,e,o),this.textarea.focus(),this.handleInput()}setCursorAfterWrap(e,t,s,r){e.length===0?this.textarea.selectionStart=this.textarea.selectionEnd=t+s.length:(this.textarea.selectionStart=t,this.textarea.selectionEnd=t+r.length)}setContent(e){this.textarea.value=e,this.handleInput()}getContent(){return this.textarea.value}destroy(){this.textarea.removeEventListener("input",()=>this.handleInput()),this.textarea.removeEventListener("scroll",()=>this.handleScroll()),this.textarea.removeEventListener("keydown",e=>this.handleKeyDown(e)),this.container.remove()}};function K(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var v=K();function pe(n){v=n}var S={exec:()=>null};function p(n,e=""){let t=typeof n=="string"?n:n.source,s={replace:(r,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(x.caret,"$1"),t=t.replace(r,i),s},getRegex:()=>new RegExp(t,e)};return s}var Ze=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}>`)},Oe=/^(?:[ \t]*(?:\n|$))+/,Ue=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,je=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,I=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,W=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ue=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ge=p(ue).replace(/bull/g,W).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ke=p(ue).replace(/bull/g,W).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),X=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,We=/^[^\n]+/,F=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Xe=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",F).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Fe=p(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,W).getRegex(),Q="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ve=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",V).replace("tag",Q).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de=p(X).replace("hr",I).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex(),Je=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",de).getRegex(),J={blockquote:Je,code:Ue,def:Xe,fences:je,heading:Ge,hr:I,html:Ve,lheading:ge,list:Fe,newline:Oe,paragraph:de,table:S,text:We},ie=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",I).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex(),Ye={...J,lheading:Ke,table:ie,paragraph:p(X).replace("hr",I).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ie).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Q).getRegex()},et={...J,html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",V).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:S,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(X).replace("hr",I).replace("heading",` *#{1,6} *[^
|
|
6
|
+
]`).replace("lheading",ge).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},tt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ke=/^( {2,}|\\)\n(?!\s*$)/,nt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,N=/[\p{P}\p{S}]/u,Y=/[\s\p{P}\p{S}]/u,fe=/[^\s\p{P}\p{S}]/u,st=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Y).getRegex(),xe=/(?!~)[\p{P}\p{S}]/u,it=/(?!~)[\s\p{P}\p{S}]/u,lt=/(?:[^\s\p{P}\p{S}]|~)/u,me=/(?![*_])[\p{P}\p{S}]/u,at=/(?![*_])[\s\p{P}\p{S}]/u,ot=/(?:[^\s\p{P}\p{S}]|[*_])/u,ht=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ze?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),we=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ct=p(we,"u").replace(/punct/g,N).getRegex(),pt=p(we,"u").replace(/punct/g,xe).getRegex(),be="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ut=p(be,"gu").replace(/notPunctSpace/g,fe).replace(/punctSpace/g,Y).replace(/punct/g,N).getRegex(),gt=p(be,"gu").replace(/notPunctSpace/g,lt).replace(/punctSpace/g,it).replace(/punct/g,xe).getRegex(),dt=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fe).replace(/punctSpace/g,Y).replace(/punct/g,N).getRegex(),kt=p(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,me).getRegex(),ft="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",xt=p(ft,"gu").replace(/notPunctSpace/g,ot).replace(/punctSpace/g,at).replace(/punct/g,me).getRegex(),mt=p(/\\(punct)/,"gu").replace(/punct/g,N).getRegex(),wt=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bt=p(V).replace("(?:-->|$)","-->").getRegex(),yt=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),D=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,St=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",D).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ye=p(/^!?\[(label)\]\[(ref)\]/).replace("label",D).replace("ref",F).getRegex(),Se=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",F).getRegex(),Rt=p("reflink|nolink(?!\\()","g").replace("reflink",ye).replace("nolink",Se).getRegex(),le=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ee={_backpedal:S,anyPunctuation:mt,autolink:wt,blockSkip:ht,br:ke,code:rt,del:S,delLDelim:S,delRDelim:S,emStrongLDelim:ct,emStrongRDelimAst:ut,emStrongRDelimUnd:dt,escape:tt,link:St,nolink:Se,punctuation:st,reflink:ye,reflinkSearch:Rt,tag:yt,text:nt,url:S},vt={...ee,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",D).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",D).getRegex()},U={...ee,emStrongRDelimAst:gt,emStrongLDelim:pt,delLDelim:kt,delRDelim:xt,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",le).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",le).getRegex()},Tt={...U,br:p(ke).replace("{2,}","*").getRegex(),text:p(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},M={normal:J,gfm:Ye,pedantic:et},A={normal:ee,gfm:U,breaks:Tt,pedantic:vt},$t={"&":"&","<":"<",">":">",'"':""","'":"'"},ae=n=>$t[n];function b(n,e){if(e){if(x.escapeTest.test(n))return n.replace(x.escapeReplace,ae)}else if(x.escapeTestNoEncode.test(n))return n.replace(x.escapeReplaceNoEncode,ae);return n}function oe(n){try{n=encodeURI(n).replace(x.percentDecode,"%")}catch{return null}return n}function he(n,e){let t=n.replace(x.findPipe,(l,i,o)=>{let a=!1,c=i;for(;--c>=0&&o[c]==="\\";)a=!a;return a?"|":" |"}),s=t.split(x.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(x.slashPipe,"|");return s}function L(n,e,t){let s=n.length;if(s===0)return"";let r=0;for(;r<s;){let l=n.charAt(s-r-1);if(l===e&&!t)r++;else if(l!==e&&t)r++;else break}return n.slice(0,s-r)}function Pt(n,e){if(n.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])t++;else if(n[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function Ct(n,e=0){let t=e,s="";for(let r of n)if(r===" "){let l=4-t%4;s+=" ".repeat(l),t+=l}else s+=r,t++;return s}function ce(n,e,t,s,r){let l=e.href,i=e.title||null,o=n[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:n[0].charAt(0)==="!"?"image":"link",raw:t,href:l,title:i,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}function Et(n,e,t){let s=n.match(t.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
7
7
|
`).map(l=>{let i=l.match(t.other.beginningSpace);if(i===null)return l;let[o]=i;return o.length>=r.length?l.slice(r.length):l}).join(`
|
|
8
8
|
`)}var B=class{options;rules;lexer;constructor(n){this.options=n||v}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:L(t,`
|
|
9
9
|
`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],s=Et(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=L(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:L(e[0],`
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activeadmin_mitosis_editor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nadiar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-03-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|