@graphysdk/theme-comic 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,17 @@
1
+ # License
2
+
3
+ This software is available under any of the following licenses, at your option,
4
+ depending on which one's conditions you meet:
5
+
6
+ - **PolyForm Noncommercial 1.0.0** — for noncommercial use (personal,
7
+ charitable, educational, research, government).
8
+ See [licenses/PolyForm-NonCommercial-1.0.0.md](licenses/PolyForm-NonCommercial-1.0.0.md)
9
+
10
+ - **PolyForm Small Business 1.0.0** — free commercial use for organizations
11
+ under the size thresholds defined in the license.
12
+ See [licenses/PolyForm-Small-Business-1.0.0.md](licenses/PolyForm-Small-Business-1.0.0.md)
13
+
14
+ - **PolyForm Free Trial 1.0.0** — a 32-day evaluation for anyone else.
15
+ See [licenses/PolyForm-Free-Trial-1.0.0.md](licenses/PolyForm-Free-Trial-1.0.0.md)
16
+
17
+ For commercial use beyond these terms, contact [hello@graphy.dev](mailto:hello@graphy.dev) or visit [https://graphy.dev](https://graphy.dev).
package/README.md CHANGED
@@ -1,3 +1,60 @@
1
- # Temporary Holding Version
1
+ # @graphysdk/theme-comic
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > **Beta.** This theme is on a `0.x` version line: a minor release may change its look. Use a caret range (`^0.1.0`) to take only patches.
4
+
5
+ A comic theme for the Graphy charting SDK: graphs drawn as a panel of a printed comic, with black outlines, flat primary colours under printed dots, and hard shadows.
6
+
7
+ Learn more at [graphy.dev](https://graphy.dev).
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @graphysdk/theme-comic @graphysdk/react
13
+ ```
14
+
15
+ Requires React 19. Its only peer is `@graphysdk/react`.
16
+
17
+ ## Usage
18
+
19
+ Pass the theme to `createGraphyKit` and import its fonts once. Every graph drawn through the kit's `GraphProvider` takes the theme; specs are written as usual.
20
+
21
+ ```tsx
22
+ import { createGraphyKit, GraphRenderer } from '@graphysdk/react';
23
+ import { comic } from '@graphysdk/theme-comic';
24
+ import '@graphysdk/theme-comic/fonts.css';
25
+
26
+ const kit = createGraphyKit({ theme: comic });
27
+
28
+ const spec = kit.pipe(
29
+ kit.createSpec({ x: 'quarter', y: 'revenue', color: 'region' }),
30
+ kit.geom.bar({ position: 'dodge' }),
31
+ kit.scale.x(),
32
+ kit.scale.y()
33
+ );
34
+
35
+ export function Revenue({ data }) {
36
+ return (
37
+ <kit.GraphProvider spec={spec} data={data}>
38
+ <GraphRenderer />
39
+ </kit.GraphProvider>
40
+ );
41
+ }
42
+ ```
43
+
44
+ A spec's own `styles()`, scales and `config()` sit above the theme, so a graph can still change anything. The theme is drawn for a graph about 600 pixels wide; `style.graph({ textScale: 1.5 })` scales its type for a larger one.
45
+
46
+ `fonts.css` loads Bangers for the title and Comic Neue for the rest from Google Fonts. To host the fonts yourself, leave the import out and load families named `Bangers` and `Comic Neue` before the first graph is drawn.
47
+
48
+ ## Docs
49
+
50
+ - [Comic](https://docs.graphy.dev/sdk-next/themes/comic)
51
+
52
+ ## Feedback
53
+
54
+ This theme is released early to hear what works. Tell us on [Discord](https://discord.gg/yGmYCjkSr).
55
+
56
+ ## Licence
57
+
58
+ This package is available under PolyForm Noncommercial, Small Business, or a 32-day Free Trial. Free Trial is local or internal evaluation only — it does not cover a public page. See [what you can do under the trial](https://docs.graphy.dev/licence/evaluation).
59
+
60
+ For a commercial licence, [talk to us](https://graphy.dev/license).
@@ -0,0 +1,17 @@
1
+ import { Theme } from '@graphysdk/react';
2
+ /**
3
+ * Graphs as a panel of a printed comic, by way of the sound effects of the 1960s Batman show: a
4
+ * square black frame round newsprint with a patch of screen tone in its corner, the flat colours of a
5
+ * four-colour press under its dots, a black outline and a hard black shadow for every shape, thick
6
+ * round lines and a title in capitals. A pie or a donut is the burst a comic letters "POW!" in, each
7
+ * slice cut to its jagged edge at exactly its angles; a point is a little burst centred on its
8
+ * reading. A text annotation is lettered as a sound effect, red capitals on a yellow plate. Groups take
9
+ * vermillion, cyan, yellow, magenta, green and purple. Drawn for the light scheme only.
10
+ *
11
+ * The faces are Bangers for the title, the sound effects, the axis names and the key, and Comic Neue
12
+ * for the rest. Import `@graphysdk/theme-comic/fonts.css` once to load them.
13
+ *
14
+ * @example
15
+ * const kit = createGraphyKit({ theme: comic });
16
+ */
17
+ export declare const comic: Theme;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The paper as a data URI, for the graph's `fill`: `paper` all over, with a tone of `ink` dots
3
+ * fading out of its top right corner, where a title set from the left leaves the paper bare.
4
+ */
5
+ export declare const buildHalftonePaper: (paper: string, ink: string, inkOpacity: number) => string;
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let I=require("react"),e=require("@graphysdk/react"),g=require("react/jsx-runtime");var M=(t,r)=>{const o=(0,e.getX)(t),l=(0,e.getY)(t)??(0,e.getYMax)(t);return o===null||l===null?null:{x:(0,e.toViewBoxX)(o)*r.width,y:(0,e.toViewBoxY)(l)*r.height}},Y=(t,r)=>{const o=(0,e.getX)(t),l=(0,e.getY)(t)??(0,e.getRadiusExtent)(t).outerRadius;if(o===null||l===null)return null;const i=(0,e.polarToUnit)(o,l),n=Math.min(r.width,r.height)/2;return{x:r.width/2+i.x*n,y:r.height/2-i.y*n}},z=22,F=Math.PI*2,ke=F/(z*2),$=(t,r,o)=>({x:t.x+Math.sin(o.angle)*o.radius*r,y:t.y-Math.cos(o.angle)*o.radius*r}),E=2,X=({x:t,y:r})=>`${t.toFixed(E)},${r.toFixed(E)}`,_=8,j=.6,G=(t,r)=>{const o=r/2,l=F/(_*2);return`M${Array.from({length:_*2},(i,n)=>$(t,o,{angle:n*l,radius:n%2===0?1:j})).map(X).join(" L")} Z`},D=t=>{const r=(0,e.useGeomStyleReader)(t);return(o,l)=>{const i=r.get("shadow",o,l);return{color:(0,e.toPaintColor)(r.get("fill",o,l)),opacity:r.get("alpha",o,l),fillOpacity:r.get("fillAlpha",o,l),outline:r.get("stroke",o,l),outlineWidth:r.get("strokeWidth",o,l),shadow:i==="none"?null:{offsetX:i.offsetX,offsetY:i.offsetY,color:i.color}}}},U=1.35,K=4,V=1,R=({layer:t,observations:r,panel:o,project:l,state:i})=>{const n=(0,e.useGeomStyleReader)(t),f=D(t),u=(0,I.useMemo)(()=>(0,e.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),v=i==="hovered";return(0,g.jsx)("g",{"data-geom":"point",children:Array.from(r,p=>{const h=l(p,o);if(h===null)return null;const s=f(p,i),d=G(h,n.get("size",p,i)*U+(v?K:0));return(0,g.jsxs)("g",{opacity:s.opacity,children:[s.shadow!==null&&(0,g.jsx)("path",{d,transform:`translate(${s.shadow.offsetX} ${s.shadow.offsetY})`,fill:s.shadow.color}),(0,g.jsx)("path",{d,fill:s.color,fillOpacity:s.fillOpacity,stroke:s.outline,strokeWidth:s.outlineWidth+(v?V:0),strokeLinejoin:"round"})]},u(p))})})},N=(t,r)=>(0,e.defineGeomRenderer)("point",{coord:t,swatchShape:"circle",render:({layer:o,panelRect:l})=>(0,g.jsx)(R,{layer:o,observations:o.data,panel:l,project:r}),renderHover:({layer:o,primary:l,panelRect:i})=>(0,g.jsx)(R,{layer:o,observations:[l.observation],panel:i,project:r,state:"hovered"}),renderHoverCompanions:()=>null}),q=N("cartesian",M),J=N("polar",Y),Z=2,Q=2,ee=(t,r,o)=>[...t].flatMap(l=>{const{startAngle:i,endAngle:n}=(0,e.getAngleExtent)(l),{innerRadius:f,outerRadius:u}=(0,e.getRadiusExtent)(l);return i===null||n===null||f===null||u===null?[]:n<=i||u<=0?[]:[{key:`${o(l)}-${i}`,paint:r(l),startAngle:i,endAngle:n,innerRadius:f,outerRadius:u}]}),te=(t,r,o)=>(0,e.buildPolarBarArcPath)(t,{centerX:r.x,centerY:r.y,radius:o,digits:Q}),C=({layer:t,observations:r,panel:o,state:l})=>{const i=D(t),n=(0,I.useMemo)(()=>(0,e.createStableKeyGenerator)(t.data,t.mapping,t.id),[t.data,t.mapping,t.id]),f=Math.min(o.width,o.height)/2;if(f<=0)return null;const u={x:o.width/2,y:o.height/2},v=ee(r,h=>i(h,l),n).flatMap(h=>{const s=te(h,u,f);return s===void 0?[]:[{key:h.key,path:s,paint:h.paint}]}),p=l==="hovered";return(0,g.jsxs)("g",{"data-geom":"bar",children:[!p&&v.map(({key:h,path:s,paint:d})=>d.shadow===null?null:(0,g.jsx)("path",{d:s,transform:`translate(${d.shadow.offsetX} ${d.shadow.offsetY})`,fill:d.shadow.color,opacity:d.opacity},`${h}-shadow`)),v.map(({key:h,path:s,paint:d})=>(0,g.jsx)("path",{"data-comic-slice":"sector",d:s,fill:d.color,fillOpacity:d.fillOpacity,fillRule:"evenodd",stroke:d.outline,strokeWidth:d.outlineWidth+(p?Z:0),strokeLinejoin:"round",opacity:d.opacity},h))]})},oe=(0,e.defineGeomRenderer)("bar",{coord:"polar",guideMode:"band",swatchShape:"slice",render:({layer:t,panelRect:r})=>(0,g.jsx)(C,{layer:t,observations:t.data,panel:r}),renderHover:({layer:t,primary:r,panelRect:o})=>(0,g.jsx)(C,{layer:t,observations:[r.observation],panel:o,state:"hovered"}),renderHoverCompanions:()=>null}),re=[oe,q,J],k=10,ae=.42,P=220,le=.6,T=1,ie=()=>{const t=Math.ceil(P/k),r=[];for(let o=0;o<=t;o+=1){const l=o%2===0?0:k/2;for(let i=0;i<=23;i+=1){const n=-(i*k+l),f=o*k,u=k*ae*(1-Math.hypot(n,f)/P);u>=le&&r.push(`<circle cx="${n.toFixed(T)}" cy="${f.toFixed(T)}" r="${u.toFixed(T)}"/>`)}}return r.join("")},ne=(t,r,o)=>{const l=`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="${t}"/><svg x="100%" y="0" width="1" height="1" overflow="visible"><g fill="${r}" fill-opacity="${o}">${ie()}</g></svg></svg>`;return`data:image/svg+xml,${encodeURIComponent(l)}`},a={paper:"#FBF3DF",bubble:"#FFFDF6",black:"#141414",secondary:"#4A4338",grid:"rgba(20, 20, 20, 0.2)"},w="'Bangers', 'Comic Neue', 'Comic Sans MS', cursive",se="'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive",c={vermillion:"#D9401F",cyan:"#0B85C8",yellow:"#FFD60A",magenta:"#D6247A",green:"#15964B",purple:"#7A3DC8"},de=[c.vermillion,c.cyan,c.yellow,c.magenta,c.green,c.purple],ce=["#FFE45C","#F58A1F","#C4161C"],A={offsetX:4,offsetY:4,blur:0,color:a.black},he={offsetX:6,offsetY:6,blur:0,color:a.black},S={offsetX:2,offsetY:2,blur:0,color:a.black},L={offsetX:4,offsetY:4,blur:0,color:a.black},ge={offsetX:6,offsetY:6,blur:0,color:a.black},fe={offsetX:2,offsetY:2,blur:0,color:c.yellow},ue={pattern:"dots",color:"rgba(20, 20, 20, 0.24)",size:7},pe={image:ne(a.paper,c.vermillion,.18),fit:"stretch",fallback:a.paper},ye={fontFamily:w,fontWeight:400,fontSize:22,lineHeight:1.05,letterSpacing:1.5,textTransform:"uppercase",textColor:a.black},B={fill:c.yellow,stroke:a.black,strokeWidth:3,cornerRadius:0,paddingInline:10,paddingBlock:5,shadow:{offsetX:5,offsetY:5,blur:0,color:c.vermillion}},x={fontFamily:w,fontWeight:400,fontSize:16,lineHeight:1.05,letterSpacing:1,textTransform:"uppercase",textColor:a.black},O={...B,strokeWidth:2.5,paddingInline:7,paddingBlock:3,shadow:{offsetX:3,offsetY:3,blur:0,color:c.vermillion}},W={fontFamily:w,fontWeight:400,letterSpacing:1,textTransform:"uppercase"},y={stroke:a.black,strokeAlpha:1},H={dashArray:[],lineCap:"round",lineJoin:"round"},m={textColor:a.black,fontWeight:700},b={textColor:a.secondary,fontWeight:700},me={tokens:{graphBackground:a.paper,graphBorder:a.black,geom:c.vermillion,geomBorder:a.black,textPrimary:a.black,textSecondary:a.secondary,ruleLine:a.black,gridLine:a.grid,hoverAffordance:a.black,hoverGuideFill:"rgba(20, 20, 20, 0.07)",hoverGuideLine:a.black,tooltipBackground:a.bubble,tooltipBorder:a.black,tooltipPrimaryRow:"rgba(255, 214, 10, 0.35)",annotationShape:c.yellow,annotationArrow:a.black,differenceLabelBackground:a.bubble},defaults:[e.style.graph({fill:pe,strokeWidth:4,cornerRadius:0,fontFamily:se,padding:22,shadow:ge}),e.style.geom({shadow:A,overlay:ue}),e.style.geom({shadow:A},{state:"hovered"}),e.style.geom.bar({...y,strokeWidth:2.5,cornerRadius:0}),e.style.geom.bar({...y,strokeWidth:2.5,shadow:he},{state:"hovered"}),e.style.geom.line({strokeWidth:3.5,...H,shadow:S,overlay:"none"}),e.style.geom.line({shadow:S},{state:"hovered"}),e.style.geom.area({...y,fillAlpha:1,strokeWidth:2.5,...H}),e.style.geom.point({...y,size:13,strokeWidth:2,shadow:S}),e.style.geom.point({...y,strokeWidth:2,shadow:"none"},{state:"hovered"}),e.style.geom.tile({...y,cornerRadius:2,strokeWidth:1.5,shadow:"none"}),e.style.geom.tile({...y,strokeWidth:3,shadow:"none"},{state:"hovered"}),e.style.geom.rule({strokeWidth:2.5,dashArray:[3,3],lineCap:"round",shadow:"none"}),e.style.geom.rule.label({...W,textColor:c.yellow,fontSize:15}),e.style.gridLine({dashArray:[1,5]}),e.style.gridLine.x({strokeWidth:0}),e.style.gridLine.y({strokeWidth:1.5}),e.style.panelBorder({strokeWidth:0}),e.style.panelBorder.bottom({stroke:a.black,strokeWidth:3,dashArray:[]}),e.style.tickLine({strokeWidth:0}),e.style.tickLabel({...b,fontSize:14,lineHeight:1}),e.style.axisLabel({...m,...W,fontSize:18,lineHeight:1}),e.style.heading({...m}),e.style.heading.h1({fontFamily:w,fontWeight:400,fontSize:36,lineHeight:1,letterSpacing:1,textTransform:"uppercase",textShadow:fe}),e.style.heading.h2({...b,fontSize:16,lineHeight:1.2}),e.style.header({margin:{bottom:18}}),e.style.caption({...b,fontWeight:400,fontSize:13}),e.style.source({...b,fontWeight:400,fontSize:13}),e.style.dataLabel({...m,fontSize:14,fill:"transparent"}),e.style.legendItem({...m,...W,fontSize:18,fill:"transparent",stroke:"transparent"}),e.style.legendItem.swatch({size:16}),e.style.directLabel({fontWeight:700,fontSize:14}),e.style.tooltip({strokeWidth:2.5,cornerRadius:10,paddingInline:12,paddingBlock:9,shadow:L}),e.style.tooltip.heading({...m,fontSize:15,lineHeight:1.3}),e.style.tooltip.label({...b,fontSize:14,lineHeight:1.3}),e.style.tooltip.value({...m,fontSize:14,lineHeight:1.3}),e.style.legend.popover({strokeWidth:2.5,cornerRadius:10,shadow:L}),e.style.annotation.text({...ye,...B}),e.style.annotation.shape({fillAlpha:.35,stroke:a.black,strokeWidth:2}),e.style.annotation.arrow({strokeWidth:3.5,dashArray:[]}),e.style.annotation.arrow.outline({stroke:a.paper,strokeWidth:2}),e.style.annotation.pinnedNumber({stroke:a.black,shadow:S}),e.style.annotation.pinnedNumber.label({...x,...O}),e.style.annotation.comment({stroke:a.black,shadow:S}),e.style.annotation.comment.label({...x,...O}),e.style.annotation.differenceArrow({stroke:a.black,strokeWidth:2.5}),e.style.annotation.differenceArrow.label({...x,...O,fontSize:18}),e.style.panelBorder.bottom({strokeWidth:0},{coord:"polar"}),e.style.tickLabel({...m,textOutlineColor:a.paper,textOutlineWidth:3.5},{coord:"polar"}),e.style.geom.area({fillAlpha:.5,shadow:"none"},{coord:"polar"}),e.style.geom.area({shadow:"none"},{coord:"polar",state:"hovered"}),e.style.geom.bar({strokeWidth:2.5,shadow:A},{coord:"polar"}),e.style.geom.bar({strokeWidth:2.5},{coord:"polar",state:"hovered"})]},ve={name:"comic",styles:me,palette:de,colormap:ce,colorScheme:"light",plugins:re};exports.comic=ve;
@@ -0,0 +1 @@
1
+ export { comic } from './comic';
package/dist/index.mjs ADDED
@@ -0,0 +1,551 @@
1
+ import { useMemo as I } from "react";
2
+ import { buildPolarBarArcPath as j, createStableKeyGenerator as F, defineGeomRenderer as D, getAngleExtent as K, getRadiusExtent as N, getX as B, getY as M, getYMax as V, polarToUnit as J, style as e, toPaintColor as Z, toViewBoxX as q, toViewBoxY as Q, useGeomStyleReader as z } from "@graphysdk/react";
3
+ import { jsx as p, jsxs as Y } from "react/jsx-runtime";
4
+ var ee = (o, r) => {
5
+ const t = B(o), i = M(o) ?? V(o);
6
+ return t === null || i === null ? null : {
7
+ x: q(t) * r.width,
8
+ y: Q(i) * r.height
9
+ };
10
+ }, oe = (o, r) => {
11
+ const t = B(o), i = M(o) ?? N(o).outerRadius;
12
+ if (t === null || i === null) return null;
13
+ const n = J(t, i), l = Math.min(r.width, r.height) / 2;
14
+ return {
15
+ x: r.width / 2 + n.x * l,
16
+ y: r.height / 2 - n.y * l
17
+ };
18
+ }, te = 22, $ = Math.PI * 2, Ie = $ / (te * 2), re = (o, r, t) => ({
19
+ x: o.x + Math.sin(t.angle) * t.radius * r,
20
+ y: o.y - Math.cos(t.angle) * t.radius * r
21
+ }), R = 2, ae = ({ x: o, y: r }) => `${o.toFixed(R)},${r.toFixed(R)}`, _ = 8, ie = 0.6, ne = (o, r) => {
22
+ const t = r / 2, i = $ / (_ * 2);
23
+ return `M${Array.from({ length: _ * 2 }, (n, l) => re(o, t, {
24
+ angle: l * i,
25
+ radius: l % 2 === 0 ? 1 : ie
26
+ })).map(ae).join(" L")} Z`;
27
+ }, X = (o) => {
28
+ const r = z(o);
29
+ return (t, i) => {
30
+ const n = r.get("shadow", t, i);
31
+ return {
32
+ color: Z(r.get("fill", t, i)),
33
+ opacity: r.get("alpha", t, i),
34
+ fillOpacity: r.get("fillAlpha", t, i),
35
+ outline: r.get("stroke", t, i),
36
+ outlineWidth: r.get("strokeWidth", t, i),
37
+ shadow: n === "none" ? null : {
38
+ offsetX: n.offsetX,
39
+ offsetY: n.offsetY,
40
+ color: n.color
41
+ }
42
+ };
43
+ };
44
+ }, le = 1.35, se = 4, de = 1, C = ({ layer: o, observations: r, panel: t, project: i, state: n }) => {
45
+ const l = z(o), f = X(o), g = I(() => F(o.data, o.mapping, o.id), [
46
+ o.data,
47
+ o.mapping,
48
+ o.id
49
+ ]), k = n === "hovered";
50
+ return /* @__PURE__ */ p("g", {
51
+ "data-geom": "point",
52
+ children: Array.from(r, (u) => {
53
+ const h = i(u, t);
54
+ if (h === null) return null;
55
+ const s = f(u, n), d = ne(h, l.get("size", u, n) * le + (k ? se : 0));
56
+ return /* @__PURE__ */ Y("g", {
57
+ opacity: s.opacity,
58
+ children: [s.shadow !== null && /* @__PURE__ */ p("path", {
59
+ d,
60
+ transform: `translate(${s.shadow.offsetX} ${s.shadow.offsetY})`,
61
+ fill: s.shadow.color
62
+ }), /* @__PURE__ */ p("path", {
63
+ d,
64
+ fill: s.color,
65
+ fillOpacity: s.fillOpacity,
66
+ stroke: s.outline,
67
+ strokeWidth: s.outlineWidth + (k ? de : 0),
68
+ strokeLinejoin: "round"
69
+ })]
70
+ }, g(u));
71
+ })
72
+ });
73
+ }, G = (o, r) => D("point", {
74
+ coord: o,
75
+ swatchShape: "circle",
76
+ render: ({ layer: t, panelRect: i }) => /* @__PURE__ */ p(C, {
77
+ layer: t,
78
+ observations: t.data,
79
+ panel: i,
80
+ project: r
81
+ }),
82
+ renderHover: ({ layer: t, primary: i, panelRect: n }) => /* @__PURE__ */ p(C, {
83
+ layer: t,
84
+ observations: [i.observation],
85
+ panel: n,
86
+ project: r,
87
+ state: "hovered"
88
+ }),
89
+ renderHoverCompanions: () => null
90
+ }), ce = G("cartesian", ee), he = G("polar", oe), fe = 2, ge = 2, pe = (o, r, t) => [...o].flatMap((i) => {
91
+ const { startAngle: n, endAngle: l } = K(i), { innerRadius: f, outerRadius: g } = N(i);
92
+ return n === null || l === null || f === null || g === null ? [] : l <= n || g <= 0 ? [] : [{
93
+ key: `${t(i)}-${n}`,
94
+ paint: r(i),
95
+ startAngle: n,
96
+ endAngle: l,
97
+ innerRadius: f,
98
+ outerRadius: g
99
+ }];
100
+ }), ue = (o, r, t) => j(o, {
101
+ centerX: r.x,
102
+ centerY: r.y,
103
+ radius: t,
104
+ digits: ge
105
+ }), x = ({ layer: o, observations: r, panel: t, state: i }) => {
106
+ const n = X(o), l = I(() => F(o.data, o.mapping, o.id), [
107
+ o.data,
108
+ o.mapping,
109
+ o.id
110
+ ]), f = Math.min(t.width, t.height) / 2;
111
+ if (f <= 0) return null;
112
+ const g = {
113
+ x: t.width / 2,
114
+ y: t.height / 2
115
+ }, k = pe(r, (h) => n(h, i), l).flatMap((h) => {
116
+ const s = ue(h, g, f);
117
+ return s === void 0 ? [] : [{
118
+ key: h.key,
119
+ path: s,
120
+ paint: h.paint
121
+ }];
122
+ }), u = i === "hovered";
123
+ return /* @__PURE__ */ Y("g", {
124
+ "data-geom": "bar",
125
+ children: [!u && k.map(({ key: h, path: s, paint: d }) => d.shadow === null ? null : /* @__PURE__ */ p("path", {
126
+ d: s,
127
+ transform: `translate(${d.shadow.offsetX} ${d.shadow.offsetY})`,
128
+ fill: d.shadow.color,
129
+ opacity: d.opacity
130
+ }, `${h}-shadow`)), k.map(({ key: h, path: s, paint: d }) => /* @__PURE__ */ p("path", {
131
+ "data-comic-slice": "sector",
132
+ d: s,
133
+ fill: d.color,
134
+ fillOpacity: d.fillOpacity,
135
+ fillRule: "evenodd",
136
+ stroke: d.outline,
137
+ strokeWidth: d.outlineWidth + (u ? fe : 0),
138
+ strokeLinejoin: "round",
139
+ opacity: d.opacity
140
+ }, h))]
141
+ });
142
+ }, me = D("bar", {
143
+ coord: "polar",
144
+ guideMode: "band",
145
+ swatchShape: "slice",
146
+ render: ({ layer: o, panelRect: r }) => /* @__PURE__ */ p(x, {
147
+ layer: o,
148
+ observations: o.data,
149
+ panel: r
150
+ }),
151
+ renderHover: ({ layer: o, primary: r, panelRect: t }) => /* @__PURE__ */ p(x, {
152
+ layer: o,
153
+ observations: [r.observation],
154
+ panel: t,
155
+ state: "hovered"
156
+ }),
157
+ renderHoverCompanions: () => null
158
+ }), ve = [
159
+ me,
160
+ ce,
161
+ he
162
+ ], b = 10, ke = 0.42, L = 220, be = 0.6, A = 1, Se = () => {
163
+ const o = Math.ceil(L / b), r = [];
164
+ for (let t = 0; t <= o; t += 1) {
165
+ const i = t % 2 === 0 ? 0 : b / 2;
166
+ for (let n = 0; n <= 23; n += 1) {
167
+ const l = -(n * b + i), f = t * b, g = b * ke * (1 - Math.hypot(l, f) / L);
168
+ g >= be && r.push(`<circle cx="${l.toFixed(A)}" cy="${f.toFixed(A)}" r="${g.toFixed(A)}"/>`);
169
+ }
170
+ }
171
+ return r.join("");
172
+ }, we = (o, r, t) => {
173
+ const i = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="${o}"/><svg x="100%" y="0" width="1" height="1" overflow="visible"><g fill="${r}" fill-opacity="${t}">${Se()}</g></svg></svg>`;
174
+ return `data:image/svg+xml,${encodeURIComponent(i)}`;
175
+ }, a = {
176
+ paper: "#FBF3DF",
177
+ bubble: "#FFFDF6",
178
+ black: "#141414",
179
+ secondary: "#4A4338",
180
+ grid: "rgba(20, 20, 20, 0.2)"
181
+ }, T = "'Bangers', 'Comic Neue', 'Comic Sans MS', cursive", Te = "'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive", c = {
182
+ vermillion: "#D9401F",
183
+ cyan: "#0B85C8",
184
+ yellow: "#FFD60A",
185
+ magenta: "#D6247A",
186
+ green: "#15964B",
187
+ purple: "#7A3DC8"
188
+ }, Ae = [
189
+ c.vermillion,
190
+ c.cyan,
191
+ c.yellow,
192
+ c.magenta,
193
+ c.green,
194
+ c.purple
195
+ ], ye = [
196
+ "#FFE45C",
197
+ "#F58A1F",
198
+ "#C4161C"
199
+ ], y = {
200
+ offsetX: 4,
201
+ offsetY: 4,
202
+ blur: 0,
203
+ color: a.black
204
+ }, Oe = {
205
+ offsetX: 6,
206
+ offsetY: 6,
207
+ blur: 0,
208
+ color: a.black
209
+ }, S = {
210
+ offsetX: 2,
211
+ offsetY: 2,
212
+ blur: 0,
213
+ color: a.black
214
+ }, P = {
215
+ offsetX: 4,
216
+ offsetY: 4,
217
+ blur: 0,
218
+ color: a.black
219
+ }, We = {
220
+ offsetX: 6,
221
+ offsetY: 6,
222
+ blur: 0,
223
+ color: a.black
224
+ }, Ee = {
225
+ offsetX: 2,
226
+ offsetY: 2,
227
+ blur: 0,
228
+ color: c.yellow
229
+ }, Re = {
230
+ pattern: "dots",
231
+ color: "rgba(20, 20, 20, 0.24)",
232
+ size: 7
233
+ }, _e = {
234
+ image: we(a.paper, c.vermillion, 0.18),
235
+ fit: "stretch",
236
+ fallback: a.paper
237
+ }, Ce = {
238
+ fontFamily: T,
239
+ fontWeight: 400,
240
+ fontSize: 22,
241
+ lineHeight: 1.05,
242
+ letterSpacing: 1.5,
243
+ textTransform: "uppercase",
244
+ textColor: a.black
245
+ }, U = {
246
+ fill: c.yellow,
247
+ stroke: a.black,
248
+ strokeWidth: 3,
249
+ cornerRadius: 0,
250
+ paddingInline: 10,
251
+ paddingBlock: 5,
252
+ shadow: {
253
+ offsetX: 5,
254
+ offsetY: 5,
255
+ blur: 0,
256
+ color: c.vermillion
257
+ }
258
+ }, O = {
259
+ fontFamily: T,
260
+ fontWeight: 400,
261
+ fontSize: 16,
262
+ lineHeight: 1.05,
263
+ letterSpacing: 1,
264
+ textTransform: "uppercase",
265
+ textColor: a.black
266
+ }, W = {
267
+ ...U,
268
+ strokeWidth: 2.5,
269
+ paddingInline: 7,
270
+ paddingBlock: 3,
271
+ shadow: {
272
+ offsetX: 3,
273
+ offsetY: 3,
274
+ blur: 0,
275
+ color: c.vermillion
276
+ }
277
+ }, E = {
278
+ fontFamily: T,
279
+ fontWeight: 400,
280
+ letterSpacing: 1,
281
+ textTransform: "uppercase"
282
+ }, m = {
283
+ stroke: a.black,
284
+ strokeAlpha: 1
285
+ }, H = {
286
+ dashArray: [],
287
+ lineCap: "round",
288
+ lineJoin: "round"
289
+ }, v = {
290
+ textColor: a.black,
291
+ fontWeight: 700
292
+ }, w = {
293
+ textColor: a.secondary,
294
+ fontWeight: 700
295
+ }, xe = {
296
+ tokens: {
297
+ graphBackground: a.paper,
298
+ graphBorder: a.black,
299
+ geom: c.vermillion,
300
+ geomBorder: a.black,
301
+ textPrimary: a.black,
302
+ textSecondary: a.secondary,
303
+ ruleLine: a.black,
304
+ gridLine: a.grid,
305
+ hoverAffordance: a.black,
306
+ hoverGuideFill: "rgba(20, 20, 20, 0.07)",
307
+ hoverGuideLine: a.black,
308
+ tooltipBackground: a.bubble,
309
+ tooltipBorder: a.black,
310
+ tooltipPrimaryRow: "rgba(255, 214, 10, 0.35)",
311
+ annotationShape: c.yellow,
312
+ annotationArrow: a.black,
313
+ differenceLabelBackground: a.bubble
314
+ },
315
+ defaults: [
316
+ e.graph({
317
+ fill: _e,
318
+ strokeWidth: 4,
319
+ cornerRadius: 0,
320
+ fontFamily: Te,
321
+ padding: 22,
322
+ shadow: We
323
+ }),
324
+ e.geom({
325
+ shadow: y,
326
+ overlay: Re
327
+ }),
328
+ e.geom({ shadow: y }, { state: "hovered" }),
329
+ e.geom.bar({
330
+ ...m,
331
+ strokeWidth: 2.5,
332
+ cornerRadius: 0
333
+ }),
334
+ e.geom.bar({
335
+ ...m,
336
+ strokeWidth: 2.5,
337
+ shadow: Oe
338
+ }, { state: "hovered" }),
339
+ e.geom.line({
340
+ strokeWidth: 3.5,
341
+ ...H,
342
+ shadow: S,
343
+ overlay: "none"
344
+ }),
345
+ e.geom.line({ shadow: S }, { state: "hovered" }),
346
+ e.geom.area({
347
+ ...m,
348
+ fillAlpha: 1,
349
+ strokeWidth: 2.5,
350
+ ...H
351
+ }),
352
+ e.geom.point({
353
+ ...m,
354
+ size: 13,
355
+ strokeWidth: 2,
356
+ shadow: S
357
+ }),
358
+ e.geom.point({
359
+ ...m,
360
+ strokeWidth: 2,
361
+ shadow: "none"
362
+ }, { state: "hovered" }),
363
+ e.geom.tile({
364
+ ...m,
365
+ cornerRadius: 2,
366
+ strokeWidth: 1.5,
367
+ shadow: "none"
368
+ }),
369
+ e.geom.tile({
370
+ ...m,
371
+ strokeWidth: 3,
372
+ shadow: "none"
373
+ }, { state: "hovered" }),
374
+ e.geom.rule({
375
+ strokeWidth: 2.5,
376
+ dashArray: [3, 3],
377
+ lineCap: "round",
378
+ shadow: "none"
379
+ }),
380
+ e.geom.rule.label({
381
+ ...E,
382
+ textColor: c.yellow,
383
+ fontSize: 15
384
+ }),
385
+ e.gridLine({ dashArray: [1, 5] }),
386
+ e.gridLine.x({ strokeWidth: 0 }),
387
+ e.gridLine.y({ strokeWidth: 1.5 }),
388
+ e.panelBorder({ strokeWidth: 0 }),
389
+ e.panelBorder.bottom({
390
+ stroke: a.black,
391
+ strokeWidth: 3,
392
+ dashArray: []
393
+ }),
394
+ e.tickLine({ strokeWidth: 0 }),
395
+ e.tickLabel({
396
+ ...w,
397
+ fontSize: 14,
398
+ lineHeight: 1
399
+ }),
400
+ e.axisLabel({
401
+ ...v,
402
+ ...E,
403
+ fontSize: 18,
404
+ lineHeight: 1
405
+ }),
406
+ e.heading({ ...v }),
407
+ e.heading.h1({
408
+ fontFamily: T,
409
+ fontWeight: 400,
410
+ fontSize: 36,
411
+ lineHeight: 1,
412
+ letterSpacing: 1,
413
+ textTransform: "uppercase",
414
+ textShadow: Ee
415
+ }),
416
+ e.heading.h2({
417
+ ...w,
418
+ fontSize: 16,
419
+ lineHeight: 1.2
420
+ }),
421
+ e.header({ margin: { bottom: 18 } }),
422
+ e.caption({
423
+ ...w,
424
+ fontWeight: 400,
425
+ fontSize: 13
426
+ }),
427
+ e.source({
428
+ ...w,
429
+ fontWeight: 400,
430
+ fontSize: 13
431
+ }),
432
+ e.dataLabel({
433
+ ...v,
434
+ fontSize: 14,
435
+ fill: "transparent"
436
+ }),
437
+ e.legendItem({
438
+ ...v,
439
+ ...E,
440
+ fontSize: 18,
441
+ fill: "transparent",
442
+ stroke: "transparent"
443
+ }),
444
+ e.legendItem.swatch({ size: 16 }),
445
+ e.directLabel({
446
+ fontWeight: 700,
447
+ fontSize: 14
448
+ }),
449
+ e.tooltip({
450
+ strokeWidth: 2.5,
451
+ cornerRadius: 10,
452
+ paddingInline: 12,
453
+ paddingBlock: 9,
454
+ shadow: P
455
+ }),
456
+ e.tooltip.heading({
457
+ ...v,
458
+ fontSize: 15,
459
+ lineHeight: 1.3
460
+ }),
461
+ e.tooltip.label({
462
+ ...w,
463
+ fontSize: 14,
464
+ lineHeight: 1.3
465
+ }),
466
+ e.tooltip.value({
467
+ ...v,
468
+ fontSize: 14,
469
+ lineHeight: 1.3
470
+ }),
471
+ e.legend.popover({
472
+ strokeWidth: 2.5,
473
+ cornerRadius: 10,
474
+ shadow: P
475
+ }),
476
+ e.annotation.text({
477
+ ...Ce,
478
+ ...U
479
+ }),
480
+ e.annotation.shape({
481
+ fillAlpha: 0.35,
482
+ stroke: a.black,
483
+ strokeWidth: 2
484
+ }),
485
+ e.annotation.arrow({
486
+ strokeWidth: 3.5,
487
+ dashArray: []
488
+ }),
489
+ e.annotation.arrow.outline({
490
+ stroke: a.paper,
491
+ strokeWidth: 2
492
+ }),
493
+ e.annotation.pinnedNumber({
494
+ stroke: a.black,
495
+ shadow: S
496
+ }),
497
+ e.annotation.pinnedNumber.label({
498
+ ...O,
499
+ ...W
500
+ }),
501
+ e.annotation.comment({
502
+ stroke: a.black,
503
+ shadow: S
504
+ }),
505
+ e.annotation.comment.label({
506
+ ...O,
507
+ ...W
508
+ }),
509
+ e.annotation.differenceArrow({
510
+ stroke: a.black,
511
+ strokeWidth: 2.5
512
+ }),
513
+ e.annotation.differenceArrow.label({
514
+ ...O,
515
+ ...W,
516
+ fontSize: 18
517
+ }),
518
+ e.panelBorder.bottom({ strokeWidth: 0 }, { coord: "polar" }),
519
+ e.tickLabel({
520
+ ...v,
521
+ textOutlineColor: a.paper,
522
+ textOutlineWidth: 3.5
523
+ }, { coord: "polar" }),
524
+ e.geom.area({
525
+ fillAlpha: 0.5,
526
+ shadow: "none"
527
+ }, { coord: "polar" }),
528
+ e.geom.area({ shadow: "none" }, {
529
+ coord: "polar",
530
+ state: "hovered"
531
+ }),
532
+ e.geom.bar({
533
+ strokeWidth: 2.5,
534
+ shadow: y
535
+ }, { coord: "polar" }),
536
+ e.geom.bar({ strokeWidth: 2.5 }, {
537
+ coord: "polar",
538
+ state: "hovered"
539
+ })
540
+ ]
541
+ }, Fe = {
542
+ name: "comic",
543
+ styles: xe,
544
+ palette: Ae,
545
+ colormap: ye,
546
+ colorScheme: "light",
547
+ plugins: ve
548
+ };
549
+ export {
550
+ Fe as comic
551
+ };
@@ -0,0 +1,24 @@
1
+ import { XYPoint } from '@graphysdk/react';
2
+ /** A point of the burst's edge in polar terms: the angle clockwise from twelve o'clock, and the radius as a share of the circle's. */
3
+ export interface BurstCorner {
4
+ angle: number;
5
+ radius: number;
6
+ }
7
+ /**
8
+ * The burst's edge from `startAngle` to `endAngle`, clockwise: where it crosses the two angles, and
9
+ * every corner between. A slice of a pie drawn as a burst is its sector cut to this edge, so the
10
+ * slices of one pie tile the burst exactly, and each keeps its angle. Since the edge repeats every
11
+ * two spikes, a slice's share of the burst's area is its share of the turn to within one spike.
12
+ */
13
+ export declare const traceBurstEdge: (startAngle: number, endAngle: number) => BurstCorner[];
14
+ /** A polar point in the panel's pixels, about `centre`, for a circle of `radius` pixels. */
15
+ export declare const toPanelPoint: (centre: XYPoint, radius: number, corner: BurstCorner) => XYPoint;
16
+ /**
17
+ * One slice of a pie or a donut as a burst, in the panel's pixels: its sector, from `startAngle` to
18
+ * `endAngle`, cut to the burst's jagged edge outside and to the hole's circle inside. `radius` is the
19
+ * burst's in pixels, and `holeRadius` the hole's, 0 for a pie. A slice that is the whole turn is the
20
+ * whole burst, its hole cut out against the turn.
21
+ */
22
+ export declare const buildBurstSlice: (centre: XYPoint, radius: number, holeRadius: number, startAngle: number, endAngle: number) => string;
23
+ /** A point as a little burst of `size` pixels across, centred exactly on `centre`, with a tip at twelve o'clock. */
24
+ export declare const buildPointBurst: (centre: XYPoint, size: number) => string;
@@ -0,0 +1,18 @@
1
+ import { Observation, SceneLayerFor, StyleState } from '@graphysdk/react';
2
+ /** The hard black copy a comic prints under a shape, offset down and to the right; `null` when there is none. */
3
+ export interface PrintedShadow {
4
+ offsetX: number;
5
+ offsetY: number;
6
+ color: string;
7
+ }
8
+ /** What a shape is inked with: flat colour inside a black outline, over a printed shadow. */
9
+ export interface ShapePaint {
10
+ color: string;
11
+ opacity: number;
12
+ fillOpacity: number;
13
+ outline: string;
14
+ outlineWidth: number;
15
+ shadow: PrintedShadow | null;
16
+ }
17
+ export type ReadShapePaint = (observation: Observation, state?: StyleState) => ShapePaint;
18
+ export declare const useShapePaint: (layer: SceneLayerFor<"bar" | "point">) => ReadShapePaint;
@@ -0,0 +1,8 @@
1
+ import { ResolvedGeomRenderer } from '@graphysdk/react';
2
+ /**
3
+ * The built-in geoms the theme redraws as bursts: pies, donuts and points. Bars, lines, areas and
4
+ * tiles are drawn by the built-in renderers, which the stylesheet already inks as a comic prints them.
5
+ * Positions, scales and axes come from the compiled layer unchanged, and colour, outline and shadow
6
+ * come from the stylesheet.
7
+ */
8
+ export declare const comicPlugins: readonly ResolvedGeomRenderer[];
@@ -0,0 +1,8 @@
1
+ import { ResolvedGeomRenderer } from '@graphysdk/react';
2
+ /**
3
+ * Scatter and bubble: each point a little burst in its group's colour, as a comic marks a hit, with
4
+ * its centre exactly on the reading, outlined in black over a hard shadow. The hovered burst grows.
5
+ */
6
+ export declare const comicPoint: ResolvedGeomRenderer;
7
+ /** A radar's vertices as the same bursts. */
8
+ export declare const comicRadarPoint: ResolvedGeomRenderer;
@@ -0,0 +1,6 @@
1
+ import { ResolvedGeomRenderer } from '@graphysdk/react';
2
+ /**
3
+ * Pie, donut, rose and radial bar as plain sectors, each outlined in black over the one hard shadow of
4
+ * the whole shape, so every slice's size is exactly its share. The hovered slice is outlined more heavily.
5
+ */
6
+ export declare const comicSlice: ResolvedGeomRenderer;
@@ -0,0 +1,9 @@
1
+ import { Observation, XYPoint } from '@graphysdk/react';
2
+ export interface PixelSize {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ /** Where an observation is drawn in the panel, in pixels; `null` for one missing a position. */
7
+ export type Projection = (observation: Observation, panel: PixelSize) => XYPoint | null;
8
+ export declare const projectCartesian: Projection;
9
+ export declare const projectPolar: Projection;
@@ -0,0 +1,33 @@
1
+ import { Stylesheet } from '@graphysdk/react';
2
+ export declare const COMIC_COLORS: {
3
+ readonly paper: "#FBF3DF";
4
+ readonly bubble: "#FFFDF6";
5
+ readonly black: "#141414";
6
+ readonly secondary: "#4A4338";
7
+ readonly grid: "rgba(20, 20, 20, 0.2)";
8
+ };
9
+ /**
10
+ * The colours a four-colour press gives on newsprint: the red is a vermillion of magenta over yellow,
11
+ * the blue leans to the cyan it is printed with, and magenta stands on its own.
12
+ */
13
+ export declare const COMIC_HUES: {
14
+ readonly vermillion: "#D9401F";
15
+ readonly cyan: "#0B85C8";
16
+ readonly yellow: "#FFD60A";
17
+ readonly magenta: "#D6247A";
18
+ readonly green: "#15964B";
19
+ readonly purple: "#7A3DC8";
20
+ };
21
+ /**
22
+ * The order groups take their colours in. Yellow is too pale to be told from the paper by itself, so
23
+ * it comes third and relies on the black outline and shadow every shape has.
24
+ */
25
+ export declare const COMIC_PALETTE: readonly string[];
26
+ /** For a colour that stands for a number: from yellow through orange to a deep red. */
27
+ export declare const COMIC_COLORMAP: readonly string[];
28
+ /**
29
+ * The comic look: newsprint framed in black like a panel, shapes in flat colour under printed dots
30
+ * with a black outline and a hard black shadow, thick round lines, a black baseline, and boxes
31
+ * drawn as speech bubbles.
32
+ */
33
+ export declare const comicStyles: Stylesheet;
package/fonts.css ADDED
@@ -0,0 +1,2 @@
1
+ /* Bangers for the title and Comic Neue for the rest, the faces the theme's stylesheet names. Import this once, before the first graph is measured. */
2
+ @import url('https://fonts.googleapis.com/css2?family=Bangers&family=Comic+Neue:wght@400;700&display=swap');
@@ -0,0 +1,93 @@
1
+ # PolyForm Free Trial License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/free-trial/1.0.0>
4
+
5
+ ## Acceptance
6
+
7
+ In order to get any license under these terms, you must agree
8
+ to them as both strict obligations and conditions to all
9
+ your licenses.
10
+
11
+ ## Copyright License
12
+
13
+ The licensor grants you a copyright license for the software
14
+ to do everything you might do with the software that would
15
+ otherwise infringe the licensor's copyright in it for any
16
+ permitted purpose. However, you may only make changes or
17
+ new works based on the software according to [Changes and New
18
+ Works License](#changes-and-new-works-license), and you may
19
+ not distribute copies of the software.
20
+
21
+ ## Changes and New Works License
22
+
23
+ The licensor grants you an additional copyright license to
24
+ make changes and new works based on the software for any
25
+ permitted purpose.
26
+
27
+ ## Patent License
28
+
29
+ The licensor grants you a patent license for the software that
30
+ covers patent claims the licensor can license, or becomes able
31
+ to license, that you would infringe by using the software.
32
+
33
+ ## Fair Use
34
+
35
+ You may have "fair use" rights for the software under the
36
+ law. These terms do not limit them.
37
+
38
+ ## Free Trial
39
+
40
+ Use to evaluate whether the software suits a particular
41
+ application for less than 32 consecutive calendar days, on
42
+ behalf of you or your company, is use for a permitted purpose.
43
+
44
+ ## No Other Rights
45
+
46
+ These terms do not allow you to sublicense or transfer any of
47
+ your licenses to anyone else, or prevent the licensor from
48
+ granting licenses to anyone else. These terms do not imply
49
+ any other licenses.
50
+
51
+ ## Patent Defense
52
+
53
+ If you make any written claim that the software infringes or
54
+ contributes to infringement of any patent, your patent license
55
+ for the software granted under these terms ends immediately. If
56
+ your company makes such a claim, your patent license ends
57
+ immediately for work on behalf of your company.
58
+
59
+ ## Violations
60
+
61
+ If you violate any of these terms, or do anything with the
62
+ software not covered by your licenses, all your licenses
63
+ end immediately.
64
+
65
+ ## No Liability
66
+
67
+ _**As far as the law allows, the software comes as is, without
68
+ any warranty or condition, and the licensor will not be liable
69
+ to you for any damages arising out of these terms or the use
70
+ or nature of the software, under any kind of legal claim.**_
71
+
72
+ ## Definitions
73
+
74
+ The **licensor** is the individual or entity offering these
75
+ terms, and the **software** is the software the licensor makes
76
+ available under these terms.
77
+
78
+ **You** refers to the individual or entity agreeing to these
79
+ terms.
80
+
81
+ **Your company** is any legal entity, sole proprietorship,
82
+ or other kind of organization that you work for, plus all
83
+ organizations that have control over, are under the control of,
84
+ or are under common control with that organization. **Control**
85
+ means ownership of substantially all the assets of an entity,
86
+ or the power to direct its management and policies by vote,
87
+ contract, or otherwise. Control can be direct or indirect.
88
+
89
+ **Your licenses** are all the licenses granted to you for the
90
+ software under these terms.
91
+
92
+ **Use** means anything you do with the software requiring one
93
+ of your licenses.
@@ -0,0 +1,131 @@
1
+ # PolyForm Noncommercial License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/noncommercial/1.0.0>
4
+
5
+ ## Acceptance
6
+
7
+ In order to get any license under these terms, you must agree
8
+ to them as both strict obligations and conditions to all
9
+ your licenses.
10
+
11
+ ## Copyright License
12
+
13
+ The licensor grants you a copyright license for the
14
+ software to do everything you might do with the software
15
+ that would otherwise infringe the licensor's copyright
16
+ in it for any permitted purpose. However, you may
17
+ only distribute the software according to [Distribution
18
+ License](#distribution-license) and make changes or new works
19
+ based on the software according to [Changes and New Works
20
+ License](#changes-and-new-works-license).
21
+
22
+ ## Distribution License
23
+
24
+ The licensor grants you an additional copyright license
25
+ to distribute copies of the software. Your license
26
+ to distribute covers distributing the software with
27
+ changes and new works permitted by [Changes and New Works
28
+ License](#changes-and-new-works-license).
29
+
30
+ ## Notices
31
+
32
+ You must ensure that anyone who gets a copy of any part of
33
+ the software from you also gets a copy of these terms or the
34
+ URL for them above, as well as copies of any plain-text lines
35
+ beginning with `Required Notice:` that the licensor provided
36
+ with the software. For example:
37
+
38
+ > Required Notice: Copyright Graphy Technologies Ltd. (https://graphy.dev)
39
+
40
+ ## Changes and New Works License
41
+
42
+ The licensor grants you an additional copyright license to
43
+ make changes and new works based on the software for any
44
+ permitted purpose.
45
+
46
+ ## Patent License
47
+
48
+ The licensor grants you a patent license for the software that
49
+ covers patent claims the licensor can license, or becomes able
50
+ to license, that you would infringe by using the software.
51
+
52
+ ## Noncommercial Purposes
53
+
54
+ Any noncommercial purpose is a permitted purpose.
55
+
56
+ ## Personal Uses
57
+
58
+ Personal use for research, experiment, and testing for
59
+ the benefit of public knowledge, personal study, private
60
+ entertainment, hobby projects, amateur pursuits, or religious
61
+ observance, without any anticipated commercial application,
62
+ is use for a permitted purpose.
63
+
64
+ ## Noncommercial Organizations
65
+
66
+ Use by any charitable organization, educational institution,
67
+ public research organization, public safety or health
68
+ organization, environmental protection organization,
69
+ or government institution is use for a permitted purpose
70
+ regardless of the source of funding or obligations resulting
71
+ from the funding.
72
+
73
+ ## Fair Use
74
+
75
+ You may have "fair use" rights for the software under the
76
+ law. These terms do not limit them.
77
+
78
+ ## No Other Rights
79
+
80
+ These terms do not allow you to sublicense or transfer any of
81
+ your licenses to anyone else, or prevent the licensor from
82
+ granting licenses to anyone else. These terms do not imply
83
+ any other licenses.
84
+
85
+ ## Patent Defense
86
+
87
+ If you make any written claim that the software infringes or
88
+ contributes to infringement of any patent, your patent license
89
+ for the software granted under these terms ends immediately. If
90
+ your company makes such a claim, your patent license ends
91
+ immediately for work on behalf of your company.
92
+
93
+ ## Violations
94
+
95
+ The first time you are notified in writing that you have
96
+ violated any of these terms, or done anything with the software
97
+ not covered by your licenses, your licenses can nonetheless
98
+ continue if you come into full compliance with these terms,
99
+ and take practical steps to correct past violations, within
100
+ 32 days of receiving notice. Otherwise, all your licenses
101
+ end immediately.
102
+
103
+ ## No Liability
104
+
105
+ _**As far as the law allows, the software comes as is, without
106
+ any warranty or condition, and the licensor will not be liable
107
+ to you for any damages arising out of these terms or the use
108
+ or nature of the software, under any kind of legal claim.**_
109
+
110
+ ## Definitions
111
+
112
+ The **licensor** is the individual or entity offering these
113
+ terms, and the **software** is the software the licensor makes
114
+ available under these terms.
115
+
116
+ **You** refers to the individual or entity agreeing to these
117
+ terms.
118
+
119
+ **Your company** is any legal entity, sole proprietorship,
120
+ or other kind of organization that you work for, plus all
121
+ organizations that have control over, are under the control of,
122
+ or are under common control with that organization. **Control**
123
+ means ownership of substantially all the assets of an entity,
124
+ or the power to direct its management and policies by vote,
125
+ contract, or otherwise. Control can be direct or indirect.
126
+
127
+ **Your licenses** are all the licenses granted to you for the
128
+ software under these terms.
129
+
130
+ **Use** means anything you do with the software requiring one
131
+ of your licenses.
@@ -0,0 +1,121 @@
1
+ # PolyForm Small Business License 1.0.0
2
+
3
+ <https://polyformproject.org/licenses/small-business/1.0.0>
4
+
5
+ ## Acceptance
6
+
7
+ In order to get any license under these terms, you must agree
8
+ to them as both strict obligations and conditions to all
9
+ your licenses.
10
+
11
+ ## Copyright License
12
+
13
+ The licensor grants you a copyright license for the
14
+ software to do everything you might do with the software
15
+ that would otherwise infringe the licensor's copyright
16
+ in it for any permitted purpose. However, you may
17
+ only distribute the software according to [Distribution
18
+ License](#distribution-license) and make changes or new works
19
+ based on the software according to [Changes and New Works
20
+ License](#changes-and-new-works-license).
21
+
22
+ ## Distribution License
23
+
24
+ The licensor grants you an additional copyright license
25
+ to distribute copies of the software. Your license
26
+ to distribute covers distributing the software with
27
+ changes and new works permitted by [Changes and New Works
28
+ License](#changes-and-new-works-license).
29
+
30
+ ## Notices
31
+
32
+ You must ensure that anyone who gets a copy of any part of
33
+ the software from you also gets a copy of these terms or the
34
+ URL for them above, as well as copies of any plain-text lines
35
+ beginning with `Required Notice:` that the licensor provided
36
+ with the software. For example:
37
+
38
+ > Required Notice: Copyright Graphy Technologies Ltd. (https://graphy.dev)
39
+
40
+ ## Changes and New Works License
41
+
42
+ The licensor grants you an additional copyright license to
43
+ make changes and new works based on the software for any
44
+ permitted purpose.
45
+
46
+ ## Patent License
47
+
48
+ The licensor grants you a patent license for the software that
49
+ covers patent claims the licensor can license, or becomes able
50
+ to license, that you would infringe by using the software.
51
+
52
+ ## Fair Use
53
+
54
+ You may have "fair use" rights for the software under the
55
+ law. These terms do not limit them.
56
+
57
+ ## Small Business
58
+
59
+ Use of the software for the benefit of your company is use for
60
+ a permitted purpose if your company has fewer than 100 total
61
+ individuals working as employees and independent contractors,
62
+ and less than 1,000,000 USD (2019) total revenue in the prior
63
+ tax year. Adjust this revenue threshold for inflation according
64
+ to the United States Bureau of Labor Statistics' consumer price
65
+ index for all urban consumers, U.S. city average, for all items,
66
+ not seasonally adjusted, with 1982–1984=100 reference base.
67
+
68
+ ## No Other Rights
69
+
70
+ These terms do not allow you to sublicense or transfer any of
71
+ your licenses to anyone else, or prevent the licensor from
72
+ granting licenses to anyone else. These terms do not imply
73
+ any other licenses.
74
+
75
+ ## Patent Defense
76
+
77
+ If you make any written claim that the software infringes or
78
+ contributes to infringement of any patent, your patent license
79
+ for the software granted under these terms ends immediately. If
80
+ your company makes such a claim, your patent license ends
81
+ immediately for work on behalf of your company.
82
+
83
+ ## Violations
84
+
85
+ The first time you are notified in writing that you have
86
+ violated any of these terms, or done anything with the software
87
+ not covered by your licenses, your licenses can nonetheless
88
+ continue if you come into full compliance with these terms,
89
+ and take practical steps to correct past violations, within
90
+ 32 days of receiving notice. Otherwise, all your licenses
91
+ end immediately.
92
+
93
+ ## No Liability
94
+
95
+ _**As far as the law allows, the software comes as is, without
96
+ any warranty or condition, and the licensor will not be liable
97
+ to you for any damages arising out of these terms or the use
98
+ or nature of the software, under any kind of legal claim.**_
99
+
100
+ ## Definitions
101
+
102
+ The **licensor** is the individual or entity offering these
103
+ terms, and the **software** is the software the licensor makes
104
+ available under these terms.
105
+
106
+ **You** refers to the individual or entity agreeing to these
107
+ terms.
108
+
109
+ **Your company** is any legal entity, sole proprietorship,
110
+ or other kind of organization that you work for, plus all
111
+ organizations that have control over, are under the control of,
112
+ or are under common control with that organization. **Control**
113
+ means ownership of substantially all the assets of an entity,
114
+ or the power to direct its management and policies by vote,
115
+ contract, or otherwise. Control can be direct or indirect.
116
+
117
+ **Your licenses** are all the licenses granted to you for the
118
+ software under these terms.
119
+
120
+ **Use** means anything you do with the software requiring one
121
+ of your licenses.
package/package.json CHANGED
@@ -1,6 +1,82 @@
1
1
  {
2
2
  "name": "@graphysdk/theme-comic",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "author": "Graphy",
4
+ "description": "Comic theme for the Graphy charting SDK (beta)",
5
+ "homepage": "https://docs.graphy.dev/sdk-next/themes/comic",
6
+ "license": "SEE LICENSE IN LICENSE.md",
7
+ "keywords": [
8
+ "graphy",
9
+ "chart",
10
+ "react",
11
+ "visualization",
12
+ "grammar-of-graphics",
13
+ "theme",
14
+ "comic"
15
+ ],
16
+ "version": "0.1.0",
17
+ "type": "module",
18
+ "sideEffects": [
19
+ "*.css"
20
+ ],
21
+ "types": "./dist/index.d.ts",
22
+ "files": [
23
+ "dist",
24
+ "fonts.css",
25
+ "src/fonts.css.d.ts",
26
+ "LICENSE.md",
27
+ "licenses",
28
+ "README.md"
29
+ ],
30
+ "exports": {
31
+ ".": {
32
+ "types": "./dist/index.d.ts",
33
+ "import": "./dist/index.mjs",
34
+ "require": "./dist/index.cjs"
35
+ },
36
+ "./fonts.css": {
37
+ "types": "./src/fonts.css.d.ts",
38
+ "default": "./fonts.css"
39
+ }
40
+ },
41
+ "peerDependencies": {
42
+ "react": "^19.0.0",
43
+ "@graphysdk/react": "^1.9.0-beta.1791447671234"
44
+ },
45
+ "devDependencies": {
46
+ "@testing-library/react": "^16.3.1",
47
+ "@types/react": "^19.2.14",
48
+ "@types/react-dom": "^19.2.3",
49
+ "react": "^19.2.4",
50
+ "react-dom": "^19.2.4",
51
+ "rollup-plugin-node-externals": "^8.1.1",
52
+ "vite": "^8.1.5",
53
+ "vite-plugin-dts": "^4.5.4",
54
+ "vitest": "^4.1.11",
55
+ "@graphysdk/react": "1.9.0-beta.1791447671234",
56
+ "@graphysdk/viz-engine": "1.8.0",
57
+ "@graphytools/eslint-config": "0.0.1",
58
+ "@graphytools/typescript-config": "0.0.1",
59
+ "@graphytools/vitest-config": "1.0.0"
60
+ },
61
+ "publishConfig": {
62
+ "access": "public"
63
+ },
64
+ "lint-staged": {
65
+ "*.{ts,tsx,js,jsx,json,css,md}": [
66
+ "prettier --write"
67
+ ],
68
+ "*.{ts,tsx}": [
69
+ "eslint --max-warnings=0 --fix"
70
+ ]
71
+ },
72
+ "scripts": {
73
+ "build": "vite build",
74
+ "test": "vitest run",
75
+ "test:watch": "TZ=utc vitest",
76
+ "lint": "eslint . --max-warnings 0",
77
+ "lint:fix": "eslint . --fix",
78
+ "format": "prettier --write .",
79
+ "format:check": "prettier --check .",
80
+ "typecheck": "tsc --noEmit"
81
+ }
6
82
  }
@@ -0,0 +1,2 @@
1
+ // Loads the fonts when imported; it exports nothing.
2
+ export {};