From ef442e95d58556ea8af31df5a092ec7f960c6667 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Fri, 10 Dec 2021 17:44:39 +0000 Subject: [PATCH] Initial commit --- .gitignore | 1 + README.md | 1 + UNLICENSE | 24 ++++++++++++++++++++++++ src/Tupfile | 1 + src/svui.nim | 14 ++++++++++++++ svui.nimble | 12 ++++++++++++ svui.prs | 3 +++ 7 files changed, 56 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 UNLICENSE create mode 100644 src/Tupfile create mode 100644 src/svui.nim create mode 100644 svui.nimble create mode 100644 svui.prs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a9ffd08 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.tup diff --git a/README.md b/README.md new file mode 100644 index 0000000..255691b --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Syndicate Vector User Interfaces diff --git a/UNLICENSE b/UNLICENSE new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/UNLICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to diff --git a/src/Tupfile b/src/Tupfile new file mode 100644 index 0000000..6795ba3 --- /dev/null +++ b/src/Tupfile @@ -0,0 +1 @@ +: ../svui.prs |> preserves_schema_nim %f |> svui.nim diff --git a/src/svui.nim b/src/svui.nim new file mode 100644 index 0000000..45167ea --- /dev/null +++ b/src/svui.nim @@ -0,0 +1,14 @@ + +import + std/typetraits, preserves, std/tables + +type + Svui*[E] {.preservesRecord: "svui".} = ref object + `attrs`*: Table[string, Preserve[E]] + `svg`*: string + +proc `$`*[E](x: Svui[E]): string = + `$`(toPreserve(x, E)) + +proc encode*[E](x: Svui[E]): seq[byte] = + encode(toPreserve(x, E)) diff --git a/svui.nimble b/svui.nimble new file mode 100644 index 0000000..ef525cd --- /dev/null +++ b/svui.nimble @@ -0,0 +1,12 @@ +# Package + +version = "0.1.0" +author = "Emery Hemingway" +description = "Syndicate Vector User Interfaces" +license = "Unlicense" +srcDir = "src" + + +# Dependencies + +requires "nim >= 1.6.0" diff --git a/svui.prs b/svui.prs new file mode 100644 index 0000000..6c8100b --- /dev/null +++ b/svui.prs @@ -0,0 +1,3 @@ +version 1. + +Svui = .