Skip to content

Commit 6b0018d

Browse files
committed
Lighter builds, refactor component and related code refs #47 #8
1 parent d573364 commit 6b0018d

32 files changed

+54807
-340
lines changed

docs/_modulo/modulo-build-x16nvm6m.js

Lines changed: 18173 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modulo/modulo-build-xx8r601v.js

Lines changed: 18173 additions & 0 deletions
Large diffs are not rendered by default.

docs/_modulo/modulo-build-xxt1k934.js

Lines changed: 18173 additions & 0 deletions
Large diffs are not rendered by default.

docs/demos/mdu/cparts/TestSuite.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,10 @@ modulo.register('util', function deepClone (obj, modulo) {
682682
Modulo.prototype.moduloClone = function (modulo, other) {
683683
return modulo;
684684
};
685+
modulo.registry.engines.Templater.prototype.moduloClone = function (modulo, other) {
686+
// Possible idea: Return a serializable array as args for new()
687+
return new this('', other);
688+
}
685689
if (obj === null || typeof obj !== 'object' || (obj.exec && obj.test)) {
686690
return obj;
687691
}

docs/demos/mdu/libraries/editorlib.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
font-size:=18
3838
syntax-mode="html"
3939
theme="eclipse"
40-
theme-dark="vibrant_ink"
40+
theme-dark="eclipse"
4141
theme-light="eclipse"
4242
></State>
4343

@@ -228,14 +228,17 @@ <h3>preview</h3>
228228
onchange
229229
></Props>
230230
<Template>
231+
{% comment %}
231232
<h3>Syntax highlighting</h3>
232233
<x-Options [state.bind] name="syntaxMode"
233234
options:=staticdata.modes.options
234235
></x-Options>
236+
{% endcomment %}
235237
<h3>Appearance</h3>
236238
<x-Options [state.bind] name="fontSize"
237239
options:=staticdata.editorFontSizes
238240
></x-Options>
241+
{% comment %}
239242
<h4>Themes: Light</h4>
240243
<x-Options [state.bind] name="themeLight"
241244
options:=staticdata.editorThemesLight
@@ -244,6 +247,7 @@ <h4>Themes: Dark</h4>
244247
<x-Options [state.bind] name="themeDark"
245248
options:=staticdata.editorThemesDark
246249
></x-Options>
250+
{% endcomment %}
247251
</Template>
248252
<State
249253
-store="editor_options"

docs/demos/mdu/libraries/editorlib/FileEditor.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ function editspotMount ({ el }) {
9292
const changeEv = () => cparts.datastate.propagate('value', editor.session.getValue());
9393
editor.session.on('change', _debounce(changeEv));
9494
cparts.datastate.propagate('value', editor.session.getValue());
95+
editor.session.setMode('ace/mode/html'); // XXX TODO force HTML
96+
editor.setTheme('ace/theme/eclipse'); // XXX TODO force ECLIPSE
9597
}
9698

9799
function editspotUnmount () {

docs/demos/tests/core_loading.test.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
<Test name="Processor tests">
9494
<script name="modulo.preprocessAndDefine exists">
95-
assert: modulo && modulo.preprocessAndDefine && modulo.applyProcessors
95+
assert: modulo && modulo.preprocessAndDefine && modulo.applyNextProcessor
9696
</script>
9797

9898
<script name="Preprocesses an empty component with expected values">
@@ -124,7 +124,7 @@
124124

125125
<script name="Applies processors as expected to an empty conf">
126126
const mod = window._newModulo();
127-
const result = mod.applyProcessors({ }, [ 'A', 'B', 'C' ]);
127+
const result = mod.applyNextProcessor({ }, [ 'A', 'B', 'C' ]);
128128
assert: result === false
129129
</script>
130130

@@ -136,7 +136,7 @@
136136
mod.registry.processors.testa = function (m, k, v) { runA = v; }
137137
mod.registry.processors.testb = function (m, k, v) { runB = v; }
138138
mod.registry.processors.testc = function (m, k, v) { runC = v; }
139-
const result = mod.applyProcessors({
139+
const result = mod.applyNextProcessor({
140140
TestA: 'eyy',
141141
TestB: 'bee',
142142
TestC: 'sea',
@@ -156,7 +156,7 @@
156156
let keepGoing = 0;
157157
let results = [];
158158
while (keepGoing++ < 5) {
159-
results.push(mod.applyProcessors(conf, [ 'TestA', 'TestB' ]));
159+
results.push(mod.applyNextProcessor(conf, [ 'TestA', 'TestB' ]));
160160
}
161161
const expected = JSON.stringify({ TestC: 'sea' });
162162
const actual = JSON.stringify(conf);
@@ -178,7 +178,7 @@
178178
let keepGoing = 0;
179179
let results = [];
180180
while (keepGoing++ < 5) {
181-
results.push(mod.applyProcessors(conf, [ 'TestC|TestA', 'TestB' ]));
181+
results.push(mod.applyNextProcessor(conf, [ 'TestC|TestA', 'TestB' ]));
182182
}
183183
const expected = JSON.stringify({ TestA: 'eyy' });
184184
const actual = JSON.stringify(conf);

docs/devlog/2021-01.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,5 +289,5 @@ <h3>FAQ</h3>
289289

290290

291291

292-
<script src="/_modulo/modulo-build-xxunaqg0.js"></script>
292+
<script src="/_modulo/modulo-build-xx8r601v.js"></script>
293293
</body></html>

docs/devlog/2021-09.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,5 +385,5 @@ <h1>Thoughts on framework design</h1>
385385

386386

387387

388-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
388+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
389389
</body></html>

docs/devlog/2022-03.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,5 @@ <h4>% % % % % % % % % % % %</h4>
225225

226226

227227

228-
<script src="/_modulo/modulo-build-xxunaqg0.js"></script>
228+
<script src="/_modulo/modulo-build-xx8r601v.js"></script>
229229
</body></html>

docs/devlog/2022-07.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,5 +278,5 @@ <h2>HTML-first and Web 1.0 trends</h2>
278278

279279

280280

281-
<script src="/_modulo/modulo-build-xxunaqg0.js"></script>
281+
<script src="/_modulo/modulo-build-xx8r601v.js"></script>
282282
</body></html>

docs/devlog/2022-09.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ <h4>Bad</h4>
191191
work". Here are known bugs &amp; API changes as of <del>September 2022</del> March 2023: :</p>
192192

193193
<ul>
194-
<li><em>Unknown Bugs</em> - While developing the Modulo website, I
195-
often encounter bugs and/or confusing or unclear behavior the further I
196-
stray from simple, well-tested components. If you are building anything
197-
that strays from the beaten path yourself, you might discover a few as
198-
well!</li>
194+
<li><em>Unknown Bugs</em> - While developing the websites using Modulo,
195+
I often encounter bugs and/or confusing or unclear behavior the further
196+
I stray from simple, well-tested components. If you are building
197+
anything that strays from the beaten path yourself, you might discover
198+
a few as well!</li>
199199

200200
<li><em>Nested components that use slots</em> -
201201
<a href="https://github.com/modulojs/modulo/issues/6">#6</a>
@@ -282,5 +282,5 @@ <h4>Bad</h4>
282282

283283

284284

285-
<script src="/_modulo/modulo-build-xxunaqg0.js"></script>
285+
<script src="/_modulo/modulo-build-xx8r601v.js"></script>
286286
</body></html>

docs/devlog/2022-12.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,5 @@ <h1>Intro slides</h1>
150150

151151

152152

153-
<script src="/_modulo/modulo-build-xxunaqg0.js"></script>
153+
<script src="/_modulo/modulo-build-xx8r601v.js"></script>
154154
</body></html>

docs/docs/core.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ <h4>Condensed "script" tag:</h4>
966966

967967
<div class="side-by-side-panes">
968968
<div class="editor-wrapper">
969-
<div [script.codemirror]="" modulo-ignore=""><div class="CodeMirror cm-s-eclipse" translate="no"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 4px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" readonly="" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true" style="width: 18px; pointer-events: none; bottom: 0px;"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true" style="height: 18px; pointer-events: auto;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 50px; min-height: 104px; min-width: 275.859px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 24px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">script</span> <span class="cm-attribute">Modulo</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-attribute">src</span>=<span class="cm-string">"//unpkg.com/mdu.js"</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-attribute">-src</span>=<span class="cm-string">"/static/"</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag cm-bracket">&gt;&lt;/</span><span class="cm-tag">script</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 50px; width: 1px; border-bottom: 0px solid transparent; top: 104px;"></div><div class="CodeMirror-gutters" style="display: none; height: 154px;"></div></div></div></div>
969+
<div [script.codemirror]="" modulo-ignore=""><div class="CodeMirror cm-s-eclipse" translate="no"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 4px; left: 4px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" readonly="" tabindex="0" style="position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true" style="width: 18px; pointer-events: none; bottom: 0px;"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true" style="height: 18px; pointer-events: none;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="margin-left: 0px; margin-bottom: 0px; border-right-width: 50px; min-height: 104px; min-width: 275.859px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div role="presentation" style="position: relative; outline: none;"><div class="CodeMirror-measure"></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 24px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag cm-bracket">&lt;</span><span class="cm-tag">script</span> <span class="cm-attribute">Modulo</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-attribute">src</span>=<span class="cm-string">"//unpkg.com/mdu.js"</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"> <span class="cm-attribute">-src</span>=<span class="cm-string">"/static/"</span></span></pre><pre class=" CodeMirror-line " role="presentation"><span role="presentation" style="padding-right: 0.1px;"><span class="cm-tag cm-bracket">&gt;&lt;/</span><span class="cm-tag">script</span><span class="cm-tag cm-bracket">&gt;</span></span></pre></div></div></div></div></div><div style="position: absolute; height: 50px; width: 1px; border-bottom: 0px solid transparent; top: 104px;"></div><div class="CodeMirror-gutters" style="display: none; height: 154px;"></div></div></div></div>
970970
</div>
971971

972972

@@ -992,5 +992,5 @@ <h4>Condensed "script" tag:</h4>
992992

993993

994994

995-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
995+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
996996
</body></html>

docs/docs/cparts.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

docs/docs/directives.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,5 +740,5 @@ <h2>Directives and template variables</h2>
740740

741741

742742

743-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
743+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
744744
</body></html>

docs/docs/experimental-cparts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,5 +485,5 @@ <h3>Example usage</h3>
485485

486486

487487

488-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
488+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
489489
</body></html>

docs/docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,5 +596,5 @@ <h2>Experimental</h2>
596596

597597

598598

599-
<script src="/_modulo/modulo-build-xxunaqg0.js"></script>
599+
<script src="/_modulo/modulo-build-xx8r601v.js"></script>
600600
</body></html>

docs/docs/lifecycle.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,5 +656,5 @@ <h3>renderObj and lifecycle</h3>
656656

657657

658658

659-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
659+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
660660
</body></html>

docs/docs/mdu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,5 +589,5 @@ <h1>I have 5 bananas</h1>
589589

590590

591591

592-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
592+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
593593
</body></html>

docs/docs/templating-reference.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3189,5 +3189,5 @@ <h4>upper</h4>
31893189

31903190

31913191

3192-
<script src="/_modulo/modulo-build-x15remnt.js"></script>
3192+
<script src="/_modulo/modulo-build-x16nvm6m.js"></script>
31933193
</body></html>

docs/docs/templating.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,5 +1126,5 @@ <h3>How to turn it off</h3>
11261126

11271127

11281128

1129-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
1129+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
11301130
</body></html>

docs/docs/tutorial_part1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,5 +958,5 @@ <h4>Key terms</h4>
958958

959959

960960

961-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
961+
<script src="/_modulo/modulo-build-x16nvm6m.js"></script>
962962
</body></html>

docs/docs/tutorial_part2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,5 +1235,5 @@ <h4>Next step</h4>
12351235

12361236

12371237

1238-
<script src="/_modulo/modulo-build-x15remnt.js"></script>
1238+
<script src="/_modulo/modulo-build-x16nvm6m.js"></script>
12391239
</body></html>

docs/docs/tutorial_part3.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -762,11 +762,11 @@ <h3>Embedded components and script tags</h3>
762762
even without splitting it off. This messier syntax is far from ideal, but can
763763
do in a pinch:</p>
764764

765-
<pre>&lt;cpart Script&gt;
765+
<pre>&lt;def Script&gt;
766766
console.log("Hello JavaScript world!");
767-
&lt;/cpart&gt;</pre>
767+
&lt;/def&gt;</pre>
768768

769-
<p>Note: Only use this alternative <code>cpart&nbsp;Script</code> syntax within
769+
<p>Note: Only use this alternative <code>def&nbsp;Script</code> syntax within
770770
a <code>&lt;script&nbsp;Modulo&nbsp;...</code> tag. There is no reason to use
771771
it when writing code in a separate file!</p>
772772

@@ -1054,5 +1054,5 @@ <h4>Next step</h4>
10541054

10551055

10561056

1057-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
1057+
<script src="/_modulo/modulo-build-x16nvm6m.js"></script>
10581058
</body></html>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,5 +376,5 @@ <h3>Similar<br>(but&nbsp;simpler)</h3>
376376

377377

378378

379-
<script src="/_modulo/modulo-build-x18aqu09.js"></script>
379+
<script src="/_modulo/modulo-build-xxt1k934.js"></script>
380380
</body></html>

0 commit comments

Comments
 (0)