@histoire/app 0.17.16 → 0.17.17

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.
Files changed (126) hide show
  1. package/dist/bundled/App.vue2.js +1 -1
  2. package/dist/bundled/components/app/AppHeader.vue2.js +1 -1
  3. package/dist/bundled/components/app/AppLogo.vue2.js +1 -1
  4. package/dist/bundled/components/app/Breadcrumb.vue.js +1 -1
  5. package/dist/bundled/components/app/Breadcrumb.vue2.js +3 -3
  6. package/dist/bundled/components/app/HomeCounter.vue2.js +2 -7
  7. package/dist/bundled/components/base/BaseCheckbox.vue2.js +1 -2
  8. package/dist/bundled/components/base/BaseIcon.vue.js +1 -1
  9. package/dist/bundled/components/base/BaseIcon.vue2.js +1 -1
  10. package/dist/bundled/components/base/BaseOverflowMenu.vue2.js +4 -4
  11. package/dist/bundled/components/base/BaseSplitPane.vue.js +1 -1
  12. package/dist/bundled/components/base/BaseSplitPane.vue2.js +2 -3
  13. package/dist/bundled/components/panel/PaneTabs.vue2.js +1 -1
  14. package/dist/bundled/components/panel/StoryDocs.vue2.js +4 -4
  15. package/dist/bundled/components/panel/StorySourceCode.vue.js +1 -1
  16. package/dist/bundled/components/panel/StorySourceCode.vue2.js +1 -1
  17. package/dist/bundled/components/search/SearchItem.vue.js +1 -1
  18. package/dist/bundled/components/search/SearchItem.vue2.js +2 -2
  19. package/dist/bundled/components/search/SearchPane.vue2.js +2 -2
  20. package/dist/bundled/components/story/StoryResponsivePreview.vue.js +1 -1
  21. package/dist/bundled/components/story/StoryResponsivePreview.vue2.js +5 -5
  22. package/dist/bundled/components/story/StoryVariantGrid.vue2.js +4 -4
  23. package/dist/bundled/components/story/StoryVariantGridItem.vue.js +1 -1
  24. package/dist/bundled/components/story/StoryVariantGridItem.vue2.js +6 -7
  25. package/dist/bundled/components/story/StoryVariantListItem.vue.js +1 -1
  26. package/dist/bundled/components/story/StoryVariantListItem.vue2.js +3 -3
  27. package/dist/bundled/components/story/StoryVariantSingle.vue.js +1 -1
  28. package/dist/bundled/components/story/StoryVariantSingle.vue2.js +5 -5
  29. package/dist/bundled/components/story/StoryVariantSinglePreviewNative.vue2.js +1 -1
  30. package/dist/bundled/components/story/StoryVariantSinglePreviewRemote.vue2.js +1 -1
  31. package/dist/bundled/components/story/StoryView.vue2.js +1 -1
  32. package/dist/bundled/components/story/StoryViewer.vue.js +1 -1
  33. package/dist/bundled/components/story/StoryViewer.vue2.js +3 -3
  34. package/dist/bundled/components/tree/StoryGroup.vue2.js +2 -2
  35. package/dist/bundled/components/tree/StoryListFolder.vue.js +1 -1
  36. package/dist/bundled/components/tree/StoryListFolder.vue2.js +4 -4
  37. package/dist/bundled/components/tree/StoryListItem.vue.js +1 -1
  38. package/dist/bundled/components/tree/StoryListItem.vue2.js +5 -5
  39. package/dist/bundled/sandbox.js +1 -1
  40. package/dist/bundled/style.css +50 -50
  41. package/dist/bundled/util/commands.js +1 -1
  42. package/dist/bundled/util/state.js +2 -2
  43. package/dist/style.css +1 -1
  44. package/package.json +7 -7
  45. package/scripts/copy.mjs +1 -1
  46. package/scripts/watchAndCopy.mjs +4 -4
  47. package/src/app/App.vue +6 -6
  48. package/src/app/api.ts +1 -1
  49. package/src/app/components/HomeView.vue +4 -3
  50. package/src/app/components/app/AppHeader.vue +1 -1
  51. package/src/app/components/app/AppLogo.vue +3 -3
  52. package/src/app/components/app/Breadcrumb.vue +4 -4
  53. package/src/app/components/app/HomeCounter.vue +1 -10
  54. package/src/app/components/app/MobileOverlay.vue +1 -1
  55. package/src/app/components/base/BaseCheckbox.vue +2 -3
  56. package/src/app/components/base/BaseIcon.vue +2 -2
  57. package/src/app/components/base/BaseKeyboardShortcut.vue +1 -1
  58. package/src/app/components/base/BaseListItem.vue +2 -2
  59. package/src/app/components/base/BaseListItemLink.vue +3 -3
  60. package/src/app/components/base/BaseOverflowMenu.vue +4 -4
  61. package/src/app/components/base/BaseSelect.vue +5 -4
  62. package/src/app/components/base/BaseSplitPane.vue +19 -15
  63. package/src/app/components/command/CommandPrompts.vue +6 -5
  64. package/src/app/components/command/CommandPromptsModal.vue +2 -1
  65. package/src/app/components/command/PromptSelect.vue +6 -4
  66. package/src/app/components/command/PromptText.vue +4 -3
  67. package/src/app/components/panel/ControlsComponentPropItem.vue +1 -1
  68. package/src/app/components/panel/ControlsComponentProps.vue +1 -1
  69. package/src/app/components/panel/ControlsComponentState.vue +1 -1
  70. package/src/app/components/panel/PaneTabs.vue +1 -1
  71. package/src/app/components/panel/StatePresets.vue +13 -10
  72. package/src/app/components/panel/StoryControls.vue +2 -2
  73. package/src/app/components/panel/StoryDocs.vue +28 -24
  74. package/src/app/components/panel/StoryEvent.vue +2 -2
  75. package/src/app/components/panel/StoryEvents.vue +2 -2
  76. package/src/app/components/panel/StorySourceCode.vue +10 -6
  77. package/src/app/components/search/SearchItem.vue +4 -3
  78. package/src/app/components/search/SearchItemContent.vue +3 -3
  79. package/src/app/components/search/SearchModal.vue +2 -1
  80. package/src/app/components/search/SearchPane.vue +18 -18
  81. package/src/app/components/search/search-docs-data.ts +2 -2
  82. package/src/app/components/search/search-title-data.ts +2 -2
  83. package/src/app/components/story/GenericMountStory.vue +1 -1
  84. package/src/app/components/story/GenericRenderStory.vue +3 -2
  85. package/src/app/components/story/StoryResponsivePreview.vue +14 -13
  86. package/src/app/components/story/StoryVariantGrid.vue +9 -8
  87. package/src/app/components/story/StoryVariantGridItem.vue +7 -7
  88. package/src/app/components/story/StoryVariantListItem.vue +3 -2
  89. package/src/app/components/story/StoryVariantSingle.vue +3 -3
  90. package/src/app/components/story/StoryVariantSinglePreviewNative.vue +2 -2
  91. package/src/app/components/story/StoryVariantSinglePreviewRemote.vue +10 -10
  92. package/src/app/components/story/StoryView.vue +4 -4
  93. package/src/app/components/story/StoryViewer.vue +2 -3
  94. package/src/app/components/toolbar/ToolbarNewTab.vue +1 -1
  95. package/src/app/components/tree/StoryGroup.vue +4 -4
  96. package/src/app/components/tree/StoryList.vue +1 -1
  97. package/src/app/components/tree/StoryListFolder.vue +4 -4
  98. package/src/app/components/tree/StoryListItem.vue +3 -3
  99. package/src/app/index.ts +2 -3
  100. package/src/app/plugin.ts +4 -3
  101. package/src/app/router.ts +2 -2
  102. package/src/app/sandbox.ts +12 -11
  103. package/src/app/stores/command.ts +4 -3
  104. package/src/app/stores/events.ts +4 -4
  105. package/src/app/stores/folder.ts +9 -7
  106. package/src/app/stores/story.ts +4 -4
  107. package/src/app/types.ts +2 -2
  108. package/src/app/util/commands.ts +5 -4
  109. package/src/app/util/dark.ts +2 -2
  110. package/src/app/util/docs.ts +6 -4
  111. package/src/app/util/events.ts +4 -3
  112. package/src/app/util/keyboard.ts +9 -8
  113. package/src/app/util/mapping.ts +8 -5
  114. package/src/app/util/open-in-editor.ts +1 -1
  115. package/src/app/util/preview-settings.ts +3 -3
  116. package/src/app/util/sandbox.ts +2 -3
  117. package/src/app/util/scroll.ts +5 -4
  118. package/src/app/util/select.ts +5 -4
  119. package/src/app/util/state.ts +6 -5
  120. package/src/app/util/tooltip.ts +2 -2
  121. package/src/app/util/variant.ts +3 -2
  122. package/src/shim.d.ts +0 -6
  123. package/src/virtual.d.ts +1 -0
  124. package/tailwind.config.cjs +19 -20
  125. package/tsconfig.json +26 -26
  126. package/vite.config.ts +7 -6
package/src/virtual.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare module 'virtual:$histoire-commands' {
2
2
  import type { ClientCommand } from '@histoire/shared'
3
+
3
4
  export const registeredCommands: ClientCommand[]
4
5
  }
5
6
 
@@ -1,11 +1,10 @@
1
-
2
- const inheritedConfig = require('../../tailwind.config.cjs')
3
1
  const defaultColors = require('tailwindcss/colors')
4
2
  const path = require('pathe')
3
+ const inheritedConfig = require('../../tailwind.config.cjs')
5
4
 
6
5
  // Colors
7
6
 
8
- function withOpacityValue (variable) {
7
+ function withOpacityValue(variable) {
9
8
  return ({ opacityValue }) => {
10
9
  if (opacityValue === undefined) {
11
10
  return `rgb(var(${variable}))`
@@ -73,12 +72,12 @@ module.exports.theme.colors = colors
73
72
 
74
73
  module.exports.plugins.push(require('@tailwindcss/typography'))
75
74
  // prose-a:htw-text-primary-500 prose-headings:htw-mb-2 prose-headings:htw-mt-4 first:prose-headings:htw-mt-0 prose-blockquote:htw-ml-0
76
- module.exports.theme.extend.typography = (theme) => ({
75
+ module.exports.theme.extend.typography = theme => ({
77
76
  DEFAULT: {
78
77
  css: {
79
- a: {
80
- color: theme('colors.primary-500'),
81
- textDecoration: 'none',
78
+ 'a': {
79
+ 'color': theme('colors.primary-500'),
80
+ 'textDecoration': 'none',
82
81
 
83
82
  '&:hover': {
84
83
  textDecoration: 'underline',
@@ -86,7 +85,7 @@ module.exports.theme.extend.typography = (theme) => ({
86
85
  },
87
86
 
88
87
  'h1, h2, h3, h4, th': {
89
- marginBottom: '0.75rem',
88
+ 'marginBottom': '0.75rem',
90
89
 
91
90
  '&:not(:first-child)': {
92
91
  marginTop: '1.25rem',
@@ -96,11 +95,11 @@ module.exports.theme.extend.typography = (theme) => ({
96
95
  '--tw-prose-invert-quote-borders': theme('colors.gray-800'),
97
96
  '--tw-prose-invert-hr': theme('colors.gray-800'),
98
97
 
99
- blockquote: {
100
- marginLeft: 0,
101
- marginRight: 0,
102
- backgroundColor: theme('colors.gray-100'),
103
- padding: '.25rem .375rem',
98
+ 'blockquote': {
99
+ 'marginLeft': 0,
100
+ 'marginRight': 0,
101
+ 'backgroundColor': theme('colors.gray-100'),
102
+ 'padding': '.25rem .375rem',
104
103
 
105
104
  '& p:first-child': {
106
105
  marginTop: 0,
@@ -117,17 +116,17 @@ module.exports.theme.extend.typography = (theme) => ({
117
116
 
118
117
  '--tw-prose-invert-bullets': theme('colors.gray-500'),
119
118
 
120
- li: {
119
+ 'li': {
121
120
  marginTop: '0.1rem',
122
121
  marginBottom: '0.1rem',
123
122
  },
124
123
 
125
- code: {
126
- backgroundColor: theme('colors.gray-500 / 20%'),
127
- fontWeight: 'normal',
128
- padding: '0.05rem 0.5rem',
129
- borderRadius: '0.25rem',
130
- fontSize: '0.8rem',
124
+ 'code': {
125
+ 'backgroundColor': theme('colors.gray-500 / 20%'),
126
+ 'fontWeight': 'normal',
127
+ 'padding': '0.05rem 0.5rem',
128
+ 'borderRadius': '0.25rem',
129
+ 'fontSize': '0.8rem',
131
130
 
132
131
  '&::before, &::after': {
133
132
  display: 'none',
package/tsconfig.json CHANGED
@@ -1,35 +1,17 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ESNext",
4
- "module": "ESNext",
5
- "moduleResolution": "node",
6
- "outDir": "dist",
7
- "rootDir": "src",
8
- "baseUrl": ".",
9
- "allowSyntheticDefaultImports": true,
10
- "esModuleInterop": true,
11
- "removeComments": false,
12
- "resolveJsonModule": true,
13
- "skipLibCheck": true,
14
- "types": [
15
- "node"
16
- ],
4
+ // Volar
5
+ "jsx": "preserve",
17
6
  "lib": [
18
7
  "ESNext",
19
8
  "DOM",
20
- "DOM.Iterable",
9
+ "DOM.Iterable"
21
10
  ],
22
- "sourceMap": false,
23
- "preserveWatchOutput": true,
24
- "declaration": false,
25
- // Strict
26
- "noImplicitAny": false,
27
- "noImplicitThis": true,
28
- "alwaysStrict": true,
29
- "strictBindCallApply": true,
30
- "strictFunctionTypes": true,
31
- // Volar
32
- "jsx": "preserve",
11
+ "baseUrl": ".",
12
+ "rootDir": "src",
13
+ "module": "ESNext",
14
+ "moduleResolution": "node",
33
15
  // Alias
34
16
  "paths": {
35
17
  "floating-vue": ["node_modules/@histoire/vendors/floating-vue"],
@@ -39,7 +21,25 @@
39
21
  "vue-router": ["node_modules/@histoire/vendors/vue-router"],
40
22
  "@vueuse/core": ["node_modules/@histoire/vendors/vue-use"],
41
23
  "vue": ["node_modules/@histoire/vendors/vue"]
42
- }
24
+ },
25
+ "resolveJsonModule": true,
26
+ "types": [
27
+ "node"
28
+ ],
29
+ "strictBindCallApply": true,
30
+ "strictFunctionTypes": true,
31
+ "alwaysStrict": true,
32
+ // Strict
33
+ "noImplicitAny": false,
34
+ "noImplicitThis": true,
35
+ "declaration": false,
36
+ "outDir": "dist",
37
+ "removeComments": false,
38
+ "sourceMap": false,
39
+ "allowSyntheticDefaultImports": true,
40
+ "esModuleInterop": true,
41
+ "skipLibCheck": true,
42
+ "preserveWatchOutput": true
43
43
  },
44
44
  "include": [
45
45
  "src"
package/vite.config.ts CHANGED
@@ -9,14 +9,14 @@ export default defineConfig({
9
9
  {
10
10
  name: 'histoire:preserve:import.meta',
11
11
  enforce: 'pre',
12
- transform (code) {
12
+ transform(code) {
13
13
  if (code.includes('import.meta')) {
14
14
  return {
15
15
  code: code.replace(/import\.meta/g, 'import__meta'),
16
16
  }
17
17
  }
18
18
  },
19
- closeBundle () {
19
+ closeBundle() {
20
20
  try {
21
21
  const files = globbySync('./dist/bundled/**/*.js')
22
22
  for (const file of files) {
@@ -25,7 +25,8 @@ export default defineConfig({
25
25
  fs.writeFileSync(file, content.replace(/import__meta/g, 'import.meta'), 'utf-8')
26
26
  }
27
27
  }
28
- } catch (e) {
28
+ }
29
+ catch (e) {
29
30
  console.error(e)
30
31
  }
31
32
  },
@@ -36,11 +37,11 @@ export default defineConfig({
36
37
  alias: {
37
38
  'floating-vue': '@histoire/vendors/floating-vue',
38
39
  '@iconify/vue': '@histoire/vendors/iconify',
39
- pinia: '@histoire/vendors/pinia',
40
+ 'pinia': '@histoire/vendors/pinia',
40
41
  'scroll-into-view-if-needed': '@histoire/vendors/scroll',
41
42
  'vue-router': '@histoire/vendors/vue-router',
42
43
  '@vueuse/core': '@histoire/vendors/vue-use',
43
- vue: '@histoire/vendors/vue',
44
+ 'vue': '@histoire/vendors/vue',
44
45
  },
45
46
  },
46
47
 
@@ -55,7 +56,7 @@ export default defineConfig({
55
56
  external: [
56
57
  /\$histoire/,
57
58
  /@histoire/,
58
- // eslint-disable-next-line @typescript-eslint/no-var-requires
59
+ // eslint-disable-next-line ts/no-var-requires, ts/no-require-imports
59
60
  ...Object.keys(require('./package.json').dependencies),
60
61
  ],
61
62