@d1vij/jassm 0.1.1 → 0.1.3
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/index.js +60 -60
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ function useStyles() {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// src/components/Elements/Anchor.tsx
|
|
46
|
-
import {
|
|
46
|
+
import { jsx } from "react/jsx-runtime";
|
|
47
47
|
function Anchor(props) {
|
|
48
48
|
const selfOrigin = useMemo(() => new URL(window.location.href).origin.toString(), []);
|
|
49
49
|
const styles = useStyles();
|
|
@@ -55,52 +55,52 @@ function Anchor(props) {
|
|
|
55
55
|
const targetOrigin = new URL(props.href ?? "").origin.toString();
|
|
56
56
|
return targetOrigin === selfOrigin ? "_self" : "_blank";
|
|
57
57
|
});
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsx("a", {
|
|
59
59
|
className: cn(styles.anchor),
|
|
60
60
|
target,
|
|
61
61
|
href: props.href,
|
|
62
62
|
children: props.children
|
|
63
|
-
}
|
|
63
|
+
});
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
// src/components/Elements/BlockQuote.tsx
|
|
67
67
|
import { cn as cn2 } from "@d1vij/shit-i-always-use";
|
|
68
|
-
import {
|
|
68
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
69
69
|
function BlockQuote(props) {
|
|
70
70
|
const styles = useStyles();
|
|
71
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ jsx2("blockquote", {
|
|
72
72
|
className: cn2(styles.blockquote),
|
|
73
73
|
children: props.children
|
|
74
|
-
}
|
|
74
|
+
});
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// src/components/Elements/Bold.tsx
|
|
78
78
|
import { cn as cn3 } from "@d1vij/shit-i-always-use";
|
|
79
|
-
import {
|
|
79
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
80
80
|
function Bold(props) {
|
|
81
81
|
const styles = useStyles();
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
return /* @__PURE__ */ jsx3("span", {
|
|
83
83
|
className: cn3(styles.bold),
|
|
84
84
|
children: props.children
|
|
85
|
-
}
|
|
85
|
+
});
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
// src/components/Elements/Code.tsx
|
|
89
89
|
import { cn as cn4 } from "@d1vij/shit-i-always-use";
|
|
90
|
-
import {
|
|
90
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
91
91
|
function Code(props) {
|
|
92
92
|
const styles = useStyles();
|
|
93
93
|
const lang = /language-(\w+)/.exec(props.className || "")?.[1];
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ jsx4("code", {
|
|
95
95
|
className: cn4(styles.code, lang && `language-${lang}`),
|
|
96
96
|
children: props.children
|
|
97
|
-
}
|
|
97
|
+
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
// src/components/Elements/Heading.tsx
|
|
101
101
|
import { cn as cn5, useClipboardText } from "@d1vij/shit-i-always-use";
|
|
102
102
|
import { useEffect, useRef, useState as useState2 } from "react";
|
|
103
|
-
import {
|
|
103
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
104
104
|
function Header(props) {
|
|
105
105
|
const styles = useStyles();
|
|
106
106
|
const headerRef = useRef(null);
|
|
@@ -118,149 +118,149 @@ function Header(props) {
|
|
|
118
118
|
const safe = raw.toLowerCase().replace(/[^a-z0-9\s-]/g, "").trim().replace(/\s+/g, "-").slice(0, 30);
|
|
119
119
|
setId(safe);
|
|
120
120
|
}, []);
|
|
121
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ jsx5("h1", {
|
|
122
122
|
className: cn5(styles.header, styles[`header_${props.level}`]),
|
|
123
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ jsx5("button", {
|
|
124
124
|
onClick: () => void handleClick(),
|
|
125
125
|
ref: headerRef,
|
|
126
126
|
id,
|
|
127
127
|
className: cn5(styles.header_button),
|
|
128
128
|
type: "button",
|
|
129
129
|
children: props.children
|
|
130
|
-
}
|
|
131
|
-
}
|
|
130
|
+
})
|
|
131
|
+
});
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
// src/components/Elements/HorizontalLine.tsx
|
|
135
135
|
import { cn as cn6 } from "@d1vij/shit-i-always-use";
|
|
136
|
-
import {
|
|
136
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
137
137
|
function HorizontalLine(_) {
|
|
138
138
|
const styles = useStyles();
|
|
139
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ jsx6("hr", {
|
|
140
140
|
className: cn6(styles.horizontal_line)
|
|
141
|
-
}
|
|
141
|
+
});
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// src/components/Elements/Image.tsx
|
|
145
145
|
import { cn as cn7 } from "@d1vij/shit-i-always-use";
|
|
146
|
-
import {
|
|
146
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
147
147
|
function Image(props) {
|
|
148
148
|
const styles = useStyles();
|
|
149
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ jsx7("img", {
|
|
150
150
|
className: cn7(styles.image),
|
|
151
151
|
alt: props.alt,
|
|
152
152
|
title: props.title,
|
|
153
153
|
src: props.src
|
|
154
|
-
}
|
|
154
|
+
});
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
// src/components/Elements/Italics.tsx
|
|
158
158
|
import { cn as cn8 } from "@d1vij/shit-i-always-use";
|
|
159
|
-
import {
|
|
159
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
160
160
|
function Italics(props) {
|
|
161
161
|
const styles = useStyles();
|
|
162
|
-
return /* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ jsx8("span", {
|
|
163
163
|
className: cn8(styles.italic),
|
|
164
164
|
children: props.children
|
|
165
|
-
}
|
|
165
|
+
});
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
// src/components/Elements/List.tsx
|
|
169
169
|
import { cn as cn9 } from "@d1vij/shit-i-always-use";
|
|
170
|
-
import {
|
|
170
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
171
171
|
function List(props) {
|
|
172
172
|
const styles = useStyles();
|
|
173
173
|
const L = props.type === "ordered" ? "ol" : "ul";
|
|
174
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ jsx9(L, {
|
|
175
175
|
className: cn9(styles.list, props.type === "ordered" && styles.ordered_list, props.type === "unordered" && styles.unordered_list),
|
|
176
176
|
children: props.children
|
|
177
|
-
}
|
|
177
|
+
});
|
|
178
178
|
}
|
|
179
179
|
function ListItem(props) {
|
|
180
180
|
const styles = useStyles();
|
|
181
|
-
return /* @__PURE__ */
|
|
181
|
+
return /* @__PURE__ */ jsx9("li", {
|
|
182
182
|
className: cn9(styles.list_item),
|
|
183
183
|
children: props.children
|
|
184
|
-
}
|
|
184
|
+
});
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
// src/components/Elements/Paragraph.tsx
|
|
188
188
|
import { cn as cn10 } from "@d1vij/shit-i-always-use";
|
|
189
|
-
import {
|
|
189
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
190
190
|
function Paragraph(props) {
|
|
191
191
|
const styles = useStyles();
|
|
192
|
-
return /* @__PURE__ */
|
|
192
|
+
return /* @__PURE__ */ jsx10("p", {
|
|
193
193
|
className: cn10(styles.paragraph),
|
|
194
194
|
children: props.children
|
|
195
|
-
}
|
|
195
|
+
});
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
// src/components/Elements/Preformatted.tsx
|
|
199
199
|
import { cn as cn11 } from "@d1vij/shit-i-always-use";
|
|
200
|
-
import {
|
|
200
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
201
201
|
function Preformatted(props) {
|
|
202
202
|
const styles = useStyles();
|
|
203
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ jsx11("pre", {
|
|
204
204
|
className: cn11(styles.preformatted),
|
|
205
205
|
children: props.children
|
|
206
|
-
}
|
|
206
|
+
});
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
// src/components/Elements/Striked.tsx
|
|
210
210
|
import { cn as cn12 } from "@d1vij/shit-i-always-use";
|
|
211
|
-
import {
|
|
211
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
212
212
|
function Striked(props) {
|
|
213
213
|
const styles = useStyles();
|
|
214
|
-
return /* @__PURE__ */
|
|
214
|
+
return /* @__PURE__ */ jsx12("span", {
|
|
215
215
|
className: cn12(styles.striked),
|
|
216
216
|
children: props.children
|
|
217
|
-
}
|
|
217
|
+
});
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
// src/components/Elements/Table.tsx
|
|
221
221
|
import { cn as cn13 } from "@d1vij/shit-i-always-use";
|
|
222
|
-
import {
|
|
222
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
223
223
|
function Table(props) {
|
|
224
224
|
const styles = useStyles();
|
|
225
|
-
return /* @__PURE__ */
|
|
225
|
+
return /* @__PURE__ */ jsx13("table", {
|
|
226
226
|
className: cn13(styles.table),
|
|
227
227
|
children: props.children
|
|
228
|
-
}
|
|
228
|
+
});
|
|
229
229
|
}
|
|
230
230
|
function TableHead(props) {
|
|
231
231
|
const styles = useStyles();
|
|
232
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ jsx13("thead", {
|
|
233
233
|
className: cn13(styles.table_head),
|
|
234
234
|
children: props.children
|
|
235
|
-
}
|
|
235
|
+
});
|
|
236
236
|
}
|
|
237
237
|
function TableBody(props) {
|
|
238
238
|
const styles = useStyles();
|
|
239
|
-
return /* @__PURE__ */
|
|
239
|
+
return /* @__PURE__ */ jsx13("tbody", {
|
|
240
240
|
className: cn13(styles.table_body),
|
|
241
241
|
children: props.children
|
|
242
|
-
}
|
|
242
|
+
});
|
|
243
243
|
}
|
|
244
244
|
function TableRow(props) {
|
|
245
245
|
const styles = useStyles();
|
|
246
|
-
return /* @__PURE__ */
|
|
246
|
+
return /* @__PURE__ */ jsx13("tr", {
|
|
247
247
|
className: cn13(styles.table_row),
|
|
248
248
|
children: props.children
|
|
249
|
-
}
|
|
249
|
+
});
|
|
250
250
|
}
|
|
251
251
|
function TableHeadCell(props) {
|
|
252
252
|
const styles = useStyles();
|
|
253
|
-
return /* @__PURE__ */
|
|
253
|
+
return /* @__PURE__ */ jsx13("th", {
|
|
254
254
|
className: cn13(styles.table_head_cell),
|
|
255
255
|
children: props.children
|
|
256
|
-
}
|
|
256
|
+
});
|
|
257
257
|
}
|
|
258
258
|
function TableData(props) {
|
|
259
259
|
const styles = useStyles();
|
|
260
|
-
return /* @__PURE__ */
|
|
260
|
+
return /* @__PURE__ */ jsx13("td", {
|
|
261
261
|
className: cn13(styles.table_data),
|
|
262
262
|
children: props.children
|
|
263
|
-
}
|
|
263
|
+
});
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
// src/components/Elements/Elements.tsx
|
|
@@ -314,22 +314,22 @@ function generateRegistry({
|
|
|
314
314
|
return Object.fromEntries(paths);
|
|
315
315
|
}
|
|
316
316
|
// src/components/Loader.tsx
|
|
317
|
-
import {
|
|
317
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
318
318
|
function MDXFromComponent({
|
|
319
319
|
SourceComponent,
|
|
320
320
|
styles,
|
|
321
321
|
fallback,
|
|
322
322
|
elements = Elements
|
|
323
323
|
}) {
|
|
324
|
-
return /* @__PURE__ */
|
|
324
|
+
return /* @__PURE__ */ jsx14(StyleContext, {
|
|
325
325
|
value: styles,
|
|
326
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ jsx14(Suspense, {
|
|
327
327
|
fallback,
|
|
328
|
-
children: /* @__PURE__ */
|
|
328
|
+
children: /* @__PURE__ */ jsx14(SourceComponent, {
|
|
329
329
|
components: elements
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
330
|
+
})
|
|
331
|
+
})
|
|
332
|
+
});
|
|
333
333
|
}
|
|
334
334
|
export {
|
|
335
335
|
useStyles,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d1vij/jassm",
|
|
3
3
|
"description": "Just another static site maker. Create simple content driven sites using MDX and React along with Typescript safety.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
|
-
"url": "https://github.com/d1vij/
|
|
26
|
+
"url": "https://github.com/d1vij/jassm"
|
|
27
27
|
},
|
|
28
|
-
"homepage": "https://github.com/d1vij/
|
|
28
|
+
"homepage": "https://github.com/d1vij/jassm",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"publishConfig": {
|