This repository has been archived by the owner on Mar 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix layout-throttling in node-graph (#210)
* fix layout-throttling in node-graph * remove commented code * stowawy features
- Loading branch information
Scott J. Miles
authored
Dec 11, 2022
1 parent
bc19e98
commit b741511
Showing
23 changed files
with
326 additions
and
78 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2022 Google LLC All rights reserved. | ||
* Use of this source code is governed by a BSD-style | ||
* license that can be found in the LICENSE file. | ||
*/ | ||
({ | ||
update(inputs, state) { | ||
let {value, connectedValue, connectedValue1} = inputs; | ||
if (connectedValue1 && connectedValue1 !== state.lastInputs?.connectedValue1) { | ||
value = connectedValue1; | ||
} | ||
if (connectedValue && connectedValue !== state.lastInputs?.connectedValue) { | ||
value = connectedValue; | ||
} | ||
state.lastInputs = {...inputs}; | ||
state.value = value; | ||
return {value}; | ||
}, | ||
render({label}, {value}) { | ||
return { | ||
label: label ?? '', | ||
value: value ?? '' | ||
}; | ||
}, | ||
onLabelChange({eventlet: {value}}) { | ||
return {label: value}; | ||
}, | ||
onFieldChange({eventlet: {value}}, state) { | ||
state.value = value; | ||
return {value}; | ||
}, | ||
template: html` | ||
<style> | ||
:host { | ||
padding: 0 6px; | ||
display: flex; | ||
} | ||
[label] { | ||
background: inherit; | ||
font-weight: bold; | ||
font-size: 75%; | ||
border: none; | ||
text-align: right; | ||
width: 8em; | ||
} | ||
[field] { | ||
padding: 6px 9px; | ||
border-radius: 4px; | ||
border: 1px solid #88888888; | ||
font-size: 1em; | ||
font-family: 'Goole Sans', sans-serif; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
[delim] { | ||
padding-right: 12px; | ||
} | ||
</style> | ||
<div flex bar> | ||
<input label value="{{label}}" on-change="onLabelChange"> | ||
<span delim>:</span> | ||
<textarea field value="{{value}}" on-change="onFieldChange"></textarea> | ||
</div> | ||
` | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2022 Google LLC All rights reserved. | ||
* Use of this source code is governed by a BSD-style | ||
* license that can be found in the LICENSE file. | ||
*/ | ||
export const MultilineTextFieldNode = { | ||
$meta: { | ||
id: 'Text', | ||
category: 'Field' | ||
}, | ||
$stores: { | ||
label: { | ||
$type: 'String', | ||
$value: 'text field' | ||
}, | ||
value: { | ||
$type: 'String', | ||
$value: 'value' | ||
} | ||
}, | ||
field: { | ||
$kind: '$library/Fields/MultilineTextField', | ||
$inputs: ['label', 'value'], | ||
$outputs: ['label', 'value'] | ||
} | ||
}; |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2022 Google LLC All rights reserved. | ||
* Use of this source code is governed by a BSD-style | ||
* license that can be found in the LICENSE file. | ||
*/ | ||
export const ListenerNode = { | ||
$meta: { | ||
id: 'ListenerNode', | ||
displayName: 'Listener', | ||
category: 'Media' | ||
}, | ||
$stores: { | ||
mediaDeviceState: { | ||
$type: 'MedaDeviceState', | ||
$value: { | ||
isMicEnabled: false | ||
}, | ||
noinspect: true | ||
}, | ||
mediaDevices: { | ||
$type: '[JSON]', | ||
noinspect: true | ||
}, | ||
transcript: { | ||
$type: 'String', | ||
$value: '', | ||
noinspect: true, | ||
nomonitor: true | ||
} | ||
}, | ||
SpeechRecognizer: { | ||
$kind: '$library/NewMedia/SpeechRecognizer', | ||
$inputs: ['mediaDeviceState'], | ||
$outputs: ['transcript', 'mediaDeviceState'], | ||
$slots: { | ||
device: { | ||
deviceUx: { | ||
$kind: 'Media/DeviceUx', | ||
$inputs: ['mediaDevices', 'mediaDeviceState'], | ||
$outputs: ['mediaDeviceState'] | ||
}, | ||
defaultStream: { | ||
$kind: 'Media/MediaStream', | ||
$inputs: ['mediaDeviceState'], | ||
$outputs: ['mediaDevices'] | ||
} | ||
} | ||
} | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* @license | ||
* Copyright (c) 2022 Google LLC All rights reserved. | ||
* Use of this source code is governed by a BSD-style | ||
* license that can be found in the LICENSE file. | ||
*/ | ||
export const MultilineTextFieldNode = { | ||
$meta: { | ||
id: 'MultilineTextFieldNode', | ||
displayName: 'Multiline Text Field', | ||
category: 'Fields' | ||
}, | ||
$stores: { | ||
label: { | ||
$type: 'String', | ||
$value: 'text field' | ||
}, | ||
value: { | ||
$type: 'String', | ||
$value: 'value' | ||
}, | ||
connectedValue: { | ||
$type: 'String', | ||
connection: true | ||
}, | ||
outputValue: { | ||
$type: 'String', | ||
$value: '' | ||
} | ||
}, | ||
field: { | ||
$kind: '$library/Fields/MultilineTextField', | ||
$inputs: ['label', 'value', 'connectedValue'], | ||
$outputs: ['label', {value: 'outputValue'}] | ||
} | ||
}; |
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
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
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
Oops, something went wrong.