refactor: 🚚 rename jslib to use `@upnd` scope
parent
4cc38dfaa3
commit
f79995b6f4
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "upend",
|
||||
"name": "@upnd/upend",
|
||||
"version": "0.0.1",
|
||||
"description": "Client library to interact with the UpEnd system.",
|
||||
"scripts": {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
"@types/debug": "^4.1.8",
|
||||
"@types/dompurify": "^2.4.0",
|
||||
"@types/lodash": "^4.14.197",
|
||||
"@types/lru-cache": "^7.10.10",
|
||||
"@types/marked": "^4.3.1",
|
||||
"@types/three": "^0.143.2",
|
||||
"@types/wavesurfer.js": "^6.0.6",
|
||||
|
@ -75,7 +74,7 @@
|
|||
"svelte-i18next": "^1.2.2",
|
||||
"svelte-navigator": "^3.2.2",
|
||||
"three": "^0.147.0",
|
||||
"upend": "file:../tools/upend_js",
|
||||
"@upnd/upend": "file:../tools/upend_js",
|
||||
"wavesurfer.js": "^6.6.4"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,6 +11,9 @@ dependencies:
|
|||
'@recogito/annotorious':
|
||||
specifier: ^2.7.11
|
||||
version: 2.7.11(react-dom@18.2.0)(react@18.2.0)
|
||||
'@upnd/upend':
|
||||
specifier: file:../tools/upend_js
|
||||
version: file:../tools/upend_js
|
||||
boxicons:
|
||||
specifier: ^2.1.4
|
||||
version: 2.1.4
|
||||
|
@ -71,9 +74,6 @@ dependencies:
|
|||
three:
|
||||
specifier: ^0.147.0
|
||||
version: 0.147.0
|
||||
upend:
|
||||
specifier: file:../tools/upend_js
|
||||
version: file:../tools/upend_js
|
||||
wavesurfer.js:
|
||||
specifier: ^6.6.4
|
||||
version: 6.6.4
|
||||
|
@ -118,9 +118,6 @@ devDependencies:
|
|||
'@types/lodash':
|
||||
specifier: ^4.14.197
|
||||
version: 4.14.197
|
||||
'@types/lru-cache':
|
||||
specifier: ^7.10.10
|
||||
version: 7.10.10
|
||||
'@types/marked':
|
||||
specifier: ^4.3.1
|
||||
version: 4.3.1
|
||||
|
@ -4053,13 +4050,6 @@ packages:
|
|||
resolution: {integrity: sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==}
|
||||
dev: true
|
||||
|
||||
/@types/lru-cache@7.10.10:
|
||||
resolution: {integrity: sha512-nEpVRPWW9EBmx2SCfNn3ClYxPL7IktPX12HhIoSc/H5mMjdeW3+YsXIpseLQ2xF35+OcpwKQbEUw5VtqE4PDNA==}
|
||||
deprecated: This is a stub types definition. lru-cache provides its own type definitions, so you do not need this installed.
|
||||
dependencies:
|
||||
lru-cache: 6.0.0
|
||||
dev: true
|
||||
|
||||
/@types/marked@4.3.1:
|
||||
resolution: {integrity: sha512-vSSbKZFbNktrQ15v7o1EaH78EbWV+sPQbPjHG+Cp8CaNcPFUEfjZ0Iml/V0bFDwsTlYe8o6XC5Hfdp91cqPV2g==}
|
||||
dev: true
|
||||
|
@ -9976,16 +9966,31 @@ packages:
|
|||
|
||||
file:../tools/upend_js:
|
||||
resolution: {directory: ../tools/upend_js, type: directory}
|
||||
name: upend
|
||||
name: '@upnd/upend'
|
||||
dependencies:
|
||||
'@upnd/wasm-node': file:../tools/upend_wasm/pkg-node
|
||||
'@upnd/wasm-web': file:../tools/upend_wasm/pkg-web
|
||||
debug: 4.3.4
|
||||
lru-cache: 7.18.3
|
||||
upend_wasm: file:../tools/upend_wasm/pkg
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
bundledDependencies:
|
||||
- '@upnd/wasm-node'
|
||||
- '@upnd/wasm-web'
|
||||
|
||||
file:../tools/upend_wasm/pkg:
|
||||
resolution: {directory: ../tools/upend_wasm/pkg, type: directory}
|
||||
name: upend_wasm
|
||||
dev: false
|
||||
|
||||
file:../tools/upend_wasm/pkg-node:
|
||||
resolution: {directory: ../tools/upend_wasm/pkg-node, type: directory}
|
||||
name: '@upnd/wasm-node'
|
||||
dev: false
|
||||
|
||||
file:../tools/upend_wasm/pkg-web:
|
||||
resolution: {directory: ../tools/upend_wasm/pkg-web, type: directory}
|
||||
name: '@upnd/wasm-web'
|
||||
dev: false
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import EntryList from "./widgets/EntryList.svelte";
|
||||
import type { UpEntry } from "upend";
|
||||
import type { UpEntry } from "@upnd/upend";
|
||||
import Icon from "./utils/Icon.svelte";
|
||||
import IconButton from "./utils/IconButton.svelte";
|
||||
import { createEventDispatcher, type ComponentType } from "svelte";
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
import UpObject from "./display/UpObject.svelte";
|
||||
import { createEventDispatcher, setContext } from "svelte";
|
||||
import { derived, writable, type Readable } from "svelte/store";
|
||||
import type { UpEntry } from "upend";
|
||||
import type { UpEntry } from "@upnd/upend";
|
||||
import Spinner from "./utils/Spinner.svelte";
|
||||
import NotesEditor from "./utils/NotesEditor.svelte";
|
||||
import type { WidgetChange } from "../types/base";
|
||||
import type { EntityInfo } from "upend/types";
|
||||
import type { EntityInfo } from "@upnd/upend/types";
|
||||
import IconButton from "./utils/IconButton.svelte";
|
||||
import type { BrowseContext } from "../util/browse";
|
||||
import { Link, useParams } from "svelte-navigator";
|
||||
|
@ -17,7 +17,7 @@
|
|||
import EntryList from "./widgets/EntryList.svelte";
|
||||
import api from "../lib/api";
|
||||
import EntityList from "./widgets/EntityList.svelte";
|
||||
import { ATTR_IN, ATTR_LABEL, ATTR_KEY, ATTR_OF } from "upend/constants";
|
||||
import { ATTR_IN, ATTR_LABEL, ATTR_KEY, ATTR_OF } from "@upnd/upend/constants";
|
||||
import InspectGroups from "./InspectGroups.svelte";
|
||||
import InspectTypeEditor from "./InspectTypeEditor.svelte";
|
||||
import LabelBorder from "./utils/LabelBorder.svelte";
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
import UpObjectDisplay from "./display/UpObject.svelte";
|
||||
import Selector from "./utils/Selector.svelte";
|
||||
import IconButton from "./utils/IconButton.svelte";
|
||||
import type { IValue } from "upend/types";
|
||||
import type { IValue } from "@upnd/upend/types";
|
||||
import api from "../lib/api";
|
||||
import { ATTR_IN } from "upend/constants";
|
||||
import { ATTR_IN } from "@upnd/upend/constants";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { i18n } from "../i18n";
|
||||
import type { UpObject } from "upend";
|
||||
import type { UpObject } from "@upnd/upend";
|
||||
import type { Readable } from "svelte/store";
|
||||
import LabelBorder from "./utils/LabelBorder.svelte";
|
||||
const dispatch = createEventDispatcher();
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
import IconButton from "./utils/IconButton.svelte";
|
||||
import api from "../lib/api";
|
||||
import { i18n } from "../i18n";
|
||||
import type { UpObject, UpEntry } from "upend";
|
||||
import type { UpObject, UpEntry } from "@upnd/upend";
|
||||
import type { Readable } from "svelte/store";
|
||||
import { ATTR_OF } from "upend/constants";
|
||||
import { ATTR_OF } from "@upnd/upend/constants";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import LabelBorder from "./utils/LabelBorder.svelte";
|
||||
const dispatch = createEventDispatcher();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import { createEventDispatcher } from "svelte";
|
||||
import { getTypes } from "../../util/mediatypes";
|
||||
import { concurrentImage } from "../imageQueue";
|
||||
import { ATTR_IN } from "upend/constants";
|
||||
import { ATTR_IN } from "@upnd/upend/constants";
|
||||
import AudioPreview from "./blobs/AudioPreview.svelte";
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import type { UpEntry } from "upend";
|
||||
import type { UpEntry } from "@upnd/upend";
|
||||
import { attributeLabels } from "../../util/labels";
|
||||
import UpObject from "./UpObject.svelte";
|
||||
export let resolve = true;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import { getContext } from "svelte";
|
||||
import { useNavigate, useLocation } from "svelte-navigator";
|
||||
import { readable } from "svelte/store";
|
||||
import type { Address, VALUE_TYPE } from "upend/types";
|
||||
import type { Address, VALUE_TYPE } from "@upnd/upend/types";
|
||||
import type { BrowseContext } from "../../util/browse";
|
||||
import api from "../../lib/api";
|
||||
const location = useLocation();
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
import IconButton from "../utils/IconButton.svelte";
|
||||
import { vaultInfo } from "../../util/info";
|
||||
import type { BrowseContext } from "../../util/browse";
|
||||
import type { UpObject } from "upend";
|
||||
import type { ADDRESS_TYPE, EntityInfo } from "upend/types";
|
||||
import type { UpObject } from "@upnd/upend";
|
||||
import type { ADDRESS_TYPE, EntityInfo } from "@upnd/upend/types";
|
||||
import { useEntity } from "../../lib/entity";
|
||||
import { i18n } from "../../i18n";
|
||||
import api from "../../lib/api";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { debounce, throttle } from "lodash";
|
||||
import { onMount } from "svelte";
|
||||
import type { IValue } from "upend/types";
|
||||
import type { IValue } from "@upnd/upend/types";
|
||||
import type WaveSurfer from "wavesurfer.js";
|
||||
import type { Region, RegionParams } from "wavesurfer.js/src/plugin/regions";
|
||||
import api from "../../../lib/api";
|
||||
|
@ -13,7 +13,7 @@
|
|||
import IconButton from "../../../components/utils/IconButton.svelte";
|
||||
import LabelBorder from "../../../components/utils/LabelBorder.svelte";
|
||||
import { i18n } from "../../../i18n";
|
||||
import { ATTR_LABEL } from "upend/constants";
|
||||
import { ATTR_LABEL } from "@upnd/upend/constants";
|
||||
import debug from "debug";
|
||||
const dbg = debug("kestrel:AudioViewer");
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts">
|
||||
import type { IEntry } from "upend/types";
|
||||
import type { IEntry } from "@upnd/upend/types";
|
||||
|
||||
import api from "../../../lib/api";
|
||||
import { useEntity } from "../../../lib/entity";
|
||||
import IconButton from "../../utils/IconButton.svelte";
|
||||
import Spinner from "../../utils/Spinner.svelte";
|
||||
import UpObject from "../UpObject.svelte";
|
||||
import { ATTR_LABEL } from "upend/constants";
|
||||
import { ATTR_LABEL } from "@upnd/upend/constants";
|
||||
import { i18n } from "../../../i18n";
|
||||
|
||||
export let address: string;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import type { IJob } from "upend/types";
|
||||
import type { IJob } from "@upnd/upend/types";
|
||||
import { fade } from "svelte/transition";
|
||||
import ProgessBar from "../utils/ProgessBar.svelte";
|
||||
import api from "../../lib/api";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import Selector from "./Selector.svelte";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import type { IValue } from "upend/types";
|
||||
import type { IValue } from "@upnd/upend/types";
|
||||
import IconButton from "./IconButton.svelte";
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import { createEventDispatcher } from "svelte";
|
||||
import { useEntity } from "../../lib/entity";
|
||||
import type { AttributeCreate, AttributeUpdate } from "../../types/base";
|
||||
import type { UpEntry } from "upend";
|
||||
import type { UpEntry } from "@upnd/upend";
|
||||
import LabelBorder from "./LabelBorder.svelte";
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts">
|
||||
import { debounce } from "lodash";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import type { UpListing } from "upend";
|
||||
import type { IValue, VALUE_TYPE } from "upend/types";
|
||||
import type { UpListing } from "@upnd/upend";
|
||||
import type { IValue, VALUE_TYPE } from "@upnd/upend/types";
|
||||
import { baseSearchOnce, createLabelled } from "../../util/search";
|
||||
import UpObject from "../display/UpObject.svelte";
|
||||
import IconButton from "./IconButton.svelte";
|
||||
|
@ -10,7 +10,7 @@
|
|||
const dispatch = createEventDispatcher();
|
||||
import { matchSorter } from "match-sorter";
|
||||
import api from "../../lib/api";
|
||||
import { ATTR_LABEL } from "upend/constants";
|
||||
import { ATTR_LABEL } from "@upnd/upend/constants";
|
||||
import { i18n } from "../../i18n";
|
||||
import debug from "debug";
|
||||
const dbg = debug("kestrel:Selector");
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<script lang="ts">
|
||||
import { readable, type Readable } from "svelte/store";
|
||||
import type { UpListing } from "upend";
|
||||
import type { Address, IValue } from "upend/types";
|
||||
import type { UpListing } from "@upnd/upend";
|
||||
import type { Address, IValue } from "@upnd/upend/types";
|
||||
import { query } from "../../lib/entity";
|
||||
import UpObject from "../display/UpObject.svelte";
|
||||
import UpObjectCard from "../display/UpObjectCard.svelte";
|
||||
import { ATTR_LABEL } from "upend/constants";
|
||||
import { ATTR_LABEL } from "@upnd/upend/constants";
|
||||
import { i18n } from "../../i18n";
|
||||
import Icon from "../utils/Icon.svelte";
|
||||
import IconButton from "../utils/IconButton.svelte";
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
import UpObject from "../display/UpObject.svelte";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import type { WidgetChange, AttributeUpdate } from "../../types/base";
|
||||
import type { UpEntry, UpListing } from "upend";
|
||||
import type { UpEntry, UpListing } from "@upnd/upend";
|
||||
import IconButton from "../utils/IconButton.svelte";
|
||||
import Selector from "../utils/Selector.svelte";
|
||||
import type { IValue } from "upend/types";
|
||||
import type { IValue } from "@upnd/upend/types";
|
||||
import Editable from "../utils/Editable.svelte";
|
||||
import { query } from "../../lib/entity";
|
||||
import { type Readable, readable } from "svelte/store";
|
||||
|
@ -17,7 +17,7 @@
|
|||
import { formatDuration } from "../../util/fragments/time";
|
||||
import { i18n } from "../../i18n";
|
||||
import UpLink from "../display/UpLink.svelte";
|
||||
import { ATTR_ADDED, ATTR_LABEL } from "upend/constants";
|
||||
import { ATTR_ADDED, ATTR_LABEL } from "@upnd/upend/constants";
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
export let columns: string | undefined = undefined;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import { UpEndApi } from "upend/api";
|
||||
import wasmURL from "upend/upend_wasm_bg.wasm?url";
|
||||
import { UpEndApi } from "@upnd/upend";
|
||||
import { UpEndWasmExtensionsWeb } from "@upnd/upend/wasm/web";
|
||||
|
||||
export default new UpEndApi("/", wasmURL);
|
||||
// import wasmURL from "@upnd/upend/upend_wasm_bg.wasm?url";
|
||||
console.log({ UpEndWasmExtensionsWeb, UpEndApi });
|
||||
const wasm = new UpEndWasmExtensionsWeb();
|
||||
export default new UpEndApi("/", wasm);
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
// import { useSWR } from "sswr";
|
||||
import { derived, type Readable } from "svelte/store";
|
||||
import { UpListing, UpObject } from "upend";
|
||||
import type { ListingResult, EntityListing, EntityInfo } from "upend/types";
|
||||
import { UpListing, UpObject } from "@upnd/upend";
|
||||
import type {
|
||||
ListingResult,
|
||||
EntityListing,
|
||||
EntityInfo,
|
||||
} from "@upnd/upend/types";
|
||||
import { useSWR } from "../util/fetch";
|
||||
import api from "./api";
|
||||
import debug from "debug";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { IValue } from "upend/types";
|
||||
import type { IValue } from "@upnd/upend/types";
|
||||
|
||||
export type WidgetChange =
|
||||
| AttributeCreate
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import api from "../lib/api";
|
||||
import { readable, type Readable } from "svelte/store";
|
||||
import type { VaultInfo } from "upend/types";
|
||||
import type { VaultInfo } from "@upnd/upend/types";
|
||||
|
||||
export const vaultInfo: Readable<VaultInfo> = readable(undefined, (set) => {
|
||||
api.fetchInfo().then(async (info) => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { EntityInfo } from "upend/types";
|
||||
import type { UpObject } from "upend";
|
||||
import { ATTR_IN } from "upend/constants";
|
||||
import type { EntityInfo } from "@upnd/upend/types";
|
||||
import type { UpObject } from "@upnd/upend";
|
||||
import { ATTR_IN } from "@upnd/upend/constants";
|
||||
|
||||
export function getTypes(entity: UpObject, entityInfo: EntityInfo) {
|
||||
const mimeType = String(entity?.get("FILE_MIME"));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { PutInput } from "upend/types";
|
||||
import type { PutInput } from "@upnd/upend/types";
|
||||
import { query as queryFn } from "../lib/entity";
|
||||
import api from "../lib/api";
|
||||
import { ATTR_LABEL } from "upend/constants";
|
||||
import { ATTR_LABEL } from "@upnd/upend/constants";
|
||||
|
||||
export function baseSearch(query: string) {
|
||||
return queryFn(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { UpEntry } from "upend";
|
||||
import type { UpEntry } from "@upnd/upend";
|
||||
|
||||
export type SortKeys = { [key: string]: string[] };
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import EntityList from "../components/widgets/EntityList.svelte";
|
||||
import type { Widget } from "../components/EntryView.svelte";
|
||||
import { Link } from "svelte-navigator";
|
||||
import { UpListing } from "upend";
|
||||
import { UpListing } from "@upnd/upend";
|
||||
import EntryView from "../components/EntryView.svelte";
|
||||
import UpObject from "../components/display/UpObject.svelte";
|
||||
import UpObjectCard from "../components/display/UpObjectCard.svelte";
|
||||
|
@ -18,7 +18,7 @@
|
|||
ATTR_IN,
|
||||
ATTR_LABEL,
|
||||
HIER_ROOT_ADDR,
|
||||
} from "upend/constants";
|
||||
} from "@upnd/upend/constants";
|
||||
|
||||
const roots = (async () => {
|
||||
const data = await api.fetchRoots();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import debounce from "lodash/debounce";
|
||||
import { type Readable, readable } from "svelte/store";
|
||||
import type { UpListing } from "upend";
|
||||
import type { UpListing } from "@upnd/upend";
|
||||
import Spinner from "../components/utils/Spinner.svelte";
|
||||
import UpEntryDisplay from "../components/display/UpEntry.svelte";
|
||||
import UpObjectCard from "../components/display/UpObjectCard.svelte";
|
||||
|
@ -13,7 +13,7 @@
|
|||
import api from "../lib/api";
|
||||
import EntityList from "../components/widgets/EntityList.svelte";
|
||||
import { matchSorter } from "match-sorter";
|
||||
import { ATTR_LABEL } from "upend/constants";
|
||||
import { ATTR_LABEL } from "@upnd/upend/constants";
|
||||
const navigate = useNavigate();
|
||||
|
||||
export let query: string;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import UpObjectCard from "../components/display/UpObjectCard.svelte";
|
||||
import BlobPreview from "../components/display/BlobPreview.svelte";
|
||||
import { i18n } from "../i18n";
|
||||
import type { IValue } from "upend/types";
|
||||
import type { IValue } from "@upnd/upend/types";
|
||||
import { useNavigate } from "svelte-navigator";
|
||||
const navigate = useNavigate();
|
||||
|
||||
|
|
Loading…
Reference in New Issue