@notis_ai/cli 0.2.30 → 0.2.32
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 +15 -0
- package/config/notis_app_design_rules.json +22 -0
- package/dist/agent-hooks/notis-agent-hook.mjs +38244 -10823
- package/dist/base-skills/notis-cli/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-cli/references/native-databases.md +1 -1
- package/dist/base-skills/notis-query/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-query/references/query.md +6 -4
- package/dist/base-skills/notis-spaces/.notis-base-skill.json +1 -1
- package/dist/base-skills/notis-spaces/SKILL.md +12 -4
- package/dist/base-skills/notis-spaces/references/architecture.md +4 -1
- package/dist/base-skills/notis-spaces/references/design.md +7 -1
- package/dist/base-skills/notis-spaces/references/fixtures.md +29 -2
- package/dist/base-skills/notis-spaces/references/reading.md +3 -1
- package/dist/base-skills/notis-spaces/references/release.md +3 -1
- package/dist/base-skills/notis-spaces/references/sdk.md +112 -33
- package/dist/base-skills/notis-spaces/references/troubleshooting.md +3 -0
- package/dist/base-skills/notis-spaces/references/views.md +20 -0
- package/dist/sdk/src/hooks/useNativeDocuments.ts +50 -12
- package/dist/sdk/src/index.ts +1 -1
- package/dist/sdk/src/space.ts +3 -1
- package/dist/sdk/src/tailwind.ts +53 -3
- package/dist/sdk/src/ui/icons.tsx +18 -1
- package/dist/sdk/src/words/types.ts +28 -0
- package/dist/skill-sync/index.js +10 -90
- package/dist/skill-sync-worker.mjs +50 -93
- package/dist/space-harness/host.js +155 -82
- package/dist/space-sdk/dist/chunk-I4Z4UFGB.js +3 -0
- package/dist/space-sdk/dist/index.js +2 -2
- package/dist/space-sdk/dist/ui.js +12 -12
- package/dist/space-sdk/src/hooks/useNativeDocuments.d.ts +23 -0
- package/dist/space-sdk/src/index.d.ts +1 -1
- package/dist/space-sdk/src/space.ts +3 -1
- package/dist/space-sdk/src/tailwind-candidates.d.ts +315 -2
- package/dist/space-sdk/src/tailwind.ts +53 -3
- package/dist/space-sdk/src/ui/blocks/DataTable.d.ts +19 -4
- package/dist/space-sdk/src/ui/blocks/Meter.d.ts +12 -3
- package/dist/space-sdk/src/ui/blocks/Tabs.d.ts +7 -1
- package/dist/space-sdk/src/ui/blocks/blocks.d.ts +18 -0
- package/dist/space-sdk/src/ui/blocks/index.d.ts +3 -3
- package/dist/space-sdk/src/ui/charts/CalendarHeatmap.d.ts +69 -0
- package/dist/space-sdk/src/ui/charts/Chart.d.ts +18 -3
- package/dist/space-sdk/src/ui/charts/chartData.d.ts +19 -0
- package/dist/space-sdk/src/ui/charts/heatmapData.d.ts +81 -0
- package/dist/space-sdk/src/ui/icons.d.ts +6 -0
- package/dist/space-sdk/src/ui/index.d.ts +5 -3
- package/dist/space-sdk/src/ui/list/ListReader.d.ts +8 -0
- package/dist/space-sdk/src/ui/list/Row.d.ts +11 -1
- package/dist/space-sdk/src/ui/period/dateFormat.d.ts +2 -0
- package/dist/space-sdk/src/ui/period/dateWords.d.ts +9 -0
- package/dist/space-sdk/src/ui/period/periods.d.ts +15 -2
- package/dist/space-sdk/src/words/types.ts +28 -0
- package/dist/view-renderer/dist/host.js +224 -151
- package/dist/view-renderer/src/dom.js +3 -2
- package/dist/view-renderer/src/errors.js +9 -0
- package/dist/view-renderer/src/host.tsx +12 -5
- package/dist/view-renderer/src/remote-broker.js +3 -1
- package/dist/view-renderer/src/renderer.js +63 -16
- package/dist/view-renderer/src/skeleton.js +70 -18
- package/package.json +5 -4
- package/skills/notis-query/cli.md +3 -0
- package/skills/notis-spaces/cli.md +14 -0
- package/src/command-specs/spaces.js +138 -15
- package/src/command-specs/tools.js +3 -0
- package/src/runtime/api-hosts.generated.js +35 -0
- package/src/runtime/api-hosts.js +27 -10
- package/src/runtime/app-boundary-validator.js +248 -3
- package/src/runtime/app-data-literals.js +32 -23
- package/src/runtime/app-platform.js +68 -24
- package/src/runtime/http-agent.js +53 -0
- package/src/runtime/native-record-files.js +11 -0
- package/src/runtime/oauth.js +2 -1
- package/src/runtime/skill-sync/cloud-client.ts +0 -10
- package/src/runtime/skill-sync/index.ts +13 -15
- package/src/runtime/skill-sync/local-scanner.ts +0 -67
- package/src/runtime/skill-sync/types.ts +1 -0
- package/src/runtime/skill-sync/write-cloud-skill.ts +7 -23
- package/src/runtime/space-dependencies.js +66 -0
- package/src/runtime/space-fixture-broker.js +23 -8
- package/src/runtime/space-platform.js +47 -3
- package/src/runtime/space-source.js +10 -1
- package/src/runtime/space-test-server.js +124 -6
- package/src/runtime/space-verification.js +103 -43
- package/src/runtime/space-view-manifest.js +38 -5
- package/src/runtime/transport.js +19 -4
- package/src/runtime/view-render.js +4 -1
- package/template/tailwind.config.ts +2 -35
- package/dist/space-sdk/dist/chunk-6GJ2BS7B.js +0 -3
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* `2026-01-01..2026-01-31~none` custom range
|
|
11
11
|
* The comparison is left out when it equals the default, so links stay short.
|
|
12
12
|
*/
|
|
13
|
-
export type PresetId = 'today' | 'yesterday' | 'last7' | 'last30' | 'last90' | 'thisMonth' | 'lastMonth' | 'thisQuarter' | 'thisYear' | 'custom';
|
|
13
|
+
export type PresetId = 'today' | 'yesterday' | 'last7' | 'last30' | 'last90' | 'thisMonth' | 'lastMonth' | 'thisQuarter' | 'thisYear' | 'last6Months' | 'last12Months' | 'custom';
|
|
14
14
|
export type CompareId = 'prev' | 'year' | 'none';
|
|
15
15
|
export interface Period {
|
|
16
16
|
preset: PresetId;
|
|
@@ -25,6 +25,12 @@ export interface DateRange {
|
|
|
25
25
|
to: Date;
|
|
26
26
|
}
|
|
27
27
|
export declare const PRESETS: readonly PresetId[];
|
|
28
|
+
/**
|
|
29
|
+
* Presets a picker can offer that the default list leaves out: trailing windows of whole months (this month and the 5
|
|
30
|
+
* or 11 before it), for monthly figures such as spending. Pass them in `presets`, such as
|
|
31
|
+
* `[...PRESETS.slice(0, -1), ...EXTRA_PRESETS, 'custom']`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const EXTRA_PRESETS: readonly PresetId[];
|
|
28
34
|
export declare const COMPARES: readonly CompareId[];
|
|
29
35
|
export declare const DEFAULT_PRESET: PresetId;
|
|
30
36
|
export declare const DEFAULT_COMPARE: CompareId;
|
|
@@ -44,9 +50,16 @@ export declare function presetRange(preset: PresetId, now?: Date, custom?: {
|
|
|
44
50
|
from?: string;
|
|
45
51
|
to?: string;
|
|
46
52
|
}): DateRange;
|
|
53
|
+
/**
|
|
54
|
+
* The calendar months a range spans when it is binned by month: it starts on the 1st and spans six months or more
|
|
55
|
+
* (Last 6 months, Last 12 months, a year to date from June). 0 otherwise.
|
|
56
|
+
*/
|
|
57
|
+
export declare function monthSpan(range: DateRange): number;
|
|
47
58
|
/**
|
|
48
59
|
* The range a period is compared with.
|
|
49
|
-
* - prev: the same number of days just before (`[from - n, from - 1]`).
|
|
60
|
+
* - prev: the same number of days just before (`[from - n, from - 1]`). A range binned by month (`monthSpan`: it
|
|
61
|
+
* starts on the 1st and spans six calendar months or more, such as Last 6 months) moves back by that many months
|
|
62
|
+
* instead, so each month is compared with a whole month; a range ending on a month's last day ends on one too.
|
|
50
63
|
* - year: the same calendar days one year back (29 February lands on 28 February).
|
|
51
64
|
* - none: no comparison.
|
|
52
65
|
*/
|
|
@@ -48,6 +48,34 @@ export function fillWords(words: Words, vars: Readonly<Record<string, string | n
|
|
|
48
48
|
return { en: interpolate(words.en, vars), fr: interpolate(words.fr, vars) };
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
const PLURAL_INTL = new Map<Locale, { rules: Intl.PluralRules; number: Intl.NumberFormat }>();
|
|
52
|
+
function pluralIntl(locale: Locale) {
|
|
53
|
+
let intl = PLURAL_INTL.get(locale);
|
|
54
|
+
if (!intl) {
|
|
55
|
+
const tag = locale === 'fr' ? 'fr-FR' : 'en-US';
|
|
56
|
+
intl = { rules: new Intl.PluralRules(tag), number: new Intl.NumberFormat(tag) };
|
|
57
|
+
PLURAL_INTL.set(locale, intl);
|
|
58
|
+
}
|
|
59
|
+
return intl;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The words for a count, in the grammar of each language: English "1 campaign" / "2 campaigns", French "1 campagne" /
|
|
64
|
+
* "2 campagnes" (French also uses the singular for 0 and 1.5). `forms` holds the singular (`one`) and the plural
|
|
65
|
+
* (`other`) of each language; `{n}` in them is the count as written in that locale ("1,250" / "1 250").
|
|
66
|
+
* `pluralWords(3, { one: w('{n} campaign', '{n} campagne'), other: w('{n} campaigns', '{n} campagnes') })`.
|
|
67
|
+
*/
|
|
68
|
+
export function pluralWords(count: number, forms: { one: Words; other: Words }): Words {
|
|
69
|
+
const form = (locale: Locale) => {
|
|
70
|
+
const intl = pluralIntl(locale);
|
|
71
|
+
const rule = Number.isFinite(count) ? intl.rules.select(count) : 'other';
|
|
72
|
+
const words = rule === 'one' ? forms.one : forms.other;
|
|
73
|
+
const n = Number.isFinite(count) ? intl.number.format(count) : String(count);
|
|
74
|
+
return interpolate(locale === 'fr' ? words.fr : words.en, { n });
|
|
75
|
+
};
|
|
76
|
+
return { en: form('en'), fr: form('fr') };
|
|
77
|
+
}
|
|
78
|
+
|
|
51
79
|
/** Shorthand for a Words pair. */
|
|
52
80
|
export function w(en: string, fr: string): Words {
|
|
53
81
|
return { en, fr };
|