@pixelated-tech/components 3.3.5 → 3.4.0
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/README.COMPONENTS.md +126 -0
- package/README.md +15 -9
- package/dist/components/admin/componentusage/componentAnalysis.js +144 -0
- package/dist/components/admin/componentusage/componentDiscovery.js +85 -0
- package/dist/components/admin/deploy/deployment.integration.js +170 -0
- package/dist/components/admin/site-health/google-api-auth.js +69 -0
- package/dist/components/admin/site-health/seo-metrics.config.json +265 -0
- package/dist/components/admin/site-health/site-health-accessibility.js +158 -0
- package/dist/components/admin/site-health/site-health-axe-core.integration.js +119 -0
- package/dist/components/admin/site-health/site-health-axe-core.js +53 -0
- package/dist/components/admin/site-health/site-health-cache.js +23 -0
- package/dist/components/admin/site-health/site-health-core-web-vitals.integration.js +208 -0
- package/dist/components/admin/site-health/site-health-dependency-vulnerabilities.js +38 -0
- package/dist/components/admin/site-health/site-health-github.integration.js +81 -0
- package/dist/components/admin/site-health/site-health-github.js +34 -0
- package/dist/components/admin/site-health/site-health-google-analytics.integration.js +112 -0
- package/dist/components/admin/site-health/site-health-google-analytics.js +43 -0
- package/dist/components/admin/site-health/site-health-google-search-console.integration.js +118 -0
- package/dist/components/admin/site-health/site-health-google-search-console.js +43 -0
- package/dist/components/admin/site-health/site-health-indicators.js +71 -0
- package/dist/components/admin/site-health/site-health-on-site-seo.integration.js +578 -0
- package/dist/components/admin/site-health/site-health-on-site-seo.js +204 -0
- package/dist/components/admin/site-health/site-health-overview.js +65 -0
- package/dist/components/admin/site-health/site-health-performance.js +191 -0
- package/dist/components/admin/site-health/site-health-security.integration.js +109 -0
- package/dist/components/admin/site-health/site-health-security.js +169 -0
- package/dist/components/admin/site-health/site-health-seo.js +124 -0
- package/dist/components/admin/site-health/site-health-template.js +62 -0
- package/dist/components/admin/site-health/site-health-types.js +1 -0
- package/dist/components/admin/site-health/site-health-uptime.integration.js +29 -0
- package/dist/components/admin/site-health/site-health-uptime.js +30 -0
- package/dist/components/admin/site-health/site-health.css +427 -0
- package/dist/components/admin/sites/sites.integration.js +117 -0
- package/dist/components/cms/contentful.management.js +104 -0
- package/dist/components/cms/hubspot.components.js +3 -3
- package/dist/components/config/config.client.js +21 -10
- package/dist/components/general/table.js +3 -1
- package/dist/components/seo/googleanalytics.js +1 -2
- package/dist/components/shoppingcart/shipping.from.json +101 -0
- package/dist/components/shoppingcart/shipping.parcel.json +112 -0
- package/dist/components/shoppingcart/shipping.to.json +422 -0
- package/dist/components/shoppingcart/shoppingCartDiscountCodes.json +26 -0
- package/dist/components/shoppingcart/shoppingcart.components.js +1 -1
- package/dist/components/sitebuilder/config/ConfigBuilder.js +36 -140
- package/dist/components/sitebuilder/config/siteinfo-form.json +200 -0
- package/dist/components/sitebuilder/config/visualdesignform.json +244 -0
- package/dist/components/structured/buzzwordbingo.js +3 -2
- package/dist/data/404-data.json +128 -102
- package/dist/data/flickr.json +25 -0
- package/dist/data/form.json +368 -368
- package/dist/data/recipes.json +3251 -3251
- package/dist/data/references.json +138 -137
- package/dist/data/requestform.json +111 -0
- package/dist/data/requests.json +136 -135
- package/dist/data/resume.json +2573 -2575
- package/dist/data/routes.json +238 -238
- package/dist/data/routes2.json +141 -140
- package/dist/index.js +16 -3
- package/dist/index.server.js +36 -15
- package/dist/types/components/admin/componentusage/componentAnalysis.d.ts +35 -0
- package/dist/types/components/admin/componentusage/componentAnalysis.d.ts.map +1 -0
- package/dist/types/components/admin/componentusage/componentDiscovery.d.ts +10 -0
- package/dist/types/components/admin/componentusage/componentDiscovery.d.ts.map +1 -0
- package/dist/types/components/admin/deploy/deployment.integration.d.ts +26 -0
- package/dist/types/components/admin/deploy/deployment.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/google-api-auth.d.ts +37 -0
- package/dist/types/components/admin/site-health/google-api-auth.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-accessibility.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-accessibility.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-axe-core.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-axe-core.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-axe-core.integration.d.ts +63 -0
- package/dist/types/components/admin/site-health/site-health-axe-core.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-cache.d.ts +12 -0
- package/dist/types/components/admin/site-health/site-health-cache.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-core-web-vitals.integration.d.ts +3 -0
- package/dist/types/components/admin/site-health/site-health-core-web-vitals.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-dependency-vulnerabilities.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-dependency-vulnerabilities.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-github.d.ts +8 -0
- package/dist/types/components/admin/site-health/site-health-github.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-github.integration.d.ts +26 -0
- package/dist/types/components/admin/site-health/site-health-github.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-google-analytics.d.ts +8 -0
- package/dist/types/components/admin/site-health/site-health-google-analytics.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-google-analytics.integration.d.ts +26 -0
- package/dist/types/components/admin/site-health/site-health-google-analytics.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-google-search-console.d.ts +8 -0
- package/dist/types/components/admin/site-health/site-health-google-search-console.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-google-search-console.integration.d.ts +46 -0
- package/dist/types/components/admin/site-health/site-health-google-search-console.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-indicators.d.ts +73 -0
- package/dist/types/components/admin/site-health/site-health-indicators.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-on-site-seo.d.ts +4 -0
- package/dist/types/components/admin/site-health/site-health-on-site-seo.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-on-site-seo.integration.d.ts +34 -0
- package/dist/types/components/admin/site-health/site-health-on-site-seo.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-overview.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-overview.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-performance.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-performance.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-security.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-security.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-security.integration.d.ts +29 -0
- package/dist/types/components/admin/site-health/site-health-security.integration.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-seo.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-seo.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-template.d.ts +12 -0
- package/dist/types/components/admin/site-health/site-health-template.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-types.d.ts +186 -0
- package/dist/types/components/admin/site-health/site-health-types.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-uptime.d.ts +6 -0
- package/dist/types/components/admin/site-health/site-health-uptime.d.ts.map +1 -0
- package/dist/types/components/admin/site-health/site-health-uptime.integration.d.ts +10 -0
- package/dist/types/components/admin/site-health/site-health-uptime.integration.d.ts.map +1 -0
- package/dist/types/components/admin/sites/sites.integration.d.ts +40 -0
- package/dist/types/components/admin/sites/sites.integration.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.management.d.ts +41 -0
- package/dist/types/components/cms/contentful.management.d.ts.map +1 -1
- package/dist/types/components/config/config.client.d.ts +1 -2
- package/dist/types/components/config/config.client.d.ts.map +1 -1
- package/dist/types/components/general/table.d.ts +1 -0
- package/dist/types/components/general/table.d.ts.map +1 -1
- package/dist/types/components/seo/googleanalytics.d.ts +1 -1
- package/dist/types/components/seo/googleanalytics.d.ts.map +1 -1
- package/dist/types/components/sitebuilder/config/ConfigBuilder.d.ts +4 -4
- package/dist/types/components/sitebuilder/config/ConfigBuilder.d.ts.map +1 -1
- package/dist/types/components/structured/buzzwordbingo.d.ts +1 -1
- package/dist/types/components/structured/buzzwordbingo.d.ts.map +1 -1
- package/dist/types/components/structured/buzzwordbingo.words.d.ts +2 -0
- package/dist/types/components/structured/buzzwordbingo.words.d.ts.map +1 -0
- package/dist/types/index.d.ts +16 -3
- package/dist/types/index.server.d.ts +36 -13
- package/dist/types/stories/admin/preview.d.ts +12 -0
- package/dist/types/stories/admin/preview.d.ts.map +1 -0
- package/dist/types/stories/admin/site-health.stories.d.ts +65 -0
- package/dist/types/stories/admin/site-health.stories.d.ts.map +1 -0
- package/dist/types/stories/structured/buzzword-bingo.stories.d.ts +1 -1
- package/dist/types/stories/structured/buzzword-bingo.stories.d.ts.map +1 -1
- package/dist/types/tests/site-health-axe-core.test.d.ts +2 -0
- package/dist/types/tests/site-health-axe-core.test.d.ts.map +1 -0
- package/dist/types/tests/site-health-cache.test.d.ts +2 -0
- package/dist/types/tests/site-health-cache.test.d.ts.map +1 -0
- package/dist/types/tests/site-health-indicators.test.d.ts +2 -0
- package/dist/types/tests/site-health-indicators.test.d.ts.map +1 -0
- package/dist/types/tests/site-health-overview.test.d.ts +2 -0
- package/dist/types/tests/site-health-overview.test.d.ts.map +1 -0
- package/dist/types/tests/site-health-template.test.d.ts +2 -0
- package/dist/types/tests/site-health-template.test.d.ts.map +1 -0
- package/dist/types/tests/sites.integration.test.d.ts +2 -0
- package/dist/types/tests/sites.integration.test.d.ts.map +1 -0
- package/package.json +15 -9
- package/dist/data/shipping.to.json +0 -422
- package/dist/data/siteinfo-form.json +0 -200
- package/dist/data/visualdesignform.json +0 -244
- package/dist/types/data/buzzwords.d.ts +0 -2
- package/dist/types/data/buzzwords.d.ts.map +0 -1
- /package/dist/{data/buzzwords.js → components/structured/buzzwordbingo.words.js} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ComposedChart, Bar, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';
|
|
4
|
+
import { SiteHealthTemplate } from './site-health-template';
|
|
5
|
+
export function SiteHealthGoogleSearchConsole({ siteName, startDate, endDate }) {
|
|
6
|
+
const fetchSearchConsoleData = async (site) => {
|
|
7
|
+
const params = new URLSearchParams({ siteName: site });
|
|
8
|
+
if (startDate)
|
|
9
|
+
params.append('startDate', startDate);
|
|
10
|
+
if (endDate)
|
|
11
|
+
params.append('endDate', endDate);
|
|
12
|
+
const response = await fetch(`/api/site-health/google-search-console?${params.toString()}`);
|
|
13
|
+
if (!response.ok) {
|
|
14
|
+
throw new Error(`Failed to fetch search console data: ${response.status}`);
|
|
15
|
+
}
|
|
16
|
+
const result = await response.json();
|
|
17
|
+
if (!result.success) {
|
|
18
|
+
// Handle specific error types
|
|
19
|
+
if (result.error?.includes('invalid_grant') || result.error?.includes('authentication')) {
|
|
20
|
+
throw new Error('Google Search Console authentication expired. Please re-authorize the application.');
|
|
21
|
+
}
|
|
22
|
+
else if (result.error?.includes('GSC Site URL not configured')) {
|
|
23
|
+
throw new Error('GSC Site URL not configured for this site');
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
throw new Error(result.error || 'Failed to load search console data');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return result.data;
|
|
30
|
+
};
|
|
31
|
+
return (_jsx(SiteHealthTemplate, { siteName: siteName, title: "Google Search Console", columnSpan: 2, fetchData: fetchSearchConsoleData, children: (data) => {
|
|
32
|
+
if (!data || data.length === 0) {
|
|
33
|
+
return (_jsx("div", { className: "flex items-center justify-center h-64", children: _jsx("div", { className: "text-gray-500", children: "No indexing data available for the selected date range" }) }));
|
|
34
|
+
}
|
|
35
|
+
return (_jsx("div", { children: _jsx("div", { style: { width: '100%', height: '400px', border: '1px solid #ddd' }, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(ComposedChart, { data: data, margin: { top: 40, right: 30, left: 20, bottom: 5 }, children: [_jsx("text", { x: "50%", y: 20, textAnchor: "middle", fontSize: "16", fontWeight: "bold", fill: "#374151", children: "Impressions vs Clicks (Current vs Previous Period)" }), _jsx(CartesianGrid, { strokeDasharray: "3 3" }), _jsx(XAxis, { dataKey: "date", tick: { fontSize: 12 }, angle: -45, textAnchor: "end", height: 60 }), _jsx(YAxis, { tick: { fontSize: 12 } }), _jsx(Tooltip, { formatter: (value, name) => [
|
|
36
|
+
value?.toLocaleString() || '0',
|
|
37
|
+
name || 'Unknown'
|
|
38
|
+
], labelFormatter: (label) => `Date: ${label}` }), _jsx(Legend, { wrapperStyle: {
|
|
39
|
+
fontSize: '12px',
|
|
40
|
+
paddingTop: '10px'
|
|
41
|
+
} }), _jsx(Bar, { dataKey: "currentImpressions", fill: "#3b82f6", name: "Current Impressions", radius: [2, 2, 0, 0] }), _jsx(Bar, { dataKey: "currentClicks", fill: "#10b981", name: "Current Clicks", radius: [2, 2, 0, 0] }), _jsx(Line, { type: "monotone", dataKey: "previousImpressions", stroke: "#ef4444", strokeWidth: 2, strokeDasharray: "5 5", dot: { fill: '#ef4444', strokeWidth: 2, r: 3 }, activeDot: { r: 5, stroke: '#ef4444', strokeWidth: 2 }, name: "Previous Impressions" }), _jsx(Line, { type: "monotone", dataKey: "previousClicks", stroke: "#f59e0b", strokeWidth: 2, strokeDasharray: "5 5", dot: { fill: '#f59e0b', strokeWidth: 2, r: 3 }, activeDot: { r: 5, stroke: '#f59e0b', strokeWidth: 2 }, name: "Previous Clicks" })] }) }) }) }));
|
|
42
|
+
} }));
|
|
43
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Shared constants and utilities for health card visual indicators
|
|
2
|
+
//
|
|
3
|
+
// USAGE:
|
|
4
|
+
// - SCORE_SCALE: For metrics with numerical scores (0-1 range like PageSpeed)
|
|
5
|
+
// - IMPACT_SCALE: For severity-based metrics (critical, serious, moderate, minor like axe-core)
|
|
6
|
+
// - getScoreIndicator(score): Returns {icon, color} for numerical scores
|
|
7
|
+
// - getImpactIndicator(impact): Returns {icon, color} for severity levels
|
|
8
|
+
// - getPassingIndicator(): Returns {icon, color} for successful/passing states
|
|
9
|
+
// - getIncompleteIndicator(): Returns {icon, color} for unknown/incomplete states
|
|
10
|
+
//
|
|
11
|
+
// EXAMPLE:
|
|
12
|
+
// import { getScoreIndicator, getImpactIndicator } from './health-indicators';
|
|
13
|
+
// const indicator = getScoreIndicator(0.85); // Returns {icon: '🟢', color: '#10b981'}
|
|
14
|
+
// const impact = getImpactIndicator('critical'); // Returns {icon: '🔴', color: '#dc2626'}
|
|
15
|
+
export const HEALTH_INDICATORS = {
|
|
16
|
+
CRITICAL: '🔴',
|
|
17
|
+
SERIOUS: '🟠',
|
|
18
|
+
MODERATE: '🟡',
|
|
19
|
+
MINOR: '⚪',
|
|
20
|
+
PASSING: '🟢',
|
|
21
|
+
UNKNOWN: '⚪'
|
|
22
|
+
};
|
|
23
|
+
export const HEALTH_COLORS = {
|
|
24
|
+
CRITICAL: '#dc2626', // red-600
|
|
25
|
+
SERIOUS: '#ea580c', // orange-600
|
|
26
|
+
MODERATE: '#d97706', // amber-600
|
|
27
|
+
MINOR: '#ca8a04', // yellow-600
|
|
28
|
+
PASSING: '#10b981', // emerald-500
|
|
29
|
+
UNKNOWN: '#6b7280' // gray-500
|
|
30
|
+
};
|
|
31
|
+
// Score-based scale (used by PageSpeed and similar metrics)
|
|
32
|
+
export const SCORE_SCALE = {
|
|
33
|
+
EXCELLENT: { min: 0.9, icon: HEALTH_INDICATORS.PASSING, color: HEALTH_COLORS.PASSING },
|
|
34
|
+
GOOD: { min: 0.7, icon: HEALTH_INDICATORS.MODERATE, color: HEALTH_COLORS.MODERATE },
|
|
35
|
+
NEEDS_IMPROVEMENT: { min: 0.5, icon: HEALTH_INDICATORS.SERIOUS, color: HEALTH_COLORS.SERIOUS },
|
|
36
|
+
POOR: { min: 0, icon: HEALTH_INDICATORS.CRITICAL, color: HEALTH_COLORS.CRITICAL }
|
|
37
|
+
};
|
|
38
|
+
// Impact-based scale (used by axe-core and similar tools)
|
|
39
|
+
export const IMPACT_SCALE = {
|
|
40
|
+
CRITICAL: { icon: HEALTH_INDICATORS.CRITICAL, color: HEALTH_COLORS.CRITICAL },
|
|
41
|
+
SERIOUS: { icon: HEALTH_INDICATORS.SERIOUS, color: HEALTH_COLORS.SERIOUS },
|
|
42
|
+
MODERATE: { icon: HEALTH_INDICATORS.MODERATE, color: HEALTH_COLORS.MODERATE },
|
|
43
|
+
MINOR: { icon: HEALTH_INDICATORS.MINOR, color: HEALTH_COLORS.MINOR }
|
|
44
|
+
};
|
|
45
|
+
// Utility functions
|
|
46
|
+
export function getScoreIndicator(score) {
|
|
47
|
+
if (score === null)
|
|
48
|
+
return { icon: HEALTH_INDICATORS.UNKNOWN, color: HEALTH_COLORS.UNKNOWN };
|
|
49
|
+
if (score >= SCORE_SCALE.EXCELLENT.min)
|
|
50
|
+
return SCORE_SCALE.EXCELLENT;
|
|
51
|
+
if (score >= SCORE_SCALE.GOOD.min)
|
|
52
|
+
return SCORE_SCALE.GOOD;
|
|
53
|
+
if (score >= SCORE_SCALE.NEEDS_IMPROVEMENT.min)
|
|
54
|
+
return SCORE_SCALE.NEEDS_IMPROVEMENT;
|
|
55
|
+
return SCORE_SCALE.POOR;
|
|
56
|
+
}
|
|
57
|
+
export function getImpactIndicator(impact) {
|
|
58
|
+
switch (impact.toLowerCase()) {
|
|
59
|
+
case 'critical': return IMPACT_SCALE.CRITICAL;
|
|
60
|
+
case 'serious': return IMPACT_SCALE.SERIOUS;
|
|
61
|
+
case 'moderate': return IMPACT_SCALE.MODERATE;
|
|
62
|
+
case 'minor': return IMPACT_SCALE.MINOR;
|
|
63
|
+
default: return { icon: HEALTH_INDICATORS.UNKNOWN, color: HEALTH_COLORS.UNKNOWN };
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function getPassingIndicator() {
|
|
67
|
+
return { icon: HEALTH_INDICATORS.PASSING, color: HEALTH_COLORS.PASSING };
|
|
68
|
+
}
|
|
69
|
+
export function getIncompleteIndicator() {
|
|
70
|
+
return { icon: HEALTH_INDICATORS.UNKNOWN, color: HEALTH_COLORS.UNKNOWN };
|
|
71
|
+
}
|