@press2ai/theme-therapy-soft 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@press2ai/theme-therapy-soft",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Warm sage/beige classless theme for therapy verticals. Crimson Text serif + Inter. Structurally compatible with @press2ai/engine TrenerTheme.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,6 +24,10 @@
24
24
  "exports": {
25
25
  ".": "./src/index.ts",
26
26
  "./templates": "./src/templates/index.ts",
27
- "./styles": "./src/styles/index.ts"
27
+ "./styles": "./src/styles/index.ts",
28
+ "./ai": "./src/ai.ts"
29
+ },
30
+ "peerDependencies": {
31
+ "@press2ai/engine": ">=0.4.3"
28
32
  }
29
33
  }
package/src/ai.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Single source of truth dla numeru wersji theme. Synced z `package.json`
3
+ * i `templates/layout.ts` (THEME_VERSION) — patrz CLAUDE.md "Theme bump".
4
+ */
5
+ export const version = '0.1.1';
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { composeCss, allCss } from './styles/index.ts';
2
- export type { TherapyProfile } from './templates/helpers.ts';
2
+ export { version } from './ai.ts';
@@ -7,12 +7,6 @@ section:has(> article[itemscope]) > h2 {
7
7
  font-family: var(--font-serif); font-weight: 400;
8
8
  font-size: clamp(var(--t-lg), 3vw, var(--t-xl));
9
9
  }
10
- section:has(> article[itemscope]) > h2::before {
11
- content: 'Nasi terapeuci'; display: block;
12
- font-family: var(--font-sans); font-size: var(--t-xs); font-weight: 500;
13
- color: var(--sage-700); letter-spacing: 0.1em; text-transform: uppercase;
14
- margin-bottom: var(--g2);
15
- }
16
10
  section:has(> article[itemscope]) > nav[aria-label] {
17
11
  grid-column: 1 / -1; margin-bottom: var(--g3);
18
12
  }
@@ -1,7 +1,7 @@
1
1
  const S = 'section:has(> article[itemscope]) > article[itemscope]';
2
2
  export const css = `${S} {
3
3
  position: relative; background: var(--beige-50); border: 1px solid var(--line-soft);
4
- padding: var(--g3); display: flex; flex-direction: column;
4
+ padding: var(--g3) var(--g3) 0; display: flex; flex-direction: column;
5
5
  box-shadow: var(--shadow); transition: all var(--ease);
6
6
  }
7
7
  ${S}:hover {
@@ -44,14 +44,10 @@ ${S} ul li {
44
44
  }
45
45
  ${S} > a:last-child {
46
46
  display: inline-flex; align-items: center; justify-content: center;
47
- margin-top: auto; padding: var(--g2) 0;
47
+ margin: var(--g3) calc(-1 * var(--g3)) 0;
48
+ padding: var(--g2) 0;
48
49
  background: var(--sage-600); color: var(--beige-50);
49
50
  font-size: var(--t-xs); font-weight: 500;
50
- margin-left: calc(-1 * var(--g3)); margin-right: calc(-1 * var(--g3));
51
- margin-bottom: calc(-1 * var(--g3));
52
51
  transition: background var(--ease);
53
52
  }
54
- ${S} > article > a:last-child:hover,
55
- ${S} > a:last-child:hover { background: var(--sage-700); color: var(--beige-50); }
56
- ${S} > * + * { margin-top: 0; }
57
- ${S} > a:last-child { margin-top: var(--g3); }`;
53
+ ${S} > a:last-child:hover { background: var(--sage-700); }`;
@@ -1,22 +1,12 @@
1
+ import type { TrenerProfile } from '@press2ai/engine/template-trener';
2
+
1
3
  export function esc(s: string | undefined | null): string {
2
4
  if (!s) return '';
3
5
  return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
4
6
  }
5
7
 
6
- export interface TherapyProfile {
7
- slug: string;
8
- firstName: string;
9
- lastName: string;
10
- jobTitle: string;
11
- city?: string;
12
- bio?: string;
13
- photo?: string;
14
- specialties: string[];
15
- languages: string[];
16
- business: { name?: string; taxId?: string; classification: string[] };
17
- social: Record<string, string>;
18
- }
19
-
20
- export function fullName(p: TherapyProfile): string {
8
+ export function fullName(p: TrenerProfile): string {
21
9
  return `${p.firstName} ${p.lastName}`;
22
10
  }
11
+
12
+ export type { TrenerProfile };
@@ -2,4 +2,4 @@ export { layout, type LayoutProps } from './layout.ts';
2
2
  export { profileCard } from './profile-card.ts';
3
3
  export { profileArticle } from './profile-article.ts';
4
4
  export { catalogHero, catalogGrid, statBar, categoryNav, pagination, type CatalogHeroProps, type PaginationProps } from './catalog.ts';
5
- export { esc, fullName, type TherapyProfile } from './helpers.ts';
5
+ export { esc, fullName, type TrenerProfile } from './helpers.ts';
@@ -12,7 +12,7 @@ export interface LayoutProps {
12
12
  footerContent?: string;
13
13
  }
14
14
 
15
- const THEME_VERSION = '0.1.0';
15
+ const THEME_VERSION = '0.1.1';
16
16
 
17
17
  export function layout(props: LayoutProps, body: string): string {
18
18
  const {
@@ -1,6 +1,15 @@
1
- import { esc, fullName, type TherapyProfile } from './helpers.ts';
1
+ import { esc, fullName, type TrenerProfile } from './helpers.ts';
2
2
 
3
- export function profileArticle(p: TherapyProfile): string {
3
+ const SOCIAL_URL_PREFIX: Record<string, string> = {
4
+ linkedin: 'https://linkedin.com/in/',
5
+ youtube: 'https://youtube.com/@',
6
+ tiktok: 'https://tiktok.com/@',
7
+ facebook: 'https://facebook.com/',
8
+ twitter: 'https://x.com/',
9
+ instagram: 'https://instagram.com/',
10
+ };
11
+
12
+ export function profileArticle(p: TrenerProfile): string {
4
13
  const name = fullName(p);
5
14
  const socials = Object.entries(p.social ?? {}).filter(([, v]) => v);
6
15
 
@@ -37,16 +46,8 @@ ${p.languages.map(l => `<li itemprop="knowsLanguage">${esc(l)}</li>`).join('\n')
37
46
  </section>`
38
47
  : '';
39
48
 
40
- const socialUrlPrefix: Record<string, string> = {
41
- linkedin: 'https://linkedin.com/in/',
42
- youtube: 'https://youtube.com/@',
43
- tiktok: 'https://tiktok.com/@',
44
- facebook: 'https://facebook.com/',
45
- twitter: 'https://x.com/',
46
- instagram: 'https://instagram.com/',
47
- };
48
49
  const contactItems = socials.map(([n, handle]) => {
49
- const prefix = socialUrlPrefix[n] ?? `https://${esc(n)}.com/`;
50
+ const prefix = SOCIAL_URL_PREFIX[n] ?? `https://${esc(n)}.com/`;
50
51
  return `<dt>${esc(n)}</dt><dd><a href="${prefix}${esc(handle as string)}" rel="noopener">@${esc(handle as string)}</a></dd>`;
51
52
  });
52
53
 
@@ -1,6 +1,6 @@
1
- import { esc, fullName, type TherapyProfile } from './helpers.ts';
1
+ import { esc, fullName, type TrenerProfile } from './helpers.ts';
2
2
 
3
- export function profileCard(p: TherapyProfile, href: string): string {
3
+ export function profileCard(p: TrenerProfile, href: string): string {
4
4
  const name = fullName(p);
5
5
  const initials = `${(p.firstName?.[0] ?? '').toUpperCase()}${(p.lastName?.[0] ?? '').toUpperCase()}`;
6
6