@semigarden/synthetic-md 0.0.7 → 0.0.8

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/dist/index.cjs.js CHANGED
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
- Element: () => element_default2,
23
+ Element: () => element_default,
24
24
  default: () => index_default,
25
25
  defineElement: () => defineElement
26
26
  });
@@ -6445,8 +6445,380 @@ var Intent = class {
6445
6445
  };
6446
6446
  var intent_default = Intent;
6447
6447
 
6448
- // styles/element.css
6449
- var element_default = {};
6448
+ // styles/element-css.ts
6449
+ var cssText = `@charset "UTF-8";
6450
+ :host {
6451
+ width: 100%;
6452
+ height: 100%;
6453
+ }
6454
+
6455
+ .element {
6456
+ --color-background: #110f16;
6457
+ --color-background-area: #181424;
6458
+ --color-border: #2a2340;
6459
+ --color-text: #d4cfee;
6460
+ --color-muted: #8b85a3;
6461
+ --color-accent: #4a9eff;
6462
+ --color-code-bg: #1a1625;
6463
+ --color-blockquote-border: #4a9eff;
6464
+ --color-selection-bg: #2a2340;
6465
+ position: relative;
6466
+ width: 100%;
6467
+ height: 100%;
6468
+ align-items: stretch;
6469
+ justify-content: flex-start;
6470
+ resize: none;
6471
+ border: none;
6472
+ outline: none;
6473
+ white-space: pre-wrap;
6474
+ font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
6475
+ font-size: 16px;
6476
+ line-height: 1.6;
6477
+ }
6478
+
6479
+ .selection {
6480
+ background: var(--color-selection-bg);
6481
+ }
6482
+
6483
+ .block {
6484
+ margin: 0;
6485
+ padding: 0;
6486
+ min-height: 1.2em;
6487
+ }
6488
+
6489
+ .inline {
6490
+ position: relative;
6491
+ white-space: pre-wrap;
6492
+ word-break: break-word;
6493
+ word-wrap: break-word;
6494
+ overflow-wrap: break-word;
6495
+ text-overflow: ellipsis;
6496
+ max-width: 100%;
6497
+ height: auto;
6498
+ display: inline-block;
6499
+ text-align: left;
6500
+ outline: none;
6501
+ }
6502
+ .inline .symbolic {
6503
+ position: relative;
6504
+ }
6505
+ .inline .semantic {
6506
+ pointer-events: none;
6507
+ user-select: none;
6508
+ opacity: 1;
6509
+ }
6510
+ .inline:not(.focused) .symbolic {
6511
+ position: absolute;
6512
+ inset: 0;
6513
+ color: transparent;
6514
+ caret-color: transparent;
6515
+ }
6516
+ .inline:not(.focused) .semantic {
6517
+ position: relative;
6518
+ }
6519
+ .inline.focused .symbolic {
6520
+ position: relative;
6521
+ color: inherit;
6522
+ caret-color: auto;
6523
+ cursor: text;
6524
+ }
6525
+ .inline.focused .semantic {
6526
+ position: absolute;
6527
+ inset: 0;
6528
+ opacity: 0;
6529
+ user-select: none;
6530
+ pointer-events: none;
6531
+ }
6532
+ .inline.focused .image {
6533
+ display: none;
6534
+ }
6535
+
6536
+ .paragraph {
6537
+ margin: 0;
6538
+ }
6539
+
6540
+ .heading {
6541
+ font-weight: 600;
6542
+ margin: 0.75em 0 0.25em;
6543
+ line-height: 1.3;
6544
+ }
6545
+
6546
+ .h1 {
6547
+ font-size: 2em;
6548
+ border-bottom: 1px solid var(--color-border);
6549
+ padding-bottom: 0.25em;
6550
+ margin: 0;
6551
+ }
6552
+
6553
+ .h2 {
6554
+ font-size: 1.5em;
6555
+ border-bottom: 1px solid var(--color-border);
6556
+ padding-bottom: 0.2em;
6557
+ }
6558
+
6559
+ .h3 {
6560
+ font-size: 1.25em;
6561
+ }
6562
+
6563
+ .h4 {
6564
+ font-size: 1.1em;
6565
+ }
6566
+
6567
+ .h5 {
6568
+ font-size: 1em;
6569
+ }
6570
+
6571
+ .h6 {
6572
+ font-size: 0.9em;
6573
+ color: var(--color-muted);
6574
+ }
6575
+
6576
+ .blockQuote {
6577
+ border-left: 3px solid var(--color-blockquote-border);
6578
+ padding-left: 1em;
6579
+ margin: 0.5em 0;
6580
+ color: var(--color-muted);
6581
+ font-style: italic;
6582
+ }
6583
+
6584
+ .codeBlock {
6585
+ background: var(--color-code-bg);
6586
+ border: 1px solid var(--color-border);
6587
+ border-radius: 6px;
6588
+ padding: 0 1em;
6589
+ margin: 0.5em 0;
6590
+ overflow-x: auto;
6591
+ position: relative;
6592
+ transition: border-color 0.15s ease;
6593
+ }
6594
+ .codeBlock code {
6595
+ display: flex;
6596
+ flex-direction: column;
6597
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
6598
+ font-size: 0.9em;
6599
+ line-height: 1.5;
6600
+ color: var(--color-text);
6601
+ }
6602
+ .codeBlock .marker {
6603
+ opacity: 0;
6604
+ }
6605
+ .codeBlock .marker.focused {
6606
+ opacity: 1;
6607
+ }
6608
+ .codeBlock .marker .symbolic {
6609
+ position: relative;
6610
+ color: inherit;
6611
+ }
6612
+ .codeBlock .inline[data-type=text] {
6613
+ white-space: pre-wrap;
6614
+ word-break: break-all;
6615
+ }
6616
+ .codeBlock .inline[data-type=text].focused {
6617
+ background: transparent;
6618
+ outline: none;
6619
+ }
6620
+ .codeBlock .inline[data-type=text] .symbolic {
6621
+ position: relative;
6622
+ color: inherit;
6623
+ }
6624
+ .codeBlock .inline[data-type=text] .semantic {
6625
+ display: none;
6626
+ }
6627
+ .codeBlock[data-language]::before {
6628
+ content: attr(data-language);
6629
+ position: absolute;
6630
+ top: 0.5em;
6631
+ right: 0.75em;
6632
+ font-size: 0.75em;
6633
+ text-transform: uppercase;
6634
+ letter-spacing: 0.05em;
6635
+ pointer-events: none;
6636
+ }
6637
+
6638
+ .list {
6639
+ margin: 0;
6640
+ padding-left: 1.5em;
6641
+ }
6642
+ .list[start] {
6643
+ list-style-type: decimal;
6644
+ }
6645
+
6646
+ .listItem {
6647
+ display: list-item;
6648
+ margin: 0;
6649
+ }
6650
+ .listItem .markerAnchor {
6651
+ display: inline;
6652
+ width: 0;
6653
+ height: 0;
6654
+ pointer-events: none;
6655
+ }
6656
+
6657
+ .taskListItem {
6658
+ list-style: none;
6659
+ margin-left: -1.5em;
6660
+ display: flex;
6661
+ align-items: center;
6662
+ gap: 0.1em;
6663
+ }
6664
+
6665
+ .taskCheckbox {
6666
+ margin-top: 0.35em;
6667
+ margin-left: 0.5em;
6668
+ width: 1em;
6669
+ height: 1em;
6670
+ accent-color: var(--color-accent);
6671
+ cursor: pointer;
6672
+ }
6673
+
6674
+ .taskContent {
6675
+ flex: 1;
6676
+ }
6677
+
6678
+ .thematicBreak {
6679
+ position: relative;
6680
+ border: none;
6681
+ }
6682
+ .thematicBreak::after {
6683
+ content: "";
6684
+ position: absolute;
6685
+ top: 0;
6686
+ bottom: 0;
6687
+ left: 0;
6688
+ margin: auto;
6689
+ width: 100%;
6690
+ height: 1px;
6691
+ background-color: var(--color-border);
6692
+ }
6693
+ .thematicBreak.focused::after {
6694
+ display: none;
6695
+ }
6696
+
6697
+ .table {
6698
+ width: 100%;
6699
+ table-layout: fixed;
6700
+ border-collapse: collapse;
6701
+ margin: 0.5em 0;
6702
+ border: 1px solid var(--color-border);
6703
+ }
6704
+
6705
+ .tableRow,
6706
+ .tableCell {
6707
+ border: 1px solid var(--color-border);
6708
+ padding: 0.5em 1em;
6709
+ text-align: left;
6710
+ }
6711
+
6712
+ .htmlBlock {
6713
+ margin: 0.5em 0;
6714
+ }
6715
+
6716
+ .footnote {
6717
+ font-size: 0.9em;
6718
+ color: var(--color-muted);
6719
+ margin: 0.25em 0;
6720
+ padding-left: 2em;
6721
+ position: relative;
6722
+ }
6723
+
6724
+ .footnoteLabel {
6725
+ position: absolute;
6726
+ left: 0;
6727
+ color: var(--color-accent);
6728
+ }
6729
+
6730
+ .footnoteContent {
6731
+ display: inline;
6732
+ }
6733
+
6734
+ .blankLine {
6735
+ height: 1.2em;
6736
+ user-select: none;
6737
+ }
6738
+
6739
+ .link, .autolink {
6740
+ cursor: pointer;
6741
+ }
6742
+
6743
+ .caret {
6744
+ position: absolute;
6745
+ width: 1px;
6746
+ height: 1em;
6747
+ background-color: #fff;
6748
+ animation: blink 1s step-end infinite;
6749
+ pointer-events: none;
6750
+ z-index: 10;
6751
+ }
6752
+
6753
+ .inline {
6754
+ outline: none;
6755
+ white-space: pre-wrap;
6756
+ word-break: break-word;
6757
+ }
6758
+ .inline.focus {
6759
+ background: rgba(0, 120, 255, 0.1);
6760
+ border-radius: 3px;
6761
+ padding: 0 2px;
6762
+ min-height: 1.2em;
6763
+ outline: 1px solid var(--color-accent);
6764
+ }
6765
+ .inline[data-type=strong]:not(.focus) {
6766
+ font-weight: bold;
6767
+ }
6768
+ .inline[data-type=emphasis]:not(.focus) {
6769
+ font-style: italic;
6770
+ }
6771
+ .inline[data-type=codeSpan]:not(.focus) {
6772
+ font-family: "JetBrains Mono", "Fira Code", monospace;
6773
+ font-size: 0.9em;
6774
+ background: var(--color-code-bg);
6775
+ padding: 0.15em 0.4em;
6776
+ border-radius: 3px;
6777
+ }
6778
+ .inline[data-type=link]:not(.focus) {
6779
+ color: var(--color-accent);
6780
+ text-decoration: underline;
6781
+ cursor: pointer;
6782
+ }
6783
+ .inline[data-type=autolink]:not(.focus) {
6784
+ color: var(--color-accent);
6785
+ text-decoration: underline;
6786
+ }
6787
+ .inline[data-type=strikethrough]:not(.focus) {
6788
+ text-decoration: line-through;
6789
+ color: var(--color-muted);
6790
+ }
6791
+ .inline[data-type=image]:not(.focus) {
6792
+ color: var(--color-accent);
6793
+ }
6794
+ .inline[data-type=image]:not(.focus)::before {
6795
+ content: "\u{1F5BC}\uFE0F ";
6796
+ }
6797
+ .inline[data-type=footnoteRef]:not(.focus) {
6798
+ color: var(--color-accent);
6799
+ font-size: 0.8em;
6800
+ vertical-align: super;
6801
+ }
6802
+ .inline[data-type=hardBreak], .inline[data-type=softBreak] {
6803
+ display: inline;
6804
+ }
6805
+ .inline[data-type=rawHTML]:not(.focus) {
6806
+ font-family: monospace;
6807
+ color: var(--color-muted);
6808
+ font-size: 0.9em;
6809
+ }
6810
+
6811
+ .blink {
6812
+ animation: blink 1s step-end infinite;
6813
+ }
6814
+
6815
+ @keyframes blink {
6816
+ 50% {
6817
+ opacity: 0;
6818
+ }
6819
+ }
6820
+ `;
6821
+ var element_css_default = cssText;
6450
6822
 
6451
6823
  // models/element.ts
6452
6824
  var Element = class extends HTMLElement {
@@ -6504,7 +6876,7 @@ var Element = class extends HTMLElement {
6504
6876
  addStyles() {
6505
6877
  if (this.styled) return;
6506
6878
  const style = document.createElement("style");
6507
- style.textContent = element_default;
6879
+ style.textContent = element_css_default;
6508
6880
  this.shadowRootElement.appendChild(style);
6509
6881
  this.styled = true;
6510
6882
  }
@@ -6523,15 +6895,15 @@ var Element = class extends HTMLElement {
6523
6895
  }));
6524
6896
  }
6525
6897
  };
6526
- var element_default2 = Element;
6898
+ var element_default = Element;
6527
6899
 
6528
6900
  // index.ts
6529
6901
  function defineElement() {
6530
6902
  if (!customElements.get("synthetic-text")) {
6531
- customElements.define("synthetic-text", element_default2);
6903
+ customElements.define("synthetic-text", element_default);
6532
6904
  }
6533
6905
  }
6534
- var index_default = element_default2;
6906
+ var index_default = element_default;
6535
6907
  // Annotate the CommonJS export names for ESM import in node:
6536
6908
  0 && (module.exports = {
6537
6909
  Element,
package/dist/index.esm.js CHANGED
@@ -6417,8 +6417,380 @@ var Intent = class {
6417
6417
  };
6418
6418
  var intent_default = Intent;
6419
6419
 
6420
- // styles/element.css
6421
- var element_default = {};
6420
+ // styles/element-css.ts
6421
+ var cssText = `@charset "UTF-8";
6422
+ :host {
6423
+ width: 100%;
6424
+ height: 100%;
6425
+ }
6426
+
6427
+ .element {
6428
+ --color-background: #110f16;
6429
+ --color-background-area: #181424;
6430
+ --color-border: #2a2340;
6431
+ --color-text: #d4cfee;
6432
+ --color-muted: #8b85a3;
6433
+ --color-accent: #4a9eff;
6434
+ --color-code-bg: #1a1625;
6435
+ --color-blockquote-border: #4a9eff;
6436
+ --color-selection-bg: #2a2340;
6437
+ position: relative;
6438
+ width: 100%;
6439
+ height: 100%;
6440
+ align-items: stretch;
6441
+ justify-content: flex-start;
6442
+ resize: none;
6443
+ border: none;
6444
+ outline: none;
6445
+ white-space: pre-wrap;
6446
+ font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
6447
+ font-size: 16px;
6448
+ line-height: 1.6;
6449
+ }
6450
+
6451
+ .selection {
6452
+ background: var(--color-selection-bg);
6453
+ }
6454
+
6455
+ .block {
6456
+ margin: 0;
6457
+ padding: 0;
6458
+ min-height: 1.2em;
6459
+ }
6460
+
6461
+ .inline {
6462
+ position: relative;
6463
+ white-space: pre-wrap;
6464
+ word-break: break-word;
6465
+ word-wrap: break-word;
6466
+ overflow-wrap: break-word;
6467
+ text-overflow: ellipsis;
6468
+ max-width: 100%;
6469
+ height: auto;
6470
+ display: inline-block;
6471
+ text-align: left;
6472
+ outline: none;
6473
+ }
6474
+ .inline .symbolic {
6475
+ position: relative;
6476
+ }
6477
+ .inline .semantic {
6478
+ pointer-events: none;
6479
+ user-select: none;
6480
+ opacity: 1;
6481
+ }
6482
+ .inline:not(.focused) .symbolic {
6483
+ position: absolute;
6484
+ inset: 0;
6485
+ color: transparent;
6486
+ caret-color: transparent;
6487
+ }
6488
+ .inline:not(.focused) .semantic {
6489
+ position: relative;
6490
+ }
6491
+ .inline.focused .symbolic {
6492
+ position: relative;
6493
+ color: inherit;
6494
+ caret-color: auto;
6495
+ cursor: text;
6496
+ }
6497
+ .inline.focused .semantic {
6498
+ position: absolute;
6499
+ inset: 0;
6500
+ opacity: 0;
6501
+ user-select: none;
6502
+ pointer-events: none;
6503
+ }
6504
+ .inline.focused .image {
6505
+ display: none;
6506
+ }
6507
+
6508
+ .paragraph {
6509
+ margin: 0;
6510
+ }
6511
+
6512
+ .heading {
6513
+ font-weight: 600;
6514
+ margin: 0.75em 0 0.25em;
6515
+ line-height: 1.3;
6516
+ }
6517
+
6518
+ .h1 {
6519
+ font-size: 2em;
6520
+ border-bottom: 1px solid var(--color-border);
6521
+ padding-bottom: 0.25em;
6522
+ margin: 0;
6523
+ }
6524
+
6525
+ .h2 {
6526
+ font-size: 1.5em;
6527
+ border-bottom: 1px solid var(--color-border);
6528
+ padding-bottom: 0.2em;
6529
+ }
6530
+
6531
+ .h3 {
6532
+ font-size: 1.25em;
6533
+ }
6534
+
6535
+ .h4 {
6536
+ font-size: 1.1em;
6537
+ }
6538
+
6539
+ .h5 {
6540
+ font-size: 1em;
6541
+ }
6542
+
6543
+ .h6 {
6544
+ font-size: 0.9em;
6545
+ color: var(--color-muted);
6546
+ }
6547
+
6548
+ .blockQuote {
6549
+ border-left: 3px solid var(--color-blockquote-border);
6550
+ padding-left: 1em;
6551
+ margin: 0.5em 0;
6552
+ color: var(--color-muted);
6553
+ font-style: italic;
6554
+ }
6555
+
6556
+ .codeBlock {
6557
+ background: var(--color-code-bg);
6558
+ border: 1px solid var(--color-border);
6559
+ border-radius: 6px;
6560
+ padding: 0 1em;
6561
+ margin: 0.5em 0;
6562
+ overflow-x: auto;
6563
+ position: relative;
6564
+ transition: border-color 0.15s ease;
6565
+ }
6566
+ .codeBlock code {
6567
+ display: flex;
6568
+ flex-direction: column;
6569
+ font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
6570
+ font-size: 0.9em;
6571
+ line-height: 1.5;
6572
+ color: var(--color-text);
6573
+ }
6574
+ .codeBlock .marker {
6575
+ opacity: 0;
6576
+ }
6577
+ .codeBlock .marker.focused {
6578
+ opacity: 1;
6579
+ }
6580
+ .codeBlock .marker .symbolic {
6581
+ position: relative;
6582
+ color: inherit;
6583
+ }
6584
+ .codeBlock .inline[data-type=text] {
6585
+ white-space: pre-wrap;
6586
+ word-break: break-all;
6587
+ }
6588
+ .codeBlock .inline[data-type=text].focused {
6589
+ background: transparent;
6590
+ outline: none;
6591
+ }
6592
+ .codeBlock .inline[data-type=text] .symbolic {
6593
+ position: relative;
6594
+ color: inherit;
6595
+ }
6596
+ .codeBlock .inline[data-type=text] .semantic {
6597
+ display: none;
6598
+ }
6599
+ .codeBlock[data-language]::before {
6600
+ content: attr(data-language);
6601
+ position: absolute;
6602
+ top: 0.5em;
6603
+ right: 0.75em;
6604
+ font-size: 0.75em;
6605
+ text-transform: uppercase;
6606
+ letter-spacing: 0.05em;
6607
+ pointer-events: none;
6608
+ }
6609
+
6610
+ .list {
6611
+ margin: 0;
6612
+ padding-left: 1.5em;
6613
+ }
6614
+ .list[start] {
6615
+ list-style-type: decimal;
6616
+ }
6617
+
6618
+ .listItem {
6619
+ display: list-item;
6620
+ margin: 0;
6621
+ }
6622
+ .listItem .markerAnchor {
6623
+ display: inline;
6624
+ width: 0;
6625
+ height: 0;
6626
+ pointer-events: none;
6627
+ }
6628
+
6629
+ .taskListItem {
6630
+ list-style: none;
6631
+ margin-left: -1.5em;
6632
+ display: flex;
6633
+ align-items: center;
6634
+ gap: 0.1em;
6635
+ }
6636
+
6637
+ .taskCheckbox {
6638
+ margin-top: 0.35em;
6639
+ margin-left: 0.5em;
6640
+ width: 1em;
6641
+ height: 1em;
6642
+ accent-color: var(--color-accent);
6643
+ cursor: pointer;
6644
+ }
6645
+
6646
+ .taskContent {
6647
+ flex: 1;
6648
+ }
6649
+
6650
+ .thematicBreak {
6651
+ position: relative;
6652
+ border: none;
6653
+ }
6654
+ .thematicBreak::after {
6655
+ content: "";
6656
+ position: absolute;
6657
+ top: 0;
6658
+ bottom: 0;
6659
+ left: 0;
6660
+ margin: auto;
6661
+ width: 100%;
6662
+ height: 1px;
6663
+ background-color: var(--color-border);
6664
+ }
6665
+ .thematicBreak.focused::after {
6666
+ display: none;
6667
+ }
6668
+
6669
+ .table {
6670
+ width: 100%;
6671
+ table-layout: fixed;
6672
+ border-collapse: collapse;
6673
+ margin: 0.5em 0;
6674
+ border: 1px solid var(--color-border);
6675
+ }
6676
+
6677
+ .tableRow,
6678
+ .tableCell {
6679
+ border: 1px solid var(--color-border);
6680
+ padding: 0.5em 1em;
6681
+ text-align: left;
6682
+ }
6683
+
6684
+ .htmlBlock {
6685
+ margin: 0.5em 0;
6686
+ }
6687
+
6688
+ .footnote {
6689
+ font-size: 0.9em;
6690
+ color: var(--color-muted);
6691
+ margin: 0.25em 0;
6692
+ padding-left: 2em;
6693
+ position: relative;
6694
+ }
6695
+
6696
+ .footnoteLabel {
6697
+ position: absolute;
6698
+ left: 0;
6699
+ color: var(--color-accent);
6700
+ }
6701
+
6702
+ .footnoteContent {
6703
+ display: inline;
6704
+ }
6705
+
6706
+ .blankLine {
6707
+ height: 1.2em;
6708
+ user-select: none;
6709
+ }
6710
+
6711
+ .link, .autolink {
6712
+ cursor: pointer;
6713
+ }
6714
+
6715
+ .caret {
6716
+ position: absolute;
6717
+ width: 1px;
6718
+ height: 1em;
6719
+ background-color: #fff;
6720
+ animation: blink 1s step-end infinite;
6721
+ pointer-events: none;
6722
+ z-index: 10;
6723
+ }
6724
+
6725
+ .inline {
6726
+ outline: none;
6727
+ white-space: pre-wrap;
6728
+ word-break: break-word;
6729
+ }
6730
+ .inline.focus {
6731
+ background: rgba(0, 120, 255, 0.1);
6732
+ border-radius: 3px;
6733
+ padding: 0 2px;
6734
+ min-height: 1.2em;
6735
+ outline: 1px solid var(--color-accent);
6736
+ }
6737
+ .inline[data-type=strong]:not(.focus) {
6738
+ font-weight: bold;
6739
+ }
6740
+ .inline[data-type=emphasis]:not(.focus) {
6741
+ font-style: italic;
6742
+ }
6743
+ .inline[data-type=codeSpan]:not(.focus) {
6744
+ font-family: "JetBrains Mono", "Fira Code", monospace;
6745
+ font-size: 0.9em;
6746
+ background: var(--color-code-bg);
6747
+ padding: 0.15em 0.4em;
6748
+ border-radius: 3px;
6749
+ }
6750
+ .inline[data-type=link]:not(.focus) {
6751
+ color: var(--color-accent);
6752
+ text-decoration: underline;
6753
+ cursor: pointer;
6754
+ }
6755
+ .inline[data-type=autolink]:not(.focus) {
6756
+ color: var(--color-accent);
6757
+ text-decoration: underline;
6758
+ }
6759
+ .inline[data-type=strikethrough]:not(.focus) {
6760
+ text-decoration: line-through;
6761
+ color: var(--color-muted);
6762
+ }
6763
+ .inline[data-type=image]:not(.focus) {
6764
+ color: var(--color-accent);
6765
+ }
6766
+ .inline[data-type=image]:not(.focus)::before {
6767
+ content: "\u{1F5BC}\uFE0F ";
6768
+ }
6769
+ .inline[data-type=footnoteRef]:not(.focus) {
6770
+ color: var(--color-accent);
6771
+ font-size: 0.8em;
6772
+ vertical-align: super;
6773
+ }
6774
+ .inline[data-type=hardBreak], .inline[data-type=softBreak] {
6775
+ display: inline;
6776
+ }
6777
+ .inline[data-type=rawHTML]:not(.focus) {
6778
+ font-family: monospace;
6779
+ color: var(--color-muted);
6780
+ font-size: 0.9em;
6781
+ }
6782
+
6783
+ .blink {
6784
+ animation: blink 1s step-end infinite;
6785
+ }
6786
+
6787
+ @keyframes blink {
6788
+ 50% {
6789
+ opacity: 0;
6790
+ }
6791
+ }
6792
+ `;
6793
+ var element_css_default = cssText;
6422
6794
 
6423
6795
  // models/element.ts
6424
6796
  var Element = class extends HTMLElement {
@@ -6476,7 +6848,7 @@ var Element = class extends HTMLElement {
6476
6848
  addStyles() {
6477
6849
  if (this.styled) return;
6478
6850
  const style = document.createElement("style");
6479
- style.textContent = element_default;
6851
+ style.textContent = element_css_default;
6480
6852
  this.shadowRootElement.appendChild(style);
6481
6853
  this.styled = true;
6482
6854
  }
@@ -6495,17 +6867,17 @@ var Element = class extends HTMLElement {
6495
6867
  }));
6496
6868
  }
6497
6869
  };
6498
- var element_default2 = Element;
6870
+ var element_default = Element;
6499
6871
 
6500
6872
  // index.ts
6501
6873
  function defineElement() {
6502
6874
  if (!customElements.get("synthetic-text")) {
6503
- customElements.define("synthetic-text", element_default2);
6875
+ customElements.define("synthetic-text", element_default);
6504
6876
  }
6505
6877
  }
6506
- var index_default = element_default2;
6878
+ var index_default = element_default;
6507
6879
  export {
6508
- element_default2 as Element,
6880
+ element_default as Element,
6509
6881
  index_default as default,
6510
6882
  defineElement
6511
6883
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semigarden/synthetic-md",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Synthetic Markdown",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -36,11 +36,13 @@
36
36
  "sideEffects": false,
37
37
  "scripts": {
38
38
  "build:css": "sass styles/element.scss styles/element.css --no-source-map",
39
+ "build:css-ts": "node scripts/generate-css-ts.js",
39
40
  "build:distcss": "node -e \"require('fs').copyFileSync('styles/element.css','dist/index.css')\"",
40
- "build": "npm run build:css && tsup && npm run build:distcss",
41
+ "build": "npm run build:css && npm run build:css-ts && tsup && npm run build:distcss",
41
42
  "watch:css": "sass styles/element.scss styles/element.css --no-source-map --watch",
43
+ "watch:css-ts": "node -e \"const fs=require('fs'); const {spawn}=require('child_process'); const src='styles/element.css'; const copy=()=>{spawn('npm',['run','build:css-ts'],{stdio:'inherit'});}; copy(); fs.watchFile(src,{interval:200},copy);\"",
42
44
  "watch:distcss": "node -e \"const fs=require('fs'); const src='styles/element.css'; const dst='dist/index.css'; const copy=()=>{fs.mkdirSync('dist',{recursive:true}); fs.copyFileSync(src,dst); console.log('[css] copied ->',dst)}; copy(); fs.watchFile(src,{interval:200},copy);\"",
43
- "dev": "concurrently -n TSUP,CSS,COPY \"tsup index.ts --watch --clean=false\" \"npm:watch:css\" \"npm:watch:distcss\"",
45
+ "dev": "concurrently -n TSUP,CSS,CSS-TS,COPY \"tsup index.ts --watch --clean=false\" \"npm:watch:css\" \"npm:watch:css-ts\" \"npm:watch:distcss\"",
44
46
  "lint": "eslint .",
45
47
  "test": "vitest",
46
48
  "prepublishOnly": "npm run build"