@xyd-js/core 0.1.0-xyd.8 → 0.1.0-xyd.96

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 CHANGED
@@ -1,18 +1 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // index.ts
16
- var index_exports = {};
17
- module.exports = __toCommonJS(index_exports);
18
1
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../index.ts"],"sourcesContent":["export * from \"./src/types/content\";\n\nexport * from \"./src/types/settings\";\n\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/index.ts CHANGED
@@ -1,4 +1,5 @@
1
- export * from "./src/types/content";
1
+ export * from "./src/types/metadata";
2
2
 
3
- export * from "./src/types/settings";
3
+ export * from "./src/types/seo";
4
4
 
5
+ export * from "./src/types/settings";
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@xyd-js/core",
3
- "version": "0.1.0-xyd.8",
3
+ "version": "0.1.0-xyd.96",
4
4
  "description": "",
5
- "main": "./dist/index.js",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ "./index.css": "./dist/index.css",
11
+ ".": {
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
6
15
  "dependencies": {},
7
16
  "devDependencies": {
8
17
  "tsup": "^8.3.0",
@@ -0,0 +1,123 @@
1
+ // TODO: og
2
+
3
+ /**
4
+ * @todo rename to PageMeta
5
+ *
6
+ * Represents metadata for a content page.
7
+ * Usually used as md/mdx frontmatter.
8
+ *
9
+ */
10
+ export interface Metadata<P = void> {
11
+ /** The main title of the content - by default visible in navigation and page title */
12
+ title: string
13
+
14
+ /** Title to display in the sidebar navigation */
15
+ sidebarTitle?: string
16
+
17
+ /** Disply description for SEO purposes */
18
+ description?: string
19
+
20
+ /** Icon identifier for the navigation item */
21
+ icon?: string
22
+
23
+ /** Layout type for the content display */
24
+ layout?: PageLayout
25
+
26
+ /** Max depth for table of contents */
27
+ maxTocDepth?: number
28
+
29
+ /**
30
+ * @internal
31
+ *
32
+ * The type of component to render this content with
33
+ */
34
+ component?: "docs" | "atlas" | "page"
35
+
36
+ /**
37
+ * @internal
38
+ *
39
+ * Properties specific to the component type
40
+ */
41
+ componentProps?: P
42
+
43
+ /**
44
+ * @internal
45
+ *
46
+ * Group for sidebar navigation
47
+ */
48
+ group?: string[]
49
+
50
+ /**
51
+ * Uniform for API Docs references
52
+ */
53
+ uniform?: PageMetaUniform
54
+
55
+ /**
56
+ * @internal
57
+ *
58
+ * used for graphql references
59
+ */
60
+ graphql?: string
61
+
62
+ /**
63
+ * @internal
64
+ *
65
+ * used for openapi references
66
+ */
67
+ openapi?: string
68
+
69
+ /**
70
+ * If true, hide from navigation
71
+ */
72
+ hidden?: boolean
73
+
74
+ /**
75
+ * @todo: !!! IN THE FUTURE COMPOSE API !!!
76
+ *
77
+ * Optional 'tocCard' for github references
78
+ *
79
+ * @example
80
+ * ```
81
+ * tocCard: {
82
+ * link: "https://github.com/livesession/livesession-browser",
83
+ * title: "Checkout the code",
84
+ * description: "Check how to use the LiveSession Browser SDK",
85
+ * icon: "github"
86
+ * }
87
+ * ```
88
+ */
89
+ tocCard?: {
90
+ /** 'link' to the card */
91
+ link: string
92
+
93
+ /** 'title' of the card */
94
+ title: string
95
+
96
+ /** 'description' of the card */
97
+ description: string
98
+
99
+ /** 'icon' of the card */
100
+ icon?: string
101
+ }
102
+ }
103
+
104
+ export type PageMetaUniform = string | PageMetaUniformDetails;
105
+
106
+ /**
107
+ * Uniform details allows to specify more options than just the path, for example eager loading
108
+ */
109
+ export type PageMetaUniformDetails = {
110
+ /**
111
+ * Path to the uniform file / url
112
+ */
113
+ path: string
114
+
115
+ /**
116
+ * If true, the uniform will be eagerly loaded
117
+ */
118
+ eager?: boolean
119
+ }
120
+
121
+ export type MetadataMap<P = void> = { [page: string]: Metadata<P> }
122
+
123
+ export type PageLayout = "wide" | "page" | "center"
@@ -0,0 +1,475 @@
1
+ // #region MetaTags
2
+ /**
3
+ * Interface representing all possible meta tags that can be used in HTML documents.
4
+ * This includes standard meta tags, Open Graph tags, Twitter cards, and various other
5
+ * specialized meta tags for different content types.
6
+ *
7
+ */
8
+ export interface MetaTags {
9
+ //
10
+ // Standard
11
+ //
12
+
13
+ /** Standard meta tag for controlling search engine crawling and indexing
14
+ * @example "noindex"
15
+ */
16
+ robots: string;
17
+
18
+ /** Character encoding for the document
19
+ * @example "UTF-8"
20
+ */
21
+ charset: string;
22
+
23
+ /** Viewport settings for responsive design
24
+ * @example "width=device-width, initial-scale=1, maximum-scale=1"
25
+ */
26
+ viewport: string;
27
+
28
+ /** Brief description of the page content
29
+ * @example "Your page description"
30
+ */
31
+ description: string;
32
+
33
+ /** Keywords relevant to the page content
34
+ * @example "keyword, keyword2"
35
+ */
36
+ keywords: string;
37
+
38
+ /** Author of the page content
39
+ * @example "Author Name"
40
+ */
41
+ author: string;
42
+
43
+ /** Google-specific crawling instructions
44
+ * @example "index, follow"
45
+ */
46
+ googlebot: string;
47
+
48
+ /** Google-specific settings
49
+ * @example "notranslate"
50
+ */
51
+ google: string;
52
+
53
+ /** Google Search Console verification token
54
+ * @example "verification_token"
55
+ */
56
+ "google-site-verification": string;
57
+
58
+ /** Software used to generate the page
59
+ * @example "xyd"
60
+ */
61
+ generator: string;
62
+
63
+ /** Theme color for browser UI
64
+ * @example "#ffffff"
65
+ */
66
+ "theme-color": string;
67
+
68
+ /** Color scheme preference
69
+ * @example "light"
70
+ */
71
+ "color-scheme": string;
72
+
73
+ /** Format detection settings
74
+ * @example "telephone=no"
75
+ */
76
+ "format-detection": string;
77
+
78
+ /** Referrer policy
79
+ * @example "origin"
80
+ */
81
+ referrer: string;
82
+
83
+ /** Page refresh settings
84
+ * @example "0;url=https://example.com"
85
+ */
86
+ refresh: string;
87
+
88
+ /** Content rating
89
+ * @example "general"
90
+ */
91
+ rating: string;
92
+
93
+ /** Crawl frequency suggestion
94
+ * @example "7 days"
95
+ */
96
+ "revisit-after": string;
97
+
98
+ /** Page language
99
+ * @example "en-US"
100
+ */
101
+ language: string;
102
+
103
+ /** Copyright information
104
+ * @example "Copyright 2024"
105
+ */
106
+ copyright: string;
107
+
108
+ /** Reply-to email address
109
+ * @example "contact@example.com"
110
+ */
111
+ "reply-to": string;
112
+
113
+ /** Content distribution scope
114
+ * @example "global"
115
+ */
116
+ distribution: string;
117
+
118
+ /** Content coverage area
119
+ * @example "Worldwide"
120
+ */
121
+ coverage: string;
122
+
123
+ /** Content category
124
+ * @example "Technology"
125
+ */
126
+ category: string;
127
+
128
+ /** Target audience
129
+ * @example "all"
130
+ */
131
+ target: string;
132
+
133
+ /** Mobile device compatibility
134
+ * @example "true"
135
+ */
136
+ HandheldFriendly: string;
137
+
138
+ /** Mobile optimization settings
139
+ * @example "width"
140
+ */
141
+ MobileOptimized: string;
142
+
143
+ //
144
+ // Apple
145
+ //
146
+
147
+ /** iOS web app capability
148
+ * @example "yes"
149
+ */
150
+ "apple-mobile-web-app-capable": string;
151
+
152
+ /** iOS status bar style
153
+ * @example "black"
154
+ */
155
+ "apple-mobile-web-app-status-bar-style": string;
156
+
157
+ /** iOS web app title
158
+ * @example "App Name"
159
+ */
160
+ "apple-mobile-web-app-title": string;
161
+
162
+ /** Web application name
163
+ * @example "My App"
164
+ */
165
+ "application-name": string;
166
+
167
+ //
168
+ // Windows
169
+ //
170
+
171
+ /** Windows tile color
172
+ * @example "#2b5797"
173
+ */
174
+ "msapplication-TileColor": string;
175
+
176
+ /** Windows tile image
177
+ * @example "/mstile-144x144.png"a
178
+ */
179
+ "msapplication-TileImage": string;
180
+
181
+ /** Windows browser config
182
+ * @example "/browserconfig.xml"
183
+ */
184
+ "msapplication-config": string;
185
+
186
+ //
187
+ // Open Graph
188
+ //
189
+
190
+ /** Open Graph title
191
+ * @example "Page Title"
192
+ */
193
+ "og:title": string;
194
+
195
+ /** Open Graph content type
196
+ * @example "website"
197
+ */
198
+ "og:type": string;
199
+
200
+ /** Open Graph URL
201
+ * @example "https://example.com"
202
+ */
203
+ "og:url": string;
204
+
205
+ /** Open Graph image
206
+ * @example "https://example.com/image.jpg"
207
+ */
208
+ "og:image": string;
209
+
210
+ /** Open Graph description
211
+ * @example "A brief description for social media"
212
+ */
213
+ "og:description": string;
214
+
215
+ /** Open Graph site name
216
+ * @example "Site Name"
217
+ */
218
+ "og:site_name": string;
219
+
220
+ /** Open Graph locale
221
+ * @example "en_US"
222
+ */
223
+ "og:locale": string;
224
+
225
+ /** Open Graph video
226
+ * @example "https://example.com/video.mp4"
227
+ */
228
+ "og:video": string;
229
+
230
+ /** Open Graph audio
231
+ * @example "https://example.com/audio.mp3"
232
+ */
233
+ "og:audio": string;
234
+
235
+ //
236
+ // Twitter
237
+ //
238
+
239
+ /** Twitter card type
240
+ * @example "summary"
241
+ */
242
+ "twitter:card": string;
243
+
244
+ /** Twitter site handle
245
+ * @example "@username"
246
+ */
247
+ "twitter:site": string;
248
+
249
+ /** Twitter creator handle
250
+ * @example "@author"
251
+ */
252
+ "twitter:creator": string;
253
+
254
+ /** Twitter title
255
+ * @example "Page Title"
256
+ */
257
+ "twitter:title": string;
258
+
259
+ /** Twitter description
260
+ * @example "A brief description for Twitter"
261
+ */
262
+ "twitter:description": string;
263
+
264
+ /** Twitter image
265
+ * @example "https://example.com/image.jpg"
266
+ */
267
+ "twitter:image": string;
268
+
269
+ /** Twitter image alt text
270
+ * @example "Image description"
271
+ */
272
+ "twitter:image:alt": string;
273
+
274
+ /** Twitter player URL
275
+ * @example "https://example.com/player"
276
+ */
277
+ "twitter:player": string;
278
+
279
+ /** Twitter player width
280
+ * @example "480"
281
+ */
282
+ "twitter:player:width": string;
283
+
284
+ /** Twitter player height
285
+ * @example "480"
286
+ */
287
+ "twitter:player:height": string;
288
+
289
+ /** Twitter iOS app name
290
+ * @example "App Name"
291
+ */
292
+ "twitter:app:name:iphone": string;
293
+
294
+ /** Twitter iOS app ID
295
+ * @example "123456789"
296
+ */
297
+ "twitter:app:id:iphone": string;
298
+
299
+ /** Twitter iOS app URL
300
+ * @example "app://"
301
+ */
302
+ "twitter:app:url:iphone": string;
303
+
304
+ //
305
+ // Article
306
+ //
307
+
308
+ /** Article publication time
309
+ * @example "2024-03-20T12:00:00Z"
310
+ */
311
+ "article:published_time": string;
312
+
313
+ /** Article modification time
314
+ * @example "2024-03-21T15:30:00Z"
315
+ */
316
+ "article:modified_time": string;
317
+
318
+ /** Article expiration time
319
+ * @example "2024-04-20T12:00:00Z"
320
+ */
321
+ "article:expiration_time": string;
322
+
323
+ /** Article author
324
+ * @example "John Doe"
325
+ */
326
+ "article:author": string;
327
+
328
+ /** Article section
329
+ * @example "Technology"
330
+ */
331
+ "article:section": string;
332
+
333
+ /** Article tags
334
+ * @example "Web Development"
335
+ */
336
+ "article:tag": string;
337
+
338
+ //
339
+ // Book
340
+ //
341
+
342
+ /** Book author
343
+ * @example "Jane Smith"
344
+ */
345
+ "book:author": string;
346
+
347
+ /** Book ISBN
348
+ * @example "978-3-16-148410-0"
349
+ */
350
+ "book:isbn": string;
351
+
352
+ /** Book release date
353
+ * @example "2024-01-01"
354
+ */
355
+ "book:release_date": string;
356
+
357
+ /** Book tags
358
+ * @example "Fiction"
359
+ */
360
+ "book:tag": string;
361
+
362
+ //
363
+ // Profile
364
+ //
365
+
366
+ /** Profile first name
367
+ * @example "John"
368
+ */
369
+ "profile:first_name": string;
370
+
371
+ /** Profile last name
372
+ * @example "Doe"
373
+ */
374
+ "profile:last_name": string;
375
+
376
+ /** Profile username
377
+ * @example "johndoe"
378
+ */
379
+ "profile:username": string;
380
+
381
+ /** Profile gender
382
+ * @example "male"
383
+ */
384
+ "profile:gender": string;
385
+
386
+ //
387
+ // Music
388
+ //
389
+
390
+ /** Music duration in seconds
391
+ * @example "180"
392
+ */
393
+ "music:duration": string;
394
+
395
+ /** Music album name
396
+ * @example "Album Name"
397
+ */
398
+ "music:album": string;
399
+
400
+ /** Music album disc number
401
+ * @example "1"
402
+ */
403
+ "music:album:disc": string;
404
+
405
+ /** Music album track number
406
+ * @example "1"
407
+ */
408
+ "music:album:track": string;
409
+
410
+ /** Music musician/artist
411
+ * @example "Artist Name"
412
+ */
413
+ "music:musician": string;
414
+
415
+ /** Music song name
416
+ * @example "Song Name"
417
+ */
418
+ "music:song": string;
419
+
420
+ /** Music song disc number
421
+ * @example "1"
422
+ */
423
+ "music:song:disc": string;
424
+
425
+ /** Music song track number
426
+ * @example "1"
427
+ */
428
+ "music:song:track": string;
429
+
430
+ //
431
+ // Video
432
+ //
433
+
434
+ /** Video actor name
435
+ * @example "Actor Name"
436
+ */
437
+ "video:actor": string;
438
+
439
+ /** Video actor role
440
+ * @example "Character Name"
441
+ */
442
+ "video:actor:role": string;
443
+
444
+ /** Video director
445
+ * @example "Director Name"
446
+ */
447
+ "video:director": string;
448
+
449
+ /** Video writer
450
+ * @example "Writer Name"
451
+ */
452
+ "video:writer": string;
453
+
454
+ /** Video duration in seconds
455
+ * @example "120"
456
+ */
457
+ "video:duration": string;
458
+
459
+ /** Video release date
460
+ * @example "2024-01-01"
461
+ */
462
+ "video:release_date": string;
463
+
464
+ /** Video tags
465
+ * @example "Action"
466
+ */
467
+ "video:tag": string;
468
+
469
+ /** Video series name
470
+ * @example "Series Name"
471
+ */
472
+ "video:series": string;
473
+ }
474
+ // #endregion MetaTags
475
+