erudit 2.0.0-dev.8 → 3.0.0-dev.1

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 (178) hide show
  1. package/.nuxtrc +1 -1
  2. package/app/components/SiteMain.vue +2 -2
  3. package/app/components/aside/major/panes/Search.vue +10 -2
  4. package/app/components/aside/minor/AsideMinorContributor.vue +1 -1
  5. package/app/components/aside/minor/AsideMinorPane.vue +2 -3
  6. package/app/components/aside/minor/topic/TopicToc.vue +2 -1
  7. package/app/components/aside/minor/topic/TopicTocItem.vue +3 -3
  8. package/app/components/bitran/BitranContent.vue +20 -21
  9. package/app/components/bitran/RenderWrapper.vue +2 -4
  10. package/app/components/main/topic/MainTopic.vue +1 -1
  11. package/app/components/main/utils/ContentDescription.vue +3 -4
  12. package/app/components/main/utils/ContentFlag.vue +3 -4
  13. package/app/components/main/utils/ContentReferences.vue +16 -22
  14. package/app/components/main/utils/ContentSection.vue +21 -18
  15. package/app/components/main/utils/ContentTitle.vue +12 -10
  16. package/app/components/main/utils/reference/ReferenceGroup.vue +5 -8
  17. package/app/components/main/utils/reference/ReferenceItem.vue +25 -21
  18. package/app/components/main/utils/reference/ReferenceSource.vue +42 -36
  19. package/app/components/preview/PreviewLoading.vue +2 -3
  20. package/app/components/preview/display/Unique.vue +2 -2
  21. package/app/components/transition/Fade.vue +4 -7
  22. package/app/components/tree/TreeContainer.vue +2 -3
  23. package/app/composables/bitran.ts +127 -132
  24. package/app/composables/bitranContent.ts +37 -36
  25. package/app/composables/bitranLocation.ts +7 -7
  26. package/app/composables/contentData.ts +36 -36
  27. package/app/composables/contentPage.ts +156 -156
  28. package/app/composables/contentRoute.ts +45 -45
  29. package/app/composables/darkMagic.ts +24 -24
  30. package/app/composables/externalApi.ts +63 -63
  31. package/app/composables/favicon.ts +8 -8
  32. package/app/composables/formatText.ts +86 -86
  33. package/app/composables/majorPane.ts +60 -60
  34. package/app/composables/theme.ts +29 -29
  35. package/app/composables/url.ts +33 -33
  36. package/app/pages/article/[...articleId].vue +1 -1
  37. package/app/pages/group/[...groupId].vue +2 -1
  38. package/app/pages/members.vue +2 -3
  39. package/app/pages/practice/[...practice].vue +1 -1
  40. package/app/pages/summary/[...summaryId].vue +1 -1
  41. package/app/public/favicon/article.svg +9 -9
  42. package/app/public/favicon/default.svg +9 -9
  43. package/app/public/favicon/practice.svg +9 -9
  44. package/app/public/favicon/summary.svg +9 -9
  45. package/app/public/logotype.svg +16 -16
  46. package/app/public/user.svg +9 -9
  47. package/app/scripts/_immediate.js +7 -2
  48. package/app/scripts/aside/index.ts +59 -59
  49. package/app/scripts/aside/major/nav.ts +26 -26
  50. package/app/scripts/aside/minor/state.ts +37 -37
  51. package/app/scripts/aside/minor/topic.ts +3 -3
  52. package/app/scripts/preview/build.ts +73 -84
  53. package/app/scripts/preview/data/alert.ts +19 -19
  54. package/app/scripts/preview/data/custom.ts +8 -8
  55. package/app/scripts/preview/data/genericLink.ts +24 -24
  56. package/app/scripts/preview/data/pageLink.ts +20 -20
  57. package/app/scripts/preview/data/unique.ts +70 -70
  58. package/app/scripts/preview/data.ts +24 -26
  59. package/app/scripts/preview/display.ts +37 -39
  60. package/app/scripts/preview/footer.ts +9 -9
  61. package/app/scripts/preview/request.ts +51 -51
  62. package/app/scripts/preview/state.ts +63 -63
  63. package/app/styles/_immediate.css +6 -2
  64. package/app/styles/_util.scss +13 -20
  65. package/app/styles/app.scss +91 -91
  66. package/app/styles/def/_bp.scss +27 -24
  67. package/app/styles/def/_size.scss +7 -7
  68. package/app/styles/def/_z.scss +5 -5
  69. package/app/styles/default.scss +33 -35
  70. package/app/styles/normalize.scss +63 -63
  71. package/app/styles/partials/_darkMagic.scss +3 -5
  72. package/app/styles/partials/_fnav.scss +4 -7
  73. package/app/styles/partials/_preview.scss +3 -5
  74. package/globals/bitran.ts +47 -39
  75. package/globals/content.ts +22 -22
  76. package/globals/contributor.ts +5 -5
  77. package/module/bitran.ts +34 -34
  78. package/module/index.ts +12 -0
  79. package/module/paths.ts +22 -22
  80. package/nuxt.config.ts +20 -5
  81. package/package.json +9 -6
  82. package/server/api/contributor/count.ts +6 -6
  83. package/server/api/fake/content.ts +6 -6
  84. package/server/api/preview/page/[...parts].ts +1 -1
  85. package/server/plugin/bitran/content.ts +187 -176
  86. package/server/plugin/bitran/location.ts +25 -25
  87. package/server/plugin/bitran/products/include.ts +230 -229
  88. package/server/plugin/bitran/products/link.ts +116 -114
  89. package/server/plugin/bitran/setup.ts +9 -10
  90. package/server/plugin/bitran/toc.ts +83 -82
  91. package/server/plugin/bitran/transpiler.ts +46 -0
  92. package/server/plugin/build/jobs/content/builderArgs.ts +8 -8
  93. package/server/plugin/build/jobs/content/generic.ts +176 -176
  94. package/server/plugin/build/jobs/content/parse.ts +100 -90
  95. package/server/plugin/build/jobs/content/path.ts +6 -6
  96. package/server/plugin/build/jobs/content/type/book.ts +9 -9
  97. package/server/plugin/build/jobs/content/type/group.ts +37 -37
  98. package/server/plugin/build/jobs/content/type/topic.ts +36 -36
  99. package/server/plugin/build/jobs/contributors.ts +66 -66
  100. package/server/plugin/build/jobs/nav.ts +209 -209
  101. package/server/plugin/content/absoluteId.ts +94 -94
  102. package/server/plugin/content/context.ts +112 -112
  103. package/server/plugin/db/entities/Book.ts +7 -7
  104. package/server/plugin/db/entities/Content.ts +49 -49
  105. package/server/plugin/db/entities/Contribution.ts +10 -10
  106. package/server/plugin/db/entities/Contributor.ts +16 -16
  107. package/server/plugin/db/entities/Group.ts +14 -14
  108. package/server/plugin/db/entities/Hash.ts +15 -15
  109. package/server/plugin/db/entities/Topic.ts +20 -20
  110. package/server/plugin/db/entities/Unique.ts +21 -21
  111. package/server/plugin/db/setup.ts +34 -34
  112. package/server/plugin/nav/node.ts +26 -26
  113. package/server/plugin/nav/utils.ts +129 -129
  114. package/server/plugin/repository/book.ts +21 -21
  115. package/server/plugin/repository/content.ts +238 -238
  116. package/server/plugin/repository/contributor.ts +8 -8
  117. package/server/plugin/repository/frontNav.ts +148 -148
  118. package/server/plugin/repository/topic.ts +32 -32
  119. package/shared/aside/minor.ts +50 -50
  120. package/shared/asset.ts +15 -15
  121. package/shared/bitran/context.ts +8 -7
  122. package/shared/bitran/default.ts +46 -0
  123. package/shared/bitran/{products/link/render → link}/Link.vue +167 -174
  124. package/shared/bitran/link/factory.ts +24 -0
  125. package/shared/bitran/link/languages/en.ts +7 -0
  126. package/shared/bitran/link/languages/ru.ts +7 -0
  127. package/shared/bitran/link/renderer.ts +21 -0
  128. package/shared/bitran/link/shared.ts +17 -0
  129. package/shared/bitran/{products/link → link}/target.ts +134 -134
  130. package/shared/bitran/link/transpiler.ts +10 -0
  131. package/shared/bitran/location.ts +166 -166
  132. package/shared/bitran/toc.ts +8 -8
  133. package/shared/contributor.ts +5 -5
  134. package/shared/frontNav.ts +41 -41
  135. package/shared/icons.ts +38 -38
  136. package/shared/image.ts +5 -5
  137. package/shared/utils/objectsEqual.ts +4 -4
  138. package/shared/utils/stringColor.ts +9 -9
  139. package/test/bitran/{products/link → link}/target.test.ts +141 -138
  140. package/test/bitran/location.test.ts +143 -143
  141. package/server/plugin/bitran/core.ts +0 -51
  142. package/shared/bitran/alias.ts +0 -17
  143. package/shared/bitran/products/alias/core/factory.ts +0 -46
  144. package/shared/bitran/products/alias/core/index.ts +0 -13
  145. package/shared/bitran/products/alias/render/Alias.vue +0 -10
  146. package/shared/bitran/products/alias/render/icon.svg +0 -3
  147. package/shared/bitran/products/alias/render/index.ts +0 -17
  148. package/shared/bitran/products/alias/render/languages/en.ts +0 -5
  149. package/shared/bitran/products/alias/render/languages/ru.ts +0 -5
  150. package/shared/bitran/products/alias/shared.ts +0 -11
  151. package/shared/bitran/products/heading/core/factory.ts +0 -53
  152. package/shared/bitran/products/heading/core/index.ts +0 -19
  153. package/shared/bitran/products/heading/render/Heading.vue +0 -47
  154. package/shared/bitran/products/heading/render/icon.svg +0 -3
  155. package/shared/bitran/products/heading/render/index.ts +0 -17
  156. package/shared/bitran/products/heading/render/languages/en.ts +0 -5
  157. package/shared/bitran/products/heading/render/languages/ru.ts +0 -5
  158. package/shared/bitran/products/heading/shared.ts +0 -13
  159. package/shared/bitran/products/include/core/factory.ts +0 -61
  160. package/shared/bitran/products/include/core/index.ts +0 -13
  161. package/shared/bitran/products/include/render/Include.vue +0 -13
  162. package/shared/bitran/products/include/render/icon.svg +0 -3
  163. package/shared/bitran/products/include/render/index.ts +0 -18
  164. package/shared/bitran/products/include/render/languages/en.ts +0 -5
  165. package/shared/bitran/products/include/render/languages/ru.ts +0 -5
  166. package/shared/bitran/products/include/shared.ts +0 -15
  167. package/shared/bitran/products/link/core/factory.ts +0 -20
  168. package/shared/bitran/products/link/core/index.ts +0 -17
  169. package/shared/bitran/products/link/render/index.ts +0 -17
  170. package/shared/bitran/products/link/render/languages/en.ts +0 -5
  171. package/shared/bitran/products/link/render/languages/ru.ts +0 -5
  172. package/shared/bitran/products/link/shared.ts +0 -15
  173. package/test/bitran/alias.test.ts +0 -44
  174. package/test/bitran/products/alias.test.ts +0 -83
  175. package/test/bitran/products/heading.test.ts +0 -119
  176. package/test/bitran/products/include.test.ts +0 -77
  177. package/test/bitran/products/link/factory.test.ts +0 -30
  178. /package/shared/bitran/{products/link/render → link}/icon.svg +0 -0
package/.nuxtrc CHANGED
@@ -1 +1 @@
1
- typescript.includeWorkspace = true
1
+ typescript.includeWorkspace = true
@@ -11,7 +11,7 @@
11
11
 
12
12
  <style lang="scss" module>
13
13
  @use '$/def/bp';
14
- @use 'bitran/public/scss/def' as bitranDef;
14
+ @use '@bitran-js/renderer-vue/scss/def' as bitranDef;
15
15
 
16
16
  .main {
17
17
  --_pMainBase: var(--gapBig);
@@ -24,7 +24,7 @@
24
24
  font-size: 18px;
25
25
 
26
26
  @include bp.below('mobile') {
27
- --_pMainBase: #{bitranDef.$asideFullWidth};
27
+ // --_pMainBase: #{bitranDef.$asideWidth};
28
28
  font-size: 15px;
29
29
  }
30
30
 
@@ -1,3 +1,11 @@
1
1
  <template>
2
- <div :style="{ padding: 'var(--gap)', color: 'var(--textMuted)', textAlign: 'center' }">Here be dragons...</div>
3
- </template>
2
+ <div
3
+ :style="{
4
+ padding: 'var(--gap)',
5
+ color: 'var(--textMuted)',
6
+ textAlign: 'center',
7
+ }"
8
+ >
9
+ Here be dragons...
10
+ </div>
11
+ </template>
@@ -2,4 +2,4 @@
2
2
  <AsideMinorPane>
3
3
  <div>Contributor</div>
4
4
  </AsideMinorPane>
5
- </template>
5
+ </template>
@@ -5,12 +5,11 @@
5
5
  </template>
6
6
 
7
7
  <style lang="scss" module>
8
- .asideMinorPane
9
- {
8
+ .asideMinorPane {
10
9
  position: absolute;
11
10
  width: 100%;
12
11
  height: 100%;
13
12
  top: 0;
14
13
  left: 0;
15
14
  }
16
- </style>
15
+ </style>
@@ -1,7 +1,8 @@
1
1
  <script lang="ts" setup>
2
+ import { headingName } from '@erudit-js/bitran-elements/heading/shared';
3
+
2
4
  import { stringifyBitranLocation } from '@shared/bitran/location';
3
5
  import type { TocItem } from '@erudit/shared/bitran/toc';
4
- import { headingName } from '@shared/bitran/products/heading/shared';
5
6
  import { topicLocation } from '@app/scripts/aside/minor/topic';
6
7
  import { injectAsideData } from '@app/scripts/aside/minor/state';
7
8
  import type { AsideMinorTopic } from '@shared/aside/minor';
@@ -4,8 +4,8 @@ import type { TocItem } from '@erudit/shared/bitran/toc';
4
4
  const { tocItem } = defineProps<{ tocItem: TocItem; active: boolean }>();
5
5
 
6
6
  const productName = tocItem.productName;
7
- const productIcon = await useBitranProductIcon(productName);
8
- const productPhrase = await useBitranProductLanguage(productName);
7
+ const productIcon = await useBitranElementIcon(productName);
8
+ const productPhrase = await useBitranElementLanguage(productName);
9
9
 
10
10
  function tocItemClick(event: Event) {
11
11
  navigateTo({
@@ -21,7 +21,7 @@ function tocItemClick(event: Event) {
21
21
 
22
22
  <template>
23
23
  <TreeItem
24
- :label="tocItem.title || productPhrase('_name')"
24
+ :label="tocItem.title || productPhrase('_element_title')"
25
25
  :level="tocItem.level"
26
26
  :link="`?element=${tocItem.id}` /* Apply page hash! */"
27
27
  :svg="productIcon"
@@ -1,16 +1,19 @@
1
1
  <script lang="ts" setup>
2
- import 'bitran/style.css';
3
- import type { BitranContent } from 'bitran';
4
- import { Bitran } from 'bitran/render';
2
+ import { Bitran, type BitranContent } from '@bitran-js/renderer-vue';
5
3
 
6
4
  import type { BitranContext } from '@shared/bitran/context';
7
5
 
6
+ import RenderWrapper from './RenderWrapper.vue';
7
+
8
8
  const props = defineProps<{
9
9
  content: BitranContent;
10
10
  context: BitranContext;
11
11
  }>();
12
12
 
13
- const { bitranCore, bitranRender } = await useBitran(props.context);
13
+ const bitranTranspiler = await useBitranTranspiler();
14
+ const bitranRenderers = await useBitranRenderers();
15
+
16
+ const formatText = useFormatText();
14
17
 
15
18
  // onMounted(() => {
16
19
  // watch(urlElement, () => {
@@ -21,31 +24,36 @@ const { bitranCore, bitranRender } = await useBitran(props.context);
21
24
 
22
25
  <template>
23
26
  <Bitran
24
- :bitranCore
25
- :bitranRender
27
+ :class="$style.eruditBitranContainer"
28
+ :transpiler="bitranTranspiler"
29
+ :renderers="bitranRenderers"
26
30
  :content
27
31
  :editMode="false"
28
- :class="$style.eruditBitranContainer"
32
+ :formatText
33
+ :RenderWrapper
29
34
  />
30
35
  </template>
31
36
 
32
37
  <style lang="scss" module>
38
+ @use '@bitran-js/renderer-vue/scss/def' as bitranDef;
39
+
33
40
  .eruditBitranContainer {
34
- padding-top: var(--_pMainY);
35
- padding-bottom: var(--_pMainY);
41
+ padding: var(--_pMainY) var(--_pMainX);
42
+ padding-left: calc(var(--_pMainX) - #{bitranDef.$asideWidth});
36
43
 
37
44
  // Setting up Bitran
38
45
 
39
46
  --bitran_gap: var(--gap);
40
47
  --bitran_gapSmall: var(--gapSmall);
41
48
  --bitran_gapBig: var(--gapBig);
49
+ --bitran_gapBlocks: var(--gapBig);
42
50
 
43
51
  --bitran_xPadding: var(--_pMainX);
44
- --bitran_blocksGap: calc(2 * var(--_pMainY));
45
52
  --bitran_transitionSpeed: var(--transitionSpeed);
46
53
  --bitran_transitionFunction: var(--transitionFunction);
47
- --bitran_fontSans: 'Noto Sans', sans-serif;
48
- --bitran_fontSerif: 'Noto Serif', serif;
54
+
55
+ --bitran_fontMain: 'Noto Sans', sans-serif;
56
+ --bitran_fontAlt: 'Noto Serif', serif;
49
57
 
50
58
  --bitran_text: var(--text);
51
59
  --bitran_textMuted: var(--textMuted);
@@ -53,12 +61,3 @@ const { bitranCore, bitranRender } = await useBitran(props.context);
53
61
  --bitran_textDisabled: var(--textDisabled);
54
62
  }
55
63
  </style>
56
-
57
- <style lang="scss">
58
- @use '$/def/bp';
59
- @use 'bitran/public/scss/external' as bitranExternal;
60
-
61
- @include bp.below('mobile') {
62
- @include bitranExternal.narrowMode;
63
- }
64
- </style>
@@ -1,11 +1,9 @@
1
1
  <script lang="ts" setup>
2
- import { RenderMode } from 'bitran/render';
3
-
4
- defineProps<{ renderMode: RenderMode }>();
2
+ defineProps<{ mode: 'hybrid' | 'client' }>();
5
3
  </script>
6
4
 
7
5
  <template>
8
- <slot v-if="renderMode > RenderMode.Client"></slot>
6
+ <slot v-if="mode !== 'client'"></slot>
9
7
  <ClientOnly v-else>
10
8
  <slot></slot>
11
9
  </ClientOnly>
@@ -1,5 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import type { TopicPart } from 'erudit-cog/schema';
3
+ import { NO_ALIASES } from '@erudit-js/bitran-elements/aliases/shared';
3
4
 
4
5
  import eruditConfig from '#erudit/config';
5
6
 
@@ -15,7 +16,6 @@ import ContentPopovers from '../utils/ContentPopovers.vue';
15
16
  import ContentReferences from '../utils/ContentReferences.vue';
16
17
  import ContentSection from '../utils/ContentSection.vue';
17
18
  import { TOPIC_PART_ICON } from '@erudit/shared/icons';
18
- import { NO_ALIASES } from '@erudit/shared/bitran/alias';
19
19
 
20
20
  const location = useBitranLocation();
21
21
  const topicPart = computed(() => location.value?.type as TopicPart);
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- defineProps<{ description: string; }>();
2
+ defineProps<{ description: string }>();
3
3
  const pretty = await useFormatText();
4
4
  </script>
5
5
 
@@ -10,11 +10,10 @@ const pretty = await useFormatText();
10
10
  </template>
11
11
 
12
12
  <style lang="scss" module>
13
- .contentDescription
14
- {
13
+ .contentDescription {
15
14
  padding: var(--_pMainY) var(--_pMainX);
16
15
  font-weight: 500;
17
16
  font-size: 1.1em;
18
17
  color: var(--text);
19
18
  }
20
- </style>
19
+ </style>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import { computePosition, shift, autoUpdate, arrow } from '@floating-ui/dom';
3
3
 
4
- defineProps<{ icon: string; title: string; }>();
4
+ defineProps<{ icon: string; title: string }>();
5
5
  </script>
6
6
 
7
7
  <template>
@@ -9,8 +9,7 @@ defineProps<{ icon: string; title: string; }>();
9
9
  </template>
10
10
 
11
11
  <style lang="scss" module>
12
- .flag
13
- {
12
+ .flag {
14
13
  color: red;
15
14
  }
16
- </style>
15
+ </style>
@@ -3,16 +3,16 @@ import type { ContentReferences } from '@package';
3
3
 
4
4
  import ReferenceGroup from './reference/ReferenceGroup.vue';
5
5
 
6
- const props = defineProps<{ references: ContentReferences; }>();
6
+ const props = defineProps<{ references: ContentReferences }>();
7
7
 
8
8
  const count = computed(() => {
9
- return props.references.reduce((sum, referenceGroup) => sum + (referenceGroup.references.length || 0), 0);
9
+ return props.references.reduce(
10
+ (sum, referenceGroup) => sum + (referenceGroup.references.length || 0),
11
+ 0,
12
+ );
10
13
  });
11
14
 
12
- const phrase = await usePhrases(
13
- 'references',
14
- 'references_description',
15
- );
15
+ const phrase = await usePhrases('references', 'references_description');
16
16
  </script>
17
17
 
18
18
  <template>
@@ -30,47 +30,41 @@ const phrase = await usePhrases(
30
30
  </template>
31
31
 
32
32
  <style lang="scss" module>
33
- .heading
34
- {
33
+ .heading {
35
34
  display: flex;
36
35
  align-items: center;
37
36
  gap: var(--gap);
38
37
  padding: var(--_pMainY) var(--_pMainX);
39
38
 
40
- .icon
41
- {
42
- font-size: .9em;
39
+ .icon {
40
+ font-size: 0.9em;
43
41
  color: var(--textMuted);
44
42
  }
45
43
 
46
- .count
47
- {
44
+ .count {
48
45
  position: relative;
49
46
  top: 1px;
50
47
  font-weight: 550;
51
- font-size: .6em;
52
- background: color-mix(in srgb, var(--textDimmed), transparent 65%) ;
48
+ font-size: 0.6em;
49
+ background: color-mix(in srgb, var(--textDimmed), transparent 65%);
53
50
  border-radius: 20px;
54
51
  padding: 2px 10px;
55
52
  }
56
53
  }
57
54
 
58
- .description
59
- {
55
+ .description {
60
56
  padding: var(--_pMainY) var(--_pMainX);
61
57
  }
62
58
 
63
- .referenceGroups
64
- {
59
+ .referenceGroups {
65
60
  display: flex;
66
61
  flex-direction: column;
67
62
  padding: var(--_pMainY) var(--_pMainX);
68
63
 
69
- > *:not(:last-of-type)
70
- {
64
+ > *:not(:last-of-type) {
71
65
  padding-bottom: var(--gap);
72
66
  margin-bottom: var(--gap);
73
67
  border-bottom: 1px solid var(--border);
74
68
  }
75
69
  }
76
- </style>
70
+ </style>
@@ -1,42 +1,45 @@
1
1
  <template>
2
- <hr :class="$style.hr">
2
+ <hr :class="$style.hr" />
3
3
  <slot></slot>
4
4
  </template>
5
5
 
6
6
  <style lang="scss" module>
7
- @mixin shade
8
- {
7
+ @mixin shade {
9
8
  height: 50px;
10
9
  border-bottom: 2px solid var(--border);
11
10
  background: linear-gradient(to bottom, transparent, var(--bgAside));
12
11
  }
13
12
 
14
- @mixin simple
15
- {
13
+ @mixin simple {
16
14
  height: var(--gap);
17
15
  }
18
16
 
19
- .hr
20
- {
17
+ .hr {
21
18
  border: none;
22
19
 
23
20
  &::before,
24
- &::after
25
- {
21
+ &::after {
26
22
  display: block;
27
23
  content: '';
28
24
  }
29
25
 
30
- &:nth-of-type(even)
31
- {
32
- &::before { @include shade; }
33
- &::after { @include simple; }
26
+ &:nth-of-type(even) {
27
+ &::before {
28
+ @include shade;
29
+ }
30
+ &::after {
31
+ @include simple;
32
+ }
34
33
  }
35
34
 
36
- &:nth-of-type(odd)
37
- {
38
- &::before { @include simple; }
39
- &::after { @include shade; transform: scaleY(-1); }
35
+ &:nth-of-type(odd) {
36
+ &::before {
37
+ @include simple;
38
+ }
39
+ &::after {
40
+ @include shade;
41
+ transform: scaleY(-1);
42
+ }
40
43
  }
41
44
  }
42
- </style>
45
+ </style>
@@ -1,27 +1,30 @@
1
1
  <script lang="ts" setup>
2
2
  import { isMyIcon } from '#my-icons';
3
3
 
4
- defineProps<{ icon: string; title: string; hint?: string; }>();
4
+ defineProps<{ icon: string; title: string; hint?: string }>();
5
5
  </script>
6
6
 
7
7
  <template>
8
8
  <section :class="$style.contentTitle">
9
9
  <MyIcon v-if="isMyIcon(icon)" :name="icon as any" :title="hint" />
10
- <MyRuntimeIcon v-else name="content-title-icon" :svg="icon" :title="hint" />
10
+ <MyRuntimeIcon
11
+ v-else
12
+ name="content-title-icon"
13
+ :svg="icon"
14
+ :title="hint"
15
+ />
11
16
  <h1>{{ title }}</h1>
12
17
  </section>
13
18
  </template>
14
19
 
15
20
  <style lang="scss" module>
16
- .contentTitle
17
- {
21
+ .contentTitle {
18
22
  display: flex;
19
23
  align-items: center;
20
24
  gap: var(--gap);
21
25
  padding: 0 var(--_pMainX);
22
26
 
23
- [my-icon]
24
- {
27
+ [my-icon] {
25
28
  font-size: 1.65em;
26
29
  color: var(--textMuted);
27
30
  position: relative;
@@ -29,9 +32,8 @@ defineProps<{ icon: string; title: string; hint?: string; }>();
29
32
  cursor: help;
30
33
  }
31
34
 
32
- h1
33
- {
34
- font-size: 1.925em;
35
+ h1 {
36
+ font-size: 1.925em;
35
37
  }
36
38
  }
37
- </style>
39
+ </style>
@@ -4,7 +4,7 @@ import type { ContentReferenceGroup } from '@package';
4
4
  import ReferenceSource from './ReferenceSource.vue';
5
5
  import ReferenceItem from './ReferenceItem.vue';
6
6
 
7
- defineProps<{ group: ContentReferenceGroup; }>();
7
+ defineProps<{ group: ContentReferenceGroup }>();
8
8
  </script>
9
9
 
10
10
  <template>
@@ -19,23 +19,20 @@ defineProps<{ group: ContentReferenceGroup; }>();
19
19
  <style lang="scss" module>
20
20
  @use '$/def/bp';
21
21
 
22
- .group
23
- {
22
+ .group {
24
23
  display: flex;
25
24
  flex-direction: column;
26
25
  gap: var(--gap);
27
26
  }
28
27
 
29
- .references
30
- {
28
+ .references {
31
29
  display: flex;
32
30
  flex-direction: column;
33
31
  gap: var(--gap);
34
32
  margin-left: 34px;
35
33
 
36
- @include bp.below(mobile)
37
- {
34
+ @include bp.below(mobile) {
38
35
  margin-left: 0;
39
36
  }
40
37
  }
41
- </style>
38
+ </style>
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
2
  import type { ContentReferenceItem } from '@package';
3
3
 
4
- defineProps<{ reference: ContentReferenceItem; }>();
4
+ defineProps<{ reference: ContentReferenceItem }>();
5
5
  </script>
6
6
 
7
7
  <template>
@@ -9,56 +9,60 @@ defineProps<{ reference: ContentReferenceItem; }>();
9
9
  <MyIcon name="arrow-up-to-right" :class="$style.icon" />
10
10
  <div :class="$style.body">
11
11
  <div :class="$style.header">
12
- <a :href="reference.link" target="_blank">{{ reference.title }}</a>
13
- <MyIcon v-if="reference.link" name="link-external" :class="$style.linkIcon" />
12
+ <a :href="reference.link" target="_blank">{{
13
+ reference.title
14
+ }}</a>
15
+ <MyIcon
16
+ v-if="reference.link"
17
+ name="link-external"
18
+ :class="$style.linkIcon"
19
+ />
20
+ </div>
21
+ <div v-if="reference.description" :class="$style.description">
22
+ {{ reference.description }}
14
23
  </div>
15
- <div v-if="reference.description" :class="$style.description">{{ reference.description }}</div>
16
24
  </div>
17
25
  </div>
18
26
  </template>
19
27
 
20
28
  <style lang="scss" module>
21
- .reference
22
- {
23
- font-size: .92em;
29
+ .reference {
30
+ font-size: 0.92em;
24
31
  display: flex;
25
32
  align-items: start;
26
33
  gap: var(--gap);
27
34
 
28
- .icon
29
- {
35
+ .icon {
30
36
  position: relative;
31
37
  top: 4px;
32
38
  flex-shrink: 0;
33
39
  color: var(--textMuted);
34
40
  }
35
41
 
36
- .body
37
- {
38
- .header
39
- {
42
+ .body {
43
+ .header {
40
44
  display: flex;
41
45
  align-items: center;
42
46
  gap: var(--gap);
43
47
  font-weight: 550;
44
48
 
45
- a[href] { @include hoverLink; }
49
+ a[href] {
50
+ @include hoverLink;
51
+ }
46
52
 
47
- .linkIcon
48
- {
53
+ .linkIcon {
49
54
  position: relative;
50
55
  left: -3px;
51
56
  flex-shrink: 0;
52
57
  color: var(--textDimmed);
53
- font-size: .85em;
54
- opacity: .6;
58
+ font-size: 0.85em;
59
+ opacity: 0.6;
55
60
  }
56
61
  }
57
62
 
58
- .description
59
- {
63
+ .description {
60
64
  color: var(--textMuted);
61
65
  }
62
66
  }
63
67
  }
64
- </style>
68
+ </style>