@gjermundgaraba/pixel-paper 0.1.0 → 0.2.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.
@@ -187,8 +187,6 @@ export declare const update: (model: Model, message: Message) => Readonly<{
187
187
  readonly orientation: "Horizontal" | "Vertical";
188
188
  readonly activationThreshold: number;
189
189
  readonly dragState: {
190
- readonly _tag: "Idle";
191
- } | {
192
190
  readonly _tag: "Dragging";
193
191
  readonly itemId: string;
194
192
  readonly sourceContainerId: string;
@@ -205,6 +203,8 @@ export declare const update: (model: Model, message: Message) => Readonly<{
205
203
  readonly containerId: string;
206
204
  readonly index: number;
207
205
  }>;
206
+ } | {
207
+ readonly _tag: "Idle";
208
208
  } | {
209
209
  readonly _tag: "KeyboardDragging";
210
210
  readonly itemId: string;
@@ -240,9 +240,11 @@ export declare const update: (model: Model, message: Message) => Readonly<{
240
240
  }>;
241
241
  };
242
242
  commands?: Update.Commands<{
243
- readonly _tag: "CompletedAnnounceReorder";
244
- } | {
245
243
  readonly _tag: "CancelledPointer";
244
+ } | {
245
+ readonly _tag: "PressedEscape";
246
+ } | {
247
+ readonly _tag: "CompletedAnnounceReorder";
246
248
  } | {
247
249
  readonly _tag: "CompletedSizeLiftedItem";
248
250
  } | {
@@ -294,8 +296,6 @@ export declare const update: (model: Model, message: Message) => Readonly<{
294
296
  readonly clientX: number;
295
297
  readonly clientY: number;
296
298
  readonly maybeIndex: Option.Option<number>;
297
- } | {
298
- readonly _tag: "PressedEscape";
299
299
  } | {
300
300
  readonly _tag: "PressedGripKey";
301
301
  readonly itemId: string;
@@ -344,8 +344,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
344
344
  readonly orientation: "Horizontal" | "Vertical";
345
345
  readonly activationThreshold: number;
346
346
  readonly dragState: {
347
- readonly _tag: "Idle";
348
- } | {
349
347
  readonly _tag: "Dragging";
350
348
  readonly itemId: string;
351
349
  readonly sourceContainerId: string;
@@ -362,6 +360,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
362
360
  readonly containerId: string;
363
361
  readonly index: number;
364
362
  }>;
363
+ } | {
364
+ readonly _tag: "Idle";
365
365
  } | {
366
366
  readonly _tag: "KeyboardDragging";
367
367
  readonly itemId: string;
@@ -396,9 +396,11 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
396
396
  }>;
397
397
  }>;
398
398
  }, {
399
- readonly _tag: "CompletedAnnounceReorder";
400
- } | {
401
399
  readonly _tag: "CancelledPointer";
400
+ } | {
401
+ readonly _tag: "PressedEscape";
402
+ } | {
403
+ readonly _tag: "CompletedAnnounceReorder";
402
404
  } | {
403
405
  readonly _tag: "CompletedSizeLiftedItem";
404
406
  } | {
@@ -450,8 +452,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
450
452
  readonly clientX: number;
451
453
  readonly clientY: number;
452
454
  readonly maybeIndex: Option.Option<number>;
453
- } | {
454
- readonly _tag: "PressedEscape";
455
455
  } | {
456
456
  readonly _tag: "PressedGripKey";
457
457
  readonly itemId: string;
@@ -494,8 +494,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
494
494
  readonly orientation: "Horizontal" | "Vertical";
495
495
  readonly activationThreshold: number;
496
496
  readonly dragState: {
497
- readonly _tag: "Idle";
498
- } | {
499
497
  readonly _tag: "Dragging";
500
498
  readonly itemId: string;
501
499
  readonly sourceContainerId: string;
@@ -512,6 +510,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
512
510
  readonly containerId: string;
513
511
  readonly index: number;
514
512
  }>;
513
+ } | {
514
+ readonly _tag: "Idle";
515
515
  } | {
516
516
  readonly _tag: "KeyboardDragging";
517
517
  readonly itemId: string;
@@ -546,9 +546,11 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
546
546
  }>;
547
547
  }>;
548
548
  }, {
549
- readonly _tag: "CompletedAnnounceReorder";
550
- } | {
551
549
  readonly _tag: "CancelledPointer";
550
+ } | {
551
+ readonly _tag: "PressedEscape";
552
+ } | {
553
+ readonly _tag: "CompletedAnnounceReorder";
552
554
  } | {
553
555
  readonly _tag: "CompletedSizeLiftedItem";
554
556
  } | {
@@ -600,8 +602,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
600
602
  readonly clientX: number;
601
603
  readonly clientY: number;
602
604
  readonly maybeIndex: Option.Option<number>;
603
- } | {
604
- readonly _tag: "PressedEscape";
605
605
  } | {
606
606
  readonly _tag: "PressedGripKey";
607
607
  readonly itemId: string;
@@ -640,8 +640,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
640
640
  readonly orientation: "Horizontal" | "Vertical";
641
641
  readonly activationThreshold: number;
642
642
  readonly dragState: {
643
- readonly _tag: "Idle";
644
- } | {
645
643
  readonly _tag: "Dragging";
646
644
  readonly itemId: string;
647
645
  readonly sourceContainerId: string;
@@ -658,6 +656,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
658
656
  readonly containerId: string;
659
657
  readonly index: number;
660
658
  }>;
659
+ } | {
660
+ readonly _tag: "Idle";
661
661
  } | {
662
662
  readonly _tag: "KeyboardDragging";
663
663
  readonly itemId: string;
@@ -692,9 +692,11 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
692
692
  }>;
693
693
  }>;
694
694
  }, {
695
- readonly _tag: "CompletedAnnounceReorder";
696
- } | {
697
695
  readonly _tag: "CancelledPointer";
696
+ } | {
697
+ readonly _tag: "PressedEscape";
698
+ } | {
699
+ readonly _tag: "CompletedAnnounceReorder";
698
700
  } | {
699
701
  readonly _tag: "CompletedSizeLiftedItem";
700
702
  } | {
@@ -746,8 +748,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
746
748
  readonly clientX: number;
747
749
  readonly clientY: number;
748
750
  readonly maybeIndex: Option.Option<number>;
749
- } | {
750
- readonly _tag: "PressedEscape";
751
751
  } | {
752
752
  readonly _tag: "PressedGripKey";
753
753
  readonly itemId: string;
@@ -786,8 +786,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
786
786
  readonly orientation: "Horizontal" | "Vertical";
787
787
  readonly activationThreshold: number;
788
788
  readonly dragState: {
789
- readonly _tag: "Idle";
790
- } | {
791
789
  readonly _tag: "Dragging";
792
790
  readonly itemId: string;
793
791
  readonly sourceContainerId: string;
@@ -804,6 +802,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
804
802
  readonly containerId: string;
805
803
  readonly index: number;
806
804
  }>;
805
+ } | {
806
+ readonly _tag: "Idle";
807
807
  } | {
808
808
  readonly _tag: "KeyboardDragging";
809
809
  readonly itemId: string;
@@ -838,9 +838,11 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
838
838
  }>;
839
839
  }>;
840
840
  }, {
841
- readonly _tag: "CompletedAnnounceReorder";
842
- } | {
843
841
  readonly _tag: "CancelledPointer";
842
+ } | {
843
+ readonly _tag: "PressedEscape";
844
+ } | {
845
+ readonly _tag: "CompletedAnnounceReorder";
844
846
  } | {
845
847
  readonly _tag: "CompletedSizeLiftedItem";
846
848
  } | {
@@ -892,8 +894,6 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
892
894
  readonly clientX: number;
893
895
  readonly clientY: number;
894
896
  readonly maybeIndex: Option.Option<number>;
895
- } | {
896
- readonly _tag: "PressedEscape";
897
897
  } | {
898
898
  readonly _tag: "PressedGripKey";
899
899
  readonly itemId: string;
@@ -974,8 +974,6 @@ export declare const view: import("foldkit/submodel").View<{
974
974
  readonly orientation: "Horizontal" | "Vertical";
975
975
  readonly activationThreshold: number;
976
976
  readonly dragState: {
977
- readonly _tag: "Idle";
978
- } | {
979
977
  readonly _tag: "Dragging";
980
978
  readonly itemId: string;
981
979
  readonly sourceContainerId: string;
@@ -992,6 +990,8 @@ export declare const view: import("foldkit/submodel").View<{
992
990
  readonly containerId: string;
993
991
  readonly index: number;
994
992
  }>;
993
+ } | {
994
+ readonly _tag: "Idle";
995
995
  } | {
996
996
  readonly _tag: "KeyboardDragging";
997
997
  readonly itemId: string;
@@ -1026,9 +1026,11 @@ export declare const view: import("foldkit/submodel").View<{
1026
1026
  }>;
1027
1027
  }>;
1028
1028
  }, {
1029
- readonly _tag: "CompletedAnnounceReorder";
1030
- } | {
1031
1029
  readonly _tag: "CancelledPointer";
1030
+ } | {
1031
+ readonly _tag: "PressedEscape";
1032
+ } | {
1033
+ readonly _tag: "CompletedAnnounceReorder";
1032
1034
  } | {
1033
1035
  readonly _tag: "CompletedSizeLiftedItem";
1034
1036
  } | {
@@ -1080,8 +1082,6 @@ export declare const view: import("foldkit/submodel").View<{
1080
1082
  readonly clientX: number;
1081
1083
  readonly clientY: number;
1082
1084
  readonly maybeIndex: Option.Option<number>;
1083
- } | {
1084
- readonly _tag: "PressedEscape";
1085
1085
  } | {
1086
1086
  readonly _tag: "PressedGripKey";
1087
1087
  readonly itemId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjermundgaraba/pixel-paper",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Printed-paper Foldkit components, tokens and stylesheet.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -12,7 +12,8 @@
12
12
  "dist",
13
13
  "fonts",
14
14
  "src/pixel-paper.css",
15
- "src/tokens.css"
15
+ "src/tokens.css",
16
+ "THIRD_PARTY_NOTICES.md"
16
17
  ],
17
18
  "type": "module",
18
19
  "sideEffects": [
@@ -27,16 +28,29 @@
27
28
  "types": "./dist/scheme/script.d.ts",
28
29
  "default": "./dist/scheme/script.js"
29
30
  },
31
+ "./markdown-editor/element": {
32
+ "types": "./dist/markdown-editor/element.d.ts",
33
+ "default": "./dist/markdown-editor/element.js"
34
+ },
30
35
  "./pixel-paper.css": "./src/pixel-paper.css"
31
36
  },
32
37
  "publishConfig": {
33
38
  "access": "public"
34
39
  },
35
40
  "dependencies": {
41
+ "@codemirror/commands": "6.11.1",
42
+ "@codemirror/lang-markdown": "6.5.2",
43
+ "@codemirror/language": "6.13.1",
44
+ "@codemirror/merge": "6.12.3",
45
+ "@codemirror/state": "6.7.6",
46
+ "@codemirror/view": "6.43.15",
47
+ "@lezer/common": "1.5.4",
48
+ "@lezer/markdown": "1.8.1",
36
49
  "diff": "^9.0.0"
37
50
  },
38
51
  "devDependencies": {
39
52
  "@effect/platform-browser": "4.0.6",
53
+ "@effect/vitest": "4.0.6",
40
54
  "@foldkit/ui": "0.169.0",
41
55
  "@foldkit/vite-plugin": "0.28.0",
42
56
  "@types/node": "26.6.5",
@@ -1673,6 +1673,52 @@ button.choice {
1673
1673
  font: var(--type-body)/1.5 var(--font-body);
1674
1674
  }
1675
1675
 
1676
+ pp-markdown-editor {
1677
+ display: block;
1678
+ position: relative;
1679
+ }
1680
+
1681
+ pp-markdown-editor:defined textarea {
1682
+ position: absolute;
1683
+ width: 1px;
1684
+ height: 1px;
1685
+ min-height: 0;
1686
+ padding: 0;
1687
+ border: 0;
1688
+ opacity: 0;
1689
+ pointer-events: none;
1690
+ overflow: hidden;
1691
+ clip-path: inset(50%);
1692
+ resize: none;
1693
+ }
1694
+
1695
+ .markdown-surface {
1696
+ border-bottom: 1px dotted var(--muted);
1697
+ padding-bottom: 1px;
1698
+ }
1699
+
1700
+ .markdown-surface .cm-scroller {
1701
+ min-height: max(96px, calc(var(--rows) * 1lh));
1702
+ }
1703
+
1704
+ .markdown-surface:focus-within,
1705
+ .field:has([aria-invalid="true"]) .markdown-surface {
1706
+ border-bottom: var(--line) solid var(--ink);
1707
+ padding-bottom: 0;
1708
+ }
1709
+
1710
+ .field:has([aria-invalid="true"]) .markdown-surface {
1711
+ border-bottom-color: var(--red);
1712
+ }
1713
+
1714
+ pp-markdown-editor:disabled .markdown-surface {
1715
+ border-bottom-color: transparent;
1716
+ }
1717
+
1718
+ pp-markdown-editor:disabled .cm-content {
1719
+ color: var(--muted);
1720
+ }
1721
+
1676
1722
  textarea::-webkit-resizer {
1677
1723
  background: linear-gradient(135deg, transparent 0 50%, var(--ink) 50% 100%);
1678
1724
  }