foldkit 0.119.0 → 0.120.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.
@@ -0,0 +1,106 @@
1
+ import { Match as M, Schema as S } from 'effect';
2
+ import { html } from '../../html/index.js';
3
+ import { m } from '../../message/index.js';
4
+ // MODEL
5
+ export const Model = S.Struct({});
6
+ // MESSAGE
7
+ export const IgnoredInteraction = m('IgnoredInteraction');
8
+ export const Message = S.Union([IgnoredInteraction]);
9
+ // INIT
10
+ export const initialModel = {};
11
+ // UPDATE
12
+ export const update = (model, message) => M.value(message).pipe(M.withReturnType(), M.tagsExhaustive({
13
+ IgnoredInteraction: () => [model, []],
14
+ }));
15
+ // VIEW
16
+ export const view = (_model) => {
17
+ const h = html();
18
+ return h.svg([
19
+ h.DataAttribute('testid', 'svg-root'),
20
+ h.ViewBox('0 0 100 100'),
21
+ h.PreserveAspectRatio('xMidYMid meet'),
22
+ h.Color('black'),
23
+ h.Overflow('visible'),
24
+ ], [
25
+ h.text([
26
+ h.DataAttribute('testid', 'svg-text'),
27
+ h.Dx('1'),
28
+ h.Dy('2'),
29
+ h.Rotate('15'),
30
+ h.TextAnchor('middle'),
31
+ h.DominantBaseline('central'),
32
+ h.AlignmentBaseline('middle'),
33
+ h.BaselineShift('super'),
34
+ h.TextLength('40'),
35
+ h.LengthAdjust('spacing'),
36
+ h.FontFamily('serif'),
37
+ h.FontSize('12'),
38
+ h.FontWeight('bold'),
39
+ h.FontStyle('italic'),
40
+ h.LetterSpacing('1'),
41
+ h.WordSpacing('2'),
42
+ h.TextDecoration('underline'),
43
+ h.WritingMode('horizontal-tb'),
44
+ h.Visibility('visible'),
45
+ h.Display('inline'),
46
+ h.Cursor('pointer'),
47
+ h.PointerEvents('none'),
48
+ ], ['Label']),
49
+ h.rect([
50
+ h.DataAttribute('testid', 'svg-rect'),
51
+ h.Rx('4'),
52
+ h.Ry('4'),
53
+ h.PathLength('100'),
54
+ h.FillOpacity('0.5'),
55
+ h.StrokeOpacity('0.8'),
56
+ h.StrokeMiterlimit('2'),
57
+ h.PaintOrder('stroke'),
58
+ h.VectorEffect('non-scaling-stroke'),
59
+ h.ShapeRendering('crispEdges'),
60
+ h.TextRendering('optimizeLegibility'),
61
+ h.ImageRendering('pixelated'),
62
+ h.ClipPath('url(#clip)'),
63
+ h.Mask('url(#mask)'),
64
+ h.Filter('url(#filter)'),
65
+ h.MarkerStart('url(#start)'),
66
+ h.MarkerMid('url(#mid)'),
67
+ h.MarkerEnd('url(#end)'),
68
+ ], []),
69
+ h.linearGradient([
70
+ h.DataAttribute('testid', 'svg-gradient'),
71
+ h.GradientUnits('userSpaceOnUse'),
72
+ h.GradientTransform('rotate(45)'),
73
+ h.SpreadMethod('reflect'),
74
+ h.Fx('0.1'),
75
+ h.Fy('0.2'),
76
+ h.Fr('0.3'),
77
+ h.ClipPathUnits('userSpaceOnUse'),
78
+ h.MaskUnits('userSpaceOnUse'),
79
+ h.MaskContentUnits('userSpaceOnUse'),
80
+ h.FilterUnits('userSpaceOnUse'),
81
+ h.PrimitiveUnits('userSpaceOnUse'),
82
+ ], [
83
+ h.stop([
84
+ h.DataAttribute('testid', 'svg-stop'),
85
+ h.Offset('0.5'),
86
+ h.StopColor('red'),
87
+ h.StopOpacity('0.9'),
88
+ ], []),
89
+ ]),
90
+ h.pattern([
91
+ h.DataAttribute('testid', 'svg-pattern'),
92
+ h.PatternUnits('userSpaceOnUse'),
93
+ h.PatternContentUnits('userSpaceOnUse'),
94
+ h.PatternTransform('scale(2)'),
95
+ ], []),
96
+ h.marker([
97
+ h.DataAttribute('testid', 'svg-marker'),
98
+ h.MarkerWidth('6'),
99
+ h.MarkerHeight('6'),
100
+ h.MarkerUnits('strokeWidth'),
101
+ h.RefX('3'),
102
+ h.RefY('3'),
103
+ h.Orient('auto'),
104
+ ], []),
105
+ ]);
106
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit",
3
- "version": "0.119.0",
3
+ "version": "0.120.0",
4
4
  "description": "A TypeScript frontend framework, built on Effect and architected like Elm",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",