@jhits/plugin-website 0.0.3 → 0.0.5

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/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "@jhits/plugin-website",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Website management and configuration plugin for the JHITS ecosystem",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "main": "./src/index.tsx",
9
- "types": "./src/index.tsx",
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
- "types": "./src/index.tsx",
13
- "default": "./src/index.tsx"
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
14
  },
15
15
  "./server": {
16
- "types": "./src/index.server.ts",
17
- "default": "./src/index.server.ts"
16
+ "types": "./dist/index.server.d.ts",
17
+ "default": "./dist/index.server.js"
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@jhits/plugin-core": "^0.0.1",
22
- "lucide-react": "^0.562.0",
23
- "mongodb": "^7.0.0",
21
+ "@jhits/plugin-core": "^0.0.2",
22
+ "lucide-react": "^0.564.0",
23
+ "mongodb": "^7.1.0",
24
24
  "next-auth": "^4.24.13",
25
25
  "react-icons": "^5.5.0"
26
26
  },
@@ -30,16 +30,20 @@
30
30
  "react-dom": ">=18.0.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/node": "^20.19.27",
34
- "@types/react": "^19",
35
- "@types/react-dom": "^19",
36
- "next": "16.1.1",
37
- "react": "19.2.3",
38
- "react-dom": "19.2.3",
39
- "typescript": "^5"
33
+ "@types/node": "^25.2.3",
34
+ "@types/react": "^19.2.14",
35
+ "@types/react-dom": "^19.2.3",
36
+ "next": "16.1.6",
37
+ "react": "19.2.4",
38
+ "react-dom": "19.2.4",
39
+ "typescript": "^5.9.3"
40
40
  },
41
41
  "files": [
42
+ "dist",
42
43
  "src",
43
44
  "package.json"
44
- ]
45
- }
45
+ ],
46
+ "scripts": {
47
+ "build": "tsc"
48
+ }
49
+ }
@@ -196,33 +196,33 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
196
196
  <div className="h-full w-full bg-dashboard-card text-dashboard-text flex items-center justify-center">
197
197
  <div className="text-center">
198
198
  <RefreshCw className="w-8 h-8 animate-spin text-primary mx-auto mb-4" />
199
- <p className="text-sm text-neutral-500 dark:text-neutral-400">Loading settings...</p>
199
+ <p className="text-sm text-dashboard-text-secondary">Loading settings...</p>
200
200
  </div>
201
201
  </div>
202
202
  );
203
203
  }
204
204
 
205
205
  return (
206
- <div className="h-full rounded-[2.5rem] w-full bg-dashboard-card text-dashboard-text overflow-y-auto">
207
- <div className="max-w-6xl mx-auto p-8">
206
+ <div className="h-full w-full rounded-[2.5rem] bg-dashboard-card p-8 overflow-y-auto">
207
+ <div className="max-w-6xl mx-auto">
208
208
  {/* Header */}
209
- <div className="flex items-center justify-between mb-8">
209
+ <div className="flex flex-col md:flex-row md:items-center justify-between gap-6 mb-8">
210
210
  <div>
211
- <h1 className="text-3xl font-black text-neutral-950 dark:text-white uppercase tracking-tighter mb-2">
211
+ <h1 className="text-3xl font-black text-dashboard-text uppercase tracking-tighter mb-2">
212
212
  Website Settings
213
213
  </h1>
214
- <p className="text-sm text-neutral-500 dark:text-neutral-400">
214
+ <p className="text-sm text-dashboard-text-secondary">
215
215
  Manage your website identity, contact information, and social links
216
216
  </p>
217
217
  </div>
218
218
  <button
219
219
  onClick={handleSave}
220
220
  disabled={isSaving}
221
- className={`inline-flex items-center gap-2 px-6 py-3 rounded-full text-[10px] font-black uppercase tracking-widest transition-all shadow-lg ${isSaving
222
- ? 'bg-neutral-400 text-white cursor-not-allowed'
223
- : showSuccess
224
- ? 'bg-green-600 text-white'
225
- : 'bg-primary text-white hover:bg-primary/90'
221
+ className={`inline-flex items-center gap-2 px-6 py-3 rounded-full text-[10px] font-black uppercase tracking-widest transition-all shadow-lg shadow-primary/20 ${isSaving
222
+ ? 'bg-neutral-400 text-white cursor-not-allowed'
223
+ : showSuccess
224
+ ? 'bg-green-600 text-white'
225
+ : 'bg-primary text-white hover:bg-primary/90'
226
226
  }`}
227
227
  >
228
228
  {isSaving ? (
@@ -248,14 +248,14 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
248
248
  {/* Main Content */}
249
249
  <div className="lg:col-span-2 space-y-8">
250
250
  {/* SEO & Website Identity */}
251
- <section className="bg-dashboard-sidebar p-8 rounded-3xl border border-dashboard-border">
252
- <div className="flex items-center gap-2 font-bold text-neutral-950 dark:text-white border-b border-dashboard-border pb-4 mb-6">
251
+ <section className="bg-dashboard-bg p-8 rounded-3xl border border-dashboard-border">
252
+ <div className="flex items-center gap-2 font-bold text-dashboard-text border-b border-dashboard-border pb-4 mb-6">
253
253
  <Search size={20} className="text-primary" />
254
254
  Website Identity & SEO
255
255
  </div>
256
256
  <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
257
257
  <div className="space-y-2">
258
- <label className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-widest">
258
+ <label className="text-xs font-bold text-dashboard-text-secondary uppercase tracking-widest">
259
259
  Website Name
260
260
  </label>
261
261
  <input
@@ -267,7 +267,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
267
267
  />
268
268
  </div>
269
269
  <div className="space-y-2">
270
- <label className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-widest">
270
+ <label className="text-xs font-bold text-dashboard-text-secondary uppercase tracking-widest">
271
271
  Website Tagline
272
272
  </label>
273
273
  <input
@@ -280,7 +280,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
280
280
  </div>
281
281
  </div>
282
282
  <div className="mt-6 space-y-2">
283
- <label className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-widest">
283
+ <label className="text-xs font-bold text-dashboard-text-secondary uppercase tracking-widest">
284
284
  Website Description
285
285
  </label>
286
286
  <textarea
@@ -292,7 +292,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
292
292
  />
293
293
  </div>
294
294
  <div className="mt-6 space-y-2">
295
- <label className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-widest">
295
+ <label className="text-xs font-bold text-dashboard-text-secondary uppercase tracking-widest">
296
296
  Keywords (comma-separated)
297
297
  </label>
298
298
  <input
@@ -306,14 +306,14 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
306
306
  </section>
307
307
 
308
308
  {/* Contact Information */}
309
- <section className="bg-dashboard-sidebar p-8 rounded-3xl border border-dashboard-border">
310
- <div className="flex items-center gap-2 font-bold text-neutral-950 dark:text-white border-b border-dashboard-border pb-4 mb-6">
309
+ <section className="bg-dashboard-bg p-8 rounded-3xl border border-dashboard-border">
310
+ <div className="flex items-center gap-2 font-bold text-dashboard-text border-b border-dashboard-border pb-4 mb-6">
311
311
  <Mail size={20} className="text-primary" />
312
312
  Contact Information
313
313
  </div>
314
314
  <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
315
315
  <div className="space-y-2">
316
- <label className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-widest">
316
+ <label className="text-xs font-bold text-dashboard-text-secondary uppercase tracking-widest">
317
317
  Contact Email
318
318
  </label>
319
319
  <input
@@ -325,7 +325,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
325
325
  />
326
326
  </div>
327
327
  <div className="space-y-2">
328
- <label className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-widest">
328
+ <label className="text-xs font-bold text-dashboard-text-secondary uppercase tracking-widest">
329
329
  Phone Number
330
330
  </label>
331
331
  <input
@@ -338,7 +338,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
338
338
  </div>
339
339
  </div>
340
340
  <div className="mt-6 space-y-2">
341
- <label className="text-xs font-bold text-neutral-500 dark:text-neutral-400 uppercase tracking-widest">
341
+ <label className="text-xs font-bold text-dashboard-text-secondary uppercase tracking-widest">
342
342
  Physical Address
343
343
  </label>
344
344
  <textarea
@@ -352,9 +352,9 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
352
352
  </section>
353
353
 
354
354
  {/* Social Links */}
355
- <section className="bg-dashboard-sidebar p-8 rounded-3xl border border-dashboard-border">
355
+ <section className="bg-dashboard-bg p-8 rounded-3xl border border-dashboard-border">
356
356
  <div className="flex items-center justify-between border-b border-dashboard-border pb-4 mb-6">
357
- <div className="flex items-center gap-2 font-bold text-neutral-950 dark:text-white">
357
+ <div className="flex items-center gap-2 font-bold text-dashboard-text">
358
358
  <Globe size={20} className="text-primary" />
359
359
  Social Links
360
360
  </div>
@@ -371,13 +371,13 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
371
371
  const platform = AVAILABLE_PLATFORMS.find(p => p.name === social.platform);
372
372
  return (
373
373
  <div key={social.id} className="flex items-center gap-4 p-4 bg-dashboard-card rounded-2xl border border-dashboard-border">
374
- <div className="flex-shrink-0 text-neutral-500 dark:text-neutral-400">
374
+ <div className="flex-shrink-0 text-dashboard-text-secondary">
375
375
  {platform?.icon || <Globe size={18} />}
376
376
  </div>
377
377
  <select
378
378
  value={social.platform}
379
379
  onChange={(e) => handleUpdateSocial(social.id, 'platform', e.target.value)}
380
- className="flex-1 px-4 py-2 bg-dashboard-sidebar border border-dashboard-border rounded-xl outline-none focus:ring-2 focus:ring-primary text-dashboard-text"
380
+ className="flex-1 px-4 py-2 bg-dashboard-bg border border-dashboard-border rounded-xl outline-none focus:ring-2 focus:ring-primary text-dashboard-text"
381
381
  >
382
382
  <option value="">Select Platform</option>
383
383
  {AVAILABLE_PLATFORMS.map(p => (
@@ -389,7 +389,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
389
389
  value={social.url}
390
390
  onChange={(e) => handleUpdateSocial(social.id, 'url', e.target.value)}
391
391
  placeholder="https://..."
392
- className="flex-1 px-4 py-2 bg-dashboard-sidebar border border-dashboard-border rounded-xl outline-none focus:ring-2 focus:ring-primary text-dashboard-text"
392
+ className="flex-1 px-4 py-2 bg-dashboard-bg border border-dashboard-border rounded-xl outline-none focus:ring-2 focus:ring-primary text-dashboard-text"
393
393
  />
394
394
  <button
395
395
  onClick={() => handleRemoveSocial(social.id)}
@@ -401,7 +401,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
401
401
  );
402
402
  })
403
403
  ) : (
404
- <p className="text-sm text-neutral-500 dark:text-neutral-400 text-center py-8">
404
+ <p className="text-sm text-dashboard-text-secondary text-center py-8">
405
405
  No social links added yet. Click "Add Social" to get started.
406
406
  </p>
407
407
  )}
@@ -412,40 +412,41 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
412
412
  {/* Sidebar */}
413
413
  <div className="space-y-8">
414
414
  {/* Maintenance Mode */}
415
- <section className="bg-dashboard-sidebar p-6 rounded-3xl border border-dashboard-border">
416
- <div className="flex items-center gap-2 font-bold text-neutral-950 dark:text-white border-b border-dashboard-border pb-4 mb-6">
415
+ <section className="bg-dashboard-bg p-6 rounded-3xl border border-dashboard-border">
416
+ <div className="flex items-center gap-2 font-bold text-dashboard-text border-b border-dashboard-border pb-4 mb-6">
417
417
  <Settings2 size={18} className="text-primary" />
418
418
  Maintenance
419
419
  </div>
420
420
  <div className="flex items-center justify-between">
421
421
  <div>
422
- <label className="text-xs font-bold text-neutral-700 dark:text-neutral-300 block mb-1">
422
+ <label className="text-xs font-bold text-dashboard-text block mb-1">
423
423
  Maintenance Mode
424
424
  </label>
425
- <p className="text-[10px] text-neutral-500 dark:text-neutral-400">
425
+ <p className="text-[10px] text-dashboard-text-secondary">
426
426
  Show maintenance page to visitors
427
427
  </p>
428
428
  </div>
429
429
  <button
430
430
  onClick={() => setSettings({ ...settings, maintenanceMode: !settings.maintenanceMode })}
431
- className={`relative w-12 h-6 rounded-full transition-colors ${settings.maintenanceMode ? 'bg-primary' : 'bg-neutral-300 dark:bg-neutral-700'
431
+ className={`relative w-12 h-6 rounded-full transition-colors ${settings.maintenanceMode ? 'bg-primary' : 'bg-neutral-200 dark:bg-neutral-700'
432
432
  }`}
433
433
  >
434
- <div className={`absolute top-1 left-1 w-4 h-4 bg-white rounded-full transition-transform ${settings.maintenanceMode ? 'translate-x-6' : 'translate-x-0'
435
- }`} />
434
+ <div
435
+ className={`absolute top-1 left-1 w-4 h-4 bg-white rounded-full transition-transform duration-200 ${settings.maintenanceMode ? 'translate-x-6' : 'translate-x-0'}`}
436
+ />
436
437
  </button>
437
438
  </div>
438
439
  </section>
439
440
 
440
441
  {/* Launch Date */}
441
- <section className="bg-dashboard-sidebar p-6 rounded-3xl border border-dashboard-border">
442
- <div className="flex items-center gap-2 font-bold text-neutral-950 dark:text-white border-b border-dashboard-border pb-4 mb-6">
442
+ <section className="bg-dashboard-bg p-6 rounded-3xl border border-dashboard-border">
443
+ <div className="flex items-center gap-2 font-bold text-dashboard-text border-b border-dashboard-border pb-4 mb-6">
443
444
  <Calendar size={18} className="text-primary" />
444
445
  Launch Date
445
446
  </div>
446
447
  <div className="space-y-4">
447
448
  <div className="space-y-2">
448
- <label className="text-xs font-bold text-neutral-700 dark:text-neutral-300 block">
449
+ <label className="text-xs font-bold text-dashboard-text block">
449
450
  Date
450
451
  </label>
451
452
  <input
@@ -474,7 +475,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
474
475
  />
475
476
  </div>
476
477
  <div className="space-y-2">
477
- <label className="text-xs font-bold text-neutral-700 dark:text-neutral-300 block">
478
+ <label className="text-xs font-bold text-dashboard-text block">
478
479
  Time (24-hour format)
479
480
  </label>
480
481
  <input
@@ -505,7 +506,7 @@ export function SettingsView({ siteId, locale }: SettingsViewProps) {
505
506
  className="w-full px-4 py-2 bg-dashboard-card border border-dashboard-border rounded-xl outline-none focus:ring-2 focus:ring-primary text-dashboard-text"
506
507
  />
507
508
  </div>
508
- <p className="text-[10px] text-neutral-500 dark:text-neutral-400">
509
+ <p className="text-[10px] text-dashboard-text-secondary">
509
510
  Used for countdown timers. Time defaults to 00:00 if not specified.
510
511
  </p>
511
512
  </div>