summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-objectivec.min.js
blob: aece5325be4ab0c90f495ea40a802442f7344ad8 (plain)
1
2
3
4
5
6
7
8
(Prism.languages.objectivec = Prism.languages.extend('c', {
  string: { pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 },
  keyword:
    /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,
  operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/,
})),
  delete Prism.languages.objectivec['class-name'],
  (Prism.languages.objc = Prism.languages.objectivec);
.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
import { NextPage } from 'next';
import { AppProps } from 'next/app';
import { ImageProps } from 'next/image';
import { ReactElement, ReactNode } from 'react';
import { PostBy, TotalArticles } from './articles';
import { AllPostsSlug, LastPostCursor, RawPostsList } from './blog';
import { CommentData, CommentsByPostId, CreateComment } from './comments';
import { ContactData, SendEmail } from './contact';
import {
  AllTopics,
  AllTopicsSlug,
  AllThematics,
  AllThematicsSlug,
  TopicBy,
  ThematicBy,
} from './taxonomies';

//==============================================================================
// Next
//==============================================================================

export type NextPageWithLayout<P = {}> = NextPage<P> & {
  getLayout?: (page: ReactElement) => ReactNode;
};

export type AppPropsWithLayout = AppProps & {
  Component: NextPageWithLayout;
};

//==============================================================================
// API
//==============================================================================

export type VariablesType<T> = T extends PostBy | TopicBy | ThematicBy
  ? Slug
  : T extends RawPostsList
  ? CursorPagination
  : T extends CommentsByPostId
  ? { id: number }
  : T extends CreateComment
  ? CommentData
  : T extends LastPostCursor
  ? { first: number }
  : T extends SendEmail
  ? ContactData
  : null;

export type RequestType =
  | AllPostsSlug
  | AllTopics
  | AllTopicsSlug
  | AllThematics
  | AllThematicsSlug
  | CommentsByPostId
  | CreateComment
  | LastPostCursor
  | PostBy
  | RawPostsList
  | SendEmail
  | ThematicBy
  | TopicBy
  | TotalArticles;

//==============================================================================
// Globals
//==============================================================================

export type ButtonKind = 'primary' | 'secondary' | 'tertiary';

export type ButtonPosition = 'left' | 'right' | 'center';

export type ContentInfo = {
  readingTime: number;
  wordsCount: number;
};

export type ContentParts = {
  afterMore: string;
  beforeMore: string;
};

export type CursorPagination = {
  first: number;
  after: string;
};

export type Dates = {
  publication: string;
  update: string;
};

export type Heading = {
  depth: number;
  id: string;
  children: Heading[];
  title: string;
};

export type Meta = {
  title: string;
  publishedOn: string;
  updatedOn: string;
};

export type MetaKind = 'article' | 'list';

export type NoticeType = 'error' | 'info' | 'success' | 'warning';

export type PageInfo = {
  endCursor: string;
  hasNextPage: boolean;
  total: number;
};

export type ParamsIds = {
  params: { id: string };
};

export type ParamsSlug = {
  params: { slug: string };
};

export type Project = {
  cover?: string;
  id: string;
  intro: string;
  meta: ProjectMeta;
  slug: string;
  tagline?: string;
  title: string;
  seo: {
    title: string;
    description: string;
  };
};

export type ProjectMeta = Omit<Meta, 'title'> & {
  hasCover: boolean;
  license: string;
  repos?: {
    github?: string;
    gitlab?: string;
  };
  technologies?: string[];
};

export type ProjectProps = {
  project: Project;
};

export type ResponsiveImageProps = ImageProps & {
  caption?: string;
  linkTarget?: string;
};

export type Slug = {
  slug: string;
};

export type TitleLevel = 2 | 3 | 4 | 5 | 6;