@nodaro/prompts 1.3.0 → 1.4.0
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/dist/index.cjs +18 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/person-exposure-hints.test.ts +61 -0
- package/src/__tests__/seedance-2-inputs.test.ts +22 -0
- package/src/person.ts +13 -2
- package/src/seedance-2-inputs.ts +20 -1
- package/src/styling.ts +12 -0
package/dist/index.cjs
CHANGED
|
@@ -2535,8 +2535,8 @@ var PEOPLE = [
|
|
|
2535
2535
|
{ id: "feature-nostril-piercing", label: "Nostril Piercing", dimension: "distinctive-features", description: "Single nostril stud or ring", promptHint: "with a single nostril piercing, a small stud or ring at the nostril" },
|
|
2536
2536
|
{ id: "feature-bare-shoulders", label: "Bare Shoulders", dimension: "distinctive-features", description: "Bare shoulders exposed", promptHint: "with bare shoulders exposed, the line of the collarbone and shoulder muscles uncovered" },
|
|
2537
2537
|
{ id: "feature-collarbone-visible", label: "Collarbone Visible", dimension: "distinctive-features", description: "Prominent collarbone catching light", promptHint: "with a prominent collarbone clearly defined and catching the light" },
|
|
2538
|
-
{ id: "feature-midriff-visible", label: "Midriff Visible", dimension: "distinctive-features", description: "Exposed midriff between top and bottom", promptHint: "
|
|
2539
|
-
{ id: "feature-navel-visible", label: "Navel Visible", dimension: "distinctive-features", description: "Visible navel on bare stomach", promptHint: "with
|
|
2538
|
+
{ id: "feature-midriff-visible", label: "Midriff Visible", dimension: "distinctive-features", description: "Exposed midriff between top and bottom", promptHint: "wearing a cropped style with the midriff visible" },
|
|
2539
|
+
{ id: "feature-navel-visible", label: "Navel Visible", dimension: "distinctive-features", description: "Visible navel on bare stomach", promptHint: "with the navel visible" },
|
|
2540
2540
|
{ id: "feature-elongated-neck", label: "Elongated Neck", dimension: "distinctive-features", description: "Long swan-like neck", promptHint: "with an elongated, swan-like neck, long and gracefully extended" },
|
|
2541
2541
|
{ id: "feature-under-eye-circles", label: "Under-Eye Circles", dimension: "distinctive-features", description: "Subtle dark circles under the eyes (distinct from puffy eye-bags)", promptHint: "with subtle dark circles under the eyes" },
|
|
2542
2542
|
{ id: "feature-fangs", label: "Fangs", dimension: "distinctive-features", description: "Visible fangs (vampire / character archetype)", promptHint: "with visible fangs at the canines, character / vampire archetype" },
|
|
@@ -2841,7 +2841,13 @@ function buildAgeHint(ageId, customAge) {
|
|
|
2841
2841
|
function emitIndependentHints(value) {
|
|
2842
2842
|
const ids = normalizePickIds(value);
|
|
2843
2843
|
const out = [];
|
|
2844
|
+
const midriff = ids.includes("feature-midriff-visible");
|
|
2845
|
+
const navel = ids.includes("feature-navel-visible");
|
|
2844
2846
|
for (const id of ids) {
|
|
2847
|
+
if (midriff && navel && (id === "feature-midriff-visible" || id === "feature-navel-visible")) {
|
|
2848
|
+
if (id === "feature-midriff-visible") out.push("wearing a cropped style, midriff and navel visible");
|
|
2849
|
+
continue;
|
|
2850
|
+
}
|
|
2845
2851
|
const hint = getPersonPromptHint(id);
|
|
2846
2852
|
if (hint) out.push(hint);
|
|
2847
2853
|
}
|
|
@@ -3570,9 +3576,12 @@ function buildStylingHints(data) {
|
|
|
3570
3576
|
const hints = [];
|
|
3571
3577
|
const pre = typeof data.preText === "string" ? data.preText.trim() : "";
|
|
3572
3578
|
if (pre) hints.push(pre);
|
|
3579
|
+
const lipStateRaw = data.lipState;
|
|
3580
|
+
const boldRedAlready = Array.isArray(lipStateRaw) ? lipStateRaw.includes("lip-state-bold-red") : lipStateRaw === "lip-state-bold-red";
|
|
3573
3581
|
for (const dimension of STYLING_DIMENSION_ORDER) {
|
|
3574
3582
|
const field = STYLING_FIELD_BY_DIMENSION[dimension];
|
|
3575
3583
|
const raw = data[field];
|
|
3584
|
+
if (dimension === "makeup" && boldRedAlready && raw === "makeup-bold-lips") continue;
|
|
3576
3585
|
if (typeof raw === "string" && raw.length > 0) {
|
|
3577
3586
|
const hint = getStylingPromptHint(raw);
|
|
3578
3587
|
if (hint) hints.push(hint);
|
|
@@ -10561,6 +10570,10 @@ var clean = (u) => {
|
|
|
10561
10570
|
return t && t.length > 0 ? t : void 0;
|
|
10562
10571
|
};
|
|
10563
10572
|
var cleanList = (xs) => (xs ?? []).map(clean).filter((x) => x !== void 0);
|
|
10573
|
+
function promptBindsFirstFrame(prompt) {
|
|
10574
|
+
if (!prompt) return false;
|
|
10575
|
+
return /@image_\d+\s+as\s+the\s+(first|opening)\s*(\(first\))?\s*frame/i.test(prompt);
|
|
10576
|
+
}
|
|
10564
10577
|
function resolveSeedance2Inputs(args) {
|
|
10565
10578
|
const firstFrameUrl = clean(args.firstFrameUrl);
|
|
10566
10579
|
const lastFrameUrl = clean(args.lastFrameUrl);
|
|
@@ -10591,7 +10604,8 @@ function resolveSeedance2Inputs(args) {
|
|
|
10591
10604
|
lastOrdinal = referenceImageUrls.length;
|
|
10592
10605
|
}
|
|
10593
10606
|
let promptSuffix = "";
|
|
10594
|
-
|
|
10607
|
+
const suppressFrameSentence = promptBindsFirstFrame(args.prompt);
|
|
10608
|
+
if (suppressFrameSentence && firstOrdinal > 0 && lastOrdinal === 0) ; else if (firstOrdinal > 0 && lastOrdinal > 0) {
|
|
10595
10609
|
promptSuffix = `Use ${REF_BINDING.ordinal(firstOrdinal)} as the opening (first) frame and ${REF_BINDING.ordinal(lastOrdinal)} as the closing (last) frame of the video.`;
|
|
10596
10610
|
} else if (firstOrdinal > 0) {
|
|
10597
10611
|
promptSuffix = REF_BINDING.frame(firstOrdinal, "opening");
|
|
@@ -31741,6 +31755,7 @@ exports.listPickerCatalogs = listPickerCatalogs;
|
|
|
31741
31755
|
exports.migratePersonValue = migratePersonValue;
|
|
31742
31756
|
exports.pickerFanoutTargets = pickerFanoutTargets;
|
|
31743
31757
|
exports.projectPickerCatalog = projectPickerCatalog;
|
|
31758
|
+
exports.promptBindsFirstFrame = promptBindsFirstFrame;
|
|
31744
31759
|
exports.renderStructuredFields = renderStructuredFields;
|
|
31745
31760
|
exports.resolveBrandInput = resolveBrandInput;
|
|
31746
31761
|
exports.resolveCharacterMentions = resolveCharacterMentions;
|