diff --git a/README.md b/README.md
index 891f7163..90386156 100644
--- a/README.md
+++ b/README.md
@@ -46,15 +46,15 @@ To raise the sliders, you need to click on one of the examples that are displaye
- [ ] Once this is done, it make sense to show a tooltip that displays a pair of values as you hover over the graph. (maybe also the hex?)
- [ ] There should be an add color button that adds the current state of the sliders.
- [ ] A single selection sets the sliders. Multi-select does not
-- [ ] Might then make sense to move the graph colorspace, range and background color controls into this area.
-- [ ] As a short term improvement, raise the sliders when you click on a color in the graphs.
+- [x] Might then make sense to move the graph colorspace, range and background color controls into this area.
+- [x] As a short term improvement, raise the sliders when you click on a color in the graphs.
## TODOS
- [ ] Make keyboard short cut (option+up/down) for the z-direction
- [ ] Polar stuff
- [ ] Chore: Extract some common types into a top level location (like types.ts type thing)
-- [ ] Examples: A (default) example showing annotated math stuff
+- [x] Examples: A (default) example showing annotated math stuff
- [ ] Examples: SVG Upload
- [ ] Examples: Vega/Vega-Lite Specification
- [ ] Examples: Examples held as assets somewhere that are downloaded rather than components (for consistency)
diff --git a/public/HolyGrail.svg b/public/HolyGrail.svg
new file mode 100644
index 00000000..6e713795
--- /dev/null
+++ b/public/HolyGrail.svg
@@ -0,0 +1,160 @@
+
+
+
\ No newline at end of file
diff --git a/public/fourier.svg b/public/fourier.svg
new file mode 100644
index 00000000..090a5c00
--- /dev/null
+++ b/public/fourier.svg
@@ -0,0 +1,32 @@
+
diff --git a/public/r2.svg b/public/r2.svg
new file mode 100644
index 00000000..6603ca0d
--- /dev/null
+++ b/public/r2.svg
@@ -0,0 +1,78 @@
+
diff --git a/public/vis-logo.svg b/public/vis-logo.svg
new file mode 100644
index 00000000..e4a5a4fe
--- /dev/null
+++ b/public/vis-logo.svg
@@ -0,0 +1,26 @@
+
diff --git a/src/content-modules/Examples.svelte b/src/content-modules/Examples.svelte
index 4172f9fc..221e8e0e 100644
--- a/src/content-modules/Examples.svelte
+++ b/src/content-modules/Examples.svelte
@@ -6,8 +6,6 @@
import colorStore from "../stores/color-store";
import { charts, idxToKey } from "../lib/charts";
import Vega from "../components/Vega.svelte";
- import TinyWebpage from "../content-modules/TinyWebpage.svelte";
- import TextBlock from "../content-modules/TextBlock.svelte";
import Modal from "../components/Modal.svelte";
import { buttonStyle } from "../lib/styles";
import { xml } from "@codemirror/lang-xml";
@@ -24,7 +22,9 @@
function detectColorsInSvgString(svgString: string) {
const colors = new Set();
- const regex = /#[0-9a-f]{6}/gi;
+ // match hex or rgb(255, 255, 255)
+ const regex = /#(?:[0-9a-fA-F]{3}){1,2}|rgb\((?:\d{1,3},\s*){2}\d{1,3}\)/g;
+
let match;
while ((match = regex.exec(svgString))) {
colors.add(match[0]);
@@ -60,6 +60,13 @@
};
colorStore.createNewPal(newPal);
}
+ const DEMOS = [
+ { title: "Mondrian", filename: "./mondrian.svg" },
+ { title: "Annotated R2", filename: "./r2.svg" },
+ { title: "Annotated Fourier", filename: "./fourier.svg" },
+ { title: "VIS Logo", filename: "./vis-logo.svg" },
+ { title: "Holy Grail Layout", filename: "./HolyGrail.svg" },
+ ];