foldkit-data-grid 0.8.0 → 0.9.0
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 +85 -15
- package/dist/clipboard.d.ts +7 -0
- package/dist/clipboard.d.ts.map +1 -1
- package/dist/clipboard.js +14 -0
- package/dist/clipboard.js.map +1 -1
- package/dist/columns.d.ts +17 -1
- package/dist/columns.d.ts.map +1 -1
- package/dist/columns.js.map +1 -1
- package/dist/fill.d.ts +14 -4
- package/dist/fill.d.ts.map +1 -1
- package/dist/fill.js +91 -11
- package/dist/fill.js.map +1 -1
- package/dist/grid.d.ts +879 -34
- package/dist/grid.d.ts.map +1 -1
- package/dist/grid.js +82 -3
- package/dist/grid.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/package.json +8 -8
package/dist/fill.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fill.js","names":[],"sources":["../src/fill.ts"],"sourcesContent":["import { Option } from 'effect'\nimport type { PastedCell } from './clipboard.js'\nimport type { CellAddress, CellBox, GridProjection } from './projection.js'\n\n/** A fill: the range whose cells are carried on, and the cell it was carried to. */\nexport interface FillRequest<Id extends string> {\n readonly source: { readonly anchor: CellAddress<Id>; readonly focus: CellAddress<Id> }\n readonly to: CellAddress<Id>\n}\n\n/**\n * Where a fill lands: the source's box, and the box it fills beyond it, down,\n * up, right or left, whichever way `to` lies further outside the source. A\n * fill carries on along one axis only, as spreadsheets do.\n */\nexport interface FillPlan<Id extends string> {\n readonly source: CellBox<Id>\n readonly target: CellBox<Id>\n /** Rows (`down`/`up`) or columns (`right`/`left`), away from the source. */\n readonly toward: 'down' | 'up' | 'right' | 'left'\n}\n\nconst number = /^-?\\d+(?:\\.(\\d+))?$/\n\n/**\n * The texts that carry `source` on for `count` cells, the first of them next\n * to it. Two or more numbers a constant step apart continue their step, with\n * as many decimals as the most precise of them; anything else repeats, in\n * order. `backward` carries the source on before its first text, as filling\n * up or left does.\n */\nconst series = (\n source: ReadonlyArray<string>,\n count: number,\n backward: boolean,\n): ReadonlyArray<string> => {\n const at = (index: number) => source[((index % source.length) + source.length) % source.length]!\n const repeated = Array.from({ length: count }, (_, index) =>\n backward ? at(-1 - index) : at(source.length + index),\n )\n if (source.length < 2) return repeated\n const parsed = source.map(text => number.exec(text.trim()))\n if (parsed.some(match => match === null)) return repeated\n const decimals = Math.max(...parsed.map(match => match![1]?.length ?? 0))\n // Whole units of the finest decimal, so a step of 0.1 adds up exactly.\n const scale = 10 ** decimals\n const units = source.map(text => Math.round(Number(text.trim()) * scale))\n const step = units[1]! - units[0]!\n if (units.some((unit, index) => index > 0 && unit - units[index - 1]! !== step)) return repeated\n const from = backward ? units[0]! : units[units.length - 1]!\n return Array.from({ length: count }, (_, index) =>\n ((from + (backward ? -step : step) * (index + 1)) / scale).toFixed(decimals),\n )\n}\n\n/** The source's box and the box beyond it toward `to`; none when `to` is inside it. */\nconst plan = <Row, Id extends string>(\n projection: GridProjection<Row, Id>,\n request: FillRequest<Id>,\n): Option.Option<FillPlan<Id>> =>\n Option.flatMap(projection.box(request.source.anchor, request.source.focus), source =>\n Option.flatMap(projection.positionOf(request.to), to => {\n const first = projection.columns.indexOf(source.columns[0]!)\n const last = first + source.columns.length - 1\n const below = to.row - (source.rows.end - 1)\n const above = source.rows.start - to.row\n const right = to.column - last\n const left = first - to.column\n const rows = Math.max(below, above)\n const columns = Math.max(right, left)\n if (rows <= 0 && columns <= 0) return Option.none()\n if (rows >= columns) {\n const target =\n below > 0\n ? { start: source.rows.end, end: to.row + 1 }\n : { start: to.row, end: source.rows.start }\n return Option.some({\n source,\n target: { rows: target, columns: source.columns },\n toward: below > 0 ? 'down' : 'up',\n })\n }\n const columnsOf = (start: number, end: number) => projection.columns.slice(start, end)\n return Option.some({\n source,\n target: {\n rows: source.rows,\n columns: right > 0 ? columnsOf(last + 1, to.column + 1) : columnsOf(to.column, first),\n },\n toward: right > 0 ? 'right' : 'left',\n })\n }),\n )\n\n/**\n * The cells a fill writes: each lane of the source (a column for a fill down\n * or up, a row for one right or left) carried on through the target by\n * `series`. Cells on a column that does not edit, or on a row not loaded, are\n * dropped; each kept cell has `from`, the text it showed.\n */\nconst cells = <Row, Id extends string>(\n projection: GridProjection<Row, Id>,\n fill: FillPlan<Id>,\n options: {\n readonly editable: (column: Id) => boolean\n readonly from: (address: CellAddress<Id>) => string\n },\n): ReadonlyArray<PastedCell<Id>> => {\n const rowsOf = (box: { readonly start: number; readonly end: number }) =>\n Array.from({ length: box.end - box.start }, (_, offset) => box.start + offset)\n const keyAt = (index: number) => projection.rows.keyAt(index)\n const textAt = (index: number, column: Id) =>\n Option.match(keyAt(index), { onNone: () => '', onSome: row => options.from({ row, column }) })\n const cell = (index: number, column: Id, text: string): ReadonlyArray<PastedCell<Id>> =>\n options.editable(column)\n ? Option.match(keyAt(index), {\n onNone: () => [],\n onSome: row => [{ row, column, text, from: options.from({ row, column }) }],\n })\n : []\n const backward = fill.toward === 'up' || fill.toward === 'left'\n // Away from the source, so the series' first text lands next to it.\n const away = <A>(items: ReadonlyArray<A>) => (backward ? [...items].reverse() : items)\n if (fill.toward === 'down' || fill.toward === 'up') {\n const targetRows = away(rowsOf(fill.target.rows))\n return fill.source.columns.flatMap(column => {\n const texts = series(\n rowsOf(fill.source.rows).map(index => textAt(index, column)),\n targetRows.length,\n backward,\n )\n return targetRows.flatMap((index, at) => cell(index, column, texts[at]!))\n })\n }\n const targetColumns = away(fill.target.columns)\n return rowsOf(fill.source.rows).flatMap(index => {\n const texts = series(\n fill.source.columns.map(column => textAt(index, column)),\n targetColumns.length,\n backward,\n )\n return targetColumns.flatMap((column, at) => cell(index, column, texts[at]!))\n })\n}\n\nexport const Fill = { series, plan, cells }\n"],"mappings":";;AAsBA,MAAM,SAAS;;;;;;;;AASf,MAAM,UACJ,QACA,OACA,aAC0B;CAC1B,MAAM,MAAM,UAAkB,QAAS,QAAQ,OAAO,SAAU,OAAO,UAAU,OAAO;CACxF,MAA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,MAAM,QAAQ,KAAK;IAAE;IAAK;GAAO,CAAC;EAAE,CAAC;CAC5E,CAAC,IACD,CAAC;CACP,MAAM,WAAW,KAAK,WAAW,QAAQ,KAAK,WAAW;CAEzD,MAAM,QAAW,UAA6B,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,QAAQ,IAAI;CAChF,IAAI,KAAK,WAAW,UAAU,KAAK,WAAW,MAAM;EAClD,MAAM,aAAa,KAAK,OAAO,KAAK,OAAO,IAAI,CAAC;EAChD,OAAO,KAAK,OAAO,QAAQ,SAAQ,WAAU;GAC3C,MAAM,QAAQ,OACZ,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,KAAI,UAAS,OAAO,OAAO,MAAM,CAAC,GAC3D,WAAW,QACX,QACF;GACA,OAAO,WAAW,SAAS,OAAO,OAAO,KAAK,OAAO,QAAQ,MAAM,GAAI,CAAC;EAC1E,CAAC;CACH;CACA,MAAM,gBAAgB,KAAK,KAAK,OAAO,OAAO;CAC9C,OAAO,OAAO,KAAK,OAAO,IAAI,CAAC,CAAC,SAAQ,UAAS;EAC/C,MAAM,QAAQ,OACZ,KAAK,OAAO,QAAQ,KAAI,WAAU,OAAO,OAAO,MAAM,CAAC,GACvD,cAAc,QACd,QACF;EACA,OAAO,cAAc,SAAS,QAAQ,OAAO,KAAK,OAAO,QAAQ,MAAM,GAAI,CAAC;CAC9E,CAAC;AACH;AAEA,MAAa,OAAO;CAAE;CAAQ;CAAM;AAAM"}
|
|
1
|
+
{"version":3,"file":"fill.js","names":[],"sources":["../src/fill.ts"],"sourcesContent":["import { Option } from 'effect'\nimport type { PastedCell } from './clipboard.js'\nimport type { FillLane } from './columns.js'\nimport type { CellAddress, CellBox, GridProjection } from './projection.js'\n\n/** A fill: the range whose cells are carried on, and the cell it was carried to. */\nexport interface FillRequest<Id extends string> {\n readonly source: { readonly anchor: CellAddress<Id>; readonly focus: CellAddress<Id> }\n readonly to: CellAddress<Id>\n}\n\n/**\n * Where a fill lands: the source's box, and the box it fills beyond it, down,\n * up, right or left, whichever way `to` lies further outside the source. A\n * fill carries on along one axis only, as spreadsheets do.\n */\nexport interface FillPlan<Id extends string> {\n readonly source: CellBox<Id>\n readonly target: CellBox<Id>\n /** Rows (`down`/`up`) or columns (`right`/`left`), away from the source. */\n readonly toward: 'down' | 'up' | 'right' | 'left'\n}\n\nconst number = /^-?\\d+(?:\\.(\\d+))?$/\nconst day = /^(\\d{4})-(\\d{2})-(\\d{2})$/\n\nconst msPerDay = 86_400_000\n\n// `Date.UTC` maps years 0 to 99 to 1900 and up, and normalizes a day that does\n// not exist, so the date is built by its fields and read back.\nconst utcDate = (year: number, month: number, date: number): Date => {\n const made = new Date(0)\n made.setUTCFullYear(year, month, date)\n return made\n}\n\nconst daysInMonth = (year: number, month: number): number =>\n utcDate(year, month + 1, 0).getUTCDate()\n\ninterface CalendarDay {\n readonly year: number\n readonly month: number\n readonly date: number\n /** Whole days since 1970-01-01. */\n readonly epoch: number\n}\n\nconst calendarDay = (text: string): CalendarDay | undefined => {\n const match = day.exec(text.trim())\n if (match === null) return undefined\n const [year, month, date] = [Number(match[1]), Number(match[2]) - 1, Number(match[3])]\n const made = utcDate(year, month, date)\n if (made.getUTCMonth() !== month || made.getUTCDate() !== date) return undefined\n return { year, month, date, epoch: made.getTime() / msPerDay }\n}\n\nconst dayText = (made: Date): string =>\n `${String(made.getUTCFullYear()).padStart(4, '0')}-${String(made.getUTCMonth() + 1).padStart(2, '0')}-${String(made.getUTCDate()).padStart(2, '0')}`\n\n/**\n * Calendar days continued by months when they share a day of the month and\n * are a constant number of months apart, else by days when a constant\n * number of days apart. Each month's day is the source's, clamped to the\n * month's length. None when the source is not such a series.\n */\nconst daySeries = (\n source: ReadonlyArray<string>,\n count: number,\n backward: boolean,\n): ReadonlyArray<string> | undefined => {\n const days = source.map(calendarDay)\n if (days.some(found => found === undefined)) return undefined\n const known = days as ReadonlyArray<CalendarDay>\n const steps = (read: (found: CalendarDay) => number) =>\n known.slice(1).map((found, index) => read(found) - read(known[index]!))\n const constant = (diffs: ReadonlyArray<number>) =>\n diffs[0] !== 0 && diffs.every(diff => diff === diffs[0])\n const first = known[0]!\n const last = known[known.length - 1]!\n const months = steps(found => found.year * 12 + found.month)\n if (known.every(found => found.date === first.date) && constant(months)) {\n const step = months[0]!\n const from = backward ? first : last\n const origin = from.year * 12 + from.month\n return Array.from({ length: count }, (_, index) => {\n const at = origin + (backward ? -step : step) * (index + 1)\n const year = Math.floor(at / 12)\n const month = at - year * 12\n return dayText(utcDate(year, month, Math.min(first.date, daysInMonth(year, month))))\n })\n }\n const dayDiffs = steps(found => found.epoch)\n if (!constant(dayDiffs)) return undefined\n const step = dayDiffs[0]!\n const from = backward ? first : last\n return Array.from({ length: count }, (_, index) =>\n dayText(new Date((from.epoch + (backward ? -step : step) * (index + 1)) * msPerDay)),\n )\n}\n\n/**\n * The texts that carry `source` on for `count` cells, the first of them next\n * to it. Two or more numbers a constant step apart continue their step, with\n * as many decimals as the most precise of them. Two or more `YYYY-MM-DD`\n * days continue by months when they share a day of the month a constant number\n * of months apart (a 31st clamps to a shorter month and comes back), else by\n * a constant number of days. Anything else repeats, in order. `backward` carries the source on before its first text, as filling\n * up or left does.\n */\nconst series = (\n source: ReadonlyArray<string>,\n count: number,\n backward: boolean,\n): ReadonlyArray<string> => {\n const at = (index: number) => source[((index % source.length) + source.length) % source.length]!\n const repeated = Array.from({ length: count }, (_, index) =>\n backward ? at(-1 - index) : at(source.length + index),\n )\n if (source.length < 2) return repeated\n const days = daySeries(source, count, backward)\n if (days !== undefined) return days\n const parsed = source.map(text => number.exec(text.trim()))\n if (parsed.some(match => match === null)) return repeated\n const decimals = Math.max(...parsed.map(match => match![1]?.length ?? 0))\n // Whole units of the finest decimal, so a step of 0.1 adds up exactly.\n const scale = 10 ** decimals\n const units = source.map(text => Math.round(Number(text.trim()) * scale))\n const step = units[1]! - units[0]!\n if (units.some((unit, index) => index > 0 && unit - units[index - 1]! !== step)) return repeated\n const from = backward ? units[0]! : units[units.length - 1]!\n return Array.from({ length: count }, (_, index) =>\n ((from + (backward ? -step : step) * (index + 1)) / scale).toFixed(decimals),\n )\n}\n\n/** The source's box and the box beyond it toward `to`; none when `to` is inside it. */\nconst plan = <Row, Id extends string>(\n projection: GridProjection<Row, Id>,\n request: FillRequest<Id>,\n): Option.Option<FillPlan<Id>> =>\n Option.flatMap(projection.box(request.source.anchor, request.source.focus), source =>\n Option.flatMap(projection.positionOf(request.to), to => {\n const first = projection.columns.indexOf(source.columns[0]!)\n const last = first + source.columns.length - 1\n const below = to.row - (source.rows.end - 1)\n const above = source.rows.start - to.row\n const right = to.column - last\n const left = first - to.column\n const rows = Math.max(below, above)\n const columns = Math.max(right, left)\n if (rows <= 0 && columns <= 0) return Option.none()\n if (rows >= columns) {\n const target =\n below > 0\n ? { start: source.rows.end, end: to.row + 1 }\n : { start: to.row, end: source.rows.start }\n return Option.some({\n source,\n target: { rows: target, columns: source.columns },\n toward: below > 0 ? 'down' : 'up',\n })\n }\n const columnsOf = (start: number, end: number) => projection.columns.slice(start, end)\n return Option.some({\n source,\n target: {\n rows: source.rows,\n columns: right > 0 ? columnsOf(last + 1, to.column + 1) : columnsOf(to.column, first),\n },\n toward: right > 0 ? 'right' : 'left',\n })\n }),\n )\n\n/** A cell a fill writes, or one it could not: `refusal` is why no text was given. */\nexport interface FilledCell<Id extends string> extends PastedCell<Id> {\n readonly refusal?: string\n}\n\nconst noSeriesText = 'The column’s series gave no text here'\n\n/**\n * The cells a fill writes: each lane of the source (a column for a fill down\n * or up, a row for one right or left) carried on through the target by\n * `series`, or by the column's `custom` series when it answers (fills down\n * and up only). A custom answer shorter than the target leaves the cells past\n * it with a `refusal`. Cells on a column that does not edit, or on a row not loaded, are\n * dropped; each kept cell has `from`, the text it showed.\n */\nconst cells = <Row, Id extends string>(\n projection: GridProjection<Row, Id>,\n fill: FillPlan<Id>,\n options: {\n readonly editable: (column: Id) => boolean\n readonly from: (address: CellAddress<Id>) => string\n readonly custom?: (column: Id, lane: FillLane) => Option.Option<ReadonlyArray<string>>\n },\n): ReadonlyArray<FilledCell<Id>> => {\n const rowsOf = (box: { readonly start: number; readonly end: number }) =>\n Array.from({ length: box.end - box.start }, (_, offset) => box.start + offset)\n const keyAt = (index: number) => projection.rows.keyAt(index)\n const textAt = (index: number, column: Id) =>\n Option.match(keyAt(index), { onNone: () => '', onSome: row => options.from({ row, column }) })\n const cell = (\n index: number,\n column: Id,\n text: string | undefined,\n ): ReadonlyArray<FilledCell<Id>> =>\n options.editable(column)\n ? Option.match(keyAt(index), {\n onNone: () => [],\n onSome: row => {\n const from = options.from({ row, column })\n return [\n text === undefined\n ? { row, column, text: '', from, refusal: noSeriesText }\n : { row, column, text, from },\n ]\n },\n })\n : []\n const backward = fill.toward === 'up' || fill.toward === 'left'\n // Away from the source, so the series' first text lands next to it.\n const away = <A>(items: ReadonlyArray<A>) => (backward ? [...items].reverse() : items)\n if (fill.toward === 'down' || fill.toward === 'up') {\n const targetRows = away(rowsOf(fill.target.rows))\n return fill.source.columns.flatMap(column => {\n const source = rowsOf(fill.source.rows).map(index => textAt(index, column))\n const count = targetRows.length\n const texts = Option.getOrElse(\n options.custom?.(column, { source, count, toward: backward ? 'up' : 'down' }) ??\n Option.none(),\n () => series(source, count, backward),\n )\n return targetRows.flatMap((index, at) => cell(index, column, texts[at]))\n })\n }\n const targetColumns = away(fill.target.columns)\n return rowsOf(fill.source.rows).flatMap(index => {\n const texts = series(\n fill.source.columns.map(column => textAt(index, column)),\n targetColumns.length,\n backward,\n )\n return targetColumns.flatMap((column, at) => cell(index, column, texts[at]))\n })\n}\n\nexport const Fill = { series, plan, cells }\n"],"mappings":";;AAuBA,MAAM,SAAS;AACf,MAAM,MAAM;AAEZ,MAAM,WAAW;AAIjB,MAAM,WAAW,MAAc,OAAe,SAAuB;CACnE,MAAM,uBAAO,IAAI,KAAK,CAAC;CACvB,KAAK,eAAe,MAAM,OAAO,IAAI;CACrC,OAAO;AACT;AAEA,MAAM,eAAe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