Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/globalScope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { IFileAction, IFileListAction } from './actions/index.ts'
import type { DavProperty } from './dav/index.ts'
import type {
IFileListFilter,
IFileListHeader,
Navigation,
NewMenu,
} from './index.ts'
import type { FilesRegistry } from './registry.ts'
import type { ISidebarTab } from './sidebar/index.ts'
import type { ISidebarAction } from './sidebar/SidebarAction.ts'
import type { IFileAction, IFileListAction } from './ui/actions/index.ts'
import type { FilesRegistry } from './ui/registry.ts'
import type { ISidebarAction, ISidebarTab } from './ui/sidebar/index.ts'

interface InternalGlobalScope {
davNamespaces?: DavProperty
Expand Down
11 changes: 1 addition & 10 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

export type * from './types.ts'

export * from './actions/index.ts'
export * from './filters/index.ts'
export * from './headers/index.ts'
export * from './navigation/index.ts'
export * from './newMenu/index.ts'
export * from './node/index.ts'
export * from './permissions.ts'
export * from './sidebar/index.ts'
export * from './ui/index.ts'
export * from './utils/index.ts'

export { getFilesRegistry } from './registry.ts'
4 changes: 2 additions & 2 deletions lib/actions/fileAction.ts → lib/ui/actions/fileAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import type { ActionContext, ActionContextSingle } from '../types.ts'

import { scopedGlobals } from '../globalScope.ts'
import { scopedGlobals } from '../../globalScope.ts'
import logger from '../../utils/logger.ts'
import { getRegistry } from '../registry.ts'
import logger from '../utils/logger.ts'

export const DefaultType = Object.freeze({
DEFAULT: 'default',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import type { ViewActionContext } from '../types.ts'

import { scopedGlobals } from '../globalScope.ts'
import { scopedGlobals } from '../../globalScope.ts'
import logger from '../../utils/logger.ts'
import { getRegistry } from '../registry.ts'
import logger from '../utils/logger.ts'

export interface IFileListAction {
/** Unique ID */
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/filters/functions.ts → lib/ui/filters/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import type { IFileListFilter } from './listFilters.ts'

import { scopedGlobals } from '../globalScope.ts'
import { scopedGlobals } from '../../globalScope.ts'
import { getRegistry } from '../registry.ts'

/**
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { INode } from '../node/index.ts'
import type { INode } from '../../node/index.ts'

import { TypedEventTarget } from 'typescript-event-target'

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions lib/headers/listHeaders.ts → lib/ui/headers/listHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { IFolder } from '../../node/folder.ts'
import type { IView } from '../navigation/view.ts'
import type { IFolder } from '../node/folder.ts'

import { scopedGlobals } from '../globalScope.ts'
import { scopedGlobals } from '../../globalScope.ts'
import logger from '../../utils/logger.ts'
import { getRegistry } from '../registry.ts'
import logger from '../utils/logger.ts'

export interface IFileListHeader {
/** Unique ID */
Expand Down
15 changes: 15 additions & 0 deletions lib/ui/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

export type * from './types.ts'

export * from './actions/index.ts'
export * from './filters/index.ts'
export * from './headers/index.ts'
export * from './navigation/index.ts'
export * from './newMenu/index.ts'
export * from './sidebar/index.ts'

export { getFilesRegistry } from './registry.ts'
4 changes: 2 additions & 2 deletions lib/navigation/column.ts → lib/ui/navigation/column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { INode } from '../node/node.ts'
import type { INode } from '../../node/node.ts'
import type { IView } from './view.ts'

import { checkOptionalProperty } from '../utils/objectValidation.ts'
import { checkOptionalProperty } from '../../utils/objectValidation.ts'

export interface IColumn {
/** Unique column ID */
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import type { IView } from './view.ts'

import { TypedEventTarget } from 'typescript-event-target'
import { scopedGlobals } from '../globalScope.ts'
import { scopedGlobals } from '../../globalScope.ts'
import { validateView } from './view.ts'

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/navigation/view.ts → lib/ui/navigation/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { IFolder, INode } from '../node/index.ts'
import type { IFolder, INode } from '../../node/index.ts'
import type { IColumn } from './column.ts'

import isSvg from 'is-svg'
import { checkOptionalProperty } from '../utils/objectValidation.ts'
import { checkOptionalProperty } from '../../utils/objectValidation.ts'
import { validateColumn } from './column.ts'

export type ContentsWithRoot = {
Expand Down
4 changes: 2 additions & 2 deletions lib/newMenu/NewMenu.ts → lib/ui/newMenu/NewMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { IFolder, INode } from '../node/index.ts'
import type { IFolder, INode } from '../../node/index.ts'

import logger from '../utils/logger.ts'
import logger from '../../utils/logger.ts'

export const NewMenuEntryCategory = Object.freeze({
/**
Expand Down
4 changes: 2 additions & 2 deletions lib/newMenu/functions.ts → lib/ui/newMenu/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { IFolder } from '../node/index.ts'
import type { IFolder } from '../../node/index.ts'
import type { NewMenuEntry } from './NewMenu.ts'

import { scopedGlobals } from '../globalScope.ts'
import { scopedGlobals } from '../../globalScope.ts'
import { NewMenu } from './NewMenu.ts'

/**
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/registry.ts → lib/ui/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { IFileListFilter } from './filters/index.ts'
import type { IFileListHeader } from './headers/index.ts'

import { TypedEventTarget } from 'typescript-event-target'
import { scopedGlobals } from './globalScope.ts'
import { scopedGlobals } from '../globalScope.ts'

interface FilesRegistryEvents {
'register:action': RegistrationEvent<IFileAction>
Expand Down
2 changes: 1 addition & 1 deletion lib/sidebar/Sidebar.ts → lib/ui/sidebar/Sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { INode } from '../node/node.ts'
import type { INode } from '../../node/node.ts'
import type { ISidebarAction } from './SidebarAction.ts'
import type { ISidebarContext, ISidebarTab } from './SidebarTab.ts'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import type { ISidebarContext } from './SidebarTab.ts'

import { scopedGlobals } from '../globalScope.ts'
import logger from '../utils/logger.ts'
import { scopedGlobals } from '../../globalScope.ts'
import logger from '../../utils/logger.ts'

/**
* Implementation of a custom sidebar tab within the files app.
Expand Down
6 changes: 3 additions & 3 deletions lib/sidebar/SidebarTab.ts → lib/ui/sidebar/SidebarTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { IFolder, INode } from '../../node/index.ts'
import type { IView } from '../navigation/view.ts'
import type { IFolder, INode } from '../node/index.ts'

import isSvg from 'is-svg'
import { scopedGlobals } from '../globalScope.ts'
import logger from '../utils/logger.ts'
import { scopedGlobals } from '../../globalScope.ts'
import logger from '../../utils/logger.ts'

export interface ISidebarContext {
/**
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/types.ts → lib/ui/types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
/*!
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import type { IFolder, INode } from '../node/index.ts'
import type { IView } from './navigation/index.ts'
import type { IFolder, INode } from './node/index.ts'

export type ActionContextSingle = {
nodes: [INode]
Expand Down
Loading