components
All repositories: gitoria
1.6 KB
// demo.hl — `/code-editor`: two editors (Hybriel and JavaScript) and the text each holds shown below. The editor announces a change// with a bubbling DOM `input` event on its hidden field: `e.target.value` is the text.parent '../main.hl'import CodeEditor from './code-editor.hl'__title = 'Code editor · Hybriel components'static NL = ""static TAB = " "String hl = '// a Hybriel component' + NL + 'String title = \'Hello\'' + NL + NL + 'greet(name) {' + NL + TAB + 'return "Hi " + name' + NL + '}' + NL + NL + 'View {' + NL + TAB + 'h1 { title }' + NL + '}'String js = 'function add(a, b) {' + NL + TAB + '/* sum */' + NL + TAB + 'return a + b + 42' + NL + '}' + NL + 'const text = `sum: ${add(1, 2)}`'View {codeEditorDemo {h1 { "Code editor" }p { class = "muted" "Type code: it is coloured while you type and the line numbers follow. Tab indents, Shift+Tab outdents, Ctrl+Z / Ctrl+Shift+Z undo and redo, Enter keeps the indent, brackets and quotes close themselves." }form { id = "code-form" method = "get" action = "/code-editor" on input(e) { emit demoCode(e) }h2 { "Hybriel" }CodeEditor { name = "hybriel" value = hl language = "hybriel" }pre { id = "code-value-hybriel" hl }h2 { "JavaScript, indented with 2 spaces" }CodeEditor { name = "js" value = js language = "js" spaces = 2 }pre { id = "code-value-js" js }p { button { type = "submit" "Send (posts both texts)" } }}p { a { id = "readme" href = "/code-editor/README.md" "README (how to use it)" } }}}on demoCode(e) {if (e.target.name == 'hybriel') { hl = e.target.value }if (e.target.name == 'js') { js = e.target.value }}
Branches
Latest commits
- 337ca075MD1 gate check measures frames in the page, not milliseconds from outside, and takes the middle load (components#30)mre
- f5f131c5Record AP29 autoplay comparisons and passing gatesmre
- 51c38187Gate media autoplay on first load and after client mountmre
- a3f2223dRecord successful B44 deployment and live proofmre
- 06c1e021Record passing B44 browser rerunmre
- c9861533Record B44 component proof and browser gate blockermre
- 1b7413beIgnore detached media events and space demo option outputsmre
- ca3b4959Re-vendor complete Hybriel plugins and runtime to day44mre
- df9e7df9Last-item checks run in the browser gate (components#26 fixed on day41); media-player loop is a plain Booleanmre
- 895a5afcRe-vendor complete Hybriel plugins and runtime to day41mre
- 16006bb3Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 88397fc3Re-vendor complete Hybriel plugins and runtime to day39mre
- 9b872cedRecord IC28 deployment and live icon verificationmre
- 46fefaa7Count the icons entry in the offline home-page checkmre
- c7e14cabRecord IC28 rerun and unchanged-main baseline comparisonmre
- 5e090ffdRecord IC28 review evidence and gate resultsmre
- adfe2c4dAdd shuffle, repeat and repeatOne shared iconsmre
- c96709c8media-player: skip = false and repeat = 'one' options (jukebox#19)mre
- bd4aa808Record VL24 deployment and live verificationmre
- e5b98ecfRun virtual-list gate before deploymentmre