This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const childMachine = Machine({ | |
id: "child", | |
initial: "step1", | |
states: { | |
step1: { | |
entry: ['logState'], | |
on: { STEP: "step2" } | |
}, | |
step2: { | |
entry: ['logState'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Simple Slider</title> | |
</head> | |
<body> | |
<webui-slider></webui-slider> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const projectNameMachine = Machine( | |
{ | |
id: 'project-name', | |
strict: true, | |
initial: 'editing', | |
states: { | |
editing: { | |
on: { | |
PROJECT_NAME_SAVING: { | |
cond: 'validProjectName', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const updateMessage = (message) => assign({ message: (_, _e) => message }); | |
const projectnameStates = { | |
initial: 'editing', | |
states: { | |
editing: { | |
entry: ['logState'], | |
on: { | |
PROJECT_NAME_SAVING: { | |
target: '#headerMachine.saving', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HeaderMachine = Machine( | |
{ | |
id: 'header', | |
strict: true, | |
initial: 'ready', | |
context: { | |
projectName: '' | |
}, | |
states: { | |
ready: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const header = Machine({ | |
id: 'header', | |
initial: 'saved', | |
states: { | |
saved: {}, | |
title: { | |
initial: 'saved', | |
state: { | |
edited: {}, | |
saved: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const image = new Image(); | |
image.src = URL.createObjectURL(imageElement); | |
console.info('imageElement', image.src); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-02-16T16:52:23.451Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* automated gh-pages deployment | |
*/ | |
const path = require('path'); | |
const shell = require('shelljs'); | |
const { which, echo, exit, exec, cd, mkdir, rm } = shell; | |
const distRoot = 'dist'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Click on each header element to see number of clicks updated | |
<header-text-base text="Rendered with base-custom-element"></header-text-base> | |
<header-text-lit text="Rendered with lit-html"></header-text-lit> | |
<header-text-hyper text="Rendered with hyper-html"></header-text-hyper> |
NewerOlder