@guinetik/primitives-ts 0.1.0 → 0.1.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.
- package/dist/firestore.types.d.ts +21 -0
- package/dist/firestore.types.d.ts.map +1 -0
- package/dist/firestore.types.js +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/website-firestore.types.d.ts +131 -0
- package/dist/website-firestore.types.d.ts.map +1 -0
- package/dist/website-firestore.types.js +32 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Firestore Base Types
|
|
3
|
+
* Generic types for Firestore documents that can be used across all modules
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Base document with Firestore metadata fields
|
|
7
|
+
* Extend this interface for all Firestore document types
|
|
8
|
+
*/
|
|
9
|
+
export interface FirestoreDocument {
|
|
10
|
+
/** Document creation timestamp */
|
|
11
|
+
createdAt?: any;
|
|
12
|
+
/** Document last update timestamp */
|
|
13
|
+
updatedAt?: any;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Firestore collection reference helper
|
|
17
|
+
*/
|
|
18
|
+
export type FirestoreCollection<T> = {
|
|
19
|
+
[key: string]: T;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=firestore.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firestore.types.d.ts","sourceRoot":"","sources":["../src/firestore.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,SAAS,CAAC,EAAE,GAAG,CAAC;IAEhB,qCAAqC;IACrC,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAClB,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,cAAc,CAAC;AAG7B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,cAAc,CAAC;AAG7B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,iBAAiB,CAAC;AAGhC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -29,3 +29,7 @@ __exportStar(require("./auth.types"), exports);
|
|
|
29
29
|
__exportStar(require("./system.types"), exports);
|
|
30
30
|
// Website/Site content types
|
|
31
31
|
__exportStar(require("./website.types"), exports);
|
|
32
|
+
// Firestore base types (backend only)
|
|
33
|
+
__exportStar(require("./firestore.types"), exports);
|
|
34
|
+
// Website Firestore document types (backend only)
|
|
35
|
+
__exportStar(require("./website-firestore.types"), exports);
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Website Firestore Document Types
|
|
3
|
+
* Backend-only types that extend website types with Firestore metadata
|
|
4
|
+
*
|
|
5
|
+
* These types are used ONLY by backend/database code.
|
|
6
|
+
* Frontend should use the base types from website.types.ts
|
|
7
|
+
*/
|
|
8
|
+
import { FirestoreDocument } from './firestore.types';
|
|
9
|
+
import { MenuItem, Theme, Card, Experiment, AboutSection } from './website.types';
|
|
10
|
+
/**
|
|
11
|
+
* Firestore document for website config collection
|
|
12
|
+
* Collection: website-config
|
|
13
|
+
* Document ID: main
|
|
14
|
+
*/
|
|
15
|
+
export interface WebsiteConfigDocument extends FirestoreDocument {
|
|
16
|
+
/** Site title */
|
|
17
|
+
title: string;
|
|
18
|
+
/** Site description */
|
|
19
|
+
description: string;
|
|
20
|
+
/** Default theme ID */
|
|
21
|
+
theme: string;
|
|
22
|
+
/** Stats theme mappings */
|
|
23
|
+
statsTheme: Record<string, string>;
|
|
24
|
+
/** Contributions theme mappings */
|
|
25
|
+
contribsTheme: Record<string, string>;
|
|
26
|
+
/** Stats background mappings */
|
|
27
|
+
statsBg: Record<string, string>;
|
|
28
|
+
/** About section content */
|
|
29
|
+
about: AboutSection;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Firestore document for website menu collection
|
|
33
|
+
* Collection: website-menu
|
|
34
|
+
* Document IDs: 'main' | 'mobile'
|
|
35
|
+
*/
|
|
36
|
+
export interface MenuDocument extends FirestoreDocument {
|
|
37
|
+
/** Menu items */
|
|
38
|
+
items: MenuItem[];
|
|
39
|
+
/** Display order */
|
|
40
|
+
order: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Firestore document for website themes collection
|
|
44
|
+
* Collection: website-themes
|
|
45
|
+
* Document ID: theme ID (e.g., 'guinetik', 'synthwave')
|
|
46
|
+
*/
|
|
47
|
+
export interface ThemeDocument extends FirestoreDocument, Theme {
|
|
48
|
+
/** Display order */
|
|
49
|
+
order: number;
|
|
50
|
+
/** Is theme enabled? */
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
/** Optional theme description */
|
|
53
|
+
description?: string;
|
|
54
|
+
/** Optional color palette */
|
|
55
|
+
colors?: {
|
|
56
|
+
primary?: string;
|
|
57
|
+
secondary?: string;
|
|
58
|
+
accent?: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Firestore document for website projects collection
|
|
63
|
+
* Collection: website-projects
|
|
64
|
+
* Document ID: auto-generated
|
|
65
|
+
*/
|
|
66
|
+
export interface ProjectDocument extends FirestoreDocument, Card {
|
|
67
|
+
/** Display order */
|
|
68
|
+
order: number;
|
|
69
|
+
/** Is project featured? */
|
|
70
|
+
featured: boolean;
|
|
71
|
+
/** Is project visible? */
|
|
72
|
+
visible: boolean;
|
|
73
|
+
/** Optional project year/timeframe */
|
|
74
|
+
year?: string;
|
|
75
|
+
/** Optional project category */
|
|
76
|
+
category?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Firestore document for website demos collection
|
|
80
|
+
* Collection: website-demos
|
|
81
|
+
* Document ID: auto-generated
|
|
82
|
+
*/
|
|
83
|
+
export interface DemoDocument extends FirestoreDocument, Card {
|
|
84
|
+
/** Display order */
|
|
85
|
+
order: number;
|
|
86
|
+
/** Is demo visible? */
|
|
87
|
+
visible: boolean;
|
|
88
|
+
/** Optional source code URL */
|
|
89
|
+
sourceCode?: string;
|
|
90
|
+
/** Optional demo category */
|
|
91
|
+
category?: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Firestore document for website experiments collection
|
|
95
|
+
* Collection: website-experiments
|
|
96
|
+
* Document ID: auto-generated
|
|
97
|
+
*/
|
|
98
|
+
export interface ExperimentDocument extends FirestoreDocument, Experiment {
|
|
99
|
+
/** Display order */
|
|
100
|
+
order: number;
|
|
101
|
+
/** Is experiment visible? */
|
|
102
|
+
visible: boolean;
|
|
103
|
+
/** Is experiment featured? */
|
|
104
|
+
featured?: boolean;
|
|
105
|
+
/** Optional thumbnail URL */
|
|
106
|
+
thumbnail?: string;
|
|
107
|
+
/** Optional description */
|
|
108
|
+
description?: string;
|
|
109
|
+
/** Optional technology tags */
|
|
110
|
+
tags?: string[];
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Firestore collection names
|
|
114
|
+
*/
|
|
115
|
+
export declare const FIRESTORE_COLLECTIONS: {
|
|
116
|
+
readonly CONFIG: "website-config";
|
|
117
|
+
readonly MENU: "website-menu";
|
|
118
|
+
readonly THEMES: "website-themes";
|
|
119
|
+
readonly PROJECTS: "website-projects";
|
|
120
|
+
readonly DEMOS: "website-demos";
|
|
121
|
+
readonly EXPERIMENTS: "website-experiments";
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Firestore document IDs for singleton documents
|
|
125
|
+
*/
|
|
126
|
+
export declare const FIRESTORE_DOCUMENT_IDS: {
|
|
127
|
+
readonly CONFIG_MAIN: "main";
|
|
128
|
+
readonly MENU_MAIN: "main";
|
|
129
|
+
readonly MENU_MOBILE: "mobile";
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=website-firestore.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"website-firestore.types.d.ts","sourceRoot":"","sources":["../src/website-firestore.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAMlF;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IAEd,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IAEpB,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IAEd,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEnC,mCAAmC;IACnC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEtC,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC,4BAA4B;IAC5B,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,iBAAiB;IACrD,iBAAiB;IACjB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAElB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;G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AAW,CAAC,EAAE,MAAM,CAAC;IAErB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAMD;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAOxB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Website Firestore Document Types
|
|
4
|
+
* Backend-only types that extend website types with Firestore metadata
|
|
5
|
+
*
|
|
6
|
+
* These types are used ONLY by backend/database code.
|
|
7
|
+
* Frontend should use the base types from website.types.ts
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.FIRESTORE_DOCUMENT_IDS = exports.FIRESTORE_COLLECTIONS = void 0;
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Constants
|
|
13
|
+
// ============================================================================
|
|
14
|
+
/**
|
|
15
|
+
* Firestore collection names
|
|
16
|
+
*/
|
|
17
|
+
exports.FIRESTORE_COLLECTIONS = {
|
|
18
|
+
CONFIG: 'website-config',
|
|
19
|
+
MENU: 'website-menu',
|
|
20
|
+
THEMES: 'website-themes',
|
|
21
|
+
PROJECTS: 'website-projects',
|
|
22
|
+
DEMOS: 'website-demos',
|
|
23
|
+
EXPERIMENTS: 'website-experiments',
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Firestore document IDs for singleton documents
|
|
27
|
+
*/
|
|
28
|
+
exports.FIRESTORE_DOCUMENT_IDS = {
|
|
29
|
+
CONFIG_MAIN: 'main',
|
|
30
|
+
MENU_MAIN: 'main',
|
|
31
|
+
MENU_MOBILE: 'mobile',
|
|
32
|
+
};
|