@cenk1cenk2/md-printer 2.2.74 → 2.2.76

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.
@@ -60,7 +60,7 @@ class MDPrinter extends Command {
60
60
  async run() {
61
61
  this.tasks.add([
62
62
  {
63
- task: async (ctx) => {
63
+ task: /* @__PURE__ */ __name(async (ctx) => {
64
64
  const file = join(process.cwd(), this.args.file);
65
65
  if (!INPUT_FILE_ACCEPTED_TYPES.includes(extname(file))) {
66
66
  throw new Error(`Input file should be ending with the extension: ${INPUT_FILE_ACCEPTED_TYPES.join(", ")} -> current: ${extname(file)}`);
@@ -72,10 +72,10 @@ class MDPrinter extends Command {
72
72
  ctx.file = file;
73
73
  ctx.content = await this.fs.read(file);
74
74
  ctx.graymatter = graymatter.read(ctx.file);
75
- }
75
+ }, "task")
76
76
  },
77
77
  {
78
- task: async (ctx) => {
78
+ task: /* @__PURE__ */ __name(async (ctx) => {
79
79
  const template = ctx.graymatter?.data?.template ?? this.flags.template;
80
80
  this.logger.debug("Loading template: %s", template);
81
81
  ctx.templates = new RegExp(/\.\.?\//).test(template) ? join(process.cwd(), template) : join(this.config.root, TEMPLATE_DIRECTORY, template);
@@ -122,15 +122,15 @@ class MDPrinter extends Command {
122
122
  ctx.content = ctx.graymatter.content;
123
123
  this.logger.debug("Frontmatter: %o", ctx.graymatter.data);
124
124
  }
125
- }
125
+ }, "task")
126
126
  },
127
127
  {
128
- task: async (ctx) => {
128
+ task: /* @__PURE__ */ __name(async (ctx) => {
129
129
  if (this.flags.dev) {
130
130
  ctx.options.devtools = true;
131
131
  }
132
132
  return this.runMd2Pdf(ctx);
133
- }
133
+ }, "task")
134
134
  }
135
135
  ]);
136
136
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/run.ts"],"sourcesContent":["import { Args, Flags } from '@oclif/core'\nimport { watch } from 'chokidar'\nimport { default as graymatter } from 'gray-matter'\nimport { mdToPdf } from 'md-to-pdf'\nimport type { PdfConfig } from 'md-to-pdf/dist/lib/config.js'\nimport type { PdfOutput } from 'md-to-pdf/dist/lib/generate-output.js'\nimport Nunjucks from 'nunjucks'\nimport { basename, dirname, extname, join } from 'path'\n\nimport type { ShouldRunAfterHook, ShouldRunBeforeHook } from '@cenk1cenk2/oclif-common'\nimport { Command, ConfigService, FileSystemService } from '@cenk1cenk2/oclif-common'\nimport { INPUT_FILE_ACCEPTED_TYPES, OUTPUT_FILE_ACCEPTED_TYPES, RequiredTemplateFiles, TEMPLATE_DIRECTORY, TemplateFiles } from '@constants'\nimport type { MdPrinterCtx } from '@interfaces'\n\nexport default class MDPrinter extends Command<typeof MDPrinter, MdPrinterCtx> implements ShouldRunBeforeHook, ShouldRunAfterHook {\n static description = 'Generates a PDF from the given markdown file with the selected HTML template.'\n\n static flags = {\n template: Flags.string({\n char: 't',\n default: 'default',\n description: 'HTML template for the generated PDF file.'\n }),\n title: Flags.string({\n char: 'T',\n description: 'Overwrite document title.'\n }),\n watch: Flags.boolean({\n char: 'w',\n description: 'Watch the changes on the given file.'\n }),\n dev: Flags.boolean({\n char: 'd',\n description: 'Run with Chrome browser instead of publishing the file.'\n })\n }\n\n static args = {\n file: Args.string({\n description: 'Markdown file to be processed.',\n required: true\n }),\n output: Args.string({\n description: 'Output file that will be generated. Overwrites the one define in front-matter.',\n required: false\n })\n }\n\n private nunjucks = Nunjucks.configure({\n autoescape: false,\n throwOnUndefined: true,\n trimBlocks: true,\n lstripBlocks: false\n })\n private cs: ConfigService\n private fs: FileSystemService\n\n public async shouldRunBefore (): Promise<void> {\n this.cs = this.app.get(ConfigService)\n this.fs = this.app.get(FileSystemService)\n\n this.tasks.options = { silentRendererCondition: true }\n }\n\n public async run (): Promise<void> {\n this.tasks.add([\n {\n task: async (ctx): Promise<void> => {\n const file = join(process.cwd(), this.args.file)\n\n if (!INPUT_FILE_ACCEPTED_TYPES.includes(extname(file))) {\n throw new Error(`Input file should be ending with the extension: ${INPUT_FILE_ACCEPTED_TYPES.join(', ')} -> current: ${extname(file)}`)\n }\n\n if (!this.fs.exists(file)) {\n throw new Error(`File does not exists: ${file}`)\n }\n\n this.logger.debug('Loading file: %s', file)\n\n ctx.file = file\n\n ctx.content = await this.fs.read(file)\n\n ctx.graymatter = graymatter.read(ctx.file)\n }\n },\n\n {\n task: async (ctx): Promise<void> => {\n const template = ctx.graymatter?.data?.template ?? this.flags.template\n\n this.logger.debug('Loading template: %s', template)\n\n ctx.templates = new RegExp(/\\.\\.?\\//).test(template) ? join(process.cwd(), template) : join(this.config.root, TEMPLATE_DIRECTORY, template)\n\n await Promise.all(\n RequiredTemplateFiles.map(async (file) => {\n const current = join(ctx.templates, file)\n\n if (!this.fs.exists(current)) {\n throw new Error(`Template does not exists: ${current}`)\n }\n })\n )\n\n const paths: Record<TemplateFiles, string> = {\n [TemplateFiles.SETTINGS]: join(ctx.templates, TemplateFiles.SETTINGS),\n [TemplateFiles.CSS]: join(ctx.templates, TemplateFiles.CSS),\n [TemplateFiles.HEADER]: join(ctx.templates, TemplateFiles.HEADER),\n [TemplateFiles.FOOTER]: join(ctx.templates, TemplateFiles.FOOTER),\n [TemplateFiles.TEMPLATE]: join(ctx.templates, TemplateFiles.TEMPLATE)\n }\n\n ctx.options = await this.cs.extend<PdfConfig>([\n paths[TemplateFiles.SETTINGS],\n {\n pdf_options: {},\n dest: this.args?.output ?? ctx.graymatter.data?.dest ?? `${basename(this.args.file, extname(this.args.file))}.pdf`,\n document_title: ctx.graymatter.data?.document_title ?? this.flags.title ?? this.args.file,\n // https://github.com/simonhaenisch/md-to-pdf/issues/247\n launch_options: {\n headless: 'new'\n }\n }\n ])\n\n if (this.fs.exists(paths[TemplateFiles.CSS])) {\n this.logger.debug('CSS exists for template.')\n ctx.options.css = await this.fs.read(paths[TemplateFiles.CSS])\n }\n\n if (this.fs.exists(paths[TemplateFiles.HEADER])) {\n this.logger.debug('Header exists for template.')\n\n ctx.options.pdf_options.headerTemplate = await this.fs.read(paths[TemplateFiles.HEADER])\n }\n\n if (this.fs.exists(paths[TemplateFiles.FOOTER])) {\n this.logger.debug('Footer exists for template.')\n\n ctx.options.pdf_options.footerTemplate = await this.fs.read(paths[TemplateFiles.FOOTER])\n }\n\n if (this.fs.exists(paths[TemplateFiles.TEMPLATE])) {\n this.logger.debug('Design template exists for template.')\n\n ctx.template = await this.fs.read(paths[TemplateFiles.TEMPLATE])\n\n ctx.content = ctx.graymatter.content\n\n this.logger.debug('Frontmatter: %o', ctx.graymatter.data)\n }\n }\n },\n\n {\n task: async (ctx): Promise<void> => {\n if (this.flags.dev) {\n ctx.options.devtools = true\n }\n\n return this.runMd2Pdf(ctx)\n }\n }\n ])\n }\n\n public async shouldRunAfter (ctx: MdPrinterCtx): Promise<void> {\n if (this.flags.watch) {\n this.logger.info('Running in watch mode.')\n\n watch([ this.args.file, join(ctx.templates, '**/*') ]).on('change', async () => {\n await this.run()\n await this.runTasks()\n\n this.logger.info('Waiting for the next change.')\n })\n }\n }\n\n private async runMd2Pdf (ctx: MdPrinterCtx): Promise<void> {\n let pdf: PdfOutput\n\n if (ctx.template) {\n this.logger.debug('Rendering as template.')\n pdf = await mdToPdf({ content: this.nunjucks.renderString(ctx.template, { ...ctx.graymatter?.data ?? {}, content: ctx.content }) }, ctx.options)\n } else {\n this.logger.debug('Rendering as plain file.')\n pdf = await mdToPdf({ content: ctx.content }, ctx.options)\n }\n\n const output = pdf.filename\n\n await this.fs.mkdir(dirname(output))\n\n if (!output) {\n throw new Error('Output should either be defined with the variable or front-matter.')\n } else if (!OUTPUT_FILE_ACCEPTED_TYPES.includes(extname(output))) {\n throw new Error(`Output file should be ending with the extension: ${OUTPUT_FILE_ACCEPTED_TYPES.join(', ')} -> current: ${extname(output)}`)\n }\n\n this.logger.debug('Output file will be: %s', output)\n\n if (pdf) {\n this.logger.info('Writing file to output: %s', output)\n\n await this.fs.write(output, pdf.content)\n }\n }\n}\n"],"mappings":";;AAAA,SAASA,MAAMC,aAAa;AAC5B,SAASC,aAAa;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D,MAAMpF,QAAQsB,MAAAA,CAAAA;AAE5B,QAAI,CAACA,QAAQ;AACX,YAAM,IAAIsB,MAAM,oEAAA;IAClB,WAAW,CAACrC,2BAA2BoC,SAAS1C,QAAQqB,MAAAA,CAAAA,GAAU;AAChE,YAAM,IAAIsB,MAAM,oDAAoDrC,2BAA2BL,KAAK,IAAA,CAAA,gBAAqBD,QAAQqB,MAAAA,CAAAA,EAAS;IAC5I;AAEA,SAAKwB,OAAOC,MAAM,2BAA2BzB,MAAAA;AAE7C,QAAI2D,KAAK;AACP,WAAKnC,OAAOgC,KAAK,8BAA8BxD,MAAAA;AAE/C,YAAM,KAAKQ,GAAGuD,MAAM/D,QAAQ2D,IAAIjC,OAAO;IACzC;EACF;AACF;","names":["Args","Flags","watch","default","graymatter","mdToPdf","Nunjucks","basename","dirname","extname","join","Command","ConfigService","FileSystemService","INPUT_FILE_ACCEPTED_TYPES","OUTPUT_FILE_ACCEPTED_TYPES","RequiredTemplateFiles","TEMPLATE_DIRECTORY","TemplateFiles","description","flags","template","string","char","title","boolean","dev","args","file","required","output","nunjucks","configure","autoescape","throwOnUndefined","trimBlocks","lstripBlocks","cs","fs","shouldRunBefore","app","get","tasks","options","silentRendererCondition","run","add","task","ctx","process","cwd","includes","Error","exists","logger","debug","content","read","data","templates","RegExp","test","config","root","Promise","all","map","current","paths","SETTINGS","CSS","HEADER","FOOTER","TEMPLATE","extend","pdf_options","dest","document_title","launch_options","headless","css","headerTemplate","footerTemplate","devtools","runMd2Pdf","shouldRunAfter","info","on","runTasks","pdf","renderString","filename","mkdir","write"]}
1
+ {"version":3,"sources":["../../src/commands/run.ts"],"sourcesContent":["import { Args, Flags } from '@oclif/core'\nimport { watch } from 'chokidar'\nimport { default as graymatter } from 'gray-matter'\nimport { mdToPdf } from 'md-to-pdf'\nimport type { PdfConfig } from 'md-to-pdf/dist/lib/config.js'\nimport type { PdfOutput } from 'md-to-pdf/dist/lib/generate-output.js'\nimport Nunjucks from 'nunjucks'\nimport { basename, dirname, extname, join } from 'path'\n\nimport type { ShouldRunAfterHook, ShouldRunBeforeHook } from '@cenk1cenk2/oclif-common'\nimport { Command, ConfigService, FileSystemService } from '@cenk1cenk2/oclif-common'\nimport { INPUT_FILE_ACCEPTED_TYPES, OUTPUT_FILE_ACCEPTED_TYPES, RequiredTemplateFiles, TEMPLATE_DIRECTORY, TemplateFiles } from '@constants'\nimport type { MdPrinterCtx } from '@interfaces'\n\nexport default class MDPrinter extends Command<typeof MDPrinter, MdPrinterCtx> implements ShouldRunBeforeHook, ShouldRunAfterHook {\n static description = 'Generates a PDF from the given markdown file with the selected HTML template.'\n\n static flags = {\n template: Flags.string({\n char: 't',\n default: 'default',\n description: 'HTML template for the generated PDF file.'\n }),\n title: Flags.string({\n char: 'T',\n description: 'Overwrite document title.'\n }),\n watch: Flags.boolean({\n char: 'w',\n description: 'Watch the changes on the given file.'\n }),\n dev: Flags.boolean({\n char: 'd',\n description: 'Run with Chrome browser instead of publishing the file.'\n })\n }\n\n static args = {\n file: Args.string({\n description: 'Markdown file to be processed.',\n required: true\n }),\n output: Args.string({\n description: 'Output file that will be generated. Overwrites the one define in front-matter.',\n required: false\n })\n }\n\n private nunjucks = Nunjucks.configure({\n autoescape: false,\n throwOnUndefined: true,\n trimBlocks: true,\n lstripBlocks: false\n })\n private cs: ConfigService\n private fs: FileSystemService\n\n public async shouldRunBefore (): Promise<void> {\n this.cs = this.app.get(ConfigService)\n this.fs = this.app.get(FileSystemService)\n\n this.tasks.options = { silentRendererCondition: true }\n }\n\n public async run (): Promise<void> {\n this.tasks.add([\n {\n task: async (ctx): Promise<void> => {\n const file = join(process.cwd(), this.args.file)\n\n if (!INPUT_FILE_ACCEPTED_TYPES.includes(extname(file))) {\n throw new Error(`Input file should be ending with the extension: ${INPUT_FILE_ACCEPTED_TYPES.join(', ')} -> current: ${extname(file)}`)\n }\n\n if (!this.fs.exists(file)) {\n throw new Error(`File does not exists: ${file}`)\n }\n\n this.logger.debug('Loading file: %s', file)\n\n ctx.file = file\n\n ctx.content = await this.fs.read(file)\n\n ctx.graymatter = graymatter.read(ctx.file)\n }\n },\n\n {\n task: async (ctx): Promise<void> => {\n const template = ctx.graymatter?.data?.template ?? this.flags.template\n\n this.logger.debug('Loading template: %s', template)\n\n ctx.templates = new RegExp(/\\.\\.?\\//).test(template) ? join(process.cwd(), template) : join(this.config.root, TEMPLATE_DIRECTORY, template)\n\n await Promise.all(\n RequiredTemplateFiles.map(async (file) => {\n const current = join(ctx.templates, file)\n\n if (!this.fs.exists(current)) {\n throw new Error(`Template does not exists: ${current}`)\n }\n })\n )\n\n const paths: Record<TemplateFiles, string> = {\n [TemplateFiles.SETTINGS]: join(ctx.templates, TemplateFiles.SETTINGS),\n [TemplateFiles.CSS]: join(ctx.templates, TemplateFiles.CSS),\n [TemplateFiles.HEADER]: join(ctx.templates, TemplateFiles.HEADER),\n [TemplateFiles.FOOTER]: join(ctx.templates, TemplateFiles.FOOTER),\n [TemplateFiles.TEMPLATE]: join(ctx.templates, TemplateFiles.TEMPLATE)\n }\n\n ctx.options = await this.cs.extend<PdfConfig>([\n paths[TemplateFiles.SETTINGS],\n {\n pdf_options: {},\n dest: this.args?.output ?? ctx.graymatter.data?.dest ?? `${basename(this.args.file, extname(this.args.file))}.pdf`,\n document_title: ctx.graymatter.data?.document_title ?? this.flags.title ?? this.args.file,\n // https://github.com/simonhaenisch/md-to-pdf/issues/247\n launch_options: {\n headless: 'new'\n }\n }\n ])\n\n if (this.fs.exists(paths[TemplateFiles.CSS])) {\n this.logger.debug('CSS exists for template.')\n ctx.options.css = await this.fs.read(paths[TemplateFiles.CSS])\n }\n\n if (this.fs.exists(paths[TemplateFiles.HEADER])) {\n this.logger.debug('Header exists for template.')\n\n ctx.options.pdf_options.headerTemplate = await this.fs.read(paths[TemplateFiles.HEADER])\n }\n\n if (this.fs.exists(paths[TemplateFiles.FOOTER])) {\n this.logger.debug('Footer exists for template.')\n\n ctx.options.pdf_options.footerTemplate = await this.fs.read(paths[TemplateFiles.FOOTER])\n }\n\n if (this.fs.exists(paths[TemplateFiles.TEMPLATE])) {\n this.logger.debug('Design template exists for template.')\n\n ctx.template = await this.fs.read(paths[TemplateFiles.TEMPLATE])\n\n ctx.content = ctx.graymatter.content\n\n this.logger.debug('Frontmatter: %o', ctx.graymatter.data)\n }\n }\n },\n\n {\n task: async (ctx): Promise<void> => {\n if (this.flags.dev) {\n ctx.options.devtools = true\n }\n\n return this.runMd2Pdf(ctx)\n }\n }\n ])\n }\n\n public async shouldRunAfter (ctx: MdPrinterCtx): Promise<void> {\n if (this.flags.watch) {\n this.logger.info('Running in watch mode.')\n\n watch([ this.args.file, join(ctx.templates, '**/*') ]).on('change', async () => {\n await this.run()\n await this.runTasks()\n\n this.logger.info('Waiting for the next change.')\n })\n }\n }\n\n private async runMd2Pdf (ctx: MdPrinterCtx): Promise<void> {\n let pdf: PdfOutput\n\n if (ctx.template) {\n this.logger.debug('Rendering as template.')\n pdf = await mdToPdf({ content: this.nunjucks.renderString(ctx.template, { ...ctx.graymatter?.data ?? {}, content: ctx.content }) }, ctx.options)\n } else {\n this.logger.debug('Rendering as plain file.')\n pdf = await mdToPdf({ content: ctx.content }, ctx.options)\n }\n\n const output = pdf.filename\n\n await this.fs.mkdir(dirname(output))\n\n if (!output) {\n throw new Error('Output should either be defined with the variable or front-matter.')\n } else if (!OUTPUT_FILE_ACCEPTED_TYPES.includes(extname(output))) {\n throw new Error(`Output file should be ending with the extension: ${OUTPUT_FILE_ACCEPTED_TYPES.join(', ')} -> current: ${extname(output)}`)\n }\n\n this.logger.debug('Output file will be: %s', output)\n\n if (pdf) {\n this.logger.info('Writing file to output: %s', output)\n\n await this.fs.write(output, pdf.content)\n }\n }\n}\n"],"mappings":";;AAAA,SAASA,MAAMC,aAAa;AAC5B,SAASC,aAAa;AACtB,SAASC,WAAWC,kBAAkB;AACtC,SAASC,eAAe;AAGxB,OAAOC,cAAc;AACrB,SAASC,UAAUC,SAASC,SAASC,YAAY;AAGjD,S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,oEAAA;IAClB,WAAW,CAACrC,2BAA2BoC,SAAS1C,QAAQqB,MAAAA,CAAAA,GAAU;AAChE,YAAM,IAAIsB,MAAM,oDAAoDrC,2BAA2BL,KAAK,IAAA,CAAA,gBAAqBD,QAAQqB,MAAAA,CAAAA,EAAS;IAC5I;AAEA,SAAKwB,OAAOC,MAAM,2BAA2BzB,MAAAA;AAE7C,QAAI2D,KAAK;AACP,WAAKnC,OAAOgC,KAAK,8BAA8BxD,MAAAA;AAE/C,YAAM,KAAKQ,GAAGuD,MAAM/D,QAAQ2D,IAAIjC,OAAO;IACzC;EACF;AACF;","names":["Args","Flags","watch","default","graymatter","mdToPdf","Nunjucks","basename","dirname","extname","join","Command","ConfigService","FileSystemService","INPUT_FILE_ACCEPTED_TYPES","OUTPUT_FILE_ACCEPTED_TYPES","RequiredTemplateFiles","TEMPLATE_DIRECTORY","TemplateFiles","description","flags","template","string","char","title","boolean","dev","args","file","required","output","nunjucks","configure","autoescape","throwOnUndefined","trimBlocks","lstripBlocks","cs","fs","shouldRunBefore","app","get","tasks","options","silentRendererCondition","run","add","task","ctx","process","cwd","includes","Error","exists","logger","debug","content","read","data","templates","RegExp","test","config","root","Promise","all","map","current","paths","SETTINGS","CSS","HEADER","FOOTER","TEMPLATE","extend","pdf_options","dest","document_title","launch_options","headless","css","headerTemplate","footerTemplate","devtools","runMd2Pdf","shouldRunAfter","info","on","runTasks","pdf","renderString","filename","mkdir","write"]}
@@ -103,5 +103,5 @@
103
103
  ]
104
104
  }
105
105
  },
106
- "version": "2.2.73"
106
+ "version": "2.2.75"
107
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cenk1cenk2/md-printer",
3
- "version": "2.2.74",
3
+ "version": "2.2.76",
4
4
  "description": "A markdown printer.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -68,47 +68,48 @@
68
68
  "cenk1cenk2"
69
69
  ],
70
70
  "dependencies": {
71
- "@cenk1cenk2/oclif-common": "^6.3.9",
72
- "@listr2/manager": "^2.0.2",
73
- "@oclif/core": "^3.19.1",
74
- "@oclif/plugin-help": "^6.0.12",
71
+ "@cenk1cenk2/oclif-common": "^6.3.14",
72
+ "@listr2/manager": "^2.0.8",
73
+ "@oclif/core": "^3.26.6",
74
+ "@oclif/plugin-help": "^6.1.0",
75
75
  "chokidar": "^3.6.0",
76
76
  "fs-extra": "^11.2.0",
77
77
  "gray-matter": "^4.0.3",
78
- "listr2": "^8.0.2",
78
+ "listr2": "^8.2.1",
79
79
  "md-to-pdf": "^5.2.4",
80
80
  "nunjucks": "^3.2.4"
81
81
  },
82
82
  "devDependencies": {
83
- "@cenk1cenk2/cz-cc": "^1.7.5",
84
- "@cenk1cenk2/eslint-config": "^2.7.39",
85
- "@swc/core": "^1.4.1",
83
+ "@cenk1cenk2/cz-cc": "^1.7.7",
84
+ "@cenk1cenk2/eslint-config": "^2.7.48",
85
+ "@swc/core": "^1.5.24",
86
86
  "@tailwindcss/forms": "^0.5.7",
87
- "@tailwindcss/typography": "^0.5.10",
88
- "@types/config": "^3.3.3",
87
+ "@tailwindcss/typography": "^0.5.13",
88
+ "@types/config": "^3.3.4",
89
89
  "@types/fs-extra": "^11.0.4",
90
- "@types/node": "^20.11.17",
90
+ "@types/node": "^20.14.0",
91
91
  "@types/nunjucks": "^3.2.6",
92
- "eslint": "^8.56.0",
92
+ "eslint": "^8.57.0",
93
93
  "execa": "^8.0.1",
94
94
  "globby": "^14.0.1",
95
- "lint-staged": "^15.2.2",
96
- "oclif": "^4.4.11",
97
- "postcss": "^8.4.35",
98
- "prettier": "^3.2.5",
99
- "simple-git-hooks": "^2.9.0",
95
+ "lint-staged": "^15.2.5",
96
+ "oclif": "^4.12.3",
97
+ "postcss": "^8.4.38",
98
+ "prettier": "^3.3.0",
99
+ "simple-git-hooks": "^2.11.1",
100
100
  "source-map-support": "^0.5.21",
101
- "tailwindcss": "^3.4.1",
101
+ "tailwindcss": "^3.4.3",
102
102
  "theme-colors": "^0.1.0",
103
103
  "ts-node": "^10.9.2",
104
104
  "tsconfig-paths": "^4.2.0",
105
105
  "tsconfig-replace-paths": "^0.0.14",
106
- "tsup": "^8.0.2",
107
- "typescript": "^5.3.3"
106
+ "tsup": "^8.1.0",
107
+ "typescript": "^5.4.5"
108
108
  },
109
109
  "config": {
110
110
  "commitizen": {
111
111
  "path": "./node_modules/@cenk1cenk2/cz-cc"
112
112
  }
113
- }
113
+ },
114
+ "packageManager": "pnpm@9.1.0+sha512.67f5879916a9293e5cf059c23853d571beaf4f753c707f40cb22bed5fb1578c6aad3b6c4107ccb3ba0b35be003eb621a16471ac836c87beb53f9d54bb4612724"
114
115
  }
@@ -7,7 +7,7 @@ html {
7
7
  }
8
8
 
9
9
  /*
10
- ! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
10
+ ! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com
11
11
  */
12
12
 
13
13
  /*
@@ -219,6 +219,8 @@ textarea {
219
219
  /* 1 */
220
220
  line-height: inherit;
221
221
  /* 1 */
222
+ letter-spacing: inherit;
223
+ /* 1 */
222
224
  color: inherit;
223
225
  /* 1 */
224
226
  margin: 0;
@@ -242,9 +244,9 @@ select {
242
244
  */
243
245
 
244
246
  button,
245
- [type='button'],
246
- [type='reset'],
247
- [type='submit'] {
247
+ input:where([type='button']),
248
+ input:where([type='reset']),
249
+ input:where([type='submit']) {
248
250
  -webkit-appearance: button;
249
251
  /* 1 */
250
252
  background-color: transparent;
@@ -695,6 +697,10 @@ select {
695
697
  --tw-backdrop-opacity: ;
696
698
  --tw-backdrop-saturate: ;
697
699
  --tw-backdrop-sepia: ;
700
+ --tw-contain-size: ;
701
+ --tw-contain-layout: ;
702
+ --tw-contain-paint: ;
703
+ --tw-contain-style: ;
698
704
  }
699
705
 
700
706
  ::backdrop {
@@ -745,6 +751,10 @@ select {
745
751
  --tw-backdrop-opacity: ;
746
752
  --tw-backdrop-saturate: ;
747
753
  --tw-backdrop-sepia: ;
754
+ --tw-contain-size: ;
755
+ --tw-contain-layout: ;
756
+ --tw-contain-paint: ;
757
+ --tw-contain-style: ;
748
758
  }
749
759
 
750
760
  .prose {
@@ -792,7 +802,7 @@ select {
792
802
  list-style-type: decimal;
793
803
  margin-top: 1.25em;
794
804
  margin-bottom: 1.25em;
795
- padding-left: 1.625em;
805
+ padding-inline-start: 1.625em;
796
806
  }
797
807
 
798
808
  .prose :where(ol[type="A"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@@ -835,7 +845,7 @@ select {
835
845
  list-style-type: disc;
836
846
  margin-top: 1.25em;
837
847
  margin-bottom: 1.25em;
838
- padding-left: 1.625em;
848
+ padding-inline-start: 1.625em;
839
849
  }
840
850
 
841
851
  .prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker {
@@ -864,12 +874,12 @@ select {
864
874
  font-weight: 500;
865
875
  font-style: italic;
866
876
  color: var(--tw-prose-quotes);
867
- border-left-width: 0.25rem;
868
- border-left-color: var(--tw-prose-quote-borders);
877
+ border-inline-start-width: 0.25rem;
878
+ border-inline-start-color: var(--tw-prose-quote-borders);
869
879
  quotes: "\201C""\201D""\2018""\2019";
870
880
  margin-top: 1.6em;
871
881
  margin-bottom: 1.6em;
872
- padding-left: 1em;
882
+ padding-inline-start: 1em;
873
883
  }
874
884
 
875
885
  .prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::before {
@@ -946,6 +956,11 @@ select {
946
956
  margin-bottom: 2em;
947
957
  }
948
958
 
959
+ .prose :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
960
+ margin-top: 2em;
961
+ margin-bottom: 2em;
962
+ }
963
+
949
964
  .prose :where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
950
965
  font-weight: 500;
951
966
  font-family: inherit;
@@ -954,9 +969,9 @@ select {
954
969
  font-size: 0.875em;
955
970
  border-radius: 0.3125rem;
956
971
  padding-top: 0.1875em;
957
- padding-right: 0.375em;
972
+ padding-inline-end: 0.375em;
958
973
  padding-bottom: 0.1875em;
959
- padding-left: 0.375em;
974
+ padding-inline-start: 0.375em;
960
975
  }
961
976
 
962
977
  .prose :where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@@ -1014,9 +1029,9 @@ select {
1014
1029
  margin-bottom: 1.7142857em;
1015
1030
  border-radius: 0.375rem;
1016
1031
  padding-top: 0.8571429em;
1017
- padding-right: 1.1428571em;
1032
+ padding-inline-end: 1.1428571em;
1018
1033
  padding-bottom: 0.8571429em;
1019
- padding-left: 1.1428571em;
1034
+ padding-inline-start: 1.1428571em;
1020
1035
  }
1021
1036
 
1022
1037
  .prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@@ -1042,7 +1057,7 @@ select {
1042
1057
  .prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1043
1058
  width: 100%;
1044
1059
  table-layout: auto;
1045
- text-align: left;
1060
+ text-align: start;
1046
1061
  margin-top: 2em;
1047
1062
  margin-bottom: 2em;
1048
1063
  font-size: 0.875em;
@@ -1058,9 +1073,9 @@ select {
1058
1073
  color: var(--tw-prose-headings);
1059
1074
  font-weight: 600;
1060
1075
  vertical-align: bottom;
1061
- padding-right: 0.5714286em;
1076
+ padding-inline-end: 0.5714286em;
1062
1077
  padding-bottom: 0.5714286em;
1063
- padding-left: 0.5714286em;
1078
+ padding-inline-start: 0.5714286em;
1064
1079
  }
1065
1080
 
1066
1081
  .prose :where(tbody tr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@@ -1143,22 +1158,17 @@ select {
1143
1158
  margin-bottom: 0;
1144
1159
  }
1145
1160
 
1146
- .prose :where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1147
- margin-top: 2em;
1148
- margin-bottom: 2em;
1149
- }
1150
-
1151
1161
  .prose :where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1152
1162
  margin-top: 0.5em;
1153
1163
  margin-bottom: 0.5em;
1154
1164
  }
1155
1165
 
1156
1166
  .prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1157
- padding-left: 0.375em;
1167
+ padding-inline-start: 0.375em;
1158
1168
  }
1159
1169
 
1160
1170
  .prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1161
- padding-left: 0.375em;
1171
+ padding-inline-start: 0.375em;
1162
1172
  }
1163
1173
 
1164
1174
  .prose :where(.prose > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@@ -1166,19 +1176,19 @@ select {
1166
1176
  margin-bottom: 0.75em;
1167
1177
  }
1168
1178
 
1169
- .prose :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1179
+ .prose :where(.prose > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1170
1180
  margin-top: 1.25em;
1171
1181
  }
1172
1182
 
1173
- .prose :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1183
+ .prose :where(.prose > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1174
1184
  margin-bottom: 1.25em;
1175
1185
  }
1176
1186
 
1177
- .prose :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1187
+ .prose :where(.prose > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1178
1188
  margin-top: 1.25em;
1179
1189
  }
1180
1190
 
1181
- .prose :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1191
+ .prose :where(.prose > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1182
1192
  margin-bottom: 1.25em;
1183
1193
  }
1184
1194
 
@@ -1194,7 +1204,7 @@ select {
1194
1204
 
1195
1205
  .prose :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1196
1206
  margin-top: 0.5em;
1197
- padding-left: 1.625em;
1207
+ padding-inline-start: 1.625em;
1198
1208
  }
1199
1209
 
1200
1210
  .prose :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@@ -1214,26 +1224,26 @@ select {
1214
1224
  }
1215
1225
 
1216
1226
  .prose :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1217
- padding-left: 0;
1227
+ padding-inline-start: 0;
1218
1228
  }
1219
1229
 
1220
1230
  .prose :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1221
- padding-right: 0;
1231
+ padding-inline-end: 0;
1222
1232
  }
1223
1233
 
1224
1234
  .prose :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1225
1235
  padding-top: 0.5714286em;
1226
- padding-right: 0.5714286em;
1236
+ padding-inline-end: 0.5714286em;
1227
1237
  padding-bottom: 0.5714286em;
1228
- padding-left: 0.5714286em;
1238
+ padding-inline-start: 0.5714286em;
1229
1239
  }
1230
1240
 
1231
1241
  .prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1232
- padding-left: 0;
1242
+ padding-inline-start: 0;
1233
1243
  }
1234
1244
 
1235
1245
  .prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
1236
- padding-right: 0;
1246
+ padding-inline-end: 0;
1237
1247
  }
1238
1248
 
1239
1249
  .prose :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {