histoire 0.2.5 → 0.3.2
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/client/app/App.vue +8 -3
- package/dist/client/app/codegen/const.d.ts +1 -0
- package/dist/client/app/codegen/const.js +3 -0
- package/dist/client/app/codegen/vue3.js +83 -21
- package/dist/client/app/codegen/vue3.js.map +1 -0
- package/dist/client/app/components/base/BaseEmpty.vue +17 -1
- package/dist/client/app/components/base/BaseOverflowMenu.vue +118 -0
- package/dist/client/app/components/base/BaseOverflowTab.vue +46 -0
- package/dist/client/app/components/exposed/Story.vue +33 -1
- package/dist/client/app/components/exposed/Variant.vue +19 -1
- package/dist/client/app/components/panel/PaneTabs.vue +64 -0
- package/dist/client/app/components/{story → panel}/StoryControls.vue +6 -1
- package/dist/client/app/components/{story → panel}/StoryDocs.vue +18 -11
- package/dist/client/app/components/panel/StoryEvent.vue +53 -0
- package/dist/client/app/components/panel/StoryEvents.vue +45 -0
- package/{src/client/app/components/story → dist/client/app/components/panel}/StorySidePanel.vue +17 -20
- package/{src/client/app/components/story → dist/client/app/components/panel}/StorySourceCode.vue +24 -14
- package/dist/client/app/components/sandbox/SandboxVue3.vue +16 -4
- package/dist/client/app/components/sandbox/lib.js +2 -1
- package/dist/client/app/components/search/SearchLoading.vue +16 -0
- package/dist/client/app/components/search/SearchModal.vue +12 -149
- package/dist/client/app/components/search/SearchPane.vue +210 -0
- package/dist/client/app/components/search/search-data.d.ts +2 -0
- package/dist/client/app/components/search/search-data.js +8 -0
- package/dist/client/app/components/search/search-data.js.map +1 -0
- package/dist/client/app/components/story/StoryResponsivePreview.vue +9 -98
- package/dist/client/app/components/story/StoryVariantSingle.vue +109 -0
- package/dist/client/app/components/story/StoryVariantSinglePreviewNative.vue +39 -0
- package/dist/client/app/components/story/StoryVariantSinglePreviewRemote.vue +153 -0
- package/dist/client/app/components/story/StoryVariantSingleView.vue +13 -6
- package/dist/client/app/components/story/StoryView.vue +17 -3
- package/dist/client/app/components/story/StoryViewer.vue +2 -92
- package/dist/client/app/components/{story/toolbar → toolbar}/StoryVariantBackground.vue +3 -3
- package/{src/client/app/components/story → dist/client/app/components}/toolbar/StoryVariantNewTab.vue +2 -2
- package/dist/client/app/components/{story/toolbar → toolbar}/StoryVariantResponsiveSize.vue +3 -3
- package/{src/client/app/components/story → dist/client/app/components}/toolbar/StoryVariantTitle.vue +1 -1
- package/dist/client/app/components/tree/StoryGroup.vue +4 -4
- package/dist/client/app/components/tree/StoryListFolder.vue +4 -4
- package/dist/client/app/components/tree/StoryListItem.vue +4 -1
- package/dist/client/app/global-components.js +1 -0
- package/dist/client/app/global-components.js.map +1 -0
- package/dist/client/app/index.js +1 -0
- package/dist/client/app/index.js.map +1 -0
- package/dist/client/app/router.d.ts +1 -0
- package/dist/client/app/router.js +3 -1
- package/dist/client/app/sandbox.js +12 -1
- package/dist/client/app/sandbox.js.map +1 -0
- package/dist/client/app/stores/events.d.ts +29 -0
- package/dist/client/app/stores/events.js +26 -0
- package/dist/client/app/stores/events.js.map +1 -0
- package/dist/client/app/stores/folder.d.ts +10 -0
- package/dist/client/app/stores/folder.js +48 -0
- package/dist/client/app/stores/folder.js.map +1 -0
- package/dist/client/app/stores/story.d.ts +41 -8
- package/dist/client/app/stores/story.js +21 -33
- package/dist/client/app/stores/story.js.map +1 -0
- package/dist/client/app/style/main.pcss +5 -0
- package/dist/client/app/style/sandbox.css +2 -0
- package/dist/client/app/style/transitions.pcss +13 -0
- package/dist/client/app/types.d.ts +4 -0
- package/dist/client/app/types.js +1 -0
- package/dist/client/app/types.js.map +1 -0
- package/dist/client/app/util/const.d.ts +1 -0
- package/dist/client/app/util/const.js +1 -0
- package/dist/client/app/util/events.d.ts +1 -0
- package/dist/client/app/util/events.js +32 -0
- package/dist/client/app/util/events.js.map +1 -0
- package/dist/client/app/util/keyboard.js +1 -0
- package/dist/client/app/util/keyboard.js.map +1 -0
- package/dist/client/app/util/mapping.js +5 -2
- package/dist/client/app/util/mapping.js.map +1 -0
- package/dist/client/app/util/preview-settings.js +1 -0
- package/dist/client/app/util/preview-settings.js.map +1 -0
- package/dist/client/app/util/reactivity.js +1 -0
- package/dist/client/app/util/reactivity.js.map +1 -0
- package/dist/client/app/util/scroll.js +1 -0
- package/dist/client/app/util/scroll.js.map +1 -0
- package/dist/client/app/util/variant.js +1 -0
- package/dist/client/app/util/variant.js.map +1 -0
- package/dist/client/index.d.ts +4 -3
- package/dist/client/index.js +3 -1
- package/dist/client/index.js.map +1 -0
- package/dist/client/server/index.d.ts +7 -2
- package/dist/client/server/index.js +8 -26
- package/{src/client/server/Story.server.vue → dist/client/server/vue3/Story.vue} +14 -3
- package/dist/client/server/{Variant.server.vue → vue3/Variant.vue} +0 -0
- package/dist/client/server/vue3/run.d.ts +2 -0
- package/dist/client/server/vue3/run.js +33 -0
- package/dist/client/server/vue3/run.js.map +1 -0
- package/dist/controls.js +1 -0
- package/dist/controls.js.map +1 -0
- package/dist/node/alias.d.ts +2 -1
- package/dist/node/alias.js +3 -2
- package/dist/node/build.js +74 -21
- package/dist/node/builtin-plugins/tailwind-tokens.d.ts +5 -0
- package/dist/node/builtin-plugins/tailwind-tokens.js +510 -0
- package/dist/node/collect/index.js +3 -1
- package/dist/node/collect/worker.js +6 -2
- package/dist/node/commands/preview.js +4 -25
- package/dist/node/config.d.ts +103 -3
- package/dist/node/config.js +40 -23
- package/dist/node/context.d.ts +3 -3
- package/dist/node/context.js +1 -1
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +1 -0
- package/dist/node/load.d.ts +12 -0
- package/dist/node/load.js +42 -0
- package/dist/node/plugin.d.ts +67 -11
- package/dist/node/plugin.js +42 -245
- package/dist/node/preview.d.ts +8 -0
- package/dist/node/preview.js +41 -0
- package/dist/node/search.d.ts +2 -0
- package/dist/node/search.js +68 -0
- package/dist/node/server.js +43 -21
- package/dist/node/stories.d.ts +2 -0
- package/dist/node/stories.js +4 -4
- package/dist/node/types.d.ts +1 -0
- package/dist/node/util/find-up.d.ts +1 -0
- package/dist/node/util/find-up.js +20 -0
- package/dist/node/vite.d.ts +13 -0
- package/dist/node/vite.js +278 -0
- package/dist/style.css +174 -86
- package/package.json +7 -6
- package/scripts/copy.mjs +2 -1
- package/src/client/app/App.vue +8 -3
- package/src/client/app/codegen/const.ts +3 -0
- package/src/client/app/codegen/vue3.ts +80 -22
- package/src/client/app/components/base/BaseEmpty.vue +17 -1
- package/src/client/app/components/base/BaseOverflowMenu.vue +118 -0
- package/src/client/app/components/base/BaseOverflowTab.vue +46 -0
- package/src/client/app/components/exposed/Story.vue +33 -1
- package/src/client/app/components/exposed/Variant.vue +19 -1
- package/src/client/app/components/panel/PaneTabs.vue +64 -0
- package/src/client/app/components/{story → panel}/StoryControls.vue +6 -1
- package/src/client/app/components/{story → panel}/StoryDocs.vue +18 -11
- package/src/client/app/components/panel/StoryEvent.vue +53 -0
- package/src/client/app/components/panel/StoryEvents.vue +45 -0
- package/{dist/client/app/components/story → src/client/app/components/panel}/StorySidePanel.vue +17 -20
- package/{dist/client/app/components/story → src/client/app/components/panel}/StorySourceCode.vue +24 -14
- package/src/client/app/components/sandbox/SandboxVue3.vue +16 -4
- package/src/client/app/components/sandbox/lib.ts +3 -1
- package/src/client/app/components/search/SearchLoading.vue +16 -0
- package/src/client/app/components/search/SearchModal.vue +12 -149
- package/src/client/app/components/search/SearchPane.vue +210 -0
- package/src/client/app/components/search/search-data.ts +9 -0
- package/src/client/app/components/story/StoryResponsivePreview.vue +9 -98
- package/src/client/app/components/story/StoryVariantSingle.vue +109 -0
- package/src/client/app/components/story/StoryVariantSinglePreviewNative.vue +39 -0
- package/src/client/app/components/story/StoryVariantSinglePreviewRemote.vue +153 -0
- package/src/client/app/components/story/StoryVariantSingleView.vue +13 -6
- package/src/client/app/components/story/StoryView.vue +17 -3
- package/src/client/app/components/story/StoryViewer.vue +2 -92
- package/src/client/app/components/{story/toolbar → toolbar}/StoryVariantBackground.vue +3 -3
- package/{dist/client/app/components/story → src/client/app/components}/toolbar/StoryVariantNewTab.vue +2 -2
- package/src/client/app/components/{story/toolbar → toolbar}/StoryVariantResponsiveSize.vue +3 -3
- package/{dist/client/app/components/story → src/client/app/components}/toolbar/StoryVariantTitle.vue +1 -1
- package/src/client/app/components/tree/StoryGroup.vue +4 -4
- package/src/client/app/components/tree/StoryListFolder.vue +4 -4
- package/src/client/app/components/tree/StoryListItem.vue +4 -1
- package/src/client/app/router.ts +4 -1
- package/src/client/app/sandbox.ts +11 -1
- package/src/client/app/stores/events.ts +36 -0
- package/{dist/client/app/stores/story.ts → src/client/app/stores/folder.ts} +16 -23
- package/src/client/app/stores/story.ts +21 -40
- package/src/client/app/style/main.pcss +5 -0
- package/src/client/app/style/sandbox.css +2 -0
- package/src/client/app/style/transitions.pcss +13 -0
- package/src/client/app/types.ts +5 -0
- package/src/client/app/util/const.ts +1 -0
- package/src/client/app/util/events.ts +30 -0
- package/src/client/app/util/mapping.ts +4 -2
- package/src/client/index.ts +4 -3
- package/src/client/server/index.ts +14 -27
- package/{dist/client/server/Story.server.vue → src/client/server/vue3/Story.vue} +14 -3
- package/src/client/server/{Variant.server.vue → vue3/Variant.vue} +0 -0
- package/{dist/client/server/index.ts → src/client/server/vue3/run.ts} +10 -4
- package/src/node/alias.ts +4 -2
- package/src/node/build.ts +86 -21
- package/src/node/builtin-plugins/tailwind-tokens.ts +521 -0
- package/src/node/collect/index.ts +3 -1
- package/src/node/collect/worker.ts +7 -2
- package/src/node/commands/preview.ts +4 -33
- package/src/node/config.ts +53 -27
- package/src/node/context.ts +3 -3
- package/src/node/index.ts +1 -0
- package/src/node/load.ts +63 -0
- package/src/node/plugin.ts +75 -252
- package/src/node/preview.ts +56 -0
- package/src/node/search.ts +75 -0
- package/src/node/server.ts +49 -23
- package/src/node/stories.ts +4 -4
- package/src/node/types.ts +1 -0
- package/src/node/util/find-up.ts +24 -0
- package/src/node/vite.ts +296 -0
- package/tailwind.config.cjs +1 -0
- package/dist/client/app/codegen/serialize-js.ts +0 -119
- package/dist/client/app/codegen/util.ts +0 -79
- package/dist/client/app/codegen/vue3.ts +0 -276
- package/dist/client/app/components/sandbox/lib.ts +0 -8
- package/dist/client/app/global-components.ts +0 -13
- package/dist/client/app/index.ts +0 -28
- package/dist/client/app/router.ts +0 -17
- package/dist/client/app/sandbox.ts +0 -94
- package/dist/client/app/stores/preview-settings.ts +0 -17
- package/dist/client/app/types.ts +0 -78
- package/dist/client/app/util/config.ts +0 -6
- package/dist/client/app/util/const.ts +0 -3
- package/dist/client/app/util/dark.ts +0 -4
- package/dist/client/app/util/env.ts +0 -1
- package/dist/client/app/util/keyboard.ts +0 -99
- package/dist/client/app/util/mapping.ts +0 -48
- package/dist/client/app/util/preview-settings.ts +0 -8
- package/dist/client/app/util/reactivity.ts +0 -22
- package/dist/client/app/util/responsive.ts +0 -3
- package/dist/client/app/util/scroll.ts +0 -31
- package/dist/client/app/util/tooltip.ts +0 -13
- package/dist/client/app/util/variant.ts +0 -20
- package/dist/client/index.ts +0 -12
- package/dist/client/shim.d.ts +0 -5
package/dist/style.css
CHANGED
|
@@ -204,6 +204,10 @@
|
|
|
204
204
|
border-color:#000c
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
.htw-bind-col-size{
|
|
208
|
+
grid-template-columns:repeat(auto-fill,minmax(var(--histoire-col-size),1fr))
|
|
209
|
+
}
|
|
210
|
+
|
|
207
211
|
/* @TODO custom themes */
|
|
208
212
|
|
|
209
213
|
.v-popper {
|
|
@@ -253,6 +257,17 @@
|
|
|
253
257
|
opacity: 0;
|
|
254
258
|
}
|
|
255
259
|
|
|
260
|
+
.__histoire-scale-y-enter-active,
|
|
261
|
+
.__histoire-scale-y-leave-active {
|
|
262
|
+
transition: transform .15s, opacity .15s;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.__histoire-scale-y-enter-from,
|
|
266
|
+
.__histoire-scale-y-leave-to {
|
|
267
|
+
transform: scaleY(0);
|
|
268
|
+
opacity: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
256
271
|
.__histoire-fade-enter-active,
|
|
257
272
|
.__histoire-fade-leave-active {
|
|
258
273
|
transition: transform .15s, opacity .15s;
|
|
@@ -649,7 +664,7 @@ button {
|
|
|
649
664
|
--tw-prose-invert-bold:#fff;
|
|
650
665
|
--tw-prose-invert-counters:#9ca3af;
|
|
651
666
|
--tw-prose-invert-bullets:rgb(var(--_histoire-color-gray-500));
|
|
652
|
-
--tw-prose-invert-hr
|
|
667
|
+
--tw-prose-invert-hr:rgb(var(--_histoire-color-gray-800));
|
|
653
668
|
--tw-prose-invert-quotes:#f3f4f6;
|
|
654
669
|
--tw-prose-invert-quote-borders:rgb(var(--_histoire-color-gray-800));
|
|
655
670
|
--tw-prose-invert-captions:#9ca3af;
|
|
@@ -852,14 +867,6 @@ button {
|
|
|
852
867
|
right:0.25rem
|
|
853
868
|
}
|
|
854
869
|
|
|
855
|
-
.htw-top-2{
|
|
856
|
-
top:0.5rem
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
.htw-right-6{
|
|
860
|
-
right:1.5rem
|
|
861
|
-
}
|
|
862
|
-
|
|
863
870
|
.htw-isolate{
|
|
864
871
|
isolation:isolate
|
|
865
872
|
}
|
|
@@ -884,16 +891,16 @@ button {
|
|
|
884
891
|
margin:0.25rem
|
|
885
892
|
}
|
|
886
893
|
|
|
887
|
-
.htw-my-2{
|
|
888
|
-
margin-top:0.5rem;
|
|
889
|
-
margin-bottom:0.5rem
|
|
890
|
-
}
|
|
891
|
-
|
|
892
894
|
.htw-mx-1{
|
|
893
895
|
margin-left:0.25rem;
|
|
894
896
|
margin-right:0.25rem
|
|
895
897
|
}
|
|
896
898
|
|
|
899
|
+
.htw-my-2{
|
|
900
|
+
margin-top:0.5rem;
|
|
901
|
+
margin-bottom:0.5rem
|
|
902
|
+
}
|
|
903
|
+
|
|
897
904
|
.htw-mx-2{
|
|
898
905
|
margin-left:0.5rem;
|
|
899
906
|
margin-right:0.5rem
|
|
@@ -927,6 +934,10 @@ button {
|
|
|
927
934
|
margin-left:auto
|
|
928
935
|
}
|
|
929
936
|
|
|
937
|
+
.htw-mb-6{
|
|
938
|
+
margin-bottom:1.5rem
|
|
939
|
+
}
|
|
940
|
+
|
|
930
941
|
.htw-mt-0\.5{
|
|
931
942
|
margin-top:0.125rem
|
|
932
943
|
}
|
|
@@ -1007,12 +1018,20 @@ button {
|
|
|
1007
1018
|
height:16px
|
|
1008
1019
|
}
|
|
1009
1020
|
|
|
1021
|
+
.htw-h-4{
|
|
1022
|
+
height:1rem
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
.htw-h-10{
|
|
1026
|
+
height:2.5rem
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1010
1029
|
.htw-h-\[2px\]{
|
|
1011
1030
|
height:2px
|
|
1012
1031
|
}
|
|
1013
1032
|
|
|
1014
|
-
.htw-h
|
|
1015
|
-
height:
|
|
1033
|
+
.htw-h-\[51px\]{
|
|
1034
|
+
height:51px
|
|
1016
1035
|
}
|
|
1017
1036
|
|
|
1018
1037
|
.htw-h-fit{
|
|
@@ -1029,10 +1048,6 @@ button {
|
|
|
1029
1048
|
height:1px
|
|
1030
1049
|
}
|
|
1031
1050
|
|
|
1032
|
-
.htw-h-10{
|
|
1033
|
-
height:2.5rem
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
1051
|
.htw-h-\[1px\]{
|
|
1037
1052
|
height:1px
|
|
1038
1053
|
}
|
|
@@ -1093,6 +1108,10 @@ button {
|
|
|
1093
1108
|
width:1rem
|
|
1094
1109
|
}
|
|
1095
1110
|
|
|
1111
|
+
.htw-w-\[2px\]{
|
|
1112
|
+
width:2px
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1096
1115
|
.htw-w-fit{
|
|
1097
1116
|
width:-webkit-fit-content;
|
|
1098
1117
|
width:-moz-fit-content;
|
|
@@ -1113,6 +1132,10 @@ button {
|
|
|
1113
1132
|
width:max-content
|
|
1114
1133
|
}
|
|
1115
1134
|
|
|
1135
|
+
.htw-w-16{
|
|
1136
|
+
width:4rem
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1116
1139
|
.htw-w-20{
|
|
1117
1140
|
width:5rem
|
|
1118
1141
|
}
|
|
@@ -1121,14 +1144,18 @@ button {
|
|
|
1121
1144
|
width:7rem
|
|
1122
1145
|
}
|
|
1123
1146
|
|
|
1124
|
-
.htw-w-16{
|
|
1125
|
-
width:4rem
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
1147
|
.htw-w-32{
|
|
1129
1148
|
width:8rem
|
|
1130
1149
|
}
|
|
1131
1150
|
|
|
1151
|
+
.htw-min-w-\[150px\]{
|
|
1152
|
+
min-width:150px
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
.htw-min-w-4{
|
|
1156
|
+
min-width:1rem
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1132
1159
|
.htw-min-w-16{
|
|
1133
1160
|
min-width:4rem
|
|
1134
1161
|
}
|
|
@@ -1141,14 +1168,18 @@ button {
|
|
|
1141
1168
|
max-width:100%
|
|
1142
1169
|
}
|
|
1143
1170
|
|
|
1144
|
-
.htw-max-w-\[512px\]{
|
|
1145
|
-
max-width:512px
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
1171
|
.htw-max-w-none{
|
|
1149
1172
|
max-width:none
|
|
1150
1173
|
}
|
|
1151
1174
|
|
|
1175
|
+
.htw-max-w-\[400px\]{
|
|
1176
|
+
max-width:400px
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
.htw-max-w-\[512px\]{
|
|
1180
|
+
max-width:512px
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1152
1183
|
.htw-flex-none{
|
|
1153
1184
|
flex:none
|
|
1154
1185
|
}
|
|
@@ -1237,6 +1268,10 @@ button {
|
|
|
1237
1268
|
align-items:center
|
|
1238
1269
|
}
|
|
1239
1270
|
|
|
1271
|
+
.htw-items-baseline{
|
|
1272
|
+
align-items:baseline
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1240
1275
|
.htw-items-stretch{
|
|
1241
1276
|
align-items:stretch
|
|
1242
1277
|
}
|
|
@@ -1325,6 +1360,10 @@ button {
|
|
|
1325
1360
|
border-radius:0.25rem
|
|
1326
1361
|
}
|
|
1327
1362
|
|
|
1363
|
+
.htw-rounded-full{
|
|
1364
|
+
border-radius:9999px
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1328
1367
|
.htw-rounded-lg{
|
|
1329
1368
|
border-radius:0.75rem
|
|
1330
1369
|
}
|
|
@@ -1333,10 +1372,6 @@ button {
|
|
|
1333
1372
|
border-radius:0.375rem
|
|
1334
1373
|
}
|
|
1335
1374
|
|
|
1336
|
-
.htw-rounded-full{
|
|
1337
|
-
border-radius:9999px
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
1375
|
.htw-rounded-b-lg{
|
|
1341
1376
|
border-bottom-right-radius:0.75rem;
|
|
1342
1377
|
border-bottom-left-radius:0.75rem
|
|
@@ -1447,22 +1482,27 @@ button {
|
|
|
1447
1482
|
background-color:rgb(var(--_histoire-color-primary-500) / 0.25)
|
|
1448
1483
|
}
|
|
1449
1484
|
|
|
1450
|
-
.htw-bg-
|
|
1451
|
-
|
|
1485
|
+
.htw-bg-primary-50{
|
|
1486
|
+
--tw-bg-opacity:1;
|
|
1487
|
+
background-color:rgb(var(--_histoire-color-primary-50) / var(--tw-bg-opacity))
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
.htw-bg-gray-100{
|
|
1491
|
+
--tw-bg-opacity:1;
|
|
1492
|
+
background-color:rgb(var(--_histoire-color-gray-100) / var(--tw-bg-opacity))
|
|
1452
1493
|
}
|
|
1453
1494
|
|
|
1454
1495
|
.htw-bg-transparent{
|
|
1455
1496
|
background-color:transparent
|
|
1456
1497
|
}
|
|
1457
1498
|
|
|
1458
|
-
.htw-bg-
|
|
1459
|
-
|
|
1460
|
-
background-color:rgb(var(--_histoire-color-gray-200) / var(--tw-bg-opacity))
|
|
1499
|
+
.htw-bg-white\/80{
|
|
1500
|
+
background-color:rgb(255 255 255 / 0.8)
|
|
1461
1501
|
}
|
|
1462
1502
|
|
|
1463
|
-
.htw-bg-gray-
|
|
1503
|
+
.htw-bg-gray-200{
|
|
1464
1504
|
--tw-bg-opacity:1;
|
|
1465
|
-
background-color:rgb(var(--_histoire-color-gray-
|
|
1505
|
+
background-color:rgb(var(--_histoire-color-gray-200) / var(--tw-bg-opacity))
|
|
1466
1506
|
}
|
|
1467
1507
|
|
|
1468
1508
|
.htw-bg-primary-200{
|
|
@@ -1503,10 +1543,6 @@ button {
|
|
|
1503
1543
|
padding:0.25rem
|
|
1504
1544
|
}
|
|
1505
1545
|
|
|
1506
|
-
.htw-p-2\.5{
|
|
1507
|
-
padding:0.625rem
|
|
1508
|
-
}
|
|
1509
|
-
|
|
1510
1546
|
.htw-px-1{
|
|
1511
1547
|
padding-left:0.25rem;
|
|
1512
1548
|
padding-right:0.25rem
|
|
@@ -1532,6 +1568,21 @@ button {
|
|
|
1532
1568
|
padding-bottom:3rem
|
|
1533
1569
|
}
|
|
1534
1570
|
|
|
1571
|
+
.htw-px-0\.5{
|
|
1572
|
+
padding-left:0.125rem;
|
|
1573
|
+
padding-right:0.125rem
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
.htw-px-0{
|
|
1577
|
+
padding-left:0px;
|
|
1578
|
+
padding-right:0px
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
.htw-py-2{
|
|
1582
|
+
padding-top:0.5rem;
|
|
1583
|
+
padding-bottom:0.5rem
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1535
1586
|
.htw-py-4{
|
|
1536
1587
|
padding-top:1rem;
|
|
1537
1588
|
padding-bottom:1rem
|
|
@@ -1552,21 +1603,6 @@ button {
|
|
|
1552
1603
|
padding-bottom:0px
|
|
1553
1604
|
}
|
|
1554
1605
|
|
|
1555
|
-
.htw-py-2{
|
|
1556
|
-
padding-top:0.5rem;
|
|
1557
|
-
padding-bottom:0.5rem
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
.htw-px-0\.5{
|
|
1561
|
-
padding-left:0.125rem;
|
|
1562
|
-
padding-right:0.125rem
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
.htw-px-0{
|
|
1566
|
-
padding-left:0px;
|
|
1567
|
-
padding-right:0px
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
1606
|
.htw-py-1{
|
|
1571
1607
|
padding-top:0.25rem;
|
|
1572
1608
|
padding-bottom:0.25rem
|
|
@@ -1632,6 +1668,10 @@ button {
|
|
|
1632
1668
|
line-height:1
|
|
1633
1669
|
}
|
|
1634
1670
|
|
|
1671
|
+
.htw-leading-normal{
|
|
1672
|
+
line-height:1.5
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1635
1675
|
.htw-text-white\/40{
|
|
1636
1676
|
color:rgb(255 255 255 / 0.4)
|
|
1637
1677
|
}
|
|
@@ -1661,6 +1701,11 @@ button {
|
|
|
1661
1701
|
color:rgb(var(--_histoire-color-gray-400) / var(--tw-text-opacity))
|
|
1662
1702
|
}
|
|
1663
1703
|
|
|
1704
|
+
.htw-text-red-500{
|
|
1705
|
+
--tw-text-opacity:1;
|
|
1706
|
+
color:rgb(239 68 68 / var(--tw-text-opacity))
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1664
1709
|
.htw-text-black\/\[2\%\]{
|
|
1665
1710
|
color:rgb(0 0 0 / 2%)
|
|
1666
1711
|
}
|
|
@@ -1669,11 +1714,6 @@ button {
|
|
|
1669
1714
|
color:rgb(var(--_histoire-color-gray-500) / 0.2)
|
|
1670
1715
|
}
|
|
1671
1716
|
|
|
1672
|
-
.htw-text-red-500{
|
|
1673
|
-
--tw-text-opacity:1;
|
|
1674
|
-
color:rgb(239 68 68 / var(--tw-text-opacity))
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
1717
|
.htw-text-primary-800{
|
|
1678
1718
|
--tw-text-opacity:1;
|
|
1679
1719
|
color:rgb(var(--_histoire-color-primary-800) / var(--tw-text-opacity))
|
|
@@ -1691,22 +1731,22 @@ button {
|
|
|
1691
1731
|
opacity:0.4
|
|
1692
1732
|
}
|
|
1693
1733
|
|
|
1694
|
-
.htw-opacity-60{
|
|
1695
|
-
opacity:0.6
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
1734
|
.htw-opacity-50{
|
|
1699
1735
|
opacity:0.5
|
|
1700
1736
|
}
|
|
1701
1737
|
|
|
1702
|
-
.htw-opacity-
|
|
1703
|
-
opacity:0.
|
|
1738
|
+
.htw-opacity-60{
|
|
1739
|
+
opacity:0.6
|
|
1704
1740
|
}
|
|
1705
1741
|
|
|
1706
1742
|
.htw-opacity-30{
|
|
1707
1743
|
opacity:0.3
|
|
1708
1744
|
}
|
|
1709
1745
|
|
|
1746
|
+
.htw-opacity-20{
|
|
1747
|
+
opacity:0.2
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1710
1750
|
.htw-opacity-70{
|
|
1711
1751
|
opacity:0.7
|
|
1712
1752
|
}
|
|
@@ -1810,6 +1850,10 @@ body {
|
|
|
1810
1850
|
visibility: hidden;
|
|
1811
1851
|
}
|
|
1812
1852
|
|
|
1853
|
+
.htw-prose hr {
|
|
1854
|
+
margin: 1rem 0;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1813
1857
|
.first\:htw-mt-0:first-child{
|
|
1814
1858
|
margin-top:0px
|
|
1815
1859
|
}
|
|
@@ -1828,15 +1872,15 @@ body {
|
|
|
1828
1872
|
background-color:rgb(var(--_histoire-color-primary-600) / var(--tw-bg-opacity))
|
|
1829
1873
|
}
|
|
1830
1874
|
|
|
1831
|
-
.hover\:htw-bg-primary-500\/50:hover{
|
|
1832
|
-
background-color:rgb(var(--_histoire-color-primary-500) / 0.5)
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
1875
|
.hover\:htw-bg-primary-50:hover{
|
|
1836
1876
|
--tw-bg-opacity:1;
|
|
1837
1877
|
background-color:rgb(var(--_histoire-color-primary-50) / var(--tw-bg-opacity))
|
|
1838
1878
|
}
|
|
1839
1879
|
|
|
1880
|
+
.hover\:htw-bg-primary-500\/50:hover{
|
|
1881
|
+
background-color:rgb(var(--_histoire-color-primary-500) / 0.5)
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1840
1884
|
.hover\:htw-bg-gray-200:hover{
|
|
1841
1885
|
--tw-bg-opacity:1;
|
|
1842
1886
|
background-color:rgb(var(--_histoire-color-gray-200) / var(--tw-bg-opacity))
|
|
@@ -1870,18 +1914,23 @@ body {
|
|
|
1870
1914
|
border-color:rgb(var(--_histoire-color-primary-500) / var(--tw-border-opacity))
|
|
1871
1915
|
}
|
|
1872
1916
|
|
|
1873
|
-
.htw-group:
|
|
1874
|
-
|
|
1917
|
+
.htw-group:nth-child(odd) .group-odd\:htw-bg-gray-100\/50{
|
|
1918
|
+
background-color:rgb(var(--_histoire-color-gray-100) / 0.5)
|
|
1875
1919
|
}
|
|
1876
1920
|
|
|
1877
|
-
.htw-group:hover .group-hover\:htw-
|
|
1878
|
-
opacity:
|
|
1921
|
+
.htw-group:hover .group-hover\:htw-bg-primary-100{
|
|
1922
|
+
--tw-bg-opacity:1;
|
|
1923
|
+
background-color:rgb(var(--_histoire-color-primary-100) / var(--tw-bg-opacity))
|
|
1879
1924
|
}
|
|
1880
1925
|
|
|
1881
1926
|
.htw-group:hover .group-hover\:htw-opacity-100{
|
|
1882
1927
|
opacity:1
|
|
1883
1928
|
}
|
|
1884
1929
|
|
|
1930
|
+
.htw-group:hover .group-hover\:htw-opacity-90{
|
|
1931
|
+
opacity:0.9
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1885
1934
|
.htw-group:active .group-active\:htw-bg-gray-500\/20{
|
|
1886
1935
|
background-color:rgb(var(--_histoire-color-gray-500) / 0.2)
|
|
1887
1936
|
}
|
|
@@ -1929,15 +1978,15 @@ body {
|
|
|
1929
1978
|
border-color:rgb(var(--_histoire-color-gray-850) / var(--tw-border-opacity))
|
|
1930
1979
|
}
|
|
1931
1980
|
|
|
1932
|
-
.htw-dark .dark\:htw-border-gray-700\/30{
|
|
1933
|
-
border-color:rgb(var(--_histoire-color-gray-700) / 0.3)
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
1981
|
.htw-dark .dark\:htw-border-gray-750{
|
|
1937
1982
|
--tw-border-opacity:1;
|
|
1938
1983
|
border-color:rgb(var(--_histoire-color-gray-750) / var(--tw-border-opacity))
|
|
1939
1984
|
}
|
|
1940
1985
|
|
|
1986
|
+
.htw-dark .dark\:htw-border-gray-700\/30{
|
|
1987
|
+
border-color:rgb(var(--_histoire-color-gray-700) / 0.3)
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1941
1990
|
.htw-dark .dark\:htw-border-primary-900{
|
|
1942
1991
|
--tw-border-opacity:1;
|
|
1943
1992
|
border-color:rgb(var(--_histoire-color-primary-900) / var(--tw-border-opacity))
|
|
@@ -1961,6 +2010,16 @@ body {
|
|
|
1961
2010
|
background-color:rgb(var(--_histoire-color-primary-400) / var(--tw-bg-opacity))
|
|
1962
2011
|
}
|
|
1963
2012
|
|
|
2013
|
+
.htw-dark .dark\:htw-bg-primary-600{
|
|
2014
|
+
--tw-bg-opacity:1;
|
|
2015
|
+
background-color:rgb(var(--_histoire-color-primary-600) / var(--tw-bg-opacity))
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
.htw-dark .dark\:htw-bg-gray-800{
|
|
2019
|
+
--tw-bg-opacity:1;
|
|
2020
|
+
background-color:rgb(var(--_histoire-color-gray-800) / var(--tw-bg-opacity))
|
|
2021
|
+
}
|
|
2022
|
+
|
|
1964
2023
|
.htw-dark .dark\:htw-bg-gray-700\/80{
|
|
1965
2024
|
background-color:rgb(var(--_histoire-color-gray-700) / 0.8)
|
|
1966
2025
|
}
|
|
@@ -1970,11 +2029,6 @@ body {
|
|
|
1970
2029
|
background-color:rgb(var(--_histoire-color-gray-850) / var(--tw-bg-opacity))
|
|
1971
2030
|
}
|
|
1972
2031
|
|
|
1973
|
-
.htw-dark .dark\:htw-bg-gray-800{
|
|
1974
|
-
--tw-bg-opacity:1;
|
|
1975
|
-
background-color:rgb(var(--_histoire-color-gray-800) / var(--tw-bg-opacity))
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
2032
|
.htw-dark .dark\:htw-bg-primary-700{
|
|
1979
2033
|
--tw-bg-opacity:1;
|
|
1980
2034
|
background-color:rgb(var(--_histoire-color-primary-700) / var(--tw-bg-opacity))
|
|
@@ -1990,6 +2044,11 @@ body {
|
|
|
1990
2044
|
background-color:rgb(0 0 0 / var(--tw-bg-opacity))
|
|
1991
2045
|
}
|
|
1992
2046
|
|
|
2047
|
+
.htw-dark .dark\:htw-bg-gray-600{
|
|
2048
|
+
--tw-bg-opacity:1;
|
|
2049
|
+
background-color:rgb(var(--_histoire-color-gray-600) / var(--tw-bg-opacity))
|
|
2050
|
+
}
|
|
2051
|
+
|
|
1993
2052
|
.htw-dark .dark\:htw-text-gray-100{
|
|
1994
2053
|
--tw-text-opacity:1;
|
|
1995
2054
|
color:rgb(var(--_histoire-color-gray-100) / var(--tw-text-opacity))
|
|
@@ -2044,6 +2103,15 @@ body {
|
|
|
2044
2103
|
border-color:rgb(var(--_histoire-color-primary-500) / var(--tw-border-opacity))
|
|
2045
2104
|
}
|
|
2046
2105
|
|
|
2106
|
+
.htw-dark .htw-group:nth-child(odd) .dark\:group-odd\:htw-bg-gray-750\/40{
|
|
2107
|
+
background-color:rgb(var(--_histoire-color-gray-750) / 0.4)
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
.htw-dark .htw-group:hover .dark\:group-hover\:htw-bg-primary-700{
|
|
2111
|
+
--tw-bg-opacity:1;
|
|
2112
|
+
background-color:rgb(var(--_histoire-color-primary-700) / var(--tw-bg-opacity))
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2047
2115
|
@media (min-width: 640px){
|
|
2048
2116
|
.sm\:htw-h-4{
|
|
2049
2117
|
height:1rem
|
|
@@ -2073,6 +2141,14 @@ body {
|
|
|
2073
2141
|
margin-top:4rem
|
|
2074
2142
|
}
|
|
2075
2143
|
|
|
2144
|
+
.md\:htw-max-w-\[600px\]{
|
|
2145
|
+
max-width:600px
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
.md\:htw-p-12{
|
|
2149
|
+
padding:3rem
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2076
2152
|
.md\:htw-py-1\.5{
|
|
2077
2153
|
padding-top:0.375rem;
|
|
2078
2154
|
padding-bottom:0.375rem
|
|
@@ -2083,3 +2159,15 @@ body {
|
|
|
2083
2159
|
padding-bottom:0.25rem
|
|
2084
2160
|
}
|
|
2085
2161
|
}
|
|
2162
|
+
|
|
2163
|
+
@media (min-width: 1024px){
|
|
2164
|
+
.lg\:htw-max-w-\[800px\]{
|
|
2165
|
+
max-width:800px
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
@media (min-width: 1280px){
|
|
2170
|
+
.xl\:htw-max-w-\[900px\]{
|
|
2171
|
+
max-width:900px
|
|
2172
|
+
}
|
|
2173
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "histoire",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "A fast story book powered by Vite",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"histoire": "./bin.mjs"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@histoire/controls": "^0.2
|
|
36
|
+
"@histoire/controls": "^0.3.2",
|
|
37
37
|
"@iconify/vue": "^3.2.1",
|
|
38
38
|
"@vitejs/plugin-vue": "^2.3.1",
|
|
39
39
|
"@vueuse/core": "^8.2.5",
|
|
@@ -41,8 +41,9 @@
|
|
|
41
41
|
"case": "^1.6.3",
|
|
42
42
|
"chokidar": "^3.5.3",
|
|
43
43
|
"connect": "^3.7.0",
|
|
44
|
-
"defu": "^
|
|
44
|
+
"defu": "^6.0.0",
|
|
45
45
|
"diacritics": "^1.3.0",
|
|
46
|
+
"flexsearch": "^0.7.21",
|
|
46
47
|
"floating-vue": "^2.0.0-beta.14",
|
|
47
48
|
"fs-extra": "^10.0.1",
|
|
48
49
|
"globby": "^13.1.1",
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
"devDependencies": {
|
|
71
72
|
"@peeky/test": "^0.13.5",
|
|
72
73
|
"@tailwindcss/typography": "^0.5.2",
|
|
74
|
+
"@types/flexsearch": "^0.7.3",
|
|
73
75
|
"@types/fs-extra": "^9.0.13",
|
|
74
76
|
"@types/markdown-it": "^12.2.3",
|
|
75
77
|
"@types/node": "^17.0.23",
|
|
@@ -85,9 +87,8 @@
|
|
|
85
87
|
"scripts": {
|
|
86
88
|
"build": "rimraf dist && tsc -d && pnpm run build:css && node ./scripts/copy.mjs",
|
|
87
89
|
"build:css": "tailwindcss -i src/client/app/style/main.pcss -o ./dist/style.css -c tailwind.config.cjs --postcss postcss.config.cjs",
|
|
88
|
-
"watch": "concurrently \"tsc -d -w --sourceMap\" \"pnpm run build:css --
|
|
90
|
+
"watch": "concurrently \"tsc -d -w --sourceMap\" \"pnpm run build:css --watch\" \"node ./scripts/watchAndCopy.mjs\"",
|
|
89
91
|
"test:open": "peeky open",
|
|
90
92
|
"test": "peeky run"
|
|
91
|
-
}
|
|
92
|
-
"readme": "# Histoire\n\n> Fast and beautiful interactive component playgrounds\n\n[Learn more](https://github.com/Akryum/histoire)\n\n```\npnpm add histoire -D\npnpm exec histoire dev\npnpm exec histoire build\n```\n"
|
|
93
|
+
}
|
|
93
94
|
}
|
package/scripts/copy.mjs
CHANGED
|
@@ -6,6 +6,7 @@ function toDist (file) {
|
|
|
6
6
|
return normalizePath(file).replace(/^src\//, 'dist/')
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
globbySync('src/client
|
|
9
|
+
globbySync('src/client/**/*').forEach((file) => {
|
|
10
|
+
if (file.endsWith('.ts') || file.endsWith('tsconfig.json')) return
|
|
10
11
|
fs.copy(file, toDist(file))
|
|
11
12
|
})
|
package/src/client/app/App.vue
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'HistoireApp',
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
1
7
|
<script lang="ts" setup>
|
|
2
8
|
// @ts-expect-error virtual module
|
|
3
9
|
import { files as rawFiles, tree as rawTree, onUpdate } from '$histoire-stories'
|
|
4
10
|
import StoryList from './components/tree/StoryList.vue'
|
|
5
11
|
import BaseSplitPane from './components/base/BaseSplitPane.vue'
|
|
6
|
-
import { computed, ref, watch
|
|
12
|
+
import { computed, ref, watch } from 'vue'
|
|
7
13
|
import AppHeader from './components/app/AppHeader.vue'
|
|
8
14
|
import type { StoryFile, Tree } from './types'
|
|
9
15
|
import { useStoryStore } from './stores/story'
|
|
@@ -13,8 +19,7 @@ import { histoireConfig } from './util/config.js'
|
|
|
13
19
|
import { onKeyboardShortcut } from './util/keyboard.js'
|
|
14
20
|
import { isMobile } from './util/responsive'
|
|
15
21
|
import Breadcrumb from './components/app/Breadcrumb.vue'
|
|
16
|
-
|
|
17
|
-
const SearchModal = defineAsyncComponent(() => import('./components/search/SearchModal.vue'))
|
|
22
|
+
import SearchModal from './components/search/SearchModal.vue'
|
|
18
23
|
|
|
19
24
|
const files = ref<StoryFile[]>(rawFiles.map(file => mapFile(file)))
|
|
20
25
|
const tree = ref<Tree>(rawTree)
|