Skip to content

Commit

Permalink
Merge pull request #2278 from appbaseio/fix/strict-selection
Browse files Browse the repository at this point in the history
fix(tag mode): strict selection behavior to only allow picking from suggestions
  • Loading branch information
mohdashraf010897 authored Feb 8, 2024
2 parents b129e56 + 66f44c7 commit cdf81ed
Show file tree
Hide file tree
Showing 23 changed files with 1,131 additions and 28 deletions.
20 changes: 20 additions & 0 deletions packages/vue/examples/with-nuxt-typescript/.nuxt/app.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

import { updateAppConfig } from '#app/config'
import { defuFn } from 'defu'

const inlineConfig = {
"nuxt": {
"buildId": "d36fc3fc-868f-462a-b7af-cc6d9457242a"
}
}

// Vite - webpack is handled directly in #app/config
if (import.meta.hot) {
import.meta.hot.accept((newModule) => {
updateAppConfig(newModule.default)
})
}



export default /* #__PURE__ */ defuFn(inlineConfig)
92 changes: 92 additions & 0 deletions packages/vue/examples/with-nuxt-typescript/.nuxt/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// Generated by components discovery
declare module 'vue' {
export interface GlobalComponents {
'Search': typeof import("../components/search.vue")['default']
'NuxtWelcome': typeof import("../../../../../node_modules/@nuxt/ui-templates/dist/templates/welcome.vue")['default']
'NuxtLayout': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-layout")['default']
'NuxtErrorBoundary': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-error-boundary")['default']
'ClientOnly': typeof import("../../../../../node_modules/nuxt/dist/app/components/client-only")['default']
'DevOnly': typeof import("../../../../../node_modules/nuxt/dist/app/components/dev-only")['default']
'ServerPlaceholder': typeof import("../../../../../node_modules/nuxt/dist/app/components/server-placeholder")['default']
'NuxtLink': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-link")['default']
'NuxtLoadingIndicator': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-loading-indicator")['default']
'NuxtImg': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtImg']
'NuxtPicture': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtPicture']
'NuxtPage': typeof import("../../../../../node_modules/nuxt/dist/pages/runtime/page")['default']
'NoScript': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['NoScript']
'Link': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Link']
'Base': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Base']
'Title': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Title']
'Meta': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Meta']
'Style': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Style']
'Head': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Head']
'Html': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Html']
'Body': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Body']
'LazySearch': typeof import("../components/search.vue")['default']
'LazyNuxtWelcome': typeof import("../../../../../node_modules/@nuxt/ui-templates/dist/templates/welcome.vue")['default']
'LazyNuxtLayout': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-layout")['default']
'LazyNuxtErrorBoundary': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-error-boundary")['default']
'LazyClientOnly': typeof import("../../../../../node_modules/nuxt/dist/app/components/client-only")['default']
'LazyDevOnly': typeof import("../../../../../node_modules/nuxt/dist/app/components/dev-only")['default']
'LazyServerPlaceholder': typeof import("../../../../../node_modules/nuxt/dist/app/components/server-placeholder")['default']
'LazyNuxtLink': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-link")['default']
'LazyNuxtLoadingIndicator': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-loading-indicator")['default']
'LazyNuxtImg': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtImg']
'LazyNuxtPicture': typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtPicture']
'LazyNuxtPage': typeof import("../../../../../node_modules/nuxt/dist/pages/runtime/page")['default']
'LazyNoScript': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['NoScript']
'LazyLink': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Link']
'LazyBase': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Base']
'LazyTitle': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Title']
'LazyMeta': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Meta']
'LazyStyle': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Style']
'LazyHead': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Head']
'LazyHtml': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Html']
'LazyBody': typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Body']
}
}

export const Search: typeof import("../components/search.vue")['default']
export const NuxtWelcome: typeof import("../../../../../node_modules/@nuxt/ui-templates/dist/templates/welcome.vue")['default']
export const NuxtLayout: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-layout")['default']
export const NuxtErrorBoundary: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-error-boundary")['default']
export const ClientOnly: typeof import("../../../../../node_modules/nuxt/dist/app/components/client-only")['default']
export const DevOnly: typeof import("../../../../../node_modules/nuxt/dist/app/components/dev-only")['default']
export const ServerPlaceholder: typeof import("../../../../../node_modules/nuxt/dist/app/components/server-placeholder")['default']
export const NuxtLink: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-link")['default']
export const NuxtLoadingIndicator: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-loading-indicator")['default']
export const NuxtImg: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtImg']
export const NuxtPicture: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtPicture']
export const NuxtPage: typeof import("../../../../../node_modules/nuxt/dist/pages/runtime/page")['default']
export const NoScript: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['NoScript']
export const Link: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Link']
export const Base: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Base']
export const Title: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Title']
export const Meta: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Meta']
export const Style: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Style']
export const Head: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Head']
export const Html: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Html']
export const Body: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Body']
export const LazySearch: typeof import("../components/search.vue")['default']
export const LazyNuxtWelcome: typeof import("../../../../../node_modules/@nuxt/ui-templates/dist/templates/welcome.vue")['default']
export const LazyNuxtLayout: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-layout")['default']
export const LazyNuxtErrorBoundary: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-error-boundary")['default']
export const LazyClientOnly: typeof import("../../../../../node_modules/nuxt/dist/app/components/client-only")['default']
export const LazyDevOnly: typeof import("../../../../../node_modules/nuxt/dist/app/components/dev-only")['default']
export const LazyServerPlaceholder: typeof import("../../../../../node_modules/nuxt/dist/app/components/server-placeholder")['default']
export const LazyNuxtLink: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-link")['default']
export const LazyNuxtLoadingIndicator: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-loading-indicator")['default']
export const LazyNuxtImg: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtImg']
export const LazyNuxtPicture: typeof import("../../../../../node_modules/nuxt/dist/app/components/nuxt-stubs")['NuxtPicture']
export const LazyNuxtPage: typeof import("../../../../../node_modules/nuxt/dist/pages/runtime/page")['default']
export const LazyNoScript: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['NoScript']
export const LazyLink: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Link']
export const LazyBase: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Base']
export const LazyTitle: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Title']
export const LazyMeta: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Meta']
export const LazyStyle: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Style']
export const LazyHead: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Head']
export const LazyHtml: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Html']
export const LazyBody: typeof import("../../../../../node_modules/nuxt/dist/head/runtime/components")['Body']

export const componentNames: string[]
24 changes: 24 additions & 0 deletions packages/vue/examples/with-nuxt-typescript/.nuxt/imports.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export { isVue2, isVue3 } from 'vue-demi';
export { defineNuxtLink } from '#app/components/nuxt-link';
export { useNuxtApp, defineNuxtPlugin, definePayloadPlugin, useRuntimeConfig, defineAppConfig } from '#app/nuxt';
export { requestIdleCallback, cancelIdleCallback } from '#app/compat/idle-callback';
export { useAppConfig, updateAppConfig } from '#app/config';
export { defineNuxtComponent } from '#app/composables/component';
export { useAsyncData, useLazyAsyncData, useNuxtData, refreshNuxtData, clearNuxtData } from '#app/composables/asyncData';
export { useHydration } from '#app/composables/hydrate';
export { useState, clearNuxtState } from '#app/composables/state';
export { clearError, createError, isNuxtError, showError, useError } from '#app/composables/error';
export { useFetch, useLazyFetch } from '#app/composables/fetch';
export { useCookie } from '#app/composables/cookie';
export { prerenderRoutes, useRequestHeaders, useRequestEvent, useRequestFetch, setResponseStatus } from '#app/composables/ssr';
export { onNuxtReady } from '#app/composables/ready';
export { preloadComponents, prefetchComponents, preloadRouteComponents } from '#app/composables/preload';
export { abortNavigation, addRouteMiddleware, defineNuxtRouteMiddleware, setPageLayout, navigateTo, useRoute, useRouter } from '#app/composables/router';
export { isPrerendered, loadPayload, preloadPayload, definePayloadReducer, definePayloadReviver } from '#app/composables/payload';
export { getAppManifest, getRouteRules } from '#app/composables/manifest';
export { reloadNuxtApp } from '#app/composables/chunk';
export { useRequestURL } from '#app/composables/url';
export { onBeforeRouteLeave, onBeforeRouteUpdate, useLink } from '#vue-router';
export { withCtx, withDirectives, withKeys, withMemo, withModifiers, withScopeId, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, computed, customRef, isProxy, isReactive, isReadonly, isRef, markRaw, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, watch, watchEffect, watchPostEffect, watchSyncEffect, isShallow, effect, effectScope, getCurrentScope, onScopeDispose, defineComponent, defineAsyncComponent, resolveComponent, getCurrentInstance, h, inject, hasInjectionContext, nextTick, provide, defineModel, defineOptions, defineSlots, mergeModels, toValue, useModel, useAttrs, useCssModule, useCssVars, useSlots, useTransitionState, Component, ComponentPublicInstance, ComputedRef, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode } from 'vue';
export { injectHead, useHead, useSeoMeta, useHeadSafe, useServerHead, useServerSeoMeta, useServerHeadSafe } from '@unhead/vue';
export { definePageMeta } from '../../../../../node_modules/nuxt/dist/pages/runtime/composables';
21 changes: 21 additions & 0 deletions packages/vue/examples/with-nuxt-typescript/.nuxt/nuxt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Generated by nuxi
/// <reference types="@nuxtjs/emotion" />
/// <reference types="@nuxt/devtools" />
/// <reference types="nuxt" />
/// <reference path="types/plugins.d.ts" />
/// <reference path="types/vue-shim.d.ts" />
/// <reference path="types/schema.d.ts" />
/// <reference path="types/app.config.d.ts" />
/// <reference types="vite/client" />
/// <reference types="vue-router" />
/// <reference path="types/middleware.d.ts" />
/// <reference path="types/layouts.d.ts" />
/// <reference path="vue-router-stub.d.ts" />
/// <reference path="components.d.ts" />
/// <reference path="types/imports.d.ts" />
/// <reference path="imports.d.ts" />
/// <reference path="nuxt-config-schema" />
/// <reference path="schema/nuxt.schema.d.ts" />
/// <reference path="types/nitro.d.ts" />

export {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export interface NuxtCustomSchema {

}
export type CustomAppConfig = Exclude<NuxtCustomSchema['appConfig'], undefined>
type _CustomAppConfig = CustomAppConfig

declare module '@nuxt/schema' {
interface NuxtConfig extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface NuxtOptions extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface CustomAppConfig extends _CustomAppConfig {}
}

declare module 'nuxt/schema' {
interface NuxtConfig extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface NuxtOptions extends Omit<NuxtCustomSchema, 'appConfig'> {}
interface CustomAppConfig extends _CustomAppConfig {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"id": "#"
}
100 changes: 100 additions & 0 deletions packages/vue/examples/with-nuxt-typescript/.nuxt/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Generated by nuxi
{
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"jsx": "preserve",
"jsxImportSource": "vue",
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"skipLibCheck": true,
"isolatedModules": true,
"useDefineForClassFields": true,
"strict": true,
"noImplicitThis": true,
"esModuleInterop": true,
"types": [],
"verbatimModuleSyntax": true,
"allowJs": true,
"noEmit": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"paths": {
"~": [
".."
],
"~/*": [
"../*"
],
"@": [
".."
],
"@/*": [
"../*"
],
"~~": [
".."
],
"~~/*": [
"../*"
],
"@@": [
".."
],
"@@/*": [
"../*"
],
"assets": [
"../assets"
],
"assets/*": [
"../assets/*"
],
"public": [
"../public"
],
"#app": [
"../../../../../node_modules/nuxt/dist/app"
],
"#app/*": [
"../../../../../node_modules/nuxt/dist/app/*"
],
"vue-demi": [
"../../../../../node_modules/nuxt/dist/app/compat/vue-demi"
],
"#vue-router": [
"./vue-router-stub"
],
"#imports": [
"./imports"
],
"#build": [
"."
],
"#build/*": [
"./*"
],
"#components": [
"./components"
]
}
},
"include": [
"./nuxt.d.ts",
"../**/*",
"../../../../../node_modules/@nuxtjs/emotion/runtime",
"../../../../../node_modules/@nuxt/devtools/runtime",
"..",
"../../../../../node_modules/nuxt/dist/app",
"../../../../../node_modules/nuxt/dist/app/compat/vue-demi"
],
"exclude": [
"../node_modules",
"../../../../../node_modules",
"../../../../../node_modules/nuxt/node_modules",
"../../../../../node_modules/@nuxtjs/emotion/runtime/server",
"../../../../../node_modules/@nuxt/devtools/runtime/server",
"../dist",
"../.vercel/output"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"allowJs": true,
"resolveJsonModule": true,
"jsx": "preserve",
"allowSyntheticDefaultImports": true,
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
"paths": {
"#imports": [
"./types/nitro-imports"
],
"#paths": [
"../../../../../node_modules/nuxt/dist/core/runtime/nitro/paths"
],
"~": [
"./.."
],
"~/*": [
"../*"
],
"@": [
"./.."
],
"@/*": [
"../*"
],
"~~": [
"./.."
],
"~~/*": [
"../*"
],
"@@": [
"./.."
],
"@@/*": [
"../*"
],
"assets": [
"../assets"
],
"assets/*": [
"../assets/*"
],
"public": [
"../public"
]
}
},
"include": [
"./types/nitro-nuxt.d.ts",
"../../../../../node_modules/@nuxtjs/emotion/runtime/server",
"../../../../../node_modules/@nuxt/devtools/runtime/server",
"./types/nitro.d.ts",
"../**/*",
"../server/**/*"
],
"exclude": [
"../node_modules",
"../../../../../node_modules",
"../../../../../node_modules/nuxt/node_modules",
"../dist"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

import type { CustomAppConfig } from 'nuxt/schema'
import type { Defu } from 'defu'


declare const inlineConfig = {
"nuxt": {
"buildId": "d36fc3fc-868f-462a-b7af-cc6d9457242a"
}
}
type ResolvedAppConfig = Defu<typeof inlineConfig, []>
type IsAny<T> = 0 extends 1 & T ? true : false

type MergedAppConfig<Resolved extends Record<string, unknown>, Custom extends Record<string, unknown>> = {
[K in keyof (Resolved & Custom)]: K extends keyof Custom
? unknown extends Custom[K]
? Resolved[K]
: IsAny<Custom[K]> extends true
? Resolved[K]
: Custom[K] extends Record<string, any>
? Resolved[K] extends Record<string, any>
? MergedAppConfig<Resolved[K], Custom[K]>
: Exclude<Custom[K], undefined>
: Exclude<Custom[K], undefined>
: Resolved[K]
}

declare module 'nuxt/schema' {
interface AppConfig extends MergedAppConfig<ResolvedAppConfig, CustomAppConfig> { }
}
declare module '@nuxt/schema' {
interface AppConfig extends MergedAppConfig<ResolvedAppConfig, CustomAppConfig> { }
}
Loading

0 comments on commit cdf81ed

Please sign in to comment.