@elmethis/qwik 0.0.6 → 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.
Files changed (202) hide show
  1. package/lib/index.qwik.cjs +1678 -0
  2. package/lib/index.qwik.mjs +1678 -0
  3. package/lib/shikiInstance-BxkUyfqr.cjs +79 -0
  4. package/{src/components/code/shikiInstance.ts → lib/shikiInstance-igs7t2fe.js} +11 -8
  5. package/lib-types/components/code/elm-code-block.d.ts +21 -0
  6. package/lib-types/components/code/elm-code-block.stories.d.ts +9 -0
  7. package/lib-types/components/code/elm-katex.d.ts +15 -0
  8. package/lib-types/components/code/elm-katex.stories.d.ts +8 -0
  9. package/lib-types/components/code/elm-shiki-highlighter.d.ts +11 -0
  10. package/lib-types/components/code/elm-shiki-highlighter.stories.d.ts +6 -0
  11. package/lib-types/components/code/shikiInstance.d.ts +2 -0
  12. package/lib-types/components/containments/elm-toggle.d.ts +7 -0
  13. package/lib-types/components/containments/elm-toggle.stories.d.ts +6 -0
  14. package/lib-types/components/fallback/elm-block-fallback.d.ts +5 -0
  15. package/lib-types/components/fallback/elm-block-fallback.stories.d.ts +6 -0
  16. package/lib-types/components/fallback/elm-rectangle-wave.d.ts +4 -0
  17. package/lib-types/components/fallback/elm-rectangle-wave.stories.d.ts +6 -0
  18. package/lib-types/components/icon/elm-dot-loading-icon.d.ts +14 -0
  19. package/lib-types/components/icon/elm-dot-loading-icon.stories.d.ts +6 -0
  20. package/lib-types/components/icon/elm-inline-icon.d.ts +11 -0
  21. package/lib-types/components/icon/elm-inline-icon.stories.d.ts +6 -0
  22. package/lib-types/components/icon/elm-language-icon.d.ts +14 -0
  23. package/lib-types/components/icon/elm-language-icon.stories.d.ts +6 -0
  24. package/lib-types/components/icon/elm-mdi-icon.d.ts +8 -0
  25. package/lib-types/components/icon/elm-mdi-icon.stories.d.ts +6 -0
  26. package/lib-types/components/icon/languages/bash.d.ts +2 -0
  27. package/lib-types/components/icon/languages/c-plus-plus.d.ts +2 -0
  28. package/lib-types/components/icon/languages/c-sharp.d.ts +2 -0
  29. package/lib-types/components/icon/languages/c.d.ts +2 -0
  30. package/lib-types/components/icon/languages/css.d.ts +2 -0
  31. package/lib-types/components/icon/languages/go.d.ts +2 -0
  32. package/lib-types/components/icon/languages/html.d.ts +2 -0
  33. package/lib-types/components/icon/languages/java.d.ts +2 -0
  34. package/lib-types/components/icon/languages/javascript.d.ts +2 -0
  35. package/lib-types/components/icon/languages/json.d.ts +2 -0
  36. package/lib-types/components/icon/languages/kotlin.d.ts +2 -0
  37. package/lib-types/components/icon/languages/language-interface.d.ts +4 -0
  38. package/lib-types/components/icon/languages/lua.d.ts +2 -0
  39. package/lib-types/components/icon/languages/npm.d.ts +2 -0
  40. package/lib-types/components/icon/languages/python.d.ts +2 -0
  41. package/lib-types/components/icon/languages/rust.d.ts +2 -0
  42. package/lib-types/components/icon/languages/sql.d.ts +2 -0
  43. package/lib-types/components/icon/languages/terraform.d.ts +2 -0
  44. package/lib-types/components/icon/languages/typescript.d.ts +2 -0
  45. package/lib-types/components/media/elm-block-image.d.ts +16 -0
  46. package/lib-types/components/media/elm-block-image.stories.d.ts +12 -0
  47. package/lib-types/components/media/elm-file.d.ts +15 -0
  48. package/lib-types/components/media/elm-file.stories.d.ts +7 -0
  49. package/lib-types/components/navigation/elm-bookmark.d.ts +24 -0
  50. package/lib-types/components/navigation/elm-bookmark.stories.d.ts +12 -0
  51. package/lib-types/components/others/elm-jarkup.d.ts +5 -0
  52. package/lib-types/components/others/elm-jarkup.stories.d.ts +6 -0
  53. package/lib-types/components/table/elm-table-body.d.ts +2 -0
  54. package/lib-types/components/table/elm-table-cell.d.ts +12 -0
  55. package/lib-types/components/table/elm-table-header.d.ts +3 -0
  56. package/lib-types/components/table/elm-table-row.d.ts +2 -0
  57. package/lib-types/components/table/elm-table.d.ts +13 -0
  58. package/lib-types/components/table/elm-table.stories.d.ts +6 -0
  59. package/lib-types/components/typography/elm-block-quote.d.ts +4 -0
  60. package/lib-types/components/typography/elm-block-quote.stories.d.ts +6 -0
  61. package/lib-types/components/typography/elm-callout.d.ts +8 -0
  62. package/lib-types/components/typography/elm-callout.stories.d.ts +10 -0
  63. package/lib-types/components/typography/elm-divider.d.ts +8 -0
  64. package/lib-types/components/typography/elm-divider.stories.d.ts +6 -0
  65. package/lib-types/components/typography/elm-fragment-identifier.d.ts +7 -0
  66. package/lib-types/components/typography/elm-fragment-identifier.stories.d.ts +6 -0
  67. package/lib-types/components/typography/elm-heading.d.ts +6 -0
  68. package/lib-types/components/typography/elm-heading.stories.d.ts +7 -0
  69. package/lib-types/components/typography/elm-inline-text.d.ts +54 -0
  70. package/lib-types/components/typography/elm-inline-text.stories.d.ts +13 -0
  71. package/lib-types/components/typography/elm-list.d.ts +4 -0
  72. package/lib-types/components/typography/elm-list.stories.d.ts +8 -0
  73. package/lib-types/components/typography/elm-paragraph.d.ts +5 -0
  74. package/lib-types/components/typography/elm-paragraph.stories.d.ts +9 -0
  75. package/lib-types/entry.dev.d.ts +2 -0
  76. package/{src/entry.ssr.tsx → lib-types/entry.ssr.d.ts} +2 -9
  77. package/lib-types/hooks/useDelayedSignal.d.ts +6 -0
  78. package/lib-types/hooks/useInView.d.ts +6 -0
  79. package/lib-types/index.d.ts +27 -0
  80. package/lib-types/root.d.ts +2 -0
  81. package/package.json +5 -1
  82. package/.prettierignore +0 -6
  83. package/.storybook/main.ts +0 -23
  84. package/.storybook/preview-head.html +0 -4
  85. package/.storybook/preview.tsx +0 -51
  86. package/.storybook/sb.scss +0 -13
  87. package/.storybook/tsconfig.json +0 -24
  88. package/eslint.config.js +0 -79
  89. package/src/assets/bg1.webp +0 -0
  90. package/src/assets/bg2.webp +0 -0
  91. package/src/assets/images/2.svg +0 -4
  92. package/src/assets/images/lamdscape.svg +0 -4
  93. package/src/assets/images/portrait.svg +0 -4
  94. package/src/assets/images/square.svg +0 -4
  95. package/src/assets/vite.svg +0 -1
  96. package/src/assets/vue.svg +0 -1
  97. package/src/components/code/elm-code-block.module.scss +0 -67
  98. package/src/components/code/elm-code-block.stories.tsx +0 -44
  99. package/src/components/code/elm-code-block.tsx +0 -95
  100. package/src/components/code/elm-katex.stories.tsx +0 -28
  101. package/src/components/code/elm-katex.tsx +0 -34
  102. package/src/components/code/elm-shiki-highlighter.global.scss +0 -18
  103. package/src/components/code/elm-shiki-highlighter.stories.tsx +0 -21
  104. package/src/components/code/elm-shiki-highlighter.tsx +0 -44
  105. package/src/components/code/seed/main.rs +0 -24
  106. package/src/components/containments/elm-toggle.module.scss +0 -132
  107. package/src/components/containments/elm-toggle.stories.tsx +0 -34
  108. package/src/components/containments/elm-toggle.tsx +0 -106
  109. package/src/components/fallback/elm-block-fallback.module.scss +0 -8
  110. package/src/components/fallback/elm-block-fallback.stories.tsx +0 -14
  111. package/src/components/fallback/elm-block-fallback.tsx +0 -20
  112. package/src/components/fallback/elm-rectangle-wave.module.scss +0 -42
  113. package/src/components/fallback/elm-rectangle-wave.stories.tsx +0 -28
  114. package/src/components/fallback/elm-rectangle-wave.tsx +0 -11
  115. package/src/components/icon/elm-dot-loading-icon.module.scss +0 -53
  116. package/src/components/icon/elm-dot-loading-icon.stories.tsx +0 -15
  117. package/src/components/icon/elm-dot-loading-icon.tsx +0 -35
  118. package/src/components/icon/elm-inline-icon.module.scss +0 -21
  119. package/src/components/icon/elm-inline-icon.stories.tsx +0 -16
  120. package/src/components/icon/elm-inline-icon.tsx +0 -25
  121. package/src/components/icon/elm-language-icon.stories.tsx +0 -22
  122. package/src/components/icon/elm-language-icon.tsx +0 -167
  123. package/src/components/icon/elm-mdi-icon.module.scss +0 -8
  124. package/src/components/icon/elm-mdi-icon.stories.tsx +0 -25
  125. package/src/components/icon/elm-mdi-icon.tsx +0 -34
  126. package/src/components/icon/languages/bash.module.scss +0 -6
  127. package/src/components/icon/languages/bash.tsx +0 -27
  128. package/src/components/icon/languages/c-plus-plus.tsx +0 -33
  129. package/src/components/icon/languages/c-sharp.tsx +0 -29
  130. package/src/components/icon/languages/c.tsx +0 -27
  131. package/src/components/icon/languages/css.tsx +0 -21
  132. package/src/components/icon/languages/go.tsx +0 -22
  133. package/src/components/icon/languages/html.tsx +0 -30
  134. package/src/components/icon/languages/java.tsx +0 -37
  135. package/src/components/icon/languages/javascript.tsx +0 -22
  136. package/src/components/icon/languages/json.tsx +0 -53
  137. package/src/components/icon/languages/kotlin.tsx +0 -36
  138. package/src/components/icon/languages/language-interface.ts +0 -4
  139. package/src/components/icon/languages/lua.tsx +0 -29
  140. package/src/components/icon/languages/npm.tsx +0 -25
  141. package/src/components/icon/languages/python.tsx +0 -67
  142. package/src/components/icon/languages/rust.tsx +0 -19
  143. package/src/components/icon/languages/sql.tsx +0 -21
  144. package/src/components/icon/languages/terraform.tsx +0 -31
  145. package/src/components/icon/languages/typescript.tsx +0 -22
  146. package/src/components/media/elm-block-image.module.scss +0 -68
  147. package/src/components/media/elm-block-image.stories.tsx +0 -79
  148. package/src/components/media/elm-block-image.tsx +0 -110
  149. package/src/components/media/elm-file.module.scss +0 -43
  150. package/src/components/media/elm-file.stories.tsx +0 -27
  151. package/src/components/media/elm-file.tsx +0 -75
  152. package/src/components/navigation/elm-bookmark.module.scss +0 -100
  153. package/src/components/navigation/elm-bookmark.stories.tsx +0 -87
  154. package/src/components/navigation/elm-bookmark.tsx +0 -72
  155. package/src/components/others/elm-jarkup.module.scss +0 -26
  156. package/src/components/others/elm-jarkup.stories.tsx +0 -18
  157. package/src/components/others/elm-jarkup.tsx +0 -267
  158. package/src/components/table/elm-table-body.tsx +0 -14
  159. package/src/components/table/elm-table-cell.module.scss +0 -41
  160. package/src/components/table/elm-table-cell.tsx +0 -33
  161. package/src/components/table/elm-table-header.module.scss +0 -8
  162. package/src/components/table/elm-table-header.tsx +0 -21
  163. package/src/components/table/elm-table-row.module.scss +0 -28
  164. package/src/components/table/elm-table-row.tsx +0 -15
  165. package/src/components/table/elm-table.module.scss +0 -29
  166. package/src/components/table/elm-table.stories.tsx +0 -67
  167. package/src/components/table/elm-table.tsx +0 -63
  168. package/src/components/typography/elm-block-quote.module.scss +0 -29
  169. package/src/components/typography/elm-block-quote.stories.tsx +0 -22
  170. package/src/components/typography/elm-block-quote.tsx +0 -34
  171. package/src/components/typography/elm-callout.module.scss +0 -36
  172. package/src/components/typography/elm-callout.stories.tsx +0 -47
  173. package/src/components/typography/elm-callout.tsx +0 -52
  174. package/src/components/typography/elm-divider.module.scss +0 -6
  175. package/src/components/typography/elm-divider.stories.tsx +0 -14
  176. package/src/components/typography/elm-divider.tsx +0 -14
  177. package/src/components/typography/elm-fragment-identifier.module.scss +0 -28
  178. package/src/components/typography/elm-fragment-identifier.stories.tsx +0 -14
  179. package/src/components/typography/elm-fragment-identifier.tsx +0 -31
  180. package/src/components/typography/elm-heading.module.scss +0 -120
  181. package/src/components/typography/elm-heading.stories.tsx +0 -42
  182. package/src/components/typography/elm-heading.tsx +0 -40
  183. package/src/components/typography/elm-inline-text.module.scss +0 -114
  184. package/src/components/typography/elm-inline-text.stories.tsx +0 -70
  185. package/src/components/typography/elm-inline-text.tsx +0 -147
  186. package/src/components/typography/elm-list.global.scss +0 -66
  187. package/src/components/typography/elm-list.stories.tsx +0 -61
  188. package/src/components/typography/elm-list.tsx +0 -39
  189. package/src/components/typography/elm-paragraph.module.scss +0 -21
  190. package/src/components/typography/elm-paragraph.stories.tsx +0 -47
  191. package/src/components/typography/elm-paragraph.tsx +0 -31
  192. package/src/entry.dev.tsx +0 -17
  193. package/src/global.d.ts +0 -13
  194. package/src/hooks/useDelayedSignal.ts +0 -27
  195. package/src/hooks/useInView.tsx +0 -23
  196. package/src/index.ts +0 -113
  197. package/src/root.tsx +0 -13
  198. package/src/styles/text.module.scss +0 -17
  199. package/src/vite-env.d.ts +0 -1
  200. package/tsconfig.json +0 -21
  201. package/vite.config.ts +0 -36
  202. /package/{src/components/table/index.ts → lib-types/components/table/index.d.ts} +0 -0
@@ -1,147 +0,0 @@
1
- import { component$, Slot, type CSSProperties } from "@builder.io/qwik";
2
-
3
- import styles from "./elm-inline-text.module.scss";
4
- import textStyles from "../../styles/text.module.scss";
5
-
6
- import { ElmInlineIcon } from "../icon/elm-inline-icon";
7
-
8
- export interface ElmInlineTextProps {
9
- /**
10
- * The text to display.
11
- */
12
- text?: string;
13
-
14
- /**
15
- * Specifies the color of the text.
16
- *
17
- * e.g.) `'red'`, `'#ff0000'`, `'rgba(255, 0, 0, 0.5)'`
18
- */
19
- color?: CSSProperties["color"];
20
-
21
- /**
22
- * Specifies the font size of the text.
23
- */
24
- size?: CSSProperties["fontSize"];
25
-
26
- /**
27
- * Specifies whether the text should be bold.
28
- */
29
- bold?: boolean;
30
-
31
- /**
32
- * Specifies whether the text should be italic.
33
- */
34
- italic?: boolean;
35
-
36
- /**
37
- * Specifies whether the text should be underlined.
38
- */
39
- underline?: boolean;
40
-
41
- /**
42
- * Specifies whether the text should be strikethrough.
43
- */
44
- strikethrough?: boolean;
45
-
46
- /**
47
- * Specifies whether the text should be displayed as code.
48
- */
49
- code?: boolean;
50
-
51
- kbd?: boolean;
52
-
53
- /**
54
- * Specifies the background color of the text.
55
- */
56
- backgroundColor?: CSSProperties["backgroundColor"];
57
-
58
- /**
59
- * The ruby text to display.
60
- */
61
- ruby?: string;
62
-
63
- /**
64
- * The URL to navigate to.
65
- *
66
- * e.g. `https://example.com`
67
- */
68
- href?: string;
69
-
70
- favicon?: string;
71
- }
72
-
73
- export const ElmInlineText = component$<ElmInlineTextProps>((props) => {
74
- const {
75
- bold = false,
76
- italic = false,
77
- underline = false,
78
- strikethrough = false,
79
- code = false,
80
- size = "1em",
81
- } = props;
82
-
83
- let vnode = props.text ? <span>{props.text}</span> : <Slot />;
84
-
85
- if (props.kbd) {
86
- vnode = <kbd class={styles.kbd}>{vnode}</kbd>;
87
- }
88
-
89
- if (strikethrough) {
90
- vnode = <del>{vnode}</del>;
91
- }
92
-
93
- if (italic) {
94
- vnode = <em>{vnode}</em>;
95
- }
96
-
97
- if (underline) {
98
- vnode = <ins>{vnode}</ins>;
99
- }
100
-
101
- if (bold) {
102
- vnode = <strong>{vnode}</strong>;
103
- }
104
-
105
- if (code) {
106
- vnode = <code class={styles.code}>{vnode}</code>;
107
- }
108
-
109
- if (props.ruby) {
110
- vnode = (
111
- <ruby class={styles.text}>
112
- <span>{vnode}</span>
113
- <rt>{props.ruby}</rt>
114
- </ruby>
115
- );
116
- }
117
-
118
- const wrappedVnode = (
119
- <span
120
- class={[styles.text, textStyles.text]}
121
- style={{
122
- "--color": props.color,
123
- "--font-size": size,
124
- "--background-color": props.backgroundColor,
125
- }}
126
- >
127
- {vnode}
128
- </span>
129
- );
130
-
131
- if (props.href) {
132
- return (
133
- <a
134
- class={styles.link}
135
- href={props.href}
136
- style={{ "--font-size": size }}
137
- target="_blank"
138
- rel="noopener noreferrer"
139
- >
140
- {props.favicon && <ElmInlineIcon src={props.favicon} />}
141
- {wrappedVnode}
142
- </a>
143
- );
144
- }
145
-
146
- return wrappedVnode;
147
- });
@@ -1,66 +0,0 @@
1
- .elmethis-list-common {
2
- margin-block: 1rem;
3
- opacity: var(--opacity);
4
- transition: opacity 800ms;
5
- box-sizing: border-box;
6
- padding-left: 1.25rem;
7
- }
8
-
9
- .elmethis-bulleted-list {
10
- li {
11
- box-sizing: border-box;
12
- padding-left: 0.5rem;
13
- margin-block: 0.75rem;
14
-
15
- &::marker {
16
- content: url("data:image/svg+xml;base64,ICA8c3ZnCiAgICB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnCiAgICB2aWV3Qm94PScwIDAgMTYgMTYnCiAgICB3aWR0aD0nMTJweCcKICAgIGhlaWdodD0nMTJweCcKICA+CiAgICA8cGF0aAogICAgICBmaWxsPScjNDQ5NzYzJwogICAgICBvcGFjaXR5PScwLjgnCiAgICAgIGQ9J00zIDMuNzMyYTEuNSAxLjUgMCAwIDEgMi4zMDUtMS4yNjVsNi43MDYgNC4yNjdhMS41IDEuNSAwIDAgMSAwIDIuNTMxbC02LjcwNiA0LjI2OEExLjUgMS41IDAgMCAxIDMgMTIuMjY3VjMuNzMyWicKICAgIC8+CiAgPC9zdmc+");
17
- }
18
-
19
- ul {
20
- li {
21
- &::marker {
22
- content: url("data:image/svg+xml;base64,ICA8c3ZnCiAgICB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnCiAgICB2aWV3Qm94PScwIDAgMjQgMjQnCiAgICB3aWR0aD0nMTJweCcKICAgIGhlaWdodD0nMTJweCcKICAgIHN0cm9rZT0nIzQ0OTc2MycKICAgIGZpbGw9J3RyYW5zcGFyZW50JwogID4KICAgIDxwYXRoCiAgICAgIHN0cm9rZUxpbmVjYXA9J3JvdW5kJwogICAgICBzdHJva2VMaW5lam9pbj0ncm91bmQnCiAgICAgIGQ9J001LjI1IDUuNjUzYzAtLjg1Ni45MTctMS4zOTggMS42NjctLjk4NmwxMS41NCA2LjM0N2ExLjEyNSAxLjEyNSAwIDAgMSAwIDEuOTcybC0xMS41NCA2LjM0N2ExLjEyNSAxLjEyNSAwIDAgMS0xLjY2Ny0uOTg2VjUuNjUzWicKICAgIC8+CiAgPC9zdmc+");
23
- }
24
- ul {
25
- li {
26
- &::marker {
27
- content: url("data:image/svg+xml;base64,ICA8c3ZnCiAgICB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnCiAgICB2aWV3Qm94PScwIDAgMjAgMjAnCiAgICB3aWR0aD0nMTJweCcKICAgIGhlaWdodD0nMTJweCcKICAgIHN0cm9rZT0nIzQ0OTc2MycKICAgIGZpbGw9JyM0NDk3NjMnCiAgPgogICAgPHBhdGgKICAgICAgZmlsbFJ1bGU9J2V2ZW5vZGQnCiAgICAgIGQ9J004LjIyIDUuMjJhLjc1Ljc1IDAgMCAxIDEuMDYgMGw0LjI1IDQuMjVhLjc1Ljc1IDAgMCAxIDAgMS4wNmwtNC4yNSA0LjI1YS43NS43NSAwIDAgMS0xLjA2LTEuMDZMMTEuOTQgMTAgOC4yMiA2LjI4YS43NS43NSAwIDAgMSAwLTEuMDZaJwogICAgICBjbGlwUnVsZT0nZXZlbm9kZCcKICAgIC8+CiAgPC9zdmc+");
28
- }
29
- }
30
- }
31
- }
32
- }
33
- }
34
- }
35
-
36
- .elmethis-numbered-list {
37
- li {
38
- box-sizing: border-box;
39
- padding-left: 0.25rem;
40
- margin-block: 0.75rem;
41
- margin-left: 0.25rem;
42
-
43
- list-style-type: decimal;
44
-
45
- &::marker {
46
- font-weight: bold;
47
- color: #9771bd;
48
- }
49
-
50
- ol {
51
- li {
52
- list-style-type: lower-alpha;
53
- ol {
54
- li {
55
- list-style-type: lower-roman;
56
- ol {
57
- li {
58
- list-style-type: lower-greek;
59
- }
60
- }
61
- }
62
- }
63
- }
64
- }
65
- }
66
- }
@@ -1,61 +0,0 @@
1
- import type { Meta, StoryObj } from "storybook-framework-qwik";
2
- import { ElmList } from "./elm-list";
3
-
4
- const meta: Meta<typeof ElmList> = {
5
- title: "Components/Typography/elm-list",
6
- component: ElmList,
7
- tags: ["autodocs"],
8
- argTypes: {
9
- listStyle: {
10
- options: ["unordered", "ordered"],
11
- control: "radio",
12
- },
13
- },
14
- render() {
15
- return (
16
- <ElmList {...this.args}>
17
- <li>Item 1</li>
18
- <li>Item 2</li>
19
- <li>Item 3</li>
20
- </ElmList>
21
- );
22
- },
23
- };
24
-
25
- export default meta;
26
- type Story = StoryObj<typeof meta>;
27
-
28
- export const Unordered: Story = {
29
- args: { listStyle: "unordered" },
30
- };
31
-
32
- export const Ordered: Story = {
33
- args: { listStyle: "ordered" },
34
- };
35
-
36
- export const Nested: Story = {
37
- args: { listStyle: "unordered" },
38
- render() {
39
- return (
40
- <ElmList {...this.args}>
41
- <li>Item 1</li>
42
- <li>
43
- Item 2
44
- <ElmList {...this.args}>
45
- <li>Item 2.1</li>
46
- <li>
47
- Item 2.2
48
- <ElmList {...this.args}>
49
- <li>Item 2.2.1</li>
50
- <li>Item 2.2.2</li>
51
- <li>Item 2.2.3</li>
52
- </ElmList>
53
- </li>
54
- <li>Item 2.3</li>
55
- </ElmList>
56
- </li>
57
- <li>Item 3</li>
58
- </ElmList>
59
- );
60
- },
61
- };
@@ -1,39 +0,0 @@
1
- import { component$, Slot } from "@builder.io/qwik";
2
-
3
- import "./elm-list.global.scss";
4
-
5
- import textStyle from "../../styles/text.module.scss";
6
-
7
- export interface ElmListProps {
8
- listStyle: "unordered" | "ordered";
9
- }
10
-
11
- export const ElmList = component$<ElmListProps>(
12
- ({ listStyle = "unordered" }) => {
13
- if (listStyle === "ordered") {
14
- return (
15
- <ol
16
- class={[
17
- textStyle.text,
18
- "elmethis-list-common",
19
- "elmethis-numbered-list",
20
- ]}
21
- >
22
- <Slot />
23
- </ol>
24
- );
25
- } else {
26
- return (
27
- <ul
28
- class={[
29
- textStyle.text,
30
- "elmethis-list-common",
31
- "elmethis-bulleted-list",
32
- ]}
33
- >
34
- <Slot />
35
- </ul>
36
- );
37
- }
38
- },
39
- );
@@ -1,21 +0,0 @@
1
- .paragraph {
2
- opacity: var(--opacity, 0);
3
- opacity: var(--opacity);
4
- transition: opacity 800ms;
5
- color: var(--color, #606875);
6
- background-color: var(--background-color, inherit);
7
-
8
- &::selection {
9
- color: rgba(255, 255, 255, 0.7);
10
- background-color: rgba(0, 0, 0, 0.7);
11
- }
12
-
13
- [data-theme="dark"] & {
14
- color: rgba(255, 255, 255, 0.7);
15
-
16
- &::selection {
17
- color: rgba(0, 0, 0, 0.7);
18
- background-color: rgba(255, 255, 255, 0.7);
19
- }
20
- }
21
- }
@@ -1,47 +0,0 @@
1
- import type { Meta, StoryObj } from "storybook-framework-qwik";
2
- import { ElmParagraph } from "./elm-paragraph";
3
-
4
- const meta: Meta<typeof ElmParagraph> = {
5
- title: "Components/Typography/elm-paragraph",
6
- component: ElmParagraph,
7
- tags: ["autodocs"],
8
- args: {},
9
- argTypes: {
10
- color: { control: "color" },
11
- backgroundColor: { control: "color" },
12
- },
13
- render() {
14
- return (
15
- <ElmParagraph {...this.args}>
16
- This is a paragraph with an inline text component.
17
- </ElmParagraph>
18
- );
19
- },
20
- };
21
-
22
- export default meta;
23
- type Story = StoryObj<typeof meta>;
24
-
25
- export const Primary: Story = {};
26
-
27
- export const Color: Story = {
28
- args: {
29
- color: "#4b9ba9",
30
- },
31
- };
32
-
33
- export const BackgroundColor: Story = {
34
- args: {
35
- backgroundColor: "#b1d6dc",
36
- },
37
- };
38
-
39
- export const Many: Story = {
40
- render() {
41
- return Array.from({ length: 50 }, (_, i) => (
42
- <ElmParagraph key={i} {...this.args}>
43
- This is a paragraph with an inline text component.
44
- </ElmParagraph>
45
- ));
46
- },
47
- };
@@ -1,31 +0,0 @@
1
- import { component$, Slot } from "@builder.io/qwik";
2
-
3
- import styles from "./elm-paragraph.module.scss";
4
- import textStyles from "../../styles/text.module.scss";
5
- import { useInView } from "../../hooks/useInView";
6
-
7
- export interface ElmParagraphProps {
8
- color?: string;
9
-
10
- backgroundColor?: string;
11
- }
12
-
13
- export const ElmParagraph = component$<ElmParagraphProps>(
14
- ({ color, backgroundColor }) => {
15
- const { ref, isVisible } = useInView();
16
-
17
- return (
18
- <p
19
- ref={ref}
20
- class={[styles.paragraph, textStyles.text]}
21
- style={{
22
- "--color": color,
23
- "--background-color": backgroundColor,
24
- "--opacity": isVisible.value ? 1 : 0,
25
- }}
26
- >
27
- <Slot />
28
- </p>
29
- );
30
- },
31
- );
package/src/entry.dev.tsx DELETED
@@ -1,17 +0,0 @@
1
- /*
2
- * WHAT IS THIS FILE?
3
- *
4
- * Development entry point using only client-side modules:
5
- * - Do not use this mode in production!
6
- * - No SSR
7
- * - No portion of the application is pre-rendered on the server.
8
- * - All of the application is running eagerly in the browser.
9
- * - More code is transferred to the browser than in SSR mode.
10
- * - Optimizer/Serialization/Deserialization code is not exercised!
11
- */
12
- import { render, type RenderOptions } from "@builder.io/qwik";
13
- import Root from "./root";
14
-
15
- export default function (opts: RenderOptions) {
16
- return render(document, <Root />, opts);
17
- }
package/src/global.d.ts DELETED
@@ -1,13 +0,0 @@
1
- declare module "*.module.scss" {
2
- const classes: { [key: string]: string };
3
- export default classes;
4
- }
5
-
6
- declare module "*.scss";
7
-
8
- declare module "*.module.css" {
9
- const classes: { [key: string]: string };
10
- export default classes;
11
- }
12
-
13
- declare module "*.css";
@@ -1,27 +0,0 @@
1
- import { $, useSignal } from "@builder.io/qwik";
2
-
3
- export const useDelayedSignal = <T>(
4
- initialValue: Parameters<typeof useSignal<T>>[0],
5
- ) => {
6
- const signal = useSignal<T>(initialValue);
7
- const delayedSignal = useSignal<T>(initialValue);
8
- const isSignalChanging = useSignal(false);
9
-
10
- const dispatch = $((value: T, delay?: number) => {
11
- isSignalChanging.value = true;
12
- signal.value = value;
13
-
14
- if (delay === undefined || delay <= 0) {
15
- delayedSignal.value = value;
16
- isSignalChanging.value = false;
17
- } else {
18
- const timerId = setTimeout(() => {
19
- delayedSignal.value = value;
20
- isSignalChanging.value = false;
21
- clearTimeout(timerId);
22
- }, delay);
23
- }
24
- });
25
-
26
- return { signal, delayedSignal, dispatch };
27
- };
@@ -1,23 +0,0 @@
1
- import { useSignal, useVisibleTask$ } from "@builder.io/qwik";
2
-
3
- export const useInView = (props?: { defaultValue?: boolean }) => {
4
- const ref = useSignal<Element>();
5
- const isVisible = useSignal(props?.defaultValue ?? false);
6
-
7
- // eslint-disable-next-line qwik/no-use-visible-task
8
- useVisibleTask$(() => {
9
- if (!ref.value) return;
10
-
11
- const observer = new IntersectionObserver(
12
- ([entry]) => {
13
- isVisible.value = entry.isIntersecting;
14
- },
15
- { rootMargin: "100px", threshold: 0.1 },
16
- );
17
-
18
- observer.observe(ref.value);
19
- return () => observer.disconnect();
20
- });
21
-
22
- return { ref, isVisible };
23
- };
package/src/index.ts DELETED
@@ -1,113 +0,0 @@
1
- // | Code |
2
- export {
3
- ElmCodeBlock,
4
- type ElmCodeBlockProps,
5
- } from "./components/code/elm-code-block";
6
- export { ElmKatex, type ElmKatexProps } from "./components/code/elm-katex";
7
- export {
8
- ElmShikiHighlighter,
9
- type ElmShikiHighlighterProps,
10
- } from "./components/code/elm-shiki-highlighter";
11
-
12
- // | Containments |
13
- export {
14
- ElmToggle,
15
- type ElmToggleProps,
16
- } from "./components/containments/elm-toggle";
17
-
18
- // | Fallback |
19
- export {
20
- ElmBlockFallback,
21
- type ElmBlockFallbackProps,
22
- } from "./components/fallback/elm-block-fallback";
23
- export {
24
- ElmRectangleWave,
25
- type ElmRectangleWaveProps,
26
- } from "./components/fallback/elm-rectangle-wave";
27
-
28
- // | Icon |
29
- export {
30
- ElmDotLoadingIcon,
31
- type ElmDotLoadingIconProps,
32
- } from "./components/icon/elm-dot-loading-icon";
33
-
34
- export {
35
- ElmInlineIcon,
36
- type ElmInlineIconProps,
37
- } from "./components/icon/elm-inline-icon";
38
-
39
- export {
40
- ElmLanguageIcon,
41
- type ElmLanguageIconProps,
42
- } from "./components/icon/elm-language-icon";
43
-
44
- export {
45
- ElmMdiIcon,
46
- type ElmMdiIconProps,
47
- } from "./components/icon/elm-mdi-icon";
48
-
49
- // | Media |
50
- export {
51
- ElmBlockImage,
52
- type ElmBlockImageProps,
53
- } from "./components/media/elm-block-image";
54
- export { ElmFile, type ElmFileProps } from "./components/media/elm-file";
55
-
56
- // | Navigation |
57
- export {
58
- ElmBookmark,
59
- type ElmBookmarkProps,
60
- } from "./components/navigation/elm-bookmark";
61
-
62
- // | Typography |
63
- export {
64
- ElmBlockQuote,
65
- type ElmBlockQuoteProps,
66
- } from "./components/typography/elm-block-quote";
67
- export {
68
- ElmCallout,
69
- type ElmCalloutProps,
70
- } from "./components/typography/elm-callout";
71
- export {
72
- ElmDivider,
73
- type ElmDividerProps,
74
- } from "./components/typography/elm-divider";
75
- export {
76
- ElmFragmentIdentifier,
77
- type ElmFragmentIdentifierProps,
78
- } from "./components/typography/elm-fragment-identifier";
79
- export {
80
- ElmHeading,
81
- type ElmHeadingProps,
82
- } from "./components/typography/elm-heading";
83
- export {
84
- ElmInlineText,
85
- type ElmInlineTextProps,
86
- } from "./components/typography/elm-inline-text";
87
- export { ElmList, type ElmListProps } from "./components/typography/elm-list";
88
- export {
89
- ElmParagraph,
90
- type ElmParagraphProps,
91
- } from "./components/typography/elm-paragraph";
92
-
93
- // | Table |
94
- export { ElmTable, type ElmTableProps } from "./components/table/elm-table";
95
- export {
96
- ElmTableHeader,
97
- type ElmTableHeaderProps,
98
- } from "./components/table/elm-table-header";
99
- export {
100
- ElmTableBody,
101
- type ElmTableBodyProps,
102
- } from "./components/table/elm-table-body";
103
- export {
104
- ElmTableRow,
105
- type ElmTableRowProps,
106
- } from "./components/table/elm-table-row";
107
- export {
108
- ElmTableCell,
109
- type ElmTableCellProps,
110
- } from "./components/table/elm-table-cell";
111
-
112
- // | Others |
113
- export { ElmJarkup, type ElmJarkupProps } from "./components/others/elm-jarkup";
package/src/root.tsx DELETED
@@ -1,13 +0,0 @@
1
- export default () => {
2
- return (
3
- <>
4
- <head>
5
- <meta charset="utf-8" />
6
- <title>Qwik Blank App</title>
7
- </head>
8
- <body>
9
- <h1>Qwik Blank App</h1>
10
- </body>
11
- </>
12
- );
13
- };
@@ -1,17 +0,0 @@
1
- .text {
2
- color: var(--color, #606875);
3
-
4
- &::selection {
5
- color: #cccfd5;
6
- background-color: var(--color, #3e434b);
7
- }
8
-
9
- [data-theme="dark"] & {
10
- color: var(--color, #b0b5be);
11
-
12
- &::selection {
13
- color: #3e434b;
14
- background-color: var(--color, #cccfd5);
15
- }
16
- }
17
- }
package/src/vite-env.d.ts DELETED
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowJs": true,
4
- "target": "ES2020",
5
- "module": "ES2020",
6
- "lib": ["es2020", "DOM"],
7
- "jsx": "react-jsx",
8
- "jsxImportSource": "@builder.io/qwik",
9
- "strict": true,
10
- "declaration": true,
11
- "declarationDir": "lib-types",
12
- "resolveJsonModule": true,
13
- "moduleResolution": "Bundler",
14
- "esModuleInterop": true,
15
- "skipLibCheck": true,
16
- "incremental": true,
17
- "isolatedModules": true,
18
- "types": ["vite/client"]
19
- },
20
- "include": ["src"]
21
- }