Initial commit

master
David Vogel 11 months ago
commit 7d325f6da0

80
.gitignore vendored

@ -0,0 +1,80 @@
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,go
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,visualstudiocode,go
### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
### Go Patch ###
/vendor/
/Godeps/
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.toptal.com/developers/gitignore/api/windows,visualstudiocode,go
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch dev server on windows",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/scripts/devserver.go",
"env": {
"GOOS": "windows",
"GOARCH": "amd64"
},
"args": []
}
]
}

@ -0,0 +1,20 @@
{
"cSpell.words": [
"domrender",
"ldflags",
"Segoe",
"simplehttp",
"vgrouter",
"Vogel",
"vugu",
"vugugen"
],
"licenser.author": "David Vogel",
"licenser.license": "MIT",
"licenser.projectName": "D3vugu-components",
"go.toolsEnvVars": {
"GOOS": "js",
"GOARCH": "wasm"
},
"liveServer.settings.port": 5501
}

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 David Vogel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,11 @@
# d3vugu-components
A collection of useful components to be used with [vugu](https://www.vugu.org/).
## Generate components
Use `go generate ./...` at the root of this repository to regenerate all components.
## Run Vugu development server
Run `go run ./scripts/dev-server`.

@ -0,0 +1,25 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package input
import (
"github.com/vugu/vgrouter"
"github.com/vugu/vugu"
)
type ButtonNav struct {
vgrouter.NavigatorRef
AttrMap vugu.AttrMap
SymbolSlot vugu.Builder // Slot for the symbol.
DefaultSlot vugu.Builder
URL string
}
func (c *ButtonNav) handleClick(event vugu.DOMEvent) {
c.Navigate(c.URL, nil)
}

@ -0,0 +1,25 @@
<div vg-attr="c.AttrMap" class="d3c-1633424238" @click="c.handleClick(event)">
<vg-comp expr="c.SymbolSlot"></vg-comp><vg-comp expr="c.DefaultSlot"></vg-comp>
</div>
<style>
.d3c-1633424238 {
padding: 8px;
margin: 4px;
border-radius: 4px;
}
.d3c-1633424238 > * {
margin-right: 12px;
height: 16px;
}
.d3c-1633424238:hover {
background-color: RGBA(127, 127, 127, 0.1);
}
.d3c-1633424238-selected {
background-color: RGBA(127, 127, 127, 0.2);
}
</style>

@ -0,0 +1,64 @@
package input
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
func (c *ButtonNav) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633424238"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
vgn.DOMEventHandlerSpecList = append(vgn.DOMEventHandlerSpecList, vugu.DOMEventHandlerSpec{
EventType: "click",
Func: func(event vugu.DOMEvent) { c.handleClick(event) },
// TODO: implement capture, etc. mostly need to decide syntax
})
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.SymbolSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
{
var vgcomp vugu.Builder = c.DefaultSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1633424238 {\n\t\tpadding: 8px;\n\t\tmargin: 4px;\n\t\tborder-radius: 4px;\n\t}\n\n\t.d3c-1633424238 > * {\n\t\tmargin-right: 12px;\n\t\t\n\t\theight: 16px;\n\t}\n\n\t.d3c-1633424238:hover {\n\t\tbackground-color: RGBA(127, 127, 127, 0.1);\n\t}\n\n\t.d3c-1633424238-selected {\n\t\tbackground-color: RGBA(127, 127, 127, 0.2);\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,15 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package input
import "github.com/vugu/vugu"
type Button struct {
AttrMap vugu.AttrMap
SymbolSlot vugu.Builder // Slot for the symbol.
DefaultSlot vugu.Builder
}

@ -0,0 +1,25 @@
<div vg-attr="c.AttrMap" class="d3c-1633424238">
<vg-comp expr="c.SymbolSlot"></vg-comp><vg-comp expr="c.DefaultSlot"></vg-comp>
</div>
<style>
.d3c-1633424238 {
padding: 8px;
margin: 4px;
border-radius: 4px;
}
.d3c-1633424238 > * {
margin-right: 12px;
height: 16px;
}
.d3c-1633424238:hover {
background-color: RGBA(127, 127, 127, 0.1);
}
.d3c-1633424238-selected {
background-color: RGBA(127, 127, 127, 0.2);
}
</style>

@ -0,0 +1,59 @@
package input
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
func (c *Button) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633424238"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.SymbolSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
{
var vgcomp vugu.Builder = c.DefaultSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1633424238 {\n\t\tpadding: 8px;\n\t\tmargin: 4px;\n\t\tborder-radius: 4px;\n\t}\n\n\t.d3c-1633424238 > * {\n\t\tmargin-right: 12px;\n\t\t\n\t\theight: 16px;\n\t}\n\n\t.d3c-1633424238:hover {\n\t\tbackground-color: RGBA(127, 127, 127, 0.1);\n\t}\n\n\t.d3c-1633424238-selected {\n\t\tbackground-color: RGBA(127, 127, 127, 0.2);\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,8 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package input
//go:generate vugugen

@ -0,0 +1,16 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package layout
import (
"github.com/vugu/vugu"
)
type Container struct {
AttrMap vugu.AttrMap
DefaultSlot vugu.Builder
}

@ -0,0 +1,9 @@
<div vg-attr="c.AttrMap" class="d3c-1634593574">
<vg-comp expr="c.DefaultSlot"></vg-comp>
</div>
<style>
.d3c-1634593574 {
margin: 20px;
}
</style>

@ -0,0 +1,50 @@
package layout
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
func (c *Container) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1634593574"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.DefaultSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1634593574 {\n\t\tmargin: 20px;\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,8 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package layout
//go:generate vugugen

@ -0,0 +1,8 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package navigation
//go:generate vugugen

@ -0,0 +1,22 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package navigation
import "github.com/vugu/vugu"
type Sidebar struct {
AttrMap vugu.AttrMap
Entries vugu.Builder // Main content of the sidebar. Basically the menu entries.
BottomEntries vugu.Builder // Static bottom part of the sidebar.
Body vugu.Builder // The body contains the content that is right to or behind the sidebar.
Width float64 // Width of the sidebar in DOM pixels.
}
func (s *Sidebar) Init(ctx vugu.InitCtx) {
s.Width = 300 // Default width in pixels.
}

@ -0,0 +1,54 @@
<div vg-attr="c.AttrMap" class="d3c-1633357633">
<div class="d3c-1633357633-sidebar" :style='fmt.Sprintf("width: %vpx;", c.Width)'>
<div>
<input:Button>
<vg-slot name="SymbolSlot"><icons:LGlobalNav></icons:LGlobalNav></vg-slot>
</input:Button>
</div>
<div>
<vg-comp expr="c.Entries"></vg-comp>
</div>
<div class="d3c-1633357633-spacer"></div>
<div>
<vg-comp expr="c.BottomEntries"></vg-comp>
</div>
</div>
<div class="d3c-1633357633-body">
<vg-comp expr="c.Body"></vg-comp>
</div>
</div>
<style>
.d3c-1633357633 {
width: 100%;
height: 100%;
position: absolute;
display: flex;
}
.d3c-1633357633-sidebar {
height: 100%;
border-right: 1px solid RGBA(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.d3c-1633357633-spacer {
flex-grow: 1;
}
.d3c-1633357633-body {
overflow: auto;
flex-grow: 1;
flex-shrink: 1;
}
</style>
<script type="application/x-go">
import (
"github.com/Dadido3/d3vugu-components/icons"
"github.com/Dadido3/d3vugu-components/components/input"
)
</script>

@ -0,0 +1,172 @@
package navigation
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
import (
"github.com/Dadido3/d3vugu-components/components/input"
"github.com/Dadido3/d3vugu-components/icons"
)
func (c *Sidebar) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633-sidebar"}}}
vgparent.AppendChild(vgn)
vgn.AddAttrInterface("style", fmt.Sprintf("width: %vpx;", c.Width))
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xF056B7F7D7F7A2C6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil {
// create new one if needed
vgcomp = new(input.Button)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.SymbolSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn
_ = vgparent
{
vgcompKey := vugu.MakeCompKey(0x2C2D8D3889E31C6A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*icons.LGlobalNav)
if vgcomp == nil {
// create new one if needed
vgcomp = new(icons.LGlobalNav)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.Entries
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633-spacer"}}}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML(vugu.HTML(""))
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.BottomEntries
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1633357633-body"}}}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.Body
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1633357633 {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tposition: absolute;\n\t\tdisplay: flex;\n\t}\n\n\t.d3c-1633357633-sidebar {\n\t\theight: 100%;\n\t\tborder-right: 1px solid RGBA(0, 0, 0, 0.05);\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tflex-shrink: 0;\n\t}\n\n\t.d3c-1633357633-spacer {\n\t\tflex-grow: 1;\n\t}\n\n\t.d3c-1633357633-body {\n\t\toverflow: auto;\n\t\tflex-grow: 1;\n\t\tflex-shrink: 1;\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,9 @@
package view
import "github.com/vugu/vugu"
type CodeInline struct {
AttrMap vugu.AttrMap
DefaultSlot vugu.Builder
}

@ -0,0 +1,11 @@
<span vg-attr="c.AttrMap" class="d3c-1634910850">
<vg-comp expr="c.DefaultSlot"></vg-comp>
</span>
<style>
.d3c-1634910850 {
border-radius: 4px;
font-family: monospace;
background-color: RGBA(127, 127, 127, 0.1);
}
</style>

@ -0,0 +1,50 @@
package view
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
func (c *CodeInline) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "span", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1634910850"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.DefaultSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1634910850 {\n\t\tborder-radius: 4px;\n\t\tfont-family: monospace;\n\t\tbackground-color: RGBA(127, 127, 127, 0.1);\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,9 @@
package view
import "github.com/vugu/vugu"
type Code struct {
AttrMap vugu.AttrMap
DefaultSlot vugu.Builder
}

@ -0,0 +1,12 @@
<div vg-attr="c.AttrMap" class="d3c-1634910850">
<vg-comp expr="c.DefaultSlot"></vg-comp>
</div>
<style>
.d3c-1634910850 {
border-radius: 4px;
padding-left: 8px;
font-family: monospace;
background-color: RGBA(127, 127, 127, 0.1);
}
</style>

@ -0,0 +1,50 @@
package view
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
func (c *Code) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-1634910850"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
{
var vgcomp vugu.Builder = c.DefaultSlot
if vgcomp != nil {
vgin.BuildEnv.WireComponent(vgcomp)
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Data: "style", Attr: []vugu.VGAttribute(nil)}
{
vgn.AppendChild(&vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t.d3c-1634910850 {\n\t\tborder-radius: 4px;\n\t\tpadding-left: 8px;\n\t\tfont-family: monospace;\n\t\tbackground-color: RGBA(127, 127, 127, 0.1);\n\t}\n", Attr: []vugu.VGAttribute(nil)})
}
vgout.AppendCSS(vgn)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,8 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package view
//go:generate vugugen

@ -0,0 +1,8 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package main
//go:generate vugugen

@ -0,0 +1,14 @@
module github.com/Dadido3/d3vugu-components
go 1.17
require (
github.com/vugu/vgrouter v0.0.0-20200725205318-eeb478c42e5d
github.com/vugu/vjson v0.0.0-20200505061711-f9cbed27d3d9
github.com/vugu/vugu v0.3.5-0.20221005220046-fff6df3754fe
)
require (
github.com/vugu/html v0.0.0-20190914200101-c62dc20b8289 // indirect
github.com/vugu/xxhash v0.0.0-20191111030615-ed24d0179019 // indirect
)

@ -0,0 +1,45 @@
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
github.com/chromedp/cdproto v0.0.0-20191009033829-c22f49c9ff0a/go.mod h1:PfAWWKJqjlGFYJEidUM6aVIWPr0EpobeyVWEEmplX7g=
github.com/chromedp/chromedp v0.5.1/go.mod h1:3NMfuKTrKNr8PWEvHzdzZ57PK4jm9zW1C5nKiaWdxcM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/knq/sysutil v0.0.0-20191005231841-15668db23d08/go.mod h1:dFWs1zEqDjFtnBXsd1vPOZaLsESovai349994nHx3e0=
github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/tdewolff/minify/v2 v2.7.3/go.mod h1:BkDSm8aMMT0ALGmpt7j3Ra7nLUgZL0qhyrAHXwxcy5w=
github.com/tdewolff/parse/v2 v2.4.2/go.mod h1:WzaJpRSbwq++EIQHYIRTpbYKNA3gn9it1Ik++q4zyho=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/vugu/html v0.0.0-20190914200101-c62dc20b8289 h1:w3hfLuU5tKlcf+hhfmx6UZ5IC1h5M69dL9/6uugfLj8=
github.com/vugu/html v0.0.0-20190914200101-c62dc20b8289/go.mod h1:Y3pLGz8dZUSrB9SARXqFmtW8RNs4HIGAr0+JaWL31Vg=
github.com/vugu/vgrouter v0.0.0-20200725205318-eeb478c42e5d h1:9XOp5CHgCF2xXd7YzcB3Mo2d5jfL+NNVPOnBEc0LGMU=
github.com/vugu/vgrouter v0.0.0-20200725205318-eeb478c42e5d/go.mod h1:C+Uj+375LwtFuL5dNIMLNv/miLesGINzR04oWTyDb40=
github.com/vugu/vjson v0.0.0-20191111004939-722507e863cb/go.mod h1:z7mAqSUjRDMQ09NIO18jG2llXMHLnUHlZ3/8MEMyBPA=
github.com/vugu/vjson v0.0.0-20200505061711-f9cbed27d3d9 h1:0cwYt2uGUAwxOYF6zAkVvCKWt8zOV3JhQqjvwKb6jf0=
github.com/vugu/vjson v0.0.0-20200505061711-f9cbed27d3d9/go.mod h1:z7mAqSUjRDMQ09NIO18jG2llXMHLnUHlZ3/8MEMyBPA=
github.com/vugu/vugu v0.3.0/go.mod h1:RFwOrlJHEkdZvrFcde4d6c0/7SqlRA8E4l2yz1Rs8xM=
github.com/vugu/vugu v0.3.5-0.20221005220046-fff6df3754fe h1:noKPn5IWVr2aDtP7f41ZpbwwYWNtk3hFFUnq3swgREc=
github.com/vugu/vugu v0.3.5-0.20221005220046-fff6df3754fe/go.mod h1:E0NT8+F8KDmLDKzYTNySlcvljJdfOpBHzcMJ/0bYLfM=
github.com/vugu/xxhash v0.0.0-20191111030615-ed24d0179019 h1:8NGiD5gWbVGObr+lnqcbM2rcOQBO6mr+m19BIblCdho=
github.com/vugu/xxhash v0.0.0-20191111030615-ed24d0179019/go.mod h1:PrBK6+LJXwb+3EnJTHo43Uh4FhjFFwvN4jKk4Zc5zZ8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190912160710-24e19bdeb0f2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sys v0.0.0-20181031143558-9b800f95dbbc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200724161237-0e2f3a69832c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

@ -0,0 +1,160 @@
<!DOCTYPE html>
<html>
<head>
<title>D3vugu-components examples</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/npm/text-encoding@0.7.0/lib/encoding.min.js"></script>
<script src="/wasm_exec.js"></script>
<style>
html {
font-family: "Segoe UI", sans-serif;
}
body {
margin: 0;
}
.d3c-icon-stroke {
stroke: black;
}
.d3c-icon-fill {
fill: black;
}
</style>
<style>
.d3c-1633357633 {
width: 100%;
height: 100%;
position: absolute;
display: flex;
}
.d3c-1633357633-sidebar {
height: 100%;
border-right: 1px solid RGBA(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
flex-shrink: 0;
background-color: white;
position: relative;
}
.d3c-1633357633-spacer {
flex-grow: 1;
}
.d3c-1633357633-body {
overflow: auto;
flex-grow: 1;
flex-shrink: 1;
padding: 0 16px;
}
</style>
<style>
.d3c-1633424238 {
padding: 8px;
margin: 4px;
border-radius: 4px;
}
.d3c-1633424238>* {
margin-right: 12px;
height: 16px;
}
.d3c-1633424238:hover {
background-color: RGBA(127, 127, 127, 0.1);
}
.d3c-1633424238-selected {
background-color: RGBA(127, 127, 127, 0.2);
}
</style>
</head>
<body>
<div style="width: 100vw; height: 100wh;">
<div class="d3c-1633357633">
<div class="d3c-1633357633-sidebar" style="width: 300px;">
<div>
<div class="d3c-1633424238">
<svg viewBox="0 0 16 16">
<path class="d3c-icon-stroke" d="M0.5 8.5l15 0m-15 5l15 0m-15 -10l15 0" stroke="black"
stroke-width="1" stroke-linejoin="round" stroke-linecap="round" fill="none"></path>
</svg>
</div>
</div>
<div>
<div class="d3c-1633424238">
<svg viewBox="0 0 16 16">
<polygon class="d3c-icon-stroke"
points="0.5,15.5 0.5,5.5 8,0.5 15.5,5.5 15.5,15.5 9.5,15.5 9.5,10.5 6.5,10.5 6.5,15.5"
stroke="black" stroke-width="1" stroke-linejoin="round" fill="none"></polygon>
</svg>Entry 1
</div>
<div class="d3c-1633424238">
<svg viewBox="0 0 16 16">
<path class="d3c-icon-stroke" d="M0.5 8.5l15 0m-15 5l15 0m-15 -10l15 0" stroke="black"
stroke-width="1" stroke-linejoin="round" stroke-linecap="round" fill="none"></path>
</svg>Icons
</div>
<div class="d3c-1633424238">
<svg viewBox="0 0 16 16"></svg>Entry 3
</div>
</div>
<div class="d3c-1633357633-spacer"></div>
<div>
<div class="d3c-1633424238">
<svg viewBox="0 0 16 16">
<path class="d3c-icon-stroke"
d="M8.001 10.504c1.384,0 2.503,-1.119 2.503,-2.503 0,-1.384 -1.119,-2.503 -2.503,-2.503 -1.384,0 -2.503,1.119 -2.503,2.503 0,1.384 1.119,2.503 2.503,2.503zm-5.332 -1.157c-0.218,-0.87 -0.225,-1.797 0,-2.693l-1.784 -1.03c0.157,-0.468 0.362,-0.929 0.62,-1.374 0.256,-0.444 0.552,-0.853 0.88,-1.224l1.784 1.031c0.645,-0.625 1.444,-1.095 2.332,-1.346l0 -2.061c0.484,-0.098 0.986,-0.15 1.5,-0.15 0.514,0 1.016,0.052 1.5,0.15l0.001 2.063c0.863,0.246 1.668,0.7 2.33,1.344l1.785 -1.031c0.327,0.371 0.624,0.78 0.88,1.225 0.257,0.444 0.463,0.905 0.62,1.373l-1.786 1.033c0.219,0.87 0.227,1.795 0.001,2.69l1.785 1.03c-0.157,0.469 -0.363,0.93 -0.62,1.375 -0.256,0.444 -0.553,0.853 -0.88,1.224l-1.787 -1.032c-0.645,0.625 -1.441,1.095 -2.329,1.347l0 2.061c-0.484,0.098 -0.986,0.15 -1.5,0.15 -0.514,0 -1.016,-0.052 -1.5,-0.15l-0.001 -2.063c-0.864,-0.246 -1.668,-0.701 -2.331,-1.345l-1.784 1.032c-0.328,-0.371 -0.624,-0.78 -0.88,-1.225 -0.258,-0.444 -0.463,-0.905 -0.62,-1.374l1.784 -1.03z"
stroke="black" stroke-width="1" stroke-linejoin="round" fill="none"></path>
</svg>Bottom
</div>
</div>
</div>
<div class="d3c-1633357633-body">
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
<p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
</div>
</div>
</div>
<script>
var wasmSupported = (typeof WebAssembly === "object");
if (wasmSupported) {
if (!WebAssembly.instantiateStreaming) {
WebAssembly.instantiateStreaming = async (resp, importObject) => {
const source = await (await resp).arrayBuffer();
return await WebAssembly.instantiate(source, importObject);
};
}
const go = new Go();
WebAssembly.instantiateStreaming(fetch("/main.wasm"), go.importObject).then((result) => {
go.run(result.instance);
});
} else {
document.getElementById("vugu_mount_point").innerHTML = 'This application requires WebAssembly support. Please upgrade your browser.';
}
</script>
</body>
</html>

@ -0,0 +1,29 @@
# Icon set
This is a set of icons inspired by the Segoe Fluent Icons.
## CSS classes
The following CSS class can be used to define the line color of icons:
```css
.d3c-icon-stroke {
stroke: red;
}
.d3c-icon-fill {
fill: red;
}
```
To change the accent color of icons that support this:
```css
.d3c-icon-accent-stroke {
stroke: green;
}
.d3c-icon-accent-fill {
fill: green;
}
```

@ -0,0 +1,7 @@
<svg viewBox="0 0 16 16" vg-attr="c.AttrMap"></svg>
<script type="application/x-go">
type Empty struct{
AttrMap vugu.AttrMap
}
</script>

After

Width:  |  Height:  |  Size: 142 B

@ -0,0 +1,32 @@
package icons
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
type Empty struct {
AttrMap vugu.AttrMap
}
func (c *Empty) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "svg", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "viewBox", Val: "0 0 16 16"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,8 @@
// Copyright (c) 2021 David Vogel
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
package icons
//go:generate vugugen

@ -0,0 +1,9 @@
<svg viewBox="0 0 16 16" vg-attr="c.AttrMap">
<path class="d3c-icon-stroke" d="M13.5 9.5l-6 6 -6 -6m6 6l0 -15" stroke="black" stroke-width="1" stroke-linejoin="round" stroke-linecap="round" fill="none"/>
</svg>
<script type="application/x-go">
type LArrowDown struct{
AttrMap vugu.AttrMap
}
</script>

After

Width:  |  Height:  |  Size: 307 B

@ -0,0 +1,42 @@
package icons
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
type LArrowDown struct {
AttrMap vugu.AttrMap
}
func (c *LArrowDown) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "svg", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "viewBox", Val: "0 0 16 16"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "path", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-icon-stroke"}, vugu.VGAttribute{Namespace: "", Key: "d", Val: "M13.5 9.5l-6 6 -6 -6m6 6l0 -15"}, vugu.VGAttribute{Namespace: "", Key: "stroke", Val: "black"}, vugu.VGAttribute{Namespace: "", Key: "stroke-width", Val: "1"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linejoin", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linecap", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "fill", Val: "none"}}}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,9 @@
<svg viewBox="0 0 16 16" vg-attr="c.AttrMap">
<path class="d3c-icon-stroke" d="M6.5 14.5l-6 -6 6 -6m-6 6l15 0" stroke="black" stroke-width="1" stroke-linejoin="round" stroke-linecap="round" fill="none"/>
</svg>
<script type="application/x-go">
type LArrowLeft struct{
AttrMap vugu.AttrMap
}
</script>

After

Width:  |  Height:  |  Size: 307 B

@ -0,0 +1,42 @@
package icons
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
type LArrowLeft struct {
AttrMap vugu.AttrMap
}
func (c *LArrowLeft) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "svg", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "viewBox", Val: "0 0 16 16"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "path", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-icon-stroke"}, vugu.VGAttribute{Namespace: "", Key: "d", Val: "M6.5 14.5l-6 -6 6 -6m-6 6l15 0"}, vugu.VGAttribute{Namespace: "", Key: "stroke", Val: "black"}, vugu.VGAttribute{Namespace: "", Key: "stroke-width", Val: "1"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linejoin", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linecap", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "fill", Val: "none"}}}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,9 @@
<svg viewBox="0 0 16 16" vg-attr="c.AttrMap">
<path class="d3c-icon-stroke" d="M9.5 14.5l6 -6 -6 -6m6 6l-15 0" stroke="black" stroke-width="1" stroke-linejoin="round" stroke-linecap="round" fill="none"/>
</svg>
<script type="application/x-go">
type LArrowRight struct{
AttrMap vugu.AttrMap
}
</script>

After

Width:  |  Height:  |  Size: 308 B

@ -0,0 +1,42 @@
package icons
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
type LArrowRight struct {
AttrMap vugu.AttrMap
}
func (c *LArrowRight) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "svg", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "viewBox", Val: "0 0 16 16"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "path", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-icon-stroke"}, vugu.VGAttribute{Namespace: "", Key: "d", Val: "M9.5 14.5l6 -6 -6 -6m6 6l-15 0"}, vugu.VGAttribute{Namespace: "", Key: "stroke", Val: "black"}, vugu.VGAttribute{Namespace: "", Key: "stroke-width", Val: "1"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linejoin", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linecap", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "fill", Val: "none"}}}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value

@ -0,0 +1,9 @@
<svg viewBox="0 0 16 16" vg-attr="c.AttrMap">
<path class="d3c-icon-stroke" d="M13.5 6.5l-6 -6 -6 6m6 -6l0 15" stroke="black" stroke-width="1" stroke-linejoin="round" stroke-linecap="round" fill="none"/>
</svg>
<script type="application/x-go">
type LArrowUp struct{
AttrMap vugu.AttrMap
}
</script>

After

Width:  |  Height:  |  Size: 305 B

@ -0,0 +1,42 @@
package icons
// Code generated by vugu via vugugen. Please regenerate instead of editing or add additional code in a separate file. DO NOT EDIT.
import "fmt"
import "reflect"
import "github.com/vugu/vjson"
import "github.com/vugu/vugu"
import js "github.com/vugu/vugu/js"
type LArrowUp struct {
AttrMap vugu.AttrMap
}
func (c *LArrowUp) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgout = &vugu.BuildOut{}
var vgiterkey interface{}
_ = vgiterkey
var vgn *vugu.VGNode
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "svg", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "viewBox", Val: "0 0 16 16"}}}
vgout.Out = append(vgout.Out, vgn) // root for output
vgn.AddAttrList(c.AttrMap)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "svg", Data: "path", Attr: []vugu.VGAttribute{vugu.VGAttribute{Namespace: "", Key: "class", Val: "d3c-icon-stroke"}, vugu.VGAttribute{Namespace: "", Key: "d", Val: "M13.5 6.5l-6 -6 -6 6m6 -6l0 15"}, vugu.VGAttribute{Namespace: "", Key: "stroke", Val: "black"}, vugu.VGAttribute{Namespace: "", Key: "stroke-width", Val: "1"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linejoin", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "stroke-linecap", Val: "round"}, vugu.VGAttribute{Namespace: "", Key: "fill", Val: "none"}}}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n"}
vgparent.AppendChild(vgn)
}
return vgout
}
// 'fix' unused imports
var _ fmt.Stringer
var _ reflect.Type
var _ vjson.RawMessage
var _ js.Value