@neo-reckoning/solid 0.1.0-alpha.5

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.
Files changed (50) hide show
  1. package/README.md +13 -0
  2. package/dist/createCalendar.d.ts +17 -0
  3. package/dist/createCalendar.d.ts.map +1 -0
  4. package/dist/createCalendar.js +25 -0
  5. package/dist/createCalendar.js.map +1 -0
  6. package/dist/createCalendarEvents.d.ts +6 -0
  7. package/dist/createCalendarEvents.d.ts.map +1 -0
  8. package/dist/createCalendarEvents.js +8 -0
  9. package/dist/createCalendarEvents.js.map +1 -0
  10. package/dist/createConflicts.d.ts +6 -0
  11. package/dist/createConflicts.d.ts.map +1 -0
  12. package/dist/createConflicts.js +8 -0
  13. package/dist/createConflicts.js.map +1 -0
  14. package/dist/createDayDetail.d.ts +15 -0
  15. package/dist/createDayDetail.d.ts.map +1 -0
  16. package/dist/createDayDetail.js +15 -0
  17. package/dist/createDayDetail.js.map +1 -0
  18. package/dist/createFreeSlots.d.ts +6 -0
  19. package/dist/createFreeSlots.d.ts.map +1 -0
  20. package/dist/createFreeSlots.js +8 -0
  21. package/dist/createFreeSlots.js.map +1 -0
  22. package/dist/createRangeCheck.d.ts +9 -0
  23. package/dist/createRangeCheck.d.ts.map +1 -0
  24. package/dist/createRangeCheck.js +15 -0
  25. package/dist/createRangeCheck.js.map +1 -0
  26. package/dist/createScheduleScore.d.ts +6 -0
  27. package/dist/createScheduleScore.d.ts.map +1 -0
  28. package/dist/createScheduleScore.js +8 -0
  29. package/dist/createScheduleScore.js.map +1 -0
  30. package/dist/createSpans.d.ts +6 -0
  31. package/dist/createSpans.d.ts.map +1 -0
  32. package/dist/createSpans.js +8 -0
  33. package/dist/createSpans.js.map +1 -0
  34. package/dist/createTimeline.d.ts +8 -0
  35. package/dist/createTimeline.d.ts.map +1 -0
  36. package/dist/createTimeline.js +11 -0
  37. package/dist/createTimeline.js.map +1 -0
  38. package/dist/createYearGrid.d.ts +8 -0
  39. package/dist/createYearGrid.d.ts.map +1 -0
  40. package/dist/createYearGrid.js +11 -0
  41. package/dist/createYearGrid.js.map +1 -0
  42. package/dist/index.d.ts +12 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +11 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/utils.d.ts +4 -0
  47. package/dist/utils.d.ts.map +1 -0
  48. package/dist/utils.js +4 -0
  49. package/dist/utils.js.map +1 -0
  50. package/package.json +44 -0
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @neo-reckoning/solid
2
+
3
+ Reactive Solid primitives for calendar state management. Built on [@neo-reckoning/core](https://www.npmjs.com/package/@neo-reckoning/core) and [@neo-reckoning/models](https://www.npmjs.com/package/@neo-reckoning/models).
4
+
5
+ This package exposes idiomatic `create*` helpers backed by Solid's reactive system.
6
+
7
+ ## Install
8
+
9
+ ```
10
+ npm install @neo-reckoning/solid @neo-reckoning/core solid-js
11
+ ```
12
+
13
+ If you want framework-neutral derived helpers without reactive wrappers, use `@neo-reckoning/models` directly.
@@ -0,0 +1,17 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { CalendarModelConfig } from '@neo-reckoning/models';
3
+ import type { Month } from '@neo-reckoning/core';
4
+ import { type MaybeAccessor } from './utils.js';
5
+ export interface CreateCalendarConfig extends CalendarModelConfig {
6
+ onFocusDateChange: (date: string) => void;
7
+ }
8
+ export interface CreateCalendarResult {
9
+ months: Accessor<Month[]>;
10
+ focusDate: Accessor<string>;
11
+ numberOfMonths: Accessor<number>;
12
+ next: () => void;
13
+ prev: () => void;
14
+ goTo: (date: string) => void;
15
+ }
16
+ export declare function createCalendar(config: MaybeAccessor<CreateCalendarConfig>): CreateCalendarResult;
17
+ //# sourceMappingURL=createCalendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCalendar.d.ts","sourceRoot":"","sources":["../src/createCalendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAC1B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5B,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC1C,oBAAoB,CAwBtB"}
@@ -0,0 +1,25 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildCalendarModel, createCalendarController, } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createCalendar(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ const model = createMemo(() => buildCalendarModel(resolvedConfig()));
7
+ const controller = createMemo(() => createCalendarController({
8
+ focusDate: resolvedConfig().focusDate,
9
+ }));
10
+ return {
11
+ months: () => model().months,
12
+ focusDate: () => model().focusDate,
13
+ numberOfMonths: () => model().numberOfMonths,
14
+ next: () => {
15
+ resolvedConfig().onFocusDateChange(controller().next());
16
+ },
17
+ prev: () => {
18
+ resolvedConfig().onFocusDateChange(controller().prev());
19
+ },
20
+ goTo: (date) => {
21
+ resolvedConfig().onFocusDateChange(controller().goTo(date));
22
+ },
23
+ };
24
+ }
25
+ //# sourceMappingURL=createCalendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCalendar.js","sourceRoot":"","sources":["../src/createCalendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAe5D,MAAM,UAAU,cAAc,CAC5B,MAA2C;IAE3C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAE1C,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IACrE,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,EAAE,CACjC,wBAAwB,CAAC;QACvB,SAAS,EAAE,cAAc,EAAE,CAAC,SAAS;KACtC,CAAC,CACH,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM;QAC5B,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,SAAS;QAClC,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,cAAc;QAC5C,IAAI,EAAE,GAAG,EAAE;YACT,cAAc,EAAE,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,cAAc,EAAE,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE;YACrB,cAAc,EAAE,CAAC,iBAAiB,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9D,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { CalendarEventsModelConfig } from '@neo-reckoning/models';
3
+ import type { CalendarEvent } from '@neo-reckoning/core';
4
+ import { type MaybeAccessor } from './utils.js';
5
+ export declare function createCalendarEvents(config: MaybeAccessor<CalendarEventsModelConfig>): Accessor<CalendarEvent[]>;
6
+ //# sourceMappingURL=createCalendarEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCalendarEvents.d.ts","sourceRoot":"","sources":["../src/createCalendarEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,aAAa,CAAC,yBAAyB,CAAC,GAC/C,QAAQ,CAAC,aAAa,EAAE,CAAC,CAG3B"}
@@ -0,0 +1,8 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildCalendarEvents } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createCalendarEvents(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ return createMemo(() => buildCalendarEvents(resolvedConfig()));
7
+ }
8
+ //# sourceMappingURL=createCalendarEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createCalendarEvents.js","sourceRoot":"","sources":["../src/createCalendarEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAE5D,MAAM,UAAU,oBAAoB,CAClC,MAAgD;IAEhD,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { ConflictsModelConfig } from '@neo-reckoning/models';
3
+ import type { Conflict } from '@neo-reckoning/core';
4
+ import { type MaybeAccessor } from './utils.js';
5
+ export declare function createConflicts(config: MaybeAccessor<ConflictsModelConfig>): Accessor<Conflict[]>;
6
+ //# sourceMappingURL=createConflicts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createConflicts.d.ts","sourceRoot":"","sources":["../src/createConflicts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,wBAAgB,eAAe,CAC7B,MAAM,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC1C,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAGtB"}
@@ -0,0 +1,8 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildConflictsModel } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createConflicts(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ return createMemo(() => buildConflictsModel(resolvedConfig()));
7
+ }
8
+ //# sourceMappingURL=createConflicts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createConflicts.js","sourceRoot":"","sources":["../src/createConflicts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAE5D,MAAM,UAAU,eAAe,CAC7B,MAA2C;IAE3C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { DayDetailModel } from '@neo-reckoning/models';
3
+ import type { DateRange } from '@neo-reckoning/core';
4
+ import { type MaybeAccessor } from './utils.js';
5
+ export interface CreateDayDetailConfig {
6
+ date: string;
7
+ ranges: DateRange[];
8
+ userTimezone?: string;
9
+ }
10
+ export interface CreateDayDetailResult {
11
+ timeSlots: Accessor<DayDetailModel['timeSlots']>;
12
+ allDayRanges: Accessor<DayDetailModel['allDayRanges']>;
13
+ }
14
+ export declare function createDayDetail(config: MaybeAccessor<CreateDayDetailConfig>): CreateDayDetailResult;
15
+ //# sourceMappingURL=createDayDetail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDayDetail.d.ts","sourceRoot":"","sources":["../src/createDayDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IACjD,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;CACxD;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC,GAC3C,qBAAqB,CAWvB"}
@@ -0,0 +1,15 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildDayDetailModel } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createDayDetail(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ const model = createMemo(() => {
7
+ const current = resolvedConfig();
8
+ return buildDayDetailModel(current.date, current.ranges, current.userTimezone);
9
+ });
10
+ return {
11
+ timeSlots: () => model().timeSlots,
12
+ allDayRanges: () => model().allDayRanges,
13
+ };
14
+ }
15
+ //# sourceMappingURL=createDayDetail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDayDetail.js","sourceRoot":"","sources":["../src/createDayDetail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAa5D,MAAM,UAAU,eAAe,CAC7B,MAA4C;IAE5C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;QAC5B,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;QACjC,OAAO,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,SAAS;QAClC,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,YAAY;KACzC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { FreeSlotsModelConfig } from '@neo-reckoning/models';
3
+ import type { FreeSlot } from '@neo-reckoning/core';
4
+ import { type MaybeAccessor } from './utils.js';
5
+ export declare function createFreeSlots(config: MaybeAccessor<FreeSlotsModelConfig>): Accessor<FreeSlot[]>;
6
+ //# sourceMappingURL=createFreeSlots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFreeSlots.d.ts","sourceRoot":"","sources":["../src/createFreeSlots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,wBAAgB,eAAe,CAC7B,MAAM,EAAE,aAAa,CAAC,oBAAoB,CAAC,GAC1C,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAGtB"}
@@ -0,0 +1,8 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildFreeSlotsModel } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createFreeSlots(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ return createMemo(() => buildFreeSlotsModel(resolvedConfig()));
7
+ }
8
+ //# sourceMappingURL=createFreeSlots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFreeSlots.js","sourceRoot":"","sources":["../src/createFreeSlots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAE5D,MAAM,UAAU,eAAe,CAC7B,MAA2C;IAE3C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { RangeCheck } from '@neo-reckoning/models';
2
+ import type { DateRange } from '@neo-reckoning/core';
3
+ import { type MaybeAccessor } from './utils.js';
4
+ export interface CreateRangeCheckConfig {
5
+ ranges: DateRange[];
6
+ userTimezone?: string;
7
+ }
8
+ export declare function createRangeCheck(config: MaybeAccessor<CreateRangeCheckConfig>): RangeCheck;
9
+ //# sourceMappingURL=createRangeCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRangeCheck.d.ts","sourceRoot":"","sources":["../src/createRangeCheck.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,CAAC,sBAAsB,CAAC,GAC5C,UAAU,CAWZ"}
@@ -0,0 +1,15 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { createRangeCheck as createModelsRangeCheck } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createRangeCheck(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ const rangeCheck = createMemo(() => {
7
+ const current = resolvedConfig();
8
+ return createModelsRangeCheck(current.ranges, current.userTimezone);
9
+ });
10
+ return {
11
+ isInRange: (datetime) => rangeCheck().isInRange(datetime),
12
+ getOccurrences: (from, to) => rangeCheck().getOccurrences(from, to),
13
+ };
14
+ }
15
+ //# sourceMappingURL=createRangeCheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRangeCheck.js","sourceRoot":"","sources":["../src/createRangeCheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAGnF,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAO5D,MAAM,UAAU,gBAAgB,CAC9B,MAA6C;IAE7C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,EAAE;QACjC,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;QACjC,OAAO,sBAAsB,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,SAAS,EAAE,CAAC,QAAc,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC/D,cAAc,EAAE,CAAC,IAAU,EAAE,EAAQ,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC;KAChF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { ScheduleScoreModelConfig } from '@neo-reckoning/models';
3
+ import type { ScheduleScore } from '@neo-reckoning/core';
4
+ import { type MaybeAccessor } from './utils.js';
5
+ export declare function createScheduleScore(config: MaybeAccessor<ScheduleScoreModelConfig>): Accessor<ScheduleScore>;
6
+ //# sourceMappingURL=createScheduleScore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createScheduleScore.d.ts","sourceRoot":"","sources":["../src/createScheduleScore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,aAAa,CAAC,wBAAwB,CAAC,GAC9C,QAAQ,CAAC,aAAa,CAAC,CAGzB"}
@@ -0,0 +1,8 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildScheduleScoreModel } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createScheduleScore(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ return createMemo(() => buildScheduleScoreModel(resolvedConfig()));
7
+ }
8
+ //# sourceMappingURL=createScheduleScore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createScheduleScore.js","sourceRoot":"","sources":["../src/createScheduleScore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAE5D,MAAM,UAAU,mBAAmB,CACjC,MAA+C;IAE/C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AACrE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { SpansModelConfig } from '@neo-reckoning/models';
3
+ import type { SpanInfo } from '@neo-reckoning/core';
4
+ import { type MaybeAccessor } from './utils.js';
5
+ export declare function createSpans(config: MaybeAccessor<SpansModelConfig>): Accessor<SpanInfo[]>;
6
+ //# sourceMappingURL=createSpans.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSpans.d.ts","sourceRoot":"","sources":["../src/createSpans.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,wBAAgB,WAAW,CACzB,MAAM,EAAE,aAAa,CAAC,gBAAgB,CAAC,GACtC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAGtB"}
@@ -0,0 +1,8 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildSpansModel } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createSpans(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ return createMemo(() => buildSpansModel(resolvedConfig()));
7
+ }
8
+ //# sourceMappingURL=createSpans.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSpans.js","sourceRoot":"","sources":["../src/createSpans.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAE5D,MAAM,UAAU,WAAW,CACzB,MAAuC;IAEvC,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { TimelineModelConfig, TimelineModel } from '@neo-reckoning/models';
3
+ import { type MaybeAccessor } from './utils.js';
4
+ export interface CreateTimelineResult {
5
+ slots: Accessor<TimelineModel['slots']>;
6
+ }
7
+ export declare function createTimeline(config: MaybeAccessor<TimelineModelConfig>): CreateTimelineResult;
8
+ //# sourceMappingURL=createTimeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTimeline.d.ts","sourceRoot":"","sources":["../src/createTimeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;CACzC;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,GACzC,oBAAoB,CAOtB"}
@@ -0,0 +1,11 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildTimelineModel } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createTimeline(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ const model = createMemo(() => buildTimelineModel(resolvedConfig()));
7
+ return {
8
+ slots: () => model().slots,
9
+ };
10
+ }
11
+ //# sourceMappingURL=createTimeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTimeline.js","sourceRoot":"","sources":["../src/createTimeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAM5D,MAAM,UAAU,cAAc,CAC5B,MAA0C;IAE1C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IAErE,OAAO;QACL,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK;KAC3B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type Accessor } from 'solid-js';
2
+ import type { YearGridModel, YearGridModelConfig } from '@neo-reckoning/models';
3
+ import { type MaybeAccessor } from './utils.js';
4
+ export interface CreateYearGridResult {
5
+ months: Accessor<YearGridModel['months']>;
6
+ }
7
+ export declare function createYearGrid(config: MaybeAccessor<YearGridModelConfig>): CreateYearGridResult;
8
+ //# sourceMappingURL=createYearGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createYearGrid.d.ts","sourceRoot":"","sources":["../src/createYearGrid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE5D,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC3C;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,GACzC,oBAAoB,CAOtB"}
@@ -0,0 +1,11 @@
1
+ import { createMemo } from 'solid-js';
2
+ import { buildYearGridModel } from '@neo-reckoning/models';
3
+ import { toAccessor } from './utils.js';
4
+ export function createYearGrid(config) {
5
+ const resolvedConfig = toAccessor(config);
6
+ const model = createMemo(() => buildYearGridModel(resolvedConfig()));
7
+ return {
8
+ months: () => model().months,
9
+ };
10
+ }
11
+ //# sourceMappingURL=createYearGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createYearGrid.js","sourceRoot":"","sources":["../src/createYearGrid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAsB,MAAM,YAAY,CAAC;AAM5D,MAAM,UAAU,cAAc,CAC5B,MAA0C;IAE1C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IAErE,OAAO;QACL,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM;KAC7B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export { createCalendar } from './createCalendar.js';
2
+ export { createRangeCheck } from './createRangeCheck.js';
3
+ export { createCalendarEvents } from './createCalendarEvents.js';
4
+ export { createDayDetail } from './createDayDetail.js';
5
+ export { createTimeline } from './createTimeline.js';
6
+ export { createSpans } from './createSpans.js';
7
+ export { createConflicts } from './createConflicts.js';
8
+ export { createFreeSlots } from './createFreeSlots.js';
9
+ export { createScheduleScore } from './createScheduleScore.js';
10
+ export { createYearGrid } from './createYearGrid.js';
11
+ export type { MaybeAccessor } from './utils.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ export { createCalendar } from './createCalendar.js';
2
+ export { createRangeCheck } from './createRangeCheck.js';
3
+ export { createCalendarEvents } from './createCalendarEvents.js';
4
+ export { createDayDetail } from './createDayDetail.js';
5
+ export { createTimeline } from './createTimeline.js';
6
+ export { createSpans } from './createSpans.js';
7
+ export { createConflicts } from './createConflicts.js';
8
+ export { createFreeSlots } from './createFreeSlots.js';
9
+ export { createScheduleScore } from './createScheduleScore.js';
10
+ export { createYearGrid } from './createYearGrid.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Accessor } from 'solid-js';
2
+ export type MaybeAccessor<T> = T | Accessor<T>;
3
+ export declare function toAccessor<T>(value: MaybeAccessor<T>): Accessor<T>;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE/C,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAElE"}
package/dist/utils.js ADDED
@@ -0,0 +1,4 @@
1
+ export function toAccessor(value) {
2
+ return typeof value === 'function' ? value : () => value;
3
+ }
4
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,UAAU,CAAI,KAAuB;IACnD,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAE,KAAqB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAC5E,CAAC"}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@neo-reckoning/solid",
3
+ "version": "0.1.0-alpha.5",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "test": "NODE_OPTIONS='--experimental-vm-modules' jest --passWithNoTests",
16
+ "typecheck": "tsc --noEmit"
17
+ },
18
+ "dependencies": {
19
+ "@neo-reckoning/core": "workspace:^",
20
+ "@neo-reckoning/models": "workspace:^"
21
+ },
22
+ "peerDependencies": {
23
+ "solid-js": "^1.0.0"
24
+ },
25
+ "files": [
26
+ "dist"
27
+ ],
28
+ "devDependencies": {
29
+ "@types/jest": "^29.5.14",
30
+ "jest": "^29.7.0",
31
+ "jest-environment-jsdom": "^30.3.0",
32
+ "solid-js": "^1.9.10",
33
+ "ts-jest": "^29.3.4",
34
+ "typescript": "^5.8.3"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/sdougbrown/neo-reckoning.git",
39
+ "directory": "packages/solid"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ }
44
+ }