api,http-api,interface: fixing exports and correcting type refs

This commit is contained in:
Hunter Miller 2021-11-10 13:52:08 -06:00
parent 04996919af
commit c07512b9de
53 changed files with 70153 additions and 38485 deletions

27529
pkg/grid/package-lock.json generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,8 @@
"@tlon/indigo-light": "^1.0.7", "@tlon/indigo-light": "^1.0.7",
"@tlon/indigo-react": "^1.2.23", "@tlon/indigo-react": "^1.2.23",
"@tlon/sigil-js": "^1.4.3", "@tlon/sigil-js": "^1.4.3",
"@urbit/api": "^2.0.0", "@urbit/api": "2.1.0-dev.2",
"@urbit/http-api": "^2.0.0", "@urbit/http-api": "2.1.0-dev.2",
"any-ascii": "^0.1.7", "any-ascii": "^0.1.7",
"aws-sdk": "^2.830.0", "aws-sdk": "^2.830.0",
"big-integer": "^1.6.48", "big-integer": "^1.6.48",

View File

@ -1,5 +1,4 @@
import { Content, GraphNode, unixToDa } from '@urbit/api'; import { BigIntOrderedMap, Content, GraphNode, unixToDa } from '@urbit/api';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
import bigInt, { BigInteger } from 'big-integer'; import bigInt, { BigInteger } from 'big-integer';
export const makeComment = ( export const makeComment = (

View File

@ -1,5 +1,4 @@
import { deSig, Path, PatpNoSig } from '@urbit/api'; import { deSig, Path, PatpNoSig, Group, Resource, roleTags, RoleTags } from '@urbit/api';
import { Group, Resource, roleTags, RoleTags } from '@urbit/api/groups';
import _ from 'lodash'; import _ from 'lodash';
export function roleForShip( export function roleForShip(

View File

@ -1,5 +1,4 @@
import { Content, GraphNode, Post, TextContent } from '@urbit/api'; import { BigIntOrderedMap, Content, GraphNode, Post, TextContent } from '@urbit/api';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
import bigInt, { BigInteger } from 'big-integer'; import bigInt, { BigInteger } from 'big-integer';
import { buntPost } from '~/logic/lib/post'; import { buntPost } from '~/logic/lib/post';
import { unixToDa } from '~/logic/lib/util'; import { unixToDa } from '~/logic/lib/util';

View File

@ -1,9 +1,4 @@
import { GraphNode } from '@urbit/api'; import { arrToString, stringToArr, BigIntOrderedMap, BigIntArrayOrderedMap, GraphNode } from '@urbit/api';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
import BigIntArrayOrderedMap, {
arrToString,
stringToArr
} from '@urbit/api/lib/BigIntArrayOrderedMap';
import bigInt, { BigInteger } from 'big-integer'; import bigInt, { BigInteger } from 'big-integer';
import produce from 'immer'; import produce from 'immer';
import _ from 'lodash'; import _ from 'lodash';

View File

@ -1,11 +1,9 @@
import { Enc } from '@urbit/api';
import { import {
Enc,
Group, Group,
GroupPolicy, GroupUpdate, GroupPolicy, GroupUpdate,
InvitePolicy, InvitePolicyDiff, OpenPolicy, OpenPolicyDiff, Tags InvitePolicy, InvitePolicyDiff, OpenPolicy, OpenPolicyDiff, Tags
} from '@urbit/api/groups'; } from '@urbit/api';
import _ from 'lodash'; import _ from 'lodash';
import { Cage } from '~/types/cage'; import { Cage } from '~/types/cage';
import { resourceAsPath } from '../lib/util'; import { resourceAsPath } from '../lib/util';

View File

@ -1,11 +1,11 @@
import { import {
BigIntOrderedMap,
HarkPlace, HarkPlace,
Timebox, Timebox,
HarkStats, HarkStats,
harkBinToId, harkBinToId,
makePatDa makePatDa
} from '@urbit/api'; } from '@urbit/api';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
import _ from 'lodash'; import _ from 'lodash';
import { compose } from 'lodash/fp'; import { compose } from 'lodash/fp';
import { BaseState } from '../state/base'; import { BaseState } from '../state/base';

View File

@ -1,4 +1,4 @@
import { InviteUpdate } from '@urbit/api/invite'; import { InviteUpdate } from '@urbit/api';
import _ from 'lodash'; import _ from 'lodash';
import { BaseState } from '../state/base'; import { BaseState } from '../state/base';
import { InviteState as State } from '../state/invite'; import { InviteState as State } from '../state/invite';

View File

@ -1,4 +1,4 @@
import { MetadataUpdate, Associations, ResourceAssociations } from '@urbit/api/metadata'; import { MetadataUpdate, Associations, ResourceAssociations } from '@urbit/api';
import _ from 'lodash'; import _ from 'lodash';
import { Cage } from '~/types/cage'; import { Cage } from '~/types/cage';
import { BaseState } from '../state/base'; import { BaseState } from '../state/base';

View File

@ -1,4 +1,4 @@
import { SettingsUpdate } from '@urbit/api/settings'; import { SettingsUpdate } from '@urbit/api';
import _ from 'lodash'; import _ from 'lodash';
import { SettingsState as State } from '~/logic/state/settings'; import { SettingsState as State } from '~/logic/state/settings';
import { BaseState } from '../state/base'; import { BaseState } from '../state/base';

View File

@ -1,12 +1,12 @@
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
import { patp2dec } from 'urbit-ob'; import { patp2dec } from 'urbit-ob';
import shallow from 'zustand/shallow'; import shallow from 'zustand/shallow';
import {
import { Association, deSig, GraphNode, Graphs, FlatGraphs, resourceFromPath, ThreadGraphs, getGraph, getShallowChildren, setScreen } from '@urbit/api'; Association, BigIntOrderedMap, deSig, GraphNode, Graphs, FlatGraphs, resourceFromPath, ThreadGraphs, getGraph, getShallowChildren, setScreen,
addDmMessage, addPost, Content, getDeepOlderThan, getFirstborn, getNewest, getNode, getOlderSiblings, getYoungerSiblings, markPending, Post, addNode, GraphNodePoke
} from '@urbit/api';
import { useCallback } from 'react'; import { useCallback } from 'react';
import { createState, createSubscription, reduceStateN, pokeOptimisticallyN } from './base'; import { createState, createSubscription, reduceStateN, pokeOptimisticallyN } from './base';
import airlock from '~/logic/api'; import airlock from '~/logic/api';
import { addDmMessage, addPost, Content, getDeepOlderThan, getFirstborn, getNewest, getNode, getOlderSiblings, getYoungerSiblings, markPending, Post, addNode, GraphNodePoke } from '@urbit/api/graph';
import { GraphReducer, reduceDm } from '../reducers/graph-update'; import { GraphReducer, reduceDm } from '../reducers/graph-update';
import _ from 'lodash'; import _ from 'lodash';
import { clone } from '../lib/util'; import { clone } from '../lib/util';

View File

@ -1,5 +1,6 @@
import { import {
archive, archive,
BigIntOrderedMap,
HarkBin, HarkBin,
markCountAsRead, markCountAsRead,
NotificationGraphConfig, NotificationGraphConfig,
@ -14,7 +15,6 @@ import {
import { Poke } from '@urbit/http-api'; import { Poke } from '@urbit/http-api';
import { patp2dec } from 'urbit-ob'; import { patp2dec } from 'urbit-ob';
import _ from 'lodash'; import _ from 'lodash';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
import api from '~/logic/api'; import api from '~/logic/api';
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';

View File

@ -1,4 +1,4 @@
import { Association, Associations, MetadataUpdatePreview } from '@urbit/api/metadata'; import { Association, Associations, MetadataUpdatePreview } from '@urbit/api';
import _ from 'lodash'; import _ from 'lodash';
import { useCallback, useEffect, useState } from 'react'; import { useCallback, useEffect, useState } from 'react';
import { import {

View File

@ -16,8 +16,7 @@ import {
import { useCallback } from 'react'; import { useCallback } from 'react';
import { reduceUpdate } from '../reducers/settings-update'; import { reduceUpdate } from '../reducers/settings-update';
import airlock from '~/logic/api'; import airlock from '~/logic/api';
import { getDeskSettings, Value } from '@urbit/api'; import { getDeskSettings, putEntry, Value } from '@urbit/api';
import { putEntry } from '@urbit/api/settings';
export interface ShortcutMapping { export interface ShortcutMapping {
cycleForward: string; cycleForward: string;

View File

@ -3,7 +3,7 @@ import { Meta, Story } from '@storybook/react';
import { Box } from '@tlon/indigo-react'; import { Box } from '@tlon/indigo-react';
import { InviteItem, InviteItemProps } from '~/views/components/Invite'; import { InviteItem, InviteItemProps } from '~/views/components/Invite';
import { JoinProgress } from '@urbit/api/groups'; import { JoinProgress } from '@urbit/api';
export default { export default {
title: 'Notifications/Invite', title: 'Notifications/Invite',

View File

@ -4,8 +4,7 @@ import { withDesign } from 'storybook-addon-designs';
import { Col, Row } from '@tlon/indigo-react'; import { Col, Row } from '@tlon/indigo-react';
import { LinkBlockItem } from '~/views/apps/links/components/LinkBlockItem'; import { LinkBlockItem } from '~/views/apps/links/components/LinkBlockItem';
import { createPost, GraphNode } from '@urbit/api'; import { BigIntOrderedMap, createPost, GraphNode } from '@urbit/api';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
export default { export default {
title: 'Collections/BlockItem', title: 'Collections/BlockItem',

View File

@ -4,8 +4,7 @@ import { withDesign } from 'storybook-addon-designs';
import { Box } from '@tlon/indigo-react'; import { Box } from '@tlon/indigo-react';
import { LinkDetail } from '~/views/apps/links/components/LinkDetail'; import { LinkDetail } from '~/views/apps/links/components/LinkDetail';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap'; import { BigIntOrderedMap, GraphNode } from '@urbit/api';
import { GraphNode } from '@urbit/api';
import useMetadataState from '~/logic/state/metadata'; import useMetadataState from '~/logic/state/metadata';
import { makeComment } from '~/logic/lib/fixtures'; import { makeComment } from '~/logic/lib/fixtures';

View File

@ -1,5 +1,4 @@
import { ContactUpdate, GroupUpdate, InviteUpdate, MetadataUpdate } from '@urbit/api'; import { ContactUpdate, GroupUpdate, InviteUpdate, MetadataUpdate, SettingsUpdate } from '@urbit/api';
import { SettingsUpdate } from '@urbit/api/settings';
import { ConnectionStatus } from './connection'; import { ConnectionStatus } from './connection';
import { LaunchUpdate, WeatherState } from './launch-update'; import { LaunchUpdate, WeatherState } from './launch-update';
import { LocalUpdate } from './local-update'; import { LocalUpdate } from './local-update';

View File

@ -1,5 +1,4 @@
import { Content, createPost, fetchIsAllowed, Post, removePosts, deSig } from '@urbit/api'; import { Association, Content, createPost, fetchIsAllowed, Post, removePosts, deSig } from '@urbit/api';
import { Association } from '@urbit/api/metadata';
import { BigInteger } from 'big-integer'; import { BigInteger } from 'big-integer';
import React, { import React, {
ReactElement, useCallback, ReactElement, useCallback,

View File

@ -30,8 +30,7 @@ import Tiles from './components/tiles';
import Tile from './components/tiles/tile'; import Tile from './components/tiles/tile';
import { Invite } from './components/Invite'; import { Invite } from './components/Invite';
import './css/custom.css'; import './css/custom.css';
import { join } from '@urbit/api/groups'; import { join, joinGraph } from '@urbit/api';
import { joinGraph } from '@urbit/api/graph';
import airlock from '~/logic/api'; import airlock from '~/logic/api';
const ScrollbarLessBox = styled(Box)` const ScrollbarLessBox = styled(Box)`

View File

@ -1,6 +1,5 @@
import { Box, Center, Col, LoadingSpinner, Text } from '@tlon/indigo-react'; import { Box, Center, Col, LoadingSpinner, Text } from '@tlon/indigo-react';
import { deSig, Group } from '@urbit/api'; import { Association, deSig, Group } from '@urbit/api';
import { Association } from '@urbit/api/metadata';
import bigInt from 'big-integer'; import bigInt from 'big-integer';
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { Link, Route, Switch, useLocation } from 'react-router-dom'; import { Link, Route, Switch, useLocation } from 'react-router-dom';

View File

@ -1,12 +1,11 @@
import { Col, Row, Text } from '@tlon/indigo-react'; import { Col, Row, Text } from '@tlon/indigo-react';
import { Association, Graph, GraphNode, markEachAsRead } from '@urbit/api'; import { Association, BigIntOrderedMap, Graph, GraphNode, markEachAsRead } from '@urbit/api';
import React, { useCallback, useState, useMemo, useEffect } from 'react'; import React, { useCallback, useState, useMemo, useEffect } from 'react';
import _ from 'lodash'; import _ from 'lodash';
import { useResize } from '~/logic/lib/useResize'; import { useResize } from '~/logic/lib/useResize';
import { LinkBlockItem } from './LinkBlockItem'; import { LinkBlockItem } from './LinkBlockItem';
import { LinkBlockInput } from './LinkBlockInput'; import { LinkBlockInput } from './LinkBlockInput';
import useLocalState from '~/logic/state/local'; import useLocalState from '~/logic/state/local';
import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap';
import bigInt from 'big-integer'; import bigInt from 'big-integer';
import airlock from '~/logic/api'; import airlock from '~/logic/api';
import useHarkState, { selHarkGraph } from '~/logic/state/hark'; import useHarkState, { selHarkGraph } from '~/logic/state/hark';

View File

@ -3,7 +3,7 @@ import { Box, Row, Text } from '@tlon/indigo-react';
import { StatelessAsyncAction } from '~/views/components/StatelessAsyncAction'; import { StatelessAsyncAction } from '~/views/components/StatelessAsyncAction';
import Author from '~/views/components/Author'; import Author from '~/views/components/Author';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import { acceptDm, declineDm } from '@urbit/api/graph'; import { acceptDm, declineDm } from '@urbit/api';
import airlock from '~/logic/api'; import airlock from '~/logic/api';
export function PendingDm(props: { ship: string; }) { export function PendingDm(props: { ship: string; }) {

View File

@ -1,6 +1,5 @@
import { Box, Col, Icon, Image, Row, Text } from '@tlon/indigo-react'; import { Box, Col, Icon, Image, Row, Text } from '@tlon/indigo-react';
import { Group } from '@urbit/api'; import { Group, GraphNode } from '@urbit/api';
import { GraphNode } from '@urbit/api/graph';
import React from 'react'; import React from 'react';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';

View File

@ -1,5 +1,4 @@
import { addNodes, Association } from '@urbit/api'; import { addNodes, Association, Graph } from '@urbit/api';
import { Graph } from '@urbit/api/graph';
import { FormikHelpers } from 'formik'; import { FormikHelpers } from 'formik';
import React from 'react'; import React from 'react';
import { RouteComponentProps } from 'react-router-dom'; import { RouteComponentProps } from 'react-router-dom';

View File

@ -9,7 +9,7 @@ import {
import { useField } from 'formik'; import { useField } from 'formik';
import React, { FormEvent, useState, useEffect } from 'react'; import React, { FormEvent, useState, useEffect } from 'react';
import { hexToUx } from '~/logic/lib/util'; import { hexToUx } from '~/logic/lib/util';
import { uxToHex } from '@urbit/api/dist'; import { uxToHex } from '@urbit/api';
export type ColorInputProps = Parameters<typeof Col>[0] & { export type ColorInputProps = Parameters<typeof Col>[0] & {
id: string; id: string;

View File

@ -1,6 +1,5 @@
import { Action, Box, Col, Icon, Row, Text } from '@tlon/indigo-react'; import { Action, Box, Col, Icon, Row, Text } from '@tlon/indigo-react';
import { Group, removePosts } from '@urbit/api'; import { GraphNode, Group, removePosts } from '@urbit/api';
import { GraphNode } from '@urbit/api/graph';
import bigInt from 'big-integer'; import bigInt from 'big-integer';
import React, { useCallback, useEffect, useRef } from 'react'; import React, { useCallback, useEffect, useRef } from 'react';
import { roleForShip } from '~/logic/lib/group'; import { roleForShip } from '~/logic/lib/group';

View File

@ -6,8 +6,7 @@ import {
ErrorLabel, Icon, Label, ErrorLabel, Icon, Label,
Row, Text Row, Text
} from '@tlon/indigo-react'; } from '@tlon/indigo-react';
import { OpenPolicy } from '@urbit/api'; import { Association, OpenPolicy } from '@urbit/api';
import { Association } from '@urbit/api/metadata';
import { FieldArray, useFormikContext } from 'formik'; import { FieldArray, useFormikContext } from 'formik';
import _ from 'lodash'; import _ from 'lodash';
import React, { ReactElement, useMemo, useState } from 'react'; import React, { ReactElement, useMemo, useState } from 'react';

View File

@ -1,5 +1,4 @@
import { JoinRequest } from '@urbit/api'; import { Invite, JoinRequest } from '@urbit/api';
import { Invite } from '@urbit/api/invite';
import React from 'react'; import React from 'react';
import { usePreview } from '~/logic/state/metadata'; import { usePreview } from '~/logic/state/metadata';
import { GroupInvite } from './Group'; import { GroupInvite } from './Group';

View File

@ -1,9 +1,7 @@
import { BigInteger } from 'big-integer'; import { BigInteger } from 'big-integer';
import React from 'react'; import React from 'react';
import VirtualScroller, { VirtualScrollerProps } from './VirtualScroller'; import VirtualScroller, { VirtualScrollerProps } from './VirtualScroller';
import { arrToString, FlatGraphNode } from '@urbit/api';
import { arrToString } from '@urbit/api/lib/BigIntArrayOrderedMap';
import { FlatGraphNode } from '@urbit/api';
type ThreadScrollerProps = Omit< type ThreadScrollerProps = Omit<
VirtualScrollerProps<BigInteger[], FlatGraphNode>, VirtualScrollerProps<BigInteger[], FlatGraphNode>,

View File

@ -1,6 +1,5 @@
import { Box, Center, Col, Text } from '@tlon/indigo-react'; import { Box, Center, Col, Text } from '@tlon/indigo-react';
import { joinGraph } from '@urbit/api/graph'; import { Association, GraphConfig, joinGraph } from '@urbit/api';
import { Association, GraphConfig } from '@urbit/api/metadata';
import React, { useEffect, useMemo, useState } from 'react'; import React, { useEffect, useMemo, useState } from 'react';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { useQuery } from '~/logic/lib/useQuery'; import { useQuery } from '~/logic/lib/useQuery';

View File

@ -5,9 +5,7 @@ import {
Text Text
} from '@tlon/indigo-react'; } from '@tlon/indigo-react';
import _ from 'lodash'; import _ from 'lodash';
import { changePolicy, deSig, Enc } from '@urbit/api'; import { Association, changePolicy, deSig, Enc, Group, GroupPolicy, metadataEdit, MetadataEditField } from '@urbit/api';
import { Group, GroupPolicy } from '@urbit/api/groups';
import { Association, metadataEdit, MetadataEditField } from '@urbit/api/metadata';
import { Form, Formik, FormikHelpers } from 'formik'; import { Form, Formik, FormikHelpers } from 'formik';
import React from 'react'; import React from 'react';
import * as Yup from 'yup'; import * as Yup from 'yup';

View File

@ -1,7 +1,5 @@
import { Box, Button, Col, Text } from '@tlon/indigo-react'; import { Box, Button, Col, Text } from '@tlon/indigo-react';
import { deSig } from '@urbit/api'; import { Association, deSig, Group } from '@urbit/api';
import { Group } from '@urbit/api/groups';
import { Association } from '@urbit/api/metadata';
import React, { useCallback } from 'react'; import React, { useCallback } from 'react';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { resourceFromPath, roleForShip } from '~/logic/lib/group'; import { resourceFromPath, roleForShip } from '~/logic/lib/group';

View File

@ -4,8 +4,7 @@ import {
Text Text
} from '@tlon/indigo-react'; } from '@tlon/indigo-react';
import { ignoreGroup, listenGroup } from '@urbit/api'; import { Association, ignoreGroup, listenGroup } from '@urbit/api';
import { Association } from '@urbit/api/metadata';
import React from 'react'; import React from 'react';
import useHarkState from '~/logic/state/hark'; import useHarkState from '~/logic/state/hark';
import { StatelessAsyncToggle } from '~/views/components/StatelessAsyncToggle'; import { StatelessAsyncToggle } from '~/views/components/StatelessAsyncToggle';

View File

@ -1,5 +1,5 @@
import { Button, Icon, Row, Text } from '@tlon/indigo-react'; import { Button, Icon, Row, Text } from '@tlon/indigo-react';
import { disableGroupFeed } from '@urbit/api/graph'; import { disableGroupFeed } from '@urbit/api';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Link, useHistory } from 'react-router-dom'; import { Link, useHistory } from 'react-router-dom';
import { resourceFromPath } from '~/logic/lib/group'; import { resourceFromPath } from '~/logic/lib/group';

View File

@ -1,12 +1,9 @@
import { Box, Col } from '@tlon/indigo-react'; import { Box, Col } from '@tlon/indigo-react';
import { Association, FlatGraph, FlatGraphNode, Group } from '@urbit/api'; import { arrToString, Association, FlatGraph, FlatGraphNode, Group } from '@urbit/api';
import bigInt from 'big-integer'; import bigInt from 'big-integer';
import React from 'react'; import React from 'react';
import { RouteComponentProps, useHistory } from 'react-router'; import { RouteComponentProps, useHistory } from 'react-router';
import { resourceFromPath } from '~/logic/lib/group'; import { resourceFromPath } from '~/logic/lib/group';
import {
arrToString
} from '@urbit/api/lib/BigIntArrayOrderedMap';
import { keyEq, ThreadScroller } from '~/views/components/ThreadScroller'; import { keyEq, ThreadScroller } from '~/views/components/ThreadScroller';
import PostItem from './PostItem/PostItem'; import PostItem from './PostItem/PostItem';
import PostInput from './PostInput'; import PostInput from './PostInput';

View File

@ -1,5 +1,5 @@
import { Action, Col, Icon, Row } from '@tlon/indigo-react'; import { Action, Col, Icon, Row } from '@tlon/indigo-react';
import { Association, Post } from '@urbit/api'; import { Association, Post, removePosts } from '@urbit/api';
import React, { ReactElement } from 'react'; import React, { ReactElement } from 'react';
import { getPermalinkForGraph } from '~/logic/lib/permalinks'; import { getPermalinkForGraph } from '~/logic/lib/permalinks';
import { useCopy } from '~/logic/lib/useCopy'; import { useCopy } from '~/logic/lib/useCopy';
@ -8,7 +8,6 @@ import { resourceFromPath } from '~/logic/lib/group';
import Author from '~/views/components/Author'; import Author from '~/views/components/Author';
import { Dropdown } from '~/views/components/Dropdown'; import { Dropdown } from '~/views/components/Dropdown';
import airlock from '~/logic/api'; import airlock from '~/logic/api';
import { removePosts } from '@urbit/api/graph';
interface PostHeaderProps { interface PostHeaderProps {
post: Post; post: Post;
association: Association; association: Association;

View File

@ -6,11 +6,10 @@ import React, {
} from 'react'; } from 'react';
import { resourceFromPath } from '~/logic/lib/group'; import { resourceFromPath } from '~/logic/lib/group';
import { Loading } from '~/views/components/Loading'; import { Loading } from '~/views/components/Loading';
import { arrToString } from '@urbit/api/lib/BigIntArrayOrderedMap';
import useGraphState from '~/logic/state/graph'; import useGraphState from '~/logic/state/graph';
import PostFlatFeed from './PostFlatFeed'; import PostFlatFeed from './PostFlatFeed';
import PostInput from './PostInput'; import PostInput from './PostInput';
import { Association, deSig, PermVariation } from '@urbit/api'; import { arrToString, Association, deSig, PermVariation } from '@urbit/api';
import { useParams, Switch, Route } from 'react-router'; import { useParams, Switch, Route } from 'react-router';
import { useGroupForAssoc } from '~/logic/state/group'; import { useGroupForAssoc } from '~/logic/state/group';

View File

@ -5,8 +5,7 @@ import {
Row, Text Row, Text
} from '@tlon/indigo-react'; } from '@tlon/indigo-react';
import { invite } from '@urbit/api/groups'; import { Association, invite } from '@urbit/api';
import { Association } from '@urbit/api/metadata';
import { Form, Formik } from 'formik'; import { Form, Formik } from 'formik';
import _ from 'lodash'; import _ from 'lodash';
import React, { useCallback, useRef } from 'react'; import React, { useCallback, useRef } from 'react';

View File

@ -1,5 +1,5 @@
import { Box, Col, Text } from '@tlon/indigo-react'; import { Box, Col, Text } from '@tlon/indigo-react';
import { invite } from '@urbit/api/groups'; import { invite } from '@urbit/api';
import { Form, Formik } from 'formik'; import { Form, Formik } from 'formik';
import _ from 'lodash'; import _ from 'lodash';
import React from 'react'; import React from 'react';

View File

@ -6,10 +6,7 @@ import {
StatelessTextInput as Input, Text StatelessTextInput as Input, Text
} from '@tlon/indigo-react'; } from '@tlon/indigo-react';
import { Contact, Contacts } from '@urbit/api/contacts'; import { addTag, Association, Contact, Contacts, changePolicy, deSig, Group, removeMembers, removeTag, RoleTags } from '@urbit/api';
import { addTag, removeMembers, changePolicy, Group, removeTag, RoleTags } from '@urbit/api/groups';
import { Association } from '@urbit/api/metadata';
import { deSig } from '@urbit/api';
import _ from 'lodash'; import _ from 'lodash';
import f from 'lodash/fp'; import f from 'lodash/fp';
import React, { import React, {

View File

@ -1,7 +1,5 @@
import { Box, Col, Text } from '@tlon/indigo-react'; import { Box, Col, Text } from '@tlon/indigo-react';
import { Group } from '@urbit/api/groups'; import { Association, deSig, Group } from '@urbit/api';
import { deSig } from '@urbit/api';
import { Association } from '@urbit/api/metadata';
import React, { ReactElement, useCallback, useRef } from 'react'; import React, { ReactElement, useCallback, useRef } from 'react';
import { Link, Route, RouteComponentProps, Switch } from 'react-router-dom'; import { Link, Route, RouteComponentProps, Switch } from 'react-router-dom';
import { resourceFromPath } from '~/logic/lib/group'; import { resourceFromPath } from '~/logic/lib/group';

View File

@ -1,5 +1,4 @@
import { Association } from '@urbit/api/metadata'; import { AppName, Association } from '@urbit/api';
import { AppName } from '@urbit/api';
import React, { ReactElement } from 'react'; import React, { ReactElement } from 'react';
import Helmet from 'react-helmet'; import Helmet from 'react-helmet';
import { Route, Switch } from 'react-router-dom'; import { Route, Switch } from 'react-router-dom';

View File

@ -1,7 +1,6 @@
import _ from 'lodash'; import _ from 'lodash';
import { Box, Col, Icon, Text } from '@tlon/indigo-react'; import { Box, Col, Icon, Text } from '@tlon/indigo-react';
import { Association } from '@urbit/api/metadata'; import { AppName, Association } from '@urbit/api';
import { AppName } from '@urbit/api';
import React, { ReactElement, ReactNode, useCallback, useState } from 'react'; import React, { ReactElement, ReactNode, useCallback, useState } from 'react';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import styled from 'styled-components'; import styled from 'styled-components';

View File

@ -1,6 +1,6 @@
import { Patp } from '../lib'; import { Patp } from '../lib';
import BigIntOrderedMap from '../lib/BigIntOrderedMap'; import { BigIntOrderedMap } from '../lib/BigIntOrderedMap';
import BigIntArrayOrderedMap from '../lib/BigIntArrayOrderedMap'; import { BigIntArrayOrderedMap } from '../lib/BigIntArrayOrderedMap';
export interface TextContent { export interface TextContent {
text: string; text: string;

View File

@ -16,6 +16,7 @@ export * from './s3';
export * as s3 from './s3'; export * as s3 from './s3';
export * from './lib'; export * from './lib';
export * from './lib/BigIntOrderedMap'; export * from './lib/BigIntOrderedMap';
export * from './lib/BigIntArrayOrderedMap';
export * as hood from './hood'; export * as hood from './hood';
export * from './hood'; export * from './hood';
export * as docket from './docket'; export * as docket from './docket';

View File

@ -51,7 +51,7 @@ export function sortBigIntArr(a: BigInteger[], b: BigInteger[]) {
return bLen - aLen; return bLen - aLen;
} }
export default class BigIntArrayOrderedMap<V> implements Iterable<[BigInteger[], V]> { export class BigIntArrayOrderedMap<V> implements Iterable<[BigInteger[], V]> {
root: Record<string, V> = {} root: Record<string, V> = {}
cachedIter: [BigInteger[], V][] | null = null; cachedIter: [BigInteger[], V][] | null = null;
[immerable] = true; [immerable] = true;

View File

@ -14,7 +14,7 @@ function sortBigInt(a: BigInteger, b: BigInteger) {
return -1; return -1;
} }
} }
export default class BigIntOrderedMap<V> implements Iterable<[BigInteger, V]> { export class BigIntOrderedMap<V> implements Iterable<[BigInteger, V]> {
root: Record<string, V> = {} root: Record<string, V> = {}
cachedIter: [BigInteger, V][] | null = null; cachedIter: [BigInteger, V][] | null = null;
[immerable] = true; [immerable] = true;

View File

@ -2,7 +2,7 @@
* Martian embassy * Martian embassy
*/ */
import BigIntOrderedMap from "./BigIntOrderedMap"; import { BigIntOrderedMap } from "./BigIntOrderedMap";
// an urbit style path rendered as string // an urbit style path rendered as string
export type Path = string; export type Path = string;

View File

@ -13,6 +13,9 @@
"jsdelivr": "dist/urbit-api.min.js", "jsdelivr": "dist/urbit-api.min.js",
"unpkg": "dist/urbit-api.min.js", "unpkg": "dist/urbit-api.min.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"files": [
"dist/**"
],
"scripts": { "scripts": {
"test": "echo \"No test specified\" && exit 0", "test": "echo \"No test specified\" && exit 0",
"build": "npm run clean && rollup -c && npx tsc -p tsconfig.json", "build": "npm run clean && rollup -c && npx tsc -p tsconfig.json",

View File

@ -14,7 +14,7 @@
"jsdelivr": "dist/urbit-http-api.min.js", "jsdelivr": "dist/urbit-http-api.min.js",
"unpkg": "dist/urbit-http-api.min.js", "unpkg": "dist/urbit-http-api.min.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"file": [ "files": [
"dist/**" "dist/**"
], ],
"scripts": { "scripts": {