initial commit

This commit is contained in:
hippoz 2021-10-26 18:18:48 +03:00
commit 808f67d527
Signed by: hippoz
GPG key ID: 7C52899193467641
13 changed files with 5423 additions and 0 deletions

68
package.json Normal file
View file

@ -0,0 +1,68 @@
{
"name": "waffletv",
"productName": "waffletv",
"version": "1.0.0",
"description": "My Electron application description",
"main": "src/index.js",
"scripts": {
"start": "concurrently \"npm:svelte-dev\" \"electron-forge start\"",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "echo \"No linting configured\"",
"svelte-build": "rollup -c",
"svelte-dev": "rollup -c -w",
"svelte-start": "sirv public"
},
"keywords": [],
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "waffletv"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
},
"dependencies": {
"concurrently": "^6.3.0",
"electron-reload": "^2.0.0-alpha.1",
"electron-squirrel-startup": "^1.0.0",
"sirv-cli": "^1.0.0"
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.61",
"@electron-forge/maker-deb": "^6.0.0-beta.61",
"@electron-forge/maker-rpm": "^6.0.0-beta.61",
"@electron-forge/maker-squirrel": "^6.0.0-beta.61",
"@electron-forge/maker-zip": "^6.0.0-beta.61",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"electron": "15.3.0",
"rollup": "^2.3.4",
"rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^7.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0"
}
}

1
public/build/bundle.css Normal file
View file

@ -0,0 +1 @@
main.svelte-13e5nw0{padding:0;margin:0;width:100vw;height:100vh;overflow:hidden;background-color:var(--background-color);color:var(--foreground-color)}.app-grid.svelte-197phgo{display:grid;grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));grid-template-rows:1fr 1fr 1fr;gap:0px 0px;grid-auto-flow:row dense;width:clamp(10%, 1000px, 90%);height:100%;margin:auto;margin-top:5%}.app-tile.svelte-1mfex3a{padding:0.8em;margin:0.6em;background-color:var(--fuzzy-wuzzy);border-radius:1.5rem;min-width:2em;min-height:2em;border:none;font-size:3em;user-select:none;box-sizing:border-box}.app-tile.svelte-1mfex3a:hover{background-color:var(--old-rose)}

816
public/build/bundle.js Normal file
View file

@ -0,0 +1,816 @@
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document);
var app = (function () {
'use strict';
function noop() { }
function add_location(element, file, line, column, char) {
element.__svelte_meta = {
loc: { file, line, column, char }
};
}
function run(fn) {
return fn();
}
function blank_object() {
return Object.create(null);
}
function run_all(fns) {
fns.forEach(run);
}
function is_function(thing) {
return typeof thing === 'function';
}
function safe_not_equal(a, b) {
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
}
function is_empty(obj) {
return Object.keys(obj).length === 0;
}
function append(target, node) {
target.appendChild(node);
}
function insert(target, node, anchor) {
target.insertBefore(node, anchor || null);
}
function detach(node) {
node.parentNode.removeChild(node);
}
function destroy_each(iterations, detaching) {
for (let i = 0; i < iterations.length; i += 1) {
if (iterations[i])
iterations[i].d(detaching);
}
}
function element(name) {
return document.createElement(name);
}
function text(data) {
return document.createTextNode(data);
}
function attr(node, attribute, value) {
if (value == null)
node.removeAttribute(attribute);
else if (node.getAttribute(attribute) !== value)
node.setAttribute(attribute, value);
}
function children(element) {
return Array.from(element.childNodes);
}
function custom_event(type, detail, bubbles = false) {
const e = document.createEvent('CustomEvent');
e.initCustomEvent(type, bubbles, false, detail);
return e;
}
let current_component;
function set_current_component(component) {
current_component = component;
}
const dirty_components = [];
const binding_callbacks = [];
const render_callbacks = [];
const flush_callbacks = [];
const resolved_promise = Promise.resolve();
let update_scheduled = false;
function schedule_update() {
if (!update_scheduled) {
update_scheduled = true;
resolved_promise.then(flush);
}
}
function add_render_callback(fn) {
render_callbacks.push(fn);
}
let flushing = false;
const seen_callbacks = new Set();
function flush() {
if (flushing)
return;
flushing = true;
do {
// first, call beforeUpdate functions
// and update components
for (let i = 0; i < dirty_components.length; i += 1) {
const component = dirty_components[i];
set_current_component(component);
update(component.$$);
}
set_current_component(null);
dirty_components.length = 0;
while (binding_callbacks.length)
binding_callbacks.pop()();
// then, once components are updated, call
// afterUpdate functions. This may cause
// subsequent updates...
for (let i = 0; i < render_callbacks.length; i += 1) {
const callback = render_callbacks[i];
if (!seen_callbacks.has(callback)) {
// ...so guard against infinite loops
seen_callbacks.add(callback);
callback();
}
}
render_callbacks.length = 0;
} while (dirty_components.length);
while (flush_callbacks.length) {
flush_callbacks.pop()();
}
update_scheduled = false;
flushing = false;
seen_callbacks.clear();
}
function update($$) {
if ($$.fragment !== null) {
$$.update();
run_all($$.before_update);
const dirty = $$.dirty;
$$.dirty = [-1];
$$.fragment && $$.fragment.p($$.ctx, dirty);
$$.after_update.forEach(add_render_callback);
}
}
const outroing = new Set();
let outros;
function group_outros() {
outros = {
r: 0,
c: [],
p: outros // parent group
};
}
function check_outros() {
if (!outros.r) {
run_all(outros.c);
}
outros = outros.p;
}
function transition_in(block, local) {
if (block && block.i) {
outroing.delete(block);
block.i(local);
}
}
function transition_out(block, local, detach, callback) {
if (block && block.o) {
if (outroing.has(block))
return;
outroing.add(block);
outros.c.push(() => {
outroing.delete(block);
if (callback) {
if (detach)
block.d(1);
callback();
}
});
block.o(local);
}
}
function create_component(block) {
block && block.c();
}
function mount_component(component, target, anchor, customElement) {
const { fragment, on_mount, on_destroy, after_update } = component.$$;
fragment && fragment.m(target, anchor);
if (!customElement) {
// onMount happens before the initial afterUpdate
add_render_callback(() => {
const new_on_destroy = on_mount.map(run).filter(is_function);
if (on_destroy) {
on_destroy.push(...new_on_destroy);
}
else {
// Edge case - component was destroyed immediately,
// most likely as a result of a binding initialising
run_all(new_on_destroy);
}
component.$$.on_mount = [];
});
}
after_update.forEach(add_render_callback);
}
function destroy_component(component, detaching) {
const $$ = component.$$;
if ($$.fragment !== null) {
run_all($$.on_destroy);
$$.fragment && $$.fragment.d(detaching);
// TODO null out other refs, including component.$$ (but need to
// preserve final state?)
$$.on_destroy = $$.fragment = null;
$$.ctx = [];
}
}
function make_dirty(component, i) {
if (component.$$.dirty[0] === -1) {
dirty_components.push(component);
schedule_update();
component.$$.dirty.fill(0);
}
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
}
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {
const parent_component = current_component;
set_current_component(component);
const $$ = component.$$ = {
fragment: null,
ctx: null,
// state
props,
update: noop,
not_equal,
bound: blank_object(),
// lifecycle
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
// everything else
callbacks: blank_object(),
dirty,
skip_bound: false,
root: options.target || parent_component.$$.root
};
append_styles && append_styles($$.root);
let ready = false;
$$.ctx = instance
? instance(component, options.props || {}, (i, ret, ...rest) => {
const value = rest.length ? rest[0] : ret;
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
if (!$$.skip_bound && $$.bound[i])
$$.bound[i](value);
if (ready)
make_dirty(component, i);
}
return ret;
})
: [];
$$.update();
ready = true;
run_all($$.before_update);
// `false` as a special case of no DOM component
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
if (options.target) {
if (options.hydrate) {
const nodes = children(options.target);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$$.fragment && $$.fragment.l(nodes);
nodes.forEach(detach);
}
else {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$$.fragment && $$.fragment.c();
}
if (options.intro)
transition_in(component.$$.fragment);
mount_component(component, options.target, options.anchor, options.customElement);
flush();
}
set_current_component(parent_component);
}
/**
* Base class for Svelte components. Used when dev=false.
*/
class SvelteComponent {
$destroy() {
destroy_component(this, 1);
this.$destroy = noop;
}
$on(type, callback) {
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
callbacks.push(callback);
return () => {
const index = callbacks.indexOf(callback);
if (index !== -1)
callbacks.splice(index, 1);
};
}
$set($$props) {
if (this.$$set && !is_empty($$props)) {
this.$$.skip_bound = true;
this.$$set($$props);
this.$$.skip_bound = false;
}
}
}
function dispatch_dev(type, detail) {
document.dispatchEvent(custom_event(type, Object.assign({ version: '3.44.0' }, detail), true));
}
function append_dev(target, node) {
dispatch_dev('SvelteDOMInsert', { target, node });
append(target, node);
}
function insert_dev(target, node, anchor) {
dispatch_dev('SvelteDOMInsert', { target, node, anchor });
insert(target, node, anchor);
}
function detach_dev(node) {
dispatch_dev('SvelteDOMRemove', { node });
detach(node);
}
function attr_dev(node, attribute, value) {
attr(node, attribute, value);
if (value == null)
dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });
else
dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
}
function set_data_dev(text, data) {
data = '' + data;
if (text.wholeText === data)
return;
dispatch_dev('SvelteDOMSetData', { node: text, data });
text.data = data;
}
function validate_each_argument(arg) {
if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {
let msg = '{#each} only iterates over array-like objects.';
if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {
msg += ' You can use a spread to convert this iterable into an array.';
}
throw new Error(msg);
}
}
function validate_slots(name, slot, keys) {
for (const slot_key of Object.keys(slot)) {
if (!~keys.indexOf(slot_key)) {
console.warn(`<${name}> received an unexpected slot "${slot_key}".`);
}
}
}
/**
* Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
*/
class SvelteComponentDev extends SvelteComponent {
constructor(options) {
if (!options || (!options.target && !options.$$inline)) {
throw new Error("'target' is a required option");
}
super();
}
$destroy() {
super.$destroy();
this.$destroy = () => {
console.warn('Component was already destroyed'); // eslint-disable-line no-console
};
}
$capture_state() { }
$inject_state() { }
}
/* src/components/AppTile.svelte generated by Svelte v3.44.0 */
const file$2 = "src/components/AppTile.svelte";
function create_fragment$2(ctx) {
let button;
let t;
const block = {
c: function create() {
button = element("button");
t = text(/*name*/ ctx[0]);
attr_dev(button, "class", "app-tile svelte-1mfex3a");
add_location(button, file$2, 4, 0, 41);
},
l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
},
m: function mount(target, anchor) {
insert_dev(target, button, anchor);
append_dev(button, t);
},
p: function update(ctx, [dirty]) {
if (dirty & /*name*/ 1) set_data_dev(t, /*name*/ ctx[0]);
},
i: noop,
o: noop,
d: function destroy(detaching) {
if (detaching) detach_dev(button);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_fragment$2.name,
type: "component",
source: "",
ctx
});
return block;
}
function instance$2($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('AppTile', slots, []);
let { name } = $$props;
const writable_props = ['name'];
Object.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<AppTile> was created with unknown prop '${key}'`);
});
$$self.$$set = $$props => {
if ('name' in $$props) $$invalidate(0, name = $$props.name);
};
$$self.$capture_state = () => ({ name });
$$self.$inject_state = $$props => {
if ('name' in $$props) $$invalidate(0, name = $$props.name);
};
if ($$props && "$$inject" in $$props) {
$$self.$inject_state($$props.$$inject);
}
return [name];
}
class AppTile extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance$2, create_fragment$2, safe_not_equal, { name: 0 });
dispatch_dev("SvelteRegisterComponent", {
component: this,
tagName: "AppTile",
options,
id: create_fragment$2.name
});
const { ctx } = this.$$;
const props = options.props || {};
if (/*name*/ ctx[0] === undefined && !('name' in props)) {
console.warn("<AppTile> was created without expected prop 'name'");
}
}
get name() {
throw new Error("<AppTile>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set name(value) {
throw new Error("<AppTile>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
}
/* src/components/AppTileGrid.svelte generated by Svelte v3.44.0 */
const file$1 = "src/components/AppTileGrid.svelte";
function get_each_context(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[1] = list[i];
return child_ctx;
}
// (9:4) {#each applicationRepository as app}
function create_each_block(ctx) {
let apptile;
let current;
apptile = new AppTile({
props: { name: /*app*/ ctx[1].name },
$$inline: true
});
const block = {
c: function create() {
create_component(apptile.$$.fragment);
},
m: function mount(target, anchor) {
mount_component(apptile, target, anchor);
current = true;
},
p: function update(ctx, dirty) {
const apptile_changes = {};
if (dirty & /*applicationRepository*/ 1) apptile_changes.name = /*app*/ ctx[1].name;
apptile.$set(apptile_changes);
},
i: function intro(local) {
if (current) return;
transition_in(apptile.$$.fragment, local);
current = true;
},
o: function outro(local) {
transition_out(apptile.$$.fragment, local);
current = false;
},
d: function destroy(detaching) {
destroy_component(apptile, detaching);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_each_block.name,
type: "each",
source: "(9:4) {#each applicationRepository as app}",
ctx
});
return block;
}
function create_fragment$1(ctx) {
let div;
let current;
let each_value = /*applicationRepository*/ ctx[0];
validate_each_argument(each_value);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
const block = {
c: function create() {
div = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
attr_dev(div, "class", "app-grid svelte-197phgo");
add_location(div, file$1, 7, 0, 104);
},
l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
},
m: function mount(target, anchor) {
insert_dev(target, div, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
}
current = true;
},
p: function update(ctx, [dirty]) {
if (dirty & /*applicationRepository*/ 1) {
each_value = /*applicationRepository*/ ctx[0];
validate_each_argument(each_value);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(div, null);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i: function intro(local) {
if (current) return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o: function outro(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d: function destroy(detaching) {
if (detaching) detach_dev(div);
destroy_each(each_blocks, detaching);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_fragment$1.name,
type: "component",
source: "",
ctx
});
return block;
}
function instance$1($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('AppTileGrid', slots, []);
let { applicationRepository } = $$props;
const writable_props = ['applicationRepository'];
Object.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<AppTileGrid> was created with unknown prop '${key}'`);
});
$$self.$$set = $$props => {
if ('applicationRepository' in $$props) $$invalidate(0, applicationRepository = $$props.applicationRepository);
};
$$self.$capture_state = () => ({ AppTile, applicationRepository });
$$self.$inject_state = $$props => {
if ('applicationRepository' in $$props) $$invalidate(0, applicationRepository = $$props.applicationRepository);
};
if ($$props && "$$inject" in $$props) {
$$self.$inject_state($$props.$$inject);
}
return [applicationRepository];
}
class AppTileGrid extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance$1, create_fragment$1, safe_not_equal, { applicationRepository: 0 });
dispatch_dev("SvelteRegisterComponent", {
component: this,
tagName: "AppTileGrid",
options,
id: create_fragment$1.name
});
const { ctx } = this.$$;
const props = options.props || {};
if (/*applicationRepository*/ ctx[0] === undefined && !('applicationRepository' in props)) {
console.warn("<AppTileGrid> was created without expected prop 'applicationRepository'");
}
}
get applicationRepository() {
throw new Error("<AppTileGrid>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set applicationRepository(value) {
throw new Error("<AppTileGrid>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
}
/* src/App.svelte generated by Svelte v3.44.0 */
const file = "src/App.svelte";
function create_fragment(ctx) {
let main;
let apptilegrid;
let current;
apptilegrid = new AppTileGrid({
props: {
applicationRepository: /*applicationRepository*/ ctx[0]
},
$$inline: true
});
const block = {
c: function create() {
main = element("main");
create_component(apptilegrid.$$.fragment);
attr_dev(main, "class", "default-color-scheme svelte-13e5nw0");
add_location(main, file, 6, 0, 122);
},
l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
},
m: function mount(target, anchor) {
insert_dev(target, main, anchor);
mount_component(apptilegrid, main, null);
current = true;
},
p: function update(ctx, [dirty]) {
const apptilegrid_changes = {};
if (dirty & /*applicationRepository*/ 1) apptilegrid_changes.applicationRepository = /*applicationRepository*/ ctx[0];
apptilegrid.$set(apptilegrid_changes);
},
i: function intro(local) {
if (current) return;
transition_in(apptilegrid.$$.fragment, local);
current = true;
},
o: function outro(local) {
transition_out(apptilegrid.$$.fragment, local);
current = false;
},
d: function destroy(detaching) {
if (detaching) detach_dev(main);
destroy_component(apptilegrid);
}
};
dispatch_dev("SvelteRegisterBlock", {
block,
id: create_fragment.name,
type: "component",
source: "",
ctx
});
return block;
}
function instance($$self, $$props, $$invalidate) {
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('App', slots, []);
let { applicationRepository } = $$props;
const writable_props = ['applicationRepository'];
Object.keys($$props).forEach(key => {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<App> was created with unknown prop '${key}'`);
});
$$self.$$set = $$props => {
if ('applicationRepository' in $$props) $$invalidate(0, applicationRepository = $$props.applicationRepository);
};
$$self.$capture_state = () => ({ AppTileGrid, applicationRepository });
$$self.$inject_state = $$props => {
if ('applicationRepository' in $$props) $$invalidate(0, applicationRepository = $$props.applicationRepository);
};
if ($$props && "$$inject" in $$props) {
$$self.$inject_state($$props.$$inject);
}
return [applicationRepository];
}
class App extends SvelteComponentDev {
constructor(options) {
super(options);
init(this, options, instance, create_fragment, safe_not_equal, { applicationRepository: 0 });
dispatch_dev("SvelteRegisterComponent", {
component: this,
tagName: "App",
options,
id: create_fragment.name
});
const { ctx } = this.$$;
const props = options.props || {};
if (/*applicationRepository*/ ctx[0] === undefined && !('applicationRepository' in props)) {
console.warn("<App> was created without expected prop 'applicationRepository'");
}
}
get applicationRepository() {
throw new Error("<App>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
set applicationRepository(value) {
throw new Error("<App>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'");
}
}
const app = new App({
target: document.body,
props: {
applicationRepository: [
{
name: "Rodent App"
},
{
name: "Ratly"
},
{
name: "deadmau5"
}
]
}
});
return app;
})();
//# sourceMappingURL=bundle.js.map

File diff suppressed because one or more lines are too long

63
public/global.css Normal file
View file

@ -0,0 +1,63 @@
.default-color-scheme {
--background-color: #1E1D20;
--foreground-color: #f5f5f5;
--blue: #048BA8;
--keppel: #0DB39E;
--medium-aquamarine: #16DB93;
--light-green: #83E377;
--inchworm: #B9E769;
--corn: #EFEA5A;
--fuzzy-wuzzy: #C16E70;
--old-rose: #C77B7D;
}
html, body {
position: relative;
width: 100%;
height: 100%;
}
body {
color: #333;
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue";
}
a {
color: rgb(0,100,200);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: rgb(0,80,160);
}
label {
display: block;
}
input, button, select, textarea {
font-family: inherit;
font-size: inherit;
-webkit-padding: 0.4em 0;
padding: 0.4em;
margin: 0 0 0.5em 0;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 2px;
}
input:disabled {
color: #ccc;
}
button {
color: #333;
outline: none;
}

17
public/index.html Normal file
View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>app</title>
<link rel="icon" type="image/png" href="./favicon.png" />
<link rel="stylesheet" href="./global.css" />
<link rel="stylesheet" href="./build/bundle.css" />
<script defer src="./build/bundle.js"></script>
</head>
<body>
</body>
</html>

76
rollup.config.js Normal file
View file

@ -0,0 +1,76 @@
import svelte from 'rollup-plugin-svelte';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import css from 'rollup-plugin-css-only';
const production = !process.env.ROLLUP_WATCH;
function serve() {
let server;
function toExit() {
if (server) server.kill(0);
}
return {
writeBundle() {
if (server) return;
server = require('child_process').spawn('npm', ['run', 'svelte-start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});
process.on('SIGTERM', toExit);
process.on('exit', toExit);
}
};
}
export default {
input: 'src/svelte.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/bundle.js'
},
plugins: [
svelte({
compilerOptions: {
// enable run-time checks when not in production
dev: !production
}
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),
// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),
// In dev mode, call `npm run start` once
// the bundle has been generated
!production && serve(),
// Watch the `public` directory and refresh the
// browser on changes when not in production
!production && livereload('public'),
// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser()
],
watch: {
clearScreen: false
}
};

21
src/App.svelte Normal file
View file

@ -0,0 +1,21 @@
<script>
import AppTileGrid from "./components/AppTileGrid.svelte";
export let applicationRepository;
</script>
<main class="default-color-scheme">
<AppTileGrid applicationRepository={ applicationRepository } />
</main>
<style>
main {
padding: 0;
margin: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
background-color: var(--background-color);
color: var(--foreground-color);
}
</style>

View file

@ -0,0 +1,26 @@
<script>
export let name;
</script>
<button class="app-tile">
{ name }
</button>
<style>
.app-tile {
padding: 0.8em;
margin: 0.6em;
background-color: var(--fuzzy-wuzzy);
border-radius: 1.5rem;
min-width: 2em;
min-height: 2em;
border: none;
font-size: 3em;
user-select: none;
box-sizing: border-box;
}
.app-tile:hover {
background-color: var(--old-rose);
}
</style>

View file

@ -0,0 +1,27 @@
<script>
import AppTile from "./AppTile.svelte";
export let applicationRepository;
</script>
<div class="app-grid">
{#each applicationRepository as app}
<AppTile name={app.name} />
{/each}
</div>
<style>
.app-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-template-rows: 1fr 1fr 1fr;
gap: 0px 0px;
grid-auto-flow: row dense;
width: clamp(10%, 1000px, 90%);
height: 100%;
margin: auto;
margin-top: 5%;
}
</style>

14
src/index.js Normal file
View file

@ -0,0 +1,14 @@
const { app, BrowserWindow } = require('electron');
const path = require('path');
const createWindow = () => {
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
});
mainWindow.loadFile(path.join(__dirname, '../public/index.html'));
mainWindow.webContents.openDevTools();
};
app.on('ready', createWindow);

20
src/svelte.js Normal file
View file

@ -0,0 +1,20 @@
import App from './App.svelte';
const app = new App({
target: document.body,
props: {
applicationRepository: [
{
name: "Rodent App"
},
{
name: "Ratly"
},
{
name: "deadmau5"
}
]
}
});
export default app;

4273
yarn.lock Normal file

File diff suppressed because it is too large Load diff