"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("monaco-editor");function y(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const n=y(w),c={keywords:["present","rule","start","content","end","for","in","slide","dynamic","text","name","attrs","behavior","transition"],typeKeywords:["quiz","survey","form","assessment"],operators:[":","{","}","+","."],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,tokenizer:{root:[[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@typeKeywords":"type","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/@digits/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string_double"}],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,{token:"string.quote",bracket:"@open",next:"@string_single"}],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]]}};function u(){n.languages.register({id:"slide-dsl"}),n.languages.setMonarchTokensProvider("slide-dsl",c)}function b(e){return new Worker("/assets/editor.worker-CTc8sTc-.js",{name:e?.name})}function W(e){return new Worker("/assets/json.worker-7a93y_WU.js",{name:e?.name})}function h(e){return new Worker("/assets/css.worker-DkZpTr4B.js",{name:e?.name})}function S(e){return new Worker("/assets/html.worker-DV998UIK.js",{name:e?.name})}function j(e){return new Worker("/assets/ts.worker-CMaZf52j.js",{name:e?.name})}function v(e,t){switch(t){case"json":return new W;case"css":case"scss":case"less":return new h;case"html":case"handlebars":case"razor":return new S;case"typescript":case"javascript":return new j;default:return new b}}function l(){self.MonacoEnvironment||(self.MonacoEnvironment={getWorker:function(e,t){return v(e,t)}})}function D(e,t={}){l(),n.languages.getLanguages().find(a=>a.id==="slide-dsl")||u();const{value:r="",theme:s="vs-dark",fontSize:d=14,lineNumbers:m="on",minimap:g={enabled:!0},wordWrap:p="on",readOnly:f=!1,automaticLayout:k=!0,onChange:i}=t,o=n.editor.create(e,{value:r,language:"slide-dsl",theme:s,fontSize:d,lineNumbers:m,minimap:g,wordWrap:p,readOnly:f,automaticLayout:k,scrollBeyondLastLine:!1,renderWhitespace:"selection",formatOnPaste:!1,formatOnType:!1});return i&&o.onDidChangeModelContent(()=>{const a=o.getValue();i(a)}),o}function L(e,t){e.getValue()!==t&&e.setValue(t)}function M(e,t){n.editor.setTheme(t)}exports.configureMonacoWorkers=l;exports.createSlideDSLEditor=D;exports.registerSlideDSLLanguage=u;exports.setEditorTheme=M;exports.slideDSLMonarchDefinition=c;exports.updateEditorValue=L;
//# sourceMappingURL=index.cjs.map
