@pixelated-tech/components 3.3.5 → 3.3.6

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.md CHANGED
@@ -301,8 +301,7 @@ npm run storybook
301
301
  - [ ] **Project Scaffolding CLI**: Interactive CLI tool that generates complete Next.js projects with pixelated-components pre-configured, including routes.json, layout.tsx, package.json, and basic page structure
302
302
  - [ ] **Template Marketplace**: Pre-built industry-specific templates (restaurant, law firm, contractor, etc.) that users can clone and customize
303
303
  - [ ] **Configuration Wizard**: Step-by-step setup wizard that collects business info, generates site configuration, and creates initial content structure
304
- - [ ] **Centralized Site Manager**: Web dashboard for managing multiple pixelated sites, with bulk updates, version control, and deployment status monitoring
305
- - [ ] **Site Health Monitoring**: Automated monitoring dashboard that checks site performance, broken links, SEO scores, and security vulnerabilities across all sites
304
+ - [ IP ] **Site Health Monitoring**: Automated monitoring dashboard that checks site performance, broken links, SEO scores, and security vulnerabilities across all sites
306
305
  - [ ] **Content Migration Tools**: Automated importers for WordPress, Squarespace, Wix, and other platforms to migrate content to pixelated sites
307
306
  - [ ] **A/B Testing Framework**: Built-in experimentation system for testing different layouts, content, and CTAs with automatic winner selection
308
307
  - [ ] **Personalization Engine**: Dynamic content delivery based on user behavior, location, and preferences
@@ -25,9 +25,9 @@ HubSpotForm.propTypes = {
25
25
  };
26
26
  export function HubSpotForm({ region, portalId, formId, target, containerId = 'hubspot-form-container' }) {
27
27
  const config = usePixelatedConfig();
28
- const finalRegion = region || config.hubspot?.region || 'na1';
29
- const finalPortalId = portalId || config.hubspot?.portalId || '';
30
- const finalFormId = formId || config.hubspot?.formId || '';
28
+ const finalRegion = region || config?.hubspot?.region || 'na1';
29
+ const finalPortalId = portalId || config?.hubspot?.portalId || '';
30
+ const finalFormId = formId || config?.hubspot?.formId || '';
31
31
  const formTarget = target || `#${containerId}`;
32
32
  useEffect(() => {
33
33
  const createHubspotForm = () => {
@@ -12,18 +12,29 @@ export const PixelatedClientConfigProvider = ({ config, children, }) => {
12
12
  export const usePixelatedConfig = () => {
13
13
  const ctx = React.useContext(PixelatedConfigContext);
14
14
  if (!ctx) {
15
- // Always throw error when provider is missing (consistent across dev/prod)
16
- // Previously had environment-specific behavior:
17
- // if (process.env.NODE_ENV !== 'production') {
18
- // throw new Error('PixelatedClientConfigProvider not found. Wrap your app with PixelatedClientConfigProvider.');
19
- // }
20
- // // In production return an empty object typed as PixelatedConfig to avoid runtime crashes
21
- // return {} as PixelatedConfig;
22
- throw new Error('PixelatedClientConfigProvider not found. Wrap your app with PixelatedClientConfigProvider.');
15
+ // Get calling function name from stack trace
16
+ let caller = 'unknown component';
17
+ try {
18
+ const error = new Error();
19
+ const stack = error.stack?.split('\n')[2]; // Get the caller line
20
+ if (stack) {
21
+ const match = stack.match(/at\s+([^\s(]+)/);
22
+ if (match && match[1]) {
23
+ caller = match[1].replace(/^use/, '').toLowerCase(); // Remove 'use' prefix and lowercase
24
+ }
25
+ }
26
+ }
27
+ catch {
28
+ // Ignore errors in stack parsing
29
+ }
30
+ // Log warning when provider is missing but continue gracefully
31
+ console.warn(`PixelatedClientConfigProvider not found when called by ${caller}. Some components may not work as expected. Wrap your app with PixelatedClientConfigProvider for full functionality.`);
32
+ return null;
23
33
  }
24
- // Also throw if config is empty (no environment config loaded)
34
+ // Also return null if config is empty (no environment config loaded)
25
35
  if (Object.keys(ctx).length === 0) {
26
- throw new Error('Pixelated config is empty. Check that PIXELATED_CONFIG_JSON or PIXELATED_CONFIG_B64 environment variables are set.');
36
+ console.warn('Pixelated config is empty. Check that PIXELATED_CONFIG_JSON or PIXELATED_CONFIG_B64 environment variables are set.');
37
+ return null;
27
38
  }
28
39
  return ctx;
29
40
  };
@@ -18,6 +18,7 @@ Table.propTypes = {
18
18
  data: PropTypes.array.isRequired,
19
19
  id: PropTypes.string.isRequired,
20
20
  sortable: PropTypes.bool,
21
+ altRowColor: PropTypes.string,
21
22
  };
22
23
  export function Table(props) {
23
24
  const [tableData, setTableData] = useState(props.data);
@@ -31,7 +32,8 @@ export function Table(props) {
31
32
  }
32
33
  function getRows(data) {
33
34
  return data.map((obj, i) => {
34
- return _jsx("tr", { children: getCells(obj) }, i);
35
+ const rowStyle = (props.altRowColor && i % 2 === 1) ? { backgroundColor: props.altRowColor } : {};
36
+ return _jsx("tr", { style: rowStyle, children: getCells(obj) }, i);
35
37
  });
36
38
  }
37
39
  function getCells(obj) {
@@ -19,8 +19,7 @@ export function GoogleAnalytics(props) {
19
19
  const id = props.id || config?.googleAnalytics?.id;
20
20
  const adId = config?.googleAnalytics?.adId;
21
21
  if (!id) {
22
- console.warn('Google Analytics ID not provided. Set id prop or googleAnalytics.id in config.');
23
- return null;
22
+ throw new Error('Google Analytics ID not provided. Set id prop or ensure PixelatedServerConfigProvider is configured with googleAnalytics.id.');
24
23
  }
25
24
  if (typeof window === 'undefined') {
26
25
  return;
@@ -8,6 +8,5 @@ export declare const PixelatedClientConfigProvider: ({ config, children, }: {
8
8
  * Hook to get the Pixelated config. This throws in development when the provider is missing to
9
9
  * make misconfiguration obvious. If you prefer a non-throwing variant use `useOptionalPixelatedConfig`.
10
10
  */
11
- export declare const usePixelatedConfig: () => PixelatedConfig;
12
- /** Non-throwing hook — returns null when provider not present */
11
+ export declare const usePixelatedConfig: () => PixelatedConfig | null;
13
12
  //# sourceMappingURL=config.client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.client.d.ts","sourceRoot":"","sources":["../../../../src/components/config/config.client.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,eAAO,MAAM,6BAA6B,GAAI,uBAG3C;IACD,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,4CAEA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAO,eAiBrC,CAAC;AAEF,iEAAiE"}
1
+ {"version":3,"file":"config.client.d.ts","sourceRoot":"","sources":["../../../../src/components/config/config.client.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAItD,eAAO,MAAM,6BAA6B,GAAI,uBAG3C;IACD,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,4CAEA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAO,eAAe,GAAG,IA4BvD,CAAC"}
@@ -7,6 +7,7 @@ export declare namespace Table {
7
7
  data: PropTypes.Validator<any[]>;
8
8
  id: PropTypes.Validator<string>;
9
9
  sortable: PropTypes.Requireable<boolean>;
10
+ altRowColor: PropTypes.Requireable<string>;
10
11
  };
11
12
  }
12
13
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/components/general/table.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,aAAa,CAAC;AAarB,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC;AAC3D,wBAAgB,KAAK,CAAE,KAAK,EAAE,SAAS,2CAqGtC;yBArGe,KAAK"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/components/general/table.tsx"],"names":[],"mappings":"AACA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,aAAa,CAAC;AAcrB,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,SAAS,CAAC,CAAC;AAC3D,wBAAgB,KAAK,CAAE,KAAK,EAAE,SAAS,2CAsGtC;yBAtGe,KAAK"}
@@ -6,7 +6,7 @@ declare global {
6
6
  }
7
7
  }
8
8
  export type GoogleAnalyticsType = InferProps<typeof GoogleAnalytics.propTypes>;
9
- export declare function GoogleAnalytics(props: GoogleAnalyticsType): import("react/jsx-runtime").JSX.Element | null | undefined;
9
+ export declare function GoogleAnalytics(props: GoogleAnalyticsType): import("react/jsx-runtime").JSX.Element | undefined;
10
10
  export declare namespace GoogleAnalytics {
11
11
  var propTypes: {
12
12
  id: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"googleanalytics.d.ts","sourceRoot":"","sources":["../../../../src/components/seo/googleanalytics.tsx"],"names":[],"mappings":"AAIA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAanD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KAChC;CACD;AAiBD,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;AAC/E,wBAAgB,eAAe,CAAE,KAAK,EAAE,mBAAmB,8DAuC1D;yBAvCe,eAAe;;;;;AA+C/B,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,SAAS,CAAC,CAAC;AACzF,wBAAgB,oBAAoB,CAAE,KAAK,EAAE,wBAAwB,oBAYpE;yBAZe,oBAAoB"}
1
+ {"version":3,"file":"googleanalytics.d.ts","sourceRoot":"","sources":["../../../../src/components/seo/googleanalytics.tsx"],"names":[],"mappings":"AAIA,OAAO,SAAS,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAanD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KAChC;CACD;AAiBD,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,CAAC;AAC/E,wBAAgB,eAAe,CAAE,KAAK,EAAE,mBAAmB,uDAsC1D;yBAtCe,eAAe;;;;;AA8C/B,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,SAAS,CAAC,CAAC;AACzF,wBAAgB,oBAAoB,CAAE,KAAK,EAAE,wBAAwB,oBAYpE;yBAZe,oBAAoB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixelated-tech/components",
3
- "version": "3.3.5",
3
+ "version": "3.3.6",
4
4
  "private": false,
5
5
  "author": {
6
6
  "name": "Pixelated Technologies",
@@ -123,7 +123,7 @@
123
123
  "eslint-plugin-storybook": "^10.1.10",
124
124
  "file-loader": "^6.2.0",
125
125
  "happy-dom": "^20.0.11",
126
- "jsdom": "^27.3.0",
126
+ "jsdom": "^27.4.0",
127
127
  "less-loader": "^12.3.0",
128
128
  "mini-css-extract-plugin": "^2.9.4",
129
129
  "next": "^16.1.1",