@histoire/app 1.0.0-alpha.3 → 1.0.0-alpha.5

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.
@@ -1,19 +1,22 @@
1
-
1
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
2
2
  .bind-tree-margin[data-v-64c2458f] {
3
3
  margin-left: var(--2562213a);
4
4
  }
5
5
  .bind-icon-color[data-v-64c2458f] {
6
6
  color: var(--1eff521f);
7
7
  }
8
-
8
+ }
9
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
9
10
  .bind-tree-padding[data-v-ee932a0c] {
10
11
  padding-left: var(--5352bb71);
11
12
  }
12
-
13
+ }
14
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
13
15
  .bind-icon-color[data-v-d15ecb89] {
14
16
  color: var(--a3f02f4e);
15
17
  }
16
-
18
+ }
19
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
17
20
  .landscape > div > .dragger[data-v-4f40a1bb] {
18
21
  width: .625rem;
19
22
  }
@@ -38,7 +41,8 @@
38
41
  .portrait > div > .dragger.dragger-offset-after[data-v-4f40a1bb] {
39
42
  bottom: -.625rem;
40
43
  }
41
-
44
+ }
45
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
42
46
  .htw-base-empty[data-v-c5ecfead]:not(.no-animation) {
43
47
  animation: htw-base-empty-c5ecfead .15s .2s both;
44
48
  }
@@ -50,28 +54,33 @@
50
54
  opacity: 1;
51
55
  }
52
56
  }
53
-
57
+ }
58
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
54
59
  .__histoire-code-placeholder[data-v-96af7f40] {
55
60
  color: inherit;
56
61
  font-size: inherit;
57
62
  }
58
-
63
+ }
64
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
59
65
  .bind-preview-bg[data-v-c48fb2b2] {
60
66
  background-color: var(--627bec82);
61
67
  color: var(--35068428);
62
68
  }
63
-
69
+ }
70
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
64
71
  .bind-icon-color[data-v-feff9239] {
65
72
  color: var(--60afaf4d);
66
73
  }
67
74
  .bind-preview-bg[data-v-feff9239] {
68
75
  background-color: var(--3bd99e7e);
69
76
  }
70
-
77
+ }
78
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
71
79
  .bind-icon-color[data-v-1b279b85] {
72
80
  color: var(--ab2181a2);
73
81
  }
74
-
82
+ }
83
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
75
84
  .__histoire-hatched-pattern[data-v-91561117] {
76
85
  background: repeating-linear-gradient(135deg,
77
86
  transparent 0px,
@@ -79,23 +88,29 @@
79
88
  currentColor 32px,
80
89
  currentColor 64px);
81
90
  }
82
-
91
+ }
92
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
83
93
  .bind-preview-bg[data-v-18122333] {
84
94
  background-color: var(--5f6f4ee9);
85
95
  }
86
-
96
+ }
97
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
87
98
  .bind-icon-color[data-v-c2a43485] {
88
99
  color: var(--41c4d268);
89
100
  }
90
-
101
+ }
102
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
91
103
  .bind-icon-color[data-v-096f6d6e] {
92
104
  color: var(--0f021d3c);
93
105
  }
94
-
106
+ }
107
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
95
108
  img.colorize-black[data-v-2114f510] {
96
109
  filter: grayscale(100) brightness(0);
97
110
  }
98
-
111
+ }
112
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)) {
99
113
  .bind-icon-color[data-v-9f94ad2b] {
100
114
  color: var(--1f9aa6ca);
101
115
  }
116
+ }
package/dist/style.css CHANGED
@@ -1,5 +1,7 @@
1
1
  @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Display&display=swap');
2
2
 
3
+ @scope (:root) to (.__histoire-render-story:not(.__histoire-render-custom-controls)){
4
+
3
5
  .resize-observer[data-v-b329ee4c]{
4
6
  position:absolute;
5
7
  top:0;
@@ -527,13 +529,13 @@ body,
527
529
  margin: 0;
528
530
  }
529
531
 
530
- html,
532
+ :scope,
531
533
  body,
532
534
  #app {
533
535
  height: 100%;
534
536
  }
535
537
 
536
- html {
538
+ :scope {
537
539
  font-family: 'Noto Sans Display', system-ui, sans-serif;
538
540
  font-size: 1rem;
539
541
  }
@@ -822,7 +824,7 @@ body {
822
824
  border-radius:0.25rem;
823
825
  }
824
826
 
825
- .htw-prose :where(code):not(:where([class~="htw-not-prose"],[class~="htw-not-prose"] *))::before, .htw-prose :where(code):not(:where([class~="htw-not-prose"],[class~="htw-not-prose"] *))::after{
827
+ .htw-prose :where(code):not(:where([class~="htw-not-prose"],[class~="htw-not-prose"] *))::before,.htw-prose :where(code):not(:where([class~="htw-not-prose"],[class~="htw-not-prose"] *))::after{
826
828
  display:none
827
829
  }
828
830
 
@@ -1896,6 +1898,10 @@ body {
1896
1898
  border-style:solid
1897
1899
  }
1898
1900
 
1901
+ .htw-border-none{
1902
+ border-style:none
1903
+ }
1904
+
1899
1905
  .htw-border-black\/20{
1900
1906
  border-color:rgb(0 0 0 / 0.2)
1901
1907
  }
@@ -2844,3 +2850,4 @@ body {
2844
2850
  .histoire-story-list-folder-button:hover .\[\.histoire-story-list-folder-button\:hover_\&\]\:htw-opacity-100{
2845
2851
  opacity:1
2846
2852
  }
2853
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@histoire/app",
3
3
  "type": "module",
4
- "version": "1.0.0-alpha.3",
4
+ "version": "1.0.0-alpha.5",
5
5
  "description": "Pre-bundled UI for Histoire",
6
6
  "author": {
7
7
  "name": "Guillaume Chau"
@@ -26,9 +26,9 @@
26
26
  "dependencies": {
27
27
  "fuse.js": "^7.0.0",
28
28
  "shiki": "^3.0.0",
29
- "@histoire/controls": "^1.0.0-alpha.3",
30
- "@histoire/vendors": "^1.0.0-alpha.3",
31
- "@histoire/shared": "^1.0.0-alpha.3"
29
+ "@histoire/controls": "^1.0.0-alpha.5",
30
+ "@histoire/shared": "^1.0.0-alpha.5",
31
+ "@histoire/vendors": "^1.0.0-alpha.5"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@tailwindcss/typography": "^0.5.15",
@@ -0,0 +1,35 @@
1
+ function isImportRule(node) {
2
+ return node.type === 'atrule' && node.name === 'import'
3
+ }
4
+
5
+ module.exports = (opts = {}) => {
6
+ const { from = ':root', to } = opts
7
+ let params = `(${from})`
8
+ if (to) {
9
+ params += ` to (${to})`
10
+ }
11
+
12
+ return {
13
+ postcssPlugin: 'postcss-scope-wrapper',
14
+ Once(root, { AtRule }) {
15
+ const scopeRule = new AtRule({
16
+ name: 'scope',
17
+ params,
18
+ })
19
+
20
+ const nodesToMove = root.nodes.filter(node => !isImportRule(node))
21
+
22
+ nodesToMove.forEach((node) => {
23
+ if (node.type === 'rule') {
24
+ node.selectors = node.selectors
25
+ .map(selector => (['html', ':root'].includes(selector) ? ':scope' : selector))
26
+ }
27
+ scopeRule.append(node)
28
+ })
29
+
30
+ root.append(scopeRule)
31
+ },
32
+ }
33
+ }
34
+
35
+ module.exports.postcss = true
@@ -4,5 +4,6 @@ module.exports = {
4
4
  require('tailwindcss/nesting'),
5
5
  require('tailwindcss')('./tailwind.config.cjs'),
6
6
  require('autoprefixer'),
7
+ require('./postcss-scope-wrapper.cjs')({ from: ':root', to: '.__histoire-render-story:not(.__histoire-render-custom-controls)' }),
7
8
  ],
8
9
  }