{"version":3,"file":"literal-guards.mjs","names":[],"sources":["../../../../src/_generated/style-rules/literal-guards.ts"],"sourcesContent":["/*\n * AUTO-GENERATED FILE — DO NOT EDIT.\n * Source of truth: packages/style-rules/src/\n * Regenerate with `pnpm generate:shared` (runs automatically at build/dev/install).\n */\n\n/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type {\n  DatetimeLiteral,\n  LocalDatetimeLiteral,\n  TimeLiteral,\n} from './literal-types';\n\nfunction isObjectWithStringKey<K extends string>(\n  value: unknown,\n  key: K,\n): value is Record<K, string> {\n  return (\n    typeof value === 'object' &&\n    value !== null &&\n    key in value &&\n    typeof (value as Record<string, unknown>)[key] === 'string'\n  );\n}\n\n/** Returns whether a value is a `{ datetime: string }` wrapper. Does not validate the string. */\nexport function isDatetimeLiteral(value: unknown): value is DatetimeLiteral {\n  return isObjectWithStringKey(value, 'datetime');\n}\n\n/** Returns whether a value is a `{ localdatetime: string }` wrapper. Does not validate the string. */\nexport function isLocalDatetimeLiteral(\n  value: unknown,\n): value is LocalDatetimeLiteral {\n  return isObjectWithStringKey(value, 'localdatetime');\n}\n\n/** Returns whether a value is a `{ time: string }` wrapper. Does not validate the string. */\nexport function isTimeLiteral(value: unknown): value is TimeLiteral {\n  return isObjectWithStringKey(value, 'time');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCA,SAAS,sBACP,OACA,KAC4B;CAC5B,OACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAO,SACP,OAAQ,MAAkC,SAAS;AAEvD;;AAGA,SAAgB,kBAAkB,OAA0C;CAC1E,OAAO,sBAAsB,OAAO,UAAU;AAChD;;AAGA,SAAgB,uBACd,OAC+B;CAC/B,OAAO,sBAAsB,OAAO,eAAe;AACrD;;AAGA,SAAgB,cAAc,OAAsC;CAClE,OAAO,sBAAsB,OAAO,MAAM;AAC5C"}