@startsimpli/integrations 0.2.107 → 0.2.109

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": "@startsimpli/integrations",
3
- "version": "0.2.107",
3
+ "version": "0.2.109",
4
4
  "description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
5
5
  "license": "MIT",
6
6
  "homepage": "https://startsimpli.com",
@@ -48,11 +48,11 @@
48
48
  "@tanstack/react-query": ">=5.0.0",
49
49
  "@startsimpli/llm": ">=0.4.0",
50
50
  "react-native": ">=0.74.0",
51
- "@startsimpli/ui-native": ">=0.1.11",
51
+ "@startsimpli/ui-native": ">=0.1.12",
52
52
  "react-native-safe-area-context": ">=4.0.0",
53
+ "@startsimpli/utils": "^0.4.17",
53
54
  "@startsimpli/ui": "^0.4.170",
54
- "@startsimpli/auth": "^0.4.49",
55
- "@startsimpli/utils": "^0.4.17"
55
+ "@startsimpli/auth": "^0.4.49"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "react": {
@@ -100,7 +100,7 @@
100
100
  "react-native-safe-area-context": "~5.7.0",
101
101
  "@startsimpli/llm": "0.4.28",
102
102
  "@startsimpli/ui": "0.4.170",
103
- "@startsimpli/ui-native": "0.1.11",
103
+ "@startsimpli/ui-native": "0.1.13",
104
104
  "@startsimpli/auth": "0.4.49",
105
105
  "@startsimpli/utils": "0.4.17"
106
106
  },
@@ -44,7 +44,7 @@ export function HomeScreen({ controller, brand, tagline, onRecord, onOpenType, o
44
44
  {s.metrics.map((m) => (
45
45
  <View key={m.key} style={{ flex: 1, minWidth: 0 }} testID={`home-metric-${m.key}`}>
46
46
  {s.loading ? <Skeleton height={72} /> : (
47
- <Pressable accessibilityRole="button" disabled={!onOpenType} onPress={() => onOpenType?.(m.key)} testID={`home-metric-open-${m.key}`}>
47
+ <Pressable accessibilityRole="button" hitSlop={12} disabled={!onOpenType} onPress={() => onOpenType?.(m.key)} testID={`home-metric-open-${m.key}`}>
48
48
  <StatTile style={{ minWidth: 0 }} value={m.count === null ? '–' : String(m.count)} label={m.label} />
49
49
  </Pressable>
50
50
  )}
@@ -100,7 +100,7 @@ function Sources({ view, onOpenDocument }: { view: AnswerView; onOpenDocument: (
100
100
  ) : null}
101
101
  {view.uncited.length ? (
102
102
  <View style={{ gap: theme.spacing.xs }}>
103
- <Pressable accessibilityRole="button" testID="ask-uncited-toggle" onPress={() => setShowUncited((v) => !v)}>
103
+ <Pressable accessibilityRole="button" hitSlop={12} testID="ask-uncited-toggle" onPress={() => setShowUncited((v) => !v)}>
104
104
  <Text variant="caption">{`${view.uncited.length} more record${view.uncited.length === 1 ? ' was' : 's were'} searched but not cited`}</Text>
105
105
  </Pressable>
106
106
  {showUncited ? view.uncited.map((u) => (
@@ -10,13 +10,14 @@ import {
10
10
  type FocusDetailController, type PlanningScreenApi, type PlanningController,
11
11
  } from './controller';
12
12
  import { isOverdue } from '../../../corpus/work-item-logic';
13
- import { documentLine, focusChipStatus, focusMeta, focusStatusLabel, itemLine, progressPercent, targetLine } from './format';
13
+ import { cardStandingLine, documentLine, focusChipStatus, focusMeta, focusStatusLabel, itemLine, progressPercent, targetLine } from './format';
14
14
 
15
15
  /** The standing, progress bar and facts for one focus (a project card on the list). */
16
16
  function FocusSummary({ focus, standing }: { focus: Focus; standing: FocusStanding | null }) {
17
17
  const theme = useTheme();
18
18
  const percent = progressPercent(focus, standing);
19
19
  const meta = focusMeta(focus);
20
+ const line = cardStandingLine(standing, focus);
20
21
  return (
21
22
  <View style={{ gap: theme.spacing.sm }}>
22
23
  <View style={{ flexDirection: 'row', alignItems: 'flex-start', justifyContent: 'space-between', gap: theme.spacing.sm }}>
@@ -25,7 +26,7 @@ function FocusSummary({ focus, standing }: { focus: Focus; standing: FocusStandi
25
26
  </View>
26
27
  {meta ? <Text variant="footnote">{meta}</Text> : null}
27
28
  {percent !== null ? <Progress value={percent} /> : null}
28
- <Text variant="subhead" style={{ color: theme.colors.mutedForeground }}>{[standingLabel(standing), targetLine(focus)].filter(Boolean).join(' · ')}</Text>
29
+ {line ? <Text variant="subhead" style={{ color: theme.colors.mutedForeground }}>{line}</Text> : null}
29
30
  </View>
30
31
  );
31
32
  }
@@ -1,11 +1,21 @@
1
1
  import { describe, expect, it } from 'vitest';
2
2
  import type { Commitment, Focus } from '../../../../corpus/types';
3
- import { focusMeta, focusChipStatus, itemLine, progressPercent, targetLine } from '../format';
3
+ import { cardStandingLine, focusMeta, focusChipStatus, itemLine, progressPercent, targetLine } from '../format';
4
4
 
5
5
  const NOW = Date.parse('2026-11-04T18:00:00Z');
6
6
  const item = (over: Partial<Commitment>) => ({ id: 'c', title: 't', status: 'open', ...over }) as Commitment;
7
7
  const focus = (over: Partial<Focus>) => ({ id: 'f', title: 'F', status: 'active', ...over }) as Focus;
8
8
 
9
+ describe('cardStandingLine (startsim-150po.17)', () => {
10
+ const f = { targetValue: null } as any;
11
+ it('drops the empty-state sentence on a row but keeps counts', () => {
12
+ expect(cardStandingLine({ focusId: 'a', total: 0, done: 0, overdue: 0 }, f)).toBe('');
13
+ expect(cardStandingLine({ focusId: 'a', total: 40, done: 12, overdue: 3 }, f)).toBe('12 of 40 done · 3 overdue');
14
+ expect(cardStandingLine(null, f)).toBe('Counting…');
15
+ expect(cardStandingLine({ focusId: 'a', total: 0, done: 0, overdue: 0 }, { targetValue: 10, currentValue: 5, unit: 'pages' } as any)).toBe('5 / 10 pages');
16
+ });
17
+ });
18
+
9
19
  describe('planning formatting', () => {
10
20
  it('marks a past-due open item overdue and leaves a closed one alone', () => {
11
21
  expect(itemLine(item({ dueAt: '2026-11-04T17:00:00Z', ownerName: 'Quinn', priority: 1 }), NOW)).toBe('Overdue · Nov 4 · Quinn · High');
@@ -1,4 +1,4 @@
1
- import { displayProgress, focusStatusLabel } from '../../../corpus/planning';
1
+ import { displayProgress, focusStatusLabel, standingLabel } from '../../../corpus/planning';
2
2
  import type { Commitment, Focus, FocusStanding, FocusStatus, SourceDocument } from '../../../corpus/types';
3
3
  import { isOverdue, priorityLabel } from '../../../corpus/work-item-logic';
4
4
  import { shortDate } from '../shared/format';
@@ -33,6 +33,12 @@ export function focusMeta(focus: Focus): string {
33
33
  ].filter(Boolean).join(' · ');
34
34
  }
35
35
 
36
+ /** The count line on a project card. An empty project says nothing (the web card's empty-state sentence repeated on every row of the list). */
37
+ export function cardStandingLine(standing: FocusStanding | null, focus: Focus): string {
38
+ const counts = standing && standing.total === 0 ? null : standingLabel(standing);
39
+ return [counts, targetLine(focus)].filter(Boolean).join(' · ');
40
+ }
41
+
36
42
  /** One line under an item: overdue/due, owner, priority, why it is blocked. */
37
43
  export function itemLine(item: Commitment, now: number): string {
38
44
  const due = shortDate(item.dueAt, now);
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useMemo } from 'react';
2
2
  import { View } from 'react-native';
3
- import { Alert, Button, DetailScreen, Section, StatusChip, Text, useTheme } from '@startsimpli/ui-native';
3
+ import { Alert, Button, DetailScreen, Section, StatusChip, Text, stripMarkdown, useTheme } from '@startsimpli/ui-native';
4
4
  import type { NativeCorpusApi } from '../corpus/api';
5
5
  import { usePullRefresh } from '../components/usePullRefresh';
6
6
  import { useControllerState } from '../components/useControllerState';
@@ -66,7 +66,7 @@ export function TrackerDetailScreen({ api, id, onBack, onOpenNote, onChanged, no
66
66
  {s.sources.map((src) => (
67
67
  <View key={`${src.documentId}-${src.quote.slice(0, 24)}`} style={{ paddingVertical: theme.spacing.md, gap: theme.spacing.xs }}>
68
68
  <Text variant="headline">{src.title}{src.section ? ` · ${src.section}` : ''}</Text>
69
- {src.quote ? <Text variant="callout" style={{ fontStyle: 'italic', color: theme.colors.mutedForeground }}>{`“${src.quote}”`}</Text> : null}
69
+ {stripMarkdown(src.quote) ? <Text variant="callout" style={{ fontStyle: 'italic', color: theme.colors.mutedForeground }}>{`“${stripMarkdown(src.quote)}”`}</Text> : null}
70
70
  {src.isVoiceNote && onOpenNote ? (
71
71
  <Button testID={`todo-open-note-${src.documentId}`} title="Open note" variant="outline" size="sm" style={{ alignSelf: 'flex-start', marginTop: theme.spacing.xs }} onPress={() => onOpenNote(src.documentId)} />
72
72
  ) : null}