@tutti-os/workspace-user-project 0.0.1

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.
@@ -0,0 +1,65 @@
1
+ import * as _tutti_os_ui_i18n_runtime from '@tutti-os/ui-i18n-runtime';
2
+ import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
3
+
4
+ declare const workspaceUserProjectI18nNamespace = "workspaceUserProject";
5
+ declare const workspaceUserProjectI18nModule: _tutti_os_ui_i18n_runtime.ScopedLocaleObjectsI18nModuleManifest;
6
+ type WorkspaceUserProjectI18nKey = "projectSelect.addProject" | "projectSelect.createProjectCancel" | "projectSelect.createProjectConfirm" | "projectSelect.createProjectDocumentsUnavailable" | "projectSelect.createProjectFailed" | "projectSelect.createProjectNameConflict" | "projectSelect.createProjectNameInvalid" | "projectSelect.createProjectNameLabel" | "projectSelect.createProjectNamePlaceholder" | "projectSelect.createProjectNameRequired" | "projectSelect.createProjectPermissionDenied" | "projectSelect.createProjectTitle" | "projectSelect.linkExistingProject" | "projectSelect.loadingProjects" | "projectSelect.noProject" | "projectSelect.projectLabel" | "projectSelect.projectLocked" | "projectSelect.projectMissingTitle" | "projectSelect.projectUnavailable" | "projectSelect.selectDirectoryFailed";
7
+ type WorkspaceUserProjectI18nRuntime = I18nRuntime<WorkspaceUserProjectI18nKey>;
8
+ declare const workspaceUserProjectI18nResources: {
9
+ readonly en: {
10
+ readonly workspaceUserProject: {
11
+ readonly projectSelect: {
12
+ readonly addProject: "Add project";
13
+ readonly createProjectCancel: "Cancel";
14
+ readonly createProjectConfirm: "Create";
15
+ readonly createProjectDocumentsUnavailable: "Documents is unavailable. Choose an existing project instead.";
16
+ readonly createProjectFailed: "Unable to create project";
17
+ readonly createProjectNameConflict: "A project with this name already exists. Use another name.";
18
+ readonly createProjectNameInvalid: "Project names cannot contain path separators or empty values.";
19
+ readonly createProjectNameLabel: "Enter a project name. A folder will be created in Documents/nextop";
20
+ readonly createProjectNamePlaceholder: "Project name";
21
+ readonly createProjectNameRequired: "Project name is required";
22
+ readonly createProjectPermissionDenied: "Nextop does not have permission to create folders in Documents.";
23
+ readonly createProjectTitle: "Add project";
24
+ readonly linkExistingProject: "Use existing project";
25
+ readonly loadingProjects: "Loading projects";
26
+ readonly noProject: "No project";
27
+ readonly projectLabel: "Project";
28
+ readonly projectLocked: "Project locked";
29
+ readonly projectMissingTitle: "Current working directory missing";
30
+ readonly projectUnavailable: "Project unavailable";
31
+ readonly selectDirectoryFailed: "Unable to select project directory";
32
+ };
33
+ };
34
+ };
35
+ readonly "zh-CN": {
36
+ readonly workspaceUserProject: {
37
+ readonly projectSelect: {
38
+ readonly addProject: "添加项目";
39
+ readonly createProjectCancel: "取消";
40
+ readonly createProjectConfirm: "创建";
41
+ readonly createProjectDocumentsUnavailable: "无法访问文档目录。请选择已有项目。";
42
+ readonly createProjectFailed: "无法创建项目";
43
+ readonly createProjectNameConflict: "同名项目已存在,请换一个名称。";
44
+ readonly createProjectNameInvalid: "项目名称不能包含路径分隔符或为空。";
45
+ readonly createProjectNameLabel: "输入项目名称。系统会在 Documents/nextop 中创建文件夹";
46
+ readonly createProjectNamePlaceholder: "项目名称";
47
+ readonly createProjectNameRequired: "请输入项目名称";
48
+ readonly createProjectPermissionDenied: "Nextop 没有权限在 Documents 中创建文件夹。";
49
+ readonly createProjectTitle: "添加项目";
50
+ readonly linkExistingProject: "使用已有项目";
51
+ readonly loadingProjects: "正在加载项目";
52
+ readonly noProject: "无项目";
53
+ readonly projectLabel: "项目";
54
+ readonly projectLocked: "项目已锁定";
55
+ readonly projectMissingTitle: "当前工作目录不存在";
56
+ readonly projectUnavailable: "项目不可用";
57
+ readonly selectDirectoryFailed: "无法选择项目目录";
58
+ };
59
+ };
60
+ };
61
+ };
62
+ declare function createWorkspaceUserProjectI18nRuntime(runtime?: I18nRuntime<string> | undefined): WorkspaceUserProjectI18nRuntime;
63
+ declare function createDefaultWorkspaceUserProjectI18nRuntime(): WorkspaceUserProjectI18nRuntime;
64
+
65
+ export { type WorkspaceUserProjectI18nKey, type WorkspaceUserProjectI18nRuntime, createDefaultWorkspaceUserProjectI18nRuntime, createWorkspaceUserProjectI18nRuntime, workspaceUserProjectI18nModule, workspaceUserProjectI18nNamespace, workspaceUserProjectI18nResources };
@@ -0,0 +1,15 @@
1
+ import {
2
+ createDefaultWorkspaceUserProjectI18nRuntime,
3
+ createWorkspaceUserProjectI18nRuntime,
4
+ workspaceUserProjectI18nModule,
5
+ workspaceUserProjectI18nNamespace,
6
+ workspaceUserProjectI18nResources
7
+ } from "../chunk-P4PYYT3Y.js";
8
+ export {
9
+ createDefaultWorkspaceUserProjectI18nRuntime,
10
+ createWorkspaceUserProjectI18nRuntime,
11
+ workspaceUserProjectI18nModule,
12
+ workspaceUserProjectI18nNamespace,
13
+ workspaceUserProjectI18nResources
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,4 @@
1
+ export { WorkspaceUserProject, WorkspaceUserProjectApi, WorkspaceUserProjectCreationErrorCode, WorkspaceUserProjectDefaultSelection, WorkspaceUserProjectPathCheck, WorkspaceUserProjectSelectionPreparation, WorkspaceUserProjectSelectionPreparationInput, WorkspaceUserProjectServiceLike, WorkspaceUserProjectServiceSnapshot, WorkspaceUserProjectValtioStore } from './contracts/index.js';
2
+ export { basenameWorkspaceUserProjectPath, checkWorkspaceUserProjectPathMissing, getWorkspaceUserProjectErrorCode, prepareWorkspaceUserProjectSelection, resolveWorkspaceUserProjectDisplayLabel, stripAbsolutePathFromWorkspaceUserProjectLabel, upsertWorkspaceUserProject } from './core/index.js';
3
+ export { WorkspaceUserProjectI18nKey, WorkspaceUserProjectI18nRuntime, createDefaultWorkspaceUserProjectI18nRuntime, createWorkspaceUserProjectI18nRuntime, workspaceUserProjectI18nModule, workspaceUserProjectI18nNamespace, workspaceUserProjectI18nResources } from './i18n/index.js';
4
+ import '@tutti-os/ui-i18n-runtime';
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ import {
2
+ basenameWorkspaceUserProjectPath,
3
+ checkWorkspaceUserProjectPathMissing,
4
+ getWorkspaceUserProjectErrorCode,
5
+ prepareWorkspaceUserProjectSelection,
6
+ resolveWorkspaceUserProjectDisplayLabel,
7
+ stripAbsolutePathFromWorkspaceUserProjectLabel,
8
+ upsertWorkspaceUserProject
9
+ } from "./chunk-JUPVLSYH.js";
10
+ import {
11
+ createDefaultWorkspaceUserProjectI18nRuntime,
12
+ createWorkspaceUserProjectI18nRuntime,
13
+ workspaceUserProjectI18nModule,
14
+ workspaceUserProjectI18nNamespace,
15
+ workspaceUserProjectI18nResources
16
+ } from "./chunk-P4PYYT3Y.js";
17
+ export {
18
+ basenameWorkspaceUserProjectPath,
19
+ checkWorkspaceUserProjectPathMissing,
20
+ createDefaultWorkspaceUserProjectI18nRuntime,
21
+ createWorkspaceUserProjectI18nRuntime,
22
+ getWorkspaceUserProjectErrorCode,
23
+ prepareWorkspaceUserProjectSelection,
24
+ resolveWorkspaceUserProjectDisplayLabel,
25
+ stripAbsolutePathFromWorkspaceUserProjectLabel,
26
+ upsertWorkspaceUserProject,
27
+ workspaceUserProjectI18nModule,
28
+ workspaceUserProjectI18nNamespace,
29
+ workspaceUserProjectI18nResources
30
+ };
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,60 @@
1
+ import { ReactNode } from 'react';
2
+ import { WorkspaceUserProjectApi, WorkspaceUserProjectServiceLike } from '../contracts/index.js';
3
+ import { WorkspaceUserProjectI18nRuntime } from '../i18n/index.js';
4
+ import '@tutti-os/ui-i18n-runtime';
5
+
6
+ type WorkspaceUserProjectSelectLabels = {
7
+ addProject: string;
8
+ createProjectCancel: string;
9
+ createProjectConfirm: string;
10
+ createProjectDocumentsUnavailable: string;
11
+ createProjectFailed: string;
12
+ createProjectNameConflict: string;
13
+ createProjectNameInvalid: string;
14
+ createProjectNameLabel: string;
15
+ createProjectNamePlaceholder: string;
16
+ createProjectNameRequired: string;
17
+ createProjectPermissionDenied: string;
18
+ createProjectTitle: string;
19
+ linkExistingProject: string;
20
+ loadingProjects: string;
21
+ noProject: string;
22
+ projectLabel: string;
23
+ projectLocked: string;
24
+ projectMissingTitle: string;
25
+ projectUnavailable: string;
26
+ };
27
+ type WorkspaceUserProjectSelectLabelOverrides = Partial<WorkspaceUserProjectSelectLabels>;
28
+ interface WorkspaceUserProjectSelectClassNames {
29
+ content?: string;
30
+ item?: string;
31
+ trigger?: string;
32
+ }
33
+ type WorkspaceUserProjectSelectChangeAction = "clear" | "create_new" | "select_existing";
34
+ interface WorkspaceUserProjectSelectProps {
35
+ api?: WorkspaceUserProjectApi | null;
36
+ classNames?: WorkspaceUserProjectSelectClassNames;
37
+ contentAlign?: "center" | "end" | "start";
38
+ contentSide?: "bottom" | "left" | "right" | "top";
39
+ contentSideOffset?: number;
40
+ disabled?: boolean;
41
+ i18n?: WorkspaceUserProjectI18nRuntime;
42
+ labels?: WorkspaceUserProjectSelectLabelOverrides;
43
+ onProjectMissingChange?: (isMissing: boolean) => void;
44
+ onProjectPathChange: (path: string | null, metadata?: {
45
+ action: WorkspaceUserProjectSelectChangeAction;
46
+ }) => void;
47
+ projectLocked?: boolean;
48
+ renderAddProjectIcon?: () => ReactNode;
49
+ shouldApplyPreparedSelection?: boolean;
50
+ showKnownProjectOptions?: boolean;
51
+ service?: WorkspaceUserProjectServiceLike | null;
52
+ selectedProjectPath?: string | null;
53
+ showCreateProjectAction?: boolean;
54
+ showNoProjectAction?: boolean;
55
+ unlistedProjectLabel?: string;
56
+ }
57
+ declare function WorkspaceUserProjectSelect({ api, classNames, contentAlign, contentSide, contentSideOffset, disabled: disabledProp, i18n, labels, onProjectMissingChange, onProjectPathChange, projectLocked, renderAddProjectIcon, shouldApplyPreparedSelection, showKnownProjectOptions, service, selectedProjectPath, showCreateProjectAction, showNoProjectAction, unlistedProjectLabel }: WorkspaceUserProjectSelectProps): React.JSX.Element;
58
+ declare function resolveWorkspaceUserProjectSelectLabels(i18n?: WorkspaceUserProjectI18nRuntime, overrides?: WorkspaceUserProjectSelectLabelOverrides): WorkspaceUserProjectSelectLabels;
59
+
60
+ export { WorkspaceUserProjectSelect, type WorkspaceUserProjectSelectChangeAction, type WorkspaceUserProjectSelectClassNames, type WorkspaceUserProjectSelectLabelOverrides, type WorkspaceUserProjectSelectLabels, type WorkspaceUserProjectSelectProps, resolveWorkspaceUserProjectSelectLabels };