<commit_before>c = require './../schemas'
metaschema = require './../metaschema'

attackSelfCode = """
class AttacksSelf extends Component
  @className: 'AttacksSelf'
  chooseAction: ->
    @attack @
"""
systems = [
  'action', 'ai', 'alliance', 'collision', 'combat', 'display', 'event', 'existence', 'hearing',
  'inventory', 'movement', 'programming', 'targeting', 'ui', 'vision', 'misc', 'physics', 'effect',
  'magic', 'game'
]

PropertyDocumentationSchema = c.object {
  title: 'Property Documentation'
  description: 'Documentation entry for a property this Component will add to its Thang which other Components might want to also use.'
  default:
    name: 'foo'
    type: 'object'
    description: 'The `foo` property can satisfy all the #{spriteName}\'s foobar needs. Use it wisely.'
  required: ['name', 'type', 'description']
},
  name: {type: 'string', title: 'Name', description: 'Name of the property.'}
  i18n: { type: 'object', format: 'i18n', props: ['name', 'description', 'context'], description: 'Help translate this property'}
  context: {
    type: 'object'
    title: 'Example template context'
    additionalProperties: { type: 'string' }
  }
  codeLanguages: c.array {title: 'Specific Code Languages', description: 'If present, then only the languages specified will show this documentation. Leave unset for language-independent documentation.', format: 'code-languages-array'}, c.shortString(title: 'Code Language', description: 'A specific code language to show this documentation for.', format: 'code-language')
  # not actual JS types, just whatever they describe...
  type: c.shortString(title: 'Type', description: 'Intended type of the property.')
  description:
    oneOf: [
      {
        type: 'object',
        title: 'Language Descriptions',
        description: 'Property descriptions by code language.',
        additionalProperties: {type: 'string', description: 'Description of the property.', maxLength: 1000, format: 'markdown'}
        format: 'code-languages-object'
        default: {javascript: ''}
      }
      {title: 'Description', type: 'string', description: 'Description of the property.', maxLength: 1000, format: 'markdown'}
    ]
  args: c.array {title: 'Arguments', description: 'If this property has type "function", then provide documentation for any function arguments.'}, c.FunctionArgumentSchema
  owner: {title: 'Owner', type: 'string', description: 'Owner of the property, like "this" or "Math".'}
  example:
    oneOf: [
      {
        type: 'object',
        title: 'Language Examples',
        description: 'Examples by code language.',
        additionalProperties: {type: 'string', description: 'An example code block.', format: 'code'}
        format: 'code-languages-object'
        default: {javascript: ''}
      }
      {title: 'Example', type: 'string', description: 'An optional example code block.', format: 'javascript'}
    ]
  snippets: {type: 'object', title: 'Snippets', description: 'List of snippets for the respective programming languages', additionalProperties: c.codeSnippet, format: 'code-languages-object'}
  returns: c.object {
    title: 'Return Value'
    description: 'Optional documentation of any return value.'
    required: ['type']
    default: {type: 'null'}
  },
    type: c.shortString(title: 'Type', description: 'Type of the return value')
    example:
      oneOf: [
        {
          type: 'object',
          title: 'Language Examples',
          description: 'Example return values by code language.',
          additionalProperties: c.shortString(description: 'Example return value.', format: 'code')
          format: 'code-languages-object'
          default: {javascript: ''}
        }
        c.shortString(title: 'Example', description: 'Example return value')
      ]
    description:
      oneOf: [
        {
          type: 'object',
          title: 'Language Descriptions',
          description: 'Example return values by code language.',
          additionalProperties: {type: 'string', description: 'Description of the return value.', maxLength: 1000}
          format: 'code-languages-object'
          default: {javascript: ''}
        }
        {title: 'Description', type: 'string', description: 'Description of the return value.', maxLength: 1000}
      ]
    i18n: { type: 'object', format: 'i18n', props: ['description'], description: 'Help translate this return value'}
  autoCompletePriority:
    type: 'number'
    title: 'Autocomplete Priority'
    description: 'How important this property is to autocomplete.'
    minimum: 0
    default: 1.0
  userShouldCaptureReturn:
    type: 'object'
    title: 'User Should Capture Return'
    properties:
      variableName:
        type: 'string'
        title: 'Variable Name'
        description: 'Variable name this property is autocompleted into.'
        default: 'result'

DependencySchema = c.object {
  title: 'Component Dependency'
  description: 'A Component upon which this Component depends.'
  required: ['original', 'majorVersion']
  format: 'latest-version-reference'
  links: [{rel: 'db', href: '/db/level.component/{(original)}/version/{(majorVersion)}'}]
},
  original: c.objectId(title: 'Original', description: 'A reference to another Component upon which this Component depends.')
  majorVersion:
    title: 'Major Version'<commit_msg>Add section properties to documentation schema for methods bank (#5441)<commit_after>c = require './../schemas'
metaschema = require './../metaschema'

attackSelfCode = """
class AttacksSelf extends Component
  @className: 'AttacksSelf'
  chooseAction: ->
    @attack @
"""
systems = [
  'action', 'ai', 'alliance', 'collision', 'combat', 'display', 'event', 'existence', 'hearing',
  'inventory', 'movement', 'programming', 'targeting', 'ui', 'vision', 'misc', 'physics', 'effect',
  'magic', 'game'
]

PropertyDocumentationSchema = c.object {
  title: 'Property Documentation'
  description: 'Documentation entry for a property this Component will add to its Thang which other Components might want to also use.'
  default:
    name: 'foo'
    type: 'object'
    description: 'The `foo` property can satisfy all the #{spriteName}\'s foobar needs. Use it wisely.'
  required: ['name', 'type', 'description']
},
  name: {type: 'string', title: 'Name', description: 'Name of the property.'}
  i18n: { type: 'object', format: 'i18n', props: ['name', 'description', 'context'], description: 'Help translate this property'}
  context: {
    type: 'object'
    title: 'Example template context'
    additionalProperties: { type: 'string' }
  }
  codeLanguages: c.array {title: 'Specific Code Languages', description: 'If present, then only the languages specified will show this documentation. Leave unset for language-independent documentation.', format: 'code-languages-array'}, c.shortString(title: 'Code Language', description: 'A specific code language to show this documentation for.', format: 'code-language')
  # not actual JS types, just whatever they describe...
  type: c.shortString(title: 'Type', description: 'Intended type of the property.')
  description:
    oneOf: [
      {
        type: 'object',
        title: 'Language Descriptions',
        description: 'Property descriptions by code language.',
        additionalProperties: {type: 'string', description: 'Description of the property.', maxLength: 1000, format: 'markdown'}
        format: 'code-languages-object'
        default: {javascript: ''}
      }
      {title: 'Description', type: 'string', description: 'Description of the property.', maxLength: 1000, format: 'markdown'}
    ]
  args: c.array {title: 'Arguments', description: 'If this property has type "function", then provide documentation for any function arguments.'}, c.FunctionArgumentSchema
  owner: {title: 'Owner', type: 'string', description: 'Owner of the property, like "this" or "Math".'}
  example:
    oneOf: [
      {
        type: 'object',
        title: 'Language Examples',
        description: 'Examples by code language.',
        additionalProperties: {type: 'string', description: 'An example code block.', format: 'code'}
        format: 'code-languages-object'
        default: {javascript: ''}
      }
      {title: 'Example', type: 'string', description: 'An optional example code block.', format: 'javascript'}
    ]
  snippets: {type: 'object', title: 'Snippets', description: 'List of snippets for the respective programming languages', additionalProperties: c.codeSnippet, format: 'code-languages-object'}
  returns: c.object {
    title: 'Return Value'
    description: 'Optional documentation of any return value.'
    required: ['type']
    default: {type: 'null'}
  },
    type: c.shortString(title: 'Type', description: 'Type of the return value')
    example:
      oneOf: [
        {
          type: 'object',
          title: 'Language Examples',
          description: 'Example return values by code language.',
          additionalProperties: c.shortString(description: 'Example return value.', format: 'code')
          format: 'code-languages-object'
          default: {javascript: ''}
        }
        c.shortString(title: 'Example', description: 'Example return value')
      ]
    description:
      oneOf: [
        {
          type: 'object',
          title: 'Language Descriptions',
          description: 'Example return values by code language.',
          additionalProperties: {type: 'string', description: 'Description of the return value.', maxLength: 1000}
          format: 'code-languages-object'
          default: {javascript: ''}
        }
        {title: 'Description', type: 'string', description: 'Description of the return value.', maxLength: 1000}
      ]
    i18n: { type: 'object', format: 'i18n', props: ['description'], description: 'Help translate this return value'}
  autoCompletePriority:
    type: 'number'
    title: 'Autocomplete Priority'
    description: 'How important this property is to autocomplete.'
    minimum: 0
    default: 1.0
  userShouldCaptureReturn:
    type: 'object'
    title: 'User Should Capture Return'
    properties:
      variableName:
        type: 'string'
        title: 'Variable Name'
        description: 'Variable name this property is autocompleted into.'
        default: 'result'
  section: c.shortString(title: 'Methods Bank Section')
  subSection: c.shortString(title: 'Methods Bank Sub-Section')

DependencySchema = c.object {
  title: 'Component Dependency'
  description: 'A Component upon which this Component depends.'
  required: ['original', 'majorVersion']
  format: 'latest-version-reference'
  links: [{rel: 'db', href: '/db/level.component/{(original)}/version/{(majorVersion)}'}]
},
  original: c.objectId(title: 'Original', description: 'A reference to another Component upon which this Component depends.')
  majorVersion:
    title: 'Major Version'
{'fraction_non_alphanumeric': 0.1321293651524924, 'fraction_numerical': 0.005344144476181701, 'mean_word_length': 3.608917197452229, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '119610', 'n_tokens_mistral': 2973, 'n_tokens_neox': 2882, 'n_words': 1022}