Rename anki/ to lib/ for export

import _ from "anki/x";

will become

import _ from "lib/x";

to fit the directory name.
This commit is contained in:
Henrik Giesel 2021-04-22 19:55:26 +02:00 committed by Damien Elmes
parent 8b4446d044
commit 1d72599a37
51 changed files with 94 additions and 94 deletions

View File

@ -3,12 +3,12 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import { buildNextLearnMsg } from "./lib";
import { bridgeLink } from "anki/bridgecommand";
import { bridgeLink } from "lib/bridgecommand";
export let info: pb.BackendProto.CongratsInfoOut;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
const congrats = tr.schedulingCongratulationsFinished();
const nextLearnMsg = buildNextLearnMsg(info);

View File

@ -2,8 +2,8 @@
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { getCongratsInfo } from "./lib";
import { setupI18n, ModuleName } from "anki/i18n";
import { checkNightMode } from "anki/nightmode";
import { setupI18n, ModuleName } from "lib/i18n";
import { checkNightMode } from "lib/nightmode";
import CongratsPage from "./CongratsPage.svelte";

View File

@ -1,11 +1,11 @@
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import pb from "anki/backend_proto";
import { postRequest } from "anki/postrequest";
import { naturalUnit, unitAmount, unitName } from "anki/time";
import pb from "lib/backend_proto";
import { postRequest } from "lib/postrequest";
import { naturalUnit, unitAmount, unitName } from "lib/time";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export async function getCongratsInfo(): Promise<pb.BackendProto.CongratsInfoOut> {
return pb.BackendProto.CongratsInfoOut.decode(

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import type { DeckConfigState, ConfigListEntry } from "./lib";
import OptionsDropdown from "./OptionsDropdown.svelte";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import SpinBox from "./SpinBox.svelte";
import type { DeckConfigState } from "./lib";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import SpinBox from "./SpinBox.svelte";
import CheckBox from "./CheckBox.svelte";
import type { DeckConfigState } from "./lib";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import SpinBox from "./SpinBox.svelte";
import SpinBoxFloat from "./SpinBoxFloat.svelte";
import StepsInput from "./StepsInput.svelte";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import SpinBox from "./SpinBox.svelte";
import SpinBoxFloat from "./SpinBoxFloat.svelte";
import CheckBox from "./CheckBox.svelte";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import { textInputModal } from "./textInputModal";
import type { DeckConfigState } from "./lib";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import SpinBox from "./SpinBox.svelte";
import SpinBoxFloat from "./SpinBoxFloat.svelte";
import CheckBox from "./CheckBox.svelte";

View File

@ -2,8 +2,8 @@
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { getDeckConfigInfo, DeckConfigState } from "./lib";
import { setupI18n, ModuleName } from "anki/i18n";
import { checkNightMode } from "anki/nightmode";
import { setupI18n, ModuleName } from "lib/i18n";
import { checkNightMode } from "lib/nightmode";
import DeckConfigPage from "./DeckConfigPage.svelte";
export async function deckConfig(

View File

@ -5,7 +5,7 @@
@typescript-eslint/no-explicit-any: "off",
*/
import * as pb from "anki/backend_proto";
import * as pb from "lib/backend_proto";
import { DeckConfigState } from "./lib";
import { get } from "svelte/store";

View File

@ -5,11 +5,11 @@
@typescript-eslint/no-non-null-assertion: "off",
*/
import pb from "anki/backend_proto";
import { postRequest } from "anki/postrequest";
import pb from "lib/backend_proto";
import { postRequest } from "lib/postrequest";
import { Writable, writable, get, Readable, readable } from "svelte/store";
import { isEqual, cloneDeep } from "lodash-es";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export async function getDeckConfigInfo(
deckId: number

View File

@ -1,7 +1,7 @@
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { TimespanUnit, naturalWholeUnit, unitAmount, unitSeconds } from "anki/time";
import { TimespanUnit, naturalWholeUnit, unitAmount, unitSeconds } from "lib/time";
function unitSuffix(unit: TimespanUnit): string {
switch (unit) {

View File

@ -4,7 +4,7 @@ import type WithShortcut from "editor-toolbar/WithShortcut.svelte";
import type { WithShortcutProps } from "editor-toolbar/WithShortcut";
import type { DynamicSvelteComponent } from "sveltelib/dynamicComponent";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import { iconButton, withShortcut } from "editor-toolbar/dynamicComponents";
import bracketsIcon from "./code-brackets.svg";

View File

@ -10,7 +10,7 @@ import {
buttonGroup,
withShortcut,
} from "editor-toolbar/dynamicComponents";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import squareFillIcon from "./square-fill.svg";
import "./color.css";

View File

@ -8,7 +8,7 @@ import type { DynamicSvelteComponent } from "sveltelib/dynamicComponent";
import type { EditingArea } from "./editingArea";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import {
commandIconButton,
iconButton,

View File

@ -4,7 +4,7 @@ import type ButtonGroup from "editor-toolbar/ButtonGroup.svelte";
import type { ButtonGroupProps } from "editor-toolbar/ButtonGroup";
import type { DynamicSvelteComponent } from "sveltelib/dynamicComponent";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import {
commandIconButton,
iconButton,

View File

@ -3,7 +3,7 @@
import { filterHTML } from "html-filter";
import { updateActiveButtons, disableButtons } from "editor-toolbar";
import { setupI18n, ModuleName } from "anki/i18n";
import { setupI18n, ModuleName } from "lib/i18n";
import "./fields.css";

View File

@ -5,7 +5,7 @@ import type { ButtonGroupProps } from "editor-toolbar/ButtonGroup";
import type { DynamicSvelteComponent } from "sveltelib/dynamicComponent";
import { bridgeCommand } from "anki/bridgecommand";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import {
labelButton,
buttonGroup,

View File

@ -6,7 +6,7 @@ import type ButtonGroup from "editor-toolbar/ButtonGroup.svelte";
import type { ButtonGroupProps } from "editor-toolbar/ButtonGroup";
import type { DynamicSvelteComponent } from "sveltelib/dynamicComponent";
import { bridgeCommand } from "anki/bridgecommand";
import { bridgeCommand } from "lib/bridgecommand";
import {
iconButton,
withDropdownMenu,
@ -15,7 +15,7 @@ import {
buttonGroup,
withShortcut,
} from "editor-toolbar/dynamicComponents";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import { wrap } from "./wrap";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import type { PreferenceStore } from "sveltelib/preferences";
import { createEventDispatcher } from "svelte";
@ -20,7 +20,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { GraphData } from "./added";
export let sourceData: pb.BackendProto.GraphsOut | null = null;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export let preferences: PreferenceStore<pb.BackendProto.GraphPreferences>;
let histogramData = null as HistogramData | null;

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import Graph from "./Graph.svelte";
import InputBox from "./InputBox.svelte";
@ -15,7 +15,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { defaultGraphBounds, GraphRange, RevlogRange } from "./graph-helpers";
export let sourceData: pb.BackendProto.GraphsOut | null = null;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export let revlogRange: RevlogRange;
let graphRange: GraphRange = GraphRange.Year;

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import type { PreferenceStore } from "sveltelib/preferences";
import { createEventDispatcher } from "svelte";
@ -21,7 +21,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let sourceData: pb.BackendProto.GraphsOut;
export let preferences: PreferenceStore<pb.BackendProto.GraphPreferences>;
export let revlogRange: RevlogRange;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export let nightMode: boolean;
let { calendarFirstDayOfWeek } = preferences;

View File

@ -4,7 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import { createEventDispatcher } from "svelte";
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import type { PreferenceStore } from "sveltelib/preferences";
import Graph from "./Graph.svelte";
@ -16,7 +16,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { GraphData, TableDatum } from "./card-counts";
export let sourceData: pb.BackendProto.GraphsOut;
import * as tr2 from "anki/i18n";
import * as tr2 from "lib/i18n";
export let preferences: PreferenceStore<pb.BackendProto.GraphPreferences>;
let { cardCountsSeparateInactive, browserLinksSupported } = preferences;

View File

@ -3,8 +3,8 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type pb from "anki/backend_proto";
import * as tr from "anki/i18n";
import type pb from "lib/backend_proto";
import * as tr from "lib/i18n";
import type { PreferenceStore } from "sveltelib/preferences";
import { createEventDispatcher } from "svelte";

View File

@ -5,7 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<script lang="typescript">
import { createEventDispatcher } from "svelte";
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import Graph from "./Graph.svelte";
import InputBox from "./InputBox.svelte";
@ -21,7 +21,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { GraphData } from "./future-due";
export let sourceData: pb.BackendProto.GraphsOut | null = null;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export let preferences: PreferenceStore<pb.BackendProto.GraphPreferences>;
const dispatch = createEventDispatcher<SearchEventMap>();

View File

@ -4,9 +4,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import { RevlogRange, GraphRange } from "./graph-helpers";
import { timeSpan, MONTH, YEAR } from "anki/time";
import { timeSpan, MONTH, YEAR } from "lib/time";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export let revlogRange: RevlogRange;
export let graphRange: GraphRange;
export let followRevlog: boolean = false;

View File

@ -6,7 +6,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { SvelteComponent } from "svelte/internal";
import { writable } from "svelte/store";
import { bridgeCommand } from "anki/bridgecommand";
import { bridgeCommand } from "lib/bridgecommand";
import WithGraphData from "./WithGraphData.svelte";

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import Graph from "./Graph.svelte";
import InputBox from "./InputBox.svelte";
@ -16,7 +16,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { renderHours } from "./hours";
export let sourceData: pb.BackendProto.GraphsOut | null = null;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export let revlogRange: RevlogRange;
let graphRange: GraphRange = GraphRange.Year;

View File

@ -3,9 +3,9 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import { timeSpan, MONTH } from "anki/time";
import { timeSpan, MONTH } from "lib/time";
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import type { PreferenceStore } from "sveltelib/preferences";
import { createEventDispatcher } from "svelte";
@ -24,7 +24,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { TableDatum, SearchEventMap } from "./graph-helpers";
export let sourceData: pb.BackendProto.GraphsOut | null = null;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export let preferences: PreferenceStore<pb.BackendProto.GraphPreferences>;
const dispatch = createEventDispatcher<SearchEventMap>();

View File

@ -5,7 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<script lang="typescript">
import type { GraphBounds } from "./graph-helpers";
export let bounds: GraphBounds;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
const noData = tr.statisticsNoData();
</script>

View File

@ -7,7 +7,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import InputBox from "./InputBox.svelte";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
import { RevlogRange, daysToRevlogRange } from "./graph-helpers";
enum SearchRange {

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import Graph from "./Graph.svelte";
import InputBox from "./InputBox.svelte";
@ -21,7 +21,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let sourceData: pb.BackendProto.GraphsOut | null = null;
export let revlogRange: RevlogRange;
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
let graphData: GraphData | null = null;

View File

@ -4,7 +4,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type { TableDatum } from "./graph-helpers";
import { i18n } from "anki/i18n";
import { i18n } from "lib/i18n";
export let tableData: TableDatum[];
</script>

View File

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="typescript">
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import Graph from "./Graph.svelte";

View File

@ -6,8 +6,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type { Writable } from "svelte/store";
import type { PreferenceRaw, PreferencePayload } from "sveltelib/preferences";
import pb from "anki/backend_proto";
import { postRequest } from "anki/postrequest";
import pb from "lib/backend_proto";
import { postRequest } from "lib/postrequest";
import useAsync from "sveltelib/async";
import useAsyncReactive from "sveltelib/asyncReactive";

View File

@ -6,7 +6,7 @@
@typescript-eslint/no-explicit-any: "off",
*/
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import {
extent,
@ -19,10 +19,10 @@ import {
import type { Bin } from "d3";
import type { HistogramData } from "./histogram-graph";
import { dayLabel } from "anki/time";
import { dayLabel } from "lib/time";
import { GraphRange } from "./graph-helpers";
import type { TableDatum, SearchDispatch } from "./graph-helpers";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export interface GraphData {
daysAdded: number[];

View File

@ -6,7 +6,7 @@
@typescript-eslint/no-explicit-any: "off",
*/
import pb from "anki/backend_proto";
import pb from "lib/backend_proto";
import {
interpolateRdYlGn,
@ -26,7 +26,7 @@ import {
GraphRange,
millisecondCutoffForRange,
} from "./graph-helpers";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
type ButtonCounts = [number, number, number, number];

View File

@ -5,7 +5,7 @@
@typescript-eslint/no-non-null-assertion: "off",
*/
import pb from "anki/backend_proto";
import pb from "lib/backend_proto";
import {
interpolateBlues,
select,
@ -29,8 +29,8 @@ import {
SearchDispatch,
} from "./graph-helpers";
import { clickableClass } from "./graph-styles";
import { i18n } from "anki/i18n";
import * as tr from "anki/i18n";
import { i18n } from "lib/i18n";
import * as tr from "lib/i18n";
export interface GraphData {
// indexed by day, where day is relative to today

View File

@ -6,8 +6,8 @@
@typescript-eslint/no-explicit-any: "off",
*/
import { CardQueue, CardType } from "anki/cards";
import type pb from "anki/backend_proto";
import { CardQueue, CardType } from "lib/cards";
import type pb from "lib/backend_proto";
import {
schemeGreens,
schemeBlues,
@ -22,7 +22,7 @@ import {
} from "d3";
import type { GraphBounds } from "./graph-helpers";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
type Count = [string, number, boolean, string];
export interface GraphData {

View File

@ -6,7 +6,7 @@
@typescript-eslint/no-explicit-any: "off",
*/
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import {
extent,
histogram,
@ -16,11 +16,11 @@ import {
interpolateRdYlGn,
} from "d3";
import type { Bin, ScaleLinear } from "d3";
import { CardType } from "anki/cards";
import { CardType } from "lib/cards";
import type { HistogramData } from "./histogram-graph";
import type { TableDatum, SearchDispatch } from "./graph-helpers";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export interface GraphData {
eases: number[];

View File

@ -6,7 +6,7 @@
@typescript-eslint/no-explicit-any: "off",
*/
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import {
extent,
histogram,
@ -17,13 +17,13 @@ import {
interpolateGreens,
} from "d3";
import type { Bin } from "d3";
import { CardQueue } from "anki/cards";
import { CardQueue } from "lib/cards";
import type { HistogramData } from "./histogram-graph";
import { dayLabel } from "anki/time";
import { dayLabel } from "lib/time";
import { GraphRange } from "./graph-helpers";
import type { TableDatum, SearchDispatch } from "./graph-helpers";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export interface GraphData {
dueCounts: Map<number, number>;

View File

@ -6,7 +6,7 @@
@typescript-eslint/no-explicit-any: "off",
@typescript-eslint/ban-ts-comment: "off" */
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import type { Selection } from "d3";
// amount of data to fetch from backend

View File

@ -6,7 +6,7 @@
@typescript-eslint/no-explicit-any: "off",
*/
import pb from "anki/backend_proto";
import pb from "lib/backend_proto";
import {
interpolateBlues,
select,
@ -29,7 +29,7 @@ import {
millisecondCutoffForRange,
} from "./graph-helpers";
import { oddTickClass } from "./graph-styles";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
interface Hour {
hour: number;

View File

@ -3,8 +3,8 @@
import type { SvelteComponent } from "svelte/internal";
import { setupI18n, ModuleName } from "anki/i18n";
import { checkNightMode } from "anki/nightmode";
import { setupI18n, ModuleName } from "lib/i18n";
import { checkNightMode } from "lib/nightmode";
import GraphsPage from "./GraphsPage.svelte";

View File

@ -6,7 +6,7 @@
@typescript-eslint/no-explicit-any: "off",
*/
import type pb from "anki/backend_proto";
import type pb from "lib/backend_proto";
import {
extent,
histogram,
@ -18,12 +18,12 @@ import {
interpolateBlues,
} from "d3";
import type { Bin } from "d3";
import { CardType } from "anki/cards";
import { CardType } from "lib/cards";
import type { HistogramData } from "./histogram-graph";
import type { TableDatum, SearchDispatch } from "./graph-helpers";
import { timeSpan } from "anki/time";
import * as tr from "anki/i18n";
import { timeSpan } from "lib/time";
import * as tr from "lib/i18n";
export interface IntervalGraphData {
intervals: number[];

View File

@ -6,9 +6,9 @@
@typescript-eslint/no-explicit-any: "off",
*/
import pb from "anki/backend_proto";
import pb from "lib/backend_proto";
import { timeSpan, dayLabel } from "anki/time";
import { timeSpan, dayLabel } from "lib/time";
import {
interpolateGreens,
interpolateReds,
@ -34,7 +34,7 @@ import type { Bin } from "d3";
import type { TableDatum } from "./graph-helpers";
import { GraphBounds, setDataAvailable, GraphRange } from "./graph-helpers";
import { showTooltip, hideTooltip } from "./tooltip";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
interface Reviews {
learn: number;

View File

@ -1,10 +1,10 @@
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import pb from "anki/backend_proto";
import { studiedToday } from "anki/time";
import pb from "lib/backend_proto";
import { studiedToday } from "lib/time";
import * as tr from "anki/i18n";
import * as tr from "lib/i18n";
export interface TodayData {
title: string;

View File

@ -52,7 +52,7 @@ ts_library(
data = [
"backend_proto",
],
module_name = "anki",
module_name = "lib",
tsconfig = "//:tsconfig.json",
visibility = ["//visibility:public"],
deps = [

View File

@ -6,7 +6,7 @@
"lib": ["es2017", "es2019.array", "es2018.promise", "dom", "dom.iterable"],
"baseUrl": ".",
"paths": {
"anki/*": ["../bazel-bin/ts/lib/*"],
"lib/*": ["../bazel-bin/ts/lib/*"],
"sveltelib/*": ["../bazel-bin/ts/sveltelib/*"],
"html-filter/*": ["../bazel-bin/ts/html-filter/*"],
"editor-toolbar/*": ["../bazel-bin/ts/editor-toolbar/*"]