Keep wrappers off the library mid-prompt so Use as input and Extend restore the same split, send stills to xAIGen as hidden inputs, and stop the two-column library from growing with the list. Co-authored-by: Cursor <cursoragent@cursor.com>
69 lines
2.8 KiB
Vue
69 lines
2.8 KiB
Vue
<template>
|
|
<details v-if="!embedded" class="rounded-2xl border border-white/10 bg-zinc-950/40 px-4 py-3">
|
|
<summary class="cursor-pointer text-sm font-medium text-zinc-200">
|
|
Global locks
|
|
<span class="ml-2 font-normal text-xs text-zinc-500">Every shot inherits these. Each clip adds one beat.</span>
|
|
</summary>
|
|
<p class="mt-2 text-xs text-zinc-500">
|
|
Shared standards for last-frame I2V. Later shots get a compact <span class="text-zinc-300">[INHERITS]</span> line, not this whole block again.
|
|
</p>
|
|
<div class="mt-3">
|
|
<PromptField
|
|
:model-value="modelValue"
|
|
:rows="10"
|
|
title="Global locks"
|
|
write-label="Write locks"
|
|
edit-label="View / edit locks"
|
|
textarea-class="max-h-64"
|
|
:placeholder="placeholder"
|
|
@update:model-value="emit('update:modelValue', $event)"
|
|
/>
|
|
<div class="mt-2 flex flex-wrap gap-2">
|
|
<button type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-300 hover:border-amber-300/40 hover:text-amber-100" @click="insertTemplate">Insert template</button>
|
|
<button v-if="modelValue.trim()" type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-400 hover:text-white" @click="emit('update:modelValue', '')">Clear</button>
|
|
</div>
|
|
</div>
|
|
</details>
|
|
<div v-else>
|
|
<p class="text-sm font-medium text-zinc-200">Global locks</p>
|
|
<p class="mt-0.5 text-xs text-zinc-500">
|
|
Shared standards for last-frame I2V. Later shots get a compact <span class="text-zinc-300">[INHERITS]</span> line, not this whole block again.
|
|
</p>
|
|
<div class="mt-3">
|
|
<PromptField
|
|
:model-value="modelValue"
|
|
:rows="10"
|
|
title="Global locks"
|
|
write-label="Write locks"
|
|
edit-label="View / edit locks"
|
|
textarea-class="max-h-64"
|
|
:placeholder="placeholder"
|
|
@update:model-value="emit('update:modelValue', $event)"
|
|
/>
|
|
<div class="mt-2 flex flex-wrap gap-2">
|
|
<button type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-300 hover:border-amber-300/40 hover:text-amber-100" @click="insertTemplate">Insert template</button>
|
|
<button v-if="modelValue.trim()" type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-400 hover:text-white" @click="emit('update:modelValue', '')">Clear</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { DEFAULT_GLOBAL_LOCKS } from '~/utils/globalLocks'
|
|
|
|
defineProps<{
|
|
modelValue: string
|
|
embedded?: boolean
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
'update:modelValue': [value: string]
|
|
}>()
|
|
|
|
const placeholder = DEFAULT_GLOBAL_LOCKS
|
|
|
|
function insertTemplate() {
|
|
emit('update:modelValue', DEFAULT_GLOBAL_LOCKS)
|
|
}
|
|
</script>
|