@edgedev/create-edge-app 1.1.25 → 1.1.27
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.
- package/README.md +55 -20
- package/{agent.md → agents.md} +2 -0
- package/bin/cli.js +6 -6
- package/edge/components/auth/login.vue +384 -0
- package/edge/components/auth/register.vue +396 -0
- package/edge/components/auth.vue +108 -0
- package/edge/components/autoFileUpload.vue +215 -0
- package/edge/components/billing.vue +8 -0
- package/edge/components/buttonDivider.vue +14 -0
- package/edge/components/chip.vue +34 -0
- package/edge/components/clipboardButton.vue +42 -0
- package/edge/components/cms/block.vue +529 -0
- package/edge/components/cms/blockApi.vue +212 -0
- package/edge/components/cms/blockEditor.vue +725 -0
- package/edge/components/cms/blockInput.vue +66 -0
- package/edge/components/cms/blockPicker.vue +486 -0
- package/edge/components/cms/blockRender.vue +78 -0
- package/edge/components/cms/blockSheetContent.vue +28 -0
- package/edge/components/cms/codeEditor.vue +466 -0
- package/edge/components/cms/fontUpload.vue +327 -0
- package/edge/components/cms/htmlContent.vue +807 -0
- package/edge/components/cms/init_blocks/api_with_subarrays.html +17 -0
- package/edge/components/cms/init_blocks/array_with_collection.html +7 -0
- package/edge/components/cms/init_blocks/array_with_objects.html +7 -0
- package/edge/components/cms/init_blocks/carousel.html +103 -0
- package/edge/components/cms/init_blocks/contact_us.html +69 -0
- package/edge/components/cms/init_blocks/content_with_left_image.html +27 -0
- package/edge/components/cms/init_blocks/footer.html +24 -0
- package/edge/components/cms/init_blocks/header_divider.html +7 -0
- package/edge/components/cms/init_blocks/hero.html +35 -0
- package/edge/components/cms/init_blocks/hero_carousel.html +52 -0
- package/edge/components/cms/init_blocks/newsletter.html +117 -0
- package/edge/components/cms/init_blocks/post_content.html +7 -0
- package/edge/components/cms/init_blocks/post_title_header.html +21 -0
- package/edge/components/cms/init_blocks/posts_list.html +20 -0
- package/edge/components/cms/init_blocks/properties_showcase.html +100 -0
- package/edge/components/cms/init_blocks/property_carousel.html +59 -0
- package/edge/components/cms/init_blocks/property_detail.html +112 -0
- package/edge/components/cms/init_blocks/property_detail_header.html +34 -0
- package/edge/components/cms/init_blocks/property_results.html +137 -0
- package/edge/components/cms/init_blocks/property_search.html +75 -0
- package/edge/components/cms/init_blocks/simple_array.html +7 -0
- package/edge/components/cms/mediaCard.vue +116 -0
- package/edge/components/cms/mediaManager.vue +386 -0
- package/edge/components/cms/menu.vue +1103 -0
- package/edge/components/cms/optionsSelect.vue +107 -0
- package/edge/components/cms/page.vue +1785 -0
- package/edge/components/cms/posts.vue +1083 -0
- package/edge/components/cms/site.vue +1475 -0
- package/edge/components/cms/themeDefaultMenu.vue +548 -0
- package/edge/components/cms/themeEditor.vue +429 -0
- package/edge/components/dashboard.vue +776 -0
- package/edge/components/editor.vue +671 -0
- package/edge/components/fileTree.vue +72 -0
- package/edge/components/files.vue +89 -0
- package/edge/components/formSubtypes/myOrgs.vue +214 -0
- package/edge/components/formSubtypes/users.vue +336 -0
- package/edge/components/functionChips.vue +57 -0
- package/edge/components/gError.vue +98 -0
- package/edge/components/gHelper.vue +67 -0
- package/edge/components/gInput.vue +1331 -0
- package/edge/components/loggingIn.vue +41 -0
- package/edge/components/menu.vue +137 -0
- package/edge/components/menuContent.vue +132 -0
- package/edge/components/myAccount.vue +317 -0
- package/edge/components/myOrganizations.vue +75 -0
- package/edge/components/myProfile.vue +122 -0
- package/edge/components/orgSwitcher.vue +25 -0
- package/edge/components/organizationMembers.vue +522 -0
- package/edge/components/organizationSettings.vue +271 -0
- package/edge/components/shad/breadcrumbs.vue +35 -0
- package/edge/components/shad/button.vue +43 -0
- package/edge/components/shad/checkbox.vue +73 -0
- package/edge/components/shad/combobox.vue +238 -0
- package/edge/components/shad/datepicker.vue +184 -0
- package/edge/components/shad/dialog.vue +32 -0
- package/edge/components/shad/dropdownMenu.vue +54 -0
- package/edge/components/shad/dropdownMenuItem.vue +21 -0
- package/edge/components/shad/form.vue +59 -0
- package/edge/components/shad/html.vue +877 -0
- package/edge/components/shad/input.vue +139 -0
- package/edge/components/shad/number.vue +109 -0
- package/edge/components/shad/select.vue +151 -0
- package/edge/components/shad/selectTags.vue +278 -0
- package/edge/components/shad/switch.vue +67 -0
- package/edge/components/shad/tags.vue +137 -0
- package/edge/components/shad/textarea.vue +102 -0
- package/edge/components/shad/typeMoney.vue +167 -0
- package/edge/components/sideBar.vue +288 -0
- package/edge/components/sideBarContent.vue +268 -0
- package/edge/components/sidebarProvider.vue +33 -0
- package/edge/components/tooltip.vue +16 -0
- package/edge/components/userMenu.vue +148 -0
- package/edge/components/v/alert.vue +59 -0
- package/edge/components/v/alertTitle.vue +18 -0
- package/edge/components/v/card.vue +53 -0
- package/edge/components/v/cardActions.vue +18 -0
- package/edge/components/v/cardText.vue +18 -0
- package/edge/components/v/cardTitle.vue +20 -0
- package/edge/components/v/col.vue +56 -0
- package/edge/components/v/list.vue +46 -0
- package/edge/components/v/listItem.vue +26 -0
- package/edge/components/v/listItemTitle.vue +18 -0
- package/edge/components/v/row.vue +42 -0
- package/edge/components/v/toolbar.vue +24 -0
- package/edge/composables/global.ts +519 -0
- package/edge-pull.sh +2 -0
- package/edge-push.sh +1 -0
- package/edge-status.sh +14 -0
- package/package.json +1 -1
- package/edge-components-install.sh +0 -1
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useVModel } from '@vueuse/core'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
title: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: 'Upload Files',
|
|
8
|
+
},
|
|
9
|
+
description: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'Drag and drop files here or click to upload.',
|
|
12
|
+
},
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: [Array, Object],
|
|
15
|
+
default: () => [],
|
|
16
|
+
},
|
|
17
|
+
accept: {
|
|
18
|
+
type: [String, Array],
|
|
19
|
+
default: '',
|
|
20
|
+
},
|
|
21
|
+
name: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: '',
|
|
24
|
+
},
|
|
25
|
+
multiple: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
29
|
+
dropDirectory: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
files: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
public: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
r2: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
filePath: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: '',
|
|
48
|
+
},
|
|
49
|
+
disabled: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
disabledText: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: 'Disabled',
|
|
56
|
+
},
|
|
57
|
+
extraMeta: {
|
|
58
|
+
type: Object,
|
|
59
|
+
default: () => ({}),
|
|
60
|
+
},
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const emits = defineEmits(['update:modelValue'])
|
|
64
|
+
|
|
65
|
+
const edgeFirebase = inject('edgeFirebase')
|
|
66
|
+
|
|
67
|
+
const state = reactive({
|
|
68
|
+
files: [],
|
|
69
|
+
uploading: false,
|
|
70
|
+
uploadProgress: 0,
|
|
71
|
+
currentUploadFile: '',
|
|
72
|
+
uploadErrors: [],
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
const modelValue = useVModel(props, 'modelValue', emits, {
|
|
76
|
+
passive: false,
|
|
77
|
+
prop: 'modelValue',
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
const normalizedAccept = computed(() => {
|
|
81
|
+
if (Array.isArray(props.accept)) {
|
|
82
|
+
return props.accept.join(',')
|
|
83
|
+
}
|
|
84
|
+
return props.accept
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
const acceptRegex = computed(() => {
|
|
88
|
+
return normalizedAccept.value
|
|
89
|
+
? new RegExp(normalizedAccept.value.replace(/,/g, '|').replace(/\./g, '\\.'), 'i')
|
|
90
|
+
: null
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const resetUploadProgressAfterDelay = () => {
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
state.uploadProgress = 0
|
|
96
|
+
}, 5000)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const uploadFiles = async () => {
|
|
100
|
+
const results = []
|
|
101
|
+
if (state.files && state.files.length > 0) {
|
|
102
|
+
state.uploadErrors = []
|
|
103
|
+
state.uploadProgress = 0
|
|
104
|
+
state.uploading = true
|
|
105
|
+
try {
|
|
106
|
+
let index = 0
|
|
107
|
+
for (const file of state.files) {
|
|
108
|
+
if (acceptRegex.value && !file.type.match(acceptRegex.value)) {
|
|
109
|
+
state.currentUploadFile = `Skipped: ${file.name} (unsupported file type)`
|
|
110
|
+
state.uploadErrors.push(`"${file.name}" is an unsupported file type. Please upload "${normalizedAccept.value}" files only.`)
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
state.currentUploadFile = `Uploading: ${file.name}`
|
|
114
|
+
const result = await edgeFirebase.uploadFile(
|
|
115
|
+
edgeGlobal.edgeState.currentOrganization,
|
|
116
|
+
file.file,
|
|
117
|
+
props.filePath,
|
|
118
|
+
props.public,
|
|
119
|
+
props.r2,
|
|
120
|
+
props.extraMeta,
|
|
121
|
+
)
|
|
122
|
+
results.push(result)
|
|
123
|
+
state.uploadProgress = ((index + 1) / state.files.length) * 100
|
|
124
|
+
index++
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
state.currentUploadFile = 'Upload complete!'
|
|
128
|
+
state.files = []
|
|
129
|
+
modelValue.value = results
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
state.uploadErrors.push(error)
|
|
133
|
+
}
|
|
134
|
+
resetUploadProgressAfterDelay()
|
|
135
|
+
state.uploading = false
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const uploadProgress = computed(() => {
|
|
140
|
+
if (!state.uploading)
|
|
141
|
+
return 100
|
|
142
|
+
return state.files.length === 1
|
|
143
|
+
? edgeFirebase.state.currentUploadProgress
|
|
144
|
+
: state.uploadProgress
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
const dropFiles = computed(() => state.files)
|
|
148
|
+
|
|
149
|
+
watch(dropFiles, () => {
|
|
150
|
+
uploadFiles()
|
|
151
|
+
})
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<template>
|
|
155
|
+
<Card color="secondary" class="px-0 relative py-2 my-2 drop-active text-center z-10 top-0 cursor-pointer">
|
|
156
|
+
<slot name="header" />
|
|
157
|
+
<file-upload
|
|
158
|
+
v-model="state.files"
|
|
159
|
+
:accept="normalizedAccept"
|
|
160
|
+
:name="props.name"
|
|
161
|
+
:multiple="props.multiple"
|
|
162
|
+
:drop-directory="props.dropDirectory"
|
|
163
|
+
:files="props.files"
|
|
164
|
+
drop
|
|
165
|
+
class="w-full cursor-pointer"
|
|
166
|
+
:disabled="props.disabled"
|
|
167
|
+
>
|
|
168
|
+
<div :class="props.disabled ? 'max-w-[800px]' : ''" class="relative rounded-lg max-w-[800px] mx-auto py-4">
|
|
169
|
+
<div v-if="props.disabled" class="absolute top-0 right-0 w-full h-full bg-black opacity-95 flex flex-col items-center justify-center text-2xl font-bold text-white rounded-lg">
|
|
170
|
+
{{ disabledText }}
|
|
171
|
+
</div>
|
|
172
|
+
<Card-title class="pt-6">
|
|
173
|
+
<slot name="title">
|
|
174
|
+
Upload Files
|
|
175
|
+
</slot>
|
|
176
|
+
</Card-title>
|
|
177
|
+
<CardContent style="width:100%;" class="pb-3">
|
|
178
|
+
<slot name="description">
|
|
179
|
+
Drag and drop files here or click to upload.
|
|
180
|
+
</slot>
|
|
181
|
+
</CardContent>
|
|
182
|
+
</div>
|
|
183
|
+
</file-upload>
|
|
184
|
+
|
|
185
|
+
<Progress
|
|
186
|
+
v-if="state.uploading && uploadProgress > 0"
|
|
187
|
+
v-model="uploadProgress"
|
|
188
|
+
class="mx-auto w-1/2 mb-2"
|
|
189
|
+
/>
|
|
190
|
+
<span v-if="state.uploading || state.uploadProgress > 0">
|
|
191
|
+
{{ state.currentUploadFile }}
|
|
192
|
+
</span>
|
|
193
|
+
|
|
194
|
+
<template v-if="state.uploadErrors.length > 0">
|
|
195
|
+
<Alert
|
|
196
|
+
v-for="(error, index) in state.uploadErrors"
|
|
197
|
+
:key="index"
|
|
198
|
+
variant="destructive"
|
|
199
|
+
class="my-2 mx-auto w-1/2 text-left"
|
|
200
|
+
>
|
|
201
|
+
<AlertCircle class="h-5 w-5" />
|
|
202
|
+
<AlertTitle>File Not Uploaded</AlertTitle>
|
|
203
|
+
<AlertDescription>
|
|
204
|
+
{{ error }}
|
|
205
|
+
</AlertDescription>
|
|
206
|
+
</Alert>
|
|
207
|
+
</template>
|
|
208
|
+
</Card>
|
|
209
|
+
</template>
|
|
210
|
+
|
|
211
|
+
<style>
|
|
212
|
+
label[for="file"] {
|
|
213
|
+
cursor: pointer;
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex items-center">
|
|
3
|
+
<div class="w-full border-t border-gray-300 dark:border-white/15" aria-hidden="true" />
|
|
4
|
+
<div class="relative flex justify-center">
|
|
5
|
+
<slot>
|
|
6
|
+
<button type="button" class="inline-flex items-center gap-x-1.5 rounded-full bg-white px-3 py-1.5 text-sm font-semibold whitespace-nowrap text-gray-900 shadow-xs inset-ring inset-ring-gray-300 hover:bg-gray-50 dark:bg-white/10 dark:text-white dark:shadow-none dark:inset-ring-white/5 dark:hover:bg-white/20">
|
|
7
|
+
<PlusIcon class="-mr-0.5 -ml-1 size-5 text-gray-400" aria-hidden="true" />
|
|
8
|
+
Button text
|
|
9
|
+
</button>
|
|
10
|
+
</slot>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="w-full border-t border-gray-300 dark:border-white/10" aria-hidden="true" />
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
variant: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: 'filled',
|
|
9
|
+
},
|
|
10
|
+
class: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: false,
|
|
13
|
+
},
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const classes = computed(() => {
|
|
17
|
+
let combinedClasses = 'relative flex select-none items-center justify-center whitespace-nowrap rounded-lg'
|
|
18
|
+
if (props.variant === 'filled') {
|
|
19
|
+
combinedClasses += ' font-sans text-xs '
|
|
20
|
+
}
|
|
21
|
+
else if (props.variant === 'outlined') {
|
|
22
|
+
combinedClasses += ' border font-sans text-xs '
|
|
23
|
+
}
|
|
24
|
+
return combinedClasses
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<Badge :class="cn(classes, props.class)">
|
|
30
|
+
<span>
|
|
31
|
+
<slot />
|
|
32
|
+
</span>
|
|
33
|
+
</Badge>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useToast } from '@/components/ui/toast/use-toast'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
text: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
})
|
|
10
|
+
const { toast } = useToast()
|
|
11
|
+
const state = reactive({
|
|
12
|
+
buttonIcon: 'Copy',
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const copyToClipboard = async (text) => {
|
|
16
|
+
await navigator.clipboard.writeText(text)
|
|
17
|
+
state.buttonIcon = 'Check'
|
|
18
|
+
// toast({
|
|
19
|
+
// title: '',
|
|
20
|
+
// description: 'Copied to clipboard',
|
|
21
|
+
// duration: 1000,
|
|
22
|
+
// })
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
state.buttonIcon = 'Copy'
|
|
25
|
+
}, 3000)
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<edge-shad-button
|
|
31
|
+
class="w-4 h-4 mt-1"
|
|
32
|
+
size="icon"
|
|
33
|
+
variant="text"
|
|
34
|
+
@click.stop.prevent="copyToClipboard(props.text)"
|
|
35
|
+
>
|
|
36
|
+
<component :is="state.buttonIcon" class="w-4 h-4" />
|
|
37
|
+
</edge-shad-button>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<style lang="scss" scoped>
|
|
41
|
+
|
|
42
|
+
</style>
|