OverviewFilesCommitsIssuesDocsReleasesPeers

ollama_semantic_function_calling / ollamatools-new / keet / node_modules / twind / shim / shim.cjs.map

8 lines · map ref:
{
  "version": 3,
  "sources": ["../../src/shim/index.ts", "../../node_modules/distilt/shim-node-cjs.js"],
  "sourcesContent": ["/**\n * [[include:src/shim/README.md]]\n *\n * @packageDocumentation\n * @module twind/shim\n */\n\nimport type { Configuration } from 'twind'\n\nimport { setup as setupTW, createObserver } from 'twind/observe'\n\nexport * from 'twind'\n\n/**\n * Options for {@link setup}.\n */\nexport interface ShimConfiguration extends Configuration {\n  /**\n   * The root element to shim (default: `document.documentElement`).\n   */\n  target?: HTMLElement\n}\n\nif (typeof document !== 'undefined' && typeof addEventListener == 'function') {\n  // eslint-disable-next-line no-var\n  var onload = () => {\n    const script = document.querySelector('script[type=\"twind-config\"]')\n\n    setup(script ? JSON.parse(script.innerHTML) : {})\n  }\n\n  if (document.readyState === 'loading') {\n    // Loading hasn't finished yet\n    addEventListener('DOMContentLoaded', onload)\n  } else {\n    // `DOMContentLoaded` has already fired\n    // invoke on next tick to allow other setup methods to run\n    // eslint-disable-next-line no-var\n    var timeoutRef = setTimeout(onload)\n  }\n}\n\nconst observer = createObserver()\n\n/**\n * Stop shimming/observing all nodes.\n */\nexport const disconnect = (): void => {\n  if (onload) {\n    // Removing the callbacks ensures that the setup is called only once\n    // either programmatically from userland or by DOMContentLoaded/setTimeout\n    removeEventListener('DOMContentLoaded', onload)\n    clearTimeout(timeoutRef)\n  }\n\n  observer.disconnect()\n}\n\n/**\n * Configure the default {@link tw} and starts {@link observe | observing} the\n * {@link ShimConfiguration.target | target element} (default: `document.documentElement`).\n *\n * You do not need to call this method. As an alternativ you can provide a\n * `<script type=\"twind-config\">...</script>` element within the document.\n * The content must be valid JSON and all {@link twind.setup | twind setup options}\n * (including hash) are supported.\n */\nexport const setup = ({\n  target = document.documentElement,\n  ...config\n}: ShimConfiguration = {}): void => {\n  if (Object.keys(config).length) {\n    setupTW(config)\n  }\n\n  // Remove event listeners\n  disconnect()\n\n  observer.observe(target)\n\n  target.hidden = false\n}\n", "import { pathToFileURL } from 'url'\n\nexport const shim_import_meta_url = /*#__PURE__*/ pathToFileURL(__filename)\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAA8B;AAEvB,IAAM,uBAAqC,8CAAc;;;ADOhE,qBAAiD;AAEjD,sBAAc;AAYd,IAAI,OAAO,aAAa,eAAe,OAAO,oBAAoB,YAAY;AAExE,WAAS,MAAM;AACjB,UAAM,SAAS,SAAS,cAAc;AAEtC,UAAM,SAAS,KAAK,MAAM,OAAO,aAAa;AAAA;AAGhD,MAAI,SAAS,eAAe,WAAW;AAErC,qBAAiB,oBAAoB;AAAA,SAChC;AAID,iBAAa,WAAW;AAAA;AAAA;AAb1B;AAaE;AAIR,IAAM,WAAW;AAKV,IAAM,aAAa,MAAY;AACpC,MAAI,QAAQ;AAGV,wBAAoB,oBAAoB;AACxC,iBAAa;AAAA;AAGf,WAAS;AAAA;AAYJ,IAAM,QAAQ,CAAC,KAGC,OAAa;AAHd,MACpB;AAAA,aAAS,SAAS;AAAA,MADE,IAEjB,gBAFiB,IAEjB;AAAA,IADH;AAAA;AAGA,MAAI,OAAO,KAAK,QAAQ,QAAQ;AAC9B,8BAAQ;AAAA;AAIV;AAEA,WAAS,QAAQ;AAEjB,SAAO,SAAS;AAAA;",
  "names": []
}